@overmap-ai/core 1.0.63-form-submission-fix.4 → 1.0.63-form-submission-drafts.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.
@@ -28,5 +28,5 @@ export declare abstract class BaseAttachmentService<TState extends OvermapRootSt
28
28
  abstract readonly selectAttachment: OvermapSelectorWithArgs<string, Stored<TAttachment>>;
29
29
  protected attachFiles(files: File[], modelId: TModelId, buildOfflineAttachment: (data: BuildOfflineAttachmentData<TModelId>) => Stored<TAttachment>): Promise<OptimisticMultipleModelResult<TAttachment>>;
30
30
  protected deleteAttachment(attachmendId: string): Promise<void>;
31
- refreshStore(projectId: number): Promise<void>;
31
+ refreshStore(projectId: number, _organizationId?: number): Promise<void>;
32
32
  }
@@ -14,4 +14,5 @@ export declare abstract class DocumentAttachmentService<TState extends OvermapRo
14
14
  private buildOfflineAttachment;
15
15
  attachFilesToDocument(files: File[], documentId: string): Promise<OptimisticMultipleModelResult<DocumentAttachment>>;
16
16
  deleteDocumentAttachment(attachmentId: string): Promise<void>;
17
+ refreshStore(projectId: number, organizationId: number): Promise<void>;
17
18
  }
@@ -3,7 +3,7 @@ import { OptimisticModelResult } from "../typings";
3
3
  import { BaseApiService } from "./BaseApiService";
4
4
  import type { BaseSDK } from "../base";
5
5
  export declare abstract class DocumentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
6
- add(document: DocumentPayload): OptimisticModelResult<Document>;
6
+ add(payload: DocumentPayload): OptimisticModelResult<Document>;
7
7
  update(document: Submitted<Partial<Document>>): OptimisticModelResult<Document>;
8
8
  move(documentId: string, targetDocumentId: string | null, position: MovePosition): Promise<Document[]>;
9
9
  delete(documentId: string): Promise<Document[]>;
@@ -1,6 +1,6 @@
1
1
  import { FieldValue, FormSubmission, FormSubmissionAttachment, FormSubmissionPayload } from '../../typings/models/forms';
2
2
  import { PresignedUrlsResponse } from "../typings";
3
- import { Created, OvermapRootState, Stored } from "../../typings";
3
+ import { Created, Offline, OvermapRootState, Payload, Stored } from "../../typings";
4
4
  import type { BaseSDK } from "../base";
5
5
  import { BaseUploadService } from "./BaseUploadService";
6
6
  interface BulkAddRequestReturnValue {
@@ -10,6 +10,7 @@ interface BulkAddRequestReturnValue {
10
10
  }
11
11
  export declare abstract class FormSubmissionService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseUploadService<TState, TSDK> {
12
12
  private bulkAddSubmissionAttachments;
13
+ private bulkDeleteSubmissionAttachments;
13
14
  add(payload: FormSubmissionPayload): Promise<[
14
15
  Stored<FormSubmission>,
15
16
  Stored<FormSubmissionAttachment>[],
@@ -21,6 +22,13 @@ export declare abstract class FormSubmissionService<TState extends OvermapRootSt
21
22
  commonFieldValues: Record<string, FieldValue>;
22
23
  fieldValuesByAsset: Record<string, Record<string, FieldValue>>;
23
24
  }, batchSize: number): Promise<Promise<BulkAddRequestReturnValue>[]>;
25
+ update(payload: Offline<Partial<Payload<FormSubmission>>>): Promise<[
26
+ Stored<FormSubmission>,
27
+ Stored<FormSubmissionAttachment>[],
28
+ Promise<Created<FormSubmission>>,
29
+ Promise<Created<FormSubmissionAttachment>[]>,
30
+ Promise<void>
31
+ ]>;
24
32
  delete(submissionId: string): Promise<undefined>;
25
33
  refreshStore(projectId: number): Promise<void>;
26
34
  }
@@ -0,0 +1,9 @@
1
+ import type { IssueAssociation, OvermapRootState, Payload } from "../../typings";
2
+ import type { OptimisticModelResult } from "../typings";
3
+ import type { BaseSDK } from "../base";
4
+ import { BaseUploadService } from "./BaseUploadService";
5
+ export declare abstract class IssueAssociationService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseUploadService<TState, TSDK> {
6
+ add(payload: Payload<IssueAssociation>): OptimisticModelResult<IssueAssociation>;
7
+ delete(id: string): Promise<void>;
8
+ refreshStore(projectId: number): Promise<void>;
9
+ }
@@ -31,3 +31,4 @@ export * from "./AgentService";
31
31
  export * from "./TeamService";
32
32
  export * from "./UserService";
