@forklaunch/implementation-billing-base 0.1.10 → 0.1.12
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/package.json +5 -5
- package/lib/__test__/schemaEquality.test.d.ts +0 -2
- package/lib/__test__/schemaEquality.test.d.ts.map +0 -1
- package/lib/__test__/schemaEquality.test.js +0 -409
- package/lib/eject/domain/schemas/billingPortal.schema.ts +0 -31
- package/lib/eject/domain/schemas/checkoutSession.schema.ts +0 -55
- package/lib/eject/domain/schemas/index.ts +0 -5
- package/lib/eject/domain/schemas/paymentLink.schema.ts +0 -60
- package/lib/eject/domain/schemas/plan.schema.ts +0 -80
- package/lib/eject/domain/schemas/subscription.schema.ts +0 -86
- package/lib/eject/services/billingPortal.service.ts +0 -145
- package/lib/eject/services/checkoutSession.service.ts +0 -132
- package/lib/eject/services/index.ts +0 -5
- package/lib/eject/services/paymentLink.service.ts +0 -170
- package/lib/eject/services/plan.service.ts +0 -132
- package/lib/eject/services/subscription.service.ts +0 -239
- package/lib/jest.config.d.ts +0 -4
- package/lib/jest.config.d.ts.map +0 -1
- package/lib/jest.config.js +0 -19
- package/lib/schemas/billingPortal.schema.d.ts +0 -123
- package/lib/schemas/billingPortal.schema.d.ts.map +0 -1
- package/lib/schemas/billingPortal.schema.js +0 -7
- package/lib/schemas/checkoutSession.schema.d.ts +0 -179
- package/lib/schemas/checkoutSession.schema.d.ts.map +0 -1
- package/lib/schemas/checkoutSession.schema.js +0 -7
- package/lib/schemas/index.d.ts +0 -6
- package/lib/schemas/index.d.ts.map +0 -1
- package/lib/schemas/index.js +0 -5
- package/lib/schemas/paymentLink.schema.d.ts +0 -220
- package/lib/schemas/paymentLink.schema.d.ts.map +0 -1
- package/lib/schemas/paymentLink.schema.js +0 -7
- package/lib/schemas/plan.schema.d.ts +0 -336
- package/lib/schemas/plan.schema.d.ts.map +0 -1
- package/lib/schemas/plan.schema.js +0 -7
- package/lib/schemas/subscription.schema.d.ts +0 -374
- package/lib/schemas/subscription.schema.d.ts.map +0 -1
- package/lib/schemas/subscription.schema.js +0 -7
- package/lib/schemas/typebox/billingPortal.schema.d.ts +0 -181
- package/lib/schemas/typebox/billingPortal.schema.d.ts.map +0 -1
- package/lib/schemas/typebox/billingPortal.schema.js +0 -31
- package/lib/schemas/typebox/checkoutSession.schema.d.ts +0 -204
- package/lib/schemas/typebox/checkoutSession.schema.d.ts.map +0 -1
- package/lib/schemas/typebox/checkoutSession.schema.js +0 -44
- package/lib/schemas/typebox/paymentLink.schema.d.ts +0 -282
- package/lib/schemas/typebox/paymentLink.schema.d.ts.map +0 -1
- package/lib/schemas/typebox/paymentLink.schema.js +0 -49
- package/lib/schemas/typebox/plan.schema.d.ts +0 -416
- package/lib/schemas/typebox/plan.schema.d.ts.map +0 -1
- package/lib/schemas/typebox/plan.schema.js +0 -57
- package/lib/schemas/typebox/subscription.schema.d.ts +0 -488
- package/lib/schemas/typebox/subscription.schema.d.ts.map +0 -1
- package/lib/schemas/typebox/subscription.schema.js +0 -61
- package/lib/schemas/zod/billingPortal.schema.d.ts +0 -51
- package/lib/schemas/zod/billingPortal.schema.d.ts.map +0 -1
- package/lib/schemas/zod/billingPortal.schema.js +0 -31
- package/lib/schemas/zod/checkoutSession.schema.d.ts +0 -114
- package/lib/schemas/zod/checkoutSession.schema.d.ts.map +0 -1
- package/lib/schemas/zod/checkoutSession.schema.js +0 -44
- package/lib/schemas/zod/paymentLink.schema.d.ts +0 -106
- package/lib/schemas/zod/paymentLink.schema.d.ts.map +0 -1
- package/lib/schemas/zod/paymentLink.schema.js +0 -49
- package/lib/schemas/zod/plan.schema.d.ts +0 -184
- package/lib/schemas/zod/plan.schema.d.ts.map +0 -1
- package/lib/schemas/zod/plan.schema.js +0 -57
- package/lib/schemas/zod/subscription.schema.d.ts +0 -188
- package/lib/schemas/zod/subscription.schema.d.ts.map +0 -1
- package/lib/schemas/zod/subscription.schema.js +0 -61
- package/lib/services/billingPortal.service.d.ts +0 -94
- package/lib/services/billingPortal.service.d.ts.map +0 -1
- package/lib/services/billingPortal.service.js +0 -70
- package/lib/services/checkoutSession.service.d.ts +0 -94
- package/lib/services/checkoutSession.service.d.ts.map +0 -1
- package/lib/services/checkoutSession.service.js +0 -60
- package/lib/services/index.d.ts +0 -6
- package/lib/services/index.d.ts.map +0 -1
- package/lib/services/index.js +0 -5
- package/lib/services/paymentLink.service.d.ts +0 -99
- package/lib/services/paymentLink.service.d.ts.map +0 -1
- package/lib/services/paymentLink.service.js +0 -90
- package/lib/services/plan.service.d.ts +0 -90
- package/lib/services/plan.service.d.ts.map +0 -1
- package/lib/services/plan.service.js +0 -48
- package/lib/services/subscription.service.d.ts +0 -145
- package/lib/services/subscription.service.d.ts.map +0 -1
- package/lib/services/subscription.service.js +0 -117
- package/lib/tsconfig.tsbuildinfo +0 -1
- package/lib/vitest.config.d.ts +0 -3
- package/lib/vitest.config.d.ts.map +0 -1
- package/lib/vitest.config.js +0 -7
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
import { LiteralSchema } from '@forklaunch/validator';
|
|
2
|
-
export declare const CreateCheckoutSessionSchema: <
|
|
3
|
-
T extends Record<string, LiteralSchema>
|
|
4
|
-
>(
|
|
5
|
-
PaymentMethodEnum: T
|
|
6
|
-
) => {
|
|
7
|
-
customerId: import('@sinclair/typebox').TString;
|
|
8
|
-
paymentMethods: import('@sinclair/typebox').TArray<
|
|
9
|
-
import('@sinclair/typebox').TUnion<
|
|
10
|
-
[{ [K in keyof T]: import('@sinclair/typebox').TLiteral<T[K]> }[keyof T]]
|
|
11
|
-
>
|
|
12
|
-
>;
|
|
13
|
-
successRedirectUri: import('@sinclair/typebox').TString;
|
|
14
|
-
cancelRedirectUri: import('@sinclair/typebox').TString;
|
|
15
|
-
extraFields: import('@sinclair/typebox').TOptional<
|
|
16
|
-
import('@sinclair/typebox').TUnknown
|
|
17
|
-
>;
|
|
18
|
-
};
|
|
19
|
-
export declare const UpdateCheckoutSessionSchema: ({
|
|
20
|
-
uuidId
|
|
21
|
-
}: {
|
|
22
|
-
uuidId: boolean;
|
|
23
|
-
}) => <T extends Record<string, LiteralSchema>>(
|
|
24
|
-
PaymentMethodEnum: T
|
|
25
|
-
) => {
|
|
26
|
-
id: import('@sinclair/typebox').TString;
|
|
27
|
-
customerId: import('@sinclair/typebox').TOptional<
|
|
28
|
-
import('@sinclair/typebox').TString
|
|
29
|
-
>;
|
|
30
|
-
paymentMethods: import('@sinclair/typebox').TOptional<
|
|
31
|
-
import('@sinclair/typebox').TArray<
|
|
32
|
-
import('@sinclair/typebox').TUnion<
|
|
33
|
-
[
|
|
34
|
-
{
|
|
35
|
-
[K in keyof T]: import('@sinclair/typebox').TLiteral<T[K]>;
|
|
36
|
-
}[keyof T]
|
|
37
|
-
]
|
|
38
|
-
>
|
|
39
|
-
>
|
|
40
|
-
>;
|
|
41
|
-
successRedirectUri: import('@sinclair/typebox').TOptional<
|
|
42
|
-
import('@sinclair/typebox').TString
|
|
43
|
-
>;
|
|
44
|
-
cancelRedirectUri: import('@sinclair/typebox').TOptional<
|
|
45
|
-
import('@sinclair/typebox').TString
|
|
46
|
-
>;
|
|
47
|
-
extraFields: import('@sinclair/typebox').TOptional<
|
|
48
|
-
import('@sinclair/typebox').TUnknown
|
|
49
|
-
>;
|
|
50
|
-
};
|
|
51
|
-
export declare const CheckoutSessionSchema: ({
|
|
52
|
-
uuidId
|
|
53
|
-
}: {
|
|
54
|
-
uuidId: boolean;
|
|
55
|
-
}) => <T extends Record<string, LiteralSchema>>(
|
|
56
|
-
PaymentMethodEnum: T
|
|
57
|
-
) => {
|
|
58
|
-
id: import('@sinclair/typebox').TString;
|
|
59
|
-
customerId: import('@sinclair/typebox').TString;
|
|
60
|
-
metadata: import('@sinclair/typebox').TOptional<
|
|
61
|
-
import('@sinclair/typebox').TUnknown
|
|
62
|
-
>;
|
|
63
|
-
paymentMethods: import('@sinclair/typebox').TArray<
|
|
64
|
-
import('@sinclair/typebox').TUnion<
|
|
65
|
-
[{ [K in keyof T]: import('@sinclair/typebox').TLiteral<T[K]> }[keyof T]]
|
|
66
|
-
>
|
|
67
|
-
>;
|
|
68
|
-
successRedirectUri: import('@sinclair/typebox').TString;
|
|
69
|
-
cancelRedirectUri: import('@sinclair/typebox').TString;
|
|
70
|
-
extraFields: import('@sinclair/typebox').TOptional<
|
|
71
|
-
import('@sinclair/typebox').TUnknown
|
|
72
|
-
>;
|
|
73
|
-
createdAt: import('@sinclair/typebox').TOptional<
|
|
74
|
-
import('@sinclair/typebox').TTransform<
|
|
75
|
-
import('@sinclair/typebox').TUnion<
|
|
76
|
-
[
|
|
77
|
-
import('@sinclair/typebox').TDate,
|
|
78
|
-
import('@sinclair/typebox').TNumber,
|
|
79
|
-
import('@sinclair/typebox').TString,
|
|
80
|
-
import('@sinclair/typebox').TBoolean,
|
|
81
|
-
import('@sinclair/typebox').TNull
|
|
82
|
-
]
|
|
83
|
-
>,
|
|
84
|
-
Date
|
|
85
|
-
>
|
|
86
|
-
>;
|
|
87
|
-
updatedAt: import('@sinclair/typebox').TOptional<
|
|
88
|
-
import('@sinclair/typebox').TTransform<
|
|
89
|
-
import('@sinclair/typebox').TUnion<
|
|
90
|
-
[
|
|
91
|
-
import('@sinclair/typebox').TDate,
|
|
92
|
-
import('@sinclair/typebox').TNumber,
|
|
93
|
-
import('@sinclair/typebox').TString,
|
|
94
|
-
import('@sinclair/typebox').TBoolean,
|
|
95
|
-
import('@sinclair/typebox').TNull
|
|
96
|
-
]
|
|
97
|
-
>,
|
|
98
|
-
Date
|
|
99
|
-
>
|
|
100
|
-
>;
|
|
101
|
-
};
|
|
102
|
-
export declare const BaseCheckoutSessionServiceSchemas: (options: {
|
|
103
|
-
uuidId: boolean;
|
|
104
|
-
}) => {
|
|
105
|
-
CreateCheckoutSessionSchema: <T extends Record<string, LiteralSchema>>(
|
|
106
|
-
PaymentMethodEnum: T
|
|
107
|
-
) => {
|
|
108
|
-
customerId: import('@sinclair/typebox').TString;
|
|
109
|
-
paymentMethods: import('@sinclair/typebox').TArray<
|
|
110
|
-
import('@sinclair/typebox').TUnion<
|
|
111
|
-
[
|
|
112
|
-
{
|
|
113
|
-
[K in keyof T]: import('@sinclair/typebox').TLiteral<T[K]>;
|
|
114
|
-
}[keyof T]
|
|
115
|
-
]
|
|
116
|
-
>
|
|
117
|
-
>;
|
|
118
|
-
successRedirectUri: import('@sinclair/typebox').TString;
|
|
119
|
-
cancelRedirectUri: import('@sinclair/typebox').TString;
|
|
120
|
-
extraFields: import('@sinclair/typebox').TOptional<
|
|
121
|
-
import('@sinclair/typebox').TUnknown
|
|
122
|
-
>;
|
|
123
|
-
};
|
|
124
|
-
UpdateCheckoutSessionSchema: <T extends Record<string, LiteralSchema>>(
|
|
125
|
-
PaymentMethodEnum: T
|
|
126
|
-
) => {
|
|
127
|
-
id: import('@sinclair/typebox').TString;
|
|
128
|
-
customerId: import('@sinclair/typebox').TOptional<
|
|
129
|
-
import('@sinclair/typebox').TString
|
|
130
|
-
>;
|
|
131
|
-
paymentMethods: import('@sinclair/typebox').TOptional<
|
|
132
|
-
import('@sinclair/typebox').TArray<
|
|
133
|
-
import('@sinclair/typebox').TUnion<
|
|
134
|
-
[
|
|
135
|
-
{
|
|
136
|
-
[K in keyof T]: import('@sinclair/typebox').TLiteral<T[K]>;
|
|
137
|
-
}[keyof T]
|
|
138
|
-
]
|
|
139
|
-
>
|
|
140
|
-
>
|
|
141
|
-
>;
|
|
142
|
-
successRedirectUri: import('@sinclair/typebox').TOptional<
|
|
143
|
-
import('@sinclair/typebox').TString
|
|
144
|
-
>;
|
|
145
|
-
cancelRedirectUri: import('@sinclair/typebox').TOptional<
|
|
146
|
-
import('@sinclair/typebox').TString
|
|
147
|
-
>;
|
|
148
|
-
extraFields: import('@sinclair/typebox').TOptional<
|
|
149
|
-
import('@sinclair/typebox').TUnknown
|
|
150
|
-
>;
|
|
151
|
-
};
|
|
152
|
-
CheckoutSessionSchema: <T extends Record<string, LiteralSchema>>(
|
|
153
|
-
PaymentMethodEnum: T
|
|
154
|
-
) => {
|
|
155
|
-
id: import('@sinclair/typebox').TString;
|
|
156
|
-
customerId: import('@sinclair/typebox').TString;
|
|
157
|
-
metadata: import('@sinclair/typebox').TOptional<
|
|
158
|
-
import('@sinclair/typebox').TUnknown
|
|
159
|
-
>;
|
|
160
|
-
paymentMethods: import('@sinclair/typebox').TArray<
|
|
161
|
-
import('@sinclair/typebox').TUnion<
|
|
162
|
-
[
|
|
163
|
-
{
|
|
164
|
-
[K in keyof T]: import('@sinclair/typebox').TLiteral<T[K]>;
|
|
165
|
-
}[keyof T]
|
|
166
|
-
]
|
|
167
|
-
>
|
|
168
|
-
>;
|
|
169
|
-
successRedirectUri: import('@sinclair/typebox').TString;
|
|
170
|
-
cancelRedirectUri: import('@sinclair/typebox').TString;
|
|
171
|
-
extraFields: import('@sinclair/typebox').TOptional<
|
|
172
|
-
import('@sinclair/typebox').TUnknown
|
|
173
|
-
>;
|
|
174
|
-
createdAt: import('@sinclair/typebox').TOptional<
|
|
175
|
-
import('@sinclair/typebox').TTransform<
|
|
176
|
-
import('@sinclair/typebox').TUnion<
|
|
177
|
-
[
|
|
178
|
-
import('@sinclair/typebox').TDate,
|
|
179
|
-
import('@sinclair/typebox').TNumber,
|
|
180
|
-
import('@sinclair/typebox').TString,
|
|
181
|
-
import('@sinclair/typebox').TBoolean,
|
|
182
|
-
import('@sinclair/typebox').TNull
|
|
183
|
-
]
|
|
184
|
-
>,
|
|
185
|
-
Date
|
|
186
|
-
>
|
|
187
|
-
>;
|
|
188
|
-
updatedAt: import('@sinclair/typebox').TOptional<
|
|
189
|
-
import('@sinclair/typebox').TTransform<
|
|
190
|
-
import('@sinclair/typebox').TUnion<
|
|
191
|
-
[
|
|
192
|
-
import('@sinclair/typebox').TDate,
|
|
193
|
-
import('@sinclair/typebox').TNumber,
|
|
194
|
-
import('@sinclair/typebox').TString,
|
|
195
|
-
import('@sinclair/typebox').TBoolean,
|
|
196
|
-
import('@sinclair/typebox').TNull
|
|
197
|
-
]
|
|
198
|
-
>,
|
|
199
|
-
Date
|
|
200
|
-
>
|
|
201
|
-
>;
|
|
202
|
-
};
|
|
203
|
-
};
|
|
204
|
-
//# sourceMappingURL=checkoutSession.schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkoutSession.schema.d.ts","sourceRoot":"","sources":["../../../schemas/typebox/checkoutSession.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAWtD,eAAO,MAAM,2BAA2B,GACtC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,EAEvC,mBAAmB,CAAC;;;;;;CAOpB,CAAC;AAEH,eAAO,MAAM,2BAA2B,GACrC,YAAY;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,MAC/B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,EAAE,mBAAmB,CAAC;;;;;;;CAO5D,CAAC;AAEL,eAAO,MAAM,qBAAqB,GAC/B,YAAY;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,MAC/B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,EAAE,mBAAmB,CAAC;;;;;;;;;;CAU5D,CAAC;AAEL,eAAO,MAAM,iCAAiC,GAAI,SAAS;IACzD,MAAM,EAAE,OAAO,CAAC;CACjB;kCAtCC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,qBAEpB,CAAC;;;;;;;kCAWnB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,qBAAqB,CAAC;;;;;;;;4BAW7D,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,qBAAqB,CAAC;;;;;;;;;;;CAkB9D,CAAC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
array,
|
|
3
|
-
date,
|
|
4
|
-
enum_,
|
|
5
|
-
optional,
|
|
6
|
-
string,
|
|
7
|
-
unknown,
|
|
8
|
-
uuid
|
|
9
|
-
} from '@forklaunch/validator/typebox';
|
|
10
|
-
export const CreateCheckoutSessionSchema = (PaymentMethodEnum) => ({
|
|
11
|
-
customerId: string,
|
|
12
|
-
paymentMethods: array(enum_(PaymentMethodEnum)),
|
|
13
|
-
successRedirectUri: string,
|
|
14
|
-
cancelRedirectUri: string,
|
|
15
|
-
extraFields: optional(unknown)
|
|
16
|
-
});
|
|
17
|
-
export const UpdateCheckoutSessionSchema =
|
|
18
|
-
({ uuidId }) =>
|
|
19
|
-
(PaymentMethodEnum) => ({
|
|
20
|
-
id: uuidId ? uuid : string,
|
|
21
|
-
customerId: optional(string),
|
|
22
|
-
paymentMethods: optional(array(enum_(PaymentMethodEnum))),
|
|
23
|
-
successRedirectUri: optional(string),
|
|
24
|
-
cancelRedirectUri: optional(string),
|
|
25
|
-
extraFields: optional(unknown)
|
|
26
|
-
});
|
|
27
|
-
export const CheckoutSessionSchema =
|
|
28
|
-
({ uuidId }) =>
|
|
29
|
-
(PaymentMethodEnum) => ({
|
|
30
|
-
id: uuidId ? uuid : string,
|
|
31
|
-
customerId: string,
|
|
32
|
-
metadata: optional(unknown),
|
|
33
|
-
paymentMethods: array(enum_(PaymentMethodEnum)),
|
|
34
|
-
successRedirectUri: string,
|
|
35
|
-
cancelRedirectUri: string,
|
|
36
|
-
extraFields: optional(unknown),
|
|
37
|
-
createdAt: optional(date),
|
|
38
|
-
updatedAt: optional(date)
|
|
39
|
-
});
|
|
40
|
-
export const BaseCheckoutSessionServiceSchemas = (options) => ({
|
|
41
|
-
CreateCheckoutSessionSchema,
|
|
42
|
-
UpdateCheckoutSessionSchema: UpdateCheckoutSessionSchema(options),
|
|
43
|
-
CheckoutSessionSchema: CheckoutSessionSchema(options)
|
|
44
|
-
});
|
|
@@ -1,282 +0,0 @@
|
|
|
1
|
-
import { LiteralSchema } from '@forklaunch/validator';
|
|
2
|
-
export declare const CreatePaymentLinkSchema: <
|
|
3
|
-
T extends Record<string, LiteralSchema>
|
|
4
|
-
>(
|
|
5
|
-
CurrencyEnum: T
|
|
6
|
-
) => {
|
|
7
|
-
amount: import('@sinclair/typebox').TTransform<
|
|
8
|
-
import('@sinclair/typebox').TUnion<
|
|
9
|
-
[
|
|
10
|
-
import('@sinclair/typebox').TNumber,
|
|
11
|
-
import('@sinclair/typebox').TString,
|
|
12
|
-
import('@sinclair/typebox').TBoolean,
|
|
13
|
-
import('@sinclair/typebox').TNull,
|
|
14
|
-
import('@sinclair/typebox').TDate,
|
|
15
|
-
import('@sinclair/typebox').TBigInt
|
|
16
|
-
]
|
|
17
|
-
>,
|
|
18
|
-
number
|
|
19
|
-
>;
|
|
20
|
-
currency: import('@sinclair/typebox').TUnion<
|
|
21
|
-
[{ [K in keyof T]: import('@sinclair/typebox').TLiteral<T[K]> }[keyof T]]
|
|
22
|
-
>;
|
|
23
|
-
description: import('@sinclair/typebox').TOptional<
|
|
24
|
-
import('@sinclair/typebox').TString
|
|
25
|
-
>;
|
|
26
|
-
metadata: import('@sinclair/typebox').TOptional<
|
|
27
|
-
import('@sinclair/typebox').TUnknown
|
|
28
|
-
>;
|
|
29
|
-
successRedirectUri: import('@sinclair/typebox').TString;
|
|
30
|
-
cancelRedirectUri: import('@sinclair/typebox').TString;
|
|
31
|
-
extraFields: import('@sinclair/typebox').TOptional<
|
|
32
|
-
import('@sinclair/typebox').TUnknown
|
|
33
|
-
>;
|
|
34
|
-
};
|
|
35
|
-
export declare const UpdatePaymentLinkSchema: ({
|
|
36
|
-
uuidId
|
|
37
|
-
}: {
|
|
38
|
-
uuidId: boolean;
|
|
39
|
-
}) => <T extends Record<string, LiteralSchema>>(
|
|
40
|
-
CurrencyEnum: T
|
|
41
|
-
) => {
|
|
42
|
-
id: import('@sinclair/typebox').TString;
|
|
43
|
-
amount: import('@sinclair/typebox').TOptional<
|
|
44
|
-
import('@sinclair/typebox').TTransform<
|
|
45
|
-
import('@sinclair/typebox').TUnion<
|
|
46
|
-
[
|
|
47
|
-
import('@sinclair/typebox').TNumber,
|
|
48
|
-
import('@sinclair/typebox').TString,
|
|
49
|
-
import('@sinclair/typebox').TBoolean,
|
|
50
|
-
import('@sinclair/typebox').TNull,
|
|
51
|
-
import('@sinclair/typebox').TDate,
|
|
52
|
-
import('@sinclair/typebox').TBigInt
|
|
53
|
-
]
|
|
54
|
-
>,
|
|
55
|
-
number
|
|
56
|
-
>
|
|
57
|
-
>;
|
|
58
|
-
currency: import('@sinclair/typebox').TOptional<
|
|
59
|
-
import('@sinclair/typebox').TUnion<
|
|
60
|
-
[{ [K in keyof T]: import('@sinclair/typebox').TLiteral<T[K]> }[keyof T]]
|
|
61
|
-
>
|
|
62
|
-
>;
|
|
63
|
-
description: import('@sinclair/typebox').TOptional<
|
|
64
|
-
import('@sinclair/typebox').TString
|
|
65
|
-
>;
|
|
66
|
-
metadata: import('@sinclair/typebox').TOptional<
|
|
67
|
-
import('@sinclair/typebox').TUnknown
|
|
68
|
-
>;
|
|
69
|
-
successRedirectUri: import('@sinclair/typebox').TOptional<
|
|
70
|
-
import('@sinclair/typebox').TString
|
|
71
|
-
>;
|
|
72
|
-
cancelRedirectUri: import('@sinclair/typebox').TOptional<
|
|
73
|
-
import('@sinclair/typebox').TString
|
|
74
|
-
>;
|
|
75
|
-
extraFields: import('@sinclair/typebox').TOptional<
|
|
76
|
-
import('@sinclair/typebox').TUnknown
|
|
77
|
-
>;
|
|
78
|
-
};
|
|
79
|
-
export declare const PaymentLinkSchema: ({
|
|
80
|
-
uuidId
|
|
81
|
-
}: {
|
|
82
|
-
uuidId: boolean;
|
|
83
|
-
}) => <T extends Record<string, LiteralSchema>>(
|
|
84
|
-
CurrencyEnum: T
|
|
85
|
-
) => {
|
|
86
|
-
id: import('@sinclair/typebox').TString;
|
|
87
|
-
amount: import('@sinclair/typebox').TTransform<
|
|
88
|
-
import('@sinclair/typebox').TUnion<
|
|
89
|
-
[
|
|
90
|
-
import('@sinclair/typebox').TNumber,
|
|
91
|
-
import('@sinclair/typebox').TString,
|
|
92
|
-
import('@sinclair/typebox').TBoolean,
|
|
93
|
-
import('@sinclair/typebox').TNull,
|
|
94
|
-
import('@sinclair/typebox').TDate,
|
|
95
|
-
import('@sinclair/typebox').TBigInt
|
|
96
|
-
]
|
|
97
|
-
>,
|
|
98
|
-
number
|
|
99
|
-
>;
|
|
100
|
-
currency: import('@sinclair/typebox').TUnion<
|
|
101
|
-
[{ [K in keyof T]: import('@sinclair/typebox').TLiteral<T[K]> }[keyof T]]
|
|
102
|
-
>;
|
|
103
|
-
description: import('@sinclair/typebox').TOptional<
|
|
104
|
-
import('@sinclair/typebox').TString
|
|
105
|
-
>;
|
|
106
|
-
metadata: import('@sinclair/typebox').TOptional<
|
|
107
|
-
import('@sinclair/typebox').TUnknown
|
|
108
|
-
>;
|
|
109
|
-
successRedirectUri: import('@sinclair/typebox').TString;
|
|
110
|
-
cancelRedirectUri: import('@sinclair/typebox').TString;
|
|
111
|
-
extraFields: import('@sinclair/typebox').TOptional<
|
|
112
|
-
import('@sinclair/typebox').TUnknown
|
|
113
|
-
>;
|
|
114
|
-
createdAt: import('@sinclair/typebox').TOptional<
|
|
115
|
-
import('@sinclair/typebox').TTransform<
|
|
116
|
-
import('@sinclair/typebox').TUnion<
|
|
117
|
-
[
|
|
118
|
-
import('@sinclair/typebox').TDate,
|
|
119
|
-
import('@sinclair/typebox').TNumber,
|
|
120
|
-
import('@sinclair/typebox').TString,
|
|
121
|
-
import('@sinclair/typebox').TBoolean,
|
|
122
|
-
import('@sinclair/typebox').TNull
|
|
123
|
-
]
|
|
124
|
-
>,
|
|
125
|
-
Date
|
|
126
|
-
>
|
|
127
|
-
>;
|
|
128
|
-
updatedAt: import('@sinclair/typebox').TOptional<
|
|
129
|
-
import('@sinclair/typebox').TTransform<
|
|
130
|
-
import('@sinclair/typebox').TUnion<
|
|
131
|
-
[
|
|
132
|
-
import('@sinclair/typebox').TDate,
|
|
133
|
-
import('@sinclair/typebox').TNumber,
|
|
134
|
-
import('@sinclair/typebox').TString,
|
|
135
|
-
import('@sinclair/typebox').TBoolean,
|
|
136
|
-
import('@sinclair/typebox').TNull
|
|
137
|
-
]
|
|
138
|
-
>,
|
|
139
|
-
Date
|
|
140
|
-
>
|
|
141
|
-
>;
|
|
142
|
-
};
|
|
143
|
-
export declare const BasePaymentLinkServiceSchemas: (options: {
|
|
144
|
-
uuidId: boolean;
|
|
145
|
-
}) => {
|
|
146
|
-
CreatePaymentLinkSchema: <T extends Record<string, LiteralSchema>>(
|
|
147
|
-
CurrencyEnum: T
|
|
148
|
-
) => {
|
|
149
|
-
amount: import('@sinclair/typebox').TTransform<
|
|
150
|
-
import('@sinclair/typebox').TUnion<
|
|
151
|
-
[
|
|
152
|
-
import('@sinclair/typebox').TNumber,
|
|
153
|
-
import('@sinclair/typebox').TString,
|
|
154
|
-
import('@sinclair/typebox').TBoolean,
|
|
155
|
-
import('@sinclair/typebox').TNull,
|
|
156
|
-
import('@sinclair/typebox').TDate,
|
|
157
|
-
import('@sinclair/typebox').TBigInt
|
|
158
|
-
]
|
|
159
|
-
>,
|
|
160
|
-
number
|
|
161
|
-
>;
|
|
162
|
-
currency: import('@sinclair/typebox').TUnion<
|
|
163
|
-
[{ [K in keyof T]: import('@sinclair/typebox').TLiteral<T[K]> }[keyof T]]
|
|
164
|
-
>;
|
|
165
|
-
description: import('@sinclair/typebox').TOptional<
|
|
166
|
-
import('@sinclair/typebox').TString
|
|
167
|
-
>;
|
|
168
|
-
metadata: import('@sinclair/typebox').TOptional<
|
|
169
|
-
import('@sinclair/typebox').TUnknown
|
|
170
|
-
>;
|
|
171
|
-
successRedirectUri: import('@sinclair/typebox').TString;
|
|
172
|
-
cancelRedirectUri: import('@sinclair/typebox').TString;
|
|
173
|
-
extraFields: import('@sinclair/typebox').TOptional<
|
|
174
|
-
import('@sinclair/typebox').TUnknown
|
|
175
|
-
>;
|
|
176
|
-
};
|
|
177
|
-
UpdatePaymentLinkSchema: <T extends Record<string, LiteralSchema>>(
|
|
178
|
-
CurrencyEnum: T
|
|
179
|
-
) => {
|
|
180
|
-
id: import('@sinclair/typebox').TString;
|
|
181
|
-
amount: import('@sinclair/typebox').TOptional<
|
|
182
|
-
import('@sinclair/typebox').TTransform<
|
|
183
|
-
import('@sinclair/typebox').TUnion<
|
|
184
|
-
[
|
|
185
|
-
import('@sinclair/typebox').TNumber,
|
|
186
|
-
import('@sinclair/typebox').TString,
|
|
187
|
-
import('@sinclair/typebox').TBoolean,
|
|
188
|
-
import('@sinclair/typebox').TNull,
|
|
189
|
-
import('@sinclair/typebox').TDate,
|
|
190
|
-
import('@sinclair/typebox').TBigInt
|
|
191
|
-
]
|
|
192
|
-
>,
|
|
193
|
-
number
|
|
194
|
-
>
|
|
195
|
-
>;
|
|
196
|
-
currency: import('@sinclair/typebox').TOptional<
|
|
197
|
-
import('@sinclair/typebox').TUnion<
|
|
198
|
-
[
|
|
199
|
-
{
|
|
200
|
-
[K in keyof T]: import('@sinclair/typebox').TLiteral<T[K]>;
|
|
201
|
-
}[keyof T]
|
|
202
|
-
]
|
|
203
|
-
>
|
|
204
|
-
>;
|
|
205
|
-
description: import('@sinclair/typebox').TOptional<
|
|
206
|
-
import('@sinclair/typebox').TString
|
|
207
|
-
>;
|
|
208
|
-
metadata: import('@sinclair/typebox').TOptional<
|
|
209
|
-
import('@sinclair/typebox').TUnknown
|
|
210
|
-
>;
|
|
211
|
-
successRedirectUri: import('@sinclair/typebox').TOptional<
|
|
212
|
-
import('@sinclair/typebox').TString
|
|
213
|
-
>;
|
|
214
|
-
cancelRedirectUri: import('@sinclair/typebox').TOptional<
|
|
215
|
-
import('@sinclair/typebox').TString
|
|
216
|
-
>;
|
|
217
|
-
extraFields: import('@sinclair/typebox').TOptional<
|
|
218
|
-
import('@sinclair/typebox').TUnknown
|
|
219
|
-
>;
|
|
220
|
-
};
|
|
221
|
-
PaymentLinkSchema: <T extends Record<string, LiteralSchema>>(
|
|
222
|
-
CurrencyEnum: T
|
|
223
|
-
) => {
|
|
224
|
-
id: import('@sinclair/typebox').TString;
|
|
225
|
-
amount: import('@sinclair/typebox').TTransform<
|
|
226
|
-
import('@sinclair/typebox').TUnion<
|
|
227
|
-
[
|
|
228
|
-
import('@sinclair/typebox').TNumber,
|
|
229
|
-
import('@sinclair/typebox').TString,
|
|
230
|
-
import('@sinclair/typebox').TBoolean,
|
|
231
|
-
import('@sinclair/typebox').TNull,
|
|
232
|
-
import('@sinclair/typebox').TDate,
|
|
233
|
-
import('@sinclair/typebox').TBigInt
|
|
234
|
-
]
|
|
235
|
-
>,
|
|
236
|
-
number
|
|
237
|
-
>;
|
|
238
|
-
currency: import('@sinclair/typebox').TUnion<
|
|
239
|
-
[{ [K in keyof T]: import('@sinclair/typebox').TLiteral<T[K]> }[keyof T]]
|
|
240
|
-
>;
|
|
241
|
-
description: import('@sinclair/typebox').TOptional<
|
|
242
|
-
import('@sinclair/typebox').TString
|
|
243
|
-
>;
|
|
244
|
-
metadata: import('@sinclair/typebox').TOptional<
|
|
245
|
-
import('@sinclair/typebox').TUnknown
|
|
246
|
-
>;
|
|
247
|
-
successRedirectUri: import('@sinclair/typebox').TString;
|
|
248
|
-
cancelRedirectUri: import('@sinclair/typebox').TString;
|
|
249
|
-
extraFields: import('@sinclair/typebox').TOptional<
|
|
250
|
-
import('@sinclair/typebox').TUnknown
|
|
251
|
-
>;
|
|
252
|
-
createdAt: import('@sinclair/typebox').TOptional<
|
|
253
|
-
import('@sinclair/typebox').TTransform<
|
|
254
|
-
import('@sinclair/typebox').TUnion<
|
|
255
|
-
[
|
|
256
|
-
import('@sinclair/typebox').TDate,
|
|
257
|
-
import('@sinclair/typebox').TNumber,
|
|
258
|
-
import('@sinclair/typebox').TString,
|
|
259
|
-
import('@sinclair/typebox').TBoolean,
|
|
260
|
-
import('@sinclair/typebox').TNull
|
|
261
|
-
]
|
|
262
|
-
>,
|
|
263
|
-
Date
|
|
264
|
-
>
|
|
265
|
-
>;
|
|
266
|
-
updatedAt: import('@sinclair/typebox').TOptional<
|
|
267
|
-
import('@sinclair/typebox').TTransform<
|
|
268
|
-
import('@sinclair/typebox').TUnion<
|
|
269
|
-
[
|
|
270
|
-
import('@sinclair/typebox').TDate,
|
|
271
|
-
import('@sinclair/typebox').TNumber,
|
|
272
|
-
import('@sinclair/typebox').TString,
|
|
273
|
-
import('@sinclair/typebox').TBoolean,
|
|
274
|
-
import('@sinclair/typebox').TNull
|
|
275
|
-
]
|
|
276
|
-
>,
|
|
277
|
-
Date
|
|
278
|
-
>
|
|
279
|
-
>;
|
|
280
|
-
};
|
|
281
|
-
};
|
|
282
|
-
//# sourceMappingURL=paymentLink.schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"paymentLink.schema.d.ts","sourceRoot":"","sources":["../../../schemas/typebox/paymentLink.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAWtD,eAAO,MAAM,uBAAuB,GAClC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,EAEvC,cAAc,CAAC;;;;;;;;CASf,CAAC;AAEH,eAAO,MAAM,uBAAuB,GACjC,YAAY;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,MAC/B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,EAAE,cAAc,CAAC;;;;;;;;;CASvD,CAAC;AAEL,eAAO,MAAM,iBAAiB,GAC3B,YAAY;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,MAC/B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,EAAE,cAAc,CAAC;;;;;;;;;;;CAWvD,CAAC;AAEL,eAAO,MAAM,6BAA6B,GAAI,SAAS;IACrD,MAAM,EAAE,OAAO,CAAC;CACjB;8BA3CC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,gBAEzB,CAAC;;;;;;;;;8BAad,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,gBAAgB,CAAC;;;;;;;;;;wBAaxD,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,gBAAgB,CAAC;;;;;;;;;;;;CAmBzD,CAAC"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
date,
|
|
3
|
-
enum_,
|
|
4
|
-
number,
|
|
5
|
-
optional,
|
|
6
|
-
string,
|
|
7
|
-
unknown,
|
|
8
|
-
uuid
|
|
9
|
-
} from '@forklaunch/validator/typebox';
|
|
10
|
-
export const CreatePaymentLinkSchema = (CurrencyEnum) => ({
|
|
11
|
-
amount: number,
|
|
12
|
-
currency: enum_(CurrencyEnum),
|
|
13
|
-
description: optional(string),
|
|
14
|
-
metadata: optional(unknown),
|
|
15
|
-
successRedirectUri: string,
|
|
16
|
-
cancelRedirectUri: string,
|
|
17
|
-
extraFields: optional(unknown)
|
|
18
|
-
});
|
|
19
|
-
export const UpdatePaymentLinkSchema =
|
|
20
|
-
({ uuidId }) =>
|
|
21
|
-
(CurrencyEnum) => ({
|
|
22
|
-
id: uuidId ? uuid : string,
|
|
23
|
-
amount: optional(number),
|
|
24
|
-
currency: optional(enum_(CurrencyEnum)),
|
|
25
|
-
description: optional(string),
|
|
26
|
-
metadata: optional(unknown),
|
|
27
|
-
successRedirectUri: optional(string),
|
|
28
|
-
cancelRedirectUri: optional(string),
|
|
29
|
-
extraFields: optional(unknown)
|
|
30
|
-
});
|
|
31
|
-
export const PaymentLinkSchema =
|
|
32
|
-
({ uuidId }) =>
|
|
33
|
-
(CurrencyEnum) => ({
|
|
34
|
-
id: uuidId ? uuid : string,
|
|
35
|
-
amount: number,
|
|
36
|
-
currency: enum_(CurrencyEnum),
|
|
37
|
-
description: optional(string),
|
|
38
|
-
metadata: optional(unknown),
|
|
39
|
-
successRedirectUri: string,
|
|
40
|
-
cancelRedirectUri: string,
|
|
41
|
-
extraFields: optional(unknown),
|
|
42
|
-
createdAt: optional(date),
|
|
43
|
-
updatedAt: optional(date)
|
|
44
|
-
});
|
|
45
|
-
export const BasePaymentLinkServiceSchemas = (options) => ({
|
|
46
|
-
CreatePaymentLinkSchema,
|
|
47
|
-
UpdatePaymentLinkSchema: UpdatePaymentLinkSchema(options),
|
|
48
|
-
PaymentLinkSchema: PaymentLinkSchema(options)
|
|
49
|
-
});
|