@burdenoff/microfe-coolandlovely 2026.1112.1 → 2026.1112.2

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.
@@ -1,24 +1,29 @@
1
1
  import { useCoolAndLovely as e } from "../context/CoolAndLovelyContext.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";
5
- import { clearGraphqlFetchResponseCache as a } from "@burdenoff/fe-libs/shared/graphql/fetch";
3
+ import { findQuotaExhaustedError as t } from "../utils/quota.js";
4
+ import { dispatchQuotaExhausted as n } from "@burdenoff/fe-libs/shared/hooks";
5
+ import { useMutation as r, useQuery as i, useQueryClient as a } from "@tanstack/react-query";
6
+ import { graphqlFetch as ee } from "@burdenoff/fe-libs/shared/graphql";
7
+ import { clearGraphqlFetchResponseCache as te } from "@burdenoff/fe-libs/shared/graphql/fetch";
6
8
  // src/coolandlovely/hooks/useCoolAndLovelyApi.ts
7
- var o = "coolandlovely", s = async (e, t, n, r) => {
8
- let o = await i({
9
+ var o = "coolandlovely", s = async (e, r, i, a) => {
10
+ let o = await ee({
9
11
  gateway: "workspace",
10
- baseUrl: n,
12
+ baseUrl: i,
11
13
  query: e,
12
- variables: t,
14
+ variables: r,
13
15
  workspaceToken: !0,
14
- signal: r
16
+ signal: a
15
17
  });
16
- if (o.errors?.length) throw Error(o.errors[0]?.message ?? "GraphQL request failed");
18
+ if (o.errors?.length) {
19
+ let e = t(o.errors);
20
+ throw e && n({ error: e }), Error(o.errors[0]?.message ?? "GraphQL request failed");
21
+ }
17
22
  if (!o.data) throw Error("GraphQL response did not include data");
18
- return /^\s*mutation\b/.test(e) && a(), o.data;
19
- }, c = "\n id workspaceId name handle tagline bio aesthetics tags websiteUrl\n isFeatured status logo { id } cover { id } createdAt updatedAt\n", l = "\n id workspaceId brandId name description season status tags\n cover { id } publishAt endAt createdAt updatedAt\n", u = "\n id workspaceId brandId collectionId name description category status\n sku price currency colours sizes materials tags image { id }\n createdAt updatedAt\n", d = "\n storeProductId storeListingStatus storeSyncStatus storeSyncedAt\n", f = "\n id workspaceId authorId title caption occasion visibility isFeatured\n likeCount saveCount collaborationId image { id } tags publishedAt\n createdAt updatedAt isLikedByMe isSavedByMe\n", p = "\n id workspaceId lookId styleItemId position styling createdAt updatedAt\n styleItem { id name category price currency brand { id name handle } image { id } }\n", m = "\n id workspaceId brandId creatorId collectionId title brief role status\n compensation currency tags startDate endDate publishedAt createdAt updatedAt\n rateCardId rateCardRevision rateCardTitle quotedDeliverables quotedDeliveryDays\n", h = "\n id collaborationId collaborationTitle brandId creatorId amount currency status paymentProvider\n paidAt earningAvailableAt earningSyncStatus createdAt updatedAt\n", g = "\n id workspaceId profileId name category source brandName colour size notes\n styleItemId purchasePrice currency costPerWear timesWorn lastWornAt tags\n image { id } createdAt updatedAt\n", _ = "\n id workspaceId ownerId displayName bio visibility stylePreferences\n palette favouriteBrands sizes createdAt updatedAt\n isFollowedByMe followerCount followingCount\n", v = "\n id workspaceId ownerId profileId name description visibility tags\n cover { id } createdAt updatedAt\n", ee = (t = {}) => {
20
- let { apiGatewayUrl: r } = e();
21
- return n({
23
+ return /^\s*mutation\b/.test(e) && te(), o.data;
24
+ }, c = "\n id workspaceId name handle tagline bio aesthetics tags websiteUrl\n isFeatured status logo { id } cover { id } createdAt updatedAt\n", l = "\n id workspaceId brandId name description season status tags\n cover { id } publishAt endAt createdAt updatedAt\n", u = "\n id workspaceId brandId collectionId name description category status\n sku price currency colours sizes materials tags image { id }\n createdAt updatedAt\n", d = "\n storeProductId storeListingStatus storeSyncStatus storeSyncedAt\n", f = "\n id workspaceId authorId title caption occasion visibility isFeatured\n likeCount saveCount collaborationId image { id } tags publishedAt\n createdAt updatedAt isLikedByMe isSavedByMe\n", p = "\n id workspaceId lookId styleItemId position styling createdAt updatedAt\n styleItem { id name category price currency brand { id name handle } image { id } }\n", m = "\n id workspaceId brandId creatorId collectionId title brief role status\n compensation currency tags startDate endDate publishedAt createdAt updatedAt\n rateCardId rateCardRevision rateCardTitle quotedDeliverables quotedDeliveryDays\n", h = "\n id collaborationId collaborationTitle brandId creatorId amount currency status paymentProvider\n paidAt earningAvailableAt earningSyncStatus createdAt updatedAt\n", g = "\n id workspaceId profileId name category source brandName colour size notes\n styleItemId purchasePrice currency costPerWear timesWorn lastWornAt tags\n image { id } createdAt updatedAt\n", _ = "\n id workspaceId ownerId displayName bio visibility stylePreferences\n palette favouriteBrands sizes createdAt updatedAt\n isFollowedByMe followerCount followingCount\n", v = "\n id workspaceId ownerId profileId name description visibility tags\n cover { id } createdAt updatedAt\n", y = (t = {}) => {
25
+ let { apiGatewayUrl: n } = e();
26
+ return i({
22
27
  queryKey: [
23
28
  o,
24
29
  "brands",
@@ -36,11 +41,11 @@ var o = "coolandlovely", s = async (e, t, n, r) => {
36
41
  limit: 50,
37
42
  offset: 0
38
43
  }
39
- }, r)).cooListBrands
44
+ }, n)).cooListBrands
40
45
  });
41
- }, te = (t) => {
42
- let { apiGatewayUrl: r } = e();
43
- return n({
46
+ }, b = (t) => {
47
+ let { apiGatewayUrl: n } = e();
48
+ return i({
44
49
  queryKey: [
45
50
  o,
46
51
  "brand",
@@ -53,64 +58,64 @@ var o = "coolandlovely", s = async (e, t, n, r) => {
53
58
  collections { items { ${l} } pageInfo { cursor hasMore } }
54
59
  items { items { ${u} } pageInfo { cursor hasMore } }
55
60
  }
56
- }`, { id: t }, r);
61
+ }`, { id: t }, n);
57
62
  if (!e.cooBrand) return null;
58
- let { collections: n, items: i, ...a } = e.cooBrand;
63
+ let { collections: r, items: i, ...a } = e.cooBrand;
59
64
  return {
60
65
  ...a,
61
- collections: n?.items ?? [],
66
+ collections: r?.items ?? [],
62
67
  items: i?.items ?? []
63
68
  };
64
69
  },
65
70
  enabled: !!t
66
71
  });
67
- }, y = () => {
68
- let n = r(), { apiGatewayUrl: i } = e();
69
- return t({
72
+ }, x = () => {
73
+ let t = a(), { apiGatewayUrl: n } = e();
74
+ return r({
70
75
  mutationFn: async (e) => (await s(`mutation CooCreateBrand($input: CooCreateBrandInput!) {
71
76
  cooCreateBrand(input: $input) { ${c} }
72
- }`, { input: e }, i)).cooCreateBrand,
77
+ }`, { input: e }, n)).cooCreateBrand,
73
78
  onSuccess: () => {
74
- n.invalidateQueries({ queryKey: [o, "brands"] });
79
+ t.invalidateQueries({ queryKey: [o, "brands"] });
75
80
  }
76
81
  });
77
- }, b = () => {
78
- let n = r(), { apiGatewayUrl: i } = e();
79
- return t({
82
+ }, S = () => {
83
+ let t = a(), { apiGatewayUrl: n } = e();
84
+ return r({
80
85
  mutationFn: async ({ id: e, input: t }) => (await s(`mutation CooUpdateBrand($id: ID!, $input: CooUpdateBrandInput!) {
81
86
  cooUpdateBrand(id: $id, input: $input) { ${c} }
82
87
  }`, {
83
88
  id: e,
84
89
  input: t
85
- }, i)).cooUpdateBrand,
90
+ }, n)).cooUpdateBrand,
86
91
  onSuccess: (e) => {
87
- n.invalidateQueries({ queryKey: [o, "brands"] }), n.invalidateQueries({ queryKey: [
92
+ t.invalidateQueries({ queryKey: [o, "brands"] }), t.invalidateQueries({ queryKey: [
88
93
  o,
89
94
  "brand",
90
95
  e.id
91
96
  ] });
92
97
  }
93
98
  });
94
- }, x = () => {
95
- let n = r(), { apiGatewayUrl: i } = e();
96
- return t({
99
+ }, C = () => {
100
+ let t = a(), { apiGatewayUrl: n } = e();
101
+ return r({
97
102
  mutationFn: async ({ id: e, status: t }) => (await s(`mutation CooTransitionBrand($id: ID!, $status: CooBrandStatus!) {
98
103
  cooTransitionBrand(id: $id, status: $status) { ${c} }
99
104
  }`, {
100
105
  id: e,
101
106
  status: t
102
- }, i)).cooTransitionBrand,
107
+ }, n)).cooTransitionBrand,
103
108
  onSuccess: (e) => {
104
- n.invalidateQueries({ queryKey: [o, "brands"] }), n.invalidateQueries({ queryKey: [
109
+ t.invalidateQueries({ queryKey: [o, "brands"] }), t.invalidateQueries({ queryKey: [
105
110
  o,
106
111
  "brand",
107
112
  e.id
108
113
  ] });
109
114
  }
110
115
  });
111
- }, S = (t = {}) => {
112
- let { apiGatewayUrl: r } = e();
113
- return n({
116
+ }, w = (t = {}) => {
117
+ let { apiGatewayUrl: n } = e();
118
+ return i({
114
119
  queryKey: [
115
120
  o,
116
121
  "collections",
@@ -124,11 +129,11 @@ var o = "coolandlovely", s = async (e, t, n, r) => {
124
129
  }`, {
125
130
  brandId: t.brandId,
126
131
  status: t.status
127
- }, r)).cooListCollections.items
132
+ }, n)).cooListCollections.items
128
133
  });
