@overmap-ai/core 1.0.71-fields.13 → 1.0.71-fields.2

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.
@@ -1,12 +1,13 @@
1
- import type { AssetTypeFieldValuesAttachment, Created, OvermapRootState, Stored } from "../../typings";
1
+ import type { AssetTypeFieldValuesAttachment, OvermapRootState } from "../../typings";
2
2
  import type { BaseSDK } from "../base";
3
3
  import { BaseUploadService } from "./BaseUploadService";
4
+ import { OptimisticMultipleModelResult } from "../typings";
4
5
  export declare abstract class AssetTypeFieldValuesAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseUploadService<TState, TSDK> {
5
6
  bulkAdd(payloads: {
6
7
  fieldValuesId: string;
7
8
  fieldIdentifier: string;
8
9
  file: File;
9
- }[], batchSize?: number): Promise<[Stored<AssetTypeFieldValuesAttachment>[], Promise<Created<AssetTypeFieldValuesAttachment>[]>[]]>;
10
+ }[]): Promise<OptimisticMultipleModelResult<AssetTypeFieldValuesAttachment>>;
10
11
  bulkDelete(ids: string[]): Promise<void>;
11
12
  refreshStore(projectId: number): Promise<void>;
12
13
  }
@@ -1,4 +1,4 @@
1
- import type { AssetTypeFieldValues, Created, Offline, OvermapRootState, Payload, Stored } from "../../typings";
1
+ import type { AssetTypeFieldValues, Created, Offline, OvermapRootState, Payload } from "../../typings";
2
2
  import type { BaseSDK } from "../base";
3
3
  import { BaseApiService } from "./BaseApiService";
4
4
  import type { OptimisticModelResult } from "../typings";
@@ -13,7 +13,7 @@ export declare abstract class AssetTypeFieldValuesService<TState extends Overmap
13
13
  fields_revision: string;
14
14
  published_at: string;
15
15
  }[];
16
- }, batchSize?: number): [Stored<AssetTypeFieldValues>[], Promise<Created<AssetTypeFieldValues>[]>[]];
16
+ }, batchSize: number): Promise<Created<AssetTypeFieldValues>[]>[];
17
17
  update(payload: Offline<Partial<Payload<AssetTypeFieldValues>>>): OptimisticModelResult<AssetTypeFieldValues>;
18
18
  delete(id: string): Promise<void>;
19
19
  refreshStore(projectId: number): Promise<void>;
@@ -1,4 +1,4 @@
1
- import type { Created, Form, FormRevision, OvermapRootState, Payload, Stored } from "../../typings";
1
+ import type { Created, Form, FormRevision, FormRevisionPayload, OvermapRootState, Payload, Stored } from "../../typings";
2
2
  import type { BaseSDK } from "../base";
3
3
  import { BaseUploadService } from "./BaseUploadService";
4
4
  import { ISerializedField } from "@overmap-ai/forms";
@@ -11,7 +11,7 @@ export declare const separateImageFromFields: (fields: ISerializedField[]) => Pr
11
11
  images: Record<string, File>;
12
12
  }>;
13
13
  export declare abstract class FormService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseUploadService<TState, TSDK> {
14
- add(payload: Payload<Form>, initialRevision: Pick<FormRevision, "title" | "description" | "fields">): [Stored<Form>, Stored<FormRevision>, Promise<Created<FormRevision>>];
14
+ add(payload: Payload<Form>, initialRevision: FormRevisionPayload): [Stored<Form>, Stored<FormRevision>, Promise<Created<FormRevision>>];
15
15
  delete(id: string): Promise<undefined>;
16
16
  refreshStore(projectId: number, organizationId: number): Promise<void>;
17
17
  }
