@burdenoff/microfe-comradecircle 2026.704.1 → 2026.704.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/comradecircle/components/Avatar.js +52 -17
  2. package/dist/comradecircle/components/Avatar.js.map +1 -1
  3. package/dist/comradecircle/components/AvatarUploadField.js +91 -0
  4. package/dist/comradecircle/components/AvatarUploadField.js.map +1 -0
  5. package/dist/comradecircle/components/CircleCard.js +55 -52
  6. package/dist/comradecircle/components/CircleCard.js.map +1 -1
  7. package/dist/comradecircle/components/CommentThread.js +80 -64
  8. package/dist/comradecircle/components/CommentThread.js.map +1 -1
  9. package/dist/comradecircle/components/CreateCircleDialog.js +74 -63
  10. package/dist/comradecircle/components/CreateCircleDialog.js.map +1 -1
  11. package/dist/comradecircle/components/EventCard.js +84 -58
  12. package/dist/comradecircle/components/EventCard.js.map +1 -1
  13. package/dist/comradecircle/components/FileImage.js +20 -0
  14. package/dist/comradecircle/components/FileImage.js.map +1 -0
  15. package/dist/comradecircle/components/ImageAttachments.js +97 -0
  16. package/dist/comradecircle/components/ImageAttachments.js.map +1 -0
  17. package/dist/comradecircle/components/MemberIdentity.js +4 -2
  18. package/dist/comradecircle/components/MemberIdentity.js.map +1 -1
  19. package/dist/comradecircle/components/PollCard.js +65 -44
  20. package/dist/comradecircle/components/PollCard.js.map +1 -1
  21. package/dist/comradecircle/components/PostCard.js +8 -15
  22. package/dist/comradecircle/components/PostCard.js.map +1 -1
  23. package/dist/comradecircle/components/PostComposer.js +45 -35
  24. package/dist/comradecircle/components/PostComposer.js.map +1 -1
  25. package/dist/comradecircle/components/ReactionBar.js +1 -1
  26. package/dist/comradecircle/components/ReactionBar.js.map +1 -1
  27. package/dist/comradecircle/components/StateViews.js +1 -16
  28. package/dist/comradecircle/components/StateViews.js.map +1 -1
  29. package/dist/comradecircle/components/StatusBadge.js +1 -1
  30. package/dist/comradecircle/components/StatusBadge.js.map +1 -1
  31. package/dist/comradecircle/hooks/index.js +1 -0
  32. package/dist/comradecircle/hooks/useComradeCircleApi.js +244 -241
  33. package/dist/comradecircle/hooks/useComradeCircleApi.js.map +1 -1
  34. package/dist/comradecircle/hooks/useFiles.js +78 -0
  35. package/dist/comradecircle/hooks/useFiles.js.map +1 -0
  36. package/dist/comradecircle/lib/graphql-cache.js +9 -0
  37. package/dist/comradecircle/lib/graphql-cache.js.map +1 -0
  38. package/dist/comradecircle/pages/FeedPage.js +79 -33
  39. package/dist/comradecircle/pages/FeedPage.js.map +1 -1
  40. package/dist/comradecircle/pages/circles/CircleDetailPage.js +354 -242
  41. package/dist/comradecircle/pages/circles/CircleDetailPage.js.map +1 -1
  42. package/dist/comradecircle/pages/circles/CirclesPage.js +97 -47
  43. package/dist/comradecircle/pages/circles/CirclesPage.js.map +1 -1
  44. package/dist/comradecircle/pages/events/EventDetailPage.js +193 -126
  45. package/dist/comradecircle/pages/events/EventDetailPage.js.map +1 -1
  46. package/dist/comradecircle/pages/events/EventsPage.js +74 -34
  47. package/dist/comradecircle/pages/events/EventsPage.js.map +1 -1
  48. package/dist/comradecircle/pages/members/MemberProfilePage.js +154 -81
  49. package/dist/comradecircle/pages/members/MemberProfilePage.js.map +1 -1
  50. package/dist/comradecircle/pages/members/MembersPage.js +141 -71
  51. package/dist/comradecircle/pages/members/MembersPage.js.map +1 -1
  52. package/dist/comradecircle/pages/profile/MyProfilePage.js +298 -191
  53. package/dist/comradecircle/pages/profile/MyProfilePage.js.map +1 -1
  54. package/package.json +1 -1
@@ -1,20 +1,23 @@
1
1
  import { useComradeCircle as e } from "../context/ComradeCircleContext.js";
2
2
  import "../context/index.js";
3
- import { useMutation as t, useQuery as n, useQueryClient as r } from "@tanstack/react-query";
4
- import { graphqlFetch as i } from "@burdenoff/fe-libs/shared/graphql";
3
+ import { clearGraphqlResponseCache as t } from "../lib/graphql-cache.js";
4
+ import { useMutation as n, useQuery as r, useQueryClient as i } from "@tanstack/react-query";
5
+ import { graphqlFetch as a } from "@burdenoff/fe-libs/shared/graphql";
5
6
  //#region src/comradecircle/hooks/useComradeCircleApi.ts
