@burdenoff/microfe-coolandlovely 2026.716.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/LookCard.d.ts +3 -1
- package/dist/coolandlovely/components/LookCard.d.ts.map +1 -1
- package/dist/coolandlovely/components/LookCard.js +80 -44
- package/dist/coolandlovely/components/LookCard.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 +57 -4
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.d.ts.map +1 -1
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js +233 -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 +114 -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.d.ts.map +1 -1
- package/dist/coolandlovely/pages/items/StyleItemDetailPage.js +6 -4
- package/dist/coolandlovely/pages/items/StyleItemDetailPage.js.map +1 -1
- 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 +4 -2
- package/dist/coolandlovely/pages/looks/LookDetailPage.d.ts.map +1 -1
- package/dist/coolandlovely/pages/looks/LookDetailPage.js +145 -137
- package/dist/coolandlovely/pages/looks/LookDetailPage.js.map +1 -1
- package/dist/coolandlovely/pages/looks/LooksListPage.d.ts.map +1 -1
- package/dist/coolandlovely/pages/looks/LooksListPage.js +2 -0
- package/dist/coolandlovely/pages/looks/LooksListPage.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/pages/wardrobe/WardrobeFormPage.d.ts.map +1 -1
- package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js +46 -23
- package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js.map +1 -1
- package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.d.ts.map +1 -1
- package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js +70 -63
- package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js.map +1 -1
- package/dist/coolandlovely/types/index.d.ts +51 -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\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 timesWorn lastWornAt tags
|
|
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,
|
|
@@ -374,6 +416,42 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
374
416
|
}
|
|
375
417
|
});
|
|
376
418
|
}, R = () => {
|
|
419
|
+
let n = r(), { apiGatewayUrl: i } = e();
|
|
420
|
+
return t({
|
|
421
|
+
mutationFn: async (e) => (await s(`mutation CooUnlikeLook($id: ID!) { cooUnlikeLook(id: $id) { ${d} } }`, { id: e }, i)).cooUnlikeLook,
|
|
422
|
+
onSuccess: (e) => {
|
|
423
|
+
n.invalidateQueries({ queryKey: [o, "looks"] }), n.invalidateQueries({ queryKey: [o, "looks-with-items"] }), n.invalidateQueries({ queryKey: [
|
|
424
|
+
o,
|
|
425
|
+
"look",
|
|
426
|
+
e.id
|
|
427
|
+
] });
|
|
428
|
+
}
|
|
429
|
+
});
|
|
430
|
+
}, z = () => {
|
|
431
|
+
let n = r(), { apiGatewayUrl: i } = e();
|
|
432
|
+
return t({
|
|
433
|
+
mutationFn: async (e) => (await s(`mutation CooSaveLook($id: ID!) { cooSaveLook(id: $id) { ${d} } }`, { id: e }, i)).cooSaveLook,
|
|
434
|
+
onSuccess: (e) => {
|
|
435
|
+
n.invalidateQueries({ queryKey: [o, "looks"] }), n.invalidateQueries({ queryKey: [o, "looks-with-items"] }), n.invalidateQueries({ queryKey: [
|
|
436
|
+
o,
|
|
437
|
+
"look",
|
|
438
|
+
e.id
|
|
439
|
+
] });
|
|
440
|
+
}
|
|
441
|
+
});
|
|
442
|
+
}, B = () => {
|
|
443
|
+
let n = r(), { apiGatewayUrl: i } = e();
|
|
444
|
+
return t({
|
|
445
|
+
mutationFn: async (e) => (await s(`mutation CooUnsaveLook($id: ID!) { cooUnsaveLook(id: $id) { ${d} } }`, { id: e }, i)).cooUnsaveLook,
|
|
446
|
+
onSuccess: (e) => {
|
|
447
|
+
n.invalidateQueries({ queryKey: [o, "looks"] }), n.invalidateQueries({ queryKey: [o, "looks-with-items"] }), n.invalidateQueries({ queryKey: [
|
|
448
|
+
o,
|
|
449
|
+
"look",
|
|
450
|
+
e.id
|
|
451
|
+
] });
|
|
452
|
+
}
|
|
453
|
+
});
|
|
454
|
+
}, ne = () => {
|
|
377
455
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
378
456
|
return t({
|
|
379
457
|
mutationFn: async (e) => (await s("mutation CooDeleteLook($id: ID!) { cooDeleteLook(id: $id) }", { id: e }, i)).cooDeleteLook,
|
|
@@ -381,7 +459,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
381
459
|
n.invalidateQueries({ queryKey: [o, "looks"] }), n.invalidateQueries({ queryKey: [o, "looks-with-items"] });
|
|
382
460
|
}
|
|
383
461
|
});
|
|
384
|
-
},
|
|
462
|
+
}, V = (t = {}) => {
|
|
385
463
|
let { apiGatewayUrl: r } = e();
|
|
386
464
|
return n({
|
|
387
465
|
queryKey: [
|
|
@@ -391,16 +469,16 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
391
469
|
],
|
|
392
470
|
queryFn: async () => (await s(`query CooListCollaborations($brandId: ID, $creatorId: ID, $status: CooCollaborationStatus) {
|
|
393
471
|
cooListCollaborations(brandId: $brandId, creatorId: $creatorId, status: $status) {
|
|
394
|
-
${p}
|
|
395
|
-
|
|
472
|
+
items { ${p} brand { id name handle logo { id } } }
|
|
473
|
+
pageInfo { cursor hasMore }
|
|
396
474
|
}
|
|
397
475
|
}`, {
|
|
398
476
|
brandId: t.brandId,
|
|
399
477
|
creatorId: t.creatorId,
|
|
400
478
|
status: t.status
|
|
401
|
-
}, r)).cooListCollaborations
|
|
479
|
+
}, r)).cooListCollaborations.items
|
|
402
480
|
});
|
|
403
|
-
},
|
|
481
|
+
}, H = (t) => {
|
|
404
482
|
let { apiGatewayUrl: r } = e();
|
|
405
483
|
return n({
|
|
406
484
|
queryKey: [
|
|
@@ -408,16 +486,24 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
408
486
|
"collaboration",
|
|
409
487
|
t
|
|
410
488
|
],
|
|
411
|
-
queryFn: async () =>
|
|
489
|
+
queryFn: async () => {
|
|
490
|
+
let e = await s(`query CooCollaboration($id: ID!) {
|
|
412
491
|
cooCollaboration(id: $id) {
|
|
413
492
|
${p}
|
|
414
493
|
brand { id name handle logo { id } }
|
|
415
|
-
looks { ${d} }
|
|
494
|
+
looks { items { ${d} } pageInfo { cursor hasMore } }
|
|
416
495
|
}
|
|
417
|
-
}`, { 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
|
+
},
|
|
418
504
|
enabled: !!t
|
|
419
505
|
});
|
|
420
|
-
},
|
|
506
|
+
}, U = () => {
|
|
421
507
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
422
508
|
return t({
|
|
423
509
|
mutationFn: async (e) => (await s(`mutation CooCreateCollaboration($input: CooCreateCollaborationInput!) {
|
|
@@ -427,7 +513,27 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
427
513
|
n.invalidateQueries({ queryKey: [o, "collaborations"] });
|
|
428
514
|
}
|
|
429
515
|
});
|
|
430
|
-
},
|
|
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
|
+
});
|
|
536
|
+
}, G = () => {
|
|
431
537
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
432
538
|
return t({
|
|
433
539
|
mutationFn: async ({ id: e, status: t }) => (await s(`mutation CooTransitionCollaboration($id: ID!, $status: CooCollaborationStatus!) {
|
|
@@ -444,7 +550,15 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
444
550
|
] });
|
|
445
551
|
}
|
|
446
552
|
});
|
|
447
|
-
},
|
|
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 = {}) => {
|
|
448
562
|
let { apiGatewayUrl: r } = e();
|
|
449
563
|
return n({
|
|
450
564
|
queryKey: [
|
|
@@ -453,13 +567,16 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
453
567
|
t
|
|
454
568
|
],
|
|
455
569
|
queryFn: async () => (await s(`query CooListWardrobeItems($category: CooStyleCategory, $source: CooWardrobeSource) {
|
|
456
|
-
cooListWardrobeItems(category: $category, source: $source) {
|
|
570
|
+
cooListWardrobeItems(category: $category, source: $source) {
|
|
571
|
+
items { ${m} }
|
|
572
|
+
pageInfo { cursor hasMore }
|
|
573
|
+
}
|
|
457
574
|
}`, {
|
|
458
575
|
category: t.category,
|
|
459
576
|
source: t.source
|
|
460
|
-
}, r)).cooListWardrobeItems
|
|
577
|
+
}, r)).cooListWardrobeItems.items
|
|
461
578
|
});
|
|
462
|
-
},
|
|
579
|
+
}, J = () => {
|
|
463
580
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
464
581
|
return t({
|
|
465
582
|
mutationFn: async (e) => (await s(`mutation CooCreateWardrobeItem($input: CooCreateWardrobeItemInput!) {
|
|
@@ -469,7 +586,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
469
586
|
n.invalidateQueries({ queryKey: [o, "wardrobe"] });
|
|
470
587
|
}
|
|
471
588
|
});
|
|
472
|
-
},
|
|
589
|
+
}, Y = () => {
|
|
473
590
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
474
591
|
return t({
|
|
475
592
|
mutationFn: async (e) => (await s(`mutation CooLogWardrobeWear($id: ID!) {
|
|
@@ -479,7 +596,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
479
596
|
n.invalidateQueries({ queryKey: [o, "wardrobe"] });
|
|
480
597
|
}
|
|
481
598
|
});
|
|
482
|
-
},
|
|
599
|
+
}, X = () => {
|
|
483
600
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
484
601
|
return t({
|
|
485
602
|
mutationFn: async (e) => (await s("mutation CooRemoveWardrobeItem($id: ID!) { cooRemoveWardrobeItem(id: $id) }", { id: e }, i)).cooRemoveWardrobeItem,
|
|
@@ -487,13 +604,26 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
487
604
|
n.invalidateQueries({ queryKey: [o, "wardrobe"] });
|
|
488
605
|
}
|
|
489
606
|
});
|
|
490
|
-
},
|
|
607
|
+
}, Z = () => {
|
|
491
608
|
let { apiGatewayUrl: t } = e();
|
|
492
609
|
return n({
|
|
493
610
|
queryKey: [o, "my-style-profile"],
|
|
494
611
|
queryFn: async () => (await s(`query CooMyStyleProfile { cooMyStyleProfile { ${h} } }`, {}, t)).cooMyStyleProfile
|
|
495
612
|
});
|
|
496
|
-
},
|
|
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 = () => {
|
|
497
627
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
498
628
|
return t({
|
|
499
629
|
mutationFn: async (e) => (await s(`mutation CooUpsertStyleProfile($input: CooUpsertStyleProfileInput!) {
|
|
@@ -503,7 +633,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
503
633
|
n.invalidateQueries({ queryKey: [o, "my-style-profile"] });
|
|
504
634
|
}
|
|
505
635
|
});
|
|
506
|
-
},
|
|
636
|
+
}, Q = "id workspaceId lookbookId lookId styleItemId note position createdAt updatedAt", ae = (t) => {
|
|
507
637
|
let { apiGatewayUrl: r } = e();
|
|
508
638
|
return n({
|
|
509
639
|
queryKey: [
|
|
@@ -513,12 +643,18 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
513
643
|
],
|
|
514
644
|
queryFn: async () => (await s(`query CooListLookbooks($ownerId: ID) {
|
|
515
645
|
cooListLookbooks(ownerId: $ownerId) {
|
|
516
|
-
|
|
517
|
-
|
|
646
|
+
items {
|
|
647
|
+
${g}
|
|
648
|
+
entries { items { ${Q} } pageInfo { cursor hasMore } }
|
|
649
|
+
}
|
|
650
|
+
pageInfo { cursor hasMore }
|
|
518
651
|
}
|
|
519
|
-
}`, { ownerId: t }, r)).cooListLookbooks
|
|
652
|
+
}`, { ownerId: t }, r)).cooListLookbooks.items.map(({ entries: e, ...t }) => ({
|
|
653
|
+
...t,
|
|
654
|
+
entries: e?.items ?? []
|
|
655
|
+
}))
|
|
520
656
|
});
|
|
521
|
-
},
|
|
657
|
+
}, oe = () => {
|
|
522
658
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
523
659
|
return t({
|
|
524
660
|
mutationFn: async (e) => (await s(`mutation CooCreateLookbook($input: CooCreateLookbookInput!) {
|
|
@@ -528,7 +664,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
528
664
|
n.invalidateQueries({ queryKey: [o, "lookbooks"] });
|
|
529
665
|
}
|
|
530
666
|
});
|
|
531
|
-
},
|
|
667
|
+
}, $ = () => {
|
|
532
668
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
533
669
|
return t({
|
|
534
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,
|
|
@@ -540,7 +676,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
540
676
|
] });
|
|
541
677
|
}
|
|
542
678
|
});
|
|
543
|
-
},
|
|
679
|
+
}, se = () => {
|
|
544
680
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
545
681
|
return t({
|
|
546
682
|
mutationFn: async (e) => (await s("mutation CooRemoveLookbookEntry($id: ID!) { cooRemoveLookbookEntry(id: $id) }", { id: e }, i)).cooRemoveLookbookEntry,
|
|
@@ -548,7 +684,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
548
684
|
n.invalidateQueries({ queryKey: [o, "lookbooks"] }), n.invalidateQueries({ queryKey: [o, "lookbook"] });
|
|
549
685
|
}
|
|
550
686
|
});
|
|
551
|
-
},
|
|
687
|
+
}, ce = "\n id workspaceId ownerId displayName bio visibility\n stylePreferences palette favouriteBrands\n isFollowedByMe followerCount followingCount\n", le = (t) => {
|
|
552
688
|
let { apiGatewayUrl: r } = e();
|
|
553
689
|
return n({
|
|
554
690
|
queryKey: [
|
|
@@ -559,7 +695,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
559
695
|
enabled: !!t,
|
|
560
696
|
queryFn: async () => (await s("query CooIsFollowing($followeeId: ID!) { cooIsFollowing(followeeId: $followeeId) }", { followeeId: t }, r)).cooIsFollowing
|
|
561
697
|
});
|
|
562
|
-
},
|
|
698
|
+
}, ue = () => {
|
|
563
699
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
564
700
|
return t({
|
|
565
701
|
mutationFn: async (e) => (await s("mutation CooFollow($followeeId: ID!) { cooFollow(followeeId: $followeeId) }", { followeeId: e }, i)).cooFollow,
|
|
@@ -571,7 +707,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
571
707
|
] }), n.invalidateQueries({ queryKey: [o, "my-following"] }), n.invalidateQueries({ queryKey: [o, "my-followers"] }), n.invalidateQueries({ queryKey: [o, "my-style-profile"] });
|
|
572
708
|
}
|
|
573
709
|
});
|
|
574
|
-
},
|
|
710
|
+
}, de = () => {
|
|
575
711
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
576
712
|
return t({
|
|
577
713
|
mutationFn: async (e) => (await s("mutation CooUnfollow($followeeId: ID!) { cooUnfollow(followeeId: $followeeId) }", { followeeId: e }, i)).cooUnfollow,
|
|
@@ -583,13 +719,15 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
583
719
|
] }), n.invalidateQueries({ queryKey: [o, "my-following"] }), n.invalidateQueries({ queryKey: [o, "my-followers"] }), n.invalidateQueries({ queryKey: [o, "my-style-profile"] });
|
|
584
720
|
}
|
|
585
721
|
});
|
|
586
|
-
},
|
|
722
|
+
}, fe = () => {
|
|
587
723
|
let { apiGatewayUrl: t } = e();
|
|
588
724
|
return n({
|
|
589
725
|
queryKey: [o, "my-following"],
|
|
590
|
-
queryFn: async () => (await s(`query CooMyFollowing {
|
|
726
|
+
queryFn: async () => (await s(`query CooMyFollowing {
|
|
727
|
+
cooMyFollowing { items { ${ce} } pageInfo { cursor hasMore } }
|
|
728
|
+
}`, {}, t)).cooMyFollowing.items
|
|
591
729
|
});
|
|
592
|
-
},
|
|
730
|
+
}, pe = (t) => {
|
|
593
731
|
let { apiGatewayUrl: r } = e();
|
|
594
732
|
return n({
|
|
595
733
|
queryKey: [
|
|
@@ -597,16 +735,32 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
597
735
|
"lookbook",
|
|
598
736
|
t
|
|
599
737
|
],
|
|
600
|
-
queryFn: async () =>
|
|
738
|
+
queryFn: async () => {
|
|
739
|
+
let e = await s(`query CooLookbook($id: ID!) {
|
|
601
740
|
cooLookbook(id: $id) {
|
|
602
741
|
${g}
|
|
603
|
-
entries {
|
|
742
|
+
entries { items { ${Q} } pageInfo { cursor hasMore } }
|
|
604
743
|
}
|
|
605
|
-
}`, { 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
|
+
},
|
|
606
752
|
enabled: !!t
|
|
607
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
|
+
});
|
|
608
762
|
};
|
|
609
763
|
//#endregion
|
|
610
|
-
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 };
|
|
611
765
|
|
|
612
766
|
//# sourceMappingURL=useCoolAndLovelyApi.js.map
|