@burdenoff/microfe-kadaikodi 2026.1029.1 → 2026.1108.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.
@@ -5,17 +5,17 @@ import { useMemo as r } from "react";
5
5
  import { useMutation as i, useQuery as a, useQueryClient as o } from "@tanstack/react-query";
6
6
  import { graphqlFetch as s } from "@burdenoff/fe-libs/shared/graphql";
7
7
  //#region src/kadaikodi/hooks/useKadaikodiApi.ts
8
- var c = [
8
+ var ee = [
9
9
  "DRAFT",
10
10
  "ACTIVE",
11
11
  "VERIFIED",
12
12
  "PAUSED",
13
13
  "SUSPENDED",
14
14
  "ARCHIVED"
15
- ], ee = (e) => {
15
+ ], te = (e) => {
16
16
  let t = (e ?? "").toUpperCase();
17
- return c.find((e) => e === t);
18
- }, l = (e) => {
17
+ return ee.find((e) => e === t);
18
+ }, c = (e) => {
19
19
  switch ((e ?? "").toUpperCase()) {
20
20
  case "IN_PROGRESS": return "in_progress";
21
21
  case "COMPLETED": return "completed";
@@ -23,7 +23,7 @@ var c = [
23
23
  case "BLOCKED": return "blocked";
24
24
  default: return "pending";
25
25
  }
26
- }, u = (e) => {
26
+ }, l = (e) => {
27
27
  switch ((e ?? "").toUpperCase()) {
28
28
  case "PAID": return "paid";
29
29
  case "PROCESSING": return "processing";
@@ -31,7 +31,7 @@ var c = [
31
31
  case "REFUNDED": return "refunded";
32
32
  default: return "pending";
33
33
  }
34
- }, d = async (e, t, n) => {
34
+ }, u = async (e, t, n) => {
35
35
  let r = await s({
36
36
  gateway: "workspace",
37
37
  baseUrl: n,
@@ -42,19 +42,19 @@ var c = [
42
42
  if (r.errors?.length) throw Error(r.errors[0]?.message ?? "GraphQL request failed");
43
43
  if (!r.data) throw Error("GraphQL response did not include data");
44
44
  return r.data;
45
- }, f = (e) => ({
45
+ }, d = (e) => ({
46
46
  address: e?.address ?? "",
47
47
  coordinates: {
48
48
  lat: e?.coordinates?.lat ?? e?.latitude ?? 0,
49
49
  lng: e?.coordinates?.lng ?? e?.longitude ?? 0
50
50
  }
51
- }), p = (e) => ({
51
+ }), f = (e) => ({
52
52
  street: e?.street ?? "",
53
53
  area: e?.area ?? "",
54
54
  city: e?.city ?? "",
55
55
  pincode: e?.pincode ?? "",
56
56
  landmark: e?.landmark
57
- }), m = (e) => ({
57
+ }), p = (e) => ({
58
58
  id: e.id,
59
59
  name: e.name,
60
60
  category: e.category,
@@ -63,13 +63,13 @@ var c = [
63
63
  totalRatings: e.totalRatings,
64
64
  isOpen: e.status === "ACTIVE" || e.status === "VERIFIED",
65
65
  isVerified: e.status === "VERIFIED",
66
- status: ee(e.status),
67
- location: f(e.location),
66
+ status: te(e.status),
67
+ location: d(e.location),
68
68
  averageOrderValue: e.averageOrderValue,
69
69
  serviceTypes: e.serviceTypes,
70
70
  businessHours: e.businessHours,
71
71
  createdAt: e.createdAt
72
- }), h = (e) => ({
72
+ }), m = (e) => ({
73
73
  id: e.id,
74
74
  cartId: e.providerId,
75
75
  cartName: e.provider?.name ?? "Unknown Cart",
@@ -87,23 +87,23 @@ var c = [
87
87
  discount: e.discount,
88
88
  status: e.status.toLowerCase(),
89
89
  orderDate: e.createdAt,
90
- deliveryAddress: p(e.deliveryAddress),
90
+ deliveryAddress: f(e.deliveryAddress),
91
91
  paymentMethod: e.paymentMethod ?? "Cash",
92
- paymentStatus: u(e.paymentStatus),
92
+ paymentStatus: l(e.paymentStatus),
93
93
  timeline: e.timeline ?? []
94
- }), g = (e) => {
94
+ }), h = (e) => {
95
95
  if (e?.id) return {
96
96
  id: e.id,
97
97
  orderNumber: e.orderNumber ?? "",
98
98
  total: e.total ?? 0,
99
- paymentStatus: u(e.paymentStatus),
99
+ paymentStatus: l(e.paymentStatus),
100
100
  items: (e.items ?? []).map((e) => ({
101
101
  id: e.id,
102
102
  name: e.name,
103
103
  quantity: e.quantity
104
104
  }))
105
105
  };
106
- }, _ = (e) => ({
106
+ }, g = (e) => ({
107
107
  id: e.id,
108
108
  cartId: e.providerId,
109
109
  cartName: e.provider?.name ?? "Unknown Cart",
@@ -122,7 +122,7 @@ var c = [
122
122
  status: e.status.toLowerCase(),
123
123
  createdAt: e.createdAt,
124
124
  expiresAt: e.expiresAt ?? ""
125
- }), v = (e) => ({
125
+ }), _ = (e) => ({
126
126
  id: e.id,
127
127
  opportunityId: e.opportunityId,
128
128
  cartName: e.opportunity?.provider?.name ?? "Unknown Cart",
@@ -132,7 +132,7 @@ var c = [
132
132
  returnsPercentage: e.expectedReturnsPct,
133
133
  investmentDate: e.investedAt,
134
134
  status: e.status.toLowerCase()
135
- }), y = (e) => ({
135
+ }), v = (e) => ({
136
136
  id: e.id,
137
137
  orderId: e.orderId ?? "",
138
138
  cartId: e.providerId ?? "",
@@ -141,19 +141,19 @@ var c = [
141
141
  title: e.title ?? void 0,
142
142
  description: e.description ?? "",
143
143
  priority: e.priority.toLowerCase(),
144
- status: l(e.status),
144
+ status: c(e.status),
145
145
  assignedAt: e.assignedAt ?? "",
146
146
  dueAt: e.dueAt ?? "",
147
147
  completedAt: e.completedAt ?? void 0,
148
148
  customerName: e.customerName ?? "",
149
149
  customerPhone: e.customerPhone ?? "",
150
- deliveryAddress: e.order?.deliveryAddress ? p(e.order.deliveryAddress) : void 0,
150
+ deliveryAddress: e.order?.deliveryAddress ? f(e.order.deliveryAddress) : void 0,
151
151
  location: e.provider?.location?.address ?? void 0,
152
152
  earnings: e.earnings ?? 0,
153
153
  distance: e.distance ?? void 0,
154
154
  notes: e.notes ?? void 0,
155
- order: g(e.order)
156
- }), b = (e) => ({
155
+ order: h(e.order)
156
+ }), y = (e) => ({
157
157
  id: e.id,
158
158
  date: e.date,
159
159
  startTime: e.startTime,
@@ -163,7 +163,7 @@ var c = [
163
163
  status: e.status.toLowerCase(),
164
164
  tasksCompleted: e.tasksCompleted,
165
165
  totalEarnings: e.totalEarnings
166
- }), x = "\n id name slug category status ownerId rating totalRatings averageOrderValue serviceTypes location businessHours createdAt\n", S = "\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", C = "\n id providerId kind name slug category description price originalPrice stock durationMinutes serviceType tags isAvailable metadata media\n", w = (t) => {
166
+ }), b = "\n id name slug category status ownerId rating totalRatings averageOrderValue serviceTypes location businessHours createdAt\n", x = "\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", S = "\n id providerId kind name slug category description price originalPrice stock durationMinutes serviceType tags isAvailable metadata media\n", C = (t) => {
167
167
  let { apiGatewayUrl: n } = e();
168
168
  return a({
169
169
  queryKey: [
@@ -171,16 +171,16 @@ var c = [
171
171
  "providers",
172
172
  t
173
173
  ],
174
- queryFn: async () => (await d(`query Providers($filter: KadaikodiProviderFilterInput, $pagination: KadaikodiPaginationInput) {
174
+ queryFn: async () => (await u(`query Providers($filter: KadaikodiProviderFilterInput, $pagination: KadaikodiPaginationInput) {
175
175
  kadaikodiListServiceProviders(filter: $filter, pagination: $pagination) {
176
- ${x}
176
+ ${b}
177
177
  }
178
178
  }`, {
179
179
  filter: t ? { query: t } : void 0,
180
180
  pagination: { limit: 100 }
181
- }, n)).kadaikodiListServiceProviders.map(m)
181
+ }, n)).kadaikodiListServiceProviders.map(p)
182
182
  });
183
- }, T = (t) => {
183
+ }, w = (t) => {
184
184
  let { apiGatewayUrl: n } = e();
185
185
  return a({
186
186
  queryKey: [
@@ -189,16 +189,16 @@ var c = [
189
189
  t
190
190
  ],
191
191
  queryFn: async () => {
192
- let e = await d(`query Provider($id: ID!) {
192
+ let e = await u(`query Provider($id: ID!) {
193
193
  kadaikodiServiceProvider(id: $id) {
194
- ${x}
194
+ ${b}
195
195
  }
196
196
  }`, { id: t }, n);
197
- return e.kadaikodiServiceProvider ? m(e.kadaikodiServiceProvider) : null;
197
+ return e.kadaikodiServiceProvider ? p(e.kadaikodiServiceProvider) : null;
198
198
  },
199
199
  enabled: !!t
200
200
  });
201
- }, E = (t) => {
201
+ }, T = (t) => {
202
202
  let { apiGatewayUrl: n } = e();
203
203
  return a({
204
204
  queryKey: [
@@ -206,9 +206,9 @@ var c = [
206
206
  "offerings",
207
207
  t
208
208
  ],
209
- queryFn: async () => (await d(`query Offerings($providerId: String, $pagination: KadaikodiPaginationInput) {
209
+ queryFn: async () => (await u(`query Offerings($providerId: String, $pagination: KadaikodiPaginationInput) {
210
210
  kadaikodiListOfferings(providerId: $providerId, pagination: $pagination) {
211
- ${C}
211
+ ${S}
212
212
  }
213
213
  }`, {
214
214
  providerId: t,
@@ -216,7 +216,57 @@ var c = [
216
216
  }, n)).kadaikodiListOfferings,
217
217
  enabled: !!t
218
218
  });
219
- }, D = (t = {}) => {
219
+ }, E = async () => {
220
+ if (typeof navigator > "u" || !("permissions" in navigator) || !("geolocation" in navigator)) return null;
221
+ try {
222
+ return (await navigator.permissions.query({ name: "geolocation" })).state === "granted" ? await new Promise((e) => {
223
+ navigator.geolocation.getCurrentPosition((t) => e({
224
+ lat: t.coords.latitude,
225
+ lng: t.coords.longitude
226
+ }), () => e(null), {
227
+ timeout: 3e3,
228
+ maximumAge: 3e5
229
+ });
230
+ }) : null;
231
+ } catch {
232
+ return null;
233
+ }
234
+ }, D = "\n id name slug status rating totalRatings\n", O = () => {
235
+ let { apiGatewayUrl: t } = e();
236
+ return a({
237
+ queryKey: ["kadaikodi", "ranked-offerings"],
238
+ staleTime: 6e4,
239
+ queryFn: async () => {
240
+ let e = await E(), n = await s({
241
+ gateway: "workspace",
242
+ baseUrl: t,
243
+ query: `query RankedOfferings($context: KadaikodiRankingContextInput) {
244
+ kadaikodiRankOfferingsForCustomer(context: $context, pagination: { limit: 12 }) {
245
+ offering { ${S} }
246
+ provider { ${D} }
247
+ score
248
+ distanceKm
249
+ suggestedReason
250
+ suggestedReasonText
251
+ personalized
252
+ }
253
+ }`,
254
+ variables: { context: e },
255
+ workspaceToken: !0
256
+ }), r = n.errors?.[0];
257
+ if (r?.extensions?.code === "FEATURE_DISABLED") return {
258
+ enabled: !1,
259
+ items: []
260
+ };
261
+ if (n.errors?.length) throw Error(r?.message ?? "GraphQL request failed");
262
+ if (!n.data) throw Error("GraphQL response did not include data");
263
+ return {
264
+ enabled: !0,
265
+ items: n.data.kadaikodiRankOfferingsForCustomer
266
+ };
267
+ }
268
+ });
269
+ }, k = (t = {}) => {
220
270
  let { apiGatewayUrl: n } = e();
221
271
  return a({
222
272
  queryKey: [
@@ -225,16 +275,16 @@ var c = [
225
275
  t.providerId,
226
276
  t.customerId
227
277
  ],
228
- queryFn: async () => (await d(`query Orders($providerId: String, $customerId: String, $pagination: KadaikodiPaginationInput) {
278
+ queryFn: async () => (await u(`query Orders($providerId: String, $customerId: String, $pagination: KadaikodiPaginationInput) {
229
279
  kadaikodiListOrders(providerId: $providerId, customerId: $customerId, pagination: $pagination) {
230
- ${S}
280
+ ${x}
231
281
  }
232
282
  }`, {
233
283
  ...t,
234
284
  pagination: { limit: 200 }
235
- }, n)).kadaikodiListOrders.map(h)
285
+ }, n)).kadaikodiListOrders.map(m)
236
286
  });
237
- }, O = (t, n = {}) => {
287
+ }, A = (t, n = {}) => {
238
288
  let { apiGatewayUrl: r } = e();
239
289
  return a({
240
290
  queryKey: [
@@ -243,12 +293,12 @@ var c = [
243
293
  t
244
294
  ],
245
295
  queryFn: async () => {
246
- let e = await d(`query Order($id: ID!) {
296
+ let e = await u(`query Order($id: ID!) {
247
297
  kadaikodiOrder(id: $id) {
248
- ${S}
298
+ ${x}
249
299
  }
250
300
  }`, { id: t }, r);
251
- return e.kadaikodiOrder ? h(e.kadaikodiOrder) : null;
301
+ return e.kadaikodiOrder ? m(e.kadaikodiOrder) : null;
252
302
  },
253
303
  enabled: !!t,
254
304
  refetchInterval: (e) => {
@@ -257,25 +307,25 @@ var c = [
257
307
  return t ? t.status === "delivered" || t.status === "cancelled" ? !1 : 15e3 : !1;
258
308
  }
259
309
  });
260
- }, k = () => {
310
+ }, j = () => {
261
311
  let { apiGatewayUrl: t } = e();
262
312
  return a({
263
313
  queryKey: ["kadaikodi", "dashboard-stats"],
264
- queryFn: async () => (await d("query DashboardStats { kadaikodiDashboardStats { totalOrders totalRevenue activeProviders activeCustomers avgRating pendingOrders } }", {}, t)).kadaikodiDashboardStats
314
+ queryFn: async () => (await u("query DashboardStats { kadaikodiDashboardStats { totalOrders totalRevenue activeProviders activeCustomers avgRating pendingOrders } }", {}, t)).kadaikodiDashboardStats
265
315
  });
266
- }, A = () => {
316
+ }, M = () => {
267
317
  let { apiGatewayUrl: t } = e();
268
318
  return a({
269
319
  queryKey: ["kadaikodi", "admin-analytics"],
270
- queryFn: async () => (await d("query AdminAnalytics { kadaikodiAdminAnalytics { revenueByCategory orderTrends topProviders customerGrowth categoryDistribution } }", {}, t)).kadaikodiAdminAnalytics
320
+ queryFn: async () => (await u("query AdminAnalytics { kadaikodiAdminAnalytics { revenueByCategory orderTrends topProviders customerGrowth categoryDistribution } }", {}, t)).kadaikodiAdminAnalytics
271
321
  });
272
- }, j = () => {
322
+ }, N = () => {
273
323
  let { apiGatewayUrl: t } = e();
274
324
  return a({
275
325
  queryKey: ["kadaikodi", "investment-opportunities"],
276
- queryFn: async () => (await d("query Opportunities($pagination: KadaikodiPaginationInput) {\n kadaikodiListInvestmentOpportunities(pagination: $pagination) {\n id providerId title description targetAmount raisedAmount minimumInvestment expectedReturnsPct lockInMonths riskLevel status expiresAt terms businessMetrics createdAt\n provider { name }\n }\n }", { pagination: { limit: 200 } }, t)).kadaikodiListInvestmentOpportunities.map(_)
326
+ queryFn: async () => (await u("query Opportunities($pagination: KadaikodiPaginationInput) {\n kadaikodiListInvestmentOpportunities(pagination: $pagination) {\n id providerId title description targetAmount raisedAmount minimumInvestment expectedReturnsPct lockInMonths riskLevel status expiresAt terms businessMetrics createdAt\n provider { name }\n }\n }", { pagination: { limit: 200 } }, t)).kadaikodiListInvestmentOpportunities.map(g)
277
327
  });
278
- }, M = (t) => {
328
+ }, P = (t) => {
279
329
  let { apiGatewayUrl: n } = e();
280
330
  return a({
281
331
  queryKey: [
@@ -283,10 +333,10 @@ var c = [
283
333
  "investments",
284
334
  t
285
335
  ],
286
- queryFn: async () => (await d("query Investments {\n kadaikodiListInvestments {\n id opportunityId amount currentValue expectedReturnsPct status investedAt maturedAt realizedReturns\n opportunity { provider { name } }\n }\n }", {}, n)).kadaikodiListInvestments.map(v),
336
+ queryFn: async () => (await u("query Investments {\n kadaikodiListInvestments {\n id opportunityId amount currentValue expectedReturnsPct status investedAt maturedAt realizedReturns\n opportunity { provider { name } }\n }\n }", {}, n)).kadaikodiListInvestments.map(_),
287
337
  enabled: !!t
288
338
  });
289
- }, N = (t) => {
339
+ }, F = (t) => {
290
340
  let { apiGatewayUrl: n } = e();
291
341
  return a({
292
342
  queryKey: [
@@ -294,13 +344,13 @@ var c = [
294
344
  "provider-workers",
295
345
  t
296
346
  ],
297
- queryFn: async () => (await d("query ProviderWorkers($providerId: String!, $taskPagination: KadaikodiPaginationInput) {\n kadaikodiListProviderWorkers(providerId: $providerId) {\n id providerId workerId name role status metadata\n tasks(pagination: $taskPagination) { id status assignedAt }\n }\n }", {
347
+ queryFn: async () => (await u("query ProviderWorkers($providerId: String!, $taskPagination: KadaikodiPaginationInput) {\n kadaikodiListProviderWorkers(providerId: $providerId) {\n id providerId workerId name role status metadata\n tasks(pagination: $taskPagination) { id status assignedAt }\n }\n }", {
298
348
  providerId: t,
299
349
  taskPagination: { limit: 100 }
300
350
  }, n)).kadaikodiListProviderWorkers,
301
351
  enabled: !!t
302
352
  });
303
- }, P = (t) => {
353
+ }, I = (t) => {
304
354
  let { apiGatewayUrl: n } = e();
305
355
  return a({
306
356
  queryKey: [
@@ -308,10 +358,10 @@ var c = [
308
358
  "worker-tasks",
309
359
  t
310
360
  ],
311
- queryFn: async () => (await d("query WorkerTasks($pagination: KadaikodiPaginationInput) {\n kadaikodiWorkerTasks(pagination: $pagination) {\n id orderId providerId title type description priority status assignedAt dueAt completedAt customerName customerPhone earnings distance notes\n provider { name location }\n order {\n id orderNumber total paymentStatus deliveryAddress\n items { id name quantity }\n }\n }\n }", { pagination: { limit: 100 } }, n)).kadaikodiWorkerTasks.map(y),
361
+ queryFn: async () => (await u("query WorkerTasks($pagination: KadaikodiPaginationInput) {\n kadaikodiWorkerTasks(pagination: $pagination) {\n id orderId providerId title type description priority status assignedAt dueAt completedAt customerName customerPhone earnings distance notes\n provider { name location }\n order {\n id orderNumber total paymentStatus deliveryAddress\n items { id name quantity }\n }\n }\n }", { pagination: { limit: 100 } }, n)).kadaikodiWorkerTasks.map(v),
312
362
  enabled: !!t
313
363
  });
314
- }, F = (t) => {
364
+ }, L = (t) => {
315
365
  let { apiGatewayUrl: n } = e();
316
366
  return a({
317
367
  queryKey: [
@@ -319,10 +369,10 @@ var c = [
319
369
  "worker-stats",
320
370
  t
321
371
  ],
322
- queryFn: async () => (await d("query WorkerStats {\n kadaikodiWorkerStats {\n totalDeliveries totalEarnings averageRating completionRate todayTasks todayEarnings\n }\n }", {}, n)).kadaikodiWorkerStats,
372
+ queryFn: async () => (await u("query WorkerStats {\n kadaikodiWorkerStats {\n totalDeliveries totalEarnings averageRating completionRate todayTasks todayEarnings\n }\n }", {}, n)).kadaikodiWorkerStats,
323
373
  enabled: !!t
324
374
  });
325
- }, I = (t) => {
375
+ }, R = (t) => {
326
376
  let { apiGatewayUrl: n } = e();
327
377
  return a({
328
378
  queryKey: [
@@ -330,35 +380,35 @@ var c = [
330
380
  "worker-schedules",
331
381
  t
332
382
  ],
333
- queryFn: async () => (await d("query WorkerSchedules {\n kadaikodiListWorkerSchedules {\n id date startTime endTime providerId status tasksCompleted totalEarnings\n provider { name }\n }\n }", {}, n)).kadaikodiListWorkerSchedules.map(b),
383
+ queryFn: async () => (await u("query WorkerSchedules {\n kadaikodiListWorkerSchedules {\n id date startTime endTime providerId status tasksCompleted totalEarnings\n provider { name }\n }\n }", {}, n)).kadaikodiListWorkerSchedules.map(y),
334
384
  enabled: !!t
335
385
  });
336
- }, L = "\n id type nickname addressLine1 addressLine2 city state zipCode isDefault usageCount lastUsedAt\n", R = "\n id type label detail isDefault\n", z = () => {
386
+ }, z = "\n id type nickname addressLine1 addressLine2 city state zipCode isDefault usageCount lastUsedAt\n", B = "\n id type label detail isDefault\n", V = () => {
337
387
  let { apiGatewayUrl: t, currentUser: n } = e();
338
388
  return a({
339
389
  queryKey: ["kadaikodi", "my-addresses"],
340
- queryFn: async () => (await d(`query MyAddresses($pagination: KadaikodiPaginationInput) {
390
+ queryFn: async () => (await u(`query MyAddresses($pagination: KadaikodiPaginationInput) {
341
391
  kadaikodiMyAddresses(pagination: $pagination) {
342
- ${L}
392
+ ${z}
343
393
  }
344
394
  }`, { pagination: { limit: 100 } }, t)).kadaikodiMyAddresses,
345
395
  enabled: !!n?.id
346
396
  });
347
- }, B = () => {
397
+ }, H = () => {
348
398
  let t = o(), { apiGatewayUrl: n } = e();
349
399
  return i({
350
- mutationFn: async (e) => (await d(`mutation AddAddress($input: KadaikodiAddAddressInput!) {
351
- kadaikodiAddAddress(input: $input) { ${L} }
400
+ mutationFn: async (e) => (await u(`mutation AddAddress($input: KadaikodiAddAddressInput!) {
401
+ kadaikodiAddAddress(input: $input) { ${z} }
352
402
  }`, { input: e }, n)).kadaikodiAddAddress,
353
403
  onSuccess: () => {
354
404
  t.invalidateQueries({ queryKey: ["kadaikodi", "my-addresses"] });
355
405
  }
356
406
  });
357
- }, V = () => {
407
+ }, U = () => {
358
408
  let t = o(), { apiGatewayUrl: n } = e();
359
409
  return i({
360
- mutationFn: async ({ id: e, input: t }) => (await d(`mutation UpdateAddress($id: ID!, $input: KadaikodiUpdateAddressInput!) {
361
- kadaikodiUpdateAddress(id: $id, input: $input) { ${L} }
410
+ mutationFn: async ({ id: e, input: t }) => (await u(`mutation UpdateAddress($id: ID!, $input: KadaikodiUpdateAddressInput!) {
411
+ kadaikodiUpdateAddress(id: $id, input: $input) { ${z} }
362
412
  }`, {
363
413
  id: e,
364
414
  input: t
@@ -367,72 +417,72 @@ var c = [
367
417
  t.invalidateQueries({ queryKey: ["kadaikodi", "my-addresses"] });
368
418
  }
369
419
  });
370
- }, H = () => {
420
+ }, W = () => {
371
421
  let t = o(), { apiGatewayUrl: n } = e();
372
422
  return i({
373
- mutationFn: async (e) => (await d("mutation DeleteAddress($id: ID!) { kadaikodiDeleteAddress(id: $id) }", { id: e }, n)).kadaikodiDeleteAddress,
423
+ mutationFn: async (e) => (await u("mutation DeleteAddress($id: ID!) { kadaikodiDeleteAddress(id: $id) }", { id: e }, n)).kadaikodiDeleteAddress,
374
424
  onSuccess: () => {
375
425
  t.invalidateQueries({ queryKey: ["kadaikodi", "my-addresses"] });
376
426
  }
377
427
  });
378
- }, U = () => {
428
+ }, G = () => {
379
429
  let t = o(), { apiGatewayUrl: n } = e();
380
430
  return i({
381
- mutationFn: async (e) => (await d(`mutation SetDefaultAddress($id: ID!) { kadaikodiSetDefaultAddress(id: $id) { ${L} } }`, { id: e }, n)).kadaikodiSetDefaultAddress,
431
+ mutationFn: async (e) => (await u(`mutation SetDefaultAddress($id: ID!) { kadaikodiSetDefaultAddress(id: $id) { ${z} } }`, { id: e }, n)).kadaikodiSetDefaultAddress,
382
432
  onSuccess: () => {
383
433
  t.invalidateQueries({ queryKey: ["kadaikodi", "my-addresses"] });
384
434
  }
385
435
  });
386
- }, W = () => {
436
+ }, K = () => {
387
437
  let { apiGatewayUrl: t, currentUser: n } = e();
388
438
  return a({
389
439
  queryKey: ["kadaikodi", "my-payment-methods"],
390
- queryFn: async () => (await d(`query MyPaymentMethods($pagination: KadaikodiPaginationInput) {
440
+ queryFn: async () => (await u(`query MyPaymentMethods($pagination: KadaikodiPaginationInput) {
391
441
  kadaikodiMyPaymentMethods(pagination: $pagination) {
392
- ${R}
442
+ ${B}
393
443
  }
394
444
  }`, { pagination: { limit: 100 } }, t)).kadaikodiMyPaymentMethods,
395
445
  enabled: !!n?.id
396
446
  });
397
- }, G = () => {
447
+ }, q = () => {
398
448
  let t = o(), { apiGatewayUrl: n } = e();
399
449
  return i({
400
- mutationFn: async (e) => (await d(`mutation AddPaymentMethod($input: KadaikodiAddPaymentMethodInput!) {
401
- kadaikodiAddPaymentMethod(input: $input) { ${R} }
450
+ mutationFn: async (e) => (await u(`mutation AddPaymentMethod($input: KadaikodiAddPaymentMethodInput!) {
451
+ kadaikodiAddPaymentMethod(input: $input) { ${B} }
402
452
  }`, { input: e }, n)).kadaikodiAddPaymentMethod,
403
453
  onSuccess: () => {
404
454
  t.invalidateQueries({ queryKey: ["kadaikodi", "my-payment-methods"] });
405
455
  }
406
456
  });
407
- }, K = () => {
457
+ }, ne = () => {
408
458
  let t = o(), { apiGatewayUrl: n } = e();
409
459
  return i({
410
- mutationFn: async (e) => (await d("mutation RemovePaymentMethod($id: ID!) { kadaikodiRemovePaymentMethod(id: $id) }", { id: e }, n)).kadaikodiRemovePaymentMethod,
460
+ mutationFn: async (e) => (await u("mutation RemovePaymentMethod($id: ID!) { kadaikodiRemovePaymentMethod(id: $id) }", { id: e }, n)).kadaikodiRemovePaymentMethod,
411
461
  onSuccess: () => {
412
462
  t.invalidateQueries({ queryKey: ["kadaikodi", "my-payment-methods"] });
413
463
  }
414
464
  });
415
- }, q = () => {
465
+ }, J = () => {
416
466
  let t = o(), { apiGatewayUrl: n } = e();
417
467
  return i({
418
- mutationFn: async (e) => (await d(`mutation SetDefaultPaymentMethod($id: ID!) {
419
- kadaikodiSetDefaultPaymentMethod(id: $id) { ${R} }
468
+ mutationFn: async (e) => (await u(`mutation SetDefaultPaymentMethod($id: ID!) {
469
+ kadaikodiSetDefaultPaymentMethod(id: $id) { ${B} }
420
470
  }`, { id: e }, n)).kadaikodiSetDefaultPaymentMethod,
421
471
  onSuccess: () => {
422
472
  t.invalidateQueries({ queryKey: ["kadaikodi", "my-payment-methods"] });
423
473
  }
424
474
  });
425
- }, J = () => {
475
+ }, Y = () => {
426
476
  let { apiGatewayUrl: t, currentUser: n } = e();
427
477
  return a({
428
478
  queryKey: ["kadaikodi", "my-favorite-provider-ids"],
429
- queryFn: async () => (await d("query MyFavoriteProviderIds { kadaikodiMyFavoriteProviderIds }", {}, t)).kadaikodiMyFavoriteProviderIds,
479
+ queryFn: async () => (await u("query MyFavoriteProviderIds { kadaikodiMyFavoriteProviderIds }", {}, t)).kadaikodiMyFavoriteProviderIds,
430
480
  enabled: !!n?.id
431
481
  });
432
- }, te = () => {
482
+ }, X = () => {
433
483
  let t = o(), { apiGatewayUrl: n } = e();
434
484
  return i({
435
- mutationFn: async (e) => (await d("mutation ToggleFavorite($providerId: String!) { kadaikodiToggleFavorite(providerId: $providerId) }", { providerId: e }, n)).kadaikodiToggleFavorite,
485
+ mutationFn: async (e) => (await u("mutation ToggleFavorite($providerId: String!) { kadaikodiToggleFavorite(providerId: $providerId) }", { providerId: e }, n)).kadaikodiToggleFavorite,
436
486
  onMutate: async (e) => {
437
487
  await t.cancelQueries({ queryKey: ["kadaikodi", "my-favorite-provider-ids"] });
438
488
  let n = t.getQueryData(["kadaikodi", "my-favorite-provider-ids"]);
@@ -445,31 +495,31 @@ var c = [
445
495
  t.invalidateQueries({ queryKey: ["kadaikodi", "my-favorite-provider-ids"] });
446
496
  }
447
497
  });
448
- }, Y = "\n id customerId pointsBalance lifetimePointsEarned lifetimePointsRedeemed createdAt updatedAt\n", X = "\n id accountId customerId orderId type points balanceAfter description createdAt\n", Z = () => {
498
+ }, Z = "\n id customerId pointsBalance lifetimePointsEarned lifetimePointsRedeemed createdAt updatedAt\n", Q = "\n id accountId customerId orderId type points balanceAfter description createdAt\n", re = () => {
449
499
  let { apiGatewayUrl: t, currentUser: n } = e();
450
500
  return a({
451
501
  queryKey: ["kadaikodi", "my-loyalty-account"],
452
- queryFn: async () => (await d(`query MyLoyaltyAccount { kadaikodiMyLoyaltyAccount { ${Y} } }`, {}, t)).kadaikodiMyLoyaltyAccount,
502
+ queryFn: async () => (await u(`query MyLoyaltyAccount { kadaikodiMyLoyaltyAccount { ${Z} } }`, {}, t)).kadaikodiMyLoyaltyAccount,
453
503
  enabled: !!n?.id
454
504
  });
455
- }, Q = () => {
505
+ }, ie = () => {
456
506
  let { apiGatewayUrl: t, currentUser: n } = e();
457
507
  return a({
458
508
  queryKey: ["kadaikodi", "my-loyalty-transactions"],
459
- queryFn: async () => (await d(`query MyLoyaltyTransactions($pagination: KadaikodiPaginationInput) {
460
- kadaikodiMyLoyaltyTransactions(pagination: $pagination) { ${X} }
509
+ queryFn: async () => (await u(`query MyLoyaltyTransactions($pagination: KadaikodiPaginationInput) {
510
+ kadaikodiMyLoyaltyTransactions(pagination: $pagination) { ${Q} }
461
511
  }`, { pagination: { limit: 50 } }, t)).kadaikodiMyLoyaltyTransactions,
462
512
  enabled: !!n?.id
463
513
  });
464
- }, ne = () => {
514
+ }, ae = () => {
465
515
  let t = o(), { apiGatewayUrl: n } = e();
466
516
  return i({
467
- mutationFn: async (e) => (await d("mutation RedeemLoyaltyPoints($input: KadaikodiRedeemLoyaltyPointsInput!) {\n kadaikodiRedeemLoyaltyPoints(input: $input) {\n pointsRedeemed discountAmount newBalance transactionId\n }\n }", { input: { points: e } }, n)).kadaikodiRedeemLoyaltyPoints,
517
+ mutationFn: async (e) => (await u("mutation RedeemLoyaltyPoints($input: KadaikodiRedeemLoyaltyPointsInput!) {\n kadaikodiRedeemLoyaltyPoints(input: $input) {\n pointsRedeemed discountAmount newBalance transactionId\n }\n }", { input: { points: e } }, n)).kadaikodiRedeemLoyaltyPoints,
468
518
  onSuccess: () => {
469
519
  t.invalidateQueries({ queryKey: ["kadaikodi", "my-loyalty-account"] }), t.invalidateQueries({ queryKey: ["kadaikodi", "my-loyalty-transactions"] });
470
520
  }
471
521
  });
472
- }, re = (t) => {
522
+ }, oe = (t) => {
473
523
  let { apiGatewayUrl: n } = e();
474
524
  return a({
475
525
  queryKey: [
@@ -477,12 +527,12 @@ var c = [
477
527
  "loyalty-account",
478
528
  t
479
529
  ],
480
- queryFn: async () => (await d(`query LoyaltyAccount($customerId: String!) {
481
- kadaikodiLoyaltyAccount(customerId: $customerId) { ${Y} }
530
+ queryFn: async () => (await u(`query LoyaltyAccount($customerId: String!) {
531
+ kadaikodiLoyaltyAccount(customerId: $customerId) { ${Z} }
482
532
  }`, { customerId: t }, n)).kadaikodiLoyaltyAccount,
483
533
  enabled: !!t
484
534
  });
485
- }, ie = (t) => {
535
+ }, se = (t) => {
486
536
  let { apiGatewayUrl: n } = e();
487
537
  return a({
488
538
  queryKey: [
@@ -490,20 +540,20 @@ var c = [
490
540
  "loyalty-transactions",
491
541
  t ?? "all"
492
542
  ],
493
- queryFn: async () => (await d(`query ListLoyaltyTransactions($customerId: String, $pagination: KadaikodiPaginationInput) {
543
+ queryFn: async () => (await u(`query ListLoyaltyTransactions($customerId: String, $pagination: KadaikodiPaginationInput) {
494
544
  kadaikodiListLoyaltyTransactions(customerId: $customerId, pagination: $pagination) {
495
- ${X}
545
+ ${Q}
496
546
  }
497
547
  }`, {
498
548
  customerId: t || void 0,
499
549
  pagination: { limit: 50 }
500
550
  }, n)).kadaikodiListLoyaltyTransactions
501
551
  });
502
- }, ae = () => {
552
+ }, ce = () => {
503
553
  let t = o(), { apiGatewayUrl: n } = e();
504
554
  return i({
505
- mutationFn: async (e) => (await d(`mutation AwardLoyaltyPoints($input: KadaikodiAwardLoyaltyPointsInput!) {
506
- kadaikodiAwardLoyaltyPoints(input: $input) { ${Y} }
555
+ mutationFn: async (e) => (await u(`mutation AwardLoyaltyPoints($input: KadaikodiAwardLoyaltyPointsInput!) {
556
+ kadaikodiAwardLoyaltyPoints(input: $input) { ${Z} }
507
557
  }`, { input: e }, n)).kadaikodiAwardLoyaltyPoints,
508
558
  onSuccess: (e, n) => {
509
559
  t.invalidateQueries({ queryKey: [
@@ -513,7 +563,7 @@ var c = [
513
563
  ] }), t.invalidateQueries({ queryKey: ["kadaikodi", "loyalty-transactions"] });
514
564
  }
515
565
  });
516
- }, oe = (t) => {
566
+ }, le = (t) => {
517
567
  let { apiGatewayUrl: n } = e();
518
568
  return a({
519
569
  queryKey: [
@@ -521,13 +571,13 @@ var c = [
521
571
  "reviews",
522
572
  t
523
573
  ],
524
- queryFn: async () => (await d("query Reviews($providerId: String!) {\n kadaikodiListReviews(providerId: $providerId) {\n id providerId customerId rating review response createdAt updatedAt\n }\n }", { providerId: t }, n)).kadaikodiListReviews,
574
+ queryFn: async () => (await u("query Reviews($providerId: String!) {\n kadaikodiListReviews(providerId: $providerId) {\n id providerId customerId rating review response createdAt updatedAt\n }\n }", { providerId: t }, n)).kadaikodiListReviews,
525
575
  enabled: !!t
526
576
  });
527
- }, se = () => {
577
+ }, ue = () => {
528
578
  let r = o(), { apiGatewayUrl: a } = e(), s = n();
529
579
  return i({
530
- mutationFn: async (e) => (await d("mutation PlaceOrder($input: KadaikodiPlaceOrderInput!) {\n kadaikodiPlaceOrder(input: $input) {\n id orderNumber status total createdAt\n }\n }", { input: e }, a)).kadaikodiPlaceOrder,
580
+ mutationFn: async (e) => (await u("mutation PlaceOrder($input: KadaikodiPlaceOrderInput!) {\n kadaikodiPlaceOrder(input: $input) {\n id orderNumber status total createdAt\n }\n }", { input: e }, a)).kadaikodiPlaceOrder,
531
581
  onSuccess: (e, n) => {
532
582
  s(t.orderPlaced, {
533
583
  orderId: e.id,
@@ -538,10 +588,20 @@ var c = [
538
588
  }), r.invalidateQueries({ queryKey: ["kadaikodi", "orders"] }), r.invalidateQueries({ queryKey: ["kadaikodi", "dashboard-stats"] });
539
589
  }
540
590
  });
541
- }, ce = () => {
591
+ }, de = () => {
592
+ let { apiGatewayUrl: t } = e();
593
+ return i({ mutationFn: async (e) => (await u("mutation CreatePaymentIntent($input: KadaikodiCreatePaymentIntentInput!) {\n kadaikodiCreatePaymentIntent(input: $input) {\n orderId provider paymentMethod paymentId gatewayOrderId clientSecret providerKeyId status alreadyCreated\n }\n }", { input: {
594
+ orderId: e.orderId,
595
+ provider: e.provider,
596
+ paymentMethod: e.paymentMethod,
597
+ idempotencyKey: `${e.orderId}:payment-intent`,
598
+ postalCode: e.postalCode,
599
+ currency: e.currency ?? "INR"
600
+ } }, t)).kadaikodiCreatePaymentIntent });
601
+ }, fe = () => {
542
602
  let r = o(), { apiGatewayUrl: a } = e(), s = n();
543
603
  return i({
544
- mutationFn: async ({ id: e, status: t }) => (await d("mutation UpdateOrderStatus($id: ID!, $status: KadaikodiOrderStatus!) {\n kadaikodiUpdateOrderStatus(id: $id, status: $status) {\n id status\n }\n }", {
604
+ mutationFn: async ({ id: e, status: t }) => (await u("mutation UpdateOrderStatus($id: ID!, $status: KadaikodiOrderStatus!) {\n kadaikodiUpdateOrderStatus(id: $id, status: $status) {\n id status\n }\n }", {
545
605
  id: e,
546
606
  status: t
547
607
  }, a)).kadaikodiUpdateOrderStatus,
@@ -552,24 +612,27 @@ var c = [
552
612
  }), r.invalidateQueries({ queryKey: ["kadaikodi", "orders"] }), r.invalidateQueries({ queryKey: ["kadaikodi", "order"] }), r.invalidateQueries({ queryKey: ["kadaikodi", "dashboard-stats"] });
553
613
  }
554
614
  });
555
- }, le = () => {
556
- let t = o(), { apiGatewayUrl: n } = e();
615
+ }, pe = () => {
616
+ let r = o(), { apiGatewayUrl: a } = e(), s = n();
557
617
  return i({
558
- mutationFn: async (e) => (await d(`mutation CreateOffering($input: KadaikodiCreateOfferingInput!) {
618
+ mutationFn: async (e) => (await u(`mutation CreateOffering($input: KadaikodiCreateOfferingInput!) {
559
619
  kadaikodiCreateOffering(input: $input) {
560
- ${C}
620
+ ${S}
561
621
  }
562
- }`, { input: e }, n)).kadaikodiCreateOffering,
563
- onSuccess: () => {
564
- t.invalidateQueries({ queryKey: ["kadaikodi", "offerings"] });
622
+ }`, { input: e }, a)).kadaikodiCreateOffering,
623
+ onSuccess: (e, n) => {
624
+ s(t.offeringCreated, {
625
+ offeringId: e.id,
626
+ providerId: typeof n.providerId == "string" ? n.providerId : void 0
627
+ }), r.invalidateQueries({ queryKey: ["kadaikodi", "offerings"] });
565
628
  }
566
629
  });
567
- }, ue = () => {
630
+ }, me = () => {
568
631
  let t = o(), { apiGatewayUrl: n } = e();
569
632
  return i({
570
- mutationFn: async ({ id: e, input: t }) => (await d(`mutation UpdateOffering($id: ID!, $input: KadaikodiUpdateOfferingInput!) {
633
+ mutationFn: async ({ id: e, input: t }) => (await u(`mutation UpdateOffering($id: ID!, $input: KadaikodiUpdateOfferingInput!) {
571
634
  kadaikodiUpdateOffering(id: $id, input: $input) {
572
- ${C}
635
+ ${S}
573
636
  }
574
637
  }`, {
575
638
  id: e,
@@ -579,10 +642,10 @@ var c = [
579
642
  t.invalidateQueries({ queryKey: ["kadaikodi", "offerings"] }), t.invalidateQueries({ queryKey: ["kadaikodi", "offering"] });
580
643
  }
581
644
  });
582
- }, de = () => {
645
+ }, he = () => {
583
646
  let r = o(), { apiGatewayUrl: a } = e(), s = n();
584
647
  return i({
585
- mutationFn: async (e) => (await d("mutation Invest($input: KadaikodiInvestInput!) {\n kadaikodiInvest(input: $input) {\n id amount currentValue status investedAt\n }\n }", { input: e }, a)).kadaikodiInvest,
648
+ mutationFn: async (e) => (await u("mutation Invest($input: KadaikodiInvestInput!) {\n kadaikodiInvest(input: $input) {\n id amount currentValue status investedAt\n }\n }", { input: e }, a)).kadaikodiInvest,
586
649
  onSuccess: (e, n) => {
587
650
  s(t.investmentCommitted, {
588
651
  opportunityId: n.opportunityId,
@@ -590,26 +653,26 @@ var c = [
590
653
  }), r.invalidateQueries({ queryKey: ["kadaikodi", "investments"] }), r.invalidateQueries({ queryKey: ["kadaikodi", "investment-opportunities"] });
591
654
  }
592
655
  });
593
- }, fe = () => {
594
- let t = o(), { apiGatewayUrl: n } = e();
656
+ }, ge = () => {
657
+ let r = o(), { apiGatewayUrl: a } = e(), s = n();
595
658
  return i({
596
- mutationFn: async (e) => (await d("mutation CreateProvider($input: KadaikodiCreateServiceProviderInput!) {\n kadaikodiCreateServiceProvider(input: $input) {\n id name slug status category location rating\n }\n }", { input: e }, n)).kadaikodiCreateServiceProvider,
597
- onSuccess: () => {
598
- t.invalidateQueries({ queryKey: ["kadaikodi", "providers"] }), t.invalidateQueries({ queryKey: ["kadaikodi", "dashboard-stats"] });
659
+ mutationFn: async (e) => (await u("mutation CreateProvider($input: KadaikodiCreateServiceProviderInput!) {\n kadaikodiCreateServiceProvider(input: $input) {\n id name slug status category location rating\n }\n }", { input: e }, a)).kadaikodiCreateServiceProvider,
660
+ onSuccess: (e) => {
661
+ s(t.providerCreated, { providerId: e.id }), r.invalidateQueries({ queryKey: ["kadaikodi", "providers"] }), r.invalidateQueries({ queryKey: ["kadaikodi", "dashboard-stats"] });
599
662
  }
600
663
  });
601
- }, pe = () => {
664
+ }, _e = () => {
602
665
  let t = o(), { apiGatewayUrl: n } = e();
603
666
  return i({
604
- mutationFn: async (e) => (await d("mutation CreateProviderWorker($input: KadaikodiCreateProviderWorkerInput!) {\n kadaikodiCreateProviderWorker(input: $input) {\n id providerId workerId name role status metadata\n }\n }", { input: e }, n)).kadaikodiCreateProviderWorker,
667
+ mutationFn: async (e) => (await u("mutation CreateProviderWorker($input: KadaikodiCreateProviderWorkerInput!) {\n kadaikodiCreateProviderWorker(input: $input) {\n id providerId workerId name role status metadata\n }\n }", { input: e }, n)).kadaikodiCreateProviderWorker,
605
668
  onSuccess: () => {
606
669
  t.invalidateQueries({ queryKey: ["kadaikodi", "provider-workers"] });
607
670
  }
608
671
  });
609
- }, $ = () => {
672
+ }, ve = () => {
610
673
  let t = o(), { apiGatewayUrl: n } = e();
611
674
  return i({
612
- mutationFn: async ({ taskId: e, status: t }) => (await d("mutation UpdateTaskStatus($taskId: String!, $status: KadaikodiWorkerTaskStatus!) {\n kadaikodiUpdateWorkerTaskStatus(taskId: $taskId, status: $status) {\n id status\n }\n }", {
675
+ mutationFn: async ({ taskId: e, status: t }) => (await u("mutation UpdateTaskStatus($taskId: String!, $status: KadaikodiWorkerTaskStatus!) {\n kadaikodiUpdateWorkerTaskStatus(taskId: $taskId, status: $status) {\n id status\n }\n }", {
613
676
  taskId: e,
614
677
  status: t
615
678
  }, n)).kadaikodiUpdateWorkerTaskStatus,
@@ -617,10 +680,10 @@ var c = [
617
680
  t.invalidateQueries({ queryKey: ["kadaikodi", "worker-tasks"] }), t.invalidateQueries({ queryKey: ["kadaikodi", "worker-stats"] });
618
681
  }
619
682
  });
620
- }, me = () => {
683
+ }, ye = () => {
621
684
  let t = o(), { apiGatewayUrl: n } = e();
622
685
  return i({
623
- mutationFn: async ({ workerId: e, action: t }) => (await d("mutation ClockInOut($workerId: String!, $action: KadaikodiClockAction!) {\n kadaikodiWorkerClockInOut(workerId: $workerId, action: $action) {\n success message\n }\n }", {
686
+ mutationFn: async ({ workerId: e, action: t }) => (await u("mutation ClockInOut($workerId: String!, $action: KadaikodiClockAction!) {\n kadaikodiWorkerClockInOut(workerId: $workerId, action: $action) {\n success message\n }\n }", {
624
687
  workerId: e,
625
688
  action: t
626
689
  }, n)).kadaikodiWorkerClockInOut,
@@ -628,18 +691,18 @@ var c = [
628
691
  t.invalidateQueries({ queryKey: ["kadaikodi", "worker-schedules"] });
629
692
  }
630
693
  });
631
- }, he = () => {
694
+ }, be = () => {
632
695
  let t = o(), { apiGatewayUrl: n } = e();
633
696
  return i({
634
- mutationFn: async (e) => (await d("mutation CreateOpportunity($input: KadaikodiCreateInvestmentOpportunityInput!) {\n kadaikodiCreateInvestmentOpportunity(input: $input) { id title targetAmount status }\n }", { input: e }, n)).kadaikodiCreateInvestmentOpportunity,
697
+ mutationFn: async (e) => (await u("mutation CreateOpportunity($input: KadaikodiCreateInvestmentOpportunityInput!) {\n kadaikodiCreateInvestmentOpportunity(input: $input) { id title targetAmount status }\n }", { input: e }, n)).kadaikodiCreateInvestmentOpportunity,
635
698
  onSuccess: () => {
636
699
  t.invalidateQueries({ queryKey: ["kadaikodi", "investment-opportunities"] });
637
700
  }
638
701
  });
639
- }, ge = () => {
702
+ }, $ = () => {
640
703
  let r = o(), { apiGatewayUrl: a } = e(), s = n();
641
704
  return i({
642
- mutationFn: async (e) => (await d("mutation CreateReview($input: KadaikodiCreateReviewInput!) {\n kadaikodiCreateReview(input: $input) { id rating review createdAt }\n }", { input: e }, a)).kadaikodiCreateReview,
705
+ mutationFn: async (e) => (await u("mutation CreateReview($input: KadaikodiCreateReviewInput!) {\n kadaikodiCreateReview(input: $input) { id rating review createdAt }\n }", { input: e }, a)).kadaikodiCreateReview,
643
706
  onSuccess: (e, n) => {
644
707
  s(t.reviewSubmitted, {
645
708
  reviewId: e.id,
@@ -649,10 +712,10 @@ var c = [
649
712
  }), r.invalidateQueries({ queryKey: ["kadaikodi", "reviews"] }), r.invalidateQueries({ queryKey: ["kadaikodi", "providers"] });
650
713
  }
651
714
  });
652
- }, _e = () => {
715
+ }, xe = () => {
653
716
  let t = o(), { apiGatewayUrl: n } = e();
654
717
  return i({
655
- mutationFn: async ({ id: e, input: t }) => (await d("mutation UpdateProvider($id: ID!, $input: KadaikodiUpdateServiceProviderInput!) {\n kadaikodiUpdateServiceProvider(id: $id, input: $input) {\n id name slug status category location businessHours serviceTypes rating\n }\n }", {
718
+ mutationFn: async ({ id: e, input: t }) => (await u("mutation UpdateProvider($id: ID!, $input: KadaikodiUpdateServiceProviderInput!) {\n kadaikodiUpdateServiceProvider(id: $id, input: $input) {\n id name slug status category location businessHours serviceTypes rating\n }\n }", {
656
719
  id: e,
657
720
  input: t
658
721
  }, n)).kadaikodiUpdateServiceProvider,
@@ -660,18 +723,18 @@ var c = [
660
723
  t.invalidateQueries({ queryKey: ["kadaikodi", "providers"] }), t.invalidateQueries({ queryKey: ["kadaikodi", "provider"] }), t.invalidateQueries({ queryKey: ["kadaikodi", "dashboard-stats"] });
661
724
  }
662
725
  });
663
- }, ve = () => {
726
+ }, Se = () => {
664
727
  let t = o(), { apiGatewayUrl: n } = e();
665
728
  return i({
666
- mutationFn: async (e) => (await d("mutation DeleteOffering($id: ID!) { kadaikodiDeleteOffering(id: $id) }", { id: e }, n)).kadaikodiDeleteOffering,
729
+ mutationFn: async (e) => (await u("mutation DeleteOffering($id: ID!) { kadaikodiDeleteOffering(id: $id) }", { id: e }, n)).kadaikodiDeleteOffering,
667
730
  onSuccess: () => {
668
731
  t.invalidateQueries({ queryKey: ["kadaikodi", "offerings"] });
669
732
  }
670
733
  });
671
- }, ye = () => {
734
+ }, Ce = () => {
672
735
  let t = o(), { apiGatewayUrl: n } = e();
673
736
  return i({
674
- mutationFn: async ({ taskId: e, status: t, notes: r }) => (await d("mutation UpdateWorkerTask($taskId: String!, $status: KadaikodiWorkerTaskStatus, $notes: String) {\n kadaikodiUpdateWorkerTask(taskId: $taskId, status: $status, notes: $notes) { id status }\n }", {
737
+ mutationFn: async ({ taskId: e, status: t, notes: r }) => (await u("mutation UpdateWorkerTask($taskId: String!, $status: KadaikodiWorkerTaskStatus, $notes: String) {\n kadaikodiUpdateWorkerTask(taskId: $taskId, status: $status, notes: $notes) { id status }\n }", {
675
738
  taskId: e,
676
739
  status: t,
677
740
  notes: r
@@ -680,10 +743,10 @@ var c = [
680
743
  t.invalidateQueries({ queryKey: ["kadaikodi", "worker-tasks"] }), t.invalidateQueries({ queryKey: ["kadaikodi", "worker-stats"] });
681
744
  }
682
745
  });
683
- }, be = () => {
746
+ }, we = () => {
684
747
  let t = o(), { apiGatewayUrl: n } = e();
685
748
  return i({
686
- mutationFn: async ({ id: e, metadata: t }) => (await d("mutation UpdateProviderWorker($id: ID!, $metadata: JSON!) {\n kadaikodiUpdateProviderWorker(id: $id, metadata: $metadata) { id name metadata }\n }", {
749
+ mutationFn: async ({ id: e, metadata: t }) => (await u("mutation UpdateProviderWorker($id: ID!, $metadata: JSON!) {\n kadaikodiUpdateProviderWorker(id: $id, metadata: $metadata) { id name metadata }\n }", {
687
750
  id: e,
688
751
  metadata: t
689
752
  }, n)).kadaikodiUpdateProviderWorker,
@@ -691,8 +754,8 @@ var c = [
691
754
  t.invalidateQueries({ queryKey: ["kadaikodi", "provider-workers"] }), t.invalidateQueries({ queryKey: ["kadaikodi", "worker-schedules"] });
692
755
  }
693
756
  });
694
- }, xe = () => {
695
- let { currentUser: t } = e(), n = w(), i = D({ customerId: t?.id }), a = k(), o = j(), s = M(t?.id || "");
757
+ }, Te = () => {
758
+ let { currentUser: t } = e(), n = C(), i = k({ customerId: t?.id }), a = j(), o = N(), s = P(t?.id || "");
696
759
  return r(() => ({
697
760
  providers: n,
698
761
  orders: i,
@@ -708,6 +771,6 @@ var c = [
708
771
  ]);
709
772
  };
710
773
  //#endregion
711
- export { B as useAddAddress, G as useAddPaymentMethod, A as useAdminAnalytics, ae as useAwardLoyaltyPoints, he as useCreateInvestmentOpportunity, le as useCreateOffering, fe as useCreateProvider, pe as useCreateProviderWorker, ge as useCreateReview, k as useDashboardStats, H as useDeleteAddress, ve as useDeleteOffering, de as useInvest, j as useInvestmentOpportunities, M as useInvestments, xe as useKadaikodiApi, ie as useListLoyaltyTransactions, re as useLoyaltyAccountByCustomerId, z as useMyAddresses, J as useMyFavoriteProviderIds, Z as useMyLoyaltyAccount, Q as useMyLoyaltyTransactions, W as useMyPaymentMethods, E as useOfferings, O as useOrder, D as useOrders, se as usePlaceOrder, T as useProvider, N as useProviderWorkers, w as useProviders, ne as useRedeemLoyaltyPoints, K as useRemovePaymentMethod, oe as useReviews, U as useSetDefaultAddress, q as useSetDefaultPaymentMethod, te as useToggleFavorite, V as useUpdateAddress, ue as useUpdateOffering, ce as useUpdateOrderStatus, _e as useUpdateProvider, be as useUpdateProviderWorker, ye as useUpdateWorkerTask, $ as useUpdateWorkerTaskStatus, me as useWorkerClockInOut, I as useWorkerSchedules, F as useWorkerStats, P as useWorkerTasks };
774
+ export { H as useAddAddress, q as useAddPaymentMethod, M as useAdminAnalytics, ce as useAwardLoyaltyPoints, be as useCreateInvestmentOpportunity, pe as useCreateOffering, de as useCreatePaymentIntent, ge as useCreateProvider, _e as useCreateProviderWorker, $ as useCreateReview, j as useDashboardStats, W as useDeleteAddress, Se as useDeleteOffering, he as useInvest, N as useInvestmentOpportunities, P as useInvestments, Te as useKadaikodiApi, se as useListLoyaltyTransactions, oe as useLoyaltyAccountByCustomerId, V as useMyAddresses, Y as useMyFavoriteProviderIds, re as useMyLoyaltyAccount, ie as useMyLoyaltyTransactions, K as useMyPaymentMethods, T as useOfferings, A as useOrder, k as useOrders, ue as usePlaceOrder, w as useProvider, F as useProviderWorkers, C as useProviders, O as useRankedOfferings, ae as useRedeemLoyaltyPoints, ne as useRemovePaymentMethod, le as useReviews, G as useSetDefaultAddress, J as useSetDefaultPaymentMethod, X as useToggleFavorite, U as useUpdateAddress, me as useUpdateOffering, fe as useUpdateOrderStatus, xe as useUpdateProvider, we as useUpdateProviderWorker, Ce as useUpdateWorkerTask, ve as useUpdateWorkerTaskStatus, ye as useWorkerClockInOut, R as useWorkerSchedules, L as useWorkerStats, I as useWorkerTasks };
712
775
 
713
776
  //# sourceMappingURL=useKadaikodiApi.js.map