@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.
- package/dist/comradecircle/components/Avatar.js +52 -17
- package/dist/comradecircle/components/Avatar.js.map +1 -1
- package/dist/comradecircle/components/AvatarUploadField.js +91 -0
- package/dist/comradecircle/components/AvatarUploadField.js.map +1 -0
- package/dist/comradecircle/components/CircleCard.js +55 -52
- package/dist/comradecircle/components/CircleCard.js.map +1 -1
- package/dist/comradecircle/components/CommentThread.js +80 -64
- package/dist/comradecircle/components/CommentThread.js.map +1 -1
- package/dist/comradecircle/components/CreateCircleDialog.js +74 -63
- package/dist/comradecircle/components/CreateCircleDialog.js.map +1 -1
- package/dist/comradecircle/components/EventCard.js +84 -58
- package/dist/comradecircle/components/EventCard.js.map +1 -1
- package/dist/comradecircle/components/FileImage.js +20 -0
- package/dist/comradecircle/components/FileImage.js.map +1 -0
- package/dist/comradecircle/components/ImageAttachments.js +97 -0
- package/dist/comradecircle/components/ImageAttachments.js.map +1 -0
- package/dist/comradecircle/components/MemberIdentity.js +4 -2
- package/dist/comradecircle/components/MemberIdentity.js.map +1 -1
- package/dist/comradecircle/components/PollCard.js +65 -44
- package/dist/comradecircle/components/PollCard.js.map +1 -1
- package/dist/comradecircle/components/PostCard.js +8 -15
- package/dist/comradecircle/components/PostCard.js.map +1 -1
- package/dist/comradecircle/components/PostComposer.js +45 -35
- package/dist/comradecircle/components/PostComposer.js.map +1 -1
- package/dist/comradecircle/components/ReactionBar.js +1 -1
- package/dist/comradecircle/components/ReactionBar.js.map +1 -1
- package/dist/comradecircle/components/StateViews.js +1 -16
- package/dist/comradecircle/components/StateViews.js.map +1 -1
- package/dist/comradecircle/components/StatusBadge.js +1 -1
- package/dist/comradecircle/components/StatusBadge.js.map +1 -1
- package/dist/comradecircle/hooks/index.js +1 -0
- package/dist/comradecircle/hooks/useComradeCircleApi.js +244 -241
- package/dist/comradecircle/hooks/useComradeCircleApi.js.map +1 -1
- package/dist/comradecircle/hooks/useFiles.js +78 -0
- package/dist/comradecircle/hooks/useFiles.js.map +1 -0
- package/dist/comradecircle/lib/graphql-cache.js +9 -0
- package/dist/comradecircle/lib/graphql-cache.js.map +1 -0
- package/dist/comradecircle/pages/FeedPage.js +79 -33
- package/dist/comradecircle/pages/FeedPage.js.map +1 -1
- package/dist/comradecircle/pages/circles/CircleDetailPage.js +354 -242
- package/dist/comradecircle/pages/circles/CircleDetailPage.js.map +1 -1
- package/dist/comradecircle/pages/circles/CirclesPage.js +97 -47
- package/dist/comradecircle/pages/circles/CirclesPage.js.map +1 -1
- package/dist/comradecircle/pages/events/EventDetailPage.js +193 -126
- package/dist/comradecircle/pages/events/EventDetailPage.js.map +1 -1
- package/dist/comradecircle/pages/events/EventsPage.js +74 -34
- package/dist/comradecircle/pages/events/EventsPage.js.map +1 -1
- package/dist/comradecircle/pages/members/MemberProfilePage.js +154 -81
- package/dist/comradecircle/pages/members/MemberProfilePage.js.map +1 -1
- package/dist/comradecircle/pages/members/MembersPage.js +141 -71
- package/dist/comradecircle/pages/members/MembersPage.js.map +1 -1
- package/dist/comradecircle/pages/profile/MyProfilePage.js +298 -191
- package/dist/comradecircle/pages/profile/MyProfilePage.js.map +1 -1
- 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 {
|
|
4
|
-
import {
|
|
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
|
|
7
|
-
let
|
|
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:
|
|
12
|
+
baseUrl: r,
|
|
10
13
|
query: e,
|
|
11
|
-
variables:
|
|
14
|
+
variables: n,
|
|
12
15
|
workspaceToken: !0
|
|
13
16
|
});
|
|
14
|
-
if (
|
|
15
|
-
if (!
|
|
16
|
-
return
|
|
17
|
-
},
|
|
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
|
-
},
|
|
70
|
-
let t = e ??
|
|
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
|
-
},
|
|
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 { ${
|
|
75
|
-
`,
|
|
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 { ${
|
|
78
|
-
`,
|
|
79
|
-
let { apiGatewayUrl:
|
|
80
|
-
return
|
|
81
|
-
queryKey: [...
|
|
82
|
-
queryFn: async () => (await
|
|
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 { ${
|
|
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:
|
|
91
|
-
},
|
|
93
|
+
pagination: u(t.pagination)
|
|
94
|
+
}, n)).comListCircles
|
|
92
95
|
});
|
|
93
|
-
},
|
|
94
|
-
let { apiGatewayUrl:
|
|
95
|
-
return
|
|
96
|
-
queryKey:
|
|
96
|
+
}, w = (t) => {
|
|
97
|
+
let { apiGatewayUrl: n } = e();
|
|
98
|
+
return r({
|
|
99
|
+
queryKey: c.circle(t ?? ""),
|
|
97
100
|
enabled: !!t,
|
|
98
|
-
queryFn: async () => (await
|
|
101
|
+
queryFn: async () => (await s(`query ComCircle($id: ID!) {
|
|
99
102
|
comCircle(id: $id) {
|
|
100
|
-
${
|
|
101
|
-
channels { ${
|
|
102
|
-
memberships { ${
|
|
103
|
+
${f}
|
|
104
|
+
channels { ${d} }
|
|
105
|
+
memberships { ${x} }
|
|
103
106
|
}
|
|
104
|
-
}`, { id: t },
|
|
105
|
-
});
|
|
106
|
-
},
|
|
107
|
-
let { apiGatewayUrl:
|
|
108
|
-
return
|
|
109
|
-
mutationFn: async (e) => (await
|
|
110
|
-
comCreateCircle(input: $input) { ${
|
|
111
|
-
}`, { input: e },
|
|
112
|
-
onSuccess: () =>
|
|
113
|
-
});
|
|
114
|
-
},
|
|
115
|
-
let { apiGatewayUrl:
|
|
116
|
-
return
|
|
117
|
-
mutationFn: async (e) => (await
|
|
118
|
-
comJoinCircle(circleId: $circleId) { ${
|
|
119
|
-
}`, { circleId: e },
|
|
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
|
-
|
|
124
|
+
r.invalidateQueries({ queryKey: c.circles }), r.invalidateQueries({ queryKey: c.circle(e.circleId) }), r.invalidateQueries({ queryKey: c.memberships });
|
|
122
125
|
}
|
|
123
126
|
});
|
|
124
|
-
},
|
|
125
|
-
let { apiGatewayUrl:
|
|
126
|
-
return
|
|
127
|
-
mutationFn: async (e) => (await
|
|
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
|
-
|
|
132
|
+
r.invalidateQueries({ queryKey: c.circles }), r.invalidateQueries({ queryKey: c.circle(t) }), r.invalidateQueries({ queryKey: c.memberships });
|
|
130
133
|
}
|
|
131
134
|
});
|
|
132
|
-
},
|
|
133
|
-
let { apiGatewayUrl:
|
|
134
|
-
return
|
|
135
|
-
mutationFn: async (e) => (await
|
|
136
|
-
comSetMemberRole(membershipId: $membershipId, role: $role) { ${
|
|
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
|
-
},
|
|
143
|
+
}, t)).comSetMemberRole,
|
|
141
144
|
onSuccess: (e) => {
|
|
142
|
-
|
|
145
|
+
r.invalidateQueries({ queryKey: c.circle(e.circleId) }), r.invalidateQueries({ queryKey: c.memberships });
|
|
143
146
|
}
|
|
144
147
|
});
|
|
145
|
-
},
|
|
146
|
-
let { apiGatewayUrl:
|
|
147
|
-
return
|
|
148
|
-
queryKey: [...
|
|
149
|
-
queryFn: async () => (await
|
|
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 { ${
|
|
154
|
+
items { ${x} }
|
|
152
155
|
pageInfo { cursor hasMore }
|
|
153
156
|
}
|
|
154
157
|
}`, {
|
|
155
158
|
circleId: t.circleId,
|
|
156
159
|
status: t.status,
|
|
157
|
-
pagination:
|
|
158
|
-
},
|
|
160
|
+
pagination: u(t.pagination)
|
|
161
|
+
}, n)).comListMemberships
|
|
159
162
|
});
|
|
160
|
-
},
|
|
161
|
-
let { apiGatewayUrl:
|
|
162
|
-
return
|
|
163
|
-
mutationFn: async (e) => (await
|
|
164
|
-
comCreateChannel(input: $input) { ${
|
|
165
|
-
}`, { input: e },
|
|
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
|
-
|
|
170
|
+
r.invalidateQueries({ queryKey: c.channels(e.circleId) }), r.invalidateQueries({ queryKey: c.circle(e.circleId) });
|
|
168
171
|
}
|
|
169
172
|
});
|
|
170
|
-
},
|
|
171
|
-
let { apiGatewayUrl:
|
|
172
|
-
return
|
|
173
|
+
}, j = (t = {}) => {
|
|
174
|
+
let { apiGatewayUrl: n } = e();
|
|
175
|
+
return r({
|
|
173
176
|
queryKey: [
|
|
174
|
-
...
|
|
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
|
|
182
|
+
queryFn: async () => (await s(`query ComListPosts($channelId: ID, $status: ComPostStatus, $pagination: PaginationInput) {
|
|
180
183
|
comListPosts(channelId: $channelId, status: $status, pagination: $pagination) {
|
|
181
|
-
items { ${
|
|
184
|
+
items { ${h} }
|
|
182
185
|
pageInfo { cursor hasMore }
|
|
183
186
|
}
|
|
184
187
|
}`, {
|
|
185
188
|
channelId: t.channelId,
|
|
186
189
|
status: t.status,
|
|
187
|
-
pagination:
|
|
188
|
-
},
|
|
189
|
-
});
|
|
190
|
-
},
|
|
191
|
-
let { apiGatewayUrl:
|
|
192
|
-
return
|
|
193
|
-
queryKey: [...
|
|
194
|
-
queryFn: async () => (await
|
|
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 { ${
|
|
199
|
+
items { ${h} }
|
|
197
200
|
pageInfo { cursor hasMore }
|
|
198
201
|
}
|
|
199
|
-
}`, { pagination:
|
|
200
|
-
});
|
|
201
|
-
},
|
|
202
|
-
let { apiGatewayUrl:
|
|
203
|
-
return
|
|
204
|
-
mutationFn: async (e) => (await
|
|
205
|
-
comCreatePost(input: $input) { ${
|
|
206
|
-
}`, { input: e },
|
|
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
|
-
|
|
211
|
+
r.invalidateQueries({ queryKey: c.posts(e.channelId) }), r.invalidateQueries({ queryKey: c.feed });
|
|
209
212
|
}
|
|
210
213
|
});
|
|
211
|
-
},
|
|
212
|
-
let { apiGatewayUrl:
|
|
213
|
-
return
|
|
214
|
-
mutationFn: async (e) => (await
|
|
215
|
-
comUpdatePost(id: $id, input: $input) { ${
|
|
216
|
-
}`, e,
|
|
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
|
-
|
|
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
|
-
},
|
|
222
|
-
let { apiGatewayUrl:
|
|
223
|
-
return
|
|
224
|
-
mutationFn: async (e) => (await
|
|
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 &&
|
|
229
|
+
t.channelId && r.invalidateQueries({ queryKey: c.posts(t.channelId) }), r.invalidateQueries({ queryKey: c.feed });
|
|
227
230
|
}
|
|
228
231
|
});
|
|
229
|
-
},
|
|
230
|
-
let { apiGatewayUrl:
|
|
231
|
-
return
|
|
232
|
-
mutationFn: async (e) => (await
|
|
233
|
-
comReactToPost(postId: $postId, type: $type) { ${
|
|
234
|
-
}`, e,
|
|
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
|
-
|
|
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
|
-
},
|
|
240
|
-
let { apiGatewayUrl:
|
|
241
|
-
return
|
|
242
|
-
queryKey:
|
|
242
|
+
}, L = (t) => {
|
|
243
|
+
let { apiGatewayUrl: n } = e();
|
|
244
|
+
return r({
|
|
245
|
+
queryKey: c.comments(t ?? ""),
|
|
243
246
|
enabled: !!t,
|
|
244
|
-
queryFn: async () => (await
|
|
245
|
-
comListComments(postId: $postId) { ${
|
|
246
|
-
}`, { postId: t },
|
|
247
|
+
queryFn: async () => (await s(`query ComListComments($postId: ID!) {
|
|
248
|
+
comListComments(postId: $postId) { ${m} }
|
|
249
|
+
}`, { postId: t }, n)).comListComments
|
|
247
250
|
});
|
|
248
|
-
},
|
|
249
|
-
let { apiGatewayUrl:
|
|
250
|
-
return
|
|
251
|
-
mutationFn: async (e) => (await
|
|
252
|
-
comAddComment(input: $input) { ${
|
|
253
|
-
}`, { input: e },
|
|
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
|
-
|
|
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
|
-
},
|
|
259
|
-
let { apiGatewayUrl:
|
|
260
|
-
return
|
|
261
|
-
queryKey: [...
|
|
262
|
-
queryFn: async () => (await
|
|
263
|
-
comMyFollows(targetType: $targetType) { ${
|
|
264
|
-
}`, { targetType: t },
|
|
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
|
-
},
|
|
267
|
-
let { apiGatewayUrl:
|
|
268
|
-
return
|
|
269
|
-
mutationFn: async (e) => (await
|
|
270
|
-
comFollow(input: $input) { ${
|
|
271
|
-
}`, { input: e },
|
|
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
|
-
|
|
276
|
+
r.invalidateQueries({ queryKey: c.follows }), r.invalidateQueries({ queryKey: c.feed });
|
|
274
277
|
}
|
|
275
278
|
});
|
|
276
|
-
},
|
|
277
|
-
let { apiGatewayUrl:
|
|
278
|
-
return
|
|
279
|
-
mutationFn: async (e) => (await
|
|
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
|
-
|
|
284
|
+
r.invalidateQueries({ queryKey: c.follows }), r.invalidateQueries({ queryKey: c.feed });
|
|
282
285
|
}
|
|
283
286
|
});
|
|
284
|
-
},
|
|
285
|
-
let { apiGatewayUrl:
|
|
286
|
-
return
|
|
287
|
-
queryKey: [...
|
|
288
|
-
queryFn: async () => (await
|
|
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:
|
|
297
|
-
},
|
|
299
|
+
pagination: u(t.pagination)
|
|
300
|
+
}, n)).comListEvents
|
|
298
301
|
});
|
|
299
|
-
},
|
|
300
|
-
let { apiGatewayUrl:
|
|
301
|
-
return
|
|
302
|
-
queryKey:
|
|
302
|
+
}, U = (t) => {
|
|
303
|
+
let { apiGatewayUrl: n } = e();
|
|
304
|
+
return r({
|
|
305
|
+
queryKey: c.event(t ?? ""),
|
|
303
306
|
enabled: !!t,
|
|
304
|
-
queryFn: async () => (await
|
|
307
|
+
queryFn: async () => (await s(`query ComEvent($id: ID!) {
|
|
305
308
|
comEvent(id: $id) {
|
|
306
|
-
${
|
|
307
|
-
rsvps { ${
|
|
309
|
+
${y}
|
|
310
|
+
rsvps { ${v} }
|
|
308
311
|
}
|
|
309
|
-
}`, { id: t },
|
|
310
|
-
});
|
|
311
|
-
},
|
|
312
|
-
let { apiGatewayUrl:
|
|
313
|
-
return
|
|
314
|
-
mutationFn: async (e) => (await
|
|
315
|
-
comCreateEvent(input: $input) { ${
|
|
316
|
-
}`, { input: e },
|
|
317
|
-
onSuccess: () =>
|
|
318
|
-
});
|
|
319
|
-
},
|
|
320
|
-
let { apiGatewayUrl:
|
|
321
|
-
return
|
|
322
|
-
mutationFn: async (e) => (await
|
|
323
|
-
comTransitionEvent(id: $id, status: $status) { ${
|
|
324
|
-
}`, e,
|
|
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
|
-
|
|
329
|
+
r.invalidateQueries({ queryKey: c.events }), r.invalidateQueries({ queryKey: c.event(e.id) });
|
|
327
330
|
}
|
|
328
331
|
});
|
|
329
|
-
},
|
|
330
|
-
let { apiGatewayUrl:
|
|
331
|
-
return
|
|
332
|
-
mutationFn: async (e) => (await
|
|
333
|
-
comRsvpEvent(eventId: $eventId, status: $status, note: $note) { ${
|
|
334
|
-
}`, e,
|
|
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
|
-
|
|
339
|
+
r.invalidateQueries({ queryKey: c.events }), r.invalidateQueries({ queryKey: c.event(e.eventId) });
|
|
337
340
|
}
|
|
338
341
|
});
|
|
339
|
-
},
|
|
342
|
+
}, q = (t, n) => {
|
|
340
343
|
let { apiGatewayUrl: i } = e();
|
|
341
|
-
return
|
|
342
|
-
queryKey: [...
|
|
344
|
+
return r({
|
|
345
|
+
queryKey: [...c.polls(t ?? ""), n ?? "all"],
|
|
343
346
|
enabled: !!t,
|
|
344
|
-
queryFn: async () => (await
|
|
345
|
-
comListPolls(circleId: $circleId, status: $status) { ${
|
|
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:
|
|
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:
|
|
367
|
-
return
|
|
368
|
-
mutationFn: async (e) => (await
|
|
369
|
-
|
|
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
|
-
},
|
|
376
|
+
}, t)).comVotePoll,
|
|
374
377
|
onSuccess: (e, t) => {
|
|
375
|
-
t.circleId &&
|
|
378
|
+
t.circleId && r.invalidateQueries({ queryKey: c.polls(t.circleId) }), r.invalidateQueries({ queryKey: c.poll(t.pollId) });
|
|
376
379
|
}
|
|
377
380
|
});
|
|
378
|
-
},
|
|
379
|
-
let { apiGatewayUrl:
|
|
380
|
-
return
|
|
381
|
-
queryKey: [...
|
|
382
|
-
queryFn: async () => (await
|
|
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 { ${
|
|
387
|
+
items { ${b} }
|
|
385
388
|
pageInfo { cursor hasMore }
|
|
386
389
|
}
|
|
387
390
|
}`, {
|
|
388
391
|
discoverable: t.discoverable,
|
|
389
|
-
pagination:
|
|
390
|
-
},
|
|
392
|
+
pagination: u(t.pagination)
|
|
393
|
+
}, n)).comListProfiles
|
|
391
394
|
});
|
|
392
|
-
},
|
|
393
|
-
let { apiGatewayUrl:
|
|
394
|
-
return
|
|
395
|
-
queryKey:
|
|
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
|
|
399
|
-
comProfile(memberId: $memberId) { ${
|
|
400
|
-
}`, { memberId: t },
|
|
401
|
-
});
|
|
402
|
-
},
|
|
403
|
-
let { apiGatewayUrl:
|
|
404
|
-
return
|
|
405
|
-
mutationFn: async (e) => (await
|
|
406
|
-
comUpsertProfile(input: $input) { ${
|
|
407
|
-
}`, { input: e },
|
|
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
|
-
|
|
412
|
+
r.invalidateQueries({ queryKey: c.profiles }), r.invalidateQueries({ queryKey: c.profile(e.memberId) });
|
|
410
413
|
}
|
|
411
414
|
});
|
|
412
415
|
};
|
|
413
416
|
//#endregion
|
|
414
|
-
export {
|
|
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
|