@burdenoff/microfe-coolandlovely 2026.629.1 → 2026.706.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.
Files changed (66) hide show
  1. package/dist/coolandlovely/CoolAndLovelyRoutes.js +14 -6
  2. package/dist/coolandlovely/CoolAndLovelyRoutes.js.map +1 -1
  3. package/dist/coolandlovely/components/ActorName.js +29 -0
  4. package/dist/coolandlovely/components/ActorName.js.map +1 -0
  5. package/dist/coolandlovely/components/AddToLookbookButton.js +81 -0
  6. package/dist/coolandlovely/components/AddToLookbookButton.js.map +1 -0
  7. package/dist/coolandlovely/components/Comments.js +109 -0
  8. package/dist/coolandlovely/components/Comments.js.map +1 -0
  9. package/dist/coolandlovely/components/Field.js +22 -2
  10. package/dist/coolandlovely/components/Field.js.map +1 -1
  11. package/dist/coolandlovely/components/FileImage.js +17 -0
  12. package/dist/coolandlovely/components/FileImage.js.map +1 -0
  13. package/dist/coolandlovely/components/FollowButton.js +24 -0
  14. package/dist/coolandlovely/components/FollowButton.js.map +1 -0
  15. package/dist/coolandlovely/components/ImageUploadField.js +71 -0
  16. package/dist/coolandlovely/components/ImageUploadField.js.map +1 -0
  17. package/dist/coolandlovely/components/Thumbnail.js +20 -13
  18. package/dist/coolandlovely/components/Thumbnail.js.map +1 -1
  19. package/dist/coolandlovely/hooks/index.js +2 -0
  20. package/dist/coolandlovely/hooks/useComments.js +68 -0
  21. package/dist/coolandlovely/hooks/useComments.js.map +1 -0
  22. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js +219 -148
  23. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js.map +1 -1
  24. package/dist/coolandlovely/hooks/useFiles.js +94 -0
  25. package/dist/coolandlovely/hooks/useFiles.js.map +1 -0
  26. package/dist/coolandlovely/pages/HomePage.js +105 -87
  27. package/dist/coolandlovely/pages/HomePage.js.map +1 -1
  28. package/dist/coolandlovely/pages/brands/BrandDetailPage.js +144 -122
  29. package/dist/coolandlovely/pages/brands/BrandDetailPage.js.map +1 -1
  30. package/dist/coolandlovely/pages/brands/BrandFormPage.js +129 -91
  31. package/dist/coolandlovely/pages/brands/BrandFormPage.js.map +1 -1
  32. package/dist/coolandlovely/pages/brands/BrandsListPage.js +2 -0
  33. package/dist/coolandlovely/pages/brands/BrandsListPage.js.map +1 -1
  34. package/dist/coolandlovely/pages/collections/CollectionDetailPage.js +5 -1
  35. package/dist/coolandlovely/pages/collections/CollectionDetailPage.js.map +1 -1
  36. package/dist/coolandlovely/pages/collections/CollectionFormPage.js +117 -102
  37. package/dist/coolandlovely/pages/collections/CollectionFormPage.js.map +1 -1
  38. package/dist/coolandlovely/pages/collections/CollectionsListPage.js +2 -0
  39. package/dist/coolandlovely/pages/collections/CollectionsListPage.js.map +1 -1
  40. package/dist/coolandlovely/pages/discover/DiscoverPage.js +223 -0
  41. package/dist/coolandlovely/pages/discover/DiscoverPage.js.map +1 -0
  42. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js +99 -95
  43. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js.map +1 -1
  44. package/dist/coolandlovely/pages/items/StyleItemFormPage.js +144 -130
  45. package/dist/coolandlovely/pages/items/StyleItemFormPage.js.map +1 -1
  46. package/dist/coolandlovely/pages/items/StyleItemsListPage.js +2 -0
  47. package/dist/coolandlovely/pages/items/StyleItemsListPage.js.map +1 -1
  48. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js +190 -99
  49. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js.map +1 -1
  50. package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js +81 -68
  51. package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js.map +1 -1
  52. package/dist/coolandlovely/pages/looks/LookDetailPage.js +195 -155
  53. package/dist/coolandlovely/pages/looks/LookDetailPage.js.map +1 -1
  54. package/dist/coolandlovely/pages/looks/LookFormPage.js +127 -88
  55. package/dist/coolandlovely/pages/looks/LookFormPage.js.map +1 -1
  56. package/dist/coolandlovely/pages/looks/LooksListPage.js +2 -0
  57. package/dist/coolandlovely/pages/looks/LooksListPage.js.map +1 -1
  58. package/dist/coolandlovely/pages/profile/StyleProfilePage.js +169 -101
  59. package/dist/coolandlovely/pages/profile/StyleProfilePage.js.map +1 -1
  60. package/dist/coolandlovely/pages/trends/TrendsPage.js +249 -0
  61. package/dist/coolandlovely/pages/trends/TrendsPage.js.map +1 -0
  62. package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js +88 -76
  63. package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js.map +1 -1
  64. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js +2 -0
  65. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js.map +1 -1
  66. package/package.json +1 -1
@@ -2,8 +2,9 @@ import { useCoolAndLovely as e } from "../context/CoolAndLovelyContext.js";
2
2
  import "../context/index.js";
3
3
  import { useMutation as t, useQuery as n, useQueryClient as r } from "@tanstack/react-query";
4
4
  import { graphqlFetch as i } from "@burdenoff/fe-libs/shared/graphql";
5
+ import { clearGraphqlFetchResponseCache as a } from "@burdenoff/fe-libs/shared/graphql/fetch";
5
6
  //#region src/coolandlovely/hooks/useCoolAndLovelyApi.ts
