@burdenoff/microfe-comradecircle 2026.720.3 → 2026.730.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/comradecircle/hooks/useComSubscription.d.ts +18 -0
- package/dist/comradecircle/hooks/useComSubscription.d.ts.map +1 -0
- package/dist/comradecircle/hooks/useComSubscription.js +110 -0
- package/dist/comradecircle/hooks/useComSubscription.js.map +1 -0
- package/dist/comradecircle/hooks/useComradeCircleApi.d.ts +23 -0
- package/dist/comradecircle/hooks/useComradeCircleApi.d.ts.map +1 -1
- package/dist/comradecircle/hooks/useComradeCircleApi.js +148 -99
- package/dist/comradecircle/hooks/useComradeCircleApi.js.map +1 -1
- package/dist/comradecircle/pages/circles/CircleDetailPage.d.ts.map +1 -1
- package/dist/comradecircle/pages/circles/CircleDetailPage.js +268 -266
- package/dist/comradecircle/pages/circles/CircleDetailPage.js.map +1 -1
- package/dist/comradecircle/pages/events/EventDetailPage.d.ts.map +1 -1
- package/dist/comradecircle/pages/events/EventDetailPage.js +84 -82
- package/dist/comradecircle/pages/events/EventDetailPage.js.map +1 -1
- package/dist/comradecircle/pages/posts/PostThreadPage.d.ts.map +1 -1
- package/dist/comradecircle/pages/posts/PostThreadPage.js +26 -24
- package/dist/comradecircle/pages/posts/PostThreadPage.js.map +1 -1
- package/dist/comradecircle/utils/shellBridge.d.ts +45 -0
- package/dist/comradecircle/utils/shellBridge.d.ts.map +1 -0
- package/dist/comradecircle/utils/shellBridge.js +19 -0
- package/dist/comradecircle/utils/shellBridge.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { useComradeCircle as e } from "../context/ComradeCircleContext.js";
|
|
2
2
|
import "../context/index.js";
|
|
3
3
|
import { clearGraphqlResponseCache as t } from "../lib/graphql-cache.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { useComSubscription as n } from "./useComSubscription.js";
|
|
5
|
+
import { useMutation as r, useQuery as i, useQueryClient as a } from "@tanstack/react-query";
|
|
6
|
+
import { graphqlFetch as o } from "@burdenoff/fe-libs/shared/graphql";
|
|
6
7
|
//#region src/comradecircle/hooks/useComradeCircleApi.ts
|
|
7
|
-
var
|
|
8
|
-
let i =
|
|
8
|
+
var ee = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
9
|
+
let i = ee(e);
|
|
9
10
|
i && t();
|
|
10
|
-
let
|
|
11
|
+
let a = await o({
|
|
11
12
|
gateway: "workspace",
|
|
12
13
|
baseUrl: r,
|
|
13
14
|
query: e,
|
|
14
15
|
variables: n,
|
|
15
16
|
workspaceToken: !0
|
|
16
17
|
});
|
|
17
|
-
if (i && t(),
|
|
18
|
-
if (!
|
|
19
|
-
return
|
|
18
|
+
if (i && t(), a.errors?.length) throw Error(a.errors[0]?.message ?? "GraphQL request failed");
|
|
19
|
+
if (!a.data) throw Error("GraphQL response did not include data");
|
|
20
|
+
return a.data;
|
|
20
21
|
}, c = {
|
|
21
22
|
circles: ["comradecircle", "circles"],
|
|
22
23
|
circle: (e) => [
|
|
@@ -97,7 +98,7 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
97
98
|
pageInfo: e.pageInfo ?? { hasMore: !1 }
|
|
98
99
|
}), A = (t = {}) => {
|
|
99
100
|
let { apiGatewayUrl: n } = e();
|
|
100
|
-
return
|
|
101
|
+
return i({
|
|
101
102
|
queryKey: [...c.circles, t],
|
|
102
103
|
queryFn: async () => k((await s(`query ComListCircles($status: ComCircleStatus, $visibility: ComCircleVisibility, $pagination: PaginationInput) {
|
|
103
104
|
comListCircles(status: $status, visibility: $visibility, pagination: $pagination) {
|
|
@@ -111,7 +112,7 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
111
112
|
});
|
|
112
113
|
}, j = (t) => {
|
|
113
114
|
let { apiGatewayUrl: n } = e();
|
|
114
|
-
return
|
|
115
|
+
return i({
|
|
115
116
|
queryKey: c.circle(t ?? ""),
|
|
116
117
|
enabled: !!t,
|
|
117
118
|
queryFn: async () => {
|
|
@@ -126,34 +127,34 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
126
127
|
}
|
|
127
128
|
});
|
|
128
129
|
}, M = () => {
|
|
129
|
-
let { apiGatewayUrl: t } = e(),
|
|
130
|
-
return
|
|
130
|
+
let { apiGatewayUrl: t } = e(), n = a();
|
|
131
|
+
return r({
|
|
131
132
|
mutationFn: async (e) => T((await s(`mutation ComCreateCircle($input: ComCreateCircleInput!) {
|
|
132
133
|
comCreateCircle(input: $input) { ${f} }
|
|
133
134
|
}`, { input: e }, t)).comCreateCircle),
|
|
134
|
-
onSuccess: () =>
|
|
135
|
+
onSuccess: () => n.invalidateQueries({ queryKey: c.circles })
|
|
135
136
|
});
|
|
136
137
|
}, N = () => {
|
|
137
|
-
let { apiGatewayUrl: t } = e(),
|
|
138
|
-
return
|
|
138
|
+
let { apiGatewayUrl: t } = e(), n = a();
|
|
139
|
+
return r({
|
|
139
140
|
mutationFn: async (e) => (await s(`mutation ComJoinCircle($circleId: ID!) {
|
|
140
141
|
comJoinCircle(circleId: $circleId) { ${S} }
|
|
141
142
|
}`, { circleId: e }, t)).comJoinCircle,
|
|
142
143
|
onSuccess: (e) => {
|
|
143
|
-
|
|
144
|
+
n.invalidateQueries({ queryKey: c.circles }), n.invalidateQueries({ queryKey: c.circle(e.circleId) }), n.invalidateQueries({ queryKey: c.memberships });
|
|
144
145
|
}
|
|
145
146
|
});
|
|
146
147
|
}, P = () => {
|
|
147
|
-
let { apiGatewayUrl: t } = e(),
|
|
148
|
-
return
|
|
148
|
+
let { apiGatewayUrl: t } = e(), n = a();
|
|
149
|
+
return r({
|
|
149
150
|
mutationFn: async (e) => (await s("mutation ComLeaveCircle($circleId: ID!) { comLeaveCircle(circleId: $circleId) }", { circleId: e }, t)).comLeaveCircle,
|
|
150
151
|
onSuccess: (e, t) => {
|
|
151
|
-
|
|
152
|
+
n.invalidateQueries({ queryKey: c.circles }), n.invalidateQueries({ queryKey: c.circle(t) }), n.invalidateQueries({ queryKey: c.memberships });
|
|
152
153
|
}
|
|
153
154
|
});
|
|
154
155
|
}, F = () => {
|
|
155
|
-
let { apiGatewayUrl: t } = e(),
|
|
156
|
-
return
|
|
156
|
+
let { apiGatewayUrl: t } = e(), n = a();
|
|
157
|
+
return r({
|
|
157
158
|
mutationFn: async (e) => (await s(`mutation ComSetMemberRole($membershipId: ID!, $role: ComMemberRole!) {
|
|
158
159
|
comSetMemberRole(membershipId: $membershipId, role: $role) { ${S} }
|
|
159
160
|
}`, {
|
|
@@ -161,12 +162,12 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
161
162
|
role: e.role
|
|
162
163
|
}, t)).comSetMemberRole,
|
|
163
164
|
onSuccess: (e) => {
|
|
164
|
-
|
|
165
|
+
n.invalidateQueries({ queryKey: c.circle(e.circleId) }), n.invalidateQueries({ queryKey: c.memberships });
|
|
165
166
|
}
|
|
166
167
|
});
|
|
167
168
|
}, I = (t = {}) => {
|
|
168
169
|
let { apiGatewayUrl: n } = e();
|
|
169
|
-
return
|
|
170
|
+
return i({
|
|
170
171
|
queryKey: [...c.memberships, t],
|
|
171
172
|
queryFn: async () => (await s(`query ComListMemberships($circleId: ID, $status: ComMembershipStatus, $pagination: PaginationInput) {
|
|
172
173
|
comListMemberships(circleId: $circleId, status: $status, pagination: $pagination) {
|
|
@@ -180,18 +181,18 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
180
181
|
}, n)).comListMemberships
|
|
181
182
|
});
|
|
182
183
|
}, L = () => {
|
|
183
|
-
let { apiGatewayUrl: t } = e(),
|
|
184
|
-
return
|
|
184
|
+
let { apiGatewayUrl: t } = e(), n = a();
|
|
185
|
+
return r({
|
|
185
186
|
mutationFn: async (e) => (await s(`mutation ComCreateChannel($input: ComCreateChannelInput!) {
|
|
186
187
|
comCreateChannel(input: $input) { ${d} }
|
|
187
188
|
}`, { input: e }, t)).comCreateChannel,
|
|
188
189
|
onSuccess: (e) => {
|
|
189
|
-
|
|
190
|
+
n.invalidateQueries({ queryKey: c.channels(e.circleId) }), n.invalidateQueries({ queryKey: c.circle(e.circleId) });
|
|
190
191
|
}
|
|
191
192
|
});
|
|
192
193
|
}, R = (t = {}) => {
|
|
193
194
|
let { apiGatewayUrl: n } = e();
|
|
194
|
-
return
|
|
195
|
+
return i({
|
|
195
196
|
queryKey: [
|
|
196
197
|
...c.posts(t.channelId ?? "all"),
|
|
197
198
|
t.status,
|
|
@@ -210,7 +211,7 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
210
211
|
});
|
|
211
212
|
}, z = (t) => {
|
|
212
213
|
let { apiGatewayUrl: n } = e();
|
|
213
|
-
return
|
|
214
|
+
return i({
|
|
214
215
|
queryKey: c.post(t ?? ""),
|
|
215
216
|
enabled: !!t,
|
|
216
217
|
queryFn: async () => {
|
|
@@ -225,7 +226,7 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
225
226
|
});
|
|
226
227
|
}, B = (t) => {
|
|
227
228
|
let { apiGatewayUrl: n } = e();
|
|
228
|
-
return
|
|
229
|
+
return i({
|
|
229
230
|
queryKey: [...c.feed, t],
|
|
230
231
|
queryFn: async () => k((await s(`query ComMyFeed($pagination: PaginationInput) {
|
|
231
232
|
comMyFeed(pagination: $pagination) {
|
|
@@ -234,91 +235,119 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
234
235
|
}`, { pagination: u(t) }, n)).comMyFeed, E)
|
|
235
236
|
});
|
|
236
237
|
}, V = () => {
|
|
237
|
-
let { apiGatewayUrl: t } = e(),
|
|
238
|
-
return
|
|
238
|
+
let { apiGatewayUrl: t } = e(), n = a();
|
|
239
|
+
return r({
|
|
239
240
|
mutationFn: async (e) => E((await s(`mutation ComCreatePost($input: ComCreatePostInput!) {
|
|
240
241
|
comCreatePost(input: $input) { ${g} }
|
|
241
242
|
}`, { input: e }, t)).comCreatePost),
|
|
242
243
|
onSuccess: (e) => {
|
|
243
|
-
|
|
244
|
+
n.invalidateQueries({ queryKey: c.posts(e.channelId) }), n.invalidateQueries({ queryKey: c.feed });
|
|
244
245
|
}
|
|
245
246
|
});
|
|
246
247
|
}, H = () => {
|
|
247
|
-
let { apiGatewayUrl: t } = e(),
|
|
248
|
-
return
|
|
248
|
+
let { apiGatewayUrl: t } = e(), n = a();
|
|
249
|
+
return r({
|
|
249
250
|
mutationFn: async (e) => E((await s(`mutation ComUpdatePost($id: ID!, $input: ComUpdatePostInput!) {
|
|
250
251
|
comUpdatePost(id: $id, input: $input) { ${g} }
|
|
251
252
|
}`, e, t)).comUpdatePost),
|
|
252
253
|
onSuccess: (e) => {
|
|
253
|
-
|
|
254
|
+
n.invalidateQueries({ queryKey: c.posts(e.channelId) }), n.invalidateQueries({ queryKey: c.post(e.id) }), n.invalidateQueries({ queryKey: c.feed });
|
|
254
255
|
}
|
|
255
256
|
});
|
|
256
257
|
}, U = () => {
|
|
257
|
-
let { apiGatewayUrl: t } = e(),
|
|
258
|
-
return
|
|
258
|
+
let { apiGatewayUrl: t } = e(), n = a();
|
|
259
|
+
return r({
|
|
259
260
|
mutationFn: async (e) => (await s("mutation ComRemovePost($id: ID!) { comRemovePost(id: $id) }", { id: e.id }, t)).comRemovePost,
|
|
260
261
|
onSuccess: (e, t) => {
|
|
261
|
-
t.channelId &&
|
|
262
|
+
t.channelId && n.invalidateQueries({ queryKey: c.posts(t.channelId) }), n.invalidateQueries({ queryKey: c.feed });
|
|
262
263
|
}
|
|
263
264
|
});
|
|
264
|
-
},
|
|
265
|
-
let { apiGatewayUrl: t } = e(),
|
|
266
|
-
return
|
|
265
|
+
}, te = () => {
|
|
266
|
+
let { apiGatewayUrl: t } = e(), n = a();
|
|
267
|
+
return r({
|
|
267
268
|
mutationFn: async (e) => E((await s(`mutation ComReactToPost($postId: ID!, $type: ComReactionType!) {
|
|
268
269
|
comReactToPost(postId: $postId, type: $type) { ${g} }
|
|
269
270
|
}`, e, t)).comReactToPost),
|
|
270
271
|
onSuccess: (e) => {
|
|
271
|
-
|
|
272
|
+
n.invalidateQueries({ queryKey: c.posts(e.channelId) }), n.invalidateQueries({ queryKey: c.post(e.id) }), n.invalidateQueries({ queryKey: c.feed });
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
}, W = (e) => {
|
|
276
|
+
let t = a();
|
|
277
|
+
n({
|
|
278
|
+
query: "subscription ComPostAdded($channelId: ID!) { comPostAdded(channelId: $channelId) { id } }",
|
|
279
|
+
variables: { channelId: e ?? "" },
|
|
280
|
+
operationName: "ComPostAdded",
|
|
281
|
+
enabled: !!e,
|
|
282
|
+
onData: () => {
|
|
283
|
+
e && t.invalidateQueries({ queryKey: c.posts(e) });
|
|
284
|
+
},
|
|
285
|
+
pollFn: () => {
|
|
286
|
+
if (e) return t.invalidateQueries({ queryKey: c.posts(e) });
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
}, G = (e) => {
|
|
290
|
+
let t = a();
|
|
291
|
+
n({
|
|
292
|
+
query: "subscription ComCommentAdded($postId: ID!) { comCommentAdded(postId: $postId) { id } }",
|
|
293
|
+
variables: { postId: e ?? "" },
|
|
294
|
+
operationName: "ComCommentAdded",
|
|
295
|
+
enabled: !!e,
|
|
296
|
+
onData: () => {
|
|
297
|
+
e && t.invalidateQueries({ queryKey: c.post(e) });
|
|
298
|
+
},
|
|
299
|
+
pollFn: () => {
|
|
300
|
+
if (e) return t.invalidateQueries({ queryKey: c.post(e) });
|
|
272
301
|
}
|
|
273
302
|
});
|
|
274
|
-
},
|
|
303
|
+
}, K = (t) => {
|
|
275
304
|
let { apiGatewayUrl: n } = e();
|
|
276
|
-
return
|
|
305
|
+
return i({
|
|
277
306
|
queryKey: c.comments(t ?? ""),
|
|
278
307
|
enabled: !!t,
|
|
279
308
|
queryFn: async () => w((await s(`query ComListComments($postId: ID!) {
|
|
280
309
|
comListComments(postId: $postId) { ${m(h)} }
|
|
281
310
|
}`, { postId: t }, n)).comListComments)
|
|
282
311
|
});
|
|
283
|
-
},
|
|
284
|
-
let { apiGatewayUrl: t } = e(),
|
|
285
|
-
return
|
|
312
|
+
}, q = () => {
|
|
313
|
+
let { apiGatewayUrl: t } = e(), n = a();
|
|
314
|
+
return r({
|
|
286
315
|
mutationFn: async (e) => (await s(`mutation ComAddComment($input: ComCreateCommentInput!) {
|
|
287
316
|
comAddComment(input: $input) { ${h} }
|
|
288
317
|
}`, { input: e }, t)).comAddComment,
|
|
289
318
|
onSuccess: (e) => {
|
|
290
|
-
|
|
319
|
+
n.invalidateQueries({ queryKey: c.comments(e.postId) }), n.invalidateQueries({ queryKey: c.post(e.postId) }), n.invalidateQueries({ queryKey: c.feed });
|
|
291
320
|
}
|
|
292
321
|
});
|
|
293
|
-
},
|
|
322
|
+
}, J = (t) => {
|
|
294
323
|
let { apiGatewayUrl: n } = e();
|
|
295
|
-
return
|
|
324
|
+
return i({
|
|
296
325
|
queryKey: [...c.follows, t ?? "all"],
|
|
297
326
|
queryFn: async () => w((await s(`query ComMyFollows($targetType: ComFollowTargetType) {
|
|
298
327
|
comMyFollows(targetType: $targetType) { ${m(C)} }
|
|
299
328
|
}`, { targetType: t }, n)).comMyFollows)
|
|
300
329
|
});
|
|
301
|
-
},
|
|
302
|
-
let { apiGatewayUrl: t } = e(),
|
|
303
|
-
return
|
|
330
|
+
}, Y = () => {
|
|
331
|
+
let { apiGatewayUrl: t } = e(), n = a();
|
|
332
|
+
return r({
|
|
304
333
|
mutationFn: async (e) => (await s(`mutation ComFollow($input: ComFollowInput!) {
|
|
305
334
|
comFollow(input: $input) { ${C} }
|
|
306
335
|
}`, { input: e }, t)).comFollow,
|
|
307
336
|
onSuccess: () => {
|
|
308
|
-
|
|
337
|
+
n.invalidateQueries({ queryKey: c.follows }), n.invalidateQueries({ queryKey: c.feed });
|
|
309
338
|
}
|
|
310
339
|
});
|
|
311
|
-
},
|
|
312
|
-
let { apiGatewayUrl: t } = e(),
|
|
313
|
-
return
|
|
340
|
+
}, X = () => {
|
|
341
|
+
let { apiGatewayUrl: t } = e(), n = a();
|
|
342
|
+
return r({
|
|
314
343
|
mutationFn: async (e) => (await s("mutation ComUnfollow($input: ComFollowInput!) { comUnfollow(input: $input) }", { input: e }, t)).comUnfollow,
|
|
315
344
|
onSuccess: () => {
|
|
316
|
-
|
|
345
|
+
n.invalidateQueries({ queryKey: c.follows }), n.invalidateQueries({ queryKey: c.feed });
|
|
317
346
|
}
|
|
318
347
|
});
|
|
319
|
-
},
|
|
348
|
+
}, Z = (t = {}) => {
|
|
320
349
|
let { apiGatewayUrl: n } = e();
|
|
321
|
-
return
|
|
350
|
+
return i({
|
|
322
351
|
queryKey: [...c.events, t],
|
|
323
352
|
queryFn: async () => k((await s(`query ComListEvents($circleId: ID, $status: ComEventStatus, $pagination: PaginationInput) {
|
|
324
353
|
comListEvents(circleId: $circleId, status: $status, pagination: $pagination) {
|
|
@@ -330,9 +359,9 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
330
359
|
pagination: u(t.pagination)
|
|
331
360
|
}, n)).comListEvents, O)
|
|
332
361
|
});
|
|
333
|
-
},
|
|
362
|
+
}, Q = (t) => {
|
|
334
363
|
let { apiGatewayUrl: n } = e();
|
|
335
|
-
return
|
|
364
|
+
return i({
|
|
336
365
|
queryKey: c.event(t ?? ""),
|
|
337
366
|
enabled: !!t,
|
|
338
367
|
queryFn: async () => {
|
|
@@ -345,37 +374,57 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
345
374
|
return e.comEvent ? O(e.comEvent) : null;
|
|
346
375
|
}
|
|
347
376
|
});
|
|
348
|
-
},
|
|
349
|
-
let
|
|
350
|
-
|
|
377
|
+
}, ne = (e) => {
|
|
378
|
+
let t = a(), r = () => {
|
|
379
|
+
if (e) return t.invalidateQueries({ queryKey: c.event(e) });
|
|
380
|
+
};
|
|
381
|
+
n({
|
|
382
|
+
query: "subscription ComEventUpdated($eventId: ID!) { comEventUpdated(eventId: $eventId) { id } }",
|
|
383
|
+
variables: { eventId: e ?? "" },
|
|
384
|
+
operationName: "ComEventUpdated",
|
|
385
|
+
enabled: !!e,
|
|
386
|
+
onData: r,
|
|
387
|
+
pollFn: r
|
|
388
|
+
}), n({
|
|
389
|
+
query: "subscription ComEventRsvpAdded($eventId: ID!) { comEventRsvpAdded(eventId: $eventId) { id } }",
|
|
390
|
+
variables: { eventId: e ?? "" },
|
|
391
|
+
operationName: "ComEventRsvpAdded",
|
|
392
|
+
enabled: !!e,
|
|
393
|
+
onData: r,
|
|
394
|
+
pollFn: () => {},
|
|
395
|
+
pollIntervalMs: 3e4
|
|
396
|
+
});
|
|
397
|
+
}, re = () => {
|
|
398
|
+
let { apiGatewayUrl: t } = e(), n = a();
|
|
399
|
+
return r({
|
|
351
400
|
mutationFn: async (e) => O((await s(`mutation ComCreateEvent($input: ComCreateEventInput!) {
|
|
352
401
|
comCreateEvent(input: $input) { ${b} }
|
|
353
402
|
}`, { input: e }, t)).comCreateEvent),
|
|
354
|
-
onSuccess: () =>
|
|
403
|
+
onSuccess: () => n.invalidateQueries({ queryKey: c.events })
|
|
355
404
|
});
|
|
356
|
-
},
|
|
357
|
-
let { apiGatewayUrl: t } = e(),
|
|
358
|
-
return
|
|
405
|
+
}, ie = () => {
|
|
406
|
+
let { apiGatewayUrl: t } = e(), n = a();
|
|
407
|
+
return r({
|
|
359
408
|
mutationFn: async (e) => O((await s(`mutation ComTransitionEvent($id: ID!, $status: ComEventStatus!) {
|
|
360
409
|
comTransitionEvent(id: $id, status: $status) { ${b} }
|
|
361
410
|
}`, e, t)).comTransitionEvent),
|
|
362
411
|
onSuccess: (e) => {
|
|
363
|
-
|
|
412
|
+
n.invalidateQueries({ queryKey: c.events }), n.invalidateQueries({ queryKey: c.event(e.id) });
|
|
364
413
|
}
|
|
365
414
|
});
|
|
366
|
-
},
|
|
367
|
-
let { apiGatewayUrl: t } = e(),
|
|
368
|
-
return
|
|
415
|
+
}, ae = () => {
|
|
416
|
+
let { apiGatewayUrl: t } = e(), n = a();
|
|
417
|
+
return r({
|
|
369
418
|
mutationFn: async (e) => (await s(`mutation ComRsvpEvent($eventId: ID!, $status: ComRsvpStatus!, $note: String) {
|
|
370
419
|
comRsvpEvent(eventId: $eventId, status: $status, note: $note) { ${y} }
|
|
371
420
|
}`, e, t)).comRsvpEvent,
|
|
372
421
|
onSuccess: (e) => {
|
|
373
|
-
|
|
422
|
+
n.invalidateQueries({ queryKey: c.events }), n.invalidateQueries({ queryKey: c.event(e.eventId) });
|
|
374
423
|
}
|
|
375
424
|
});
|
|
376
|
-
},
|
|
377
|
-
let { apiGatewayUrl:
|
|
378
|
-
return
|
|
425
|
+
}, oe = (t, n) => {
|
|
426
|
+
let { apiGatewayUrl: r } = e();
|
|
427
|
+
return i({
|
|
379
428
|
queryKey: [...c.polls(t ?? ""), n ?? "all"],
|
|
380
429
|
enabled: !!t,
|
|
381
430
|
queryFn: async () => w((await s(`query ComListPolls($circleId: ID!, $status: ComPollStatus) {
|
|
@@ -383,25 +432,25 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
383
432
|
}`, {
|
|
384
433
|
circleId: t,
|
|
385
434
|
status: n
|
|
386
|
-
},
|
|
435
|
+
}, r)).comListPolls).map(D)
|
|
387
436
|
});
|
|
388
|
-
},
|
|
389
|
-
let { apiGatewayUrl: t } = e(),
|
|
390
|
-
return
|
|
437
|
+
}, $ = () => {
|
|
438
|
+
let { apiGatewayUrl: t } = e(), n = a();
|
|
439
|
+
return r({
|
|
391
440
|
mutationFn: async (e) => D((await s(`mutation ComCreatePoll($input: ComCreatePollInput!) {
|
|
392
441
|
comCreatePoll(input: $input) { ${v} }
|
|
393
442
|
}`, { input: e }, t)).comCreatePoll),
|
|
394
|
-
onSuccess: (e) =>
|
|
443
|
+
onSuccess: (e) => n.invalidateQueries({ queryKey: c.polls(e.circleId) })
|
|
395
444
|
});
|
|
396
|
-
},
|
|
397
|
-
let { apiGatewayUrl: t } = e(),
|
|
398
|
-
return
|
|
445
|
+
}, se = () => {
|
|
446
|
+
let { apiGatewayUrl: t } = e(), n = a();
|
|
447
|
+
return r({
|
|
399
448
|
mutationFn: async (e) => D((await s(`mutation ComClosePoll($id: ID!) { comClosePoll(id: $id) { ${v} } }`, { id: e }, t)).comClosePoll),
|
|
400
|
-
onSuccess: (e) =>
|
|
449
|
+
onSuccess: (e) => n.invalidateQueries({ queryKey: c.polls(e.circleId) })
|
|
401
450
|
});
|
|
402
|
-
},
|
|
403
|
-
let { apiGatewayUrl: t } = e(),
|
|
404
|
-
return
|
|
451
|
+
}, ce = () => {
|
|
452
|
+
let { apiGatewayUrl: t } = e(), n = a();
|
|
453
|
+
return r({
|
|
405
454
|
mutationFn: async (e) => (await s(`mutation ComVotePoll($pollId: ID!, $optionId: ID!) {
|
|
406
455
|
comVotePoll(pollId: $pollId, optionId: $optionId) { ${_} }
|
|
407
456
|
}`, {
|
|
@@ -409,12 +458,12 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
409
458
|
optionId: e.optionId
|
|
410
459
|
}, t)).comVotePoll,
|
|
411
460
|
onSuccess: (e, t) => {
|
|
412
|
-
t.circleId &&
|
|
461
|
+
t.circleId && n.invalidateQueries({ queryKey: c.polls(t.circleId) }), n.invalidateQueries({ queryKey: c.poll(t.pollId) });
|
|
413
462
|
}
|
|
414
463
|
});
|
|
415
|
-
},
|
|
464
|
+
}, le = (t = {}) => {
|
|
416
465
|
let { apiGatewayUrl: n } = e();
|
|
417
|
-
return
|
|
466
|
+
return i({
|
|
418
467
|
queryKey: [...c.profiles, t],
|
|
419
468
|
queryFn: async () => (await s(`query ComListProfiles($discoverable: Boolean, $pagination: PaginationInput) {
|
|
420
469
|
comListProfiles(discoverable: $discoverable, pagination: $pagination) {
|
|
@@ -426,9 +475,9 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
426
475
|
pagination: u(t.pagination)
|
|
427
476
|
}, n)).comListProfiles
|
|
428
477
|
});
|
|
429
|
-
},
|
|
478
|
+
}, ue = (t) => {
|
|
430
479
|
let { apiGatewayUrl: n } = e();
|
|
431
|
-
return
|
|
480
|
+
return i({
|
|
432
481
|
queryKey: c.profile(t ?? ""),
|
|
433
482
|
enabled: !!t,
|
|
434
483
|
staleTime: 600 * 1e3,
|
|
@@ -436,18 +485,18 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
436
485
|
comProfile(memberId: $memberId) { ${x} }
|
|
437
486
|
}`, { memberId: t }, n)).comProfile
|
|
438
487
|
});
|
|
439
|
-
},
|
|
440
|
-
let { apiGatewayUrl: t } = e(),
|
|
441
|
-
return
|
|
488
|
+
}, de = () => {
|
|
489
|
+
let { apiGatewayUrl: t } = e(), n = a();
|
|
490
|
+
return r({
|
|
442
491
|
mutationFn: async (e) => (await s(`mutation ComUpsertProfile($input: ComUpsertProfileInput!) {
|
|
443
492
|
comUpsertProfile(input: $input) { ${x} }
|
|
444
493
|
}`, { input: e }, t)).comUpsertProfile,
|
|
445
494
|
onSuccess: (e) => {
|
|
446
|
-
|
|
495
|
+
n.invalidateQueries({ queryKey: c.profiles }), n.invalidateQueries({ queryKey: c.profile(e.memberId) });
|
|
447
496
|
}
|
|
448
497
|
});
|
|
449
498
|
};
|
|
450
499
|
//#endregion
|
|
451
|
-
export {
|
|
500
|
+
export { q as useComAddComment, j as useComCircle, A as useComCircles, se as useComClosePoll, G as useComCommentAddedLive, K as useComComments, L as useComCreateChannel, M as useComCreateCircle, re as useComCreateEvent, $ as useComCreatePoll, V as useComCreatePost, Q as useComEvent, ne as useComEventLive, Z as useComEvents, Y as useComFollow, N as useComJoinCircle, P as useComLeaveCircle, I as useComMemberships, B as useComMyFeed, J as useComMyFollows, oe as useComPolls, z as useComPost, W as useComPostAddedLive, R as useComPosts, ue as useComProfile, le as useComProfiles, te as useComReactToPost, U as useComRemovePost, ae as useComRsvpEvent, F as useComSetMemberRole, ie as useComTransitionEvent, X as useComUnfollow, H as useComUpdatePost, de as useComUpsertProfile, ce as useComVotePoll };
|
|
452
501
|
|
|
453
502
|
//# sourceMappingURL=useComradeCircleApi.js.map
|