@techzunction/sdk 0.6.4 → 0.6.6
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/index.cjs +9 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +203 -106
- package/dist/index.d.ts +203 -106
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1275,6 +1275,7 @@ interface AdminTicketMessage {
|
|
|
1275
1275
|
body: string;
|
|
1276
1276
|
sender: string;
|
|
1277
1277
|
senderType: string;
|
|
1278
|
+
senderName: string;
|
|
1278
1279
|
createdAt: string;
|
|
1279
1280
|
}
|
|
1280
1281
|
interface AdminTicketDetail {
|
|
@@ -1291,10 +1292,12 @@ interface AdminTicketDetail {
|
|
|
1291
1292
|
orderId: string | null;
|
|
1292
1293
|
messages: AdminTicketMessage[];
|
|
1293
1294
|
createdAt: string;
|
|
1295
|
+
updatedAt: string;
|
|
1294
1296
|
}
|
|
1295
1297
|
interface AdminLocation {
|
|
1296
1298
|
id: string;
|
|
1297
1299
|
name: string;
|
|
1300
|
+
slug: string;
|
|
1298
1301
|
address: string;
|
|
1299
1302
|
city: string;
|
|
1300
1303
|
state: string;
|
|
@@ -1339,10 +1342,23 @@ interface AdminStudentPass {
|
|
|
1339
1342
|
expiresAt: string | null;
|
|
1340
1343
|
createdAt: string;
|
|
1341
1344
|
reviewedAt: string | null;
|
|
1345
|
+
user: {
|
|
1346
|
+
id: string;
|
|
1347
|
+
name: string | null;
|
|
1348
|
+
email: string | null;
|
|
1349
|
+
phone: string | null;
|
|
1350
|
+
};
|
|
1351
|
+
institution: {
|
|
1352
|
+
id: string;
|
|
1353
|
+
name: string;
|
|
1354
|
+
} | null;
|
|
1342
1355
|
}
|
|
1343
1356
|
interface AdminStudentPassDetail extends AdminStudentPass {
|
|
1344
1357
|
rejectionReason: string | null;
|
|
1345
1358
|
autoVerified: boolean;
|
|
1359
|
+
year: string | null;
|
|
1360
|
+
aadhaarLast4: string | null;
|
|
1361
|
+
internalNote: string | null;
|
|
1346
1362
|
user: {
|
|
1347
1363
|
id: string;
|
|
1348
1364
|
name: string | null;
|
|
@@ -1352,20 +1368,38 @@ interface AdminStudentPassDetail extends AdminStudentPass {
|
|
|
1352
1368
|
institution: {
|
|
1353
1369
|
id: string;
|
|
1354
1370
|
name: string;
|
|
1371
|
+
shortCode: string;
|
|
1372
|
+
emailDomain: string | null;
|
|
1373
|
+
requiresManualReview: boolean;
|
|
1374
|
+
customValidityDays: number | null;
|
|
1355
1375
|
} | null;
|
|
1376
|
+
fraudSignals: {
|
|
1377
|
+
dailyUsageCount: number;
|
|
1378
|
+
};
|
|
1379
|
+
usageHistory: {
|
|
1380
|
+
id: string;
|
|
1381
|
+
date: string;
|
|
1382
|
+
orderId: string;
|
|
1383
|
+
discountAmount: number;
|
|
1384
|
+
}[];
|
|
1356
1385
|
}
|
|
1357
1386
|
interface AdminStudentPassStats {
|
|
1358
|
-
totalByStatus:
|
|
1387
|
+
totalByStatus: {
|
|
1388
|
+
status: string;
|
|
1389
|
+
count: number;
|
|
1390
|
+
}[];
|
|
1359
1391
|
autoVerifiedPct: number;
|
|
1360
1392
|
pendingCount: number;
|
|
1361
1393
|
avgReviewTimeMs: number;
|
|
1362
1394
|
topInstitutions: {
|
|
1395
|
+
id: string;
|
|
1363
1396
|
name: string;
|
|
1364
|
-
|
|
1397
|
+
activePassCount: number;
|
|
1365
1398
|
}[];
|
|
1366
1399
|
topDiscountRules: {
|
|
1400
|
+
id: string;
|
|
1367
1401
|
name: string;
|
|
1368
|
-
|
|
1402
|
+
totalDiscountGiven: number;
|
|
1369
1403
|
}[];
|
|
1370
1404
|
}
|
|
1371
1405
|
interface AdminStudentDiscount {
|
|
@@ -1382,31 +1416,75 @@ interface AdminStudentDiscount {
|
|
|
1382
1416
|
discountType: string;
|
|
1383
1417
|
discountValue: number | null;
|
|
1384
1418
|
maxDiscountCap: number | null;
|
|
1419
|
+
minDiscountFloor: number | null;
|
|
1420
|
+
maxDiscountPctOfOrder: number | null;
|
|
1385
1421
|
minOrderAmount: number | null;
|
|
1422
|
+
maxOrderAmount: number | null;
|
|
1423
|
+
minItemCount: number | null;
|
|
1424
|
+
maxItemCount: number | null;
|
|
1425
|
+
orderTypes: string | null;
|
|
1426
|
+
cartModes: string | null;
|
|
1427
|
+
scope: string | null;
|
|
1428
|
+
categoryIds: string | null;
|
|
1429
|
+
itemIds: string | null;
|
|
1430
|
+
exclusionCategoryIds: string | null;
|
|
1431
|
+
exclusionItemIds: string | null;
|
|
1386
1432
|
applicableModes: string | null;
|
|
1387
1433
|
applicableCategories: string[] | null;
|
|
1388
1434
|
validFrom: string | null;
|
|
1389
1435
|
validTo: string | null;
|
|
1436
|
+
daysOfWeek: string | null;
|
|
1437
|
+
timeFrom: string | null;
|
|
1438
|
+
timeTo: string | null;
|
|
1439
|
+
blackoutDates: string | null;
|
|
1440
|
+
maxUsageTotal: number | null;
|
|
1441
|
+
maxUsagePerUser: number | null;
|
|
1442
|
+
maxUsagePerDay: number | null;
|
|
1443
|
+
maxUsagePerUserPerDay: number | null;
|
|
1444
|
+
maxUsagePerUserPerWeek: number | null;
|
|
1445
|
+
maxUsagePerUserPerMonth: number | null;
|
|
1446
|
+
stackWithCoupons: boolean;
|
|
1447
|
+
stackWithPromotions: boolean;
|
|
1448
|
+
stackWithLoyalty: boolean;
|
|
1449
|
+
stackWithOtherStudentDiscounts: boolean;
|
|
1450
|
+
earnLoyaltyCoins: boolean;
|
|
1451
|
+
loyaltyMultiplier: number | null;
|
|
1452
|
+
totalUses: number;
|
|
1453
|
+
totalDiscountGiven: number;
|
|
1390
1454
|
createdAt: string;
|
|
1391
1455
|
[key: string]: unknown;
|
|
1392
1456
|
}
|
|
1393
1457
|
interface AdminInstitution {
|
|
1394
1458
|
id: string;
|
|
1395
1459
|
name: string;
|
|
1396
|
-
shortCode: string
|
|
1460
|
+
shortCode: string;
|
|
1397
1461
|
emailDomain: string | null;
|
|
1398
1462
|
logoUrl: string | null;
|
|
1399
1463
|
customValidityDays: number | null;
|
|
1464
|
+
requiresManualReview: boolean;
|
|
1400
1465
|
isActive: boolean;
|
|
1401
1466
|
passCount: number;
|
|
1467
|
+
_count?: {
|
|
1468
|
+
studentPasses: number;
|
|
1469
|
+
};
|
|
1402
1470
|
createdAt: string;
|
|
1403
1471
|
}
|
|
1472
|
+
interface AdminItemRating {
|
|
1473
|
+
itemName: string;
|
|
1474
|
+
rating: number;
|
|
1475
|
+
comment: string | null;
|
|
1476
|
+
}
|
|
1404
1477
|
interface AdminReview {
|
|
1405
1478
|
id: string;
|
|
1406
1479
|
rating: number;
|
|
1407
1480
|
comment: string | null;
|
|
1408
1481
|
status: string;
|
|
1409
1482
|
customerName: string | null;
|
|
1483
|
+
customerEmail: string | null;
|
|
1484
|
+
orderNumber: string | null;
|
|
1485
|
+
orderId: string | null;
|
|
1486
|
+
photos: string[] | null;
|
|
1487
|
+
itemRatings: AdminItemRating[] | null;
|
|
1410
1488
|
item: {
|
|
1411
1489
|
id: string;
|
|
1412
1490
|
name: string;
|
|
@@ -2077,6 +2155,7 @@ interface ListStudentPassesQuery extends PaginatedQuery {
|
|
|
2077
2155
|
interface ReviewStudentPassDto {
|
|
2078
2156
|
status: 'approved' | 'rejected';
|
|
2079
2157
|
rejectionReason?: string;
|
|
2158
|
+
[key: string]: unknown;
|
|
2080
2159
|
}
|
|
2081
2160
|
interface BulkReviewStudentPassesDto {
|
|
2082
2161
|
ids: string[];
|
|
@@ -2109,6 +2188,8 @@ interface CreateInstitutionDto {
|
|
|
2109
2188
|
}
|
|
2110
2189
|
interface UpdateInstitutionDto {
|
|
2111
2190
|
name?: string;
|
|
2191
|
+
isActive?: boolean;
|
|
2192
|
+
[key: string]: unknown;
|
|
2112
2193
|
}
|
|
2113
2194
|
interface CreateMealPlanDto {
|
|
2114
2195
|
name: string;
|
|
@@ -2754,16 +2835,16 @@ declare const TZ: {
|
|
|
2754
2835
|
removeOption(optionId: string): TZQuery<void>;
|
|
2755
2836
|
};
|
|
2756
2837
|
orders: {
|
|
2757
|
-
list(params?: AdminListOrdersQuery): TZPaginatedQuery<
|
|
2838
|
+
list(params?: AdminListOrdersQuery): TZPaginatedQuery<AdminOrder>;
|
|
2758
2839
|
stats(): TZQuery<Record<string, unknown>>;
|
|
2759
|
-
get(id: string): TZQuery<
|
|
2760
|
-
updateStatus(id: string, data: UpdateOrderStatusDto): TZQuery<
|
|
2840
|
+
get(id: string): TZQuery<AdminOrderDetail>;
|
|
2841
|
+
updateStatus(id: string, data: UpdateOrderStatusDto): TZQuery<AdminOrderDetail>;
|
|
2761
2842
|
};
|
|
2762
2843
|
locations: {
|
|
2763
|
-
list(): TZQuery<
|
|
2764
|
-
get(id: string): TZQuery<
|
|
2765
|
-
create(data: Record<string, unknown>): TZQuery<
|
|
2766
|
-
update(id: string, data: Record<string, unknown>): TZQuery<
|
|
2844
|
+
list(): TZQuery<AdminLocation[]>;
|
|
2845
|
+
get(id: string): TZQuery<AdminLocationDetail>;
|
|
2846
|
+
create(data: Record<string, unknown>): TZQuery<AdminLocation>;
|
|
2847
|
+
update(id: string, data: Record<string, unknown>): TZQuery<AdminLocation>;
|
|
2767
2848
|
remove(id: string): TZQuery<void>;
|
|
2768
2849
|
setHours(id: string, data: SetLocationHoursDto): TZQuery<void>;
|
|
2769
2850
|
getDeliveryZones(id: string): TZQuery<unknown[]>;
|
|
@@ -2772,8 +2853,8 @@ declare const TZ: {
|
|
|
2772
2853
|
removeDeliveryZone(zoneId: string): TZQuery<void>;
|
|
2773
2854
|
};
|
|
2774
2855
|
endUsers: {
|
|
2775
|
-
list(params?: ListEndUsersQuery): TZPaginatedQuery<
|
|
2776
|
-
get(id: string): TZQuery<
|
|
2856
|
+
list(params?: ListEndUsersQuery): TZPaginatedQuery<AdminCustomer>;
|
|
2857
|
+
get(id: string): TZQuery<AdminCustomerDetail>;
|
|
2777
2858
|
create(data: Record<string, unknown>): TZQuery<unknown>;
|
|
2778
2859
|
bulkUpsert(data: BulkUpsertEndUsersDto): TZQuery<unknown>;
|
|
2779
2860
|
update(id: string, data: Record<string, unknown>): TZQuery<unknown>;
|
|
@@ -2803,7 +2884,10 @@ declare const TZ: {
|
|
|
2803
2884
|
}>;
|
|
2804
2885
|
};
|
|
2805
2886
|
settings: {
|
|
2806
|
-
getAll(): TZQuery<
|
|
2887
|
+
getAll(): TZQuery<{
|
|
2888
|
+
grouped: Record<string, AdminSetting[]>;
|
|
2889
|
+
settings: AdminSetting[];
|
|
2890
|
+
}>;
|
|
2807
2891
|
getGroup(group: string): TZQuery<Record<string, unknown>>;
|
|
2808
2892
|
set(group: string, key: string, data: SetSettingDto): TZQuery<void>;
|
|
2809
2893
|
bulkUpdate(data: BulkUpdateSettingsDto): TZQuery<void>;
|
|
@@ -2897,46 +2981,49 @@ declare const TZ: {
|
|
|
2897
2981
|
removeReward(id: string): TZQuery<void>;
|
|
2898
2982
|
};
|
|
2899
2983
|
coupons: {
|
|
2900
|
-
list(params?: StatusQuery): TZPaginatedQuery<
|
|
2901
|
-
get(id: string): TZQuery<
|
|
2902
|
-
create(data: Record<string, unknown>): TZQuery<
|
|
2903
|
-
update(id: string, data: Record<string, unknown>): TZQuery<
|
|
2984
|
+
list(params?: StatusQuery): TZPaginatedQuery<AdminCoupon>;
|
|
2985
|
+
get(id: string): TZQuery<AdminCoupon>;
|
|
2986
|
+
create(data: Record<string, unknown>): TZQuery<AdminCoupon>;
|
|
2987
|
+
update(id: string, data: Record<string, unknown>): TZQuery<AdminCoupon>;
|
|
2904
2988
|
remove(id: string): TZQuery<void>;
|
|
2905
2989
|
};
|
|
2906
2990
|
promotions: {
|
|
2907
|
-
list(params?: PaginatedQuery): TZPaginatedQuery<
|
|
2908
|
-
get(id: string): TZQuery<
|
|
2909
|
-
create(data: Record<string, unknown>): TZQuery<
|
|
2910
|
-
update(id: string, data: Record<string, unknown>): TZQuery<
|
|
2991
|
+
list(params?: PaginatedQuery): TZPaginatedQuery<AdminPromotion>;
|
|
2992
|
+
get(id: string): TZQuery<AdminPromotion>;
|
|
2993
|
+
create(data: Record<string, unknown>): TZQuery<AdminPromotion>;
|
|
2994
|
+
update(id: string, data: Record<string, unknown>): TZQuery<AdminPromotion>;
|
|
2911
2995
|
remove(id: string): TZQuery<void>;
|
|
2912
2996
|
};
|
|
2913
2997
|
reviews: {
|
|
2914
|
-
list(params?: StatusQuery): TZPaginatedQuery<
|
|
2915
|
-
updateStatus(id: string, data: UpdateReviewStatusDto): TZQuery<
|
|
2998
|
+
list(params?: StatusQuery): TZPaginatedQuery<AdminReview>;
|
|
2999
|
+
updateStatus(id: string, data: UpdateReviewStatusDto): TZQuery<AdminReview>;
|
|
2916
3000
|
};
|
|
2917
3001
|
giftCards: {
|
|
2918
|
-
list(params?: PaginatedQuery): TZPaginatedQuery<
|
|
2919
|
-
get(id: string): TZQuery<
|
|
2920
|
-
create(data: Record<string, unknown>): TZQuery<
|
|
3002
|
+
list(params?: PaginatedQuery): TZPaginatedQuery<AdminGiftCard>;
|
|
3003
|
+
get(id: string): TZQuery<AdminGiftCard>;
|
|
3004
|
+
create(data: Record<string, unknown>): TZQuery<AdminGiftCard>;
|
|
2921
3005
|
};
|
|
2922
3006
|
reservations: {
|
|
2923
|
-
list(params?: StatusQuery): TZPaginatedQuery<
|
|
2924
|
-
updateStatus(id: string, data: UpdateReservationStatusDto): TZQuery<
|
|
2925
|
-
resources(): TZQuery<
|
|
2926
|
-
createResource(data: Record<string, unknown>): TZQuery<
|
|
2927
|
-
updateResource(id: string, data: Record<string, unknown>): TZQuery<
|
|
3007
|
+
list(params?: StatusQuery): TZPaginatedQuery<AdminReservation>;
|
|
3008
|
+
updateStatus(id: string, data: UpdateReservationStatusDto): TZQuery<AdminReservation>;
|
|
3009
|
+
resources(): TZQuery<AdminReservationTable[]>;
|
|
3010
|
+
createResource(data: Record<string, unknown>): TZQuery<AdminReservationTable>;
|
|
3011
|
+
updateResource(id: string, data: Record<string, unknown>): TZQuery<AdminReservationTable>;
|
|
2928
3012
|
removeResource(id: string): TZQuery<void>;
|
|
2929
3013
|
};
|
|
2930
3014
|
support: {
|
|
2931
|
-
list(params?: StatusQuery): TZPaginatedQuery<
|
|
2932
|
-
get(id: string): TZQuery<
|
|
2933
|
-
update(id: string, data: UpdateSupportTicketDto): TZQuery<
|
|
3015
|
+
list(params?: StatusQuery): TZPaginatedQuery<AdminTicket>;
|
|
3016
|
+
get(id: string): TZQuery<AdminTicketDetail>;
|
|
3017
|
+
update(id: string, data: UpdateSupportTicketDto): TZQuery<AdminTicketDetail>;
|
|
3018
|
+
reply(ticketId: string, data: {
|
|
3019
|
+
body: string;
|
|
3020
|
+
}): TZQuery<AdminTicketMessage>;
|
|
2934
3021
|
};
|
|
2935
3022
|
content: {
|
|
2936
|
-
list(params?: StatusQuery): TZPaginatedQuery<
|
|
2937
|
-
get(id: string): TZQuery<
|
|
2938
|
-
create(data: Record<string, unknown>): TZQuery<
|
|
2939
|
-
update(id: string, data: Record<string, unknown>): TZQuery<
|
|
3023
|
+
list(params?: StatusQuery): TZPaginatedQuery<AdminBlogPost>;
|
|
3024
|
+
get(id: string): TZQuery<AdminBlogPost>;
|
|
3025
|
+
create(data: Record<string, unknown>): TZQuery<AdminBlogPost>;
|
|
3026
|
+
update(id: string, data: Record<string, unknown>): TZQuery<AdminBlogPost>;
|
|
2940
3027
|
remove(id: string): TZQuery<void>;
|
|
2941
3028
|
};
|
|
2942
3029
|
payments: {
|
|
@@ -3001,24 +3088,24 @@ declare const TZ: {
|
|
|
3001
3088
|
};
|
|
3002
3089
|
upload(file: File | Blob, folder?: string): TZQuery<UploadResult>;
|
|
3003
3090
|
studentPasses: {
|
|
3004
|
-
list(params?: ListStudentPassesQuery): TZPaginatedQuery<
|
|
3005
|
-
get(id: string): TZQuery<
|
|
3006
|
-
review(id: string, data: ReviewStudentPassDto): TZQuery<
|
|
3091
|
+
list(params?: ListStudentPassesQuery): TZPaginatedQuery<AdminStudentPass>;
|
|
3092
|
+
get(id: string): TZQuery<AdminStudentPassDetail>;
|
|
3093
|
+
review(id: string, data: ReviewStudentPassDto): TZQuery<AdminStudentPassDetail>;
|
|
3007
3094
|
bulkReview(data: BulkReviewStudentPassesDto): TZQuery<void>;
|
|
3008
|
-
stats(): TZQuery<
|
|
3095
|
+
stats(): TZQuery<AdminStudentPassStats>;
|
|
3009
3096
|
};
|
|
3010
3097
|
studentDiscounts: {
|
|
3011
|
-
list(params?: PaginatedQuery): TZPaginatedQuery<
|
|
3012
|
-
get(id: string): TZQuery<
|
|
3013
|
-
create(data: CreateStudentDiscountDto): TZQuery<
|
|
3014
|
-
update(id: string, data: UpdateStudentDiscountDto): TZQuery<
|
|
3098
|
+
list(params?: PaginatedQuery): TZPaginatedQuery<AdminStudentDiscount>;
|
|
3099
|
+
get(id: string): TZQuery<AdminStudentDiscount>;
|
|
3100
|
+
create(data: CreateStudentDiscountDto): TZQuery<AdminStudentDiscount>;
|
|
3101
|
+
update(id: string, data: UpdateStudentDiscountDto): TZQuery<AdminStudentDiscount>;
|
|
3015
3102
|
remove(id: string): TZQuery<void>;
|
|
3016
3103
|
};
|
|
3017
3104
|
institutions: {
|
|
3018
|
-
list(params?: PaginatedQuery): TZPaginatedQuery<
|
|
3019
|
-
get(id: string): TZQuery<
|
|
3020
|
-
create(data: CreateInstitutionDto): TZQuery<
|
|
3021
|
-
update(id: string, data: UpdateInstitutionDto): TZQuery<
|
|
3105
|
+
list(params?: PaginatedQuery): TZPaginatedQuery<AdminInstitution>;
|
|
3106
|
+
get(id: string): TZQuery<AdminInstitution>;
|
|
3107
|
+
create(data: CreateInstitutionDto): TZQuery<AdminInstitution>;
|
|
3108
|
+
update(id: string, data: UpdateInstitutionDto): TZQuery<AdminInstitution>;
|
|
3022
3109
|
remove(id: string): TZQuery<void>;
|
|
3023
3110
|
};
|
|
3024
3111
|
inventory: {
|
|
@@ -3062,10 +3149,10 @@ declare const TZ: {
|
|
|
3062
3149
|
remove(id: string): TZQuery<void>;
|
|
3063
3150
|
};
|
|
3064
3151
|
helpArticles: {
|
|
3065
|
-
list(params?: PaginatedQuery): TZPaginatedQuery<
|
|
3066
|
-
get(id: string): TZQuery<
|
|
3067
|
-
create(data: CreateHelpArticleDto): TZQuery<
|
|
3068
|
-
update(id: string, data: UpdateHelpArticleDto): TZQuery<
|
|
3152
|
+
list(params?: PaginatedQuery): TZPaginatedQuery<AdminHelpArticle>;
|
|
3153
|
+
get(id: string): TZQuery<AdminHelpArticle>;
|
|
3154
|
+
create(data: CreateHelpArticleDto): TZQuery<AdminHelpArticle>;
|
|
3155
|
+
update(id: string, data: UpdateHelpArticleDto): TZQuery<AdminHelpArticle>;
|
|
3069
3156
|
remove(id: string): TZQuery<void>;
|
|
3070
3157
|
};
|
|
3071
3158
|
dashboard: {
|
|
@@ -3111,6 +3198,8 @@ declare const TZ: {
|
|
|
3111
3198
|
settlements(params?: AdminFinanceQuery): TZPaginatedQuery<AdminSettlement>;
|
|
3112
3199
|
payouts(params?: AdminFinanceQuery): TZPaginatedQuery<AdminPayout>;
|
|
3113
3200
|
markPaid(id: string): TZQuery<void>;
|
|
3201
|
+
createPayout(data: Record<string, unknown>): TZQuery<AdminPayout>;
|
|
3202
|
+
markPayoutPaid(id: string): TZQuery<void>;
|
|
3114
3203
|
exportReport(params?: Record<string, unknown>): TZQuery<{
|
|
3115
3204
|
url: string;
|
|
3116
3205
|
}>;
|
|
@@ -3576,16 +3665,16 @@ declare function createTZ(options?: TZInitOptions): {
|
|
|
3576
3665
|
removeOption(optionId: string): TZQuery<void>;
|
|
3577
3666
|
};
|
|
3578
3667
|
orders: {
|
|
3579
|
-
list(params?: AdminListOrdersQuery): TZPaginatedQuery<
|
|
3668
|
+
list(params?: AdminListOrdersQuery): TZPaginatedQuery<AdminOrder>;
|
|
3580
3669
|
stats(): TZQuery<Record<string, unknown>>;
|
|
3581
|
-
get(id: string): TZQuery<
|
|
3582
|
-
updateStatus(id: string, data: UpdateOrderStatusDto): TZQuery<
|
|
3670
|
+
get(id: string): TZQuery<AdminOrderDetail>;
|
|
3671
|
+
updateStatus(id: string, data: UpdateOrderStatusDto): TZQuery<AdminOrderDetail>;
|
|
3583
3672
|
};
|
|
3584
3673
|
locations: {
|
|
3585
|
-
list(): TZQuery<
|
|
3586
|
-
get(id: string): TZQuery<
|
|
3587
|
-
create(data: Record<string, unknown>): TZQuery<
|
|
3588
|
-
update(id: string, data: Record<string, unknown>): TZQuery<
|
|
3674
|
+
list(): TZQuery<AdminLocation[]>;
|
|
3675
|
+
get(id: string): TZQuery<AdminLocationDetail>;
|
|
3676
|
+
create(data: Record<string, unknown>): TZQuery<AdminLocation>;
|
|
3677
|
+
update(id: string, data: Record<string, unknown>): TZQuery<AdminLocation>;
|
|
3589
3678
|
remove(id: string): TZQuery<void>;
|
|
3590
3679
|
setHours(id: string, data: SetLocationHoursDto): TZQuery<void>;
|
|
3591
3680
|
getDeliveryZones(id: string): TZQuery<unknown[]>;
|
|
@@ -3594,8 +3683,8 @@ declare function createTZ(options?: TZInitOptions): {
|
|
|
3594
3683
|
removeDeliveryZone(zoneId: string): TZQuery<void>;
|
|
3595
3684
|
};
|
|
3596
3685
|
endUsers: {
|
|
3597
|
-
list(params?: ListEndUsersQuery): TZPaginatedQuery<
|
|
3598
|
-
get(id: string): TZQuery<
|
|
3686
|
+
list(params?: ListEndUsersQuery): TZPaginatedQuery<AdminCustomer>;
|
|
3687
|
+
get(id: string): TZQuery<AdminCustomerDetail>;
|
|
3599
3688
|
create(data: Record<string, unknown>): TZQuery<unknown>;
|
|
3600
3689
|
bulkUpsert(data: BulkUpsertEndUsersDto): TZQuery<unknown>;
|
|
3601
3690
|
update(id: string, data: Record<string, unknown>): TZQuery<unknown>;
|
|
@@ -3625,7 +3714,10 @@ declare function createTZ(options?: TZInitOptions): {
|
|
|
3625
3714
|
}>;
|
|
3626
3715
|
};
|
|
3627
3716
|
settings: {
|
|
3628
|
-
getAll(): TZQuery<
|
|
3717
|
+
getAll(): TZQuery<{
|
|
3718
|
+
grouped: Record<string, AdminSetting[]>;
|
|
3719
|
+
settings: AdminSetting[];
|
|
3720
|
+
}>;
|
|
3629
3721
|
getGroup(group: string): TZQuery<Record<string, unknown>>;
|
|
3630
3722
|
set(group: string, key: string, data: SetSettingDto): TZQuery<void>;
|
|
3631
3723
|
bulkUpdate(data: BulkUpdateSettingsDto): TZQuery<void>;
|
|
@@ -3719,46 +3811,49 @@ declare function createTZ(options?: TZInitOptions): {
|
|
|
3719
3811
|
removeReward(id: string): TZQuery<void>;
|
|
3720
3812
|
};
|
|
3721
3813
|
coupons: {
|
|
3722
|
-
list(params?: StatusQuery): TZPaginatedQuery<
|
|
3723
|
-
get(id: string): TZQuery<
|
|
3724
|
-
create(data: Record<string, unknown>): TZQuery<
|
|
3725
|
-
update(id: string, data: Record<string, unknown>): TZQuery<
|
|
3814
|
+
list(params?: StatusQuery): TZPaginatedQuery<AdminCoupon>;
|
|
3815
|
+
get(id: string): TZQuery<AdminCoupon>;
|
|
3816
|
+
create(data: Record<string, unknown>): TZQuery<AdminCoupon>;
|
|
3817
|
+
update(id: string, data: Record<string, unknown>): TZQuery<AdminCoupon>;
|
|
3726
3818
|
remove(id: string): TZQuery<void>;
|
|
3727
3819
|
};
|
|
3728
3820
|
promotions: {
|
|
3729
|
-
list(params?: PaginatedQuery): TZPaginatedQuery<
|
|
3730
|
-
get(id: string): TZQuery<
|
|
3731
|
-
create(data: Record<string, unknown>): TZQuery<
|
|
3732
|
-
update(id: string, data: Record<string, unknown>): TZQuery<
|
|
3821
|
+
list(params?: PaginatedQuery): TZPaginatedQuery<AdminPromotion>;
|
|
3822
|
+
get(id: string): TZQuery<AdminPromotion>;
|
|
3823
|
+
create(data: Record<string, unknown>): TZQuery<AdminPromotion>;
|
|
3824
|
+
update(id: string, data: Record<string, unknown>): TZQuery<AdminPromotion>;
|
|
3733
3825
|
remove(id: string): TZQuery<void>;
|
|
3734
3826
|
};
|
|
3735
3827
|
reviews: {
|
|
3736
|
-
list(params?: StatusQuery): TZPaginatedQuery<
|
|
3737
|
-
updateStatus(id: string, data: UpdateReviewStatusDto): TZQuery<
|
|
3828
|
+
list(params?: StatusQuery): TZPaginatedQuery<AdminReview>;
|
|
3829
|
+
updateStatus(id: string, data: UpdateReviewStatusDto): TZQuery<AdminReview>;
|
|
3738
3830
|
};
|
|
3739
3831
|
giftCards: {
|
|
3740
|
-
list(params?: PaginatedQuery): TZPaginatedQuery<
|
|
3741
|
-
get(id: string): TZQuery<
|
|
3742
|
-
create(data: Record<string, unknown>): TZQuery<
|
|
3832
|
+
list(params?: PaginatedQuery): TZPaginatedQuery<AdminGiftCard>;
|
|
3833
|
+
get(id: string): TZQuery<AdminGiftCard>;
|
|
3834
|
+
create(data: Record<string, unknown>): TZQuery<AdminGiftCard>;
|
|
3743
3835
|
};
|
|
3744
3836
|
reservations: {
|
|
3745
|
-
list(params?: StatusQuery): TZPaginatedQuery<
|
|
3746
|
-
updateStatus(id: string, data: UpdateReservationStatusDto): TZQuery<
|
|
3747
|
-
resources(): TZQuery<
|
|
3748
|
-
createResource(data: Record<string, unknown>): TZQuery<
|
|
3749
|
-
updateResource(id: string, data: Record<string, unknown>): TZQuery<
|
|
3837
|
+
list(params?: StatusQuery): TZPaginatedQuery<AdminReservation>;
|
|
3838
|
+
updateStatus(id: string, data: UpdateReservationStatusDto): TZQuery<AdminReservation>;
|
|
3839
|
+
resources(): TZQuery<AdminReservationTable[]>;
|
|
3840
|
+
createResource(data: Record<string, unknown>): TZQuery<AdminReservationTable>;
|
|
3841
|
+
updateResource(id: string, data: Record<string, unknown>): TZQuery<AdminReservationTable>;
|
|
3750
3842
|
removeResource(id: string): TZQuery<void>;
|
|
3751
3843
|
};
|
|
3752
3844
|
support: {
|
|
3753
|
-
list(params?: StatusQuery): TZPaginatedQuery<
|
|
3754
|
-
get(id: string): TZQuery<
|
|
3755
|
-
update(id: string, data: UpdateSupportTicketDto): TZQuery<
|
|
3845
|
+
list(params?: StatusQuery): TZPaginatedQuery<AdminTicket>;
|
|
3846
|
+
get(id: string): TZQuery<AdminTicketDetail>;
|
|
3847
|
+
update(id: string, data: UpdateSupportTicketDto): TZQuery<AdminTicketDetail>;
|
|
3848
|
+
reply(ticketId: string, data: {
|
|
3849
|
+
body: string;
|
|
3850
|
+
}): TZQuery<AdminTicketMessage>;
|
|
3756
3851
|
};
|
|
3757
3852
|
content: {
|
|
3758
|
-
list(params?: StatusQuery): TZPaginatedQuery<
|
|
3759
|
-
get(id: string): TZQuery<
|
|
3760
|
-
create(data: Record<string, unknown>): TZQuery<
|
|
3761
|
-
update(id: string, data: Record<string, unknown>): TZQuery<
|
|
3853
|
+
list(params?: StatusQuery): TZPaginatedQuery<AdminBlogPost>;
|
|
3854
|
+
get(id: string): TZQuery<AdminBlogPost>;
|
|
3855
|
+
create(data: Record<string, unknown>): TZQuery<AdminBlogPost>;
|
|
3856
|
+
update(id: string, data: Record<string, unknown>): TZQuery<AdminBlogPost>;
|
|
3762
3857
|
remove(id: string): TZQuery<void>;
|
|
3763
3858
|
};
|
|
3764
3859
|
payments: {
|
|
@@ -3823,24 +3918,24 @@ declare function createTZ(options?: TZInitOptions): {
|
|
|
3823
3918
|
};
|
|
3824
3919
|
upload(file: File | Blob, folder?: string): TZQuery<UploadResult>;
|
|
3825
3920
|
studentPasses: {
|
|
3826
|
-
list(params?: ListStudentPassesQuery): TZPaginatedQuery<
|
|
3827
|
-
get(id: string): TZQuery<
|
|
3828
|
-
review(id: string, data: ReviewStudentPassDto): TZQuery<
|
|
3921
|
+
list(params?: ListStudentPassesQuery): TZPaginatedQuery<AdminStudentPass>;
|
|
3922
|
+
get(id: string): TZQuery<AdminStudentPassDetail>;
|
|
3923
|
+
review(id: string, data: ReviewStudentPassDto): TZQuery<AdminStudentPassDetail>;
|
|
3829
3924
|
bulkReview(data: BulkReviewStudentPassesDto): TZQuery<void>;
|
|
3830
|
-
stats(): TZQuery<
|
|
3925
|
+
stats(): TZQuery<AdminStudentPassStats>;
|
|
3831
3926
|
};
|
|
3832
3927
|
studentDiscounts: {
|
|
3833
|
-
list(params?: PaginatedQuery): TZPaginatedQuery<
|
|
3834
|
-
get(id: string): TZQuery<
|
|
3835
|
-
create(data: CreateStudentDiscountDto): TZQuery<
|
|
3836
|
-
update(id: string, data: UpdateStudentDiscountDto): TZQuery<
|
|
3928
|
+
list(params?: PaginatedQuery): TZPaginatedQuery<AdminStudentDiscount>;
|
|
3929
|
+
get(id: string): TZQuery<AdminStudentDiscount>;
|
|
3930
|
+
create(data: CreateStudentDiscountDto): TZQuery<AdminStudentDiscount>;
|
|
3931
|
+
update(id: string, data: UpdateStudentDiscountDto): TZQuery<AdminStudentDiscount>;
|
|
3837
3932
|
remove(id: string): TZQuery<void>;
|
|
3838
3933
|
};
|
|
3839
3934
|
institutions: {
|
|
3840
|
-
list(params?: PaginatedQuery): TZPaginatedQuery<
|
|
3841
|
-
get(id: string): TZQuery<
|
|
3842
|
-
create(data: CreateInstitutionDto): TZQuery<
|
|
3843
|
-
update(id: string, data: UpdateInstitutionDto): TZQuery<
|
|
3935
|
+
list(params?: PaginatedQuery): TZPaginatedQuery<AdminInstitution>;
|
|
3936
|
+
get(id: string): TZQuery<AdminInstitution>;
|
|
3937
|
+
create(data: CreateInstitutionDto): TZQuery<AdminInstitution>;
|
|
3938
|
+
update(id: string, data: UpdateInstitutionDto): TZQuery<AdminInstitution>;
|
|
3844
3939
|
remove(id: string): TZQuery<void>;
|
|
3845
3940
|
};
|
|
3846
3941
|
inventory: {
|
|
@@ -3884,10 +3979,10 @@ declare function createTZ(options?: TZInitOptions): {
|
|
|
3884
3979
|
remove(id: string): TZQuery<void>;
|
|
3885
3980
|
};
|
|
3886
3981
|
helpArticles: {
|
|
3887
|
-
list(params?: PaginatedQuery): TZPaginatedQuery<
|
|
3888
|
-
get(id: string): TZQuery<
|
|
3889
|
-
create(data: CreateHelpArticleDto): TZQuery<
|
|
3890
|
-
update(id: string, data: UpdateHelpArticleDto): TZQuery<
|
|
3982
|
+
list(params?: PaginatedQuery): TZPaginatedQuery<AdminHelpArticle>;
|
|
3983
|
+
get(id: string): TZQuery<AdminHelpArticle>;
|
|
3984
|
+
create(data: CreateHelpArticleDto): TZQuery<AdminHelpArticle>;
|
|
3985
|
+
update(id: string, data: UpdateHelpArticleDto): TZQuery<AdminHelpArticle>;
|
|
3891
3986
|
remove(id: string): TZQuery<void>;
|
|
3892
3987
|
};
|
|
3893
3988
|
dashboard: {
|
|
@@ -3933,6 +4028,8 @@ declare function createTZ(options?: TZInitOptions): {
|
|
|
3933
4028
|
settlements(params?: AdminFinanceQuery): TZPaginatedQuery<AdminSettlement>;
|
|
3934
4029
|
payouts(params?: AdminFinanceQuery): TZPaginatedQuery<AdminPayout>;
|
|
3935
4030
|
markPaid(id: string): TZQuery<void>;
|
|
4031
|
+
createPayout(data: Record<string, unknown>): TZQuery<AdminPayout>;
|
|
4032
|
+
markPayoutPaid(id: string): TZQuery<void>;
|
|
3936
4033
|
exportReport(params?: Record<string, unknown>): TZQuery<{
|
|
3937
4034
|
url: string;
|
|
3938
4035
|
}>;
|
package/dist/index.js
CHANGED
|
@@ -1720,6 +1720,9 @@ function createAdmin(root, c) {
|
|
|
1720
1720
|
},
|
|
1721
1721
|
update(id, data) {
|
|
1722
1722
|
return c.patch(`/support/${id}`, data);
|
|
1723
|
+
},
|
|
1724
|
+
reply(ticketId, data) {
|
|
1725
|
+
return c.post(`/support/${ticketId}/reply`, data);
|
|
1723
1726
|
}
|
|
1724
1727
|
},
|
|
1725
1728
|
// ─── Content (Admin) ─────────────────────────────────────────────
|
|
@@ -2171,6 +2174,12 @@ function createAdmin(root, c) {
|
|
|
2171
2174
|
markPaid(id) {
|
|
2172
2175
|
return c.patch(`/admin/finance/payouts/${id}`, { isPaid: true });
|
|
2173
2176
|
},
|
|
2177
|
+
createPayout(data) {
|
|
2178
|
+
return c.post("/admin/finance/payouts", data);
|
|
2179
|
+
},
|
|
2180
|
+
markPayoutPaid(id) {
|
|
2181
|
+
return c.patch(`/admin/finance/payouts/${id}`, { isPaid: true });
|
|
2182
|
+
},
|
|
2174
2183
|
exportReport(params) {
|
|
2175
2184
|
return c.post("/admin/reports/export", params);
|
|
2176
2185
|
}
|