@overmap-ai/core 1.0.65-asset-models-improvements.2 → 1.0.65-asset-models-improvements.3
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/enums/access.d.ts +8 -0
- package/dist/enums/attachments.d.ts +7 -0
- package/dist/enums/index.d.ts +3 -0
- package/dist/enums/issue.d.ts +9 -0
- package/dist/enums/licenses.d.ts +14 -0
- package/dist/overmap-core.js +183 -211
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +180 -208
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/base.d.ts +1 -1
- package/dist/sdk/globals.d.ts +2 -2
- package/dist/sdk/sdk.d.ts +3 -3
- package/dist/sdk/services/AgentService.d.ts +1 -1
- package/dist/sdk/services/AssetAttachmentService.d.ts +3 -2
- package/dist/sdk/services/AssetService.d.ts +2 -2
- package/dist/sdk/services/AssetStageCompletionService.d.ts +2 -2
- package/dist/sdk/services/AssetStageService.d.ts +1 -1
- package/dist/sdk/services/AssetTypeAttachmentService.d.ts +3 -2
- package/dist/sdk/services/AssetTypeService.d.ts +2 -2
- package/dist/sdk/services/BaseApiService.d.ts +1 -1
- package/dist/sdk/services/BaseAttachmentService.d.ts +3 -2
- package/dist/sdk/services/BaseAuthService.d.ts +1 -1
- package/dist/sdk/services/BaseService.d.ts +2 -2
- package/dist/sdk/services/BaseUploadService.d.ts +2 -2
- package/dist/sdk/services/CategoryService.d.ts +2 -2
- package/dist/sdk/services/DocumentAttachmentService.d.ts +3 -2
- package/dist/sdk/services/DocumentService.d.ts +2 -2
- package/dist/sdk/services/EmailDomainsService.d.ts +1 -1
- package/dist/sdk/services/EmailVerificationService.d.ts +1 -1
- package/dist/sdk/services/FileService.d.ts +1 -1
- package/dist/sdk/services/FormService.d.ts +1 -2
- package/dist/sdk/services/FormSubmissionService.d.ts +2 -3
- package/dist/sdk/services/GeoImageService.d.ts +2 -2
- package/dist/sdk/services/IssueAttachmentService.d.ts +3 -2
- package/dist/sdk/services/IssueCommentService.d.ts +2 -2
- package/dist/sdk/services/IssueService.d.ts +2 -2
- package/dist/sdk/services/IssueTypeService.d.ts +2 -2
- package/dist/sdk/services/IssueUpdateService.d.ts +1 -1
- package/dist/sdk/services/JWTAuthService.d.ts +2 -2
- package/dist/sdk/services/LicenseService.d.ts +1 -1
- package/dist/sdk/services/OrganizationAccessService.d.ts +1 -1
- package/dist/sdk/services/OrganizationService.d.ts +1 -1
- package/dist/sdk/services/ProjectAccessService.d.ts +1 -1
- package/dist/sdk/services/ProjectAttachmentService.d.ts +3 -2
- package/dist/sdk/services/ProjectFileService.d.ts +2 -3
- package/dist/sdk/services/ProjectService.d.ts +1 -2
- package/dist/sdk/services/TeamService.d.ts +2 -2
- package/dist/sdk/services/UserService.d.ts +2 -2
- package/dist/sdk/services/WorkspaceService.d.ts +2 -4
- package/dist/store/slices/assetStageSlice.d.ts +0 -1
- package/dist/typings/models/access.d.ts +2 -9
- package/dist/typings/models/agents.d.ts +1 -1
- package/dist/typings/models/assets.d.ts +2 -2
- package/dist/typings/models/attachments.d.ts +2 -9
- package/dist/typings/models/base.d.ts +2 -2
- package/dist/typings/models/categories.d.ts +2 -2
- package/dist/typings/models/documents.d.ts +1 -1
- package/dist/typings/models/emailDomain.d.ts +1 -1
- package/dist/typings/models/emailVerification.d.ts +2 -2
- package/dist/typings/models/forms.d.ts +2 -2
- package/dist/typings/models/geoImages.d.ts +3 -3
- package/dist/typings/models/issueTypes.d.ts +2 -2
- package/dist/typings/models/issues.d.ts +1 -10
- package/dist/typings/models/license.d.ts +2 -15
- package/dist/typings/models/organizations.d.ts +1 -1
- package/dist/typings/models/projects.d.ts +3 -3
- package/dist/typings/models/store.d.ts +1 -1
- package/dist/typings/models/teams.d.ts +3 -3
- package/dist/typings/models/users.d.ts +1 -1
- package/dist/typings/models/workspace.d.ts +1 -1
- package/dist/typings/store.d.ts +1 -1
- package/package.json +1 -1
package/dist/enums/index.d.ts
CHANGED
package/dist/enums/issue.d.ts
CHANGED
|
@@ -10,3 +10,12 @@ export declare enum IssueStatus {
|
|
|
10
10
|
SELECTED = 2,
|
|
11
11
|
DONE = 4
|
|
12
12
|
}
|
|
13
|
+
export declare enum IssueUpdateChange {
|
|
14
|
+
STATUS = "status",
|
|
15
|
+
PRIORITY = "priority",
|
|
16
|
+
CATEGORY = "category",
|
|
17
|
+
DESCRIPTION = "description",
|
|
18
|
+
TITLE = "title",
|
|
19
|
+
ASSIGNED_TO = "assigned_to",
|
|
20
|
+
DUE_DATE = "due_date"
|
|
21
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare enum PaddleCheckoutEvent {
|
|
2
|
+
COMPLETED = "checkout.completed",
|
|
3
|
+
CLOSED = "checkout.closed"
|
|
4
|
+
}
|
|
5
|
+
export declare enum LicenseLevel {
|
|
6
|
+
PRO = 0
|
|
7
|
+
}
|
|
8
|
+
export declare enum LicenseStatus {
|
|
9
|
+
ACTIVE = 0,
|
|
10
|
+
PAUSED = 2,
|
|
11
|
+
CANCELLED = 4,
|
|
12
|
+
INACTIVE = 6,
|
|
13
|
+
PAST_DUE = 8
|
|
14
|
+
}
|
package/dist/overmap-core.js
CHANGED
|
@@ -7,20 +7,20 @@ var __publicField = (obj, key, value) => {
|
|
|
7
7
|
var _a;
|
|
8
8
|
import { DepGraph } from "dependency-graph";
|
|
9
9
|
import { v4 } from "uuid";
|
|
10
|
+
import { saveAs } from "file-saver";
|
|
11
|
+
import React, { useRef, useEffect } from "react";
|
|
12
|
+
import ColorCls from "color";
|
|
13
|
+
import { gray, gold, brown, yellow, amber, orange, red, crimson, pink, plum, purple, violet, iris, indigo, blue, cyan, jade, grass, lime, mint, sky } from "@radix-ui/colors";
|
|
10
14
|
import { offline as offline$1 } from "@redux-offline/redux-offline";
|
|
11
15
|
import offlineConfig from "@redux-offline/redux-offline/lib/defaults";
|
|
12
16
|
import localforage from "localforage";
|
|
13
17
|
import createMigration from "redux-persist-migrate";
|
|
14
18
|
import { createSlice, createSelector, combineReducers, createNextState } from "@reduxjs/toolkit";
|
|
15
19
|
import request from "superagent";
|
|
16
|
-
import { saveAs } from "file-saver";
|
|
17
|
-
import React, { useRef, useEffect } from "react";
|
|
18
|
-
import ColorCls from "color";
|
|
19
|
-
import { gray, gold, brown, yellow, amber, orange, red, crimson, pink, plum, purple, violet, iris, indigo, blue, cyan, jade, grass, lime, mint, sky } from "@radix-ui/colors";
|
|
20
20
|
import { RESET_STATE } from "@redux-offline/redux-offline/lib/constants";
|
|
21
21
|
import jwtDecode from "jwt-decode";
|
|
22
|
-
import { unsafeShowToast } from "@overmap-ai/blocks";
|
|
23
22
|
import { openDB } from "idb";
|
|
23
|
+
import { unsafeShowToast } from "@overmap-ai/blocks";
|
|
24
24
|
var HttpMethod = /* @__PURE__ */ ((HttpMethod2) => {
|
|
25
25
|
HttpMethod2["GET"] = "GET";
|
|
26
26
|
HttpMethod2["POST"] = "POST";
|
|
@@ -29,6 +29,14 @@ var HttpMethod = /* @__PURE__ */ ((HttpMethod2) => {
|
|
|
29
29
|
HttpMethod2["DELETE"] = "DELETE";
|
|
30
30
|
return HttpMethod2;
|
|
31
31
|
})(HttpMethod || {});
|
|
32
|
+
var AttachmentModel = /* @__PURE__ */ ((AttachmentModel2) => {
|
|
33
|
+
AttachmentModel2["Issue"] = "issue";
|
|
34
|
+
AttachmentModel2["Asset"] = "asset";
|
|
35
|
+
AttachmentModel2["AssetType"] = "asset_type";
|
|
36
|
+
AttachmentModel2["Project"] = "project";
|
|
37
|
+
AttachmentModel2["Document"] = "document";
|
|
38
|
+
return AttachmentModel2;
|
|
39
|
+
})(AttachmentModel || {});
|
|
32
40
|
var IssuePriority = /* @__PURE__ */ ((IssuePriority2) => {
|
|
33
41
|
IssuePriority2[IssuePriority2["LOWEST"] = 0] = "LOWEST";
|
|
34
42
|
IssuePriority2[IssuePriority2["LOW"] = 2] = "LOW";
|
|
@@ -43,6 +51,43 @@ var IssueStatus = /* @__PURE__ */ ((IssueStatus2) => {
|
|
|
43
51
|
IssueStatus2[IssueStatus2["DONE"] = 4] = "DONE";
|
|
44
52
|
return IssueStatus2;
|
|
45
53
|
})(IssueStatus || {});
|
|
54
|
+
var IssueUpdateChange = /* @__PURE__ */ ((IssueUpdateChange2) => {
|
|
55
|
+
IssueUpdateChange2["STATUS"] = "status";
|
|
56
|
+
IssueUpdateChange2["PRIORITY"] = "priority";
|
|
57
|
+
IssueUpdateChange2["CATEGORY"] = "category";
|
|
58
|
+
IssueUpdateChange2["DESCRIPTION"] = "description";
|
|
59
|
+
IssueUpdateChange2["TITLE"] = "title";
|
|
60
|
+
IssueUpdateChange2["ASSIGNED_TO"] = "assigned_to";
|
|
61
|
+
IssueUpdateChange2["DUE_DATE"] = "due_date";
|
|
62
|
+
return IssueUpdateChange2;
|
|
63
|
+
})(IssueUpdateChange || {});
|
|
64
|
+
var ProjectAccessLevel = /* @__PURE__ */ ((ProjectAccessLevel2) => {
|
|
65
|
+
ProjectAccessLevel2[ProjectAccessLevel2["BASIC"] = 0] = "BASIC";
|
|
66
|
+
ProjectAccessLevel2[ProjectAccessLevel2["ADMIN"] = 2] = "ADMIN";
|
|
67
|
+
return ProjectAccessLevel2;
|
|
68
|
+
})(ProjectAccessLevel || {});
|
|
69
|
+
var OrganizationAccessLevel = /* @__PURE__ */ ((OrganizationAccessLevel2) => {
|
|
70
|
+
OrganizationAccessLevel2[OrganizationAccessLevel2["BASIC"] = 0] = "BASIC";
|
|
71
|
+
OrganizationAccessLevel2[OrganizationAccessLevel2["ADMIN"] = 2] = "ADMIN";
|
|
72
|
+
return OrganizationAccessLevel2;
|
|
73
|
+
})(OrganizationAccessLevel || {});
|
|
74
|
+
var PaddleCheckoutEvent = /* @__PURE__ */ ((PaddleCheckoutEvent2) => {
|
|
75
|
+
PaddleCheckoutEvent2["COMPLETED"] = "checkout.completed";
|
|
76
|
+
PaddleCheckoutEvent2["CLOSED"] = "checkout.closed";
|
|
77
|
+
return PaddleCheckoutEvent2;
|
|
78
|
+
})(PaddleCheckoutEvent || {});
|
|
79
|
+
var LicenseLevel = /* @__PURE__ */ ((LicenseLevel2) => {
|
|
80
|
+
LicenseLevel2[LicenseLevel2["PRO"] = 0] = "PRO";
|
|
81
|
+
return LicenseLevel2;
|
|
82
|
+
})(LicenseLevel || {});
|
|
83
|
+
var LicenseStatus = /* @__PURE__ */ ((LicenseStatus2) => {
|
|
84
|
+
LicenseStatus2[LicenseStatus2["ACTIVE"] = 0] = "ACTIVE";
|
|
85
|
+
LicenseStatus2[LicenseStatus2["PAUSED"] = 2] = "PAUSED";
|
|
86
|
+
LicenseStatus2[LicenseStatus2["CANCELLED"] = 4] = "CANCELLED";
|
|
87
|
+
LicenseStatus2[LicenseStatus2["INACTIVE"] = 6] = "INACTIVE";
|
|
88
|
+
LicenseStatus2[LicenseStatus2["PAST_DUE"] = 8] = "PAST_DUE";
|
|
89
|
+
return LicenseStatus2;
|
|
90
|
+
})(LicenseStatus || {});
|
|
46
91
|
class OutboxCoordinator {
|
|
47
92
|
constructor() {
|
|
48
93
|
__publicField(this, "graph");
|
|
@@ -285,130 +330,6 @@ class APIError extends Error {
|
|
|
285
330
|
this.options = options;
|
|
286
331
|
}
|
|
287
332
|
}
|
|
288
|
-
class DeferredPromise {
|
|
289
|
-
constructor() {
|
|
290
|
-
__publicField(this, _a, "Promise");
|
|
291
|
-
__publicField(this, "_promise");
|
|
292
|
-
__publicField(this, "_resolve");
|
|
293
|
-
__publicField(this, "_reject");
|
|
294
|
-
__publicField(this, "_state", "pending");
|
|
295
|
-
this._resolve = null;
|
|
296
|
-
this._reject = null;
|
|
297
|
-
this._promise = new Promise((resolve, reject) => {
|
|
298
|
-
this._resolve = resolve;
|
|
299
|
-
this._reject = reject;
|
|
300
|
-
});
|
|
301
|
-
}
|
|
302
|
-
get state() {
|
|
303
|
-
return this._state;
|
|
304
|
-
}
|
|
305
|
-
then(onFulfilled, onRejected) {
|
|
306
|
-
return this._promise.then(onFulfilled, onRejected);
|
|
307
|
-
}
|
|
308
|
-
catch(onRejected) {
|
|
309
|
-
return this._promise.catch(onRejected);
|
|
310
|
-
}
|
|
311
|
-
resolve(value) {
|
|
312
|
-
if (!this._resolve)
|
|
313
|
-
throw new Error("No resolve callback");
|
|
314
|
-
this._resolve(value);
|
|
315
|
-
this._state = "fulfilled";
|
|
316
|
-
}
|
|
317
|
-
reject(reason) {
|
|
318
|
-
if (!this._reject)
|
|
319
|
-
throw reason;
|
|
320
|
-
this._reject(reason);
|
|
321
|
-
this._state = "rejected";
|
|
322
|
-
}
|
|
323
|
-
finally(_onFinally) {
|
|
324
|
-
throw new Error("`finally` not implemented");
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
_a = Symbol.toStringTag;
|
|
328
|
-
var randomString = function randomString2() {
|
|
329
|
-
return Math.random().toString(36).substring(7).split("").join(".");
|
|
330
|
-
};
|
|
331
|
-
({
|
|
332
|
-
INIT: "@@redux/INIT" + randomString(),
|
|
333
|
-
REPLACE: "@@redux/REPLACE" + randomString(),
|
|
334
|
-
PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {
|
|
335
|
-
return "@@redux/PROBE_UNKNOWN_ACTION" + randomString();
|
|
336
|
-
}
|
|
337
|
-
});
|
|
338
|
-
function compose() {
|
|
339
|
-
for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
340
|
-
funcs[_key] = arguments[_key];
|
|
341
|
-
}
|
|
342
|
-
if (funcs.length === 0) {
|
|
343
|
-
return function(arg) {
|
|
344
|
-
return arg;
|
|
345
|
-
};
|
|
346
|
-
}
|
|
347
|
-
if (funcs.length === 1) {
|
|
348
|
-
return funcs[0];
|
|
349
|
-
}
|
|
350
|
-
return funcs.reduce(function(a, b) {
|
|
351
|
-
return function() {
|
|
352
|
-
return a(b.apply(void 0, arguments));
|
|
353
|
-
};
|
|
354
|
-
});
|
|
355
|
-
}
|
|
356
|
-
const VERSION_REDUCER_KEY$1 = "versioning";
|
|
357
|
-
const latestVersion = () => migrations.length - 1;
|
|
358
|
-
const initialVersioning = (state) => {
|
|
359
|
-
state[VERSION_REDUCER_KEY$1] = { version: latestVersion() };
|
|
360
|
-
return state;
|
|
361
|
-
};
|
|
362
|
-
const signOut = () => {
|
|
363
|
-
return initialVersioning({});
|
|
364
|
-
};
|
|
365
|
-
const createOutboxState = (state) => {
|
|
366
|
-
if (state.outboxReducer) {
|
|
367
|
-
state.outboxReducer.deletedRequests = [];
|
|
368
|
-
}
|
|
369
|
-
return state;
|
|
370
|
-
};
|
|
371
|
-
const wrapMigration = (migrator) => (state) => {
|
|
372
|
-
var _a2;
|
|
373
|
-
if (state === void 0) {
|
|
374
|
-
state = {};
|
|
375
|
-
}
|
|
376
|
-
if (((_a2 = state[VERSION_REDUCER_KEY$1]) == null ? void 0 : _a2.version) === latestVersion())
|
|
377
|
-
return state;
|
|
378
|
-
return migrator(state);
|
|
379
|
-
};
|
|
380
|
-
const migrations = [initialVersioning, signOut, signOut, createOutboxState];
|
|
381
|
-
const manifest = Object.fromEntries(migrations.map((migration2, i) => [i, wrapMigration(migration2)]));
|
|
382
|
-
const initialState$B = {
|
|
383
|
-
accessToken: "",
|
|
384
|
-
refreshToken: "",
|
|
385
|
-
isLoggedIn: false
|
|
386
|
-
};
|
|
387
|
-
const authSlice = createSlice({
|
|
388
|
-
name: "auth",
|
|
389
|
-
initialState: initialState$B,
|
|
390
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$B)),
|
|
391
|
-
reducers: {
|
|
392
|
-
setTokens: (state, action) => {
|
|
393
|
-
state.accessToken = action.payload.accessToken;
|
|
394
|
-
state.refreshToken = action.payload.refreshToken;
|
|
395
|
-
},
|
|
396
|
-
clearTokens: (state) => {
|
|
397
|
-
state.accessToken = "";
|
|
398
|
-
state.refreshToken = "";
|
|
399
|
-
},
|
|
400
|
-
setLoggedIn: (state, action) => {
|
|
401
|
-
if (!action.payload) {
|
|
402
|
-
authSlice.caseReducers.clearTokens(state);
|
|
403
|
-
}
|
|
404
|
-
state.isLoggedIn = action.payload;
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
});
|
|
408
|
-
const { setTokens, clearTokens, setLoggedIn } = authSlice.actions;
|
|
409
|
-
const selectAccessToken = (state) => state.authReducer.accessToken;
|
|
410
|
-
const selectIsLoggedIn = (state) => state.authReducer.isLoggedIn;
|
|
411
|
-
const authReducer = authSlice.reducer;
|
|
412
333
|
const coordinatesToLiteral = (coordinates) => {
|
|
413
334
|
return { lng: coordinates[0], lat: coordinates[1] };
|
|
414
335
|
};
|
|
@@ -783,6 +704,130 @@ const getLocalRelativeDateString = memoize((date, min, max) => {
|
|
|
783
704
|
return getLocalDateString(date);
|
|
784
705
|
return relative.format(days, "days");
|
|
785
706
|
});
|
|
707
|
+
class DeferredPromise {
|
|
708
|
+
constructor() {
|
|
709
|
+
__publicField(this, _a, "Promise");
|
|
710
|
+
__publicField(this, "_promise");
|
|
711
|
+
__publicField(this, "_resolve");
|
|
712
|
+
__publicField(this, "_reject");
|
|
713
|
+
__publicField(this, "_state", "pending");
|
|
714
|
+
this._resolve = null;
|
|
715
|
+
this._reject = null;
|
|
716
|
+
this._promise = new Promise((resolve, reject) => {
|
|
717
|
+
this._resolve = resolve;
|
|
718
|
+
this._reject = reject;
|
|
719
|
+
});
|
|
720
|
+
}
|
|
721
|
+
get state() {
|
|
722
|
+
return this._state;
|
|
723
|
+
}
|
|
724
|
+
then(onFulfilled, onRejected) {
|
|
725
|
+
return this._promise.then(onFulfilled, onRejected);
|
|
726
|
+
}
|
|
727
|
+
catch(onRejected) {
|
|
728
|
+
return this._promise.catch(onRejected);
|
|
729
|
+
}
|
|
730
|
+
resolve(value) {
|
|
731
|
+
if (!this._resolve)
|
|
732
|
+
throw new Error("No resolve callback");
|
|
733
|
+
this._resolve(value);
|
|
734
|
+
this._state = "fulfilled";
|
|
735
|
+
}
|
|
736
|
+
reject(reason) {
|
|
737
|
+
if (!this._reject)
|
|
738
|
+
throw reason;
|
|
739
|
+
this._reject(reason);
|
|
740
|
+
this._state = "rejected";
|
|
741
|
+
}
|
|
742
|
+
finally(_onFinally) {
|
|
743
|
+
throw new Error("`finally` not implemented");
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
_a = Symbol.toStringTag;
|
|
747
|
+
var randomString = function randomString2() {
|
|
748
|
+
return Math.random().toString(36).substring(7).split("").join(".");
|
|
749
|
+
};
|
|
750
|
+
({
|
|
751
|
+
INIT: "@@redux/INIT" + randomString(),
|
|
752
|
+
REPLACE: "@@redux/REPLACE" + randomString(),
|
|
753
|
+
PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {
|
|
754
|
+
return "@@redux/PROBE_UNKNOWN_ACTION" + randomString();
|
|
755
|
+
}
|
|
756
|
+
});
|
|
757
|
+
function compose() {
|
|
758
|
+
for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
759
|
+
funcs[_key] = arguments[_key];
|
|
760
|
+
}
|
|
761
|
+
if (funcs.length === 0) {
|
|
762
|
+
return function(arg) {
|
|
763
|
+
return arg;
|
|
764
|
+
};
|
|
765
|
+
}
|
|
766
|
+
if (funcs.length === 1) {
|
|
767
|
+
return funcs[0];
|
|
768
|
+
}
|
|
769
|
+
return funcs.reduce(function(a, b) {
|
|
770
|
+
return function() {
|
|
771
|
+
return a(b.apply(void 0, arguments));
|
|
772
|
+
};
|
|
773
|
+
});
|
|
774
|
+
}
|
|
775
|
+
const VERSION_REDUCER_KEY$1 = "versioning";
|
|
776
|
+
const latestVersion = () => migrations.length - 1;
|
|
777
|
+
const initialVersioning = (state) => {
|
|
778
|
+
state[VERSION_REDUCER_KEY$1] = { version: latestVersion() };
|
|
779
|
+
return state;
|
|
780
|
+
};
|
|
781
|
+
const signOut = () => {
|
|
782
|
+
return initialVersioning({});
|
|
783
|
+
};
|
|
784
|
+
const createOutboxState = (state) => {
|
|
785
|
+
if (state.outboxReducer) {
|
|
786
|
+
state.outboxReducer.deletedRequests = [];
|
|
787
|
+
}
|
|
788
|
+
return state;
|
|
789
|
+
};
|
|
790
|
+
const wrapMigration = (migrator) => (state) => {
|
|
791
|
+
var _a2;
|
|
792
|
+
if (state === void 0) {
|
|
793
|
+
state = {};
|
|
794
|
+
}
|
|
795
|
+
if (((_a2 = state[VERSION_REDUCER_KEY$1]) == null ? void 0 : _a2.version) === latestVersion())
|
|
796
|
+
return state;
|
|
797
|
+
return migrator(state);
|
|
798
|
+
};
|
|
799
|
+
const migrations = [initialVersioning, signOut, signOut, createOutboxState];
|
|
800
|
+
const manifest = Object.fromEntries(migrations.map((migration2, i) => [i, wrapMigration(migration2)]));
|
|
801
|
+
const initialState$B = {
|
|
802
|
+
accessToken: "",
|
|
803
|
+
refreshToken: "",
|
|
804
|
+
isLoggedIn: false
|
|
805
|
+
};
|
|
806
|
+
const authSlice = createSlice({
|
|
807
|
+
name: "auth",
|
|
808
|
+
initialState: initialState$B,
|
|
809
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$B)),
|
|
810
|
+
reducers: {
|
|
811
|
+
setTokens: (state, action) => {
|
|
812
|
+
state.accessToken = action.payload.accessToken;
|
|
813
|
+
state.refreshToken = action.payload.refreshToken;
|
|
814
|
+
},
|
|
815
|
+
clearTokens: (state) => {
|
|
816
|
+
state.accessToken = "";
|
|
817
|
+
state.refreshToken = "";
|
|
818
|
+
},
|
|
819
|
+
setLoggedIn: (state, action) => {
|
|
820
|
+
if (!action.payload) {
|
|
821
|
+
authSlice.caseReducers.clearTokens(state);
|
|
822
|
+
}
|
|
823
|
+
state.isLoggedIn = action.payload;
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
});
|
|
827
|
+
const { setTokens, clearTokens, setLoggedIn } = authSlice.actions;
|
|
828
|
+
const selectAccessToken = (state) => state.authReducer.accessToken;
|
|
829
|
+
const selectIsLoggedIn = (state) => state.authReducer.isLoggedIn;
|
|
830
|
+
const authReducer = authSlice.reducer;
|
|
786
831
|
function createModelAdapter(computeModelId) {
|
|
787
832
|
const addOne = (state, action) => {
|
|
788
833
|
const id = computeModelId(action.payload);
|
|
@@ -1120,24 +1165,6 @@ const selectAssetStageById = (id) => (state) => {
|
|
|
1120
1165
|
const selectAssetStages = createSelector([selectStageMapping], (stageMapping) => {
|
|
1121
1166
|
return Object.values(stageMapping);
|
|
1122
1167
|
});
|
|
1123
|
-
const selectStagesFromAssetTypeIds = restructureCreateSelectorWithArgs(
|
|
1124
|
-
createSelector([selectAssetStages, (_state, assetTypeIds) => assetTypeIds], (stages, assetTypeIds) => {
|
|
1125
|
-
const assetTypeIdsSet = new Set(assetTypeIds);
|
|
1126
|
-
const ret = {};
|
|
1127
|
-
for (const stage of stages) {
|
|
1128
|
-
if (assetTypeIdsSet.has(stage.asset_type)) {
|
|
1129
|
-
if (!ret[stage.asset_type]) {
|
|
1130
|
-
ret[stage.asset_type] = [];
|
|
1131
|
-
}
|
|
1132
|
-
ret[stage.asset_type].push(stage);
|
|
1133
|
-
}
|
|
1134
|
-
}
|
|
1135
|
-
for (const key in ret) {
|
|
1136
|
-
ret[key] = ret[key].sort((a, b) => a.priority - b.priority);
|
|
1137
|
-
}
|
|
1138
|
-
return ret;
|
|
1139
|
-
})
|
|
1140
|
-
);
|
|
1141
1168
|
const selectAssetTypeStagesMapping = restructureCreateSelectorWithArgs(
|
|
1142
1169
|
createSelector([selectStageMapping, (_state, assetTypeId) => assetTypeId], (stagesMapping, assetTypeId) => {
|
|
1143
1170
|
const assetTypeStagesMapping = {};
|
|
@@ -1601,60 +1628,6 @@ const selectUploadUrl = (sha1) => (state) => {
|
|
|
1601
1628
|
return url;
|
|
1602
1629
|
};
|
|
1603
1630
|
const fileReducer = fileSlice.reducer;
|
|
1604
|
-
var ProjectAccessLevel = /* @__PURE__ */ ((ProjectAccessLevel2) => {
|
|
1605
|
-
ProjectAccessLevel2[ProjectAccessLevel2["BASIC"] = 0] = "BASIC";
|
|
1606
|
-
ProjectAccessLevel2[ProjectAccessLevel2["ADMIN"] = 2] = "ADMIN";
|
|
1607
|
-
return ProjectAccessLevel2;
|
|
1608
|
-
})(ProjectAccessLevel || {});
|
|
1609
|
-
var OrganizationAccessLevel = /* @__PURE__ */ ((OrganizationAccessLevel2) => {
|
|
1610
|
-
OrganizationAccessLevel2[OrganizationAccessLevel2["BASIC"] = 0] = "BASIC";
|
|
1611
|
-
OrganizationAccessLevel2[OrganizationAccessLevel2["ADMIN"] = 2] = "ADMIN";
|
|
1612
|
-
return OrganizationAccessLevel2;
|
|
1613
|
-
})(OrganizationAccessLevel || {});
|
|
1614
|
-
var AttachmentModel = /* @__PURE__ */ ((AttachmentModel2) => {
|
|
1615
|
-
AttachmentModel2["Issue"] = "issue";
|
|
1616
|
-
AttachmentModel2["Asset"] = "asset";
|
|
1617
|
-
AttachmentModel2["AssetType"] = "asset_type";
|
|
1618
|
-
AttachmentModel2["Project"] = "project";
|
|
1619
|
-
AttachmentModel2["Document"] = "document";
|
|
1620
|
-
return AttachmentModel2;
|
|
1621
|
-
})(AttachmentModel || {});
|
|
1622
|
-
var IssueUpdateChange = /* @__PURE__ */ ((IssueUpdateChange2) => {
|
|
1623
|
-
IssueUpdateChange2["STATUS"] = "status";
|
|
1624
|
-
IssueUpdateChange2["PRIORITY"] = "priority";
|
|
1625
|
-
IssueUpdateChange2["CATEGORY"] = "category";
|
|
1626
|
-
IssueUpdateChange2["DESCRIPTION"] = "description";
|
|
1627
|
-
IssueUpdateChange2["TITLE"] = "title";
|
|
1628
|
-
IssueUpdateChange2["ASSIGNED_TO"] = "assigned_to";
|
|
1629
|
-
IssueUpdateChange2["DUE_DATE"] = "due_date";
|
|
1630
|
-
return IssueUpdateChange2;
|
|
1631
|
-
})(IssueUpdateChange || {});
|
|
1632
|
-
var VerificationCodeType = /* @__PURE__ */ ((VerificationCodeType2) => {
|
|
1633
|
-
VerificationCodeType2[VerificationCodeType2["USER_REGISTRATION"] = 0] = "USER_REGISTRATION";
|
|
1634
|
-
VerificationCodeType2[VerificationCodeType2["APPLICATION_INVITE"] = 2] = "APPLICATION_INVITE";
|
|
1635
|
-
VerificationCodeType2[VerificationCodeType2["PROJECT_INVITE"] = 4] = "PROJECT_INVITE";
|
|
1636
|
-
VerificationCodeType2[VerificationCodeType2["ORGANIZATION_INVITE"] = 6] = "ORGANIZATION_INVITE";
|
|
1637
|
-
VerificationCodeType2[VerificationCodeType2["ADD_EMAIL_DOMAIN"] = 8] = "ADD_EMAIL_DOMAIN";
|
|
1638
|
-
VerificationCodeType2[VerificationCodeType2["RESET_PASSWORD"] = 10] = "RESET_PASSWORD";
|
|
1639
|
-
return VerificationCodeType2;
|
|
1640
|
-
})(VerificationCodeType || {});
|
|
1641
|
-
var PaddleCheckoutEvent = /* @__PURE__ */ ((PaddleCheckoutEvent2) => {
|
|
1642
|
-
PaddleCheckoutEvent2["COMPLETED"] = "checkout.completed";
|
|
1643
|
-
PaddleCheckoutEvent2["CLOSED"] = "checkout.closed";
|
|
1644
|
-
return PaddleCheckoutEvent2;
|
|
1645
|
-
})(PaddleCheckoutEvent || {});
|
|
1646
|
-
var LicenseLevel = /* @__PURE__ */ ((LicenseLevel2) => {
|
|
1647
|
-
LicenseLevel2[LicenseLevel2["PRO"] = 0] = "PRO";
|
|
1648
|
-
return LicenseLevel2;
|
|
1649
|
-
})(LicenseLevel || {});
|
|
1650
|
-
var LicenseStatus = /* @__PURE__ */ ((LicenseStatus2) => {
|
|
1651
|
-
LicenseStatus2[LicenseStatus2["ACTIVE"] = 0] = "ACTIVE";
|
|
1652
|
-
LicenseStatus2[LicenseStatus2["PAUSED"] = 2] = "PAUSED";
|
|
1653
|
-
LicenseStatus2[LicenseStatus2["CANCELLED"] = 4] = "CANCELLED";
|
|
1654
|
-
LicenseStatus2[LicenseStatus2["INACTIVE"] = 6] = "INACTIVE";
|
|
1655
|
-
LicenseStatus2[LicenseStatus2["PAST_DUE"] = 8] = "PAST_DUE";
|
|
1656
|
-
return LicenseStatus2;
|
|
1657
|
-
})(LicenseStatus || {});
|
|
1658
1631
|
const initialState$p = {
|
|
1659
1632
|
users: {},
|
|
1660
1633
|
currentUser: {
|
|
@@ -5109,15 +5082,6 @@ class IssueService extends BaseApiService {
|
|
|
5109
5082
|
void promise.then((result) => {
|
|
5110
5083
|
this.dispatch(updateIssue(result));
|
|
5111
5084
|
}).catch((error) => {
|
|
5112
|
-
var _a2;
|
|
5113
|
-
console.error(error);
|
|
5114
|
-
if (error instanceof APIError) {
|
|
5115
|
-
(_a2 = unsafeShowToast) == null ? void 0 : _a2({
|
|
5116
|
-
title: "Could not create issue",
|
|
5117
|
-
description: error.message,
|
|
5118
|
-
accentColor: "red"
|
|
5119
|
-
});
|
|
5120
|
-
}
|
|
5121
5085
|
this.dispatch(deleteIssue(issuePayload.offline_id));
|
|
5122
5086
|
this.dispatch(addActiveProjectIssuesCount(-1));
|
|
5123
5087
|
throw error;
|
|
@@ -7673,6 +7637,15 @@ class IssueAssociationService extends BaseUploadService {
|
|
|
7673
7637
|
this.dispatch(initializeIssueAssociations(issueAssociations));
|
|
7674
7638
|
}
|
|
7675
7639
|
}
|
|
7640
|
+
var VerificationCodeType = /* @__PURE__ */ ((VerificationCodeType2) => {
|
|
7641
|
+
VerificationCodeType2[VerificationCodeType2["USER_REGISTRATION"] = 0] = "USER_REGISTRATION";
|
|
7642
|
+
VerificationCodeType2[VerificationCodeType2["APPLICATION_INVITE"] = 2] = "APPLICATION_INVITE";
|
|
7643
|
+
VerificationCodeType2[VerificationCodeType2["PROJECT_INVITE"] = 4] = "PROJECT_INVITE";
|
|
7644
|
+
VerificationCodeType2[VerificationCodeType2["ORGANIZATION_INVITE"] = 6] = "ORGANIZATION_INVITE";
|
|
7645
|
+
VerificationCodeType2[VerificationCodeType2["ADD_EMAIL_DOMAIN"] = 8] = "ADD_EMAIL_DOMAIN";
|
|
7646
|
+
VerificationCodeType2[VerificationCodeType2["RESET_PASSWORD"] = 10] = "RESET_PASSWORD";
|
|
7647
|
+
return VerificationCodeType2;
|
|
7648
|
+
})(VerificationCodeType || {});
|
|
7676
7649
|
export {
|
|
7677
7650
|
APIError,
|
|
7678
7651
|
AgentService,
|
|
@@ -8165,7 +8138,6 @@ export {
|
|
|
8165
8138
|
selectSortedProjectUsers,
|
|
8166
8139
|
selectStageFormIdsFromStageIds,
|
|
8167
8140
|
selectStageMapping,
|
|
8168
|
-
selectStagesFromAssetTypeIds,
|
|
8169
8141
|
selectStagesOfAssetType,
|
|
8170
8142
|
selectTeamById,
|
|
8171
8143
|
selectTeams,
|