Properties
blockers
busy
busy: boolean = false
busyPresetsBlocker
busyPresetsBlocker: boolean = false
busyPresetsCookie
busyPresetsCookie: boolean = false
fetchBlockers
fetchBlockers: () => Promise<void> = flow(function* (this: CookieStore) {yield this.blockers.get({request: {status: ["draft", "publish", "private"]},params: {// eslint-disable-next-line @typescript-eslint/naming-conventionper_page: 100, // Fetch allcontext: "edit"}});this.fetchedAllBlockers = true;})
fetchGroups
fetchGroups: () => Promise<void> = flow(function* (this: CookieStore) {yield this.groups.get({params: {// eslint-disable-next-line @typescript-eslint/naming-conventionper_page: 100}});yield this.fetchUnassignedCookies();})
fetchPresetsBlocker
fetchPresetsBlocker: () => Promise<void> = flow(function* (this: CookieStore) {this.busyPresetsBlocker = true;try {const { items }: ResponseRoutePresetsBlockerGet = yield request<RequestRoutePresetsBlockerGet,ParamsRoutePresetsBlockerGet,ResponseRoutePresetsBlockerGet>({location: locationRestPresetsBlockerGet});// Save presets as objectfor (const pid of Object.keys(items)) {this.presetsBlocker.set(pid, new BlockerPreset(items[pid], this));}} catch (e) {console.log(e);throw e;} finally {this.busyPresetsBlocker = false;}})
fetchPresetsCookie
fetchPresetsCookie: () => Promise<void> = flow(function* (this: CookieStore) {this.busyPresetsCookie = true;try {const { items }: ResponseRoutePresetsCookiesGet = yield request<RequestRoutePresetsCookiesGet,ParamsRoutePresetsCookiesGet,ResponseRoutePresetsCookiesGet>({location: locationRestPresetsCookiesGet});// Save presets as objectfor (const pid of Object.keys(items)) {this.presetsCookie.set(pid, new CookiePreset(items[pid], this));}} catch (e) {console.log(e);throw e;} finally {this.busyPresetsCookie = false;}})
fetchUnassignedCookies
fetchUnassignedCookies: () => Promise<void> = flow(function* (this: CookieStore) {try {const items: ResponseRouteCookieUnassignedGet = yield request<RequestRouteCookieUnassignedGet,ParamsRouteCookieUnassignedGet,ResponseRouteCookieUnassignedGet>({location: locationRestCookieUnassignedGet});// Save presets as objectfor (const item of Object.values(items)) {this.unassignedCookies.set(item.id, item);}} catch (e) {console.log(e);throw e;}})
fetchedAllBlockers
fetchedAllBlockers: boolean = false
groups
presetsBlocker
presets
Blocker: Map<string, BlockerPreset> = new Map<string, BlockerPreset>()
presetsCookie
presets
Cookie: Map<string, CookiePreset> = new Map<string, CookiePreset>()
Readonly rootStore
unassignedCookies
unassignedCookies: Map<number, { id: number; title: string }> = new Map<number, ResponseRouteCookieUnassignedGet[0]>()