@xyo-network/payment-payload-plugins 3.0.17 → 3.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/neutral/Amount/Iso4217Currency.d.ts +5 -0
- package/dist/neutral/Amount/Iso4217Currency.d.ts.map +1 -0
- package/dist/neutral/Amount/Payload.d.ts +13 -0
- package/dist/neutral/Amount/Payload.d.ts.map +1 -0
- package/dist/neutral/Amount/index.d.ts +3 -0
- package/dist/neutral/Amount/index.d.ts.map +1 -0
- package/dist/neutral/Discount/Config.d.ts +11 -0
- package/dist/neutral/Discount/Config.d.ts.map +1 -0
- package/dist/neutral/Discount/Params.d.ts +8 -0
- package/dist/neutral/Discount/Params.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedAmount.d.ts +12 -0
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedAmount.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPercentage.d.ts +12 -0
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPercentage.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPrice.d.ts +12 -0
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPrice.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/Coupons/index.d.ts +4 -0
- package/dist/neutral/Discount/Payload/Coupon/Coupons/index.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/Payload.d.ts +6 -0
- package/dist/neutral/Discount/Payload/Coupon/Payload.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/Schema.d.ts +3 -0
- package/dist/neutral/Discount/Payload/Coupon/Schema.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/index.d.ts +5 -0
- package/dist/neutral/Discount/Payload/Coupon/index.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/types/CouponFields.d.ts +5 -0
- package/dist/neutral/Discount/Payload/Coupon/types/CouponFields.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/types/index.d.ts +3 -0
- package/dist/neutral/Discount/Payload/Coupon/types/index.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/types/isStackable.d.ts +2 -0
- package/dist/neutral/Discount/Payload/Coupon/types/isStackable.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Discount.d.ts +11 -0
- package/dist/neutral/Discount/Payload/Discount.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/NoDiscount.d.ts +3 -0
- package/dist/neutral/Discount/Payload/NoDiscount.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/index.d.ts +4 -0
- package/dist/neutral/Discount/Payload/index.d.ts.map +1 -0
- package/dist/neutral/Discount/index.d.ts +4 -0
- package/dist/neutral/Discount/index.d.ts.map +1 -0
- package/dist/neutral/Invoice/Invoice.d.ts +8 -0
- package/dist/neutral/Invoice/Invoice.d.ts.map +1 -0
- package/dist/neutral/Invoice/index.d.ts +2 -0
- package/dist/neutral/Invoice/index.d.ts.map +1 -0
- package/dist/neutral/Subtotal/Diviner/Config.d.ts +5 -0
- package/dist/neutral/Subtotal/Diviner/Config.d.ts.map +1 -0
- package/dist/neutral/Subtotal/Diviner/Params.d.ts +5 -0
- package/dist/neutral/Subtotal/Diviner/Params.d.ts.map +1 -0
- package/dist/neutral/Subtotal/Diviner/Payload.d.ts +11 -0
- package/dist/neutral/Subtotal/Diviner/Payload.d.ts.map +1 -0
- package/dist/neutral/Subtotal/Diviner/index.d.ts +4 -0
- package/dist/neutral/Subtotal/Diviner/index.d.ts.map +1 -0
- package/dist/neutral/Subtotal/index.d.ts +2 -0
- package/dist/neutral/Subtotal/index.d.ts.map +1 -0
- package/dist/neutral/Total/Diviner/Config.d.ts +9 -0
- package/dist/neutral/Total/Diviner/Config.d.ts.map +1 -0
- package/dist/neutral/Total/Diviner/Params.d.ts +5 -0
- package/dist/neutral/Total/Diviner/Params.d.ts.map +1 -0
- package/dist/neutral/Total/Diviner/Payload.d.ts +11 -0
- package/dist/neutral/Total/Diviner/Payload.d.ts.map +1 -0
- package/dist/neutral/Total/Diviner/index.d.ts +4 -0
- package/dist/neutral/Total/Diviner/index.d.ts.map +1 -0
- package/dist/neutral/Total/index.d.ts +2 -0
- package/dist/neutral/Total/index.d.ts.map +1 -0
- package/dist/neutral/index.d.ts +5 -0
- package/dist/neutral/index.d.ts.map +1 -1
- package/dist/neutral/index.mjs +375 -46
- package/dist/neutral/index.mjs.map +1 -1
- package/package.json +4 -2
- package/src/Amount/Iso4217Currency.ts +557 -0
- package/src/Amount/Payload.ts +36 -0
- package/src/Amount/index.ts +2 -0
- package/src/Discount/Config.ts +34 -0
- package/src/Discount/Params.ts +14 -0
- package/src/Discount/Payload/Coupon/Coupons/FixedAmount.ts +35 -0
- package/src/Discount/Payload/Coupon/Coupons/FixedPercentage.ts +36 -0
- package/src/Discount/Payload/Coupon/Coupons/FixedPrice.ts +35 -0
- package/src/Discount/Payload/Coupon/Coupons/index.ts +3 -0
- package/src/Discount/Payload/Coupon/Payload.ts +39 -0
- package/src/Discount/Payload/Coupon/Schema.ts +2 -0
- package/src/Discount/Payload/Coupon/index.ts +4 -0
- package/src/Discount/Payload/Coupon/types/CouponFields.ts +11 -0
- package/src/Discount/Payload/Coupon/types/index.ts +2 -0
- package/src/Discount/Payload/Coupon/types/isStackable.ts +6 -0
- package/src/Discount/Payload/Discount.ts +33 -0
- package/src/Discount/Payload/NoDiscount.ts +8 -0
- package/src/Discount/Payload/index.ts +3 -0
- package/src/Discount/index.ts +3 -0
- package/src/Invoice/Invoice.ts +19 -0
- package/src/Invoice/index.ts +1 -0
- package/src/Subtotal/Diviner/Config.ts +13 -0
- package/src/Subtotal/Diviner/Params.ts +8 -0
- package/src/Subtotal/Diviner/Payload.ts +33 -0
- package/src/Subtotal/Diviner/index.ts +3 -0
- package/src/Subtotal/index.ts +1 -0
- package/src/Total/Diviner/Config.ts +24 -0
- package/src/Total/Diviner/Params.ts +8 -0
- package/src/Total/Diviner/Payload.ts +33 -0
- package/src/Total/Diviner/index.ts +3 -0
- package/src/Total/index.ts +1 -0
- package/src/index.ts +5 -0
package/dist/neutral/index.mjs
CHANGED
|
@@ -1,9 +1,204 @@
|
|
|
1
|
-
// src/
|
|
1
|
+
// src/Amount/Iso4217Currency.ts
|
|
2
|
+
var Iso4217CurrencyCodes = {
|
|
3
|
+
AED: 784,
|
|
4
|
+
AFN: 971,
|
|
5
|
+
ALL: 8,
|
|
6
|
+
AMD: 51,
|
|
7
|
+
ANG: 532,
|
|
8
|
+
AOA: 973,
|
|
9
|
+
ARS: 32,
|
|
10
|
+
AUD: 36,
|
|
11
|
+
AWG: 533,
|
|
12
|
+
AZN: 944,
|
|
13
|
+
BAM: 977,
|
|
14
|
+
BBD: 52,
|
|
15
|
+
BDT: 50,
|
|
16
|
+
BGN: 975,
|
|
17
|
+
BHD: 48,
|
|
18
|
+
BIF: 108,
|
|
19
|
+
BMD: 60,
|
|
20
|
+
BND: 96,
|
|
21
|
+
BOB: 68,
|
|
22
|
+
BOV: 984,
|
|
23
|
+
BRL: 986,
|
|
24
|
+
BSD: 44,
|
|
25
|
+
BTN: 64,
|
|
26
|
+
BWP: 72,
|
|
27
|
+
BYN: 933,
|
|
28
|
+
BZD: 84,
|
|
29
|
+
CAD: 124,
|
|
30
|
+
CDF: 976,
|
|
31
|
+
CHE: 947,
|
|
32
|
+
CHF: 756,
|
|
33
|
+
CHW: 948,
|
|
34
|
+
CLF: 990,
|
|
35
|
+
CLP: 152,
|
|
36
|
+
CNY: 156,
|
|
37
|
+
COP: 170,
|
|
38
|
+
COU: 970,
|
|
39
|
+
CRC: 188,
|
|
40
|
+
CUP: 192,
|
|
41
|
+
CVE: 132,
|
|
42
|
+
CZK: 203,
|
|
43
|
+
DJF: 262,
|
|
44
|
+
DKK: 208,
|
|
45
|
+
DOP: 214,
|
|
46
|
+
DZD: 12,
|
|
47
|
+
EGP: 818,
|
|
48
|
+
ERN: 232,
|
|
49
|
+
ETB: 230,
|
|
50
|
+
EUR: 978,
|
|
51
|
+
FJD: 242,
|
|
52
|
+
FKP: 238,
|
|
53
|
+
GBP: 826,
|
|
54
|
+
GEL: 981,
|
|
55
|
+
GHS: 936,
|
|
56
|
+
GIP: 292,
|
|
57
|
+
GMD: 270,
|
|
58
|
+
GNF: 324,
|
|
59
|
+
GTQ: 320,
|
|
60
|
+
GYD: 328,
|
|
61
|
+
HKD: 344,
|
|
62
|
+
HNL: 340,
|
|
63
|
+
HTG: 332,
|
|
64
|
+
HUF: 348,
|
|
65
|
+
IDR: 360,
|
|
66
|
+
ILS: 376,
|
|
67
|
+
INR: 356,
|
|
68
|
+
IQD: 368,
|
|
69
|
+
IRR: 364,
|
|
70
|
+
ISK: 352,
|
|
71
|
+
JMD: 388,
|
|
72
|
+
JOD: 400,
|
|
73
|
+
JPY: 392,
|
|
74
|
+
KES: 404,
|
|
75
|
+
KGS: 417,
|
|
76
|
+
KHR: 116,
|
|
77
|
+
KMF: 174,
|
|
78
|
+
KPW: 408,
|
|
79
|
+
KRW: 410,
|
|
80
|
+
KWD: 414,
|
|
81
|
+
KYD: 136,
|
|
82
|
+
KZT: 398,
|
|
83
|
+
LAK: 418,
|
|
84
|
+
LBP: 422,
|
|
85
|
+
LKR: 144,
|
|
86
|
+
LRD: 430,
|
|
87
|
+
LSL: 426,
|
|
88
|
+
LYD: 434,
|
|
89
|
+
MAD: 504,
|
|
90
|
+
MDL: 498,
|
|
91
|
+
MGA: 969,
|
|
92
|
+
MKD: 807,
|
|
93
|
+
MMK: 104,
|
|
94
|
+
MNT: 496,
|
|
95
|
+
MOP: 446,
|
|
96
|
+
MRU: 929,
|
|
97
|
+
MUR: 480,
|
|
98
|
+
MVR: 462,
|
|
99
|
+
MWK: 454,
|
|
100
|
+
MXN: 484,
|
|
101
|
+
MXV: 979,
|
|
102
|
+
MYR: 458,
|
|
103
|
+
MZN: 943,
|
|
104
|
+
NAD: 516,
|
|
105
|
+
NGN: 566,
|
|
106
|
+
NIO: 558,
|
|
107
|
+
NOK: 578,
|
|
108
|
+
NPR: 524,
|
|
109
|
+
NZD: 554,
|
|
110
|
+
OMR: 512,
|
|
111
|
+
PAB: 590,
|
|
112
|
+
PEN: 604,
|
|
113
|
+
PGK: 598,
|
|
114
|
+
PHP: 608,
|
|
115
|
+
PKR: 586,
|
|
116
|
+
PLN: 985,
|
|
117
|
+
PYG: 600,
|
|
118
|
+
QAR: 634,
|
|
119
|
+
RON: 946,
|
|
120
|
+
RSD: 941,
|
|
121
|
+
RUB: 643,
|
|
122
|
+
RWF: 646,
|
|
123
|
+
SAR: 682,
|
|
124
|
+
SBD: 90,
|
|
125
|
+
SCR: 690,
|
|
126
|
+
SDG: 938,
|
|
127
|
+
SEK: 752,
|
|
128
|
+
SGD: 702,
|
|
129
|
+
SHP: 654,
|
|
130
|
+
SLE: 925,
|
|
131
|
+
SOS: 706,
|
|
132
|
+
SRD: 968,
|
|
133
|
+
SSP: 728,
|
|
134
|
+
STN: 930,
|
|
135
|
+
SVC: 222,
|
|
136
|
+
SYP: 760,
|
|
137
|
+
SZL: 748,
|
|
138
|
+
THB: 764,
|
|
139
|
+
TJS: 972,
|
|
140
|
+
TMT: 934,
|
|
141
|
+
TND: 788,
|
|
142
|
+
TOP: 776,
|
|
143
|
+
TRY: 949,
|
|
144
|
+
TTD: 780,
|
|
145
|
+
TWD: 901,
|
|
146
|
+
TZS: 834,
|
|
147
|
+
UAH: 980,
|
|
148
|
+
UGX: 800,
|
|
149
|
+
USD: 840,
|
|
150
|
+
USN: 997,
|
|
151
|
+
UYI: 940,
|
|
152
|
+
UYU: 858,
|
|
153
|
+
UYW: 927,
|
|
154
|
+
UZS: 860,
|
|
155
|
+
VED: 926,
|
|
156
|
+
VES: 928,
|
|
157
|
+
VND: 704,
|
|
158
|
+
VUV: 548,
|
|
159
|
+
WST: 882,
|
|
160
|
+
XAF: 950,
|
|
161
|
+
XAG: 961,
|
|
162
|
+
XAU: 959,
|
|
163
|
+
XBA: 955,
|
|
164
|
+
XBB: 956,
|
|
165
|
+
XBC: 957,
|
|
166
|
+
XBD: 958,
|
|
167
|
+
XCD: 951,
|
|
168
|
+
XDR: 960,
|
|
169
|
+
XOF: 952,
|
|
170
|
+
XPD: 964,
|
|
171
|
+
XPF: 953,
|
|
172
|
+
XPT: 962,
|
|
173
|
+
XSU: 994,
|
|
174
|
+
XTS: 963,
|
|
175
|
+
XUA: 965,
|
|
176
|
+
XXX: 999,
|
|
177
|
+
YER: 886,
|
|
178
|
+
ZAR: 710,
|
|
179
|
+
ZMW: 967,
|
|
180
|
+
ZWG: 924,
|
|
181
|
+
ZWL: 932
|
|
182
|
+
};
|
|
183
|
+
var isIso4217CurrencyCode = (code) => Iso4217CurrencyCodes[code] ? true : false;
|
|
184
|
+
|
|
185
|
+
// src/Amount/Payload.ts
|
|
2
186
|
import {
|
|
3
187
|
isPayloadOfSchemaType,
|
|
4
188
|
isPayloadOfSchemaTypeWithMeta,
|
|
5
189
|
isPayloadOfSchemaTypeWithSources
|
|
6
190
|
} from "@xyo-network/payload-model";
|
|
191
|
+
var AmountSchema = "network.xyo.payments.amount";
|
|
192
|
+
var isAmount = isPayloadOfSchemaType(AmountSchema);
|
|
193
|
+
var isAmountWithSources = isPayloadOfSchemaTypeWithSources(AmountSchema);
|
|
194
|
+
var isAmountWithMeta = isPayloadOfSchemaTypeWithMeta(AmountSchema);
|
|
195
|
+
|
|
196
|
+
// src/Billing/Address/Address.ts
|
|
197
|
+
import {
|
|
198
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType2,
|
|
199
|
+
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta2,
|
|
200
|
+
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources2
|
|
201
|
+
} from "@xyo-network/payload-model";
|
|
7
202
|
|
|
8
203
|
// src/Schema.ts
|
|
9
204
|
var PaymentsSchema = "network.xyo.payments";
|
|
@@ -15,9 +210,76 @@ var BillingSchema = `${PaymentsSchema}.billing`;
|
|
|
15
210
|
var BillingAddressSchema = `${BillingSchema}.address`;
|
|
16
211
|
|
|
17
212
|
// src/Billing/Address/Address.ts
|
|
18
|
-
var isBillingAddress =
|
|
19
|
-
var isBillingAddressWithSources =
|
|
20
|
-
var isBillingAddressWithMeta =
|
|
213
|
+
var isBillingAddress = isPayloadOfSchemaType2(BillingAddressSchema);
|
|
214
|
+
var isBillingAddressWithSources = isPayloadOfSchemaTypeWithSources2(BillingAddressSchema);
|
|
215
|
+
var isBillingAddressWithMeta = isPayloadOfSchemaTypeWithMeta2(BillingAddressSchema);
|
|
216
|
+
|
|
217
|
+
// src/Discount/Config.ts
|
|
218
|
+
var PaymentDiscountDivinerConfigSchema = "network.xyo.diviner.payments.discount.config";
|
|
219
|
+
|
|
220
|
+
// src/Discount/Payload/Coupon/Coupons/FixedAmount.ts
|
|
221
|
+
import {
|
|
222
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType3,
|
|
223
|
+
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta3,
|
|
224
|
+
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources3
|
|
225
|
+
} from "@xyo-network/payload-model";
|
|
226
|
+
|
|
227
|
+
// src/Discount/Payload/Coupon/Schema.ts
|
|
228
|
+
var CouponSchema = "network.xyo.payments.coupon";
|
|
229
|
+
|
|
230
|
+
// src/Discount/Payload/Coupon/Coupons/FixedAmount.ts
|
|
231
|
+
var FixedAmountCouponSchema = `${CouponSchema}.fixed.amount`;
|
|
232
|
+
var isFixedAmountCoupon = isPayloadOfSchemaType3(FixedAmountCouponSchema);
|
|
233
|
+
var isFixedAmountCouponWithSources = isPayloadOfSchemaTypeWithSources3(FixedAmountCouponSchema);
|
|
234
|
+
var isFixedAmountCouponWithMeta = isPayloadOfSchemaTypeWithMeta3(FixedAmountCouponSchema);
|
|
235
|
+
|
|
236
|
+
// src/Discount/Payload/Coupon/Coupons/FixedPercentage.ts
|
|
237
|
+
import {
|
|
238
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType4,
|
|
239
|
+
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta4,
|
|
240
|
+
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources4
|
|
241
|
+
} from "@xyo-network/payload-model";
|
|
242
|
+
var FixedPercentageCouponSchema = `${CouponSchema}.fixed.percentage`;
|
|
243
|
+
var isFixedPercentageCoupon = isPayloadOfSchemaType4(FixedPercentageCouponSchema);
|
|
244
|
+
var isFixedPercentageCouponWithSources = isPayloadOfSchemaTypeWithSources4(FixedPercentageCouponSchema);
|
|
245
|
+
var isFixedPercentageCouponWithMeta = isPayloadOfSchemaTypeWithMeta4(FixedPercentageCouponSchema);
|
|
246
|
+
|
|
247
|
+
// src/Discount/Payload/Coupon/Coupons/FixedPrice.ts
|
|
248
|
+
import {
|
|
249
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType5,
|
|
250
|
+
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta5,
|
|
251
|
+
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources5
|
|
252
|
+
} from "@xyo-network/payload-model";
|
|
253
|
+
var FixedPriceCouponSchema = `${CouponSchema}.fixed.price`;
|
|
254
|
+
var isFixedPriceCoupon = isPayloadOfSchemaType5(FixedPriceCouponSchema);
|
|
255
|
+
var isFixedPriceCouponWithSources = isPayloadOfSchemaTypeWithSources5(FixedPriceCouponSchema);
|
|
256
|
+
var isFixedPriceCouponWithMeta = isPayloadOfSchemaTypeWithMeta5(FixedPriceCouponSchema);
|
|
257
|
+
|
|
258
|
+
// src/Discount/Payload/Coupon/Payload.ts
|
|
259
|
+
var isCoupon = (x) => isFixedAmountCoupon(x) || isFixedPercentageCoupon(x) || isFixedPriceCoupon(x);
|
|
260
|
+
var isCouponWithSources = (x) => isFixedAmountCouponWithSources(x) || isFixedPercentageCouponWithSources(x) || isFixedPriceCouponWithSources(x);
|
|
261
|
+
var isCouponWithMeta = (x) => isFixedAmountCouponWithMeta(x) || isFixedPercentageCouponWithMeta(x);
|
|
262
|
+
|
|
263
|
+
// src/Discount/Payload/Coupon/types/isStackable.ts
|
|
264
|
+
var isStackable = (x) => (x ?? { stackable: false })?.stackable;
|
|
265
|
+
|
|
266
|
+
// src/Discount/Payload/Discount.ts
|
|
267
|
+
import {
|
|
268
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType6,
|
|
269
|
+
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta6,
|
|
270
|
+
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources6
|
|
271
|
+
} from "@xyo-network/payload-model";
|
|
272
|
+
var DiscountSchema = "network.xyo.payments.discount";
|
|
273
|
+
var isDiscount = isPayloadOfSchemaType6(DiscountSchema);
|
|
274
|
+
var isDiscountWithSources = isPayloadOfSchemaTypeWithSources6(DiscountSchema);
|
|
275
|
+
var isDiscountWithMeta = isPayloadOfSchemaTypeWithMeta6(DiscountSchema);
|
|
276
|
+
|
|
277
|
+
// src/Discount/Payload/NoDiscount.ts
|
|
278
|
+
var NO_DISCOUNT = {
|
|
279
|
+
schema: DiscountSchema,
|
|
280
|
+
amount: 0,
|
|
281
|
+
currency: "USD"
|
|
282
|
+
};
|
|
21
283
|
|
|
22
284
|
// src/Escrow/createEscrowIntent.ts
|
|
23
285
|
import { BoundWitnessBuilder } from "@xyo-network/boundwitness-builder";
|
|
@@ -39,9 +301,9 @@ var getEscrowSecret = () => {
|
|
|
39
301
|
|
|
40
302
|
// src/Escrow/Outcome.ts
|
|
41
303
|
import {
|
|
42
|
-
isPayloadOfSchemaType as
|
|
43
|
-
isPayloadOfSchemaTypeWithMeta as
|
|
44
|
-
isPayloadOfSchemaTypeWithSources as
|
|
304
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType7,
|
|
305
|
+
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta7,
|
|
306
|
+
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources7
|
|
45
307
|
} from "@xyo-network/payload-model";
|
|
46
308
|
|
|
47
309
|
// src/Escrow/Schema.ts
|
|
@@ -49,20 +311,20 @@ var EscrowSchema = "network.xyo.escrow";
|
|
|
49
311
|
|
|
50
312
|
// src/Escrow/Outcome.ts
|
|
51
313
|
var EscrowOutcomeSchema = `${EscrowSchema}.outcome`;
|
|
52
|
-
var isEscrowOutcome =
|
|
53
|
-
var isEscrowOutcomeWithSources =
|
|
54
|
-
var isEscrowOutcomeWithMeta =
|
|
314
|
+
var isEscrowOutcome = isPayloadOfSchemaType7(EscrowOutcomeSchema);
|
|
315
|
+
var isEscrowOutcomeWithSources = isPayloadOfSchemaTypeWithSources7(EscrowOutcomeSchema);
|
|
316
|
+
var isEscrowOutcomeWithMeta = isPayloadOfSchemaTypeWithMeta7(EscrowOutcomeSchema);
|
|
55
317
|
|
|
56
318
|
// src/Escrow/Terms.ts
|
|
57
319
|
import {
|
|
58
|
-
isPayloadOfSchemaType as
|
|
59
|
-
isPayloadOfSchemaTypeWithMeta as
|
|
60
|
-
isPayloadOfSchemaTypeWithSources as
|
|
320
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType8,
|
|
321
|
+
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta8,
|
|
322
|
+
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources8
|
|
61
323
|
} from "@xyo-network/payload-model";
|
|
62
324
|
var EscrowTermsSchema = `${EscrowSchema}.terms`;
|
|
63
|
-
var isEscrowTerms =
|
|
64
|
-
var isEscrowTermsWithSources =
|
|
65
|
-
var isEscrowTermsWithMeta =
|
|
325
|
+
var isEscrowTerms = isPayloadOfSchemaType8(EscrowTermsSchema);
|
|
326
|
+
var isEscrowTermsWithSources = isPayloadOfSchemaTypeWithSources8(EscrowTermsSchema);
|
|
327
|
+
var isEscrowTermsWithMeta = isPayloadOfSchemaTypeWithMeta8(EscrowTermsSchema);
|
|
66
328
|
|
|
67
329
|
// src/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.ts
|
|
68
330
|
var moduleIdentifiersContainsOneOf = (escrowTerms, propertyExpression, moduleIdentifiers, required = true) => {
|
|
@@ -373,9 +635,9 @@ var getSellerSecretSignedValidator = (dictionary) => {
|
|
|
373
635
|
|
|
374
636
|
// src/Payment/Instrument/Card/Payload.ts
|
|
375
637
|
import {
|
|
376
|
-
isPayloadOfSchemaType as
|
|
377
|
-
isPayloadOfSchemaTypeWithMeta as
|
|
378
|
-
isPayloadOfSchemaTypeWithSources as
|
|
638
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType9,
|
|
639
|
+
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta9,
|
|
640
|
+
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources9
|
|
379
641
|
} from "@xyo-network/payload-model";
|
|
380
642
|
|
|
381
643
|
// src/Payment/Schema.ts
|
|
@@ -388,76 +650,117 @@ var PaymentInstrumentSchema = `${PaymentSchema}.instrument`;
|
|
|
388
650
|
var PaymentCardSchema = `${PaymentInstrumentSchema}.card`;
|
|
389
651
|
|
|
390
652
|
// src/Payment/Instrument/Card/Payload.ts
|
|
391
|
-
var isPaymentCard =
|
|
392
|
-
var isPaymentCardWithSources =
|
|
393
|
-
var isPaymentCardWithMeta =
|
|
653
|
+
var isPaymentCard = isPayloadOfSchemaType9(PaymentCardSchema);
|
|
654
|
+
var isPaymentCardWithSources = isPayloadOfSchemaTypeWithSources9(PaymentCardSchema);
|
|
655
|
+
var isPaymentCardWithMeta = isPayloadOfSchemaTypeWithMeta9(PaymentCardSchema);
|
|
394
656
|
|
|
395
657
|
// src/Payment/Payload.ts
|
|
396
658
|
import {
|
|
397
|
-
isPayloadOfSchemaType as
|
|
398
|
-
isPayloadOfSchemaTypeWithMeta as
|
|
399
|
-
isPayloadOfSchemaTypeWithSources as
|
|
659
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType10,
|
|
660
|
+
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta10,
|
|
661
|
+
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources10
|
|
400
662
|
} from "@xyo-network/payload-model";
|
|
401
|
-
var isPayment =
|
|
402
|
-
var isPaymentWithSources =
|
|
403
|
-
var isPaymentWithMeta =
|
|
663
|
+
var isPayment = isPayloadOfSchemaType10(PaymentSchema);
|
|
664
|
+
var isPaymentWithSources = isPayloadOfSchemaTypeWithSources10(PaymentSchema);
|
|
665
|
+
var isPaymentWithMeta = isPayloadOfSchemaTypeWithMeta10(PaymentSchema);
|
|
404
666
|
|
|
405
667
|
// src/Payment/Status/Payload.ts
|
|
406
668
|
import {
|
|
407
|
-
isPayloadOfSchemaType as
|
|
408
|
-
isPayloadOfSchemaTypeWithMeta as
|
|
409
|
-
isPayloadOfSchemaTypeWithSources as
|
|
669
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType11,
|
|
670
|
+
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta11,
|
|
671
|
+
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources11
|
|
410
672
|
} from "@xyo-network/payload-model";
|
|
411
673
|
|
|
412
674
|
// src/Payment/Status/Schema.ts
|
|
413
675
|
var PaymentStatusSchema = `${PaymentSchema}.status`;
|
|
414
676
|
|
|
415
677
|
// src/Payment/Status/Payload.ts
|
|
416
|
-
var isPaymentStatus =
|
|
417
|
-
var isPaymentStatusWithSources =
|
|
418
|
-
var isPaymentStatusWithMeta =
|
|
678
|
+
var isPaymentStatus = isPayloadOfSchemaType11(PaymentStatusSchema);
|
|
679
|
+
var isPaymentStatusWithSources = isPayloadOfSchemaTypeWithSources11(PaymentStatusSchema);
|
|
680
|
+
var isPaymentStatusWithMeta = isPayloadOfSchemaTypeWithMeta11(PaymentStatusSchema);
|
|
419
681
|
|
|
420
682
|
// src/Purchase/Payload.ts
|
|
421
683
|
import {
|
|
422
|
-
isPayloadOfSchemaType as
|
|
423
|
-
isPayloadOfSchemaTypeWithMeta as
|
|
424
|
-
isPayloadOfSchemaTypeWithSources as
|
|
684
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType12,
|
|
685
|
+
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta12,
|
|
686
|
+
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources12
|
|
425
687
|
} from "@xyo-network/payload-model";
|
|
426
688
|
|
|
427
689
|
// src/Purchase/Schema.ts
|
|
428
690
|
var PurchaseSchema = `${PaymentsSchema}.purchase`;
|
|
429
691
|
|
|
430
692
|
// src/Purchase/Payload.ts
|
|
431
|
-
var isPurchase =
|
|
432
|
-
var isPurchaseWithSources =
|
|
433
|
-
var isPurchaseWithMeta =
|
|
693
|
+
var isPurchase = isPayloadOfSchemaType12(PurchaseSchema);
|
|
694
|
+
var isPurchaseWithSources = isPayloadOfSchemaTypeWithSources12(PurchaseSchema);
|
|
695
|
+
var isPurchaseWithMeta = isPayloadOfSchemaTypeWithMeta12(PurchaseSchema);
|
|
434
696
|
|
|
435
697
|
// src/Receipt/Payload.ts
|
|
436
698
|
import {
|
|
437
|
-
isPayloadOfSchemaType as
|
|
438
|
-
isPayloadOfSchemaTypeWithMeta as
|
|
439
|
-
isPayloadOfSchemaTypeWithSources as
|
|
699
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType13,
|
|
700
|
+
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta13,
|
|
701
|
+
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources13
|
|
440
702
|
} from "@xyo-network/payload-model";
|
|
441
703
|
|
|
442
704
|
// src/Receipt/Schema.ts
|
|
443
705
|
var ReceiptSchema = `${PaymentsSchema}.receipt`;
|
|
444
706
|
|
|
445
707
|
// src/Receipt/Payload.ts
|
|
446
|
-
var isReceipt =
|
|
447
|
-
var isReceiptWithSources =
|
|
448
|
-
var isReceiptWithMeta =
|
|
708
|
+
var isReceipt = isPayloadOfSchemaType13(ReceiptSchema);
|
|
709
|
+
var isReceiptWithSources = isPayloadOfSchemaTypeWithSources13(ReceiptSchema);
|
|
710
|
+
var isReceiptWithMeta = isPayloadOfSchemaTypeWithMeta13(ReceiptSchema);
|
|
711
|
+
|
|
712
|
+
// src/Subtotal/Diviner/Config.ts
|
|
713
|
+
var PaymentSubtotalDivinerConfigSchema = "network.xyo.diviner.payments.subtotal.config";
|
|
714
|
+
|
|
715
|
+
// src/Subtotal/Diviner/Payload.ts
|
|
716
|
+
import {
|
|
717
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType14,
|
|
718
|
+
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta14,
|
|
719
|
+
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources14
|
|
720
|
+
} from "@xyo-network/payload-model";
|
|
721
|
+
var SubtotalSchema = "network.xyo.payments.subtotal";
|
|
722
|
+
var isSubtotal = isPayloadOfSchemaType14(SubtotalSchema);
|
|
723
|
+
var isSubtotalWithSources = isPayloadOfSchemaTypeWithSources14(SubtotalSchema);
|
|
724
|
+
var isSubtotalWithMeta = isPayloadOfSchemaTypeWithMeta14(SubtotalSchema);
|
|
725
|
+
|
|
726
|
+
// src/Total/Diviner/Config.ts
|
|
727
|
+
var PaymentTotalDivinerConfigSchema = "network.xyo.diviner.payments.total.config";
|
|
728
|
+
|
|
729
|
+
// src/Total/Diviner/Payload.ts
|
|
730
|
+
import {
|
|
731
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType15,
|
|
732
|
+
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta15,
|
|
733
|
+
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources15
|
|
734
|
+
} from "@xyo-network/payload-model";
|
|
735
|
+
var TotalSchema = "network.xyo.payments.total";
|
|
736
|
+
var isTotal = isPayloadOfSchemaType15(TotalSchema);
|
|
737
|
+
var isTotalWithSources = isPayloadOfSchemaTypeWithSources15(TotalSchema);
|
|
738
|
+
var isTotalWithMeta = isPayloadOfSchemaTypeWithMeta15(TotalSchema);
|
|
449
739
|
export {
|
|
740
|
+
AmountSchema,
|
|
450
741
|
BillingAddressSchema,
|
|
451
742
|
BillingSchema,
|
|
743
|
+
CouponSchema,
|
|
744
|
+
DiscountSchema,
|
|
452
745
|
EscrowOutcomeSchema,
|
|
453
746
|
EscrowSchema,
|
|
454
747
|
EscrowTermsSchema,
|
|
748
|
+
FixedAmountCouponSchema,
|
|
749
|
+
FixedPercentageCouponSchema,
|
|
750
|
+
FixedPriceCouponSchema,
|
|
751
|
+
Iso4217CurrencyCodes,
|
|
752
|
+
NO_DISCOUNT,
|
|
455
753
|
PaymentCardSchema,
|
|
754
|
+
PaymentDiscountDivinerConfigSchema,
|
|
456
755
|
PaymentInstrumentSchema,
|
|
457
756
|
PaymentSchema,
|
|
458
757
|
PaymentStatusSchema,
|
|
758
|
+
PaymentSubtotalDivinerConfigSchema,
|
|
759
|
+
PaymentTotalDivinerConfigSchema,
|
|
459
760
|
PurchaseSchema,
|
|
460
761
|
ReceiptSchema,
|
|
762
|
+
SubtotalSchema,
|
|
763
|
+
TotalSchema,
|
|
461
764
|
appraisalAuthoritiesExistValidator,
|
|
462
765
|
appraisalsExistValidator,
|
|
463
766
|
assetsExistValidator,
|
|
@@ -477,15 +780,34 @@ export {
|
|
|
477
780
|
getPaymentAuthoritiesAllowedValidator,
|
|
478
781
|
getSellerSecretSignedValidator,
|
|
479
782
|
getSellerSecretSuppliedValidator,
|
|
783
|
+
isAmount,
|
|
784
|
+
isAmountWithMeta,
|
|
785
|
+
isAmountWithSources,
|
|
480
786
|
isBillingAddress,
|
|
481
787
|
isBillingAddressWithMeta,
|
|
482
788
|
isBillingAddressWithSources,
|
|
789
|
+
isCoupon,
|
|
790
|
+
isCouponWithMeta,
|
|
791
|
+
isCouponWithSources,
|
|
792
|
+
isDiscount,
|
|
793
|
+
isDiscountWithMeta,
|
|
794
|
+
isDiscountWithSources,
|
|
483
795
|
isEscrowOutcome,
|
|
484
796
|
isEscrowOutcomeWithMeta,
|
|
485
797
|
isEscrowOutcomeWithSources,
|
|
486
798
|
isEscrowTerms,
|
|
487
799
|
isEscrowTermsWithMeta,
|
|
488
800
|
isEscrowTermsWithSources,
|
|
801
|
+
isFixedAmountCoupon,
|
|
802
|
+
isFixedAmountCouponWithMeta,
|
|
803
|
+
isFixedAmountCouponWithSources,
|
|
804
|
+
isFixedPercentageCoupon,
|
|
805
|
+
isFixedPercentageCouponWithMeta,
|
|
806
|
+
isFixedPercentageCouponWithSources,
|
|
807
|
+
isFixedPriceCoupon,
|
|
808
|
+
isFixedPriceCouponWithMeta,
|
|
809
|
+
isFixedPriceCouponWithSources,
|
|
810
|
+
isIso4217CurrencyCode,
|
|
489
811
|
isPayment,
|
|
490
812
|
isPaymentCard,
|
|
491
813
|
isPaymentCardWithMeta,
|
|
@@ -501,6 +823,13 @@ export {
|
|
|
501
823
|
isReceipt,
|
|
502
824
|
isReceiptWithMeta,
|
|
503
825
|
isReceiptWithSources,
|
|
826
|
+
isStackable,
|
|
827
|
+
isSubtotal,
|
|
828
|
+
isSubtotalWithMeta,
|
|
829
|
+
isSubtotalWithSources,
|
|
830
|
+
isTotal,
|
|
831
|
+
isTotalWithMeta,
|
|
832
|
+
isTotalWithSources,
|
|
504
833
|
moduleIdentifiersContainsAllOf,
|
|
505
834
|
moduleIdentifiersContainsOneOf,
|
|
506
835
|
sellerExistsValidator,
|