@burdenoff/microfe-workspaces 2026.510.50 → 2026.511.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/generated/wspace-operations.d.ts +91 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -1
- package/dist/generated/wspace-operations.js +79 -51
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/hooks/useMemberMutations.d.ts.map +1 -1
- package/dist/hooks/useMemberMutations.js +141 -60
- package/dist/hooks/useMemberMutations.js.map +1 -1
- package/dist/hooks/useProjectMutations.d.ts.map +1 -1
- package/dist/hooks/useProjectMutations.js +84 -44
- package/dist/hooks/useProjectMutations.js.map +1 -1
- package/dist/hooks/useWorkspaceMutations.d.ts.map +1 -1
- package/dist/hooks/useWorkspaceMutations.js +64 -29
- package/dist/hooks/useWorkspaceMutations.js.map +1 -1
- package/dist/hooks/useWorkspacesEventEmitter.d.ts +5 -1
- package/dist/hooks/useWorkspacesEventEmitter.d.ts.map +1 -1
- package/dist/hooks/useWorkspacesEventEmitter.js +8 -7
- package/dist/hooks/useWorkspacesEventEmitter.js.map +1 -1
- package/dist/hooks/useWorkspacesPageView.d.ts +27 -0
- package/dist/hooks/useWorkspacesPageView.d.ts.map +1 -0
- package/dist/hooks/useWorkspacesPageView.js +29 -0
- package/dist/hooks/useWorkspacesPageView.js.map +1 -0
- package/dist/pages/ActivityListPage.d.ts.map +1 -1
- package/dist/pages/ActivityListPage.js +59 -56
- package/dist/pages/ActivityListPage.js.map +1 -1
- package/dist/pages/CreateWorkspacePage.d.ts.map +1 -1
- package/dist/pages/CreateWorkspacePage.js +104 -104
- package/dist/pages/CreateWorkspacePage.js.map +1 -1
- package/dist/pages/InviteAcceptancePage.d.ts.map +1 -1
- package/dist/pages/InviteAcceptancePage.js +197 -216
- package/dist/pages/InviteAcceptancePage.js.map +1 -1
- package/dist/pages/MembersListPage.d.ts.map +1 -1
- package/dist/pages/MembersListPage.js +142 -138
- package/dist/pages/MembersListPage.js.map +1 -1
- package/dist/pages/ProjectDetailPage.d.ts.map +1 -1
- package/dist/pages/ProjectDetailPage.js +181 -176
- package/dist/pages/ProjectDetailPage.js.map +1 -1
- package/dist/pages/ProjectsListPage.d.ts.map +1 -1
- package/dist/pages/ProjectsListPage.js +175 -171
- package/dist/pages/ProjectsListPage.js.map +1 -1
- package/dist/pages/WorkspaceDetailPage.d.ts.map +1 -1
- package/dist/pages/WorkspaceDetailPage.js +104 -101
- package/dist/pages/WorkspaceDetailPage.js.map +1 -1
- package/dist/pages/WorkspaceSettingsPage.d.ts.map +1 -1
- package/dist/pages/WorkspaceSettingsPage.js +182 -137
- package/dist/pages/WorkspaceSettingsPage.js.map +1 -1
- package/dist/pages/WorkspacesListPage.d.ts.map +1 -1
- package/dist/pages/WorkspacesListPage.js +77 -77
- package/dist/pages/WorkspacesListPage.js.map +1 -1
- package/dist/pages/dashboard/DashboardCustomizer.d.ts.map +1 -1
- package/dist/pages/dashboard/DashboardCustomizer.js +53 -55
- package/dist/pages/dashboard/DashboardCustomizer.js.map +1 -1
- package/dist/pages/dashboard/DashboardGrid.d.ts.map +1 -1
- package/dist/pages/dashboard/DashboardGrid.js +33 -36
- package/dist/pages/dashboard/DashboardGrid.js.map +1 -1
- package/dist/pages/dashboard/DashboardPage.d.ts.map +1 -1
- package/dist/pages/dashboard/DashboardPage.js +67 -65
- package/dist/pages/dashboard/DashboardPage.js.map +1 -1
- package/dist/pages/dashboard/WidgetWrapper.d.ts.map +1 -1
- package/dist/pages/dashboard/WidgetWrapper.js +3 -6
- package/dist/pages/dashboard/WidgetWrapper.js.map +1 -1
- package/dist/utils/i18n.d.ts +13 -0
- package/dist/utils/i18n.d.ts.map +1 -0
- package/dist/utils/i18n.js +12 -0
- package/dist/utils/i18n.js.map +1 -0
- package/dist/utils/telemetryError.d.ts +2 -0
- package/dist/utils/telemetryError.d.ts.map +1 -0
- package/dist/utils/telemetryError.js +28 -0
- package/dist/utils/telemetryError.js.map +1 -0
- package/package.json +9 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMemberMutations.d.ts","sourceRoot":"","sources":["../../src/hooks/useMemberMutations.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACnB,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"useMemberMutations.d.ts","sourceRoot":"","sources":["../../src/hooks/useMemberMutations.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACnB,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAIlB;;;GAGG;AACH,eAAO,MAAM,qBAAqB,mHAyCjC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,GAAI,sBAAsB,MAAM,uFAqCpE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,0BAA0B,GAAI,sBAAsB,MAAM,uFAqCtE,CAAC;AAEF;;;;;;GAMG;AAEH;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAAI,sBAAsB,MAAM,kHA2C/D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB;QAUtB,MAAM;WACH,qBAAqB;WAkCjC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,sGAyC/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,sGAuC/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,sGAuC/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,sBAAsB,MAAM,mGAwC/D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,0FAmC/B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,yHAyBpC,CAAC"}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { useWorkspacesContext as e } from "../providers/WorkspacesProvider.js";
|
|
2
2
|
import { AcceptInvitationDocument as t, AddWorkspaceMemberDocument as n, BulkCreateInvitationsDocument as r, CancelInvitationDocument as i, CreateInvitationDocument as a, DeleteInvitationDocument as o, RejectInvitationDocument as s, RemoveUserFromWorkspaceDocument as c, RemoveWorkspaceMemberDocument as l, ResendInvitationDocument as u, UpdateInvitationDocument as d } from "../generated/wspace-operations.js";
|
|
3
3
|
import { useWorkspacesEventEmitter as f } from "./useWorkspacesEventEmitter.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { safeTelemetryError as p } from "../utils/telemetryError.js";
|
|
5
|
+
import { useMutation as m, useQueryClient as h } from "@tanstack/react-query";
|
|
6
|
+
import { print as g } from "graphql";
|
|
7
|
+
import { graphqlFetch as _ } from "@burdenoff/fe-libs/shared/graphql";
|
|
7
8
|
//#region src/hooks/useMemberMutations.ts
|
|
8
|
-
var
|
|
9
|
-
let { authToken: t, workspaceId: r } = e(), i =
|
|
10
|
-
return
|
|
9
|
+
var v = () => {
|
|
10
|
+
let { authToken: t, workspaceId: r } = e(), i = h(), { emit: a } = f();
|
|
11
|
+
return m({
|
|
11
12
|
mutationFn: async (e) => {
|
|
12
|
-
let i = await
|
|
13
|
+
let i = await _({
|
|
13
14
|
gateway: "workspace",
|
|
14
15
|
authToken: t || void 0,
|
|
15
|
-
query:
|
|
16
|
+
query: g(n),
|
|
16
17
|
variables: { input: e },
|
|
17
18
|
workspaceId: r || void 0,
|
|
18
19
|
workspaceToken: !0
|
|
@@ -27,16 +28,24 @@ var _ = () => {
|
|
|
27
28
|
userId: e.userId,
|
|
28
29
|
source: "microfe-workspaces"
|
|
29
30
|
});
|
|
31
|
+
},
|
|
32
|
+
onError: (e, t) => {
|
|
33
|
+
a("workspace-member.add_failed", {
|
|
34
|
+
workspaceId: r || void 0,
|
|
35
|
+
userId: t?.userId,
|
|
36
|
+
source: "microfe-workspaces",
|
|
37
|
+
errorMessage: p(e)
|
|
38
|
+
});
|
|
30
39
|
}
|
|
31
40
|
});
|
|
32
|
-
},
|
|
33
|
-
let { authToken: n, workspaceId: r } = e(), i =
|
|
34
|
-
return
|
|
41
|
+
}, y = (t) => {
|
|
42
|
+
let { authToken: n, workspaceId: r } = e(), i = h(), { emit: a } = f(), o = t || r;
|
|
43
|
+
return m({
|
|
35
44
|
mutationFn: async (e) => {
|
|
36
|
-
let t = await
|
|
45
|
+
let t = await _({
|
|
37
46
|
gateway: "workspace",
|
|
38
47
|
authToken: n || void 0,
|
|
39
|
-
query:
|
|
48
|
+
query: g(l),
|
|
40
49
|
variables: { id: e },
|
|
41
50
|
workspaceId: o || void 0,
|
|
42
51
|
workspaceToken: !0
|
|
@@ -49,16 +58,24 @@ var _ = () => {
|
|
|
49
58
|
memberId: t,
|
|
50
59
|
source: "microfe-workspaces"
|
|
51
60
|
});
|
|
61
|
+
},
|
|
62
|
+
onError: (e, t) => {
|
|
63
|
+
a("workspace-member.remove_failed", {
|
|
64
|
+
memberId: t,
|
|
65
|
+
workspaceId: o || void 0,
|
|
66
|
+
source: "microfe-workspaces",
|
|
67
|
+
errorMessage: p(e)
|
|
68
|
+
});
|
|
52
69
|
}
|
|
53
70
|
});
|
|
54
|
-
},
|
|
55
|
-
let { authToken: n, workspaceId: r } = e(), i =
|
|
56
|
-
return
|
|
71
|
+
}, b = (t) => {
|
|
72
|
+
let { authToken: n, workspaceId: r } = e(), i = h(), { emit: a } = f(), o = t || r;
|
|
73
|
+
return m({
|
|
57
74
|
mutationFn: async (e) => {
|
|
58
|
-
let t = await
|
|
75
|
+
let t = await _({
|
|
59
76
|
gateway: "workspace",
|
|
60
77
|
authToken: n || void 0,
|
|
61
|
-
query:
|
|
78
|
+
query: g(c),
|
|
62
79
|
variables: { userId: e },
|
|
63
80
|
workspaceId: o || void 0,
|
|
64
81
|
workspaceToken: !0
|
|
@@ -71,16 +88,24 @@ var _ = () => {
|
|
|
71
88
|
userId: t,
|
|
72
89
|
source: "microfe-workspaces"
|
|
73
90
|
});
|
|
91
|
+
},
|
|
92
|
+
onError: (e, t) => {
|
|
93
|
+
a("workspace-member.remove_failed", {
|
|
94
|
+
userId: t,
|
|
95
|
+
workspaceId: o || void 0,
|
|
96
|
+
source: "microfe-workspaces",
|
|
97
|
+
errorMessage: p(e)
|
|
98
|
+
});
|
|
74
99
|
}
|
|
75
100
|
});
|
|
76
|
-
},
|
|
77
|
-
let { authToken: n, workspaceId: r } = e(), i =
|
|
78
|
-
return
|
|
101
|
+
}, x = (t) => {
|
|
102
|
+
let { authToken: n, workspaceId: r } = e(), i = h(), { emit: o } = f(), s = t || r;
|
|
103
|
+
return m({
|
|
79
104
|
mutationFn: async (e) => {
|
|
80
|
-
let t = await
|
|
105
|
+
let t = await _({
|
|
81
106
|
gateway: "workspace",
|
|
82
107
|
authToken: n || void 0,
|
|
83
|
-
query:
|
|
108
|
+
query: g(a),
|
|
84
109
|
variables: { input: e },
|
|
85
110
|
workspaceId: e.workspaceId || s || void 0,
|
|
86
111
|
workspaceToken: !0
|
|
@@ -95,16 +120,24 @@ var _ = () => {
|
|
|
95
120
|
email: e.email,
|
|
96
121
|
source: "microfe-workspaces"
|
|
97
122
|
});
|
|
123
|
+
},
|
|
124
|
+
onError: (e, t) => {
|
|
125
|
+
o("workspace-invitation.create_failed", {
|
|
126
|
+
workspaceId: t?.workspaceId || s || void 0,
|
|
127
|
+
email: t?.email,
|
|
128
|
+
source: "microfe-workspaces",
|
|
129
|
+
errorMessage: p(e)
|
|
130
|
+
});
|
|
98
131
|
}
|
|
99
132
|
});
|
|
100
|
-
},
|
|
101
|
-
let { authToken: t, workspaceId: n } = e(), r =
|
|
102
|
-
return
|
|
133
|
+
}, S = () => {
|
|
134
|
+
let { authToken: t, workspaceId: n } = e(), r = h(), { emit: i } = f();
|
|
135
|
+
return m({
|
|
103
136
|
mutationFn: async ({ id: e, input: r }) => {
|
|
104
|
-
let i = await
|
|
137
|
+
let i = await _({
|
|
105
138
|
gateway: "workspace",
|
|
106
139
|
authToken: t || void 0,
|
|
107
|
-
query:
|
|
140
|
+
query: g(d),
|
|
108
141
|
variables: {
|
|
109
142
|
id: e,
|
|
110
143
|
input: r
|
|
@@ -116,21 +149,29 @@ var _ = () => {
|
|
|
116
149
|
return i.data.updateInvitation;
|
|
117
150
|
},
|
|
118
151
|
onSuccess: (e) => {
|
|
119
|
-
r.invalidateQueries({ queryKey: ["workspaceInvitations"] }), i("workspace-invitation.
|
|
152
|
+
r.invalidateQueries({ queryKey: ["workspaceInvitations"] }), i("workspace-invitation.updated", {
|
|
120
153
|
invitationId: e.id,
|
|
121
154
|
workspaceId: e.workspaceId,
|
|
122
155
|
source: "microfe-workspaces"
|
|
123
156
|
});
|
|
157
|
+
},
|
|
158
|
+
onError: (e, t) => {
|
|
159
|
+
i("workspace-invitation.update_failed", {
|
|
160
|
+
invitationId: t?.id,
|
|
161
|
+
workspaceId: n || void 0,
|
|
162
|
+
source: "microfe-workspaces",
|
|
163
|
+
errorMessage: p(e)
|
|
164
|
+
});
|
|
124
165
|
}
|
|
125
166
|
});
|
|
126
|
-
},
|
|
127
|
-
let { authToken: n, workspaceId: r } = e(), i =
|
|
128
|
-
return
|
|
167
|
+
}, C = () => {
|
|
168
|
+
let { authToken: n, workspaceId: r } = e(), i = h(), { emit: a } = f();
|
|
169
|
+
return m({
|
|
129
170
|
mutationFn: async (e) => {
|
|
130
|
-
let i = await
|
|
171
|
+
let i = await _({
|
|
131
172
|
gateway: "workspace",
|
|
132
173
|
authToken: n || void 0,
|
|
133
|
-
query:
|
|
174
|
+
query: g(t),
|
|
134
175
|
variables: { id: e },
|
|
135
176
|
workspaceId: r || void 0,
|
|
136
177
|
workspaceToken: !0
|
|
@@ -144,16 +185,24 @@ var _ = () => {
|
|
|
144
185
|
workspaceId: e.workspaceId,
|
|
145
186
|
source: "microfe-workspaces"
|
|
146
187
|
});
|
|
188
|
+
},
|
|
189
|
+
onError: (e, t) => {
|
|
190
|
+
a("workspace-invitation.accept_failed", {
|
|
191
|
+
invitationId: t,
|
|
192
|
+
workspaceId: r || void 0,
|
|
193
|
+
source: "microfe-workspaces",
|
|
194
|
+
errorMessage: p(e)
|
|
195
|
+
});
|
|
147
196
|
}
|
|
148
197
|
});
|
|
149
|
-
},
|
|
150
|
-
let { authToken: t, workspaceId: n } = e(), r =
|
|
151
|
-
return
|
|
198
|
+
}, w = () => {
|
|
199
|
+
let { authToken: t, workspaceId: n } = e(), r = h(), { emit: i } = f();
|
|
200
|
+
return m({
|
|
152
201
|
mutationFn: async (e) => {
|
|
153
|
-
let r = await
|
|
202
|
+
let r = await _({
|
|
154
203
|
gateway: "workspace",
|
|
155
204
|
authToken: t || void 0,
|
|
156
|
-
query:
|
|
205
|
+
query: g(s),
|
|
157
206
|
variables: { id: e },
|
|
158
207
|
workspaceId: n || void 0,
|
|
159
208
|
workspaceToken: !0
|
|
@@ -167,16 +216,24 @@ var _ = () => {
|
|
|
167
216
|
workspaceId: e.workspaceId,
|
|
168
217
|
source: "microfe-workspaces"
|
|
169
218
|
});
|
|
219
|
+
},
|
|
220
|
+
onError: (e, t) => {
|
|
221
|
+
i("workspace-invitation.reject_failed", {
|
|
222
|
+
invitationId: t,
|
|
223
|
+
workspaceId: n || void 0,
|
|
224
|
+
source: "microfe-workspaces",
|
|
225
|
+
errorMessage: p(e)
|
|
226
|
+
});
|
|
170
227
|
}
|
|
171
228
|
});
|
|
172
|
-
},
|
|
173
|
-
let { authToken: t, workspaceId: n } = e(), r =
|
|
174
|
-
return
|
|
229
|
+
}, T = () => {
|
|
230
|
+
let { authToken: t, workspaceId: n } = e(), r = h(), { emit: a } = f();
|
|
231
|
+
return m({
|
|
175
232
|
mutationFn: async (e) => {
|
|
176
|
-
let r = await
|
|
233
|
+
let r = await _({
|
|
177
234
|
gateway: "workspace",
|
|
178
235
|
authToken: t || void 0,
|
|
179
|
-
query:
|
|
236
|
+
query: g(i),
|
|
180
237
|
variables: { id: e },
|
|
181
238
|
workspaceId: n || void 0,
|
|
182
239
|
workspaceToken: !0
|
|
@@ -190,16 +247,24 @@ var _ = () => {
|
|
|
190
247
|
workspaceId: e.workspaceId,
|
|
191
248
|
source: "microfe-workspaces"
|
|
192
249
|
});
|
|
250
|
+
},
|
|
251
|
+
onError: (e, t) => {
|
|
252
|
+
a("workspace-invitation.cancel_failed", {
|
|
253
|
+
invitationId: t,
|
|
254
|
+
workspaceId: n || void 0,
|
|
255
|
+
source: "microfe-workspaces",
|
|
256
|
+
errorMessage: p(e)
|
|
257
|
+
});
|
|
193
258
|
}
|
|
194
259
|
});
|
|
195
|
-
},
|
|
196
|
-
let { authToken: n, workspaceId: r } = e(), i =
|
|
197
|
-
return
|
|
260
|
+
}, E = (t) => {
|
|
261
|
+
let { authToken: n, workspaceId: r } = e(), i = h(), { emit: a } = f(), o = t || r;
|
|
262
|
+
return m({
|
|
198
263
|
mutationFn: async (e) => {
|
|
199
|
-
let t = await
|
|
264
|
+
let t = await _({
|
|
200
265
|
gateway: "workspace",
|
|
201
266
|
authToken: n || void 0,
|
|
202
|
-
query:
|
|
267
|
+
query: g(u),
|
|
203
268
|
variables: { id: e },
|
|
204
269
|
workspaceId: o || void 0,
|
|
205
270
|
workspaceToken: !0
|
|
@@ -213,16 +278,24 @@ var _ = () => {
|
|
|
213
278
|
workspaceId: e.workspaceId,
|
|
214
279
|
source: "microfe-workspaces"
|
|
215
280
|
});
|
|
281
|
+
},
|
|
282
|
+
onError: (e, t) => {
|
|
283
|
+
a("workspace-invitation.resend_failed", {
|
|
284
|
+
invitationId: t,
|
|
285
|
+
workspaceId: o || void 0,
|
|
286
|
+
source: "microfe-workspaces",
|
|
287
|
+
errorMessage: p(e)
|
|
288
|
+
});
|
|
216
289
|
}
|
|
217
290
|
});
|
|
218
|
-
},
|
|
219
|
-
let { authToken: t, workspaceId: n } = e(), r =
|
|
220
|
-
return
|
|
291
|
+
}, D = () => {
|
|
292
|
+
let { authToken: t, workspaceId: n } = e(), r = h(), { emit: i } = f();
|
|
293
|
+
return m({
|
|
221
294
|
mutationFn: async (e) => {
|
|
222
|
-
let r = await
|
|
295
|
+
let r = await _({
|
|
223
296
|
gateway: "workspace",
|
|
224
297
|
authToken: t || void 0,
|
|
225
|
-
query:
|
|
298
|
+
query: g(o),
|
|
226
299
|
variables: { id: e },
|
|
227
300
|
workspaceId: n || void 0,
|
|
228
301
|
workspaceToken: !0
|
|
@@ -235,16 +308,24 @@ var _ = () => {
|
|
|
235
308
|
invitationId: t,
|
|
236
309
|
source: "microfe-workspaces"
|
|
237
310
|
});
|
|
311
|
+
},
|
|
312
|
+
onError: (e, t) => {
|
|
313
|
+
i("workspace-invitation.delete_failed", {
|
|
314
|
+
invitationId: t,
|
|
315
|
+
workspaceId: n || void 0,
|
|
316
|
+
source: "microfe-workspaces",
|
|
317
|
+
errorMessage: p(e)
|
|
318
|
+
});
|
|
238
319
|
}
|
|
239
320
|
});
|
|
240
|
-
},
|
|
241
|
-
let { authToken: t, workspaceId: n } = e(), i =
|
|
242
|
-
return
|
|
321
|
+
}, O = () => {
|
|
322
|
+
let { authToken: t, workspaceId: n } = e(), i = h();
|
|
323
|
+
return m({
|
|
243
324
|
mutationFn: async (e) => {
|
|
244
|
-
let i = await
|
|
325
|
+
let i = await _({
|
|
245
326
|
gateway: "workspace",
|
|
246
327
|
authToken: t || void 0,
|
|
247
|
-
query:
|
|
328
|
+
query: g(r),
|
|
248
329
|
variables: { inputs: e },
|
|
249
330
|
workspaceId: e[0]?.workspaceId || n || void 0,
|
|
250
331
|
workspaceToken: !0
|
|
@@ -258,6 +339,6 @@ var _ = () => {
|
|
|
258
339
|
});
|
|
259
340
|
};
|
|
260
341
|
//#endregion
|
|
261
|
-
export {
|
|
342
|
+
export { C as useAcceptInvitation, v as useAddWorkspaceMember, O as useBulkCreateInvitations, T as useCancelInvitation, x as useCreateInvitation, D as useDeleteInvitation, w as useRejectInvitation, b as useRemoveUserFromWorkspace, y as useRemoveWorkspaceMember, E as useResendInvitation, S as useUpdateInvitation };
|
|
262
343
|
|
|
263
344
|
//# sourceMappingURL=useMemberMutations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMemberMutations.js","names":[],"sources":["../../src/hooks/useMemberMutations.ts"],"sourcesContent":["import { useMutation, useQueryClient } from '@tanstack/react-query';\nimport { print } from 'graphql';\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql';\nimport { useWorkspacesContext } from '../providers/WorkspacesProvider';\nimport {\n AddWorkspaceMemberDocument,\n RemoveWorkspaceMemberDocument,\n RemoveUserFromWorkspaceDocument,\n CreateInvitationDocument,\n UpdateInvitationDocument,\n AcceptInvitationDocument,\n RejectInvitationDocument,\n CancelInvitationDocument,\n ResendInvitationDocument,\n DeleteInvitationDocument,\n BulkCreateInvitationsDocument,\n} from '../generated/wspace-operations';\nimport type {\n WorkspaceMember,\n WorkspaceInvitation,\n AddWorkspaceMemberInput,\n CreateInvitationInput,\n UpdateInvitationInput,\n} from '../types';\nimport { useWorkspacesEventEmitter } from './useWorkspacesEventEmitter';\n\n/**\n * Hook to add a member to a workspace\n * Requires x-workspace-id header for workspace context\n */\nexport const useAddWorkspaceMember = () => {\n const { authToken, workspaceId } = useWorkspacesContext();\n const queryClient = useQueryClient();\n const { emit } = useWorkspacesEventEmitter();\n\n return useMutation({\n mutationFn: async (input: AddWorkspaceMemberInput): Promise<WorkspaceMember> => {\n const result = await graphqlFetch<{ addWorkspaceMember: WorkspaceMember }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(AddWorkspaceMemberDocument),\n variables: { input },\n workspaceId: workspaceId || undefined,\n workspaceToken: true, // Auto-read from profile context for x-workspace-id header\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.addWorkspaceMember;\n },\n onSuccess: (data) => {\n queryClient.invalidateQueries({ queryKey: ['workspaceMembers', data.workspaceId] });\n queryClient.invalidateQueries({ queryKey: ['userWorkspaces'] });\n emit('workspace-member.added', {\n memberId: data.id,\n workspaceId: data.workspaceId,\n userId: data.userId,\n source: 'microfe-workspaces',\n });\n },\n });\n};\n\n/**\n * Hook to remove a member from a workspace by member ID\n */\nexport const useRemoveWorkspaceMember = (workspaceIdOverride?: string) => {\n const { authToken, workspaceId } = useWorkspacesContext();\n const queryClient = useQueryClient();\n const { emit } = useWorkspacesEventEmitter();\n const effectiveWorkspaceId = workspaceIdOverride || workspaceId;\n\n return useMutation({\n mutationFn: async (id: string): Promise<boolean> => {\n const result = await graphqlFetch<{ removeWorkspaceMember: boolean }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(RemoveWorkspaceMemberDocument),\n variables: { id },\n workspaceId: effectiveWorkspaceId || undefined,\n workspaceToken: true, // Required by gateway RBAC for wspace-scoped operations\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.removeWorkspaceMember;\n },\n onSuccess: (_, id) => {\n queryClient.invalidateQueries({ queryKey: ['workspaceMembers'] });\n queryClient.invalidateQueries({ queryKey: ['userWorkspaces'] });\n emit('workspace-member.removed', { memberId: id, source: 'microfe-workspaces' });\n },\n });\n};\n\n/**\n * Hook to remove a user from a workspace\n * Requires x-workspace-id header for workspace context\n */\nexport const useRemoveUserFromWorkspace = (workspaceIdOverride?: string) => {\n const { authToken, workspaceId } = useWorkspacesContext();\n const queryClient = useQueryClient();\n const { emit } = useWorkspacesEventEmitter();\n const effectiveWorkspaceId = workspaceIdOverride || workspaceId;\n\n return useMutation({\n mutationFn: async (userId: string): Promise<boolean> => {\n const result = await graphqlFetch<{ removeUserFromWorkspace: boolean }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(RemoveUserFromWorkspaceDocument),\n variables: { userId },\n workspaceId: effectiveWorkspaceId || undefined,\n workspaceToken: true, // Auto-read from profile context for x-workspace-id header\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.removeUserFromWorkspace;\n },\n onSuccess: (_, userId) => {\n queryClient.invalidateQueries({ queryKey: ['workspaceMembers'] });\n queryClient.invalidateQueries({ queryKey: ['userWorkspaces', userId] });\n emit('workspace-member.removed', { userId, source: 'microfe-workspaces' });\n },\n });\n};\n\n/**\n * NOTE: The updateWorkspaceMemberRoles mutation has been removed from the backend.\n * Role management is now handled via invitations - when creating an invitation,\n * you can specify roleIds that will be assigned when the invitation is accepted.\n *\n * Use CreateInvitationInput.roleIds to assign roles to new members.\n */\n\n/**\n * Hook to create a workspace invitation\n * Uses x-workspace-id header as fallback when input.workspaceId is not provided\n */\nexport const useCreateInvitation = (workspaceIdOverride?: string) => {\n const { authToken, workspaceId } = useWorkspacesContext();\n const queryClient = useQueryClient();\n const { emit } = useWorkspacesEventEmitter();\n const effectiveWorkspaceId = workspaceIdOverride || workspaceId;\n\n return useMutation({\n mutationFn: async (input: CreateInvitationInput): Promise<WorkspaceInvitation> => {\n const result = await graphqlFetch<{ createInvitation: WorkspaceInvitation }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(CreateInvitationDocument),\n variables: { input },\n workspaceId: input.workspaceId || effectiveWorkspaceId || undefined,\n workspaceToken: true, // Auto-read from profile context for x-workspace-id header fallback\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.createInvitation;\n },\n onSuccess: (data) => {\n if (data.workspaceId) {\n queryClient.invalidateQueries({ queryKey: ['workspaceInvitations', data.workspaceId] });\n }\n emit('workspace-invitation.created', {\n invitationId: data.id,\n workspaceId: data.workspaceId,\n email: data.email,\n source: 'microfe-workspaces',\n });\n },\n });\n};\n\n/**\n * Hook to update an invitation\n */\nexport const useUpdateInvitation = () => {\n const { authToken, workspaceId } = useWorkspacesContext();\n const queryClient = useQueryClient();\n const { emit } = useWorkspacesEventEmitter();\n\n return useMutation({\n mutationFn: async ({\n id,\n input,\n }: {\n id: string;\n input: UpdateInvitationInput;\n }): Promise<WorkspaceInvitation> => {\n const result = await graphqlFetch<{ updateInvitation: WorkspaceInvitation }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(UpdateInvitationDocument),\n variables: { id, input },\n workspaceId: workspaceId || undefined,\n workspaceToken: true, // Required by gateway RBAC for wspace-scoped operations\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.updateInvitation;\n },\n onSuccess: (data) => {\n queryClient.invalidateQueries({ queryKey: ['workspaceInvitations'] });\n emit('workspace-invitation.created', {\n invitationId: data.id,\n workspaceId: data.workspaceId,\n source: 'microfe-workspaces',\n });\n },\n });\n};\n\n/**\n * Hook to accept an invitation\n */\nexport const useAcceptInvitation = () => {\n const { authToken, workspaceId } = useWorkspacesContext();\n const queryClient = useQueryClient();\n const { emit } = useWorkspacesEventEmitter();\n\n return useMutation({\n mutationFn: async (id: string): Promise<WorkspaceInvitation> => {\n const result = await graphqlFetch<{ acceptInvitation: WorkspaceInvitation }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(AcceptInvitationDocument),\n variables: { id },\n workspaceId: workspaceId || undefined,\n workspaceToken: true, // Required by gateway RBAC for wspace-scoped operations\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.acceptInvitation;\n },\n onSuccess: (data) => {\n queryClient.invalidateQueries({ queryKey: ['workspaceInvitations'] });\n queryClient.invalidateQueries({ queryKey: ['workspaceMembers'] });\n queryClient.invalidateQueries({ queryKey: ['userWorkspaces'] });\n emit('workspace-invitation.accepted', {\n invitationId: data.id,\n workspaceId: data.workspaceId,\n source: 'microfe-workspaces',\n });\n },\n });\n};\n\n/**\n * Hook to reject an invitation\n */\nexport const useRejectInvitation = () => {\n const { authToken, workspaceId } = useWorkspacesContext();\n const queryClient = useQueryClient();\n const { emit } = useWorkspacesEventEmitter();\n\n return useMutation({\n mutationFn: async (id: string): Promise<WorkspaceInvitation> => {\n const result = await graphqlFetch<{ rejectInvitation: WorkspaceInvitation }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(RejectInvitationDocument),\n variables: { id },\n workspaceId: workspaceId || undefined,\n workspaceToken: true, // Required by gateway RBAC for wspace-scoped operations\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.rejectInvitation;\n },\n onSuccess: (data) => {\n queryClient.invalidateQueries({ queryKey: ['workspaceInvitations'] });\n emit('workspace-invitation.rejected', {\n invitationId: data.id,\n workspaceId: data.workspaceId,\n source: 'microfe-workspaces',\n });\n },\n });\n};\n\n/**\n * Hook to cancel an invitation\n */\nexport const useCancelInvitation = () => {\n const { authToken, workspaceId } = useWorkspacesContext();\n const queryClient = useQueryClient();\n const { emit } = useWorkspacesEventEmitter();\n\n return useMutation({\n mutationFn: async (id: string): Promise<WorkspaceInvitation> => {\n const result = await graphqlFetch<{ cancelInvitation: WorkspaceInvitation }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(CancelInvitationDocument),\n variables: { id },\n workspaceId: workspaceId || undefined,\n workspaceToken: true, // Required by gateway RBAC for wspace-scoped operations\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.cancelInvitation;\n },\n onSuccess: (data) => {\n queryClient.invalidateQueries({ queryKey: ['workspaceInvitations'] });\n emit('workspace-invitation.cancelled', {\n invitationId: data.id,\n workspaceId: data.workspaceId,\n source: 'microfe-workspaces',\n });\n },\n });\n};\n\n/**\n * Hook to resend an invitation\n */\nexport const useResendInvitation = (workspaceIdOverride?: string) => {\n const { authToken, workspaceId } = useWorkspacesContext();\n const queryClient = useQueryClient();\n const { emit } = useWorkspacesEventEmitter();\n const effectiveWorkspaceId = workspaceIdOverride || workspaceId;\n\n return useMutation({\n mutationFn: async (id: string): Promise<WorkspaceInvitation> => {\n const result = await graphqlFetch<{ resendInvitation: WorkspaceInvitation }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(ResendInvitationDocument),\n variables: { id },\n workspaceId: effectiveWorkspaceId || undefined,\n workspaceToken: true, // Required by gateway RBAC for wspace-scoped operations\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.resendInvitation;\n },\n onSuccess: (data) => {\n queryClient.invalidateQueries({ queryKey: ['workspaceInvitations'] });\n emit('workspace-invitation.resent', {\n invitationId: data.id,\n workspaceId: data.workspaceId,\n source: 'microfe-workspaces',\n });\n },\n });\n};\n\n/**\n * Hook to delete an invitation\n */\nexport const useDeleteInvitation = () => {\n const { authToken, workspaceId } = useWorkspacesContext();\n const queryClient = useQueryClient();\n const { emit } = useWorkspacesEventEmitter();\n\n return useMutation({\n mutationFn: async (id: string): Promise<boolean> => {\n const result = await graphqlFetch<{ deleteInvitation: boolean }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(DeleteInvitationDocument),\n variables: { id },\n workspaceId: workspaceId || undefined,\n workspaceToken: true, // Required by gateway RBAC for wspace-scoped operations\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.deleteInvitation;\n },\n onSuccess: (_, id) => {\n queryClient.invalidateQueries({ queryKey: ['workspaceInvitations'] });\n emit('workspace-invitation.deleted', { invitationId: id, source: 'microfe-workspaces' });\n },\n });\n};\n\n/**\n * Hook to bulk create invitations\n * Uses x-workspace-id header as fallback when inputs[].workspaceId is not provided\n */\nexport const useBulkCreateInvitations = () => {\n const { authToken, workspaceId } = useWorkspacesContext();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: async (inputs: CreateInvitationInput[]): Promise<WorkspaceInvitation[]> => {\n const result = await graphqlFetch<{ bulkCreateInvitations: WorkspaceInvitation[] }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(BulkCreateInvitationsDocument),\n variables: { inputs },\n workspaceId: inputs[0]?.workspaceId || workspaceId || undefined,\n workspaceToken: true, // Auto-read from profile context for x-workspace-id header fallback\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.bulkCreateInvitations;\n },\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['workspaceInvitations'] });\n },\n });\n};\n"],"mappings":";;;;;;;AA8BA,IAAa,UAA8B;CACzC,IAAM,EAAE,cAAW,mBAAgB,GAAsB,EACnD,IAAc,GAAgB,EAC9B,EAAE,YAAS,GAA2B;AAE5C,QAAO,EAAY;EACjB,YAAY,OAAO,MAA6D;GAC9E,IAAM,IAAS,MAAM,EAAsD;IACzE,SAAS;IACT,WAAW,KAAa,KAAA;IACxB,OAAO,EAAM,EAA2B;IACxC,WAAW,EAAE,UAAO;IACpB,aAAa,KAAe,KAAA;IAC5B,gBAAgB;IACjB,CAAC;AAEF,OAAI,EAAO,QAAQ,OACjB,OAAU,MAAM,EAAO,OAAO,IAAI,WAAW,gBAAgB;AAG/D,UAAO,EAAO,KAAM;;EAEtB,YAAY,MAAS;AAGnB,GAFA,EAAY,kBAAkB,EAAE,UAAU,CAAC,oBAAoB,EAAK,YAAY,EAAE,CAAC,EACnF,EAAY,kBAAkB,EAAE,UAAU,CAAC,iBAAiB,EAAE,CAAC,EAC/D,EAAK,0BAA0B;IAC7B,UAAU,EAAK;IACf,aAAa,EAAK;IAClB,QAAQ,EAAK;IACb,QAAQ;IACT,CAAC;;EAEL,CAAC;GAMS,KAA4B,MAAiC;CACxE,IAAM,EAAE,cAAW,mBAAgB,GAAsB,EACnD,IAAc,GAAgB,EAC9B,EAAE,YAAS,GAA2B,EACtC,IAAuB,KAAuB;AAEpD,QAAO,EAAY;EACjB,YAAY,OAAO,MAAiC;GAClD,IAAM,IAAS,MAAM,EAAiD;IACpE,SAAS;IACT,WAAW,KAAa,KAAA;IACxB,OAAO,EAAM,EAA8B;IAC3C,WAAW,EAAE,OAAI;IACjB,aAAa,KAAwB,KAAA;IACrC,gBAAgB;IACjB,CAAC;AAEF,OAAI,EAAO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ClD,IAAM,IAAS,MAAM,EAA4C;IAC/D,SAAS;IACT,WAAW,KAAa,KAAA;IACxB,OAAO,EAAM,EAAyB;IACtC,WAAW,EAAE,OAAI;IACjB,aAAa,KAAe,KAAA;IAC5B,gBAAgB;IACjB,CAAC;AAEF,OAAI,EAAO,QAAQ,OACjB,OAAU,MAAM,EAAO,OAAO,IAAI,WAAW,gBAAgB;AAG/D,UAAO,EAAO,KAAM;;EAEtB,YAAY,GAAG,MAAO;AAEpB,GADA,EAAY,kBAAkB,EAAE,UAAU,CAAC,uBAAuB,EAAE,CAAC,EACrE,EAAK,gCAAgC;IAAE,cAAc;IAAI,QAAQ;IAAsB,CAAC;;EAE3F,CAAC;GAOS,UAAiC;CAC5C,IAAM,EAAE,cAAW,mBAAgB,GAAsB,EACnD,IAAc,GAAgB;AAEpC,QAAO,EAAY;EACjB,YAAY,OAAO,MAAoE;GACrF,IAAM,IAAS,MAAM,EAA+D;IAClF,SAAS;IACT,WAAW,KAAa,KAAA;IACxB,OAAO,EAAM,EAA8B;IAC3C,WAAW,EAAE,WAAQ;IACrB,aAAa,EAAO,IAAI,eAAe,KAAe,KAAA;IACtD,gBAAgB;IACjB,CAAC;AAEF,OAAI,EAAO,QAAQ,OACjB,OAAU,MAAM,EAAO,OAAO,IAAI,WAAW,gBAAgB;AAG/D,UAAO,EAAO,KAAM;;EAEtB,iBAAiB;AACf,KAAY,kBAAkB,EAAE,UAAU,CAAC,uBAAuB,EAAE,CAAC;;EAExE,CAAC"}
|
|
1
|
+
{"version":3,"file":"useMemberMutations.js","names":[],"sources":["../../src/hooks/useMemberMutations.ts"],"sourcesContent":["import { useMutation, useQueryClient } from '@tanstack/react-query';\nimport { print } from 'graphql';\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql';\nimport { useWorkspacesContext } from '../providers/WorkspacesProvider';\nimport {\n AddWorkspaceMemberDocument,\n RemoveWorkspaceMemberDocument,\n RemoveUserFromWorkspaceDocument,\n CreateInvitationDocument,\n UpdateInvitationDocument,\n AcceptInvitationDocument,\n RejectInvitationDocument,\n CancelInvitationDocument,\n ResendInvitationDocument,\n DeleteInvitationDocument,\n BulkCreateInvitationsDocument,\n} from '../generated/wspace-operations';\nimport type {\n WorkspaceMember,\n WorkspaceInvitation,\n AddWorkspaceMemberInput,\n CreateInvitationInput,\n UpdateInvitationInput,\n} from '../types';\nimport { useWorkspacesEventEmitter } from './useWorkspacesEventEmitter';\nimport { safeTelemetryError } from '../utils/telemetryError';\n\n/**\n * Hook to add a member to a workspace\n * Requires x-workspace-id header for workspace context\n */\nexport const useAddWorkspaceMember = () => {\n const { authToken, workspaceId } = useWorkspacesContext();\n const queryClient = useQueryClient();\n const { emit } = useWorkspacesEventEmitter();\n\n return useMutation({\n mutationFn: async (input: AddWorkspaceMemberInput): Promise<WorkspaceMember> => {\n const result = await graphqlFetch<{ addWorkspaceMember: WorkspaceMember }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(AddWorkspaceMemberDocument),\n variables: { input },\n workspaceId: workspaceId || undefined,\n workspaceToken: true, // Auto-read from profile context for x-workspace-id header\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.addWorkspaceMember;\n },\n onSuccess: (data) => {\n queryClient.invalidateQueries({ queryKey: ['workspaceMembers', data.workspaceId] });\n queryClient.invalidateQueries({ queryKey: ['userWorkspaces'] });\n emit('workspace-member.added', {\n memberId: data.id,\n workspaceId: data.workspaceId,\n userId: data.userId,\n source: 'microfe-workspaces',\n });\n },\n onError: (err, input) => {\n emit('workspace-member.add_failed', {\n workspaceId: workspaceId || undefined,\n userId: input?.userId,\n source: 'microfe-workspaces',\n errorMessage: safeTelemetryError(err),\n });\n },\n });\n};\n\n/**\n * Hook to remove a member from a workspace by member ID\n */\nexport const useRemoveWorkspaceMember = (workspaceIdOverride?: string) => {\n const { authToken, workspaceId } = useWorkspacesContext();\n const queryClient = useQueryClient();\n const { emit } = useWorkspacesEventEmitter();\n const effectiveWorkspaceId = workspaceIdOverride || workspaceId;\n\n return useMutation({\n mutationFn: async (id: string): Promise<boolean> => {\n const result = await graphqlFetch<{ removeWorkspaceMember: boolean }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(RemoveWorkspaceMemberDocument),\n variables: { id },\n workspaceId: effectiveWorkspaceId || undefined,\n workspaceToken: true, // Required by gateway RBAC for wspace-scoped operations\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.removeWorkspaceMember;\n },\n onSuccess: (_, id) => {\n queryClient.invalidateQueries({ queryKey: ['workspaceMembers'] });\n queryClient.invalidateQueries({ queryKey: ['userWorkspaces'] });\n emit('workspace-member.removed', { memberId: id, source: 'microfe-workspaces' });\n },\n onError: (err, id) => {\n emit('workspace-member.remove_failed', {\n memberId: id,\n workspaceId: effectiveWorkspaceId || undefined,\n source: 'microfe-workspaces',\n errorMessage: safeTelemetryError(err),\n });\n },\n });\n};\n\n/**\n * Hook to remove a user from a workspace\n * Requires x-workspace-id header for workspace context\n */\nexport const useRemoveUserFromWorkspace = (workspaceIdOverride?: string) => {\n const { authToken, workspaceId } = useWorkspacesContext();\n const queryClient = useQueryClient();\n const { emit } = useWorkspacesEventEmitter();\n const effectiveWorkspaceId = workspaceIdOverride || workspaceId;\n\n return useMutation({\n mutationFn: async (userId: string): Promise<boolean> => {\n const result = await graphqlFetch<{ removeUserFromWorkspace: boolean }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(RemoveUserFromWorkspaceDocument),\n variables: { userId },\n workspaceId: effectiveWorkspaceId || undefined,\n workspaceToken: true, // Auto-read from profile context for x-workspace-id header\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.removeUserFromWorkspace;\n },\n onSuccess: (_, userId) => {\n queryClient.invalidateQueries({ queryKey: ['workspaceMembers'] });\n queryClient.invalidateQueries({ queryKey: ['userWorkspaces', userId] });\n emit('workspace-member.removed', { userId, source: 'microfe-workspaces' });\n },\n onError: (err, userId) => {\n emit('workspace-member.remove_failed', {\n userId,\n workspaceId: effectiveWorkspaceId || undefined,\n source: 'microfe-workspaces',\n errorMessage: safeTelemetryError(err),\n });\n },\n });\n};\n\n/**\n * NOTE: The updateWorkspaceMemberRoles mutation has been removed from the backend.\n * Role management is now handled via invitations - when creating an invitation,\n * you can specify roleIds that will be assigned when the invitation is accepted.\n *\n * Use CreateInvitationInput.roleIds to assign roles to new members.\n */\n\n/**\n * Hook to create a workspace invitation\n * Uses x-workspace-id header as fallback when input.workspaceId is not provided\n */\nexport const useCreateInvitation = (workspaceIdOverride?: string) => {\n const { authToken, workspaceId } = useWorkspacesContext();\n const queryClient = useQueryClient();\n const { emit } = useWorkspacesEventEmitter();\n const effectiveWorkspaceId = workspaceIdOverride || workspaceId;\n\n return useMutation({\n mutationFn: async (input: CreateInvitationInput): Promise<WorkspaceInvitation> => {\n const result = await graphqlFetch<{ createInvitation: WorkspaceInvitation }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(CreateInvitationDocument),\n variables: { input },\n workspaceId: input.workspaceId || effectiveWorkspaceId || undefined,\n workspaceToken: true, // Auto-read from profile context for x-workspace-id header fallback\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.createInvitation;\n },\n onSuccess: (data) => {\n if (data.workspaceId) {\n queryClient.invalidateQueries({ queryKey: ['workspaceInvitations', data.workspaceId] });\n }\n emit('workspace-invitation.created', {\n invitationId: data.id,\n workspaceId: data.workspaceId,\n email: data.email,\n source: 'microfe-workspaces',\n });\n },\n onError: (err, input) => {\n emit('workspace-invitation.create_failed', {\n workspaceId: input?.workspaceId || effectiveWorkspaceId || undefined,\n email: input?.email,\n source: 'microfe-workspaces',\n errorMessage: safeTelemetryError(err),\n });\n },\n });\n};\n\n/**\n * Hook to update an invitation\n */\nexport const useUpdateInvitation = () => {\n const { authToken, workspaceId } = useWorkspacesContext();\n const queryClient = useQueryClient();\n const { emit } = useWorkspacesEventEmitter();\n\n return useMutation({\n mutationFn: async ({\n id,\n input,\n }: {\n id: string;\n input: UpdateInvitationInput;\n }): Promise<WorkspaceInvitation> => {\n const result = await graphqlFetch<{ updateInvitation: WorkspaceInvitation }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(UpdateInvitationDocument),\n variables: { id, input },\n workspaceId: workspaceId || undefined,\n workspaceToken: true, // Required by gateway RBAC for wspace-scoped operations\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.updateInvitation;\n },\n onSuccess: (data) => {\n queryClient.invalidateQueries({ queryKey: ['workspaceInvitations'] });\n emit('workspace-invitation.updated', {\n invitationId: data.id,\n workspaceId: data.workspaceId,\n source: 'microfe-workspaces',\n });\n },\n onError: (err, variables) => {\n emit('workspace-invitation.update_failed', {\n invitationId: variables?.id,\n workspaceId: workspaceId || undefined,\n source: 'microfe-workspaces',\n errorMessage: safeTelemetryError(err),\n });\n },\n });\n};\n\n/**\n * Hook to accept an invitation\n */\nexport const useAcceptInvitation = () => {\n const { authToken, workspaceId } = useWorkspacesContext();\n const queryClient = useQueryClient();\n const { emit } = useWorkspacesEventEmitter();\n\n return useMutation({\n mutationFn: async (id: string): Promise<WorkspaceInvitation> => {\n const result = await graphqlFetch<{ acceptInvitation: WorkspaceInvitation }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(AcceptInvitationDocument),\n variables: { id },\n workspaceId: workspaceId || undefined,\n workspaceToken: true, // Required by gateway RBAC for wspace-scoped operations\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.acceptInvitation;\n },\n onSuccess: (data) => {\n queryClient.invalidateQueries({ queryKey: ['workspaceInvitations'] });\n queryClient.invalidateQueries({ queryKey: ['workspaceMembers'] });\n queryClient.invalidateQueries({ queryKey: ['userWorkspaces'] });\n emit('workspace-invitation.accepted', {\n invitationId: data.id,\n workspaceId: data.workspaceId,\n source: 'microfe-workspaces',\n });\n },\n onError: (err, id) => {\n emit('workspace-invitation.accept_failed', {\n invitationId: id,\n workspaceId: workspaceId || undefined,\n source: 'microfe-workspaces',\n errorMessage: safeTelemetryError(err),\n });\n },\n });\n};\n\n/**\n * Hook to reject an invitation\n */\nexport const useRejectInvitation = () => {\n const { authToken, workspaceId } = useWorkspacesContext();\n const queryClient = useQueryClient();\n const { emit } = useWorkspacesEventEmitter();\n\n return useMutation({\n mutationFn: async (id: string): Promise<WorkspaceInvitation> => {\n const result = await graphqlFetch<{ rejectInvitation: WorkspaceInvitation }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(RejectInvitationDocument),\n variables: { id },\n workspaceId: workspaceId || undefined,\n workspaceToken: true, // Required by gateway RBAC for wspace-scoped operations\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.rejectInvitation;\n },\n onSuccess: (data) => {\n queryClient.invalidateQueries({ queryKey: ['workspaceInvitations'] });\n emit('workspace-invitation.rejected', {\n invitationId: data.id,\n workspaceId: data.workspaceId,\n source: 'microfe-workspaces',\n });\n },\n onError: (err, id) => {\n emit('workspace-invitation.reject_failed', {\n invitationId: id,\n workspaceId: workspaceId || undefined,\n source: 'microfe-workspaces',\n errorMessage: safeTelemetryError(err),\n });\n },\n });\n};\n\n/**\n * Hook to cancel an invitation\n */\nexport const useCancelInvitation = () => {\n const { authToken, workspaceId } = useWorkspacesContext();\n const queryClient = useQueryClient();\n const { emit } = useWorkspacesEventEmitter();\n\n return useMutation({\n mutationFn: async (id: string): Promise<WorkspaceInvitation> => {\n const result = await graphqlFetch<{ cancelInvitation: WorkspaceInvitation }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(CancelInvitationDocument),\n variables: { id },\n workspaceId: workspaceId || undefined,\n workspaceToken: true, // Required by gateway RBAC for wspace-scoped operations\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.cancelInvitation;\n },\n onSuccess: (data) => {\n queryClient.invalidateQueries({ queryKey: ['workspaceInvitations'] });\n emit('workspace-invitation.cancelled', {\n invitationId: data.id,\n workspaceId: data.workspaceId,\n source: 'microfe-workspaces',\n });\n },\n onError: (err, id) => {\n emit('workspace-invitation.cancel_failed', {\n invitationId: id,\n workspaceId: workspaceId || undefined,\n source: 'microfe-workspaces',\n errorMessage: safeTelemetryError(err),\n });\n },\n });\n};\n\n/**\n * Hook to resend an invitation\n */\nexport const useResendInvitation = (workspaceIdOverride?: string) => {\n const { authToken, workspaceId } = useWorkspacesContext();\n const queryClient = useQueryClient();\n const { emit } = useWorkspacesEventEmitter();\n const effectiveWorkspaceId = workspaceIdOverride || workspaceId;\n\n return useMutation({\n mutationFn: async (id: string): Promise<WorkspaceInvitation> => {\n const result = await graphqlFetch<{ resendInvitation: WorkspaceInvitation }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(ResendInvitationDocument),\n variables: { id },\n workspaceId: effectiveWorkspaceId || undefined,\n workspaceToken: true, // Required by gateway RBAC for wspace-scoped operations\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.resendInvitation;\n },\n onSuccess: (data) => {\n queryClient.invalidateQueries({ queryKey: ['workspaceInvitations'] });\n emit('workspace-invitation.resent', {\n invitationId: data.id,\n workspaceId: data.workspaceId,\n source: 'microfe-workspaces',\n });\n },\n onError: (err, id) => {\n emit('workspace-invitation.resend_failed', {\n invitationId: id,\n workspaceId: effectiveWorkspaceId || undefined,\n source: 'microfe-workspaces',\n errorMessage: safeTelemetryError(err),\n });\n },\n });\n};\n\n/**\n * Hook to delete an invitation\n */\nexport const useDeleteInvitation = () => {\n const { authToken, workspaceId } = useWorkspacesContext();\n const queryClient = useQueryClient();\n const { emit } = useWorkspacesEventEmitter();\n\n return useMutation({\n mutationFn: async (id: string): Promise<boolean> => {\n const result = await graphqlFetch<{ deleteInvitation: boolean }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(DeleteInvitationDocument),\n variables: { id },\n workspaceId: workspaceId || undefined,\n workspaceToken: true, // Required by gateway RBAC for wspace-scoped operations\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.deleteInvitation;\n },\n onSuccess: (_, id) => {\n queryClient.invalidateQueries({ queryKey: ['workspaceInvitations'] });\n emit('workspace-invitation.deleted', { invitationId: id, source: 'microfe-workspaces' });\n },\n onError: (err, id) => {\n emit('workspace-invitation.delete_failed', {\n invitationId: id,\n workspaceId: workspaceId || undefined,\n source: 'microfe-workspaces',\n errorMessage: safeTelemetryError(err),\n });\n },\n });\n};\n\n/**\n * Hook to bulk create invitations\n * Uses x-workspace-id header as fallback when inputs[].workspaceId is not provided\n */\nexport const useBulkCreateInvitations = () => {\n const { authToken, workspaceId } = useWorkspacesContext();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: async (inputs: CreateInvitationInput[]): Promise<WorkspaceInvitation[]> => {\n const result = await graphqlFetch<{ bulkCreateInvitations: WorkspaceInvitation[] }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(BulkCreateInvitationsDocument),\n variables: { inputs },\n workspaceId: inputs[0]?.workspaceId || workspaceId || undefined,\n workspaceToken: true, // Auto-read from profile context for x-workspace-id header fallback\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.bulkCreateInvitations;\n },\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['workspaceInvitations'] });\n },\n });\n};\n"],"mappings":";;;;;;;;AA+BA,IAAa,UAA8B;CACzC,IAAM,EAAE,cAAW,mBAAgB,GAAsB,EACnD,IAAc,GAAgB,EAC9B,EAAE,YAAS,GAA2B;AAE5C,QAAO,EAAY;EACjB,YAAY,OAAO,MAA6D;GAC9E,IA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rE,EAAK,gCAAgC;IAAE,cAAc;IAAI,QAAQ;IAAsB,CAAC;;EAE1F,UAAU,GAAK,MAAO;AACpB,KAAK,sCAAsC;IACzC,cAAc;IACd,aAAa,KAAe,KAAA;IAC5B,QAAQ;IACR,cAAc,EAAmB,EAAI;IACtC,CAAC;;EAEL,CAAC;GAOS,UAAiC;CAC5C,IAAM,EAAE,cAAW,mBAAgB,GAAsB,EACnD,IAAc,GAAgB;AAEpC,QAAO,EAAY;EACjB,YAAY,OAAO,MAAoE;GACrF,IAAM,IAAS,MAAM,EAA+D;IAClF,SAAS;IACT,WAAW,KAAa,KAAA;IACxB,OAAO,EAAM,EAA8B;IAC3C,WAAW,EAAE,WAAQ;IACrB,aAAa,EAAO,IAAI,eAAe,KAAe,KAAA;IACtD,gBAAgB;IACjB,CAAC;AAEF,OAAI,EAAO,QAAQ,OACjB,OAAU,MAAM,EAAO,OAAO,IAAI,WAAW,gBAAgB;AAG/D,UAAO,EAAO,KAAM;;EAEtB,iBAAiB;AACf,KAAY,kBAAkB,EAAE,UAAU,CAAC,uBAAuB,EAAE,CAAC;;EAExE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useProjectMutations.d.ts","sourceRoot":"","sources":["../../src/hooks/useProjectMutations.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"useProjectMutations.d.ts","sourceRoot":"","sources":["../../src/hooks/useProjectMutations.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AA4DhF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,sBAAsB,MAAM,mGA2C5D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,sBAAsB,MAAM;QAWnD,MAAM;WACH,kBAAkB;WAoC9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,sBAAsB,MAAM,uFAsC5D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAAI,sBAAsB,MAAM,uFA0C7D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,sBAAsB,MAAM,uFA0C/D,CAAC"}
|