6
- var a = "coolandlovely", o = async (e, t, n) => {
7
+ var o = "coolandlovely", s = async (e, t, n) => {
7
8
  let r = await i({
8
9
  gateway: "workspace",
9
10
  baseUrl: n,
@@ -13,18 +14,18 @@ var a = "coolandlovely", o = async (e, t, n) => {
13
14
  });
14
15
  if (r.errors?.length) throw Error(r.errors[0]?.message ?? "GraphQL request failed");
15
16
  if (!r.data) throw Error("GraphQL response did not include data");
16
- return r.data;
17
- }, s = "\n id workspaceId name handle tagline bio aesthetics tags websiteUrl\n isFeatured status logo { id } cover { id } createdAt updatedAt\n", c = "\n id workspaceId brandId name description season status tags\n cover { id } publishAt endAt createdAt updatedAt\n", l = "\n id workspaceId brandId collectionId name description category status\n sku price currency colours sizes materials tags image { id }\n createdAt updatedAt\n", u = "\n id workspaceId authorId title caption occasion visibility isFeatured\n likeCount saveCount collaborationId image { id } tags publishedAt\n createdAt updatedAt\n", d = "\n id workspaceId brandId creatorId collectionId title brief role status\n compensation currency tags startDate endDate publishedAt createdAt updatedAt\n", f = "\n id workspaceId profileId name category source brandName colour size notes\n styleItemId timesWorn lastWornAt tags image { id } createdAt updatedAt\n", p = "\n id workspaceId ownerId displayName bio visibility stylePreferences\n palette favouriteBrands sizes createdAt updatedAt\n", m = "\n id workspaceId ownerId profileId name description visibility tags\n cover { id } createdAt updatedAt\n", h = (t = {}) => {
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 brandId creatorId collectionId title brief role status\n compensation currency tags startDate endDate publishedAt createdAt updatedAt\n", p = "\n id workspaceId profileId name category source brandName colour size notes\n styleItemId timesWorn lastWornAt tags image { id } createdAt updatedAt\n", m = "\n id workspaceId ownerId displayName bio visibility stylePreferences\n palette favouriteBrands sizes createdAt updatedAt\n isFollowedByMe followerCount followingCount\n", h = "\n id workspaceId ownerId profileId name description visibility tags\n cover { id } createdAt updatedAt\n", g = (t = {}) => {
18
19
  let { apiGatewayUrl: r } = e();
19
20
  return n({
20
21
  queryKey: [
21
- a,
22
+ o,
22
23
  "brands",
23
24
  t
24
25
  ],
25
- queryFn: async () => (await o(`query CooListBrands($status: CooBrandStatus, $featured: Boolean, $pagination: PaginationInput) {
26
+ queryFn: async () => (await s(`query CooListBrands($status: CooBrandStatus, $featured: Boolean, $pagination: PaginationInput) {
26
27
  cooListBrands(status: $status, featured: $featured, pagination: $pagination) {
27
- items { ${s} }
28
+ items { ${c} }
28
29
  pageInfo { cursor hasMore }
29
30
  }
30
31
  }`, {
@@ -36,78 +37,78 @@ var a = "coolandlovely", o = async (e, t, n) => {
36
37
  }
37
38
  }, r)).cooListBrands
38
39
  });
39
- }, g = (t) => {
40
+ }, _ = (t) => {
40
41
  let { apiGatewayUrl: r } = e();
41
42
  return n({
42
43
  queryKey: [
43
- a,
44
+ o,
44
45
  "brand",
45
46
  t
46
47
  ],
47
- queryFn: async () => (await o(`query CooBrand($id: ID!) {
48
+ queryFn: async () => (await s(`query CooBrand($id: ID!) {
48
49
  cooBrand(id: $id) {
49
- ${s}
50
- collections { ${c} }
51
- items { ${l} }
50
+ ${c}
51
+ collections { ${l} }
52
+ items { ${u} }
52
53
  }
53
54
  }`, { id: t }, r)).cooBrand,
54
55
  enabled: !!t
55
56
  });
56
- }, _ = () => {
57
+ }, v = () => {
57
58
  let n = r(), { apiGatewayUrl: i } = e();
58
59
  return t({
59
- mutationFn: async (e) => (await o(`mutation CooCreateBrand($input: CooCreateBrandInput!) {
60
- cooCreateBrand(input: $input) { ${s} }
60
+ mutationFn: async (e) => (await s(`mutation CooCreateBrand($input: CooCreateBrandInput!) {
61
+ cooCreateBrand(input: $input) { ${c} }
61
62
  }`, { input: e }, i)).cooCreateBrand,
62
63
  onSuccess: () => {
63
- n.invalidateQueries({ queryKey: [a, "brands"] });
64
+ n.invalidateQueries({ queryKey: [o, "brands"] });
64
65
  }
65
66
  });
66
- }, v = () => {
67
+ }, y = () => {
67
68
  let n = r(), { apiGatewayUrl: i } = e();
68
69
  return t({
69
- mutationFn: async ({ id: e, input: t }) => (await o(`mutation CooUpdateBrand($id: ID!, $input: CooUpdateBrandInput!) {
70
- cooUpdateBrand(id: $id, input: $input) { ${s} }
70
+ mutationFn: async ({ id: e, input: t }) => (await s(`mutation CooUpdateBrand($id: ID!, $input: CooUpdateBrandInput!) {
71
+ cooUpdateBrand(id: $id, input: $input) { ${c} }
71
72
  }`, {
72
73
  id: e,
73
74
  input: t
74
75
  }, i)).cooUpdateBrand,
75
76
  onSuccess: (e) => {
76
- n.invalidateQueries({ queryKey: [a, "brands"] }), n.invalidateQueries({ queryKey: [
77
- a,
77
+ n.invalidateQueries({ queryKey: [o, "brands"] }), n.invalidateQueries({ queryKey: [
78
+ o,
78
79
  "brand",
79
80
  e.id
80
81
  ] });
81
82
  }
82
83
  });
83
- }, y = () => {
84
+ }, b = () => {
84
85
  let n = r(), { apiGatewayUrl: i } = e();
85
86
  return t({
86
- mutationFn: async ({ id: e, status: t }) => (await o(`mutation CooTransitionBrand($id: ID!, $status: CooBrandStatus!) {
87
- cooTransitionBrand(id: $id, status: $status) { ${s} }
87
+ mutationFn: async ({ id: e, status: t }) => (await s(`mutation CooTransitionBrand($id: ID!, $status: CooBrandStatus!) {
88
+ cooTransitionBrand(id: $id, status: $status) { ${c} }
88
89
  }`, {
89
90
  id: e,
90
91
  status: t
91
92
  }, i)).cooTransitionBrand,
92
93
  onSuccess: (e) => {
93
- n.invalidateQueries({ queryKey: [a, "brands"] }), n.invalidateQueries({ queryKey: [
94
- a,
94
+ n.invalidateQueries({ queryKey: [o, "brands"] }), n.invalidateQueries({ queryKey: [
95
+ o,
95
96
  "brand",
96
97
  e.id
97
98
  ] });
98
99
  }
99
100
  });
100
- }, b = (t = {}) => {
101
+ }, x = (t = {}) => {
101
102
  let { apiGatewayUrl: r } = e();
102
103
  return n({
103
104
  queryKey: [
104
- a,
105
+ o,
105
106
  "collections",
106
107
  t
107
108
  ],
108
- queryFn: async () => (await o(`query CooListCollections($brandId: ID, $status: CooCollectionStatus) {
109
+ queryFn: async () => (await s(`query CooListCollections($brandId: ID, $status: CooCollectionStatus) {
109
110
  cooListCollections(brandId: $brandId, status: $status) {
110
- ${c}
111
+ ${l}
111
112
  brand { id name handle }
112
113
  }
113
114
  }`, {
@@ -115,73 +116,73 @@ var a = "coolandlovely", o = async (e, t, n) => {
115
116
  status: t.status
116
117
  }, r)).cooListCollections
117
118
  });
118
- }, x = (t) => {
119
+ }, S = (t) => {
119
120
  let { apiGatewayUrl: r } = e();
120
121
  return n({
121
122
  queryKey: [
122
- a,
123
+ o,
123
124
  "collection",
124
125
  t
125
126
  ],
126
- queryFn: async () => (await o(`query CooCollection($id: ID!) {
127
+ queryFn: async () => (await s(`query CooCollection($id: ID!) {
127
128
  cooCollection(id: $id) {
128
- ${c}
129
+ ${l}
129
130
  brand { id name handle }
130
- items { ${l} }
131
+ items { ${u} }
131
132
  }
132
133
  }`, { id: t }, r)).cooCollection,
133
134
  enabled: !!t
134
135
  });
135
- }, S = () => {
136
+ }, C = () => {
136
137
  let n = r(), { apiGatewayUrl: i } = e();
137
138
  return t({
138
- mutationFn: async (e) => (await o(`mutation CooCreateCollection($input: CooCreateCollectionInput!) {
139
- cooCreateCollection(input: $input) { ${c} }
139
+ mutationFn: async (e) => (await s(`mutation CooCreateCollection($input: CooCreateCollectionInput!) {
140
+ cooCreateCollection(input: $input) { ${l} }
140
141
  }`, { input: e }, i)).cooCreateCollection,
141
142
  onSuccess: () => {
142
- n.invalidateQueries({ queryKey: [a, "collections"] });
143
+ n.invalidateQueries({ queryKey: [o, "collections"] });
143
144
  }
144
145
  });
145
- }, C = () => {
146
+ }, w = () => {
146
147
  let n = r(), { apiGatewayUrl: i } = e();
147
148
  return t({
148
- mutationFn: async ({ id: e, input: t }) => (await o(`mutation CooUpdateCollection($id: ID!, $input: CooUpdateCollectionInput!) {
149
- cooUpdateCollection(id: $id, input: $input) { ${c} }
149
+ mutationFn: async ({ id: e, input: t }) => (await s(`mutation CooUpdateCollection($id: ID!, $input: CooUpdateCollectionInput!) {
150
+ cooUpdateCollection(id: $id, input: $input) { ${l} }
150
151
  }`, {
151
152
  id: e,
152
153
  input: t
153
154
  }, i)).cooUpdateCollection,
154
155
  onSuccess: (e) => {
155
- n.invalidateQueries({ queryKey: [a, "collections"] }), n.invalidateQueries({ queryKey: [
156
- a,
156
+ n.invalidateQueries({ queryKey: [o, "collections"] }), n.invalidateQueries({ queryKey: [
157
+ o,
157
158
  "collection",
158
159
  e.id
159
160
  ] });
160
161
  }
161
162
  });
162
- }, w = () => {
163
+ }, T = () => {
163
164
  let n = r(), { apiGatewayUrl: i } = e();
164
165
  return t({
165
- mutationFn: async (e) => (await o(`mutation CooPublishCollection($id: ID!) {
166
- cooPublishCollection(id: $id) { ${c} }
166
+ mutationFn: async (e) => (await s(`mutation CooPublishCollection($id: ID!) {
167
+ cooPublishCollection(id: $id) { ${l} }
167
168
  }`, { id: e }, i)).cooPublishCollection,
168
169
  onSuccess: (e) => {
169
- n.invalidateQueries({ queryKey: [a, "collections"] }), n.invalidateQueries({ queryKey: [
170
- a,
170
+ n.invalidateQueries({ queryKey: [o, "collections"] }), n.invalidateQueries({ queryKey: [
171
+ o,
171
172
  "collection",
172
173
  e.id
173
174
  ] });
174
175
  }
175
176
  });
176
- }, T = (t = {}) => {
177
+ }, E = (t = {}) => {
177
178
  let { apiGatewayUrl: r } = e();
178
179
  return n({
179
180
  queryKey: [
180
- a,
181
+ o,
181
182
  "style-items",
182
183
  t
183
184
  ],
184
- queryFn: async () => (await o(`query CooListStyleItems(
185
+ queryFn: async () => (await s(`query CooListStyleItems(
185
186
  $brandId: ID, $collectionId: ID, $category: CooStyleCategory,
186
187
  $status: CooStyleItemStatus, $pagination: PaginationInput
187
188
  ) {
@@ -189,7 +190,7 @@ var a = "coolandlovely", o = async (e, t, n) => {
189
190
  brandId: $brandId, collectionId: $collectionId, category: $category,
190
191
  status: $status, pagination: $pagination
191
192
  ) {
192
- items { ${l} brand { id name handle } }
193
+ items { ${u} brand { id name handle } }
193
194
  pageInfo { cursor hasMore }
194
195
  }
195
196
  }`, {
@@ -203,71 +204,71 @@ var a = "coolandlovely", o = async (e, t, n) => {
203
204
  }
204
205
  }, r)).cooListStyleItems
205
206
  });
206
- }, E = (t) => {
207
+ }, D = (t) => {
207
208
  let { apiGatewayUrl: r } = e();
208
209
  return n({
209
210
  queryKey: [
210
- a,
211
+ o,
211
212
  "style-item",
212
213
  t
213
214
  ],
214
- queryFn: async () => (await o(`query CooStyleItem($id: ID!) {
215
+ queryFn: async () => (await s(`query CooStyleItem($id: ID!) {
215
216
  cooStyleItem(id: $id) {
216
- ${l}
217
+ ${u}
217
218
  brand { id name handle }
218
219
  collection { id name }
219
220
  }
220
221
  }`, { id: t }, r)).cooStyleItem,
221
222
  enabled: !!t
222
223
  });
223
- }, D = () => {
224
+ }, O = () => {
224
225
  let n = r(), { apiGatewayUrl: i } = e();
225
226
  return t({
226
- mutationFn: async (e) => (await o(`mutation CooCreateStyleItem($input: CooCreateStyleItemInput!) {
227
- cooCreateStyleItem(input: $input) { ${l} }
227
+ mutationFn: async (e) => (await s(`mutation CooCreateStyleItem($input: CooCreateStyleItemInput!) {
228
+ cooCreateStyleItem(input: $input) { ${u} }
228
229
  }`, { input: e }, i)).cooCreateStyleItem,
229
230
  onSuccess: () => {
230
- n.invalidateQueries({ queryKey: [a, "style-items"] });
231
+ n.invalidateQueries({ queryKey: [o, "style-items"] });
231
232
  }
232
233
  });
233
- }, O = () => {
234
+ }, k = () => {
234
235
  let n = r(), { apiGatewayUrl: i } = e();
235
236
  return t({
236
- mutationFn: async ({ id: e, input: t }) => (await o(`mutation CooUpdateStyleItem($id: ID!, $input: CooUpdateStyleItemInput!) {
237
- cooUpdateStyleItem(id: $id, input: $input) { ${l} }
237
+ mutationFn: async ({ id: e, input: t }) => (await s(`mutation CooUpdateStyleItem($id: ID!, $input: CooUpdateStyleItemInput!) {
238
+ cooUpdateStyleItem(id: $id, input: $input) { ${u} }
238
239
  }`, {
239
240
  id: e,
240
241
  input: t
241
242
  }, i)).cooUpdateStyleItem,
242
243
  onSuccess: (e) => {
243
- n.invalidateQueries({ queryKey: [a, "style-items"] }), n.invalidateQueries({ queryKey: [
244
- a,
244
+ n.invalidateQueries({ queryKey: [o, "style-items"] }), n.invalidateQueries({ queryKey: [
245
+ o,
245
246
  "style-item",
246
247
  e.id
247
248
  ] });
248
249
  }
249
250
  });
250
- }, k = () => {
251
+ }, A = () => {
251
252
  let n = r(), { apiGatewayUrl: i } = e();
252
253
  return t({
253
- mutationFn: async (e) => (await o("mutation CooArchiveStyleItem($id: ID!) { cooArchiveStyleItem(id: $id) }", { id: e }, i)).cooArchiveStyleItem,
254
+ mutationFn: async (e) => (await s("mutation CooArchiveStyleItem($id: ID!) { cooArchiveStyleItem(id: $id) }", { id: e }, i)).cooArchiveStyleItem,
254
255
  onSuccess: () => {
255
- n.invalidateQueries({ queryKey: [a, "style-items"] });
256
+ n.invalidateQueries({ queryKey: [o, "style-items"] });
256
257
  }
257
258
  });
258
- }, A = (t = {}) => {
259
+ }, j = (t = {}) => {
259
260
  let { apiGatewayUrl: r } = e();
260
261
  return n({
261
262
  queryKey: [
262
- a,
263
+ o,
263
264
  "looks",
264
265
  t
265
266
  ],
266
- queryFn: async () => (await o(`query CooListLooks(
267
+ queryFn: async () => (await s(`query CooListLooks(
267
268
  $authorId: ID, $occasion: CooLookOccasion, $featured: Boolean, $pagination: PaginationInput
268
269
  ) {
269
270
  cooListLooks(authorId: $authorId, occasion: $occasion, featured: $featured, pagination: $pagination) {
270
- items { ${u} }
271
+ items { ${d} }
271
272
  pageInfo { cursor hasMore }
272
273
  }
273
274
  }`, {
@@ -280,17 +281,17 @@ var a = "coolandlovely", o = async (e, t, n) => {
280
281
  }
281
282
  }, r)).cooListLooks
282
283
  });
283
- }, j = (t) => {
284
+ }, M = (t) => {
284
285
  let { apiGatewayUrl: r } = e();
285
286
  return n({
286
287
  queryKey: [
287
- a,
288
+ o,
288
289
  "look",
289
290
  t
290
291
  ],
291
- queryFn: async () => (await o(`query CooLook($id: ID!) {
292
+ queryFn: async () => (await s(`query CooLook($id: ID!) {
292
293
  cooLook(id: $id) {
293
- ${u}
294
+ ${d}
294
295
  items {
295
296
  id lookId styleItemId position styling
296
297
  styleItem { id name category price currency }
@@ -299,59 +300,76 @@ var a = "coolandlovely", o = async (e, t, n) => {
299
300
  }`, { id: t }, r)).cooLook,
300
301
  enabled: !!t
301
302
  });
302
- }, M = () => {
303
+ }, N = () => {
303
304
  let n = r(), { apiGatewayUrl: i } = e();
304
305
  return t({
305
- mutationFn: async (e) => (await o(`mutation CooCreateLook($input: CooCreateLookInput!) {
306
- cooCreateLook(input: $input) { ${u} }
306
+ mutationFn: async (e) => (await s(`mutation CooCreateLook($input: CooCreateLookInput!) {
307
+ cooCreateLook(input: $input) { ${d} }
307
308
  }`, { input: e }, i)).cooCreateLook,
308
309
  onSuccess: () => {
309
- n.invalidateQueries({ queryKey: [a, "looks"] });
310
+ n.invalidateQueries({ queryKey: [o, "looks"] });
310
311
  }
311
312
  });
312
- }, N = () => {
313
+ }, P = () => {
313
314
  let n = r(), { apiGatewayUrl: i } = e();
314
315
  return t({
315
- mutationFn: async (e) => (await o(`mutation CooPublishLook($id: ID!) { cooPublishLook(id: $id) { ${u} } }`, { id: e }, i)).cooPublishLook,
316
+ mutationFn: async ({ id: e, input: t }) => (await s(`mutation CooUpdateLook($id: ID!, $input: CooUpdateLookInput!) {
317
+ cooUpdateLook(id: $id, input: $input) { ${d} }
318
+ }`, {
319
+ id: e,
320
+ input: t
321
+ }, i)).cooUpdateLook,
316
322
  onSuccess: (e) => {
317
- n.invalidateQueries({ queryKey: [a, "looks"] }), n.invalidateQueries({ queryKey: [
318
- a,
323
+ n.invalidateQueries({ queryKey: [o, "looks"] }), n.invalidateQueries({ queryKey: [
324
+ o,
319
325
  "look",
320
326
  e.id
321
327
  ] });
322
328
  }
323
329
  });
324
- }, P = () => {
330
+ }, F = () => {
325
331
  let n = r(), { apiGatewayUrl: i } = e();
326
332
  return t({
327
- mutationFn: async (e) => (await o(`mutation CooLikeLook($id: ID!) { cooLikeLook(id: $id) { ${u} } }`, { id: e }, i)).cooLikeLook,
333
+ mutationFn: async (e) => (await s(`mutation CooPublishLook($id: ID!) { cooPublishLook(id: $id) { ${d} } }`, { id: e }, i)).cooPublishLook,
328
334
  onSuccess: (e) => {
329
- n.invalidateQueries({ queryKey: [a, "looks"] }), n.invalidateQueries({ queryKey: [
330
- a,
335
+ n.invalidateQueries({ queryKey: [o, "looks"] }), n.invalidateQueries({ queryKey: [
336
+ o,
331
337
  "look",
332
338
  e.id
333
339
  ] });
334
340
  }
335
341
  });
336
- }, F = () => {
342
+ }, ee = () => {
343
+ let n = r(), { apiGatewayUrl: i } = e();
344
+ return t({
345
+ mutationFn: async (e) => (await s(`mutation CooLikeLook($id: ID!) { cooLikeLook(id: $id) { ${d} } }`, { id: e }, i)).cooLikeLook,
346
+ onSuccess: (e) => {
347
+ n.invalidateQueries({ queryKey: [o, "looks"] }), n.invalidateQueries({ queryKey: [
348
+ o,
349
+ "look",
350
+ e.id
351
+ ] });
352
+ }
353
+ });
354
+ }, I = () => {
337
355
  let n = r(), { apiGatewayUrl: i } = e();
338
356
  return t({
339
- mutationFn: async (e) => (await o("mutation CooDeleteLook($id: ID!) { cooDeleteLook(id: $id) }", { id: e }, i)).cooDeleteLook,
357
+ mutationFn: async (e) => (await s("mutation CooDeleteLook($id: ID!) { cooDeleteLook(id: $id) }", { id: e }, i)).cooDeleteLook,
340
358
  onSuccess: () => {
341
- n.invalidateQueries({ queryKey: [a, "looks"] });
359
+ n.invalidateQueries({ queryKey: [o, "looks"] });
342
360
  }
343
361
  });
344
- }, I = (t = {}) => {
362
+ }, L = (t = {}) => {
345
363
  let { apiGatewayUrl: r } = e();
346
364
  return n({
347
365
  queryKey: [
348
- a,
366
+ o,
349
367
  "collaborations",
350
368
  t
351
369
  ],
352
- queryFn: async () => (await o(`query CooListCollaborations($brandId: ID, $creatorId: ID, $status: CooCollaborationStatus) {
370
+ queryFn: async () => (await s(`query CooListCollaborations($brandId: ID, $creatorId: ID, $status: CooCollaborationStatus) {
353
371
  cooListCollaborations(brandId: $brandId, creatorId: $creatorId, status: $status) {
354
- ${d}
372
+ ${f}
355
373
  brand { id name handle }
356
374
  }
357
375
  }`, {
@@ -360,150 +378,203 @@ var a = "coolandlovely", o = async (e, t, n) => {
360
378
  status: t.status
361
379
  }, r)).cooListCollaborations
362
380
  });
363
- }, L = (t) => {
381
+ }, R = (t) => {
364
382
  let { apiGatewayUrl: r } = e();
365
383
  return n({
366
384
  queryKey: [
367
- a,
385
+ o,
368
386
  "collaboration",
369
387
  t
370
388
  ],
371
- queryFn: async () => (await o(`query CooCollaboration($id: ID!) {
389
+ queryFn: async () => (await s(`query CooCollaboration($id: ID!) {
372
390
  cooCollaboration(id: $id) {
373
- ${d}
391
+ ${f}
374
392
  brand { id name handle }
375
- looks { ${u} }
393
+ looks { ${d} }
376
394
  }
377
395
  }`, { id: t }, r)).cooCollaboration,
378
396
  enabled: !!t
379
397
  });
380
- }, R = () => {
398
+ }, z = () => {
381
399
  let n = r(), { apiGatewayUrl: i } = e();
382
400
  return t({
383
- mutationFn: async (e) => (await o(`mutation CooCreateCollaboration($input: CooCreateCollaborationInput!) {
384
- cooCreateCollaboration(input: $input) { ${d} }
401
+ mutationFn: async (e) => (await s(`mutation CooCreateCollaboration($input: CooCreateCollaborationInput!) {
402
+ cooCreateCollaboration(input: $input) { ${f} }
385
403
  }`, { input: e }, i)).cooCreateCollaboration,
386
404
  onSuccess: () => {
387
- n.invalidateQueries({ queryKey: [a, "collaborations"] });
405
+ n.invalidateQueries({ queryKey: [o, "collaborations"] });
388
406
  }
389
407
  });
390
- }, z = () => {
408
+ }, B = () => {
391
409
  let n = r(), { apiGatewayUrl: i } = e();
392
410
  return t({
393
- mutationFn: async ({ id: e, status: t }) => (await o(`mutation CooTransitionCollaboration($id: ID!, $status: CooCollaborationStatus!) {
394
- cooTransitionCollaboration(id: $id, status: $status) { ${d} }
411
+ mutationFn: async ({ id: e, status: t }) => (await s(`mutation CooTransitionCollaboration($id: ID!, $status: CooCollaborationStatus!) {
412
+ cooTransitionCollaboration(id: $id, status: $status) { ${f} }
395
413
  }`, {
396
414
  id: e,
397
415
  status: t
398
416
  }, i)).cooTransitionCollaboration,
399
417
  onSuccess: (e) => {
400
- n.invalidateQueries({ queryKey: [a, "collaborations"] }), n.invalidateQueries({ queryKey: [
401
- a,
418
+ n.invalidateQueries({ queryKey: [o, "collaborations"] }), n.invalidateQueries({ queryKey: [
419
+ o,
402
420
  "collaboration",
403
421
  e.id
404
422
  ] });
405
423
  }
406
424
  });
407
- }, B = (t = {}) => {
425
+ }, V = (t = {}) => {
408
426
  let { apiGatewayUrl: r } = e();
409
427
  return n({
410
428
  queryKey: [
411
- a,
429
+ o,
412
430
  "wardrobe",
413
431
  t
414
432
  ],
415
- queryFn: async () => (await o(`query CooListWardrobeItems($category: CooStyleCategory, $source: CooWardrobeSource) {
416
- cooListWardrobeItems(category: $category, source: $source) { ${f} }
433
+ queryFn: async () => (await s(`query CooListWardrobeItems($category: CooStyleCategory, $source: CooWardrobeSource) {
434
+ cooListWardrobeItems(category: $category, source: $source) { ${p} }
417
435
  }`, {
418
436
  category: t.category,
419
437
  source: t.source
420
438
  }, r)).cooListWardrobeItems
421
439
  });
422
- }, V = () => {
440
+ }, H = () => {
423
441
  let n = r(), { apiGatewayUrl: i } = e();
424
442
  return t({
425
- mutationFn: async (e) => (await o(`mutation CooCreateWardrobeItem($input: CooCreateWardrobeItemInput!) {
426
- cooCreateWardrobeItem(input: $input) { ${f} }
443
+ mutationFn: async (e) => (await s(`mutation CooCreateWardrobeItem($input: CooCreateWardrobeItemInput!) {
444
+ cooCreateWardrobeItem(input: $input) { ${p} }
427
445
  }`, { input: e }, i)).cooCreateWardrobeItem,
428
446
  onSuccess: () => {
429
- n.invalidateQueries({ queryKey: [a, "wardrobe"] });
447
+ n.invalidateQueries({ queryKey: [o, "wardrobe"] });
430
448
  }
431
449
  });
432
- }, H = () => {
450
+ }, U = () => {
433
451
  let n = r(), { apiGatewayUrl: i } = e();
434
452
  return t({
435
- mutationFn: async (e) => (await o(`mutation CooLogWardrobeWear($id: ID!) {
436
- cooLogWardrobeWear(id: $id) { ${f} }
453
+ mutationFn: async (e) => (await s(`mutation CooLogWardrobeWear($id: ID!) {
454
+ cooLogWardrobeWear(id: $id) { ${p} }
437
455
  }`, { id: e }, i)).cooLogWardrobeWear,
438
456
  onSuccess: () => {
439
- n.invalidateQueries({ queryKey: [a, "wardrobe"] });
457
+ n.invalidateQueries({ queryKey: [o, "wardrobe"] });
440
458
  }
441
459
  });
442
- }, U = () => {
460
+ }, W = () => {
443
461
  let n = r(), { apiGatewayUrl: i } = e();
444
462
  return t({
445
- mutationFn: async (e) => (await o("mutation CooRemoveWardrobeItem($id: ID!) { cooRemoveWardrobeItem(id: $id) }", { id: e }, i)).cooRemoveWardrobeItem,
463
+ mutationFn: async (e) => (await s("mutation CooRemoveWardrobeItem($id: ID!) { cooRemoveWardrobeItem(id: $id) }", { id: e }, i)).cooRemoveWardrobeItem,
446
464
  onSuccess: () => {
447
- n.invalidateQueries({ queryKey: [a, "wardrobe"] });
465
+ n.invalidateQueries({ queryKey: [o, "wardrobe"] });
448
466
  }
449
467
  });
450
- }, W = () => {
468
+ }, G = () => {
451
469
  let { apiGatewayUrl: t } = e();
452
470
  return n({
453
- queryKey: [a, "my-style-profile"],
454
- queryFn: async () => (await o(`query CooMyStyleProfile { cooMyStyleProfile { ${p} } }`, {}, t)).cooMyStyleProfile
471
+ queryKey: [o, "my-style-profile"],
472
+ queryFn: async () => (await s(`query CooMyStyleProfile { cooMyStyleProfile { ${m} } }`, {}, t)).cooMyStyleProfile
455
473
  });
456
- }, G = () => {
474
+ }, K = () => {
457
475
  let n = r(), { apiGatewayUrl: i } = e();
458
476
  return t({
459
- mutationFn: async (e) => (await o(`mutation CooUpsertStyleProfile($input: CooUpsertStyleProfileInput!) {
460
- cooUpsertStyleProfile(input: $input) { ${p} }
477
+ mutationFn: async (e) => (await s(`mutation CooUpsertStyleProfile($input: CooUpsertStyleProfileInput!) {
478
+ cooUpsertStyleProfile(input: $input) { ${m} }
461
479
  }`, { input: e }, i)).cooUpsertStyleProfile,
462
480
  onSuccess: () => {
463
- n.invalidateQueries({ queryKey: [a, "my-style-profile"] });
481
+ n.invalidateQueries({ queryKey: [o, "my-style-profile"] });
464
482
  }
465
483
  });
466
- }, K = (t) => {
484
+ }, q = (t) => {
467
485
  let { apiGatewayUrl: r } = e();
468
486
  return n({
469
487
  queryKey: [
470
- a,
488
+ o,
471
489
  "lookbooks",
472
490
  t
473
491
  ],
474
- queryFn: async () => (await o(`query CooListLookbooks($ownerId: ID) {
475
- cooListLookbooks(ownerId: $ownerId) { ${m} }
492
+ queryFn: async () => (await s(`query CooListLookbooks($ownerId: ID) {
493
+ cooListLookbooks(ownerId: $ownerId) { ${h} }
476
494
  }`, { ownerId: t }, r)).cooListLookbooks
477
495
  });
478
- }, q = () => {
496
+ }, J = () => {
479
497
  let n = r(), { apiGatewayUrl: i } = e();
480
498
  return t({
481
- mutationFn: async (e) => (await o(`mutation CooCreateLookbook($input: CooCreateLookbookInput!) {
482
- cooCreateLookbook(input: $input) { ${m} }
499
+ mutationFn: async (e) => (await s(`mutation CooCreateLookbook($input: CooCreateLookbookInput!) {
500
+ cooCreateLookbook(input: $input) { ${h} }
483
501
  }`, { input: e }, i)).cooCreateLookbook,
484
502
  onSuccess: () => {
485
- n.invalidateQueries({ queryKey: [a, "lookbooks"] });
503
+ n.invalidateQueries({ queryKey: [o, "lookbooks"] });
486
504
  }
487
505
  });
488
- }, J = () => {
506
+ }, Y = () => {
489
507
  let n = r(), { apiGatewayUrl: i } = e();
490
508
  return t({
491
- mutationFn: async (e) => (await o("mutation CooRemoveLookbookEntry($id: ID!) { cooRemoveLookbookEntry(id: $id) }", { id: e }, i)).cooRemoveLookbookEntry,
509
+ 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,
510
+ onSuccess: (e) => {
511
+ n.invalidateQueries({ queryKey: [o, "lookbook"] }), n.invalidateQueries({ queryKey: [
512
+ o,
513
+ "lookbook",
514
+ e.lookbookId
515
+ ] });
516
+ }
517
+ });
518
+ }, X = () => {
519
+ let n = r(), { apiGatewayUrl: i } = e();
520
+ return t({
521
+ mutationFn: async (e) => (await s("mutation CooRemoveLookbookEntry($id: ID!) { cooRemoveLookbookEntry(id: $id) }", { id: e }, i)).cooRemoveLookbookEntry,
492
522
  onSuccess: () => {
493
- n.invalidateQueries({ queryKey: [a, "lookbook"] });
523
+ n.invalidateQueries({ queryKey: [o, "lookbook"] });
494
524
  }
495
525
  });
496
- }, Y = (t) => {
526
+ }, Z = "\n id workspaceId ownerId displayName bio visibility\n stylePreferences palette favouriteBrands\n isFollowedByMe followerCount followingCount\n", Q = (t) => {
527
+ let { apiGatewayUrl: r } = e();
528
+ return n({
529
+ queryKey: [
530
+ o,
531
+ "is-following",
532
+ t
533
+ ],
534
+ enabled: !!t,
535
+ queryFn: async () => (await s("query CooIsFollowing($followeeId: ID!) { cooIsFollowing(followeeId: $followeeId) }", { followeeId: t }, r)).cooIsFollowing
536
+ });
537
+ }, $ = () => {
538
+ let n = r(), { apiGatewayUrl: i } = e();
539
+ return t({
540
+ mutationFn: async (e) => (await s("mutation CooFollow($followeeId: ID!) { cooFollow(followeeId: $followeeId) }", { followeeId: e }, i)).cooFollow,
541
+ onSuccess: (e, t) => {
542
+ n.invalidateQueries({ queryKey: [
543
+ o,
544
+ "is-following",
545
+ t
546
+ ] }), n.invalidateQueries({ queryKey: [o, "my-following"] }), n.invalidateQueries({ queryKey: [o, "my-followers"] }), n.invalidateQueries({ queryKey: [o, "my-style-profile"] });
547
+ }
548
+ });
549
+ }, te = () => {
550
+ let n = r(), { apiGatewayUrl: i } = e();
551
+ return t({
552
+ mutationFn: async (e) => (await s("mutation CooUnfollow($followeeId: ID!) { cooUnfollow(followeeId: $followeeId) }", { followeeId: e }, i)).cooUnfollow,
553
+ onSuccess: (e, t) => {
554
+ n.invalidateQueries({ queryKey: [
555
+ o,
556
+ "is-following",
557
+ t
558
+ ] }), n.invalidateQueries({ queryKey: [o, "my-following"] }), n.invalidateQueries({ queryKey: [o, "my-followers"] }), n.invalidateQueries({ queryKey: [o, "my-style-profile"] });
559
+ }
560
+ });
561
+ }, ne = () => {
562
+ let { apiGatewayUrl: t } = e();
563
+ return n({
564
+ queryKey: [o, "my-following"],
565
+ queryFn: async () => (await s(`query CooMyFollowing { cooMyFollowing { ${Z} } }`, {}, t)).cooMyFollowing
566
+ });
567
+ }, re = (t) => {
497
568
  let { apiGatewayUrl: r } = e();
498
569
  return n({
499
570
  queryKey: [
500
- a,
571
+ o,
501
572
  "lookbook",
502
573
  t
503
574
  ],
504
- queryFn: async () => (await o(`query CooLookbook($id: ID!) {
575
+ queryFn: async () => (await s(`query CooLookbook($id: ID!) {
505
576
  cooLookbook(id: $id) {
506
- ${m}
577
+ ${h}
507
578
  entries { id lookbookId lookId styleItemId note position createdAt updatedAt }
508
579
  }
509
580
  }`, { id: t }, r)).cooLookbook,
@@ -511,6 +582,6 @@ var a = "coolandlovely", o = async (e, t, n) => {
511
582
  });
512
583
  };
513
584
  //#endregion
514
- export { k as useArchiveStyleItem, g as useBrand, h as useBrands, L as useCollaboration, I as useCollaborations, x as useCollection, b as useCollections, _ as useCreateBrand, R as useCreateCollaboration, S as useCreateCollection, M as useCreateLook, q as useCreateLookbook, D as useCreateStyleItem, V as useCreateWardrobeItem, F as useDeleteLook, P as useLikeLook, H as useLogWardrobeWear, j as useLook, Y as useLookbook, K as useLookbooks, A as useLooks, W as useMyStyleProfile, w as usePublishCollection, N as usePublishLook, J as useRemoveLookbookEntry, U as useRemoveWardrobeItem, E as useStyleItem, T as useStyleItems, y as useTransitionBrand, z as useTransitionCollaboration, v as useUpdateBrand, C as useUpdateCollection, O as useUpdateStyleItem, G as useUpsertStyleProfile, B as useWardrobeItems };
585
+ export { Y as useAddLookbookEntry, A as useArchiveStyleItem, _ as useBrand, g as useBrands, R as useCollaboration, L as useCollaborations, S as useCollection, x as useCollections, v as useCreateBrand, z as useCreateCollaboration, C as useCreateCollection, N as useCreateLook, J as useCreateLookbook, O as useCreateStyleItem, H as useCreateWardrobeItem, I as useDeleteLook, $ as useFollow, Q as useIsFollowing, ee as useLikeLook, U as useLogWardrobeWear, M as useLook, re as useLookbook, q as useLookbooks, j as useLooks, ne as useMyFollowing, G as useMyStyleProfile, T as usePublishCollection, F as usePublishLook, X as useRemoveLookbookEntry, W as useRemoveWardrobeItem, D as useStyleItem, E as useStyleItems, b as useTransitionBrand, B as useTransitionCollaboration, te as useUnfollow, y as useUpdateBrand, w as useUpdateCollection, P as useUpdateLook, k as useUpdateStyleItem, K as useUpsertStyleProfile, V as useWardrobeItems };
515
586
 
516
587
  //# sourceMappingURL=useCoolAndLovelyApi.js.map