@burdenoff/microfe-coolandlovely 2026.1110.3 → 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.
- package/dist/coolandlovely/CoolAndLovelyRoot.js +91 -88
- package/dist/coolandlovely/components/ImageUploadField.d.ts +2 -0
- package/dist/coolandlovely/components/ImageUploadField.js +142 -119
- package/dist/coolandlovely/hooks/uploadVisibility.d.ts +2 -0
- package/dist/coolandlovely/hooks/uploadVisibility.js +6 -0
- package/dist/coolandlovely/hooks/useCatalogImport.js +1 -1
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js +308 -303
- package/dist/coolandlovely/hooks/useFiles.d.ts +3 -25
- package/dist/coolandlovely/hooks/useFiles.js +52 -50
- package/dist/coolandlovely/pages/brands/BrandFormPage.js +2 -0
- package/dist/coolandlovely/pages/collections/CollectionFormPage.js +1 -0
- package/dist/coolandlovely/pages/items/StyleItemFormPage.js +1 -0
- package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js +1 -0
- package/dist/coolandlovely/pages/looks/LookFormPage.js +1 -0
- package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js +1 -0
- package/dist/coolandlovely/utils/quota.d.ts +10 -0
- package/dist/coolandlovely/utils/quota.js +5 -0
- package/package.json +1 -1
|
@@ -1,24 +1,29 @@
|
|
|
1
1
|
import { useCoolAndLovely as e } from "../context/CoolAndLovelyContext.js";
|
|
2
2
|
import "../context/index.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
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,
|
|
8
|
-
let o = await
|
|
9
|
+
var o = "coolandlovely", s = async (e, r, i, a) => {
|
|
10
|
+
let o = await ee({
|
|
9
11
|
gateway: "workspace",
|
|
10
|
-
baseUrl:
|
|
12
|
+
baseUrl: i,
|
|
11
13
|
query: e,
|
|
12
|
-
variables:
|
|
14
|
+
variables: r,
|
|
13
15
|
workspaceToken: !0,
|
|
14
|
-
signal:
|
|
16
|
+
signal: a
|
|
15
17
|
});
|
|
16
|
-
if (o.errors?.length)
|
|
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) &&
|
|
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",
|
|
20
|
-
let { apiGatewayUrl:
|
|
21
|
-
return
|
|
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
|
-
},
|
|
44
|
+
}, n)).cooListBrands
|
|
40
45
|
});
|
|
41
|
-
},
|
|
42
|
-
let { apiGatewayUrl:
|
|
43
|
-
return
|
|
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 },
|
|
61
|
+
}`, { id: t }, n);
|
|
57
62
|
if (!e.cooBrand) return null;
|
|
58
|
-
let { collections:
|
|
63
|
+
let { collections: r, items: i, ...a } = e.cooBrand;
|
|
59
64
|
return {
|
|
60
65
|
...a,
|
|
61
|
-
collections:
|
|
66
|
+
collections: r?.items ?? [],
|
|
62
67
|
items: i?.items ?? []
|
|
63
68
|
};
|
|
64
69
|
},
|
|
65
70
|
enabled: !!t
|
|
66
71
|
});
|
|
67
|
-
},
|
|
68
|
-
let
|
|
69
|
-
return
|
|
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 },
|
|
77
|
+
}`, { input: e }, n)).cooCreateBrand,
|
|
73
78
|
onSuccess: () => {
|
|
74
|
-
|
|
79
|
+
t.invalidateQueries({ queryKey: [o, "brands"] });
|
|
75
80
|
}
|
|
76
81
|
});
|
|
77
|
-
},
|
|
78
|
-
let
|
|
79
|
-
return
|
|
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
|
-
},
|
|
90
|
+
}, n)).cooUpdateBrand,
|
|
86
91
|
onSuccess: (e) => {
|
|
87
|
-
|
|
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
|
-
},
|
|
95
|
-
let
|
|
96
|
-
return
|
|
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
|
-
},
|
|
107
|
+
}, n)).cooTransitionBrand,
|
|
103
108
|
onSuccess: (e) => {
|
|
104
|
-
|
|
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
|
-
},
|
|
112
|
-
let { apiGatewayUrl:
|
|
113
|
-
return
|
|
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
|
-
},
|
|
132
|
+
}, n)).cooListCollections.items
|
|
128
133
|
});
|
|
129
|
-
},
|
|
130
|
-
let { apiGatewayUrl:
|
|
131
|
-
return
|
|
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 },
|
|
149
|
+
}`, { id: t }, n);
|
|
145
150
|
if (!e.cooCollection) return null;
|
|
146
|
-
let { items:
|
|
151
|
+
let { items: r, ...i } = e.cooCollection;
|
|
147
152
|
return {
|
|
148
153
|
...i,
|
|
149
|
-
items:
|
|
154
|
+
items: r?.items ?? []
|
|
150
155
|
};
|
|
151
156
|
},
|
|
152
157
|
enabled: !!t
|
|
153
158
|
});
|
|
154
|
-
},
|
|
155
|
-
let
|
|
156
|
-
return
|
|
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 },
|
|
164
|
+
}`, { input: e }, n)).cooCreateCollection,
|
|
160
165
|
onSuccess: () => {
|
|
161
|
-
|
|
166
|
+
t.invalidateQueries({ queryKey: [o, "collections"] });
|
|
162
167
|
}
|
|
163
168
|
});
|
|
164
|
-
},
|
|
165
|
-
let
|
|
166
|
-
return
|
|
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
|
-
},
|
|
177
|
+
}, n)).cooUpdateCollection,
|
|
173
178
|
onSuccess: (e) => {
|
|
174
|
-
|
|
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
|
-
},
|
|
182
|
-
let
|
|
183
|
-
return
|
|
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 },
|
|
191
|
+
}`, { id: e }, n)).cooPublishCollection,
|
|
187
192
|
onSuccess: (e) => {
|
|
188
|
-
|
|
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
|
-
},
|
|
196
|
-
let
|
|
197
|
-
return
|
|
198
|
-
mutationFn: async (e) => (await s("mutation CooArchiveCollection($id: ID!) { cooArchiveCollection(id: $id) }", { id: e },
|
|
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
|
-
|
|
205
|
+
t.invalidateQueries({ queryKey: [o, "collections"] });
|
|
201
206
|
}
|
|
202
207
|
});
|
|
203
|
-
},
|
|
204
|
-
let { apiGatewayUrl:
|
|
205
|
-
return
|
|
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
|
-
},
|
|
236
|
+
}, n)).cooListStyleItems
|
|
232
237
|
});
|
|
233
|
-
},
|
|
234
|
-
let { apiGatewayUrl:
|
|
235
|
-
return
|
|
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 },
|
|
253
|
+
}`, { id: t }, n)).cooStyleItem,
|
|
249
254
|
enabled: !!t
|
|
250
255
|
});
|
|
251
|
-
},
|
|
252
|
-
let
|
|
253
|
-
return
|
|
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 },
|
|
261
|
+
}`, { input: e }, n)).cooCreateStyleItem,
|
|
257
262
|
onSuccess: () => {
|
|
258
|
-
|
|
263
|
+
t.invalidateQueries({ queryKey: [o, "style-items"] });
|
|
259
264
|
}
|
|
260
265
|
});
|
|
261
|
-
},
|
|
262
|
-
let
|
|
263
|
-
return
|
|
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
|
-
},
|
|
274
|
+
}, n)).cooUpdateStyleItem,
|
|
270
275
|
onSuccess: (e) => {
|
|
271
|
-
|
|
276
|
+
t.invalidateQueries({ queryKey: [o, "style-items"] }), t.invalidateQueries({ queryKey: [
|
|
272
277
|
o,
|
|
273
278
|
"style-item",
|
|
274
279
|
e.id
|
|
275
|
-
] }),
|
|
280
|
+
] }), t.invalidateQueries({ queryKey: [
|
|
276
281
|
o,
|
|
277
282
|
"style-item-inventory",
|
|
278
283
|
e.id
|
|
279
284
|
] });
|
|
280
285
|
}
|
|
281
286
|
});
|
|
282
|
-
},
|
|
283
|
-
let
|
|
284
|
-
return
|
|
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 },
|
|
292
|
+
}`, { id: e }, n)).cooSyncStyleItemStoreListing,
|
|
288
293
|
onSuccess: (e) => {
|
|
289
|
-
|
|
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
|
-
}),
|
|
301
|
+
}), t.invalidateQueries({ queryKey: [
|
|
297
302
|
o,
|
|
298
303
|
"style-item",
|
|
299
304
|
e.id
|
|
300
305
|
] });
|
|
301
306
|
}
|
|
302
307
|
});
|
|
303
|
-
},
|
|
304
|
-
let
|
|
305
|
-
return
|
|
306
|
-
mutationFn: async (e) => (await s("mutation CooArchiveStyleItem($id: ID!) { cooArchiveStyleItem(id: $id) }", { id: e },
|
|
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
|
-
|
|
313
|
+
t.invalidateQueries({ queryKey: [o, "style-items"] });
|
|
309
314
|
}
|
|
310
315
|
});
|
|
311
|
-
},
|
|
312
|
-
let { apiGatewayUrl:
|
|
313
|
-
return
|
|
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
|
-
},
|
|
339
|
+
}, n)).cooListLooks
|
|
335
340
|
});
|
|
336
|
-
},
|
|
337
|
-
let { apiGatewayUrl:
|
|
338
|
-
return
|
|
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 },
|
|
355
|
+
}`, { id: t }, n);
|
|
351
356
|
if (!e.cooLook) return null;
|
|
352
|
-
let { items:
|
|
357
|
+
let { items: r, ...i } = e.cooLook;
|
|
353
358
|
return {
|
|
354
359
|
...i,
|
|
355
|
-
items:
|
|
360
|
+
items: r?.items ?? []
|
|
356
361
|
};
|
|
357
362
|
},
|
|
358
363
|
enabled: !!t
|
|
359
364
|
});
|
|
360
|
-
},
|
|
361
|
-
let { apiGatewayUrl:
|
|
362
|
-
return
|
|
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
|
-
},
|
|
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
|
-
},
|
|
395
|
-
let
|
|
396
|
-
return
|
|
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 },
|
|
404
|
+
}`, { input: e }, n)).cooCreateLook,
|
|
400
405
|
onSuccess: () => {
|
|
401
|
-
|
|
406
|
+
t.invalidateQueries({ queryKey: [o, "looks"] }), t.invalidateQueries({ queryKey: [o, "looks-with-items"] });
|
|
402
407
|
}
|
|
403
408
|
});
|
|
404
|
-
},
|
|
405
|
-
let
|
|
406
|
-
return
|
|
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
|
-
},
|
|
417
|
+
}, n)).cooUpdateLook,
|
|
413
418
|
onSuccess: (e) => {
|
|
414
|
-
|
|
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
|
-
},
|
|
422
|
-
let
|
|
423
|
-
return
|
|
424
|
-
mutationFn: async (e) => (await s(`mutation CooPublishLook($id: ID!) { cooPublishLook(id: $id) { ${f} } }`, { id: e },
|
|
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
|
-
|
|
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
|
-
},
|
|
434
|
-
let
|
|
435
|
-
return
|
|
436
|
-
mutationFn: async (e) => (await s(`mutation CooLikeLook($id: ID!) { cooLikeLook(id: $id) { ${f} } }`, { id: e },
|
|
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
|
-
|
|
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
|
-
},
|
|
446
|
-
let
|
|
447
|
-
return
|
|
448
|
-
mutationFn: async (e) => (await s(`mutation CooUnlikeLook($id: ID!) { cooUnlikeLook(id: $id) { ${f} } }`, { id: e },
|
|
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
|
-
|
|
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
|
-
},
|
|
458
|
-
let
|
|
459
|
-
return
|
|
460
|
-
mutationFn: async (e) => (await s(`mutation CooSaveLook($id: ID!) { cooSaveLook(id: $id) { ${f} } }`, { id: e },
|
|
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
|
-
|
|
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
|
-
},
|
|
470
|
-
let
|
|
471
|
-
return
|
|
472
|
-
mutationFn: async (e) => (await s(`mutation CooUnsaveLook($id: ID!) { cooUnsaveLook(id: $id) { ${f} } }`, { id: e },
|
|
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
|
-
|
|
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
|
-
},
|
|
482
|
-
let
|
|
483
|
-
return
|
|
484
|
-
mutationFn: async (e) => (await s("mutation CooDeleteLook($id: ID!) { cooDeleteLook(id: $id) }", { id: e },
|
|
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
|
-
|
|
491
|
+
t.invalidateQueries({ queryKey: [o, "looks"] }), t.invalidateQueries({ queryKey: [o, "looks-with-items"] });
|
|
487
492
|
}
|
|
488
493
|
});
|
|
489
|
-
},
|
|
490
|
-
let { apiGatewayUrl:
|
|
491
|
-
return
|
|
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
|
-
},
|
|
511
|
+
}, n)).cooListCollaborations.items
|
|
507
512
|
});
|
|
508
|
-
},
|
|
509
|
-
let { apiGatewayUrl:
|
|
510
|
-
return
|
|
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 },
|
|
529
|
+
}`, { id: t }, n);
|
|
525
530
|
if (!e.cooCollaboration) return null;
|
|
526
|
-
let { looks:
|
|
531
|
+
let { looks: r, ...i } = e.cooCollaboration;
|
|
527
532
|
return {
|
|
528
533
|
...i,
|
|
529
|
-
looks:
|
|
534
|
+
looks: r?.items ?? []
|
|
530
535
|
};
|
|
531
536
|
},
|
|
532
537
|
enabled: !!t
|
|
533
538
|
});
|
|
534
|
-
},
|
|
535
|
-
let
|
|
536
|
-
return
|
|
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 },
|
|
544
|
+
}`, { input: e }, n)).cooCreateCollaboration,
|
|
540
545
|
onSuccess: () => {
|
|
541
|
-
|
|
546
|
+
t.invalidateQueries({ queryKey: [o, "collaborations"] });
|
|
542
547
|
}
|
|
543
548
|
});
|
|
544
|
-
},
|
|
545
|
-
let
|
|
546
|
-
return
|
|
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
|
-
},
|
|
560
|
+
}, n)).cooUpdateCollaboration,
|
|
556
561
|
onSuccess: (e) => {
|
|
557
|
-
|
|
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
|
-
},
|
|
565
|
-
let
|
|
566
|
-
return
|
|
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
|
-
},
|
|
577
|
+
}, n)).cooTransitionCollaboration,
|
|
573
578
|
onSuccess: (e) => {
|
|
574
|
-
|
|
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
|
-
},
|
|
582
|
-
let
|
|
583
|
-
return
|
|
584
|
-
mutationFn: async (e) => (await s("mutation CooDeleteCollaboration($id: ID!) { cooDeleteCollaboration(id: $id) }", { id: e },
|
|
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
|
-
|
|
591
|
+
t.invalidateQueries({ queryKey: [o, "collaborations"] });
|
|
587
592
|
}
|
|
588
593
|
});
|
|
589
|
-
},
|
|
590
|
-
let { apiGatewayUrl:
|
|
591
|
-
return
|
|
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
|
-
},
|
|
610
|
+
}, n)).cooListWardrobeItems.items
|
|
606
611
|
});
|
|
607
|
-
},
|
|
608
|
-
let
|
|
609
|
-
return
|
|
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 },
|
|
617
|
+
}`, { input: e }, n)).cooCreateWardrobeItem,
|
|
613
618
|
onSuccess: () => {
|
|
614
|
-
|
|
619
|
+
t.invalidateQueries({ queryKey: [o, "wardrobe"] });
|
|
615
620
|
}
|
|
616
621
|
});
|
|
617
|
-
},
|
|
618
|
-
let
|
|
619
|
-
return
|
|
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 },
|
|
627
|
+
}`, { id: e }, n)).cooLogWardrobeWear,
|
|
623
628
|
onSuccess: () => {
|
|
624
|
-
|
|
629
|
+
t.invalidateQueries({ queryKey: [o, "wardrobe"] });
|
|
625
630
|
}
|
|
626
631
|
});
|
|
627
|
-
},
|
|
628
|
-
let
|
|
629
|
-
return
|
|
630
|
-
mutationFn: async (e) => (await s("mutation CooRemoveWardrobeItem($id: ID!) { cooRemoveWardrobeItem(id: $id) }", { id: e },
|
|
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
|
-
|
|
637
|
+
t.invalidateQueries({ queryKey: [o, "wardrobe"] });
|
|
633
638
|
}
|
|
634
639
|
});
|
|
635
|
-
},
|
|
640
|
+
}, se = () => {
|
|
636
641
|
let { apiGatewayUrl: t } = e();
|
|
637
|
-
return
|
|
642
|
+
return i({
|
|
638
643
|
queryKey: [o, "my-style-profile"],
|
|
639
644
|
queryFn: async () => (await s(`query CooMyStyleProfile { cooMyStyleProfile { ${_} } }`, {}, t)).cooMyStyleProfile
|
|
640
645
|
});
|
|
641
|
-
},
|
|
642
|
-
let { apiGatewayUrl:
|
|
643
|
-
return
|
|
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 },
|
|
656
|
+
}`, { ownerId: t }, n)).cooStyleProfileByOwner,
|
|
652
657
|
enabled: !!t
|
|
653
658
|
});
|
|
654
|
-
},
|
|
655
|
-
let
|
|
656
|
-
return
|
|
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 },
|
|
664
|
+
}`, { input: e }, n)).cooUpsertStyleProfile,
|
|
660
665
|
onSuccess: () => {
|
|
661
|
-
|
|
666
|
+
t.invalidateQueries({ queryKey: [o, "my-style-profile"] });
|
|
662
667
|
}
|
|
663
668
|
});
|
|
664
|
-
}, Q = "id workspaceId lookbookId lookId styleItemId note position createdAt updatedAt",
|
|
665
|
-
let { apiGatewayUrl:
|
|
666
|
-
return
|
|
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 },
|
|
685
|
+
}`, { ownerId: t }, n)).cooListLookbooks.items.map(({ entries: e, ...t }) => ({
|
|
681
686
|
...t,
|
|
682
687
|
entries: e?.items ?? []
|
|
683
688
|
}))
|
|
684
689
|
});
|
|
685
|
-
},
|
|
686
|
-
let
|
|
687
|
-
return
|
|
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 },
|
|
695
|
+
}`, { input: e }, n)).cooCreateLookbook,
|
|
691
696
|
onSuccess: () => {
|
|
692
|
-
|
|
697
|
+
t.invalidateQueries({ queryKey: [o, "lookbooks"] });
|
|
693
698
|
}
|
|
694
699
|
});
|
|
695
|
-
},
|
|
696
|
-
let
|
|
697
|
-
return
|
|
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 },
|
|
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
|
-
|
|
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
|
-
},
|
|
708
|
-
let
|
|
709
|
-
return
|
|
710
|
-
mutationFn: async (e) => (await s("mutation CooRemoveLookbookEntry($id: ID!) { cooRemoveLookbookEntry(id: $id) }", { id: e },
|
|
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
|
-
|
|
717
|
+
t.invalidateQueries({ queryKey: [o, "lookbooks"] }), t.invalidateQueries({ queryKey: [o, "lookbook"] });
|
|
713
718
|
}
|
|
714
719
|
});
|
|
715
|
-
},
|
|
716
|
-
let { apiGatewayUrl:
|
|
717
|
-
return
|
|
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 },
|
|
725
|
-
});
|
|
726
|
-
},
|
|
727
|
-
let
|
|
728
|
-
return
|
|
729
|
-
mutationFn: async (e) => (await s("mutation CooFollow($followeeId: ID!) { cooFollow(followeeId: $followeeId) }", { followeeId: e },
|
|
730
|
-
onSuccess: (e,
|
|
731
|
-
|
|
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
|
-
|
|
735
|
-
] }),
|
|
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
|
-
},
|
|
739
|
-
let
|
|
740
|
-
return
|
|
741
|
-
mutationFn: async (e) => (await s("mutation CooUnfollow($followeeId: ID!) { cooUnfollow(followeeId: $followeeId) }", { followeeId: e },
|
|
742
|
-
onSuccess: (e,
|
|
743
|
-
|
|
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
|
-
|
|
747
|
-
] }),
|
|
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
|
-
},
|
|
755
|
+
}, ve = () => {
|
|
751
756
|
let { apiGatewayUrl: t } = e();
|
|
752
|
-
return
|
|
757
|
+
return i({
|
|
753
758
|
queryKey: [o, "my-following"],
|
|
754
759
|
queryFn: async () => (await s(`query CooMyFollowing {
|
|
755
|
-
cooMyFollowing { items { ${
|
|
760
|
+
cooMyFollowing { items { ${me} } pageInfo { cursor hasMore } }
|
|
756
761
|
}`, {}, t)).cooMyFollowing.items
|
|
757
762
|
});
|
|
758
|
-
},
|
|
759
|
-
let { apiGatewayUrl:
|
|
760
|
-
return
|
|
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 },
|
|
777
|
+
}`, { id: t }, n);
|
|
773
778
|
if (!e.cooLookbook) return null;
|
|
774
|
-
let { entries:
|
|
779
|
+
let { entries: r, ...i } = e.cooLookbook;
|
|
775
780
|
return {
|
|
776
781
|
...i,
|
|
777
|
-
entries:
|
|
782
|
+
entries: r?.items ?? []
|
|
778
783
|
};
|
|
779
784
|
},
|
|
780
785
|
enabled: !!t
|
|
781
786
|
});
|
|
782
|
-
},
|
|
783
|
-
let
|
|
784
|
-
return
|
|
785
|
-
mutationFn: async (e) => (await s("mutation CooDeleteLookbook($id: ID!) { cooDeleteLookbook(id: $id) }", { id: e },
|
|
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
|
-
|
|
792
|
+
t.invalidateQueries({ queryKey: [o, "lookbooks"] }), t.invalidateQueries({ queryKey: [o, "lookbook"] });
|
|
788
793
|
}
|
|
789
794
|
});
|
|
790
|
-
},
|
|
791
|
-
let { apiGatewayUrl:
|
|
792
|
-
return
|
|
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
|
-
|
|
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:
|
|
806
|
-
pagination:
|
|
810
|
+
input: n.input,
|
|
811
|
+
pagination: n.pagination ?? {
|
|
807
812
|
limit: 24,
|
|
808
813
|
offset: 0
|
|
809
814
|
}
|
|
810
|
-
},
|
|
815
|
+
}, r)).cooSearchStyleItems
|
|
811
816
|
});
|
|
812
|
-
},
|
|
813
|
-
let { apiGatewayUrl:
|
|
814
|
-
return
|
|
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
|
-
|
|
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:
|
|
828
|
-
pagination:
|
|
832
|
+
input: n.input,
|
|
833
|
+
pagination: n.pagination ?? {
|
|
829
834
|
limit: 24,
|
|
830
835
|
offset: 0
|
|
831
836
|
}
|
|
832
|
-
},
|
|
837
|
+
}, r)).cooSearchLooks
|
|
833
838
|
});
|
|
834
|
-
},
|
|
835
|
-
let
|
|
836
|
-
return
|
|
837
|
-
mutationFn: async (e) => (await s(`mutation CooApproveBrand($id: ID!) { cooApproveBrand(id: $id) { ${c} } }`, { id: e },
|
|
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
|
-
|
|
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
|
-
},
|
|
847
|
-
let
|
|
848
|
-
return
|
|
849
|
-
mutationFn: async (e) => (await s(`mutation CooRejectBrand($id: ID!) { cooRejectBrand(id: $id) { ${c} } }`, { id: e },
|
|
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
|
-
|
|
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
|
-
},
|
|
859
|
-
let
|
|
860
|
-
return
|
|
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
|
-
},
|
|
871
|
+
}, n)).cooReviewCollaboration,
|
|
867
872
|
onSuccess: (e) => {
|
|
868
|
-
|
|
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
|
-
},
|
|
876
|
-
let
|
|
877
|
-
return
|
|
878
|
-
mutationFn: async (e) => (await s(`mutation CooFeatureStyleItem($id: ID!) { cooFeatureStyleItem(id: $id) { ${u} } }`, { id: e },
|
|
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
|
-
|
|
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
|
-
},
|
|
888
|
-
let
|
|
889
|
-
return
|
|
890
|
-
mutationFn: async (e) => (await s(`mutation CooUnfeatureStyleItem($id: ID!) { cooUnfeatureStyleItem(id: $id) { ${u} } }`, { id: e },
|
|
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
|
-
|
|
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,
|
|
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 };
|