@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 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/core/http/validation.config.ts","../../../../../src/validation/schema.registry.ts","../../../../../src/validation/zod.helpers.ts","../../../../../src/core/http/operation.helper.ts","../../../../../src/domains/requests/request.helpers.ts","../../../../../src/domains/requests/v1/requests.v1.facade.ts","../../../../../src/validation/generated/groups/request.schemas.generated.ts"],"names":[],"mappings":";;;AAQA,SAAS,gBAAA,CAAiB,MAA2B,QAAA,EAA4B;AAC/E,EAAA,OAAO,OAAO,IAAA,KAAS,SAAA,GAAY,IAAA,GAAO,QAAA;AAC5C;AAkBO,SAAS,sBAAA,CAAuB,MAA+B,QAAA,EAA6D;AACjI,EAAA,IAAI,aAAa,MAAA,EAAW;AAC1B,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,IAAI,OAAO,aAAa,SAAA,EAAW;AACjC,IAAA,OAAO;AAAA,MACL,QAAA,EAAU,QAAA;AAAA,MACV,SAAA,EAAW,QAAA;AAAA,MACX,MAAA,EAAQ;AAAA,KACV;AAAA,EACF;AAEA,EAAA,OAAO;AAAA,IACL,QAAA,EAAU,g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ationConfig = {\n requests: true,\n responses: true,\n errors: true,\n};\n\nfunction normaliseBoolean(flag: boolean | undefined, fallback: boolean): boolean {\n return typeof flag === \"boolean\" ? flag : fallback;\n}\n\nexport function normaliseRuntimeValidation(option?: RuntimeValidationOption): RuntimeValidationConfig {\n if (typeof option === \"boolean\") {\n return {\n requests: option,\n responses: option,\n errors: option,\n } satisfies RuntimeValidationConfig;\n }\n\n return {\n requests: normaliseBoolean(option?.requests, DEFAULT_RUNTIME_VALIDATION.requests),\n responses: normaliseBoolean(option?.responses, DEFAULT_RUNTIME_VALIDATION.responses),\n errors: normaliseBoolean(option?.errors, DEFAULT_RUNTIME_VALIDATION.errors),\n } satisfies RuntimeValidationConfig;\n}\n\nexport function mergeRuntimeValidation(base: RuntimeValidationConfig, override?: RuntimeValidationOption): RuntimeValidationConfig {\n if (override === undefined) {\n return base;\n }\n\n if (typeof override === \"boolean\") {\n return {\n requests: override,\n responses: override,\n errors: override,\n } satisfies RuntimeValidationConfig;\n }\n\n return {\n requests: normaliseBoolean(override.requests, base.requests),\n responses: normaliseBoolean(override.responses, base.responses),\n errors: normaliseBoolean(override.errors, base.errors),\n } satisfies RuntimeValidationConfig;\n}\n\nexport function cloneRuntimeValidation(config: RuntimeValidationConfig): RuntimeValidationConfig {\n return { ...config };\n}\n","import type { ZodTypeAny } from \"zod\";\n\nexport type SchemaKind = \"request\" | \"response\" | \"webhook\";\n\nexport interface SchemaKey {\n operationId: string;\n kind: SchemaKind;\n variant?: string;\n status?: number;\n}\n\nexport interface SchemaEntry<TSchema extends ZodTypeAny = ZodTypeAny> {\n key: SchemaKey;\n schema: TSchema;\n}\n\nfunction serialiseKey(key: SchemaKey): string {\n const variant = key.variant ?? \"default\";\n const status = key.status?.toString() ?? \"any\";\n return `${key.operationId}|${key.kind}|${variant}|${status}`;\n}\n\n/**\n * Lightweight registry that associates OpenAPI operation IDs with validation schemas.\n * Generators can populate this map while domain modules retrieve the schemas at runtime.\n */\nexport class SchemaRegistry {\n private readonly store = new Map<string, SchemaEntry>();\n\n register(entry: SchemaEntry): void {\n const id = serialiseKey(entry.key);\n this.store.set(id, entry);\n }\n\n get(key: SchemaKey): ZodTypeAny | undefined {\n const id = serialiseKey(key);\n return this.store.get(id)?.schema;\n }\n\n /**\n * Removes every registered schema — primarily useful in tests.\n */\n clear(): void {\n this.store.clear();\n }\n}\n\nexport const schemaRegistry = new SchemaRegistry();\n","import { type SafeParseReturnType, type ZodTypeAny } from \"zod\";\n\nimport type { SchemaKey } from \"./schema.registry\";\nimport { schemaRegistry } from \"./schema.registry\";\n\nexport type SchemaOutput<TSchema extends ZodTypeAny> = TSchema[\"_output\"];\n\nexport interface ParseWithSchemaOptions<TSchema extends ZodTypeAny> {\n schema: TSchema;\n value: unknown;\n description?: string;\n}\n\nexport interface ParseRegistryOptions {\n key: SchemaKey;\n value: unknown;\n description?: string;\n skipOnMissingSchema?: boolean;\n}\n\nexport interface ParseResult<T> {\n success: boolean;\n data?: T;\n error?: unknown;\n}\n\nexport class ValidationError extends Error {\n constructor(message: string, readonly cause?: unknown) {\n super(message, { cause });\n this.name = \"ClientValidationError\";\n }\n}\n\nexport function parseWithSchema<TSchema extends ZodTypeAny>(\n options: ParseWithSchemaOptions<TSchema>,\n): ParseResult<SchemaOutput<TSchema>> {\n const { schema, value, description } = options;\n const outcome: SafeParseReturnType<unknown, SchemaOutput<TSchema>> = schema.safeParse(value);\n if (outcome.success) {\n return { success: true, data: outcome.data };\n }\n\n const error = new ValidationError(description ?? \"Validation failed\", outcome.error);\n return { success: false, error };\n}\n\nexport function parseWithRegistry<TSchema extends ZodTypeAny>(options: ParseRegistryOptions): ParseResult<SchemaOutput<TSchema>> {\n const schema = schemaRegistry.get(options.key) as TSchema | undefined;\n if (!schema) {\n if (options.skipOnMissingSchema) {\n return { success: true, data: options.value as SchemaOutput<TSchema> };\n }\n return { success: false, error: new ValidationError(`No schema registered for ${options.key.operationId}`) };\n }\n\n return parseWithSchema({ schema, value: options.value, description: options.description });\n}\n","import type { HttpClient, HttpMethod, RequestOptions, RuntimeValidationOption } from \"./http.types\";\nimport { mergeRuntimeValidation } from \"./validation.config\";\nimport type { SchemaKey } from \"../../validation/schema.registry\";\nimport { parseWithRegistry } from \"../../validation/zod.helpers\";\n\ntype Query = NonNullable<RequestOptions[\"query\"]>;\n\nexport interface RequestJsonParams {\n operationId: string;\n method: HttpMethod;\n path: string;\n query?: Query;\n body?: unknown;\n schemaKey: SchemaKey;\n requestSchemaKey?: SchemaKey;\n description?: string;\n querySerializer?: RequestOptions[\"querySerializer\"];\n signal?: RequestOptions[\"signal\"];\n timeoutMs?: RequestOptions[\"timeoutMs\"];\n validation?: RuntimeValidationOption;\n meta?: RequestOptions[\"meta\"];\n}\n\nexport async function requestJson<T>(http: HttpClient, params: RequestJsonParams): Promise<T> {\n const {\n operationId,\n method,\n path,\n query,\n body,\n schemaKey,\n requestSchemaKey,\n description,\n querySerializer,\n signal,\n timeoutMs,\n validation,\n meta,\n } = params;\n\n const runtimeValidation = mergeRuntimeValidation(http.getRuntimeValidationConfig(), validation);\n\n let requestBody = body;\n if (runtimeValidation.requests && requestSchemaKey && body !== undefined) {\n const parsedRequest = parseWithRegistry({\n key: requestSchemaKey,\n value: body,\n description: `${description ?? operationId} request`,\n skipOnMissingSchema: true,\n });\n if (!parsedRequest.success) {\n throw parsedRequest.error;\n }\n requestBody = parsedRequest.data;\n }\n\n const metaValidation = validation ?? meta?.validation;\n const requestMeta: RequestOptions[\"meta\"] = {\n ...(meta ?? {}),\n operationId,\n validation: metaValidation,\n };\n\n const res = await http.request({\n method,\n path,\n query,\n body: requestBody,\n querySerializer,\n signal,\n timeoutMs,\n meta: requestMeta,\n });\n\n if (!runtimeValidation.responses) {\n return res.data as T;\n }\n\n const parsedResponse = parseWithRegistry({ key: schemaKey, value: res.data, description });\n if (!parsedResponse.success) throw parsedResponse.error;\n return parsedResponse.data as T;\n}\n\nexport interface RequestVoidParams {\n operationId: string;\n method: HttpMethod;\n path: string;\n query?: Query;\n body?: unknown;\n querySerializer?: RequestOptions[\"querySerializer\"];\n signal?: RequestOptions[\"signal\"];\n timeoutMs?: RequestOptions[\"timeoutMs\"];\n requestSchemaKey?: SchemaKey;\n validation?: RuntimeValidationOption;\n meta?: RequestOptions[\"meta\"];\n}\n\nexport async function requestVoid(http: HttpClient, params: RequestVoidParams): Promise<void> {\n const { operationId, method, path, query, body, querySerializer, signal, timeoutMs, requestSchemaKey, validation, meta } = params;\n\n const runtimeValidation = mergeRuntimeValidation(http.getRuntimeValidationConfig(), validation);\n\n let requestBody = body;\n if (runtimeValidation.requests && requestSchemaKey && body !== undefined) {\n const parsedRequest = parseWithRegistry({\n key: requestSchemaKey,\n value: body,\n description: `${operationId} request`,\n skipOnMissingSchema: true,\n });\n if (!parsedRequest.success) {\n throw parsedRequest.error;\n }\n requestBody = parsedRequest.data;\n }\n\n const metaValidation = validation ?? meta?.validation;\n const requestMeta: RequestOptions[\"meta\"] = {\n ...(meta ?? {}),\n operationId,\n validation: metaValidation,\n };\n\n await http.request({\n method,\n path,\n query,\n body: requestBody,\n querySerializer,\n signal,\n timeoutMs,\n meta: requestMeta,\n });\n}\n","import type { RequestOptions } from \"../../core/http/http.types\";\nimport type { operations } from \"../../generated/openapi-types\";\n\ntype QueryValue = string | number | boolean | (string | number | boolean)[];\n\n/**\n * Builds a query object while stripping out undefined entries so the HTTP helper\n * does not emit spurious `param=undefined` pairs.\n */\nexport function buildRequestQuery(input?: Record<string, unknown>): RequestOptions[\"query\"] | undefined {\n if (!input) return undefined;\n const entries = Object.entries(input).filter(([, value]) => value !== undefined);\n if (entries.length === 0) return undefined;\n return Object.fromEntries(entries) as Record<string, QueryValue | undefined>;\n}\n\ntype LegacyStatusApiResponse =\n operations[\"RequestControllerV1_getRequestStatus_v1\"][\"responses\"][200][\"content\"][\"application/json\"];\ntype StatusApiResponseV2 =\n operations[\"RequestControllerV2_getRequestStatus_v2\"][\"responses\"][200][\"content\"][\"application/json\"];\n\nexport interface RequestStatusAddress {\n street?: string;\n city?: string;\n state?: string;\n postalCode?: string;\n country?: string;\n}\n\nexport interface RequestStatusCustomerInfo {\n firstName?: string;\n lastName?: string;\n email?: string;\n address?: RequestStatusAddress;\n}\n\nexport type RequestStatusKind = \"paid\" | \"pending\" | \"cancelled\" | \"overdue\" | \"unknown\";\n\ninterface RequestStatusBase {\n paymentReference?: string;\n requestId?: string;\n isListening?: boolean;\n txHash: string | null;\n status?: string;\n recurrence?: Record<string, unknown>;\n originalRequestId?: string;\n originalRequestPaymentReference?: string;\n isRecurrenceStopped?: boolean;\n isCryptoToFiatAvailable?: boolean;\n payments?: Array<Record<string, unknown>>;\n customerInfo?: RequestStatusCustomerInfo | null;\n reference?: string | null;\n hasBeenPaid?: boolean;\n}\n\nexport type RequestStatusResult =\n | (RequestStatusBase & { kind: \"paid\"; hasBeenPaid: true })\n | (RequestStatusBase & { kind: \"pending\"; hasBeenPaid?: boolean })\n | (RequestStatusBase & { kind: \"cancelled\"; hasBeenPaid?: boolean })\n | (RequestStatusBase & { kind: \"overdue\"; hasBeenPaid?: boolean })\n | (RequestStatusBase & { kind: \"unknown\"; hasBeenPaid?: boolean });\n\nexport type LegacyRequestStatusResult = Extract<RequestStatusResult, { kind: \"paid\" | \"pending\" }>;\n\nconst STATUS_KIND_MAP: Record<string, RequestStatusKind> = {\n paid: \"paid\",\n completed: \"paid\",\n settled: \"paid\",\n pending: \"pending\",\n processing: \"pending\",\n open: \"pending\",\n awaitingpayment: \"pending\",\n awaiting_payment: \"pending\",\n cancelled: \"cancelled\",\n canceled: \"cancelled\",\n voided: \"cancelled\",\n overdue: \"overdue\",\n expired: \"overdue\",\n};\n\nfunction normalizeReference(value: string | null | undefined): string | null | undefined {\n if (value === undefined) return undefined;\n return value;\n}\n\nfunction normalizeCustomerInfo(value: RequestStatusCustomerInfo | null | undefined): RequestStatusCustomerInfo | null | undefined {\n if (value === undefined) return undefined;\n if (value === null) return null;\n return {\n firstName: value.firstName ?? undefined,\n lastName: value.lastName ?? undefined,\n email: value.email ?? undefined,\n address: value.address\n ? {\n street: value.address.street ?? undefined,\n city: value.address.city ?? undefined,\n state: value.address.state ?? undefined,\n postalCode: value.address.postalCode ?? undefined,\n country: value.address.country ?? undefined,\n }\n : undefined,\n };\n}\n\nfunction normalizePayments(payments: StatusApiResponseV2[\"payments\"]): Array<Record<string, unknown>> | undefined {\n if (!payments) return undefined;\n return payments.map((payment) => ({ ...payment })) as Array<Record<string, unknown>>;\n}\n\nfunction buildStatusBase(\n raw: LegacyStatusApiResponse | StatusApiResponseV2,\n overrides?: Partial<RequestStatusBase>,\n): RequestStatusBase {\n return {\n paymentReference: raw.paymentReference ?? undefined,\n requestId: raw.requestId ?? undefined,\n isListening: \"isListening\" in raw ? raw.isListening ?? undefined : undefined,\n txHash: raw.txHash ?? null,\n hasBeenPaid: raw.hasBeenPaid ?? false,\n status: \"status\" in raw ? (raw).status ?? undefined : undefined,\n recurrence:\n \"recurrence\" in raw ? ((raw).recurrence as Record<string, unknown> | undefined) : undefined,\n originalRequestId: \"originalRequestId\" in raw ? (raw).originalRequestId ?? undefined : undefined,\n originalRequestPaymentReference:\n \"originalRequestPaymentReference\" in raw\n ? (raw).originalRequestPaymentReference ?? undefined\n : undefined,\n isRecurrenceStopped:\n \"isRecurrenceStopped\" in raw ? (raw).isRecurrenceStopped ?? undefined : undefined,\n isCryptoToFiatAvailable:\n \"isCryptoToFiatAvailable\" in raw\n ? (raw).isCryptoToFiatAvailable ?? undefined\n : undefined,\n payments: \"payments\" in raw ? normalizePayments((raw).payments) : undefined,\n customerInfo:\n \"customerInfo\" in raw\n ? normalizeCustomerInfo(\n (raw).customerInfo as RequestStatusCustomerInfo | null | undefined,\n )\n : undefined,\n reference:\n \"reference\" in raw ? normalizeReference((raw).reference ?? null) : undefined,\n ...overrides,\n };\n}\n\nexport function normalizeLegacyStatusResponse(raw: LegacyStatusApiResponse): LegacyRequestStatusResult {\n if (raw.hasBeenPaid) {\n return {\n kind: \"paid\",\n ...buildStatusBase(raw, { hasBeenPaid: true }),\n hasBeenPaid: true,\n };\n }\n\n return {\n kind: \"pending\",\n ...buildStatusBase(raw, { hasBeenPaid: false }),\n hasBeenPaid: false,\n };\n}\n\nexport function normalizeRequestStatusResponse(raw: StatusApiResponseV2): RequestStatusResult {\n const statusKey = raw.status?.trim().toLowerCase();\n const mapped = statusKey ? STATUS_KIND_MAP[statusKey] : undefined;\n const kind: RequestStatusKind = raw.hasBeenPaid\n ? \"paid\"\n : mapped ?? (statusKey ? \"unknown\" : \"pending\");\n\n if (kind === \"paid\") {\n return {\n kind,\n ...buildStatusBase(raw, { hasBeenPaid: true }),\n hasBeenPaid: true,\n };\n }\n\n return {\n kind,\n ...buildStatusBase(raw, { hasBeenPaid: false }),\n hasBeenPaid: false,\n };\n}\n","import type { HttpClient, RequestOptions, RuntimeValidationOption } from \"../../../core/http/http.types\";\nimport { requestJson, requestVoid } from \"../../../core/http/operation.helper\";\nimport type { operations } from \"../../../generated/openapi-types\";\nimport { ValidationError } from \"../../../validation/zod.helpers\";\nimport {\n buildRequestQuery,\n normalizeLegacyStatusResponse,\n type LegacyRequestStatusResult,\n} from \"../request.helpers\";\n\nconst OP_CREATE = \"RequestControllerV1_createRequest_v1\" as const;\nconst OP_PAYMENT_ROUTES = \"RequestControllerV1_getRequestPaymentRoutes_v1\" as const;\nconst OP_PAYMENT_CALLDATA = \"RequestControllerV1_getPaymentCalldata_v1\" as const;\nconst OP_REQUEST_STATUS = \"RequestControllerV1_getRequestStatus_v1\" as const;\nconst OP_SEND_PAYMENT_INTENT = \"RequestControllerV1_sendPaymentIntent_v1\" as const;\nconst OP_STOP_RECURRENCE = \"RequestControllerV1_stopRecurrenceRequest_v1\" as const;\n\ntype CreateRequestBody = operations[typeof OP_CREATE][\"requestBody\"][\"content\"][\"application/json\"];\ntype CreateRequestResponse = operations[typeof OP_CREATE][\"responses\"][201][\"content\"][\"application/json\"];\n\ntype PaymentRoutesResponse = operations[typeof OP_PAYMENT_ROUTES][\"responses\"][200][\"content\"][\"application/json\"];\ntype PaymentRoutesQuery = operations[typeof OP_PAYMENT_ROUTES][\"parameters\"][\"query\"];\n\ntype PaymentCalldataQuery = NonNullable<operations[typeof OP_PAYMENT_CALLDATA][\"parameters\"][\"query\"]>;\ntype RawPaymentCalldata = operations[typeof OP_PAYMENT_CALLDATA][\"responses\"][200][\"content\"][\"application/json\"];\n\ntype RawStatusResponse = operations[typeof OP_REQUEST_STATUS][\"responses\"][200][\"content\"][\"application/json\"];\n\ntype PaymentIntentPayload = Extract<RawPaymentCalldata, { paymentIntentId: string }>;\ntype CalldataPayload = Extract<RawPaymentCalldata, { transactions: unknown }>;\n\nconst KIND_CALLDATA = \"calldata\" as const;\nconst KIND_PAYMENT_INTENT = \"paymentIntent\" as const;\n\nfunction isPaymentIntentPayload(payload: RawPaymentCalldata): payload is PaymentIntentPayload {\n return \"paymentIntentId\" in payload;\n}\n\nfunction isCalldataPayload(payload: RawPaymentCalldata): payload is CalldataPayload {\n return \"transactions\" in payload;\n}\n\nexport interface RequestV1OperationOptions {\n signal?: AbortSignal;\n timeoutMs?: number;\n validation?: RuntimeValidationOption;\n meta?: RequestOptions[\"meta\"];\n}\n\nexport type GetPaymentRoutesOptions = RequestV1OperationOptions & {\n wallet: PaymentRoutesQuery[\"wallet\"];\n} & Partial<Omit<PaymentRoutesQuery, \"wallet\">>;\n\nexport type GetPaymentCalldataOptions = RequestV1OperationOptions & Partial<PaymentCalldataQuery>;\n\nexport type RequestStatusResult = LegacyRequestStatusResult;\n\nexport type SendPaymentIntentBody = operations[typeof OP_SEND_PAYMENT_INTENT][\"requestBody\"][\"content\"][\"application/json\"];\n\nexport interface RequestsV1Api {\n create(body: CreateRequestBody, options?: RequestV1OperationOptions): Promise<CreateRequestResponse>;\n getPaymentRoutes(paymentReference: string, options: GetPaymentRoutesOptions): Promise<PaymentRoutesResponse>;\n getPaymentCalldata(paymentReference: string, options?: GetPaymentCalldataOptions): Promise<\n | ({ kind: \"calldata\" } & CalldataPayload)\n | ({ kind: \"paymentIntent\" } & PaymentIntentPayload)\n >;\n getRequestStatus(paymentReference: string, options?: RequestV1OperationOptions): Promise<RequestStatusResult>;\n sendPaymentIntent(paymentIntentId: string, body: SendPaymentIntentBody, options?: RequestV1OperationOptions): Promise<void>;\n stopRecurrence(paymentReference: string, options?: RequestV1OperationOptions): Promise<void>;\n}\n\nexport function createRequestsV1Api(http: HttpClient): RequestsV1Api {\n return {\n async create(body, options) {\n return requestJson<CreateRequestResponse>(http, {\n operationId: OP_CREATE,\n method: \"POST\",\n path: \"/v1/request\",\n body,\n requestSchemaKey: { operationId: OP_CREATE, kind: \"request\", variant: \"application/json\" },\n schemaKey: { operationId: OP_CREATE, kind: \"response\", status: 201 },\n description: \"Create legacy request\",\n signal: options?.signal,\n timeoutMs: options?.timeoutMs,\n validation: options?.validation,\n meta: options?.meta,\n });\n },\n\n async getPaymentRoutes(paymentReference, options) {\n const path = `/v1/request/${encodeURIComponent(paymentReference)}/routes`;\n return requestJson<PaymentRoutesResponse>(http, {\n operationId: OP_PAYMENT_ROUTES,\n method: \"GET\",\n path,\n query: buildRequestQuery({\n wallet: options.wallet,\n amount: options.amount,\n feePercentage: options.feePercentage,\n feeAddress: options.feeAddress,\n }),\n schemaKey: { operationId: OP_PAYMENT_ROUTES, kind: \"response\", status: 200 },\n description: \"Legacy payment routes\",\n signal: options.signal,\n timeoutMs: options.timeoutMs,\n validation: options.validation,\n meta: options.meta,\n });\n },\n\n async getPaymentCalldata(paymentReference, options) {\n const path = `/v1/request/${encodeURIComponent(paymentReference)}/pay`;\n const query = buildRequestQuery({\n wallet: options?.wallet,\n chain: options?.chain,\n token: options?.token,\n amount: options?.amount,\n });\n\n const raw = await requestJson<RawPaymentCalldata>(http, {\n operationId: OP_PAYMENT_CALLDATA,\n method: \"GET\",\n path,\n query,\n schemaKey: { operationId: OP_PAYMENT_CALLDATA, kind: \"response\", status: 200 },\n description: \"Legacy payment calldata\",\n signal: options?.signal,\n timeoutMs: options?.timeoutMs,\n validation: options?.validation,\n meta: options?.meta,\n });\n\n if (isCalldataPayload(raw)) {\n return { kind: KIND_CALLDATA, ...raw };\n }\n if (isPaymentIntentPayload(raw)) {\n return { kind: KIND_PAYMENT_INTENT, ...raw };\n }\n\n throw new ValidationError(\"Unexpected payment calldata response\", raw);\n },\n\n async getRequestStatus(paymentReference, options) {\n const path = `/v1/request/${encodeURIComponent(paymentReference)}`;\n const rawStatus = await requestJson<RawStatusResponse>(http, {\n operationId: OP_REQUEST_STATUS,\n method: \"GET\",\n path,\n schemaKey: { operationId: OP_REQUEST_STATUS, kind: \"response\", status: 200 },\n description: \"Legacy request status\",\n signal: options?.signal,\n timeoutMs: options?.timeoutMs,\n validation: options?.validation,\n meta: options?.meta,\n });\n\n return normalizeLegacyStatusResponse(rawStatus);\n },\n\n async sendPaymentIntent(paymentIntentId, body, options) {\n const path = `/v1/request/${encodeURIComponent(paymentIntentId)}/send`;\n await requestVoid(http, {\n operationId: OP_SEND_PAYMENT_INTENT,\n method: \"POST\",\n path,\n body,\n requestSchemaKey: { operationId: OP_SEND_PAYMENT_INTENT, kind: \"request\", variant: \"application/json\" },\n signal: options?.signal,\n timeoutMs: options?.timeoutMs,\n validation: options?.validation,\n meta: options?.meta,\n });\n },\n\n async stopRecurrence(paymentReference, options) {\n const path = `/v1/request/${encodeURIComponent(paymentReference)}/stop-recurrence`;\n await requestVoid(http, {\n operationId: OP_STOP_RECURRENCE,\n method: \"PATCH\",\n path,\n signal: options?.signal,\n timeoutMs: options?.timeoutMs,\n validation: options?.validation,\n meta: options?.meta,\n });\n },\n };\n}\n","// Auto-generated by scripts/generate-zod.mjs. Do not edit.\nimport { z } from 'zod';\n\nimport { schemaRegistry } from '../../schema.registry';\n\nconst ErrorDetailSchema = z\n .object({\n message: z.string(),\n code: z.string().optional(),\n field: z.string().optional(),\n source: z\n .object({\n pointer: z.string().optional(),\n parameter: z.string().optional(),\n })\n .passthrough()\n .optional(),\n meta: z.record(z.unknown()).optional(),\n })\n .passthrough();\n\nconst ErrorEnvelopeSchema = z\n .object({\n status: z.number().optional(),\n statusCode: z.number().optional(),\n code: z.string().optional(),\n error: z.string().optional(),\n message: z\n .union([\n z.string(),\n z.array(z.union([z.string(), ErrorDetailSchema])),\n ErrorDetailSchema,\n ])\n .optional(),\n detail: z.unknown().optional(),\n errors: z.array(ErrorDetailSchema).optional(),\n requestId: z.string().optional(),\n correlationId: z.string().optional(),\n retryAfter: z.union([z.number(), z.string()]).optional(),\n retryAfterMs: z.number().optional(),\n meta: z.record(z.unknown()).optional(),\n })\n .passthrough();\n\n// POST /v1/request -> RequestControllerV1_createRequest_v1 request (application/json)\nexport const RequestControllerV1_createRequest_v1_Request = z.object({ \"payer\": (z.string()).optional(), \"payee\": z.string(), \"amount\": z.string(), \"invoiceCurrency\": z.string(), \"paymentCurrency\": z.string(), \"recurrence\": (z.object({ \"startDate\": z.string(), \"frequency\": z.enum(['DAILY', 'WEEKLY', 'MONTHLY', 'YEARLY']) }).passthrough()).optional() }).passthrough();\nschemaRegistry.register({ key: { operationId: 'RequestControllerV1_createRequest_v1', kind: 'request', variant: 'application/json' }, schema: RequestControllerV1_createRequest_v1_Request });\n\n// POST /v1/request -> RequestControllerV1_createRequest_v1 (201)\nexport const RequestControllerV1_createRequest_v1_201 = z.object({ \"paymentReference\": (z.string()).optional(), \"requestID\": (z.string()).optional() }).passthrough();\nschemaRegistry.register({ key: { operationId: 'RequestControllerV1_createRequest_v1', kind: 'response', status: 201 }, schema: RequestControllerV1_createRequest_v1_201 });\n\n// POST /v1/request -> RequestControllerV1_createRequest_v1 (400)\nexport const RequestControllerV1_createRequest_v1_400 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV1_createRequest_v1', kind: 'response', status: 400 }, schema: RequestControllerV1_createRequest_v1_400 });\n\n// POST /v1/request -> RequestControllerV1_createRequest_v1 (401)\nexport const RequestControllerV1_createRequest_v1_401 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV1_createRequest_v1', kind: 'response', status: 401 }, schema: RequestControllerV1_createRequest_v1_401 });\n\n// POST /v1/request -> RequestControllerV1_createRequest_v1 (404)\nexport const RequestControllerV1_createRequest_v1_404 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV1_createRequest_v1', kind: 'response', status: 404 }, schema: RequestControllerV1_createRequest_v1_404 });\n\n// POST /v1/request -> RequestControllerV1_createRequest_v1 (429)\nexport const RequestControllerV1_createRequest_v1_429 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV1_createRequest_v1', kind: 'response', status: 429 }, schema: RequestControllerV1_createRequest_v1_429 });\n\n// GET /v1/request/{paymentReference} -> RequestControllerV1_getRequestStatus_v1 (200)\nexport const RequestControllerV1_getRequestStatus_v1_200 = z.object({ \"hasBeenPaid\": (z.boolean()).optional(), \"paymentReference\": (z.string()).optional(), \"requestId\": (z.string()).optional(), \"isListening\": (z.boolean()).optional(), \"txHash\": (z.string().nullable()).optional() }).passthrough();\nschemaRegistry.register({ key: { operationId: 'RequestControllerV1_getRequestStatus_v1', kind: 'response', status: 200 }, schema: RequestControllerV1_getRequestStatus_v1_200 });\n\n// GET /v1/request/{paymentReference} -> RequestControllerV1_getRequestStatus_v1 (401)\nexport const RequestControllerV1_getRequestStatus_v1_401 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV1_getRequestStatus_v1', kind: 'response', status: 401 }, schema: RequestControllerV1_getRequestStatus_v1_401 });\n\n// GET /v1/request/{paymentReference} -> RequestControllerV1_getRequestStatus_v1 (404)\nexport const RequestControllerV1_getRequestStatus_v1_404 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV1_getRequestStatus_v1', kind: 'response', status: 404 }, schema: RequestControllerV1_getRequestStatus_v1_404 });\n\n// GET /v1/request/{paymentReference} -> RequestControllerV1_getRequestStatus_v1 (429)\nexport const RequestControllerV1_getRequestStatus_v1_429 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV1_getRequestStatus_v1', kind: 'response', status: 429 }, schema: RequestControllerV1_getRequestStatus_v1_429 });\n\n// PATCH /v1/request/{paymentReference}/stop-recurrence -> RequestControllerV1_stopRecurrenceRequest_v1 (200)\nexport const RequestControllerV1_stopRecurrenceRequest_v1_200 = z.unknown();\nschemaRegistry.register({ key: { operationId: 'RequestControllerV1_stopRecurrenceRequest_v1', kind: 'response', status: 200 }, schema: RequestControllerV1_stopRecurrenceRequest_v1_200 });\n\n// PATCH /v1/request/{paymentReference}/stop-recurrence -> RequestControllerV1_stopRecurrenceRequest_v1 (401)\nexport const RequestControllerV1_stopRecurrenceRequest_v1_401 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV1_stopRecurrenceRequest_v1', kind: 'response', status: 401 }, schema: RequestControllerV1_stopRecurrenceRequest_v1_401 });\n\n// PATCH /v1/request/{paymentReference}/stop-recurrence -> RequestControllerV1_stopRecurrenceRequest_v1 (404)\nexport const RequestControllerV1_stopRecurrenceRequest_v1_404 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV1_stopRecurrenceRequest_v1', kind: 'response', status: 404 }, schema: RequestControllerV1_stopRecurrenceRequest_v1_404 });\n\n// PATCH /v1/request/{paymentReference}/stop-recurrence -> RequestControllerV1_stopRecurrenceRequest_v1 (429)\nexport const RequestControllerV1_stopRecurrenceRequest_v1_429 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV1_stopRecurrenceRequest_v1', kind: 'response', status: 429 }, schema: RequestControllerV1_stopRecurrenceRequest_v1_429 });\n\n// GET /v1/request/{paymentReference}/pay -> RequestControllerV1_getPaymentCalldata_v1 (200)\nexport const RequestControllerV1_getPaymentCalldata_v1_200 = z.union([z.object({ \"transactions\": z.array(z.object({ \"data\": z.string(), \"to\": z.string(), \"value\": z.object({ \"type\": (z.enum(['BigNumber'])).optional(), \"hex\": (z.string()).optional() }).passthrough() }).passthrough()), \"metadata\": z.object({ \"stepsRequired\": z.number(), \"needsApproval\": z.boolean(), \"approvalTransactionIndex\": (z.number().nullable()).optional(), \"hasEnoughBalance\": z.boolean(), \"hasEnoughGas\": z.boolean() }).passthrough() }).passthrough(), z.object({ \"paymentIntentId\": z.string(), \"paymentIntent\": z.string(), \"approvalPermitPayload\": (z.string().nullable()).optional(), \"approvalCalldata\": (z.object({ \"to\": (z.string()).optional(), \"data\": (z.string()).optional(), \"value\": (z.string()).optional() }).passthrough().nullable()).optional(), \"metadata\": z.object({ \"supportsEIP2612\": z.boolean() }).passthrough() }).passthrough()]);\nschemaRegistry.register({ key: { operationId: 'RequestControllerV1_getPaymentCalldata_v1', kind: 'response', status: 200 }, schema: RequestControllerV1_getPaymentCalldata_v1_200 });\n\n// GET /v1/request/{paymentReference}/pay -> RequestControllerV1_getPaymentCalldata_v1 (400)\nexport const RequestControllerV1_getPaymentCalldata_v1_400 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV1_getPaymentCalldata_v1', kind: 'response', status: 400 }, schema: RequestControllerV1_getPaymentCalldata_v1_400 });\n\n// GET /v1/request/{paymentReference}/pay -> RequestControllerV1_getPaymentCalldata_v1 (401)\nexport const RequestControllerV1_getPaymentCalldata_v1_401 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV1_getPaymentCalldata_v1', kind: 'response', status: 401 }, schema: RequestControllerV1_getPaymentCalldata_v1_401 });\n\n// GET /v1/request/{paymentReference}/pay -> RequestControllerV1_getPaymentCalldata_v1 (404)\nexport const RequestControllerV1_getPaymentCalldata_v1_404 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV1_getPaymentCalldata_v1', kind: 'response', status: 404 }, schema: RequestControllerV1_getPaymentCalldata_v1_404 });\n\n// GET /v1/request/{paymentReference}/pay -> RequestControllerV1_getPaymentCalldata_v1 (429)\nexport const RequestControllerV1_getPaymentCalldata_v1_429 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV1_getPaymentCalldata_v1', kind: 'response', status: 429 }, schema: RequestControllerV1_getPaymentCalldata_v1_429 });\n\n// GET /v1/request/{paymentReference}/routes -> RequestControllerV1_getRequestPaymentRoutes_v1 (200)\nexport const RequestControllerV1_getRequestPaymentRoutes_v1_200 = z.object({ \"routes\": z.array(z.object({ \"id\": z.string(), \"fee\": z.number(), \"feeBreakdown\": (z.array(z.object({ \"type\": (z.enum(['gas', 'platform', 'crosschain', 'crypto-to-fiat', 'offramp', 'protocol'])).optional(), \"stage\": (z.enum(['sending', 'receiving', 'proxying', 'refunding', 'overall'])).optional(), \"provider\": (z.string()).optional(), \"amount\": (z.string().nullable()).optional(), \"amountInUSD\": (z.string().nullable()).optional(), \"currency\": (z.string()).optional(), \"receiverAddress\": (z.string()).optional(), \"network\": (z.string()).optional(), \"rateProvider\": (z.string()).optional() }).passthrough())).optional(), \"speed\": z.union([z.string(), z.number()]), \"price_impact\": (z.number()).optional(), \"chain\": z.string(), \"token\": z.string() }).passthrough()) }).passthrough();\nschemaRegistry.register({ key: { operationId: 'RequestControllerV1_getRequestPaymentRoutes_v1', kind: 'response', status: 200 }, schema: RequestControllerV1_getRequestPaymentRoutes_v1_200 });\n\n// GET /v1/request/{paymentReference}/routes -> RequestControllerV1_getRequestPaymentRoutes_v1 (400)\nexport const RequestControllerV1_getRequestPaymentRoutes_v1_400 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV1_getRequestPaymentRoutes_v1', kind: 'response', status: 400 }, schema: RequestControllerV1_getRequestPaymentRoutes_v1_400 });\n\n// GET /v1/request/{paymentReference}/routes -> RequestControllerV1_getRequestPaymentRoutes_v1 (401)\nexport const RequestControllerV1_getRequestPaymentRoutes_v1_401 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV1_getRequestPaymentRoutes_v1', kind: 'response', status: 401 }, schema: RequestControllerV1_getRequestPaymentRoutes_v1_401 });\n\n// GET /v1/request/{paymentReference}/routes -> RequestControllerV1_getRequestPaymentRoutes_v1 (404)\nexport const RequestControllerV1_getRequestPaymentRoutes_v1_404 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV1_getRequestPaymentRoutes_v1', kind: 'response', status: 404 }, schema: RequestControllerV1_getRequestPaymentRoutes_v1_404 });\n\n// GET /v1/request/{paymentReference}/routes -> RequestControllerV1_getRequestPaymentRoutes_v1 (429)\nexport const RequestControllerV1_getRequestPaymentRoutes_v1_429 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV1_getRequestPaymentRoutes_v1', kind: 'response', status: 429 }, schema: RequestControllerV1_getRequestPaymentRoutes_v1_429 });\n\n// POST /v1/request/{paymentIntentId}/send -> RequestControllerV1_sendPaymentIntent_v1 request (application/json)\nexport const RequestControllerV1_sendPaymentIntent_v1_Request = z.object({ \"signedPaymentIntent\": z.object({ \"signature\": z.string(), \"nonce\": z.string(), \"deadline\": z.string() }).passthrough(), \"signedApprovalPermit\": (z.object({ \"signature\": z.string(), \"nonce\": z.string(), \"deadline\": z.string() }).passthrough()).optional() }).passthrough();\nschemaRegistry.register({ key: { operationId: 'RequestControllerV1_sendPaymentIntent_v1', kind: 'request', variant: 'application/json' }, schema: RequestControllerV1_sendPaymentIntent_v1_Request });\n\n// POST /v1/request/{paymentIntentId}/send -> RequestControllerV1_sendPaymentIntent_v1 (401)\nexport const RequestControllerV1_sendPaymentIntent_v1_401 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV1_sendPaymentIntent_v1', kind: 'response', status: 401 }, schema: RequestControllerV1_sendPaymentIntent_v1_401 });\n\n// POST /v1/request/{paymentIntentId}/send -> RequestControllerV1_sendPaymentIntent_v1 (404)\nexport const RequestControllerV1_sendPaymentIntent_v1_404 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV1_sendPaymentIntent_v1', kind: 'response', status: 404 }, schema: RequestControllerV1_sendPaymentIntent_v1_404 });\n\n// POST /v1/request/{paymentIntentId}/send -> RequestControllerV1_sendPaymentIntent_v1 (429)\nexport const RequestControllerV1_sendPaymentIntent_v1_429 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV1_sendPaymentIntent_v1', kind: 'response', status: 429 }, schema: RequestControllerV1_sendPaymentIntent_v1_429 });\n\n// GET /v2/request -> RequestControllerV2_listRequests_v2 (200)\nexport const RequestControllerV2_listRequests_v2_200 = z.object({ \"requests\": z.array(z.object({ \"requestId\": (z.string()).optional(), \"paymentReference\": (z.string()).optional(), \"amount\": (z.string().nullable()).optional(), \"invoiceCurrency\": (z.string()).optional(), \"paymentCurrency\": (z.string()).optional(), \"hasBeenPaid\": (z.boolean()).optional(), \"status\": (z.string().nullable()).optional(), \"reference\": (z.string().nullable()).optional(), \"createdAt\": (z.string().nullable()).optional(), \"txHash\": (z.string().nullable()).optional(), \"payee\": (z.string().nullable()).optional(), \"payer\": (z.string().nullable()).optional() }).passthrough()), \"pagination\": z.object({ \"total\": (z.number()).optional(), \"limit\": (z.number()).optional(), \"offset\": (z.number()).optional() }).passthrough() }).passthrough();\nschemaRegistry.register({ key: { operationId: 'RequestControllerV2_listRequests_v2', kind: 'response', status: 200 }, schema: RequestControllerV2_listRequests_v2_200 });\n\n// GET /v2/request -> RequestControllerV2_listRequests_v2 (400)\nexport const RequestControllerV2_listRequests_v2_400 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV2_listRequests_v2', kind: 'response', status: 400 }, schema: RequestControllerV2_listRequests_v2_400 });\n\n// GET /v2/request -> RequestControllerV2_listRequests_v2 (429)\nexport const RequestControllerV2_listRequests_v2_429 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV2_listRequests_v2', kind: 'response', status: 429 }, schema: RequestControllerV2_listRequests_v2_429 });\n\n// POST /v2/request -> RequestControllerV2_createRequest_v2 request (application/json)\nexport const RequestControllerV2_createRequest_v2_Request = z.object({ \"payer\": (z.string()).optional(), \"payee\": (z.string()).optional(), \"amount\": z.string(), \"invoiceCurrency\": z.string(), \"paymentCurrency\": z.string(), \"recurrence\": (z.object({ \"startDate\": z.string(), \"frequency\": z.enum(['DAILY', 'WEEKLY', 'MONTHLY', 'YEARLY']) }).passthrough()).optional(), \"isCryptoToFiatAvailable\": (z.boolean()).optional(), \"customerInfo\": (z.object({ \"firstName\": (z.string()).optional(), \"lastName\": (z.string()).optional(), \"email\": (z.string()).optional(), \"address\": (z.object({ \"street\": (z.string()).optional(), \"city\": (z.string()).optional(), \"state\": (z.string()).optional(), \"postalCode\": (z.string()).optional(), \"country\": (z.string()).optional() }).passthrough()).optional() }).passthrough()).optional(), \"reference\": (z.string()).optional(), \"originalRequestId\": (z.string()).optional(), \"originalRequestPaymentReference\": (z.string()).optional() }).passthrough();\nschemaRegistry.register({ key: { operationId: 'RequestControllerV2_createRequest_v2', kind: 'request', variant: 'application/json' }, schema: RequestControllerV2_createRequest_v2_Request });\n\n// POST /v2/request -> RequestControllerV2_createRequest_v2 (201)\nexport const RequestControllerV2_createRequest_v2_201 = z.object({ \"paymentReference\": (z.string()).optional(), \"requestId\": (z.string()).optional() }).passthrough();\nschemaRegistry.register({ key: { operationId: 'RequestControllerV2_createRequest_v2', kind: 'response', status: 201 }, schema: RequestControllerV2_createRequest_v2_201 });\n\n// POST /v2/request -> RequestControllerV2_createRequest_v2 (400)\nexport const RequestControllerV2_createRequest_v2_400 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV2_createRequest_v2', kind: 'response', status: 400 }, schema: RequestControllerV2_createRequest_v2_400 });\n\n// POST /v2/request -> RequestControllerV2_createRequest_v2 (403)\nexport const RequestControllerV2_createRequest_v2_403 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV2_createRequest_v2', kind: 'response', status: 403 }, schema: RequestControllerV2_createRequest_v2_403 });\n\n// POST /v2/request -> RequestControllerV2_createRequest_v2 (429)\nexport const RequestControllerV2_createRequest_v2_429 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV2_createRequest_v2', kind: 'response', status: 429 }, schema: RequestControllerV2_createRequest_v2_429 });\n\n// GET /v2/request/{requestId} -> RequestControllerV2_getRequestStatus_v2 (200)\nexport const RequestControllerV2_getRequestStatus_v2_200 = z.object({ \"hasBeenPaid\": (z.boolean()).optional(), \"paymentReference\": (z.string()).optional(), \"requestId\": (z.string()).optional(), \"payee\": (z.string().nullable()).optional(), \"isListening\": (z.boolean()).optional(), \"txHash\": (z.string().nullable()).optional(), \"recurrence\": (z.object({ }).passthrough()).optional(), \"originalRequestId\": (z.string()).optional(), \"status\": (z.string()).optional(), \"isCryptoToFiatAvailable\": (z.boolean()).optional(), \"originalRequestPaymentReference\": (z.string()).optional(), \"payments\": (z.array(z.object({ }).passthrough())).optional(), \"isRecurrenceStopped\": (z.boolean()).optional(), \"customerInfo\": (z.object({ \"firstName\": (z.string()).optional(), \"lastName\": (z.string()).optional(), \"email\": (z.string()).optional(), \"address\": (z.object({ \"street\": (z.string()).optional(), \"city\": (z.string()).optional(), \"state\": (z.string()).optional(), \"postalCode\": (z.string()).optional(), \"country\": (z.string()).optional() }).passthrough()).optional() }).passthrough().nullable()).optional(), \"reference\": (z.string().nullable()).optional(), \"amountInUsd\": (z.string().nullable()).optional(), \"conversionRate\": (z.string().nullable()).optional(), \"rateSource\": (z.enum(['lifi', 'chainlink', 'coingecko', 'unknown', 'mixed'])).optional(), \"conversionBreakdown\": (z.object({ \"paidAmount\": (z.string()).optional(), \"paidAmountInUsd\": (z.string()).optional(), \"remainingAmount\": (z.string()).optional(), \"remainingAmountInUsd\": (z.string()).optional(), \"currentMarketRate\": (z.string().nullable()).optional(), \"currentMarketRateSource\": (z.enum(['lifi', 'chainlink', 'coingecko', 'unknown'])).optional(), \"payments\": (z.array(z.object({ \"amount\": (z.string()).optional(), \"amountInUsd\": (z.string()).optional(), \"conversionRate\": (z.string()).optional(), \"rateSource\": (z.enum(['lifi', 'chainlink', 'coingecko', 'unknown'])).optional(), \"timestamp\": (z.string()).optional() }).passthrough())).optional() }).passthrough().nullable()).optional(), \"fees\": (z.array(z.object({ \"type\": (z.enum(['gas', 'platform', 'crosschain', 'crypto-to-fiat', 'offramp', 'protocol'])).optional(), \"provider\": (z.string()).optional(), \"amount\": (z.string().nullable()).optional(), \"currency\": (z.string()).optional() }).passthrough()).nullable()).optional() }).passthrough();\nschemaRegistry.register({ key: { operationId: 'RequestControllerV2_getRequestStatus_v2', kind: 'response', status: 200 }, schema: RequestControllerV2_getRequestStatus_v2_200 });\n\n// GET /v2/request/{requestId} -> RequestControllerV2_getRequestStatus_v2 (404)\nexport const RequestControllerV2_getRequestStatus_v2_404 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV2_getRequestStatus_v2', kind: 'response', status: 404 }, schema: RequestControllerV2_getRequestStatus_v2_404 });\n\n// GET /v2/request/{requestId} -> RequestControllerV2_getRequestStatus_v2 (429)\nexport const RequestControllerV2_getRequestStatus_v2_429 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV2_getRequestStatus_v2', kind: 'response', status: 429 }, schema: RequestControllerV2_getRequestStatus_v2_429 });\n\n// PATCH /v2/request/{requestId} -> RequestControllerV2_updateRequest_v2 request (application/json)\nexport const RequestControllerV2_updateRequest_v2_Request = z.object({ \"isRecurrenceStopped\": z.boolean() }).passthrough();\nschemaRegistry.register({ key: { operationId: 'RequestControllerV2_updateRequest_v2', kind: 'request', variant: 'application/json' }, schema: RequestControllerV2_updateRequest_v2_Request });\n\n// PATCH /v2/request/{requestId} -> RequestControllerV2_updateRequest_v2 (200)\nexport const RequestControllerV2_updateRequest_v2_200 = z.unknown();\nschemaRegistry.register({ key: { operationId: 'RequestControllerV2_updateRequest_v2', kind: 'response', status: 200 }, schema: RequestControllerV2_updateRequest_v2_200 });\n\n// PATCH /v2/request/{requestId} -> RequestControllerV2_updateRequest_v2 (404)\nexport const RequestControllerV2_updateRequest_v2_404 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV2_updateRequest_v2', kind: 'response', status: 404 }, schema: RequestControllerV2_updateRequest_v2_404 });\n\n// PATCH /v2/request/{requestId} -> RequestControllerV2_updateRequest_v2 (429)\nexport const RequestControllerV2_updateRequest_v2_429 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV2_updateRequest_v2', kind: 'response', status: 429 }, schema: RequestControllerV2_updateRequest_v2_429 });\n\n// GET /v2/request/{requestId}/pay -> RequestControllerV2_getPaymentCalldata_v2 (200)\nexport const RequestControllerV2_getPaymentCalldata_v2_200 = z.union([z.object({ \"transactions\": z.array(z.object({ \"data\": z.string(), \"to\": z.string(), \"value\": z.object({ \"type\": (z.enum(['BigNumber'])).optional(), \"hex\": (z.string()).optional() }).passthrough() }).passthrough()), \"metadata\": z.object({ \"stepsRequired\": z.number(), \"needsApproval\": z.boolean(), \"approvalTransactionIndex\": (z.number().nullable()).optional(), \"hasEnoughBalance\": z.boolean(), \"hasEnoughGas\": z.boolean() }).passthrough() }).passthrough(), z.object({ \"paymentIntentId\": z.string(), \"paymentIntent\": z.string(), \"approvalPermitPayload\": (z.string().nullable()).optional(), \"approvalCalldata\": (z.object({ \"to\": (z.string()).optional(), \"data\": (z.string()).optional(), \"value\": (z.string()).optional() }).passthrough().nullable()).optional(), \"metadata\": z.object({ \"supportsEIP2612\": z.boolean() }).passthrough() }).passthrough()]);\nschemaRegistry.register({ key: { operationId: 'RequestControllerV2_getPaymentCalldata_v2', kind: 'response', status: 200 }, schema: RequestControllerV2_getPaymentCalldata_v2_200 });\n\n// GET /v2/request/{requestId}/pay -> RequestControllerV2_getPaymentCalldata_v2 (400)\nexport const RequestControllerV2_getPaymentCalldata_v2_400 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV2_getPaymentCalldata_v2', kind: 'response', status: 400 }, schema: RequestControllerV2_getPaymentCalldata_v2_400 });\n\n// GET /v2/request/{requestId}/pay -> RequestControllerV2_getPaymentCalldata_v2 (404)\nexport const RequestControllerV2_getPaymentCalldata_v2_404 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV2_getPaymentCalldata_v2', kind: 'response', status: 404 }, schema: RequestControllerV2_getPaymentCalldata_v2_404 });\n\n// GET /v2/request/{requestId}/pay -> RequestControllerV2_getPaymentCalldata_v2 (429)\nexport const RequestControllerV2_getPaymentCalldata_v2_429 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV2_getPaymentCalldata_v2', kind: 'response', status: 429 }, schema: RequestControllerV2_getPaymentCalldata_v2_429 });\n\n// GET /v2/request/{requestId}/routes -> RequestControllerV2_getRequestPaymentRoutes_v2 (200)\nexport const RequestControllerV2_getRequestPaymentRoutes_v2_200 = z.object({ \"routes\": z.array(z.object({ \"id\": z.string(), \"fee\": z.number(), \"feeBreakdown\": (z.array(z.object({ \"type\": (z.enum(['gas', 'platform', 'crosschain', 'crypto-to-fiat', 'offramp', 'protocol'])).optional(), \"stage\": (z.enum(['sending', 'receiving', 'proxying', 'refunding', 'overall'])).optional(), \"provider\": (z.string()).optional(), \"amount\": (z.string().nullable()).optional(), \"amountInUSD\": (z.string().nullable()).optional(), \"currency\": (z.string()).optional(), \"receiverAddress\": (z.string()).optional(), \"network\": (z.string()).optional(), \"rateProvider\": (z.string()).optional() }).passthrough())).optional(), \"speed\": z.union([z.string(), z.number()]), \"price_impact\": (z.number()).optional(), \"chain\": z.string(), \"token\": z.string() }).passthrough()) }).passthrough();\nschemaRegistry.register({ key: { operationId: 'RequestControllerV2_getRequestPaymentRoutes_v2', kind: 'response', status: 200 }, schema: RequestControllerV2_getRequestPaymentRoutes_v2_200 });\n\n// GET /v2/request/{requestId}/routes -> RequestControllerV2_getRequestPaymentRoutes_v2 (400)\nexport const RequestControllerV2_getRequestPaymentRoutes_v2_400 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV2_getRequestPaymentRoutes_v2', kind: 'response', status: 400 }, schema: RequestControllerV2_getRequestPaymentRoutes_v2_400 });\n\n// GET /v2/request/{requestId}/routes -> RequestControllerV2_getRequestPaymentRoutes_v2 (404)\nexport const RequestControllerV2_getRequestPaymentRoutes_v2_404 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV2_getRequestPaymentRoutes_v2', kind: 'response', status: 404 }, schema: RequestControllerV2_getRequestPaymentRoutes_v2_404 });\n\n// GET /v2/request/{requestId}/routes -> RequestControllerV2_getRequestPaymentRoutes_v2 (429)\nexport const RequestControllerV2_getRequestPaymentRoutes_v2_429 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV2_getRequestPaymentRoutes_v2', kind: 'response', status: 429 }, schema: RequestControllerV2_getRequestPaymentRoutes_v2_429 });\n\n// POST /v2/request/payment-intents/{paymentIntentId} -> RequestControllerV2_sendPaymentIntent_v2 request (application/json)\nexport const RequestControllerV2_sendPaymentIntent_v2_Request = z.object({ \"signedPaymentIntent\": z.object({ \"signature\": z.string(), \"nonce\": z.string(), \"deadline\": z.string() }).passthrough(), \"signedApprovalPermit\": (z.object({ \"signature\": z.string(), \"nonce\": z.string(), \"deadline\": z.string() }).passthrough()).optional() }).passthrough();\nschemaRegistry.register({ key: { operationId: 'RequestControllerV2_sendPaymentIntent_v2', kind: 'request', variant: 'application/json' }, schema: RequestControllerV2_sendPaymentIntent_v2_Request });\n\n// POST /v2/request/payment-intents/{paymentIntentId} -> RequestControllerV2_sendPaymentIntent_v2 (200)\nexport const RequestControllerV2_sendPaymentIntent_v2_200 = z.unknown();\nschemaRegistry.register({ key: { operationId: 'RequestControllerV2_sendPaymentIntent_v2', kind: 'response', status: 200 }, schema: RequestControllerV2_sendPaymentIntent_v2_200 });\n\n// POST /v2/request/payment-intents/{paymentIntentId} -> RequestControllerV2_sendPaymentIntent_v2 (404)\nexport const RequestControllerV2_sendPaymentIntent_v2_404 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV2_sendPaymentIntent_v2', kind: 'response', status: 404 }, schema: RequestControllerV2_sendPaymentIntent_v2_404 });\n\n// POST /v2/request/payment-intents/{paymentIntentId} -> RequestControllerV2_sendPaymentIntent_v2 (429)\nexport const RequestControllerV2_sendPaymentIntent_v2_429 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'RequestControllerV2_sendPaymentIntent_v2', kind: 'response', status: 429 }, schema: RequestControllerV2_sendPaymentIntent_v2_429 });\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { C as CreateSecurePaymentBody, b as CreateSecurePaymentResponse, F as FindSecurePaymentResponse, G as GetSecurePaymentByTokenOptions, d as GetSecurePaymentByTokenResponse, S as SecurePaymentsApi, a as SecurePaymentsOperationOptions, c as createSecurePaymentsApi } from '../../index-Kx46FKbk.mjs';
|
|
2
|
+
import '../../openapi-types-JhYQOcil.mjs';
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
// src/core/http/validation.config.ts
|
|
4
|
+
function normaliseBoolean(flag, fallback) {
|
|
5
|
+
return typeof flag === "boolean" ? flag : fallback;
|
|
6
|
+
}
|
|
7
|
+
function mergeRuntimeValidation(base, override) {
|
|
8
|
+
if (override === void 0) {
|
|
9
|
+
return base;
|
|
10
|
+
}
|
|
11
|
+
if (typeof override === "boolean") {
|
|
12
|
+
return {
|
|
13
|
+
requests: override,
|
|
14
|
+
responses: override,
|
|
15
|
+
errors: override
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
return {
|
|
19
|
+
requests: normaliseBoolean(override.requests, base.requests),
|
|
20
|
+
responses: normaliseBoolean(override.responses, base.responses),
|
|
21
|
+
errors: normaliseBoolean(override.errors, base.errors)
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// src/validation/schema.registry.ts
|
|
26
|
+
function serialiseKey(key) {
|
|
27
|
+
const variant = key.variant ?? "default";
|
|
28
|
+
const status = key.status?.toString() ?? "any";
|
|
29
|
+
return `${key.operationId}|${key.kind}|${variant}|${status}`;
|
|
30
|
+
}
|
|
31
|
+
var SchemaRegistry = class {
|
|
32
|
+
store = /* @__PURE__ */ new Map();
|
|
33
|
+
register(entry) {
|
|
34
|
+
const id = serialiseKey(entry.key);
|
|
35
|
+
this.store.set(id, entry);
|
|
36
|
+
}
|
|
37
|
+
get(key) {
|
|
38
|
+
const id = serialiseKey(key);
|
|
39
|
+
return this.store.get(id)?.schema;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Removes every registered schema — primarily useful in tests.
|
|
43
|
+
*/
|
|
44
|
+
clear() {
|
|
45
|
+
this.store.clear();
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
var schemaRegistry = new SchemaRegistry();
|
|
49
|
+
|
|
50
|
+
// src/validation/zod.helpers.ts
|
|
51
|
+
var ValidationError = class extends Error {
|
|
52
|
+
constructor(message, cause) {
|
|
53
|
+
super(message, { cause });
|
|
54
|
+
this.cause = cause;
|
|
55
|
+
this.name = "ClientValidationError";
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
function parseWithSchema(options) {
|
|
59
|
+
const { schema, value, description } = options;
|
|
60
|
+
const outcome = schema.safeParse(value);
|
|
61
|
+
if (outcome.success) {
|
|
62
|
+
return { success: true, data: outcome.data };
|
|
63
|
+
}
|
|
64
|
+
const error = new ValidationError(description ?? "Validation failed", outcome.error);
|
|
65
|
+
return { success: false, error };
|
|
66
|
+
}
|
|
67
|
+
function parseWithRegistry(options) {
|
|
68
|
+
const schema = schemaRegistry.get(options.key);
|
|
69
|
+
if (!schema) {
|
|
70
|
+
if (options.skipOnMissingSchema) {
|
|
71
|
+
return { success: true, data: options.value };
|
|
72
|
+
}
|
|
73
|
+
return { success: false, error: new ValidationError(`No schema registered for ${options.key.operationId}`) };
|
|
74
|
+
}
|
|
75
|
+
return parseWithSchema({ schema, value: options.value, description: options.description });
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// src/core/http/operation.helper.ts
|
|
79
|
+
async function requestJson(http, params) {
|
|
80
|
+
const {
|
|
81
|
+
operationId,
|
|
82
|
+
method,
|
|
83
|
+
path,
|
|
84
|
+
query,
|
|
85
|
+
body,
|
|
86
|
+
schemaKey,
|
|
87
|
+
requestSchemaKey,
|
|
88
|
+
description,
|
|
89
|
+
querySerializer,
|
|
90
|
+
signal,
|
|
91
|
+
timeoutMs,
|
|
92
|
+
validation,
|
|
93
|
+
meta
|
|
94
|
+
} = params;
|
|
95
|
+
const runtimeValidation = mergeRuntimeValidation(http.getRuntimeValidationConfig(), validation);
|
|
96
|
+
let requestBody = body;
|
|
97
|
+
if (runtimeValidation.requests && requestSchemaKey && body !== void 0) {
|
|
98
|
+
const parsedRequest = parseWithRegistry({
|
|
99
|
+
key: requestSchemaKey,
|
|
100
|
+
value: body,
|
|
101
|
+
description: `${description ?? operationId} request`,
|
|
102
|
+
skipOnMissingSchema: true
|
|
103
|
+
});
|
|
104
|
+
if (!parsedRequest.success) {
|
|
105
|
+
throw parsedRequest.error;
|
|
106
|
+
}
|
|
107
|
+
requestBody = parsedRequest.data;
|
|
108
|
+
}
|
|
109
|
+
const metaValidation = validation ?? meta?.validation;
|
|
110
|
+
const requestMeta = {
|
|
111
|
+
...meta ?? {},
|
|
112
|
+
operationId,
|
|
113
|
+
validation: metaValidation
|
|
114
|
+
};
|
|
115
|
+
const res = await http.request({
|
|
116
|
+
method,
|
|
117
|
+
path,
|
|
118
|
+
query,
|
|
119
|
+
body: requestBody,
|
|
120
|
+
querySerializer,
|
|
121
|
+
signal,
|
|
122
|
+
timeoutMs,
|
|
123
|
+
meta: requestMeta
|
|
124
|
+
});
|
|
125
|
+
if (!runtimeValidation.responses) {
|
|
126
|
+
return res.data;
|
|
127
|
+
}
|
|
128
|
+
const parsedResponse = parseWithRegistry({ key: schemaKey, value: res.data, description });
|
|
129
|
+
if (!parsedResponse.success) throw parsedResponse.error;
|
|
130
|
+
return parsedResponse.data;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// src/domains/requests/request.helpers.ts
|
|
134
|
+
function buildRequestQuery(input) {
|
|
135
|
+
if (!input) return void 0;
|
|
136
|
+
const entries = Object.entries(input).filter(([, value]) => value !== void 0);
|
|
137
|
+
if (entries.length === 0) return void 0;
|
|
138
|
+
return Object.fromEntries(entries);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// src/domains/secure-payments/secure-payments.facade.ts
|
|
142
|
+
var OP_FIND_BY_REQUEST_ID = "SecurePaymentController_findSecurePayment_v2";
|
|
143
|
+
var OP_CREATE = "SecurePaymentController_createSecurePayment_v2";
|
|
144
|
+
var OP_GET_BY_TOKEN = "SecurePaymentController_getSecurePaymentByToken_v2";
|
|
145
|
+
var PATH_BASE = "/v2/secure-payments";
|
|
146
|
+
function createSecurePaymentsApi(http) {
|
|
147
|
+
return {
|
|
148
|
+
async create(body, options) {
|
|
149
|
+
return requestJson(http, {
|
|
150
|
+
operationId: OP_CREATE,
|
|
151
|
+
method: "POST",
|
|
152
|
+
path: PATH_BASE,
|
|
153
|
+
body,
|
|
154
|
+
requestSchemaKey: { operationId: OP_CREATE, kind: "request", variant: "application/json" },
|
|
155
|
+
schemaKey: { operationId: OP_CREATE, kind: "response", status: 201 },
|
|
156
|
+
description: "Create secure payment",
|
|
157
|
+
signal: options?.signal,
|
|
158
|
+
timeoutMs: options?.timeoutMs,
|
|
159
|
+
validation: options?.validation,
|
|
160
|
+
meta: options?.meta
|
|
161
|
+
});
|
|
162
|
+
},
|
|
163
|
+
async findByRequestId(requestId, options) {
|
|
164
|
+
return requestJson(http, {
|
|
165
|
+
operationId: OP_FIND_BY_REQUEST_ID,
|
|
166
|
+
method: "GET",
|
|
167
|
+
path: PATH_BASE,
|
|
168
|
+
query: { requestId },
|
|
169
|
+
schemaKey: { operationId: OP_FIND_BY_REQUEST_ID, kind: "response", status: 200 },
|
|
170
|
+
description: "Find secure payment by request ID",
|
|
171
|
+
signal: options?.signal,
|
|
172
|
+
timeoutMs: options?.timeoutMs,
|
|
173
|
+
validation: options?.validation,
|
|
174
|
+
meta: options?.meta
|
|
175
|
+
});
|
|
176
|
+
},
|
|
177
|
+
async getByToken(token, options) {
|
|
178
|
+
return requestJson(http, {
|
|
179
|
+
operationId: OP_GET_BY_TOKEN,
|
|
180
|
+
method: "GET",
|
|
181
|
+
path: `${PATH_BASE}/${encodeURIComponent(token)}`,
|
|
182
|
+
query: buildRequestQuery({ wallet: options?.wallet }),
|
|
183
|
+
schemaKey: { operationId: OP_GET_BY_TOKEN, kind: "response", status: 200 },
|
|
184
|
+
description: "Get secure payment by token",
|
|
185
|
+
signal: options?.signal,
|
|
186
|
+
timeoutMs: options?.timeoutMs,
|
|
187
|
+
validation: options?.validation,
|
|
188
|
+
meta: options?.meta
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
var ErrorDetailSchema = z.object({
|
|
194
|
+
message: z.string(),
|
|
195
|
+
code: z.string().optional(),
|
|
196
|
+
field: z.string().optional(),
|
|
197
|
+
source: z.object({
|
|
198
|
+
pointer: z.string().optional(),
|
|
199
|
+
parameter: z.string().optional()
|
|
200
|
+
}).passthrough().optional(),
|
|
201
|
+
meta: z.record(z.unknown()).optional()
|
|
202
|
+
}).passthrough();
|
|
203
|
+
var ErrorEnvelopeSchema = z.object({
|
|
204
|
+
status: z.number().optional(),
|
|
205
|
+
statusCode: z.number().optional(),
|
|
206
|
+
code: z.string().optional(),
|
|
207
|
+
error: z.string().optional(),
|
|
208
|
+
message: z.union([
|
|
209
|
+
z.string(),
|
|
210
|
+
z.array(z.union([z.string(), ErrorDetailSchema])),
|
|
211
|
+
ErrorDetailSchema
|
|
212
|
+
]).optional(),
|
|
213
|
+
detail: z.unknown().optional(),
|
|
214
|
+
errors: z.array(ErrorDetailSchema).optional(),
|
|
215
|
+
requestId: z.string().optional(),
|
|
216
|
+
correlationId: z.string().optional(),
|
|
217
|
+
retryAfter: z.union([z.number(), z.string()]).optional(),
|
|
218
|
+
retryAfterMs: z.number().optional(),
|
|
219
|
+
meta: z.record(z.unknown()).optional()
|
|
220
|
+
}).passthrough();
|
|
221
|
+
var SecurePaymentController_findSecurePayment_v2_200 = z.object({ "token": z.string(), "securePaymentUrl": z.string(), "status": z.enum(["pending", "completed", "expired", "invalidated"]), "paymentType": z.enum(["single", "batch"]), "createdAt": z.string().nullable(), "expiresAt": z.string() }).passthrough();
|
|
222
|
+
schemaRegistry.register({ key: { operationId: "SecurePaymentController_findSecurePayment_v2", kind: "response", status: 200 }, schema: SecurePaymentController_findSecurePayment_v2_200 });
|
|
223
|
+
var SecurePaymentController_findSecurePayment_v2_404 = ErrorEnvelopeSchema;
|
|
224
|
+
schemaRegistry.register({ key: { operationId: "SecurePaymentController_findSecurePayment_v2", kind: "response", status: 404 }, schema: SecurePaymentController_findSecurePayment_v2_404 });
|
|
225
|
+
var SecurePaymentController_findSecurePayment_v2_429 = ErrorEnvelopeSchema;
|
|
226
|
+
schemaRegistry.register({ key: { operationId: "SecurePaymentController_findSecurePayment_v2", kind: "response", status: 429 }, schema: SecurePaymentController_findSecurePayment_v2_429 });
|
|
227
|
+
var SecurePaymentController_createSecurePayment_v2_Request = z.object({ "requests": z.array(z.object({ "destinationId": z.string(), "amount": z.string() }).passthrough()), "feePercentage": z.string().optional(), "feeAddress": z.string().optional() }).passthrough();
|
|
228
|
+
schemaRegistry.register({ key: { operationId: "SecurePaymentController_createSecurePayment_v2", kind: "request", variant: "application/json" }, schema: SecurePaymentController_createSecurePayment_v2_Request });
|
|
229
|
+
var SecurePaymentController_createSecurePayment_v2_201 = z.object({ "requestIds": z.array(z.string()), "securePaymentUrl": z.string(), "token": z.string() }).passthrough();
|
|
230
|
+
schemaRegistry.register({ key: { operationId: "SecurePaymentController_createSecurePayment_v2", kind: "response", status: 201 }, schema: SecurePaymentController_createSecurePayment_v2_201 });
|
|
231
|
+
var SecurePaymentController_createSecurePayment_v2_429 = ErrorEnvelopeSchema;
|
|
232
|
+
schemaRegistry.register({ key: { operationId: "SecurePaymentController_createSecurePayment_v2", kind: "response", status: 429 }, schema: SecurePaymentController_createSecurePayment_v2_429 });
|
|
233
|
+
var SecurePaymentController_getSecurePaymentByToken_v2_200 = z.object({ "paymentType": z.enum(["single"]), "payee": z.string(), "network": z.string(), "amount": z.string(), "paymentCurrency": z.string(), "isNativeCurrency": z.boolean(), "status": z.enum(["pending", "completed", "expired", "invalidated"]), "destination": z.object({ "destinationId": z.string(), "payeeAddress": z.string(), "tokenAddress": z.string(), "walletAddress": z.string(), "network": z.string() }).passthrough(), "transactions": z.array(z.unknown()), "metadata": z.object({ "stepsRequired": z.number(), "needsApproval": z.boolean(), "approvalTransactionIndex": z.number().optional(), "paymentTransactionIndex": z.number(), "hasEnoughBalance": z.boolean().optional(), "hasEnoughGas": z.boolean().optional(), "platformFee": z.object({ "percentage": z.string(), "address": z.string() }).passthrough().optional() }).passthrough().optional() }).passthrough();
|
|
234
|
+
schemaRegistry.register({ key: { operationId: "SecurePaymentController_getSecurePaymentByToken_v2", kind: "response", status: 200 }, schema: SecurePaymentController_getSecurePaymentByToken_v2_200 });
|
|
235
|
+
var SecurePaymentController_getSecurePaymentByToken_v2_403 = ErrorEnvelopeSchema;
|
|
236
|
+
schemaRegistry.register({ key: { operationId: "SecurePaymentController_getSecurePaymentByToken_v2", kind: "response", status: 403 }, schema: SecurePaymentController_getSecurePaymentByToken_v2_403 });
|
|
237
|
+
var SecurePaymentController_getSecurePaymentByToken_v2_404 = ErrorEnvelopeSchema;
|
|
238
|
+
schemaRegistry.register({ key: { operationId: "SecurePaymentController_getSecurePaymentByToken_v2", kind: "response", status: 404 }, schema: SecurePaymentController_getSecurePaymentByToken_v2_404 });
|
|
239
|
+
var SecurePaymentController_getSecurePaymentByToken_v2_409 = ErrorEnvelopeSchema;
|
|
240
|
+
schemaRegistry.register({ key: { operationId: "SecurePaymentController_getSecurePaymentByToken_v2", kind: "response", status: 409 }, schema: SecurePaymentController_getSecurePaymentByToken_v2_409 });
|
|
241
|
+
var SecurePaymentController_getSecurePaymentByToken_v2_429 = ErrorEnvelopeSchema;
|
|
242
|
+
schemaRegistry.register({ key: { operationId: "SecurePaymentController_getSecurePaymentByToken_v2", kind: "response", status: 429 }, schema: SecurePaymentController_getSecurePaymentByToken_v2_429 });
|
|
243
|
+
|
|
244
|
+
export { createSecurePaymentsApi };
|
|
245
|
+
//# sourceMappingURL=index.js.map
|
|
246
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/core/http/validation.config.ts","../../../../src/validation/schema.registry.ts","../../../../src/validation/zod.helpers.ts","../../../../src/core/http/operation.helper.ts","../../../../src/domains/requests/request.helpers.ts","../../../../src/domains/secure-payments/secure-payments.facade.ts","../../../../src/validation/generated/groups/v2/secure-payment.schemas.generated.ts"],"names":[],"mappings":";;;AAQA,SAAS,gBAAA,CAAiB,MAA2B,QAAA,EAA4B;AAC/E,EAAA,OAAO,OAAO,IAAA,KAAS,SAAA,GAAY,IAAA,GAAO,QAAA;AAC5C;AAkBO,SAAS,sBAAA,CAAuB,MAA+B,QAAA,EAA6D;AACjI,EAAA,IAAI,aAAa,MAAA,EAAW;AAC1B,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,IAAI,OAAO,aAAa,SAAA,EAAW;AACjC,IAAA,OAAO;AAAA,MACL,QAAA,EAAU,QAAA;AAAA,MACV,SAAA,EAAW,QAAA;AAAA,MACX,MAAA,EAAQ;AAAA,KACV;AAAA,EACF;AAEA,EAAA,OAAO;AAAA,IACL,QAAA,EAAU,gBAA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EFAULT_RUNTIME_VALIDATION: RuntimeValidationConfig = {\n requests: true,\n responses: true,\n errors: true,\n};\n\nfunction normaliseBoolean(flag: boolean | undefined, fallback: boolean): boolean {\n return typeof flag === \"boolean\" ? flag : fallback;\n}\n\nexport function normaliseRuntimeValidation(option?: RuntimeValidationOption): RuntimeValidationConfig {\n if (typeof option === \"boolean\") {\n return {\n requests: option,\n responses: option,\n errors: option,\n } satisfies RuntimeValidationConfig;\n }\n\n return {\n requests: normaliseBoolean(option?.requests, DEFAULT_RUNTIME_VALIDATION.requests),\n responses: normaliseBoolean(option?.responses, DEFAULT_RUNTIME_VALIDATION.responses),\n errors: normaliseBoolean(option?.errors, DEFAULT_RUNTIME_VALIDATION.errors),\n } satisfies RuntimeValidationConfig;\n}\n\nexport function mergeRuntimeValidation(base: RuntimeValidationConfig, override?: RuntimeValidationOption): RuntimeValidationConfig {\n if (override === undefined) {\n return base;\n }\n\n if (typeof override === \"boolean\") {\n return {\n requests: override,\n responses: override,\n errors: override,\n } satisfies RuntimeValidationConfig;\n }\n\n return {\n requests: normaliseBoolean(override.requests, base.requests),\n responses: normaliseBoolean(override.responses, base.responses),\n errors: normaliseBoolean(override.errors, base.errors),\n } satisfies RuntimeValidationConfig;\n}\n\nexport function cloneRuntimeValidation(config: RuntimeValidationConfig): RuntimeValidationConfig {\n return { ...config };\n}\n","import type { ZodTypeAny } from \"zod\";\n\nexport type SchemaKind = \"request\" | \"response\" | \"webhook\";\n\nexport interface SchemaKey {\n operationId: string;\n kind: SchemaKind;\n variant?: string;\n status?: number;\n}\n\nexport interface SchemaEntry<TSchema extends ZodTypeAny = ZodTypeAny> {\n key: SchemaKey;\n schema: TSchema;\n}\n\nfunction serialiseKey(key: SchemaKey): string {\n const variant = key.variant ?? \"default\";\n const status = key.status?.toString() ?? \"any\";\n return `${key.operationId}|${key.kind}|${variant}|${status}`;\n}\n\n/**\n * Lightweight registry that associates OpenAPI operation IDs with validation schemas.\n * Generators can populate this map while domain modules retrieve the schemas at runtime.\n */\nexport class SchemaRegistry {\n private readonly store = new Map<string, SchemaEntry>();\n\n register(entry: SchemaEntry): void {\n const id = serialiseKey(entry.key);\n this.store.set(id, entry);\n }\n\n get(key: SchemaKey): ZodTypeAny | undefined {\n const id = serialiseKey(key);\n return this.store.get(id)?.schema;\n }\n\n /**\n * Removes every registered schema — primarily useful in tests.\n */\n clear(): void {\n this.store.clear();\n }\n}\n\nexport const schemaRegistry = new SchemaRegistry();\n","import { type SafeParseReturnType, type ZodTypeAny } from \"zod\";\n\nimport type { SchemaKey } from \"./schema.registry\";\nimport { schemaRegistry } from \"./schema.registry\";\n\nexport type SchemaOutput<TSchema extends ZodTypeAny> = TSchema[\"_output\"];\n\nexport interface ParseWithSchemaOptions<TSchema extends ZodTypeAny> {\n schema: TSchema;\n value: unknown;\n description?: string;\n}\n\nexport interface ParseRegistryOptions {\n key: SchemaKey;\n value: unknown;\n description?: string;\n skipOnMissingSchema?: boolean;\n}\n\nexport interface ParseResult<T> {\n success: boolean;\n data?: T;\n error?: unknown;\n}\n\nexport class ValidationError extends Error {\n constructor(message: string, readonly cause?: unknown) {\n super(message, { cause });\n this.name = \"ClientValidationError\";\n }\n}\n\nexport function parseWithSchema<TSchema extends ZodTypeAny>(\n options: ParseWithSchemaOptions<TSchema>,\n): ParseResult<SchemaOutput<TSchema>> {\n const { schema, value, description } = options;\n const outcome: SafeParseReturnType<unknown, SchemaOutput<TSchema>> = schema.safeParse(value);\n if (outcome.success) {\n return { success: true, data: outcome.data };\n }\n\n const error = new ValidationError(description ?? \"Validation failed\", outcome.error);\n return { success: false, error };\n}\n\nexport function parseWithRegistry<TSchema extends ZodTypeAny>(options: ParseRegistryOptions): ParseResult<SchemaOutput<TSchema>> {\n const schema = schemaRegistry.get(options.key) as TSchema | undefined;\n if (!schema) {\n if (options.skipOnMissingSchema) {\n return { success: true, data: options.value as SchemaOutput<TSchema> };\n }\n return { success: false, error: new ValidationError(`No schema registered for ${options.key.operationId}`) };\n }\n\n return parseWithSchema({ schema, value: options.value, description: options.description });\n}\n","import type { HttpClient, HttpMethod, RequestOptions, RuntimeValidationOption } from \"./http.types\";\nimport { mergeRuntimeValidation } from \"./validation.config\";\nimport type { SchemaKey } from \"../../validation/schema.registry\";\nimport { parseWithRegistry } from \"../../validation/zod.helpers\";\n\ntype Query = NonNullable<RequestOptions[\"query\"]>;\n\nexport interface RequestJsonParams {\n operationId: string;\n method: HttpMethod;\n path: string;\n query?: Query;\n body?: unknown;\n schemaKey: SchemaKey;\n requestSchemaKey?: SchemaKey;\n description?: string;\n querySerializer?: RequestOptions[\"querySerializer\"];\n signal?: RequestOptions[\"signal\"];\n timeoutMs?: RequestOptions[\"timeoutMs\"];\n validation?: RuntimeValidationOption;\n meta?: RequestOptions[\"meta\"];\n}\n\nexport async function requestJson<T>(http: HttpClient, params: RequestJsonParams): Promise<T> {\n const {\n operationId,\n method,\n path,\n query,\n body,\n schemaKey,\n requestSchemaKey,\n description,\n querySerializer,\n signal,\n timeoutMs,\n validation,\n meta,\n } = params;\n\n const runtimeValidation = mergeRuntimeValidation(http.getRuntimeValidationConfig(), validation);\n\n let requestBody = body;\n if (runtimeValidation.requests && requestSchemaKey && body !== undefined) {\n const parsedRequest = parseWithRegistry({\n key: requestSchemaKey,\n value: body,\n description: `${description ?? operationId} request`,\n skipOnMissingSchema: true,\n });\n if (!parsedRequest.success) {\n throw parsedRequest.error;\n }\n requestBody = parsedRequest.data;\n }\n\n const metaValidation = validation ?? meta?.validation;\n const requestMeta: RequestOptions[\"meta\"] = {\n ...(meta ?? {}),\n operationId,\n validation: metaValidation,\n };\n\n const res = await http.request({\n method,\n path,\n query,\n body: requestBody,\n querySerializer,\n signal,\n timeoutMs,\n meta: requestMeta,\n });\n\n if (!runtimeValidation.responses) {\n return res.data as T;\n }\n\n const parsedResponse = parseWithRegistry({ key: schemaKey, value: res.data, description });\n if (!parsedResponse.success) throw parsedResponse.error;\n return parsedResponse.data as T;\n}\n\nexport interface RequestVoidParams {\n operationId: string;\n method: HttpMethod;\n path: string;\n query?: Query;\n body?: unknown;\n querySerializer?: RequestOptions[\"querySerializer\"];\n signal?: RequestOptions[\"signal\"];\n timeoutMs?: RequestOptions[\"timeoutMs\"];\n requestSchemaKey?: SchemaKey;\n validation?: RuntimeValidationOption;\n meta?: RequestOptions[\"meta\"];\n}\n\nexport async function requestVoid(http: HttpClient, params: RequestVoidParams): Promise<void> {\n const { operationId, method, path, query, body, querySerializer, signal, timeoutMs, requestSchemaKey, validation, meta } = params;\n\n const runtimeValidation = mergeRuntimeValidation(http.getRuntimeValidationConfig(), validation);\n\n let requestBody = body;\n if (runtimeValidation.requests && requestSchemaKey && body !== undefined) {\n const parsedRequest = parseWithRegistry({\n key: requestSchemaKey,\n value: body,\n description: `${operationId} request`,\n skipOnMissingSchema: true,\n });\n if (!parsedRequest.success) {\n throw parsedRequest.error;\n }\n requestBody = parsedRequest.data;\n }\n\n const metaValidation = validation ?? meta?.validation;\n const requestMeta: RequestOptions[\"meta\"] = {\n ...(meta ?? {}),\n operationId,\n validation: metaValidation,\n };\n\n await http.request({\n method,\n path,\n query,\n body: requestBody,\n querySerializer,\n signal,\n timeoutMs,\n meta: requestMeta,\n });\n}\n","import type { RequestOptions } from \"../../core/http/http.types\";\nimport type { operations } from \"../../generated/openapi-types\";\n\ntype QueryValue = string | number | boolean | (string | number | boolean)[];\n\n/**\n * Builds a query object while stripping out undefined entries so the HTTP helper\n * does not emit spurious `param=undefined` pairs.\n */\nexport function buildRequestQuery(input?: Record<string, unknown>): RequestOptions[\"query\"] | undefined {\n if (!input) return undefined;\n const entries = Object.entries(input).filter(([, value]) => value !== undefined);\n if (entries.length === 0) return undefined;\n return Object.fromEntries(entries) as Record<string, QueryValue | undefined>;\n}\n\ntype LegacyStatusApiResponse =\n operations[\"RequestControllerV1_getRequestStatus_v1\"][\"responses\"][200][\"content\"][\"application/json\"];\ntype StatusApiResponseV2 =\n operations[\"RequestControllerV2_getRequestStatus_v2\"][\"responses\"][200][\"content\"][\"application/json\"];\n\nexport interface RequestStatusAddress {\n street?: string;\n city?: string;\n state?: string;\n postalCode?: string;\n country?: string;\n}\n\nexport interface RequestStatusCustomerInfo {\n firstName?: string;\n lastName?: string;\n email?: string;\n address?: RequestStatusAddress;\n}\n\nexport type RequestStatusKind = \"paid\" | \"pending\" | \"cancelled\" | \"overdue\" | \"unknown\";\n\ninterface RequestStatusBase {\n paymentReference?: string;\n requestId?: string;\n isListening?: boolean;\n txHash: string | null;\n status?: string;\n recurrence?: Record<string, unknown>;\n originalRequestId?: string;\n originalRequestPaymentReference?: string;\n isRecurrenceStopped?: boolean;\n isCryptoToFiatAvailable?: boolean;\n payments?: Array<Record<string, unknown>>;\n customerInfo?: RequestStatusCustomerInfo | null;\n reference?: string | null;\n hasBeenPaid?: boolean;\n}\n\nexport type RequestStatusResult =\n | (RequestStatusBase & { kind: \"paid\"; hasBeenPaid: true })\n | (RequestStatusBase & { kind: \"pending\"; hasBeenPaid?: boolean })\n | (RequestStatusBase & { kind: \"cancelled\"; hasBeenPaid?: boolean })\n | (RequestStatusBase & { kind: \"overdue\"; hasBeenPaid?: boolean })\n | (RequestStatusBase & { kind: \"unknown\"; hasBeenPaid?: boolean });\n\nexport type LegacyRequestStatusResult = Extract<RequestStatusResult, { kind: \"paid\" | \"pending\" }>;\n\nconst STATUS_KIND_MAP: Record<string, RequestStatusKind> = {\n paid: \"paid\",\n completed: \"paid\",\n settled: \"paid\",\n pending: \"pending\",\n processing: \"pending\",\n open: \"pending\",\n awaitingpayment: \"pending\",\n awaiting_payment: \"pending\",\n cancelled: \"cancelled\",\n canceled: \"cancelled\",\n voided: \"cancelled\",\n overdue: \"overdue\",\n expired: \"overdue\",\n};\n\nfunction normalizeReference(value: string | null | undefined): string | null | undefined {\n if (value === undefined) return undefined;\n return value;\n}\n\nfunction normalizeCustomerInfo(value: RequestStatusCustomerInfo | null | undefined): RequestStatusCustomerInfo | null | undefined {\n if (value === undefined) return undefined;\n if (value === null) return null;\n return {\n firstName: value.firstName ?? undefined,\n lastName: value.lastName ?? undefined,\n email: value.email ?? undefined,\n address: value.address\n ? {\n street: value.address.street ?? undefined,\n city: value.address.city ?? undefined,\n state: value.address.state ?? undefined,\n postalCode: value.address.postalCode ?? undefined,\n country: value.address.country ?? undefined,\n }\n : undefined,\n };\n}\n\nfunction normalizePayments(payments: StatusApiResponseV2[\"payments\"]): Array<Record<string, unknown>> | undefined {\n if (!payments) return undefined;\n return payments.map((payment) => ({ ...payment })) as Array<Record<string, unknown>>;\n}\n\nfunction buildStatusBase(\n raw: LegacyStatusApiResponse | StatusApiResponseV2,\n overrides?: Partial<RequestStatusBase>,\n): RequestStatusBase {\n return {\n paymentReference: raw.paymentReference ?? undefined,\n requestId: raw.requestId ?? undefined,\n isListening: \"isListening\" in raw ? raw.isListening ?? undefined : undefined,\n txHash: raw.txHash ?? null,\n hasBeenPaid: raw.hasBeenPaid ?? false,\n status: \"status\" in raw ? (raw).status ?? undefined : undefined,\n recurrence:\n \"recurrence\" in raw ? ((raw).recurrence as Record<string, unknown> | undefined) : undefined,\n originalRequestId: \"originalRequestId\" in raw ? (raw).originalRequestId ?? undefined : undefined,\n originalRequestPaymentReference:\n \"originalRequestPaymentReference\" in raw\n ? (raw).originalRequestPaymentReference ?? undefined\n : undefined,\n isRecurrenceStopped:\n \"isRecurrenceStopped\" in raw ? (raw).isRecurrenceStopped ?? undefined : undefined,\n isCryptoToFiatAvailable:\n \"isCryptoToFiatAvailable\" in raw\n ? (raw).isCryptoToFiatAvailable ?? undefined\n : undefined,\n payments: \"payments\" in raw ? normalizePayments((raw).payments) : undefined,\n customerInfo:\n \"customerInfo\" in raw\n ? normalizeCustomerInfo(\n (raw).customerInfo as RequestStatusCustomerInfo | null | undefined,\n )\n : undefined,\n reference:\n \"reference\" in raw ? normalizeReference((raw).reference ?? null) : undefined,\n ...overrides,\n };\n}\n\nexport function normalizeLegacyStatusResponse(raw: LegacyStatusApiResponse): LegacyRequestStatusResult {\n if (raw.hasBeenPaid) {\n return {\n kind: \"paid\",\n ...buildStatusBase(raw, { hasBeenPaid: true }),\n hasBeenPaid: true,\n };\n }\n\n return {\n kind: \"pending\",\n ...buildStatusBase(raw, { hasBeenPaid: false }),\n hasBeenPaid: false,\n };\n}\n\nexport function normalizeRequestStatusResponse(raw: StatusApiResponseV2): RequestStatusResult {\n const statusKey = raw.status?.trim().toLowerCase();\n const mapped = statusKey ? STATUS_KIND_MAP[statusKey] : undefined;\n const kind: RequestStatusKind = raw.hasBeenPaid\n ? \"paid\"\n : mapped ?? (statusKey ? \"unknown\" : \"pending\");\n\n if (kind === \"paid\") {\n return {\n kind,\n ...buildStatusBase(raw, { hasBeenPaid: true }),\n hasBeenPaid: true,\n };\n }\n\n return {\n kind,\n ...buildStatusBase(raw, { hasBeenPaid: false }),\n hasBeenPaid: false,\n };\n}\n","import type { HttpClient, RequestOptions, RuntimeValidationOption } from \"../../core/http/http.types\";\nimport { requestJson } from \"../../core/http/operation.helper\";\nimport type { operations } from \"../../generated/openapi-types\";\nimport { buildRequestQuery } from \"../requests/request.helpers\";\n\nconst OP_FIND_BY_REQUEST_ID = \"SecurePaymentController_findSecurePayment_v2\" as const;\nconst OP_CREATE = \"SecurePaymentController_createSecurePayment_v2\" as const;\nconst OP_GET_BY_TOKEN = \"SecurePaymentController_getSecurePaymentByToken_v2\" as const;\nconst PATH_BASE = \"/v2/secure-payments\" as const;\n\ntype CreateSecurePaymentBody = operations[typeof OP_CREATE][\"requestBody\"][\"content\"][\"application/json\"];\ntype CreateSecurePaymentResponse = operations[typeof OP_CREATE][\"responses\"][201][\"content\"][\"application/json\"];\ntype FindSecurePaymentQuery = operations[typeof OP_FIND_BY_REQUEST_ID][\"parameters\"][\"query\"];\ntype FindSecurePaymentResponse = operations[typeof OP_FIND_BY_REQUEST_ID][\"responses\"][200][\"content\"][\"application/json\"];\ntype GetSecurePaymentByTokenQuery = NonNullable<operations[typeof OP_GET_BY_TOKEN][\"parameters\"][\"query\"]>;\ntype GetSecurePaymentByTokenResponse = operations[typeof OP_GET_BY_TOKEN][\"responses\"][200][\"content\"][\"application/json\"];\n\nexport interface SecurePaymentsOperationOptions {\n signal?: AbortSignal;\n timeoutMs?: number;\n validation?: RuntimeValidationOption;\n meta?: RequestOptions[\"meta\"];\n}\n\nexport type GetSecurePaymentByTokenOptions = SecurePaymentsOperationOptions & Partial<GetSecurePaymentByTokenQuery>;\n\nexport interface SecurePaymentsApi {\n create(body: CreateSecurePaymentBody, options?: SecurePaymentsOperationOptions): Promise<CreateSecurePaymentResponse>;\n findByRequestId(requestId: FindSecurePaymentQuery[\"requestId\"], options?: SecurePaymentsOperationOptions): Promise<FindSecurePaymentResponse>;\n getByToken(token: string, options?: GetSecurePaymentByTokenOptions): Promise<GetSecurePaymentByTokenResponse>;\n}\n\nexport function createSecurePaymentsApi(http: HttpClient): SecurePaymentsApi {\n return {\n async create(body, options) {\n return requestJson<CreateSecurePaymentResponse>(http, {\n operationId: OP_CREATE,\n method: \"POST\",\n path: PATH_BASE,\n body,\n requestSchemaKey: { operationId: OP_CREATE, kind: \"request\", variant: \"application/json\" },\n schemaKey: { operationId: OP_CREATE, kind: \"response\", status: 201 },\n description: \"Create secure payment\",\n signal: options?.signal,\n timeoutMs: options?.timeoutMs,\n validation: options?.validation,\n meta: options?.meta,\n });\n },\n\n async findByRequestId(requestId, options) {\n return requestJson<FindSecurePaymentResponse>(http, {\n operationId: OP_FIND_BY_REQUEST_ID,\n method: \"GET\",\n path: PATH_BASE,\n query: { requestId },\n schemaKey: { operationId: OP_FIND_BY_REQUEST_ID, kind: \"response\", status: 200 },\n description: \"Find secure payment by request ID\",\n signal: options?.signal,\n timeoutMs: options?.timeoutMs,\n validation: options?.validation,\n meta: options?.meta,\n });\n },\n\n async getByToken(token, options) {\n return requestJson<GetSecurePaymentByTokenResponse>(http, {\n operationId: OP_GET_BY_TOKEN,\n method: \"GET\",\n path: `${PATH_BASE}/${encodeURIComponent(token)}`,\n query: buildRequestQuery({ wallet: options?.wallet }),\n schemaKey: { operationId: OP_GET_BY_TOKEN, kind: \"response\", status: 200 },\n description: \"Get secure payment by token\",\n signal: options?.signal,\n timeoutMs: options?.timeoutMs,\n validation: options?.validation,\n meta: options?.meta,\n });\n },\n };\n}\n\nexport type {\n CreateSecurePaymentBody,\n CreateSecurePaymentResponse,\n FindSecurePaymentResponse,\n GetSecurePaymentByTokenResponse,\n};\n","// Auto-generated by scripts/generate-zod.mjs. Do not edit.\nimport { z } from 'zod';\n\nimport { schemaRegistry } from '../../../schema.registry';\n\nconst ErrorDetailSchema = z\n .object({\n message: z.string(),\n code: z.string().optional(),\n field: z.string().optional(),\n source: z\n .object({\n pointer: z.string().optional(),\n parameter: z.string().optional(),\n })\n .passthrough()\n .optional(),\n meta: z.record(z.unknown()).optional(),\n })\n .passthrough();\n\nconst ErrorEnvelopeSchema = z\n .object({\n status: z.number().optional(),\n statusCode: z.number().optional(),\n code: z.string().optional(),\n error: z.string().optional(),\n message: z\n .union([\n z.string(),\n z.array(z.union([z.string(), ErrorDetailSchema])),\n ErrorDetailSchema,\n ])\n .optional(),\n detail: z.unknown().optional(),\n errors: z.array(ErrorDetailSchema).optional(),\n requestId: z.string().optional(),\n correlationId: z.string().optional(),\n retryAfter: z.union([z.number(), z.string()]).optional(),\n retryAfterMs: z.number().optional(),\n meta: z.record(z.unknown()).optional(),\n })\n .passthrough();\n\n// GET /v2/secure-payments -> SecurePaymentController_findSecurePayment_v2 (200)\nexport const SecurePaymentController_findSecurePayment_v2_200 = z.object({ \"token\": z.string(), \"securePaymentUrl\": z.string(), \"status\": z.enum(['pending', 'completed', 'expired', 'invalidated']), \"paymentType\": z.enum(['single', 'batch']), \"createdAt\": z.string().nullable(), \"expiresAt\": z.string() }).passthrough();\nschemaRegistry.register({ key: { operationId: 'SecurePaymentController_findSecurePayment_v2', kind: 'response', status: 200 }, schema: SecurePaymentController_findSecurePayment_v2_200 });\n\n// GET /v2/secure-payments -> SecurePaymentController_findSecurePayment_v2 (404)\nexport const SecurePaymentController_findSecurePayment_v2_404 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'SecurePaymentController_findSecurePayment_v2', kind: 'response', status: 404 }, schema: SecurePaymentController_findSecurePayment_v2_404 });\n\n// GET /v2/secure-payments -> SecurePaymentController_findSecurePayment_v2 (429)\nexport const SecurePaymentController_findSecurePayment_v2_429 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'SecurePaymentController_findSecurePayment_v2', kind: 'response', status: 429 }, schema: SecurePaymentController_findSecurePayment_v2_429 });\n\n// POST /v2/secure-payments -> SecurePaymentController_createSecurePayment_v2 request (application/json)\nexport const SecurePaymentController_createSecurePayment_v2_Request = z.object({ \"requests\": z.array(z.object({ \"destinationId\": z.string(), \"amount\": z.string() }).passthrough()), \"feePercentage\": (z.string()).optional(), \"feeAddress\": (z.string()).optional() }).passthrough();\nschemaRegistry.register({ key: { operationId: 'SecurePaymentController_createSecurePayment_v2', kind: 'request', variant: 'application/json' }, schema: SecurePaymentController_createSecurePayment_v2_Request });\n\n// POST /v2/secure-payments -> SecurePaymentController_createSecurePayment_v2 (201)\nexport const SecurePaymentController_createSecurePayment_v2_201 = z.object({ \"requestIds\": z.array(z.string()), \"securePaymentUrl\": z.string(), \"token\": z.string() }).passthrough();\nschemaRegistry.register({ key: { operationId: 'SecurePaymentController_createSecurePayment_v2', kind: 'response', status: 201 }, schema: SecurePaymentController_createSecurePayment_v2_201 });\n\n// POST /v2/secure-payments -> SecurePaymentController_createSecurePayment_v2 (429)\nexport const SecurePaymentController_createSecurePayment_v2_429 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'SecurePaymentController_createSecurePayment_v2', kind: 'response', status: 429 }, schema: SecurePaymentController_createSecurePayment_v2_429 });\n\n// GET /v2/secure-payments/{token} -> SecurePaymentController_getSecurePaymentByToken_v2 (200)\nexport const SecurePaymentController_getSecurePaymentByToken_v2_200 = z.object({ \"paymentType\": z.enum(['single']), \"payee\": z.string(), \"network\": z.string(), \"amount\": z.string(), \"paymentCurrency\": z.string(), \"isNativeCurrency\": z.boolean(), \"status\": z.enum(['pending', 'completed', 'expired', 'invalidated']), \"destination\": z.object({ \"destinationId\": z.string(), \"payeeAddress\": z.string(), \"tokenAddress\": z.string(), \"walletAddress\": z.string(), \"network\": z.string() }).passthrough(), \"transactions\": z.array(z.unknown()), \"metadata\": (z.object({ \"stepsRequired\": z.number(), \"needsApproval\": z.boolean(), \"approvalTransactionIndex\": (z.number()).optional(), \"paymentTransactionIndex\": z.number(), \"hasEnoughBalance\": (z.boolean()).optional(), \"hasEnoughGas\": (z.boolean()).optional(), \"platformFee\": (z.object({ \"percentage\": z.string(), \"address\": z.string() }).passthrough()).optional() }).passthrough()).optional() }).passthrough();\nschemaRegistry.register({ key: { operationId: 'SecurePaymentController_getSecurePaymentByToken_v2', kind: 'response', status: 200 }, schema: SecurePaymentController_getSecurePaymentByToken_v2_200 });\n\n// GET /v2/secure-payments/{token} -> SecurePaymentController_getSecurePaymentByToken_v2 (403)\nexport const SecurePaymentController_getSecurePaymentByToken_v2_403 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'SecurePaymentController_getSecurePaymentByToken_v2', kind: 'response', status: 403 }, schema: SecurePaymentController_getSecurePaymentByToken_v2_403 });\n\n// GET /v2/secure-payments/{token} -> SecurePaymentController_getSecurePaymentByToken_v2 (404)\nexport const SecurePaymentController_getSecurePaymentByToken_v2_404 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'SecurePaymentController_getSecurePaymentByToken_v2', kind: 'response', status: 404 }, schema: SecurePaymentController_getSecurePaymentByToken_v2_404 });\n\n// GET /v2/secure-payments/{token} -> SecurePaymentController_getSecurePaymentByToken_v2 (409)\nexport const SecurePaymentController_getSecurePaymentByToken_v2_409 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'SecurePaymentController_getSecurePaymentByToken_v2', kind: 'response', status: 409 }, schema: SecurePaymentController_getSecurePaymentByToken_v2_409 });\n\n// GET /v2/secure-payments/{token} -> SecurePaymentController_getSecurePaymentByToken_v2 (429)\nexport const SecurePaymentController_getSecurePaymentByToken_v2_429 = ErrorEnvelopeSchema;\nschemaRegistry.register({ key: { operationId: 'SecurePaymentController_getSecurePaymentByToken_v2', kind: 'response', status: 429 }, schema: SecurePaymentController_getSecurePaymentByToken_v2_429 });\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { c as CurrenciesV1Api, d as CurrencyV1RequestOptions, G as GetConversionRoutesV1Query, L as ListCurrenciesV1Query, e as createCurrenciesV1Api } from './currencies.v1.facade-ROQlpyCp.mjs';
|
|
2
|
+
|
|
3
|
+
declare const index_CurrenciesV1Api: typeof CurrenciesV1Api;
|
|
4
|
+
declare const index_CurrencyV1RequestOptions: typeof CurrencyV1RequestOptions;
|
|
5
|
+
declare const index_GetConversionRoutesV1Query: typeof GetConversionRoutesV1Query;
|
|
6
|
+
declare const index_ListCurrenciesV1Query: typeof ListCurrenciesV1Query;
|
|
7
|
+
declare const index_createCurrenciesV1Api: typeof createCurrenciesV1Api;
|
|
8
|
+
declare namespace index {
|
|
9
|
+
export { index_CurrenciesV1Api as CurrenciesV1Api, index_CurrencyV1RequestOptions as CurrencyV1RequestOptions, index_GetConversionRoutesV1Query as GetConversionRoutesV1Query, index_ListCurrenciesV1Query as ListCurrenciesV1Query, index_createCurrenciesV1Api as createCurrenciesV1Api };
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { index as i };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { P as PayV1Api, a as PayV1OperationOptions, c as createPayV1Api } from './pay.v1.facade-wxvuDX9t.mjs';
|
|
2
|
+
|
|
3
|
+
declare const index_PayV1Api: typeof PayV1Api;
|
|
4
|
+
declare const index_PayV1OperationOptions: typeof PayV1OperationOptions;
|
|
5
|
+
declare const index_createPayV1Api: typeof createPayV1Api;
|
|
6
|
+
declare namespace index {
|
|
7
|
+
export { index_PayV1Api as PayV1Api, index_PayV1OperationOptions as PayV1OperationOptions, index_createPayV1Api as createPayV1Api };
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { index as i };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { P as PayerV1Api, a as PayerV1OperationOptions, c as createPayerV1Api } from './payer.v1.facade-Rcl1BBPl.mjs';
|
|
2
|
+
import { P as PayerV2Api, a as PayerV2OperationOptions, c as createPayerV2Api } from './payer.v2.facade-BqcIOIBY.mjs';
|
|
3
|
+
import { b as HttpClient } from './openapi-types-JhYQOcil.mjs';
|
|
4
|
+
|
|
5
|
+
type PayerOperationOptions = PayerV2OperationOptions;
|
|
6
|
+
interface PayerApi extends PayerV2Api {
|
|
7
|
+
legacy: PayerV1Api;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
declare function createPayerApi(http: HttpClient): PayerApi;
|
|
11
|
+
|
|
12
|
+
type index_PayerApi = PayerApi;
|
|
13
|
+
type index_PayerOperationOptions = PayerOperationOptions;
|
|
14
|
+
declare const index_PayerV1Api: typeof PayerV1Api;
|
|
15
|
+
declare const index_PayerV1OperationOptions: typeof PayerV1OperationOptions;
|
|
16
|
+
declare const index_PayerV2Api: typeof PayerV2Api;
|
|
17
|
+
declare const index_PayerV2OperationOptions: typeof PayerV2OperationOptions;
|
|
18
|
+
declare const index_createPayerApi: typeof createPayerApi;
|
|
19
|
+
declare const index_createPayerV1Api: typeof createPayerV1Api;
|
|
20
|
+
declare const index_createPayerV2Api: typeof createPayerV2Api;
|
|
21
|
+
declare namespace index {
|
|
22
|
+
export { type index_PayerApi as PayerApi, type index_PayerOperationOptions as PayerOperationOptions, index_PayerV1Api as PayerV1Api, index_PayerV1OperationOptions as PayerV1OperationOptions, index_PayerV2Api as PayerV2Api, index_PayerV2OperationOptions as PayerV2OperationOptions, index_createPayerApi as createPayerApi, index_createPayerV1Api as createPayerV1Api, index_createPayerV2Api as createPayerV2Api };
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { type PayerApi as P, type PayerOperationOptions as a, createPayerApi as c, index as i };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as operations, b as HttpClient } from './openapi-types-
|
|
1
|
+
import { o as operations, b as HttpClient } from './openapi-types-JhYQOcil.mjs';
|
|
2
2
|
|
|
3
3
|
type ClientIdListResponse = operations["ClientIdV2Controller_findAll_v2"]["responses"][200]["content"]["application/json"];
|
|
4
4
|
type ClientIdCreateBody = operations["ClientIdV2Controller_create_v2"]["requestBody"]["content"]["application/json"];
|