@@ -47,7 +47,6 @@ export declare const selectAssetTypeFieldValuesAttachments: ((state: OvermapRoot
47
47
  }> & {
48
48
  clearCache: () => void;
49
49
  };
50
- export declare const selectAssetTypeFieldValuesAttachmentById: OvermapSelectorWithArgs<string, AssetTypeFieldValuesAttachment | undefined>;
51
- export declare const selectAssetTypeFieldValuesAttachmentsByIds: (args: string[]) => (state: OvermapRootState) => Stored<AssetTypeFieldValuesAttachment>[];
52
50
  export declare const selectAttachmentsOfAssetTypeFieldValues: OvermapSelectorWithArgs<string, Stored<AssetTypeFieldValuesAttachment>[]>;
51
+ export declare const selectAssetTypeFieldValuesAttachmentById: OvermapSelectorWithArgs<string, AssetTypeFieldValuesAttachment | undefined>;
53
52
  export declare const assetTypeFieldValuesAttachmentReducer: Reducer<AssetTypeFieldValuesAttachmentState>;
@@ -48,6 +48,5 @@ export declare const selectAssetTypeFieldValues: ((state: OvermapRootState) => S
48
48
  clearCache: () => void;
49
49
  };
50
50
  export declare const selectAssetTypeFieldValuesOfAsset: OvermapSelectorWithArgs<string, AssetTypeFieldValues[]>;
51
- export declare const selectAssetTypeValuesOfAssetType: OvermapSelectorWithArgs<string, Stored<AssetTypeFieldValues>[]>;
52
51
  export declare const selectAssetTypeFieldValuesById: OvermapSelectorWithArgs<string, AssetTypeFieldValues | undefined>;
53
52
  export declare const assetTypeFieldValuesReducer: Reducer<AssetTypeFieldValuesState>;
@@ -1,5 +1,5 @@
1
1
  import { Reducer } from "@reduxjs/toolkit";
2
- import type { FormRevision, OvermapRootState, OvermapSelectorWithArgs, Stored } from "../../typings";
2
+ import type { Form, FormRevision, OvermapRootState, OvermapSelector, OvermapSelectorWithArgs, Stored } from "../../typings";
3
3
  import type { ModelState } from "../typings";
4
4
  export type FormRevisionState = ModelState<Stored<FormRevision>>;
5
5
  export declare const formRevisionsSlice: import("@reduxjs/toolkit").Slice<FormRevisionState, {
@@ -39,4 +39,5 @@ export declare const selectFormRevisionById: OvermapSelectorWithArgs<string, Sto
39
39
  export declare const _selectLatestFormRevision: (formRevisions: FormRevisionState["instances"], formId: string) => Stored<FormRevision>;
40
40
  export declare const selectLatestFormRevisionOfForm: OvermapSelectorWithArgs<string, Stored<FormRevision> | undefined>;
41
41
  export declare const selectFormRevisionsOfForm: OvermapSelectorWithArgs<string, Stored<FormRevision>[]>;
42
+ export declare const selectLatestFormRevisionByForm: OvermapSelector<Record<Stored<Form>["offline_id"], Stored<FormRevision>>>;
42
43
  export declare const formRevisionReducer: Reducer<FormRevisionState>;
@@ -43,5 +43,7 @@ export declare const selectForms: ((state: OvermapRootState) => Stored<Form>[])
43
43
  }> & {
44
44
  clearCache: () => void;
45
45
  };
46
- export declare const selectFormById: OvermapSelectorWithArgs<string, Stored<Form> | undefined>;
47
46
  export declare const selectFilteredForms: OvermapSelectorWithArgs<FormSearchArgs, Stored<Form>[]>;
47
+ export declare const selectFormById: OvermapSelectorWithArgs<string, Stored<Form> | undefined>;
48
+ export declare const selectFormsCount: OvermapSelector<number>;
49
+ export declare const selectGeneralFormCount: OvermapSelector<number>;
@@ -45,6 +45,8 @@ export declare const selectFormSubmissionsMapping: OvermapSelector<FormSubmissio
45
45
  export declare const selectFormSubmissions: OvermapSelector<Stored<FormSubmission>[]>;
46
46
  export declare const selectFormSubmissionById: OvermapSelectorWithArgs<string, Stored<FormSubmission> | undefined>;
47
47
  export declare const selectFormSubmissionsOfForm: OvermapSelectorWithArgs<string, Stored<FormSubmission>[]>;
48
+ export declare const selectFormSubmissionsByFormRevisions: OvermapSelector<Record<string, Stored<FormSubmission>[]>>;
49
+ export declare const selectSortedFormSubmissionsOfForm: OvermapSelectorWithArgs<string, Stored<FormSubmission>[]>;
48
50
  export declare const selectFormSubmissionsOfIssue: (args: string) => (state: OvermapRootState) => Stored<FormSubmission>[];
49
51
  export declare const selectFormSubmissionsOfAsset: (args: string) => (state: OvermapRootState) => Stored<FormSubmission>[];
50
52
  export declare const formSubmissionReducer: Reducer<FormSubmissionState>;
@@ -47,7 +47,6 @@ export declare const selectIssueTypeFieldValuesAttachments: ((state: OvermapRoot
47
47
  }> & {
48
48
  clearCache: () => void;
49
49
  };
50
- export declare const selectIssueTypeFieldValuesAttachmentById: OvermapSelectorWithArgs<string, Stored<IssueTypeFieldValuesAttachment> | undefined>;
51
- export declare const selectIssueTypeFieldValuesAttachmentsByIds: (args: string[]) => (state: OvermapRootState) => Stored<IssueTypeFieldValuesAttachment>[];
52
50
  export declare const selectAttachmentsOfIssueTypeFieldValues: OvermapSelectorWithArgs<string, Stored<IssueTypeFieldValuesAttachment>[]>;
51
+ export declare const selectIssueTypeFieldValuesAttachmentById: OvermapSelectorWithArgs<string, Stored<IssueTypeFieldValuesAttachment> | undefined>;
53
52
  export declare const issueTypeFieldValuesAttachmentReducer: Reducer<IssueTypeFieldValuesAttachmentState>;
@@ -1,5 +1,5 @@
1
1
  import { Reducer } from "@reduxjs/toolkit";
2
- import type { IssueTypeFields, IssueTypeFieldValues, OvermapRootState, OvermapSelectorWithArgs, Stored } from "../../typings";
2
+ import type { IssueTypeFields, OvermapRootState, OvermapSelectorWithArgs, Stored } from "../../typings";
3
3
  import type { ModelState } from "../typings";
4
4
  export type IssueTypeFieldsState = ModelState<Stored<IssueTypeFields>>;
5
5
  export declare const issueTypeFieldsSlice: import("@reduxjs/toolkit").Slice<IssueTypeFieldsState, {
@@ -48,7 +48,6 @@ export declare const selectIssueTypeFields: ((state: OvermapRootState) => Stored
48
48
  clearCache: () => void;
49
49
  };
50
50
  export declare const selectIssueTypeFieldsOfIssueType: OvermapSelectorWithArgs<string, Stored<IssueTypeFields>[]>;
51
- export declare const selectLatestIssueTypeFieldsOfIssueType: OvermapSelectorWithArgs<string, IssueTypeFields | undefined>;
52
- export declare const selectIssueTypeValuesOfIssueType: OvermapSelectorWithArgs<string, Stored<IssueTypeFieldValues>[]>;
51
+ export declare const selectLatestIssueTypeFieldsOfAssetType: OvermapSelectorWithArgs<string, IssueTypeFields | undefined>;
53
52
  export declare const selectIssueTypeFieldsById: OvermapSelectorWithArgs<string, Stored<IssueTypeFields> | undefined>;
54
53
  export declare const issueTypeFieldsReducer: Reducer<IssueTypeFieldsState>;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Core functionality for Overmap",
4
4
  "author": "Wôrdn Inc.",
5
5
  "license": "UNLICENSED",
6
- "version": "1.0.71-fields.13",
6
+ "version": "1.0.71-fields.2",
7
7
  "type": "module",
8
8
  "main": "dist/overmap-core.umd.cjs",
9
9
  "module": "dist/overmap-core.js",