@overmap-ai/core 1.0.53-component-asset-renames.2 → 1.0.53-fix-outbox.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/README.md +4 -4
  2. package/dist/constants/ui.d.ts +1 -1
  3. package/dist/enums/ui.d.ts +1 -1
  4. package/dist/overmap-core.js +967 -913
  5. package/dist/overmap-core.js.map +1 -1
  6. package/dist/overmap-core.umd.cjs +968 -914
  7. package/dist/overmap-core.umd.cjs.map +1 -1
  8. package/dist/sdk/sdk.d.ts +20 -8
  9. package/dist/sdk/services/BaseApiService.d.ts +0 -12
  10. package/dist/sdk/services/ComponentAttachmentService.d.ts +10 -0
  11. package/dist/sdk/services/ComponentService.d.ts +11 -0
  12. package/dist/sdk/services/ComponentStageCompletionService.d.ts +17 -0
  13. package/dist/sdk/services/ComponentStageService.d.ts +11 -0
  14. package/dist/sdk/services/ComponentTypeAttachmentService.d.ts +10 -0
  15. package/dist/sdk/services/ComponentTypeService.d.ts +9 -0
  16. package/dist/sdk/services/UserFormService.d.ts +2 -2
  17. package/dist/sdk/services/UserFormSubmissionService.d.ts +1 -1
  18. package/dist/sdk/services/index.d.ts +6 -6
  19. package/dist/store/slices/ComponentStageCompletionSlice.d.ts +27 -0
  20. package/dist/store/slices/categorySlice.d.ts +4 -4
  21. package/dist/store/slices/componentSlice.d.ts +73 -0
  22. package/dist/store/slices/componentStageSlice.d.ts +42 -0
  23. package/dist/store/slices/componentTypeSlice.d.ts +75 -0
  24. package/dist/store/slices/documentSlice.d.ts +7 -6
  25. package/dist/store/slices/formRevisionSlice.d.ts +5 -5
  26. package/dist/store/slices/formSlice.d.ts +7 -7
  27. package/dist/store/slices/formSubmissionSlice.d.ts +2 -2
  28. package/dist/store/slices/index.d.ts +4 -4
  29. package/dist/store/slices/issueSlice.d.ts +4 -4
  30. package/dist/store/slices/projectFileSlice.d.ts +4 -4
  31. package/dist/store/slices/workspaceSlice.d.ts +4 -4
  32. package/dist/store/store.d.ts +13 -13
  33. package/dist/typings/models/attachments.d.ts +6 -6
  34. package/dist/typings/models/components.d.ts +7 -11
  35. package/dist/typings/models/forms.d.ts +3 -3
  36. package/dist/utils/colors.d.ts +1 -1
  37. package/package.json +153 -153
  38. package/dist/sdk/services/AssetAttachmentService.d.ts +0 -10
  39. package/dist/sdk/services/AssetService.d.ts +0 -11
  40. package/dist/sdk/services/AssetStageCompletionService.d.ts +0 -16
  41. package/dist/sdk/services/AssetStageService.d.ts +0 -11
  42. package/dist/sdk/services/AssetTypeAttachmentService.d.ts +0 -10
  43. package/dist/sdk/services/AssetTypeService.d.ts +0 -9
  44. package/dist/store/slices/assetSlice.d.ts +0 -63
  45. package/dist/store/slices/assetStageCompletionSlice.d.ts +0 -15
  46. package/dist/store/slices/assetStageSlice.d.ts +0 -32
  47. package/dist/store/slices/assetTypeSlice.d.ts +0 -74
package/dist/sdk/sdk.d.ts CHANGED
@@ -1,10 +1,22 @@
1
- import { AuthService, CategoryService, AssetService, AssetStageCompletionService, AssetStageService, AssetAttachmentService, AssetTypeService, AssetTypeAttachmentService, EmailVerificationService, FileService, IssueCommentService, IssueAttachmentService, IssueService, MainService, OrganizationAccessService, ProjectAccessService, ProjectFileService, ProjectAttachmentService, ProjectService, UserFormService, UserFormSubmissionService, WorkspaceService, OrganizationService, EmailDomainsService, LicenseService, DocumentService, DocumentAttachmentService, IssueUpdateService, AgentService, TeamService, IssueTypeService } from "./services";
2
- import { ToolkitStore } from "@reduxjs/toolkit/dist/configureStore.js";
1
+ import { AgentService, AuthService, CategoryService, ComponentAttachmentService, ComponentService, ComponentStageCompletionService, ComponentStageService, ComponentTypeAttachmentService, ComponentTypeService, DocumentAttachmentService, DocumentService, EmailDomainsService, EmailVerificationService, FileService, IssueAttachmentService, IssueCommentService, IssueService, IssueTypeService, IssueUpdateService, LicenseService, MainService, OrganizationAccessService, OrganizationService, ProjectAccessService, ProjectAttachmentService, ProjectFileService, ProjectService, TeamService, UserFormService, UserFormSubmissionService, WorkspaceService } from "./services";
2
+ import { ToolkitStore } from "@reduxjs/toolkit/dist/configureStore";
3
3
  import { RootState } from "../typings";
