@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FixedPrice.d.ts","sourceRoot":"","sources":["../../../../../../src/Discount/Payload/Coupon/Coupons/FixedPrice.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FixedPrice.d.ts","sourceRoot":"","sources":["../../../../../../src/Discount/Payload/Coupon/Coupons/FixedPrice.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAM7B,eAAO,MAAM,sBAAsB;;CAAgD,CAAA;AACnF,MAAM,MAAM,sBAAsB,GAAG,OAAO,sBAAsB,CAAA;AAElE,eAAO,MAAM,yBAAyB;;;;;;;iBAGpC,CAAA;AAEF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAE9E;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;iBAA+F,CAAA;AAE/H,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAElE;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;CAAoC,CAAA;AACnE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;CAA0D,CAAA;AACzF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;CAA0D,CAAA"}
|
|
@@ -1,16 +1,193 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
2
|
/**
|
|
3
3
|
* The type of coupons
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export declare const CouponZod: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
6
|
+
schema: z.ZodMiniLiteral<string & {
|
|
7
|
+
readonly __schema: true;
|
|
8
|
+
}>;
|
|
9
|
+
amount: z.ZodMiniNumber<number>;
|
|
10
|
+
currency: z.ZodMiniCustom<import("../../../index.ts").Iso4217AlphabeticalCode, import("../../../index.ts").Iso4217AlphabeticalCode>;
|
|
11
|
+
conditions: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@xylabs/sdk-js").BrandedHash, string>>>>;
|
|
12
|
+
exp: z.ZodMiniNumber<number>;
|
|
13
|
+
nbf: z.ZodMiniNumber<number>;
|
|
14
|
+
stackable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
15
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
16
|
+
schema: z.ZodMiniLiteral<string & {
|
|
17
|
+
readonly __schema: true;
|
|
18
|
+
}>;
|
|
19
|
+
percentage: z.ZodMiniNumber<number>;
|
|
20
|
+
conditions: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@xylabs/sdk-js").BrandedHash, string>>>>;
|
|
21
|
+
exp: z.ZodMiniNumber<number>;
|
|
22
|
+
nbf: z.ZodMiniNumber<number>;
|
|
23
|
+
stackable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
24
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
25
|
+
schema: z.ZodMiniLiteral<string & {
|
|
26
|
+
readonly __schema: true;
|
|
27
|
+
}>;
|
|
28
|
+
amount: z.ZodMiniNumber<number>;
|
|
29
|
+
currency: z.ZodMiniCustom<import("../../../index.ts").Iso4217AlphabeticalCode, import("../../../index.ts").Iso4217AlphabeticalCode>;
|
|
30
|
+
conditions: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@xylabs/sdk-js").BrandedHash, string>>>>;
|
|
31
|
+
exp: z.ZodMiniNumber<number>;
|
|
32
|
+
nbf: z.ZodMiniNumber<number>;
|
|
33
|
+
stackable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
34
|
+
}, z.core.$strip>]>;
|
|
35
|
+
export type Coupon = z.infer<typeof CouponZod>;
|
|
6
36
|
/**
|
|
7
37
|
* Identity function for determining if an object is an Coupon
|
|
8
38
|
*/
|
|
9
|
-
export declare const isCoupon: (
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
39
|
+
export declare const isCoupon: <T>(value: T) => value is T & ({
|
|
40
|
+
schema: string & {
|
|
41
|
+
readonly __schema: true;
|
|
42
|
+
};
|
|
43
|
+
amount: number;
|
|
44
|
+
currency: import("../../../index.ts").Iso4217AlphabeticalCode;
|
|
45
|
+
exp: number;
|
|
46
|
+
nbf: number;
|
|
47
|
+
conditions?: import("@xylabs/sdk-js").BrandedHash[] | undefined;
|
|
48
|
+
stackable?: boolean | undefined;
|
|
49
|
+
} | {
|
|
50
|
+
schema: string & {
|
|
51
|
+
readonly __schema: true;
|
|
52
|
+
};
|
|
53
|
+
percentage: number;
|
|
54
|
+
exp: number;
|
|
55
|
+
nbf: number;
|
|
56
|
+
conditions?: import("@xylabs/sdk-js").BrandedHash[] | undefined;
|
|
57
|
+
stackable?: boolean | undefined;
|
|
58
|
+
} | {
|
|
59
|
+
schema: string & {
|
|
60
|
+
readonly __schema: true;
|
|
61
|
+
};
|
|
62
|
+
amount: number;
|
|
63
|
+
currency: import("../../../index.ts").Iso4217AlphabeticalCode;
|
|
64
|
+
exp: number;
|
|
65
|
+
nbf: number;
|
|
66
|
+
conditions?: import("@xylabs/sdk-js").BrandedHash[] | undefined;
|
|
67
|
+
stackable?: boolean | undefined;
|
|
68
|
+
});
|
|
69
|
+
export declare const asCoupon: {
|
|
70
|
+
<T>(value: T): (T & ({
|
|
71
|
+
schema: string & {
|
|
72
|
+
readonly __schema: true;
|
|
73
|
+
};
|
|
74
|
+
amount: number;
|
|
75
|
+
currency: import("../../../index.ts").Iso4217AlphabeticalCode;
|
|
76
|
+
exp: number;
|
|
77
|
+
nbf: number;
|
|
78
|
+
conditions?: import("@xylabs/sdk-js").BrandedHash[] | undefined;
|
|
79
|
+
stackable?: boolean | undefined;
|
|
80
|
+
} | {
|
|
81
|
+
schema: string & {
|
|
82
|
+
readonly __schema: true;
|
|
83
|
+
};
|
|
84
|
+
percentage: number;
|
|
85
|
+
exp: number;
|
|
86
|
+
nbf: number;
|
|
87
|
+
conditions?: import("@xylabs/sdk-js").BrandedHash[] | undefined;
|
|
88
|
+
stackable?: boolean | undefined;
|
|
89
|
+
} | {
|
|
90
|
+
schema: string & {
|
|
91
|
+
readonly __schema: true;
|
|
92
|
+
};
|
|
93
|
+
amount: number;
|
|
94
|
+
currency: import("../../../index.ts").Iso4217AlphabeticalCode;
|
|
95
|
+
exp: number;
|
|
96
|
+
nbf: number;
|
|
97
|
+
conditions?: import("@xylabs/sdk-js").BrandedHash[] | undefined;
|
|
98
|
+
stackable?: boolean | undefined;
|
|
99
|
+
})) | undefined;
|
|
100
|
+
<T>(value: T, assert: import("@xylabs/sdk-js").ZodFactoryConfig): T & ({
|
|
101
|
+
schema: string & {
|
|
102
|
+
readonly __schema: true;
|
|
103
|
+
};
|
|
104
|
+
amount: number;
|
|
105
|
+
currency: import("../../../index.ts").Iso4217AlphabeticalCode;
|
|
106
|
+
exp: number;
|
|
107
|
+
nbf: number;
|
|
108
|
+
conditions?: import("@xylabs/sdk-js").BrandedHash[] | undefined;
|
|
109
|
+
stackable?: boolean | undefined;
|
|
110
|
+
} | {
|
|
111
|
+
schema: string & {
|
|
112
|
+
readonly __schema: true;
|
|
113
|
+
};
|
|
114
|
+
percentage: number;
|
|
115
|
+
exp: number;
|
|
116
|
+
nbf: number;
|
|
117
|
+
conditions?: import("@xylabs/sdk-js").BrandedHash[] | undefined;
|
|
118
|
+
stackable?: boolean | undefined;
|
|
119
|
+
} | {
|
|
120
|
+
schema: string & {
|
|
121
|
+
readonly __schema: true;
|
|
122
|
+
};
|
|
123
|
+
amount: number;
|
|
124
|
+
currency: import("../../../index.ts").Iso4217AlphabeticalCode;
|
|
125
|
+
exp: number;
|
|
126
|
+
nbf: number;
|
|
127
|
+
conditions?: import("@xylabs/sdk-js").BrandedHash[] | undefined;
|
|
128
|
+
stackable?: boolean | undefined;
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
export declare const toCoupon: {
|
|
132
|
+
<T>(value: T): (T & ({
|
|
133
|
+
schema: string & {
|
|
134
|
+
readonly __schema: true;
|
|
135
|
+
};
|
|
136
|
+
amount: number;
|
|
137
|
+
currency: import("../../../index.ts").Iso4217AlphabeticalCode;
|
|
138
|
+
exp: number;
|
|
139
|
+
nbf: number;
|
|
140
|
+
conditions?: import("@xylabs/sdk-js").BrandedHash[] | undefined;
|
|
141
|
+
stackable?: boolean | undefined;
|
|
142
|
+
} | {
|
|
143
|
+
schema: string & {
|
|
144
|
+
readonly __schema: true;
|
|
145
|
+
};
|
|
146
|
+
percentage: number;
|
|
147
|
+
exp: number;
|
|
148
|
+
nbf: number;
|
|
149
|
+
conditions?: import("@xylabs/sdk-js").BrandedHash[] | undefined;
|
|
150
|
+
stackable?: boolean | undefined;
|
|
151
|
+
} | {
|
|
152
|
+
schema: string & {
|
|
153
|
+
readonly __schema: true;
|
|
154
|
+
};
|
|
155
|
+
amount: number;
|
|
156
|
+
currency: import("../../../index.ts").Iso4217AlphabeticalCode;
|
|
157
|
+
exp: number;
|
|
158
|
+
nbf: number;
|
|
159
|
+
conditions?: import("@xylabs/sdk-js").BrandedHash[] | undefined;
|
|
160
|
+
stackable?: boolean | undefined;
|
|
161
|
+
})) | undefined;
|
|
162
|
+
<T>(value: T, assert: import("@xylabs/sdk-js").ZodFactoryConfig): T & ({
|
|
163
|
+
schema: string & {
|
|
164
|
+
readonly __schema: true;
|
|
165
|
+
};
|
|
166
|
+
amount: number;
|
|
167
|
+
currency: import("../../../index.ts").Iso4217AlphabeticalCode;
|
|
168
|
+
exp: number;
|
|
169
|
+
nbf: number;
|
|
170
|
+
conditions?: import("@xylabs/sdk-js").BrandedHash[] | undefined;
|
|
171
|
+
stackable?: boolean | undefined;
|
|
172
|
+
} | {
|
|
173
|
+
schema: string & {
|
|
174
|
+
readonly __schema: true;
|
|
175
|
+
};
|
|
176
|
+
percentage: number;
|
|
177
|
+
exp: number;
|
|
178
|
+
nbf: number;
|
|
179
|
+
conditions?: import("@xylabs/sdk-js").BrandedHash[] | undefined;
|
|
180
|
+
stackable?: boolean | undefined;
|
|
181
|
+
} | {
|
|
182
|
+
schema: string & {
|
|
183
|
+
readonly __schema: true;
|
|
184
|
+
};
|
|
185
|
+
amount: number;
|
|
186
|
+
currency: import("../../../index.ts").Iso4217AlphabeticalCode;
|
|
187
|
+
exp: number;
|
|
188
|
+
nbf: number;
|
|
189
|
+
conditions?: import("@xylabs/sdk-js").BrandedHash[] | undefined;
|
|
190
|
+
stackable?: boolean | undefined;
|
|
191
|
+
});
|
|
192
|
+
};
|
|
16
193
|
//# sourceMappingURL=Payload.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../../../../src/Discount/Payload/Coupon/Payload.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../../../../src/Discount/Payload/Coupon/Payload.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAM7B;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAIpB,CAAA;AAEF,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAA;AAE9C;;GAEG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA0B,CAAA;AAC/C,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAsC,CAAA;AAC3D,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAsC,CAAA"}
|
|
@@ -1,4 +1,31 @@
|
|
|
1
1
|
import type { SchemaPayload } from '@xyo-network/sdk-js';
|
|
2
|
+
import * as z from 'zod/mini';
|
|
3
|
+
/**
|
|
4
|
+
* The payloads that can be used as conditions for a coupon
|
|
5
|
+
*/
|
|
6
|
+
export declare const ConditionZod: z.ZodMiniCustom<{
|
|
7
|
+
schema: "network.xyo.schema" & {
|
|
8
|
+
readonly __schema: true;
|
|
9
|
+
};
|
|
10
|
+
definition: {
|
|
11
|
+
[x: string]: unknown;
|
|
12
|
+
$id?: string | undefined;
|
|
13
|
+
};
|
|
14
|
+
extends?: string | undefined;
|
|
15
|
+
name?: string | undefined;
|
|
16
|
+
version?: number | undefined;
|
|
17
|
+
}, {
|
|
18
|
+
schema: "network.xyo.schema" & {
|
|
19
|
+
readonly __schema: true;
|
|
20
|
+
};
|
|
21
|
+
definition: {
|
|
22
|
+
[x: string]: unknown;
|
|
23
|
+
$id?: string | undefined;
|
|
24
|
+
};
|
|
25
|
+
extends?: string | undefined;
|
|
26
|
+
name?: string | undefined;
|
|
27
|
+
version?: number | undefined;
|
|
28
|
+
}>;
|
|
2
29
|
/**
|
|
3
30
|
* The payloads that can be used as conditions for a coupon
|
|
4
31
|
*/
|
|
@@ -6,11 +33,68 @@ export type Condition = SchemaPayload;
|
|
|
6
33
|
/**
|
|
7
34
|
* Identity function for determining if an object is a Condition payload
|
|
8
35
|
*/
|
|
9
|
-
export declare const isCondition: (
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
36
|
+
export declare const isCondition: <T>(value: T) => value is T & {
|
|
37
|
+
schema: "network.xyo.schema" & {
|
|
38
|
+
readonly __schema: true;
|
|
39
|
+
};
|
|
40
|
+
definition: {
|
|
41
|
+
[x: string]: unknown;
|
|
42
|
+
$id?: string | undefined;
|
|
43
|
+
};
|
|
44
|
+
extends?: string | undefined;
|
|
45
|
+
name?: string | undefined;
|
|
46
|
+
version?: number | undefined;
|
|
47
|
+
};
|
|
48
|
+
export declare const asCondition: {
|
|
49
|
+
<T>(value: T): (T & {
|
|
50
|
+
schema: "network.xyo.schema" & {
|
|
51
|
+
readonly __schema: true;
|
|
52
|
+
};
|
|
53
|
+
definition: {
|
|
54
|
+
[x: string]: unknown;
|
|
55
|
+
$id?: string | undefined;
|
|
56
|
+
};
|
|
57
|
+
extends?: string | undefined;
|
|
58
|
+
name?: string | undefined;
|
|
59
|
+
version?: number | undefined;
|
|
60
|
+
}) | undefined;
|
|
61
|
+
<T>(value: T, assert: import("@xylabs/sdk-js").ZodFactoryConfig): T & {
|
|
62
|
+
schema: "network.xyo.schema" & {
|
|
63
|
+
readonly __schema: true;
|
|
64
|
+
};
|
|
65
|
+
definition: {
|
|
66
|
+
[x: string]: unknown;
|
|
67
|
+
$id?: string | undefined;
|
|
68
|
+
};
|
|
69
|
+
extends?: string | undefined;
|
|
70
|
+
name?: string | undefined;
|
|
71
|
+
version?: number | undefined;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
export declare const toCondition: {
|
|
75
|
+
<T>(value: T): (T & {
|
|
76
|
+
schema: "network.xyo.schema" & {
|
|
77
|
+
readonly __schema: true;
|
|
78
|
+
};
|
|
79
|
+
definition: {
|
|
80
|
+
[x: string]: unknown;
|
|
81
|
+
$id?: string | undefined;
|
|
82
|
+
};
|
|
83
|
+
extends?: string | undefined;
|
|
84
|
+
name?: string | undefined;
|
|
85
|
+
version?: number | undefined;
|
|
86
|
+
}) | undefined;
|
|
87
|
+
<T>(value: T, assert: import("@xylabs/sdk-js").ZodFactoryConfig): T & {
|
|
88
|
+
schema: "network.xyo.schema" & {
|
|
89
|
+
readonly __schema: true;
|
|
90
|
+
};
|
|
91
|
+
definition: {
|
|
92
|
+
[x: string]: unknown;
|
|
93
|
+
$id?: string | undefined;
|
|
94
|
+
};
|
|
95
|
+
extends?: string | undefined;
|
|
96
|
+
name?: string | undefined;
|
|
97
|
+
version?: number | undefined;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
16
100
|
//# sourceMappingURL=Condition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Condition.d.ts","sourceRoot":"","sources":["../../../../../../src/Discount/Payload/Coupon/types/Condition.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Condition.d.ts","sourceRoot":"","sources":["../../../../../../src/Discount/Payload/Coupon/types/Condition.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAExD,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAE7B;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;EACiF,CAAA;AAE1G;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,aAAa,CAAA;AAErC;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;CAA6B,CAAA;AACrD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;CAA4C,CAAA;AACpE,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;CAA4C,CAAA"}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { DurationFields } from '@xyo-network/xns-record-payload-plugins';
|
|
1
|
+
import * as z from 'zod/mini';
|
|
3
2
|
/**
|
|
4
3
|
* The fields that are common across all coupons
|
|
5
4
|
*/
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
*/
|
|
14
|
-
stackable?: boolean;
|
|
15
|
-
}
|
|
5
|
+
export declare const CouponFieldsZod: z.ZodMiniObject<{
|
|
6
|
+
conditions: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@xylabs/sdk-js").BrandedHash, string>>>>;
|
|
7
|
+
exp: z.ZodMiniNumber<number>;
|
|
8
|
+
nbf: z.ZodMiniNumber<number>;
|
|
9
|
+
stackable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export type CouponFields = z.infer<typeof CouponFieldsZod>;
|
|
16
12
|
//# sourceMappingURL=CouponFields.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CouponFields.d.ts","sourceRoot":"","sources":["../../../../../../src/Discount/Payload/Coupon/types/CouponFields.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CouponFields.d.ts","sourceRoot":"","sources":["../../../../../../src/Discount/Payload/Coupon/types/CouponFields.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAE7B;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;iBAiB1B,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,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 DiscountSchema: "network.xyo.payments.discount" & {
|
|
4
3
|
readonly __schema: true;
|
|
5
4
|
};
|
|
6
5
|
export type DiscountSchema = typeof DiscountSchema;
|
|
7
|
-
export
|
|
8
|
-
|
|
6
|
+
export declare const DiscountFieldsZod: 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 DiscountFields = z.infer<typeof DiscountFieldsZod>;
|
|
9
11
|
/**
|
|
10
12
|
* The result of a discount
|
|
11
13
|
*/
|
|
12
|
-
export
|
|
14
|
+
export declare const DiscountZod: z.ZodMiniObject<{
|
|
15
|
+
schema: z.ZodMiniLiteral<"network.xyo.payments.discount" & {
|
|
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 Discount = z.infer<typeof DiscountZod>;
|
|
13
22
|
/**
|
|
14
23
|
* Identity function for determining if an object is an Discount
|
|
15
24
|
*/
|
|
16
|
-
export declare const isDiscount: (
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export declare const
|
|
24
|
-
|
|
25
|
+
export declare const isDiscount: <T>(value: T) => value is T & {
|
|
26
|
+
schema: "network.xyo.payments.discount" & {
|
|
27
|
+
readonly __schema: true;
|
|
28
|
+
};
|
|
29
|
+
amount: number;
|
|
30
|
+
currency: import("../../Amount/Iso4217Currency.ts").Iso4217AlphabeticalCode;
|
|
31
|
+
};
|
|
32
|
+
export declare const asDiscount: {
|
|
33
|
+
<T>(value: T): (T & {
|
|
34
|
+
schema: "network.xyo.payments.discount" & {
|
|
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.discount" & {
|
|
42
|
+
readonly __schema: true;
|
|
43
|
+
};
|
|
44
|
+
amount: number;
|
|
45
|
+
currency: import("../../Amount/Iso4217Currency.ts").Iso4217AlphabeticalCode;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export declare const toDiscount: {
|
|
49
|
+
<T>(value: T): (T & {
|
|
50
|
+
schema: "network.xyo.payments.discount" & {
|
|
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.discount" & {
|
|
58
|
+
readonly __schema: true;
|
|
59
|
+
};
|
|
60
|
+
amount: number;
|
|
61
|
+
currency: import("../../Amount/Iso4217Currency.ts").Iso4217AlphabeticalCode;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
25
64
|
//# sourceMappingURL=Discount.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Discount.d.ts","sourceRoot":"","sources":["../../../../src/Discount/Payload/Discount.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Discount.d.ts","sourceRoot":"","sources":["../../../../src/Discount/Payload/Discount.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,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { PayloadWithSources, WithSources } from '@xyo-network/sdk-js';
|
|
1
|
+
import * as z from 'zod/mini';
|
|
3
2
|
export declare const EscrowOutcomeSchema: string & {
|
|
4
3
|
readonly __schema: true;
|
|
5
4
|
};
|
|
@@ -7,25 +6,73 @@ export type EscrowOutcomeSchema = typeof EscrowOutcomeSchema;
|
|
|
7
6
|
/**
|
|
8
7
|
* The possible outcomes for an escrow
|
|
9
8
|
*/
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
export declare const EscrowOutcomesZod: z.ZodMiniEnum<{
|
|
10
|
+
fulfilled: "fulfilled";
|
|
11
|
+
expired: "expired";
|
|
12
|
+
}>;
|
|
13
|
+
export type EscrowOutcomes = z.infer<typeof EscrowOutcomesZod>;
|
|
14
|
+
export declare const EscrowOutcomeFieldsZod: z.ZodMiniObject<{
|
|
15
|
+
outcome: z.ZodMiniEnum<{
|
|
16
|
+
fulfilled: "fulfilled";
|
|
17
|
+
expired: "expired";
|
|
18
|
+
}>;
|
|
19
|
+
terms: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@xylabs/sdk-js").BrandedHash, string>>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
export type EscrowOutcomeFields = z.infer<typeof EscrowOutcomeFieldsZod>;
|
|
15
22
|
/**
|
|
16
23
|
* The terms of an escrow
|
|
17
24
|
*/
|
|
18
|
-
export
|
|
25
|
+
export declare const EscrowOutcomeZod: z.ZodMiniObject<{
|
|
26
|
+
schema: z.ZodMiniLiteral<string & {
|
|
27
|
+
readonly __schema: true;
|
|
28
|
+
}>;
|
|
29
|
+
outcome: z.ZodMiniEnum<{
|
|
30
|
+
fulfilled: "fulfilled";
|
|
31
|
+
expired: "expired";
|
|
32
|
+
}>;
|
|
33
|
+
terms: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@xylabs/sdk-js").BrandedHash, string>>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type EscrowOutcome = z.infer<typeof EscrowOutcomeZod>;
|
|
19
36
|
/**
|
|
20
37
|
* Identity function for determining if an object is an EscrowOutcome
|
|
21
38
|
*/
|
|
22
|
-
export declare const isEscrowOutcome: (
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
export declare const
|
|
30
|
-
|
|
39
|
+
export declare const isEscrowOutcome: <T>(value: T) => value is T & {
|
|
40
|
+
schema: string & {
|
|
41
|
+
readonly __schema: true;
|
|
42
|
+
};
|
|
43
|
+
outcome: "fulfilled" | "expired";
|
|
44
|
+
terms: import("@xylabs/sdk-js").BrandedHash;
|
|
45
|
+
};
|
|
46
|
+
export declare const asEscrowOutcome: {
|
|
47
|
+
<T>(value: T): (T & {
|
|
48
|
+
schema: string & {
|
|
49
|
+
readonly __schema: true;
|
|
50
|
+
};
|
|
51
|
+
outcome: "fulfilled" | "expired";
|
|
52
|
+
terms: import("@xylabs/sdk-js").BrandedHash;
|
|
53
|
+
}) | undefined;
|
|
54
|
+
<T>(value: T, assert: import("@xylabs/sdk-js").ZodFactoryConfig): T & {
|
|
55
|
+
schema: string & {
|
|
56
|
+
readonly __schema: true;
|
|
57
|
+
};
|
|
58
|
+
outcome: "fulfilled" | "expired";
|
|
59
|
+
terms: import("@xylabs/sdk-js").BrandedHash;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
export declare const toEscrowOutcome: {
|
|
63
|
+
<T>(value: T): (T & {
|
|
64
|
+
schema: string & {
|
|
65
|
+
readonly __schema: true;
|
|
66
|
+
};
|
|
67
|
+
outcome: "fulfilled" | "expired";
|
|
68
|
+
terms: import("@xylabs/sdk-js").BrandedHash;
|
|
69
|
+
}) | undefined;
|
|
70
|
+
<T>(value: T, assert: import("@xylabs/sdk-js").ZodFactoryConfig): T & {
|
|
71
|
+
schema: string & {
|
|
72
|
+
readonly __schema: true;
|
|
73
|
+
};
|
|
74
|
+
outcome: "fulfilled" | "expired";
|
|
75
|
+
terms: import("@xylabs/sdk-js").BrandedHash;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
31
78
|
//# sourceMappingURL=Outcome.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Outcome.d.ts","sourceRoot":"","sources":["../../../src/Escrow/Outcome.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Outcome.d.ts","sourceRoot":"","sources":["../../../src/Escrow/Outcome.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAI7B,eAAO,MAAM,mBAAmB;;CAA4C,CAAA;AAC5E,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAA;AAE5D;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;EAAmC,CAAA;AAEjE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAE9D,eAAO,MAAM,sBAAsB;;;;;;iBAGjC,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"}
|