@tillhub/schemas 6.232.0 → 6.233.0
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
# [6.233.0](https://github.com/tillhub/schemas/compare/v6.232.0...v6.233.0) (2023-07-20)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **branches:** configurations ([1139fc9](https://github.com/tillhub/schemas/commit/1139fc9))
|
|
7
|
+
* **branches:** fix descriptions ([3c32cb7](https://github.com/tillhub/schemas/commit/3c32cb7))
|
|
8
|
+
* **branches:** make branch name default for store name ([4ce8337](https://github.com/tillhub/schemas/commit/4ce8337))
|
|
9
|
+
* **branches:** simplify schema ([8acf2bf](https://github.com/tillhub/schemas/commit/8acf2bf))
|
|
10
|
+
* **configurations:** add validation type ([1101e41](https://github.com/tillhub/schemas/commit/1101e41))
|
|
11
|
+
* **configurations:** features ([b5c3019](https://github.com/tillhub/schemas/commit/b5c3019))
|
|
12
|
+
* **transactions:** add current point balance ([662a4fb](https://github.com/tillhub/schemas/commit/662a4fb))
|
|
13
|
+
* **transactions:** add status to external rewards ([e777abe](https://github.com/tillhub/schemas/commit/e777abe))
|
|
14
|
+
* **transactions:** delete script ([4423eed](https://github.com/tillhub/schemas/commit/4423eed))
|
|
15
|
+
* **transactions:** external_rewards ([b924c19](https://github.com/tillhub/schemas/commit/b924c19))
|
|
16
|
+
* **transactions:** external_rewards ([4093e53](https://github.com/tillhub/schemas/commit/4093e53))
|
|
17
|
+
* **transactions:** external_rewards: oneOf({ ([2383efa](https://github.com/tillhub/schemas/commit/2383efa))
|
|
18
|
+
* **transactions:** store original campaign multiplier ([6eaa40d](https://github.com/tillhub/schemas/commit/6eaa40d))
|
|
19
|
+
|
|
1
20
|
# [6.232.0](https://github.com/tillhub/schemas/compare/v6.231.0...v6.232.0) (2023-07-20)
|
|
2
21
|
|
|
3
22
|
|
package/lib/v0/branches/base.js
CHANGED
|
@@ -412,6 +412,43 @@ module.exports = {
|
|
|
412
412
|
type: 'null'
|
|
413
413
|
}]
|
|
414
414
|
},
|
|
415
|
+
configurations: oneOf({
|
|
416
|
+
description: 'Replacement of configuration (unknown usage).',
|
|
417
|
+
type: 'object',
|
|
418
|
+
additionalProperties: false,
|
|
419
|
+
properties: {
|
|
420
|
+
external_rewards: oneOf({
|
|
421
|
+
type: 'object',
|
|
422
|
+
additionalProperties: false,
|
|
423
|
+
properties: {
|
|
424
|
+
coop: oneOf({
|
|
425
|
+
type: 'object',
|
|
426
|
+
description: 'Branch configuration object for Swiss Coop - data is used on transactions',
|
|
427
|
+
properties: {
|
|
428
|
+
store_eain: {
|
|
429
|
+
type: 'string',
|
|
430
|
+
description: 'Coop identity of this Tillhub branch.',
|
|
431
|
+
example: '7640147960015'
|
|
432
|
+
},
|
|
433
|
+
store_name: oneOf({
|
|
434
|
+
type: 'string',
|
|
435
|
+
maxLength: 128,
|
|
436
|
+
description: 'Name of this branch within the Coop context.',
|
|
437
|
+
example: 'Coop Supermarkt Riehen Schmiedgasse',
|
|
438
|
+
default: '{name}'
|
|
439
|
+
}),
|
|
440
|
+
store_sap_number: oneOf({
|
|
441
|
+
type: 'string',
|
|
442
|
+
pattern: '^[0-9]{4}$',
|
|
443
|
+
description: 'Tillhub branch SAP number if available.',
|
|
444
|
+
example: '000001'
|
|
445
|
+
})
|
|
446
|
+
}
|
|
447
|
+
})
|
|
448
|
+
}
|
|
449
|
+
})
|
|
450
|
+
}
|
|
451
|
+
}),
|
|
415
452
|
timezone_default: {
|
|
416
453
|
description: 'An IANA timezone that will be used to display local timezones in documents and UI. Validation for the timezone will happen in memory of the server, but not on that schema.',
|
|
417
454
|
example: 'Europe/London',
|
|
@@ -98,7 +98,26 @@ module.exports = oneOf({
|
|
|
98
98
|
minimum: 2,
|
|
99
99
|
maximum: 99,
|
|
100
100
|
default: 10
|
|
101
|
-
}
|
|
101
|
+
},
|
|
102
|
+
type: oneOf({
|
|
103
|
+
description: 'Type of the payback scheme, additional logic might apply.',
|
|
104
|
+
type: 'string',
|
|
105
|
+
enum: [
|
|
106
|
+
'generic',
|
|
107
|
+
'coop' // has predefined constants more or less for GS1
|
|
108
|
+
],
|
|
109
|
+
default: 'generic'
|
|
110
|
+
}),
|
|
111
|
+
validation: oneOf({
|
|
112
|
+
description: 'Type of the validation.',
|
|
113
|
+
type: 'string',
|
|
114
|
+
enum: [
|
|
115
|
+
'none',
|
|
116
|
+
'offline',
|
|
117
|
+
'online'
|
|
118
|
+
],
|
|
119
|
+
default: 'none'
|
|
120
|
+
})
|
|
102
121
|
}
|
|
103
122
|
}),
|
|
104
123
|
split_receipt: oneOf({
|
|
@@ -622,5 +622,136 @@ module.exports = {
|
|
|
622
622
|
type: 'number'
|
|
623
623
|
}
|
|
624
624
|
}
|
|
625
|
+
}),
|
|
626
|
+
external_rewards: oneOf({
|
|
627
|
+
type: 'object',
|
|
628
|
+
description: 'Necessary data to handle an external reward triggered by a transaction.',
|
|
629
|
+
additionalProperties: false,
|
|
630
|
+
properties: {
|
|
631
|
+
coop: oneOf({
|
|
632
|
+
type: 'object',
|
|
633
|
+
description: 'Delta object for Swiss Coop',
|
|
634
|
+
properties: {
|
|
635
|
+
used_campaign_multiplier: {
|
|
636
|
+
type: 'integer',
|
|
637
|
+
description: 'Tillhub internal storage to calculate refunds properly.',
|
|
638
|
+
minimum: 1,
|
|
639
|
+
maximum: 100,
|
|
640
|
+
default: 1
|
|
641
|
+
},
|
|
642
|
+
current_balance: oneOf({
|
|
643
|
+
type: 'integer',
|
|
644
|
+
description: 'Current balance if known via the online validation process.',
|
|
645
|
+
minimum: 0,
|
|
646
|
+
maximum: 120000,
|
|
647
|
+
default: null
|
|
648
|
+
}),
|
|
649
|
+
supercard: {
|
|
650
|
+
type: 'string',
|
|
651
|
+
description: 'Supercard number, always required.',
|
|
652
|
+
example: '762250103984932838'
|
|
653
|
+
},
|
|
654
|
+
app_id: oneOf({
|
|
655
|
+
type: 'string',
|
|
656
|
+
description: 'GS1 AppID, Null for EAN13 cards.',
|
|
657
|
+
example: '000001'
|
|
658
|
+
}),
|
|
659
|
+
guid: oneOf({
|
|
660
|
+
type: 'string',
|
|
661
|
+
description: 'GS1 Card GUID, Null for EAN13 cards.',
|
|
662
|
+
example: '50269DCFF3AD18A0E10080000A050151'
|
|
663
|
+
}),
|
|
664
|
+
client_info: {
|
|
665
|
+
type: 'object',
|
|
666
|
+
description: 'Info about the store / Tillhub branch.',
|
|
667
|
+
properties: {
|
|
668
|
+
store_eain: {
|
|
669
|
+
type: 'string',
|
|
670
|
+
description: 'Coop identity of this Tillhub branch.',
|
|
671
|
+
example: '7640147960015'
|
|
672
|
+
},
|
|
673
|
+
store_name: {
|
|
674
|
+
type: 'string',
|
|
675
|
+
maxLength: 128,
|
|
676
|
+
description: 'Name of this Tillhub branch.',
|
|
677
|
+
example: 'Coop Supermarkt Riehen Schmiedgasse'
|
|
678
|
+
},
|
|
679
|
+
store_sap_number: oneOf({
|
|
680
|
+
type: 'string',
|
|
681
|
+
pattern: '^[0-9]{4}$',
|
|
682
|
+
description: 'Tillhub branch SAP number if available.',
|
|
683
|
+
example: '000001'
|
|
684
|
+
}),
|
|
685
|
+
terminal_id: oneOf({
|
|
686
|
+
type: 'string',
|
|
687
|
+
description: 'Tillhub custom register name.',
|
|
688
|
+
example: 'Kasse 1'
|
|
689
|
+
})
|
|
690
|
+
}
|
|
691
|
+
},
|
|
692
|
+
purchase_info: {
|
|
693
|
+
type: 'object',
|
|
694
|
+
description: 'Info about the store / Tillhub branch.',
|
|
695
|
+
properties: {
|
|
696
|
+
bonus_points: oneOf({
|
|
697
|
+
type: 'integer',
|
|
698
|
+
description: 'Bonus Points to be booked - Free Points preferred, use 0 here.',
|
|
699
|
+
minimum: -12000,
|
|
700
|
+
maximum: 12000,
|
|
701
|
+
default: 0
|
|
702
|
+
}),
|
|
703
|
+
free_points: {
|
|
704
|
+
type: 'integer',
|
|
705
|
+
description: 'Free Points - preferrably used over Bonus Points.',
|
|
706
|
+
minimum: -12000,
|
|
707
|
+
maximum: 12000,
|
|
708
|
+
default: 0
|
|
709
|
+
},
|
|
710
|
+
timestamp: {
|
|
711
|
+
type: 'string',
|
|
712
|
+
format: 'date-time',
|
|
713
|
+
example: '2018-01-29T14:55:05.000Z',
|
|
714
|
+
description: 'Date of the purchase'
|
|
715
|
+
},
|
|
716
|
+
timestamp_end: {
|
|
717
|
+
type: 'string',
|
|
718
|
+
format: 'date-time',
|
|
719
|
+
example: '2018-01-29T14:55:05.000Z',
|
|
720
|
+
description: 'Date of the purchase'
|
|
721
|
+
},
|
|
722
|
+
total_items: {
|
|
723
|
+
type: 'integer',
|
|
724
|
+
description: 'Number of cart items in the transaction.',
|
|
725
|
+
minimum: 0,
|
|
726
|
+
maximum: 99
|
|
727
|
+
},
|
|
728
|
+
employee_flag: {
|
|
729
|
+
type: 'boolean',
|
|
730
|
+
description: 'Marks a Coop employee, not yet relevant.',
|
|
731
|
+
default: false
|
|
732
|
+
},
|
|
733
|
+
total_amount: {
|
|
734
|
+
type: 'integer',
|
|
735
|
+
description: 'Total value of the sale in Swiss Rappen including all purchased items.',
|
|
736
|
+
minimum: -2400000,
|
|
737
|
+
maximum: 2400000
|
|
738
|
+
},
|
|
739
|
+
point_base_amount: {
|
|
740
|
+
type: 'integer',
|
|
741
|
+
description: 'Total value of the salethat qualifies for superpoints (certain items excluded).',
|
|
742
|
+
minimum: -2400000,
|
|
743
|
+
maximum: 2400000
|
|
744
|
+
},
|
|
745
|
+
bon_nr: {
|
|
746
|
+
type: 'integer',
|
|
747
|
+
description: 'Tillhub transaction number.',
|
|
748
|
+
minimum: 0,
|
|
749
|
+
maximum: 32000
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
})
|
|
755
|
+
}
|
|
625
756
|
})
|
|
626
757
|
}
|