129
- }, C = (t) => {
130
- let { apiGatewayUrl: r } = e();
131
- return n({
134
+ }, T = (t) => {
135
+ let { apiGatewayUrl: n } = e();
136
+ return i({
132
137
  queryKey: [
133
138
  o,
134
139
  "collection",
@@ -141,68 +146,68 @@ var o = "coolandlovely", s = async (e, t, n, r) => {
141
146
  brand { id name handle }
142
147
  items { items { ${u} } pageInfo { cursor hasMore } }
143
148
  }
144
- }`, { id: t }, r);
149
+ }`, { id: t }, n);
145
150
  if (!e.cooCollection) return null;
146
- let { items: n, ...i } = e.cooCollection;
151
+ let { items: r, ...i } = e.cooCollection;
147
152
  return {
148
153
  ...i,
149
- items: n?.items ?? []
154
+ items: r?.items ?? []
150
155
  };
151
156
  },
152
157
  enabled: !!t
153
158
  });
154
- }, w = () => {
155
- let n = r(), { apiGatewayUrl: i } = e();
156
- return t({
159
+ }, E = () => {
160
+ let t = a(), { apiGatewayUrl: n } = e();
161
+ return r({
157
162
  mutationFn: async (e) => (await s(`mutation CooCreateCollection($input: CooCreateCollectionInput!) {
158
163
  cooCreateCollection(input: $input) { ${l} }
159
- }`, { input: e }, i)).cooCreateCollection,
164
+ }`, { input: e }, n)).cooCreateCollection,
160
165
  onSuccess: () => {
161
- n.invalidateQueries({ queryKey: [o, "collections"] });
166
+ t.invalidateQueries({ queryKey: [o, "collections"] });
162
167
  }
163
168
  });
164
- }, T = () => {
165
- let n = r(), { apiGatewayUrl: i } = e();
166
- return t({
169
+ }, D = () => {
170
+ let t = a(), { apiGatewayUrl: n } = e();
171
+ return r({
167
172
  mutationFn: async ({ id: e, input: t }) => (await s(`mutation CooUpdateCollection($id: ID!, $input: CooUpdateCollectionInput!) {
168
173
  cooUpdateCollection(id: $id, input: $input) { ${l} }
169
174
  }`, {
170
175
  id: e,
171
176
  input: t
172
- }, i)).cooUpdateCollection,
177
+ }, n)).cooUpdateCollection,
173
178
  onSuccess: (e) => {
174
- n.invalidateQueries({ queryKey: [o, "collections"] }), n.invalidateQueries({ queryKey: [
179
+ t.invalidateQueries({ queryKey: [o, "collections"] }), t.invalidateQueries({ queryKey: [
175
180
  o,
176
181
  "collection",
177
182
  e.id
178
183
  ] });
179
184
  }
180
185
  });
181
- }, E = () => {
182
- let n = r(), { apiGatewayUrl: i } = e();
183
- return t({
186
+ }, O = () => {
187
+ let t = a(), { apiGatewayUrl: n } = e();
188
+ return r({
184
189
  mutationFn: async (e) => (await s(`mutation CooPublishCollection($id: ID!) {
185
190
  cooPublishCollection(id: $id) { ${l} }
186
- }`, { id: e }, i)).cooPublishCollection,
191
+ }`, { id: e }, n)).cooPublishCollection,
187
192
  onSuccess: (e) => {
188
- n.invalidateQueries({ queryKey: [o, "collections"] }), n.invalidateQueries({ queryKey: [
193
+ t.invalidateQueries({ queryKey: [o, "collections"] }), t.invalidateQueries({ queryKey: [
189
194
  o,
190
195
  "collection",
191
196
  e.id
192
197
  ] });
193
198
  }
194
199
  });
195
- }, D = () => {
196
- let n = r(), { apiGatewayUrl: i } = e();
197
- return t({
198
- mutationFn: async (e) => (await s("mutation CooArchiveCollection($id: ID!) { cooArchiveCollection(id: $id) }", { id: e }, i)).cooArchiveCollection,
200
+ }, k = () => {
201
+ let t = a(), { apiGatewayUrl: n } = e();
202
+ return r({
203
+ mutationFn: async (e) => (await s("mutation CooArchiveCollection($id: ID!) { cooArchiveCollection(id: $id) }", { id: e }, n)).cooArchiveCollection,
199
204
  onSuccess: () => {
200
- n.invalidateQueries({ queryKey: [o, "collections"] });
205
+ t.invalidateQueries({ queryKey: [o, "collections"] });
201
206
  }
202
207
  });
203
- }, O = (t = {}) => {
204
- let { apiGatewayUrl: r } = e();
205
- return n({
208
+ }, A = (t = {}) => {
209
+ let { apiGatewayUrl: n } = e();
210
+ return i({
206
211
  queryKey: [
207
212
  o,
208
213
  "style-items",
@@ -228,11 +233,11 @@ var o = "coolandlovely", s = async (e, t, n, r) => {
228
233
  limit: 50,
229
234
  offset: 0
230
235
  }
231
- }, r)).cooListStyleItems
236
+ }, n)).cooListStyleItems
232
237
  });
233
- }, k = (t) => {
234
- let { apiGatewayUrl: r } = e();
235
- return n({
238
+ }, j = (t) => {
239
+ let { apiGatewayUrl: n } = e();
240
+ return i({
236
241
  queryKey: [
237
242
  o,
238
243
  "style-item",
@@ -245,72 +250,72 @@ var o = "coolandlovely", s = async (e, t, n, r) => {
245
250
  brand { id name handle }
246
251
  collection { id name }
247
252
  }
248
- }`, { id: t }, r)).cooStyleItem,
253
+ }`, { id: t }, n)).cooStyleItem,
249
254
  enabled: !!t
250
255
  });
251
- }, A = () => {
252
- let n = r(), { apiGatewayUrl: i } = e();
253
- return t({
256
+ }, M = () => {
257
+ let t = a(), { apiGatewayUrl: n } = e();
258
+ return r({
254
259
  mutationFn: async (e) => (await s(`mutation CooCreateStyleItem($input: CooCreateStyleItemInput!) {
255
260
  cooCreateStyleItem(input: $input) { ${u} }
256
- }`, { input: e }, i)).cooCreateStyleItem,
261
+ }`, { input: e }, n)).cooCreateStyleItem,
257
262
  onSuccess: () => {
258
- n.invalidateQueries({ queryKey: [o, "style-items"] });
263
+ t.invalidateQueries({ queryKey: [o, "style-items"] });
259
264
  }
260
265
  });
261
- }, j = () => {
262
- let n = r(), { apiGatewayUrl: i } = e();
263
- return t({
266
+ }, N = () => {
267
+ let t = a(), { apiGatewayUrl: n } = e();
268
+ return r({
264
269
  mutationFn: async ({ id: e, input: t }) => (await s(`mutation CooUpdateStyleItem($id: ID!, $input: CooUpdateStyleItemInput!) {
265
270
  cooUpdateStyleItem(id: $id, input: $input) { ${u} }
266
271
  }`, {
267
272
  id: e,
268
273
  input: t
269
- }, i)).cooUpdateStyleItem,
274
+ }, n)).cooUpdateStyleItem,
270
275
  onSuccess: (e) => {
271
- n.invalidateQueries({ queryKey: [o, "style-items"] }), n.invalidateQueries({ queryKey: [
276
+ t.invalidateQueries({ queryKey: [o, "style-items"] }), t.invalidateQueries({ queryKey: [
272
277
  o,
273
278
  "style-item",
274
279
  e.id
275
- ] }), n.invalidateQueries({ queryKey: [
280
+ ] }), t.invalidateQueries({ queryKey: [
276
281
  o,
277
282
  "style-item-inventory",
278
283
  e.id
279
284
  ] });
280
285
  }
281
286
  });
282
- }, M = () => {
283
- let n = r(), { apiGatewayUrl: i } = e();
284
- return t({
287
+ }, P = () => {
288
+ let t = a(), { apiGatewayUrl: n } = e();
289
+ return r({
285
290
  mutationFn: async (e) => (await s(`mutation CooSyncStyleItemStoreListing($id: ID!) {
286
291
  cooSyncStyleItemStoreListing(id: $id) { id ${d} }
287
- }`, { id: e }, i)).cooSyncStyleItemStoreListing,
292
+ }`, { id: e }, n)).cooSyncStyleItemStoreListing,
288
293
  onSuccess: (e) => {
289
- n.setQueryData([
294
+ t.setQueryData([
290
295
  o,
291
296
  "style-item",
292
297
  e.id
293
298
  ], (t) => t && {
294
299
  ...t,
295
300
  ...e
296
- }), n.invalidateQueries({ queryKey: [
301
+ }), t.invalidateQueries({ queryKey: [
297
302
  o,
298
303
  "style-item",
299
304
  e.id
300
305
  ] });
301
306
  }
302
307
  });
303
- }, N = () => {
304
- let n = r(), { apiGatewayUrl: i } = e();
305
- return t({
306
- mutationFn: async (e) => (await s("mutation CooArchiveStyleItem($id: ID!) { cooArchiveStyleItem(id: $id) }", { id: e }, i)).cooArchiveStyleItem,
308
+ }, F = () => {
309
+ let t = a(), { apiGatewayUrl: n } = e();
310
+ return r({
311
+ mutationFn: async (e) => (await s("mutation CooArchiveStyleItem($id: ID!) { cooArchiveStyleItem(id: $id) }", { id: e }, n)).cooArchiveStyleItem,
307
312
  onSuccess: () => {
308
- n.invalidateQueries({ queryKey: [o, "style-items"] });
313
+ t.invalidateQueries({ queryKey: [o, "style-items"] });
309
314
  }
310
315
  });
311
- }, P = (t = {}) => {
312
- let { apiGatewayUrl: r } = e();
313
- return n({
316
+ }, I = (t = {}) => {
317
+ let { apiGatewayUrl: n } = e();
318
+ return i({
314
319
  queryKey: [
315
320
  o,
316
321
  "looks",
@@ -331,11 +336,11 @@ var o = "coolandlovely", s = async (e, t, n, r) => {
331
336
  limit: 50,
332
337
  offset: 0
333
338
  }
334
- }, r)).cooListLooks
339
+ }, n)).cooListLooks
335
340
  });
336
- }, F = (t) => {
337
- let { apiGatewayUrl: r } = e();
338
- return n({
341
+ }, L = (t) => {
342
+ let { apiGatewayUrl: n } = e();
343
+ return i({
339
344
  queryKey: [
340
345
  o,
341
346
  "look",
@@ -347,19 +352,19 @@ var o = "coolandlovely", s = async (e, t, n, r) => {
347
352
  ${f}
348
353
  items { items { ${p} } pageInfo { cursor hasMore } }
349
354
  }
350
- }`, { id: t }, r);
355
+ }`, { id: t }, n);
351
356
  if (!e.cooLook) return null;
352
- let { items: n, ...i } = e.cooLook;
357
+ let { items: r, ...i } = e.cooLook;
353
358
  return {
354
359
  ...i,
355
- items: n?.items ?? []
360
+ items: r?.items ?? []
356
361
  };
357
362
  },
358
363
  enabled: !!t
359
364
  });
360
- }, I = (t = {}) => {
361
- let { apiGatewayUrl: r } = e();
362
- return n({
365
+ }, R = (t = {}) => {
366
+ let { apiGatewayUrl: n } = e();
367
+ return i({
363
368
  queryKey: [
364
369
  o,
365
370
  "looks-with-items",
@@ -381,7 +386,7 @@ var o = "coolandlovely", s = async (e, t, n, r) => {
381
386
  limit: 50,
382
387
  offset: 0
383
388
  }
384
- }, r);
389
+ }, n);
385
390
  return {
386
391
  items: e.cooListLooks.items.map(({ items: e, ...t }) => ({
387
392
  ...t,
@@ -391,104 +396,104 @@ var o = "coolandlovely", s = async (e, t, n, r) => {
391
396
  };
392
397
  }
393
398
  });
394
- }, L = () => {
395
- let n = r(), { apiGatewayUrl: i } = e();
396
- return t({
399
+ }, z = () => {
400
+ let t = a(), { apiGatewayUrl: n } = e();
401
+ return r({
397
402
  mutationFn: async (e) => (await s(`mutation CooCreateLook($input: CooCreateLookInput!) {
398
403
  cooCreateLook(input: $input) { ${f} }
399
- }`, { input: e }, i)).cooCreateLook,
404
+ }`, { input: e }, n)).cooCreateLook,
400
405
  onSuccess: () => {
401
- n.invalidateQueries({ queryKey: [o, "looks"] }), n.invalidateQueries({ queryKey: [o, "looks-with-items"] });
406
+ t.invalidateQueries({ queryKey: [o, "looks"] }), t.invalidateQueries({ queryKey: [o, "looks-with-items"] });
402
407
  }
403
408
  });
404
- }, R = () => {
405
- let n = r(), { apiGatewayUrl: i } = e();
406
- return t({
409
+ }, B = () => {
410
+ let t = a(), { apiGatewayUrl: n } = e();
411
+ return r({
407
412
  mutationFn: async ({ id: e, input: t }) => (await s(`mutation CooUpdateLook($id: ID!, $input: CooUpdateLookInput!) {
408
413
  cooUpdateLook(id: $id, input: $input) { ${f} }
409
414
  }`, {
410
415
  id: e,
411
416
  input: t
412
- }, i)).cooUpdateLook,
417
+ }, n)).cooUpdateLook,
413
418
  onSuccess: (e) => {
414
- n.invalidateQueries({ queryKey: [o, "looks"] }), n.invalidateQueries({ queryKey: [o, "looks-with-items"] }), n.invalidateQueries({ queryKey: [
419
+ t.invalidateQueries({ queryKey: [o, "looks"] }), t.invalidateQueries({ queryKey: [o, "looks-with-items"] }), t.invalidateQueries({ queryKey: [
415
420
  o,
416
421
  "look",
417
422
  e.id
418
423
  ] });
419
424
  }
420
425
  });
421
- }, z = () => {
422
- let n = r(), { apiGatewayUrl: i } = e();
423
- return t({
424
- mutationFn: async (e) => (await s(`mutation CooPublishLook($id: ID!) { cooPublishLook(id: $id) { ${f} } }`, { id: e }, i)).cooPublishLook,
426
+ }, V = () => {
427
+ let t = a(), { apiGatewayUrl: n } = e();
428
+ return r({
429
+ mutationFn: async (e) => (await s(`mutation CooPublishLook($id: ID!) { cooPublishLook(id: $id) { ${f} } }`, { id: e }, n)).cooPublishLook,
425
430
  onSuccess: (e) => {
426
- n.invalidateQueries({ queryKey: [o, "looks"] }), n.invalidateQueries({ queryKey: [o, "looks-with-items"] }), n.invalidateQueries({ queryKey: [
431
+ t.invalidateQueries({ queryKey: [o, "looks"] }), t.invalidateQueries({ queryKey: [o, "looks-with-items"] }), t.invalidateQueries({ queryKey: [
427
432
  o,
428
433
  "look",
429
434
  e.id
430
435
  ] });
431
436
  }
432
437
  });
433
- }, B = () => {
434
- let n = r(), { apiGatewayUrl: i } = e();
435
- return t({
436
- mutationFn: async (e) => (await s(`mutation CooLikeLook($id: ID!) { cooLikeLook(id: $id) { ${f} } }`, { id: e }, i)).cooLikeLook,
438
+ }, H = () => {
439
+ let t = a(), { apiGatewayUrl: n } = e();
440
+ return r({
441
+ mutationFn: async (e) => (await s(`mutation CooLikeLook($id: ID!) { cooLikeLook(id: $id) { ${f} } }`, { id: e }, n)).cooLikeLook,
437
442
  onSuccess: (e) => {
438
- n.invalidateQueries({ queryKey: [o, "looks"] }), n.invalidateQueries({ queryKey: [o, "looks-with-items"] }), n.invalidateQueries({ queryKey: [
443
+ t.invalidateQueries({ queryKey: [o, "looks"] }), t.invalidateQueries({ queryKey: [o, "looks-with-items"] }), t.invalidateQueries({ queryKey: [
439
444
  o,
440
445
  "look",
441
446
  e.id
442
447
  ] });
443
448
  }
444
449
  });
445
- }, V = () => {
446
- let n = r(), { apiGatewayUrl: i } = e();
447
- return t({
448
- mutationFn: async (e) => (await s(`mutation CooUnlikeLook($id: ID!) { cooUnlikeLook(id: $id) { ${f} } }`, { id: e }, i)).cooUnlikeLook,
450
+ }, U = () => {
451
+ let t = a(), { apiGatewayUrl: n } = e();
452
+ return r({
453
+ mutationFn: async (e) => (await s(`mutation CooUnlikeLook($id: ID!) { cooUnlikeLook(id: $id) { ${f} } }`, { id: e }, n)).cooUnlikeLook,
449
454
  onSuccess: (e) => {
450
- n.invalidateQueries({ queryKey: [o, "looks"] }), n.invalidateQueries({ queryKey: [o, "looks-with-items"] }), n.invalidateQueries({ queryKey: [
455
+ t.invalidateQueries({ queryKey: [o, "looks"] }), t.invalidateQueries({ queryKey: [o, "looks-with-items"] }), t.invalidateQueries({ queryKey: [
451
456
  o,
452
457
  "look",
453
458
  e.id
454
459
  ] });
455
460
  }
456
461
  });
457
- }, H = () => {
458
- let n = r(), { apiGatewayUrl: i } = e();
459
- return t({
460
- mutationFn: async (e) => (await s(`mutation CooSaveLook($id: ID!) { cooSaveLook(id: $id) { ${f} } }`, { id: e }, i)).cooSaveLook,
462
+ }, W = () => {
463
+ let t = a(), { apiGatewayUrl: n } = e();
464
+ return r({
465
+ mutationFn: async (e) => (await s(`mutation CooSaveLook($id: ID!) { cooSaveLook(id: $id) { ${f} } }`, { id: e }, n)).cooSaveLook,
461
466
  onSuccess: (e) => {
462
- n.invalidateQueries({ queryKey: [o, "looks"] }), n.invalidateQueries({ queryKey: [o, "looks-with-items"] }), n.invalidateQueries({ queryKey: [
467
+ t.invalidateQueries({ queryKey: [o, "looks"] }), t.invalidateQueries({ queryKey: [o, "looks-with-items"] }), t.invalidateQueries({ queryKey: [
463
468
  o,
464
469
  "look",
465
470
  e.id
466
471
  ] });
467
472
  }
468
473
  });
469
- }, U = () => {
470
- let n = r(), { apiGatewayUrl: i } = e();
471
- return t({
472
- mutationFn: async (e) => (await s(`mutation CooUnsaveLook($id: ID!) { cooUnsaveLook(id: $id) { ${f} } }`, { id: e }, i)).cooUnsaveLook,
474
+ }, G = () => {
475
+ let t = a(), { apiGatewayUrl: n } = e();
476
+ return r({
477
+ mutationFn: async (e) => (await s(`mutation CooUnsaveLook($id: ID!) { cooUnsaveLook(id: $id) { ${f} } }`, { id: e }, n)).cooUnsaveLook,
473
478
  onSuccess: (e) => {
474
- n.invalidateQueries({ queryKey: [o, "looks"] }), n.invalidateQueries({ queryKey: [o, "looks-with-items"] }), n.invalidateQueries({ queryKey: [
479
+ t.invalidateQueries({ queryKey: [o, "looks"] }), t.invalidateQueries({ queryKey: [o, "looks-with-items"] }), t.invalidateQueries({ queryKey: [
475
480
  o,
476
481
  "look",
477
482
  e.id
478
483
  ] });
479
484
  }
480
485
  });
481
- }, W = () => {
482
- let n = r(), { apiGatewayUrl: i } = e();
483
- return t({
484
- mutationFn: async (e) => (await s("mutation CooDeleteLook($id: ID!) { cooDeleteLook(id: $id) }", { id: e }, i)).cooDeleteLook,
486
+ }, K = () => {
487
+ let t = a(), { apiGatewayUrl: n } = e();
488
+ return r({
489
+ mutationFn: async (e) => (await s("mutation CooDeleteLook($id: ID!) { cooDeleteLook(id: $id) }", { id: e }, n)).cooDeleteLook,
485
490
  onSuccess: () => {
486
- n.invalidateQueries({ queryKey: [o, "looks"] }), n.invalidateQueries({ queryKey: [o, "looks-with-items"] });
491
+ t.invalidateQueries({ queryKey: [o, "looks"] }), t.invalidateQueries({ queryKey: [o, "looks-with-items"] });
487
492
  }
488
493
  });
489
- }, G = (t = {}) => {
490
- let { apiGatewayUrl: r } = e();
491
- return n({
494
+ }, ne = (t = {}) => {
495
+ let { apiGatewayUrl: n } = e();
496
+ return i({
492
497
  queryKey: [
493
498
  o,
494
499
  "collaborations",
@@ -503,11 +508,11 @@ var o = "coolandlovely", s = async (e, t, n, r) => {
503
508
  brandId: t.brandId,
504
509
  creatorId: t.creatorId,
505
510
  status: t.status
506
- }, r)).cooListCollaborations.items
511
+ }, n)).cooListCollaborations.items
507
512
  });
508
- }, K = (t) => {
509
- let { apiGatewayUrl: r } = e();
510
- return n({
513
+ }, q = (t) => {
514
+ let { apiGatewayUrl: n } = e();
515
+ return i({
511
516
  queryKey: [
512
517
  o,
513
518
  "collaboration",
@@ -521,29 +526,29 @@ var o = "coolandlovely", s = async (e, t, n, r) => {
521
526
  looks { items { ${f} } pageInfo { cursor hasMore } }
522
527
  payout { ${h} }
523
528
  }
524
- }`, { id: t }, r);
529
+ }`, { id: t }, n);
525
530
  if (!e.cooCollaboration) return null;
526
- let { looks: n, ...i } = e.cooCollaboration;
531
+ let { looks: r, ...i } = e.cooCollaboration;
527
532
  return {
528
533
  ...i,
529
- looks: n?.items ?? []
534
+ looks: r?.items ?? []
530
535
  };
531
536
  },
532
537
  enabled: !!t
533
538
  });
534
- }, ne = () => {
535
- let n = r(), { apiGatewayUrl: i } = e();
536
- return t({
539
+ }, J = () => {
540
+ let t = a(), { apiGatewayUrl: n } = e();
541
+ return r({
537
542
  mutationFn: async (e) => (await s(`mutation CooCreateCollaboration($input: CooCreateCollaborationInput!) {
538
543
  cooCreateCollaboration(input: $input) { ${m} }
539
- }`, { input: e }, i)).cooCreateCollaboration,
544
+ }`, { input: e }, n)).cooCreateCollaboration,
540
545
  onSuccess: () => {
541
- n.invalidateQueries({ queryKey: [o, "collaborations"] });
546
+ t.invalidateQueries({ queryKey: [o, "collaborations"] });
542
547
  }
543
548
  });
544
- }, q = () => {
545
- let n = r(), { apiGatewayUrl: i } = e();
546
- return t({
549
+ }, Y = () => {
550
+ let t = a(), { apiGatewayUrl: n } = e();
551
+ return r({
547
552
  mutationFn: async ({ id: e, input: t }) => (await s(`mutation CooUpdateCollaboration($id: ID!, $input: CooUpdateCollaborationInput!) {
548
553
  cooUpdateCollaboration(id: $id, input: $input) {
549
554
  ${m}
@@ -552,43 +557,43 @@ var o = "coolandlovely", s = async (e, t, n, r) => {
552
557
  }`, {
553
558
  id: e,
554
559
  input: t
555
- }, i)).cooUpdateCollaboration,
560
+ }, n)).cooUpdateCollaboration,
556
561
  onSuccess: (e) => {
557
- n.invalidateQueries({ queryKey: [o, "collaborations"] }), n.invalidateQueries({ queryKey: [
562
+ t.invalidateQueries({ queryKey: [o, "collaborations"] }), t.invalidateQueries({ queryKey: [
558
563
  o,
559
564
  "collaboration",
560
565
  e.id
561
566
  ] });
562
567
  }
563
568
  });
564
- }, J = () => {
565
- let n = r(), { apiGatewayUrl: i } = e();
566
- return t({
569
+ }, X = () => {
570
+ let t = a(), { apiGatewayUrl: n } = e();
571
+ return r({
567
572
  mutationFn: async ({ id: e, status: t }) => (await s(`mutation CooTransitionCollaboration($id: ID!, $status: CooCollaborationStatus!) {
568
573
  cooTransitionCollaboration(id: $id, status: $status) { ${m} }
569
574
  }`, {
570
575
  id: e,
571
576
  status: t
572
- }, i)).cooTransitionCollaboration,
577
+ }, n)).cooTransitionCollaboration,
573
578
  onSuccess: (e) => {
574
- n.invalidateQueries({ queryKey: [o, "collaborations"] }), n.invalidateQueries({ queryKey: [
579
+ t.invalidateQueries({ queryKey: [o, "collaborations"] }), t.invalidateQueries({ queryKey: [
575
580
  o,
576
581
  "collaboration",
577
582
  e.id
578
583
  ] });
579
584
  }
580
585
  });
581
- }, Y = () => {
582
- let n = r(), { apiGatewayUrl: i } = e();
583
- return t({
584
- mutationFn: async (e) => (await s("mutation CooDeleteCollaboration($id: ID!) { cooDeleteCollaboration(id: $id) }", { id: e }, i)).cooDeleteCollaboration,
586
+ }, Z = () => {
587
+ let t = a(), { apiGatewayUrl: n } = e();
588
+ return r({
589
+ mutationFn: async (e) => (await s("mutation CooDeleteCollaboration($id: ID!) { cooDeleteCollaboration(id: $id) }", { id: e }, n)).cooDeleteCollaboration,
585
590
  onSuccess: () => {
586
- n.invalidateQueries({ queryKey: [o, "collaborations"] });
591
+ t.invalidateQueries({ queryKey: [o, "collaborations"] });
587
592
  }
588
593
  });
589
- }, X = (t = {}) => {
590
- let { apiGatewayUrl: r } = e();
591
- return n({
594
+ }, re = (t = {}) => {
595
+ let { apiGatewayUrl: n } = e();
596
+ return i({
592
597
  queryKey: [
593
598
  o,
594
599
  "wardrobe",
@@ -602,45 +607,45 @@ var o = "coolandlovely", s = async (e, t, n, r) => {
602
607
  }`, {
603
608
  category: t.category,
604
609
  source: t.source
605
- }, r)).cooListWardrobeItems.items
610
+ }, n)).cooListWardrobeItems.items
606
611
  });
607
- }, Z = () => {
608
- let n = r(), { apiGatewayUrl: i } = e();
609
- return t({
612
+ }, ie = () => {
613
+ let t = a(), { apiGatewayUrl: n } = e();
614
+ return r({
610
615
  mutationFn: async (e) => (await s(`mutation CooCreateWardrobeItem($input: CooCreateWardrobeItemInput!) {
611
616
  cooCreateWardrobeItem(input: $input) { ${g} }
612
- }`, { input: e }, i)).cooCreateWardrobeItem,
617
+ }`, { input: e }, n)).cooCreateWardrobeItem,
613
618
  onSuccess: () => {
614
- n.invalidateQueries({ queryKey: [o, "wardrobe"] });
619
+ t.invalidateQueries({ queryKey: [o, "wardrobe"] });
615
620
  }
616
621
  });
617
- }, re = () => {
618
- let n = r(), { apiGatewayUrl: i } = e();
619
- return t({
622
+ }, ae = () => {
623
+ let t = a(), { apiGatewayUrl: n } = e();
624
+ return r({
620
625
  mutationFn: async (e) => (await s(`mutation CooLogWardrobeWear($id: ID!) {
621
626
  cooLogWardrobeWear(id: $id) { ${g} }
622
- }`, { id: e }, i)).cooLogWardrobeWear,
627
+ }`, { id: e }, n)).cooLogWardrobeWear,
623
628
  onSuccess: () => {
624
- n.invalidateQueries({ queryKey: [o, "wardrobe"] });
629
+ t.invalidateQueries({ queryKey: [o, "wardrobe"] });
625
630
  }
626
631
  });
627
- }, ie = () => {
628
- let n = r(), { apiGatewayUrl: i } = e();
629
- return t({
630
- mutationFn: async (e) => (await s("mutation CooRemoveWardrobeItem($id: ID!) { cooRemoveWardrobeItem(id: $id) }", { id: e }, i)).cooRemoveWardrobeItem,
632
+ }, oe = () => {
633
+ let t = a(), { apiGatewayUrl: n } = e();
634
+ return r({
635
+ mutationFn: async (e) => (await s("mutation CooRemoveWardrobeItem($id: ID!) { cooRemoveWardrobeItem(id: $id) }", { id: e }, n)).cooRemoveWardrobeItem,
631
636
  onSuccess: () => {
632
- n.invalidateQueries({ queryKey: [o, "wardrobe"] });
637
+ t.invalidateQueries({ queryKey: [o, "wardrobe"] });
633
638
  }
634
639
  });
635
- }, ae = () => {
640
+ }, se = () => {
636
641
  let { apiGatewayUrl: t } = e();
637
- return n({
642
+ return i({
638
643
  queryKey: [o, "my-style-profile"],
639
644
  queryFn: async () => (await s(`query CooMyStyleProfile { cooMyStyleProfile { ${_} } }`, {}, t)).cooMyStyleProfile
640
645
  });
641
- }, oe = (t) => {
642
- let { apiGatewayUrl: r } = e();
643
- return n({
646
+ }, ce = (t) => {
647
+ let { apiGatewayUrl: n } = e();
648
+ return i({
644
649
  queryKey: [
645
650
  o,
646
651
  "style-profile-by-owner",
@@ -648,22 +653,22 @@ var o = "coolandlovely", s = async (e, t, n, r) => {
648
653
  ],
649
654
  queryFn: async () => (await s(`query CooStyleProfileByOwner($ownerId: ID!) {
650
655
  cooStyleProfileByOwner(ownerId: $ownerId) { ${_} }
651
- }`, { ownerId: t }, r)).cooStyleProfileByOwner,
656
+ }`, { ownerId: t }, n)).cooStyleProfileByOwner,
652
657
  enabled: !!t
653
658
  });
654
- }, se = () => {
655
- let n = r(), { apiGatewayUrl: i } = e();
656
- return t({
659
+ }, le = () => {
660
+ let t = a(), { apiGatewayUrl: n } = e();
661
+ return r({
657
662
  mutationFn: async (e) => (await s(`mutation CooUpsertStyleProfile($input: CooUpsertStyleProfileInput!) {
658
663
  cooUpsertStyleProfile(input: $input) { ${_} }
659
- }`, { input: e }, i)).cooUpsertStyleProfile,
664
+ }`, { input: e }, n)).cooUpsertStyleProfile,
660
665
  onSuccess: () => {
661
- n.invalidateQueries({ queryKey: [o, "my-style-profile"] });
666
+ t.invalidateQueries({ queryKey: [o, "my-style-profile"] });
662
667
  }
663
668
  });
664
- }, Q = "id workspaceId lookbookId lookId styleItemId note position createdAt updatedAt", ce = (t) => {
665
- let { apiGatewayUrl: r } = e();
666
- return n({
669
+ }, Q = "id workspaceId lookbookId lookId styleItemId note position createdAt updatedAt", ue = (t) => {
670
+ let { apiGatewayUrl: n } = e();
671
+ return i({
667
672
  queryKey: [
668
673
  o,
669
674
  "lookbooks",
@@ -677,87 +682,87 @@ var o = "coolandlovely", s = async (e, t, n, r) => {
677
682
  }
678
683
  pageInfo { cursor hasMore }
679
684
  }
680
- }`, { ownerId: t }, r)).cooListLookbooks.items.map(({ entries: e, ...t }) => ({
685
+ }`, { ownerId: t }, n)).cooListLookbooks.items.map(({ entries: e, ...t }) => ({
681
686
  ...t,
682
687
  entries: e?.items ?? []
683
688
  }))
684
689
  });
685
- }, le = () => {
686
- let n = r(), { apiGatewayUrl: i } = e();
687
- return t({
690
+ }, de = () => {
691
+ let t = a(), { apiGatewayUrl: n } = e();
692
+ return r({
688
693
  mutationFn: async (e) => (await s(`mutation CooCreateLookbook($input: CooCreateLookbookInput!) {
689
694
  cooCreateLookbook(input: $input) { ${v} }
690
- }`, { input: e }, i)).cooCreateLookbook,
695
+ }`, { input: e }, n)).cooCreateLookbook,
691
696
  onSuccess: () => {
692
- n.invalidateQueries({ queryKey: [o, "lookbooks"] });
697
+ t.invalidateQueries({ queryKey: [o, "lookbooks"] });
693
698
  }
694
699
  });
695
- }, ue = () => {
696
- let n = r(), { apiGatewayUrl: i } = e();
697
- return t({
698
- mutationFn: async (e) => (await s("mutation CooAddLookbookEntry($input: CooAddLookbookEntryInput!) {\n cooAddLookbookEntry(input: $input) {\n id lookbookId lookId styleItemId note position createdAt updatedAt\n }\n }", { input: e }, i)).cooAddLookbookEntry,
700
+ }, fe = () => {
701
+ let t = a(), { apiGatewayUrl: n } = e();
702
+ return r({
703
+ mutationFn: async (e) => (await s("mutation CooAddLookbookEntry($input: CooAddLookbookEntryInput!) {\n cooAddLookbookEntry(input: $input) {\n id lookbookId lookId styleItemId note position createdAt updatedAt\n }\n }", { input: e }, n)).cooAddLookbookEntry,
699
704
  onSuccess: (e) => {
700
- n.invalidateQueries({ queryKey: [o, "lookbooks"] }), n.invalidateQueries({ queryKey: [o, "lookbook"] }), n.invalidateQueries({ queryKey: [
705
+ t.invalidateQueries({ queryKey: [o, "lookbooks"] }), t.invalidateQueries({ queryKey: [o, "lookbook"] }), t.invalidateQueries({ queryKey: [
701
706
  o,
702
707
  "lookbook",
703
708
  e.lookbookId
704
709
  ] });
705
710
  }
706
711
  });
707
- }, de = () => {
708
- let n = r(), { apiGatewayUrl: i } = e();
709
- return t({
710
- mutationFn: async (e) => (await s("mutation CooRemoveLookbookEntry($id: ID!) { cooRemoveLookbookEntry(id: $id) }", { id: e }, i)).cooRemoveLookbookEntry,
712
+ }, pe = () => {
713
+ let t = a(), { apiGatewayUrl: n } = e();
714
+ return r({
715
+ mutationFn: async (e) => (await s("mutation CooRemoveLookbookEntry($id: ID!) { cooRemoveLookbookEntry(id: $id) }", { id: e }, n)).cooRemoveLookbookEntry,
711
716
  onSuccess: () => {
712
- n.invalidateQueries({ queryKey: [o, "lookbooks"] }), n.invalidateQueries({ queryKey: [o, "lookbook"] });
717
+ t.invalidateQueries({ queryKey: [o, "lookbooks"] }), t.invalidateQueries({ queryKey: [o, "lookbook"] });
713
718
  }
714
719
  });
715
- }, fe = "\n id workspaceId ownerId displayName bio visibility\n stylePreferences palette favouriteBrands\n isFollowedByMe followerCount followingCount\n", pe = (t) => {
716
- let { apiGatewayUrl: r } = e();
717
- return n({
720
+ }, me = "\n id workspaceId ownerId displayName bio visibility\n stylePreferences palette favouriteBrands\n isFollowedByMe followerCount followingCount\n", he = (t) => {
721
+ let { apiGatewayUrl: n } = e();
722
+ return i({
718
723
  queryKey: [
719
724
  o,
720
725
  "is-following",
721
726
  t
722
727
  ],
723
728
  enabled: !!t,
724
- queryFn: async () => (await s("query CooIsFollowing($followeeId: ID!) { cooIsFollowing(followeeId: $followeeId) }", { followeeId: t }, r)).cooIsFollowing
725
- });
726
- }, $ = () => {
727
- let n = r(), { apiGatewayUrl: i } = e();
728
- return t({
729
- mutationFn: async (e) => (await s("mutation CooFollow($followeeId: ID!) { cooFollow(followeeId: $followeeId) }", { followeeId: e }, i)).cooFollow,
730
- onSuccess: (e, t) => {
731
- n.invalidateQueries({ queryKey: [
729
+ queryFn: async () => (await s("query CooIsFollowing($followeeId: ID!) { cooIsFollowing(followeeId: $followeeId) }", { followeeId: t }, n)).cooIsFollowing
730
+ });
731
+ }, ge = () => {
732
+ let t = a(), { apiGatewayUrl: n } = e();
733
+ return r({
734
+ mutationFn: async (e) => (await s("mutation CooFollow($followeeId: ID!) { cooFollow(followeeId: $followeeId) }", { followeeId: e }, n)).cooFollow,
735
+ onSuccess: (e, n) => {
736
+ t.invalidateQueries({ queryKey: [
732
737
  o,
733
738
  "is-following",
734
- t
735
- ] }), n.invalidateQueries({ queryKey: [o, "my-following"] }), n.invalidateQueries({ queryKey: [o, "my-followers"] }), n.invalidateQueries({ queryKey: [o, "my-style-profile"] });
739
+ n
740
+ ] }), t.invalidateQueries({ queryKey: [o, "my-following"] }), t.invalidateQueries({ queryKey: [o, "my-followers"] }), t.invalidateQueries({ queryKey: [o, "my-style-profile"] });
736
741
  }
737
742
  });
738
- }, me = () => {
739
- let n = r(), { apiGatewayUrl: i } = e();
740
- return t({
741
- mutationFn: async (e) => (await s("mutation CooUnfollow($followeeId: ID!) { cooUnfollow(followeeId: $followeeId) }", { followeeId: e }, i)).cooUnfollow,
742
- onSuccess: (e, t) => {
743
- n.invalidateQueries({ queryKey: [
743
+ }, _e = () => {
744
+ let t = a(), { apiGatewayUrl: n } = e();
745
+ return r({
746
+ mutationFn: async (e) => (await s("mutation CooUnfollow($followeeId: ID!) { cooUnfollow(followeeId: $followeeId) }", { followeeId: e }, n)).cooUnfollow,
747
+ onSuccess: (e, n) => {
748
+ t.invalidateQueries({ queryKey: [
744
749
  o,
745
750
  "is-following",
746
- t
747
- ] }), n.invalidateQueries({ queryKey: [o, "my-following"] }), n.invalidateQueries({ queryKey: [o, "my-followers"] }), n.invalidateQueries({ queryKey: [o, "my-style-profile"] });
751
+ n
752
+ ] }), t.invalidateQueries({ queryKey: [o, "my-following"] }), t.invalidateQueries({ queryKey: [o, "my-followers"] }), t.invalidateQueries({ queryKey: [o, "my-style-profile"] });
748
753
  }
749
754
  });
750
- }, he = () => {
755
+ }, ve = () => {
751
756
  let { apiGatewayUrl: t } = e();
752
- return n({
757
+ return i({
753
758
  queryKey: [o, "my-following"],
754
759
  queryFn: async () => (await s(`query CooMyFollowing {
755
- cooMyFollowing { items { ${fe} } pageInfo { cursor hasMore } }
760
+ cooMyFollowing { items { ${me} } pageInfo { cursor hasMore } }
756
761
  }`, {}, t)).cooMyFollowing.items
757
762
  });
758
- }, ge = (t) => {
759
- let { apiGatewayUrl: r } = e();
760
- return n({
763
+ }, ye = (t) => {
764
+ let { apiGatewayUrl: n } = e();
765
+ return i({
761
766
  queryKey: [
762
767
  o,
763
768
  "lookbook",
@@ -769,31 +774,31 @@ var o = "coolandlovely", s = async (e, t, n, r) => {
769
774
  ${v}
770
775
  entries { items { ${Q} } pageInfo { cursor hasMore } }
771
776
  }
772
- }`, { id: t }, r);
777
+ }`, { id: t }, n);
773
778
  if (!e.cooLookbook) return null;
774
- let { entries: n, ...i } = e.cooLookbook;
779
+ let { entries: r, ...i } = e.cooLookbook;
775
780
  return {
776
781
  ...i,
777
- entries: n?.items ?? []
782
+ entries: r?.items ?? []
778
783
  };
779
784
  },
780
785
  enabled: !!t
781
786
  });
782
- }, _e = () => {
783
- let n = r(), { apiGatewayUrl: i } = e();
784
- return t({
785
- mutationFn: async (e) => (await s("mutation CooDeleteLookbook($id: ID!) { cooDeleteLookbook(id: $id) }", { id: e }, i)).cooDeleteLookbook,
787
+ }, be = () => {
788
+ let t = a(), { apiGatewayUrl: n } = e();
789
+ return r({
790
+ mutationFn: async (e) => (await s("mutation CooDeleteLookbook($id: ID!) { cooDeleteLookbook(id: $id) }", { id: e }, n)).cooDeleteLookbook,
786
791
  onSuccess: () => {
787
- n.invalidateQueries({ queryKey: [o, "lookbooks"] }), n.invalidateQueries({ queryKey: [o, "lookbook"] });
792
+ t.invalidateQueries({ queryKey: [o, "lookbooks"] }), t.invalidateQueries({ queryKey: [o, "lookbook"] });
788
793
  }
789
794
  });
790
- }, ve = ({ enabled: t = !0, ...r }) => {
791
- let { apiGatewayUrl: i } = e();
792
- return n({
795
+ }, $ = ({ enabled: t = !0, ...n }) => {
796
+ let { apiGatewayUrl: r } = e();
797
+ return i({
793
798
  queryKey: [
794
799
  o,
795
800
  "search-style-items",
796
- r
801
+ n
797
802
  ],
798
803
  enabled: t,
799
804
  queryFn: async () => (await s(`query CooSearchStyleItems($input: CooSearchStyleItemsInput!, $pagination: PaginationInput) {
@@ -802,20 +807,20 @@ var o = "coolandlovely", s = async (e, t, n, r) => {
802
807
  pageInfo { cursor hasMore }
803
808
  }
804
809
  }`, {
805
- input: r.input,
806
- pagination: r.pagination ?? {
810
+ input: n.input,
811
+ pagination: n.pagination ?? {
807
812
  limit: 24,
808
813
  offset: 0
809
814
  }
810
- }, i)).cooSearchStyleItems
815
+ }, r)).cooSearchStyleItems
811
816
  });
812
- }, ye = ({ enabled: t = !0, ...r }) => {
813
- let { apiGatewayUrl: i } = e();
814
- return n({
817
+ }, xe = ({ enabled: t = !0, ...n }) => {
818
+ let { apiGatewayUrl: r } = e();
819
+ return i({
815
820
  queryKey: [
816
821
  o,
817
822
  "search-looks",
818
- r
823
+ n
819
824
  ],
820
825
  enabled: t,
821
826
  queryFn: async () => (await s(`query CooSearchLooks($input: CooSearchLooksInput!, $pagination: PaginationInput) {
@@ -824,72 +829,72 @@ var o = "coolandlovely", s = async (e, t, n, r) => {
824
829
  pageInfo { cursor hasMore }
825
830
  }
826
831
  }`, {
827
- input: r.input,
828
- pagination: r.pagination ?? {
832
+ input: n.input,
833
+ pagination: n.pagination ?? {
829
834
  limit: 24,
830
835
  offset: 0
831
836
  }
832
- }, i)).cooSearchLooks
837
+ }, r)).cooSearchLooks
833
838
  });
834
- }, be = () => {
835
- let n = r(), { apiGatewayUrl: i } = e();
836
- return t({
837
- mutationFn: async (e) => (await s(`mutation CooApproveBrand($id: ID!) { cooApproveBrand(id: $id) { ${c} } }`, { id: e }, i)).cooApproveBrand,
839
+ }, Se = () => {
840
+ let t = a(), { apiGatewayUrl: n } = e();
841
+ return r({
842
+ mutationFn: async (e) => (await s(`mutation CooApproveBrand($id: ID!) { cooApproveBrand(id: $id) { ${c} } }`, { id: e }, n)).cooApproveBrand,
838
843
  onSuccess: (e) => {
839
- n.invalidateQueries({ queryKey: [o, "brands"] }), n.invalidateQueries({ queryKey: [
844
+ t.invalidateQueries({ queryKey: [o, "brands"] }), t.invalidateQueries({ queryKey: [
840
845
  o,
841
846
  "brand",
842
847
  e.id
843
848
  ] });
844
849
  }
845
850
  });
846
- }, xe = () => {
847
- let n = r(), { apiGatewayUrl: i } = e();
848
- return t({
849
- mutationFn: async (e) => (await s(`mutation CooRejectBrand($id: ID!) { cooRejectBrand(id: $id) { ${c} } }`, { id: e }, i)).cooRejectBrand,
851
+ }, Ce = () => {
852
+ let t = a(), { apiGatewayUrl: n } = e();
853
+ return r({
854
+ mutationFn: async (e) => (await s(`mutation CooRejectBrand($id: ID!) { cooRejectBrand(id: $id) { ${c} } }`, { id: e }, n)).cooRejectBrand,
850
855
  onSuccess: (e) => {
851
- n.invalidateQueries({ queryKey: [o, "brands"] }), n.invalidateQueries({ queryKey: [
856
+ t.invalidateQueries({ queryKey: [o, "brands"] }), t.invalidateQueries({ queryKey: [
852
857
  o,
853
858
  "brand",
854
859
  e.id
855
860
  ] });
856
861
  }
857
862
  });
858
- }, Se = () => {
859
- let n = r(), { apiGatewayUrl: i } = e();
860
- return t({
863
+ }, we = () => {
864
+ let t = a(), { apiGatewayUrl: n } = e();
865
+ return r({
861
866
  mutationFn: async ({ id: e, input: t }) => (await s(`mutation CooReviewCollaboration($id: ID!, $input: CooReviewCollaborationInput!) {
862
867
  cooReviewCollaboration(id: $id, input: $input) { ${m} }
863
868
  }`, {
864
869
  id: e,
865
870
  input: t
866
- }, i)).cooReviewCollaboration,
871
+ }, n)).cooReviewCollaboration,
867
872
  onSuccess: (e) => {
868
- n.invalidateQueries({ queryKey: [o, "collaborations"] }), n.invalidateQueries({ queryKey: [
873
+ t.invalidateQueries({ queryKey: [o, "collaborations"] }), t.invalidateQueries({ queryKey: [
869
874
  o,
870
875
  "collaboration",
871
876
  e.id
872
877
  ] });
873
878
  }
874
879
  });
875
- }, Ce = () => {
876
- let n = r(), { apiGatewayUrl: i } = e();
877
- return t({
878
- mutationFn: async (e) => (await s(`mutation CooFeatureStyleItem($id: ID!) { cooFeatureStyleItem(id: $id) { ${u} } }`, { id: e }, i)).cooFeatureStyleItem,
880
+ }, Te = () => {
881
+ let t = a(), { apiGatewayUrl: n } = e();
882
+ return r({
883
+ mutationFn: async (e) => (await s(`mutation CooFeatureStyleItem($id: ID!) { cooFeatureStyleItem(id: $id) { ${u} } }`, { id: e }, n)).cooFeatureStyleItem,
879
884
  onSuccess: (e) => {
880
- n.invalidateQueries({ queryKey: [o, "style-items"] }), n.invalidateQueries({ queryKey: [
885
+ t.invalidateQueries({ queryKey: [o, "style-items"] }), t.invalidateQueries({ queryKey: [
881
886
  o,
882
887
  "style-item",
883
888
  e.id
884
889
  ] });
885
890
  }
886
891
  });
887
- }, we = () => {
888
- let n = r(), { apiGatewayUrl: i } = e();
889
- return t({
890
- mutationFn: async (e) => (await s(`mutation CooUnfeatureStyleItem($id: ID!) { cooUnfeatureStyleItem(id: $id) { ${u} } }`, { id: e }, i)).cooUnfeatureStyleItem,
892
+ }, Ee = () => {
893
+ let t = a(), { apiGatewayUrl: n } = e();
894
+ return r({
895
+ mutationFn: async (e) => (await s(`mutation CooUnfeatureStyleItem($id: ID!) { cooUnfeatureStyleItem(id: $id) { ${u} } }`, { id: e }, n)).cooUnfeatureStyleItem,
891
896
  onSuccess: (e) => {
892
- n.invalidateQueries({ queryKey: [o, "style-items"] }), n.invalidateQueries({ queryKey: [
897
+ t.invalidateQueries({ queryKey: [o, "style-items"] }), t.invalidateQueries({ queryKey: [
893
898
  o,
894
899
  "style-item",
895
900
  e.id
@@ -897,4 +902,4 @@ var o = "coolandlovely", s = async (e, t, n, r) => {
897
902
  }
898
903
  });
899
904
  };
900
- export { h as COLLABORATION_PAYOUT_FIELDS, s as coolQuery, ue as useAddLookbookEntry, be as useApproveBrand, D as useArchiveCollection, N as useArchiveStyleItem, te as useBrand, ee as useBrands, K as useCollaboration, G as useCollaborations, C as useCollection, S as useCollections, y as useCreateBrand, ne as useCreateCollaboration, w as useCreateCollection, L as useCreateLook, le as useCreateLookbook, A as useCreateStyleItem, Z as useCreateWardrobeItem, Y as useDeleteCollaboration, W as useDeleteLook, _e as useDeleteLookbook, Ce as useFeatureStyleItem, $ as useFollow, pe as useIsFollowing, B as useLikeLook, re as useLogWardrobeWear, F as useLook, ge as useLookbook, ce as useLookbooks, P as useLooks, I as useLooksWithItems, he as useMyFollowing, ae as useMyStyleProfile, E as usePublishCollection, z as usePublishLook, xe as useRejectBrand, de as useRemoveLookbookEntry, ie as useRemoveWardrobeItem, Se as useReviewCollaboration, H as useSaveLook, ye as useSearchLooks, ve as useSearchStyleItems, k as useStyleItem, O as useStyleItems, oe as useStyleProfileByOwner, M as useSyncStyleItemStoreListing, x as useTransitionBrand, J as useTransitionCollaboration, we as useUnfeatureStyleItem, me as useUnfollow, V as useUnlikeLook, U as useUnsaveLook, b as useUpdateBrand, q as useUpdateCollaboration, T as useUpdateCollection, R as useUpdateLook, j as useUpdateStyleItem, se as useUpsertStyleProfile, X as useWardrobeItems };
905
+ export { h as COLLABORATION_PAYOUT_FIELDS, s as coolQuery, fe as useAddLookbookEntry, Se as useApproveBrand, k as useArchiveCollection, F as useArchiveStyleItem, b as useBrand, y as useBrands, q as useCollaboration, ne as useCollaborations, T as useCollection, w as useCollections, x as useCreateBrand, J as useCreateCollaboration, E as useCreateCollection, z as useCreateLook, de as useCreateLookbook, M as useCreateStyleItem, ie as useCreateWardrobeItem, Z as useDeleteCollaboration, K as useDeleteLook, be as useDeleteLookbook, Te as useFeatureStyleItem, ge as useFollow, he as useIsFollowing, H as useLikeLook, ae as useLogWardrobeWear, L as useLook, ye as useLookbook, ue as useLookbooks, I as useLooks, R as useLooksWithItems, ve as useMyFollowing, se as useMyStyleProfile, O as usePublishCollection, V as usePublishLook, Ce as useRejectBrand, pe as useRemoveLookbookEntry, oe as useRemoveWardrobeItem, we as useReviewCollaboration, W as useSaveLook, xe as useSearchLooks, $ as useSearchStyleItems, j as useStyleItem, A as useStyleItems, ce as useStyleProfileByOwner, P as useSyncStyleItemStoreListing, C as useTransitionBrand, X as useTransitionCollaboration, Ee as useUnfeatureStyleItem, _e as useUnfollow, U as useUnlikeLook, G as useUnsaveLook, S as useUpdateBrand, Y as useUpdateCollaboration, D as useUpdateCollection, B as useUpdateLook, N as useUpdateStyleItem, le as useUpsertStyleProfile, re as useWardrobeItems };