6
- var a = async (e, t, n) => {
7
- let r = await i({
7
+ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
8
+ let i = o(e);
9
+ i && t();
10
+ let s = await a({
8
11
  gateway: "workspace",
9
- baseUrl: n,
12
+ baseUrl: r,
10
13
  query: e,
11
- variables: t,
14
+ variables: n,
12
15
  workspaceToken: !0
13
16
  });
14
- if (r.errors?.length) throw Error(r.errors[0]?.message ?? "GraphQL request failed");
15
- if (!r.data) throw Error("GraphQL response did not include data");
16
- return r.data;
17
- }, o = {
17
+ if (i && t(), s.errors?.length) throw Error(s.errors[0]?.message ?? "GraphQL request failed");
18
+ if (!s.data) throw Error("GraphQL response did not include data");
19
+ return s.data;
20
+ }, c = {
18
21
  circles: ["comradecircle", "circles"],
19
22
  circle: (e) => [
20
23
  "comradecircle",
@@ -66,351 +69,351 @@ var a = async (e, t, n) => {
66
69
  e
67
70
  ],
68
71
  memberships: ["comradecircle", "memberships"]
69
- }, s = { limit: 50 }, c = (e) => {
70
- let t = e ?? s, n = { limit: t.limit ?? s.limit };
72
+ }, l = { limit: 50 }, u = (e) => {
73
+ let t = e ?? l, n = { limit: t.limit ?? l.limit };
71
74
  return t.offset != null && (n.offset = t.offset), t.cursor != null && (n.cursor = t.cursor), n;
72
- }, l = "\n id workspaceId circleId name slug description type visibility position isArchived\n createdAt updatedAt\n", u = "\n id workspaceId name slug description topic tags status visibility memberCount\n avatar { id } createdAt updatedAt\n", d = "id postId memberId type createdAt", f = "\n id workspaceId postId parentId authorId body isHidden createdAt updatedAt\n", p = `
75
+ }, d = "\n id workspaceId circleId name slug description type visibility position isArchived\n createdAt updatedAt\n", f = "\n id workspaceId name slug description topic tags status visibility memberCount\n avatar { id } createdAt updatedAt\n", p = "id postId memberId type createdAt", m = "\n id workspaceId postId parentId authorId body isHidden createdAt updatedAt\n", h = `
73
76
  id workspaceId channelId authorId body status tags attachmentFileIds isPinned
74
- reactionCount commentCount reactions { ${d} } createdAt updatedAt
75
- `, m = "id workspaceId pollId label position voteCount createdAt", h = `
77
+ reactionCount commentCount reactions { ${p} } createdAt updatedAt
78
+ `, g = "id workspaceId pollId label position voteCount createdAt", _ = `
76
79
  id workspaceId circleId question allowMultiple isAnonymous status closesAt
77
- options { ${m} } createdAt updatedAt
78
- `, g = "\n id workspaceId eventId memberId status note createdAt updatedAt\n", _ = "\n id workspaceId circleId hostId title description mode status location joinUrl\n capacity startsAt endsAt tags rsvpCount createdAt updatedAt\n", v = "\n id workspaceId memberId displayName headline bio avatar { id } interests skills\n presence discoverable createdAt updatedAt\n", y = "\n id workspaceId circleId memberId role status joinedAt createdAt updatedAt\n", b = "\n id workspaceId followerId targetId targetType muted createdAt updatedAt\n", x = (t = {}) => {
79
- let { apiGatewayUrl: r } = e();
80
- return n({
81
- queryKey: [...o.circles, t],
82
- queryFn: async () => (await a(`query ComListCircles($status: ComCircleStatus, $visibility: ComCircleVisibility, $pagination: PaginationInput) {
80
+ options { ${g} } createdAt updatedAt
81
+ `, v = "\n id workspaceId eventId memberId status note createdAt updatedAt\n", y = "\n id workspaceId circleId hostId title description mode status location joinUrl\n capacity startsAt endsAt tags rsvpCount createdAt updatedAt\n", b = "\n id workspaceId memberId displayName headline bio avatar { id } interests skills\n presence discoverable createdAt updatedAt\n", x = "\n id workspaceId circleId memberId role status joinedAt createdAt updatedAt\n", S = "\n id workspaceId followerId targetId targetType muted createdAt updatedAt\n", C = (t = {}) => {
82
+ let { apiGatewayUrl: n } = e();
83
+ return r({
84
+ queryKey: [...c.circles, t],
85
+ queryFn: async () => (await s(`query ComListCircles($status: ComCircleStatus, $visibility: ComCircleVisibility, $pagination: PaginationInput) {
83
86
  comListCircles(status: $status, visibility: $visibility, pagination: $pagination) {
84
- items { ${u} }
87
+ items { ${f} channels { id } }
85
88
  pageInfo { cursor hasMore }
86
89
  }
87
90
  }`, {
88
91
  status: t.status,
89
92
  visibility: t.visibility,
90
- pagination: c(t.pagination)
91
- }, r)).comListCircles
93
+ pagination: u(t.pagination)
94
+ }, n)).comListCircles
92
95
  });
93
- }, S = (t) => {
94
- let { apiGatewayUrl: r } = e();
95
- return n({
96
- queryKey: o.circle(t ?? ""),
96
+ }, w = (t) => {
97
+ let { apiGatewayUrl: n } = e();
98
+ return r({
99
+ queryKey: c.circle(t ?? ""),
97
100
  enabled: !!t,
98
- queryFn: async () => (await a(`query ComCircle($id: ID!) {
101
+ queryFn: async () => (await s(`query ComCircle($id: ID!) {
99
102
  comCircle(id: $id) {
100
- ${u}
101
- channels { ${l} }
102
- memberships { ${y} }
103
+ ${f}
104
+ channels { ${d} }
105
+ memberships { ${x} }
103
106
  }
104
- }`, { id: t }, r)).comCircle
105
- });
106
- }, C = () => {
107
- let { apiGatewayUrl: n } = e(), i = r();
108
- return t({
109
- mutationFn: async (e) => (await a(`mutation ComCreateCircle($input: ComCreateCircleInput!) {
110
- comCreateCircle(input: $input) { ${u} }
111
- }`, { input: e }, n)).comCreateCircle,
112
- onSuccess: () => i.invalidateQueries({ queryKey: o.circles })
113
- });
114
- }, w = () => {
115
- let { apiGatewayUrl: n } = e(), i = r();
116
- return t({
117
- mutationFn: async (e) => (await a(`mutation ComJoinCircle($circleId: ID!) {
118
- comJoinCircle(circleId: $circleId) { ${y} }
119
- }`, { circleId: e }, n)).comJoinCircle,
107
+ }`, { id: t }, n)).comCircle
108
+ });
109
+ }, T = () => {
110
+ let { apiGatewayUrl: t } = e(), r = i();
111
+ return n({
112
+ mutationFn: async (e) => (await s(`mutation ComCreateCircle($input: ComCreateCircleInput!) {
113
+ comCreateCircle(input: $input) { ${f} }
114
+ }`, { input: e }, t)).comCreateCircle,
115
+ onSuccess: () => r.invalidateQueries({ queryKey: c.circles })
116
+ });
117
+ }, E = () => {
118
+ let { apiGatewayUrl: t } = e(), r = i();
119
+ return n({
120
+ mutationFn: async (e) => (await s(`mutation ComJoinCircle($circleId: ID!) {
121
+ comJoinCircle(circleId: $circleId) { ${x} }
122
+ }`, { circleId: e }, t)).comJoinCircle,
120
123
  onSuccess: (e) => {
121
- i.invalidateQueries({ queryKey: o.circles }), i.invalidateQueries({ queryKey: o.circle(e.circleId) }), i.invalidateQueries({ queryKey: o.memberships });
124
+ r.invalidateQueries({ queryKey: c.circles }), r.invalidateQueries({ queryKey: c.circle(e.circleId) }), r.invalidateQueries({ queryKey: c.memberships });
122
125
  }
123
126
  });
124
- }, T = () => {
125
- let { apiGatewayUrl: n } = e(), i = r();
126
- return t({
127
- mutationFn: async (e) => (await a("mutation ComLeaveCircle($circleId: ID!) { comLeaveCircle(circleId: $circleId) }", { circleId: e }, n)).comLeaveCircle,
127
+ }, D = () => {
128
+ let { apiGatewayUrl: t } = e(), r = i();
129
+ return n({
130
+ mutationFn: async (e) => (await s("mutation ComLeaveCircle($circleId: ID!) { comLeaveCircle(circleId: $circleId) }", { circleId: e }, t)).comLeaveCircle,
128
131
  onSuccess: (e, t) => {
129
- i.invalidateQueries({ queryKey: o.circles }), i.invalidateQueries({ queryKey: o.circle(t) }), i.invalidateQueries({ queryKey: o.memberships });
132
+ r.invalidateQueries({ queryKey: c.circles }), r.invalidateQueries({ queryKey: c.circle(t) }), r.invalidateQueries({ queryKey: c.memberships });
130
133
  }
131
134
  });
132
- }, E = () => {
133
- let { apiGatewayUrl: n } = e(), i = r();
134
- return t({
135
- mutationFn: async (e) => (await a(`mutation ComSetMemberRole($membershipId: ID!, $role: ComMemberRole!) {
136
- comSetMemberRole(membershipId: $membershipId, role: $role) { ${y} }
135
+ }, O = () => {
136
+ let { apiGatewayUrl: t } = e(), r = i();
137
+ return n({
138
+ mutationFn: async (e) => (await s(`mutation ComSetMemberRole($membershipId: ID!, $role: ComMemberRole!) {
139
+ comSetMemberRole(membershipId: $membershipId, role: $role) { ${x} }
137
140
  }`, {
138
141
  membershipId: e.membershipId,
139
142
  role: e.role
140
- }, n)).comSetMemberRole,
143
+ }, t)).comSetMemberRole,
141
144
  onSuccess: (e) => {
142
- i.invalidateQueries({ queryKey: o.circle(e.circleId) }), i.invalidateQueries({ queryKey: o.memberships });
145
+ r.invalidateQueries({ queryKey: c.circle(e.circleId) }), r.invalidateQueries({ queryKey: c.memberships });
143
146
  }
144
147
  });
145
- }, D = (t = {}) => {
146
- let { apiGatewayUrl: r } = e();
147
- return n({
148
- queryKey: [...o.memberships, t],
149
- queryFn: async () => (await a(`query ComListMemberships($circleId: ID, $status: ComMembershipStatus, $pagination: PaginationInput) {
148
+ }, k = (t = {}) => {
149
+ let { apiGatewayUrl: n } = e();
150
+ return r({
151
+ queryKey: [...c.memberships, t],
152
+ queryFn: async () => (await s(`query ComListMemberships($circleId: ID, $status: ComMembershipStatus, $pagination: PaginationInput) {
150
153
  comListMemberships(circleId: $circleId, status: $status, pagination: $pagination) {
151
- items { ${y} }
154
+ items { ${x} }
152
155
  pageInfo { cursor hasMore }
153
156
  }
154
157
  }`, {
155
158
  circleId: t.circleId,
156
159
  status: t.status,
157
- pagination: c(t.pagination)
158
- }, r)).comListMemberships
160
+ pagination: u(t.pagination)
161
+ }, n)).comListMemberships
159
162
  });
160
- }, O = () => {
161
- let { apiGatewayUrl: n } = e(), i = r();
162
- return t({
163
- mutationFn: async (e) => (await a(`mutation ComCreateChannel($input: ComCreateChannelInput!) {
164
- comCreateChannel(input: $input) { ${l} }
165
- }`, { input: e }, n)).comCreateChannel,
163
+ }, A = () => {
164
+ let { apiGatewayUrl: t } = e(), r = i();
165
+ return n({
166
+ mutationFn: async (e) => (await s(`mutation ComCreateChannel($input: ComCreateChannelInput!) {
167
+ comCreateChannel(input: $input) { ${d} }
168
+ }`, { input: e }, t)).comCreateChannel,
166
169
  onSuccess: (e) => {
167
- i.invalidateQueries({ queryKey: o.channels(e.circleId) }), i.invalidateQueries({ queryKey: o.circle(e.circleId) });
170
+ r.invalidateQueries({ queryKey: c.channels(e.circleId) }), r.invalidateQueries({ queryKey: c.circle(e.circleId) });
168
171
  }
169
172
  });
170
- }, k = (t = {}) => {
171
- let { apiGatewayUrl: r } = e();
172
- return n({
173
+ }, j = (t = {}) => {
174
+ let { apiGatewayUrl: n } = e();
175
+ return r({
173
176
  queryKey: [
174
- ...o.posts(t.channelId ?? "all"),
177
+ ...c.posts(t.channelId ?? "all"),
175
178
  t.status,
176
179
  t.pagination
177
180
  ],
178
181
  enabled: !!t.channelId,
179
- queryFn: async () => (await a(`query ComListPosts($channelId: ID, $status: ComPostStatus, $pagination: PaginationInput) {
182
+ queryFn: async () => (await s(`query ComListPosts($channelId: ID, $status: ComPostStatus, $pagination: PaginationInput) {
180
183
  comListPosts(channelId: $channelId, status: $status, pagination: $pagination) {
181
- items { ${p} }
184
+ items { ${h} }
182
185
  pageInfo { cursor hasMore }
183
186
  }
184
187
  }`, {
185
188
  channelId: t.channelId,
186
189
  status: t.status,
187
- pagination: c(t.pagination)
188
- }, r)).comListPosts
189
- });
190
- }, A = (t) => {
191
- let { apiGatewayUrl: r } = e();
192
- return n({
193
- queryKey: [...o.feed, t],
194
- queryFn: async () => (await a(`query ComMyFeed($pagination: PaginationInput) {
190
+ pagination: u(t.pagination)
191
+ }, n)).comListPosts
192
+ });
193
+ }, M = (t) => {
194
+ let { apiGatewayUrl: n } = e();
195
+ return r({
196
+ queryKey: [...c.feed, t],
197
+ queryFn: async () => (await s(`query ComMyFeed($pagination: PaginationInput) {
195
198
  comMyFeed(pagination: $pagination) {
196
- items { ${p} }
199
+ items { ${h} }
197
200
  pageInfo { cursor hasMore }
198
201
  }
199
- }`, { pagination: c(t) }, r)).comMyFeed
200
- });
201
- }, j = () => {
202
- let { apiGatewayUrl: n } = e(), i = r();
203
- return t({
204
- mutationFn: async (e) => (await a(`mutation ComCreatePost($input: ComCreatePostInput!) {
205
- comCreatePost(input: $input) { ${p} }
206
- }`, { input: e }, n)).comCreatePost,
202
+ }`, { pagination: u(t) }, n)).comMyFeed
203
+ });
204
+ }, N = () => {
205
+ let { apiGatewayUrl: t } = e(), r = i();
206
+ return n({
207
+ mutationFn: async (e) => (await s(`mutation ComCreatePost($input: ComCreatePostInput!) {
208
+ comCreatePost(input: $input) { ${h} }
209
+ }`, { input: e }, t)).comCreatePost,
207
210
  onSuccess: (e) => {
208
- i.invalidateQueries({ queryKey: o.posts(e.channelId) }), i.invalidateQueries({ queryKey: o.feed });
211
+ r.invalidateQueries({ queryKey: c.posts(e.channelId) }), r.invalidateQueries({ queryKey: c.feed });
209
212
  }
210
213
  });
211
- }, M = () => {
212
- let { apiGatewayUrl: n } = e(), i = r();
213
- return t({
214
- mutationFn: async (e) => (await a(`mutation ComUpdatePost($id: ID!, $input: ComUpdatePostInput!) {
215
- comUpdatePost(id: $id, input: $input) { ${p} }
216
- }`, e, n)).comUpdatePost,
214
+ }, P = () => {
215
+ let { apiGatewayUrl: t } = e(), r = i();
216
+ return n({
217
+ mutationFn: async (e) => (await s(`mutation ComUpdatePost($id: ID!, $input: ComUpdatePostInput!) {
218
+ comUpdatePost(id: $id, input: $input) { ${h} }
219
+ }`, e, t)).comUpdatePost,
217
220
  onSuccess: (e) => {
218
- i.invalidateQueries({ queryKey: o.posts(e.channelId) }), i.invalidateQueries({ queryKey: o.post(e.id) }), i.invalidateQueries({ queryKey: o.feed });
221
+ r.invalidateQueries({ queryKey: c.posts(e.channelId) }), r.invalidateQueries({ queryKey: c.post(e.id) }), r.invalidateQueries({ queryKey: c.feed });
219
222
  }
220
223
  });
221
- }, N = () => {
222
- let { apiGatewayUrl: n } = e(), i = r();
223
- return t({
224
- mutationFn: async (e) => (await a("mutation ComRemovePost($id: ID!) { comRemovePost(id: $id) }", { id: e.id }, n)).comRemovePost,
224
+ }, F = () => {
225
+ let { apiGatewayUrl: t } = e(), r = i();
226
+ return n({
227
+ mutationFn: async (e) => (await s("mutation ComRemovePost($id: ID!) { comRemovePost(id: $id) }", { id: e.id }, t)).comRemovePost,
225
228
  onSuccess: (e, t) => {
226
- t.channelId && i.invalidateQueries({ queryKey: o.posts(t.channelId) }), i.invalidateQueries({ queryKey: o.feed });
229
+ t.channelId && r.invalidateQueries({ queryKey: c.posts(t.channelId) }), r.invalidateQueries({ queryKey: c.feed });
227
230
  }
228
231
  });
229
- }, P = () => {
230
- let { apiGatewayUrl: n } = e(), i = r();
231
- return t({
232
- mutationFn: async (e) => (await a(`mutation ComReactToPost($postId: ID!, $type: ComReactionType!) {
233
- comReactToPost(postId: $postId, type: $type) { ${p} }
234
- }`, e, n)).comReactToPost,
232
+ }, I = () => {
233
+ let { apiGatewayUrl: t } = e(), r = i();
234
+ return n({
235
+ mutationFn: async (e) => (await s(`mutation ComReactToPost($postId: ID!, $type: ComReactionType!) {
236
+ comReactToPost(postId: $postId, type: $type) { ${h} }
237
+ }`, e, t)).comReactToPost,
235
238
  onSuccess: (e) => {
236
- i.invalidateQueries({ queryKey: o.posts(e.channelId) }), i.invalidateQueries({ queryKey: o.post(e.id) }), i.invalidateQueries({ queryKey: o.feed });
239
+ r.invalidateQueries({ queryKey: c.posts(e.channelId) }), r.invalidateQueries({ queryKey: c.post(e.id) }), r.invalidateQueries({ queryKey: c.feed });
237
240
  }
238
241
  });
239
- }, F = (t) => {
240
- let { apiGatewayUrl: r } = e();
241
- return n({
242
- queryKey: o.comments(t ?? ""),
242
+ }, L = (t) => {
243
+ let { apiGatewayUrl: n } = e();
244
+ return r({
245
+ queryKey: c.comments(t ?? ""),
243
246
  enabled: !!t,
244
- queryFn: async () => (await a(`query ComListComments($postId: ID!) {
245
- comListComments(postId: $postId) { ${f} }
246
- }`, { postId: t }, r)).comListComments
247
+ queryFn: async () => (await s(`query ComListComments($postId: ID!) {
248
+ comListComments(postId: $postId) { ${m} }
249
+ }`, { postId: t }, n)).comListComments
247
250
  });
248
- }, I = () => {
249
- let { apiGatewayUrl: n } = e(), i = r();
250
- return t({
251
- mutationFn: async (e) => (await a(`mutation ComAddComment($input: ComCreateCommentInput!) {
252
- comAddComment(input: $input) { ${f} }
253
- }`, { input: e }, n)).comAddComment,
251
+ }, R = () => {
252
+ let { apiGatewayUrl: t } = e(), r = i();
253
+ return n({
254
+ mutationFn: async (e) => (await s(`mutation ComAddComment($input: ComCreateCommentInput!) {
255
+ comAddComment(input: $input) { ${m} }
256
+ }`, { input: e }, t)).comAddComment,
254
257
  onSuccess: (e) => {
255
- i.invalidateQueries({ queryKey: o.comments(e.postId) }), i.invalidateQueries({ queryKey: o.post(e.postId) }), i.invalidateQueries({ queryKey: o.feed });
258
+ r.invalidateQueries({ queryKey: c.comments(e.postId) }), r.invalidateQueries({ queryKey: c.post(e.postId) }), r.invalidateQueries({ queryKey: c.feed });
256
259
  }
257
260
  });
258
- }, L = (t) => {
259
- let { apiGatewayUrl: r } = e();
260
- return n({
261
- queryKey: [...o.follows, t ?? "all"],
262
- queryFn: async () => (await a(`query ComMyFollows($targetType: ComFollowTargetType) {
263
- comMyFollows(targetType: $targetType) { ${b} }
264
- }`, { targetType: t }, r)).comMyFollows
261
+ }, z = (t) => {
262
+ let { apiGatewayUrl: n } = e();
263
+ return r({
264
+ queryKey: [...c.follows, t ?? "all"],
265
+ queryFn: async () => (await s(`query ComMyFollows($targetType: ComFollowTargetType) {
266
+ comMyFollows(targetType: $targetType) { ${S} }
267
+ }`, { targetType: t }, n)).comMyFollows
265
268
  });
266
- }, R = () => {
267
- let { apiGatewayUrl: n } = e(), i = r();
268
- return t({
269
- mutationFn: async (e) => (await a(`mutation ComFollow($input: ComFollowInput!) {
270
- comFollow(input: $input) { ${b} }
271
- }`, { input: e }, n)).comFollow,
269
+ }, B = () => {
270
+ let { apiGatewayUrl: t } = e(), r = i();
271
+ return n({
272
+ mutationFn: async (e) => (await s(`mutation ComFollow($input: ComFollowInput!) {
273
+ comFollow(input: $input) { ${S} }
274
+ }`, { input: e }, t)).comFollow,
272
275
  onSuccess: () => {
273
- i.invalidateQueries({ queryKey: o.follows }), i.invalidateQueries({ queryKey: o.feed });
276
+ r.invalidateQueries({ queryKey: c.follows }), r.invalidateQueries({ queryKey: c.feed });
274
277
  }
275
278
  });
276
- }, z = () => {
277
- let { apiGatewayUrl: n } = e(), i = r();
278
- return t({
279
- mutationFn: async (e) => (await a("mutation ComUnfollow($input: ComFollowInput!) { comUnfollow(input: $input) }", { input: e }, n)).comUnfollow,
279
+ }, V = () => {
280
+ let { apiGatewayUrl: t } = e(), r = i();
281
+ return n({
282
+ mutationFn: async (e) => (await s("mutation ComUnfollow($input: ComFollowInput!) { comUnfollow(input: $input) }", { input: e }, t)).comUnfollow,
280
283
  onSuccess: () => {
281
- i.invalidateQueries({ queryKey: o.follows }), i.invalidateQueries({ queryKey: o.feed });
284
+ r.invalidateQueries({ queryKey: c.follows }), r.invalidateQueries({ queryKey: c.feed });
282
285
  }
283
286
  });
284
- }, B = (t = {}) => {
285
- let { apiGatewayUrl: r } = e();
286
- return n({
287
- queryKey: [...o.events, t],
288
- queryFn: async () => (await a(`query ComListEvents($circleId: ID, $status: ComEventStatus, $pagination: PaginationInput) {
287
+ }, H = (t = {}) => {
288
+ let { apiGatewayUrl: n } = e();
289
+ return r({
290
+ queryKey: [...c.events, t],
291
+ queryFn: async () => (await s(`query ComListEvents($circleId: ID, $status: ComEventStatus, $pagination: PaginationInput) {
289
292
  comListEvents(circleId: $circleId, status: $status, pagination: $pagination) {
290
- items { ${_} }
293
+ items { ${y} }
291
294
  pageInfo { cursor hasMore }
292
295
  }
293
296
  }`, {
294
297
  circleId: t.circleId,
295
298
  status: t.status,
296
- pagination: c(t.pagination)
297
- }, r)).comListEvents
299
+ pagination: u(t.pagination)
300
+ }, n)).comListEvents
298
301
  });
299
- }, V = (t) => {
300
- let { apiGatewayUrl: r } = e();
301
- return n({
302
- queryKey: o.event(t ?? ""),
302
+ }, U = (t) => {
303
+ let { apiGatewayUrl: n } = e();
304
+ return r({
305
+ queryKey: c.event(t ?? ""),
303
306
  enabled: !!t,
304
- queryFn: async () => (await a(`query ComEvent($id: ID!) {
307
+ queryFn: async () => (await s(`query ComEvent($id: ID!) {
305
308
  comEvent(id: $id) {
306
- ${_}
307
- rsvps { ${g} }
309
+ ${y}
310
+ rsvps { ${v} }
308
311
  }
309
- }`, { id: t }, r)).comEvent
310
- });
311
- }, H = () => {
312
- let { apiGatewayUrl: n } = e(), i = r();
313
- return t({
314
- mutationFn: async (e) => (await a(`mutation ComCreateEvent($input: ComCreateEventInput!) {
315
- comCreateEvent(input: $input) { ${_} }
316
- }`, { input: e }, n)).comCreateEvent,
317
- onSuccess: () => i.invalidateQueries({ queryKey: o.events })
318
- });
319
- }, U = () => {
320
- let { apiGatewayUrl: n } = e(), i = r();
321
- return t({
322
- mutationFn: async (e) => (await a(`mutation ComTransitionEvent($id: ID!, $status: ComEventStatus!) {
323
- comTransitionEvent(id: $id, status: $status) { ${_} }
324
- }`, e, n)).comTransitionEvent,
312
+ }`, { id: t }, n)).comEvent
313
+ });
314
+ }, W = () => {
315
+ let { apiGatewayUrl: t } = e(), r = i();
316
+ return n({
317
+ mutationFn: async (e) => (await s(`mutation ComCreateEvent($input: ComCreateEventInput!) {
318
+ comCreateEvent(input: $input) { ${y} }
319
+ }`, { input: e }, t)).comCreateEvent,
320
+ onSuccess: () => r.invalidateQueries({ queryKey: c.events })
321
+ });
322
+ }, G = () => {
323
+ let { apiGatewayUrl: t } = e(), r = i();
324
+ return n({
325
+ mutationFn: async (e) => (await s(`mutation ComTransitionEvent($id: ID!, $status: ComEventStatus!) {
326
+ comTransitionEvent(id: $id, status: $status) { ${y} }
327
+ }`, e, t)).comTransitionEvent,
325
328
  onSuccess: (e) => {
326
- i.invalidateQueries({ queryKey: o.events }), i.invalidateQueries({ queryKey: o.event(e.id) });
329
+ r.invalidateQueries({ queryKey: c.events }), r.invalidateQueries({ queryKey: c.event(e.id) });
327
330
  }
328
331
  });
329
- }, W = () => {
330
- let { apiGatewayUrl: n } = e(), i = r();
331
- return t({
332
- mutationFn: async (e) => (await a(`mutation ComRsvpEvent($eventId: ID!, $status: ComRsvpStatus!, $note: String) {
333
- comRsvpEvent(eventId: $eventId, status: $status, note: $note) { ${g} }
334
- }`, e, n)).comRsvpEvent,
332
+ }, K = () => {
333
+ let { apiGatewayUrl: t } = e(), r = i();
334
+ return n({
335
+ mutationFn: async (e) => (await s(`mutation ComRsvpEvent($eventId: ID!, $status: ComRsvpStatus!, $note: String) {
336
+ comRsvpEvent(eventId: $eventId, status: $status, note: $note) { ${v} }
337
+ }`, e, t)).comRsvpEvent,
335
338
  onSuccess: (e) => {
336
- i.invalidateQueries({ queryKey: o.events }), i.invalidateQueries({ queryKey: o.event(e.eventId) });
339
+ r.invalidateQueries({ queryKey: c.events }), r.invalidateQueries({ queryKey: c.event(e.eventId) });
337
340
  }
338
341
  });
339
- }, G = (t, r) => {
342
+ }, q = (t, n) => {
340
343
  let { apiGatewayUrl: i } = e();
341
- return n({
342
- queryKey: [...o.polls(t ?? ""), r ?? "all"],
344
+ return r({
345
+ queryKey: [...c.polls(t ?? ""), n ?? "all"],
343
346
  enabled: !!t,
344
- queryFn: async () => (await a(`query ComListPolls($circleId: ID!, $status: ComPollStatus) {
345
- comListPolls(circleId: $circleId, status: $status) { ${h} }
347
+ queryFn: async () => (await s(`query ComListPolls($circleId: ID!, $status: ComPollStatus) {
348
+ comListPolls(circleId: $circleId, status: $status) { ${_} }
346
349
  }`, {
347
350
  circleId: t,
348
- status: r
351
+ status: n
349
352
  }, i)).comListPolls
350
353
  });
351
- }, K = () => {
352
- let { apiGatewayUrl: n } = e(), i = r();
353
- return t({
354
- mutationFn: async (e) => (await a(`mutation ComCreatePoll($input: ComCreatePollInput!) {
355
- comCreatePoll(input: $input) { ${h} }
356
- }`, { input: e }, n)).comCreatePoll,
357
- onSuccess: (e) => i.invalidateQueries({ queryKey: o.polls(e.circleId) })
358
- });
359
- }, q = () => {
360
- let { apiGatewayUrl: n } = e(), i = r();
361
- return t({
362
- mutationFn: async (e) => (await a(`mutation ComClosePoll($id: ID!) { comClosePoll(id: $id) { ${h} } }`, { id: e }, n)).comClosePoll,
363
- onSuccess: (e) => i.invalidateQueries({ queryKey: o.polls(e.circleId) })
364
- });
365
354
  }, J = () => {
366
- let { apiGatewayUrl: n } = e(), i = r();
367
- return t({
368
- mutationFn: async (e) => (await a(`mutation ComVotePoll($pollId: ID!, $optionId: ID!) {
369
- comVotePoll(pollId: $pollId, optionId: $optionId) { ${m} }
355
+ let { apiGatewayUrl: t } = e(), r = i();
356
+ return n({
357
+ mutationFn: async (e) => (await s(`mutation ComCreatePoll($input: ComCreatePollInput!) {
358
+ comCreatePoll(input: $input) { ${_} }
359
+ }`, { input: e }, t)).comCreatePoll,
360
+ onSuccess: (e) => r.invalidateQueries({ queryKey: c.polls(e.circleId) })
361
+ });
362
+ }, Y = () => {
363
+ let { apiGatewayUrl: t } = e(), r = i();
364
+ return n({
365
+ mutationFn: async (e) => (await s(`mutation ComClosePoll($id: ID!) { comClosePoll(id: $id) { ${_} } }`, { id: e }, t)).comClosePoll,
366
+ onSuccess: (e) => r.invalidateQueries({ queryKey: c.polls(e.circleId) })
367
+ });
368
+ }, X = () => {
369
+ let { apiGatewayUrl: t } = e(), r = i();
370
+ return n({
371
+ mutationFn: async (e) => (await s(`mutation ComVotePoll($pollId: ID!, $optionId: ID!) {
372
+ comVotePoll(pollId: $pollId, optionId: $optionId) { ${g} }
370
373
  }`, {
371
374
  pollId: e.pollId,
372
375
  optionId: e.optionId
373
- }, n)).comVotePoll,
376
+ }, t)).comVotePoll,
374
377
  onSuccess: (e, t) => {
375
- t.circleId && i.invalidateQueries({ queryKey: o.polls(t.circleId) }), i.invalidateQueries({ queryKey: o.poll(t.pollId) });
378
+ t.circleId && r.invalidateQueries({ queryKey: c.polls(t.circleId) }), r.invalidateQueries({ queryKey: c.poll(t.pollId) });
376
379
  }
377
380
  });
378
- }, Y = (t = {}) => {
379
- let { apiGatewayUrl: r } = e();
380
- return n({
381
- queryKey: [...o.profiles, t],
382
- queryFn: async () => (await a(`query ComListProfiles($discoverable: Boolean, $pagination: PaginationInput) {
381
+ }, Z = (t = {}) => {
382
+ let { apiGatewayUrl: n } = e();
383
+ return r({
384
+ queryKey: [...c.profiles, t],
385
+ queryFn: async () => (await s(`query ComListProfiles($discoverable: Boolean, $pagination: PaginationInput) {
383
386
  comListProfiles(discoverable: $discoverable, pagination: $pagination) {
384
- items { ${v} }
387
+ items { ${b} }
385
388
  pageInfo { cursor hasMore }
386
389
  }
387
390
  }`, {
388
391
  discoverable: t.discoverable,
389
- pagination: c(t.pagination)
390
- }, r)).comListProfiles
392
+ pagination: u(t.pagination)
393
+ }, n)).comListProfiles
391
394
  });
392
- }, X = (t) => {
393
- let { apiGatewayUrl: r } = e();
394
- return n({
395
- queryKey: o.profile(t ?? ""),
395
+ }, Q = (t) => {
396
+ let { apiGatewayUrl: n } = e();
397
+ return r({
398
+ queryKey: c.profile(t ?? ""),
396
399
  enabled: !!t,
397
400
  staleTime: 600 * 1e3,
398
- queryFn: async () => (await a(`query ComProfile($memberId: ID!) {
399
- comProfile(memberId: $memberId) { ${v} }
400
- }`, { memberId: t }, r)).comProfile
401
- });
402
- }, Z = () => {
403
- let { apiGatewayUrl: n } = e(), i = r();
404
- return t({
405
- mutationFn: async (e) => (await a(`mutation ComUpsertProfile($input: ComUpsertProfileInput!) {
406
- comUpsertProfile(input: $input) { ${v} }
407
- }`, { input: e }, n)).comUpsertProfile,
401
+ queryFn: async () => (await s(`query ComProfile($memberId: ID!) {
402
+ comProfile(memberId: $memberId) { ${b} }
403
+ }`, { memberId: t }, n)).comProfile
404
+ });
405
+ }, $ = () => {
406
+ let { apiGatewayUrl: t } = e(), r = i();
407
+ return n({
408
+ mutationFn: async (e) => (await s(`mutation ComUpsertProfile($input: ComUpsertProfileInput!) {
409
+ comUpsertProfile(input: $input) { ${b} }
410
+ }`, { input: e }, t)).comUpsertProfile,
408
411
  onSuccess: (e) => {
409
- i.invalidateQueries({ queryKey: o.profiles }), i.invalidateQueries({ queryKey: o.profile(e.memberId) });
412
+ r.invalidateQueries({ queryKey: c.profiles }), r.invalidateQueries({ queryKey: c.profile(e.memberId) });
410
413
  }
411
414
  });
412
415
  };
413
416
  //#endregion
414
- export { I as useComAddComment, S as useComCircle, x as useComCircles, q as useComClosePoll, F as useComComments, O as useComCreateChannel, C as useComCreateCircle, H as useComCreateEvent, K as useComCreatePoll, j as useComCreatePost, V as useComEvent, B as useComEvents, R as useComFollow, w as useComJoinCircle, T as useComLeaveCircle, D as useComMemberships, A as useComMyFeed, L as useComMyFollows, G as useComPolls, k as useComPosts, X as useComProfile, Y as useComProfiles, P as useComReactToPost, N as useComRemovePost, W as useComRsvpEvent, E as useComSetMemberRole, U as useComTransitionEvent, z as useComUnfollow, M as useComUpdatePost, Z as useComUpsertProfile, J as useComVotePoll };
417
+ export { R as useComAddComment, w as useComCircle, C as useComCircles, Y as useComClosePoll, L as useComComments, A as useComCreateChannel, T as useComCreateCircle, W as useComCreateEvent, J as useComCreatePoll, N as useComCreatePost, U as useComEvent, H as useComEvents, B as useComFollow, E as useComJoinCircle, D as useComLeaveCircle, k as useComMemberships, M as useComMyFeed, z as useComMyFollows, q as useComPolls, j as useComPosts, Q as useComProfile, Z as useComProfiles, I as useComReactToPost, F as useComRemovePost, K as useComRsvpEvent, O as useComSetMemberRole, G as useComTransitionEvent, V as useComUnfollow, P as useComUpdatePost, $ as useComUpsertProfile, X as useComVotePoll };
415
418
 
416
419
  //# sourceMappingURL=useComradeCircleApi.js.map