33
33
  export * from "./GeoImageService";
34
+ export * from "./IssueAssociationService";
@@ -25,320 +25,12 @@ export declare const documentSlice: import("@reduxjs/toolkit").Slice<DocumentSta
25
25
  payload: string[];
26
26
  }) => void;
27
27
  }, "documents">;
28
- export declare const setDocuments: import("@reduxjs/toolkit").ActionCreatorWithPayload<((import('../../typings/models/base').OfflineModel & import('../../typings/models/base').CreatedByModel & {
29
- title: string | null;
30
- description: string | null;
31
- content: string | null;
32
- parent_document: string | null;
33
- } & {
34
- project: number;
35
- organization: null;
36
- } & {
37
- children_documents: string[];
38
- } & {
39
- offline_id: string;
40
- } & Omit<import('../../typings/models/base').OfflineModel & import('../../typings/models/base').CreatedByModel & {
41
- title: string | null;
42
- description: string | null;
43
- content: string | null;
44
- parent_document: string | null;
45
- } & {
46
- project: number;
47
- organization: null;
48
- } & {
49
- children_documents: string[];
50
- }, "created_at" | "id" | "created_by">) | (import('../../typings/models/base').OfflineModel & import('../../typings/models/base').CreatedByModel & {
51
- title: string | null;
52
- description: string | null;
53
- content: string | null;
54
- parent_document: string | null;
55
- } & {
56
- organization: number;
57
- project: null;
58
- } & {
59
- children_documents: string[];
60
- } & {
61
- offline_id: string;
62
- } & Omit<import('../../typings/models/base').OfflineModel & import('../../typings/models/base').CreatedByModel & {
63
- title: string | null;
64
- description: string | null;
65
- content: string | null;
66
- parent_document: string | null;
67
- } & {
68
- organization: number;
69
- project: null;
70
- } & {
71
- children_documents: string[];
72
- }, "created_at" | "id" | "created_by">))[], "documents/setDocuments">, addDocuments: import("@reduxjs/toolkit").ActionCreatorWithPayload<((import('../../typings/models/base').OfflineModel & import('../../typings/models/base').CreatedByModel & {
73
- title: string | null;
74
- description: string | null;
75
- content: string | null;
76
- parent_document: string | null;
77
- } & {
78
- project: number;
79
- organization: null;
80
- } & {
81
- children_documents: string[];
82
- } & {
83
- offline_id: string;
84
- } & Omit<import('../../typings/models/base').OfflineModel & import('../../typings/models/base').CreatedByModel & {
85
- title: string | null;
86
- description: string | null;
87
- content: string | null;
88
- parent_document: string | null;
89
- } & {
90
- project: number;
91
- organization: null;
92
- } & {
93
- children_documents: string[];
94
- }, "created_at" | "id" | "created_by">) | (import('../../typings/models/base').OfflineModel & import('../../typings/models/base').CreatedByModel & {
95
- title: string | null;
96
- description: string | null;
97
- content: string | null;
98
- parent_document: string | null;
99
- } & {
100
- organization: number;
101
- project: null;
102
- } & {
103
- children_documents: string[];
104
- } & {
105
- offline_id: string;
106
- } & Omit<import('../../typings/models/base').OfflineModel & import('../../typings/models/base').CreatedByModel & {
107
- title: string | null;
108
- description: string | null;
109
- content: string | null;
110
- parent_document: string | null;
111
- } & {
112
- organization: number;
113
- project: null;
114
- } & {
115
- children_documents: string[];
116
- }, "created_at" | "id" | "created_by">))[], "documents/addDocuments">, updateDocuments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Submitted<Partial<(import('../../typings/models/base').OfflineModel & import('../../typings/models/base').CreatedByModel & {
117
- title: string | null;
118
- description: string | null;
119
- content: string | null;
120
- parent_document: string | null;
121
- } & {
122
- project: number;
123
- organization: null;
124
- } & {
125
- children_documents: string[];
126
- } & {
127
- offline_id: string;
128
- } & Omit<import('../../typings/models/base').OfflineModel & import('../../typings/models/base').CreatedByModel & {
129
- title: string | null;
130
- description: string | null;
131
- content: string | null;
132
- parent_document: string | null;
133
- } & {
134
- project: number;
135
- organization: null;
136
- } & {
137
- children_documents: string[];
138
- }, "created_at" | "id" | "created_by">) | (import('../../typings/models/base').OfflineModel & import('../../typings/models/base').CreatedByModel & {
139
- title: string | null;
140
- description: string | null;
141
- content: string | null;
142
- parent_document: string | null;
143
- } & {
144
- organization: number;
145
- project: null;
146
- } & {
147
- children_documents: string[];
148
- } & {
149
- offline_id: string;
150
- } & Omit<import('../../typings/models/base').OfflineModel & import('../../typings/models/base').CreatedByModel & {
151
- title: string | null;
152
- description: string | null;
153
- content: string | null;
154
- parent_document: string | null;
155
- } & {
156
- organization: number;
157
- project: null;
158
- } & {
159
- children_documents: string[];
160
- }, "created_at" | "id" | "created_by">)>>[], "documents/updateDocuments">, moveDocument: import("@reduxjs/toolkit").ActionCreatorWithPayload<MoveDocumentPayload, "documents/moveDocument">, removeDocuments: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "documents/removeDocuments">;
28
+ export declare const setDocuments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<Document>[], "documents/setDocuments">, addDocuments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<Document>[], "documents/addDocuments">, updateDocuments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Submitted<Partial<Stored<Document>>>[], "documents/updateDocuments">, moveDocument: import("@reduxjs/toolkit").ActionCreatorWithPayload<MoveDocumentPayload, "documents/moveDocument">, removeDocuments: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "documents/removeDocuments">;
161
29
  export declare const selectDocumentsMapping: OvermapSelector<Record<string, Stored<Document>>>;
