@open-loyalty/mcp-server 1.0.3 → 1.3.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/README.md +180 -177
- package/dist/auth/provider.js +2 -14
- package/dist/auth/storage.js +22 -0
- package/dist/client/http.d.ts +5 -0
- package/dist/client/http.js +62 -3
- package/dist/config.d.ts +6 -5
- package/dist/config.js +15 -11
- package/dist/http.js +170 -65
- package/dist/instructions.d.ts +5 -0
- package/dist/instructions.js +420 -0
- package/dist/prompts/fan-engagement-setup.d.ts +107 -0
- package/dist/prompts/fan-engagement-setup.js +492 -0
- package/dist/server.d.ts +1 -1
- package/dist/server.js +68 -278
- package/dist/tools/achievement/handlers.d.ts +117 -0
- package/dist/tools/achievement/handlers.js +161 -0
- package/dist/tools/achievement/index.d.ts +479 -0
- package/dist/tools/achievement/index.js +74 -0
- package/dist/tools/achievement/schemas.d.ts +433 -0
- package/dist/tools/achievement/schemas.js +142 -0
- package/dist/tools/achievement.d.ts +155 -121
- package/dist/tools/achievement.js +82 -39
- package/dist/tools/admin.d.ts +18 -6
- package/dist/tools/admin.js +24 -12
- package/dist/tools/analytics.d.ts +29 -11
- package/dist/tools/analytics.js +58 -48
- package/dist/tools/apikey.d.ts +10 -3
- package/dist/tools/apikey.js +13 -6
- package/dist/tools/audit.d.ts +6 -2
- package/dist/tools/audit.js +8 -4
- package/dist/tools/badge.d.ts +14 -6
- package/dist/tools/badge.js +36 -27
- package/dist/tools/campaign/handlers.d.ts +42 -0
- package/dist/tools/campaign/handlers.js +223 -0
- package/dist/tools/campaign/index.d.ts +783 -0
- package/dist/tools/campaign/index.js +112 -0
- package/dist/tools/campaign/member-handlers.d.ts +60 -0
- package/dist/tools/campaign/member-handlers.js +159 -0
- package/dist/tools/campaign/schemas.d.ts +704 -0
- package/dist/tools/campaign/schemas.js +259 -0
- package/dist/tools/campaign/types.d.ts +161 -0
- package/dist/tools/campaign/types.js +2 -0
- package/dist/tools/campaign.d.ts +41 -16
- package/dist/tools/campaign.js +38 -25
- package/dist/tools/custom-event.d.ts +315 -0
- package/dist/tools/custom-event.js +270 -0
- package/dist/tools/export.d.ts +12 -4
- package/dist/tools/export.js +25 -20
- package/dist/tools/import.d.ts +9 -3
- package/dist/tools/import.js +33 -21
- package/dist/tools/index.d.ts +3 -11
- package/dist/tools/index.js +17 -475
- package/dist/tools/member/handlers.d.ts +111 -0
- package/dist/tools/member/handlers.js +206 -0
- package/dist/tools/member/index.d.ts +169 -0
- package/dist/tools/member/index.js +92 -0
- package/dist/tools/member/schemas.d.ts +89 -0
- package/dist/tools/member/schemas.js +65 -0
- package/dist/tools/member.d.ts +21 -0
- package/dist/tools/member.js +56 -62
- package/dist/tools/points.d.ts +19 -6
- package/dist/tools/points.js +51 -49
- package/dist/tools/referral/handlers.d.ts +47 -0
- package/dist/tools/referral/handlers.js +115 -0
- package/dist/tools/referral/index.d.ts +44 -0
- package/dist/tools/referral/index.js +44 -0
- package/dist/tools/referral/schemas.d.ts +34 -0
- package/dist/tools/referral/schemas.js +52 -0
- package/dist/tools/reward/handlers.d.ts +110 -0
- package/dist/tools/reward/handlers.js +289 -0
- package/dist/tools/reward/index.d.ts +177 -0
- package/dist/tools/reward/index.js +90 -0
- package/dist/tools/reward/schemas.d.ts +116 -0
- package/dist/tools/reward/schemas.js +91 -0
- package/dist/tools/reward.d.ts +18 -0
- package/dist/tools/reward.js +56 -66
- package/dist/tools/role.d.ts +26 -7
- package/dist/tools/role.js +25 -12
- package/dist/tools/segment/handlers.d.ts +87 -0
- package/dist/tools/segment/handlers.js +174 -0
- package/dist/tools/segment/index.d.ts +395 -0
- package/dist/tools/segment/index.js +87 -0
- package/dist/tools/segment/schemas.d.ts +337 -0
- package/dist/tools/segment/schemas.js +79 -0
- package/dist/tools/segment.d.ts +29 -10
- package/dist/tools/segment.js +84 -50
- package/dist/tools/store.d.ts +12 -4
- package/dist/tools/store.js +16 -8
- package/dist/tools/tierset.d.ts +19 -7
- package/dist/tools/tierset.js +44 -35
- package/dist/tools/transaction.d.ts +16 -8
- package/dist/tools/transaction.js +25 -21
- package/dist/tools/wallet-type.d.ts +7 -3
- package/dist/tools/wallet-type.js +14 -12
- package/dist/tools/webhook.d.ts +23 -10
- package/dist/tools/webhook.js +135 -33
- package/dist/types/schemas/achievement.d.ts +12 -309
- package/dist/types/schemas/achievement.js +0 -13
- package/dist/types/schemas/admin.d.ts +10 -97
- package/dist/types/schemas/admin.js +0 -38
- package/dist/types/schemas/badge.d.ts +0 -37
- package/dist/types/schemas/badge.js +0 -11
- package/dist/types/schemas/campaign.d.ts +64 -832
- package/dist/types/schemas/campaign.js +2 -25
- package/dist/types/schemas/common.d.ts +5 -0
- package/dist/types/schemas/common.js +5 -0
- package/dist/types/schemas/export.d.ts +0 -17
- package/dist/types/schemas/export.js +0 -7
- package/dist/types/schemas/member.d.ts +37 -176
- package/dist/types/schemas/member.js +0 -27
- package/dist/types/schemas/points.d.ts +0 -63
- package/dist/types/schemas/points.js +0 -22
- package/dist/types/schemas/reward.d.ts +71 -68
- package/dist/types/schemas/reward.js +8 -28
- package/dist/types/schemas/role.d.ts +0 -100
- package/dist/types/schemas/role.js +0 -29
- package/dist/types/schemas/segment.d.ts +0 -58
- package/dist/types/schemas/segment.js +0 -17
- package/dist/types/schemas/tierset.d.ts +0 -176
- package/dist/types/schemas/tierset.js +0 -27
- package/dist/types/schemas/transaction.d.ts +23 -254
- package/dist/types/schemas/transaction.js +0 -7
- package/dist/types/schemas/wallet-type.d.ts +8 -8
- package/dist/types/schemas/wallet-type.js +1 -1
- package/dist/types/schemas/webhook.d.ts +0 -58
- package/dist/types/schemas/webhook.js +0 -12
- package/dist/utils/errors.js +30 -3
- package/dist/utils/payload.d.ts +12 -0
- package/dist/utils/payload.js +14 -0
- package/dist/workflows/app-login-streak.d.ts +39 -0
- package/dist/workflows/app-login-streak.js +298 -0
- package/dist/workflows/early-arrival.d.ts +33 -0
- package/dist/workflows/early-arrival.js +148 -0
- package/dist/workflows/index.d.ts +101 -0
- package/dist/workflows/index.js +208 -0
- package/dist/workflows/match-attendance.d.ts +45 -0
- package/dist/workflows/match-attendance.js +308 -0
- package/dist/workflows/sportsbar-visit.d.ts +41 -0
- package/dist/workflows/sportsbar-visit.js +284 -0
- package/dist/workflows/vod-watching.d.ts +43 -0
- package/dist/workflows/vod-watching.js +326 -0
- package/package.json +10 -2
|
@@ -363,179 +363,7 @@ export declare const TierSetListResponseSchema: z.ZodObject<{
|
|
|
363
363
|
[k: string]: unknown;
|
|
364
364
|
};
|
|
365
365
|
}>;
|
|
366
|
-
export declare const TierSetConditionInputSchema: z.ZodObject<{
|
|
367
|
-
attribute: z.ZodEnum<["activeUnits", "totalEarnedUnits", "totalSpending", "monthsSinceJoiningProgram", "cumulatedEarnedUnits"]>;
|
|
368
|
-
walletType: z.ZodOptional<z.ZodString>;
|
|
369
|
-
}, "strip", z.ZodTypeAny, {
|
|
370
|
-
attribute: "activeUnits" | "totalEarnedUnits" | "totalSpending" | "monthsSinceJoiningProgram" | "cumulatedEarnedUnits";
|
|
371
|
-
walletType?: string | undefined;
|
|
372
|
-
}, {
|
|
373
|
-
attribute: "activeUnits" | "totalEarnedUnits" | "totalSpending" | "monthsSinceJoiningProgram" | "cumulatedEarnedUnits";
|
|
374
|
-
walletType?: string | undefined;
|
|
375
|
-
}>;
|
|
376
366
|
export declare const DowngradeModeEnum: z.ZodEnum<["none", "automatic", "x_days"]>;
|
|
377
|
-
export declare const TierSetCreateInputSchema: z.ZodObject<{
|
|
378
|
-
storeCode: z.ZodString;
|
|
379
|
-
name: z.ZodString;
|
|
380
|
-
description: z.ZodOptional<z.ZodString>;
|
|
381
|
-
conditions: z.ZodArray<z.ZodObject<{
|
|
382
|
-
attribute: z.ZodEnum<["activeUnits", "totalEarnedUnits", "totalSpending", "monthsSinceJoiningProgram", "cumulatedEarnedUnits"]>;
|
|
383
|
-
walletType: z.ZodOptional<z.ZodString>;
|
|
384
|
-
}, "strip", z.ZodTypeAny, {
|
|
385
|
-
attribute: "activeUnits" | "totalEarnedUnits" | "totalSpending" | "monthsSinceJoiningProgram" | "cumulatedEarnedUnits";
|
|
386
|
-
walletType?: string | undefined;
|
|
387
|
-
}, {
|
|
388
|
-
attribute: "activeUnits" | "totalEarnedUnits" | "totalSpending" | "monthsSinceJoiningProgram" | "cumulatedEarnedUnits";
|
|
389
|
-
walletType?: string | undefined;
|
|
390
|
-
}>, "many">;
|
|
391
|
-
downgrade: z.ZodOptional<z.ZodObject<{
|
|
392
|
-
mode: z.ZodEnum<["none", "automatic", "x_days"]>;
|
|
393
|
-
days: z.ZodOptional<z.ZodNumber>;
|
|
394
|
-
}, "strip", z.ZodTypeAny, {
|
|
395
|
-
mode: "none" | "automatic" | "x_days";
|
|
396
|
-
days?: number | undefined;
|
|
397
|
-
}, {
|
|
398
|
-
mode: "none" | "automatic" | "x_days";
|
|
399
|
-
days?: number | undefined;
|
|
400
|
-
}>>;
|
|
401
|
-
active: z.ZodOptional<z.ZodBoolean>;
|
|
402
|
-
}, "strip", z.ZodTypeAny, {
|
|
403
|
-
name: string;
|
|
404
|
-
conditions: {
|
|
405
|
-
attribute: "activeUnits" | "totalEarnedUnits" | "totalSpending" | "monthsSinceJoiningProgram" | "cumulatedEarnedUnits";
|
|
406
|
-
walletType?: string | undefined;
|
|
407
|
-
}[];
|
|
408
|
-
storeCode: string;
|
|
409
|
-
active?: boolean | undefined;
|
|
410
|
-
description?: string | undefined;
|
|
411
|
-
downgrade?: {
|
|
412
|
-
mode: "none" | "automatic" | "x_days";
|
|
413
|
-
days?: number | undefined;
|
|
414
|
-
} | undefined;
|
|
415
|
-
}, {
|
|
416
|
-
name: string;
|
|
417
|
-
conditions: {
|
|
418
|
-
attribute: "activeUnits" | "totalEarnedUnits" | "totalSpending" | "monthsSinceJoiningProgram" | "cumulatedEarnedUnits";
|
|
419
|
-
walletType?: string | undefined;
|
|
420
|
-
}[];
|
|
421
|
-
storeCode: string;
|
|
422
|
-
active?: boolean | undefined;
|
|
423
|
-
description?: string | undefined;
|
|
424
|
-
downgrade?: {
|
|
425
|
-
mode: "none" | "automatic" | "x_days";
|
|
426
|
-
days?: number | undefined;
|
|
427
|
-
} | undefined;
|
|
428
|
-
}>;
|
|
429
|
-
export declare const TierInputSchema: z.ZodObject<{
|
|
430
|
-
levelId: z.ZodOptional<z.ZodString>;
|
|
431
|
-
name: z.ZodString;
|
|
432
|
-
description: z.ZodOptional<z.ZodString>;
|
|
433
|
-
active: z.ZodOptional<z.ZodBoolean>;
|
|
434
|
-
conditions: z.ZodArray<z.ZodObject<{
|
|
435
|
-
conditionId: z.ZodString;
|
|
436
|
-
attribute: z.ZodOptional<z.ZodEnum<["activeUnits", "totalEarnedUnits", "totalSpending", "monthsSinceJoiningProgram", "cumulatedEarnedUnits"]>>;
|
|
437
|
-
value: z.ZodNumber;
|
|
438
|
-
}, "strip", z.ZodTypeAny, {
|
|
439
|
-
value: number;
|
|
440
|
-
conditionId: string;
|
|
441
|
-
attribute?: "activeUnits" | "totalEarnedUnits" | "totalSpending" | "monthsSinceJoiningProgram" | "cumulatedEarnedUnits" | undefined;
|
|
442
|
-
}, {
|
|
443
|
-
value: number;
|
|
444
|
-
conditionId: string;
|
|
445
|
-
attribute?: "activeUnits" | "totalEarnedUnits" | "totalSpending" | "monthsSinceJoiningProgram" | "cumulatedEarnedUnits" | undefined;
|
|
446
|
-
}>, "many">;
|
|
447
|
-
}, "strip", z.ZodTypeAny, {
|
|
448
|
-
name: string;
|
|
449
|
-
conditions: {
|
|
450
|
-
value: number;
|
|
451
|
-
conditionId: string;
|
|
452
|
-
attribute?: "activeUnits" | "totalEarnedUnits" | "totalSpending" | "monthsSinceJoiningProgram" | "cumulatedEarnedUnits" | undefined;
|
|
453
|
-
}[];
|
|
454
|
-
active?: boolean | undefined;
|
|
455
|
-
description?: string | undefined;
|
|
456
|
-
levelId?: string | undefined;
|
|
457
|
-
}, {
|
|
458
|
-
name: string;
|
|
459
|
-
conditions: {
|
|
460
|
-
value: number;
|
|
461
|
-
conditionId: string;
|
|
462
|
-
attribute?: "activeUnits" | "totalEarnedUnits" | "totalSpending" | "monthsSinceJoiningProgram" | "cumulatedEarnedUnits" | undefined;
|
|
463
|
-
}[];
|
|
464
|
-
active?: boolean | undefined;
|
|
465
|
-
description?: string | undefined;
|
|
466
|
-
levelId?: string | undefined;
|
|
467
|
-
}>;
|
|
468
|
-
export declare const TierSetUpdateTiersInputSchema: z.ZodObject<{
|
|
469
|
-
storeCode: z.ZodString;
|
|
470
|
-
tierSetId: z.ZodString;
|
|
471
|
-
tiers: z.ZodArray<z.ZodObject<{
|
|
472
|
-
levelId: z.ZodOptional<z.ZodString>;
|
|
473
|
-
name: z.ZodString;
|
|
474
|
-
description: z.ZodOptional<z.ZodString>;
|
|
475
|
-
active: z.ZodOptional<z.ZodBoolean>;
|
|
476
|
-
conditions: z.ZodArray<z.ZodObject<{
|
|
477
|
-
conditionId: z.ZodString;
|
|
478
|
-
attribute: z.ZodOptional<z.ZodEnum<["activeUnits", "totalEarnedUnits", "totalSpending", "monthsSinceJoiningProgram", "cumulatedEarnedUnits"]>>;
|
|
479
|
-
value: z.ZodNumber;
|
|
480
|
-
}, "strip", z.ZodTypeAny, {
|
|
481
|
-
value: number;
|
|
482
|
-
conditionId: string;
|
|
483
|
-
attribute?: "activeUnits" | "totalEarnedUnits" | "totalSpending" | "monthsSinceJoiningProgram" | "cumulatedEarnedUnits" | undefined;
|
|
484
|
-
}, {
|
|
485
|
-
value: number;
|
|
486
|
-
conditionId: string;
|
|
487
|
-
attribute?: "activeUnits" | "totalEarnedUnits" | "totalSpending" | "monthsSinceJoiningProgram" | "cumulatedEarnedUnits" | undefined;
|
|
488
|
-
}>, "many">;
|
|
489
|
-
}, "strip", z.ZodTypeAny, {
|
|
490
|
-
name: string;
|
|
491
|
-
conditions: {
|
|
492
|
-
value: number;
|
|
493
|
-
conditionId: string;
|
|
494
|
-
attribute?: "activeUnits" | "totalEarnedUnits" | "totalSpending" | "monthsSinceJoiningProgram" | "cumulatedEarnedUnits" | undefined;
|
|
495
|
-
}[];
|
|
496
|
-
active?: boolean | undefined;
|
|
497
|
-
description?: string | undefined;
|
|
498
|
-
levelId?: string | undefined;
|
|
499
|
-
}, {
|
|
500
|
-
name: string;
|
|
501
|
-
conditions: {
|
|
502
|
-
value: number;
|
|
503
|
-
conditionId: string;
|
|
504
|
-
attribute?: "activeUnits" | "totalEarnedUnits" | "totalSpending" | "monthsSinceJoiningProgram" | "cumulatedEarnedUnits" | undefined;
|
|
505
|
-
}[];
|
|
506
|
-
active?: boolean | undefined;
|
|
507
|
-
description?: string | undefined;
|
|
508
|
-
levelId?: string | undefined;
|
|
509
|
-
}>, "many">;
|
|
510
|
-
}, "strip", z.ZodTypeAny, {
|
|
511
|
-
tierSetId: string;
|
|
512
|
-
tiers: {
|
|
513
|
-
name: string;
|
|
514
|
-
conditions: {
|
|
515
|
-
value: number;
|
|
516
|
-
conditionId: string;
|
|
517
|
-
attribute?: "activeUnits" | "totalEarnedUnits" | "totalSpending" | "monthsSinceJoiningProgram" | "cumulatedEarnedUnits" | undefined;
|
|
518
|
-
}[];
|
|
519
|
-
active?: boolean | undefined;
|
|
520
|
-
description?: string | undefined;
|
|
521
|
-
levelId?: string | undefined;
|
|
522
|
-
}[];
|
|
523
|
-
storeCode: string;
|
|
524
|
-
}, {
|
|
525
|
-
tierSetId: string;
|
|
526
|
-
tiers: {
|
|
527
|
-
name: string;
|
|
528
|
-
conditions: {
|
|
529
|
-
value: number;
|
|
530
|
-
conditionId: string;
|
|
531
|
-
attribute?: "activeUnits" | "totalEarnedUnits" | "totalSpending" | "monthsSinceJoiningProgram" | "cumulatedEarnedUnits" | undefined;
|
|
532
|
-
}[];
|
|
533
|
-
active?: boolean | undefined;
|
|
534
|
-
description?: string | undefined;
|
|
535
|
-
levelId?: string | undefined;
|
|
536
|
-
}[];
|
|
537
|
-
storeCode: string;
|
|
538
|
-
}>;
|
|
539
367
|
export type TierSetAttribute = z.infer<typeof TierSetAttributeEnum>;
|
|
540
368
|
export type TierSetCondition = z.infer<typeof TierSetConditionSchema>;
|
|
541
369
|
export type TierCondition = z.infer<typeof TierConditionSchema>;
|
|
@@ -545,8 +373,4 @@ export type TierSet = z.infer<typeof TierSetSchema>;
|
|
|
545
373
|
export type TierSetListItem = z.infer<typeof TierSetListItemSchema>;
|
|
546
374
|
export type TierSetListResponse = z.infer<typeof TierSetListResponseSchema>;
|
|
547
375
|
export type TierListResponse = z.infer<typeof TierListResponseSchema>;
|
|
548
|
-
export type TierSetConditionInput = z.infer<typeof TierSetConditionInputSchema>;
|
|
549
|
-
export type TierSetCreateInput = z.infer<typeof TierSetCreateInputSchema>;
|
|
550
|
-
export type TierInput = z.infer<typeof TierInputSchema>;
|
|
551
|
-
export type TierSetUpdateTiersInput = z.infer<typeof TierSetUpdateTiersInputSchema>;
|
|
552
376
|
export type DowngradeMode = z.infer<typeof DowngradeModeEnum>;
|
|
@@ -57,31 +57,4 @@ export const TierSetListResponseSchema = z.object({
|
|
|
57
57
|
items: z.array(TierSetListItemSchema),
|
|
58
58
|
total: TotalSchema,
|
|
59
59
|
});
|
|
60
|
-
export const TierSetConditionInputSchema = z.object({
|
|
61
|
-
attribute: TierSetAttributeEnum,
|
|
62
|
-
walletType: z.string().optional(),
|
|
63
|
-
});
|
|
64
60
|
export const DowngradeModeEnum = z.enum(["none", "automatic", "x_days"]);
|
|
65
|
-
export const TierSetCreateInputSchema = z.object({
|
|
66
|
-
storeCode: z.string(),
|
|
67
|
-
name: z.string(),
|
|
68
|
-
description: z.string().optional(),
|
|
69
|
-
conditions: z.array(TierSetConditionInputSchema),
|
|
70
|
-
downgrade: z.object({
|
|
71
|
-
mode: DowngradeModeEnum,
|
|
72
|
-
days: z.number().optional(),
|
|
73
|
-
}).optional(),
|
|
74
|
-
active: z.boolean().optional(),
|
|
75
|
-
});
|
|
76
|
-
export const TierInputSchema = z.object({
|
|
77
|
-
levelId: z.string().optional(),
|
|
78
|
-
name: z.string(),
|
|
79
|
-
description: z.string().optional(),
|
|
80
|
-
active: z.boolean().optional(),
|
|
81
|
-
conditions: z.array(TierConditionSchema),
|
|
82
|
-
});
|
|
83
|
-
export const TierSetUpdateTiersInputSchema = z.object({
|
|
84
|
-
storeCode: z.string(),
|
|
85
|
-
tierSetId: z.string(),
|
|
86
|
-
tiers: z.array(TierInputSchema),
|
|
87
|
-
});
|
|
@@ -141,10 +141,8 @@ export declare const TransactionCustomerDataSchema: z.ZodObject<{
|
|
|
141
141
|
address1?: string | undefined;
|
|
142
142
|
}>>;
|
|
143
143
|
}, "strip", z.ZodTypeAny, {
|
|
144
|
-
name?: string | undefined;
|
|
145
144
|
email?: string | undefined;
|
|
146
145
|
phone?: string | undefined;
|
|
147
|
-
loyaltyCardNumber?: string | undefined;
|
|
148
146
|
address?: {
|
|
149
147
|
street?: string | undefined;
|
|
150
148
|
city?: string | undefined;
|
|
@@ -153,13 +151,13 @@ export declare const TransactionCustomerDataSchema: z.ZodObject<{
|
|
|
153
151
|
province?: string | undefined;
|
|
154
152
|
address1?: string | undefined;
|
|
155
153
|
} | undefined;
|
|
154
|
+
loyaltyCardNumber?: string | undefined;
|
|
155
|
+
name?: string | undefined;
|
|
156
156
|
customerId?: string | undefined;
|
|
157
157
|
nip?: string | undefined;
|
|
158
158
|
}, {
|
|
159
|
-
name?: string | undefined;
|
|
160
159
|
email?: string | undefined;
|
|
161
160
|
phone?: string | undefined;
|
|
162
|
-
loyaltyCardNumber?: string | undefined;
|
|
163
161
|
address?: {
|
|
164
162
|
street?: string | undefined;
|
|
165
163
|
city?: string | undefined;
|
|
@@ -168,6 +166,8 @@ export declare const TransactionCustomerDataSchema: z.ZodObject<{
|
|
|
168
166
|
province?: string | undefined;
|
|
169
167
|
address1?: string | undefined;
|
|
170
168
|
} | undefined;
|
|
169
|
+
loyaltyCardNumber?: string | undefined;
|
|
170
|
+
name?: string | undefined;
|
|
171
171
|
customerId?: string | undefined;
|
|
172
172
|
nip?: string | undefined;
|
|
173
173
|
}>;
|
|
@@ -283,10 +283,8 @@ export declare const TransactionSchema: z.ZodObject<{
|
|
|
283
283
|
address1?: string | undefined;
|
|
284
284
|
}>>;
|
|
285
285
|
}, "strip", z.ZodTypeAny, {
|
|
286
|
-
name?: string | undefined;
|
|
287
286
|
email?: string | undefined;
|
|
288
287
|
phone?: string | undefined;
|
|
289
|
-
loyaltyCardNumber?: string | undefined;
|
|
290
288
|
address?: {
|
|
291
289
|
street?: string | undefined;
|
|
292
290
|
city?: string | undefined;
|
|
@@ -295,13 +293,13 @@ export declare const TransactionSchema: z.ZodObject<{
|
|
|
295
293
|
province?: string | undefined;
|
|
296
294
|
address1?: string | undefined;
|
|
297
295
|
} | undefined;
|
|
296
|
+
loyaltyCardNumber?: string | undefined;
|
|
297
|
+
name?: string | undefined;
|
|
298
298
|
customerId?: string | undefined;
|
|
299
299
|
nip?: string | undefined;
|
|
300
300
|
}, {
|
|
301
|
-
name?: string | undefined;
|
|
302
301
|
email?: string | undefined;
|
|
303
302
|
phone?: string | undefined;
|
|
304
|
-
loyaltyCardNumber?: string | undefined;
|
|
305
303
|
address?: {
|
|
306
304
|
street?: string | undefined;
|
|
307
305
|
city?: string | undefined;
|
|
@@ -310,6 +308,8 @@ export declare const TransactionSchema: z.ZodObject<{
|
|
|
310
308
|
province?: string | undefined;
|
|
311
309
|
address1?: string | undefined;
|
|
312
310
|
} | undefined;
|
|
311
|
+
loyaltyCardNumber?: string | undefined;
|
|
312
|
+
name?: string | undefined;
|
|
313
313
|
customerId?: string | undefined;
|
|
314
314
|
nip?: string | undefined;
|
|
315
315
|
}>>;
|
|
@@ -349,10 +349,8 @@ export declare const TransactionSchema: z.ZodObject<{
|
|
|
349
349
|
createdAt?: string | undefined;
|
|
350
350
|
customerId?: string | undefined;
|
|
351
351
|
customerData?: {
|
|
352
|
-
name?: string | undefined;
|
|
353
352
|
email?: string | undefined;
|
|
354
353
|
phone?: string | undefined;
|
|
355
|
-
loyaltyCardNumber?: string | undefined;
|
|
356
354
|
address?: {
|
|
357
355
|
street?: string | undefined;
|
|
358
356
|
city?: string | undefined;
|
|
@@ -361,6 +359,8 @@ export declare const TransactionSchema: z.ZodObject<{
|
|
|
361
359
|
province?: string | undefined;
|
|
362
360
|
address1?: string | undefined;
|
|
363
361
|
} | undefined;
|
|
362
|
+
loyaltyCardNumber?: string | undefined;
|
|
363
|
+
name?: string | undefined;
|
|
364
364
|
customerId?: string | undefined;
|
|
365
365
|
nip?: string | undefined;
|
|
366
366
|
} | undefined;
|
|
@@ -396,10 +396,8 @@ export declare const TransactionSchema: z.ZodObject<{
|
|
|
396
396
|
createdAt?: string | undefined;
|
|
397
397
|
customerId?: string | undefined;
|
|
398
398
|
customerData?: {
|
|
399
|
-
name?: string | undefined;
|
|
400
399
|
email?: string | undefined;
|
|
401
400
|
phone?: string | undefined;
|
|
402
|
-
loyaltyCardNumber?: string | undefined;
|
|
403
401
|
address?: {
|
|
404
402
|
street?: string | undefined;
|
|
405
403
|
city?: string | undefined;
|
|
@@ -408,240 +406,12 @@ export declare const TransactionSchema: z.ZodObject<{
|
|
|
408
406
|
province?: string | undefined;
|
|
409
407
|
address1?: string | undefined;
|
|
410
408
|
} | undefined;
|
|
411
|
-
customerId?: string | undefined;
|
|
412
|
-
nip?: string | undefined;
|
|
413
|
-
} | undefined;
|
|
414
|
-
pointsEarned?: number | undefined;
|
|
415
|
-
}>;
|
|
416
|
-
export declare const TransactionCreateInputSchema: z.ZodObject<{
|
|
417
|
-
storeCode: z.ZodOptional<z.ZodString>;
|
|
418
|
-
header: z.ZodObject<{
|
|
419
|
-
documentNumber: z.ZodString;
|
|
420
|
-
purchasedAt: z.ZodString;
|
|
421
|
-
documentType: z.ZodOptional<z.ZodEnum<["sell", "return"]>>;
|
|
422
|
-
linkedDocumentNumber: z.ZodOptional<z.ZodString>;
|
|
423
|
-
purchasePlace: z.ZodOptional<z.ZodString>;
|
|
424
|
-
labels: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
425
|
-
key: z.ZodString;
|
|
426
|
-
value: z.ZodString;
|
|
427
|
-
}, "strip", z.ZodTypeAny, {
|
|
428
|
-
value: string;
|
|
429
|
-
key: string;
|
|
430
|
-
}, {
|
|
431
|
-
value: string;
|
|
432
|
-
key: string;
|
|
433
|
-
}>, "many">>;
|
|
434
|
-
}, "strip", z.ZodTypeAny, {
|
|
435
|
-
documentNumber: string;
|
|
436
|
-
purchasedAt: string;
|
|
437
|
-
documentType?: "sell" | "return" | undefined;
|
|
438
|
-
linkedDocumentNumber?: string | undefined;
|
|
439
|
-
purchasePlace?: string | undefined;
|
|
440
|
-
labels?: {
|
|
441
|
-
value: string;
|
|
442
|
-
key: string;
|
|
443
|
-
}[] | undefined;
|
|
444
|
-
}, {
|
|
445
|
-
documentNumber: string;
|
|
446
|
-
purchasedAt: string;
|
|
447
|
-
documentType?: "sell" | "return" | undefined;
|
|
448
|
-
linkedDocumentNumber?: string | undefined;
|
|
449
|
-
purchasePlace?: string | undefined;
|
|
450
|
-
labels?: {
|
|
451
|
-
value: string;
|
|
452
|
-
key: string;
|
|
453
|
-
}[] | undefined;
|
|
454
|
-
}>;
|
|
455
|
-
items: z.ZodArray<z.ZodObject<{
|
|
456
|
-
sku: z.ZodString;
|
|
457
|
-
name: z.ZodString;
|
|
458
|
-
grossValue: z.ZodNumber;
|
|
459
|
-
category: z.ZodString;
|
|
460
|
-
quantity: z.ZodOptional<z.ZodNumber>;
|
|
461
|
-
highPrecisionQuantity: z.ZodOptional<z.ZodNumber>;
|
|
462
|
-
maker: z.ZodOptional<z.ZodString>;
|
|
463
|
-
labels: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
464
|
-
key: z.ZodString;
|
|
465
|
-
value: z.ZodString;
|
|
466
|
-
}, "strip", z.ZodTypeAny, {
|
|
467
|
-
value: string;
|
|
468
|
-
key: string;
|
|
469
|
-
}, {
|
|
470
|
-
value: string;
|
|
471
|
-
key: string;
|
|
472
|
-
}>, "many">>;
|
|
473
|
-
}, "strip", z.ZodTypeAny, {
|
|
474
|
-
name: string;
|
|
475
|
-
sku: string;
|
|
476
|
-
grossValue: number;
|
|
477
|
-
category: string;
|
|
478
|
-
quantity?: number | undefined;
|
|
479
|
-
labels?: {
|
|
480
|
-
value: string;
|
|
481
|
-
key: string;
|
|
482
|
-
}[] | undefined;
|
|
483
|
-
highPrecisionQuantity?: number | undefined;
|
|
484
|
-
maker?: string | undefined;
|
|
485
|
-
}, {
|
|
486
|
-
name: string;
|
|
487
|
-
sku: string;
|
|
488
|
-
grossValue: number;
|
|
489
|
-
category: string;
|
|
490
|
-
quantity?: number | undefined;
|
|
491
|
-
labels?: {
|
|
492
|
-
value: string;
|
|
493
|
-
key: string;
|
|
494
|
-
}[] | undefined;
|
|
495
|
-
highPrecisionQuantity?: number | undefined;
|
|
496
|
-
maker?: string | undefined;
|
|
497
|
-
}>, "many">;
|
|
498
|
-
customerData: z.ZodOptional<z.ZodObject<{
|
|
499
|
-
customerId: z.ZodOptional<z.ZodString>;
|
|
500
|
-
email: z.ZodOptional<z.ZodString>;
|
|
501
|
-
name: z.ZodOptional<z.ZodString>;
|
|
502
|
-
phone: z.ZodOptional<z.ZodString>;
|
|
503
|
-
loyaltyCardNumber: z.ZodOptional<z.ZodString>;
|
|
504
|
-
nip: z.ZodOptional<z.ZodString>;
|
|
505
|
-
address: z.ZodOptional<z.ZodObject<{
|
|
506
|
-
street: z.ZodOptional<z.ZodString>;
|
|
507
|
-
address1: z.ZodOptional<z.ZodString>;
|
|
508
|
-
province: z.ZodOptional<z.ZodString>;
|
|
509
|
-
city: z.ZodOptional<z.ZodString>;
|
|
510
|
-
postal: z.ZodOptional<z.ZodString>;
|
|
511
|
-
country: z.ZodOptional<z.ZodString>;
|
|
512
|
-
}, "strip", z.ZodTypeAny, {
|
|
513
|
-
street?: string | undefined;
|
|
514
|
-
city?: string | undefined;
|
|
515
|
-
postal?: string | undefined;
|
|
516
|
-
country?: string | undefined;
|
|
517
|
-
province?: string | undefined;
|
|
518
|
-
address1?: string | undefined;
|
|
519
|
-
}, {
|
|
520
|
-
street?: string | undefined;
|
|
521
|
-
city?: string | undefined;
|
|
522
|
-
postal?: string | undefined;
|
|
523
|
-
country?: string | undefined;
|
|
524
|
-
province?: string | undefined;
|
|
525
|
-
address1?: string | undefined;
|
|
526
|
-
}>>;
|
|
527
|
-
}, "strip", z.ZodTypeAny, {
|
|
528
|
-
name?: string | undefined;
|
|
529
|
-
email?: string | undefined;
|
|
530
|
-
phone?: string | undefined;
|
|
531
|
-
loyaltyCardNumber?: string | undefined;
|
|
532
|
-
address?: {
|
|
533
|
-
street?: string | undefined;
|
|
534
|
-
city?: string | undefined;
|
|
535
|
-
postal?: string | undefined;
|
|
536
|
-
country?: string | undefined;
|
|
537
|
-
province?: string | undefined;
|
|
538
|
-
address1?: string | undefined;
|
|
539
|
-
} | undefined;
|
|
540
|
-
customerId?: string | undefined;
|
|
541
|
-
nip?: string | undefined;
|
|
542
|
-
}, {
|
|
543
|
-
name?: string | undefined;
|
|
544
|
-
email?: string | undefined;
|
|
545
|
-
phone?: string | undefined;
|
|
546
409
|
loyaltyCardNumber?: string | undefined;
|
|
547
|
-
address?: {
|
|
548
|
-
street?: string | undefined;
|
|
549
|
-
city?: string | undefined;
|
|
550
|
-
postal?: string | undefined;
|
|
551
|
-
country?: string | undefined;
|
|
552
|
-
province?: string | undefined;
|
|
553
|
-
address1?: string | undefined;
|
|
554
|
-
} | undefined;
|
|
555
|
-
customerId?: string | undefined;
|
|
556
|
-
nip?: string | undefined;
|
|
557
|
-
}>>;
|
|
558
|
-
channelId: z.ZodOptional<z.ZodString>;
|
|
559
|
-
}, "strip", z.ZodTypeAny, {
|
|
560
|
-
items: {
|
|
561
|
-
name: string;
|
|
562
|
-
sku: string;
|
|
563
|
-
grossValue: number;
|
|
564
|
-
category: string;
|
|
565
|
-
quantity?: number | undefined;
|
|
566
|
-
labels?: {
|
|
567
|
-
value: string;
|
|
568
|
-
key: string;
|
|
569
|
-
}[] | undefined;
|
|
570
|
-
highPrecisionQuantity?: number | undefined;
|
|
571
|
-
maker?: string | undefined;
|
|
572
|
-
}[];
|
|
573
|
-
header: {
|
|
574
|
-
documentNumber: string;
|
|
575
|
-
purchasedAt: string;
|
|
576
|
-
documentType?: "sell" | "return" | undefined;
|
|
577
|
-
linkedDocumentNumber?: string | undefined;
|
|
578
|
-
purchasePlace?: string | undefined;
|
|
579
|
-
labels?: {
|
|
580
|
-
value: string;
|
|
581
|
-
key: string;
|
|
582
|
-
}[] | undefined;
|
|
583
|
-
};
|
|
584
|
-
storeCode?: string | undefined;
|
|
585
|
-
customerData?: {
|
|
586
|
-
name?: string | undefined;
|
|
587
|
-
email?: string | undefined;
|
|
588
|
-
phone?: string | undefined;
|
|
589
|
-
loyaltyCardNumber?: string | undefined;
|
|
590
|
-
address?: {
|
|
591
|
-
street?: string | undefined;
|
|
592
|
-
city?: string | undefined;
|
|
593
|
-
postal?: string | undefined;
|
|
594
|
-
country?: string | undefined;
|
|
595
|
-
province?: string | undefined;
|
|
596
|
-
address1?: string | undefined;
|
|
597
|
-
} | undefined;
|
|
598
|
-
customerId?: string | undefined;
|
|
599
|
-
nip?: string | undefined;
|
|
600
|
-
} | undefined;
|
|
601
|
-
channelId?: string | undefined;
|
|
602
|
-
}, {
|
|
603
|
-
items: {
|
|
604
|
-
name: string;
|
|
605
|
-
sku: string;
|
|
606
|
-
grossValue: number;
|
|
607
|
-
category: string;
|
|
608
|
-
quantity?: number | undefined;
|
|
609
|
-
labels?: {
|
|
610
|
-
value: string;
|
|
611
|
-
key: string;
|
|
612
|
-
}[] | undefined;
|
|
613
|
-
highPrecisionQuantity?: number | undefined;
|
|
614
|
-
maker?: string | undefined;
|
|
615
|
-
}[];
|
|
616
|
-
header: {
|
|
617
|
-
documentNumber: string;
|
|
618
|
-
purchasedAt: string;
|
|
619
|
-
documentType?: "sell" | "return" | undefined;
|
|
620
|
-
linkedDocumentNumber?: string | undefined;
|
|
621
|
-
purchasePlace?: string | undefined;
|
|
622
|
-
labels?: {
|
|
623
|
-
value: string;
|
|
624
|
-
key: string;
|
|
625
|
-
}[] | undefined;
|
|
626
|
-
};
|
|
627
|
-
storeCode?: string | undefined;
|
|
628
|
-
customerData?: {
|
|
629
410
|
name?: string | undefined;
|
|
630
|
-
email?: string | undefined;
|
|
631
|
-
phone?: string | undefined;
|
|
632
|
-
loyaltyCardNumber?: string | undefined;
|
|
633
|
-
address?: {
|
|
634
|
-
street?: string | undefined;
|
|
635
|
-
city?: string | undefined;
|
|
636
|
-
postal?: string | undefined;
|
|
637
|
-
country?: string | undefined;
|
|
638
|
-
province?: string | undefined;
|
|
639
|
-
address1?: string | undefined;
|
|
640
|
-
} | undefined;
|
|
641
411
|
customerId?: string | undefined;
|
|
642
412
|
nip?: string | undefined;
|
|
643
413
|
} | undefined;
|
|
644
|
-
|
|
414
|
+
pointsEarned?: number | undefined;
|
|
645
415
|
}>;
|
|
646
416
|
export declare const TransactionListResponseSchema: z.ZodObject<{
|
|
647
417
|
items: z.ZodArray<z.ZodObject<{
|
|
@@ -756,10 +526,8 @@ export declare const TransactionListResponseSchema: z.ZodObject<{
|
|
|
756
526
|
address1?: string | undefined;
|
|
757
527
|
}>>;
|
|
758
528
|
}, "strip", z.ZodTypeAny, {
|
|
759
|
-
name?: string | undefined;
|
|
760
529
|
email?: string | undefined;
|
|
761
530
|
phone?: string | undefined;
|
|
762
|
-
loyaltyCardNumber?: string | undefined;
|
|
763
531
|
address?: {
|
|
764
532
|
street?: string | undefined;
|
|
765
533
|
city?: string | undefined;
|
|
@@ -768,13 +536,13 @@ export declare const TransactionListResponseSchema: z.ZodObject<{
|
|
|
768
536
|
province?: string | undefined;
|
|
769
537
|
address1?: string | undefined;
|
|
770
538
|
} | undefined;
|
|
539
|
+
loyaltyCardNumber?: string | undefined;
|
|
540
|
+
name?: string | undefined;
|
|
771
541
|
customerId?: string | undefined;
|
|
772
542
|
nip?: string | undefined;
|
|
773
543
|
}, {
|
|
774
|
-
name?: string | undefined;
|
|
775
544
|
email?: string | undefined;
|
|
776
545
|
phone?: string | undefined;
|
|
777
|
-
loyaltyCardNumber?: string | undefined;
|
|
778
546
|
address?: {
|
|
779
547
|
street?: string | undefined;
|
|
780
548
|
city?: string | undefined;
|
|
@@ -783,6 +551,8 @@ export declare const TransactionListResponseSchema: z.ZodObject<{
|
|
|
783
551
|
province?: string | undefined;
|
|
784
552
|
address1?: string | undefined;
|
|
785
553
|
} | undefined;
|
|
554
|
+
loyaltyCardNumber?: string | undefined;
|
|
555
|
+
name?: string | undefined;
|
|
786
556
|
customerId?: string | undefined;
|
|
787
557
|
nip?: string | undefined;
|
|
788
558
|
}>>;
|
|
@@ -822,10 +592,8 @@ export declare const TransactionListResponseSchema: z.ZodObject<{
|
|
|
822
592
|
createdAt?: string | undefined;
|
|
823
593
|
customerId?: string | undefined;
|
|
824
594
|
customerData?: {
|
|
825
|
-
name?: string | undefined;
|
|
826
595
|
email?: string | undefined;
|
|
827
596
|
phone?: string | undefined;
|
|
828
|
-
loyaltyCardNumber?: string | undefined;
|
|
829
597
|
address?: {
|
|
830
598
|
street?: string | undefined;
|
|
831
599
|
city?: string | undefined;
|
|
@@ -834,6 +602,8 @@ export declare const TransactionListResponseSchema: z.ZodObject<{
|
|
|
834
602
|
province?: string | undefined;
|
|
835
603
|
address1?: string | undefined;
|
|
836
604
|
} | undefined;
|
|
605
|
+
loyaltyCardNumber?: string | undefined;
|
|
606
|
+
name?: string | undefined;
|
|
837
607
|
customerId?: string | undefined;
|
|
838
608
|
nip?: string | undefined;
|
|
839
609
|
} | undefined;
|
|
@@ -869,10 +639,8 @@ export declare const TransactionListResponseSchema: z.ZodObject<{
|
|
|
869
639
|
createdAt?: string | undefined;
|
|
870
640
|
customerId?: string | undefined;
|
|
871
641
|
customerData?: {
|
|
872
|
-
name?: string | undefined;
|
|
873
642
|
email?: string | undefined;
|
|
874
643
|
phone?: string | undefined;
|
|
875
|
-
loyaltyCardNumber?: string | undefined;
|
|
876
644
|
address?: {
|
|
877
645
|
street?: string | undefined;
|
|
878
646
|
city?: string | undefined;
|
|
@@ -881,6 +649,8 @@ export declare const TransactionListResponseSchema: z.ZodObject<{
|
|
|
881
649
|
province?: string | undefined;
|
|
882
650
|
address1?: string | undefined;
|
|
883
651
|
} | undefined;
|
|
652
|
+
loyaltyCardNumber?: string | undefined;
|
|
653
|
+
name?: string | undefined;
|
|
884
654
|
customerId?: string | undefined;
|
|
885
655
|
nip?: string | undefined;
|
|
886
656
|
} | undefined;
|
|
@@ -931,10 +701,8 @@ export declare const TransactionListResponseSchema: z.ZodObject<{
|
|
|
931
701
|
createdAt?: string | undefined;
|
|
932
702
|
customerId?: string | undefined;
|
|
933
703
|
customerData?: {
|
|
934
|
-
name?: string | undefined;
|
|
935
704
|
email?: string | undefined;
|
|
936
705
|
phone?: string | undefined;
|
|
937
|
-
loyaltyCardNumber?: string | undefined;
|
|
938
706
|
address?: {
|
|
939
707
|
street?: string | undefined;
|
|
940
708
|
city?: string | undefined;
|
|
@@ -943,6 +711,8 @@ export declare const TransactionListResponseSchema: z.ZodObject<{
|
|
|
943
711
|
province?: string | undefined;
|
|
944
712
|
address1?: string | undefined;
|
|
945
713
|
} | undefined;
|
|
714
|
+
loyaltyCardNumber?: string | undefined;
|
|
715
|
+
name?: string | undefined;
|
|
946
716
|
customerId?: string | undefined;
|
|
947
717
|
nip?: string | undefined;
|
|
948
718
|
} | undefined;
|
|
@@ -987,10 +757,8 @@ export declare const TransactionListResponseSchema: z.ZodObject<{
|
|
|
987
757
|
createdAt?: string | undefined;
|
|
988
758
|
customerId?: string | undefined;
|
|
989
759
|
customerData?: {
|
|
990
|
-
name?: string | undefined;
|
|
991
760
|
email?: string | undefined;
|
|
992
761
|
phone?: string | undefined;
|
|
993
|
-
loyaltyCardNumber?: string | undefined;
|
|
994
762
|
address?: {
|
|
995
763
|
street?: string | undefined;
|
|
996
764
|
city?: string | undefined;
|
|
@@ -999,6 +767,8 @@ export declare const TransactionListResponseSchema: z.ZodObject<{
|
|
|
999
767
|
province?: string | undefined;
|
|
1000
768
|
address1?: string | undefined;
|
|
1001
769
|
} | undefined;
|
|
770
|
+
loyaltyCardNumber?: string | undefined;
|
|
771
|
+
name?: string | undefined;
|
|
1002
772
|
customerId?: string | undefined;
|
|
1003
773
|
nip?: string | undefined;
|
|
1004
774
|
} | undefined;
|
|
@@ -1018,5 +788,4 @@ export type TransactionItem = z.infer<typeof TransactionItemSchema>;
|
|
|
1018
788
|
export type TransactionAddress = z.infer<typeof TransactionAddressSchema>;
|
|
1019
789
|
export type TransactionCustomerData = z.infer<typeof TransactionCustomerDataSchema>;
|
|
1020
790
|
export type Transaction = z.infer<typeof TransactionSchema>;
|
|
1021
|
-
export type TransactionCreateInput = z.infer<typeof TransactionCreateInputSchema>;
|
|
1022
791
|
export type TransactionListResponse = z.infer<typeof TransactionListResponseSchema>;
|
|
@@ -50,13 +50,6 @@ export const TransactionSchema = z.object({
|
|
|
50
50
|
pointsEarned: z.number().optional(),
|
|
51
51
|
createdAt: z.string().optional(),
|
|
52
52
|
});
|
|
53
|
-
export const TransactionCreateInputSchema = z.object({
|
|
54
|
-
storeCode: z.string().optional(),
|
|
55
|
-
header: TransactionHeaderSchema,
|
|
56
|
-
items: z.array(TransactionItemSchema),
|
|
57
|
-
customerData: TransactionCustomerDataSchema.optional(),
|
|
58
|
-
channelId: z.string().optional(),
|
|
59
|
-
});
|
|
60
53
|
export const TransactionListResponseSchema = z.object({
|
|
61
54
|
items: z.array(TransactionSchema),
|
|
62
55
|
total: TotalSchema,
|