@xyo-network/payment-payload-plugins 3.0.16 → 3.0.18
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/index.d.ts +3 -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 +360 -46
- package/dist/neutral/index.mjs.map +1 -1
- package/package.json +11 -9
- 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 +37 -0
- package/src/Discount/Payload/Coupon/Coupons/FixedPercentage.ts +37 -0
- package/src/Discount/Payload/Coupon/Coupons/index.ts +2 -0
- package/src/Discount/Payload/Coupon/Payload.ts +25 -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,65 @@ 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/Payload.ts
|
|
248
|
+
var isCoupon = (x) => isFixedAmountCoupon(x) || isFixedPercentageCoupon(x);
|
|
249
|
+
var isCouponWithSources = (x) => isFixedAmountCouponWithSources(x) || isFixedPercentageCouponWithSources(x);
|
|
250
|
+
var isCouponWithMeta = (x) => isFixedAmountCouponWithMeta(x) || isFixedPercentageCouponWithMeta(x);
|
|
251
|
+
|
|
252
|
+
// src/Discount/Payload/Coupon/types/isStackable.ts
|
|
253
|
+
var isStackable = (x) => (x ?? { stackable: false })?.stackable;
|
|
254
|
+
|
|
255
|
+
// src/Discount/Payload/Discount.ts
|
|
256
|
+
import {
|
|
257
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType5,
|
|
258
|
+
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta5,
|
|
259
|
+
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources5
|
|
260
|
+
} from "@xyo-network/payload-model";
|
|
261
|
+
var DiscountSchema = "network.xyo.payments.discount";
|
|
262
|
+
var isDiscount = isPayloadOfSchemaType5(DiscountSchema);
|
|
263
|
+
var isDiscountWithSources = isPayloadOfSchemaTypeWithSources5(DiscountSchema);
|
|
264
|
+
var isDiscountWithMeta = isPayloadOfSchemaTypeWithMeta5(DiscountSchema);
|
|
265
|
+
|
|
266
|
+
// src/Discount/Payload/NoDiscount.ts
|
|
267
|
+
var NO_DISCOUNT = {
|
|
268
|
+
schema: DiscountSchema,
|
|
269
|
+
amount: 0,
|
|
270
|
+
currency: "USD"
|
|
271
|
+
};
|
|
21
272
|
|
|
22
273
|
// src/Escrow/createEscrowIntent.ts
|
|
23
274
|
import { BoundWitnessBuilder } from "@xyo-network/boundwitness-builder";
|
|
@@ -39,9 +290,9 @@ var getEscrowSecret = () => {
|
|
|
39
290
|
|
|
40
291
|
// src/Escrow/Outcome.ts
|
|
41
292
|
import {
|
|
42
|
-
isPayloadOfSchemaType as
|
|
43
|
-
isPayloadOfSchemaTypeWithMeta as
|
|
44
|
-
isPayloadOfSchemaTypeWithSources as
|
|
293
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType6,
|
|
294
|
+
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta6,
|
|
295
|
+
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources6
|
|
45
296
|
} from "@xyo-network/payload-model";
|
|
46
297
|
|
|
47
298
|
// src/Escrow/Schema.ts
|
|
@@ -49,20 +300,20 @@ var EscrowSchema = "network.xyo.escrow";
|
|
|
49
300
|
|
|
50
301
|
// src/Escrow/Outcome.ts
|
|
51
302
|
var EscrowOutcomeSchema = `${EscrowSchema}.outcome`;
|
|
52
|
-
var isEscrowOutcome =
|
|
53
|
-
var isEscrowOutcomeWithSources =
|
|
54
|
-
var isEscrowOutcomeWithMeta =
|
|
303
|
+
var isEscrowOutcome = isPayloadOfSchemaType6(EscrowOutcomeSchema);
|
|
304
|
+
var isEscrowOutcomeWithSources = isPayloadOfSchemaTypeWithSources6(EscrowOutcomeSchema);
|
|
305
|
+
var isEscrowOutcomeWithMeta = isPayloadOfSchemaTypeWithMeta6(EscrowOutcomeSchema);
|
|
55
306
|
|
|
56
307
|
// src/Escrow/Terms.ts
|
|
57
308
|
import {
|
|
58
|
-
isPayloadOfSchemaType as
|
|
59
|
-
isPayloadOfSchemaTypeWithMeta as
|
|
60
|
-
isPayloadOfSchemaTypeWithSources as
|
|
309
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType7,
|
|
310
|
+
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta7,
|
|
311
|
+
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources7
|
|
61
312
|
} from "@xyo-network/payload-model";
|
|
62
313
|
var EscrowTermsSchema = `${EscrowSchema}.terms`;
|
|
63
|
-
var isEscrowTerms =
|
|
64
|
-
var isEscrowTermsWithSources =
|
|
65
|
-
var isEscrowTermsWithMeta =
|
|
314
|
+
var isEscrowTerms = isPayloadOfSchemaType7(EscrowTermsSchema);
|
|
315
|
+
var isEscrowTermsWithSources = isPayloadOfSchemaTypeWithSources7(EscrowTermsSchema);
|
|
316
|
+
var isEscrowTermsWithMeta = isPayloadOfSchemaTypeWithMeta7(EscrowTermsSchema);
|
|
66
317
|
|
|
67
318
|
// src/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.ts
|
|
68
319
|
var moduleIdentifiersContainsOneOf = (escrowTerms, propertyExpression, moduleIdentifiers, required = true) => {
|
|
@@ -373,9 +624,9 @@ var getSellerSecretSignedValidator = (dictionary) => {
|
|
|
373
624
|
|
|
374
625
|
// src/Payment/Instrument/Card/Payload.ts
|
|
375
626
|
import {
|
|
376
|
-
isPayloadOfSchemaType as
|
|
377
|
-
isPayloadOfSchemaTypeWithMeta as
|
|
378
|
-
isPayloadOfSchemaTypeWithSources as
|
|
627
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType8,
|
|
628
|
+
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta8,
|
|
629
|
+
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources8
|
|
379
630
|
} from "@xyo-network/payload-model";
|
|
380
631
|
|
|
381
632
|
// src/Payment/Schema.ts
|
|
@@ -388,76 +639,116 @@ var PaymentInstrumentSchema = `${PaymentSchema}.instrument`;
|
|
|
388
639
|
var PaymentCardSchema = `${PaymentInstrumentSchema}.card`;
|
|
389
640
|
|
|
390
641
|
// src/Payment/Instrument/Card/Payload.ts
|
|
391
|
-
var isPaymentCard =
|
|
392
|
-
var isPaymentCardWithSources =
|
|
393
|
-
var isPaymentCardWithMeta =
|
|
642
|
+
var isPaymentCard = isPayloadOfSchemaType8(PaymentCardSchema);
|
|
643
|
+
var isPaymentCardWithSources = isPayloadOfSchemaTypeWithSources8(PaymentCardSchema);
|
|
644
|
+
var isPaymentCardWithMeta = isPayloadOfSchemaTypeWithMeta8(PaymentCardSchema);
|
|
394
645
|
|
|
395
646
|
// src/Payment/Payload.ts
|
|
396
647
|
import {
|
|
397
|
-
isPayloadOfSchemaType as
|
|
398
|
-
isPayloadOfSchemaTypeWithMeta as
|
|
399
|
-
isPayloadOfSchemaTypeWithSources as
|
|
648
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType9,
|
|
649
|
+
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta9,
|
|
650
|
+
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources9
|
|
400
651
|
} from "@xyo-network/payload-model";
|
|
401
|
-
var isPayment =
|
|
402
|
-
var isPaymentWithSources =
|
|
403
|
-
var isPaymentWithMeta =
|
|
652
|
+
var isPayment = isPayloadOfSchemaType9(PaymentSchema);
|
|
653
|
+
var isPaymentWithSources = isPayloadOfSchemaTypeWithSources9(PaymentSchema);
|
|
654
|
+
var isPaymentWithMeta = isPayloadOfSchemaTypeWithMeta9(PaymentSchema);
|
|
404
655
|
|
|
405
656
|
// src/Payment/Status/Payload.ts
|
|
406
657
|
import {
|
|
407
|
-
isPayloadOfSchemaType as
|
|
408
|
-
isPayloadOfSchemaTypeWithMeta as
|
|
409
|
-
isPayloadOfSchemaTypeWithSources as
|
|
658
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType10,
|
|
659
|
+
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta10,
|
|
660
|
+
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources10
|
|
410
661
|
} from "@xyo-network/payload-model";
|
|
411
662
|
|
|
412
663
|
// src/Payment/Status/Schema.ts
|
|
413
664
|
var PaymentStatusSchema = `${PaymentSchema}.status`;
|
|
414
665
|
|
|
415
666
|
// src/Payment/Status/Payload.ts
|
|
416
|
-
var isPaymentStatus =
|
|
417
|
-
var isPaymentStatusWithSources =
|
|
418
|
-
var isPaymentStatusWithMeta =
|
|
667
|
+
var isPaymentStatus = isPayloadOfSchemaType10(PaymentStatusSchema);
|
|
668
|
+
var isPaymentStatusWithSources = isPayloadOfSchemaTypeWithSources10(PaymentStatusSchema);
|
|
669
|
+
var isPaymentStatusWithMeta = isPayloadOfSchemaTypeWithMeta10(PaymentStatusSchema);
|
|
419
670
|
|
|
420
671
|
// src/Purchase/Payload.ts
|
|
421
672
|
import {
|
|
422
|
-
isPayloadOfSchemaType as
|
|
423
|
-
isPayloadOfSchemaTypeWithMeta as
|
|
424
|
-
isPayloadOfSchemaTypeWithSources as
|
|
673
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType11,
|
|
674
|
+
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta11,
|
|
675
|
+
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources11
|
|
425
676
|
} from "@xyo-network/payload-model";
|
|
426
677
|
|
|
427
678
|
// src/Purchase/Schema.ts
|
|
428
679
|
var PurchaseSchema = `${PaymentsSchema}.purchase`;
|
|
429
680
|
|
|
430
681
|
// src/Purchase/Payload.ts
|
|
431
|
-
var isPurchase =
|
|
432
|
-
var isPurchaseWithSources =
|
|
433
|
-
var isPurchaseWithMeta =
|
|
682
|
+
var isPurchase = isPayloadOfSchemaType11(PurchaseSchema);
|
|
683
|
+
var isPurchaseWithSources = isPayloadOfSchemaTypeWithSources11(PurchaseSchema);
|
|
684
|
+
var isPurchaseWithMeta = isPayloadOfSchemaTypeWithMeta11(PurchaseSchema);
|
|
434
685
|
|
|
435
686
|
// src/Receipt/Payload.ts
|
|
436
687
|
import {
|
|
437
|
-
isPayloadOfSchemaType as
|
|
438
|
-
isPayloadOfSchemaTypeWithMeta as
|
|
439
|
-
isPayloadOfSchemaTypeWithSources as
|
|
688
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType12,
|
|
689
|
+
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta12,
|
|
690
|
+
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources12
|
|
440
691
|
} from "@xyo-network/payload-model";
|
|
441
692
|
|
|
442
693
|
// src/Receipt/Schema.ts
|
|
443
694
|
var ReceiptSchema = `${PaymentsSchema}.receipt`;
|
|
444
695
|
|
|
445
696
|
// src/Receipt/Payload.ts
|
|
446
|
-
var isReceipt =
|
|
447
|
-
var isReceiptWithSources =
|
|
448
|
-
var isReceiptWithMeta =
|
|
697
|
+
var isReceipt = isPayloadOfSchemaType12(ReceiptSchema);
|
|
698
|
+
var isReceiptWithSources = isPayloadOfSchemaTypeWithSources12(ReceiptSchema);
|
|
699
|
+
var isReceiptWithMeta = isPayloadOfSchemaTypeWithMeta12(ReceiptSchema);
|
|
700
|
+
|
|
701
|
+
// src/Subtotal/Diviner/Config.ts
|
|
702
|
+
var PaymentSubtotalDivinerConfigSchema = "network.xyo.diviner.payments.subtotal.config";
|
|
703
|
+
|
|
704
|
+
// src/Subtotal/Diviner/Payload.ts
|
|
705
|
+
import {
|
|
706
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType13,
|
|
707
|
+
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta13,
|
|
708
|
+
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources13
|
|
709
|
+
} from "@xyo-network/payload-model";
|
|
710
|
+
var SubtotalSchema = "network.xyo.payments.subtotal";
|
|
711
|
+
var isSubtotal = isPayloadOfSchemaType13(SubtotalSchema);
|
|
712
|
+
var isSubtotalWithSources = isPayloadOfSchemaTypeWithSources13(SubtotalSchema);
|
|
713
|
+
var isSubtotalWithMeta = isPayloadOfSchemaTypeWithMeta13(SubtotalSchema);
|
|
714
|
+
|
|
715
|
+
// src/Total/Diviner/Config.ts
|
|
716
|
+
var PaymentTotalDivinerConfigSchema = "network.xyo.diviner.payments.total.config";
|
|
717
|
+
|
|
718
|
+
// src/Total/Diviner/Payload.ts
|
|
719
|
+
import {
|
|
720
|
+
isPayloadOfSchemaType as isPayloadOfSchemaType14,
|
|
721
|
+
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta14,
|
|
722
|
+
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources14
|
|
723
|
+
} from "@xyo-network/payload-model";
|
|
724
|
+
var TotalSchema = "network.xyo.payments.total";
|
|
725
|
+
var isTotal = isPayloadOfSchemaType14(TotalSchema);
|
|
726
|
+
var isTotalWithSources = isPayloadOfSchemaTypeWithSources14(TotalSchema);
|
|
727
|
+
var isTotalWithMeta = isPayloadOfSchemaTypeWithMeta14(TotalSchema);
|
|
449
728
|
export {
|
|
729
|
+
AmountSchema,
|
|
450
730
|
BillingAddressSchema,
|
|
451
731
|
BillingSchema,
|
|
732
|
+
CouponSchema,
|
|
733
|
+
DiscountSchema,
|
|
452
734
|
EscrowOutcomeSchema,
|
|
453
735
|
EscrowSchema,
|
|
454
736
|
EscrowTermsSchema,
|
|
737
|
+
FixedAmountCouponSchema,
|
|
738
|
+
FixedPercentageCouponSchema,
|
|
739
|
+
Iso4217CurrencyCodes,
|
|
740
|
+
NO_DISCOUNT,
|
|
455
741
|
PaymentCardSchema,
|
|
742
|
+
PaymentDiscountDivinerConfigSchema,
|
|
456
743
|
PaymentInstrumentSchema,
|
|
457
744
|
PaymentSchema,
|
|
458
745
|
PaymentStatusSchema,
|
|
746
|
+
PaymentSubtotalDivinerConfigSchema,
|
|
747
|
+
PaymentTotalDivinerConfigSchema,
|
|
459
748
|
PurchaseSchema,
|
|
460
749
|
ReceiptSchema,
|
|
750
|
+
SubtotalSchema,
|
|
751
|
+
TotalSchema,
|
|
461
752
|
appraisalAuthoritiesExistValidator,
|
|
462
753
|
appraisalsExistValidator,
|
|
463
754
|
assetsExistValidator,
|
|
@@ -477,15 +768,31 @@ export {
|
|
|
477
768
|
getPaymentAuthoritiesAllowedValidator,
|
|
478
769
|
getSellerSecretSignedValidator,
|
|
479
770
|
getSellerSecretSuppliedValidator,
|
|
771
|
+
isAmount,
|
|
772
|
+
isAmountWithMeta,
|
|
773
|
+
isAmountWithSources,
|
|
480
774
|
isBillingAddress,
|
|
481
775
|
isBillingAddressWithMeta,
|
|
482
776
|
isBillingAddressWithSources,
|
|
777
|
+
isCoupon,
|
|
778
|
+
isCouponWithMeta,
|
|
779
|
+
isCouponWithSources,
|
|
780
|
+
isDiscount,
|
|
781
|
+
isDiscountWithMeta,
|
|
782
|
+
isDiscountWithSources,
|
|
483
783
|
isEscrowOutcome,
|
|
484
784
|
isEscrowOutcomeWithMeta,
|
|
485
785
|
isEscrowOutcomeWithSources,
|
|
486
786
|
isEscrowTerms,
|
|
487
787
|
isEscrowTermsWithMeta,
|
|
488
788
|
isEscrowTermsWithSources,
|
|
789
|
+
isFixedAmountCoupon,
|
|
790
|
+
isFixedAmountCouponWithMeta,
|
|
791
|
+
isFixedAmountCouponWithSources,
|
|
792
|
+
isFixedPercentageCoupon,
|
|
793
|
+
isFixedPercentageCouponWithMeta,
|
|
794
|
+
isFixedPercentageCouponWithSources,
|
|
795
|
+
isIso4217CurrencyCode,
|
|
489
796
|
isPayment,
|
|
490
797
|
isPaymentCard,
|
|
491
798
|
isPaymentCardWithMeta,
|
|
@@ -501,6 +808,13 @@ export {
|
|
|
501
808
|
isReceipt,
|
|
502
809
|
isReceiptWithMeta,
|
|
503
810
|
isReceiptWithSources,
|
|
811
|
+
isStackable,
|
|
812
|
+
isSubtotal,
|
|
813
|
+
isSubtotalWithMeta,
|
|
814
|
+
isSubtotalWithSources,
|
|
815
|
+
isTotal,
|
|
816
|
+
isTotalWithMeta,
|
|
817
|
+
isTotalWithSources,
|
|
504
818
|
moduleIdentifiersContainsAllOf,
|
|
505
819
|
moduleIdentifiersContainsOneOf,
|
|
506
820
|
sellerExistsValidator,
|