Properties
busyConsent
busyConsent: boolean = false
busyReferer
busyReferer: boolean = false
Optional chunkFolder
chunkFolder: string
Optional chunks
chunks: Record<string, string[]>
count
count: number = 0
deleteAll
deleteAll: () => Promise<void> = flow(function* (this: ConsentStore) {this.busyConsent = true;try {yield request<RequestRouteConsentAllDelete, ParamsRouteConsentAllDelete, ResponseRouteConsentAllDelete>({location: locationRestConsentAllDelete});this.applyPage(0);yield this.fetchAll();} catch (e) {console.log(e);throw e;} finally {this.busyConsent = false;}})
fetchAll
fetchAll: () => Promise<void> = flow(function* (this: ConsentStore) {this.busyConsent = true;try {const { page, referer, ip, uuid, context } = this.filters;const dates = this.filters.dates.map((m) => (m ? m.format(DATE_FORMAT) : "")) as [string, string];const { count, truncatedIpsCount, items }: ResponseRouteConsentAllGet = yield request<RequestRouteConsentAllGet,ParamsRouteConsentAllGet,ResponseRouteConsentAllGet>({location: locationRestConsentAllGet,params: {// eslint-disable-next-line @typescript-eslint/naming-conventionper_page: this.perPage,offset: (page - 1) * this.perPage,from: dates[0],to: dates[1],ip,uuid,referer,context}});this.count = count;this.truncatedIpsCount = truncatedIpsCount;this.pageCollection.clear();for (const item of items) {this.pageCollection.set(item.id, new Consent(item, this));}} catch (e) {this.count = 0;this.truncatedIpsCount = 0;this.pageCollection.clear();console.log(e);throw e;} finally {this.busyConsent = false;}})
fetchReferer
fetch
Referer: (params?: ParamsRouteConsentRefererGet) => Promise<void> = flow(function* (this: ConsentStore,params) {this.busyReferer = true;try {const response: ResponseRouteConsentRefererGet = yield request<RequestRouteConsentRefererGet,ParamsRouteConsentRefererGet,ResponseRouteConsentRefererGet>({location: locationRestConsentRefererGet,params});this.referer = response.items;} catch (e) {console.log(e);throw e;} finally {this.busyReferer = false;}})
Type declaration
-
-
Parameters
Returns Promise<void>
fetchRevision
fetch
Revision: (params?: ParamsRouteRevisionGet) => Promise<void> = flow(function* (this: ConsentStore,params) {try {const response: ResponseRouteRevisionGet = yield request<RequestRouteRevisionGet,ParamsRouteRevisionGet,ResponseRouteRevisionGet>({location: locationRestRevisionGet,params});this.revisions.set(params.hash, new Revision(response, this));} catch (e) {console.log(e);throw e;}})
Type declaration
-
-
Parameters
Returns Promise<void>
fetchRevisionIndependent
fetch
RevisionIndependent: (params?: ParamsRouteRevisionIndependentGet) => Promise<void> = flow(function* (this: ConsentStore,params) {try {const response: ResponseRouteRevisionIndependentGet = yield request<RequestRouteRevisionIndependentGet,ParamsRouteRevisionIndependentGet,ResponseRouteRevisionIndependentGet>({location: locationRestRevisionIndependentGet,params});this.revisionsIndependent.set(params.hash, new RevisionIndependent(response, this));} catch (e) {console.log(e);throw e;}})
Type declaration
-
-
Parameters
Returns Promise<void>
filters
filters: { context: string; dates: [Moment, Moment]; ip: ParamsRouteConsentAllGet["ip"]; page: number; referer: ParamsRouteConsentAllGet["referer"]; uuid: ParamsRouteConsentAllGet["uuid"] } = observable.object({page: 1,dates: [undefined, undefined],context: undefined,referer: undefined,ip: undefined,uuid: undefined},{},{ deep: false })
Type declaration
-
context: string
-
dates: [Moment, Moment]
-
ip: ParamsRouteConsentAllGet["ip"]
-
page: number
-
referer: ParamsRouteConsentAllGet["referer"]
-
uuid: ParamsRouteConsentAllGet["uuid"]
offset
offset: number = 0
pageCollection
page
Collection: Map<number, Consent> = new Map<number, Consent>()
perPage
perPage: number = 50
Optional publicUrl
publicUrl: string
referer
referer: string[] = []
Optional restNamespace
restNamespace: string
Optional restNonce
restNonce: string
Optional restQuery
restQuery: {}
Optional restRecreateNonceEndpoint
restRecreateNonceEndpoint: string
Optional restRoot
restRoot: string
Optional restUrl
restUrl: string
revisions
revisions
: Map<string, Revision> = new Map<string, Revision>()
revisionsIndependent
revisions
Independent: Map<string, RevisionIndependent> = new Map<string, RevisionIndependent>()
Readonly rootStore
textDomain
textDomain: string
truncatedIpsCount
truncatedIpsCount: number = 0
Current visible page in Consent tab