162
30
  export declare const selectDocuments: OvermapSelector<Stored<Document>[]>;
163
- export declare const selectDocument: (args: string) => (state: OvermapRootState) => (import('../../typings/models/base').OfflineModel & import('../../typings/models/base').CreatedByModel & {
164
- title: string | null;
165
- description: string | null;
166
- content: string | null;
167
- parent_document: string | null;
168
- } & {
169
- project: number;
170
- organization: null;
171
- } & {
172
- children_documents: string[];
173
- } & {
174
- offline_id: string;
175
- } & Omit<import('../../typings/models/base').OfflineModel & import('../../typings/models/base').CreatedByModel & {
176
- title: string | null;
177
- description: string | null;
178
- content: string | null;
179
- parent_document: string | null;
180
- } & {
181
- project: number;
182
- organization: null;
183
- } & {
184
- children_documents: string[];
185
- }, "created_at" | "id" | "created_by">) | (import('../../typings/models/base').OfflineModel & import('../../typings/models/base').CreatedByModel & {
186
- title: string | null;
187
- description: string | null;
188
- content: string | null;
189
- parent_document: string | null;
190
- } & {
191
- organization: number;
192
- project: null;
193
- } & {
194
- children_documents: string[];
195
- } & {
196
- offline_id: string;
197
- } & Omit<import('../../typings/models/base').OfflineModel & import('../../typings/models/base').CreatedByModel & {
198
- title: string | null;
199
- description: string | null;
200
- content: string | null;
201
- parent_document: string | null;
202
- } & {
203
- organization: number;
204
- project: null;
205
- } & {
206
- children_documents: string[];
207
- }, "created_at" | "id" | "created_by">) | undefined;
31
+ export declare const selectDocument: (args: string) => (state: OvermapRootState) => Stored<Document> | undefined;
208
32
  export declare const selectAncestorIdsOfDocument: (args: string) => (state: OvermapRootState) => string[];