4
+ import { SDKRequest } from "./typings";
4
5
  export declare class OvermapSDK {
5
6
  readonly API_URL: string;
6
7
  readonly store: ToolkitStore<RootState>;
7
8
  constructor(apiUrl: string, store: ToolkitStore<RootState>);
9
+ /**
10
+ * Enqueues an API request to the offline outbox.
11
+ * @param requestDetails An SDKRequest object containing the details of the request.
12
+ * @protected
13
+ */
14
+ enqueueRequest<TResult>(requestDetails: SDKRequest): Promise<TResult>;
15
+ /**
16
+ * Enqueues an API request to the Redux Offline outbox
17
+ * @protected
18
+ */
19
+ private _enqueueRequest;
8
20
  agent: AgentService;
9
21
  files: FileService;
10
22
  auth: AuthService;
@@ -19,12 +31,12 @@ export declare class OvermapSDK {
19
31
  issueAttachments: IssueAttachmentService;
20
32
  workspaces: WorkspaceService;
21
33
  main: MainService;
22
- assets: AssetService;
23
- assetAttachments: AssetAttachmentService;
24
- assetTypes: AssetTypeService;
25
- assetTypeAttachments: AssetTypeAttachmentService;
26
- assetStages: AssetStageService;
27
- assetStageCompletions: AssetStageCompletionService;
34
+ components: ComponentService;
35
+ componentAttachments: ComponentAttachmentService;
36
+ componentTypes: ComponentTypeService;
37
+ componentTypeAttachments: ComponentTypeAttachmentService;
38
+ componentStages: ComponentStageService;
39
+ componentStageCompletions: ComponentStageCompletionService;
28
40
  userForms: UserFormService;
29
41
  userFormSubmissions: UserFormSubmissionService;
30
42
  projects: ProjectService;
@@ -1,20 +1,8 @@
1
1
  import type { OvermapSDK } from "../sdk";
2
- import { SDKRequest } from "../typings";
3
2
  /**
4
3
  * Abstract base class for building a service that can enqueue API requests
5
4
  */
6
5
  export declare abstract class BaseApiService {
7
6
  protected readonly client: OvermapSDK;
8
7
  constructor(sdk: OvermapSDK);
9
- /**
10
- * Enqueues an API request to the offline outbox.
11
- * @param requestDetails An SDKRequest object containing the details of the request.
12
- * @protected
13
- */
14
- protected enqueueRequest<TResult>(requestDetails: SDKRequest): Promise<TResult>;
15
- /**
16
- * Enqueues an API request to the Redux Offline outbox
17
- * @protected
18
- */
19
- private _enqueueRequest;
20
8
  }
@@ -0,0 +1,10 @@
1
+ import { BaseAttachmentService } from "./BaseAttachmentService";
2
+ import { AttachmentModel, ComponentAttachment } from "../../typings";
3
+ import { OptimisticMultipleModelResult } from "../typings";
4
+ export declare class ComponentAttachmentService extends BaseAttachmentService {
5
+ attachmentModel: AttachmentModel;
6
+ private buildOfflineAttachment;
7
+ attachFilesToComponent(files: File[], componentId: string): Promise<OptimisticMultipleModelResult<ComponentAttachment>>;
8
+ deleteComponentAttachment(attachmentId: string): Promise<void>;
9
+ refreshStore(): Promise<void>;
10
+ }
@@ -0,0 +1,11 @@
1
+ import { BaseApiService } from "./BaseApiService";
2
+ import { Component, Payload } from "../../typings";
3
+ import { OptimisticModelResult } from "../typings";
4
+ export declare class ComponentService extends BaseApiService {
5
+ add(component: Payload<Component>, workspaceId: string): OptimisticModelResult<Component>;
6
+ update(component: Component, workspaceId: string): OptimisticModelResult<Component>;
7
+ remove(id: string): Promise<undefined>;
8
+ deleteAllByComponentType(componentTypeId: string): Promise<undefined>;
9
+ addBatch(componentsToCreate: Payload<Component>[], workspaceId: string, componentTypeId: string): Promise<Record<string, Component>>;
10
+ refreshStore(): Promise<void>;
11
+ }
@@ -0,0 +1,17 @@
1
+ import { BaseApiService } from "./BaseApiService";
2
+ import { ComponentStageCompletion } from "../../store";
3
+ import { OptimisticModelResult } from "../typings";
4
+ import { Payload } from "../../typings";
5
+ export declare class ComponentStageCompletionService extends BaseApiService {
6
+ add(componentId: string, stageId: string): OptimisticModelResult<ComponentStageCompletion>;
7
+ refreshStore(): Promise<void>;
8
+ /**
9
+ * Creates a collection of ComponentStageCompletions, marking the referenced stages as completed for the referenced
10
+ * components. It's REQUIRED that all components referenced all have the SAME component type.
11
+ * @param componentTypeId The ID of the component type for which we are completing stages (we can only complete
12
+ * stages for one component type at a time)
13
+ * @param stageCompletions
14
+ */
15
+ bulkAdd(componentTypeId: string, stageCompletions: Payload<ComponentStageCompletion>[]): Promise<void>;
16
+ bulkDelete(stageId: string, componentIds: string[]): Promise<undefined>;
17
+ }
@@ -0,0 +1,11 @@
1
+ import { BaseApiService } from "./BaseApiService";
2
+ import { ComponentStage, ComponentStagePayload, Payload } from "../../typings";
3
+ export declare class ComponentStageService extends BaseApiService {
4
+ bulkCreateStages(stagesToSubmit: Payload<ComponentStagePayload>[], componentTypeId: string, workspaceId: string): Promise<ComponentStage[]>;
5
+ bulkUpdateStages(stagesToUpdate: ComponentStage[], componentTypeId: string): Promise<ComponentStage[]>;
6
+ bulkDelete(idsToDelete: string[]): Promise<undefined>;
7
+ update(componentStage: ComponentStage): Promise<undefined>;
8
+ linkForm(stageId: string, formId: string): Promise<undefined>;
9
+ unlinkForm(stageId: string, formId: string): Promise<undefined>;
10
+ refreshStore(): Promise<undefined>;
11
+ }
@@ -0,0 +1,10 @@
1
+ import { BaseAttachmentService } from "./BaseAttachmentService";
2
+ import { AttachmentModel, ComponentTypeAttachment } from "../../typings";
3
+ import { OptimisticMultipleModelResult } from "../typings";
4
+ export declare class ComponentTypeAttachmentService extends BaseAttachmentService {
5
+ attachmentModel: AttachmentModel;
6
+ private buildOfflineAttachment;
7
+ attachFilesToComponentType(files: File[], componentTypeId: string): Promise<OptimisticMultipleModelResult<ComponentTypeAttachment>>;
8
+ deleteComponentTypeAttachment(attachmentId: string): Promise<void>;
9
+ refreshStore(): Promise<void>;
10
+ }
@@ -0,0 +1,9 @@
1
+ import { BaseApiService } from "./BaseApiService";
2
+ import { ComponentType, Payload } from "../../typings";
3
+ import { OptimisticModelResult } from "../typings";
4
+ export declare class ComponentTypeService extends BaseApiService {
5
+ add(componentType: Payload<ComponentType>): OptimisticModelResult<ComponentType>;
6
+ update(componentType: ComponentType): Promise<undefined>;
7
+ delete(componentTypeId: string): Promise<undefined>;
8
+ refreshStore(): Promise<void>;
9
+ }
@@ -5,12 +5,12 @@ export declare class UserFormService extends BaseApiService {
5
5
  private getAttachImagePromises;
6
6
  private add;
7
7
  addForOrganization(initialRevision: UserFormRevisionPayload, attachedTo?: {
8
- assetTypeId: string;
8
+ componentTypeId: string;
9
9
  } | {
10
10
  issueTypeId: string;
11
11
  }): Promise<[SubmittedUserForm, UserFormRevision, Promise<UserFormRevision>, Promise<UserFormRevision>]>;
12
12
  addForCurrentUser(initialRevision: UserFormRevision, attachedTo?: {
13
- assetTypeId: string;
13
+ componentTypeId: string;
14
14
  } | {
15
15
  issueTypeId: string;
16
16
  }): Promise<[SubmittedUserForm, UserFormRevision, Promise<UserFormRevision>, Promise<UserFormRevision>]>;
@@ -10,7 +10,7 @@ export declare class UserFormSubmissionService extends BaseApiService {
10
10
  bulkAdd(args: {
11
11
  formRevision: string;
12
12
  values: Record<string, FieldValue>;
13
- assetOfflineIds: string[];
13
+ componentOfflineIds: string[];
14
14
  }): Promise<OptimisticMultipleModelResult<UserFormSubmission>>;
15
15
  update(submission: Stored<UserFormSubmission>): OptimisticModelResult<UserFormSubmission>;
16
16
  delete(submissionId: string): Promise<undefined>;
@@ -1,12 +1,12 @@
1
1
  export * from "./AuthService";
2
2
  export * from "./BaseApiService";
3
3
  export * from "./CategoryService";
4
- export * from "./AssetService.ts";
5
- export * from "./AssetStageCompletionService";
6
- export * from "./AssetStageService";
7
- export * from "./AssetAttachmentService";
8
- export * from "./AssetTypeService";
9
- export * from "./AssetTypeAttachmentService";
4
+ export * from "./ComponentService";
5
+ export * from "./ComponentStageCompletionService";
6
+ export * from "./ComponentStageService";
7
+ export * from "./ComponentAttachmentService";
8
+ export * from "./ComponentTypeService";
9
+ export * from "./ComponentTypeAttachmentService";
10
10
  export * from "./IssueCommentService";
11
11
  export * from "./IssueUpdateService";
12
12
  export * from "./IssueAttachmentService";
@@ -0,0 +1,27 @@
1
+ import { Reducer } from "@reduxjs/toolkit";
2
+ import { CompletedStagesMapping, Component, Model, RootState, SelectorWithArgs } from "../../typings";
3
+ export interface ComponentStageCompletionState {
4
+ completionsByComponentId: CompletedStagesMapping;
5
+ }
6
+ export interface ComponentStageCompletion extends Model {
7
+ component: string;
8
+ stage: string;
9
+ }
10
+ export declare const componentStageCompletionSlice: import("@reduxjs/toolkit").Slice<ComponentStageCompletionState, {
11
+ addStageCompletion: (state: import("immer/dist/internal.js").WritableDraft<ComponentStageCompletionState>, action: {
12
+ payload: ComponentStageCompletion;
13
+ }) => void;
14
+ addStageCompletions: (state: import("immer/dist/internal.js").WritableDraft<ComponentStageCompletionState>, action: {
15
+ payload: CompletedStagesMapping;
16
+ }) => void;
17
+ removeStageCompletions: (state: import("immer/dist/internal.js").WritableDraft<ComponentStageCompletionState>, action: {
18
+ payload: ComponentStageCompletion[];
19
+ }) => void;
20
+ setStageCompletions: (state: import("immer/dist/internal.js").WritableDraft<ComponentStageCompletionState>, action: {
21
+ payload: CompletedStagesMapping;
22
+ }) => void;
23
+ }, "componentStageCompletions">;
24
+ export declare const addStageCompletion: import("@reduxjs/toolkit").ActionCreatorWithPayload<ComponentStageCompletion, "componentStageCompletions/addStageCompletion">, addStageCompletions: import("@reduxjs/toolkit").ActionCreatorWithPayload<CompletedStagesMapping, "componentStageCompletions/addStageCompletions">, removeStageCompletions: import("@reduxjs/toolkit").ActionCreatorWithPayload<ComponentStageCompletion[], "componentStageCompletions/removeStageCompletions">, setStageCompletions: import("@reduxjs/toolkit").ActionCreatorWithPayload<CompletedStagesMapping, "componentStageCompletions/setStageCompletions">;
25
+ export declare const selectCompletedStages: (state: RootState) => CompletedStagesMapping;
26
+ export declare const selectCompletedStageIdsForComponent: SelectorWithArgs<Component, string[]>;
27
+ export declare const componentStageCompletionReducer: Reducer<ComponentStageCompletionState>;
@@ -46,10 +46,10 @@ export declare const selectCategories: ((state: import("redux").EmptyObject & {
46
46
  fileReducer: import('..').FileState;
47
47
  authReducer: import('..').AuthState;
48
48
  categoryReducer: CategoryState;
49
- assetReducer: import('..').AssetState;
50
- assetStageCompletionReducer: import('..').AssetStageCompletionState;
51
- assetStageReducer: import('..').AssetStageState;
52
- assetTypeReducer: import('..').AssetTypeState;
49
+ componentReducer: import('..').ComponentState;
50
+ componentStageCompletionReducer: import('..').ComponentStageCompletionState;
51
+ componentStageReducer: import('..').ComponentStageState;
52
+ componentTypeReducer: import('..').ComponentTypeState;
53
53
  issueReducer: import('..').IssueState;
54
54
  issueTypeReducer: import('..').IssueTypeState;
55
55
  mapReducer: import('..').MapState;
@@ -0,0 +1,73 @@
1
+ import { PayloadAction, Reducer } from "@reduxjs/toolkit";
2
+ import { Component, ComponentAttachment, ComponentType, RootState, Selector, SelectorWithArgs, Stored, Submitted } from "../../typings";
3
+ export interface ComponentState {
4
+ components: Record<string, Component | Submitted<Component>>;
5
+ attachments: Record<string, Stored<ComponentAttachment>>;
6
+ }
7
+ export declare const componentSlice: import("@reduxjs/toolkit").Slice<ComponentState, {
8
+ addComponent: (state: import("immer/dist/internal.js").WritableDraft<ComponentState>, action: {
9
+ payload: Component;
10
+ }) => void;
11
+ addComponentsInBatches: (state: import("immer/dist/internal.js").WritableDraft<ComponentState>, action: {
12
+ payload: (Component | Submitted<Component>)[];
13
+ }) => void;
14
+ setComponents: (state: import("immer/dist/internal.js").WritableDraft<ComponentState>, action: {
15
+ payload: Component[];
16
+ }) => void;
17
+ updateComponent: (state: import("immer/dist/internal.js").WritableDraft<ComponentState>, action: {
18
+ payload: Component;
19
+ }) => void;
20
+ removeComponent: (state: import("immer/dist/internal.js").WritableDraft<ComponentState>, action: PayloadAction<string>) => void;
21
+ removeAllComponentsOfType: (state: import("immer/dist/internal.js").WritableDraft<ComponentState>, action: PayloadAction<string>) => void;
22
+ setComponentAttachment: (state: ComponentState, action: {
23
+ payload: Stored<ComponentAttachment>;
24
+ type: string;
25
+ }) => void;
26
+ setComponentAttachments: (state: ComponentState, action: {
27
+ payload: Stored<ComponentAttachment>[];
28
+ type: string;
29
+ }) => void;
30
+ addComponentAttachment: (state: ComponentState, action: {
31
+ payload: Submitted<ComponentAttachment>;
32
+ type: string;
33
+ }) => void;
34
+ addComponentAttachments: (state: ComponentState, action: {
35
+ payload: Submitted<ComponentAttachment>[];
36
+ type: string;
37
+ }) => void;
38
+ updateComponentAttachment: (state: ComponentState, action: {
39
+ payload: Submitted<ComponentAttachment>;
40
+ type: string;
41
+ }) => void;
42
+ updateComponentAttachments: (state: ComponentState, action: {
43
+ payload: Submitted<ComponentAttachment>[];
44
+ type: string;
45
+ }) => void;
46
+ removeComponentAttachment: (state: ComponentState, action: {
47
+ payload: string;
48
+ type: string;
49
+ }) => void;
50
+ removeComponentAttachments: (state: ComponentState, action: {
51
+ payload: string[];
52
+ type: string;
53
+ }) => void;
54
+ }, "components">;
55
+ export declare const addComponent: import("@reduxjs/toolkit").ActionCreatorWithPayload<Component, "components/addComponent">, updateComponent: import("@reduxjs/toolkit").ActionCreatorWithPayload<Component, "components/updateComponent">, removeComponent: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "components/removeComponent">, addComponentsInBatches: import("@reduxjs/toolkit").ActionCreatorWithPayload<(Component | Submitted<Component>)[], "components/addComponentsInBatches">, setComponents: import("@reduxjs/toolkit").ActionCreatorWithPayload<Component[], "components/setComponents">, removeAllComponentsOfType: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "components/removeAllComponentsOfType">, setComponentAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<ComponentAttachment>, "components/setComponentAttachment">, setComponentAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<ComponentAttachment>[], "components/setComponentAttachments">, addComponentAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<Submitted<ComponentAttachment>, "components/addComponentAttachment">, addComponentAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Submitted<ComponentAttachment>[], "components/addComponentAttachments">, updateComponentAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<Submitted<ComponentAttachment>, "components/updateComponentAttachment">, updateComponentAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Submitted<ComponentAttachment>[], "components/updateComponentAttachments">, removeComponentAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "components/removeComponentAttachment">, removeComponentAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "components/removeComponentAttachments">;
56
+ export declare const selectComponents: (state: RootState) => Component[];
57
+ export declare const selectComponentsMapping: (state: RootState) => Record<string, Component | Submitted<Component>>;
58
+ export declare const selectComponentsFromComponentType: SelectorWithArgs<string, Component[]>;
59
+ export declare const selectComponent: SelectorWithArgs<string, Component>;
60
+ export declare const selectComponentTypeFromComponent: SelectorWithArgs<string, ComponentType>;
61
+ export declare const selectComponentTypeFromComponents: Selector<Record<string, ComponentType>>;
62
+ export declare const selectComponentsByType: SelectorWithArgs<string, Component[]>;
63
+ export declare const selectNumberOfComponentsOfComponentType: SelectorWithArgs<string | undefined, number>;
64
+ export declare const selectComponentTypesFromIds: SelectorWithArgs<string[], ComponentType[]>;
65
+ export declare const selectComponentAttachmentMapping: (state: RootState) => Record<string, Stored<ComponentAttachment>>;
66
+ export declare const selectAllComponentAttachments: Selector<Stored<ComponentAttachment>[]>;
67
+ export declare const selectComponentAttachment: SelectorWithArgs<string, Stored<ComponentAttachment>>;
68
+ export declare const selectAttachmentsOfComponent: (args: string) => (state: RootState) => Stored<ComponentAttachment>[];
69
+ export declare const selectAttachmentsOfComponentByType: (args: string) => (state: RootState) => {
70
+ fileAttachments: Stored<ComponentAttachment>[];
71
+ imageAttachments: Stored<ComponentAttachment>[];
72
+ };
73
+ export declare const componentReducer: Reducer<ComponentState>;
@@ -0,0 +1,42 @@
1
+ import { Reducer } from "@reduxjs/toolkit";
2
+ import { ComponentStage, RootState, SelectorWithArgs } from "../../typings";
3
+ export interface ComponentStageState {
4
+ stages: Record<string, ComponentStage>;
5
+ }
6
+ export declare const componentStageSlice: import("@reduxjs/toolkit").Slice<ComponentStageState, {
7
+ addStages: (state: import("immer/dist/internal.js").WritableDraft<ComponentStageState>, action: {
8
+ payload: ComponentStage[];
9
+ }) => void;
10
+ updateStages: (state: import("immer/dist/internal.js").WritableDraft<ComponentStageState>, action: {
11
+ payload: ComponentStage[];
12
+ }) => void;
13
+ removeStages: (state: import("immer/dist/internal.js").WritableDraft<ComponentStageState>, action: {
14
+ payload: string[];
15
+ }) => void;
16
+ linkStageToForm: (state: import("immer/dist/internal.js").WritableDraft<ComponentStageState>, action: {
17
+ payload: {
18
+ stageId: string;
19
+ formId: string;
20
+ };
21
+ }) => void;
22
+ unlinkStageToForm: (state: import("immer/dist/internal.js").WritableDraft<ComponentStageState>, action: {
23
+ payload: {
24
+ stageId: string;
25
+ };
26
+ }) => void;
27
+ }, "componentStages">;
28
+ export declare const selectStageMapping: (state: RootState) => Record<string, ComponentStage>;
29
+ export declare const selectStage: SelectorWithArgs<string, ComponentStage | undefined>;
30
+ export declare const selectStages: (state: RootState) => ComponentStage[];
31
+ export declare const selectStagesFromComponentTypeIds: SelectorWithArgs<string[], Record<string, ComponentStage[]>>;
32
+ export declare const selectComponentTypeStagesMapping: SelectorWithArgs<string, Record<string, ComponentStage>>;
33
+ export declare const selectStagesFromComponentType: SelectorWithArgs<string, ComponentStage[]>;
34
+ export declare const selectStagesFromStageIds: SelectorWithArgs<string[], ComponentStage[]>;
35
+ export declare const selectStageFormIdsFromStageIds: SelectorWithArgs<string[], Record<string, string>>;
36
+ export declare const addStages: import("@reduxjs/toolkit").ActionCreatorWithPayload<ComponentStage[], "componentStages/addStages">, updateStages: import("@reduxjs/toolkit").ActionCreatorWithPayload<ComponentStage[], "componentStages/updateStages">, removeStages: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "componentStages/removeStages">, linkStageToForm: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
37
+ stageId: string;
38
+ formId: string;
39
+ }, "componentStages/linkStageToForm">, unlinkStageToForm: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
40
+ stageId: string;
41
+ }, "componentStages/unlinkStageToForm">;
42
+ export declare const componentStageReducer: Reducer<ComponentStageState>;
@@ -0,0 +1,75 @@
1
+ import type { Reducer } from "@reduxjs/toolkit";
2
+ import type { ComponentType, ComponentTypeAttachment, RootState, Selector, SelectorWithArgs, Stored } from "../../typings";
3
+ export interface ComponentTypeState {
4
+ componentTypes: Record<string, ComponentType>;
5
+ hiddenComponentTypeIds: Record<string, boolean>;
6
+ attachments: Record<string, ComponentTypeAttachment>;
7
+ }
8
+ export declare const componentTypeSlice: import("@reduxjs/toolkit").Slice<ComponentTypeState, {
9
+ addComponentType: (state: import("immer/dist/internal.js").WritableDraft<ComponentTypeState>, action: {
10
+ payload: ComponentType;
11
+ }) => void;
12
+ setComponentTypes: (state: import("immer/dist/internal.js").WritableDraft<ComponentTypeState>, action: {
13
+ payload: ComponentType[];
14
+ }) => void;
15
+ toggleComponentTypeVisibility: (state: import("immer/dist/internal.js").WritableDraft<ComponentTypeState>, action: {
16
+ payload: string;
17
+ }) => void;
18
+ deleteComponentType: (state: import("immer/dist/internal.js").WritableDraft<ComponentTypeState>, action: {
19
+ payload: string;
20
+ }) => void;
21
+ setComponentTypeAttachment: (state: ComponentTypeState, action: {
22
+ payload: Stored<ComponentTypeAttachment>;
23
+ type: string;
24
+ }) => void;
25
+ setComponentTypeAttachments: (state: ComponentTypeState, action: {
26
+ payload: Stored<ComponentTypeAttachment>[];
27
+ type: string;
28
+ }) => void;
29
+ addComponentTypeAttachment: (state: ComponentTypeState, action: {
30
+ payload: import('../../typings/models/issues').Submitted<ComponentTypeAttachment>;
31
+ type: string;
32
+ }) => void;
33
+ addComponentTypeAttachments: (state: ComponentTypeState, action: {
34
+ payload: import('../../typings/models/issues').Submitted<ComponentTypeAttachment>[];
35
+ type: string;
36
+ }) => void;
37
+ updateComponentTypeAttachment: (state: ComponentTypeState, action: {
38
+ payload: import('../../typings/models/issues').Submitted<ComponentTypeAttachment>;
39
+ type: string;
40
+ }) => void;
41
+ updateComponentTypeAttachments: (state: ComponentTypeState, action: {
42
+ payload: import('../../typings/models/issues').Submitted<ComponentTypeAttachment>[];
43
+ type: string;
44
+ }) => void;
45
+ removeComponentTypeAttachment: (state: ComponentTypeState, action: {
46
+ payload: string;
47
+ type: string;
48
+ }) => void;
49
+ removeComponentTypeAttachments: (state: ComponentTypeState, action: {
50
+ payload: string[];
51
+ type: string;
52
+ }) => void;
53
+ }, "componentTypes">;
54
+ export declare const addComponentType: import("@reduxjs/toolkit").ActionCreatorWithPayload<ComponentType, "componentTypes/addComponentType">, setComponentTypes: import("@reduxjs/toolkit").ActionCreatorWithPayload<ComponentType[], "componentTypes/setComponentTypes">, toggleComponentTypeVisibility: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "componentTypes/toggleComponentTypeVisibility">, deleteComponentType: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "componentTypes/deleteComponentType">, setComponentTypeAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<ComponentTypeAttachment>, "componentTypes/setComponentTypeAttachment">, setComponentTypeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<ComponentTypeAttachment>[], "componentTypes/setComponentTypeAttachments">, addComponentTypeAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<import('../../typings/models/issues').Submitted<ComponentTypeAttachment>, "componentTypes/addComponentTypeAttachment">, addComponentTypeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<import('../../typings/models/issues').Submitted<ComponentTypeAttachment>[], "componentTypes/addComponentTypeAttachments">, updateComponentTypeAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<import('../../typings/models/issues').Submitted<ComponentTypeAttachment>, "componentTypes/updateComponentTypeAttachment">, updateComponentTypeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<import('../../typings/models/issues').Submitted<ComponentTypeAttachment>[], "componentTypes/updateComponentTypeAttachments">, removeComponentTypeAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "componentTypes/removeComponentTypeAttachment">, removeComponentTypeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "componentTypes/removeComponentTypeAttachments">;
55
+ export type AppSelector<TResult> = (state: RootState) => TResult;
56
+ export declare const selectComponentTypesMapping: AppSelector<Record<string, ComponentType>>;
57
+ export declare const selectComponentTypes: AppSelector<ComponentType[]>;
58
+ export declare const selectComponentType: SelectorWithArgs<string, ComponentType>;
59
+ interface selectNumberOfComponentTypesMatchingCaseInsensitiveNameProps {
60
+ name: string | null | undefined;
61
+ componentTypeId: string | undefined;
62
+ }
63
+ export declare const selectNumberOfComponentTypesMatchingCaseInsensitiveName: SelectorWithArgs<selectNumberOfComponentTypesMatchingCaseInsensitiveNameProps, number>;
64
+ export declare const selectComponentTypesByName: SelectorWithArgs<string, ComponentType[]>;
65
+ export declare const selectHiddenComponentTypeIds: AppSelector<Record<string, boolean | undefined>>;
66
+ export declare const selectComponentTypeAttachmentMapping: (state: RootState) => Record<string, ComponentTypeAttachment>;
67
+ export declare const selectAllComponentTypeAttachments: Selector<Stored<ComponentTypeAttachment>[]>;
68
+ export declare const selectComponentTypeAttachment: SelectorWithArgs<string, Stored<ComponentTypeAttachment>>;
69
+ export declare const selectAttachmentsOfComponentType: (args: string) => (state: RootState) => Stored<ComponentTypeAttachment>[];
70
+ export declare const selectAttachmentsOfComponentTypeByType: (args: string) => (state: RootState) => {
71
+ fileAttachments: Stored<ComponentTypeAttachment>[];
72
+ imageAttachments: Stored<ComponentTypeAttachment>[];
73
+ };
74
+ export declare const componentTypeReducer: Reducer<ComponentTypeState>;
75
+ export {};
@@ -1,6 +1,7 @@
1
1
  /// <reference types="@redux-offline/redux-offline" />
2
2
  import { Reducer } from "@reduxjs/toolkit";
3
3
  import { DocumentAttachment, MovePosition, Document, RootState, Selector, SelectorWithArgs, Stored, Submitted } from "../../typings";
4
+ import { AppSelector } from "./componentTypeSlice";
4
5
  export interface DocumentState {
5
6
  documents: Record<string, Stored<Document>>;
6
7
  attachments: Record<string, Stored<DocumentAttachment>>;
@@ -192,8 +193,8 @@ export declare const setDocuments: import("@reduxjs/toolkit").ActionCreatorWithP
192
193
  } & {
193
194
  children_documents: string[];
194
195
  }, "id" | "created_at" | "created_by">)>>[], "documents/updateDocuments">, moveDocument: import("@reduxjs/toolkit").ActionCreatorWithPayload<MoveDocumentPayload, "documents/moveDocument">, removeDocuments: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "documents/removeDocuments">, setDocumentAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<DocumentAttachment>, "documents/setDocumentAttachment">, setDocumentAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<DocumentAttachment>[], "documents/setDocumentAttachments">, addDocumentAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<Submitted<DocumentAttachment>, "documents/addDocumentAttachment">, addDocumentAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Submitted<DocumentAttachment>[], "documents/addDocumentAttachments">, updateDocumentAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<Submitted<DocumentAttachment>, "documents/updateDocumentAttachment">, updateDocumentAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Submitted<DocumentAttachment>[], "documents/updateDocumentAttachments">, removeDocumentAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "documents/removeDocumentAttachment">, removeDocumentAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "documents/removeDocumentAttachments">;
195
- export declare const selectDocumentsMapping: Selector<Record<string, Stored<Document>>>;
196
- export declare const selectDocuments: Selector<Stored<Document>[]>;
196
+ export declare const selectDocumentsMapping: AppSelector<Record<string, Stored<Document>>>;
197
+ export declare const selectDocuments: AppSelector<Stored<Document>[]>;
197
198
  export declare const selectDocument: (args: string) => (state: RootState) => (import('../../typings/models/base').OfflineModel & import('../../typings/models/base').CreatedByModel & {
198
199
  title: string | null;
199
200
  description: string | null;
@@ -245,10 +246,10 @@ export declare const selectRootDocuments: ((state: import("redux").EmptyObject &
245
246
  fileReducer: import('..').FileState;
246
247
  authReducer: import('..').AuthState;
247
248
  categoryReducer: import('..').CategoryState;
248
- assetReducer: import('..').AssetState;
249
- assetStageCompletionReducer: import('..').AssetStageCompletionState;
250
- assetStageReducer: import('..').AssetStageState;
251
- assetTypeReducer: import('..').AssetTypeState;
249
+ componentReducer: import('..').ComponentState;
250
+ componentStageCompletionReducer: import('..').ComponentStageCompletionState;
251
+ componentStageReducer: import('..').ComponentStageState;
252
+ componentTypeReducer: import("./componentTypeSlice").ComponentTypeState;
252
253
  issueReducer: import('..').IssueState;
253
254
  issueTypeReducer: import('..').IssueTypeState;
254
255
  mapReducer: import('..').MapState;
@@ -25,10 +25,10 @@ export declare const selectFormRevisions: ((state: import("redux").EmptyObject &
25
25
  fileReducer: import('..').FileState;
26
26
  authReducer: import('..').AuthState;
27
27
  categoryReducer: import('..').CategoryState;
28
- assetReducer: import('..').AssetState;
29
- assetStageCompletionReducer: import('..').AssetStageCompletionState;
30
- assetStageReducer: import('..').AssetStageState;
31
- assetTypeReducer: import('..').AssetTypeState;
28
+ componentReducer: import('..').ComponentState;
29
+ componentStageCompletionReducer: import('..').ComponentStageCompletionState;
30
+ componentStageReducer: import('..').ComponentStageState;
31
+ componentTypeReducer: import('..').ComponentTypeState;
32
32
  issueReducer: import('..').IssueState;
33
33
  issueTypeReducer: import('..').IssueTypeState;
34
34
  mapReducer: import('..').MapState;
@@ -61,7 +61,7 @@ export declare const selectFormRevision: SelectorWithArgs<string, Stored<UserFor
61
61
  export declare const _selectLatestFormRevision: (formRevisions: FormRevisionState["formRevisions"], formId: string) => Stored<UserFormRevision>;
62
62
  export declare const selectLatestFormRevisionOfForm: SelectorWithArgs<string, Stored<UserFormRevision>>;
63
63
  export declare const selectFormRevisionsOfForm: SelectorWithArgs<string, Stored<UserFormRevision>[]>;
64
- export declare const selectLatestFormRevisionsOfAssetTypes: SelectorWithArgs<string[], Record<string, Stored<UserFormRevision>>>;
64
+ export declare const selectLatestFormRevisionsOfComponentTypes: SelectorWithArgs<string[], Record<string, Stored<UserFormRevision>>>;
65
65
  export declare const selectLatestFormRevisionByForm: Selector<Record<Stored<UserForm>["offline_id"], Stored<UserFormRevision>>>;
66
66
  export declare const selectUserFormRevisionAttachmentsMapping: Selector<FormRevisionState["attachments"]>;
67
67
  export declare const selectAttachmentsOfFormRevision: SelectorWithArgs<string, Stored<UserFormRevisionAttachment>[]>;
@@ -24,7 +24,7 @@ export declare const formSlice: import("@reduxjs/toolkit").Slice<FormState, {
24
24
  }, "forms">;
25
25
  export declare const setForms: import("@reduxjs/toolkit").ActionCreatorWithPayload<((Pick<import('../../typings/models/workspace').WorkspaceIndexedModel, "index_workspace"> & {
26
26
  favorite: boolean;
27
- asset_type?: string | undefined;
27
+ component_type?: string | undefined;
28
28
  issue_type?: string | undefined;
29
29
  } & {
30
30
  owner_organization: number;
@@ -36,7 +36,7 @@ export declare const setForms: import("@reduxjs/toolkit").ActionCreatorWithPaylo
36
36
  submitted_at: string;
37
37
  }) | (Pick<import('../../typings/models/workspace').WorkspaceIndexedModel, "index_workspace"> & {
38
38
  favorite: boolean;
39
- asset_type?: string | undefined;
39
+ component_type?: string | undefined;
40
40
  issue_type?: string | undefined;
41
41
  } & {
42
42
  owner_organization: undefined;
@@ -48,7 +48,7 @@ export declare const setForms: import("@reduxjs/toolkit").ActionCreatorWithPaylo
48
48
  submitted_at: string;
49
49
  }))[], "forms/setForms">, addForm: import("@reduxjs/toolkit").ActionCreatorWithPayload<(Pick<import('../../typings/models/workspace').WorkspaceIndexedModel, "index_workspace"> & {
50
50
  favorite: boolean;
51
- asset_type?: string | undefined;
51
+ component_type?: string | undefined;
52
52
  issue_type?: string | undefined;
53
53
  } & {
54
54
  owner_organization: number;
@@ -60,7 +60,7 @@ export declare const setForms: import("@reduxjs/toolkit").ActionCreatorWithPaylo
60
60
  submitted_at: string;
61
61
  }) | (Pick<import('../../typings/models/workspace').WorkspaceIndexedModel, "index_workspace"> & {
62
62
  favorite: boolean;
63
- asset_type?: string | undefined;
63
+ component_type?: string | undefined;
64
64
  issue_type?: string | undefined;
65
65
  } & {
66
66
  owner_organization: undefined;
@@ -72,7 +72,7 @@ export declare const setForms: import("@reduxjs/toolkit").ActionCreatorWithPaylo
72
72
  submitted_at: string;
73
73
  }), "forms/addForm">, addForms: import("@reduxjs/toolkit").ActionCreatorWithPayload<((Pick<import('../../typings/models/workspace').WorkspaceIndexedModel, "index_workspace"> & {
74
74
  favorite: boolean;
75
- asset_type?: string | undefined;
75
+ component_type?: string | undefined;
76
76
  issue_type?: string | undefined;
77
77
  } & {
78
78
  owner_organization: number;
@@ -84,7 +84,7 @@ export declare const setForms: import("@reduxjs/toolkit").ActionCreatorWithPaylo
84
84
  submitted_at: string;
85
85
  }) | (Pick<import('../../typings/models/workspace').WorkspaceIndexedModel, "index_workspace"> & {
86
86
  favorite: boolean;
87
- asset_type?: string | undefined;
87
+ component_type?: string | undefined;
88
88
  issue_type?: string | undefined;
89
89
  } & {
90
90
  owner_organization: undefined;
@@ -110,7 +110,7 @@ export type FormSearchArgs = SearchArgs<{
110
110
  export declare const selectFilteredForms: SelectorWithArgs<FormSearchArgs, CachedUserForm[]>;
111
111
  export declare const selectForm: SelectorWithArgs<string, Stored<UserForm>>;
112
112
  export declare const selectFormMapping: Selector<Record<Stored<UserForm>["offline_id"], Stored<UserForm>>>;
113
- export declare const selectFormOfAssetType: SelectorWithArgs<string, Stored<UserForm>>;
113
+ export declare const selectFormOfComponentType: SelectorWithArgs<string, Stored<UserForm>>;
114
114
  export declare const selectFormOfIssueType: SelectorWithArgs<string, Stored<UserForm>>;
115
115
  export declare const selectFormsCount: Selector<number>;
116
116
  export declare const selectGeneralFormCount: Selector<number>;
@@ -42,8 +42,8 @@ export declare const selectFormSubmissionsOfForm: SelectorWithArgs<string, Store
42
42
  export declare const selectFormSubmissionsByFormRevisions: Selector<Record<string, Stored<UserFormSubmission>[]>>;
43
43
  export declare const selectSortedFormSubmissionsOfForm: SelectorWithArgs<string, Stored<UserFormSubmission>[]>;
44
44
  export declare const selectFormSubmissionsOfIssue: SelectorWithArgs<string, Stored<UserFormSubmission>[]>;
45
- export declare const selectFormSubmissionsOfAsset: SelectorWithArgs<string, Stored<UserFormSubmission>[]>;
46
- export declare const selectFormSubmissionsByAssets: Selector<Record<string, Stored<UserFormSubmission>[]>>;
45
+ export declare const selectFormSubmissionsOfComponent: SelectorWithArgs<string, Stored<UserFormSubmission>[]>;
46
+ export declare const selectFormSubmissionsByComponents: Selector<Record<string, Stored<UserFormSubmission>[]>>;
47
47
  export declare const selectFormSubmissionAttachmentsMapping: Selector<FormSubmissionState["attachments"]>;
48
48
  export declare const selectAttachmentsOfFormSubmission: SelectorWithArgs<string, Stored<UserFormSubmissionAttachment>[]>;
49
49
  export declare const formSubmissionReducer: Reducer<FormSubmissionState>;
@@ -1,9 +1,9 @@
1
1
  export * from "./authSlice";
2
2
  export * from "./categorySlice";
3
- export * from "./assetSlice";
4
- export * from "./assetStageCompletionSlice";
5
- export * from "./assetStageSlice";
6
- export * from "./assetTypeSlice";
3
+ export * from "./componentSlice";
4
+ export * from "./ComponentStageCompletionSlice";
5
+ export * from "./componentStageSlice";
6
+ export * from "./componentTypeSlice";
7
7
  export * from "./issueSlice";
8
8
  export * from "./issueTypeSlice";
9
9
  export * from "./fileSlice";
@@ -134,10 +134,10 @@ export declare const selectAllAttachments: ((state: import("redux").EmptyObject
134
134
  fileReducer: import('..').FileState;
135
135
  authReducer: import('..').AuthState;
136
136
  categoryReducer: import("./categorySlice").CategoryState;
137
- assetReducer: import('..').AssetState;
138
- assetStageCompletionReducer: import('..').AssetStageCompletionState;
139
- assetStageReducer: import('..').AssetStageState;
140
- assetTypeReducer: import('..').AssetTypeState;
137
+ componentReducer: import('..').ComponentState;
138
+ componentStageCompletionReducer: import('..').ComponentStageCompletionState;
139
+ componentStageReducer: import('..').ComponentStageState;
140
+ componentTypeReducer: import('..').ComponentTypeState;
141
141
  issueReducer: IssueState;
142
142
  issueTypeReducer: import('..').IssueTypeState;
143
143
  mapReducer: import('..').MapState;