@overmap-ai/core 1.0.51-qr-field.0 → 1.0.52
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.
- package/dist/overmap-core.js +325 -84
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +325 -84
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/sdk.d.ts +2 -1
- package/dist/sdk/services/AttachmentService.d.ts +2 -2
- package/dist/sdk/services/DocumentService.d.ts +5 -5
- package/dist/sdk/services/TeamService.d.ts +12 -0
- package/dist/sdk/services/index.d.ts +1 -0
- package/dist/store/slices/categorySlice.d.ts +2 -0
- package/dist/store/slices/documentSlice.d.ts +349 -12
- package/dist/store/slices/formRevisionSlice.d.ts +1 -0
- package/dist/store/slices/index.d.ts +1 -0
- package/dist/store/slices/issueSlice.d.ts +1 -0
- package/dist/store/slices/projectFileSlice.d.ts +1 -0
- package/dist/store/slices/teamSlice.d.ts +19 -0
- package/dist/store/slices/workspaceSlice.d.ts +1 -0
- package/dist/store/store.d.ts +4 -1
- package/dist/typings/models/attachments.d.ts +2 -2
- package/dist/typings/models/base.d.ts +3 -0
- package/dist/typings/models/documents.d.ts +19 -5
- package/dist/typings/models/index.d.ts +1 -0
- package/dist/typings/models/issues.d.ts +3 -2
- package/dist/typings/models/teams.d.ts +10 -0
- package/package.json +1 -1
package/dist/sdk/sdk.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AttachmentService, AuthService, CategoryService, ComponentService, ComponentStageCompletionService, ComponentStageService, ComponentTypeService, EmailVerificationService, FileService, IssueCommentService, IssueService, MainService, OrganizationAccessService, ProjectAccessService, ProjectFileService, ProjectService, UserFormService, UserFormSubmissionService, WorkspaceService, OrganizationService, EmailDomainsService, LicenseService, DocumentService, IssueUpdateService, AgentService } from "./services";
|
|
1
|
+
import { AttachmentService, AuthService, CategoryService, ComponentService, ComponentStageCompletionService, ComponentStageService, ComponentTypeService, EmailVerificationService, FileService, IssueCommentService, IssueService, MainService, OrganizationAccessService, ProjectAccessService, ProjectFileService, ProjectService, UserFormService, UserFormSubmissionService, WorkspaceService, OrganizationService, EmailDomainsService, LicenseService, DocumentService, IssueUpdateService, AgentService, TeamService } from "./services";
|
|
2
2
|
import { ToolkitStore } from "@reduxjs/toolkit/dist/configureStore.js";
|
|
3
3
|
import { RootState } from "../typings";
|
|
4
4
|
export declare class OvermapSDK {
|
|
@@ -30,5 +30,6 @@ export declare class OvermapSDK {
|
|
|
30
30
|
emailDomains: EmailDomainsService;
|
|
31
31
|
licenses: LicenseService;
|
|
32
32
|
documents: DocumentService;
|
|
33
|
+
teams: TeamService;
|
|
33
34
|
}
|
|
34
35
|
export declare const makeClient: (apiUrl: string, store: ToolkitStore<RootState>) => OvermapSDK;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseApiService } from "./BaseApiService";
|
|
2
2
|
import type { OptimisticModelResult } from "../typings";
|
|
3
|
-
import { ComponentAttachment, ComponentTypeAttachment, Created, IssueAttachment, MaybeObjectURL, AttachmentPayload, Stored, ProjectAttachment, DocumentAttachment,
|
|
3
|
+
import { ComponentAttachment, ComponentTypeAttachment, Created, IssueAttachment, MaybeObjectURL, AttachmentPayload, Stored, ProjectAttachment, DocumentAttachment, Document } from "../../typings";
|
|
4
4
|
/**
|
|
5
5
|
* Handles creation and caching of attachments
|
|
6
6
|
*/
|
|
@@ -29,7 +29,7 @@ export declare class AttachmentService extends BaseApiService {
|
|
|
29
29
|
attachFilesToIssue(filesToSubmit: File[], issueId: string): Promise<OptimisticModelResult<IssueAttachment>>[];
|
|
30
30
|
attachFilesToComponent(filesToSubmit: File[], componentId: string): Promise<OptimisticModelResult<ComponentAttachment>>[];
|
|
31
31
|
attachFilesToComponentType(filesToSubmit: File[], componentTypeId: string): Promise<OptimisticModelResult<ComponentTypeAttachment>>[];
|
|
32
|
-
attachFilesToDocument(filesToSubmit: File[], documentId:
|
|
32
|
+
attachFilesToDocument(filesToSubmit: File[], documentId: Document["offline_id"]): Promise<OptimisticModelResult<DocumentAttachment>>[];
|
|
33
33
|
replaceIssueAttachmentFile(attachmentId: string, newFile: MaybeObjectURL<File>): Promise<OptimisticModelResult<IssueAttachment>>;
|
|
34
34
|
replaceComponentAttachmentFile(attachmentId: string, newFile: MaybeObjectURL<File>): Promise<OptimisticModelResult<ComponentAttachment>>;
|
|
35
35
|
replaceComponentTypeAttachmentFile(attachmentId: string, newFile: MaybeObjectURL<File>): Promise<OptimisticModelResult<ComponentTypeAttachment>>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { BaseApiService } from "./BaseApiService";
|
|
2
|
-
import {
|
|
2
|
+
import { Document, DocumentPayload, MovePosition, Submitted } from "../../typings";
|
|
3
3
|
import { OptimisticModelResult } from "../typings";
|
|
4
4
|
export declare class DocumentService extends BaseApiService {
|
|
5
|
-
add(document:
|
|
6
|
-
update(document: Submitted<Partial<
|
|
7
|
-
move(documentId: string, targetDocumentId: string | null, position: MovePosition): Promise<
|
|
8
|
-
delete(documentId: string): Promise<
|
|
5
|
+
add(document: DocumentPayload): OptimisticModelResult<Document>;
|
|
6
|
+
update(document: Submitted<Partial<Document>>): OptimisticModelResult<Document>;
|
|
7
|
+
move(documentId: string, targetDocumentId: string | null, position: MovePosition): Promise<Document[]>;
|
|
8
|
+
delete(documentId: string): Promise<Document[]>;
|
|
9
9
|
refreshStore(): Promise<void>;
|
|
10
10
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseApiService } from "./BaseApiService";
|
|
2
|
+
import { Stored, Team, TeamPayload, User } from "../../typings";
|
|
3
|
+
import { OptimisticModelResult } from "../typings";
|
|
4
|
+
export declare class TeamService extends BaseApiService {
|
|
5
|
+
add(teamPayload: TeamPayload): OptimisticModelResult<Team>;
|
|
6
|
+
update(team: Stored<Team>): OptimisticModelResult<Team>;
|
|
7
|
+
delete(teamId: string): Promise<undefined>;
|
|
8
|
+
setMembers(teamId: string, members: User["id"][]): Promise<undefined>;
|
|
9
|
+
addMembers(teamId: string, members: User["id"][]): Promise<undefined>;
|
|
10
|
+
removeMembers(teamId: string, members: User["id"][]): Promise<undefined>;
|
|
11
|
+
refreshStore(): Promise<void>;
|
|
12
|
+
}
|
|
@@ -68,6 +68,7 @@ export declare const selectCategories: ((state: import("redux").EmptyObject & {
|
|
|
68
68
|
emailDomainsReducer: import('..').EmailDomainState;
|
|
69
69
|
licenseReducer: import('..').LicenseState;
|
|
70
70
|
documentsReducer: import('..').DocumentState;
|
|
71
|
+
teamReducer: import('..').TeamState;
|
|
71
72
|
} & {
|
|
72
73
|
offline: import("@redux-offline/redux-offline/lib/types").OfflineState;
|
|
73
74
|
}) => Category[]) & import("reselect").OutputSelectorFields<(args_0: Record<string, Category>, args_1: string | null) => Category[], {
|
|
@@ -80,5 +81,6 @@ export declare const selectCategory: (offline_id: string | null) => (state: Root
|
|
|
80
81
|
export declare const selectUsedColors: Selector<CSSColor[]>;
|
|
81
82
|
export declare const selectCategoryVisibility: (state: RootState) => CategoryVisibility;
|
|
82
83
|
export declare const selectHiddenCategoryCount: (state: RootState) => number;
|
|
84
|
+
export declare const selectIssueCountOfCategory: SelectorWithArgs<string | null, number>;
|
|
83
85
|
export declare const categoryReducer: Reducer<CategoryState>;
|
|
84
86
|
export {};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
/// <reference types="@redux-offline/redux-offline" />
|
|
2
2
|
import { Reducer } from "@reduxjs/toolkit";
|
|
3
|
-
import { DocumentAttachment, MovePosition,
|
|
3
|
+
import { DocumentAttachment, MovePosition, Document, RootState, Selector, SelectorWithArgs, Stored, Submitted } from "../../typings";
|
|
4
4
|
import { AppSelector } from "./componentTypeSlice";
|
|
5
5
|
export interface DocumentState {
|
|
6
|
-
documents: Record<string, Stored<
|
|
6
|
+
documents: Record<string, Stored<Document>>;
|
|
7
7
|
attachments: Record<string, Stored<DocumentAttachment>>;
|
|
8
8
|
}
|
|
9
9
|
export interface MoveDocumentPayload {
|
|
10
|
-
documentId:
|
|
11
|
-
targetDocumentId:
|
|
10
|
+
documentId: Document["offline_id"];
|
|
11
|
+
targetDocumentId: Document["offline_id"] | null;
|
|
12
12
|
position: MovePosition;
|
|
13
13
|
}
|
|
14
14
|
export declare const documentSlice: import("@reduxjs/toolkit").Slice<DocumentState, {
|
|
15
15
|
setDocuments: (state: import("immer/dist/internal.js").WritableDraft<DocumentState>, action: {
|
|
16
|
-
payload:
|
|
16
|
+
payload: Stored<Document>[];
|
|
17
17
|
}) => void;
|
|
18
18
|
addDocuments: (state: import("immer/dist/internal.js").WritableDraft<DocumentState>, action: {
|
|
19
|
-
payload:
|
|
19
|
+
payload: Stored<Document>[];
|
|
20
20
|
}) => void;
|
|
21
21
|
updateDocuments: (state: import("immer/dist/internal.js").WritableDraft<DocumentState>, action: {
|
|
22
|
-
payload: Submitted<Partial<
|
|
22
|
+
payload: Submitted<Partial<Stored<Document>>>[];
|
|
23
23
|
}) => void;
|
|
24
24
|
moveDocument: (state: import("immer/dist/internal.js").WritableDraft<DocumentState>, action: {
|
|
25
25
|
payload: MoveDocumentPayload;
|
|
@@ -52,10 +52,202 @@ export declare const documentSlice: import("@reduxjs/toolkit").Slice<DocumentSta
|
|
|
52
52
|
type: string;
|
|
53
53
|
}) => void;
|
|
54
54
|
}, "documents">;
|
|
55
|
-
export declare const setDocuments: import("@reduxjs/toolkit").ActionCreatorWithPayload<
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
export declare const setDocuments: import("@reduxjs/toolkit").ActionCreatorWithPayload<((import('../../typings/models/base').OfflineModel & {
|
|
56
|
+
title: string | null;
|
|
57
|
+
description: string | null;
|
|
58
|
+
content: string | null;
|
|
59
|
+
parent_document: string | null;
|
|
60
|
+
created_by: number;
|
|
61
|
+
} & {
|
|
62
|
+
project: number;
|
|
63
|
+
organization: null;
|
|
64
|
+
} & {
|
|
65
|
+
children_documents: string[];
|
|
66
|
+
} & {
|
|
67
|
+
offline_id: string;
|
|
68
|
+
} & Omit<import('../../typings/models/base').OfflineModel & {
|
|
69
|
+
title: string | null;
|
|
70
|
+
description: string | null;
|
|
71
|
+
content: string | null;
|
|
72
|
+
parent_document: string | null;
|
|
73
|
+
created_by: number;
|
|
74
|
+
} & {
|
|
75
|
+
project: number;
|
|
76
|
+
organization: null;
|
|
77
|
+
} & {
|
|
78
|
+
children_documents: string[];
|
|
79
|
+
}, "id" | "created_at" | "created_by">) | (import('../../typings/models/base').OfflineModel & {
|
|
80
|
+
title: string | null;
|
|
81
|
+
description: string | null;
|
|
82
|
+
content: string | null;
|
|
83
|
+
parent_document: string | null;
|
|
84
|
+
created_by: number;
|
|
85
|
+
} & {
|
|
86
|
+
organization: number;
|
|
87
|
+
project: null;
|
|
88
|
+
} & {
|
|
89
|
+
children_documents: string[];
|
|
90
|
+
} & {
|
|
91
|
+
offline_id: string;
|
|
92
|
+
} & Omit<import('../../typings/models/base').OfflineModel & {
|
|
93
|
+
title: string | null;
|
|
94
|
+
description: string | null;
|
|
95
|
+
content: string | null;
|
|
96
|
+
parent_document: string | null;
|
|
97
|
+
created_by: number;
|
|
98
|
+
} & {
|
|
99
|
+
organization: number;
|
|
100
|
+
project: null;
|
|
101
|
+
} & {
|
|
102
|
+
children_documents: string[];
|
|
103
|
+
}, "id" | "created_at" | "created_by">))[], "documents/setDocuments">, addDocuments: import("@reduxjs/toolkit").ActionCreatorWithPayload<((import('../../typings/models/base').OfflineModel & {
|
|
104
|
+
title: string | null;
|
|
105
|
+
description: string | null;
|
|
106
|
+
content: string | null;
|
|
107
|
+
parent_document: string | null;
|
|
108
|
+
created_by: number;
|
|
109
|
+
} & {
|
|
110
|
+
project: number;
|
|
111
|
+
organization: null;
|
|
112
|
+
} & {
|
|
113
|
+
children_documents: string[];
|
|
114
|
+
} & {
|
|
115
|
+
offline_id: string;
|
|
116
|
+
} & Omit<import('../../typings/models/base').OfflineModel & {
|
|
117
|
+
title: string | null;
|
|
118
|
+
description: string | null;
|
|
119
|
+
content: string | null;
|
|
120
|
+
parent_document: string | null;
|
|
121
|
+
created_by: number;
|
|
122
|
+
} & {
|
|
123
|
+
project: number;
|
|
124
|
+
organization: null;
|
|
125
|
+
} & {
|
|
126
|
+
children_documents: string[];
|
|
127
|
+
}, "id" | "created_at" | "created_by">) | (import('../../typings/models/base').OfflineModel & {
|
|
128
|
+
title: string | null;
|
|
129
|
+
description: string | null;
|
|
130
|
+
content: string | null;
|
|
131
|
+
parent_document: string | null;
|
|
132
|
+
created_by: number;
|
|
133
|
+
} & {
|
|
134
|
+
organization: number;
|
|
135
|
+
project: null;
|
|
136
|
+
} & {
|
|
137
|
+
children_documents: string[];
|
|
138
|
+
} & {
|
|
139
|
+
offline_id: string;
|
|
140
|
+
} & Omit<import('../../typings/models/base').OfflineModel & {
|
|
141
|
+
title: string | null;
|
|
142
|
+
description: string | null;
|
|
143
|
+
content: string | null;
|
|
144
|
+
parent_document: string | null;
|
|
145
|
+
created_by: number;
|
|
146
|
+
} & {
|
|
147
|
+
organization: number;
|
|
148
|
+
project: null;
|
|
149
|
+
} & {
|
|
150
|
+
children_documents: string[];
|
|
151
|
+
}, "id" | "created_at" | "created_by">))[], "documents/addDocuments">, updateDocuments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Submitted<Partial<(import('../../typings/models/base').OfflineModel & {
|
|
152
|
+
title: string | null;
|
|
153
|
+
description: string | null;
|
|
154
|
+
content: string | null;
|
|
155
|
+
parent_document: string | null;
|
|
156
|
+
created_by: number;
|
|
157
|
+
} & {
|
|
158
|
+
project: number;
|
|
159
|
+
organization: null;
|
|
160
|
+
} & {
|
|
161
|
+
children_documents: string[];
|
|
162
|
+
} & {
|
|
163
|
+
offline_id: string;
|
|
164
|
+
} & Omit<import('../../typings/models/base').OfflineModel & {
|
|
165
|
+
title: string | null;
|
|
166
|
+
description: string | null;
|
|
167
|
+
content: string | null;
|
|
168
|
+
parent_document: string | null;
|
|
169
|
+
created_by: number;
|
|
170
|
+
} & {
|
|
171
|
+
project: number;
|
|
172
|
+
organization: null;
|
|
173
|
+
} & {
|
|
174
|
+
children_documents: string[];
|
|
175
|
+
}, "id" | "created_at" | "created_by">) | (import('../../typings/models/base').OfflineModel & {
|
|
176
|
+
title: string | null;
|
|
177
|
+
description: string | null;
|
|
178
|
+
content: string | null;
|
|
179
|
+
parent_document: string | null;
|
|
180
|
+
created_by: number;
|
|
181
|
+
} & {
|
|
182
|
+
organization: number;
|
|
183
|
+
project: null;
|
|
184
|
+
} & {
|
|
185
|
+
children_documents: string[];
|
|
186
|
+
} & {
|
|
187
|
+
offline_id: string;
|
|
188
|
+
} & Omit<import('../../typings/models/base').OfflineModel & {
|
|
189
|
+
title: string | null;
|
|
190
|
+
description: string | null;
|
|
191
|
+
content: string | null;
|
|
192
|
+
parent_document: string | null;
|
|
193
|
+
created_by: number;
|
|
194
|
+
} & {
|
|
195
|
+
organization: number;
|
|
196
|
+
project: null;
|
|
197
|
+
} & {
|
|
198
|
+
children_documents: string[];
|
|
199
|
+
}, "id" | "created_at" | "created_by">)>>[], "documents/updateDocuments">, moveDocument: import("@reduxjs/toolkit").ActionCreatorWithPayload<MoveDocumentPayload, "documents/moveDocument">, removeDocuments: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "documents/removeDocuments">, setDocumentAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<import('../../typings/models/issues').Created<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">, removeDocumentAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "documents/removeDocumentAttachment">, removeDocumentAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "documents/removeDocumentAttachments">;
|
|
200
|
+
export declare const selectDocumentsMapping: AppSelector<Record<string, Stored<Document>>>;
|
|
201
|
+
export declare const selectDocuments: AppSelector<Stored<Document>[]>;
|
|
202
|
+
export declare const selectDocument: (args: string) => (state: RootState) => (import('../../typings/models/base').OfflineModel & {
|
|
203
|
+
title: string | null;
|
|
204
|
+
description: string | null;
|
|
205
|
+
content: string | null;
|
|
206
|
+
parent_document: string | null;
|
|
207
|
+
created_by: number;
|
|
208
|
+
} & {
|
|
209
|
+
project: number;
|
|
210
|
+
organization: null;
|
|
211
|
+
} & {
|
|
212
|
+
children_documents: string[];
|
|
213
|
+
} & {
|
|
214
|
+
offline_id: string;
|
|
215
|
+
} & Omit<import('../../typings/models/base').OfflineModel & {
|
|
216
|
+
title: string | null;
|
|
217
|
+
description: string | null;
|
|
218
|
+
content: string | null;
|
|
219
|
+
parent_document: string | null;
|
|
220
|
+
created_by: number;
|
|
221
|
+
} & {
|
|
222
|
+
project: number;
|
|
223
|
+
organization: null;
|
|
224
|
+
} & {
|
|
225
|
+
children_documents: string[];
|
|
226
|
+
}, "id" | "created_at" | "created_by">) | (import('../../typings/models/base').OfflineModel & {
|
|
227
|
+
title: string | null;
|
|
228
|
+
description: string | null;
|
|
229
|
+
content: string | null;
|
|
230
|
+
parent_document: string | null;
|
|
231
|
+
created_by: number;
|
|
232
|
+
} & {
|
|
233
|
+
organization: number;
|
|
234
|
+
project: null;
|
|
235
|
+
} & {
|
|
236
|
+
children_documents: string[];
|
|
237
|
+
} & {
|
|
238
|
+
offline_id: string;
|
|
239
|
+
} & Omit<import('../../typings/models/base').OfflineModel & {
|
|
240
|
+
title: string | null;
|
|
241
|
+
description: string | null;
|
|
242
|
+
content: string | null;
|
|
243
|
+
parent_document: string | null;
|
|
244
|
+
created_by: number;
|
|
245
|
+
} & {
|
|
246
|
+
organization: number;
|
|
247
|
+
project: null;
|
|
248
|
+
} & {
|
|
249
|
+
children_documents: string[];
|
|
250
|
+
}, "id" | "created_at" | "created_by">) | undefined;
|
|
59
251
|
export declare const selectAncestorIdsOfDocument: (args: string) => (state: RootState) => string[];
|
|
60
252
|
export declare const selectRootDocuments: ((state: import("redux").EmptyObject & {
|
|
61
253
|
versioning: import('../slices/versioningSlice').VersioningState;
|
|
@@ -84,9 +276,154 @@ export declare const selectRootDocuments: ((state: import("redux").EmptyObject &
|
|
|
84
276
|
emailDomainsReducer: import('..').EmailDomainState;
|
|
85
277
|
licenseReducer: import('..').LicenseState;
|
|
86
278
|
documentsReducer: DocumentState;
|
|
279
|
+
teamReducer: import('..').TeamState;
|
|
87
280
|
} & {
|
|
88
281
|
offline: import("@redux-offline/redux-offline/lib/types").OfflineState;
|
|
89
|
-
}) =>
|
|
282
|
+
}) => ((import('../../typings/models/base').OfflineModel & {
|
|
283
|
+
title: string | null;
|
|
284
|
+
description: string | null;
|
|
285
|
+
content: string | null;
|
|
286
|
+
parent_document: string | null;
|
|
287
|
+
created_by: number;
|
|
288
|
+
} & {
|
|
289
|
+
project: number;
|
|
290
|
+
organization: null;
|
|
291
|
+
} & {
|
|
292
|
+
children_documents: string[];
|
|
293
|
+
} & {
|
|
294
|
+
offline_id: string;
|
|
295
|
+
} & Omit<import('../../typings/models/base').OfflineModel & {
|
|
296
|
+
title: string | null;
|
|
297
|
+
description: string | null;
|
|
298
|
+
content: string | null;
|
|
299
|
+
parent_document: string | null;
|
|
300
|
+
created_by: number;
|
|
301
|
+
} & {
|
|
302
|
+
project: number;
|
|
303
|
+
organization: null;
|
|
304
|
+
} & {
|
|
305
|
+
children_documents: string[];
|
|
306
|
+
}, "id" | "created_at" | "created_by">) | (import('../../typings/models/base').OfflineModel & {
|
|
307
|
+
title: string | null;
|
|
308
|
+
description: string | null;
|
|
309
|
+
content: string | null;
|
|
310
|
+
parent_document: string | null;
|
|
311
|
+
created_by: number;
|
|
312
|
+
} & {
|
|
313
|
+
organization: number;
|
|
314
|
+
project: null;
|
|
315
|
+
} & {
|
|
316
|
+
children_documents: string[];
|
|
317
|
+
} & {
|
|
318
|
+
offline_id: string;
|
|
319
|
+
} & Omit<import('../../typings/models/base').OfflineModel & {
|
|
320
|
+
title: string | null;
|
|
321
|
+
description: string | null;
|
|
322
|
+
content: string | null;
|
|
323
|
+
parent_document: string | null;
|
|
324
|
+
created_by: number;
|
|
325
|
+
} & {
|
|
326
|
+
organization: number;
|
|
327
|
+
project: null;
|
|
328
|
+
} & {
|
|
329
|
+
children_documents: string[];
|
|
330
|
+
}, "id" | "created_at" | "created_by">))[]) & import("reselect").OutputSelectorFields<(args_0: ((import('../../typings/models/base').OfflineModel & {
|
|
331
|
+
title: string | null;
|
|
332
|
+
description: string | null;
|
|
333
|
+
content: string | null;
|
|
334
|
+
parent_document: string | null;
|
|
335
|
+
created_by: number;
|
|
336
|
+
} & {
|
|
337
|
+
project: number;
|
|
338
|
+
organization: null;
|
|
339
|
+
} & {
|
|
340
|
+
children_documents: string[];
|
|
341
|
+
} & {
|
|
342
|
+
offline_id: string;
|
|
343
|
+
} & Omit<import('../../typings/models/base').OfflineModel & {
|
|
344
|
+
title: string | null;
|
|
345
|
+
description: string | null;
|
|
346
|
+
content: string | null;
|
|
347
|
+
parent_document: string | null;
|
|
348
|
+
created_by: number;
|
|
349
|
+
} & {
|
|
350
|
+
project: number;
|
|
351
|
+
organization: null;
|
|
352
|
+
} & {
|
|
353
|
+
children_documents: string[];
|
|
354
|
+
}, "id" | "created_at" | "created_by">) | (import('../../typings/models/base').OfflineModel & {
|
|
355
|
+
title: string | null;
|
|
356
|
+
description: string | null;
|
|
357
|
+
content: string | null;
|
|
358
|
+
parent_document: string | null;
|
|
359
|
+
created_by: number;
|
|
360
|
+
} & {
|
|
361
|
+
organization: number;
|
|
362
|
+
project: null;
|
|
363
|
+
} & {
|
|
364
|
+
children_documents: string[];
|
|
365
|
+
} & {
|
|
366
|
+
offline_id: string;
|
|
367
|
+
} & Omit<import('../../typings/models/base').OfflineModel & {
|
|
368
|
+
title: string | null;
|
|
369
|
+
description: string | null;
|
|
370
|
+
content: string | null;
|
|
371
|
+
parent_document: string | null;
|
|
372
|
+
created_by: number;
|
|
373
|
+
} & {
|
|
374
|
+
organization: number;
|
|
375
|
+
project: null;
|
|
376
|
+
} & {
|
|
377
|
+
children_documents: string[];
|
|
378
|
+
}, "id" | "created_at" | "created_by">))[]) => ((import('../../typings/models/base').OfflineModel & {
|
|
379
|
+
title: string | null;
|
|
380
|
+
description: string | null;
|
|
381
|
+
content: string | null;
|
|
382
|
+
parent_document: string | null;
|
|
383
|
+
created_by: number;
|
|
384
|
+
} & {
|
|
385
|
+
project: number;
|
|
386
|
+
organization: null;
|
|
387
|
+
} & {
|
|
388
|
+
children_documents: string[];
|
|
389
|
+
} & {
|
|
390
|
+
offline_id: string;
|
|
391
|
+
} & Omit<import('../../typings/models/base').OfflineModel & {
|
|
392
|
+
title: string | null;
|
|
393
|
+
description: string | null;
|
|
394
|
+
content: string | null;
|
|
395
|
+
parent_document: string | null;
|
|
396
|
+
created_by: number;
|
|
397
|
+
} & {
|
|
398
|
+
project: number;
|
|
399
|
+
organization: null;
|
|
400
|
+
} & {
|
|
401
|
+
children_documents: string[];
|
|
402
|
+
}, "id" | "created_at" | "created_by">) | (import('../../typings/models/base').OfflineModel & {
|
|
403
|
+
title: string | null;
|
|
404
|
+
description: string | null;
|
|
405
|
+
content: string | null;
|
|
406
|
+
parent_document: string | null;
|
|
407
|
+
created_by: number;
|
|
408
|
+
} & {
|
|
409
|
+
organization: number;
|
|
410
|
+
project: null;
|
|
411
|
+
} & {
|
|
412
|
+
children_documents: string[];
|
|
413
|
+
} & {
|
|
414
|
+
offline_id: string;
|
|
415
|
+
} & Omit<import('../../typings/models/base').OfflineModel & {
|
|
416
|
+
title: string | null;
|
|
417
|
+
description: string | null;
|
|
418
|
+
content: string | null;
|
|
419
|
+
parent_document: string | null;
|
|
420
|
+
created_by: number;
|
|
421
|
+
} & {
|
|
422
|
+
organization: number;
|
|
423
|
+
project: null;
|
|
424
|
+
} & {
|
|
425
|
+
children_documents: string[];
|
|
426
|
+
}, "id" | "created_at" | "created_by">))[], {
|
|
90
427
|
clearCache: () => void;
|
|
91
428
|
}> & {
|
|
92
429
|
clearCache: () => void;
|
|
@@ -47,6 +47,7 @@ export declare const selectFormRevisions: ((state: import("redux").EmptyObject &
|
|
|
47
47
|
emailDomainsReducer: import("index.ts").EmailDomainState;
|
|
48
48
|
licenseReducer: import("index.ts").LicenseState;
|
|
49
49
|
documentsReducer: import("index.ts").DocumentState;
|
|
50
|
+
teamReducer: import("index.ts").TeamState;
|
|
50
51
|
} & {
|
|
51
52
|
offline: import("@redux-offline/redux-offline/lib/types").OfflineState;
|
|
52
53
|
}) => Stored<UserFormRevision<import("index.ts").ISerializedField>>[]) & import("reselect").OutputSelectorFields<(args_0: Record<string, Stored<UserFormRevision<import("index.ts").ISerializedField>>>) => Stored<UserFormRevision<import("index.ts").ISerializedField>>[], {
|
|
@@ -140,6 +140,7 @@ export declare const selectAllAttachments: ((state: import("redux").EmptyObject
|
|
|
140
140
|
emailDomainsReducer: import('..').EmailDomainState;
|
|
141
141
|
licenseReducer: import('..').LicenseState;
|
|
142
142
|
documentsReducer: import('..').DocumentState;
|
|
143
|
+
teamReducer: import('..').TeamState;
|
|
143
144
|
} & {
|
|
144
145
|
offline: import("@redux-offline/redux-offline/lib/types").OfflineState;
|
|
145
146
|
}) => Stored<IssueAttachment>[]) & import("reselect").OutputSelectorFields<(args_0: Record<string, Stored<IssueAttachment>>) => Stored<IssueAttachment>[], {
|
|
@@ -76,6 +76,7 @@ export declare const selectProjectFiles: ((state: import("redux").EmptyObject &
|
|
|
76
76
|
emailDomainsReducer: import('..').EmailDomainState;
|
|
77
77
|
licenseReducer: import('..').LicenseState;
|
|
78
78
|
documentsReducer: import('..').DocumentState;
|
|
79
|
+
teamReducer: import('..').TeamState;
|
|
79
80
|
} & {
|
|
80
81
|
offline: import("@redux-offline/redux-offline/lib/types").OfflineState;
|
|
81
82
|
}) => ProjectFile[]) & import("reselect").OutputSelectorFields<(args_0: Record<string, ProjectFile>, args_1: number | null) => ProjectFile[], {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PayloadAction, Reducer } from "@reduxjs/toolkit";
|
|
2
|
+
import { Team, Stored, Selector, SelectorWithArgs, Organization, User } from "../../typings";
|
|
3
|
+
export interface TeamState {
|
|
4
|
+
teams: Record<Team["offline_id"], Stored<Team>>;
|
|
5
|
+
}
|
|
6
|
+
export declare const teamSlice: import("@reduxjs/toolkit").Slice<TeamState, {
|
|
7
|
+
setTeam: (state: import("immer/dist/internal.js").WritableDraft<TeamState>, action: PayloadAction<Stored<Team>>) => void;
|
|
8
|
+
setTeams: (state: import("immer/dist/internal.js").WritableDraft<TeamState>, action: PayloadAction<Stored<Team>[]>) => void;
|
|
9
|
+
addTeam: (state: import("immer/dist/internal.js").WritableDraft<TeamState>, action: PayloadAction<Stored<Team>>) => void;
|
|
10
|
+
updateTeam: (state: import("immer/dist/internal.js").WritableDraft<TeamState>, action: PayloadAction<Stored<Team>>) => void;
|
|
11
|
+
deleteTeam: (state: import("immer/dist/internal.js").WritableDraft<TeamState>, action: PayloadAction<Team["offline_id"]>) => void;
|
|
12
|
+
}, "teams">;
|
|
13
|
+
export declare const setTeam: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<Team>, "teams/setTeam">, setTeams: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<Team>[], "teams/setTeams">, addTeam: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<Team>, "teams/addTeam">, updateTeam: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<Team>, "teams/updateTeam">, deleteTeam: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "teams/deleteTeam">;
|
|
14
|
+
export declare const selectTeamsMapping: Selector<TeamState["teams"]>;
|
|
15
|
+
export declare const selectTeams: Selector<Stored<Team>[]>;
|
|
16
|
+
export declare const selectTeam: SelectorWithArgs<string, Stored<Team>>;
|
|
17
|
+
export declare const selectTeamsOfOrganization: SelectorWithArgs<Organization["id"], Stored<Team>[]>;
|
|
18
|
+
export declare const selectTeamsOfUser: SelectorWithArgs<User["id"], Stored<Team>[]>;
|
|
19
|
+
export declare const teamReducer: Reducer<TeamState>;
|
|
@@ -54,6 +54,7 @@ export declare const selectWorkspaces: ((state: import("redux").EmptyObject & {
|
|
|
54
54
|
emailDomainsReducer: import('..').EmailDomainState;
|
|
55
55
|
licenseReducer: import('..').LicenseState;
|
|
56
56
|
documentsReducer: import('..').DocumentState;
|
|
57
|
+
teamReducer: import('..').TeamState;
|
|
57
58
|
} & {
|
|
58
59
|
offline: import("@redux-offline/redux-offline/lib/types").OfflineState;
|
|
59
60
|
}) => Workspace[]) & import("reselect").OutputSelectorFields<(args_0: Record<string, Workspace>) => Workspace[], {
|
package/dist/store/store.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { AnyAction, Reducer } from "redux";
|
|
|
3
3
|
import { Config, OfflineAction, OfflineMetadata, OfflineState } from "@redux-offline/redux-offline/lib/types";
|
|
4
4
|
import request from "superagent";
|
|
5
5
|
import { type OfflineMetaEffect, type OvermapSDK, RequestDetails } from "../sdk";
|
|
6
|
-
import { AuthState, CategoryState, ComponentStageCompletionState, ComponentStageState, ComponentState, ComponentTypeState, DocumentState, EmailDomainState, FileState, IssueState, LicenseState, MapState, OrganizationAccessState, OrganizationState, OutboxState, ProjectAccessState, ProjectFileState, ProjectState, RehydratedState, SettingState, FormState, FormRevisionState, FormSubmissionState, UserState, WorkspaceState } from "./slices";
|
|
6
|
+
import { AuthState, CategoryState, ComponentStageCompletionState, ComponentStageState, ComponentState, ComponentTypeState, DocumentState, EmailDomainState, FileState, IssueState, LicenseState, MapState, OrganizationAccessState, OrganizationState, OutboxState, ProjectAccessState, ProjectFileState, ProjectState, RehydratedState, SettingState, FormState, FormRevisionState, FormSubmissionState, UserState, WorkspaceState, TeamState } from "./slices";
|
|
7
7
|
import { VersioningState } from "./slices/versioningSlice";
|
|
8
8
|
import { RootState } from "../typings";
|
|
9
9
|
export declare const overmapReducers: {
|
|
@@ -33,6 +33,7 @@ export declare const overmapReducers: {
|
|
|
33
33
|
emailDomainsReducer: Reducer<EmailDomainState>;
|
|
34
34
|
licenseReducer: Reducer<LicenseState>;
|
|
35
35
|
documentsReducer: Reducer<DocumentState>;
|
|
36
|
+
teamReducer: Reducer<TeamState>;
|
|
36
37
|
};
|
|
37
38
|
export declare const overmapReducer: Reducer<import("redux").CombinedState<{
|
|
38
39
|
versioning: VersioningState;
|
|
@@ -61,6 +62,7 @@ export declare const overmapReducer: Reducer<import("redux").CombinedState<{
|
|
|
61
62
|
emailDomainsReducer: EmailDomainState;
|
|
62
63
|
licenseReducer: LicenseState;
|
|
63
64
|
documentsReducer: DocumentState;
|
|
65
|
+
teamReducer: TeamState;
|
|
64
66
|
}>, AnyAction>;
|
|
65
67
|
export declare const resetStore = "RESET";
|
|
66
68
|
export declare const rootReducer: Reducer<RootState>;
|
|
@@ -107,6 +109,7 @@ export declare const defaultStore: import("@reduxjs/toolkit/dist/configureStore"
|
|
|
107
109
|
emailDomainsReducer: EmailDomainState;
|
|
108
110
|
licenseReducer: LicenseState;
|
|
109
111
|
documentsReducer: DocumentState;
|
|
112
|
+
teamReducer: TeamState;
|
|
110
113
|
} & {
|
|
111
114
|
offline: OfflineState;
|
|
112
115
|
}, AnyAction, import("@reduxjs/toolkit").MiddlewareArray<[import("@reduxjs/toolkit").ThunkMiddleware<RootState, AnyAction>]>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OfflineModel } from "./base";
|
|
2
2
|
import { MaybeObjectURL, FileModel, FileWithNameModel } from "../files";
|
|
3
3
|
import { Project } from "./projects";
|
|
4
|
-
import {
|
|
4
|
+
import { Document } from "./documents";
|
|
5
5
|
export interface Attachment extends OfflineModel, FileWithNameModel {
|
|
6
6
|
description?: string;
|
|
7
7
|
file_type: string;
|
|
@@ -21,7 +21,7 @@ export interface ProjectAttachment extends Attachment {
|
|
|
21
21
|
project: Project["id"];
|
|
22
22
|
}
|
|
23
23
|
export interface DocumentAttachment extends Attachment {
|
|
24
|
-
document:
|
|
24
|
+
document: Document["offline_id"];
|
|
25
25
|
}
|
|
26
26
|
/** to get an AttachmentPayload for a specific type, pass in the given AttachmentType
|
|
27
27
|
* ex. AttachmentPayload<IssueAttachment> */
|
|
@@ -1,11 +1,25 @@
|
|
|
1
|
-
import { OfflineModel } from "./base";
|
|
1
|
+
import { OfflineModel, Payload } from "./base";
|
|
2
2
|
import { User } from "./users";
|
|
3
|
-
export
|
|
3
|
+
export type SubmittedDocument = OfflineModel & {
|
|
4
4
|
title: string | null;
|
|
5
5
|
description: string | null;
|
|
6
6
|
content: string | null;
|
|
7
|
+
parent_document: string | null;
|
|
7
8
|
created_by: User["id"];
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
} & ({
|
|
10
|
+
project: number;
|
|
11
|
+
organization: null;
|
|
12
|
+
} | {
|
|
13
|
+
organization: number;
|
|
14
|
+
project: null;
|
|
15
|
+
});
|
|
16
|
+
export type Document = SubmittedDocument & {
|
|
17
|
+
children_documents: string[];
|
|
18
|
+
};
|
|
19
|
+
export type CreatedDocument = Document & {
|
|
20
|
+
created_by: User["id"];
|
|
21
|
+
created_at: string;
|
|
22
|
+
updated_at: string;
|
|
23
|
+
};
|
|
24
|
+
export type DocumentPayload = Payload<Omit<SubmittedDocument, "project" | "organization" | "created_by">>;
|
|
11
25
|
export type MovePosition = "left" | "right" | "left-child" | "right-child";
|