@burdenoff/microfe-kadaikodi 2026.723.1 → 2026.731.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.
- package/dist/kadaikodi/KadaikodiRoutes.d.ts.map +1 -1
- package/dist/kadaikodi/KadaikodiRoutes.js +33 -29
- package/dist/kadaikodi/KadaikodiRoutes.js.map +1 -1
- package/dist/kadaikodi/hooks/useKadaikodiApi.d.ts +45 -1
- package/dist/kadaikodi/hooks/useKadaikodiApi.d.ts.map +1 -1
- package/dist/kadaikodi/hooks/useKadaikodiApi.js +141 -68
- package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.d.ts.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js +180 -162
- package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/LoyaltyManagementPage.d.ts +12 -0
- package/dist/kadaikodi/pages/cart-owner/LoyaltyManagementPage.d.ts.map +1 -0
- package/dist/kadaikodi/pages/cart-owner/LoyaltyManagementPage.js +198 -0
- package/dist/kadaikodi/pages/cart-owner/LoyaltyManagementPage.js.map +1 -0
- package/dist/kadaikodi/pages/customer/CartDetailPage.d.ts.map +1 -1
- package/dist/kadaikodi/pages/customer/CartDetailPage.js +233 -231
- package/dist/kadaikodi/pages/customer/CartDetailPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CustomerProfilePage.d.ts.map +1 -1
- package/dist/kadaikodi/pages/customer/CustomerProfilePage.js +256 -97
- package/dist/kadaikodi/pages/customer/CustomerProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/OrderTrackingPage.d.ts.map +1 -1
- package/dist/kadaikodi/pages/customer/OrderTrackingPage.js +122 -63
- package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
- package/dist/kadaikodi/store/index.d.ts +1 -0
- package/dist/kadaikodi/store/index.d.ts.map +1 -1
- package/dist/kadaikodi/store/kadaikodiStore.d.ts +35 -0
- package/dist/kadaikodi/store/kadaikodiStore.d.ts.map +1 -1
- package/dist/kadaikodi/store/kadaikodiStore.js +18 -2
- package/dist/kadaikodi/store/kadaikodiStore.js.map +1 -1
- package/dist/kadaikodi/utils/index.d.ts +1 -0
- package/dist/kadaikodi/utils/index.d.ts.map +1 -1
- package/dist/kadaikodi/utils/orderStatusNotifier.d.ts +43 -0
- package/dist/kadaikodi/utils/orderStatusNotifier.d.ts.map +1 -0
- package/dist/kadaikodi/utils/orderStatusNotifier.js +28 -0
- package/dist/kadaikodi/utils/orderStatusNotifier.js.map +1 -0
- package/dist/node_modules/@capacitor/core/dist/index.js +270 -0
- package/dist/node_modules/@capacitor/core/dist/index.js.map +1 -0
- package/package.json +3 -1
|
@@ -63,7 +63,7 @@ var o = async (e, t, n) => {
|
|
|
63
63
|
paymentMethod: e.paymentMethod ?? "Cash",
|
|
64
64
|
paymentStatus: e.paymentStatus.toLowerCase(),
|
|
65
65
|
timeline: e.timeline ?? []
|
|
66
|
-
}),
|
|
66
|
+
}), ee = (e) => ({
|
|
67
67
|
id: e.id,
|
|
68
68
|
cartId: e.providerId,
|
|
69
69
|
cartName: e.provider?.name ?? "Unknown Cart",
|
|
@@ -82,7 +82,7 @@ var o = async (e, t, n) => {
|
|
|
82
82
|
status: e.status.toLowerCase(),
|
|
83
83
|
createdAt: e.createdAt,
|
|
84
84
|
expiresAt: e.expiresAt ?? ""
|
|
85
|
-
}),
|
|
85
|
+
}), te = (e) => ({
|
|
86
86
|
id: e.id,
|
|
87
87
|
opportunityId: e.opportunityId,
|
|
88
88
|
cartName: e.opportunity?.provider?.name ?? "Unknown Cart",
|
|
@@ -92,7 +92,7 @@ var o = async (e, t, n) => {
|
|
|
92
92
|
returnsPercentage: e.expectedReturnsPct,
|
|
93
93
|
investmentDate: e.investedAt,
|
|
94
94
|
status: e.status.toLowerCase()
|
|
95
|
-
}),
|
|
95
|
+
}), d = (e) => ({
|
|
96
96
|
id: e.id,
|
|
97
97
|
orderId: e.orderId ?? "",
|
|
98
98
|
cartId: e.providerId ?? "",
|
|
@@ -110,7 +110,7 @@ var o = async (e, t, n) => {
|
|
|
110
110
|
earnings: e.earnings ?? 0,
|
|
111
111
|
distance: e.distance ?? void 0,
|
|
112
112
|
notes: e.notes ?? void 0
|
|
113
|
-
}),
|
|
113
|
+
}), f = (e) => ({
|
|
114
114
|
id: e.id,
|
|
115
115
|
date: e.date,
|
|
116
116
|
startTime: e.startTime,
|
|
@@ -120,7 +120,7 @@ var o = async (e, t, n) => {
|
|
|
120
120
|
status: e.status.toLowerCase(),
|
|
121
121
|
tasksCompleted: e.tasksCompleted,
|
|
122
122
|
totalEarnings: e.totalEarnings
|
|
123
|
-
}),
|
|
123
|
+
}), p = "\n id name slug category status ownerId rating totalRatings averageOrderValue serviceTypes location businessHours createdAt\n", m = "\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", h = "\n id providerId kind name slug category description price originalPrice stock durationMinutes serviceType tags isAvailable metadata media\n", g = (t) => {
|
|
124
124
|
let { apiGatewayUrl: n } = e();
|
|
125
125
|
return r({
|
|
126
126
|
queryKey: [
|
|
@@ -130,14 +130,14 @@ var o = async (e, t, n) => {
|
|
|
130
130
|
],
|
|
131
131
|
queryFn: async () => (await o(`query Providers($filter: KadaikodiProviderFilterInput, $pagination: KadaikodiPaginationInput) {
|
|
132
132
|
kadaikodiListServiceProviders(filter: $filter, pagination: $pagination) {
|
|
133
|
-
${
|
|
133
|
+
${p}
|
|
134
134
|
}
|
|
135
135
|
}`, {
|
|
136
136
|
filter: t ? { query: t } : void 0,
|
|
137
137
|
pagination: { limit: 200 }
|
|
138
138
|
}, n)).kadaikodiListServiceProviders.map(l)
|
|
139
139
|
});
|
|
140
|
-
},
|
|
140
|
+
}, _ = (t) => {
|
|
141
141
|
let { apiGatewayUrl: n } = e();
|
|
142
142
|
return r({
|
|
143
143
|
queryKey: [
|
|
@@ -148,14 +148,14 @@ var o = async (e, t, n) => {
|
|
|
148
148
|
queryFn: async () => {
|
|
149
149
|
let e = await o(`query Provider($id: ID!) {
|
|
150
150
|
kadaikodiServiceProvider(id: $id) {
|
|
151
|
-
${
|
|
151
|
+
${p}
|
|
152
152
|
}
|
|
153
153
|
}`, { id: t }, n);
|
|
154
154
|
return e.kadaikodiServiceProvider ? l(e.kadaikodiServiceProvider) : null;
|
|
155
155
|
},
|
|
156
156
|
enabled: !!t
|
|
157
157
|
});
|
|
158
|
-
},
|
|
158
|
+
}, v = (t) => {
|
|
159
159
|
let { apiGatewayUrl: n } = e();
|
|
160
160
|
return r({
|
|
161
161
|
queryKey: [
|
|
@@ -165,7 +165,7 @@ var o = async (e, t, n) => {
|
|
|
165
165
|
],
|
|
166
166
|
queryFn: async () => (await o(`query Offerings($providerId: String, $pagination: KadaikodiPaginationInput) {
|
|
167
167
|
kadaikodiListOfferings(providerId: $providerId, pagination: $pagination) {
|
|
168
|
-
${
|
|
168
|
+
${h}
|
|
169
169
|
}
|
|
170
170
|
}`, {
|
|
171
171
|
providerId: t,
|
|
@@ -173,7 +173,7 @@ var o = async (e, t, n) => {
|
|
|
173
173
|
}, n)).kadaikodiListOfferings,
|
|
174
174
|
enabled: !!t
|
|
175
175
|
});
|
|
176
|
-
},
|
|
176
|
+
}, y = (t = {}) => {
|
|
177
177
|
let { apiGatewayUrl: n } = e();
|
|
178
178
|
return r({
|
|
179
179
|
queryKey: [
|
|
@@ -184,15 +184,15 @@ var o = async (e, t, n) => {
|
|
|
184
184
|
],
|
|
185
185
|
queryFn: async () => (await o(`query Orders($providerId: String, $customerId: String, $pagination: KadaikodiPaginationInput) {
|
|
186
186
|
kadaikodiListOrders(providerId: $providerId, customerId: $customerId, pagination: $pagination) {
|
|
187
|
-
${
|
|
187
|
+
${m}
|
|
188
188
|
}
|
|
189
189
|
}`, {
|
|
190
190
|
...t,
|
|
191
191
|
pagination: { limit: 200 }
|
|
192
192
|
}, n)).kadaikodiListOrders.map(u)
|
|
193
193
|
});
|
|
194
|
-
},
|
|
195
|
-
let { apiGatewayUrl:
|
|
194
|
+
}, b = (t, n = {}) => {
|
|
195
|
+
let { apiGatewayUrl: i } = e();
|
|
196
196
|
return r({
|
|
197
197
|
queryKey: [
|
|
198
198
|
"kadaikodi",
|
|
@@ -202,32 +202,37 @@ var o = async (e, t, n) => {
|
|
|
202
202
|
queryFn: async () => {
|
|
203
203
|
let e = await o(`query Order($id: ID!) {
|
|
204
204
|
kadaikodiOrder(id: $id) {
|
|
205
|
-
${
|
|
205
|
+
${m}
|
|
206
206
|
}
|
|
207
|
-
}`, { id: t },
|
|
207
|
+
}`, { id: t }, i);
|
|
208
208
|
return e.kadaikodiOrder ? u(e.kadaikodiOrder) : null;
|
|
209
209
|
},
|
|
210
|
-
enabled: !!t
|
|
210
|
+
enabled: !!t,
|
|
211
|
+
refetchInterval: (e) => {
|
|
212
|
+
if (!n.pollWhileActive) return !1;
|
|
213
|
+
let t = e.state.data;
|
|
214
|
+
return t ? t.status === "delivered" || t.status === "cancelled" ? !1 : 15e3 : !1;
|
|
215
|
+
}
|
|
211
216
|
});
|
|
212
|
-
},
|
|
217
|
+
}, x = () => {
|
|
213
218
|
let { apiGatewayUrl: t } = e();
|
|
214
219
|
return r({
|
|
215
220
|
queryKey: ["kadaikodi", "dashboard-stats"],
|
|
216
221
|
queryFn: async () => (await o("query DashboardStats { kadaikodiDashboardStats { totalOrders totalRevenue activeProviders activeCustomers avgRating pendingOrders } }", {}, t)).kadaikodiDashboardStats
|
|
217
222
|
});
|
|
218
|
-
},
|
|
223
|
+
}, S = () => {
|
|
219
224
|
let { apiGatewayUrl: t } = e();
|
|
220
225
|
return r({
|
|
221
226
|
queryKey: ["kadaikodi", "admin-analytics"],
|
|
222
227
|
queryFn: async () => (await o("query AdminAnalytics { kadaikodiAdminAnalytics { revenueByCategory orderTrends topProviders customerGrowth categoryDistribution } }", {}, t)).kadaikodiAdminAnalytics
|
|
223
228
|
});
|
|
224
|
-
},
|
|
229
|
+
}, C = () => {
|
|
225
230
|
let { apiGatewayUrl: t } = e();
|
|
226
231
|
return r({
|
|
227
232
|
queryKey: ["kadaikodi", "investment-opportunities"],
|
|
228
|
-
queryFn: async () => (await o("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(
|
|
233
|
+
queryFn: async () => (await o("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(ee)
|
|
229
234
|
});
|
|
230
|
-
},
|
|
235
|
+
}, w = (t) => {
|
|
231
236
|
let { apiGatewayUrl: n } = e();
|
|
232
237
|
return r({
|
|
233
238
|
queryKey: [
|
|
@@ -235,10 +240,10 @@ var o = async (e, t, n) => {
|
|
|
235
240
|
"investments",
|
|
236
241
|
t
|
|
237
242
|
],
|
|
238
|
-
queryFn: async () => (await o("query Investments {\n kadaikodiListInvestments {\n id opportunityId amount currentValue expectedReturnsPct status investedAt maturedAt realizedReturns\n opportunity { provider { name } }\n }\n }", {}, n)).kadaikodiListInvestments.map(
|
|
243
|
+
queryFn: async () => (await o("query Investments {\n kadaikodiListInvestments {\n id opportunityId amount currentValue expectedReturnsPct status investedAt maturedAt realizedReturns\n opportunity { provider { name } }\n }\n }", {}, n)).kadaikodiListInvestments.map(te),
|
|
239
244
|
enabled: !!t
|
|
240
245
|
});
|
|
241
|
-
},
|
|
246
|
+
}, T = (t) => {
|
|
242
247
|
let { apiGatewayUrl: n } = e();
|
|
243
248
|
return r({
|
|
244
249
|
queryKey: [
|
|
@@ -249,7 +254,7 @@ var o = async (e, t, n) => {
|
|
|
249
254
|
queryFn: async () => (await o("query ProviderWorkers($providerId: String!) {\n kadaikodiListProviderWorkers(providerId: $providerId) {\n id providerId workerId name role status metadata\n }\n }", { providerId: t }, n)).kadaikodiListProviderWorkers,
|
|
250
255
|
enabled: !!t
|
|
251
256
|
});
|
|
252
|
-
},
|
|
257
|
+
}, E = (t) => {
|
|
253
258
|
let { apiGatewayUrl: n } = e();
|
|
254
259
|
return r({
|
|
255
260
|
queryKey: [
|
|
@@ -257,10 +262,10 @@ var o = async (e, t, n) => {
|
|
|
257
262
|
"worker-tasks",
|
|
258
263
|
t
|
|
259
264
|
],
|
|
260
|
-
queryFn: async () => (await o("query WorkerTasks($pagination: KadaikodiPaginationInput) {\n kadaikodiWorkerTasks(pagination: $pagination) {\n id orderId providerId type description priority status assignedAt dueAt completedAt customerName customerPhone earnings distance notes\n provider { name }\n order { deliveryAddress }\n }\n }", { pagination: { limit: 100 } }, n)).kadaikodiWorkerTasks.map(
|
|
265
|
+
queryFn: async () => (await o("query WorkerTasks($pagination: KadaikodiPaginationInput) {\n kadaikodiWorkerTasks(pagination: $pagination) {\n id orderId providerId type description priority status assignedAt dueAt completedAt customerName customerPhone earnings distance notes\n provider { name }\n order { deliveryAddress }\n }\n }", { pagination: { limit: 100 } }, n)).kadaikodiWorkerTasks.map(d),
|
|
261
266
|
enabled: !!t
|
|
262
267
|
});
|
|
263
|
-
},
|
|
268
|
+
}, D = (t) => {
|
|
264
269
|
let { apiGatewayUrl: n } = e();
|
|
265
270
|
return r({
|
|
266
271
|
queryKey: [
|
|
@@ -271,7 +276,7 @@ var o = async (e, t, n) => {
|
|
|
271
276
|
queryFn: async () => (await o("query WorkerStats {\n kadaikodiWorkerStats {\n totalDeliveries totalEarnings averageRating completionRate todayTasks todayEarnings\n }\n }", {}, n)).kadaikodiWorkerStats,
|
|
272
277
|
enabled: !!t
|
|
273
278
|
});
|
|
274
|
-
},
|
|
279
|
+
}, O = (t) => {
|
|
275
280
|
let { apiGatewayUrl: n } = e();
|
|
276
281
|
return r({
|
|
277
282
|
queryKey: [
|
|
@@ -279,35 +284,35 @@ var o = async (e, t, n) => {
|
|
|
279
284
|
"worker-schedules",
|
|
280
285
|
t
|
|
281
286
|
],
|
|
282
|
-
queryFn: async () => (await o("query WorkerSchedules {\n kadaikodiListWorkerSchedules {\n id date startTime endTime providerId status tasksCompleted totalEarnings\n provider { name }\n }\n }", {}, n)).kadaikodiListWorkerSchedules.map(
|
|
287
|
+
queryFn: async () => (await o("query WorkerSchedules {\n kadaikodiListWorkerSchedules {\n id date startTime endTime providerId status tasksCompleted totalEarnings\n provider { name }\n }\n }", {}, n)).kadaikodiListWorkerSchedules.map(f),
|
|
283
288
|
enabled: !!t
|
|
284
289
|
});
|
|
285
|
-
},
|
|
290
|
+
}, k = "\n id type nickname addressLine1 addressLine2 city state zipCode isDefault usageCount lastUsedAt\n", A = "\n id type label detail isDefault\n", j = () => {
|
|
286
291
|
let { apiGatewayUrl: t, currentUser: n } = e();
|
|
287
292
|
return r({
|
|
288
293
|
queryKey: ["kadaikodi", "my-addresses"],
|
|
289
294
|
queryFn: async () => (await o(`query MyAddresses($pagination: KadaikodiPaginationInput) {
|
|
290
295
|
kadaikodiMyAddresses(pagination: $pagination) {
|
|
291
|
-
${
|
|
296
|
+
${k}
|
|
292
297
|
}
|
|
293
298
|
}`, { pagination: { limit: 100 } }, t)).kadaikodiMyAddresses,
|
|
294
299
|
enabled: !!n?.id
|
|
295
300
|
});
|
|
296
|
-
},
|
|
301
|
+
}, M = () => {
|
|
297
302
|
let t = i(), { apiGatewayUrl: r } = e();
|
|
298
303
|
return n({
|
|
299
304
|
mutationFn: async (e) => (await o(`mutation AddAddress($input: KadaikodiAddAddressInput!) {
|
|
300
|
-
kadaikodiAddAddress(input: $input) { ${
|
|
305
|
+
kadaikodiAddAddress(input: $input) { ${k} }
|
|
301
306
|
}`, { input: e }, r)).kadaikodiAddAddress,
|
|
302
307
|
onSuccess: () => {
|
|
303
308
|
t.invalidateQueries({ queryKey: ["kadaikodi", "my-addresses"] });
|
|
304
309
|
}
|
|
305
310
|
});
|
|
306
|
-
},
|
|
311
|
+
}, N = () => {
|
|
307
312
|
let t = i(), { apiGatewayUrl: r } = e();
|
|
308
313
|
return n({
|
|
309
314
|
mutationFn: async ({ id: e, input: t }) => (await o(`mutation UpdateAddress($id: ID!, $input: KadaikodiUpdateAddressInput!) {
|
|
310
|
-
kadaikodiUpdateAddress(id: $id, input: $input) { ${
|
|
315
|
+
kadaikodiUpdateAddress(id: $id, input: $input) { ${k} }
|
|
311
316
|
}`, {
|
|
312
317
|
id: e,
|
|
313
318
|
input: t
|
|
@@ -316,7 +321,7 @@ var o = async (e, t, n) => {
|
|
|
316
321
|
t.invalidateQueries({ queryKey: ["kadaikodi", "my-addresses"] });
|
|
317
322
|
}
|
|
318
323
|
});
|
|
319
|
-
},
|
|
324
|
+
}, P = () => {
|
|
320
325
|
let t = i(), { apiGatewayUrl: r } = e();
|
|
321
326
|
return n({
|
|
322
327
|
mutationFn: async (e) => (await o("mutation DeleteAddress($id: ID!) { kadaikodiDeleteAddress(id: $id) }", { id: e }, r)).kadaikodiDeleteAddress,
|
|
@@ -324,36 +329,36 @@ var o = async (e, t, n) => {
|
|
|
324
329
|
t.invalidateQueries({ queryKey: ["kadaikodi", "my-addresses"] });
|
|
325
330
|
}
|
|
326
331
|
});
|
|
327
|
-
},
|
|
332
|
+
}, F = () => {
|
|
328
333
|
let t = i(), { apiGatewayUrl: r } = e();
|
|
329
334
|
return n({
|
|
330
|
-
mutationFn: async (e) => (await o(`mutation SetDefaultAddress($id: ID!) { kadaikodiSetDefaultAddress(id: $id) { ${
|
|
335
|
+
mutationFn: async (e) => (await o(`mutation SetDefaultAddress($id: ID!) { kadaikodiSetDefaultAddress(id: $id) { ${k} } }`, { id: e }, r)).kadaikodiSetDefaultAddress,
|
|
331
336
|
onSuccess: () => {
|
|
332
337
|
t.invalidateQueries({ queryKey: ["kadaikodi", "my-addresses"] });
|
|
333
338
|
}
|
|
334
339
|
});
|
|
335
|
-
},
|
|
340
|
+
}, I = () => {
|
|
336
341
|
let { apiGatewayUrl: t, currentUser: n } = e();
|
|
337
342
|
return r({
|
|
338
343
|
queryKey: ["kadaikodi", "my-payment-methods"],
|
|
339
344
|
queryFn: async () => (await o(`query MyPaymentMethods($pagination: KadaikodiPaginationInput) {
|
|
340
345
|
kadaikodiMyPaymentMethods(pagination: $pagination) {
|
|
341
|
-
${
|
|
346
|
+
${A}
|
|
342
347
|
}
|
|
343
348
|
}`, { pagination: { limit: 100 } }, t)).kadaikodiMyPaymentMethods,
|
|
344
349
|
enabled: !!n?.id
|
|
345
350
|
});
|
|
346
|
-
},
|
|
351
|
+
}, L = () => {
|
|
347
352
|
let t = i(), { apiGatewayUrl: r } = e();
|
|
348
353
|
return n({
|
|
349
354
|
mutationFn: async (e) => (await o(`mutation AddPaymentMethod($input: KadaikodiAddPaymentMethodInput!) {
|
|
350
|
-
kadaikodiAddPaymentMethod(input: $input) { ${
|
|
355
|
+
kadaikodiAddPaymentMethod(input: $input) { ${A} }
|
|
351
356
|
}`, { input: e }, r)).kadaikodiAddPaymentMethod,
|
|
352
357
|
onSuccess: () => {
|
|
353
358
|
t.invalidateQueries({ queryKey: ["kadaikodi", "my-payment-methods"] });
|
|
354
359
|
}
|
|
355
360
|
});
|
|
356
|
-
},
|
|
361
|
+
}, R = () => {
|
|
357
362
|
let t = i(), { apiGatewayUrl: r } = e();
|
|
358
363
|
return n({
|
|
359
364
|
mutationFn: async (e) => (await o("mutation RemovePaymentMethod($id: ID!) { kadaikodiRemovePaymentMethod(id: $id) }", { id: e }, r)).kadaikodiRemovePaymentMethod,
|
|
@@ -361,24 +366,24 @@ var o = async (e, t, n) => {
|
|
|
361
366
|
t.invalidateQueries({ queryKey: ["kadaikodi", "my-payment-methods"] });
|
|
362
367
|
}
|
|
363
368
|
});
|
|
364
|
-
},
|
|
369
|
+
}, z = () => {
|
|
365
370
|
let t = i(), { apiGatewayUrl: r } = e();
|
|
366
371
|
return n({
|
|
367
372
|
mutationFn: async (e) => (await o(`mutation SetDefaultPaymentMethod($id: ID!) {
|
|
368
|
-
kadaikodiSetDefaultPaymentMethod(id: $id) { ${
|
|
373
|
+
kadaikodiSetDefaultPaymentMethod(id: $id) { ${A} }
|
|
369
374
|
}`, { id: e }, r)).kadaikodiSetDefaultPaymentMethod,
|
|
370
375
|
onSuccess: () => {
|
|
371
376
|
t.invalidateQueries({ queryKey: ["kadaikodi", "my-payment-methods"] });
|
|
372
377
|
}
|
|
373
378
|
});
|
|
374
|
-
},
|
|
379
|
+
}, B = () => {
|
|
375
380
|
let { apiGatewayUrl: t, currentUser: n } = e();
|
|
376
381
|
return r({
|
|
377
382
|
queryKey: ["kadaikodi", "my-favorite-provider-ids"],
|
|
378
383
|
queryFn: async () => (await o("query MyFavoriteProviderIds { kadaikodiMyFavoriteProviderIds }", {}, t)).kadaikodiMyFavoriteProviderIds,
|
|
379
384
|
enabled: !!n?.id
|
|
380
385
|
});
|
|
381
|
-
},
|
|
386
|
+
}, V = () => {
|
|
382
387
|
let t = i(), { apiGatewayUrl: r } = e();
|
|
383
388
|
return n({
|
|
384
389
|
mutationFn: async (e) => (await o("mutation ToggleFavorite($providerId: String!) { kadaikodiToggleFavorite(providerId: $providerId) }", { providerId: e }, r)).kadaikodiToggleFavorite,
|
|
@@ -394,7 +399,75 @@ var o = async (e, t, n) => {
|
|
|
394
399
|
t.invalidateQueries({ queryKey: ["kadaikodi", "my-favorite-provider-ids"] });
|
|
395
400
|
}
|
|
396
401
|
});
|
|
397
|
-
}, U = (
|
|
402
|
+
}, H = "\n id customerId pointsBalance lifetimePointsEarned lifetimePointsRedeemed createdAt updatedAt\n", U = "\n id accountId customerId orderId type points balanceAfter description createdAt\n", W = () => {
|
|
403
|
+
let { apiGatewayUrl: t, currentUser: n } = e();
|
|
404
|
+
return r({
|
|
405
|
+
queryKey: ["kadaikodi", "my-loyalty-account"],
|
|
406
|
+
queryFn: async () => (await o(`query MyLoyaltyAccount { kadaikodiMyLoyaltyAccount { ${H} } }`, {}, t)).kadaikodiMyLoyaltyAccount,
|
|
407
|
+
enabled: !!n?.id
|
|
408
|
+
});
|
|
409
|
+
}, G = () => {
|
|
410
|
+
let { apiGatewayUrl: t, currentUser: n } = e();
|
|
411
|
+
return r({
|
|
412
|
+
queryKey: ["kadaikodi", "my-loyalty-transactions"],
|
|
413
|
+
queryFn: async () => (await o(`query MyLoyaltyTransactions($pagination: KadaikodiPaginationInput) {
|
|
414
|
+
kadaikodiMyLoyaltyTransactions(pagination: $pagination) { ${U} }
|
|
415
|
+
}`, { pagination: { limit: 50 } }, t)).kadaikodiMyLoyaltyTransactions,
|
|
416
|
+
enabled: !!n?.id
|
|
417
|
+
});
|
|
418
|
+
}, K = () => {
|
|
419
|
+
let t = i(), { apiGatewayUrl: r } = e();
|
|
420
|
+
return n({
|
|
421
|
+
mutationFn: async (e) => (await o("mutation RedeemLoyaltyPoints($input: KadaikodiRedeemLoyaltyPointsInput!) {\n kadaikodiRedeemLoyaltyPoints(input: $input) {\n pointsRedeemed discountAmount newBalance transactionId\n }\n }", { input: { points: e } }, r)).kadaikodiRedeemLoyaltyPoints,
|
|
422
|
+
onSuccess: () => {
|
|
423
|
+
t.invalidateQueries({ queryKey: ["kadaikodi", "my-loyalty-account"] }), t.invalidateQueries({ queryKey: ["kadaikodi", "my-loyalty-transactions"] });
|
|
424
|
+
}
|
|
425
|
+
});
|
|
426
|
+
}, q = (t) => {
|
|
427
|
+
let { apiGatewayUrl: n } = e();
|
|
428
|
+
return r({
|
|
429
|
+
queryKey: [
|
|
430
|
+
"kadaikodi",
|
|
431
|
+
"loyalty-account",
|
|
432
|
+
t
|
|
433
|
+
],
|
|
434
|
+
queryFn: async () => (await o(`query LoyaltyAccount($customerId: String!) {
|
|
435
|
+
kadaikodiLoyaltyAccount(customerId: $customerId) { ${H} }
|
|
436
|
+
}`, { customerId: t }, n)).kadaikodiLoyaltyAccount,
|
|
437
|
+
enabled: !!t
|
|
438
|
+
});
|
|
439
|
+
}, J = (t) => {
|
|
440
|
+
let { apiGatewayUrl: n } = e();
|
|
441
|
+
return r({
|
|
442
|
+
queryKey: [
|
|
443
|
+
"kadaikodi",
|
|
444
|
+
"loyalty-transactions",
|
|
445
|
+
t ?? "all"
|
|
446
|
+
],
|
|
447
|
+
queryFn: async () => (await o(`query ListLoyaltyTransactions($customerId: String, $pagination: KadaikodiPaginationInput) {
|
|
448
|
+
kadaikodiListLoyaltyTransactions(customerId: $customerId, pagination: $pagination) {
|
|
449
|
+
${U}
|
|
450
|
+
}
|
|
451
|
+
}`, {
|
|
452
|
+
customerId: t || void 0,
|
|
453
|
+
pagination: { limit: 50 }
|
|
454
|
+
}, n)).kadaikodiListLoyaltyTransactions
|
|
455
|
+
});
|
|
456
|
+
}, Y = () => {
|
|
457
|
+
let t = i(), { apiGatewayUrl: r } = e();
|
|
458
|
+
return n({
|
|
459
|
+
mutationFn: async (e) => (await o(`mutation AwardLoyaltyPoints($input: KadaikodiAwardLoyaltyPointsInput!) {
|
|
460
|
+
kadaikodiAwardLoyaltyPoints(input: $input) { ${H} }
|
|
461
|
+
}`, { input: e }, r)).kadaikodiAwardLoyaltyPoints,
|
|
462
|
+
onSuccess: (e, n) => {
|
|
463
|
+
t.invalidateQueries({ queryKey: [
|
|
464
|
+
"kadaikodi",
|
|
465
|
+
"loyalty-account",
|
|
466
|
+
n.customerId
|
|
467
|
+
] }), t.invalidateQueries({ queryKey: ["kadaikodi", "loyalty-transactions"] });
|
|
468
|
+
}
|
|
469
|
+
});
|
|
470
|
+
}, X = (t) => {
|
|
398
471
|
let { apiGatewayUrl: n } = e();
|
|
399
472
|
return r({
|
|
400
473
|
queryKey: [
|
|
@@ -405,7 +478,7 @@ var o = async (e, t, n) => {
|
|
|
405
478
|
queryFn: async () => (await o("query Reviews($providerId: String!) {\n kadaikodiListReviews(providerId: $providerId) {\n id providerId customerId rating review response createdAt updatedAt\n }\n }", { providerId: t }, n)).kadaikodiListReviews,
|
|
406
479
|
enabled: !!t
|
|
407
480
|
});
|
|
408
|
-
},
|
|
481
|
+
}, Z = () => {
|
|
409
482
|
let t = i(), { apiGatewayUrl: r } = e();
|
|
410
483
|
return n({
|
|
411
484
|
mutationFn: async (e) => (await o("mutation PlaceOrder($input: KadaikodiPlaceOrderInput!) {\n kadaikodiPlaceOrder(input: $input) {\n id orderNumber status total createdAt\n }\n }", { input: e }, r)).kadaikodiPlaceOrder,
|
|
@@ -413,7 +486,7 @@ var o = async (e, t, n) => {
|
|
|
413
486
|
t.invalidateQueries({ queryKey: ["kadaikodi", "orders"] }), t.invalidateQueries({ queryKey: ["kadaikodi", "dashboard-stats"] });
|
|
414
487
|
}
|
|
415
488
|
});
|
|
416
|
-
},
|
|
489
|
+
}, Q = () => {
|
|
417
490
|
let t = i(), { apiGatewayUrl: r } = e();
|
|
418
491
|
return n({
|
|
419
492
|
mutationFn: async ({ id: e, status: t }) => (await o("mutation UpdateOrderStatus($id: ID!, $status: KadaikodiOrderStatus!) {\n kadaikodiUpdateOrderStatus(id: $id, status: $status) {\n id status\n }\n }", {
|
|
@@ -424,24 +497,24 @@ var o = async (e, t, n) => {
|
|
|
424
497
|
t.invalidateQueries({ queryKey: ["kadaikodi", "orders"] }), t.invalidateQueries({ queryKey: ["kadaikodi", "order"] }), t.invalidateQueries({ queryKey: ["kadaikodi", "dashboard-stats"] });
|
|
425
498
|
}
|
|
426
499
|
});
|
|
427
|
-
},
|
|
500
|
+
}, ne = () => {
|
|
428
501
|
let t = i(), { apiGatewayUrl: r } = e();
|
|
429
502
|
return n({
|
|
430
503
|
mutationFn: async (e) => (await o(`mutation CreateOffering($input: KadaikodiCreateOfferingInput!) {
|
|
431
504
|
kadaikodiCreateOffering(input: $input) {
|
|
432
|
-
${
|
|
505
|
+
${h}
|
|
433
506
|
}
|
|
434
507
|
}`, { input: e }, r)).kadaikodiCreateOffering,
|
|
435
508
|
onSuccess: () => {
|
|
436
509
|
t.invalidateQueries({ queryKey: ["kadaikodi", "offerings"] });
|
|
437
510
|
}
|
|
438
511
|
});
|
|
439
|
-
},
|
|
512
|
+
}, re = () => {
|
|
440
513
|
let t = i(), { apiGatewayUrl: r } = e();
|
|
441
514
|
return n({
|
|
442
515
|
mutationFn: async ({ id: e, input: t }) => (await o(`mutation UpdateOffering($id: ID!, $input: KadaikodiUpdateOfferingInput!) {
|
|
443
516
|
kadaikodiUpdateOffering(id: $id, input: $input) {
|
|
444
|
-
${
|
|
517
|
+
${h}
|
|
445
518
|
}
|
|
446
519
|
}`, {
|
|
447
520
|
id: e,
|
|
@@ -451,7 +524,7 @@ var o = async (e, t, n) => {
|
|
|
451
524
|
t.invalidateQueries({ queryKey: ["kadaikodi", "offerings"] }), t.invalidateQueries({ queryKey: ["kadaikodi", "offering"] });
|
|
452
525
|
}
|
|
453
526
|
});
|
|
454
|
-
},
|
|
527
|
+
}, ie = () => {
|
|
455
528
|
let t = i(), { apiGatewayUrl: r } = e();
|
|
456
529
|
return n({
|
|
457
530
|
mutationFn: async (e) => (await o("mutation Invest($input: KadaikodiInvestInput!) {\n kadaikodiInvest(input: $input) {\n id amount currentValue status investedAt\n }\n }", { input: e }, r)).kadaikodiInvest,
|
|
@@ -459,7 +532,7 @@ var o = async (e, t, n) => {
|
|
|
459
532
|
t.invalidateQueries({ queryKey: ["kadaikodi", "investments"] }), t.invalidateQueries({ queryKey: ["kadaikodi", "investment-opportunities"] });
|
|
460
533
|
}
|
|
461
534
|
});
|
|
462
|
-
},
|
|
535
|
+
}, ae = () => {
|
|
463
536
|
let t = i(), { apiGatewayUrl: r } = e();
|
|
464
537
|
return n({
|
|
465
538
|
mutationFn: async (e) => (await o("mutation CreateProvider($input: KadaikodiCreateServiceProviderInput!) {\n kadaikodiCreateServiceProvider(input: $input) {\n id name slug status category location rating\n }\n }", { input: e }, r)).kadaikodiCreateServiceProvider,
|
|
@@ -467,7 +540,7 @@ var o = async (e, t, n) => {
|
|
|
467
540
|
t.invalidateQueries({ queryKey: ["kadaikodi", "providers"] }), t.invalidateQueries({ queryKey: ["kadaikodi", "dashboard-stats"] });
|
|
468
541
|
}
|
|
469
542
|
});
|
|
470
|
-
},
|
|
543
|
+
}, oe = () => {
|
|
471
544
|
let t = i(), { apiGatewayUrl: r } = e();
|
|
472
545
|
return n({
|
|
473
546
|
mutationFn: async (e) => (await o("mutation CreateProviderWorker($input: KadaikodiCreateProviderWorkerInput!) {\n kadaikodiCreateProviderWorker(input: $input) {\n id providerId workerId name role status metadata\n }\n }", { input: e }, r)).kadaikodiCreateProviderWorker,
|
|
@@ -475,7 +548,7 @@ var o = async (e, t, n) => {
|
|
|
475
548
|
t.invalidateQueries({ queryKey: ["kadaikodi", "provider-workers"] });
|
|
476
549
|
}
|
|
477
550
|
});
|
|
478
|
-
},
|
|
551
|
+
}, $ = () => {
|
|
479
552
|
let t = i(), { apiGatewayUrl: r } = e();
|
|
480
553
|
return n({
|
|
481
554
|
mutationFn: async ({ taskId: e, status: t }) => (await o("mutation UpdateTaskStatus($taskId: String!, $status: KadaikodiWorkerTaskStatus!) {\n kadaikodiUpdateWorkerTaskStatus(taskId: $taskId, status: $status) {\n id status\n }\n }", {
|
|
@@ -486,7 +559,7 @@ var o = async (e, t, n) => {
|
|
|
486
559
|
t.invalidateQueries({ queryKey: ["kadaikodi", "worker-tasks"] }), t.invalidateQueries({ queryKey: ["kadaikodi", "worker-stats"] });
|
|
487
560
|
}
|
|
488
561
|
});
|
|
489
|
-
},
|
|
562
|
+
}, se = () => {
|
|
490
563
|
let t = i(), { apiGatewayUrl: r } = e();
|
|
491
564
|
return n({
|
|
492
565
|
mutationFn: async ({ workerId: e, action: t }) => (await o("mutation ClockInOut($workerId: String!, $action: KadaikodiClockAction!) {\n kadaikodiWorkerClockInOut(workerId: $workerId, action: $action) {\n success message\n }\n }", {
|
|
@@ -497,7 +570,7 @@ var o = async (e, t, n) => {
|
|
|
497
570
|
t.invalidateQueries({ queryKey: ["kadaikodi", "worker-schedules"] });
|
|
498
571
|
}
|
|
499
572
|
});
|
|
500
|
-
},
|
|
573
|
+
}, ce = () => {
|
|
501
574
|
let t = i(), { apiGatewayUrl: r } = e();
|
|
502
575
|
return n({
|
|
503
576
|
mutationFn: async (e) => (await o("mutation CreateOpportunity($input: KadaikodiCreateInvestmentOpportunityInput!) {\n kadaikodiCreateInvestmentOpportunity(input: $input) { id title targetAmount status }\n }", { input: e }, r)).kadaikodiCreateInvestmentOpportunity,
|
|
@@ -505,7 +578,7 @@ var o = async (e, t, n) => {
|
|
|
505
578
|
t.invalidateQueries({ queryKey: ["kadaikodi", "investment-opportunities"] });
|
|
506
579
|
}
|
|
507
580
|
});
|
|
508
|
-
},
|
|
581
|
+
}, le = () => {
|
|
509
582
|
let t = i(), { apiGatewayUrl: r } = e();
|
|
510
583
|
return n({
|
|
511
584
|
mutationFn: async (e) => (await o("mutation CreateReview($input: KadaikodiCreateReviewInput!) {\n kadaikodiCreateReview(input: $input) { id rating review createdAt }\n }", { input: e }, r)).kadaikodiCreateReview,
|
|
@@ -513,7 +586,7 @@ var o = async (e, t, n) => {
|
|
|
513
586
|
t.invalidateQueries({ queryKey: ["kadaikodi", "reviews"] }), t.invalidateQueries({ queryKey: ["kadaikodi", "providers"] });
|
|
514
587
|
}
|
|
515
588
|
});
|
|
516
|
-
},
|
|
589
|
+
}, ue = () => {
|
|
517
590
|
let t = i(), { apiGatewayUrl: r } = e();
|
|
518
591
|
return n({
|
|
519
592
|
mutationFn: async ({ id: e, input: t }) => (await o("mutation UpdateProvider($id: ID!, $input: KadaikodiUpdateServiceProviderInput!) {\n kadaikodiUpdateServiceProvider(id: $id, input: $input) {\n id name slug status category location businessHours serviceTypes rating\n }\n }", {
|
|
@@ -524,7 +597,7 @@ var o = async (e, t, n) => {
|
|
|
524
597
|
t.invalidateQueries({ queryKey: ["kadaikodi", "providers"] }), t.invalidateQueries({ queryKey: ["kadaikodi", "provider"] }), t.invalidateQueries({ queryKey: ["kadaikodi", "dashboard-stats"] });
|
|
525
598
|
}
|
|
526
599
|
});
|
|
527
|
-
},
|
|
600
|
+
}, de = () => {
|
|
528
601
|
let t = i(), { apiGatewayUrl: r } = e();
|
|
529
602
|
return n({
|
|
530
603
|
mutationFn: async (e) => (await o("mutation DeleteOffering($id: ID!) { kadaikodiDeleteOffering(id: $id) }", { id: e }, r)).kadaikodiDeleteOffering,
|
|
@@ -532,7 +605,7 @@ var o = async (e, t, n) => {
|
|
|
532
605
|
t.invalidateQueries({ queryKey: ["kadaikodi", "offerings"] });
|
|
533
606
|
}
|
|
534
607
|
});
|
|
535
|
-
},
|
|
608
|
+
}, fe = () => {
|
|
536
609
|
let t = i(), { apiGatewayUrl: r } = e();
|
|
537
610
|
return n({
|
|
538
611
|
mutationFn: async ({ taskId: e, status: t, notes: n }) => (await o("mutation UpdateWorkerTask($taskId: String!, $status: KadaikodiWorkerTaskStatus, $notes: String) {\n kadaikodiUpdateWorkerTask(taskId: $taskId, status: $status, notes: $notes) { id status }\n }", {
|
|
@@ -544,7 +617,7 @@ var o = async (e, t, n) => {
|
|
|
544
617
|
t.invalidateQueries({ queryKey: ["kadaikodi", "worker-tasks"] }), t.invalidateQueries({ queryKey: ["kadaikodi", "worker-stats"] });
|
|
545
618
|
}
|
|
546
619
|
});
|
|
547
|
-
},
|
|
620
|
+
}, pe = () => {
|
|
548
621
|
let t = i(), { apiGatewayUrl: r } = e();
|
|
549
622
|
return n({
|
|
550
623
|
mutationFn: async ({ id: e, metadata: t }) => (await o("mutation UpdateProviderWorker($id: ID!, $metadata: JSON!) {\n kadaikodiUpdateProviderWorker(id: $id, metadata: $metadata) { id name metadata }\n }", {
|
|
@@ -555,8 +628,8 @@ var o = async (e, t, n) => {
|
|
|
555
628
|
t.invalidateQueries({ queryKey: ["kadaikodi", "provider-workers"] }), t.invalidateQueries({ queryKey: ["kadaikodi", "worker-schedules"] });
|
|
556
629
|
}
|
|
557
630
|
});
|
|
558
|
-
},
|
|
559
|
-
let { currentUser: n } = e(), r =
|
|
631
|
+
}, me = () => {
|
|
632
|
+
let { currentUser: n } = e(), r = g(), i = y({ customerId: n?.id }), a = x(), o = C(), s = w(n?.id || "");
|
|
560
633
|
return t(() => ({
|
|
561
634
|
providers: r,
|
|
562
635
|
orders: i,
|
|
@@ -572,6 +645,6 @@ var o = async (e, t, n) => {
|
|
|
572
645
|
]);
|
|
573
646
|
};
|
|
574
647
|
//#endregion
|
|
575
|
-
export {
|
|
648
|
+
export { M as useAddAddress, L as useAddPaymentMethod, S as useAdminAnalytics, Y as useAwardLoyaltyPoints, ce as useCreateInvestmentOpportunity, ne as useCreateOffering, ae as useCreateProvider, oe as useCreateProviderWorker, le as useCreateReview, x as useDashboardStats, P as useDeleteAddress, de as useDeleteOffering, ie as useInvest, C as useInvestmentOpportunities, w as useInvestments, me as useKadaikodiApi, J as useListLoyaltyTransactions, q as useLoyaltyAccountByCustomerId, j as useMyAddresses, B as useMyFavoriteProviderIds, W as useMyLoyaltyAccount, G as useMyLoyaltyTransactions, I as useMyPaymentMethods, v as useOfferings, b as useOrder, y as useOrders, Z as usePlaceOrder, _ as useProvider, T as useProviderWorkers, g as useProviders, K as useRedeemLoyaltyPoints, R as useRemovePaymentMethod, X as useReviews, F as useSetDefaultAddress, z as useSetDefaultPaymentMethod, V as useToggleFavorite, N as useUpdateAddress, re as useUpdateOffering, Q as useUpdateOrderStatus, ue as useUpdateProvider, pe as useUpdateProviderWorker, fe as useUpdateWorkerTask, $ as useUpdateWorkerTaskStatus, se as useWorkerClockInOut, O as useWorkerSchedules, D as useWorkerStats, E as useWorkerTasks };
|
|
576
649
|
|
|
577
650
|
//# sourceMappingURL=useKadaikodiApi.js.map
|