209
- export declare const selectRootDocuments: ((state: OvermapRootState) => ((import('../../typings/models/base').OfflineModel & import('../../typings/models/base').CreatedByModel & {
210
- title: string | null;
211
- description: string | null;
212
- content: string | null;
213
- parent_document: string | null;
214
- } & {
215
- project: number;
216
- organization: null;
217
- } & {
218
- children_documents: string[];
219
- } & {
220
- offline_id: string;
221
- } & Omit<import('../../typings/models/base').OfflineModel & import('../../typings/models/base').CreatedByModel & {
222
- title: string | null;
223
- description: string | null;
224
- content: string | null;
225
- parent_document: string | null;
226
- } & {
227
- project: number;
228
- organization: null;
229
- } & {
230
- children_documents: string[];
231
- }, "created_at" | "id" | "created_by">) | (import('../../typings/models/base').OfflineModel & import('../../typings/models/base').CreatedByModel & {
232
- title: string | null;
233
- description: string | null;
234
- content: string | null;
235
- parent_document: string | null;
236
- } & {
237
- organization: number;
238
- project: null;
239
- } & {
240
- children_documents: string[];
241
- } & {
242
- offline_id: string;
243
- } & Omit<import('../../typings/models/base').OfflineModel & import('../../typings/models/base').CreatedByModel & {
244
- title: string | null;
245
- description: string | null;
246
- content: string | null;
247
- parent_document: string | null;
248
- } & {
249
- organization: number;
250
- project: null;
251
- } & {
252
- children_documents: string[];
253
- }, "created_at" | "id" | "created_by">))[]) & import("reselect").OutputSelectorFields<(args_0: ((import('../../typings/models/base').OfflineModel & import('../../typings/models/base').CreatedByModel & {
254
- title: string | null;
255
- description: string | null;
256
- content: string | null;
257
- parent_document: string | null;
258
- } & {
259
- project: number;
260
- organization: null;
261
- } & {
262
- children_documents: string[];
263
- } & {
264
- offline_id: string;
265
- } & Omit<import('../../typings/models/base').OfflineModel & import('../../typings/models/base').CreatedByModel & {
266
- title: string | null;
267
- description: string | null;
268
- content: string | null;
269
- parent_document: string | null;
270
- } & {
271
- project: number;
272
- organization: null;
273
- } & {
274
- children_documents: string[];
275
- }, "created_at" | "id" | "created_by">) | (import('../../typings/models/base').OfflineModel & import('../../typings/models/base').CreatedByModel & {
276
- title: string | null;
277
- description: string | null;
278
- content: string | null;
279
- parent_document: string | null;
280
- } & {
281
- organization: number;
282
- project: null;
283
- } & {
284
- children_documents: string[];
285
- } & {
286
- offline_id: string;
287
- } & Omit<import('../../typings/models/base').OfflineModel & import('../../typings/models/base').CreatedByModel & {
288
- title: string | null;
289
- description: string | null;
290
- content: string | null;
291
- parent_document: string | null;
292
- } & {
293
- organization: number;
294
- project: null;
295
- } & {
296
- children_documents: string[];
297
- }, "created_at" | "id" | "created_by">))[]) => ((import('../../typings/models/base').OfflineModel & import('../../typings/models/base').CreatedByModel & {
298
- title: string | null;
299
- description: string | null;
300
- content: string | null;
301
- parent_document: string | null;
302
- } & {
303
- project: number;
304
- organization: null;
305
- } & {
306
- children_documents: string[];
307
- } & {
308
- offline_id: string;
309
- } & Omit<import('../../typings/models/base').OfflineModel & import('../../typings/models/base').CreatedByModel & {
310
- title: string | null;
311
- description: string | null;
312
- content: string | null;
313
- parent_document: string | null;
314
- } & {
315
- project: number;
316
- organization: null;
317
- } & {
318
- children_documents: string[];
319
- }, "created_at" | "id" | "created_by">) | (import('../../typings/models/base').OfflineModel & import('../../typings/models/base').CreatedByModel & {
320
- title: string | null;
321
- description: string | null;
322
- content: string | null;
323
- parent_document: string | null;
324
- } & {
325
- organization: number;
326
- project: null;
327
- } & {
328
- children_documents: string[];
329
- } & {
330
- offline_id: string;
331
- } & Omit<import('../../typings/models/base').OfflineModel & import('../../typings/models/base').CreatedByModel & {
332
- title: string | null;
333
- description: string | null;
334
- content: string | null;
335
- parent_document: string | null;
336
- } & {
337
- organization: number;
338
- project: null;
339
- } & {
340
- children_documents: string[];
341
- }, "created_at" | "id" | "created_by">))[], {
33
+ export declare const selectRootDocuments: ((state: OvermapRootState) => Stored<Document>[]) & import("reselect").OutputSelectorFields<(args_0: Stored<Document>[]) => Stored<Document>[], {
342
34
  clearCache: () => void;
343
35
  }> & {
344
36
  clearCache: () => void;
@@ -1,6 +1,6 @@
1
1
  import { Reducer } from "@reduxjs/toolkit";
2
2
  import { ModelState } from "../typings";
3
- import { OvermapSelector, OvermapSelectorWithArgs, Stored, FormSubmissionAttachment } from "../../typings";
3
+ import { FormSubmissionAttachment, OvermapRootState, OvermapSelector, OvermapSelectorWithArgs, Stored } from "../../typings";
4
4
  export type FormSubmissionAttachmentState = ModelState<Stored<FormSubmissionAttachment>>;
5
5
  export declare const formSubmissionAttachmentSlice: import("@reduxjs/toolkit").Slice<FormSubmissionAttachmentState, {
6
6
  initializeFormSubmissionAttachments: <TState extends ModelState<Stored<FormSubmissionAttachment>>>(state: TState, action: {
@@ -42,5 +42,6 @@ export declare const formSubmissionAttachmentSlice: import("@reduxjs/toolkit").S
42
42
  }, "formSubmissionAttachments">;
43
43
  export declare const initializeFormSubmissionAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<FormSubmissionAttachment>[], "formSubmissionAttachments/initializeFormSubmissionAttachments">, addFormSubmissionAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<FormSubmissionAttachment>, "formSubmissionAttachments/addFormSubmissionAttachment">, addFormSubmissionAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<FormSubmissionAttachment>[], "formSubmissionAttachments/addFormSubmissionAttachments">, setFormSubmissionAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<FormSubmissionAttachment>, "formSubmissionAttachments/setFormSubmissionAttachment">, setFormSubmissionAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<FormSubmissionAttachment>[], "formSubmissionAttachments/setFormSubmissionAttachments">, updateFormSubmissionAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<FormSubmissionAttachment>, "formSubmissionAttachments/updateFormSubmissionAttachment">, updateFormSubmissionAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<FormSubmissionAttachment>[], "formSubmissionAttachments/updateFormSubmissionAttachments">, deleteFormSubmissionAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "formSubmissionAttachments/deleteFormSubmissionAttachment">, deleteFormSubmissionAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "formSubmissionAttachments/deleteFormSubmissionAttachments">;
44
44
  export declare const selectFormSubmissionAttachmentsMapping: OvermapSelector<FormSubmissionAttachmentState["instances"]>;
45
+ export declare const selectFormSubmissionAttachemntsByIds: (args: string[]) => (state: OvermapRootState) => Stored<FormSubmissionAttachment>[];
45
46
  export declare const selectAttachmentsOfFormSubmission: OvermapSelectorWithArgs<string, Stored<FormSubmissionAttachment>[]>;
46
47
  export declare const formSubmissionAttachmentReducer: Reducer<FormSubmissionAttachmentState>;
@@ -36,3 +36,4 @@ export * from "./issueUpdateSlice";
36
36
  export * from "./issueAttachmentSlice";
37
37
  export * from "./versioningSlice";
38
38
  export * from "./geoImageSlice";
39
+ export * from "./issueAssociationSlice";
@@ -0,0 +1,49 @@
1
+ import { Reducer } from "@reduxjs/toolkit";
2
+ import type { IssueAssociation, OvermapRootState, OvermapSelectorWithArgs, Stored } from "../../typings";
3
+ import type { ModelState } from "../typings";
4
+ export type IssueAssociationSliceState = ModelState<Stored<IssueAssociation>>;
5
+ export declare const issueAssociationSlice: import("@reduxjs/toolkit").Slice<IssueAssociationSliceState, {
6
+ initializeIssueAssociations: <TState extends ModelState<Stored<IssueAssociation>>>(state: TState, action: {
7
+ payload: Stored<IssueAssociation>[];
8
+ type: string;
9
+ }) => void;
10
+ addIssueAssociation: <TState_1 extends ModelState<Stored<IssueAssociation>>>(state: TState_1, action: {
11
+ payload: Stored<IssueAssociation>;
12
+ type: string;
13
+ }) => void;
14
+ addIssueAssociations: <TState_2 extends ModelState<Stored<IssueAssociation>>>(state: TState_2, action: {
15
+ payload: Stored<IssueAssociation>[];
16
+ type: string;
17
+ }) => void;
18
+ setIssueAssociation: <TState_3 extends ModelState<Stored<IssueAssociation>>>(state: TState_3, action: {
19
+ payload: Stored<IssueAssociation>;
20
+ type: string;
21
+ }) => void;
22
+ setIssueAssociations: <TState_4 extends ModelState<Stored<IssueAssociation>>>(state: TState_4, action: {
23
+ payload: Stored<IssueAssociation>[];
24
+ type: string;
25
+ }) => void;
26
+ updateIssueAssociation: <TState_5 extends ModelState<Stored<IssueAssociation>>>(state: TState_5, action: {
27
+ payload: Stored<IssueAssociation>;
28
+ type: string;
29
+ }) => void;
30
+ updateIssueAssociations: <TState_6 extends ModelState<Stored<IssueAssociation>>>(state: TState_6, action: {
31
+ payload: Stored<IssueAssociation>[];
32
+ type: string;
33
+ }) => void;
34
+ deleteIssueAssociation: <TState_7 extends ModelState<Stored<IssueAssociation>>>(state: TState_7, action: {
35
+ payload: string;
36
+ type: string;
37
+ }) => void;
38
+ deleteIssueAssociations: <TState_8 extends ModelState<Stored<IssueAssociation>>>(state: TState_8, action: {
39
+ payload: string[];
40
+ type: string;
41
+ }) => void;
42
+ }, "issueAssociations">;
43
+ export declare const initializeIssueAssociations: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<IssueAssociation>[], "issueAssociations/initializeIssueAssociations">, setIssueAssociations: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<IssueAssociation>[], "issueAssociations/setIssueAssociations">, setIssueAssociation: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<IssueAssociation>, "issueAssociations/setIssueAssociation">, updateIssueAssociation: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<IssueAssociation>, "issueAssociations/updateIssueAssociation">, updateIssueAssociations: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<IssueAssociation>[], "issueAssociations/updateIssueAssociations">, addIssueAssociation: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<IssueAssociation>, "issueAssociations/addIssueAssociation">, addIssueAssociations: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<IssueAssociation>[], "issueAssociations/addIssueAssociations">, deleteIssueAssociation: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "issueAssociations/deleteIssueAssociation">, deleteIssueAssociations: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "issueAssociations/deleteIssueAssociations">;
44
+ export declare const selectIssueAssociationMapping: (state: OvermapRootState) => Record<string, Stored<IssueAssociation>>;
45
+ export declare const selectIssueAssociationById: OvermapSelectorWithArgs<string, Stored<IssueAssociation>>;
46
+ export declare const selectIssueAssociationsToIssue: (args: string) => (state: OvermapRootState) => Stored<IssueAssociation>[];
47
+ export declare const selectIssueAssociationsOfIssue: (args: string) => (state: OvermapRootState) => Stored<IssueAssociation>[];
48
+ export declare const selectIssueAssociationsOfAsset: (args: string) => (state: OvermapRootState) => Stored<IssueAssociation>[];
49
+ export declare const issueAssociationReducer: Reducer<IssueAssociationSliceState>;
@@ -3,8 +3,8 @@ import { Reducer } from "redux";
3
3
  import { Config, OfflineAction, OfflineMetadata } from "@redux-offline/redux-offline/lib/types";
4
4
  import request from "superagent";
5
5
  import { type BaseSDK, type OfflineMetaEffect, OutboxCoordinator, RequestDetails } from "../sdk";
6
- import { AgentsState, AssetAttachmentState, AssetStageCompletionState, AssetStageState, AssetState, AssetTypeAttachmentState, AssetTypeState, AuthState, CategoryState, DocumentAttachmentState, DocumentState, EmailDomainState, FileState, FormRevisionAttachmentState, FormRevisionState, FormState, FormSubmissionAttachmentState, FormSubmissionState, GeoImageSliceState, IssueAttachmentState, IssueCommentState, IssueState, IssueTypeState, IssueUpdateState, LicenseState, OrganizationAccessState, OrganizationState, OutboxState, ProjectAccessState, ProjectAttachmentState, ProjectFileState, ProjectState, RehydratedState, SettingState, TeamState, UserState, VersioningState, WorkspaceState } from "./slices";
7
- import { BaseState, OvermapRootState } from "../typings";
6
+ import { AgentsState, AssetAttachmentState, AssetStageCompletionState, AssetStageState, AssetState, AssetTypeAttachmentState, AssetTypeState, AuthState, CategoryState, DocumentAttachmentState, DocumentState, EmailDomainState, FileState, FormRevisionAttachmentState, FormRevisionState, FormState, FormSubmissionAttachmentState, FormSubmissionState, GeoImageSliceState, IssueAssociationSliceState, IssueAttachmentState, IssueCommentState, IssueState, IssueTypeState, IssueUpdateState, LicenseState, OrganizationAccessState, OrganizationState, OutboxState, ProjectAccessState, ProjectAttachmentState, ProjectFileState, ProjectState, RehydratedState, SettingState, TeamState, UserState, VersioningState, WorkspaceState } from "./slices";
7
+ import type { BaseState, OvermapRootState } from "../typings";
8
8
  export declare const VERSION_REDUCER_KEY = "versioning";
9
9
  export declare const overmapReducers: {
10
10
  versioning: Reducer<VersioningState>;
@@ -45,6 +45,7 @@ export declare const overmapReducers: {
45
45
  issueUpdateReducer: Reducer<IssueUpdateState>;
46
46
  issueAttachmentReducer: Reducer<IssueAttachmentState>;
47
47
  geoImageReducer: Reducer<GeoImageSliceState>;
48
+ issueAssociationReducer: Reducer<IssueAssociationSliceState>;
48
49
  };
49
50
  export declare const resetStore = "RESET";
50
51
  export declare const overmapRootReducer: Reducer<OvermapRootState>;
@@ -1,4 +1,4 @@
1
- import { IconModel, Model, OfflineModel } from "./base";
1
+ import { ColorModel, IconModel, Model, OfflineModel } from "./base";
2
2
  import { CanvasMarkableModel, MarkableModel } from "./geo";
3
3
  export interface Asset extends OfflineModel, MarkableModel, CanvasMarkableModel {
4
4
  asset_type: string;
@@ -6,7 +6,7 @@ export interface Asset extends OfflineModel, MarkableModel, CanvasMarkableModel
6
6
  label: string | null;
7
7
  description?: string;
8
8
  }
9
- export interface AssetType extends OfflineModel, IconModel {
9
+ export interface AssetType extends OfflineModel, IconModel, ColorModel {
10
10
  name?: string;
11
11
  description?: string;
12
12
  }
@@ -9,14 +9,14 @@ export interface SubmittedAtModel extends Model {
9
9
  submitted_at: string;
10
10
  }
11
11
  export interface TimestampedModel extends Model {
12
- created_at: string;
13
- updated_at: string;
12
+ created_at?: string;
13
+ updated_at?: string;
14
14
  }
15
15
  export type Offline<T> = T & {
16
16
  offline_id: string;
17
17
  };
18
18
  export type OfflineIdMapping<TModel extends OfflineModel> = Record<TModel["offline_id"], TModel>;
19
- export type Payload<TModel> = Omit<TModel, "offline_id" | "created_at" | "updated_at" | "id">;
19
+ export type Payload<TModel> = Omit<TModel, "offline_id" | "created_at" | "updated_at" | "id" | "submitted_at" | "created_by">;
20
20
  export type MaybePayload<TModel extends OfflineModel> = Payload<TModel> & {
21
21
  offline_id?: string | null;
22
22
  };
@@ -39,7 +39,9 @@ export interface SubmittedAtModel {
39
39
  }
40
40
  export interface IconModel {
41
41
  icon: string;
42
- icon_color: CSSColor;
42
+ }
43
+ export interface ColorModel {
44
+ color: CSSColor;
43
45
  }
44
46
  export interface CreatedByModel {
45
47
  created_by: User["id"];
@@ -1,22 +1,12 @@
1
- import { CreatedByModel, OfflineModel, Payload } from "./base";
2
- export type SubmittedDocument = OfflineModel & CreatedByModel & {
1
+ import { ColorModel, CreatedByModel, IconModel, OfflineModel, Payload, SubmittedAtModel, TimestampedModel } from "./base";
2
+ export interface Document extends OfflineModel, SubmittedAtModel, CreatedByModel, TimestampedModel, IconModel, ColorModel {
3
3
  title: string | null;
4
4
  description: string | null;
5
5
  content: string | null;
6
6
  parent_document: string | null;
7
- } & ({
8
- project: number;
9
- organization: null;
10
- } | {
11
- organization: number;
12
- project: null;
13
- });
14
- export type Document = SubmittedDocument & {
15
7
  children_documents: string[];
16
- };
17
- export type CreatedDocument = Document & CreatedByModel & {
18
- created_at: string;
19
- updated_at: string;
20
- };
21
- export type DocumentPayload = Payload<Omit<SubmittedDocument, "project" | "organization" | "created_by">>;
8
+ project?: number;
9
+ organization?: number;
10
+ }
11
+ export type DocumentPayload = Payload<Document>;
22
12
  export type MovePosition = "left" | "right" | "left-child" | "right-child";
@@ -115,6 +115,7 @@ export interface FormRevision<TFields extends BaseSerializedObject = ISerialized
115
115
  }
116
116
  export type FormRevisionPayload = Omit<Payload<FormRevision>, "created_by" | "revision" | "form" | "submitted_at">;
117
117
  export interface FormSubmission extends OfflineModel, SubmittedAtModel, CreatedByModel {
118
+ published_at?: string | null;
118
119
  form_revision: string;
119
120
  values: Record<string, FieldValue>;
120
121
  issue?: string;
@@ -1,6 +1,6 @@
1
- import { CreatedByModel, IconModel, OfflineModel, Payload, SubmittedAtModel } from "./base";
1
+ import { ColorModel, CreatedByModel, IconModel, OfflineModel, Payload, SubmittedAtModel } from "./base";
2
2
  import { Organization } from "./organizations";
3
- export interface IssueType extends OfflineModel, SubmittedAtModel, IconModel, CreatedByModel {
3
+ export interface IssueType extends OfflineModel, SubmittedAtModel, IconModel, ColorModel, CreatedByModel {
4
4
  name?: string;
5
5
  description?: string;
6
6
  organization: Organization["id"];
@@ -1,22 +1,21 @@
1
- import { CreatedByModel, Offline, OfflineModel } from "./base";
1
+ import type { CreatedByModel, Offline, OfflineModel, SubmittedAtModel } from "./base";
2
2
  import { IssuePriority, IssueStatus } from "../../enums";
3
- import { WorkspaceIndexedModel } from "./workspace";
4
- import { CanvasMarkableModel, MarkableModel } from "./geo";
5
- import { CreatedForm, SubmittedForm, Form } from "./forms";
6
- import { User } from "./users";
7
- import { CSSColor } from "../colors";
8
- import { CreatedDocument, SubmittedDocument } from "./documents";
3
+ import type { WorkspaceIndexedModel } from "./workspace";
4
+ import type { CanvasMarkableModel, MarkableModel } from "./geo";
5
+ import type { CreatedForm, Form, SubmittedForm } from "./forms";
6
+ import type { User } from "./users";
7
+ import type { CSSColor } from "../colors";
9
8
  /**
10
9
  * Represents a model instance that has been submitted to the backend. Some properties (depending on which model, but in
11
10
  * all cases, the `offline_id`) are guaranteed to be set.
12
11
  */
13
- export type Submitted<TModel> = Offline<TModel> & (TModel extends Issue ? SubmittedIssue : TModel extends Form ? SubmittedForm : TModel extends Document ? SubmittedDocument : Omit<TModel, "created_at" | "created_by" | "id">);
12
+ export type Submitted<TModel> = Offline<TModel> & (TModel extends Issue ? SubmittedIssue : TModel extends Form ? SubmittedForm : Omit<TModel, "created_at" | "created_by" | "id">);
14
13
  /**
15
14
  * Represents a model instance that has been submitted to the backend, accepted, then downloaded. Created models
16
15
  * typically have additional properties that are only known once it has been processed and accepted by the API, such as
17
16
  * the `created_at` timestamp, which is the time at which the data was written to the database.
18
17
  */
19
- export type Created<TModel> = Submitted<TModel> & (TModel extends Issue ? CreatedIssue : TModel extends IssueComment ? CreatedIssueComment : TModel extends Form ? CreatedForm : TModel extends Document ? CreatedDocument : TModel);
18
+ export type Created<TModel> = Submitted<TModel> & (TModel extends Issue ? CreatedIssue : TModel extends IssueComment ? CreatedIssueComment : TModel extends Form ? CreatedForm : TModel);
20
19
  /**
21
20
  * Model instances that are stored in the Redux store can be already-created (and will likely be gotten with the initial
22
21
  * data load), or to-be-created. In the former case, you will get a `Created<TModel>`. In the latter case, you will get
@@ -104,3 +103,8 @@ export interface IssueUpdate extends OfflineModel, CreatedByModel {
104
103
  issue: OfflineModel["offline_id"];
105
104
  changes: Partial<Record<IssueUpdateChange, IssueUpdateChangeTypes[IssueUpdateChange]>>;
106
105
  }
106
+ export interface IssueAssociation extends OfflineModel, SubmittedAtModel, CreatedByModel {
107
+ associated_issue: string;
108
+ issue?: string;
109
+ asset?: string;
110
+ }
@@ -1,6 +1,6 @@
1
1
  /// <reference types="@redux-offline/redux-offline" />
2
2
  import { OfflineState } from "@redux-offline/redux-offline/lib/types";
3
- import { AgentsState, AssetAttachmentState, AssetStageCompletionState, AssetStageState, AssetState, AssetTypeAttachmentState, AssetTypeState, AuthState, CategoryState, DocumentAttachmentState, DocumentState, EmailDomainState, FileState, FormRevisionAttachmentState, FormRevisionState, FormState, FormSubmissionAttachmentState, FormSubmissionState, GeoImageSliceState, IssueAttachmentState, IssueCommentState, IssueState, IssueTypeState, IssueUpdateState, LicenseState, OrganizationAccessState, OrganizationState, OutboxState, ProjectAccessState, ProjectAttachmentState, ProjectFileState, ProjectState, RehydratedState, SettingState, TeamState, UserState, VERSION_REDUCER_KEY, VersioningState, WorkspaceState } from "../../store";
3
+ import { AgentsState, AssetAttachmentState, AssetStageCompletionState, AssetStageState, AssetState, AssetTypeAttachmentState, AssetTypeState, AuthState, CategoryState, DocumentAttachmentState, DocumentState, EmailDomainState, FileState, FormRevisionAttachmentState, FormRevisionState, FormState, FormSubmissionAttachmentState, FormSubmissionState, GeoImageSliceState, IssueAssociationSliceState, IssueAttachmentState, IssueCommentState, IssueState, IssueTypeState, IssueUpdateState, LicenseState, OrganizationAccessState, OrganizationState, OutboxState, ProjectAccessState, ProjectAttachmentState, ProjectFileState, ProjectState, RehydratedState, SettingState, TeamState, UserState, VERSION_REDUCER_KEY, VersioningState, WorkspaceState } from "../../store";
4
4
  export interface BaseState {
5
5
  outboxReducer: OutboxState;
6
6
  offline: OfflineState;
@@ -43,4 +43,5 @@ export interface OvermapRootState extends BaseState {
43
43
  teamReducer: TeamState;
44
44
  agentsReducer: AgentsState;
45
45
  geoImageReducer: GeoImageSliceState;
46
+ issueAssociationReducer: IssueAssociationSliceState;
46
47
  }