@burdenoff/microfe-coolandlovely 2026.625.2 → 2026.628.1

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 (165) hide show
  1. package/dist/coolandlovely/CoolAndLovelyRoot.js +66 -122
  2. package/dist/coolandlovely/CoolAndLovelyRoot.js.map +1 -1
  3. package/dist/coolandlovely/CoolAndLovelyRoutes.js +87 -175
  4. package/dist/coolandlovely/CoolAndLovelyRoutes.js.map +1 -1
  5. package/dist/coolandlovely/components/Field.js +81 -0
  6. package/dist/coolandlovely/components/Field.js.map +1 -0
  7. package/dist/coolandlovely/components/StateViews.js +34 -0
  8. package/dist/coolandlovely/components/StateViews.js.map +1 -0
  9. package/dist/coolandlovely/components/StatusBadge.js +25 -22
  10. package/dist/coolandlovely/components/StatusBadge.js.map +1 -1
  11. package/dist/coolandlovely/components/TagList.js +21 -0
  12. package/dist/coolandlovely/components/TagList.js.map +1 -0
  13. package/dist/coolandlovely/components/Thumbnail.js +29 -0
  14. package/dist/coolandlovely/components/Thumbnail.js.map +1 -0
  15. package/dist/coolandlovely/context/CoolAndLovelyContext.js +10 -10
  16. package/dist/coolandlovely/context/CoolAndLovelyContext.js.map +1 -1
  17. package/dist/coolandlovely/hooks/index.js +1 -0
  18. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js +462 -169
  19. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js.map +1 -1
  20. package/dist/coolandlovely/pages/HomePage.js +251 -845
  21. package/dist/coolandlovely/pages/HomePage.js.map +1 -1
  22. package/dist/coolandlovely/pages/brands/BrandDetailPage.js +319 -0
  23. package/dist/coolandlovely/pages/brands/BrandDetailPage.js.map +1 -0
  24. package/dist/coolandlovely/pages/brands/BrandFormPage.js +190 -0
  25. package/dist/coolandlovely/pages/brands/BrandFormPage.js.map +1 -0
  26. package/dist/coolandlovely/pages/brands/BrandsListPage.js +158 -0
  27. package/dist/coolandlovely/pages/brands/BrandsListPage.js.map +1 -0
  28. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js +253 -0
  29. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js.map +1 -0
  30. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js +206 -0
  31. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js.map +1 -0
  32. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js +129 -0
  33. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js.map +1 -0
  34. package/dist/coolandlovely/pages/collections/CollectionDetailPage.js +217 -0
  35. package/dist/coolandlovely/pages/collections/CollectionDetailPage.js.map +1 -0
  36. package/dist/coolandlovely/pages/collections/CollectionFormPage.js +217 -0
  37. package/dist/coolandlovely/pages/collections/CollectionFormPage.js.map +1 -0
  38. package/dist/coolandlovely/pages/collections/CollectionsListPage.js +122 -0
  39. package/dist/coolandlovely/pages/collections/CollectionsListPage.js.map +1 -0
  40. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js +230 -0
  41. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js.map +1 -0
  42. package/dist/coolandlovely/pages/items/StyleItemFormPage.js +276 -0
  43. package/dist/coolandlovely/pages/items/StyleItemFormPage.js.map +1 -0
  44. package/dist/coolandlovely/pages/items/StyleItemsListPage.js +170 -0
  45. package/dist/coolandlovely/pages/items/StyleItemsListPage.js.map +1 -0
  46. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js +124 -0
  47. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js.map +1 -0
  48. package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js +156 -0
  49. package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js.map +1 -0
  50. package/dist/coolandlovely/pages/looks/LookDetailPage.js +238 -0
  51. package/dist/coolandlovely/pages/looks/LookDetailPage.js.map +1 -0
  52. package/dist/coolandlovely/pages/looks/LookFormPage.js +209 -0
  53. package/dist/coolandlovely/pages/looks/LookFormPage.js.map +1 -0
  54. package/dist/coolandlovely/pages/looks/LooksListPage.js +181 -0
  55. package/dist/coolandlovely/pages/looks/LooksListPage.js.map +1 -0
  56. package/dist/coolandlovely/pages/profile/StyleProfilePage.js +224 -0
  57. package/dist/coolandlovely/pages/profile/StyleProfilePage.js.map +1 -0
  58. package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js +173 -0
  59. package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js.map +1 -0
  60. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js +172 -0
  61. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js.map +1 -0
  62. package/dist/coolandlovely/store/coolandlovelyStore.js +2 -6
  63. package/dist/coolandlovely/store/coolandlovelyStore.js.map +1 -1
  64. package/dist/coolandlovely/utils/formatters.js +31 -23
  65. package/dist/coolandlovely/utils/formatters.js.map +1 -1
  66. package/dist/coolandlovely/utils/icons.js +34 -0
  67. package/dist/coolandlovely/utils/icons.js.map +1 -0
  68. package/dist/index.js +4 -4
  69. package/package.json +1 -1
  70. package/dist/coolandlovely/components/InvestmentCard.js +0 -98
  71. package/dist/coolandlovely/components/InvestmentCard.js.map +0 -1
  72. package/dist/coolandlovely/components/RatingDisplay.js +0 -35
  73. package/dist/coolandlovely/components/RatingDisplay.js.map +0 -1
  74. package/dist/coolandlovely/mocks/data.js +0 -1517
  75. package/dist/coolandlovely/mocks/data.js.map +0 -1
  76. package/dist/coolandlovely/mocks/users.js +0 -34
  77. package/dist/coolandlovely/mocks/users.js.map +0 -1
  78. package/dist/coolandlovely/pages/admin/AdminAnalyticsPage.js +0 -651
  79. package/dist/coolandlovely/pages/admin/AdminAnalyticsPage.js.map +0 -1
  80. package/dist/coolandlovely/pages/admin/AdminDashboard.js +0 -673
  81. package/dist/coolandlovely/pages/admin/AdminDashboard.js.map +0 -1
  82. package/dist/coolandlovely/pages/admin/AdminFinancialPage.js +0 -427
  83. package/dist/coolandlovely/pages/admin/AdminFinancialPage.js.map +0 -1
  84. package/dist/coolandlovely/pages/admin/AdminOrdersPage.js +0 -665
  85. package/dist/coolandlovely/pages/admin/AdminOrdersPage.js.map +0 -1
  86. package/dist/coolandlovely/pages/admin/AdminProfilePage.js +0 -264
  87. package/dist/coolandlovely/pages/admin/AdminProfilePage.js.map +0 -1
  88. package/dist/coolandlovely/pages/admin/AdminSettingsPage.js +0 -654
  89. package/dist/coolandlovely/pages/admin/AdminSettingsPage.js.map +0 -1
  90. package/dist/coolandlovely/pages/admin/CartManagementPage.js +0 -874
  91. package/dist/coolandlovely/pages/admin/CartManagementPage.js.map +0 -1
  92. package/dist/coolandlovely/pages/admin/UserManagementPage.js +0 -898
  93. package/dist/coolandlovely/pages/admin/UserManagementPage.js.map +0 -1
  94. package/dist/coolandlovely/pages/cart-owner/AnalyticsDashboard.js +0 -842
  95. package/dist/coolandlovely/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  96. package/dist/coolandlovely/pages/cart-owner/BusinessSettingsPage.js +0 -705
  97. package/dist/coolandlovely/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  98. package/dist/coolandlovely/pages/cart-owner/CartOwnerDashboard.js +0 -802
  99. package/dist/coolandlovely/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  100. package/dist/coolandlovely/pages/cart-owner/CartOwnerProfilePage.js +0 -891
  101. package/dist/coolandlovely/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  102. package/dist/coolandlovely/pages/cart-owner/CartServiceConfigPage.js +0 -639
  103. package/dist/coolandlovely/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  104. package/dist/coolandlovely/pages/cart-owner/InventoryManagementPage.js +0 -914
  105. package/dist/coolandlovely/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  106. package/dist/coolandlovely/pages/cart-owner/OrderManagementPage.js +0 -882
  107. package/dist/coolandlovely/pages/cart-owner/OrderManagementPage.js.map +0 -1
  108. package/dist/coolandlovely/pages/cart-owner/StaffManagementPage.js +0 -831
  109. package/dist/coolandlovely/pages/cart-owner/StaffManagementPage.js.map +0 -1
  110. package/dist/coolandlovely/pages/common/HelpSupportPage.js +0 -1325
  111. package/dist/coolandlovely/pages/common/HelpSupportPage.js.map +0 -1
  112. package/dist/coolandlovely/pages/common/NotificationCenterPage.js +0 -671
  113. package/dist/coolandlovely/pages/common/NotificationCenterPage.js.map +0 -1
  114. package/dist/coolandlovely/pages/common/SettingsPage.js +0 -973
  115. package/dist/coolandlovely/pages/common/SettingsPage.js.map +0 -1
  116. package/dist/coolandlovely/pages/customer/BookingDetailsPage.js +0 -630
  117. package/dist/coolandlovely/pages/customer/BookingDetailsPage.js.map +0 -1
  118. package/dist/coolandlovely/pages/customer/CartDetailPage.js +0 -623
  119. package/dist/coolandlovely/pages/customer/CartDetailPage.js.map +0 -1
  120. package/dist/coolandlovely/pages/customer/CartDiscoveryPage.js +0 -558
  121. package/dist/coolandlovely/pages/customer/CartDiscoveryPage.js.map +0 -1
  122. package/dist/coolandlovely/pages/customer/CheckoutPage.js +0 -529
  123. package/dist/coolandlovely/pages/customer/CheckoutPage.js.map +0 -1
  124. package/dist/coolandlovely/pages/customer/CustomerDashboard.js +0 -538
  125. package/dist/coolandlovely/pages/customer/CustomerDashboard.js.map +0 -1
  126. package/dist/coolandlovely/pages/customer/CustomerProfilePage.js +0 -658
  127. package/dist/coolandlovely/pages/customer/CustomerProfilePage.js.map +0 -1
  128. package/dist/coolandlovely/pages/customer/DirectServiceBookingPage.js +0 -632
  129. package/dist/coolandlovely/pages/customer/DirectServiceBookingPage.js.map +0 -1
  130. package/dist/coolandlovely/pages/customer/FavoritesPage.js +0 -487
  131. package/dist/coolandlovely/pages/customer/FavoritesPage.js.map +0 -1
  132. package/dist/coolandlovely/pages/customer/OrderHistoryPage.js +0 -447
  133. package/dist/coolandlovely/pages/customer/OrderHistoryPage.js.map +0 -1
  134. package/dist/coolandlovely/pages/customer/OrderTrackingPage.js +0 -425
  135. package/dist/coolandlovely/pages/customer/OrderTrackingPage.js.map +0 -1
  136. package/dist/coolandlovely/pages/customer/PaymentMethodsPage.js +0 -494
  137. package/dist/coolandlovely/pages/customer/PaymentMethodsPage.js.map +0 -1
  138. package/dist/coolandlovely/pages/customer/ReviewsPage.js +0 -616
  139. package/dist/coolandlovely/pages/customer/ReviewsPage.js.map +0 -1
  140. package/dist/coolandlovely/pages/customer/SavedAddressesPage.js +0 -449
  141. package/dist/coolandlovely/pages/customer/SavedAddressesPage.js.map +0 -1
  142. package/dist/coolandlovely/pages/investor/InvestmentDetailsPage.js +0 -887
  143. package/dist/coolandlovely/pages/investor/InvestmentDetailsPage.js.map +0 -1
  144. package/dist/coolandlovely/pages/investor/InvestmentOpportunitiesPage.js +0 -945
  145. package/dist/coolandlovely/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  146. package/dist/coolandlovely/pages/investor/InvestorAnalyticsPage.js +0 -687
  147. package/dist/coolandlovely/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  148. package/dist/coolandlovely/pages/investor/InvestorDashboard.js +0 -455
  149. package/dist/coolandlovely/pages/investor/InvestorDashboard.js.map +0 -1
  150. package/dist/coolandlovely/pages/investor/InvestorInvestmentsPage.js +0 -405
  151. package/dist/coolandlovely/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  152. package/dist/coolandlovely/pages/investor/InvestorPortfolioPage.js +0 -602
  153. package/dist/coolandlovely/pages/investor/InvestorPortfolioPage.js.map +0 -1
  154. package/dist/coolandlovely/pages/investor/InvestorProfilePage.js +0 -1070
  155. package/dist/coolandlovely/pages/investor/InvestorProfilePage.js.map +0 -1
  156. package/dist/coolandlovely/pages/worker/TaskDetailsPage.js +0 -533
  157. package/dist/coolandlovely/pages/worker/TaskDetailsPage.js.map +0 -1
  158. package/dist/coolandlovely/pages/worker/WorkerDashboard.js +0 -671
  159. package/dist/coolandlovely/pages/worker/WorkerDashboard.js.map +0 -1
  160. package/dist/coolandlovely/pages/worker/WorkerOrdersPage.js +0 -680
  161. package/dist/coolandlovely/pages/worker/WorkerOrdersPage.js.map +0 -1
  162. package/dist/coolandlovely/pages/worker/WorkerProfilePage.js +0 -692
  163. package/dist/coolandlovely/pages/worker/WorkerProfilePage.js.map +0 -1
  164. package/dist/coolandlovely/pages/worker/WorkerSchedulePage.js +0 -583
  165. package/dist/coolandlovely/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,11 +1,10 @@
