@marcohefti/request-network-api-client 0.5.12 → 0.6.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 +2 -2
- package/dist/cjs/domains/currencies/v1/index.js +288 -0
- package/dist/cjs/domains/currencies/v1/index.js.map +1 -0
- package/dist/cjs/domains/pay/index.js +251 -0
- package/dist/cjs/domains/pay/index.js.map +1 -0
- package/dist/cjs/domains/pay/v1/index.js +241 -0
- package/dist/cjs/domains/pay/v1/index.js.map +1 -0
- package/dist/cjs/domains/payer/v1/index.js +355 -0
- package/dist/cjs/domains/payer/v1/index.js.map +1 -0
- package/dist/cjs/domains/payer/v2/index.js +355 -0
- package/dist/cjs/domains/payer/v2/index.js.map +1 -0
- package/dist/cjs/domains/payments/index.js +274 -0
- package/dist/cjs/domains/payments/index.js.map +1 -0
- package/dist/cjs/domains/requests/index.js +38 -10
- package/dist/cjs/domains/requests/index.js.map +1 -1
- package/dist/cjs/domains/requests/v1/index.js +499 -0
- package/dist/cjs/domains/requests/v1/index.js.map +1 -0
- package/dist/cjs/domains/secure-payments/index.js +248 -0
- package/dist/cjs/domains/secure-payments/index.js.map +1 -0
- package/dist/cjs/index.js +234 -242
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/{index-DJGHELE1.d.mts → currencies.v1.facade-ROQlpyCp.d.mts} +2 -34
- package/dist/esm/domains/client-ids/index.d.mts +2 -2
- package/dist/esm/domains/currencies/index.d.mts +3 -2
- package/dist/esm/domains/currencies/v1/index.d.mts +3 -0
- package/dist/esm/domains/currencies/v1/index.js +286 -0
- package/dist/esm/domains/currencies/v1/index.js.map +1 -0
- package/dist/esm/domains/pay/index.d.mts +3 -0
- package/dist/esm/domains/pay/index.js +248 -0
- package/dist/esm/domains/pay/index.js.map +1 -0
- package/dist/esm/domains/pay/v1/index.d.mts +2 -0
- package/dist/esm/domains/pay/v1/index.js +239 -0
- package/dist/esm/domains/pay/v1/index.js.map +1 -0
- package/dist/esm/domains/payer/index.d.mts +4 -2
- package/dist/esm/domains/payer/v1/index.d.mts +2 -0
- package/dist/esm/domains/payer/v1/index.js +353 -0
- package/dist/esm/domains/payer/v1/index.js.map +1 -0
- package/dist/esm/domains/payer/v2/index.d.mts +2 -0
- package/dist/esm/domains/payer/v2/index.js +353 -0
- package/dist/esm/domains/payer/v2/index.js.map +1 -0
- package/dist/esm/domains/payments/index.d.mts +3 -0
- package/dist/esm/domains/payments/index.js +272 -0
- package/dist/esm/domains/payments/index.js.map +1 -0
- package/dist/esm/domains/payouts/index.d.mts +2 -2
- package/dist/esm/domains/requests/index.d.mts +3 -2
- package/dist/esm/domains/requests/index.js +38 -10
- package/dist/esm/domains/requests/index.js.map +1 -1
- package/dist/esm/domains/requests/v1/index.d.mts +3 -0
- package/dist/esm/domains/requests/v1/index.js +497 -0
- package/dist/esm/domains/requests/v1/index.js.map +1 -0
- package/dist/esm/domains/secure-payments/index.d.mts +2 -0
- package/dist/esm/domains/secure-payments/index.js +246 -0
- package/dist/esm/domains/secure-payments/index.js.map +1 -0
- package/dist/esm/index-4zmukpkJ.d.mts +12 -0
- package/dist/esm/index-BPikysYP.d.mts +10 -0
- package/dist/esm/index-BlEg0bI1.d.mts +25 -0
- package/dist/esm/{index-hYoC2ndH.d.mts → index-CBcZqEQp.d.mts} +1 -1
- package/dist/esm/index-CS9UrTd6.d.mts +10 -0
- package/dist/esm/index-CeMw0yOZ.d.mts +3393 -0
- package/dist/esm/index-DPVFRK3h.d.mts +36 -0
- package/dist/esm/{index-DbnV_D6L.d.mts → index-DPx06HBi.d.mts} +18 -58
- package/dist/esm/index-DZ0iw_Xz.d.mts +10 -0
- package/dist/esm/index-DpFThmL3.d.mts +57 -0
- package/dist/esm/{index-y1nxa55y.d.mts → index-DuMayMNI.d.mts} +1 -1
- package/dist/esm/index-Kx46FKbk.d.mts +38 -0
- package/dist/esm/index-srhKdWh7.d.mts +21 -0
- package/dist/esm/index.d.mts +31 -3520
- package/dist/esm/index.js +234 -242
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/{openapi-types-CQ1z27_K.d.mts → openapi-types-JhYQOcil.d.mts} +252 -117
- package/dist/esm/pay.v1.facade-wxvuDX9t.d.mts +17 -0
- package/dist/esm/payer.v1.facade-Rcl1BBPl.d.mts +31 -0
- package/dist/esm/payer.v2.facade-BqcIOIBY.d.mts +31 -0
- package/dist/esm/request.helpers-DgzNANMt.d.mts +51 -0
- package/package.json +6 -6
- package/dist/cjs/domains/payee-destination/index.js +0 -276
- package/dist/cjs/domains/payee-destination/index.js.map +0 -1
- package/dist/esm/domains/payee-destination/index.d.mts +0 -2
- package/dist/esm/domains/payee-destination/index.js +0 -274
- package/dist/esm/domains/payee-destination/index.js.map +0 -1
- package/dist/esm/index-DJjp2Jbk.d.mts +0 -79
- package/dist/esm/index-DQIf9k5x.d.mts +0 -31
|
@@ -0,0 +1,499 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var zod = require('zod');
|
|
4
|
+
|
|
5
|
+
// src/core/http/validation.config.ts
|
|
6
|
+
function normaliseBoolean(flag, fallback) {
|
|
7
|
+
return typeof flag === "boolean" ? flag : fallback;
|
|
8
|
+
}
|
|
9
|
+
function mergeRuntimeValidation(base, override) {
|
|
10
|
+
if (override === void 0) {
|
|
11
|
+
return base;
|
|
12
|
+
}
|
|
13
|
+
if (typeof override === "boolean") {
|
|
14
|
+
return {
|
|
15
|
+
requests: override,
|
|
16
|
+
responses: override,
|
|
17
|
+
errors: override
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
requests: normaliseBoolean(override.requests, base.requests),
|
|
22
|
+
responses: normaliseBoolean(override.responses, base.responses),
|
|
23
|
+
errors: normaliseBoolean(override.errors, base.errors)
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// src/validation/schema.registry.ts
|
|
28
|
+
function serialiseKey(key) {
|
|
29
|
+
const variant = key.variant ?? "default";
|
|
30
|
+
const status = key.status?.toString() ?? "any";
|
|
31
|
+
return `${key.operationId}|${key.kind}|${variant}|${status}`;
|
|
32
|
+
}
|
|
33
|
+
var SchemaRegistry = class {
|
|
34
|
+
store = /* @__PURE__ */ new Map();
|
|
35
|
+
register(entry) {
|
|
36
|
+
const id = serialiseKey(entry.key);
|
|
37
|
+
this.store.set(id, entry);
|
|
38
|
+
}
|
|
39
|
+
get(key) {
|
|
40
|
+
const id = serialiseKey(key);
|
|
41
|
+
return this.store.get(id)?.schema;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Removes every registered schema — primarily useful in tests.
|
|
45
|
+
*/
|
|
46
|
+
clear() {
|
|
47
|
+
this.store.clear();
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
var schemaRegistry = new SchemaRegistry();
|
|
51
|
+
|
|
52
|
+
// src/validation/zod.helpers.ts
|
|
53
|
+
var ValidationError = class extends Error {
|
|
54
|
+
constructor(message, cause) {
|
|
55
|
+
super(message, { cause });
|
|
56
|
+
this.cause = cause;
|
|
57
|
+
this.name = "ClientValidationError";
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
function parseWithSchema(options) {
|
|
61
|
+
const { schema, value, description } = options;
|
|
62
|
+
const outcome = schema.safeParse(value);
|
|
63
|
+
if (outcome.success) {
|
|
64
|
+
return { success: true, data: outcome.data };
|
|
65
|
+
}
|
|
66
|
+
const error = new ValidationError(description ?? "Validation failed", outcome.error);
|
|
67
|
+
return { success: false, error };
|
|
68
|
+
}
|
|
69
|
+
function parseWithRegistry(options) {
|
|
70
|
+
const schema = schemaRegistry.get(options.key);
|
|
71
|
+
if (!schema) {
|
|
72
|
+
if (options.skipOnMissingSchema) {
|
|
73
|
+
return { success: true, data: options.value };
|
|
74
|
+
}
|
|
75
|
+
return { success: false, error: new ValidationError(`No schema registered for ${options.key.operationId}`) };
|
|
76
|
+
}
|
|
77
|
+
return parseWithSchema({ schema, value: options.value, description: options.description });
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// src/core/http/operation.helper.ts
|
|
81
|
+
async function requestJson(http, params) {
|
|
82
|
+
const {
|
|
83
|
+
operationId,
|
|
84
|
+
method,
|
|
85
|
+
path,
|
|
86
|
+
query,
|
|
87
|
+
body,
|
|
88
|
+
schemaKey,
|
|
89
|
+
requestSchemaKey,
|
|
90
|
+
description,
|
|
91
|
+
querySerializer,
|
|
92
|
+
signal,
|
|
93
|
+
timeoutMs,
|
|
94
|
+
validation,
|
|
95
|
+
meta
|
|
96
|
+
} = params;
|
|
97
|
+
const runtimeValidation = mergeRuntimeValidation(http.getRuntimeValidationConfig(), validation);
|
|
98
|
+
let requestBody = body;
|
|
99
|
+
if (runtimeValidation.requests && requestSchemaKey && body !== void 0) {
|
|
100
|
+
const parsedRequest = parseWithRegistry({
|
|
101
|
+
key: requestSchemaKey,
|
|
102
|
+
value: body,
|
|
103
|
+
description: `${description ?? operationId} request`,
|
|
104
|
+
skipOnMissingSchema: true
|
|
105
|
+
});
|
|
106
|
+
if (!parsedRequest.success) {
|
|
107
|
+
throw parsedRequest.error;
|
|
108
|
+
}
|
|
109
|
+
requestBody = parsedRequest.data;
|
|
110
|
+
}
|
|
111
|
+
const metaValidation = validation ?? meta?.validation;
|
|
112
|
+
const requestMeta = {
|
|
113
|
+
...meta ?? {},
|
|
114
|
+
operationId,
|
|
115
|
+
validation: metaValidation
|
|
116
|
+
};
|
|
117
|
+
const res = await http.request({
|
|
118
|
+
method,
|
|
119
|
+
path,
|
|
120
|
+
query,
|
|
121
|
+
body: requestBody,
|
|
122
|
+
querySerializer,
|
|
123
|
+
signal,
|
|
124
|
+
timeoutMs,
|
|
125
|
+
meta: requestMeta
|
|
126
|
+
});
|
|
127
|
+
if (!runtimeValidation.responses) {
|
|
128
|
+
return res.data;
|
|
129
|
+
}
|
|
130
|
+
const parsedResponse = parseWithRegistry({ key: schemaKey, value: res.data, description });
|
|
131
|
+
if (!parsedResponse.success) throw parsedResponse.error;
|
|
132
|
+
return parsedResponse.data;
|
|
133
|
+
}
|
|
134
|
+
async function requestVoid(http, params) {
|
|
135
|
+
const { operationId, method, path, query, body, querySerializer, signal, timeoutMs, requestSchemaKey, validation, meta } = params;
|
|
136
|
+
const runtimeValidation = mergeRuntimeValidation(http.getRuntimeValidationConfig(), validation);
|
|
137
|
+
let requestBody = body;
|
|
138
|
+
if (runtimeValidation.requests && requestSchemaKey && body !== void 0) {
|
|
139
|
+
const parsedRequest = parseWithRegistry({
|
|
140
|
+
key: requestSchemaKey,
|
|
141
|
+
value: body,
|
|
142
|
+
description: `${operationId} request`,
|
|
143
|
+
skipOnMissingSchema: true
|
|
144
|
+
});
|
|
145
|
+
if (!parsedRequest.success) {
|
|
146
|
+
throw parsedRequest.error;
|
|
147
|
+
}
|
|
148
|
+
requestBody = parsedRequest.data;
|
|
149
|
+
}
|
|
150
|
+
const metaValidation = validation ?? meta?.validation;
|
|
151
|
+
const requestMeta = {
|
|
152
|
+
...meta ?? {},
|
|
153
|
+
operationId,
|
|
154
|
+
validation: metaValidation
|
|
155
|
+
};
|
|
156
|
+
await http.request({
|
|
157
|
+
method,
|
|
158
|
+
path,
|
|
159
|
+
query,
|
|
160
|
+
body: requestBody,
|
|
161
|
+
querySerializer,
|
|
162
|
+
signal,
|
|
163
|
+
timeoutMs,
|
|
164
|
+
meta: requestMeta
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// src/domains/requests/request.helpers.ts
|
|
169
|
+
function buildRequestQuery(input) {
|
|
170
|
+
if (!input) return void 0;
|
|
171
|
+
const entries = Object.entries(input).filter(([, value]) => value !== void 0);
|
|
172
|
+
if (entries.length === 0) return void 0;
|
|
173
|
+
return Object.fromEntries(entries);
|
|
174
|
+
}
|
|
175
|
+
function normalizeReference(value) {
|
|
176
|
+
if (value === void 0) return void 0;
|
|
177
|
+
return value;
|
|
178
|
+
}
|
|
179
|
+
function normalizeCustomerInfo(value) {
|
|
180
|
+
if (value === void 0) return void 0;
|
|
181
|
+
if (value === null) return null;
|
|
182
|
+
return {
|
|
183
|
+
firstName: value.firstName ?? void 0,
|
|
184
|
+
lastName: value.lastName ?? void 0,
|
|
185
|
+
email: value.email ?? void 0,
|
|
186
|
+
address: value.address ? {
|
|
187
|
+
street: value.address.street ?? void 0,
|
|
188
|
+
city: value.address.city ?? void 0,
|
|
189
|
+
state: value.address.state ?? void 0,
|
|
190
|
+
postalCode: value.address.postalCode ?? void 0,
|
|
191
|
+
country: value.address.country ?? void 0
|
|
192
|
+
} : void 0
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
function normalizePayments(payments) {
|
|
196
|
+
if (!payments) return void 0;
|
|
197
|
+
return payments.map((payment) => ({ ...payment }));
|
|
198
|
+
}
|
|
199
|
+
function buildStatusBase(raw, overrides) {
|
|
200
|
+
return {
|
|
201
|
+
paymentReference: raw.paymentReference ?? void 0,
|
|
202
|
+
requestId: raw.requestId ?? void 0,
|
|
203
|
+
isListening: "isListening" in raw ? raw.isListening ?? void 0 : void 0,
|
|
204
|
+
txHash: raw.txHash ?? null,
|
|
205
|
+
hasBeenPaid: raw.hasBeenPaid ?? false,
|
|
206
|
+
status: "status" in raw ? raw.status ?? void 0 : void 0,
|
|
207
|
+
recurrence: "recurrence" in raw ? raw.recurrence : void 0,
|
|
208
|
+
originalRequestId: "originalRequestId" in raw ? raw.originalRequestId ?? void 0 : void 0,
|
|
209
|
+
originalRequestPaymentReference: "originalRequestPaymentReference" in raw ? raw.originalRequestPaymentReference ?? void 0 : void 0,
|
|
210
|
+
isRecurrenceStopped: "isRecurrenceStopped" in raw ? raw.isRecurrenceStopped ?? void 0 : void 0,
|
|
211
|
+
isCryptoToFiatAvailable: "isCryptoToFiatAvailable" in raw ? raw.isCryptoToFiatAvailable ?? void 0 : void 0,
|
|
212
|
+
payments: "payments" in raw ? normalizePayments(raw.payments) : void 0,
|
|
213
|
+
customerInfo: "customerInfo" in raw ? normalizeCustomerInfo(
|
|
214
|
+
raw.customerInfo
|
|
215
|
+
) : void 0,
|
|
216
|
+
reference: "reference" in raw ? normalizeReference(raw.reference ?? null) : void 0,
|
|
217
|
+
...overrides
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
function normalizeLegacyStatusResponse(raw) {
|
|
221
|
+
if (raw.hasBeenPaid) {
|
|
222
|
+
return {
|
|
223
|
+
kind: "paid",
|
|
224
|
+
...buildStatusBase(raw, { hasBeenPaid: true }),
|
|
225
|
+
hasBeenPaid: true
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
return {
|
|
229
|
+
kind: "pending",
|
|
230
|
+
...buildStatusBase(raw, { hasBeenPaid: false }),
|
|
231
|
+
hasBeenPaid: false
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// src/domains/requests/v1/requests.v1.facade.ts
|
|
236
|
+
var OP_CREATE = "RequestControllerV1_createRequest_v1";
|
|
237
|
+
var OP_PAYMENT_ROUTES = "RequestControllerV1_getRequestPaymentRoutes_v1";
|
|
238
|
+
var OP_PAYMENT_CALLDATA = "RequestControllerV1_getPaymentCalldata_v1";
|
|
239
|
+
var OP_REQUEST_STATUS = "RequestControllerV1_getRequestStatus_v1";
|
|
240
|
+
var OP_SEND_PAYMENT_INTENT = "RequestControllerV1_sendPaymentIntent_v1";
|
|
241
|
+
var OP_STOP_RECURRENCE = "RequestControllerV1_stopRecurrenceRequest_v1";
|
|
242
|
+
var KIND_CALLDATA = "calldata";
|
|
243
|
+
var KIND_PAYMENT_INTENT = "paymentIntent";
|
|
244
|
+
function isPaymentIntentPayload(payload) {
|
|
245
|
+
return "paymentIntentId" in payload;
|
|
246
|
+
}
|
|
247
|
+
function isCalldataPayload(payload) {
|
|
248
|
+
return "transactions" in payload;
|
|
249
|
+
}
|
|
250
|
+
function createRequestsV1Api(http) {
|
|
251
|
+
return {
|
|
252
|
+
async create(body, options) {
|
|
253
|
+
return requestJson(http, {
|
|
254
|
+
operationId: OP_CREATE,
|
|
255
|
+
method: "POST",
|
|
256
|
+
path: "/v1/request",
|
|
257
|
+
body,
|
|
258
|
+
requestSchemaKey: { operationId: OP_CREATE, kind: "request", variant: "application/json" },
|
|
259
|
+
schemaKey: { operationId: OP_CREATE, kind: "response", status: 201 },
|
|
260
|
+
description: "Create legacy request",
|
|
261
|
+
signal: options?.signal,
|
|
262
|
+
timeoutMs: options?.timeoutMs,
|
|
263
|
+
validation: options?.validation,
|
|
264
|
+
meta: options?.meta
|
|
265
|
+
});
|
|
266
|
+
},
|
|
267
|
+
async getPaymentRoutes(paymentReference, options) {
|
|
268
|
+
const path = `/v1/request/${encodeURIComponent(paymentReference)}/routes`;
|
|
269
|
+
return requestJson(http, {
|
|
270
|
+
operationId: OP_PAYMENT_ROUTES,
|
|
271
|
+
method: "GET",
|
|
272
|
+
path,
|
|
273
|
+
query: buildRequestQuery({
|
|
274
|
+
wallet: options.wallet,
|
|
275
|
+
amount: options.amount,
|
|
276
|
+
feePercentage: options.feePercentage,
|
|
277
|
+
feeAddress: options.feeAddress
|
|
278
|
+
}),
|
|
279
|
+
schemaKey: { operationId: OP_PAYMENT_ROUTES, kind: "response", status: 200 },
|
|
280
|
+
description: "Legacy payment routes",
|
|
281
|
+
signal: options.signal,
|
|
282
|
+
timeoutMs: options.timeoutMs,
|
|
283
|
+
validation: options.validation,
|
|
284
|
+
meta: options.meta
|
|
285
|
+
});
|
|
286
|
+
},
|
|
287
|
+
async getPaymentCalldata(paymentReference, options) {
|
|
288
|
+
const path = `/v1/request/${encodeURIComponent(paymentReference)}/pay`;
|
|
289
|
+
const query = buildRequestQuery({
|
|
290
|
+
wallet: options?.wallet,
|
|
291
|
+
chain: options?.chain,
|
|
292
|
+
token: options?.token,
|
|
293
|
+
amount: options?.amount
|
|
294
|
+
});
|
|
295
|
+
const raw = await requestJson(http, {
|
|
296
|
+
operationId: OP_PAYMENT_CALLDATA,
|
|
297
|
+
method: "GET",
|
|
298
|
+
path,
|
|
299
|
+
query,
|
|
300
|
+
schemaKey: { operationId: OP_PAYMENT_CALLDATA, kind: "response", status: 200 },
|
|
301
|
+
description: "Legacy payment calldata",
|
|
302
|
+
signal: options?.signal,
|
|
303
|
+
timeoutMs: options?.timeoutMs,
|
|
304
|
+
validation: options?.validation,
|
|
305
|
+
meta: options?.meta
|
|
306
|
+
});
|
|
307
|
+
if (isCalldataPayload(raw)) {
|
|
308
|
+
return { kind: KIND_CALLDATA, ...raw };
|
|
309
|
+
}
|
|
310
|
+
if (isPaymentIntentPayload(raw)) {
|
|
311
|
+
return { kind: KIND_PAYMENT_INTENT, ...raw };
|
|
312
|
+
}
|
|
313
|
+
throw new ValidationError("Unexpected payment calldata response", raw);
|
|
314
|
+
},
|
|
315
|
+
async getRequestStatus(paymentReference, options) {
|
|
316
|
+
const path = `/v1/request/${encodeURIComponent(paymentReference)}`;
|
|
317
|
+
const rawStatus = await requestJson(http, {
|
|
318
|
+
operationId: OP_REQUEST_STATUS,
|
|
319
|
+
method: "GET",
|
|
320
|
+
path,
|
|
321
|
+
schemaKey: { operationId: OP_REQUEST_STATUS, kind: "response", status: 200 },
|
|
322
|
+
description: "Legacy request status",
|
|
323
|
+
signal: options?.signal,
|
|
324
|
+
timeoutMs: options?.timeoutMs,
|
|
325
|
+
validation: options?.validation,
|
|
326
|
+
meta: options?.meta
|
|
327
|
+
});
|
|
328
|
+
return normalizeLegacyStatusResponse(rawStatus);
|
|
329
|
+
},
|
|
330
|
+
async sendPaymentIntent(paymentIntentId, body, options) {
|
|
331
|
+
const path = `/v1/request/${encodeURIComponent(paymentIntentId)}/send`;
|
|
332
|
+
await requestVoid(http, {
|
|
333
|
+
operationId: OP_SEND_PAYMENT_INTENT,
|
|
334
|
+
method: "POST",
|
|
335
|
+
path,
|
|
336
|
+
body,
|
|
337
|
+
requestSchemaKey: { operationId: OP_SEND_PAYMENT_INTENT, kind: "request", variant: "application/json" },
|
|
338
|
+
signal: options?.signal,
|
|
339
|
+
timeoutMs: options?.timeoutMs,
|
|
340
|
+
validation: options?.validation,
|
|
341
|
+
meta: options?.meta
|
|
342
|
+
});
|
|
343
|
+
},
|
|
344
|
+
async stopRecurrence(paymentReference, options) {
|
|
345
|
+
const path = `/v1/request/${encodeURIComponent(paymentReference)}/stop-recurrence`;
|
|
346
|
+
await requestVoid(http, {
|
|
347
|
+
operationId: OP_STOP_RECURRENCE,
|
|
348
|
+
method: "PATCH",
|
|
349
|
+
path,
|
|
350
|
+
signal: options?.signal,
|
|
351
|
+
timeoutMs: options?.timeoutMs,
|
|
352
|
+
validation: options?.validation,
|
|
353
|
+
meta: options?.meta
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
var ErrorDetailSchema = zod.z.object({
|
|
359
|
+
message: zod.z.string(),
|
|
360
|
+
code: zod.z.string().optional(),
|
|
361
|
+
field: zod.z.string().optional(),
|
|
362
|
+
source: zod.z.object({
|
|
363
|
+
pointer: zod.z.string().optional(),
|
|
364
|
+
parameter: zod.z.string().optional()
|
|
365
|
+
}).passthrough().optional(),
|
|
366
|
+
meta: zod.z.record(zod.z.unknown()).optional()
|
|
367
|
+
}).passthrough();
|
|
368
|
+
var ErrorEnvelopeSchema = zod.z.object({
|
|
369
|
+
status: zod.z.number().optional(),
|
|
370
|
+
statusCode: zod.z.number().optional(),
|
|
371
|
+
code: zod.z.string().optional(),
|
|
372
|
+
error: zod.z.string().optional(),
|
|
373
|
+
message: zod.z.union([
|
|
374
|
+
zod.z.string(),
|
|
375
|
+
zod.z.array(zod.z.union([zod.z.string(), ErrorDetailSchema])),
|
|
376
|
+
ErrorDetailSchema
|
|
377
|
+
]).optional(),
|
|
378
|
+
detail: zod.z.unknown().optional(),
|
|
379
|
+
errors: zod.z.array(ErrorDetailSchema).optional(),
|
|
380
|
+
requestId: zod.z.string().optional(),
|
|
381
|
+
correlationId: zod.z.string().optional(),
|
|
382
|
+
retryAfter: zod.z.union([zod.z.number(), zod.z.string()]).optional(),
|
|
383
|
+
retryAfterMs: zod.z.number().optional(),
|
|
384
|
+
meta: zod.z.record(zod.z.unknown()).optional()
|
|
385
|
+
}).passthrough();
|
|
386
|
+
var RequestControllerV1_createRequest_v1_Request = zod.z.object({ "payer": zod.z.string().optional(), "payee": zod.z.string(), "amount": zod.z.string(), "invoiceCurrency": zod.z.string(), "paymentCurrency": zod.z.string(), "recurrence": zod.z.object({ "startDate": zod.z.string(), "frequency": zod.z.enum(["DAILY", "WEEKLY", "MONTHLY", "YEARLY"]) }).passthrough().optional() }).passthrough();
|
|
387
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV1_createRequest_v1", kind: "request", variant: "application/json" }, schema: RequestControllerV1_createRequest_v1_Request });
|
|
388
|
+
var RequestControllerV1_createRequest_v1_201 = zod.z.object({ "paymentReference": zod.z.string().optional(), "requestID": zod.z.string().optional() }).passthrough();
|
|
389
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV1_createRequest_v1", kind: "response", status: 201 }, schema: RequestControllerV1_createRequest_v1_201 });
|
|
390
|
+
var RequestControllerV1_createRequest_v1_400 = ErrorEnvelopeSchema;
|
|
391
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV1_createRequest_v1", kind: "response", status: 400 }, schema: RequestControllerV1_createRequest_v1_400 });
|
|
392
|
+
var RequestControllerV1_createRequest_v1_401 = ErrorEnvelopeSchema;
|
|
393
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV1_createRequest_v1", kind: "response", status: 401 }, schema: RequestControllerV1_createRequest_v1_401 });
|
|
394
|
+
var RequestControllerV1_createRequest_v1_404 = ErrorEnvelopeSchema;
|
|
395
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV1_createRequest_v1", kind: "response", status: 404 }, schema: RequestControllerV1_createRequest_v1_404 });
|
|
396
|
+
var RequestControllerV1_createRequest_v1_429 = ErrorEnvelopeSchema;
|
|
397
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV1_createRequest_v1", kind: "response", status: 429 }, schema: RequestControllerV1_createRequest_v1_429 });
|
|
398
|
+
var RequestControllerV1_getRequestStatus_v1_200 = zod.z.object({ "hasBeenPaid": zod.z.boolean().optional(), "paymentReference": zod.z.string().optional(), "requestId": zod.z.string().optional(), "isListening": zod.z.boolean().optional(), "txHash": zod.z.string().nullable().optional() }).passthrough();
|
|
399
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV1_getRequestStatus_v1", kind: "response", status: 200 }, schema: RequestControllerV1_getRequestStatus_v1_200 });
|
|
400
|
+
var RequestControllerV1_getRequestStatus_v1_401 = ErrorEnvelopeSchema;
|
|
401
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV1_getRequestStatus_v1", kind: "response", status: 401 }, schema: RequestControllerV1_getRequestStatus_v1_401 });
|
|
402
|
+
var RequestControllerV1_getRequestStatus_v1_404 = ErrorEnvelopeSchema;
|
|
403
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV1_getRequestStatus_v1", kind: "response", status: 404 }, schema: RequestControllerV1_getRequestStatus_v1_404 });
|
|
404
|
+
var RequestControllerV1_getRequestStatus_v1_429 = ErrorEnvelopeSchema;
|
|
405
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV1_getRequestStatus_v1", kind: "response", status: 429 }, schema: RequestControllerV1_getRequestStatus_v1_429 });
|
|
406
|
+
var RequestControllerV1_stopRecurrenceRequest_v1_200 = zod.z.unknown();
|
|
407
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV1_stopRecurrenceRequest_v1", kind: "response", status: 200 }, schema: RequestControllerV1_stopRecurrenceRequest_v1_200 });
|
|
408
|
+
var RequestControllerV1_stopRecurrenceRequest_v1_401 = ErrorEnvelopeSchema;
|
|
409
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV1_stopRecurrenceRequest_v1", kind: "response", status: 401 }, schema: RequestControllerV1_stopRecurrenceRequest_v1_401 });
|
|
410
|
+
var RequestControllerV1_stopRecurrenceRequest_v1_404 = ErrorEnvelopeSchema;
|
|
411
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV1_stopRecurrenceRequest_v1", kind: "response", status: 404 }, schema: RequestControllerV1_stopRecurrenceRequest_v1_404 });
|
|
412
|
+
var RequestControllerV1_stopRecurrenceRequest_v1_429 = ErrorEnvelopeSchema;
|
|
413
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV1_stopRecurrenceRequest_v1", kind: "response", status: 429 }, schema: RequestControllerV1_stopRecurrenceRequest_v1_429 });
|
|
414
|
+
var RequestControllerV1_getPaymentCalldata_v1_200 = zod.z.union([zod.z.object({ "transactions": zod.z.array(zod.z.object({ "data": zod.z.string(), "to": zod.z.string(), "value": zod.z.object({ "type": zod.z.enum(["BigNumber"]).optional(), "hex": zod.z.string().optional() }).passthrough() }).passthrough()), "metadata": zod.z.object({ "stepsRequired": zod.z.number(), "needsApproval": zod.z.boolean(), "approvalTransactionIndex": zod.z.number().nullable().optional(), "hasEnoughBalance": zod.z.boolean(), "hasEnoughGas": zod.z.boolean() }).passthrough() }).passthrough(), zod.z.object({ "paymentIntentId": zod.z.string(), "paymentIntent": zod.z.string(), "approvalPermitPayload": zod.z.string().nullable().optional(), "approvalCalldata": zod.z.object({ "to": zod.z.string().optional(), "data": zod.z.string().optional(), "value": zod.z.string().optional() }).passthrough().nullable().optional(), "metadata": zod.z.object({ "supportsEIP2612": zod.z.boolean() }).passthrough() }).passthrough()]);
|
|
415
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV1_getPaymentCalldata_v1", kind: "response", status: 200 }, schema: RequestControllerV1_getPaymentCalldata_v1_200 });
|
|
416
|
+
var RequestControllerV1_getPaymentCalldata_v1_400 = ErrorEnvelopeSchema;
|
|
417
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV1_getPaymentCalldata_v1", kind: "response", status: 400 }, schema: RequestControllerV1_getPaymentCalldata_v1_400 });
|
|
418
|
+
var RequestControllerV1_getPaymentCalldata_v1_401 = ErrorEnvelopeSchema;
|
|
419
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV1_getPaymentCalldata_v1", kind: "response", status: 401 }, schema: RequestControllerV1_getPaymentCalldata_v1_401 });
|
|
420
|
+
var RequestControllerV1_getPaymentCalldata_v1_404 = ErrorEnvelopeSchema;
|
|
421
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV1_getPaymentCalldata_v1", kind: "response", status: 404 }, schema: RequestControllerV1_getPaymentCalldata_v1_404 });
|
|
422
|
+
var RequestControllerV1_getPaymentCalldata_v1_429 = ErrorEnvelopeSchema;
|
|
423
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV1_getPaymentCalldata_v1", kind: "response", status: 429 }, schema: RequestControllerV1_getPaymentCalldata_v1_429 });
|
|
424
|
+
var RequestControllerV1_getRequestPaymentRoutes_v1_200 = zod.z.object({ "routes": zod.z.array(zod.z.object({ "id": zod.z.string(), "fee": zod.z.number(), "feeBreakdown": zod.z.array(zod.z.object({ "type": zod.z.enum(["gas", "platform", "crosschain", "crypto-to-fiat", "offramp", "protocol"]).optional(), "stage": zod.z.enum(["sending", "receiving", "proxying", "refunding", "overall"]).optional(), "provider": zod.z.string().optional(), "amount": zod.z.string().nullable().optional(), "amountInUSD": zod.z.string().nullable().optional(), "currency": zod.z.string().optional(), "receiverAddress": zod.z.string().optional(), "network": zod.z.string().optional(), "rateProvider": zod.z.string().optional() }).passthrough()).optional(), "speed": zod.z.union([zod.z.string(), zod.z.number()]), "price_impact": zod.z.number().optional(), "chain": zod.z.string(), "token": zod.z.string() }).passthrough()) }).passthrough();
|
|
425
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV1_getRequestPaymentRoutes_v1", kind: "response", status: 200 }, schema: RequestControllerV1_getRequestPaymentRoutes_v1_200 });
|
|
426
|
+
var RequestControllerV1_getRequestPaymentRoutes_v1_400 = ErrorEnvelopeSchema;
|
|
427
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV1_getRequestPaymentRoutes_v1", kind: "response", status: 400 }, schema: RequestControllerV1_getRequestPaymentRoutes_v1_400 });
|
|
428
|
+
var RequestControllerV1_getRequestPaymentRoutes_v1_401 = ErrorEnvelopeSchema;
|
|
429
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV1_getRequestPaymentRoutes_v1", kind: "response", status: 401 }, schema: RequestControllerV1_getRequestPaymentRoutes_v1_401 });
|
|
430
|
+
var RequestControllerV1_getRequestPaymentRoutes_v1_404 = ErrorEnvelopeSchema;
|
|
431
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV1_getRequestPaymentRoutes_v1", kind: "response", status: 404 }, schema: RequestControllerV1_getRequestPaymentRoutes_v1_404 });
|
|
432
|
+
var RequestControllerV1_getRequestPaymentRoutes_v1_429 = ErrorEnvelopeSchema;
|
|
433
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV1_getRequestPaymentRoutes_v1", kind: "response", status: 429 }, schema: RequestControllerV1_getRequestPaymentRoutes_v1_429 });
|
|
434
|
+
var RequestControllerV1_sendPaymentIntent_v1_Request = zod.z.object({ "signedPaymentIntent": zod.z.object({ "signature": zod.z.string(), "nonce": zod.z.string(), "deadline": zod.z.string() }).passthrough(), "signedApprovalPermit": zod.z.object({ "signature": zod.z.string(), "nonce": zod.z.string(), "deadline": zod.z.string() }).passthrough().optional() }).passthrough();
|
|
435
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV1_sendPaymentIntent_v1", kind: "request", variant: "application/json" }, schema: RequestControllerV1_sendPaymentIntent_v1_Request });
|
|
436
|
+
var RequestControllerV1_sendPaymentIntent_v1_401 = ErrorEnvelopeSchema;
|
|
437
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV1_sendPaymentIntent_v1", kind: "response", status: 401 }, schema: RequestControllerV1_sendPaymentIntent_v1_401 });
|
|
438
|
+
var RequestControllerV1_sendPaymentIntent_v1_404 = ErrorEnvelopeSchema;
|
|
439
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV1_sendPaymentIntent_v1", kind: "response", status: 404 }, schema: RequestControllerV1_sendPaymentIntent_v1_404 });
|
|
440
|
+
var RequestControllerV1_sendPaymentIntent_v1_429 = ErrorEnvelopeSchema;
|
|
441
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV1_sendPaymentIntent_v1", kind: "response", status: 429 }, schema: RequestControllerV1_sendPaymentIntent_v1_429 });
|
|
442
|
+
var RequestControllerV2_listRequests_v2_200 = zod.z.object({ "requests": zod.z.array(zod.z.object({ "requestId": zod.z.string().optional(), "paymentReference": zod.z.string().optional(), "amount": zod.z.string().nullable().optional(), "invoiceCurrency": zod.z.string().optional(), "paymentCurrency": zod.z.string().optional(), "hasBeenPaid": zod.z.boolean().optional(), "status": zod.z.string().nullable().optional(), "reference": zod.z.string().nullable().optional(), "createdAt": zod.z.string().nullable().optional(), "txHash": zod.z.string().nullable().optional(), "payee": zod.z.string().nullable().optional(), "payer": zod.z.string().nullable().optional() }).passthrough()), "pagination": zod.z.object({ "total": zod.z.number().optional(), "limit": zod.z.number().optional(), "offset": zod.z.number().optional() }).passthrough() }).passthrough();
|
|
443
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV2_listRequests_v2", kind: "response", status: 200 }, schema: RequestControllerV2_listRequests_v2_200 });
|
|
444
|
+
var RequestControllerV2_listRequests_v2_400 = ErrorEnvelopeSchema;
|
|
445
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV2_listRequests_v2", kind: "response", status: 400 }, schema: RequestControllerV2_listRequests_v2_400 });
|
|
446
|
+
var RequestControllerV2_listRequests_v2_429 = ErrorEnvelopeSchema;
|
|
447
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV2_listRequests_v2", kind: "response", status: 429 }, schema: RequestControllerV2_listRequests_v2_429 });
|
|
448
|
+
var RequestControllerV2_createRequest_v2_Request = zod.z.object({ "payer": zod.z.string().optional(), "payee": zod.z.string().optional(), "amount": zod.z.string(), "invoiceCurrency": zod.z.string(), "paymentCurrency": zod.z.string(), "recurrence": zod.z.object({ "startDate": zod.z.string(), "frequency": zod.z.enum(["DAILY", "WEEKLY", "MONTHLY", "YEARLY"]) }).passthrough().optional(), "isCryptoToFiatAvailable": zod.z.boolean().optional(), "customerInfo": zod.z.object({ "firstName": zod.z.string().optional(), "lastName": zod.z.string().optional(), "email": zod.z.string().optional(), "address": zod.z.object({ "street": zod.z.string().optional(), "city": zod.z.string().optional(), "state": zod.z.string().optional(), "postalCode": zod.z.string().optional(), "country": zod.z.string().optional() }).passthrough().optional() }).passthrough().optional(), "reference": zod.z.string().optional(), "originalRequestId": zod.z.string().optional(), "originalRequestPaymentReference": zod.z.string().optional() }).passthrough();
|
|
449
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV2_createRequest_v2", kind: "request", variant: "application/json" }, schema: RequestControllerV2_createRequest_v2_Request });
|
|
450
|
+
var RequestControllerV2_createRequest_v2_201 = zod.z.object({ "paymentReference": zod.z.string().optional(), "requestId": zod.z.string().optional() }).passthrough();
|
|
451
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV2_createRequest_v2", kind: "response", status: 201 }, schema: RequestControllerV2_createRequest_v2_201 });
|
|
452
|
+
var RequestControllerV2_createRequest_v2_400 = ErrorEnvelopeSchema;
|
|
453
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV2_createRequest_v2", kind: "response", status: 400 }, schema: RequestControllerV2_createRequest_v2_400 });
|
|
454
|
+
var RequestControllerV2_createRequest_v2_403 = ErrorEnvelopeSchema;
|
|
455
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV2_createRequest_v2", kind: "response", status: 403 }, schema: RequestControllerV2_createRequest_v2_403 });
|
|
456
|
+
var RequestControllerV2_createRequest_v2_429 = ErrorEnvelopeSchema;
|
|
457
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV2_createRequest_v2", kind: "response", status: 429 }, schema: RequestControllerV2_createRequest_v2_429 });
|
|
458
|
+
var RequestControllerV2_getRequestStatus_v2_200 = zod.z.object({ "hasBeenPaid": zod.z.boolean().optional(), "paymentReference": zod.z.string().optional(), "requestId": zod.z.string().optional(), "payee": zod.z.string().nullable().optional(), "isListening": zod.z.boolean().optional(), "txHash": zod.z.string().nullable().optional(), "recurrence": zod.z.object({}).passthrough().optional(), "originalRequestId": zod.z.string().optional(), "status": zod.z.string().optional(), "isCryptoToFiatAvailable": zod.z.boolean().optional(), "originalRequestPaymentReference": zod.z.string().optional(), "payments": zod.z.array(zod.z.object({}).passthrough()).optional(), "isRecurrenceStopped": zod.z.boolean().optional(), "customerInfo": zod.z.object({ "firstName": zod.z.string().optional(), "lastName": zod.z.string().optional(), "email": zod.z.string().optional(), "address": zod.z.object({ "street": zod.z.string().optional(), "city": zod.z.string().optional(), "state": zod.z.string().optional(), "postalCode": zod.z.string().optional(), "country": zod.z.string().optional() }).passthrough().optional() }).passthrough().nullable().optional(), "reference": zod.z.string().nullable().optional(), "amountInUsd": zod.z.string().nullable().optional(), "conversionRate": zod.z.string().nullable().optional(), "rateSource": zod.z.enum(["lifi", "chainlink", "coingecko", "unknown", "mixed"]).optional(), "conversionBreakdown": zod.z.object({ "paidAmount": zod.z.string().optional(), "paidAmountInUsd": zod.z.string().optional(), "remainingAmount": zod.z.string().optional(), "remainingAmountInUsd": zod.z.string().optional(), "currentMarketRate": zod.z.string().nullable().optional(), "currentMarketRateSource": zod.z.enum(["lifi", "chainlink", "coingecko", "unknown"]).optional(), "payments": zod.z.array(zod.z.object({ "amount": zod.z.string().optional(), "amountInUsd": zod.z.string().optional(), "conversionRate": zod.z.string().optional(), "rateSource": zod.z.enum(["lifi", "chainlink", "coingecko", "unknown"]).optional(), "timestamp": zod.z.string().optional() }).passthrough()).optional() }).passthrough().nullable().optional(), "fees": zod.z.array(zod.z.object({ "type": zod.z.enum(["gas", "platform", "crosschain", "crypto-to-fiat", "offramp", "protocol"]).optional(), "provider": zod.z.string().optional(), "amount": zod.z.string().nullable().optional(), "currency": zod.z.string().optional() }).passthrough()).nullable().optional() }).passthrough();
|
|
459
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV2_getRequestStatus_v2", kind: "response", status: 200 }, schema: RequestControllerV2_getRequestStatus_v2_200 });
|
|
460
|
+
var RequestControllerV2_getRequestStatus_v2_404 = ErrorEnvelopeSchema;
|
|
461
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV2_getRequestStatus_v2", kind: "response", status: 404 }, schema: RequestControllerV2_getRequestStatus_v2_404 });
|
|
462
|
+
var RequestControllerV2_getRequestStatus_v2_429 = ErrorEnvelopeSchema;
|
|
463
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV2_getRequestStatus_v2", kind: "response", status: 429 }, schema: RequestControllerV2_getRequestStatus_v2_429 });
|
|
464
|
+
var RequestControllerV2_updateRequest_v2_Request = zod.z.object({ "isRecurrenceStopped": zod.z.boolean() }).passthrough();
|
|
465
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV2_updateRequest_v2", kind: "request", variant: "application/json" }, schema: RequestControllerV2_updateRequest_v2_Request });
|
|
466
|
+
var RequestControllerV2_updateRequest_v2_200 = zod.z.unknown();
|
|
467
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV2_updateRequest_v2", kind: "response", status: 200 }, schema: RequestControllerV2_updateRequest_v2_200 });
|
|
468
|
+
var RequestControllerV2_updateRequest_v2_404 = ErrorEnvelopeSchema;
|
|
469
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV2_updateRequest_v2", kind: "response", status: 404 }, schema: RequestControllerV2_updateRequest_v2_404 });
|
|
470
|
+
var RequestControllerV2_updateRequest_v2_429 = ErrorEnvelopeSchema;
|
|
471
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV2_updateRequest_v2", kind: "response", status: 429 }, schema: RequestControllerV2_updateRequest_v2_429 });
|
|
472
|
+
var RequestControllerV2_getPaymentCalldata_v2_200 = zod.z.union([zod.z.object({ "transactions": zod.z.array(zod.z.object({ "data": zod.z.string(), "to": zod.z.string(), "value": zod.z.object({ "type": zod.z.enum(["BigNumber"]).optional(), "hex": zod.z.string().optional() }).passthrough() }).passthrough()), "metadata": zod.z.object({ "stepsRequired": zod.z.number(), "needsApproval": zod.z.boolean(), "approvalTransactionIndex": zod.z.number().nullable().optional(), "hasEnoughBalance": zod.z.boolean(), "hasEnoughGas": zod.z.boolean() }).passthrough() }).passthrough(), zod.z.object({ "paymentIntentId": zod.z.string(), "paymentIntent": zod.z.string(), "approvalPermitPayload": zod.z.string().nullable().optional(), "approvalCalldata": zod.z.object({ "to": zod.z.string().optional(), "data": zod.z.string().optional(), "value": zod.z.string().optional() }).passthrough().nullable().optional(), "metadata": zod.z.object({ "supportsEIP2612": zod.z.boolean() }).passthrough() }).passthrough()]);
|
|
473
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV2_getPaymentCalldata_v2", kind: "response", status: 200 }, schema: RequestControllerV2_getPaymentCalldata_v2_200 });
|
|
474
|
+
var RequestControllerV2_getPaymentCalldata_v2_400 = ErrorEnvelopeSchema;
|
|
475
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV2_getPaymentCalldata_v2", kind: "response", status: 400 }, schema: RequestControllerV2_getPaymentCalldata_v2_400 });
|
|
476
|
+
var RequestControllerV2_getPaymentCalldata_v2_404 = ErrorEnvelopeSchema;
|
|
477
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV2_getPaymentCalldata_v2", kind: "response", status: 404 }, schema: RequestControllerV2_getPaymentCalldata_v2_404 });
|
|
478
|
+
var RequestControllerV2_getPaymentCalldata_v2_429 = ErrorEnvelopeSchema;
|
|
479
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV2_getPaymentCalldata_v2", kind: "response", status: 429 }, schema: RequestControllerV2_getPaymentCalldata_v2_429 });
|
|
480
|
+
var RequestControllerV2_getRequestPaymentRoutes_v2_200 = zod.z.object({ "routes": zod.z.array(zod.z.object({ "id": zod.z.string(), "fee": zod.z.number(), "feeBreakdown": zod.z.array(zod.z.object({ "type": zod.z.enum(["gas", "platform", "crosschain", "crypto-to-fiat", "offramp", "protocol"]).optional(), "stage": zod.z.enum(["sending", "receiving", "proxying", "refunding", "overall"]).optional(), "provider": zod.z.string().optional(), "amount": zod.z.string().nullable().optional(), "amountInUSD": zod.z.string().nullable().optional(), "currency": zod.z.string().optional(), "receiverAddress": zod.z.string().optional(), "network": zod.z.string().optional(), "rateProvider": zod.z.string().optional() }).passthrough()).optional(), "speed": zod.z.union([zod.z.string(), zod.z.number()]), "price_impact": zod.z.number().optional(), "chain": zod.z.string(), "token": zod.z.string() }).passthrough()) }).passthrough();
|
|
481
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV2_getRequestPaymentRoutes_v2", kind: "response", status: 200 }, schema: RequestControllerV2_getRequestPaymentRoutes_v2_200 });
|
|
482
|
+
var RequestControllerV2_getRequestPaymentRoutes_v2_400 = ErrorEnvelopeSchema;
|
|
483
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV2_getRequestPaymentRoutes_v2", kind: "response", status: 400 }, schema: RequestControllerV2_getRequestPaymentRoutes_v2_400 });
|
|
484
|
+
var RequestControllerV2_getRequestPaymentRoutes_v2_404 = ErrorEnvelopeSchema;
|
|
485
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV2_getRequestPaymentRoutes_v2", kind: "response", status: 404 }, schema: RequestControllerV2_getRequestPaymentRoutes_v2_404 });
|
|
486
|
+
var RequestControllerV2_getRequestPaymentRoutes_v2_429 = ErrorEnvelopeSchema;
|
|
487
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV2_getRequestPaymentRoutes_v2", kind: "response", status: 429 }, schema: RequestControllerV2_getRequestPaymentRoutes_v2_429 });
|
|
488
|
+
var RequestControllerV2_sendPaymentIntent_v2_Request = zod.z.object({ "signedPaymentIntent": zod.z.object({ "signature": zod.z.string(), "nonce": zod.z.string(), "deadline": zod.z.string() }).passthrough(), "signedApprovalPermit": zod.z.object({ "signature": zod.z.string(), "nonce": zod.z.string(), "deadline": zod.z.string() }).passthrough().optional() }).passthrough();
|
|
489
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV2_sendPaymentIntent_v2", kind: "request", variant: "application/json" }, schema: RequestControllerV2_sendPaymentIntent_v2_Request });
|
|
490
|
+
var RequestControllerV2_sendPaymentIntent_v2_200 = zod.z.unknown();
|
|
491
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV2_sendPaymentIntent_v2", kind: "response", status: 200 }, schema: RequestControllerV2_sendPaymentIntent_v2_200 });
|
|
492
|
+
var RequestControllerV2_sendPaymentIntent_v2_404 = ErrorEnvelopeSchema;
|
|
493
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV2_sendPaymentIntent_v2", kind: "response", status: 404 }, schema: RequestControllerV2_sendPaymentIntent_v2_404 });
|
|
494
|
+
var RequestControllerV2_sendPaymentIntent_v2_429 = ErrorEnvelopeSchema;
|
|
495
|
+
schemaRegistry.register({ key: { operationId: "RequestControllerV2_sendPaymentIntent_v2", kind: "response", status: 429 }, schema: RequestControllerV2_sendPaymentIntent_v2_429 });
|
|
496
|
+
|
|
497
|
+
exports.createRequestsV1Api = createRequestsV1Api;
|
|
498
|
+
//# sourceMappingURL=index.js.map
|
|
499
|
+
//# sourceMappingURL=index.js.map
|