Properties
Optional chunkFolder
chunkFolder: string
Optional chunks
chunks: Record<string, string[]>
fetchButtonsClicked
fetchButtonsClicked: () => Promise<void> = flow(function* (this: StatsStore) {if (process.env.PLUGIN_CTX === "pro") {/* onlypro:start */this.busyStats.buttonClicked = true;try {const dates = this.filters.dates.map((m) => m.format(DATE_FORMAT)) as [string, string];const result: ResponseRouteStatsButtonsClickedGet = yield request<RequestRouteStatsButtonsClickedGet,ParamsRouteStatsButtonsClickedGet,ResponseRouteStatsButtonsClickedGet>({location: locationRestStatsButtonsClickedGet,params: {from: dates[0],to: dates[1],context: this.filters.context}});this.stats.buttonsClicked = result;} catch (e) {console.log(e);throw e;} finally {this.busyStats.buttonClicked = false;}/* onlypro:end */} else {throw new Error("This feature is not available in the free version.");}})
fetchCustomBypass
fetchCustomBypass: () => Promise<void> = flow(function* (this: StatsStore) {if (process.env.PLUGIN_CTX === "pro") {/* onlypro:start */this.busyStats.customBypass = true;try {const dates = this.filters.dates.map((m) => m.format(DATE_FORMAT)) as [string, string];const result: ResponseRouteStatsCustomBypassGet = yield request<RequestRouteStatsCustomBypassGet,ParamsRouteStatsCustomBypassGet,ResponseRouteStatsCustomBypassGet>({location: locationRestStatsCustomBypassGet,params: {from: dates[0],to: dates[1],context: this.filters.context}});this.stats.customBypass = result;} catch (e) {console.log(e);throw e;} finally {this.busyStats.customBypass = false;}/* onlypro:end */} else {throw new Error("This feature is not available in the free version.");}})
fetchMain
fetchMain: () => Promise<void> = flow(function* (this: StatsStore) {if (process.env.PLUGIN_CTX === "pro") {/* onlypro:start */this.busyStats.main = true;try {const dates = this.filters.dates.map((m) => m.format(DATE_FORMAT)) as [string, string];const result: ResponseRouteStatsMainGet = yield request<RequestRouteStatsMainGet,ParamsRouteStatsMainGet,ResponseRouteStatsMainGet>({location: locationRestStatsMainGet,params: {from: dates[0],to: dates[1],context: this.filters.context}});this.stats.main = result;if (result.length > 0) {this.rootStore.checklistStore.probablyFetchByChangedItem("view-stats");}} catch (e) {console.log(e);throw e;} finally {this.busyStats.main = false;}/* onlypro:end */} else {throw new Error("This feature is not available in the free version.");}})
filters
filters: { context: string; dates: [Moment, Moment] } = observable.object({dates: undefined,context: undefined},{},{ deep: false })
Type declaration
-
context: string
-
dates: [Moment, Moment]
Optional publicUrl
publicUrl: string
Optional restNamespace
restNamespace: string
Optional restNonce
restNonce: string
Optional restQuery
restQuery: {}
Optional restRecreateNonceEndpoint
restRecreateNonceEndpoint: string
Optional restRoot
restRoot: string
Optional restUrl
restUrl: string
Readonly rootStore
stats
textDomain
textDomain: string
This action does not actually refetch the stats, you need to act on your components!