1
1
  import { useCoolAndLovely as e } from "../context/CoolAndLovelyContext.js";
2
2
  import "../context/index.js";
3
- import { useMemo as t } from "react";
4
- import { useMutation as n, useQuery as r, useQueryClient as i } from "@tanstack/react-query";
5
- import { graphqlFetch as a } from "@burdenoff/fe-libs/shared/graphql";
3
+ import { useMutation as t, useQuery as n, useQueryClient as r } from "@tanstack/react-query";
4
+ import { graphqlFetch as i } from "@burdenoff/fe-libs/shared/graphql";
6
5
  //#region src/coolandlovely/hooks/useCoolAndLovelyApi.ts
7
- var o = async (e, t, n) => {
8
- let r = await a({
6
+ var a = "coolandlovely", o = async (e, t, n) => {
7
+ let r = await i({
9
8
  gateway: "workspace",
10
9
  baseUrl: n,
11
10
  query: e,
@@ -15,209 +14,503 @@ var o = async (e, t, n) => {
15
14
  if (r.errors?.length) throw Error(r.errors[0]?.message ?? "GraphQL request failed");
16
15
  if (!r.data) throw Error("GraphQL response did not include data");
17
16
  return r.data;
18
- }, s = (t) => {
19
- let { apiGatewayUrl: n } = e();
20
- return r({
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 = {}) => {
18
+ let { apiGatewayUrl: r } = e();
19
+ return n({
21
20
  queryKey: [
22
- "coolandlovely",
23
- "providers",
21
+ a,
22
+ "brands",
24
23
  t
25
24
  ],
26
- queryFn: async () => (await o("query Providers($filter: CoolAndLovelyProviderFilterInput) {\n listServiceProviders(filter: $filter, limit: 200) {\n id name slug category status rating totalRatings averageOrderValue serviceTypes location businessHours createdAt\n }\n }", { filter: t ? { query: t } : void 0 }, n)).listServiceProviders.map((e) => ({
27
- ...e,
28
- image: "https://images.unsplash.com/photo-1567620905732-2d1ec7ab7445?w=400",
29
- images: ["https://images.unsplash.com/photo-1567620905732-2d1ec7ab7445?w=400"],
30
- isOpen: e.status === "ACTIVE" || e.status === "VERIFIED",
31
- isVerified: e.status === "VERIFIED",
32
- distance: .5,
33
- estimatedTime: 20,
34
- createdAt: e.createdAt
35
- }))
36
- });
37
- }, c = (t) => {
38
- let { apiGatewayUrl: n } = e();
39
- return r({
25
+ queryFn: async () => (await o(`query CooListBrands($status: CooBrandStatus, $featured: Boolean, $pagination: PaginationInput) {
26
+ cooListBrands(status: $status, featured: $featured, pagination: $pagination) {
27
+ items { ${s} }
28
+ pageInfo { cursor hasMore }
29
+ }
30
+ }`, {
31
+ status: t.status,
32
+ featured: t.featured,
33
+ pagination: t.pagination ?? {
34
+ limit: 50,
35
+ offset: 0
36
+ }
37
+ }, r)).cooListBrands
38
+ });
39
+ }, g = (t) => {
40
+ let { apiGatewayUrl: r } = e();
41
+ return n({
40
42
  queryKey: [
41
- "coolandlovely",
42
- "offerings",
43
+ a,
44
+ "brand",
43
45
  t
44
46
  ],
45
- queryFn: async () => (await o("query Offerings($providerId: String) {\n listOfferings(providerId: $providerId, limit: 300) {\n id providerId kind name slug category description price originalPrice stock durationMinutes serviceType tags isAvailable metadata media\n }\n }", { providerId: t }, n)).listOfferings,
47
+ queryFn: async () => (await o(`query CooBrand($id: ID!) {
48
+ cooBrand(id: $id) {
49
+ ${s}
50
+ collections { ${c} }
51
+ items { ${l} }
52
+ }
53
+ }`, { id: t }, r)).cooBrand,
46
54
  enabled: !!t
47
55
  });
48
- }, l = (t = {}) => {
49
- let { apiGatewayUrl: n } = e();
50
- return r({
56
+ }, _ = () => {
57
+ let n = r(), { apiGatewayUrl: i } = e();
58
+ return t({
59
+ mutationFn: async (e) => (await o(`mutation CooCreateBrand($input: CooCreateBrandInput!) {
60
+ cooCreateBrand(input: $input) { ${s} }
61
+ }`, { input: e }, i)).cooCreateBrand,
62
+ onSuccess: () => {
63
+ n.invalidateQueries({ queryKey: [a, "brands"] });
64
+ }
65
+ });
66
+ }, v = () => {
67
+ let n = r(), { apiGatewayUrl: i } = e();
68
+ return t({
69
+ mutationFn: async ({ id: e, input: t }) => (await o(`mutation CooUpdateBrand($id: ID!, $input: CooUpdateBrandInput!) {
70
+ cooUpdateBrand(id: $id, input: $input) { ${s} }
71
+ }`, {
72
+ id: e,
73
+ input: t
74
+ }, i)).cooUpdateBrand,
75
+ onSuccess: (e) => {
76
+ n.invalidateQueries({ queryKey: [a, "brands"] }), n.invalidateQueries({ queryKey: [
77
+ a,
78
+ "brand",
79
+ e.id
80
+ ] });
81
+ }
82
+ });
83
+ }, y = () => {
84
+ let n = r(), { apiGatewayUrl: i } = e();
85
+ return t({
86
+ mutationFn: async ({ id: e, status: t }) => (await o(`mutation CooTransitionBrand($id: ID!, $status: CooBrandStatus!) {
87
+ cooTransitionBrand(id: $id, status: $status) { ${s} }
88
+ }`, {
89
+ id: e,
90
+ status: t
91
+ }, i)).cooTransitionBrand,
92
+ onSuccess: (e) => {
93
+ n.invalidateQueries({ queryKey: [a, "brands"] }), n.invalidateQueries({ queryKey: [
94
+ a,
95
+ "brand",
96
+ e.id
97
+ ] });
98
+ }
99
+ });
100
+ }, b = (t = {}) => {
101
+ let { apiGatewayUrl: r } = e();
102
+ return n({
51
103
  queryKey: [
52
- "coolandlovely",
53
- "orders",
54
- t.providerId,
55
- t.customerId
104
+ a,
105
+ "collections",
106
+ t
56
107
  ],
57
- queryFn: async () => (await o("query Orders($providerId: String, $customerId: String) {\n listOrders(providerId: $providerId, customerId: $customerId, limit: 200) {\n id orderNumber providerId customerId status paymentStatus fulfillmentType subtotal tax deliveryFee discount total notes timeline paymentMethod deliveryAddress createdAt\n provider { name }\n items { id offeringId name quantity unitPrice totalPrice customizations }\n }\n }", t, n)).listOrders.map((e) => ({
58
- id: e.id,
59
- cartId: e.providerId,
60
- cartName: e.provider?.name || "Unknown Cart",
61
- cartImage: "https://images.unsplash.com/photo-1567620905732-2d1ec7ab7445?w=100",
62
- items: e.items.map((e) => ({
63
- id: e.id,
64
- name: e.name,
65
- quantity: e.quantity,
66
- price: e.unitPrice,
67
- customizations: e.customizations
68
- })),
69
- total: e.total,
70
- subtotal: e.subtotal,
71
- taxes: e.tax,
72
- deliveryFee: e.deliveryFee,
73
- discount: e.discount,
74
- status: e.status.toLowerCase(),
75
- orderDate: e.createdAt,
76
- deliveryAddress: e.deliveryAddress,
77
- paymentMethod: e.paymentMethod || "Cash",
78
- paymentStatus: e.paymentStatus.toLowerCase(),
79
- timeline: e.timeline || []
80
- }))
81
- });
82
- }, u = () => {
83
- let { apiGatewayUrl: t } = e();
84
- return r({
85
- queryKey: ["coolandlovely", "dashboard-stats"],
86
- queryFn: async () => (await o("query DashboardStats { coolandlovelyDashboardStats { totalOrders totalRevenue activeProviders activeCustomers avgRating pendingOrders } }", {}, t)).coolandlovelyDashboardStats
108
+ queryFn: async () => (await o(`query CooListCollections($brandId: ID, $status: CooCollectionStatus) {
109
+ cooListCollections(brandId: $brandId, status: $status) {
110
+ ${c}
111
+ brand { id name handle }
112
+ }
113
+ }`, {
114
+ brandId: t.brandId,
115
+ status: t.status
116
+ }, r)).cooListCollections
87
117
  });
88
- }, d = () => {
89
- let { apiGatewayUrl: t } = e();
90
- return r({
91
- queryKey: ["coolandlovely", "investment-opportunities"],
92
- queryFn: async () => (await o("query Opportunities {\n listInvestmentOpportunities(limit: 200) {\n id providerId title description targetAmount raisedAmount minimumInvestment expectedReturnsPct lockInMonths riskLevel status expiresAt terms businessMetrics createdAt\n provider { name }\n }\n }", {}, t)).listInvestmentOpportunities.map((e) => ({
93
- id: e.id,
94
- cartId: e.providerId,
95
- cartName: e.provider?.name || "Unknown Cart",
96
- businessOwner: "Owner",
97
- targetAmount: e.targetAmount,
98
- raisedAmount: e.raisedAmount,
99
- minimumInvestment: e.minimumInvestment,
100
- expectedReturns: e.expectedReturnsPct,
101
- investmentPeriod: e.lockInMonths,
102
- riskLevel: e.riskLevel.toLowerCase(),
103
- description: e.description,
104
- businessPlan: "",
105
- financialProjections: [],
106
- documents: [],
107
- investors: [],
108
- status: e.status.toLowerCase(),
109
- createdAt: e.createdAt,
110
- expiresAt: e.expiresAt
111
- }))
112
- });
113
- }, f = (t) => {
114
- let { apiGatewayUrl: n } = e();
115
- return r({
118
+ }, x = (t) => {
119
+ let { apiGatewayUrl: r } = e();
120
+ return n({
116
121
  queryKey: [
117
- "coolandlovely",
118
- "investments",
122
+ a,
123
+ "collection",
119
124
  t
120
125
  ],
121
- queryFn: async () => (await o("query Investments($investorId: String!) {\n listInvestments(investorId: $investorId) {\n id opportunityId amount currentValue expectedReturnsPct status investedAt maturedAt realizedReturns\n opportunity { provider { name } }\n }\n }", { investorId: t }, n)).listInvestments.map((e) => ({
122
- id: e.id,
123
- opportunityId: e.opportunityId,
124
- cartName: e.opportunity?.provider?.name || "Unknown Cart",
125
- investedAmount: e.amount,
126
- currentValue: e.currentValue,
127
- returns: e.realizedReturns,
128
- returnsPercentage: e.expectedReturnsPct,
129
- investmentDate: e.investedAt,
130
- status: e.status.toLowerCase()
131
- })),
126
+ queryFn: async () => (await o(`query CooCollection($id: ID!) {
127
+ cooCollection(id: $id) {
128
+ ${c}
129
+ brand { id name handle }
130
+ items { ${l} }
131
+ }
132
+ }`, { id: t }, r)).cooCollection,
132
133
  enabled: !!t
133
134
  });
134
- }, p = (t) => {
135
- let { apiGatewayUrl: n } = e();
136
- return r({
135
+ }, S = () => {
136
+ let n = r(), { apiGatewayUrl: i } = e();
137
+ return t({
138
+ mutationFn: async (e) => (await o(`mutation CooCreateCollection($input: CooCreateCollectionInput!) {
139
+ cooCreateCollection(input: $input) { ${c} }
140
+ }`, { input: e }, i)).cooCreateCollection,
141
+ onSuccess: () => {
142
+ n.invalidateQueries({ queryKey: [a, "collections"] });
143
+ }
144
+ });
145
+ }, C = () => {
146
+ let n = r(), { apiGatewayUrl: i } = e();
147
+ return t({
148
+ mutationFn: async ({ id: e, input: t }) => (await o(`mutation CooUpdateCollection($id: ID!, $input: CooUpdateCollectionInput!) {
149
+ cooUpdateCollection(id: $id, input: $input) { ${c} }
150
+ }`, {
151
+ id: e,
152
+ input: t
153
+ }, i)).cooUpdateCollection,
154
+ onSuccess: (e) => {
155
+ n.invalidateQueries({ queryKey: [a, "collections"] }), n.invalidateQueries({ queryKey: [
156
+ a,
157
+ "collection",
158
+ e.id
159
+ ] });
160
+ }
161
+ });
162
+ }, w = () => {
163
+ let n = r(), { apiGatewayUrl: i } = e();
164
+ return t({
165
+ mutationFn: async (e) => (await o(`mutation CooPublishCollection($id: ID!) {
166
+ cooPublishCollection(id: $id) { ${c} }
167
+ }`, { id: e }, i)).cooPublishCollection,
168
+ onSuccess: (e) => {
169
+ n.invalidateQueries({ queryKey: [a, "collections"] }), n.invalidateQueries({ queryKey: [
170
+ a,
171
+ "collection",
172
+ e.id
173
+ ] });
174
+ }
175
+ });
176
+ }, T = (t = {}) => {
177
+ let { apiGatewayUrl: r } = e();
178
+ return n({
137
179
  queryKey: [
138
- "coolandlovely",
139
- "worker-tasks",
180
+ a,
181
+ "style-items",
140
182
  t
141
183
  ],
142
- queryFn: async () => (await o("query WorkerTasks($workerId: String!) {\n listWorkerTasks(workerId: $workerId, limit: 100) {\n id orderId providerId type description priority status assignedAt dueAt completedAt customerName customerPhone earnings distance notes\n provider { name }\n order { deliveryAddress }\n }\n }", { workerId: t }, n)).listWorkerTasks.map((e) => ({
143
- id: e.id,
144
- orderId: e.orderId,
145
- cartId: e.providerId,
146
- cartName: e.provider?.name || "Unknown Cart",
147
- type: e.type.toLowerCase(),
148
- description: e.description,
149
- priority: e.priority.toLowerCase(),
150
- status: e.status.toLowerCase(),
151
- assignedAt: e.assignedAt,
152
- dueAt: e.dueAt,
153
- completedAt: e.completedAt,
154
- customerName: e.customerName,
155
- customerPhone: e.customerPhone,
156
- deliveryAddress: e.order?.deliveryAddress,
157
- earnings: e.earnings,
158
- distance: e.distance,
159
- notes: e.notes
160
- })),
161
- enabled: !!t
184
+ queryFn: async () => (await o(`query CooListStyleItems(
185
+ $brandId: ID, $collectionId: ID, $category: CooStyleCategory,
186
+ $status: CooStyleItemStatus, $pagination: PaginationInput
187
+ ) {
188
+ cooListStyleItems(
189
+ brandId: $brandId, collectionId: $collectionId, category: $category,
190
+ status: $status, pagination: $pagination
191
+ ) {
192
+ items { ${l} brand { id name handle } }
193
+ pageInfo { cursor hasMore }
194
+ }
195
+ }`, {
196
+ brandId: t.brandId,
197
+ collectionId: t.collectionId,
198
+ category: t.category,
199
+ status: t.status,
200
+ pagination: t.pagination ?? {
201
+ limit: 50,
202
+ offset: 0
203
+ }
204
+ }, r)).cooListStyleItems
162
205
  });
163
- }, m = (t) => {
164
- let { apiGatewayUrl: n } = e();
165
- return r({
206
+ }, E = (t) => {
207
+ let { apiGatewayUrl: r } = e();
208
+ return n({
166
209
  queryKey: [
167
- "coolandlovely",
168
- "worker-stats",
210
+ a,
211
+ "style-item",
169
212
  t
170
213
  ],
171
- queryFn: async () => (await o("query WorkerStats($workerId: String!) {\n coolandlovelyWorkerStats(workerId: $workerId) {\n totalDeliveries totalEarnings averageRating completionRate todayTasks todayEarnings\n }\n }", { workerId: t }, n)).coolandlovelyWorkerStats,
214
+ queryFn: async () => (await o(`query CooStyleItem($id: ID!) {
215
+ cooStyleItem(id: $id) {
216
+ ${l}
217
+ brand { id name handle }
218
+ collection { id name }
219
+ }
220
+ }`, { id: t }, r)).cooStyleItem,
172
221
  enabled: !!t
173
222
  });
174
- }, h = () => {
175
- let t = i(), { apiGatewayUrl: r } = e();
223
+ }, D = () => {
224
+ let n = r(), { apiGatewayUrl: i } = e();
225
+ return t({
226
+ mutationFn: async (e) => (await o(`mutation CooCreateStyleItem($input: CooCreateStyleItemInput!) {
227
+ cooCreateStyleItem(input: $input) { ${l} }
228
+ }`, { input: e }, i)).cooCreateStyleItem,
229
+ onSuccess: () => {
230
+ n.invalidateQueries({ queryKey: [a, "style-items"] });
231
+ }
232
+ });
233
+ }, O = () => {
234
+ let n = r(), { apiGatewayUrl: i } = e();
235
+ return t({
236
+ mutationFn: async ({ id: e, input: t }) => (await o(`mutation CooUpdateStyleItem($id: ID!, $input: CooUpdateStyleItemInput!) {
237
+ cooUpdateStyleItem(id: $id, input: $input) { ${l} }
238
+ }`, {
239
+ id: e,
240
+ input: t
241
+ }, i)).cooUpdateStyleItem,
242
+ onSuccess: (e) => {
243
+ n.invalidateQueries({ queryKey: [a, "style-items"] }), n.invalidateQueries({ queryKey: [
244
+ a,
245
+ "style-item",
246
+ e.id
247
+ ] });
248
+ }
249
+ });
250
+ }, k = () => {
251
+ let n = r(), { apiGatewayUrl: i } = e();
252
+ return t({
253
+ mutationFn: async (e) => (await o("mutation CooArchiveStyleItem($id: ID!) { cooArchiveStyleItem(id: $id) }", { id: e }, i)).cooArchiveStyleItem,
254
+ onSuccess: () => {
255
+ n.invalidateQueries({ queryKey: [a, "style-items"] });
256
+ }
257
+ });
258
+ }, A = (t = {}) => {
259
+ let { apiGatewayUrl: r } = e();
176
260
  return n({
177
- mutationFn: async (e) => (await o("mutation PlaceOrder($input: CoolAndLovelyPlaceOrderInput!) {\n placeOrder(input: $input) {\n id orderNumber status total createdAt\n }\n }", { input: e }, r)).placeOrder,
261
+ queryKey: [
262
+ a,
263
+ "looks",
264
+ t
265
+ ],
266
+ queryFn: async () => (await o(`query CooListLooks(
267
+ $authorId: ID, $occasion: CooLookOccasion, $featured: Boolean, $pagination: PaginationInput
268
+ ) {
269
+ cooListLooks(authorId: $authorId, occasion: $occasion, featured: $featured, pagination: $pagination) {
270
+ items { ${u} }
271
+ pageInfo { cursor hasMore }
272
+ }
273
+ }`, {
274
+ authorId: t.authorId,
275
+ occasion: t.occasion,
276
+ featured: t.featured,
277
+ pagination: t.pagination ?? {
278
+ limit: 50,
279
+ offset: 0
280
+ }
281
+ }, r)).cooListLooks
282
+ });
283
+ }, j = (t) => {
284
+ let { apiGatewayUrl: r } = e();
285
+ return n({
286
+ queryKey: [
287
+ a,
288
+ "look",
289
+ t
290
+ ],
291
+ queryFn: async () => (await o(`query CooLook($id: ID!) {
292
+ cooLook(id: $id) {
293
+ ${u}
294
+ items {
295
+ id lookId styleItemId position styling
296
+ styleItem { id name category price currency }
297
+ }
298
+ }
299
+ }`, { id: t }, r)).cooLook,
300
+ enabled: !!t
301
+ });
302
+ }, M = () => {
303
+ let n = r(), { apiGatewayUrl: i } = e();
304
+ return t({
305
+ mutationFn: async (e) => (await o(`mutation CooCreateLook($input: CooCreateLookInput!) {
306
+ cooCreateLook(input: $input) { ${u} }
307
+ }`, { input: e }, i)).cooCreateLook,
308
+ onSuccess: () => {
309
+ n.invalidateQueries({ queryKey: [a, "looks"] });
310
+ }
311
+ });
312
+ }, N = () => {
313
+ let n = r(), { apiGatewayUrl: i } = e();
314
+ return t({
315
+ mutationFn: async (e) => (await o(`mutation CooPublishLook($id: ID!) { cooPublishLook(id: $id) { ${u} } }`, { id: e }, i)).cooPublishLook,
316
+ onSuccess: (e) => {
317
+ n.invalidateQueries({ queryKey: [a, "looks"] }), n.invalidateQueries({ queryKey: [
318
+ a,
319
+ "look",
320
+ e.id
321
+ ] });
322
+ }
323
+ });
324
+ }, P = () => {
325
+ let n = r(), { apiGatewayUrl: i } = e();
326
+ return t({
327
+ mutationFn: async (e) => (await o(`mutation CooLikeLook($id: ID!) { cooLikeLook(id: $id) { ${u} } }`, { id: e }, i)).cooLikeLook,
328
+ onSuccess: (e) => {
329
+ n.invalidateQueries({ queryKey: [a, "looks"] }), n.invalidateQueries({ queryKey: [
330
+ a,
331
+ "look",
332
+ e.id
333
+ ] });
334
+ }
335
+ });
336
+ }, F = () => {
337
+ let n = r(), { apiGatewayUrl: i } = e();
338
+ return t({
339
+ mutationFn: async (e) => (await o("mutation CooDeleteLook($id: ID!) { cooDeleteLook(id: $id) }", { id: e }, i)).cooDeleteLook,
178
340
  onSuccess: () => {
179
- t.invalidateQueries({ queryKey: ["coolandlovely", "orders"] }), t.invalidateQueries({ queryKey: ["coolandlovely", "dashboard-stats"] });
341
+ n.invalidateQueries({ queryKey: [a, "looks"] });
180
342
  }
181
343
  });
182
- }, g = () => {
183
- let t = i(), { apiGatewayUrl: r } = e();
344
+ }, I = (t = {}) => {
345
+ let { apiGatewayUrl: r } = e();
184
346
  return n({
185
- mutationFn: async ({ taskId: e, status: t }) => (await o("mutation UpdateTaskStatus($taskId: String!, $status: CoolAndLovelyWorkerTaskStatus!) {\n coolandlovelyUpdateWorkerTaskStatus(taskId: $taskId, status: $status) {\n id status\n }\n }", {
186
- taskId: e,
347
+ queryKey: [
348
+ a,
349
+ "collaborations",
350
+ t
351
+ ],
352
+ queryFn: async () => (await o(`query CooListCollaborations($brandId: ID, $creatorId: ID, $status: CooCollaborationStatus) {
353
+ cooListCollaborations(brandId: $brandId, creatorId: $creatorId, status: $status) {
354
+ ${d}
355
+ brand { id name handle }
356
+ }
357
+ }`, {
358
+ brandId: t.brandId,
359
+ creatorId: t.creatorId,
360
+ status: t.status
361
+ }, r)).cooListCollaborations
362
+ });
363
+ }, L = (t) => {
364
+ let { apiGatewayUrl: r } = e();
365
+ return n({
366
+ queryKey: [
367
+ a,
368
+ "collaboration",
369
+ t
370
+ ],
371
+ queryFn: async () => (await o(`query CooCollaboration($id: ID!) {
372
+ cooCollaboration(id: $id) {
373
+ ${d}
374
+ brand { id name handle }
375
+ looks { ${u} }
376
+ }
377
+ }`, { id: t }, r)).cooCollaboration,
378
+ enabled: !!t
379
+ });
380
+ }, R = () => {
381
+ let n = r(), { apiGatewayUrl: i } = e();
382
+ return t({
383
+ mutationFn: async (e) => (await o(`mutation CooCreateCollaboration($input: CooCreateCollaborationInput!) {
384
+ cooCreateCollaboration(input: $input) { ${d} }
385
+ }`, { input: e }, i)).cooCreateCollaboration,
386
+ onSuccess: () => {
387
+ n.invalidateQueries({ queryKey: [a, "collaborations"] });
388
+ }
389
+ });
390
+ }, z = () => {
391
+ let n = r(), { apiGatewayUrl: i } = e();
392
+ return t({
393
+ mutationFn: async ({ id: e, status: t }) => (await o(`mutation CooTransitionCollaboration($id: ID!, $status: CooCollaborationStatus!) {
394
+ cooTransitionCollaboration(id: $id, status: $status) { ${d} }
395
+ }`, {
396
+ id: e,
187
397
  status: t
188
- }, r)).coolandlovelyUpdateWorkerTaskStatus,
398
+ }, i)).cooTransitionCollaboration,
399
+ onSuccess: (e) => {
400
+ n.invalidateQueries({ queryKey: [a, "collaborations"] }), n.invalidateQueries({ queryKey: [
401
+ a,
402
+ "collaboration",
403
+ e.id
404
+ ] });
405
+ }
406
+ });
407
+ }, B = (t = {}) => {
408
+ let { apiGatewayUrl: r } = e();
409
+ return n({
410
+ queryKey: [
411
+ a,
412
+ "wardrobe",
413
+ t
414
+ ],
415
+ queryFn: async () => (await o(`query CooListWardrobeItems($category: CooStyleCategory, $source: CooWardrobeSource) {
416
+ cooListWardrobeItems(category: $category, source: $source) { ${f} }
417
+ }`, {
418
+ category: t.category,
419
+ source: t.source
420
+ }, r)).cooListWardrobeItems
421
+ });
422
+ }, V = () => {
423
+ let n = r(), { apiGatewayUrl: i } = e();
424
+ return t({
425
+ mutationFn: async (e) => (await o(`mutation CooCreateWardrobeItem($input: CooCreateWardrobeItemInput!) {
426
+ cooCreateWardrobeItem(input: $input) { ${f} }
427
+ }`, { input: e }, i)).cooCreateWardrobeItem,
189
428
  onSuccess: () => {
190
- t.invalidateQueries({ queryKey: ["coolandlovely", "worker-tasks"] }), t.invalidateQueries({ queryKey: ["coolandlovely", "worker-stats"] });
429
+ n.invalidateQueries({ queryKey: [a, "wardrobe"] });
191
430
  }
192
431
  });
193
- }, _ = () => {
194
- let t = i(), { apiGatewayUrl: r } = e();
432
+ }, H = () => {
433
+ let n = r(), { apiGatewayUrl: i } = e();
434
+ return t({
435
+ mutationFn: async (e) => (await o(`mutation CooLogWardrobeWear($id: ID!) {
436
+ cooLogWardrobeWear(id: $id) { ${f} }
437
+ }`, { id: e }, i)).cooLogWardrobeWear,
438
+ onSuccess: () => {
439
+ n.invalidateQueries({ queryKey: [a, "wardrobe"] });
440
+ }
441
+ });
442
+ }, U = () => {
443
+ let n = r(), { apiGatewayUrl: i } = e();
444
+ return t({
445
+ mutationFn: async (e) => (await o("mutation CooRemoveWardrobeItem($id: ID!) { cooRemoveWardrobeItem(id: $id) }", { id: e }, i)).cooRemoveWardrobeItem,
446
+ onSuccess: () => {
447
+ n.invalidateQueries({ queryKey: [a, "wardrobe"] });
448
+ }
449
+ });
450
+ }, W = () => {
451
+ let { apiGatewayUrl: t } = e();
195
452
  return n({
196
- mutationFn: async ({ workerId: e, action: t }) => (await o("mutation ClockInOut($workerId: String!, $action: CoolAndLovelyClockAction!) {\n coolandlovelyWorkerClockInOut(workerId: $workerId, action: $action) {\n success message\n }\n }", {
197
- workerId: e,
198
- action: t
199
- }, r)).coolandlovelyWorkerClockInOut,
453
+ queryKey: [a, "my-style-profile"],
454
+ queryFn: async () => (await o(`query CooMyStyleProfile { cooMyStyleProfile { ${p} } }`, {}, t)).cooMyStyleProfile
455
+ });
456
+ }, G = () => {
457
+ let n = r(), { apiGatewayUrl: i } = e();
458
+ return t({
459
+ mutationFn: async (e) => (await o(`mutation CooUpsertStyleProfile($input: CooUpsertStyleProfileInput!) {
460
+ cooUpsertStyleProfile(input: $input) { ${p} }
461
+ }`, { input: e }, i)).cooUpsertStyleProfile,
200
462
  onSuccess: () => {
201
- t.invalidateQueries({ queryKey: ["coolandlovely", "worker-schedules"] });
463
+ n.invalidateQueries({ queryKey: [a, "my-style-profile"] });
202
464
  }
203
465
  });
204
- }, v = () => {
205
- let { currentUser: n } = e(), r = s(), i = l({ customerId: n?.id }), a = u(), o = d(), c = f(n?.id || "");
206
- return t(() => ({
207
- providers: r,
208
- orders: i,
209
- dashboardStats: a,
210
- investmentOpportunities: o,
211
- investments: c
212
- }), [
213
- r,
214
- i,
215
- a,
216
- o,
217
- c
218
- ]);
466
+ }, K = (t) => {
467
+ let { apiGatewayUrl: r } = e();
468
+ return n({
469
+ queryKey: [
470
+ a,
471
+ "lookbooks",
472
+ t
473
+ ],
474
+ queryFn: async () => (await o(`query CooListLookbooks($ownerId: ID) {
475
+ cooListLookbooks(ownerId: $ownerId) { ${m} }
476
+ }`, { ownerId: t }, r)).cooListLookbooks
477
+ });
478
+ }, q = () => {
479
+ let n = r(), { apiGatewayUrl: i } = e();
480
+ return t({
481
+ mutationFn: async (e) => (await o(`mutation CooCreateLookbook($input: CooCreateLookbookInput!) {
482
+ cooCreateLookbook(input: $input) { ${m} }
483
+ }`, { input: e }, i)).cooCreateLookbook,
484
+ onSuccess: () => {
485
+ n.invalidateQueries({ queryKey: [a, "lookbooks"] });
486
+ }
487
+ });
488
+ }, J = () => {
489
+ let n = r(), { apiGatewayUrl: i } = e();
490
+ return t({
491
+ mutationFn: async (e) => (await o("mutation CooRemoveLookbookEntry($id: ID!) { cooRemoveLookbookEntry(id: $id) }", { id: e }, i)).cooRemoveLookbookEntry,
492
+ onSuccess: () => {
493
+ n.invalidateQueries({ queryKey: [a, "lookbook"] });
494
+ }
495
+ });
496
+ }, Y = (t) => {
497
+ let { apiGatewayUrl: r } = e();
498
+ return n({
499
+ queryKey: [
500
+ a,
501
+ "lookbook",
502
+ t
503
+ ],
504
+ queryFn: async () => (await o(`query CooLookbook($id: ID!) {
505
+ cooLookbook(id: $id) {
506
+ ${m}
507
+ entries { id lookbookId lookId styleItemId note position createdAt updatedAt }
508
+ }
509
+ }`, { id: t }, r)).cooLookbook,
510
+ enabled: !!t
511
+ });
219
512
  };
220
513
  //#endregion
221
- export { v as useCoolAndLovelyApi, u as useDashboardStats, d as useInvestmentOpportunities, f as useInvestments, c as useOfferings, l as useOrders, h as usePlaceOrder, s as useProviders, g as useUpdateWorkerTaskStatus, _ as useWorkerClockInOut, m as useWorkerStats, p as useWorkerTasks };
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 };
222
515
 
223
516
  //# sourceMappingURL=useCoolAndLovelyApi.js.map