@burdenoff/microfe-coolandlovely 2026.720.1 → 2026.720.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.
- package/dist/coolandlovely/CoolAndLovelyRoutes.d.ts.map +1 -1
- package/dist/coolandlovely/CoolAndLovelyRoutes.js +8 -0
- package/dist/coolandlovely/CoolAndLovelyRoutes.js.map +1 -1
- package/dist/coolandlovely/components/Field.d.ts +3 -0
- package/dist/coolandlovely/components/Field.d.ts.map +1 -1
- package/dist/coolandlovely/components/Field.js +12 -9
- package/dist/coolandlovely/components/Field.js.map +1 -1
- package/dist/coolandlovely/components/MetricsCard.d.ts +7 -0
- package/dist/coolandlovely/components/MetricsCard.d.ts.map +1 -1
- package/dist/coolandlovely/components/MetricsCard.js +37 -13
- package/dist/coolandlovely/components/MetricsCard.js.map +1 -1
- package/dist/coolandlovely/hooks/index.d.ts +1 -1
- package/dist/coolandlovely/hooks/index.d.ts.map +1 -1
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.d.ts +54 -4
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.d.ts.map +1 -1
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js +197 -79
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js.map +1 -1
- package/dist/coolandlovely/pages/HomePage.d.ts.map +1 -1
- package/dist/coolandlovely/pages/HomePage.js +112 -101
- package/dist/coolandlovely/pages/HomePage.js.map +1 -1
- package/dist/coolandlovely/pages/brands/BrandDetailPage.js +9 -9
- package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.d.ts.map +1 -1
- package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js +135 -111
- package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js.map +1 -1
- package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.d.ts +5 -4
- package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.d.ts.map +1 -1
- package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js +201 -107
- package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js.map +1 -1
- package/dist/coolandlovely/pages/collections/CollectionDetailPage.d.ts.map +1 -1
- package/dist/coolandlovely/pages/collections/CollectionDetailPage.js +110 -99
- package/dist/coolandlovely/pages/collections/CollectionDetailPage.js.map +1 -1
- package/dist/coolandlovely/pages/discover/DiscoverPage.js +7 -6
- package/dist/coolandlovely/pages/discover/DiscoverPage.js.map +1 -1
- package/dist/coolandlovely/pages/items/StyleItemDetailPage.js +4 -4
- package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.d.ts.map +1 -1
- package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js +116 -104
- package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js.map +1 -1
- package/dist/coolandlovely/pages/looks/LookDetailPage.d.ts.map +1 -1
- package/dist/coolandlovely/pages/looks/LookDetailPage.js +15 -13
- package/dist/coolandlovely/pages/looks/LookDetailPage.js.map +1 -1
- package/dist/coolandlovely/pages/profile/StyleProfilePage.d.ts +11 -6
- package/dist/coolandlovely/pages/profile/StyleProfilePage.d.ts.map +1 -1
- package/dist/coolandlovely/pages/profile/StyleProfilePage.js +195 -176
- package/dist/coolandlovely/pages/profile/StyleProfilePage.js.map +1 -1
- package/dist/coolandlovely/types/index.d.ts +40 -0
- package/dist/coolandlovely/types/index.d.ts.map +1 -1
- package/dist/coolandlovely/utils/index.d.ts +1 -0
- package/dist/coolandlovely/utils/index.d.ts.map +1 -1
- package/dist/coolandlovely/utils/index.js +5 -0
- package/dist/coolandlovely/utils/sparkline.d.ts +31 -0
- package/dist/coolandlovely/utils/sparkline.d.ts.map +1 -0
- package/dist/coolandlovely/utils/sparkline.js +29 -0
- package/dist/coolandlovely/utils/sparkline.js.map +1 -0
- package/dist/utils/pageContext.d.ts +8 -1
- package/dist/utils/pageContext.d.ts.map +1 -1
- package/dist/utils/pageContext.js +22 -27
- package/dist/utils/pageContext.js.map +1 -1
- package/package.json +1 -1
|
@@ -15,7 +15,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
15
15
|
if (r.errors?.length) throw Error(r.errors[0]?.message ?? "GraphQL request failed");
|
|
16
16
|
if (!r.data) throw Error("GraphQL response did not include data");
|
|
17
17
|
return /^\s*mutation\b/.test(e) && a(), r.data;
|
|
18
|
-
}, 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 id workspaceId authorId title caption occasion visibility isFeatured\n likeCount saveCount collaborationId image { id } tags publishedAt\n createdAt updatedAt isLikedByMe isSavedByMe\n", f = "\n id workspaceId lookId styleItemId position styling createdAt updatedAt\n styleItem { id name category price currency brand { id name handle } image { id } }\n", p = "\n id workspaceId brandId creatorId collectionId title brief role status\n compensation currency tags startDate endDate publishedAt createdAt updatedAt\n", m = "\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", h = "\n id workspaceId ownerId displayName bio visibility stylePreferences\n palette favouriteBrands sizes createdAt updatedAt\n isFollowedByMe followerCount followingCount\n", g = "\n id workspaceId ownerId profileId name description visibility tags\n cover { id } createdAt updatedAt\n",
|
|
18
|
+
}, 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 id workspaceId authorId title caption occasion visibility isFeatured\n likeCount saveCount collaborationId image { id } tags publishedAt\n createdAt updatedAt isLikedByMe isSavedByMe\n", f = "\n id workspaceId lookId styleItemId position styling createdAt updatedAt\n styleItem { id name category price currency brand { id name handle } image { id } }\n", p = "\n id workspaceId brandId creatorId collectionId title brief role status\n compensation currency tags startDate endDate publishedAt createdAt updatedAt\n", m = "\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", h = "\n id workspaceId ownerId displayName bio visibility stylePreferences\n palette favouriteBrands sizes createdAt updatedAt\n isFollowedByMe followerCount followingCount\n", g = "\n id workspaceId ownerId profileId name description visibility tags\n cover { id } createdAt updatedAt\n", ee = (t = {}) => {
|
|
19
19
|
let { apiGatewayUrl: r } = e();
|
|
20
20
|
return n({
|
|
21
21
|
queryKey: [
|
|
@@ -37,7 +37,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
37
37
|
}
|
|
38
38
|
}, r)).cooListBrands
|
|
39
39
|
});
|
|
40
|
-
},
|
|
40
|
+
}, te = (t) => {
|
|
41
41
|
let { apiGatewayUrl: r } = e();
|
|
42
42
|
return n({
|
|
43
43
|
queryKey: [
|
|
@@ -45,16 +45,25 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
45
45
|
"brand",
|
|
46
46
|
t
|
|
47
47
|
],
|
|
48
|
-
queryFn: async () =>
|
|
48
|
+
queryFn: async () => {
|
|
49
|
+
let e = await s(`query CooBrand($id: ID!) {
|
|
49
50
|
cooBrand(id: $id) {
|
|
50
51
|
${c}
|
|
51
|
-
collections { ${l} }
|
|
52
|
-
items { ${u} }
|
|
52
|
+
collections { items { ${l} } pageInfo { cursor hasMore } }
|
|
53
|
+
items { items { ${u} } pageInfo { cursor hasMore } }
|
|
53
54
|
}
|
|
54
|
-
}`, { id: t }, r)
|
|
55
|
+
}`, { id: t }, r);
|
|
56
|
+
if (!e.cooBrand) return null;
|
|
57
|
+
let { collections: n, items: i, ...a } = e.cooBrand;
|
|
58
|
+
return {
|
|
59
|
+
...a,
|
|
60
|
+
collections: n?.items ?? [],
|
|
61
|
+
items: i?.items ?? []
|
|
62
|
+
};
|
|
63
|
+
},
|
|
55
64
|
enabled: !!t
|
|
56
65
|
});
|
|
57
|
-
},
|
|
66
|
+
}, _ = () => {
|
|
58
67
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
59
68
|
return t({
|
|
60
69
|
mutationFn: async (e) => (await s(`mutation CooCreateBrand($input: CooCreateBrandInput!) {
|
|
@@ -64,7 +73,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
64
73
|
n.invalidateQueries({ queryKey: [o, "brands"] });
|
|
65
74
|
}
|
|
66
75
|
});
|
|
67
|
-
},
|
|
76
|
+
}, v = () => {
|
|
68
77
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
69
78
|
return t({
|
|
70
79
|
mutationFn: async ({ id: e, input: t }) => (await s(`mutation CooUpdateBrand($id: ID!, $input: CooUpdateBrandInput!) {
|
|
@@ -81,7 +90,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
81
90
|
] });
|
|
82
91
|
}
|
|
83
92
|
});
|
|
84
|
-
},
|
|
93
|
+
}, y = () => {
|
|
85
94
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
86
95
|
return t({
|
|
87
96
|
mutationFn: async ({ id: e, status: t }) => (await s(`mutation CooTransitionBrand($id: ID!, $status: CooBrandStatus!) {
|
|
@@ -98,7 +107,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
98
107
|
] });
|
|
99
108
|
}
|
|
100
109
|
});
|
|
101
|
-
},
|
|
110
|
+
}, b = (t = {}) => {
|
|
102
111
|
let { apiGatewayUrl: r } = e();
|
|
103
112
|
return n({
|
|
104
113
|
queryKey: [
|
|
@@ -108,15 +117,15 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
108
117
|
],
|
|
109
118
|
queryFn: async () => (await s(`query CooListCollections($brandId: ID, $status: CooCollectionStatus) {
|
|
110
119
|
cooListCollections(brandId: $brandId, status: $status) {
|
|
111
|
-
${l}
|
|
112
|
-
|
|
120
|
+
items { ${l} brand { id name handle } }
|
|
121
|
+
pageInfo { cursor hasMore }
|
|
113
122
|
}
|
|
114
123
|
}`, {
|
|
115
124
|
brandId: t.brandId,
|
|
116
125
|
status: t.status
|
|
117
|
-
}, r)).cooListCollections
|
|
126
|
+
}, r)).cooListCollections.items
|
|
118
127
|
});
|
|
119
|
-
},
|
|
128
|
+
}, x = (t) => {
|
|
120
129
|
let { apiGatewayUrl: r } = e();
|
|
121
130
|
return n({
|
|
122
131
|
queryKey: [
|
|
@@ -124,16 +133,24 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
124
133
|
"collection",
|
|
125
134
|
t
|
|
126
135
|
],
|
|
127
|
-
queryFn: async () =>
|
|
136
|
+
queryFn: async () => {
|
|
137
|
+
let e = await s(`query CooCollection($id: ID!) {
|
|
128
138
|
cooCollection(id: $id) {
|
|
129
139
|
${l}
|
|
130
140
|
brand { id name handle }
|
|
131
|
-
items { ${u} }
|
|
141
|
+
items { items { ${u} } pageInfo { cursor hasMore } }
|
|
132
142
|
}
|
|
133
|
-
}`, { id: t }, r)
|
|
143
|
+
}`, { id: t }, r);
|
|
144
|
+
if (!e.cooCollection) return null;
|
|
145
|
+
let { items: n, ...i } = e.cooCollection;
|
|
146
|
+
return {
|
|
147
|
+
...i,
|
|
148
|
+
items: n?.items ?? []
|
|
149
|
+
};
|
|
150
|
+
},
|
|
134
151
|
enabled: !!t
|
|
135
152
|
});
|
|
136
|
-
},
|
|
153
|
+
}, S = () => {
|
|
137
154
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
138
155
|
return t({
|
|
139
156
|
mutationFn: async (e) => (await s(`mutation CooCreateCollection($input: CooCreateCollectionInput!) {
|
|
@@ -143,7 +160,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
143
160
|
n.invalidateQueries({ queryKey: [o, "collections"] });
|
|
144
161
|
}
|
|
145
162
|
});
|
|
146
|
-
},
|
|
163
|
+
}, C = () => {
|
|
147
164
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
148
165
|
return t({
|
|
149
166
|
mutationFn: async ({ id: e, input: t }) => (await s(`mutation CooUpdateCollection($id: ID!, $input: CooUpdateCollectionInput!) {
|
|
@@ -160,7 +177,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
160
177
|
] });
|
|
161
178
|
}
|
|
162
179
|
});
|
|
163
|
-
},
|
|
180
|
+
}, w = () => {
|
|
164
181
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
165
182
|
return t({
|
|
166
183
|
mutationFn: async (e) => (await s(`mutation CooPublishCollection($id: ID!) {
|
|
@@ -174,7 +191,15 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
174
191
|
] });
|
|
175
192
|
}
|
|
176
193
|
});
|
|
177
|
-
},
|
|
194
|
+
}, T = () => {
|
|
195
|
+
let n = r(), { apiGatewayUrl: i } = e();
|
|
196
|
+
return t({
|
|
197
|
+
mutationFn: async (e) => (await s("mutation CooArchiveCollection($id: ID!) { cooArchiveCollection(id: $id) }", { id: e }, i)).cooArchiveCollection,
|
|
198
|
+
onSuccess: () => {
|
|
199
|
+
n.invalidateQueries({ queryKey: [o, "collections"] });
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
}, E = (t = {}) => {
|
|
178
203
|
let { apiGatewayUrl: r } = e();
|
|
179
204
|
return n({
|
|
180
205
|
queryKey: [
|
|
@@ -204,7 +229,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
204
229
|
}
|
|
205
230
|
}, r)).cooListStyleItems
|
|
206
231
|
});
|
|
207
|
-
},
|
|
232
|
+
}, D = (t) => {
|
|
208
233
|
let { apiGatewayUrl: r } = e();
|
|
209
234
|
return n({
|
|
210
235
|
queryKey: [
|
|
@@ -221,7 +246,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
221
246
|
}`, { id: t }, r)).cooStyleItem,
|
|
222
247
|
enabled: !!t
|
|
223
248
|
});
|
|
224
|
-
},
|
|
249
|
+
}, O = () => {
|
|
225
250
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
226
251
|
return t({
|
|
227
252
|
mutationFn: async (e) => (await s(`mutation CooCreateStyleItem($input: CooCreateStyleItemInput!) {
|
|
@@ -231,7 +256,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
231
256
|
n.invalidateQueries({ queryKey: [o, "style-items"] });
|
|
232
257
|
}
|
|
233
258
|
});
|
|
234
|
-
},
|
|
259
|
+
}, k = () => {
|
|
235
260
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
236
261
|
return t({
|
|
237
262
|
mutationFn: async ({ id: e, input: t }) => (await s(`mutation CooUpdateStyleItem($id: ID!, $input: CooUpdateStyleItemInput!) {
|
|
@@ -248,7 +273,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
248
273
|
] });
|
|
249
274
|
}
|
|
250
275
|
});
|
|
251
|
-
},
|
|
276
|
+
}, A = () => {
|
|
252
277
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
253
278
|
return t({
|
|
254
279
|
mutationFn: async (e) => (await s("mutation CooArchiveStyleItem($id: ID!) { cooArchiveStyleItem(id: $id) }", { id: e }, i)).cooArchiveStyleItem,
|
|
@@ -256,7 +281,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
256
281
|
n.invalidateQueries({ queryKey: [o, "style-items"] });
|
|
257
282
|
}
|
|
258
283
|
});
|
|
259
|
-
},
|
|
284
|
+
}, j = (t = {}) => {
|
|
260
285
|
let { apiGatewayUrl: r } = e();
|
|
261
286
|
return n({
|
|
262
287
|
queryKey: [
|
|
@@ -281,7 +306,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
281
306
|
}
|
|
282
307
|
}, r)).cooListLooks
|
|
283
308
|
});
|
|
284
|
-
},
|
|
309
|
+
}, M = (t) => {
|
|
285
310
|
let { apiGatewayUrl: r } = e();
|
|
286
311
|
return n({
|
|
287
312
|
queryKey: [
|
|
@@ -289,15 +314,23 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
289
314
|
"look",
|
|
290
315
|
t
|
|
291
316
|
],
|
|
292
|
-
queryFn: async () =>
|
|
317
|
+
queryFn: async () => {
|
|
318
|
+
let e = await s(`query CooLook($id: ID!) {
|
|
293
319
|
cooLook(id: $id) {
|
|
294
320
|
${d}
|
|
295
|
-
items { ${f} }
|
|
321
|
+
items { items { ${f} } pageInfo { cursor hasMore } }
|
|
296
322
|
}
|
|
297
|
-
}`, { id: t }, r)
|
|
323
|
+
}`, { id: t }, r);
|
|
324
|
+
if (!e.cooLook) return null;
|
|
325
|
+
let { items: n, ...i } = e.cooLook;
|
|
326
|
+
return {
|
|
327
|
+
...i,
|
|
328
|
+
items: n?.items ?? []
|
|
329
|
+
};
|
|
330
|
+
},
|
|
298
331
|
enabled: !!t
|
|
299
332
|
});
|
|
300
|
-
},
|
|
333
|
+
}, N = (t = {}) => {
|
|
301
334
|
let { apiGatewayUrl: r } = e();
|
|
302
335
|
return n({
|
|
303
336
|
queryKey: [
|
|
@@ -305,24 +338,33 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
305
338
|
"looks-with-items",
|
|
306
339
|
t
|
|
307
340
|
],
|
|
308
|
-
queryFn: async () =>
|
|
341
|
+
queryFn: async () => {
|
|
342
|
+
let e = await s(`query CooListLooksWithItems(
|
|
309
343
|
$authorId: ID, $occasion: CooLookOccasion, $featured: Boolean, $pagination: PaginationInput
|
|
310
344
|
) {
|
|
311
345
|
cooListLooks(authorId: $authorId, occasion: $occasion, featured: $featured, pagination: $pagination) {
|
|
312
|
-
items { ${d} items { ${f} } }
|
|
346
|
+
items { ${d} items { items { ${f} } pageInfo { cursor hasMore } } }
|
|
313
347
|
pageInfo { cursor hasMore }
|
|
314
348
|
}
|
|
315
349
|
}`, {
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
350
|
+
authorId: t.authorId,
|
|
351
|
+
occasion: t.occasion,
|
|
352
|
+
featured: t.featured,
|
|
353
|
+
pagination: t.pagination ?? {
|
|
354
|
+
limit: 50,
|
|
355
|
+
offset: 0
|
|
356
|
+
}
|
|
357
|
+
}, r);
|
|
358
|
+
return {
|
|
359
|
+
items: e.cooListLooks.items.map(({ items: e, ...t }) => ({
|
|
360
|
+
...t,
|
|
361
|
+
items: e?.items ?? []
|
|
362
|
+
})),
|
|
363
|
+
pageInfo: e.cooListLooks.pageInfo
|
|
364
|
+
};
|
|
365
|
+
}
|
|
324
366
|
});
|
|
325
|
-
},
|
|
367
|
+
}, P = () => {
|
|
326
368
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
327
369
|
return t({
|
|
328
370
|
mutationFn: async (e) => (await s(`mutation CooCreateLook($input: CooCreateLookInput!) {
|
|
@@ -332,7 +374,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
332
374
|
n.invalidateQueries({ queryKey: [o, "looks"] }), n.invalidateQueries({ queryKey: [o, "looks-with-items"] });
|
|
333
375
|
}
|
|
334
376
|
});
|
|
335
|
-
},
|
|
377
|
+
}, F = () => {
|
|
336
378
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
337
379
|
return t({
|
|
338
380
|
mutationFn: async ({ id: e, input: t }) => (await s(`mutation CooUpdateLook($id: ID!, $input: CooUpdateLookInput!) {
|
|
@@ -349,7 +391,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
349
391
|
] });
|
|
350
392
|
}
|
|
351
393
|
});
|
|
352
|
-
},
|
|
394
|
+
}, I = () => {
|
|
353
395
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
354
396
|
return t({
|
|
355
397
|
mutationFn: async (e) => (await s(`mutation CooPublishLook($id: ID!) { cooPublishLook(id: $id) { ${d} } }`, { id: e }, i)).cooPublishLook,
|
|
@@ -409,7 +451,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
409
451
|
] });
|
|
410
452
|
}
|
|
411
453
|
});
|
|
412
|
-
},
|
|
454
|
+
}, ne = () => {
|
|
413
455
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
414
456
|
return t({
|
|
415
457
|
mutationFn: async (e) => (await s("mutation CooDeleteLook($id: ID!) { cooDeleteLook(id: $id) }", { id: e }, i)).cooDeleteLook,
|
|
@@ -417,7 +459,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
417
459
|
n.invalidateQueries({ queryKey: [o, "looks"] }), n.invalidateQueries({ queryKey: [o, "looks-with-items"] });
|
|
418
460
|
}
|
|
419
461
|
});
|
|
420
|
-
},
|
|
462
|
+
}, V = (t = {}) => {
|
|
421
463
|
let { apiGatewayUrl: r } = e();
|
|
422
464
|
return n({
|
|
423
465
|
queryKey: [
|
|
@@ -427,16 +469,16 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
427
469
|
],
|
|
428
470
|
queryFn: async () => (await s(`query CooListCollaborations($brandId: ID, $creatorId: ID, $status: CooCollaborationStatus) {
|
|
429
471
|
cooListCollaborations(brandId: $brandId, creatorId: $creatorId, status: $status) {
|
|
430
|
-
${p}
|
|
431
|
-
|
|
472
|
+
items { ${p} brand { id name handle logo { id } } }
|
|
473
|
+
pageInfo { cursor hasMore }
|
|
432
474
|
}
|
|
433
475
|
}`, {
|
|
434
476
|
brandId: t.brandId,
|
|
435
477
|
creatorId: t.creatorId,
|
|
436
478
|
status: t.status
|
|
437
|
-
}, r)).cooListCollaborations
|
|
479
|
+
}, r)).cooListCollaborations.items
|
|
438
480
|
});
|
|
439
|
-
},
|
|
481
|
+
}, H = (t) => {
|
|
440
482
|
let { apiGatewayUrl: r } = e();
|
|
441
483
|
return n({
|
|
442
484
|
queryKey: [
|
|
@@ -444,16 +486,24 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
444
486
|
"collaboration",
|
|
445
487
|
t
|
|
446
488
|
],
|
|
447
|
-
queryFn: async () =>
|
|
489
|
+
queryFn: async () => {
|
|
490
|
+
let e = await s(`query CooCollaboration($id: ID!) {
|
|
448
491
|
cooCollaboration(id: $id) {
|
|
449
492
|
${p}
|
|
450
493
|
brand { id name handle logo { id } }
|
|
451
|
-
looks { ${d} }
|
|
494
|
+
looks { items { ${d} } pageInfo { cursor hasMore } }
|
|
452
495
|
}
|
|
453
|
-
}`, { id: t }, r)
|
|
496
|
+
}`, { id: t }, r);
|
|
497
|
+
if (!e.cooCollaboration) return null;
|
|
498
|
+
let { looks: n, ...i } = e.cooCollaboration;
|
|
499
|
+
return {
|
|
500
|
+
...i,
|
|
501
|
+
looks: n?.items ?? []
|
|
502
|
+
};
|
|
503
|
+
},
|
|
454
504
|
enabled: !!t
|
|
455
505
|
});
|
|
456
|
-
},
|
|
506
|
+
}, U = () => {
|
|
457
507
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
458
508
|
return t({
|
|
459
509
|
mutationFn: async (e) => (await s(`mutation CooCreateCollaboration($input: CooCreateCollaborationInput!) {
|
|
@@ -463,6 +513,26 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
463
513
|
n.invalidateQueries({ queryKey: [o, "collaborations"] });
|
|
464
514
|
}
|
|
465
515
|
});
|
|
516
|
+
}, W = () => {
|
|
517
|
+
let n = r(), { apiGatewayUrl: i } = e();
|
|
518
|
+
return t({
|
|
519
|
+
mutationFn: async ({ id: e, input: t }) => (await s(`mutation CooUpdateCollaboration($id: ID!, $input: CooUpdateCollaborationInput!) {
|
|
520
|
+
cooUpdateCollaboration(id: $id, input: $input) {
|
|
521
|
+
${p}
|
|
522
|
+
brand { id name handle logo { id } }
|
|
523
|
+
}
|
|
524
|
+
}`, {
|
|
525
|
+
id: e,
|
|
526
|
+
input: t
|
|
527
|
+
}, i)).cooUpdateCollaboration,
|
|
528
|
+
onSuccess: (e) => {
|
|
529
|
+
n.invalidateQueries({ queryKey: [o, "collaborations"] }), n.invalidateQueries({ queryKey: [
|
|
530
|
+
o,
|
|
531
|
+
"collaboration",
|
|
532
|
+
e.id
|
|
533
|
+
] });
|
|
534
|
+
}
|
|
535
|
+
});
|
|
466
536
|
}, G = () => {
|
|
467
537
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
468
538
|
return t({
|
|
@@ -480,7 +550,15 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
480
550
|
] });
|
|
481
551
|
}
|
|
482
552
|
});
|
|
483
|
-
}, K = (
|
|
553
|
+
}, K = () => {
|
|
554
|
+
let n = r(), { apiGatewayUrl: i } = e();
|
|
555
|
+
return t({
|
|
556
|
+
mutationFn: async (e) => (await s("mutation CooDeleteCollaboration($id: ID!) { cooDeleteCollaboration(id: $id) }", { id: e }, i)).cooDeleteCollaboration,
|
|
557
|
+
onSuccess: () => {
|
|
558
|
+
n.invalidateQueries({ queryKey: [o, "collaborations"] });
|
|
559
|
+
}
|
|
560
|
+
});
|
|
561
|
+
}, q = (t = {}) => {
|
|
484
562
|
let { apiGatewayUrl: r } = e();
|
|
485
563
|
return n({
|
|
486
564
|
queryKey: [
|
|
@@ -489,13 +567,16 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
489
567
|
t
|
|
490
568
|
],
|
|
491
569
|
queryFn: async () => (await s(`query CooListWardrobeItems($category: CooStyleCategory, $source: CooWardrobeSource) {
|
|
492
|
-
cooListWardrobeItems(category: $category, source: $source) {
|
|
570
|
+
cooListWardrobeItems(category: $category, source: $source) {
|
|
571
|
+
items { ${m} }
|
|
572
|
+
pageInfo { cursor hasMore }
|
|
573
|
+
}
|
|
493
574
|
}`, {
|
|
494
575
|
category: t.category,
|
|
495
576
|
source: t.source
|
|
496
|
-
}, r)).cooListWardrobeItems
|
|
577
|
+
}, r)).cooListWardrobeItems.items
|
|
497
578
|
});
|
|
498
|
-
},
|
|
579
|
+
}, J = () => {
|
|
499
580
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
500
581
|
return t({
|
|
501
582
|
mutationFn: async (e) => (await s(`mutation CooCreateWardrobeItem($input: CooCreateWardrobeItemInput!) {
|
|
@@ -505,7 +586,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
505
586
|
n.invalidateQueries({ queryKey: [o, "wardrobe"] });
|
|
506
587
|
}
|
|
507
588
|
});
|
|
508
|
-
},
|
|
589
|
+
}, Y = () => {
|
|
509
590
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
510
591
|
return t({
|
|
511
592
|
mutationFn: async (e) => (await s(`mutation CooLogWardrobeWear($id: ID!) {
|
|
@@ -515,7 +596,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
515
596
|
n.invalidateQueries({ queryKey: [o, "wardrobe"] });
|
|
516
597
|
}
|
|
517
598
|
});
|
|
518
|
-
},
|
|
599
|
+
}, X = () => {
|
|
519
600
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
520
601
|
return t({
|
|
521
602
|
mutationFn: async (e) => (await s("mutation CooRemoveWardrobeItem($id: ID!) { cooRemoveWardrobeItem(id: $id) }", { id: e }, i)).cooRemoveWardrobeItem,
|
|
@@ -523,13 +604,26 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
523
604
|
n.invalidateQueries({ queryKey: [o, "wardrobe"] });
|
|
524
605
|
}
|
|
525
606
|
});
|
|
526
|
-
},
|
|
607
|
+
}, Z = () => {
|
|
527
608
|
let { apiGatewayUrl: t } = e();
|
|
528
609
|
return n({
|
|
529
610
|
queryKey: [o, "my-style-profile"],
|
|
530
611
|
queryFn: async () => (await s(`query CooMyStyleProfile { cooMyStyleProfile { ${h} } }`, {}, t)).cooMyStyleProfile
|
|
531
612
|
});
|
|
532
|
-
},
|
|
613
|
+
}, re = (t) => {
|
|
614
|
+
let { apiGatewayUrl: r } = e();
|
|
615
|
+
return n({
|
|
616
|
+
queryKey: [
|
|
617
|
+
o,
|
|
618
|
+
"style-profile-by-owner",
|
|
619
|
+
t
|
|
620
|
+
],
|
|
621
|
+
queryFn: async () => (await s(`query CooStyleProfileByOwner($ownerId: ID!) {
|
|
622
|
+
cooStyleProfileByOwner(ownerId: $ownerId) { ${h} }
|
|
623
|
+
}`, { ownerId: t }, r)).cooStyleProfileByOwner,
|
|
624
|
+
enabled: !!t
|
|
625
|
+
});
|
|
626
|
+
}, ie = () => {
|
|
533
627
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
534
628
|
return t({
|
|
535
629
|
mutationFn: async (e) => (await s(`mutation CooUpsertStyleProfile($input: CooUpsertStyleProfileInput!) {
|
|
@@ -539,7 +633,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
539
633
|
n.invalidateQueries({ queryKey: [o, "my-style-profile"] });
|
|
540
634
|
}
|
|
541
635
|
});
|
|
542
|
-
}, Q = (t) => {
|
|
636
|
+
}, Q = "id workspaceId lookbookId lookId styleItemId note position createdAt updatedAt", ae = (t) => {
|
|
543
637
|
let { apiGatewayUrl: r } = e();
|
|
544
638
|
return n({
|
|
545
639
|
queryKey: [
|
|
@@ -549,12 +643,18 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
549
643
|
],
|
|
550
644
|
queryFn: async () => (await s(`query CooListLookbooks($ownerId: ID) {
|
|
551
645
|
cooListLookbooks(ownerId: $ownerId) {
|
|
552
|
-
|
|
553
|
-
|
|
646
|
+
items {
|
|
647
|
+
${g}
|
|
648
|
+
entries { items { ${Q} } pageInfo { cursor hasMore } }
|
|
649
|
+
}
|
|
650
|
+
pageInfo { cursor hasMore }
|
|
554
651
|
}
|
|
555
|
-
}`, { ownerId: t }, r)).cooListLookbooks
|
|
652
|
+
}`, { ownerId: t }, r)).cooListLookbooks.items.map(({ entries: e, ...t }) => ({
|
|
653
|
+
...t,
|
|
654
|
+
entries: e?.items ?? []
|
|
655
|
+
}))
|
|
556
656
|
});
|
|
557
|
-
},
|
|
657
|
+
}, oe = () => {
|
|
558
658
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
559
659
|
return t({
|
|
560
660
|
mutationFn: async (e) => (await s(`mutation CooCreateLookbook($input: CooCreateLookbookInput!) {
|
|
@@ -564,7 +664,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
564
664
|
n.invalidateQueries({ queryKey: [o, "lookbooks"] });
|
|
565
665
|
}
|
|
566
666
|
});
|
|
567
|
-
},
|
|
667
|
+
}, $ = () => {
|
|
568
668
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
569
669
|
return t({
|
|
570
670
|
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,
|
|
@@ -576,7 +676,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
576
676
|
] });
|
|
577
677
|
}
|
|
578
678
|
});
|
|
579
|
-
},
|
|
679
|
+
}, se = () => {
|
|
580
680
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
581
681
|
return t({
|
|
582
682
|
mutationFn: async (e) => (await s("mutation CooRemoveLookbookEntry($id: ID!) { cooRemoveLookbookEntry(id: $id) }", { id: e }, i)).cooRemoveLookbookEntry,
|
|
@@ -584,7 +684,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
584
684
|
n.invalidateQueries({ queryKey: [o, "lookbooks"] }), n.invalidateQueries({ queryKey: [o, "lookbook"] });
|
|
585
685
|
}
|
|
586
686
|
});
|
|
587
|
-
},
|
|
687
|
+
}, ce = "\n id workspaceId ownerId displayName bio visibility\n stylePreferences palette favouriteBrands\n isFollowedByMe followerCount followingCount\n", le = (t) => {
|
|
588
688
|
let { apiGatewayUrl: r } = e();
|
|
589
689
|
return n({
|
|
590
690
|
queryKey: [
|
|
@@ -595,7 +695,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
595
695
|
enabled: !!t,
|
|
596
696
|
queryFn: async () => (await s("query CooIsFollowing($followeeId: ID!) { cooIsFollowing(followeeId: $followeeId) }", { followeeId: t }, r)).cooIsFollowing
|
|
597
697
|
});
|
|
598
|
-
},
|
|
698
|
+
}, ue = () => {
|
|
599
699
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
600
700
|
return t({
|
|
601
701
|
mutationFn: async (e) => (await s("mutation CooFollow($followeeId: ID!) { cooFollow(followeeId: $followeeId) }", { followeeId: e }, i)).cooFollow,
|
|
@@ -607,7 +707,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
607
707
|
] }), n.invalidateQueries({ queryKey: [o, "my-following"] }), n.invalidateQueries({ queryKey: [o, "my-followers"] }), n.invalidateQueries({ queryKey: [o, "my-style-profile"] });
|
|
608
708
|
}
|
|
609
709
|
});
|
|
610
|
-
},
|
|
710
|
+
}, de = () => {
|
|
611
711
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
612
712
|
return t({
|
|
613
713
|
mutationFn: async (e) => (await s("mutation CooUnfollow($followeeId: ID!) { cooUnfollow(followeeId: $followeeId) }", { followeeId: e }, i)).cooUnfollow,
|
|
@@ -619,13 +719,15 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
619
719
|
] }), n.invalidateQueries({ queryKey: [o, "my-following"] }), n.invalidateQueries({ queryKey: [o, "my-followers"] }), n.invalidateQueries({ queryKey: [o, "my-style-profile"] });
|
|
620
720
|
}
|
|
621
721
|
});
|
|
622
|
-
},
|
|
722
|
+
}, fe = () => {
|
|
623
723
|
let { apiGatewayUrl: t } = e();
|
|
624
724
|
return n({
|
|
625
725
|
queryKey: [o, "my-following"],
|
|
626
|
-
queryFn: async () => (await s(`query CooMyFollowing {
|
|
726
|
+
queryFn: async () => (await s(`query CooMyFollowing {
|
|
727
|
+
cooMyFollowing { items { ${ce} } pageInfo { cursor hasMore } }
|
|
728
|
+
}`, {}, t)).cooMyFollowing.items
|
|
627
729
|
});
|
|
628
|
-
},
|
|
730
|
+
}, pe = (t) => {
|
|
629
731
|
let { apiGatewayUrl: r } = e();
|
|
630
732
|
return n({
|
|
631
733
|
queryKey: [
|
|
@@ -633,16 +735,32 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
633
735
|
"lookbook",
|
|
634
736
|
t
|
|
635
737
|
],
|
|
636
|
-
queryFn: async () =>
|
|
738
|
+
queryFn: async () => {
|
|
739
|
+
let e = await s(`query CooLookbook($id: ID!) {
|
|
637
740
|
cooLookbook(id: $id) {
|
|
638
741
|
${g}
|
|
639
|
-
entries {
|
|
742
|
+
entries { items { ${Q} } pageInfo { cursor hasMore } }
|
|
640
743
|
}
|
|
641
|
-
}`, { id: t }, r)
|
|
744
|
+
}`, { id: t }, r);
|
|
745
|
+
if (!e.cooLookbook) return null;
|
|
746
|
+
let { entries: n, ...i } = e.cooLookbook;
|
|
747
|
+
return {
|
|
748
|
+
...i,
|
|
749
|
+
entries: n?.items ?? []
|
|
750
|
+
};
|
|
751
|
+
},
|
|
642
752
|
enabled: !!t
|
|
643
753
|
});
|
|
754
|
+
}, me = () => {
|
|
755
|
+
let n = r(), { apiGatewayUrl: i } = e();
|
|
756
|
+
return t({
|
|
757
|
+
mutationFn: async (e) => (await s("mutation CooDeleteLookbook($id: ID!) { cooDeleteLookbook(id: $id) }", { id: e }, i)).cooDeleteLookbook,
|
|
758
|
+
onSuccess: () => {
|
|
759
|
+
n.invalidateQueries({ queryKey: [o, "lookbooks"] }), n.invalidateQueries({ queryKey: [o, "lookbook"] });
|
|
760
|
+
}
|
|
761
|
+
});
|
|
644
762
|
};
|
|
645
763
|
//#endregion
|
|
646
|
-
export {
|
|
764
|
+
export { $ as useAddLookbookEntry, T as useArchiveCollection, A as useArchiveStyleItem, te as useBrand, ee as useBrands, H as useCollaboration, V as useCollaborations, x as useCollection, b as useCollections, _ as useCreateBrand, U as useCreateCollaboration, S as useCreateCollection, P as useCreateLook, oe as useCreateLookbook, O as useCreateStyleItem, J as useCreateWardrobeItem, K as useDeleteCollaboration, ne as useDeleteLook, me as useDeleteLookbook, ue as useFollow, le as useIsFollowing, L as useLikeLook, Y as useLogWardrobeWear, M as useLook, pe as useLookbook, ae as useLookbooks, j as useLooks, N as useLooksWithItems, fe as useMyFollowing, Z as useMyStyleProfile, w as usePublishCollection, I as usePublishLook, se as useRemoveLookbookEntry, X as useRemoveWardrobeItem, z as useSaveLook, D as useStyleItem, E as useStyleItems, re as useStyleProfileByOwner, y as useTransitionBrand, G as useTransitionCollaboration, de as useUnfollow, R as useUnlikeLook, B as useUnsaveLook, v as useUpdateBrand, W as useUpdateCollaboration, C as useUpdateCollection, F as useUpdateLook, k as useUpdateStyleItem, ie as useUpsertStyleProfile, q as useWardrobeItems };
|
|
647
765
|
|
|
648
766
|
//# sourceMappingURL=useCoolAndLovelyApi.js.map
|