@deliverart/sdk-js-payment 0.0.4 → 1.1.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/package.json +11 -26
- package/.changeset/config.json +0 -11
- package/.github/workflows/workflow.yml +0 -47
- package/.prettierrc +0 -7
- package/CHANGELOG.md +0 -55
- package/README.md +0 -3
- package/dist/index.cjs +0 -1122
- package/dist/index.d.cts +0 -4422
- package/dist/index.d.ts +0 -4422
- package/dist/index.js +0 -1006
- package/eslint.config.js +0 -41
- package/src/index.ts +0 -3
- package/src/models.ts +0 -168
- package/src/requests/index.ts +0 -2
- package/src/requests/payment-configs/DeletePaymentConfig.ts +0 -27
- package/src/requests/payment-configs/GetPaymentConfigDetails.ts +0 -33
- package/src/requests/payment-configs/GetPaymentConfigs.ts +0 -50
- package/src/requests/payment-configs/bank-transfer/CreatePaymentConfigBankTransfer.ts +0 -38
- package/src/requests/payment-configs/bank-transfer/DeletePaymentConfigBankTransfer.ts +0 -27
- package/src/requests/payment-configs/bank-transfer/GetPaymentConfigBankTransferDetails.ts +0 -37
- package/src/requests/payment-configs/bank-transfer/GetPaymentConfigBankTransferList.ts +0 -54
- package/src/requests/payment-configs/bank-transfer/UpdatePaymentConfigBankTransfer.ts +0 -45
- package/src/requests/payment-configs/bank-transfer/index.ts +0 -5
- package/src/requests/payment-configs/cash/CreatePaymentConfigCash.ts +0 -36
- package/src/requests/payment-configs/cash/DeletePaymentConfigCash.ts +0 -27
- package/src/requests/payment-configs/cash/GetPaymentConfigCashDetails.ts +0 -33
- package/src/requests/payment-configs/cash/GetPaymentConfigCashList.ts +0 -52
- package/src/requests/payment-configs/cash/index.ts +0 -4
- package/src/requests/payment-configs/credit-card/CreatePaymentConfigCreditCard.ts +0 -38
- package/src/requests/payment-configs/credit-card/DeletePaymentConfigCreditCard.ts +0 -27
- package/src/requests/payment-configs/credit-card/GetPaymentConfigCreditCardDetails.ts +0 -36
- package/src/requests/payment-configs/credit-card/GetPaymentConfigCreditCardList.ts +0 -54
- package/src/requests/payment-configs/credit-card/index.ts +0 -4
- package/src/requests/payment-configs/index.ts +0 -7
- package/src/requests/payment-configs/stripe/CreatePaymentConfigStripe.ts +0 -36
- package/src/requests/payment-configs/stripe/DeletePaymentConfigStripe.ts +0 -27
- package/src/requests/payment-configs/stripe/GetPaymentConfigStripeDetails.ts +0 -33
- package/src/requests/payment-configs/stripe/GetPaymentConfigStripeList.ts +0 -53
- package/src/requests/payment-configs/stripe/UpdatePaymentConfigStripe.ts +0 -43
- package/src/requests/payment-configs/stripe/index.ts +0 -5
- package/src/requests/payments/DeletePayment.ts +0 -27
- package/src/requests/payments/GetPaymentDetails.ts +0 -30
- package/src/requests/payments/GetPayments.ts +0 -45
- package/src/requests/payments/GetPaymentsForPaymentConfig.ts +0 -53
- package/src/requests/payments/UpdatePayment.ts +0 -32
- package/src/requests/payments/index.ts +0 -5
- package/src/types.ts +0 -194
- package/tsconfig.json +0 -15
package/dist/index.js
DELETED
|
@@ -1,1006 +0,0 @@
|
|
|
1
|
-
// src/models.ts
|
|
2
|
-
import {
|
|
3
|
-
datetimeSchema,
|
|
4
|
-
sortDirSchema,
|
|
5
|
-
timestampsFilterSchema
|
|
6
|
-
} from "@deliverart/sdk-js-global-types";
|
|
7
|
-
import { pointOfSalePathSchema } from "@deliverart/sdk-js-point-of-sale";
|
|
8
|
-
import { z as z2 } from "zod";
|
|
9
|
-
|
|
10
|
-
// src/types.ts
|
|
11
|
-
import { z } from "zod";
|
|
12
|
-
var paymentMethods = ["stripe", "bank_transfer", "cash", "credit_card"];
|
|
13
|
-
var paymentMethodSchema = z.enum(paymentMethods);
|
|
14
|
-
var paymentStatuses = [
|
|
15
|
-
"pending",
|
|
16
|
-
"pending_verification",
|
|
17
|
-
"paid",
|
|
18
|
-
"canceled",
|
|
19
|
-
"refunded",
|
|
20
|
-
"failed"
|
|
21
|
-
];
|
|
22
|
-
var paymentStatusSchema = z.enum(paymentStatuses);
|
|
23
|
-
var paymentPathSchema = z.string().refine(
|
|
24
|
-
(val) => /^\/payments\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
25
|
-
val
|
|
26
|
-
),
|
|
27
|
-
{
|
|
28
|
-
message: "Invalid payment path format"
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
var paymentNullablePathSchema = z.string().nullable().refine(
|
|
32
|
-
(val) => {
|
|
33
|
-
if (!val) return true;
|
|
34
|
-
return /^\/payments\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
35
|
-
val
|
|
36
|
-
);
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
message: "Invalid payment path format"
|
|
40
|
-
}
|
|
41
|
-
);
|
|
42
|
-
var paymentConfigPathSchema = z.string().refine(
|
|
43
|
-
(val) => /^\/payment_configs\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
44
|
-
val
|
|
45
|
-
),
|
|
46
|
-
{
|
|
47
|
-
message: "Invalid paymentConfig path format"
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
var paymentConfigNullablePathSchema = z.string().nullable().refine(
|
|
51
|
-
(val) => {
|
|
52
|
-
if (!val) return true;
|
|
53
|
-
return /^\/payment_configs\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
54
|
-
val
|
|
55
|
-
);
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
message: "Invalid paymentConfig path format"
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
var paymentConfigBankTransferPathSchema = z.string().refine(
|
|
62
|
-
(val) => /^\/payment_configs\/bank_transfer\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
63
|
-
val
|
|
64
|
-
),
|
|
65
|
-
{
|
|
66
|
-
message: "Invalid paymentConfigBankTransfer path format"
|
|
67
|
-
}
|
|
68
|
-
);
|
|
69
|
-
var paymentConfigBankTransferNullablePathSchema = z.string().nullable().refine(
|
|
70
|
-
(val) => {
|
|
71
|
-
if (!val) return true;
|
|
72
|
-
return /^\/payment_configs\/bank_transfer\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
73
|
-
val
|
|
74
|
-
);
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
message: "Invalid paymentConfigBankTransfer path format"
|
|
78
|
-
}
|
|
79
|
-
);
|
|
80
|
-
var paymentConfigCashPathSchema = z.string().refine(
|
|
81
|
-
(val) => /^\/payment_configs\/cash\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
82
|
-
val
|
|
83
|
-
),
|
|
84
|
-
{
|
|
85
|
-
message: "Invalid paymentConfigCash path format"
|
|
86
|
-
}
|
|
87
|
-
);
|
|
88
|
-
var paymentConfigCashNullablePathSchema = z.string().nullable().refine(
|
|
89
|
-
(val) => {
|
|
90
|
-
if (!val) return true;
|
|
91
|
-
return /^\/payment_configs\/cash\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
92
|
-
val
|
|
93
|
-
);
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
message: "Invalid paymentConfigCash path format"
|
|
97
|
-
}
|
|
98
|
-
);
|
|
99
|
-
var paymentConfigCreditCardPathSchema = z.string().refine(
|
|
100
|
-
(val) => /^\/payment_configs\/credit_card\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
101
|
-
val
|
|
102
|
-
),
|
|
103
|
-
{
|
|
104
|
-
message: "Invalid paymentConfigCreditCard path format"
|
|
105
|
-
}
|
|
106
|
-
);
|
|
107
|
-
var paymentConfigCreditCardNullablePathSchema = z.string().nullable().refine(
|
|
108
|
-
(val) => {
|
|
109
|
-
if (!val) return true;
|
|
110
|
-
return /^\/payment_configs\/credit_card\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
111
|
-
val
|
|
112
|
-
);
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
message: "Invalid paymentConfigCreditCard path format"
|
|
116
|
-
}
|
|
117
|
-
);
|
|
118
|
-
var paymentConfigStripePathSchema = z.string().refine(
|
|
119
|
-
(val) => /^\/payment_configs\/stripe\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
120
|
-
val
|
|
121
|
-
),
|
|
122
|
-
{
|
|
123
|
-
message: "Invalid paymentConfigStripe path format"
|
|
124
|
-
}
|
|
125
|
-
);
|
|
126
|
-
var paymentConfigStripeNullablePathSchema = z.string().nullable().refine(
|
|
127
|
-
(val) => {
|
|
128
|
-
if (!val) return true;
|
|
129
|
-
return /^\/payment_configs\/stripe\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
130
|
-
val
|
|
131
|
-
);
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
message: "Invalid paymentConfigStripe path format"
|
|
135
|
-
}
|
|
136
|
-
);
|
|
137
|
-
|
|
138
|
-
// src/models.ts
|
|
139
|
-
var paymentSchema = z2.object({
|
|
140
|
-
id: z2.string(),
|
|
141
|
-
method: paymentMethodSchema,
|
|
142
|
-
status: paymentStatusSchema,
|
|
143
|
-
amount: z2.string(),
|
|
144
|
-
internalReference: z2.string().nullable(),
|
|
145
|
-
externalReference: z2.string().nullable(),
|
|
146
|
-
response: z2.string().nullable(),
|
|
147
|
-
validUntil: datetimeSchema.nullable(),
|
|
148
|
-
createdAt: datetimeSchema,
|
|
149
|
-
updatedAt: datetimeSchema
|
|
150
|
-
});
|
|
151
|
-
var paymentDetailsSchema = paymentSchema.extend({
|
|
152
|
-
config: paymentConfigPathSchema
|
|
153
|
-
});
|
|
154
|
-
var writablePaymentSchema = paymentDetailsSchema.pick({
|
|
155
|
-
status: true,
|
|
156
|
-
response: true
|
|
157
|
-
});
|
|
158
|
-
var paymentConfigBaseSchema = z2.object({
|
|
159
|
-
id: z2.string(),
|
|
160
|
-
method: paymentMethodSchema,
|
|
161
|
-
configurationCompleted: z2.boolean(),
|
|
162
|
-
createdAt: datetimeSchema,
|
|
163
|
-
updatedAt: datetimeSchema
|
|
164
|
-
});
|
|
165
|
-
var paymentConfigDetailsFieldsSchema = z2.object({
|
|
166
|
-
pointOfSale: pointOfSalePathSchema
|
|
167
|
-
});
|
|
168
|
-
var paymentConfigBankTransferSchema = paymentConfigBaseSchema.omit({ method: true }).extend({
|
|
169
|
-
method: paymentMethodSchema.extract(["bank_transfer"]),
|
|
170
|
-
iban: z2.string(),
|
|
171
|
-
bic: z2.string(),
|
|
172
|
-
accountHolder: z2.string(),
|
|
173
|
-
bankName: z2.string(),
|
|
174
|
-
bankAddress: z2.string().nullable().optional(),
|
|
175
|
-
currency: z2.string()
|
|
176
|
-
});
|
|
177
|
-
var paymentConfigBankTransferDetailsSchema = paymentConfigBankTransferSchema.extend(
|
|
178
|
-
paymentConfigDetailsFieldsSchema.shape
|
|
179
|
-
);
|
|
180
|
-
var writablePaymentConfigBankTransferSchema = paymentConfigBankTransferDetailsSchema.pick({
|
|
181
|
-
pointOfSale: true,
|
|
182
|
-
iban: true,
|
|
183
|
-
bic: true,
|
|
184
|
-
accountHolder: true,
|
|
185
|
-
bankName: true,
|
|
186
|
-
bankAddress: true,
|
|
187
|
-
currency: true
|
|
188
|
-
});
|
|
189
|
-
var paymentConfigCashSchema = paymentConfigBaseSchema.omit({ method: true }).extend({
|
|
190
|
-
method: paymentMethodSchema.extract(["cash"])
|
|
191
|
-
});
|
|
192
|
-
var paymentConfigCashDetailsSchema = paymentConfigCashSchema.extend(
|
|
193
|
-
paymentConfigDetailsFieldsSchema.shape
|
|
194
|
-
);
|
|
195
|
-
var writablePaymentConfigCashSchema = paymentConfigCashDetailsSchema.pick({
|
|
196
|
-
pointOfSale: true
|
|
197
|
-
});
|
|
198
|
-
var paymentConfigCreditCardSchema = paymentConfigBaseSchema.omit({ method: true }).extend({
|
|
199
|
-
method: paymentMethodSchema.extract(["credit_card"])
|
|
200
|
-
});
|
|
201
|
-
var paymentConfigCreditCardDetailsSchema = paymentConfigCreditCardSchema.extend(
|
|
202
|
-
paymentConfigDetailsFieldsSchema.shape
|
|
203
|
-
);
|
|
204
|
-
var writablePaymentConfigCreditCardSchema = paymentConfigCreditCardDetailsSchema.pick({
|
|
205
|
-
pointOfSale: true
|
|
206
|
-
});
|
|
207
|
-
var paymentConfigStripeSchema = paymentConfigBaseSchema.omit({ method: true }).extend({
|
|
208
|
-
method: paymentMethodSchema.extract(["stripe"]),
|
|
209
|
-
secretKey: z2.string(),
|
|
210
|
-
webhookSecret: z2.string().nullable().optional(),
|
|
211
|
-
webhookId: z2.string().nullable().optional()
|
|
212
|
-
});
|
|
213
|
-
var paymentConfigStripeDetailsSchema = paymentConfigStripeSchema.extend(
|
|
214
|
-
paymentConfigDetailsFieldsSchema.shape
|
|
215
|
-
);
|
|
216
|
-
var writablePaymentConfigStripeSchema = paymentConfigStripeDetailsSchema.pick({
|
|
217
|
-
pointOfSale: true,
|
|
218
|
-
secretKey: true
|
|
219
|
-
});
|
|
220
|
-
var paymentConfigSchema = z2.discriminatedUnion("method", [
|
|
221
|
-
paymentConfigBankTransferSchema,
|
|
222
|
-
paymentConfigCashSchema,
|
|
223
|
-
paymentConfigCreditCardSchema,
|
|
224
|
-
paymentConfigStripeSchema
|
|
225
|
-
]);
|
|
226
|
-
var paymentConfigDetailsSchema = z2.discriminatedUnion("method", [
|
|
227
|
-
paymentConfigBankTransferDetailsSchema,
|
|
228
|
-
paymentConfigCashDetailsSchema,
|
|
229
|
-
paymentConfigCreditCardDetailsSchema,
|
|
230
|
-
paymentConfigStripeDetailsSchema
|
|
231
|
-
]);
|
|
232
|
-
var paymentQuerySchema = z2.object({
|
|
233
|
-
internalReference: z2.string().optional(),
|
|
234
|
-
externalReference: z2.string().optional(),
|
|
235
|
-
method: paymentMethodSchema.optional(),
|
|
236
|
-
"method[]": z2.array(paymentMethodSchema).optional(),
|
|
237
|
-
status: paymentStatusSchema.optional(),
|
|
238
|
-
"status[]": z2.array(paymentStatusSchema).optional(),
|
|
239
|
-
"amount[between]": z2.coerce.number().optional(),
|
|
240
|
-
"amount[gt]": z2.coerce.number().optional(),
|
|
241
|
-
"amount[gte]": z2.coerce.number().optional(),
|
|
242
|
-
"amount[lt]": z2.coerce.number().optional(),
|
|
243
|
-
"amount[lte]": z2.coerce.number().optional(),
|
|
244
|
-
"order[createdAt]": sortDirSchema.optional(),
|
|
245
|
-
"order[updatedAt]": sortDirSchema.optional(),
|
|
246
|
-
page: z2.coerce.number().optional()
|
|
247
|
-
}).merge(timestampsFilterSchema);
|
|
248
|
-
var paymentConfigsQuerySchema = z2.object({
|
|
249
|
-
method: paymentMethodSchema.optional(),
|
|
250
|
-
configurationCompleted: z2.coerce.boolean().optional(),
|
|
251
|
-
"order[createdAt]": sortDirSchema.optional(),
|
|
252
|
-
"order[updatedAt]": sortDirSchema.optional(),
|
|
253
|
-
page: z2.coerce.number().optional()
|
|
254
|
-
}).merge(timestampsFilterSchema);
|
|
255
|
-
|
|
256
|
-
// src/requests/payment-configs/bank-transfer/CreatePaymentConfigBankTransfer.ts
|
|
257
|
-
import { AbstractApiRequest } from "@deliverart/sdk-js-core";
|
|
258
|
-
var createPaymentConfigBankTransferInputSchema = writablePaymentConfigBankTransferSchema;
|
|
259
|
-
var createPaymentConfigBankTransferResponseSchema = paymentConfigBankTransferDetailsSchema;
|
|
260
|
-
var CreatePaymentConfigBankTransfer = class extends AbstractApiRequest {
|
|
261
|
-
method = "POST";
|
|
262
|
-
contentType = "application/json";
|
|
263
|
-
accept = "application/json";
|
|
264
|
-
inputSchema = createPaymentConfigBankTransferInputSchema;
|
|
265
|
-
outputSchema = createPaymentConfigBankTransferResponseSchema;
|
|
266
|
-
querySchema = void 0;
|
|
267
|
-
headersSchema = void 0;
|
|
268
|
-
constructor(input) {
|
|
269
|
-
super(input);
|
|
270
|
-
}
|
|
271
|
-
getPath() {
|
|
272
|
-
return "/payment_configs/bank_transfer";
|
|
273
|
-
}
|
|
274
|
-
};
|
|
275
|
-
|
|
276
|
-
// src/requests/payment-configs/bank-transfer/DeletePaymentConfigBankTransfer.ts
|
|
277
|
-
import { AbstractApiRequest as AbstractApiRequest2 } from "@deliverart/sdk-js-core";
|
|
278
|
-
import { z as z3 } from "zod";
|
|
279
|
-
var deletePaymentConfigBankTransferInputSchema = z3.undefined();
|
|
280
|
-
var deletePaymentConfigBankTransferResponseSchema = z3.undefined();
|
|
281
|
-
var DeletePaymentConfigBankTransfer = class extends AbstractApiRequest2 {
|
|
282
|
-
method = "DELETE";
|
|
283
|
-
contentType = "application/json";
|
|
284
|
-
accept = "application/json";
|
|
285
|
-
inputSchema = deletePaymentConfigBankTransferInputSchema;
|
|
286
|
-
outputSchema = deletePaymentConfigBankTransferResponseSchema;
|
|
287
|
-
querySchema = void 0;
|
|
288
|
-
headersSchema = void 0;
|
|
289
|
-
paymentConfigId;
|
|
290
|
-
constructor(paymentConfigId) {
|
|
291
|
-
super();
|
|
292
|
-
this.paymentConfigId = paymentConfigId;
|
|
293
|
-
}
|
|
294
|
-
getPath() {
|
|
295
|
-
return `/payment_configs/bank_transfer/${this.paymentConfigId}`;
|
|
296
|
-
}
|
|
297
|
-
};
|
|
298
|
-
|
|
299
|
-
// src/requests/payment-configs/bank-transfer/GetPaymentConfigBankTransferDetails.ts
|
|
300
|
-
import { AbstractApiRequest as AbstractApiRequest3 } from "@deliverart/sdk-js-core";
|
|
301
|
-
import { z as z4 } from "zod";
|
|
302
|
-
var getPaymentConfigBankTransferDetailsInputSchema = z4.undefined();
|
|
303
|
-
var getPaymentConfigBankTransferDetailsResponseSchema = paymentConfigBankTransferDetailsSchema;
|
|
304
|
-
var GetPaymentConfigBankTransferDetails = class extends AbstractApiRequest3 {
|
|
305
|
-
method = "GET";
|
|
306
|
-
contentType = "application/json";
|
|
307
|
-
accept = "application/json";
|
|
308
|
-
inputSchema = getPaymentConfigBankTransferDetailsInputSchema;
|
|
309
|
-
outputSchema = getPaymentConfigBankTransferDetailsResponseSchema;
|
|
310
|
-
querySchema = void 0;
|
|
311
|
-
headersSchema = void 0;
|
|
312
|
-
paymentConfigId;
|
|
313
|
-
constructor(paymentConfigId) {
|
|
314
|
-
super();
|
|
315
|
-
this.paymentConfigId = paymentConfigId;
|
|
316
|
-
}
|
|
317
|
-
getPath() {
|
|
318
|
-
return `/payment_configs/bank_transfer/${this.paymentConfigId}`;
|
|
319
|
-
}
|
|
320
|
-
};
|
|
321
|
-
|
|
322
|
-
// src/requests/payment-configs/bank-transfer/GetPaymentConfigBankTransferList.ts
|
|
323
|
-
import { AbstractApiRequest as AbstractApiRequest4 } from "@deliverart/sdk-js-core";
|
|
324
|
-
import {
|
|
325
|
-
createPaginatedSchema,
|
|
326
|
-
responseToPagination
|
|
327
|
-
} from "@deliverart/sdk-js-global-types";
|
|
328
|
-
import { z as z5 } from "zod";
|
|
329
|
-
var getPaymentConfigBankTransferListResponseSchema = createPaginatedSchema(
|
|
330
|
-
paymentConfigBankTransferSchema
|
|
331
|
-
);
|
|
332
|
-
var getPaymentConfigBankTransferListInputSchema = z5.undefined();
|
|
333
|
-
var GetPaymentConfigBankTransferList = class extends AbstractApiRequest4 {
|
|
334
|
-
method = "GET";
|
|
335
|
-
contentType = "application/json";
|
|
336
|
-
accept = "application/json";
|
|
337
|
-
inputSchema = getPaymentConfigBankTransferListInputSchema;
|
|
338
|
-
outputSchema = getPaymentConfigBankTransferListResponseSchema;
|
|
339
|
-
querySchema = paymentConfigsQuerySchema;
|
|
340
|
-
headersSchema = void 0;
|
|
341
|
-
constructor(options) {
|
|
342
|
-
super(void 0, options);
|
|
343
|
-
}
|
|
344
|
-
getPath() {
|
|
345
|
-
return "/payment_configs/bank_transfer";
|
|
346
|
-
}
|
|
347
|
-
parseResponse(data, rawResponse) {
|
|
348
|
-
const payments = z5.array(paymentConfigBankTransferSchema).parse(data);
|
|
349
|
-
return this.validateOutput({ data: payments, pagination: responseToPagination(rawResponse) });
|
|
350
|
-
}
|
|
351
|
-
};
|
|
352
|
-
|
|
353
|
-
// src/requests/payment-configs/bank-transfer/UpdatePaymentConfigBankTransfer.ts
|
|
354
|
-
import { AbstractApiRequest as AbstractApiRequest5 } from "@deliverart/sdk-js-core";
|
|
355
|
-
var updatePaymentConfigBankTransferInputSchema = writablePaymentConfigBankTransferSchema.omit({
|
|
356
|
-
pointOfSale: true
|
|
357
|
-
}).partial();
|
|
358
|
-
var updatePaymentConfigBankTransferResponseSchema = paymentConfigBankTransferDetailsSchema;
|
|
359
|
-
var UpdatePaymentConfigBankTransfer = class extends AbstractApiRequest5 {
|
|
360
|
-
method = "PATCH";
|
|
361
|
-
contentType = "application/merge-patch+json";
|
|
362
|
-
accept = "application/json";
|
|
363
|
-
inputSchema = updatePaymentConfigBankTransferInputSchema;
|
|
364
|
-
outputSchema = updatePaymentConfigBankTransferResponseSchema;
|
|
365
|
-
querySchema = void 0;
|
|
366
|
-
headersSchema = void 0;
|
|
367
|
-
paymentConfigId;
|
|
368
|
-
constructor(paymentConfigId, input) {
|
|
369
|
-
super(input);
|
|
370
|
-
this.paymentConfigId = paymentConfigId;
|
|
371
|
-
}
|
|
372
|
-
getPath() {
|
|
373
|
-
return `/payment_configs/bank_transfer/${this.paymentConfigId}`;
|
|
374
|
-
}
|
|
375
|
-
};
|
|
376
|
-
|
|
377
|
-
// src/requests/payment-configs/cash/CreatePaymentConfigCash.ts
|
|
378
|
-
import { AbstractApiRequest as AbstractApiRequest6 } from "@deliverart/sdk-js-core";
|
|
379
|
-
var createPaymentConfigCashInputSchema = writablePaymentConfigCashSchema;
|
|
380
|
-
var createPaymentConfigCashResponseSchema = paymentConfigCashDetailsSchema;
|
|
381
|
-
var CreatePaymentConfigCash = class extends AbstractApiRequest6 {
|
|
382
|
-
method = "POST";
|
|
383
|
-
contentType = "application/json";
|
|
384
|
-
accept = "application/json";
|
|
385
|
-
inputSchema = createPaymentConfigCashInputSchema;
|
|
386
|
-
outputSchema = createPaymentConfigCashResponseSchema;
|
|
387
|
-
querySchema = void 0;
|
|
388
|
-
headersSchema = void 0;
|
|
389
|
-
constructor(input) {
|
|
390
|
-
super(input);
|
|
391
|
-
}
|
|
392
|
-
getPath() {
|
|
393
|
-
return "/payment_configs/cash";
|
|
394
|
-
}
|
|
395
|
-
};
|
|
396
|
-
|
|
397
|
-
// src/requests/payment-configs/cash/DeletePaymentConfigCash.ts
|
|
398
|
-
import { AbstractApiRequest as AbstractApiRequest7 } from "@deliverart/sdk-js-core";
|
|
399
|
-
import { z as z6 } from "zod";
|
|
400
|
-
var deletePaymentConfigCashInputSchema = z6.undefined();
|
|
401
|
-
var deletePaymentConfigCashResponseSchema = z6.undefined();
|
|
402
|
-
var DeletePaymentConfigCash = class extends AbstractApiRequest7 {
|
|
403
|
-
method = "DELETE";
|
|
404
|
-
contentType = "application/json";
|
|
405
|
-
accept = "application/json";
|
|
406
|
-
inputSchema = deletePaymentConfigCashInputSchema;
|
|
407
|
-
outputSchema = deletePaymentConfigCashResponseSchema;
|
|
408
|
-
querySchema = void 0;
|
|
409
|
-
headersSchema = void 0;
|
|
410
|
-
paymentConfigId;
|
|
411
|
-
constructor(paymentConfigId) {
|
|
412
|
-
super();
|
|
413
|
-
this.paymentConfigId = paymentConfigId;
|
|
414
|
-
}
|
|
415
|
-
getPath() {
|
|
416
|
-
return `/payment_configs/cash/${this.paymentConfigId}`;
|
|
417
|
-
}
|
|
418
|
-
};
|
|
419
|
-
|
|
420
|
-
// src/requests/payment-configs/cash/GetPaymentConfigCashDetails.ts
|
|
421
|
-
import { AbstractApiRequest as AbstractApiRequest8 } from "@deliverart/sdk-js-core";
|
|
422
|
-
import { z as z7 } from "zod";
|
|
423
|
-
var getPaymentConfigCashDetailsInputSchema = z7.undefined();
|
|
424
|
-
var getPaymentConfigCashDetailsResponseSchema = paymentConfigCashDetailsSchema;
|
|
425
|
-
var GetPaymentConfigCashDetails = class extends AbstractApiRequest8 {
|
|
426
|
-
method = "GET";
|
|
427
|
-
contentType = "application/json";
|
|
428
|
-
accept = "application/json";
|
|
429
|
-
inputSchema = getPaymentConfigCashDetailsInputSchema;
|
|
430
|
-
outputSchema = getPaymentConfigCashDetailsResponseSchema;
|
|
431
|
-
querySchema = void 0;
|
|
432
|
-
headersSchema = void 0;
|
|
433
|
-
paymentConfigId;
|
|
434
|
-
constructor(paymentConfigId) {
|
|
435
|
-
super();
|
|
436
|
-
this.paymentConfigId = paymentConfigId;
|
|
437
|
-
}
|
|
438
|
-
getPath() {
|
|
439
|
-
return `/payment_configs/cash/${this.paymentConfigId}`;
|
|
440
|
-
}
|
|
441
|
-
};
|
|
442
|
-
|
|
443
|
-
// src/requests/payment-configs/cash/GetPaymentConfigCashList.ts
|
|
444
|
-
import { AbstractApiRequest as AbstractApiRequest9 } from "@deliverart/sdk-js-core";
|
|
445
|
-
import {
|
|
446
|
-
createPaginatedSchema as createPaginatedSchema2,
|
|
447
|
-
responseToPagination as responseToPagination2
|
|
448
|
-
} from "@deliverart/sdk-js-global-types";
|
|
449
|
-
import { z as z8 } from "zod";
|
|
450
|
-
var getPaymentConfigCashListResponseSchema = createPaginatedSchema2(paymentConfigCashSchema);
|
|
451
|
-
var getPaymentConfigCashListInputSchema = z8.undefined();
|
|
452
|
-
var GetPaymentConfigCashList = class extends AbstractApiRequest9 {
|
|
453
|
-
method = "GET";
|
|
454
|
-
contentType = "application/json";
|
|
455
|
-
accept = "application/json";
|
|
456
|
-
inputSchema = getPaymentConfigCashListInputSchema;
|
|
457
|
-
outputSchema = getPaymentConfigCashListResponseSchema;
|
|
458
|
-
querySchema = paymentConfigsQuerySchema;
|
|
459
|
-
headersSchema = void 0;
|
|
460
|
-
constructor(options) {
|
|
461
|
-
super(void 0, options);
|
|
462
|
-
}
|
|
463
|
-
getPath() {
|
|
464
|
-
return "/payment_configs/cash";
|
|
465
|
-
}
|
|
466
|
-
parseResponse(data, rawResponse) {
|
|
467
|
-
const payments = z8.array(paymentConfigCashSchema).parse(data);
|
|
468
|
-
return this.validateOutput({ data: payments, pagination: responseToPagination2(rawResponse) });
|
|
469
|
-
}
|
|
470
|
-
};
|
|
471
|
-
|
|
472
|
-
// src/requests/payment-configs/credit-card/CreatePaymentConfigCreditCard.ts
|
|
473
|
-
import { AbstractApiRequest as AbstractApiRequest10 } from "@deliverart/sdk-js-core";
|
|
474
|
-
var createPaymentConfigCreditCardInputSchema = writablePaymentConfigCreditCardSchema;
|
|
475
|
-
var createPaymentConfigCreditCardResponseSchema = paymentConfigCreditCardDetailsSchema;
|
|
476
|
-
var CreatePaymentConfigCreditCard = class extends AbstractApiRequest10 {
|
|
477
|
-
method = "POST";
|
|
478
|
-
contentType = "application/json";
|
|
479
|
-
accept = "application/json";
|
|
480
|
-
inputSchema = createPaymentConfigCreditCardInputSchema;
|
|
481
|
-
outputSchema = createPaymentConfigCreditCardResponseSchema;
|
|
482
|
-
querySchema = void 0;
|
|
483
|
-
headersSchema = void 0;
|
|
484
|
-
constructor(input) {
|
|
485
|
-
super(input);
|
|
486
|
-
}
|
|
487
|
-
getPath() {
|
|
488
|
-
return "/payment_configs/credit_card";
|
|
489
|
-
}
|
|
490
|
-
};
|
|
491
|
-
|
|
492
|
-
// src/requests/payment-configs/credit-card/DeletePaymentConfigCreditCard.ts
|
|
493
|
-
import { AbstractApiRequest as AbstractApiRequest11 } from "@deliverart/sdk-js-core";
|
|
494
|
-
import { z as z9 } from "zod";
|
|
495
|
-
var deletePaymentConfigCreditCardInputSchema = z9.undefined();
|
|
496
|
-
var deletePaymentConfigCreditCardResponseSchema = z9.undefined();
|
|
497
|
-
var DeletePaymentConfigCreditCard = class extends AbstractApiRequest11 {
|
|
498
|
-
method = "DELETE";
|
|
499
|
-
contentType = "application/json";
|
|
500
|
-
accept = "application/json";
|
|
501
|
-
inputSchema = deletePaymentConfigCreditCardInputSchema;
|
|
502
|
-
outputSchema = deletePaymentConfigCreditCardResponseSchema;
|
|
503
|
-
querySchema = void 0;
|
|
504
|
-
headersSchema = void 0;
|
|
505
|
-
paymentConfigId;
|
|
506
|
-
constructor(paymentConfigId) {
|
|
507
|
-
super();
|
|
508
|
-
this.paymentConfigId = paymentConfigId;
|
|
509
|
-
}
|
|
510
|
-
getPath() {
|
|
511
|
-
return `/payment_configs/credit_card/${this.paymentConfigId}`;
|
|
512
|
-
}
|
|
513
|
-
};
|
|
514
|
-
|
|
515
|
-
// src/requests/payment-configs/credit-card/GetPaymentConfigCreditCardDetails.ts
|
|
516
|
-
import { AbstractApiRequest as AbstractApiRequest12 } from "@deliverart/sdk-js-core";
|
|
517
|
-
import { z as z10 } from "zod";
|
|
518
|
-
var getPaymentConfigCreditCardDetailsInputSchema = z10.undefined();
|
|
519
|
-
var getPaymentConfigCreditCardDetailsResponseSchema = paymentConfigCreditCardDetailsSchema;
|
|
520
|
-
var GetPaymentConfigCreditCardDetails = class extends AbstractApiRequest12 {
|
|
521
|
-
method = "GET";
|
|
522
|
-
contentType = "application/json";
|
|
523
|
-
accept = "application/json";
|
|
524
|
-
inputSchema = getPaymentConfigCreditCardDetailsInputSchema;
|
|
525
|
-
outputSchema = getPaymentConfigCreditCardDetailsResponseSchema;
|
|
526
|
-
querySchema = void 0;
|
|
527
|
-
headersSchema = void 0;
|
|
528
|
-
paymentConfigId;
|
|
529
|
-
constructor(paymentConfigId) {
|
|
530
|
-
super();
|
|
531
|
-
this.paymentConfigId = paymentConfigId;
|
|
532
|
-
}
|
|
533
|
-
getPath() {
|
|
534
|
-
return `/payment_configs/credit_card/${this.paymentConfigId}`;
|
|
535
|
-
}
|
|
536
|
-
};
|
|
537
|
-
|
|
538
|
-
// src/requests/payment-configs/credit-card/GetPaymentConfigCreditCardList.ts
|
|
539
|
-
import { AbstractApiRequest as AbstractApiRequest13 } from "@deliverart/sdk-js-core";
|
|
540
|
-
import {
|
|
541
|
-
createPaginatedSchema as createPaginatedSchema3,
|
|
542
|
-
responseToPagination as responseToPagination3
|
|
543
|
-
} from "@deliverart/sdk-js-global-types";
|
|
544
|
-
import { z as z11 } from "zod";
|
|
545
|
-
var getPaymentConfigCreditCardListResponseSchema = createPaginatedSchema3(
|
|
546
|
-
paymentConfigCreditCardSchema
|
|
547
|
-
);
|
|
548
|
-
var getPaymentConfigCreditCardListInputSchema = z11.undefined();
|
|
549
|
-
var GetPaymentConfigCreditCardList = class extends AbstractApiRequest13 {
|
|
550
|
-
method = "GET";
|
|
551
|
-
contentType = "application/json";
|
|
552
|
-
accept = "application/json";
|
|
553
|
-
inputSchema = getPaymentConfigCreditCardListInputSchema;
|
|
554
|
-
outputSchema = getPaymentConfigCreditCardListResponseSchema;
|
|
555
|
-
querySchema = paymentConfigsQuerySchema;
|
|
556
|
-
headersSchema = void 0;
|
|
557
|
-
constructor(options) {
|
|
558
|
-
super(void 0, options);
|
|
559
|
-
}
|
|
560
|
-
getPath() {
|
|
561
|
-
return "/payment_configs/credit_card";
|
|
562
|
-
}
|
|
563
|
-
parseResponse(data, rawResponse) {
|
|
564
|
-
const payments = z11.array(paymentConfigCreditCardSchema).parse(data);
|
|
565
|
-
return this.validateOutput({ data: payments, pagination: responseToPagination3(rawResponse) });
|
|
566
|
-
}
|
|
567
|
-
};
|
|
568
|
-
|
|
569
|
-
// src/requests/payment-configs/DeletePaymentConfig.ts
|
|
570
|
-
import { AbstractApiRequest as AbstractApiRequest14 } from "@deliverart/sdk-js-core";
|
|
571
|
-
import { z as z12 } from "zod";
|
|
572
|
-
var deletePaymentConfigInputSchema = z12.undefined();
|
|
573
|
-
var deletePaymentConfigResponseSchema = z12.undefined();
|
|
574
|
-
var DeletePaymentConfig = class extends AbstractApiRequest14 {
|
|
575
|
-
method = "DELETE";
|
|
576
|
-
contentType = "application/json";
|
|
577
|
-
accept = "application/json";
|
|
578
|
-
inputSchema = deletePaymentConfigInputSchema;
|
|
579
|
-
outputSchema = deletePaymentConfigResponseSchema;
|
|
580
|
-
querySchema = void 0;
|
|
581
|
-
headersSchema = void 0;
|
|
582
|
-
paymentConfigId;
|
|
583
|
-
constructor(paymentConfigId) {
|
|
584
|
-
super();
|
|
585
|
-
this.paymentConfigId = paymentConfigId;
|
|
586
|
-
}
|
|
587
|
-
getPath() {
|
|
588
|
-
return `/payment_configs/${this.paymentConfigId}`;
|
|
589
|
-
}
|
|
590
|
-
};
|
|
591
|
-
|
|
592
|
-
// src/requests/payment-configs/GetPaymentConfigDetails.ts
|
|
593
|
-
import { AbstractApiRequest as AbstractApiRequest15 } from "@deliverart/sdk-js-core";
|
|
594
|
-
import { z as z13 } from "zod";
|
|
595
|
-
var getPaymentConfigDetailsInputSchema = z13.undefined();
|
|
596
|
-
var getPaymentConfigDetailsResponseSchema = paymentConfigDetailsSchema;
|
|
597
|
-
var GetPaymentConfigDetails = class extends AbstractApiRequest15 {
|
|
598
|
-
method = "GET";
|
|
599
|
-
contentType = "application/json";
|
|
600
|
-
accept = "application/json";
|
|
601
|
-
inputSchema = getPaymentConfigDetailsInputSchema;
|
|
602
|
-
outputSchema = getPaymentConfigDetailsResponseSchema;
|
|
603
|
-
querySchema = void 0;
|
|
604
|
-
headersSchema = void 0;
|
|
605
|
-
paymentConfigId;
|
|
606
|
-
constructor(paymentConfigId) {
|
|
607
|
-
super();
|
|
608
|
-
this.paymentConfigId = paymentConfigId;
|
|
609
|
-
}
|
|
610
|
-
getPath() {
|
|
611
|
-
return `/payment_configs/${this.paymentConfigId}`;
|
|
612
|
-
}
|
|
613
|
-
};
|
|
614
|
-
|
|
615
|
-
// src/requests/payment-configs/GetPaymentConfigs.ts
|
|
616
|
-
import { AbstractApiRequest as AbstractApiRequest16 } from "@deliverart/sdk-js-core";
|
|
617
|
-
import {
|
|
618
|
-
createPaginatedSchema as createPaginatedSchema4,
|
|
619
|
-
responseToPagination as responseToPagination4
|
|
620
|
-
} from "@deliverart/sdk-js-global-types";
|
|
621
|
-
import { z as z14 } from "zod";
|
|
622
|
-
var getPaymentConfigsResponseSchema = createPaginatedSchema4(paymentConfigSchema);
|
|
623
|
-
var getPaymentConfigsInputSchema = z14.undefined();
|
|
624
|
-
var GetPaymentConfigs = class extends AbstractApiRequest16 {
|
|
625
|
-
method = "GET";
|
|
626
|
-
contentType = "application/json";
|
|
627
|
-
accept = "application/json";
|
|
628
|
-
inputSchema = getPaymentConfigsInputSchema;
|
|
629
|
-
outputSchema = getPaymentConfigsResponseSchema;
|
|
630
|
-
querySchema = paymentConfigsQuerySchema;
|
|
631
|
-
headersSchema = void 0;
|
|
632
|
-
constructor(options) {
|
|
633
|
-
super(void 0, options);
|
|
634
|
-
}
|
|
635
|
-
getPath() {
|
|
636
|
-
return "/payment_configs";
|
|
637
|
-
}
|
|
638
|
-
parseResponse(data, rawResponse) {
|
|
639
|
-
const payments = z14.array(paymentConfigSchema).parse(data);
|
|
640
|
-
return this.validateOutput({ data: payments, pagination: responseToPagination4(rawResponse) });
|
|
641
|
-
}
|
|
642
|
-
};
|
|
643
|
-
|
|
644
|
-
// src/requests/payment-configs/stripe/CreatePaymentConfigStripe.ts
|
|
645
|
-
import { AbstractApiRequest as AbstractApiRequest17 } from "@deliverart/sdk-js-core";
|
|
646
|
-
var createPaymentConfigStripeInputSchema = writablePaymentConfigStripeSchema;
|
|
647
|
-
var createPaymentConfigStripeResponseSchema = paymentConfigStripeDetailsSchema;
|
|
648
|
-
var CreatePaymentConfigStripe = class extends AbstractApiRequest17 {
|
|
649
|
-
method = "POST";
|
|
650
|
-
contentType = "application/json";
|
|
651
|
-
accept = "application/json";
|
|
652
|
-
inputSchema = createPaymentConfigStripeInputSchema;
|
|
653
|
-
outputSchema = createPaymentConfigStripeResponseSchema;
|
|
654
|
-
querySchema = void 0;
|
|
655
|
-
headersSchema = void 0;
|
|
656
|
-
constructor(input) {
|
|
657
|
-
super(input);
|
|
658
|
-
}
|
|
659
|
-
getPath() {
|
|
660
|
-
return "/payment_configs/stripe";
|
|
661
|
-
}
|
|
662
|
-
};
|
|
663
|
-
|
|
664
|
-
// src/requests/payment-configs/stripe/DeletePaymentConfigStripe.ts
|
|
665
|
-
import { AbstractApiRequest as AbstractApiRequest18 } from "@deliverart/sdk-js-core";
|
|
666
|
-
import { z as z15 } from "zod";
|
|
667
|
-
var deletePaymentConfigStripeInputSchema = z15.undefined();
|
|
668
|
-
var deletePaymentConfigStripeResponseSchema = z15.undefined();
|
|
669
|
-
var DeletePaymentConfigStripe = class extends AbstractApiRequest18 {
|
|
670
|
-
method = "DELETE";
|
|
671
|
-
contentType = "application/json";
|
|
672
|
-
accept = "application/json";
|
|
673
|
-
inputSchema = deletePaymentConfigStripeInputSchema;
|
|
674
|
-
outputSchema = deletePaymentConfigStripeResponseSchema;
|
|
675
|
-
querySchema = void 0;
|
|
676
|
-
headersSchema = void 0;
|
|
677
|
-
paymentConfigId;
|
|
678
|
-
constructor(paymentConfigId) {
|
|
679
|
-
super();
|
|
680
|
-
this.paymentConfigId = paymentConfigId;
|
|
681
|
-
}
|
|
682
|
-
getPath() {
|
|
683
|
-
return `/payment_configs/stripe/${this.paymentConfigId}`;
|
|
684
|
-
}
|
|
685
|
-
};
|
|
686
|
-
|
|
687
|
-
// src/requests/payment-configs/stripe/GetPaymentConfigStripeDetails.ts
|
|
688
|
-
import { AbstractApiRequest as AbstractApiRequest19 } from "@deliverart/sdk-js-core";
|
|
689
|
-
import { z as z16 } from "zod";
|
|
690
|
-
var getPaymentConfigStripeDetailsInputSchema = z16.undefined();
|
|
691
|
-
var getPaymentConfigStripeDetailsResponseSchema = paymentConfigStripeDetailsSchema;
|
|
692
|
-
var GetPaymentConfigStripeDetails = class extends AbstractApiRequest19 {
|
|
693
|
-
method = "GET";
|
|
694
|
-
contentType = "application/json";
|
|
695
|
-
accept = "application/json";
|
|
696
|
-
inputSchema = getPaymentConfigStripeDetailsInputSchema;
|
|
697
|
-
outputSchema = getPaymentConfigStripeDetailsResponseSchema;
|
|
698
|
-
querySchema = void 0;
|
|
699
|
-
headersSchema = void 0;
|
|
700
|
-
paymentConfigId;
|
|
701
|
-
constructor(paymentConfigId) {
|
|
702
|
-
super();
|
|
703
|
-
this.paymentConfigId = paymentConfigId;
|
|
704
|
-
}
|
|
705
|
-
getPath() {
|
|
706
|
-
return `/payment_configs/stripe/${this.paymentConfigId}`;
|
|
707
|
-
}
|
|
708
|
-
};
|
|
709
|
-
|
|
710
|
-
// src/requests/payment-configs/stripe/GetPaymentConfigStripeList.ts
|
|
711
|
-
import { AbstractApiRequest as AbstractApiRequest20 } from "@deliverart/sdk-js-core";
|
|
712
|
-
import {
|
|
713
|
-
createPaginatedSchema as createPaginatedSchema5,
|
|
714
|
-
responseToPagination as responseToPagination5
|
|
715
|
-
} from "@deliverart/sdk-js-global-types";
|
|
716
|
-
import { z as z17 } from "zod";
|
|
717
|
-
var getPaymentConfigStripeListResponseSchema = createPaginatedSchema5(paymentConfigStripeSchema);
|
|
718
|
-
var getPaymentConfigStripeListInputSchema = z17.undefined();
|
|
719
|
-
var GetPaymentConfigStripeList = class extends AbstractApiRequest20 {
|
|
720
|
-
method = "GET";
|
|
721
|
-
contentType = "application/json";
|
|
722
|
-
accept = "application/json";
|
|
723
|
-
inputSchema = getPaymentConfigStripeListInputSchema;
|
|
724
|
-
outputSchema = getPaymentConfigStripeListResponseSchema;
|
|
725
|
-
querySchema = paymentConfigsQuerySchema;
|
|
726
|
-
headersSchema = void 0;
|
|
727
|
-
constructor(options) {
|
|
728
|
-
super(void 0, options);
|
|
729
|
-
}
|
|
730
|
-
getPath() {
|
|
731
|
-
return "/payment_configs/stripe";
|
|
732
|
-
}
|
|
733
|
-
parseResponse(data, rawResponse) {
|
|
734
|
-
const payments = z17.array(paymentConfigStripeSchema).parse(data);
|
|
735
|
-
return this.validateOutput({ data: payments, pagination: responseToPagination5(rawResponse) });
|
|
736
|
-
}
|
|
737
|
-
};
|
|
738
|
-
|
|
739
|
-
// src/requests/payment-configs/stripe/UpdatePaymentConfigStripe.ts
|
|
740
|
-
import { AbstractApiRequest as AbstractApiRequest21 } from "@deliverart/sdk-js-core";
|
|
741
|
-
var updatePaymentConfigStripeInputSchema = writablePaymentConfigStripeSchema.omit({
|
|
742
|
-
pointOfSale: true
|
|
743
|
-
}).partial();
|
|
744
|
-
var updatePaymentConfigStripeResponseSchema = paymentConfigStripeDetailsSchema;
|
|
745
|
-
var UpdatePaymentConfigStripe = class extends AbstractApiRequest21 {
|
|
746
|
-
method = "PATCH";
|
|
747
|
-
contentType = "application/merge-patch+json";
|
|
748
|
-
accept = "application/json";
|
|
749
|
-
inputSchema = updatePaymentConfigStripeInputSchema;
|
|
750
|
-
outputSchema = updatePaymentConfigStripeResponseSchema;
|
|
751
|
-
querySchema = void 0;
|
|
752
|
-
headersSchema = void 0;
|
|
753
|
-
paymentConfigId;
|
|
754
|
-
constructor(paymentConfigId, input) {
|
|
755
|
-
super(input);
|
|
756
|
-
this.paymentConfigId = paymentConfigId;
|
|
757
|
-
}
|
|
758
|
-
getPath() {
|
|
759
|
-
return `/payment_configs/stripe/${this.paymentConfigId}`;
|
|
760
|
-
}
|
|
761
|
-
};
|
|
762
|
-
|
|
763
|
-
// src/requests/payments/DeletePayment.ts
|
|
764
|
-
import { AbstractApiRequest as AbstractApiRequest22 } from "@deliverart/sdk-js-core";
|
|
765
|
-
import { z as z18 } from "zod";
|
|
766
|
-
var deletePaymentInputSchema = z18.undefined();
|
|
767
|
-
var deletePaymentResponseSchema = z18.undefined();
|
|
768
|
-
var DeletePayment = class extends AbstractApiRequest22 {
|
|
769
|
-
method = "DELETE";
|
|
770
|
-
contentType = "application/json";
|
|
771
|
-
accept = "application/json";
|
|
772
|
-
inputSchema = deletePaymentInputSchema;
|
|
773
|
-
outputSchema = deletePaymentResponseSchema;
|
|
774
|
-
querySchema = void 0;
|
|
775
|
-
headersSchema = void 0;
|
|
776
|
-
paymentId;
|
|
777
|
-
constructor(paymentId) {
|
|
778
|
-
super();
|
|
779
|
-
this.paymentId = paymentId;
|
|
780
|
-
}
|
|
781
|
-
getPath() {
|
|
782
|
-
return `/payments/${this.paymentId}`;
|
|
783
|
-
}
|
|
784
|
-
};
|
|
785
|
-
|
|
786
|
-
// src/requests/payments/GetPaymentDetails.ts
|
|
787
|
-
import { AbstractApiRequest as AbstractApiRequest23 } from "@deliverart/sdk-js-core";
|
|
788
|
-
import { z as z19 } from "zod";
|
|
789
|
-
var getPaymentDetailsInputSchema = z19.undefined();
|
|
790
|
-
var getPaymentDetailsResponseSchema = paymentDetailsSchema;
|
|
791
|
-
var GetPaymentDetails = class extends AbstractApiRequest23 {
|
|
792
|
-
method = "GET";
|
|
793
|
-
contentType = "application/json";
|
|
794
|
-
accept = "application/json";
|
|
795
|
-
inputSchema = getPaymentDetailsInputSchema;
|
|
796
|
-
outputSchema = getPaymentDetailsResponseSchema;
|
|
797
|
-
querySchema = void 0;
|
|
798
|
-
headersSchema = void 0;
|
|
799
|
-
paymentId;
|
|
800
|
-
constructor(paymentId) {
|
|
801
|
-
super();
|
|
802
|
-
this.paymentId = paymentId;
|
|
803
|
-
}
|
|
804
|
-
getPath() {
|
|
805
|
-
return `/payments/${this.paymentId}`;
|
|
806
|
-
}
|
|
807
|
-
};
|
|
808
|
-
|
|
809
|
-
// src/requests/payments/GetPayments.ts
|
|
810
|
-
import { AbstractApiRequest as AbstractApiRequest24 } from "@deliverart/sdk-js-core";
|
|
811
|
-
import {
|
|
812
|
-
createPaginatedSchema as createPaginatedSchema6,
|
|
813
|
-
responseToPagination as responseToPagination6
|
|
814
|
-
} from "@deliverart/sdk-js-global-types";
|
|
815
|
-
import { z as z20 } from "zod";
|
|
816
|
-
var getPaymentsResponseSchema = createPaginatedSchema6(paymentSchema);
|
|
817
|
-
var getPaymentsInputSchema = z20.undefined();
|
|
818
|
-
var GetPayments = class extends AbstractApiRequest24 {
|
|
819
|
-
method = "GET";
|
|
820
|
-
contentType = "application/json";
|
|
821
|
-
accept = "application/json";
|
|
822
|
-
inputSchema = getPaymentsInputSchema;
|
|
823
|
-
outputSchema = getPaymentsResponseSchema;
|
|
824
|
-
querySchema = paymentQuerySchema;
|
|
825
|
-
headersSchema = void 0;
|
|
826
|
-
constructor(options) {
|
|
827
|
-
super(void 0, options);
|
|
828
|
-
}
|
|
829
|
-
getPath() {
|
|
830
|
-
return "/payments";
|
|
831
|
-
}
|
|
832
|
-
parseResponse(data, rawResponse) {
|
|
833
|
-
const payments = z20.array(paymentSchema).parse(data);
|
|
834
|
-
return this.validateOutput({ data: payments, pagination: responseToPagination6(rawResponse) });
|
|
835
|
-
}
|
|
836
|
-
};
|
|
837
|
-
|
|
838
|
-
// src/requests/payments/GetPaymentsForPaymentConfig.ts
|
|
839
|
-
import { AbstractApiRequest as AbstractApiRequest25 } from "@deliverart/sdk-js-core";
|
|
840
|
-
import {
|
|
841
|
-
createPaginatedSchema as createPaginatedSchema7,
|
|
842
|
-
responseToPagination as responseToPagination7
|
|
843
|
-
} from "@deliverart/sdk-js-global-types";
|
|
844
|
-
import { z as z21 } from "zod";
|
|
845
|
-
var getPaymentsForPaymentConfigResponseSchema = createPaginatedSchema7(paymentSchema);
|
|
846
|
-
var getPaymentsForPaymentConfigInputSchema = z21.undefined();
|
|
847
|
-
var GetPaymentsForPaymentConfig = class extends AbstractApiRequest25 {
|
|
848
|
-
method = "GET";
|
|
849
|
-
contentType = "application/json";
|
|
850
|
-
accept = "application/json";
|
|
851
|
-
inputSchema = getPaymentsForPaymentConfigInputSchema;
|
|
852
|
-
outputSchema = getPaymentsForPaymentConfigResponseSchema;
|
|
853
|
-
querySchema = paymentQuerySchema;
|
|
854
|
-
headersSchema = void 0;
|
|
855
|
-
paymentConfigId;
|
|
856
|
-
constructor(paymentConfigId, options) {
|
|
857
|
-
super(void 0, options);
|
|
858
|
-
this.paymentConfigId = paymentConfigId;
|
|
859
|
-
}
|
|
860
|
-
getPath() {
|
|
861
|
-
return `/payment_configs/${this.paymentConfigId}/payments`;
|
|
862
|
-
}
|
|
863
|
-
parseResponse(data, rawResponse) {
|
|
864
|
-
const payments = z21.array(paymentSchema).parse(data);
|
|
865
|
-
return this.validateOutput({ data: payments, pagination: responseToPagination7(rawResponse) });
|
|
866
|
-
}
|
|
867
|
-
};
|
|
868
|
-
|
|
869
|
-
// src/requests/payments/UpdatePayment.ts
|
|
870
|
-
import { AbstractApiRequest as AbstractApiRequest26 } from "@deliverart/sdk-js-core";
|
|
871
|
-
var updatePaymentInputSchema = writablePaymentSchema.partial();
|
|
872
|
-
var updatePaymentResponseSchema = paymentDetailsSchema;
|
|
873
|
-
var UpdatePayment = class extends AbstractApiRequest26 {
|
|
874
|
-
method = "PATCH";
|
|
875
|
-
contentType = "application/merge-patch+json";
|
|
876
|
-
accept = "application/json";
|
|
877
|
-
inputSchema = updatePaymentInputSchema;
|
|
878
|
-
outputSchema = updatePaymentResponseSchema;
|
|
879
|
-
querySchema = void 0;
|
|
880
|
-
headersSchema = void 0;
|
|
881
|
-
paymentId;
|
|
882
|
-
constructor(paymentId, input) {
|
|
883
|
-
super(input);
|
|
884
|
-
this.paymentId = paymentId;
|
|
885
|
-
}
|
|
886
|
-
getPath() {
|
|
887
|
-
return `/payments/${this.paymentId}`;
|
|
888
|
-
}
|
|
889
|
-
};
|
|
890
|
-
export {
|
|
891
|
-
CreatePaymentConfigBankTransfer,
|
|
892
|
-
CreatePaymentConfigCash,
|
|
893
|
-
CreatePaymentConfigCreditCard,
|
|
894
|
-
CreatePaymentConfigStripe,
|
|
895
|
-
DeletePayment,
|
|
896
|
-
DeletePaymentConfig,
|
|
897
|
-
DeletePaymentConfigBankTransfer,
|
|
898
|
-
DeletePaymentConfigCash,
|
|
899
|
-
DeletePaymentConfigCreditCard,
|
|
900
|
-
DeletePaymentConfigStripe,
|
|
901
|
-
GetPaymentConfigBankTransferDetails,
|
|
902
|
-
GetPaymentConfigBankTransferList,
|
|
903
|
-
GetPaymentConfigCashDetails,
|
|
904
|
-
GetPaymentConfigCashList,
|
|
905
|
-
GetPaymentConfigCreditCardDetails,
|
|
906
|
-
GetPaymentConfigCreditCardList,
|
|
907
|
-
GetPaymentConfigDetails,
|
|
908
|
-
GetPaymentConfigStripeDetails,
|
|
909
|
-
GetPaymentConfigStripeList,
|
|
910
|
-
GetPaymentConfigs,
|
|
911
|
-
GetPaymentDetails,
|
|
912
|
-
GetPayments,
|
|
913
|
-
GetPaymentsForPaymentConfig,
|
|
914
|
-
UpdatePayment,
|
|
915
|
-
UpdatePaymentConfigBankTransfer,
|
|
916
|
-
UpdatePaymentConfigStripe,
|
|
917
|
-
createPaymentConfigBankTransferInputSchema,
|
|
918
|
-
createPaymentConfigBankTransferResponseSchema,
|
|
919
|
-
createPaymentConfigCashInputSchema,
|
|
920
|
-
createPaymentConfigCashResponseSchema,
|
|
921
|
-
createPaymentConfigCreditCardInputSchema,
|
|
922
|
-
createPaymentConfigCreditCardResponseSchema,
|
|
923
|
-
createPaymentConfigStripeInputSchema,
|
|
924
|
-
createPaymentConfigStripeResponseSchema,
|
|
925
|
-
deletePaymentConfigBankTransferInputSchema,
|
|
926
|
-
deletePaymentConfigBankTransferResponseSchema,
|
|
927
|
-
deletePaymentConfigCashInputSchema,
|
|
928
|
-
deletePaymentConfigCashResponseSchema,
|
|
929
|
-
deletePaymentConfigCreditCardInputSchema,
|
|
930
|
-
deletePaymentConfigCreditCardResponseSchema,
|
|
931
|
-
deletePaymentConfigInputSchema,
|
|
932
|
-
deletePaymentConfigResponseSchema,
|
|
933
|
-
deletePaymentConfigStripeInputSchema,
|
|
934
|
-
deletePaymentConfigStripeResponseSchema,
|
|
935
|
-
deletePaymentInputSchema,
|
|
936
|
-
deletePaymentResponseSchema,
|
|
937
|
-
getPaymentConfigBankTransferDetailsInputSchema,
|
|
938
|
-
getPaymentConfigBankTransferDetailsResponseSchema,
|
|
939
|
-
getPaymentConfigBankTransferListInputSchema,
|
|
940
|
-
getPaymentConfigBankTransferListResponseSchema,
|
|
941
|
-
getPaymentConfigCashDetailsInputSchema,
|
|
942
|
-
getPaymentConfigCashDetailsResponseSchema,
|
|
943
|
-
getPaymentConfigCashListInputSchema,
|
|
944
|
-
getPaymentConfigCashListResponseSchema,
|
|
945
|
-
getPaymentConfigCreditCardDetailsInputSchema,
|
|
946
|
-
getPaymentConfigCreditCardDetailsResponseSchema,
|
|
947
|
-
getPaymentConfigCreditCardListInputSchema,
|
|
948
|
-
getPaymentConfigCreditCardListResponseSchema,
|
|
949
|
-
getPaymentConfigDetailsInputSchema,
|
|
950
|
-
getPaymentConfigDetailsResponseSchema,
|
|
951
|
-
getPaymentConfigStripeDetailsInputSchema,
|
|
952
|
-
getPaymentConfigStripeDetailsResponseSchema,
|
|
953
|
-
getPaymentConfigStripeListInputSchema,
|
|
954
|
-
getPaymentConfigStripeListResponseSchema,
|
|
955
|
-
getPaymentConfigsInputSchema,
|
|
956
|
-
getPaymentConfigsResponseSchema,
|
|
957
|
-
getPaymentDetailsInputSchema,
|
|
958
|
-
getPaymentDetailsResponseSchema,
|
|
959
|
-
getPaymentsForPaymentConfigInputSchema,
|
|
960
|
-
getPaymentsForPaymentConfigResponseSchema,
|
|
961
|
-
getPaymentsInputSchema,
|
|
962
|
-
getPaymentsResponseSchema,
|
|
963
|
-
paymentConfigBankTransferDetailsSchema,
|
|
964
|
-
paymentConfigBankTransferNullablePathSchema,
|
|
965
|
-
paymentConfigBankTransferPathSchema,
|
|
966
|
-
paymentConfigBankTransferSchema,
|
|
967
|
-
paymentConfigBaseSchema,
|
|
968
|
-
paymentConfigCashDetailsSchema,
|
|
969
|
-
paymentConfigCashNullablePathSchema,
|
|
970
|
-
paymentConfigCashPathSchema,
|
|
971
|
-
paymentConfigCashSchema,
|
|
972
|
-
paymentConfigCreditCardDetailsSchema,
|
|
973
|
-
paymentConfigCreditCardNullablePathSchema,
|
|
974
|
-
paymentConfigCreditCardPathSchema,
|
|
975
|
-
paymentConfigCreditCardSchema,
|
|
976
|
-
paymentConfigDetailsFieldsSchema,
|
|
977
|
-
paymentConfigDetailsSchema,
|
|
978
|
-
paymentConfigNullablePathSchema,
|
|
979
|
-
paymentConfigPathSchema,
|
|
980
|
-
paymentConfigSchema,
|
|
981
|
-
paymentConfigStripeDetailsSchema,
|
|
982
|
-
paymentConfigStripeNullablePathSchema,
|
|
983
|
-
paymentConfigStripePathSchema,
|
|
984
|
-
paymentConfigStripeSchema,
|
|
985
|
-
paymentConfigsQuerySchema,
|
|
986
|
-
paymentDetailsSchema,
|
|
987
|
-
paymentMethodSchema,
|
|
988
|
-
paymentMethods,
|
|
989
|
-
paymentNullablePathSchema,
|
|
990
|
-
paymentPathSchema,
|
|
991
|
-
paymentQuerySchema,
|
|
992
|
-
paymentSchema,
|
|
993
|
-
paymentStatusSchema,
|
|
994
|
-
paymentStatuses,
|
|
995
|
-
updatePaymentConfigBankTransferInputSchema,
|
|
996
|
-
updatePaymentConfigBankTransferResponseSchema,
|
|
997
|
-
updatePaymentConfigStripeInputSchema,
|
|
998
|
-
updatePaymentConfigStripeResponseSchema,
|
|
999
|
-
updatePaymentInputSchema,
|
|
1000
|
-
updatePaymentResponseSchema,
|
|
1001
|
-
writablePaymentConfigBankTransferSchema,
|
|
1002
|
-
writablePaymentConfigCashSchema,
|
|
1003
|
-
writablePaymentConfigCreditCardSchema,
|
|
1004
|
-
writablePaymentConfigStripeSchema,
|
|
1005
|
-
writablePaymentSchema
|
|
1006
|
-
};
|