@overmap-ai/core 1.0.53-add-agent-sdk.1 → 1.0.53-add-agent-conversations.1
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 +135 -88
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +135 -88
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/services/AgentService.d.ts +2 -22
- package/dist/store/slices/agentsSlice.d.ts +14 -0
- package/dist/store/slices/categorySlice.d.ts +1 -0
- package/dist/store/slices/documentSlice.d.ts +1 -0
- 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/workspaceSlice.d.ts +1 -0
- package/dist/store/store.d.ts +4 -1
- package/dist/typings/models/agents.d.ts +30 -3
- package/package.json +1 -1
|
@@ -668,15 +668,15 @@ var __publicField = (obj, key, value) => {
|
|
|
668
668
|
};
|
|
669
669
|
const migrations = [initialVersioning, signOut, signOut, createOutboxState];
|
|
670
670
|
const manifest = Object.fromEntries(migrations.map((migration2, i) => [i, wrapMigration(migration2)]));
|
|
671
|
-
const initialState$
|
|
671
|
+
const initialState$s = {
|
|
672
672
|
accessToken: "",
|
|
673
673
|
refreshToken: "",
|
|
674
674
|
isLoggedIn: false
|
|
675
675
|
};
|
|
676
676
|
const authSlice = toolkit.createSlice({
|
|
677
677
|
name: "auth",
|
|
678
|
-
initialState: initialState$
|
|
679
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
678
|
+
initialState: initialState$s,
|
|
679
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$s)),
|
|
680
680
|
reducers: {
|
|
681
681
|
setTokens: (state, action) => {
|
|
682
682
|
state.accessToken = action.payload.accessToken;
|
|
@@ -1420,7 +1420,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1420
1420
|
return getLocalDateString(date);
|
|
1421
1421
|
return relative.format(days, "days");
|
|
1422
1422
|
});
|
|
1423
|
-
const initialState$
|
|
1423
|
+
const initialState$r = {
|
|
1424
1424
|
categories: {},
|
|
1425
1425
|
usedCategoryColors: [],
|
|
1426
1426
|
categoryVisibility: {
|
|
@@ -1430,8 +1430,8 @@ var __publicField = (obj, key, value) => {
|
|
|
1430
1430
|
};
|
|
1431
1431
|
const categorySlice = toolkit.createSlice({
|
|
1432
1432
|
name: "categories",
|
|
1433
|
-
initialState: initialState$
|
|
1434
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1433
|
+
initialState: initialState$r,
|
|
1434
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$r)),
|
|
1435
1435
|
reducers: {
|
|
1436
1436
|
setCategories: (state, action) => {
|
|
1437
1437
|
if (!Array.isArray(action.payload))
|
|
@@ -1603,14 +1603,14 @@ var __publicField = (obj, key, value) => {
|
|
|
1603
1603
|
delete state.attachments[attachmentId];
|
|
1604
1604
|
}
|
|
1605
1605
|
}
|
|
1606
|
-
const initialState$
|
|
1606
|
+
const initialState$q = {
|
|
1607
1607
|
components: {},
|
|
1608
1608
|
attachments: {}
|
|
1609
1609
|
};
|
|
1610
1610
|
const componentSlice = toolkit.createSlice({
|
|
1611
1611
|
name: "components",
|
|
1612
|
-
initialState: initialState$
|
|
1613
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1612
|
+
initialState: initialState$q,
|
|
1613
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$q)),
|
|
1614
1614
|
reducers: {
|
|
1615
1615
|
addComponent: (state, action) => {
|
|
1616
1616
|
state.components[action.payload.offline_id] = action.payload;
|
|
@@ -1766,13 +1766,13 @@ var __publicField = (obj, key, value) => {
|
|
|
1766
1766
|
removeAllComponentsOfType
|
|
1767
1767
|
} = componentSlice.actions;
|
|
1768
1768
|
const componentReducer = componentSlice.reducer;
|
|
1769
|
-
const initialState$
|
|
1769
|
+
const initialState$p = {
|
|
1770
1770
|
completionsByComponentId: {}
|
|
1771
1771
|
};
|
|
1772
1772
|
const componentStageCompletionSlice = toolkit.createSlice({
|
|
1773
1773
|
name: "componentStageCompletions",
|
|
1774
|
-
initialState: initialState$
|
|
1775
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1774
|
+
initialState: initialState$p,
|
|
1775
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$p)),
|
|
1776
1776
|
reducers: {
|
|
1777
1777
|
addStageCompletion: (state, action) => {
|
|
1778
1778
|
let stageToCompletionDateMapping = state.completionsByComponentId[action.payload.component];
|
|
@@ -1823,13 +1823,13 @@ var __publicField = (obj, key, value) => {
|
|
|
1823
1823
|
return Object.keys(state.componentStageCompletionReducer.completionsByComponentId[component.offline_id] ?? {});
|
|
1824
1824
|
};
|
|
1825
1825
|
const componentStageCompletionReducer = componentStageCompletionSlice.reducer;
|
|
1826
|
-
const initialState$
|
|
1826
|
+
const initialState$o = {
|
|
1827
1827
|
stages: {}
|
|
1828
1828
|
};
|
|
1829
1829
|
const componentStageSlice = toolkit.createSlice({
|
|
1830
1830
|
name: "componentStages",
|
|
1831
|
-
initialState: initialState$
|
|
1832
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1831
|
+
initialState: initialState$o,
|
|
1832
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$o)),
|
|
1833
1833
|
reducers: {
|
|
1834
1834
|
addStages: (state, action) => {
|
|
1835
1835
|
Object.assign(state.stages, toOfflineIdRecord(action.payload));
|
|
@@ -1939,15 +1939,15 @@ var __publicField = (obj, key, value) => {
|
|
|
1939
1939
|
);
|
|
1940
1940
|
const { addStages, updateStages, removeStages, linkStageToForm, unlinkStageToForm } = componentStageSlice.actions;
|
|
1941
1941
|
const componentStageReducer = componentStageSlice.reducer;
|
|
1942
|
-
const initialState$
|
|
1942
|
+
const initialState$n = {
|
|
1943
1943
|
componentTypes: {},
|
|
1944
1944
|
hiddenComponentTypeIds: {},
|
|
1945
1945
|
attachments: {}
|
|
1946
1946
|
};
|
|
1947
1947
|
const componentTypeSlice = toolkit.createSlice({
|
|
1948
1948
|
name: "componentTypes",
|
|
1949
|
-
initialState: initialState$
|
|
1950
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1949
|
+
initialState: initialState$n,
|
|
1950
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$n)),
|
|
1951
1951
|
reducers: {
|
|
1952
1952
|
addComponentType: (state, action) => {
|
|
1953
1953
|
state.componentTypes[action.payload.offline_id] = action.payload;
|
|
@@ -2058,13 +2058,13 @@ var __publicField = (obj, key, value) => {
|
|
|
2058
2058
|
deleteComponentType
|
|
2059
2059
|
} = componentTypeSlice.actions;
|
|
2060
2060
|
const componentTypeReducer = componentTypeSlice.reducer;
|
|
2061
|
-
const initialState$
|
|
2061
|
+
const initialState$m = {
|
|
2062
2062
|
workspaces: {},
|
|
2063
2063
|
activeWorkspaceId: null
|
|
2064
2064
|
};
|
|
2065
2065
|
const workspaceSlice = toolkit.createSlice({
|
|
2066
2066
|
name: "workspace",
|
|
2067
|
-
initialState: initialState$
|
|
2067
|
+
initialState: initialState$m,
|
|
2068
2068
|
// The `reducers` field lets us define reducers and generate associated actions
|
|
2069
2069
|
reducers: {
|
|
2070
2070
|
setWorkspaces: (state, action) => {
|
|
@@ -2121,7 +2121,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2121
2121
|
);
|
|
2122
2122
|
const workspaceReducer = workspaceSlice.reducer;
|
|
2123
2123
|
const maxRecentIssues = 10;
|
|
2124
|
-
const initialState$
|
|
2124
|
+
const initialState$l = {
|
|
2125
2125
|
issues: {},
|
|
2126
2126
|
attachments: {},
|
|
2127
2127
|
comments: {},
|
|
@@ -2133,9 +2133,9 @@ var __publicField = (obj, key, value) => {
|
|
|
2133
2133
|
};
|
|
2134
2134
|
const issueSlice = toolkit.createSlice({
|
|
2135
2135
|
name: "issues",
|
|
2136
|
-
initialState: initialState$
|
|
2136
|
+
initialState: initialState$l,
|
|
2137
2137
|
extraReducers: (builder) => builder.addCase("RESET", (state) => {
|
|
2138
|
-
Object.assign(state, initialState$
|
|
2138
|
+
Object.assign(state, initialState$l);
|
|
2139
2139
|
}),
|
|
2140
2140
|
reducers: {
|
|
2141
2141
|
setIssues: (state, action) => {
|
|
@@ -2560,14 +2560,14 @@ var __publicField = (obj, key, value) => {
|
|
|
2560
2560
|
}
|
|
2561
2561
|
);
|
|
2562
2562
|
const issueReducer = issueSlice.reducer;
|
|
2563
|
-
const initialState$
|
|
2563
|
+
const initialState$k = {
|
|
2564
2564
|
issueTypes: {}
|
|
2565
2565
|
};
|
|
2566
2566
|
const issueTypeSlice = toolkit.createSlice({
|
|
2567
2567
|
name: "issueTypes",
|
|
2568
|
-
initialState: initialState$
|
|
2568
|
+
initialState: initialState$k,
|
|
2569
2569
|
extraReducers: (builder) => builder.addCase("RESET", (state) => {
|
|
2570
|
-
Object.assign(state, initialState$
|
|
2570
|
+
Object.assign(state, initialState$k);
|
|
2571
2571
|
}),
|
|
2572
2572
|
reducers: {
|
|
2573
2573
|
setIssueTypes: (state, action) => {
|
|
@@ -2634,15 +2634,15 @@ var __publicField = (obj, key, value) => {
|
|
|
2634
2634
|
return ((_a2 = selectIssuesOfIssueType(issueTypeId)(state)) == null ? void 0 : _a2.length) ?? 0;
|
|
2635
2635
|
};
|
|
2636
2636
|
const issueTypeReducer = issueTypeSlice.reducer;
|
|
2637
|
-
const initialState$
|
|
2637
|
+
const initialState$j = {
|
|
2638
2638
|
s3Urls: {}
|
|
2639
2639
|
};
|
|
2640
2640
|
const msPerHour = 1e3 * 60 * 60;
|
|
2641
2641
|
const msPerWeek = msPerHour * 24 * 7;
|
|
2642
2642
|
const fileSlice = toolkit.createSlice({
|
|
2643
2643
|
name: "file",
|
|
2644
|
-
initialState: initialState$
|
|
2645
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2644
|
+
initialState: initialState$j,
|
|
2645
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$j)),
|
|
2646
2646
|
reducers: {
|
|
2647
2647
|
setUploadUrl: (state, action) => {
|
|
2648
2648
|
const { url, fields, sha1 } = action.payload;
|
|
@@ -2669,7 +2669,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2669
2669
|
return url;
|
|
2670
2670
|
};
|
|
2671
2671
|
const fileReducer = fileSlice.reducer;
|
|
2672
|
-
const initialState$
|
|
2672
|
+
const initialState$i = {
|
|
2673
2673
|
// TODO: Change first MapStyle.SATELLITE to MaptStyle.None when project creation map is fixed
|
|
2674
2674
|
mapStyle: MapStyle.SATELLITE,
|
|
2675
2675
|
showTooltips: false,
|
|
@@ -2677,8 +2677,8 @@ var __publicField = (obj, key, value) => {
|
|
|
2677
2677
|
};
|
|
2678
2678
|
const mapSlice = toolkit.createSlice({
|
|
2679
2679
|
name: "map",
|
|
2680
|
-
initialState: initialState$
|
|
2681
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2680
|
+
initialState: initialState$i,
|
|
2681
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$i)),
|
|
2682
2682
|
reducers: {
|
|
2683
2683
|
setMapStyle: (state, action) => {
|
|
2684
2684
|
state.mapStyle = action.payload;
|
|
@@ -2747,7 +2747,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2747
2747
|
LicenseStatus2[LicenseStatus2["PAST_DUE"] = 8] = "PAST_DUE";
|
|
2748
2748
|
return LicenseStatus2;
|
|
2749
2749
|
})(LicenseStatus || {});
|
|
2750
|
-
const initialState$
|
|
2750
|
+
const initialState$h = {
|
|
2751
2751
|
users: {},
|
|
2752
2752
|
currentUser: {
|
|
2753
2753
|
id: 0,
|
|
@@ -2758,8 +2758,8 @@ var __publicField = (obj, key, value) => {
|
|
|
2758
2758
|
};
|
|
2759
2759
|
const userSlice = toolkit.createSlice({
|
|
2760
2760
|
name: "users",
|
|
2761
|
-
initialState: initialState$
|
|
2762
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2761
|
+
initialState: initialState$h,
|
|
2762
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$h)),
|
|
2763
2763
|
reducers: {
|
|
2764
2764
|
setUsers: (state, action) => {
|
|
2765
2765
|
const usersMapping = {};
|
|
@@ -2821,13 +2821,13 @@ var __publicField = (obj, key, value) => {
|
|
|
2821
2821
|
const selectUsersAsMapping = (state) => state.userReducer.users;
|
|
2822
2822
|
const selectFavouriteProjects = (state) => state.userReducer.currentUser.profile.favourite_project_ids;
|
|
2823
2823
|
const userReducer = userSlice.reducer;
|
|
2824
|
-
const initialState$
|
|
2824
|
+
const initialState$g = {
|
|
2825
2825
|
organizationAccesses: {}
|
|
2826
2826
|
};
|
|
2827
2827
|
const organizationAccessSlice = toolkit.createSlice({
|
|
2828
2828
|
name: "organizationAccess",
|
|
2829
|
-
initialState: initialState$
|
|
2830
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2829
|
+
initialState: initialState$g,
|
|
2830
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$g)),
|
|
2831
2831
|
reducers: {
|
|
2832
2832
|
setOrganizationAccesses: (state, action) => {
|
|
2833
2833
|
if (!Array.isArray(action.payload))
|
|
@@ -2890,13 +2890,13 @@ var __publicField = (obj, key, value) => {
|
|
|
2890
2890
|
return organizationAccesses;
|
|
2891
2891
|
};
|
|
2892
2892
|
const organizationAccessReducer = organizationAccessSlice.reducer;
|
|
2893
|
-
const initialState$
|
|
2893
|
+
const initialState$f = {
|
|
2894
2894
|
licenses: {}
|
|
2895
2895
|
};
|
|
2896
2896
|
const licenseSlice = toolkit.createSlice({
|
|
2897
2897
|
name: "license",
|
|
2898
|
-
initialState: initialState$
|
|
2899
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2898
|
+
initialState: initialState$f,
|
|
2899
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$f)),
|
|
2900
2900
|
reducers: {
|
|
2901
2901
|
setLicenses: (state, action) => {
|
|
2902
2902
|
if (!Array.isArray(action.payload))
|
|
@@ -2941,13 +2941,13 @@ var __publicField = (obj, key, value) => {
|
|
|
2941
2941
|
(licenses) => Object.values(licenses).filter((license) => license.project).reduce((accum, license) => ({ ...accum, [license.project]: license }), {})
|
|
2942
2942
|
);
|
|
2943
2943
|
const licenseReducer = licenseSlice.reducer;
|
|
2944
|
-
const initialState$
|
|
2944
|
+
const initialState$e = {
|
|
2945
2945
|
projectAccesses: {}
|
|
2946
2946
|
};
|
|
2947
2947
|
const projectAccessSlice = toolkit.createSlice({
|
|
2948
2948
|
name: "projectAccess",
|
|
2949
|
-
initialState: initialState$
|
|
2950
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2949
|
+
initialState: initialState$e,
|
|
2950
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$e)),
|
|
2951
2951
|
reducers: {
|
|
2952
2952
|
setProjectAccesses: (state, action) => {
|
|
2953
2953
|
if (!Array.isArray(action.payload))
|
|
@@ -3015,7 +3015,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3015
3015
|
return projectAccesses;
|
|
3016
3016
|
};
|
|
3017
3017
|
const projectAccessReducer = projectAccessSlice.reducer;
|
|
3018
|
-
const initialState$
|
|
3018
|
+
const initialState$d = {
|
|
3019
3019
|
projects: {},
|
|
3020
3020
|
activeProjectId: null,
|
|
3021
3021
|
recentProjectIds: [],
|
|
@@ -3025,7 +3025,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3025
3025
|
};
|
|
3026
3026
|
const projectSlice = toolkit.createSlice({
|
|
3027
3027
|
name: "projects",
|
|
3028
|
-
initialState: initialState$
|
|
3028
|
+
initialState: initialState$d,
|
|
3029
3029
|
reducers: {
|
|
3030
3030
|
setProjects: (state, action) => {
|
|
3031
3031
|
const projectsMap = {};
|
|
@@ -3212,14 +3212,14 @@ var __publicField = (obj, key, value) => {
|
|
|
3212
3212
|
}
|
|
3213
3213
|
)
|
|
3214
3214
|
);
|
|
3215
|
-
const initialState$
|
|
3215
|
+
const initialState$c = {
|
|
3216
3216
|
organizations: {},
|
|
3217
3217
|
activeOrganizationId: null
|
|
3218
3218
|
};
|
|
3219
3219
|
const organizationSlice = toolkit.createSlice({
|
|
3220
3220
|
name: "organizations",
|
|
3221
|
-
initialState: initialState$
|
|
3222
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3221
|
+
initialState: initialState$c,
|
|
3222
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$c)),
|
|
3223
3223
|
reducers: {
|
|
3224
3224
|
setOrganizations: (state, action) => {
|
|
3225
3225
|
for (const org of action.payload) {
|
|
@@ -3338,14 +3338,14 @@ var __publicField = (obj, key, value) => {
|
|
|
3338
3338
|
}
|
|
3339
3339
|
};
|
|
3340
3340
|
};
|
|
3341
|
-
const initialState$
|
|
3341
|
+
const initialState$b = {
|
|
3342
3342
|
deletedRequests: [],
|
|
3343
3343
|
latestRetryTime: 0
|
|
3344
3344
|
};
|
|
3345
3345
|
const outboxSlice = toolkit.createSlice({
|
|
3346
3346
|
name: "outbox",
|
|
3347
|
-
initialState: initialState$
|
|
3348
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3347
|
+
initialState: initialState$b,
|
|
3348
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$b)),
|
|
3349
3349
|
reducers: {
|
|
3350
3350
|
// enqueueActions is a reducer that does nothing but enqueue API request to the Redux Offline outbox
|
|
3351
3351
|
// Whenever an issue is being created, a reducer addIssue() is responsible for adding it to the offline store
|
|
@@ -3377,7 +3377,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3377
3377
|
const selectLatestRetryTime = (state) => state.outboxReducer.latestRetryTime;
|
|
3378
3378
|
const { enqueueRequest, markForDeletion, markAsDeleted, _setLatestRetryTime } = outboxSlice.actions;
|
|
3379
3379
|
const outboxReducer = outboxSlice.reducer;
|
|
3380
|
-
const initialState$
|
|
3380
|
+
const initialState$a = {
|
|
3381
3381
|
projectFiles: {},
|
|
3382
3382
|
activeProjectFileId: null,
|
|
3383
3383
|
isImportingProjectFile: false,
|
|
@@ -3385,8 +3385,8 @@ var __publicField = (obj, key, value) => {
|
|
|
3385
3385
|
};
|
|
3386
3386
|
const projectFileSlice = toolkit.createSlice({
|
|
3387
3387
|
name: "projectFiles",
|
|
3388
|
-
initialState: initialState$
|
|
3389
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3388
|
+
initialState: initialState$a,
|
|
3389
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$a)),
|
|
3390
3390
|
reducers: {
|
|
3391
3391
|
addOrReplaceProjectFiles: (state, action) => {
|
|
3392
3392
|
for (let fileObj of action.payload) {
|
|
@@ -3487,12 +3487,12 @@ var __publicField = (obj, key, value) => {
|
|
|
3487
3487
|
const selectActiveProjectFileId = (state) => state.projectFileReducer.activeProjectFileId;
|
|
3488
3488
|
const selectIsImportingProjectFile = (state) => state.projectFileReducer.isImportingProjectFile;
|
|
3489
3489
|
const projectFileReducer = projectFileSlice.reducer;
|
|
3490
|
-
const initialState$
|
|
3490
|
+
const initialState$9 = {
|
|
3491
3491
|
isRehydrated: false
|
|
3492
3492
|
};
|
|
3493
3493
|
const rehydratedSlice = toolkit.createSlice({
|
|
3494
3494
|
name: "rehydrated",
|
|
3495
|
-
initialState: initialState$
|
|
3495
|
+
initialState: initialState$9,
|
|
3496
3496
|
// The `reducers` field lets us define reducers and generate associated actions
|
|
3497
3497
|
reducers: {
|
|
3498
3498
|
setRehydrated: (state, action) => {
|
|
@@ -3502,7 +3502,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3502
3502
|
});
|
|
3503
3503
|
const selectRehydrated = (state) => state.rehydratedReducer.isRehydrated;
|
|
3504
3504
|
const rehydratedReducer = rehydratedSlice.reducer;
|
|
3505
|
-
const initialState$
|
|
3505
|
+
const initialState$8 = {
|
|
3506
3506
|
useIssueTemplate: false,
|
|
3507
3507
|
placementMode: false,
|
|
3508
3508
|
enableClustering: false,
|
|
@@ -3519,8 +3519,8 @@ var __publicField = (obj, key, value) => {
|
|
|
3519
3519
|
};
|
|
3520
3520
|
const settingSlice = toolkit.createSlice({
|
|
3521
3521
|
name: "settings",
|
|
3522
|
-
initialState: initialState$
|
|
3523
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3522
|
+
initialState: initialState$8,
|
|
3523
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$8)),
|
|
3524
3524
|
reducers: {
|
|
3525
3525
|
setEnableDuplicateIssues: (state, action) => {
|
|
3526
3526
|
state.useIssueTemplate = action.payload;
|
|
@@ -3579,14 +3579,14 @@ var __publicField = (obj, key, value) => {
|
|
|
3579
3579
|
return revisionA < revisionB ? -1 : 1;
|
|
3580
3580
|
}
|
|
3581
3581
|
};
|
|
3582
|
-
const initialState$
|
|
3582
|
+
const initialState$7 = {
|
|
3583
3583
|
formRevisions: {},
|
|
3584
3584
|
attachments: {}
|
|
3585
3585
|
};
|
|
3586
3586
|
const formRevisionsSlice = toolkit.createSlice({
|
|
3587
3587
|
name: "formRevisions",
|
|
3588
|
-
initialState: initialState$
|
|
3589
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3588
|
+
initialState: initialState$7,
|
|
3589
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$7)),
|
|
3590
3590
|
reducers: {
|
|
3591
3591
|
// revision related actions
|
|
3592
3592
|
setFormRevision: (state, action) => {
|
|
@@ -3766,13 +3766,13 @@ var __publicField = (obj, key, value) => {
|
|
|
3766
3766
|
)
|
|
3767
3767
|
);
|
|
3768
3768
|
const formRevisionReducer = formRevisionsSlice.reducer;
|
|
3769
|
-
const initialState$
|
|
3769
|
+
const initialState$6 = {
|
|
3770
3770
|
forms: {}
|
|
3771
3771
|
};
|
|
3772
3772
|
const formSlice = toolkit.createSlice({
|
|
3773
3773
|
name: "forms",
|
|
3774
|
-
initialState: initialState$
|
|
3775
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3774
|
+
initialState: initialState$6,
|
|
3775
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$6)),
|
|
3776
3776
|
reducers: {
|
|
3777
3777
|
setForms: (state, action) => {
|
|
3778
3778
|
state.forms = {};
|
|
@@ -3877,14 +3877,14 @@ var __publicField = (obj, key, value) => {
|
|
|
3877
3877
|
return Object.values(userForms).filter((form) => !form.component_type).length;
|
|
3878
3878
|
});
|
|
3879
3879
|
const formReducer = formSlice.reducer;
|
|
3880
|
-
const initialState$
|
|
3880
|
+
const initialState$5 = {
|
|
3881
3881
|
formSubmissions: {},
|
|
3882
3882
|
attachments: {}
|
|
3883
3883
|
};
|
|
3884
3884
|
const formSubmissionSlice = toolkit.createSlice({
|
|
3885
3885
|
name: "formSubmissions",
|
|
3886
|
-
initialState: initialState$
|
|
3887
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3886
|
+
initialState: initialState$5,
|
|
3887
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$5)),
|
|
3888
3888
|
reducers: {
|
|
3889
3889
|
setFormSubmission: (state, action) => {
|
|
3890
3890
|
state.formSubmissions[action.payload.offline_id] = action.payload;
|
|
@@ -4121,12 +4121,12 @@ var __publicField = (obj, key, value) => {
|
|
|
4121
4121
|
)
|
|
4122
4122
|
);
|
|
4123
4123
|
const formSubmissionReducer = formSubmissionSlice.reducer;
|
|
4124
|
-
const initialState$
|
|
4124
|
+
const initialState$4 = {
|
|
4125
4125
|
emailDomains: {}
|
|
4126
4126
|
};
|
|
4127
4127
|
const emailDomainsSlice = toolkit.createSlice({
|
|
4128
4128
|
name: "emailDomains",
|
|
4129
|
-
initialState: initialState$
|
|
4129
|
+
initialState: initialState$4,
|
|
4130
4130
|
reducers: {
|
|
4131
4131
|
setEmailDomains: (state, action) => {
|
|
4132
4132
|
const emailDomains = {};
|
|
@@ -4153,15 +4153,15 @@ var __publicField = (obj, key, value) => {
|
|
|
4153
4153
|
(ed1, ed2) => ed1.domain.localeCompare(ed2.domain)
|
|
4154
4154
|
);
|
|
4155
4155
|
const emailDomainsReducer = emailDomainsSlice.reducer;
|
|
4156
|
-
const initialState$
|
|
4156
|
+
const initialState$3 = {
|
|
4157
4157
|
documents: {},
|
|
4158
4158
|
attachments: {}
|
|
4159
4159
|
};
|
|
4160
4160
|
const documentSlice = toolkit.createSlice({
|
|
4161
4161
|
name: "documents",
|
|
4162
|
-
initialState: initialState$
|
|
4162
|
+
initialState: initialState$3,
|
|
4163
4163
|
extraReducers: (builder) => builder.addCase("RESET", (state) => {
|
|
4164
|
-
Object.assign(state, initialState$
|
|
4164
|
+
Object.assign(state, initialState$3);
|
|
4165
4165
|
}),
|
|
4166
4166
|
reducers: {
|
|
4167
4167
|
setDocuments: (state, action) => {
|
|
@@ -4386,13 +4386,13 @@ var __publicField = (obj, key, value) => {
|
|
|
4386
4386
|
)
|
|
4387
4387
|
);
|
|
4388
4388
|
const documentsReducer = documentSlice.reducer;
|
|
4389
|
-
const initialState$
|
|
4389
|
+
const initialState$2 = {
|
|
4390
4390
|
teams: {}
|
|
4391
4391
|
};
|
|
4392
4392
|
const teamSlice = toolkit.createSlice({
|
|
4393
4393
|
name: "teams",
|
|
4394
|
-
initialState: initialState$
|
|
4395
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
4394
|
+
initialState: initialState$2,
|
|
4395
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$2)),
|
|
4396
4396
|
reducers: {
|
|
4397
4397
|
setTeam: (state, action) => {
|
|
4398
4398
|
state.teams[action.payload.offline_id] = action.payload;
|
|
@@ -4442,6 +4442,43 @@ var __publicField = (obj, key, value) => {
|
|
|
4442
4442
|
})
|
|
4443
4443
|
);
|
|
4444
4444
|
const teamReducer = teamSlice.reducer;
|
|
4445
|
+
const initialState$1 = {
|
|
4446
|
+
conversations: {}
|
|
4447
|
+
};
|
|
4448
|
+
const agentsSlice = toolkit.createSlice({
|
|
4449
|
+
name: "agents",
|
|
4450
|
+
initialState: initialState$1,
|
|
4451
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$1)),
|
|
4452
|
+
reducers: {
|
|
4453
|
+
setConversations: (state, action) => {
|
|
4454
|
+
state.conversations = {};
|
|
4455
|
+
for (const conversation of action.payload) {
|
|
4456
|
+
state.conversations[conversation.offline_id] = conversation;
|
|
4457
|
+
}
|
|
4458
|
+
},
|
|
4459
|
+
addConversation: (state, action) => {
|
|
4460
|
+
if (action.payload.offline_id in state.conversations) {
|
|
4461
|
+
throw new Error("Conversation already exists in history");
|
|
4462
|
+
}
|
|
4463
|
+
state.conversations[action.payload.offline_id] = action.payload;
|
|
4464
|
+
},
|
|
4465
|
+
setConversation: (state, action) => {
|
|
4466
|
+
if (!(action.payload.offline_id in state.conversations)) {
|
|
4467
|
+
throw new Error("Conversation does not exist in history");
|
|
4468
|
+
}
|
|
4469
|
+
state.conversations[action.payload.offline_id] = action.payload;
|
|
4470
|
+
}
|
|
4471
|
+
}
|
|
4472
|
+
});
|
|
4473
|
+
const { setConversations, addConversation, setConversation } = agentsSlice.actions;
|
|
4474
|
+
const selectConversationMapping = (state) => state.agentsReducer.conversations;
|
|
4475
|
+
const selectConversation = restructureCreateSelectorWithArgs(
|
|
4476
|
+
toolkit.createSelector(
|
|
4477
|
+
[selectConversationMapping, (_state, conversationId) => conversationId],
|
|
4478
|
+
(conversationMapping, conversationId) => conversationMapping[conversationId]
|
|
4479
|
+
)
|
|
4480
|
+
);
|
|
4481
|
+
const agentsReducer = agentsSlice.reducer;
|
|
4445
4482
|
const initialState = {
|
|
4446
4483
|
version: 0
|
|
4447
4484
|
};
|
|
@@ -4492,7 +4529,8 @@ var __publicField = (obj, key, value) => {
|
|
|
4492
4529
|
emailDomainsReducer,
|
|
4493
4530
|
licenseReducer,
|
|
4494
4531
|
documentsReducer,
|
|
4495
|
-
teamReducer
|
|
4532
|
+
teamReducer,
|
|
4533
|
+
agentsReducer
|
|
4496
4534
|
};
|
|
4497
4535
|
const overmapReducer = toolkit.combineReducers(overmapReducers);
|
|
4498
4536
|
const resetStore = "RESET";
|
|
@@ -8479,16 +8517,6 @@ var __publicField = (obj, key, value) => {
|
|
|
8479
8517
|
queryParams: conversationId ? { conversation_id: conversationId } : {}
|
|
8480
8518
|
});
|
|
8481
8519
|
}
|
|
8482
|
-
async fetchAll() {
|
|
8483
|
-
const activeProjectId = this.client.store.getState().projectReducer.activeProjectId;
|
|
8484
|
-
return this.enqueueRequest({
|
|
8485
|
-
description: "Fetch agent conversations",
|
|
8486
|
-
method: HttpMethod.GET,
|
|
8487
|
-
url: `/projects/${activeProjectId}/agents-conversations/`,
|
|
8488
|
-
blockers: ["fetch-agent-conversations"],
|
|
8489
|
-
blocks: ["fetch-agent-conversations"]
|
|
8490
|
-
});
|
|
8491
|
-
}
|
|
8492
8520
|
async rate(responseId, rating) {
|
|
8493
8521
|
return this.enqueueRequest({
|
|
8494
8522
|
description: "Rate agent response",
|
|
@@ -8499,6 +8527,18 @@ var __publicField = (obj, key, value) => {
|
|
|
8499
8527
|
blocks: ["rate"]
|
|
8500
8528
|
});
|
|
8501
8529
|
}
|
|
8530
|
+
async refreshStore() {
|
|
8531
|
+
const { store } = this.client;
|
|
8532
|
+
const activeProject = store.getState().projectReducer.activeProjectId;
|
|
8533
|
+
const result = await this.enqueueRequest({
|
|
8534
|
+
description: "Get agent conversation history",
|
|
8535
|
+
method: HttpMethod.GET,
|
|
8536
|
+
url: `/projects/${activeProject}/agents-conversations/`,
|
|
8537
|
+
blockers: ["agent-conversations"],
|
|
8538
|
+
blocks: ["agent-conversations"]
|
|
8539
|
+
});
|
|
8540
|
+
store.dispatch(setConversations(result));
|
|
8541
|
+
}
|
|
8502
8542
|
}
|
|
8503
8543
|
class TeamService extends BaseApiService {
|
|
8504
8544
|
add(teamPayload) {
|
|
@@ -16610,6 +16650,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16610
16650
|
exports2.addComponentTypeAttachment = addComponentTypeAttachment;
|
|
16611
16651
|
exports2.addComponentTypeAttachments = addComponentTypeAttachments;
|
|
16612
16652
|
exports2.addComponentsInBatches = addComponentsInBatches;
|
|
16653
|
+
exports2.addConversation = addConversation;
|
|
16613
16654
|
exports2.addDocumentAttachment = addDocumentAttachment;
|
|
16614
16655
|
exports2.addDocumentAttachments = addDocumentAttachments;
|
|
16615
16656
|
exports2.addDocuments = addDocuments;
|
|
@@ -16650,6 +16691,8 @@ var __publicField = (obj, key, value) => {
|
|
|
16650
16691
|
exports2.addToRecentIssues = addToRecentIssues;
|
|
16651
16692
|
exports2.addUsers = addUsers;
|
|
16652
16693
|
exports2.addWorkspace = addWorkspace;
|
|
16694
|
+
exports2.agentsReducer = agentsReducer;
|
|
16695
|
+
exports2.agentsSlice = agentsSlice;
|
|
16653
16696
|
exports2.areArraysEqual = areArraysEqual;
|
|
16654
16697
|
exports2.authReducer = authReducer;
|
|
16655
16698
|
exports2.authSlice = authSlice;
|
|
@@ -16890,6 +16933,8 @@ var __publicField = (obj, key, value) => {
|
|
|
16890
16933
|
exports2.selectComponentsByType = selectComponentsByType;
|
|
16891
16934
|
exports2.selectComponentsFromComponentType = selectComponentsFromComponentType;
|
|
16892
16935
|
exports2.selectComponentsMapping = selectComponentsMapping;
|
|
16936
|
+
exports2.selectConversation = selectConversation;
|
|
16937
|
+
exports2.selectConversationMapping = selectConversationMapping;
|
|
16893
16938
|
exports2.selectCreateProjectType = selectCreateProjectType;
|
|
16894
16939
|
exports2.selectCurrentUser = selectCurrentUser;
|
|
16895
16940
|
exports2.selectDeletedRequests = selectDeletedRequests;
|
|
@@ -17030,6 +17075,8 @@ var __publicField = (obj, key, value) => {
|
|
|
17030
17075
|
exports2.setComponentTypeAttachments = setComponentTypeAttachments;
|
|
17031
17076
|
exports2.setComponentTypes = setComponentTypes;
|
|
17032
17077
|
exports2.setComponents = setComponents;
|
|
17078
|
+
exports2.setConversation = setConversation;
|
|
17079
|
+
exports2.setConversations = setConversations;
|
|
17033
17080
|
exports2.setCreateProjectType = setCreateProjectType;
|
|
17034
17081
|
exports2.setCurrentUser = setCurrentUser;
|
|
17035
17082
|
exports2.setDocumentAttachments = setDocumentAttachments;
|