@zenglobal/api-client 5.1.14 → 5.1.15
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type ClientOptions = {
|
|
2
2
|
baseUrl: 'https://api-dev.zenglobal.au' | 'https://api.zenglobal.au' | (string & {});
|
|
3
3
|
};
|
|
4
|
-
export type Webhooks =
|
|
4
|
+
export type Webhooks = WebhookLoyaltyCardWebhookRequest | WebhookLoyaltyPointsWebhookRequest | WebhookCustomerUpsertWebhookRequest | WebhookOfferCreateWebhookRequest | WebhookOfferUpdateWebhookRequest | WebhookOfferRedeemWebhookRequest | WebhookOfferDeleteWebhookRequest | WebhookItemSohWebhookRequest | WebhookItemPriceWebhookRequest | WebhookTransactionCompleteWebhookRequest | WebhookPingWebhookRequest;
|
|
5
5
|
/**
|
|
6
6
|
* Address structure used for billing and shipping addresses
|
|
7
7
|
*/
|
|
@@ -38,27 +38,27 @@ export type AddressData = {
|
|
|
38
38
|
/**
|
|
39
39
|
* Address line 1
|
|
40
40
|
*/
|
|
41
|
-
address1
|
|
41
|
+
address1: string;
|
|
42
42
|
/**
|
|
43
43
|
* Address line 2
|
|
44
44
|
*/
|
|
45
|
-
address2
|
|
45
|
+
address2: string;
|
|
46
46
|
/**
|
|
47
47
|
* Suburb
|
|
48
48
|
*/
|
|
49
|
-
suburb
|
|
49
|
+
suburb: string;
|
|
50
50
|
/**
|
|
51
51
|
* State
|
|
52
52
|
*/
|
|
53
|
-
state
|
|
53
|
+
state: string;
|
|
54
54
|
/**
|
|
55
55
|
* Postcode
|
|
56
56
|
*/
|
|
57
|
-
postcode
|
|
57
|
+
postcode: string;
|
|
58
58
|
/**
|
|
59
59
|
* Country
|
|
60
60
|
*/
|
|
61
|
-
country
|
|
61
|
+
country: string;
|
|
62
62
|
};
|
|
63
63
|
/**
|
|
64
64
|
* Response for GET /lists.
|
|
@@ -808,7 +808,7 @@ export type CustomerData = {
|
|
|
808
808
|
/**
|
|
809
809
|
* Company/chain code
|
|
810
810
|
*/
|
|
811
|
-
Company:
|
|
811
|
+
Company: number;
|
|
812
812
|
/**
|
|
813
813
|
* Customer number
|
|
814
814
|
*/
|
|
@@ -820,35 +820,36 @@ export type CustomerData = {
|
|
|
820
820
|
/**
|
|
821
821
|
* Email address
|
|
822
822
|
*/
|
|
823
|
-
email
|
|
823
|
+
email: string;
|
|
824
824
|
/**
|
|
825
825
|
* Mobile number
|
|
826
826
|
*/
|
|
827
|
-
mobile
|
|
827
|
+
mobile: string;
|
|
828
828
|
/**
|
|
829
829
|
* Phone number
|
|
830
830
|
*/
|
|
831
|
-
phone
|
|
831
|
+
phone: string;
|
|
832
832
|
/**
|
|
833
833
|
* Secondary phone number
|
|
834
834
|
*/
|
|
835
|
-
phone1
|
|
835
|
+
phone1: string;
|
|
836
836
|
/**
|
|
837
837
|
* Gender
|
|
838
838
|
*/
|
|
839
|
-
gender
|
|
839
|
+
gender: string;
|
|
840
840
|
/**
|
|
841
|
-
* Date of birth
|
|
841
|
+
* Date of birth (YYYY-MM-DD)
|
|
842
842
|
*/
|
|
843
|
-
dateofbirth
|
|
843
|
+
dateofbirth: string;
|
|
844
844
|
/**
|
|
845
845
|
* WooCommerce customer ID
|
|
846
846
|
*/
|
|
847
|
-
woocommerce
|
|
847
|
+
woocommerce: string;
|
|
848
848
|
/**
|
|
849
|
-
* Shopify customer ID
|
|
849
|
+
* Shopify customer ID. The key really is spelled `shopfiy`; it has always
|
|
850
|
+
* been sent that way and is kept for compatibility.
|
|
850
851
|
*/
|
|
851
|
-
|
|
852
|
+
shopfiy: string;
|
|
852
853
|
/**
|
|
853
854
|
* Billing address
|
|
854
855
|
*/
|
|
@@ -858,9 +859,9 @@ export type CustomerData = {
|
|
|
858
859
|
*/
|
|
859
860
|
shipping: AddressData;
|
|
860
861
|
/**
|
|
861
|
-
*
|
|
862
|
+
* Loyalty cards linked to the customer. An empty array when there are none.
|
|
862
863
|
*/
|
|
863
|
-
cards
|
|
864
|
+
cards: Array<LoyaltyCardSummary>;
|
|
864
865
|
};
|
|
865
866
|
/**
|
|
866
867
|
* The error body these operations return.
|
|
@@ -1362,53 +1363,108 @@ export type InventoryLoyaltyGroup = {
|
|
|
1362
1363
|
description: string;
|
|
1363
1364
|
};
|
|
1364
1365
|
/**
|
|
1365
|
-
*
|
|
1366
|
+
* Price change, sent on `item.price`. The fields are at the top level of
|
|
1367
|
+
* `data`, not in a wrapper object.
|
|
1366
1368
|
*/
|
|
1367
|
-
export type
|
|
1369
|
+
export type InventoryPriceWebhookData = {
|
|
1370
|
+
/**
|
|
1371
|
+
* Company/chain code
|
|
1372
|
+
*/
|
|
1373
|
+
chain: number;
|
|
1374
|
+
/**
|
|
1375
|
+
* Company/chain code (same value as `chain`)
|
|
1376
|
+
*/
|
|
1377
|
+
Company: number;
|
|
1378
|
+
/**
|
|
1379
|
+
* Site ID
|
|
1380
|
+
*/
|
|
1381
|
+
Site: number;
|
|
1382
|
+
/**
|
|
1383
|
+
* Location ID
|
|
1384
|
+
*/
|
|
1385
|
+
Location: number;
|
|
1368
1386
|
/**
|
|
1369
1387
|
* Item code
|
|
1370
1388
|
*/
|
|
1371
1389
|
Item: string;
|
|
1390
|
+
/**
|
|
1391
|
+
* New price
|
|
1392
|
+
*/
|
|
1393
|
+
Price: number;
|
|
1394
|
+
/**
|
|
1395
|
+
* Always `false`
|
|
1396
|
+
*/
|
|
1397
|
+
sohFlag: false;
|
|
1398
|
+
/**
|
|
1399
|
+
* Always `true`
|
|
1400
|
+
*/
|
|
1401
|
+
priceFlag: true;
|
|
1402
|
+
};
|
|
1403
|
+
/**
|
|
1404
|
+
* Stock-on-hand change, sent on `item.soh`. The fields are at the top level
|
|
1405
|
+
* of `data`, not in a wrapper object.
|
|
1406
|
+
*
|
|
1407
|
+
* Exactly one of `StockOnHand` and `DeltaQuantity` is present, chosen by
|
|
1408
|
+
* `delta`. `PreviousSOH`, `CurrentSOH`, `ReferralItem` and `ReferralRatio`
|
|
1409
|
+
* are each left out when they have no value.
|
|
1410
|
+
*/
|
|
1411
|
+
export type InventorySohWebhookData = {
|
|
1372
1412
|
/**
|
|
1373
1413
|
* Company/chain code
|
|
1374
1414
|
*/
|
|
1375
|
-
chain:
|
|
1415
|
+
chain: number;
|
|
1376
1416
|
/**
|
|
1377
|
-
* Company/chain code (
|
|
1417
|
+
* Company/chain code (same value as `chain`)
|
|
1378
1418
|
*/
|
|
1379
|
-
Company:
|
|
1419
|
+
Company: number;
|
|
1380
1420
|
/**
|
|
1381
|
-
*
|
|
1421
|
+
* Site ID
|
|
1382
1422
|
*/
|
|
1383
|
-
|
|
1423
|
+
Site: number;
|
|
1384
1424
|
/**
|
|
1385
|
-
*
|
|
1425
|
+
* Location ID
|
|
1386
1426
|
*/
|
|
1387
|
-
|
|
1427
|
+
Location: number;
|
|
1388
1428
|
/**
|
|
1389
|
-
*
|
|
1429
|
+
* Item code
|
|
1390
1430
|
*/
|
|
1391
|
-
|
|
1431
|
+
Item: string;
|
|
1392
1432
|
/**
|
|
1393
|
-
*
|
|
1433
|
+
* Always `true`
|
|
1394
1434
|
*/
|
|
1395
|
-
|
|
1435
|
+
sohFlag: true;
|
|
1396
1436
|
/**
|
|
1397
|
-
*
|
|
1437
|
+
* Always `false`
|
|
1398
1438
|
*/
|
|
1399
|
-
|
|
1439
|
+
priceFlag: false;
|
|
1400
1440
|
/**
|
|
1401
|
-
*
|
|
1441
|
+
* `true` when the change is sent as a quantity change (`DeltaQuantity`), `false` when it is the new level (`StockOnHand`)
|
|
1402
1442
|
*/
|
|
1403
|
-
|
|
1443
|
+
delta: boolean;
|
|
1404
1444
|
/**
|
|
1405
|
-
*
|
|
1445
|
+
* Stock on hand. Present when `delta` is `false`.
|
|
1406
1446
|
*/
|
|
1407
|
-
|
|
1447
|
+
StockOnHand?: number;
|
|
1408
1448
|
/**
|
|
1409
|
-
*
|
|
1449
|
+
* Change in stock on hand. Present when `delta` is `true`.
|
|
1410
1450
|
*/
|
|
1411
|
-
|
|
1451
|
+
DeltaQuantity?: number;
|
|
1452
|
+
/**
|
|
1453
|
+
* Stock on hand before the change
|
|
1454
|
+
*/
|
|
1455
|
+
PreviousSOH?: number;
|
|
1456
|
+
/**
|
|
1457
|
+
* Stock on hand after the change
|
|
1458
|
+
*/
|
|
1459
|
+
CurrentSOH?: number;
|
|
1460
|
+
/**
|
|
1461
|
+
* Referral item code
|
|
1462
|
+
*/
|
|
1463
|
+
ReferralItem?: string;
|
|
1464
|
+
/**
|
|
1465
|
+
* Ratio between this item and `ReferralItem`
|
|
1466
|
+
*/
|
|
1467
|
+
ReferralRatio?: number;
|
|
1412
1468
|
};
|
|
1413
1469
|
/**
|
|
1414
1470
|
* Active jackpot information
|
|
@@ -2399,7 +2455,7 @@ export type LoyaltyCardData = {
|
|
|
2399
2455
|
/**
|
|
2400
2456
|
* Company/chain code
|
|
2401
2457
|
*/
|
|
2402
|
-
Company:
|
|
2458
|
+
Company: number;
|
|
2403
2459
|
/**
|
|
2404
2460
|
* Loyalty card number
|
|
2405
2461
|
*/
|
|
@@ -2409,21 +2465,21 @@ export type LoyaltyCardData = {
|
|
|
2409
2465
|
*/
|
|
2410
2466
|
Customer: string;
|
|
2411
2467
|
/**
|
|
2412
|
-
* Family card number
|
|
2468
|
+
* Family card number, or an empty string if the card is not linked
|
|
2413
2469
|
*/
|
|
2414
2470
|
FamilyCard: string;
|
|
2415
2471
|
/**
|
|
2416
|
-
*
|
|
2472
|
+
* Same value as `Card`
|
|
2417
2473
|
*/
|
|
2418
2474
|
OriginalCard: string;
|
|
2419
2475
|
/**
|
|
2420
|
-
*
|
|
2476
|
+
* Always `Present`
|
|
2421
2477
|
*/
|
|
2422
|
-
Status:
|
|
2478
|
+
Status: 'Present';
|
|
2423
2479
|
/**
|
|
2424
2480
|
* Customer salutation
|
|
2425
2481
|
*/
|
|
2426
|
-
Salutation
|
|
2482
|
+
Salutation: string;
|
|
2427
2483
|
/**
|
|
2428
2484
|
* First name
|
|
2429
2485
|
*/
|
|
@@ -2435,77 +2491,77 @@ export type LoyaltyCardData = {
|
|
|
2435
2491
|
/**
|
|
2436
2492
|
* Card PIN
|
|
2437
2493
|
*/
|
|
2438
|
-
pin
|
|
2494
|
+
pin: string;
|
|
2439
2495
|
/**
|
|
2440
2496
|
* Gender
|
|
2441
2497
|
*/
|
|
2442
|
-
Gender
|
|
2498
|
+
Gender: string;
|
|
2443
2499
|
/**
|
|
2444
2500
|
* Address line 1
|
|
2445
2501
|
*/
|
|
2446
|
-
Address1
|
|
2502
|
+
Address1: string;
|
|
2447
2503
|
/**
|
|
2448
2504
|
* Address line 2
|
|
2449
2505
|
*/
|
|
2450
|
-
Address2
|
|
2506
|
+
Address2: string;
|
|
2451
2507
|
/**
|
|
2452
2508
|
* Suburb
|
|
2453
2509
|
*/
|
|
2454
|
-
Suburb
|
|
2510
|
+
Suburb: string;
|
|
2455
2511
|
/**
|
|
2456
2512
|
* State
|
|
2457
2513
|
*/
|
|
2458
|
-
State
|
|
2514
|
+
State: string;
|
|
2459
2515
|
/**
|
|
2460
2516
|
* Postcode
|
|
2461
2517
|
*/
|
|
2462
|
-
Postcode
|
|
2518
|
+
Postcode: string;
|
|
2463
2519
|
/**
|
|
2464
2520
|
* Security token
|
|
2465
2521
|
*/
|
|
2466
|
-
Token
|
|
2522
|
+
Token: string;
|
|
2467
2523
|
/**
|
|
2468
|
-
*
|
|
2524
|
+
* Always an empty string
|
|
2469
2525
|
*/
|
|
2470
|
-
AppToken
|
|
2526
|
+
AppToken: '';
|
|
2471
2527
|
/**
|
|
2472
|
-
*
|
|
2528
|
+
* Always an empty string
|
|
2473
2529
|
*/
|
|
2474
|
-
AppSystem
|
|
2530
|
+
AppSystem: '';
|
|
2475
2531
|
/**
|
|
2476
2532
|
* Email address
|
|
2477
2533
|
*/
|
|
2478
|
-
Email
|
|
2534
|
+
Email: string;
|
|
2479
2535
|
/**
|
|
2480
2536
|
* Phone number
|
|
2481
2537
|
*/
|
|
2482
|
-
Phone
|
|
2538
|
+
Phone: string;
|
|
2483
2539
|
/**
|
|
2484
2540
|
* Secondary phone number
|
|
2485
2541
|
*/
|
|
2486
|
-
Phone2
|
|
2542
|
+
Phone2: string;
|
|
2487
2543
|
/**
|
|
2488
2544
|
* Mobile number
|
|
2489
2545
|
*/
|
|
2490
|
-
Mobile
|
|
2546
|
+
Mobile: string;
|
|
2491
2547
|
/**
|
|
2492
2548
|
* Fax number
|
|
2493
2549
|
*/
|
|
2494
|
-
Fax
|
|
2550
|
+
Fax: string;
|
|
2495
2551
|
/**
|
|
2496
2552
|
* Occupation
|
|
2497
2553
|
*/
|
|
2498
|
-
Occupation
|
|
2554
|
+
Occupation: string;
|
|
2499
2555
|
/**
|
|
2500
|
-
* Date of birth
|
|
2556
|
+
* Date of birth (YYYY-MM-DD)
|
|
2501
2557
|
*/
|
|
2502
|
-
dateOfBirth
|
|
2558
|
+
dateOfBirth: string;
|
|
2503
2559
|
/**
|
|
2504
2560
|
* Card type ID
|
|
2505
2561
|
*/
|
|
2506
|
-
CARDTYPE:
|
|
2562
|
+
CARDTYPE: number;
|
|
2507
2563
|
/**
|
|
2508
|
-
* Whether card follows default settings
|
|
2564
|
+
* Whether the card follows its card type's default settings
|
|
2509
2565
|
*/
|
|
2510
2566
|
FOLLOWCARD: 'T' | 'F';
|
|
2511
2567
|
/**
|
|
@@ -2521,29 +2577,29 @@ export type LoyaltyCardData = {
|
|
|
2521
2577
|
*/
|
|
2522
2578
|
Discount: string;
|
|
2523
2579
|
/**
|
|
2524
|
-
* Mail opt-in
|
|
2580
|
+
* Mail opt-in
|
|
2525
2581
|
*/
|
|
2526
|
-
mailOpt
|
|
2582
|
+
mailOpt: 'T' | 'F';
|
|
2527
2583
|
/**
|
|
2528
|
-
* Email opt-in
|
|
2584
|
+
* Email opt-in
|
|
2529
2585
|
*/
|
|
2530
|
-
emailOpt
|
|
2586
|
+
emailOpt: 'T' | 'F';
|
|
2531
2587
|
/**
|
|
2532
|
-
* SMS opt-in
|
|
2588
|
+
* SMS opt-in
|
|
2533
2589
|
*/
|
|
2534
|
-
smsOpt
|
|
2590
|
+
smsOpt: 'T' | 'F';
|
|
2535
2591
|
/**
|
|
2536
2592
|
* Whether card details are complete
|
|
2537
2593
|
*/
|
|
2538
|
-
CardComplete:
|
|
2594
|
+
CardComplete: 'T' | 'F';
|
|
2539
2595
|
/**
|
|
2540
2596
|
* Whether card is active
|
|
2541
2597
|
*/
|
|
2542
|
-
CardActive:
|
|
2598
|
+
CardActive: 'T' | 'F';
|
|
2543
2599
|
/**
|
|
2544
2600
|
* Whether card is purged
|
|
2545
2601
|
*/
|
|
2546
|
-
Purged:
|
|
2602
|
+
Purged: 'T' | 'F';
|
|
2547
2603
|
/**
|
|
2548
2604
|
* Current points balance
|
|
2549
2605
|
*/
|
|
@@ -2551,7 +2607,7 @@ export type LoyaltyCardData = {
|
|
|
2551
2607
|
/**
|
|
2552
2608
|
* Home site ID
|
|
2553
2609
|
*/
|
|
2554
|
-
HomeSite:
|
|
2610
|
+
HomeSite: number;
|
|
2555
2611
|
/**
|
|
2556
2612
|
* Home site name
|
|
2557
2613
|
*/
|
|
@@ -2559,7 +2615,7 @@ export type LoyaltyCardData = {
|
|
|
2559
2615
|
/**
|
|
2560
2616
|
* Profile picture URL
|
|
2561
2617
|
*/
|
|
2562
|
-
Picture
|
|
2618
|
+
Picture: string;
|
|
2563
2619
|
};
|
|
2564
2620
|
/**
|
|
2565
2621
|
* Card movement/tier progression information
|
|
@@ -2617,33 +2673,29 @@ export type LoyaltyCardSummary = {
|
|
|
2617
2673
|
*/
|
|
2618
2674
|
name: string;
|
|
2619
2675
|
/**
|
|
2620
|
-
* Join date
|
|
2676
|
+
* Join date (YYYY-MM-DD)
|
|
2621
2677
|
*/
|
|
2622
2678
|
joindate: string;
|
|
2623
2679
|
/**
|
|
2624
2680
|
* Points earned to date
|
|
2625
2681
|
*/
|
|
2626
|
-
pointsearned:
|
|
2682
|
+
pointsearned: number;
|
|
2627
2683
|
/**
|
|
2628
2684
|
* Points redeemed to date
|
|
2629
2685
|
*/
|
|
2630
|
-
pointsredeemed:
|
|
2686
|
+
pointsredeemed: number;
|
|
2631
2687
|
/**
|
|
2632
2688
|
* Points expired to date
|
|
2633
2689
|
*/
|
|
2634
|
-
pointsexpired:
|
|
2690
|
+
pointsexpired: number;
|
|
2635
2691
|
/**
|
|
2636
|
-
* Current points balance
|
|
2692
|
+
* Current points balance. Sent as a string, unlike the other points fields.
|
|
2637
2693
|
*/
|
|
2638
2694
|
pointsbalance: string;
|
|
2639
2695
|
/**
|
|
2640
|
-
*
|
|
2641
|
-
*/
|
|
2642
|
-
salestodate: string;
|
|
2643
|
-
/**
|
|
2644
|
-
* Card type
|
|
2696
|
+
* Card type ID
|
|
2645
2697
|
*/
|
|
2646
|
-
cardtype:
|
|
2698
|
+
cardtype: number;
|
|
2647
2699
|
};
|
|
2648
2700
|
/**
|
|
2649
2701
|
* Loyalty card type information
|
|
@@ -4474,57 +4526,306 @@ export type OfferCreateRequest = {
|
|
|
4474
4526
|
effect?: OfferEffect;
|
|
4475
4527
|
};
|
|
4476
4528
|
/**
|
|
4477
|
-
*
|
|
4529
|
+
* The offer record, sent on `offer.create` and `offer.update`.
|
|
4530
|
+
*
|
|
4531
|
+
* Most fields can be `null` when the offer does not set them. Decimal
|
|
4532
|
+
* columns are sent as strings (`"19.990"`). Flag columns are sent as `"T"`
|
|
4533
|
+
* or `"F"`, except the six listed as booleans.
|
|
4534
|
+
*
|
|
4535
|
+
* The boolean flags `linkedto`, `peritem`, `birthdayoffer`, `linkscheduler`,
|
|
4536
|
+
* `cardactive` and `cardcomplete` are always `false`, and `loyaltyonly` is
|
|
4537
|
+
* always `true`, whatever the offer is set to. This is a long-standing bug
|
|
4538
|
+
* in how these flags are converted; it is kept so existing consumers do not
|
|
4539
|
+
* break. Do not rely on these seven fields.
|
|
4478
4540
|
*/
|
|
4479
4541
|
export type OfferData = {
|
|
4480
4542
|
/**
|
|
4481
4543
|
* Offer ID
|
|
4482
4544
|
*/
|
|
4483
|
-
offerid:
|
|
4545
|
+
offerid: number;
|
|
4484
4546
|
/**
|
|
4485
|
-
* Company/chain code
|
|
4547
|
+
* Company/chain code that owns the offer
|
|
4486
4548
|
*/
|
|
4487
|
-
chaincode:
|
|
4549
|
+
chaincode: number | null;
|
|
4550
|
+
/**
|
|
4551
|
+
* Offer description
|
|
4552
|
+
*/
|
|
4553
|
+
description: string | null;
|
|
4488
4554
|
/**
|
|
4489
|
-
*
|
|
4555
|
+
* Date the offer becomes active (YYYY-MM-DD)
|
|
4490
4556
|
*/
|
|
4491
|
-
|
|
4557
|
+
dateactive: string | null;
|
|
4492
4558
|
/**
|
|
4493
|
-
*
|
|
4559
|
+
* Date the offer expires (YYYY-MM-DD)
|
|
4494
4560
|
*/
|
|
4495
|
-
|
|
4561
|
+
dateexpire: string | null;
|
|
4562
|
+
/**
|
|
4563
|
+
* Number of times a customer may use the offer
|
|
4564
|
+
*/
|
|
4565
|
+
numberallowed: number | null;
|
|
4566
|
+
/**
|
|
4567
|
+
* Number of times the offer may be used per site
|
|
4568
|
+
*/
|
|
4569
|
+
numberallowedsite: number | null;
|
|
4496
4570
|
/**
|
|
4497
|
-
*
|
|
4571
|
+
* Start hour of day, as a decimal string
|
|
4572
|
+
*/
|
|
4573
|
+
starthour: string | null;
|
|
4574
|
+
/**
|
|
4575
|
+
* End hour of day, as a decimal string
|
|
4576
|
+
*/
|
|
4577
|
+
endhour: string | null;
|
|
4578
|
+
/**
|
|
4579
|
+
* Largest basket total the offer triggers on
|
|
4580
|
+
*/
|
|
4581
|
+
maxamount: string | null;
|
|
4582
|
+
/**
|
|
4583
|
+
* Smallest basket total the offer triggers on
|
|
4584
|
+
*/
|
|
4585
|
+
minamount: string | null;
|
|
4586
|
+
/**
|
|
4587
|
+
* Offer amount
|
|
4588
|
+
*/
|
|
4589
|
+
amount: string | null;
|
|
4590
|
+
/**
|
|
4591
|
+
* Points value configured on the offer
|
|
4592
|
+
*/
|
|
4593
|
+
points: string | null;
|
|
4594
|
+
/**
|
|
4595
|
+
* Discount
|
|
4596
|
+
*/
|
|
4597
|
+
discount: string | null;
|
|
4598
|
+
/**
|
|
4599
|
+
* Department code
|
|
4600
|
+
*/
|
|
4601
|
+
department: number | null;
|
|
4602
|
+
/**
|
|
4603
|
+
* Points multiplier
|
|
4604
|
+
*/
|
|
4605
|
+
multpoints: string | null;
|
|
4606
|
+
/**
|
|
4607
|
+
* Whether the offer is enabled
|
|
4608
|
+
*/
|
|
4609
|
+
enabled: 'T' | 'F' | null;
|
|
4610
|
+
/**
|
|
4611
|
+
* Always `true`. See the model description.
|
|
4498
4612
|
*/
|
|
4499
4613
|
loyaltyonly: boolean;
|
|
4500
4614
|
/**
|
|
4501
|
-
* Whether offer is
|
|
4615
|
+
* Whether the offer is limited to the card types below
|
|
4616
|
+
*/
|
|
4617
|
+
cardtypeflag: 'T' | 'F' | null;
|
|
4618
|
+
/**
|
|
4619
|
+
* Card type the offer is limited to
|
|
4620
|
+
*/
|
|
4621
|
+
loyaltycardtype: number | null;
|
|
4622
|
+
/**
|
|
4623
|
+
* Additional card type
|
|
4624
|
+
*/
|
|
4625
|
+
loyaltycardtype1: number | null;
|
|
4626
|
+
/**
|
|
4627
|
+
* Additional card type
|
|
4628
|
+
*/
|
|
4629
|
+
loyaltycardtype2: number | null;
|
|
4630
|
+
/**
|
|
4631
|
+
* Additional card type
|
|
4632
|
+
*/
|
|
4633
|
+
loyaltycardtype3: number | null;
|
|
4634
|
+
/**
|
|
4635
|
+
* Additional card type
|
|
4636
|
+
*/
|
|
4637
|
+
loyaltycardtype4: number | null;
|
|
4638
|
+
/**
|
|
4639
|
+
* Additional card type
|
|
4640
|
+
*/
|
|
4641
|
+
loyaltycardtype5: number | null;
|
|
4642
|
+
/**
|
|
4643
|
+
* Customer group the offer is limited to
|
|
4644
|
+
*/
|
|
4645
|
+
group1: number | null;
|
|
4646
|
+
/**
|
|
4647
|
+
* Additional customer group
|
|
4648
|
+
*/
|
|
4649
|
+
group2: number | null;
|
|
4650
|
+
/**
|
|
4651
|
+
* Additional customer group
|
|
4652
|
+
*/
|
|
4653
|
+
group3: number | null;
|
|
4654
|
+
/**
|
|
4655
|
+
* Additional customer group
|
|
4656
|
+
*/
|
|
4657
|
+
group4: number | null;
|
|
4658
|
+
/**
|
|
4659
|
+
* Additional customer group
|
|
4660
|
+
*/
|
|
4661
|
+
group5: number | null;
|
|
4662
|
+
/**
|
|
4663
|
+
* Additional customer group
|
|
4664
|
+
*/
|
|
4665
|
+
group6: number | null;
|
|
4666
|
+
/**
|
|
4667
|
+
* Whether the offer is limited to the groups above
|
|
4668
|
+
*/
|
|
4669
|
+
groupflag: 'T' | 'F' | null;
|
|
4670
|
+
/**
|
|
4671
|
+
* Always `false`. See the model description.
|
|
4502
4672
|
*/
|
|
4503
4673
|
linkedto: boolean;
|
|
4504
4674
|
/**
|
|
4505
|
-
*
|
|
4675
|
+
* Always `false`. See the model description.
|
|
4676
|
+
*/
|
|
4677
|
+
peritem: boolean;
|
|
4678
|
+
/**
|
|
4679
|
+
* Offer reference
|
|
4680
|
+
*/
|
|
4681
|
+
offerref: string | null;
|
|
4682
|
+
/**
|
|
4683
|
+
* Free-text comments
|
|
4684
|
+
*/
|
|
4685
|
+
comments: string | null;
|
|
4686
|
+
/**
|
|
4687
|
+
* Offer period in days
|
|
4688
|
+
*/
|
|
4689
|
+
offerperiod: number | null;
|
|
4690
|
+
/**
|
|
4691
|
+
* Always `false`. See the model description.
|
|
4506
4692
|
*/
|
|
4507
4693
|
birthdayoffer: boolean;
|
|
4508
4694
|
/**
|
|
4509
|
-
*
|
|
4695
|
+
* Delta days
|
|
4696
|
+
*/
|
|
4697
|
+
deltadays: number | null;
|
|
4698
|
+
/**
|
|
4699
|
+
* Whether the offer is linked to an external system
|
|
4700
|
+
*/
|
|
4701
|
+
externallink: 'T' | 'F' | null;
|
|
4702
|
+
/**
|
|
4703
|
+
* External system user
|
|
4704
|
+
*/
|
|
4705
|
+
externaluser: string | null;
|
|
4706
|
+
/**
|
|
4707
|
+
* External system password
|
|
4708
|
+
*/
|
|
4709
|
+
externalpassword: string | null;
|
|
4710
|
+
/**
|
|
4711
|
+
* External system reference
|
|
4712
|
+
*/
|
|
4713
|
+
externalref: string | null;
|
|
4714
|
+
/**
|
|
4715
|
+
* Always `false`. See the model description.
|
|
4716
|
+
*/
|
|
4717
|
+
linkscheduler: boolean;
|
|
4718
|
+
/**
|
|
4719
|
+
* Offer image URL
|
|
4720
|
+
*/
|
|
4721
|
+
image: string | null;
|
|
4722
|
+
/**
|
|
4723
|
+
* Delta direction
|
|
4724
|
+
*/
|
|
4725
|
+
deltadir: string | null;
|
|
4726
|
+
/**
|
|
4727
|
+
* Boost type
|
|
4728
|
+
*/
|
|
4729
|
+
boosttype: string | null;
|
|
4730
|
+
/**
|
|
4731
|
+
* Boost days
|
|
4732
|
+
*/
|
|
4733
|
+
boostdays: number | null;
|
|
4734
|
+
/**
|
|
4735
|
+
* Always `false`. See the model description.
|
|
4510
4736
|
*/
|
|
4511
4737
|
cardactive: boolean;
|
|
4512
4738
|
/**
|
|
4513
|
-
*
|
|
4739
|
+
* Always `false`. See the model description.
|
|
4514
4740
|
*/
|
|
4515
4741
|
cardcomplete: boolean;
|
|
4516
4742
|
/**
|
|
4517
|
-
*
|
|
4743
|
+
* Coffee card ID
|
|
4744
|
+
*/
|
|
4745
|
+
coffeecard: number | null;
|
|
4746
|
+
/**
|
|
4747
|
+
* Portal user who last changed the offer
|
|
4748
|
+
*/
|
|
4749
|
+
portaluser: string | null;
|
|
4750
|
+
/**
|
|
4751
|
+
* Date the offer was last changed (YYYY-MM-DD)
|
|
4518
4752
|
*/
|
|
4519
|
-
changedate: string;
|
|
4753
|
+
changedate: string | null;
|
|
4520
4754
|
/**
|
|
4521
|
-
*
|
|
4755
|
+
* Event ID
|
|
4522
4756
|
*/
|
|
4523
|
-
|
|
4757
|
+
eventid: number | null;
|
|
4524
4758
|
/**
|
|
4525
|
-
*
|
|
4759
|
+
* What the offer applies to
|
|
4526
4760
|
*/
|
|
4527
|
-
|
|
4761
|
+
apply_to: number;
|
|
4762
|
+
/**
|
|
4763
|
+
* Maximum quantity the offer applies to
|
|
4764
|
+
*/
|
|
4765
|
+
apply_upto_quantity: number;
|
|
4766
|
+
/**
|
|
4767
|
+
* Fixed amount
|
|
4768
|
+
*/
|
|
4769
|
+
fixed_amount: string;
|
|
4770
|
+
/**
|
|
4771
|
+
* Location type filter, as a JSON-encoded array in a string
|
|
4772
|
+
*/
|
|
4773
|
+
location_type_id_filter: string | null;
|
|
4774
|
+
/**
|
|
4775
|
+
* Location filter, as a JSON-encoded array in a string
|
|
4776
|
+
*/
|
|
4777
|
+
location_filter: string | null;
|
|
4778
|
+
/**
|
|
4779
|
+
* Site filter, as a JSON-encoded array in a string
|
|
4780
|
+
*/
|
|
4781
|
+
site_filter: string | null;
|
|
4782
|
+
/**
|
|
4783
|
+
* Day-of-week filter, as a JSON-encoded array in a string
|
|
4784
|
+
*/
|
|
4785
|
+
day_of_week_filter: string | null;
|
|
4786
|
+
/**
|
|
4787
|
+
* Region filter, as a JSON-encoded array in a string
|
|
4788
|
+
*/
|
|
4789
|
+
region_filter: string | null;
|
|
4790
|
+
/**
|
|
4791
|
+
* State filter, as a JSON-encoded array in a string
|
|
4792
|
+
*/
|
|
4793
|
+
state_filter: string | null;
|
|
4794
|
+
/**
|
|
4795
|
+
* Promotion group ID
|
|
4796
|
+
*/
|
|
4797
|
+
promo_group_id: number | null;
|
|
4798
|
+
/**
|
|
4799
|
+
* Item the offer applies to, or `null`
|
|
4800
|
+
*/
|
|
4801
|
+
apply_to_items: {
|
|
4802
|
+
sku: string;
|
|
4803
|
+
quantity: number;
|
|
4804
|
+
} | null;
|
|
4805
|
+
/**
|
|
4806
|
+
* Start of the new-member window (YYYY-MM-DD)
|
|
4807
|
+
*/
|
|
4808
|
+
new_member_window_start: string | null;
|
|
4809
|
+
/**
|
|
4810
|
+
* End of the new-member window (YYYY-MM-DD)
|
|
4811
|
+
*/
|
|
4812
|
+
new_member_window_end: string | null;
|
|
4813
|
+
/**
|
|
4814
|
+
* Days after the trigger that the offer becomes valid
|
|
4815
|
+
*/
|
|
4816
|
+
trigger_days_valid_after: number | null;
|
|
4817
|
+
/**
|
|
4818
|
+
* Discount item number
|
|
4819
|
+
*/
|
|
4820
|
+
discount_item_number: string | null;
|
|
4821
|
+
/**
|
|
4822
|
+
* Whether the offer is applied automatically (`1` or `0`)
|
|
4823
|
+
*/
|
|
4824
|
+
auto_applied: number;
|
|
4825
|
+
/**
|
|
4826
|
+
* Discount item type
|
|
4827
|
+
*/
|
|
4828
|
+
discount_item_type: string | null;
|
|
4528
4829
|
/**
|
|
4529
4830
|
* Maximum total discount this offer may give in a single transaction,
|
|
4530
4831
|
* summed across all lines. `null` means no cap.
|
|
@@ -4533,24 +4834,42 @@ export type OfferData = {
|
|
|
4533
4834
|
* amount. Not to be confused with `maxamount`, the largest basket total the
|
|
4534
4835
|
* offer triggers on.
|
|
4535
4836
|
*/
|
|
4536
|
-
max_discount_amount
|
|
4837
|
+
max_discount_amount: string | null;
|
|
4537
4838
|
/**
|
|
4538
|
-
*
|
|
4839
|
+
* Always `false`. Redemptions are sent as `offer.redeem`.
|
|
4539
4840
|
*/
|
|
4540
|
-
redeem:
|
|
4841
|
+
redeem: false;
|
|
4541
4842
|
/**
|
|
4542
|
-
*
|
|
4843
|
+
* Always `false`. Deletions are sent as `offer.delete`.
|
|
4543
4844
|
*/
|
|
4544
|
-
delete:
|
|
4845
|
+
delete: false;
|
|
4545
4846
|
/**
|
|
4546
|
-
*
|
|
4847
|
+
* Always `null`.
|
|
4547
4848
|
*/
|
|
4548
|
-
card
|
|
4849
|
+
card: null;
|
|
4549
4850
|
};
|
|
4550
4851
|
export type OfferDeleteResult = {
|
|
4551
4852
|
result: number;
|
|
4552
4853
|
errormessage: string;
|
|
4553
4854
|
};
|
|
4855
|
+
/**
|
|
4856
|
+
* Offer delete webhook data payload
|
|
4857
|
+
*/
|
|
4858
|
+
export type OfferDeleteWebhookData = {
|
|
4859
|
+
/**
|
|
4860
|
+
* The deleted offer
|
|
4861
|
+
*/
|
|
4862
|
+
Offer: {
|
|
4863
|
+
/**
|
|
4864
|
+
* Offer ID
|
|
4865
|
+
*/
|
|
4866
|
+
offer_id: number;
|
|
4867
|
+
/**
|
|
4868
|
+
* Company loyalty chain the offer belonged to
|
|
4869
|
+
*/
|
|
4870
|
+
chain_code: number;
|
|
4871
|
+
};
|
|
4872
|
+
};
|
|
4554
4873
|
export type OfferDetailAmount = {
|
|
4555
4874
|
type: string;
|
|
4556
4875
|
value: number;
|
|
@@ -4772,6 +5091,102 @@ export type OfferRedemption = {
|
|
|
4772
5091
|
*/
|
|
4773
5092
|
redeemed_tax?: ApiNumeric;
|
|
4774
5093
|
};
|
|
5094
|
+
/**
|
|
5095
|
+
* One redemption of an offer at the POS. This is the redemption itself,
|
|
5096
|
+
* not the offer record: subscribe to `offer.create`/`offer.update` for the
|
|
5097
|
+
* offer's settings, and `loyalty.card` for cardholder details.
|
|
5098
|
+
*/
|
|
5099
|
+
export type OfferRedemptionData = {
|
|
5100
|
+
/**
|
|
5101
|
+
* Offer ID
|
|
5102
|
+
*/
|
|
5103
|
+
offer_id: number;
|
|
5104
|
+
/**
|
|
5105
|
+
* Offer reference
|
|
5106
|
+
*/
|
|
5107
|
+
offer_ref: string;
|
|
5108
|
+
/**
|
|
5109
|
+
* Offer description
|
|
5110
|
+
*/
|
|
5111
|
+
description: string;
|
|
5112
|
+
/**
|
|
5113
|
+
* Loyalty card used, or `null` when no card was presented
|
|
5114
|
+
*/
|
|
5115
|
+
card: string | null;
|
|
5116
|
+
/**
|
|
5117
|
+
* Whether this was a loyalty redemption
|
|
5118
|
+
*/
|
|
5119
|
+
is_loyalty: boolean;
|
|
5120
|
+
/**
|
|
5121
|
+
* Company loyalty chain the offer belongs to. This is the chain the
|
|
5122
|
+
* webhook destination is configured on, and the same value as the
|
|
5123
|
+
* envelope's `chain`.
|
|
5124
|
+
*/
|
|
5125
|
+
chain_code: number;
|
|
5126
|
+
/**
|
|
5127
|
+
* Company (chain) code where the redemption took place
|
|
5128
|
+
*/
|
|
5129
|
+
trading_chain_code: number;
|
|
5130
|
+
/**
|
|
5131
|
+
* Site ID
|
|
5132
|
+
*/
|
|
5133
|
+
site: number;
|
|
5134
|
+
/**
|
|
5135
|
+
* Location ID
|
|
5136
|
+
*/
|
|
5137
|
+
location: number;
|
|
5138
|
+
/**
|
|
5139
|
+
* Terminal number
|
|
5140
|
+
*/
|
|
5141
|
+
terminal: number;
|
|
5142
|
+
/**
|
|
5143
|
+
* Journal number of the transaction
|
|
5144
|
+
*/
|
|
5145
|
+
journal: number;
|
|
5146
|
+
/**
|
|
5147
|
+
* Sequence number of the redemption line
|
|
5148
|
+
*/
|
|
5149
|
+
sequence: number;
|
|
5150
|
+
/**
|
|
5151
|
+
* Transaction date (YYYY-MM-DD)
|
|
5152
|
+
*/
|
|
5153
|
+
transaction_date: string;
|
|
5154
|
+
/**
|
|
5155
|
+
* Transaction time of day (HH:MM:SS)
|
|
5156
|
+
*/
|
|
5157
|
+
transaction_time: string;
|
|
5158
|
+
/**
|
|
5159
|
+
* Operator number
|
|
5160
|
+
*/
|
|
5161
|
+
operator: number;
|
|
5162
|
+
/**
|
|
5163
|
+
* Operator name
|
|
5164
|
+
*/
|
|
5165
|
+
operator_name: string;
|
|
5166
|
+
/**
|
|
5167
|
+
* Value of the redemption line. Negative for a discount.
|
|
5168
|
+
*/
|
|
5169
|
+
amount: number;
|
|
5170
|
+
/**
|
|
5171
|
+
* Tax on the redemption line
|
|
5172
|
+
*/
|
|
5173
|
+
tax: number;
|
|
5174
|
+
/**
|
|
5175
|
+
* The offer's configured points value, NOT the points awarded on this
|
|
5176
|
+
* redemption. A non-loyalty redemption (`is_loyalty: false`) awards no
|
|
5177
|
+
* points even when this is non-zero.
|
|
5178
|
+
*/
|
|
5179
|
+
points: number;
|
|
5180
|
+
};
|
|
5181
|
+
/**
|
|
5182
|
+
* Offer redemption webhook data payload
|
|
5183
|
+
*/
|
|
5184
|
+
export type OfferRedemptionWebhookData = {
|
|
5185
|
+
/**
|
|
5186
|
+
* The redemption
|
|
5187
|
+
*/
|
|
5188
|
+
Redemption: OfferRedemptionData;
|
|
5189
|
+
};
|
|
4775
5190
|
/**
|
|
4776
5191
|
* Response for offer redemptions list endpoint
|
|
4777
5192
|
*/
|
|
@@ -4855,7 +5270,7 @@ export type OfferUpdateRequest = {
|
|
|
4855
5270
|
effect?: OfferEffect;
|
|
4856
5271
|
};
|
|
4857
5272
|
/**
|
|
4858
|
-
* Offer webhook data payload
|
|
5273
|
+
* Offer create/update webhook data payload
|
|
4859
5274
|
*/
|
|
4860
5275
|
export type OfferWebhookData = {
|
|
4861
5276
|
/**
|
|
@@ -5581,6 +5996,23 @@ export type PingV2PingResult = {
|
|
|
5581
5996
|
*/
|
|
5582
5997
|
chaincode: number;
|
|
5583
5998
|
};
|
|
5999
|
+
/**
|
|
6000
|
+
* Test delivery sent when a destination is tested from Zen.
|
|
6001
|
+
*/
|
|
6002
|
+
export type PingWebhookData = {
|
|
6003
|
+
/**
|
|
6004
|
+
* Always `zen.ping`
|
|
6005
|
+
*/
|
|
6006
|
+
event: 'zen.ping';
|
|
6007
|
+
/**
|
|
6008
|
+
* Name of the destination being tested
|
|
6009
|
+
*/
|
|
6010
|
+
destination: string;
|
|
6011
|
+
/**
|
|
6012
|
+
* When the test was sent (RFC 3339)
|
|
6013
|
+
*/
|
|
6014
|
+
sent_at: string;
|
|
6015
|
+
};
|
|
5584
6016
|
export type PluGroup = {
|
|
5585
6017
|
/**
|
|
5586
6018
|
* PLU Group Id (match with PLUGroupNo)
|
|
@@ -6683,29 +7115,30 @@ export type TransactionCustomer = {
|
|
|
6683
7115
|
purchaseorder?: string;
|
|
6684
7116
|
};
|
|
6685
7117
|
/**
|
|
6686
|
-
* Transaction data structure
|
|
7118
|
+
* Transaction data structure. Optional fields are left out of the body
|
|
7119
|
+
* entirely when they have no value; they are never sent as `null`.
|
|
6687
7120
|
*/
|
|
6688
7121
|
export type TransactionData = {
|
|
6689
7122
|
/**
|
|
6690
7123
|
* Company/chain code
|
|
6691
7124
|
*/
|
|
6692
|
-
Company:
|
|
7125
|
+
Company: number;
|
|
6693
7126
|
/**
|
|
6694
|
-
* Site
|
|
7127
|
+
* Site ID
|
|
6695
7128
|
*/
|
|
6696
|
-
Site:
|
|
7129
|
+
Site: number;
|
|
6697
7130
|
/**
|
|
6698
|
-
* Location
|
|
7131
|
+
* Location ID
|
|
6699
7132
|
*/
|
|
6700
|
-
Location:
|
|
7133
|
+
Location: number;
|
|
6701
7134
|
/**
|
|
6702
7135
|
* Terminal number
|
|
6703
7136
|
*/
|
|
6704
|
-
Terminal:
|
|
7137
|
+
Terminal: number;
|
|
6705
7138
|
/**
|
|
6706
7139
|
* Journal number
|
|
6707
7140
|
*/
|
|
6708
|
-
Journal:
|
|
7141
|
+
Journal: number;
|
|
6709
7142
|
/**
|
|
6710
7143
|
* Invoice journal number
|
|
6711
7144
|
*/
|
|
@@ -6715,21 +7148,21 @@ export type TransactionData = {
|
|
|
6715
7148
|
*/
|
|
6716
7149
|
CreditJournal?: string;
|
|
6717
7150
|
/**
|
|
6718
|
-
* Transaction date and time
|
|
7151
|
+
* Transaction date and time (YYYY-MM-DD HH:MM:SS)
|
|
6719
7152
|
*/
|
|
6720
7153
|
DateTime: string;
|
|
6721
7154
|
/**
|
|
6722
|
-
* Trading date
|
|
7155
|
+
* Trading date (YYYY-MM-DD)
|
|
6723
7156
|
*/
|
|
6724
7157
|
TradingDate: string;
|
|
6725
7158
|
/**
|
|
6726
|
-
*
|
|
7159
|
+
* Always `false`
|
|
6727
7160
|
*/
|
|
6728
|
-
isTraining:
|
|
7161
|
+
isTraining: false;
|
|
6729
7162
|
/**
|
|
6730
7163
|
* Operator number
|
|
6731
7164
|
*/
|
|
6732
|
-
OperatorNumber:
|
|
7165
|
+
OperatorNumber: number;
|
|
6733
7166
|
/**
|
|
6734
7167
|
* Operator name
|
|
6735
7168
|
*/
|
|
@@ -6741,19 +7174,19 @@ export type TransactionData = {
|
|
|
6741
7174
|
/**
|
|
6742
7175
|
* Cash drawer number
|
|
6743
7176
|
*/
|
|
6744
|
-
Cashdrawer:
|
|
7177
|
+
Cashdrawer: number;
|
|
6745
7178
|
/**
|
|
6746
|
-
*
|
|
7179
|
+
* Always an empty string
|
|
6747
7180
|
*/
|
|
6748
|
-
EmailReceipt
|
|
7181
|
+
EmailReceipt: '';
|
|
6749
7182
|
/**
|
|
6750
7183
|
* Customer email
|
|
6751
7184
|
*/
|
|
6752
|
-
CustomerEmail
|
|
7185
|
+
CustomerEmail: string;
|
|
6753
7186
|
/**
|
|
6754
7187
|
* Customer postcode
|
|
6755
7188
|
*/
|
|
6756
|
-
Postcode
|
|
7189
|
+
Postcode: string;
|
|
6757
7190
|
/**
|
|
6758
7191
|
* Customer name
|
|
6759
7192
|
*/
|
|
@@ -6767,23 +7200,23 @@ export type TransactionData = {
|
|
|
6767
7200
|
*/
|
|
6768
7201
|
CustomerPhone?: string;
|
|
6769
7202
|
/**
|
|
6770
|
-
* Loyalty information
|
|
7203
|
+
* Loyalty information, when a card was used
|
|
6771
7204
|
*/
|
|
6772
7205
|
Loyalty?: WebhookTransactionLoyalty;
|
|
6773
7206
|
/**
|
|
6774
|
-
* Sales
|
|
7207
|
+
* Sales lines
|
|
6775
7208
|
*/
|
|
6776
7209
|
Sales?: Array<TransactionItem>;
|
|
6777
7210
|
/**
|
|
6778
|
-
*
|
|
7211
|
+
* Tenders. Change given is a separate line with a negative amount.
|
|
6779
7212
|
*/
|
|
6780
7213
|
Tender?: Array<TransactionTender>;
|
|
6781
7214
|
/**
|
|
6782
|
-
*
|
|
7215
|
+
* Whole-of-sale discount
|
|
6783
7216
|
*/
|
|
6784
7217
|
SalesDiscount?: TransactionDiscount;
|
|
6785
7218
|
/**
|
|
6786
|
-
* Rounding
|
|
7219
|
+
* Rounding
|
|
6787
7220
|
*/
|
|
6788
7221
|
Rounding?: TransactionRounding;
|
|
6789
7222
|
};
|
|
@@ -6813,11 +7246,16 @@ export type TransactionEventResponse = {
|
|
|
6813
7246
|
[key: string]: unknown;
|
|
6814
7247
|
};
|
|
6815
7248
|
/**
|
|
6816
|
-
* Transaction
|
|
7249
|
+
* Transaction sales line.
|
|
7250
|
+
*
|
|
7251
|
+
* At most one of the pairs `SubDepartment`/`SubDepartmentName`,
|
|
7252
|
+
* `Category`/`CategoryName`, `SubCategory`/`SubCategoryName` and
|
|
7253
|
+
* `Range`/`RangeName` is present, depending on how many department levels
|
|
7254
|
+
* the company uses.
|
|
6817
7255
|
*/
|
|
6818
7256
|
export type TransactionItem = {
|
|
6819
7257
|
/**
|
|
6820
|
-
*
|
|
7258
|
+
* Line date and time (YYYY-MM-DD HH:MM:SS)
|
|
6821
7259
|
*/
|
|
6822
7260
|
DateTime: string;
|
|
6823
7261
|
/**
|
|
@@ -6837,15 +7275,15 @@ export type TransactionItem = {
|
|
|
6837
7275
|
*/
|
|
6838
7276
|
PriceLevel: number;
|
|
6839
7277
|
/**
|
|
6840
|
-
*
|
|
7278
|
+
* Unit price
|
|
6841
7279
|
*/
|
|
6842
7280
|
Price: number;
|
|
6843
7281
|
/**
|
|
6844
|
-
* Original price before discounts
|
|
7282
|
+
* Original price before discounts. `0` when not discounted.
|
|
6845
7283
|
*/
|
|
6846
|
-
OriginalPrice
|
|
7284
|
+
OriginalPrice: number;
|
|
6847
7285
|
/**
|
|
6848
|
-
*
|
|
7286
|
+
* Unit cost
|
|
6849
7287
|
*/
|
|
6850
7288
|
Cost: number;
|
|
6851
7289
|
/**
|
|
@@ -6853,11 +7291,11 @@ export type TransactionItem = {
|
|
|
6853
7291
|
*/
|
|
6854
7292
|
Quantity: number;
|
|
6855
7293
|
/**
|
|
6856
|
-
* Line total
|
|
7294
|
+
* Line total
|
|
6857
7295
|
*/
|
|
6858
7296
|
LineTotal: number;
|
|
6859
7297
|
/**
|
|
6860
|
-
* Line tax
|
|
7298
|
+
* Line tax
|
|
6861
7299
|
*/
|
|
6862
7300
|
LineTAX: number;
|
|
6863
7301
|
/**
|
|
@@ -6871,9 +7309,9 @@ export type TransactionItem = {
|
|
|
6871
7309
|
/**
|
|
6872
7310
|
* Department name
|
|
6873
7311
|
*/
|
|
6874
|
-
DepartmentName
|
|
7312
|
+
DepartmentName: string;
|
|
6875
7313
|
/**
|
|
6876
|
-
* Whether item is on special
|
|
7314
|
+
* Whether the item is on special
|
|
6877
7315
|
*/
|
|
6878
7316
|
Special: boolean;
|
|
6879
7317
|
/**
|
|
@@ -6885,21 +7323,21 @@ export type TransactionItem = {
|
|
|
6885
7323
|
*/
|
|
6886
7324
|
Bonus?: number;
|
|
6887
7325
|
/**
|
|
6888
|
-
* Whether item was scanned
|
|
7326
|
+
* Whether the item was scanned
|
|
6889
7327
|
*/
|
|
6890
7328
|
Scanned: boolean;
|
|
6891
7329
|
/**
|
|
6892
|
-
* Scan terminal number
|
|
7330
|
+
* Scan terminal number. `0` when not scanned.
|
|
6893
7331
|
*/
|
|
6894
|
-
ScanTerminal
|
|
7332
|
+
ScanTerminal: number;
|
|
6895
7333
|
/**
|
|
6896
|
-
* Brand code
|
|
7334
|
+
* Brand code. Empty string when the item has no brand.
|
|
6897
7335
|
*/
|
|
6898
|
-
Brand
|
|
7336
|
+
Brand: string;
|
|
6899
7337
|
/**
|
|
6900
|
-
* Brand name
|
|
7338
|
+
* Brand name. Empty string when the item has no brand.
|
|
6901
7339
|
*/
|
|
6902
|
-
BrandName
|
|
7340
|
+
BrandName: string;
|
|
6903
7341
|
/**
|
|
6904
7342
|
* Sub-department code
|
|
6905
7343
|
*/
|
|
@@ -7159,7 +7597,7 @@ export type TransactionTender = {
|
|
|
7159
7597
|
/**
|
|
7160
7598
|
* Tender type number
|
|
7161
7599
|
*/
|
|
7162
|
-
Number:
|
|
7600
|
+
Number: number;
|
|
7163
7601
|
/**
|
|
7164
7602
|
* Tender name
|
|
7165
7603
|
*/
|
|
@@ -8807,37 +9245,40 @@ export type WebhookEventType = 'loyalty.card' | 'loyalty.points' | 'customer.ups
|
|
|
8807
9245
|
* Outbound Webhook Models
|
|
8808
9246
|
*
|
|
8809
9247
|
* Zen sends webhooks to external systems when various events occur.
|
|
8810
|
-
* All webhooks are sent as HTTP POST requests with JSON payloads.
|
|
9248
|
+
* All webhooks are sent as HTTP POST requests with JSON payloads.
|
|
9249
|
+
*
|
|
9250
|
+
* These models describe the bodies exactly as Zen renders them. Each one is
|
|
9251
|
+
* checked against a golden fixture in
|
|
9252
|
+
* `apps/zen/db/dbtend/comms/fixtures/webhook-parity/` (the
|
|
9253
|
+
* `*.expected.json` files). When a template changes, update the matching
|
|
9254
|
+
* model here.
|
|
9255
|
+
*
|
|
9256
|
+
* Several payloads keep legacy quirks (mixed key casing, numbers sent as
|
|
9257
|
+
* strings, the `shopfiy` key). They are part of the wire contract and are
|
|
9258
|
+
* documented as sent, not as they should be.The envelope every webhook body is wrapped in. The event's own fields are
|
|
9259
|
+
* in `data`.
|
|
8811
9260
|
*/
|
|
8812
9261
|
export type WebhookPayload = {
|
|
8813
9262
|
/**
|
|
8814
|
-
*
|
|
8815
|
-
|
|
8816
|
-
|
|
8817
|
-
/**
|
|
8818
|
-
* Authentication key for webhook verification
|
|
9263
|
+
* Shared key. Only filled in when the destination is configured to send
|
|
9264
|
+
* its credential in the body; otherwise an empty string. Verify deliveries
|
|
9265
|
+
* with the `X-Zen-Signature` header instead.
|
|
8819
9266
|
*/
|
|
8820
9267
|
key: string;
|
|
8821
9268
|
/**
|
|
8822
|
-
*
|
|
8823
|
-
|
|
8824
|
-
|
|
8825
|
-
/**
|
|
8826
|
-
* Whether HTML trace is enabled
|
|
8827
|
-
*/
|
|
8828
|
-
traceHtml: boolean;
|
|
8829
|
-
/**
|
|
8830
|
-
* Whether trace logging is enabled
|
|
9269
|
+
* The legacy function name for this event. Several events share a value
|
|
9270
|
+
* (for example `create` is sent for customer, loyalty and offer events),
|
|
9271
|
+
* so use the `X-Zen-Topic` header to tell events apart.
|
|
8831
9272
|
*/
|
|
8832
|
-
|
|
9273
|
+
function: string;
|
|
8833
9274
|
/**
|
|
8834
|
-
*
|
|
9275
|
+
* Company (chain) code the destination is configured on.
|
|
8835
9276
|
*/
|
|
8836
|
-
|
|
9277
|
+
chain: number;
|
|
8837
9278
|
/**
|
|
8838
|
-
*
|
|
9279
|
+
* Always `true`.
|
|
8839
9280
|
*/
|
|
8840
|
-
viaBody:
|
|
9281
|
+
viaBody: true;
|
|
8841
9282
|
};
|
|
8842
9283
|
/**
|
|
8843
9284
|
* 200 — a newly generated signing key.
|
|
@@ -8860,29 +9301,29 @@ export type WebhookTransactionLoyalty = {
|
|
|
8860
9301
|
*/
|
|
8861
9302
|
Card: string;
|
|
8862
9303
|
/**
|
|
8863
|
-
*
|
|
9304
|
+
* Always an empty string
|
|
8864
9305
|
*/
|
|
8865
|
-
OpeningPoints
|
|
9306
|
+
OpeningPoints: '';
|
|
8866
9307
|
/**
|
|
8867
|
-
* Card holder name
|
|
9308
|
+
* Card holder name, as `Last,First`
|
|
8868
9309
|
*/
|
|
8869
9310
|
Name: string;
|
|
8870
9311
|
/**
|
|
8871
9312
|
* First name
|
|
8872
9313
|
*/
|
|
8873
|
-
FirstName
|
|
9314
|
+
FirstName: string;
|
|
8874
9315
|
/**
|
|
8875
9316
|
* Last name
|
|
8876
9317
|
*/
|
|
8877
|
-
LastName
|
|
9318
|
+
LastName: string;
|
|
8878
9319
|
/**
|
|
8879
|
-
*
|
|
9320
|
+
* Round points flag
|
|
8880
9321
|
*/
|
|
8881
|
-
RoundPoints
|
|
9322
|
+
RoundPoints: boolean;
|
|
8882
9323
|
/**
|
|
8883
|
-
* Card type
|
|
9324
|
+
* Card type ID
|
|
8884
9325
|
*/
|
|
8885
|
-
CardType:
|
|
9326
|
+
CardType: number;
|
|
8886
9327
|
};
|
|
8887
9328
|
/**
|
|
8888
9329
|
* A field-level validation failure.
|
|
@@ -8905,6 +9346,37 @@ export type ZenNotFoundError = {
|
|
|
8905
9346
|
errormessage: 'Not Found';
|
|
8906
9347
|
issue?: string;
|
|
8907
9348
|
};
|
|
9349
|
+
/**
|
|
9350
|
+
* HMAC-SHA256 signature of the raw body, keyed with the destination's
|
|
9351
|
+
* signing key: `t=<unix seconds>,v1=<hex hmac_sha256(key, "<t>.<raw body>")>`.
|
|
9352
|
+
* See *Verifying a delivery* under Webhook Destinations.
|
|
9353
|
+
*
|
|
9354
|
+
*/
|
|
9355
|
+
export type XZenSignature = string;
|
|
9356
|
+
/**
|
|
9357
|
+
* The event type, for example `offer.redeem`. Use this, not the body's `function`, to tell events apart.
|
|
9358
|
+
*/
|
|
9359
|
+
export type XZenTopic = string;
|
|
9360
|
+
/**
|
|
9361
|
+
* Identifies the event. The same on every retry, so deduplicate on it.
|
|
9362
|
+
*/
|
|
9363
|
+
export type XZenEventId = string;
|
|
9364
|
+
/**
|
|
9365
|
+
* Identifies this delivery attempt, as `<event id>.<attempt>`. Different on every retry.
|
|
9366
|
+
*/
|
|
9367
|
+
export type XZenDeliveryId = string;
|
|
9368
|
+
/**
|
|
9369
|
+
* Name of the webhook destination this was delivered to.
|
|
9370
|
+
*/
|
|
9371
|
+
export type XZenDestination = string;
|
|
9372
|
+
/**
|
|
9373
|
+
* RFC 3339 time the event occurred. Does not change between retries.
|
|
9374
|
+
*/
|
|
9375
|
+
export type XZenTriggeredAt = string;
|
|
9376
|
+
/**
|
|
9377
|
+
* Revision of that template the body was rendered from.
|
|
9378
|
+
*/
|
|
9379
|
+
export type XZenTemplateVersion = string;
|
|
8908
9380
|
export type SmsSendSmsData = {
|
|
8909
9381
|
body: SmsSendRequestBody;
|
|
8910
9382
|
path?: never;
|
|
@@ -12693,75 +13165,113 @@ export type PingV2ShowResponses = {
|
|
|
12693
13165
|
200: PingV2PingResult;
|
|
12694
13166
|
};
|
|
12695
13167
|
export type PingV2ShowResponse = PingV2ShowResponses[keyof PingV2ShowResponses];
|
|
12696
|
-
export type
|
|
13168
|
+
export type WebhookLoyaltyCardWebhookPayload = WebhookPayload & {
|
|
13169
|
+
function?: 'card' | 'create' | 'update';
|
|
13170
|
+
data: LoyaltyWebhookData;
|
|
13171
|
+
};
|
|
13172
|
+
export type WebhookLoyaltyCardWebhookRequest = {
|
|
13173
|
+
body: WebhookLoyaltyCardWebhookPayload;
|
|
13174
|
+
key: 'loyalty.card';
|
|
13175
|
+
path?: never;
|
|
13176
|
+
query?: never;
|
|
13177
|
+
};
|
|
13178
|
+
export type WebhookLoyaltyPointsWebhookPayload = WebhookPayload & {
|
|
13179
|
+
function?: 'points';
|
|
12697
13180
|
data: LoyaltyWebhookData;
|
|
12698
13181
|
};
|
|
12699
|
-
export type
|
|
12700
|
-
body:
|
|
12701
|
-
key: 'loyalty';
|
|
13182
|
+
export type WebhookLoyaltyPointsWebhookRequest = {
|
|
13183
|
+
body: WebhookLoyaltyPointsWebhookPayload;
|
|
13184
|
+
key: 'loyalty.points';
|
|
12702
13185
|
path?: never;
|
|
12703
13186
|
query?: never;
|
|
12704
13187
|
};
|
|
12705
|
-
export type
|
|
13188
|
+
export type WebhookCustomerUpsertWebhookPayload = WebhookPayload & {
|
|
13189
|
+
function?: 'customer' | 'create' | 'update';
|
|
12706
13190
|
data: CustomerWebhookData;
|
|
12707
13191
|
};
|
|
12708
|
-
export type
|
|
12709
|
-
body:
|
|
12710
|
-
key: 'customer';
|
|
13192
|
+
export type WebhookCustomerUpsertWebhookRequest = {
|
|
13193
|
+
body: WebhookCustomerUpsertWebhookPayload;
|
|
13194
|
+
key: 'customer.upsert';
|
|
12711
13195
|
path?: never;
|
|
12712
13196
|
query?: never;
|
|
12713
13197
|
};
|
|
12714
|
-
export type
|
|
13198
|
+
export type WebhookOfferCreateWebhookPayload = WebhookPayload & {
|
|
13199
|
+
function?: 'create';
|
|
12715
13200
|
data: OfferWebhookData;
|
|
12716
13201
|
};
|
|
12717
|
-
export type
|
|
12718
|
-
body:
|
|
12719
|
-
key: 'offer';
|
|
13202
|
+
export type WebhookOfferCreateWebhookRequest = {
|
|
13203
|
+
body: WebhookOfferCreateWebhookPayload;
|
|
13204
|
+
key: 'offer.create';
|
|
12720
13205
|
path?: never;
|
|
12721
13206
|
query?: never;
|
|
12722
13207
|
};
|
|
12723
|
-
export type
|
|
13208
|
+
export type WebhookOfferUpdateWebhookPayload = WebhookPayload & {
|
|
13209
|
+
function?: 'update';
|
|
12724
13210
|
data: OfferWebhookData;
|
|
12725
13211
|
};
|
|
12726
|
-
export type
|
|
12727
|
-
body:
|
|
12728
|
-
key: '
|
|
13212
|
+
export type WebhookOfferUpdateWebhookRequest = {
|
|
13213
|
+
body: WebhookOfferUpdateWebhookPayload;
|
|
13214
|
+
key: 'offer.update';
|
|
12729
13215
|
path?: never;
|
|
12730
13216
|
query?: never;
|
|
12731
13217
|
};
|
|
12732
|
-
export type
|
|
12733
|
-
|
|
13218
|
+
export type WebhookOfferRedeemWebhookPayload = WebhookPayload & {
|
|
13219
|
+
function?: 'redeem';
|
|
13220
|
+
data: OfferRedemptionWebhookData;
|
|
13221
|
+
};
|
|
13222
|
+
export type WebhookOfferRedeemWebhookRequest = {
|
|
13223
|
+
body: WebhookOfferRedeemWebhookPayload;
|
|
13224
|
+
key: 'offer.redeem';
|
|
13225
|
+
path?: never;
|
|
13226
|
+
query?: never;
|
|
12734
13227
|
};
|
|
12735
|
-
export type
|
|
12736
|
-
|
|
12737
|
-
|
|
13228
|
+
export type WebhookOfferDeleteWebhookPayload = WebhookPayload & {
|
|
13229
|
+
function?: 'delete';
|
|
13230
|
+
data: OfferDeleteWebhookData;
|
|
13231
|
+
};
|
|
13232
|
+
export type WebhookOfferDeleteWebhookRequest = {
|
|
13233
|
+
body: WebhookOfferDeleteWebhookPayload;
|
|
13234
|
+
key: 'offer.delete';
|
|
12738
13235
|
path?: never;
|
|
12739
13236
|
query?: never;
|
|
12740
13237
|
};
|
|
12741
|
-
export type
|
|
12742
|
-
|
|
13238
|
+
export type WebhookItemSohWebhookPayload = WebhookPayload & {
|
|
13239
|
+
function?: 'item';
|
|
13240
|
+
data: InventorySohWebhookData;
|
|
12743
13241
|
};
|
|
12744
|
-
export type
|
|
12745
|
-
body:
|
|
12746
|
-
key: 'item';
|
|
13242
|
+
export type WebhookItemSohWebhookRequest = {
|
|
13243
|
+
body: WebhookItemSohWebhookPayload;
|
|
13244
|
+
key: 'item.soh';
|
|
12747
13245
|
path?: never;
|
|
12748
13246
|
query?: never;
|
|
12749
13247
|
};
|
|
12750
|
-
export type
|
|
12751
|
-
|
|
13248
|
+
export type WebhookItemPriceWebhookPayload = WebhookPayload & {
|
|
13249
|
+
function?: 'price';
|
|
13250
|
+
data: InventoryPriceWebhookData;
|
|
12752
13251
|
};
|
|
12753
|
-
export type
|
|
12754
|
-
body:
|
|
12755
|
-
key: 'price';
|
|
13252
|
+
export type WebhookItemPriceWebhookRequest = {
|
|
13253
|
+
body: WebhookItemPriceWebhookPayload;
|
|
13254
|
+
key: 'item.price';
|
|
12756
13255
|
path?: never;
|
|
12757
13256
|
query?: never;
|
|
12758
13257
|
};
|
|
12759
|
-
export type
|
|
13258
|
+
export type WebhookTransactionCompleteWebhookPayload = WebhookPayload & {
|
|
13259
|
+
function?: 'transaction';
|
|
12760
13260
|
data: TransactionWebhookData;
|
|
12761
13261
|
};
|
|
12762
|
-
export type
|
|
12763
|
-
body:
|
|
12764
|
-
key: 'transaction';
|
|
13262
|
+
export type WebhookTransactionCompleteWebhookRequest = {
|
|
13263
|
+
body: WebhookTransactionCompleteWebhookPayload;
|
|
13264
|
+
key: 'transaction.complete';
|
|
13265
|
+
path?: never;
|
|
13266
|
+
query?: never;
|
|
13267
|
+
};
|
|
13268
|
+
export type WebhookPingWebhookPayload = WebhookPayload & {
|
|
13269
|
+
function?: 'ping';
|
|
13270
|
+
data: PingWebhookData;
|
|
13271
|
+
};
|
|
13272
|
+
export type WebhookPingWebhookRequest = {
|
|
13273
|
+
body: WebhookPingWebhookPayload;
|
|
13274
|
+
key: 'ping';
|
|
12765
13275
|
path?: never;
|
|
12766
13276
|
query?: never;
|
|
12767
13277
|
};
|