@xyo-network/payment-payload-plugins 6.0.3 → 7.0.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/README.md +5 -0
- package/dist/neutral/Amount/Iso4217Currency.d.ts.map +1 -1
- package/dist/neutral/Amount/Payload.d.ts +56 -15
- package/dist/neutral/Amount/Payload.d.ts.map +1 -1
- package/dist/neutral/Billing/Address/Address.d.ts +102 -32
- package/dist/neutral/Billing/Address/Address.d.ts.map +1 -1
- package/dist/neutral/Currency.d.ts +5 -1
- package/dist/neutral/Currency.d.ts.map +1 -1
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedAmount.d.ts +81 -15
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedAmount.d.ts.map +1 -1
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPercentage.d.ts +74 -15
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPercentage.d.ts.map +1 -1
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPrice.d.ts +81 -15
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPrice.d.ts.map +1 -1
- package/dist/neutral/Discount/Payload/Coupon/Payload.d.ts +186 -9
- package/dist/neutral/Discount/Payload/Coupon/Payload.d.ts.map +1 -1
- package/dist/neutral/Discount/Payload/Coupon/types/Condition.d.ts +91 -7
- package/dist/neutral/Discount/Payload/Coupon/types/Condition.d.ts.map +1 -1
- package/dist/neutral/Discount/Payload/Coupon/types/CouponFields.d.ts +8 -12
- package/dist/neutral/Discount/Payload/Coupon/types/CouponFields.d.ts.map +1 -1
- package/dist/neutral/Discount/Payload/Discount.d.ts +53 -14
- package/dist/neutral/Discount/Payload/Discount.d.ts.map +1 -1
- package/dist/neutral/Escrow/Outcome.d.ts +64 -17
- package/dist/neutral/Escrow/Outcome.d.ts.map +1 -1
- package/dist/neutral/Escrow/Terms/Terms.d.ts +303 -62
- package/dist/neutral/Escrow/Terms/Terms.d.ts.map +1 -1
- package/dist/neutral/Escrow/util/appraisal/getAppraisalsByAsset.d.ts.map +1 -1
- package/dist/neutral/Escrow/util/appraisal/getSignaturesByAppraisal.d.ts.map +1 -1
- package/dist/neutral/Escrow/util/secret/createEscrowIntent.d.ts +9 -1
- package/dist/neutral/Escrow/util/secret/createEscrowIntent.d.ts.map +1 -1
- package/dist/neutral/Escrow/util/secret/updateEscrowTermsWithSecret.d.ts +9 -1
- package/dist/neutral/Escrow/util/secret/updateEscrowTermsWithSecret.d.ts.map +1 -1
- package/dist/neutral/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.d.ts.map +1 -1
- package/dist/neutral/Escrow/validators/common/SecretValidators/getPartySecretSignedValidator.d.ts.map +1 -1
- package/dist/neutral/Escrow/validators/escrow/appraisal.d.ts.map +1 -1
- package/dist/neutral/Payment/Instrument/Card/Payload.d.ts +74 -34
- package/dist/neutral/Payment/Instrument/Card/Payload.d.ts.map +1 -1
- package/dist/neutral/Payment/Payload.d.ts +57 -23
- package/dist/neutral/Payment/Payload.d.ts.map +1 -1
- package/dist/neutral/Payment/Status/Payload.d.ts +53 -22
- package/dist/neutral/Payment/Status/Payload.d.ts.map +1 -1
- package/dist/neutral/Purchase/Payload.d.ts +53 -24
- package/dist/neutral/Purchase/Payload.d.ts.map +1 -1
- package/dist/neutral/Receipt/Payload.d.ts +57 -23
- package/dist/neutral/Receipt/Payload.d.ts.map +1 -1
- package/dist/neutral/Subtotal/Diviner/Payload.d.ts +53 -14
- package/dist/neutral/Subtotal/Diviner/Payload.d.ts.map +1 -1
- package/dist/neutral/Total/Diviner/Payload.d.ts +53 -14
- package/dist/neutral/Total/Diviner/Payload.d.ts.map +1 -1
- package/dist/neutral/index.mjs +475 -275
- package/dist/neutral/index.mjs.map +4 -4
- package/package.json +20 -24
|
@@ -1,30 +1,64 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* The currency of the amount paid
|
|
11
|
-
*/
|
|
12
|
-
currency: SupportedCurrency;
|
|
13
|
-
}
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
export declare const PaymentFieldsZod: z.ZodMiniObject<{
|
|
3
|
+
amount: z.ZodMiniNumber<number>;
|
|
4
|
+
currency: z.ZodMiniEnum<{
|
|
5
|
+
USD: "USD";
|
|
6
|
+
}>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export type PaymentFields = z.infer<typeof PaymentFieldsZod>;
|
|
14
9
|
/**
|
|
15
10
|
* A payment is a record of an amount to be paid
|
|
16
11
|
*/
|
|
17
|
-
export
|
|
12
|
+
export declare const PaymentZod: z.ZodMiniObject<{
|
|
13
|
+
schema: z.ZodMiniLiteral<string & {
|
|
14
|
+
readonly __schema: true;
|
|
15
|
+
}>;
|
|
16
|
+
amount: z.ZodMiniNumber<number>;
|
|
17
|
+
currency: z.ZodMiniEnum<{
|
|
18
|
+
USD: "USD";
|
|
19
|
+
}>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
export type Payment = z.infer<typeof PaymentZod>;
|
|
18
22
|
/**
|
|
19
23
|
* Identity function for determine if an object is a Payment
|
|
20
24
|
*/
|
|
21
|
-
export declare const isPayment: (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
export declare const
|
|
29
|
-
|
|
25
|
+
export declare const isPayment: <T>(value: T) => value is T & {
|
|
26
|
+
schema: string & {
|
|
27
|
+
readonly __schema: true;
|
|
28
|
+
};
|
|
29
|
+
amount: number;
|
|
30
|
+
currency: "USD";
|
|
31
|
+
};
|
|
32
|
+
export declare const asPayment: {
|
|
33
|
+
<T>(value: T): (T & {
|
|
34
|
+
schema: string & {
|
|
35
|
+
readonly __schema: true;
|
|
36
|
+
};
|
|
37
|
+
amount: number;
|
|
38
|
+
currency: "USD";
|
|
39
|
+
}) | undefined;
|
|
40
|
+
<T>(value: T, assert: import("@xylabs/sdk-js").ZodFactoryConfig): T & {
|
|
41
|
+
schema: string & {
|
|
42
|
+
readonly __schema: true;
|
|
43
|
+
};
|
|
44
|
+
amount: number;
|
|
45
|
+
currency: "USD";
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export declare const toPayment: {
|
|
49
|
+
<T>(value: T): (T & {
|
|
50
|
+
schema: string & {
|
|
51
|
+
readonly __schema: true;
|
|
52
|
+
};
|
|
53
|
+
amount: number;
|
|
54
|
+
currency: "USD";
|
|
55
|
+
}) | undefined;
|
|
56
|
+
<T>(value: T, assert: import("@xylabs/sdk-js").ZodFactoryConfig): T & {
|
|
57
|
+
schema: string & {
|
|
58
|
+
readonly __schema: true;
|
|
59
|
+
};
|
|
60
|
+
amount: number;
|
|
61
|
+
currency: "USD";
|
|
62
|
+
};
|
|
63
|
+
};
|
|
30
64
|
//# sourceMappingURL=Payload.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../../src/Payment/Payload.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../../src/Payment/Payload.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAK7B,eAAO,MAAM,gBAAgB;;;;;iBAS3B,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAE5D;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;iBAA6E,CAAA;AAEpG,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAA;AAEhD;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;CAA2B,CAAA;AACjD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;CAAwC,CAAA;AAC9D,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;CAAwC,CAAA"}
|
|
@@ -1,29 +1,60 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
result?: string;
|
|
8
|
-
/**
|
|
9
|
-
* The status of the payment (i.e. completed)
|
|
10
|
-
*/
|
|
11
|
-
status: string;
|
|
12
|
-
}
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
export declare const PaymentStatusFieldsZod: z.ZodMiniObject<{
|
|
3
|
+
result: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
4
|
+
status: z.ZodMiniString<string>;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export type PaymentStatusFields = z.infer<typeof PaymentStatusFieldsZod>;
|
|
13
7
|
/**
|
|
14
8
|
* A payment status is the outcome of a payment attempt
|
|
15
9
|
*/
|
|
16
|
-
export
|
|
10
|
+
export declare const PaymentStatusZod: z.ZodMiniObject<{
|
|
11
|
+
schema: z.ZodMiniLiteral<string & {
|
|
12
|
+
readonly __schema: true;
|
|
13
|
+
}>;
|
|
14
|
+
result: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
15
|
+
status: z.ZodMiniString<string>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export type PaymentStatus = z.infer<typeof PaymentStatusZod>;
|
|
17
18
|
/**
|
|
18
19
|
* Identity function for determine if an object is a PaymentStatus
|
|
19
20
|
*/
|
|
20
|
-
export declare const isPaymentStatus: (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
export declare const
|
|
28
|
-
|
|
21
|
+
export declare const isPaymentStatus: <T>(value: T) => value is T & {
|
|
22
|
+
schema: string & {
|
|
23
|
+
readonly __schema: true;
|
|
24
|
+
};
|
|
25
|
+
status: string;
|
|
26
|
+
result?: string | undefined;
|
|
27
|
+
};
|
|
28
|
+
export declare const asPaymentStatus: {
|
|
29
|
+
<T>(value: T): (T & {
|
|
30
|
+
schema: string & {
|
|
31
|
+
readonly __schema: true;
|
|
32
|
+
};
|
|
33
|
+
status: string;
|
|
34
|
+
result?: string | undefined;
|
|
35
|
+
}) | undefined;
|
|
36
|
+
<T>(value: T, assert: import("@xylabs/sdk-js").ZodFactoryConfig): T & {
|
|
37
|
+
schema: string & {
|
|
38
|
+
readonly __schema: true;
|
|
39
|
+
};
|
|
40
|
+
status: string;
|
|
41
|
+
result?: string | undefined;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export declare const toPaymentStatus: {
|
|
45
|
+
<T>(value: T): (T & {
|
|
46
|
+
schema: string & {
|
|
47
|
+
readonly __schema: true;
|
|
48
|
+
};
|
|
49
|
+
status: string;
|
|
50
|
+
result?: string | undefined;
|
|
51
|
+
}) | undefined;
|
|
52
|
+
<T>(value: T, assert: import("@xylabs/sdk-js").ZodFactoryConfig): T & {
|
|
53
|
+
schema: string & {
|
|
54
|
+
readonly __schema: true;
|
|
55
|
+
};
|
|
56
|
+
status: string;
|
|
57
|
+
result?: string | undefined;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
29
60
|
//# sourceMappingURL=Payload.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../../../src/Payment/Status/Payload.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../../../src/Payment/Status/Payload.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAI7B,eAAO,MAAM,sBAAsB;;;iBASjC,CAAA;AAEF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAExE;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;iBAAyF,CAAA;AAEtH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAE5D;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;CAAiC,CAAA;AAC7D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;CAAoD,CAAA;AAChF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;CAAoD,CAAA"}
|
|
@@ -1,31 +1,60 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
*/
|
|
8
|
-
assets: Hash[];
|
|
9
|
-
/**
|
|
10
|
-
* The receipts for payments for this purchase. Array to allow for multiple payments
|
|
11
|
-
* for a single quote.
|
|
12
|
-
*/
|
|
13
|
-
receipts: Hash[];
|
|
14
|
-
}
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
export declare const PurchaseFieldsZod: z.ZodMiniObject<{
|
|
3
|
+
assets: z.ZodMiniArray<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@xylabs/sdk-js").BrandedHash, string>>>;
|
|
4
|
+
receipts: z.ZodMiniArray<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@xylabs/sdk-js").BrandedHash, string>>>;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export type PurchaseFields = z.infer<typeof PurchaseFieldsZod>;
|
|
15
7
|
/**
|
|
16
8
|
* A purchase ties a payment made to a quote
|
|
17
9
|
*/
|
|
18
|
-
export
|
|
10
|
+
export declare const PurchaseZod: z.ZodMiniObject<{
|
|
11
|
+
schema: z.ZodMiniLiteral<string & {
|
|
12
|
+
readonly __schema: true;
|
|
13
|
+
}>;
|
|
14
|
+
assets: z.ZodMiniArray<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@xylabs/sdk-js").BrandedHash, string>>>;
|
|
15
|
+
receipts: z.ZodMiniArray<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@xylabs/sdk-js").BrandedHash, string>>>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export type Purchase = z.infer<typeof PurchaseZod>;
|
|
19
18
|
/**
|
|
20
19
|
* Identity function for determine if an object is a Purchase
|
|
21
20
|
*/
|
|
22
|
-
export declare const isPurchase: (
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
export declare const
|
|
30
|
-
|
|
21
|
+
export declare const isPurchase: <T>(value: T) => value is T & {
|
|
22
|
+
schema: string & {
|
|
23
|
+
readonly __schema: true;
|
|
24
|
+
};
|
|
25
|
+
assets: import("@xylabs/sdk-js").BrandedHash[];
|
|
26
|
+
receipts: import("@xylabs/sdk-js").BrandedHash[];
|
|
27
|
+
};
|
|
28
|
+
export declare const asPurchase: {
|
|
29
|
+
<T>(value: T): (T & {
|
|
30
|
+
schema: string & {
|
|
31
|
+
readonly __schema: true;
|
|
32
|
+
};
|
|
33
|
+
assets: import("@xylabs/sdk-js").BrandedHash[];
|
|
34
|
+
receipts: import("@xylabs/sdk-js").BrandedHash[];
|
|
35
|
+
}) | undefined;
|
|
36
|
+
<T>(value: T, assert: import("@xylabs/sdk-js").ZodFactoryConfig): T & {
|
|
37
|
+
schema: string & {
|
|
38
|
+
readonly __schema: true;
|
|
39
|
+
};
|
|
40
|
+
assets: import("@xylabs/sdk-js").BrandedHash[];
|
|
41
|
+
receipts: import("@xylabs/sdk-js").BrandedHash[];
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export declare const toPurchase: {
|
|
45
|
+
<T>(value: T): (T & {
|
|
46
|
+
schema: string & {
|
|
47
|
+
readonly __schema: true;
|
|
48
|
+
};
|
|
49
|
+
assets: import("@xylabs/sdk-js").BrandedHash[];
|
|
50
|
+
receipts: import("@xylabs/sdk-js").BrandedHash[];
|
|
51
|
+
}) | undefined;
|
|
52
|
+
<T>(value: T, assert: import("@xylabs/sdk-js").ZodFactoryConfig): T & {
|
|
53
|
+
schema: string & {
|
|
54
|
+
readonly __schema: true;
|
|
55
|
+
};
|
|
56
|
+
assets: import("@xylabs/sdk-js").BrandedHash[];
|
|
57
|
+
receipts: import("@xylabs/sdk-js").BrandedHash[];
|
|
58
|
+
};
|
|
59
|
+
};
|
|
31
60
|
//# sourceMappingURL=Payload.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../../src/Purchase/Payload.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../../src/Purchase/Payload.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAI7B,eAAO,MAAM,iBAAiB;;;iBAU5B,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAE9D;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;iBAA+E,CAAA;AAEvG,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA;AAElD;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;CAA4B,CAAA;AACnD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;CAA0C,CAAA;AACjE,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;CAA0C,CAAA"}
|
|
@@ -1,30 +1,64 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* The currency of the amount paid
|
|
11
|
-
*/
|
|
12
|
-
currency: SupportedCurrency;
|
|
13
|
-
}
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
export declare const ReceiptFieldsZod: z.ZodMiniObject<{
|
|
3
|
+
amount: z.ZodMiniNumber<number>;
|
|
4
|
+
currency: z.ZodMiniEnum<{
|
|
5
|
+
USD: "USD";
|
|
6
|
+
}>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export type ReceiptFields = z.infer<typeof ReceiptFieldsZod>;
|
|
14
9
|
/**
|
|
15
10
|
* A receipt is a record of a payment made
|
|
16
11
|
*/
|
|
17
|
-
export
|
|
12
|
+
export declare const ReceiptZod: z.ZodMiniObject<{
|
|
13
|
+
schema: z.ZodMiniLiteral<string & {
|
|
14
|
+
readonly __schema: true;
|
|
15
|
+
}>;
|
|
16
|
+
amount: z.ZodMiniNumber<number>;
|
|
17
|
+
currency: z.ZodMiniEnum<{
|
|
18
|
+
USD: "USD";
|
|
19
|
+
}>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
export type Receipt = z.infer<typeof ReceiptZod>;
|
|
18
22
|
/**
|
|
19
23
|
* Identity function for determine if an object is a Receipt
|
|
20
24
|
*/
|
|
21
|
-
export declare const isReceipt: (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
export declare const
|
|
29
|
-
|
|
25
|
+
export declare const isReceipt: <T>(value: T) => value is T & {
|
|
26
|
+
schema: string & {
|
|
27
|
+
readonly __schema: true;
|
|
28
|
+
};
|
|
29
|
+
amount: number;
|
|
30
|
+
currency: "USD";
|
|
31
|
+
};
|
|
32
|
+
export declare const asReceipt: {
|
|
33
|
+
<T>(value: T): (T & {
|
|
34
|
+
schema: string & {
|
|
35
|
+
readonly __schema: true;
|
|
36
|
+
};
|
|
37
|
+
amount: number;
|
|
38
|
+
currency: "USD";
|
|
39
|
+
}) | undefined;
|
|
40
|
+
<T>(value: T, assert: import("@xylabs/sdk-js").ZodFactoryConfig): T & {
|
|
41
|
+
schema: string & {
|
|
42
|
+
readonly __schema: true;
|
|
43
|
+
};
|
|
44
|
+
amount: number;
|
|
45
|
+
currency: "USD";
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export declare const toReceipt: {
|
|
49
|
+
<T>(value: T): (T & {
|
|
50
|
+
schema: string & {
|
|
51
|
+
readonly __schema: true;
|
|
52
|
+
};
|
|
53
|
+
amount: number;
|
|
54
|
+
currency: "USD";
|
|
55
|
+
}) | undefined;
|
|
56
|
+
<T>(value: T, assert: import("@xylabs/sdk-js").ZodFactoryConfig): T & {
|
|
57
|
+
schema: string & {
|
|
58
|
+
readonly __schema: true;
|
|
59
|
+
};
|
|
60
|
+
amount: number;
|
|
61
|
+
currency: "USD";
|
|
62
|
+
};
|
|
63
|
+
};
|
|
30
64
|
//# sourceMappingURL=Payload.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../../src/Receipt/Payload.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../../src/Receipt/Payload.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAK7B,eAAO,MAAM,gBAAgB;;;;;iBAS3B,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAE5D;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;iBAA6E,CAAA;AAEpG,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAA;AAEhD;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;CAA2B,CAAA;AACjD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;CAAwC,CAAA;AAC9D,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;CAAwC,CAAA"}
|
|
@@ -1,25 +1,64 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { AmountFields } from '../../Amount/index.ts';
|
|
1
|
+
import * as z from 'zod/mini';
|
|
3
2
|
export declare const SubtotalSchema: "network.xyo.payments.subtotal" & {
|
|
4
3
|
readonly __schema: true;
|
|
5
4
|
};
|
|
6
5
|
export type SubtotalSchema = typeof SubtotalSchema;
|
|
7
|
-
export
|
|
8
|
-
|
|
6
|
+
export declare const SubtotalFieldsZod: z.ZodMiniObject<{
|
|
7
|
+
amount: z.ZodMiniNumber<number>;
|
|
8
|
+
currency: z.ZodMiniCustom<import("../../Amount/Iso4217Currency.ts").Iso4217AlphabeticalCode, import("../../Amount/Iso4217Currency.ts").Iso4217AlphabeticalCode>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export type SubtotalFields = z.infer<typeof SubtotalFieldsZod>;
|
|
9
11
|
/**
|
|
10
12
|
* The result of a subtotal
|
|
11
13
|
*/
|
|
12
|
-
export
|
|
14
|
+
export declare const SubtotalZod: z.ZodMiniObject<{
|
|
15
|
+
schema: z.ZodMiniLiteral<"network.xyo.payments.subtotal" & {
|
|
16
|
+
readonly __schema: true;
|
|
17
|
+
}>;
|
|
18
|
+
amount: z.ZodMiniNumber<number>;
|
|
19
|
+
currency: z.ZodMiniCustom<import("../../Amount/Iso4217Currency.ts").Iso4217AlphabeticalCode, import("../../Amount/Iso4217Currency.ts").Iso4217AlphabeticalCode>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
export type Subtotal = z.infer<typeof SubtotalZod>;
|
|
13
22
|
/**
|
|
14
23
|
* Identity function for determining if an object is an Subtotal
|
|
15
24
|
*/
|
|
16
|
-
export declare const isSubtotal: (
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export declare const
|
|
24
|
-
|
|
25
|
+
export declare const isSubtotal: <T>(value: T) => value is T & {
|
|
26
|
+
schema: "network.xyo.payments.subtotal" & {
|
|
27
|
+
readonly __schema: true;
|
|
28
|
+
};
|
|
29
|
+
amount: number;
|
|
30
|
+
currency: import("../../Amount/Iso4217Currency.ts").Iso4217AlphabeticalCode;
|
|
31
|
+
};
|
|
32
|
+
export declare const asSubtotal: {
|
|
33
|
+
<T>(value: T): (T & {
|
|
34
|
+
schema: "network.xyo.payments.subtotal" & {
|
|
35
|
+
readonly __schema: true;
|
|
36
|
+
};
|
|
37
|
+
amount: number;
|
|
38
|
+
currency: import("../../Amount/Iso4217Currency.ts").Iso4217AlphabeticalCode;
|
|
39
|
+
}) | undefined;
|
|
40
|
+
<T>(value: T, assert: import("@xylabs/sdk-js").ZodFactoryConfig): T & {
|
|
41
|
+
schema: "network.xyo.payments.subtotal" & {
|
|
42
|
+
readonly __schema: true;
|
|
43
|
+
};
|
|
44
|
+
amount: number;
|
|
45
|
+
currency: import("../../Amount/Iso4217Currency.ts").Iso4217AlphabeticalCode;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export declare const toSubtotal: {
|
|
49
|
+
<T>(value: T): (T & {
|
|
50
|
+
schema: "network.xyo.payments.subtotal" & {
|
|
51
|
+
readonly __schema: true;
|
|
52
|
+
};
|
|
53
|
+
amount: number;
|
|
54
|
+
currency: import("../../Amount/Iso4217Currency.ts").Iso4217AlphabeticalCode;
|
|
55
|
+
}) | undefined;
|
|
56
|
+
<T>(value: T, assert: import("@xylabs/sdk-js").ZodFactoryConfig): T & {
|
|
57
|
+
schema: "network.xyo.payments.subtotal" & {
|
|
58
|
+
readonly __schema: true;
|
|
59
|
+
};
|
|
60
|
+
amount: number;
|
|
61
|
+
currency: import("../../Amount/Iso4217Currency.ts").Iso4217AlphabeticalCode;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
25
64
|
//# sourceMappingURL=Payload.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../../../src/Subtotal/Diviner/Payload.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../../../src/Subtotal/Diviner/Payload.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAI7B,eAAO,MAAM,cAAc;;CAAkD,CAAA;AAC7E,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAA;AAElD,eAAO,MAAM,iBAAiB;;;iBAAyC,CAAA;AAEvE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAE9D;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;iBAA+E,CAAA;AAEvG,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA;AAElD;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;CAA4B,CAAA;AACnD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;CAA0C,CAAA;AACjE,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;CAA0C,CAAA"}
|
|
@@ -1,25 +1,64 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { AmountFields } from '../../Amount/index.ts';
|
|
1
|
+
import * as z from 'zod/mini';
|
|
3
2
|
export declare const TotalSchema: "network.xyo.payments.total" & {
|
|
4
3
|
readonly __schema: true;
|
|
5
4
|
};
|
|
6
5
|
export type TotalSchema = typeof TotalSchema;
|
|
7
|
-
export
|
|
8
|
-
|
|
6
|
+
export declare const TotalFieldsZod: z.ZodMiniObject<{
|
|
7
|
+
amount: z.ZodMiniNumber<number>;
|
|
8
|
+
currency: z.ZodMiniCustom<import("../../Amount/Iso4217Currency.ts").Iso4217AlphabeticalCode, import("../../Amount/Iso4217Currency.ts").Iso4217AlphabeticalCode>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export type TotalFields = z.infer<typeof TotalFieldsZod>;
|
|
9
11
|
/**
|
|
10
12
|
* The result of a total
|
|
11
13
|
*/
|
|
12
|
-
export
|
|
14
|
+
export declare const TotalZod: z.ZodMiniObject<{
|
|
15
|
+
schema: z.ZodMiniLiteral<"network.xyo.payments.total" & {
|
|
16
|
+
readonly __schema: true;
|
|
17
|
+
}>;
|
|
18
|
+
amount: z.ZodMiniNumber<number>;
|
|
19
|
+
currency: z.ZodMiniCustom<import("../../Amount/Iso4217Currency.ts").Iso4217AlphabeticalCode, import("../../Amount/Iso4217Currency.ts").Iso4217AlphabeticalCode>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
export type Total = z.infer<typeof TotalZod>;
|
|
13
22
|
/**
|
|
14
23
|
* Identity function for determining if an object is an Total
|
|
15
24
|
*/
|
|
16
|
-
export declare const isTotal: (
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export declare const
|
|
24
|
-
|
|
25
|
+
export declare const isTotal: <T>(value: T) => value is T & {
|
|
26
|
+
schema: "network.xyo.payments.total" & {
|
|
27
|
+
readonly __schema: true;
|
|
28
|
+
};
|
|
29
|
+
amount: number;
|
|
30
|
+
currency: import("../../Amount/Iso4217Currency.ts").Iso4217AlphabeticalCode;
|
|
31
|
+
};
|
|
32
|
+
export declare const asTotal: {
|
|
33
|
+
<T>(value: T): (T & {
|
|
34
|
+
schema: "network.xyo.payments.total" & {
|
|
35
|
+
readonly __schema: true;
|
|
36
|
+
};
|
|
37
|
+
amount: number;
|
|
38
|
+
currency: import("../../Amount/Iso4217Currency.ts").Iso4217AlphabeticalCode;
|
|
39
|
+
}) | undefined;
|
|
40
|
+
<T>(value: T, assert: import("@xylabs/sdk-js").ZodFactoryConfig): T & {
|
|
41
|
+
schema: "network.xyo.payments.total" & {
|
|
42
|
+
readonly __schema: true;
|
|
43
|
+
};
|
|
44
|
+
amount: number;
|
|
45
|
+
currency: import("../../Amount/Iso4217Currency.ts").Iso4217AlphabeticalCode;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export declare const toTotal: {
|
|
49
|
+
<T>(value: T): (T & {
|
|
50
|
+
schema: "network.xyo.payments.total" & {
|
|
51
|
+
readonly __schema: true;
|
|
52
|
+
};
|
|
53
|
+
amount: number;
|
|
54
|
+
currency: import("../../Amount/Iso4217Currency.ts").Iso4217AlphabeticalCode;
|
|
55
|
+
}) | undefined;
|
|
56
|
+
<T>(value: T, assert: import("@xylabs/sdk-js").ZodFactoryConfig): T & {
|
|
57
|
+
schema: "network.xyo.payments.total" & {
|
|
58
|
+
readonly __schema: true;
|
|
59
|
+
};
|
|
60
|
+
amount: number;
|
|
61
|
+
currency: import("../../Amount/Iso4217Currency.ts").Iso4217AlphabeticalCode;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
25
64
|
//# sourceMappingURL=Payload.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../../../src/Total/Diviner/Payload.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../../../src/Total/Diviner/Payload.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAI7B,eAAO,MAAM,WAAW;;CAA+C,CAAA;AACvE,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAA;AAE5C,eAAO,MAAM,cAAc;;;iBAAyC,CAAA;AAEpE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AAExD;;GAEG;AACH,eAAO,MAAM,QAAQ;;;;;;iBAAyE,CAAA;AAE9F,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAA;AAE5C;;GAEG;AACH,eAAO,MAAM,OAAO;;;;;;CAAyB,CAAA;AAC7C,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;CAAoC,CAAA;AACxD,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;CAAoC,CAAA"}
|