From 9f64a7df2cc6f5baca5108c3f314327576bc3c06 Mon Sep 17 00:00:00 2001 From: SDK Distribution Bot Date: Mon, 14 Sep 2026 05:23:13 +0000 Subject: [PATCH] feat: Update SDK from generator (2026-09-14) --- client/client.gen.ts | 4 +- client/client/index.ts | 2 + client/client/utils.gen.ts | 4 +- client/core/auth.gen.ts | 7 ++ client/core/params.gen.ts | 33 +++--- client/core/pathSerializer.gen.ts | 12 +-- client/core/queryKeySerializer.gen.ts | 2 +- client/core/types.gen.ts | 6 ++ client/core/utils.gen.ts | 8 +- client/index.ts | 4 +- client/sdk.gen.ts | 145 ++++++++++++++------------ client/types.gen.ts | 45 +++++++- package-lock.json | 4 +- package.json | 2 +- payjpv2.ts | 2 +- 15 files changed, 177 insertions(+), 103 deletions(-) diff --git a/client/client.gen.ts b/client/client.gen.ts index cab3c70..47828b7 100644 --- a/client/client.gen.ts +++ b/client/client.gen.ts @@ -1,6 +1,6 @@ // This file is auto-generated by @hey-api/openapi-ts -import { type ClientOptions, type Config, createClient, createConfig } from './client'; +import { type Client, type ClientOptions, type Config, createClient, createConfig } from './client'; import type { ClientOptions as ClientOptions2 } from './types.gen'; /** @@ -13,4 +13,4 @@ import type { ClientOptions as ClientOptions2 } from './types.gen'; */ export type CreateClientConfig = (override?: Config) => Config & T>; -export const client = createClient(createConfig()); +export const client: Client = createClient(createConfig()); diff --git a/client/client/index.ts b/client/client/index.ts index b295ede..8c69331 100644 --- a/client/client/index.ts +++ b/client/client/index.ts @@ -9,6 +9,8 @@ export { } from '../core/bodySerializer.gen'; export { buildClientParams } from '../core/params.gen'; export { serializeQueryKeyValue } from '../core/queryKeySerializer.gen'; +export type { ServerSentEventsResult } from '../core/serverSentEvents.gen'; +export type { ClientMeta } from '../core/types.gen'; export { createClient } from './client.gen'; export type { Client, diff --git a/client/client/utils.gen.ts b/client/client/utils.gen.ts index 7800fe4..d4a7284 100644 --- a/client/client/utils.gen.ts +++ b/client/client/utils.gen.ts @@ -14,8 +14,8 @@ import type { Client, ClientOptions, Config, RequestOptions } from './types.gen' export const createQuerySerializer = ({ parameters = {}, ...args -}: QuerySerializerOptions = {}) => { - const querySerializer = (queryParams: T) => { +}: QuerySerializerOptions = {}): ((queryParams: T) => string) => { + const querySerializer = (queryParams: T): string => { const search: string[] = []; if (queryParams && typeof queryParams === 'object') { for (const name in queryParams) { diff --git a/client/core/auth.gen.ts b/client/core/auth.gen.ts index 3ebf994..c663664 100644 --- a/client/core/auth.gen.ts +++ b/client/core/auth.gen.ts @@ -9,6 +9,13 @@ export interface Auth { * @default 'header' */ in?: 'header' | 'query' | 'cookie'; + /** + * A unique identifier for the security scheme. + * + * Defined only when there are multiple security schemes whose `Auth` + * shape would otherwise be identical. + */ + key?: string; /** * Header or query parameter name. * diff --git a/client/core/params.gen.ts b/client/core/params.gen.ts index 6478519..5e8908f 100644 --- a/client/core/params.gen.ts +++ b/client/core/params.gen.ts @@ -62,7 +62,7 @@ type KeyMap = Map< } >; -const buildKeyMap = (fields: FieldsConfig, map?: KeyMap): KeyMap => { +function buildKeyMap(fields: FieldsConfig, map?: KeyMap): KeyMap { if (!map) { map = new Map(); } @@ -85,26 +85,26 @@ const buildKeyMap = (fields: FieldsConfig, map?: KeyMap): KeyMap => { } return map; -}; +} interface Params { - body: unknown; + body?: unknown; headers: Record; path: Record; query: Record; } -const stripEmptySlots = (params: Params) => { +function stripEmptySlots(params: Params): void { for (const [slot, value] of Object.entries(params)) { + if (slot === 'body') continue; if (value && typeof value === 'object' && !Array.isArray(value) && !Object.keys(value).length) { delete params[slot as Slot]; } } -}; +} -export const buildClientParams = (args: ReadonlyArray, fields: FieldsConfig) => { +export function buildClientParams(args: ReadonlyArray, fields: FieldsConfig): Params { const params: Params = { - body: Object.create(null), headers: Object.create(null), path: Object.create(null), query: Object.create(null), @@ -112,6 +112,15 @@ export const buildClientParams = (args: ReadonlyArray, fields: FieldsCo const map = buildKeyMap(fields); + function writeSlot(slot: Slot, key: string, value: unknown): void { + let record = params[slot] as Record | undefined; + if (record === undefined) { + record = Object.create(null) as Record; + params[slot] = record; + } + record[key] = value; + } + let config: FieldsConfig[number] | undefined; for (const [index, arg] of args.entries()) { @@ -128,7 +137,7 @@ export const buildClientParams = (args: ReadonlyArray, fields: FieldsCo const field = map.get(config.key)!; const name = field.map || config.key; if (field.in) { - (params[field.in] as Record)[name] = arg; + writeSlot(field.in, name, arg); } } else { params.body = arg; @@ -140,7 +149,7 @@ export const buildClientParams = (args: ReadonlyArray, fields: FieldsCo if (field) { if (field.in) { const name = field.map || key; - (params[field.in] as Record)[name] = value; + writeSlot(field.in, name, value); } else { params[field.map] = value; } @@ -149,11 +158,11 @@ export const buildClientParams = (args: ReadonlyArray, fields: FieldsCo if (extra) { const [prefix, slot] = extra; - (params[slot] as Record)[key.slice(prefix.length)] = value; + writeSlot(slot, key.slice(prefix.length), value); } else if ('allowExtra' in config && config.allowExtra) { for (const [slot, allowed] of Object.entries(config.allowExtra)) { if (allowed) { - (params[slot as Slot] as Record)[key] = value; + writeSlot(slot as Slot, key, value); break; } } @@ -166,4 +175,4 @@ export const buildClientParams = (args: ReadonlyArray, fields: FieldsCo stripEmptySlots(params); return params; -}; +} diff --git a/client/core/pathSerializer.gen.ts b/client/core/pathSerializer.gen.ts index 994b284..fab1ed4 100644 --- a/client/core/pathSerializer.gen.ts +++ b/client/core/pathSerializer.gen.ts @@ -25,7 +25,7 @@ interface SerializePrimitiveParam extends SerializePrimitiveOptions { value: string; } -export const separatorArrayExplode = (style: ArraySeparatorStyle) => { +export const separatorArrayExplode = (style: ArraySeparatorStyle): '.' | ';' | ',' | '&' => { switch (style) { case 'label': return '.'; @@ -38,7 +38,7 @@ export const separatorArrayExplode = (style: ArraySeparatorStyle) => { } }; -export const separatorArrayNoExplode = (style: ArraySeparatorStyle) => { +export const separatorArrayNoExplode = (style: ArraySeparatorStyle): ',' | '|' | '%20' => { switch (style) { case 'form': return ','; @@ -51,7 +51,7 @@ export const separatorArrayNoExplode = (style: ArraySeparatorStyle) => { } }; -export const separatorObjectExplode = (style: ObjectSeparatorStyle) => { +export const separatorObjectExplode = (style: ObjectSeparatorStyle): '.' | ';' | ',' | '&' => { switch (style) { case 'label': return '.'; @@ -72,7 +72,7 @@ export const serializeArrayParam = ({ value, }: SerializeOptions & { value: unknown[]; -}) => { +}): string => { if (!explode) { const joinedValues = ( allowReserved ? value : value.map((v) => encodeURIComponent(v as string)) @@ -110,7 +110,7 @@ export const serializePrimitiveParam = ({ allowReserved, name, value, -}: SerializePrimitiveParam) => { +}: SerializePrimitiveParam): string => { if (value === undefined || value === null) { return ''; } @@ -134,7 +134,7 @@ export const serializeObjectParam = ({ }: SerializeOptions & { value: Record | Date; valueOnly?: boolean; -}) => { +}): string => { if (value instanceof Date) { return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`; } diff --git a/client/core/queryKeySerializer.gen.ts b/client/core/queryKeySerializer.gen.ts index 5000df6..773b065 100644 --- a/client/core/queryKeySerializer.gen.ts +++ b/client/core/queryKeySerializer.gen.ts @@ -14,7 +14,7 @@ export type JsonValue = /** * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes. */ -export const queryKeyJsonReplacer = (_key: string, value: unknown) => { +export const queryKeyJsonReplacer = (_key: string, value: unknown): unknown | undefined => { if (value === undefined || typeof value === 'function' || typeof value === 'symbol') { return undefined; } diff --git a/client/core/types.gen.ts b/client/core/types.gen.ts index 9efe71d..c657c85 100644 --- a/client/core/types.gen.ts +++ b/client/core/types.gen.ts @@ -91,6 +91,12 @@ export interface Config { responseValidator?: (data: unknown) => Promise; } +/** + * Arbitrary metadata passed through the `meta` request option. + */ +// eslint-disable-next-line @typescript-eslint/no-empty-object-type +export interface ClientMeta {} + type IsExactlyNeverOrNeverUndefined = [T] extends [never] ? true : [T] extends [never | undefined] diff --git a/client/core/utils.gen.ts b/client/core/utils.gen.ts index 9a4fec7..af56e07 100644 --- a/client/core/utils.gen.ts +++ b/client/core/utils.gen.ts @@ -13,9 +13,9 @@ export interface PathSerializer { url: string; } -export const PATH_PARAM_RE = /\{[^{}]+\}/g; +export const PATH_PARAM_RE: RegExp = /\{[^{}]+\}/g; -export const defaultPathSerializer = ({ path, url: _url }: PathSerializer) => { +export const defaultPathSerializer = ({ path, url: _url }: PathSerializer): string => { let url = _url; const matches = _url.match(PATH_PARAM_RE); if (matches) { @@ -94,7 +94,7 @@ export const getUrl = ({ query?: Record; querySerializer: QuerySerializer; url: string; -}) => { +}): string => { const pathUrl = _url.startsWith('/') ? _url : `/${_url}`; let url = (baseUrl ?? '') + pathUrl; if (path) { @@ -114,7 +114,7 @@ export function getValidRequestBody(options: { body?: unknown; bodySerializer?: BodySerializer | null; serializedBody?: unknown; -}) { +}): unknown { const hasBody = options.body !== undefined; const isSerializedBody = hasBody && options.bodySerializer; diff --git a/client/index.ts b/client/index.ts index 5d47c91..15136c3 100644 --- a/client/index.ts +++ b/client/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { attachPaymentMethod, cancelPaymentFlow, cancelSetupFlow, capturePaymentFlow, confirmPaymentFlow, createBalanceUrl, createCheckoutSession, createCustomer, createPaymentFlow, createPaymentMethod, createPaymentRefund, createPrice, createProduct, createSetupFlow, createStatementUrl, createTaxRate, deleteCustomer, deleteProduct, detachPaymentMethod, getAllBalances, getAllCheckoutSessionLineItems, getAllCheckoutSessions, getAllCustomers, getAllEvents, getAllPaymentDisputes, getAllPaymentFlows, getAllPaymentMethodConfigurations, getAllPaymentMethods, getAllPaymentRefunds, getAllPaymentTransactions, getAllPrices, getAllProducts, getAllSetupFlows, getAllStatements, getAllTaxRates, getAllTerms, getBalance, getCheckoutSession, getCustomer, getCustomerPaymentMethods, getEvent, getPaymentDispute, getPaymentFlow, getPaymentFlowRefunds, getPaymentMethod, getPaymentMethodByCard, getPaymentMethodConfiguration, getPaymentRefund, getPaymentTransaction, getPrice, getProduct, getSetupFlow, getStatement, getTaxRate, getTerm, type Options, updateCheckoutSession, updateCustomer, updatePaymentFlow, updatePaymentMethod, updatePaymentMethodConfiguration, updatePaymentRefund, updatePrice, updateProduct, updateSetupFlow, updateTaxRate } from './sdk.gen'; -export type { ApplePayConfigRequest, AttachPaymentMethodData, AttachPaymentMethodError, AttachPaymentMethodErrors, AttachPaymentMethodResponse, AttachPaymentMethodResponses, BalanceListResponse, BalanceResponse, BalanceState, BalanceUrlResponse, BankInfoResponse, CancelPaymentFlowData, CancelPaymentFlowError, CancelPaymentFlowErrors, CancelPaymentFlowResponse, CancelPaymentFlowResponses, CancelSetupFlowData, CancelSetupFlowError, CancelSetupFlowErrors, CancelSetupFlowResponse, CancelSetupFlowResponses, CaptureMethod, CapturePaymentFlowData, CapturePaymentFlowError, CapturePaymentFlowErrors, CapturePaymentFlowResponse, CapturePaymentFlowResponses, CardConfigRequest, CheckoutSessionCreateRequest, CheckoutSessionCustomerDetailsAddressResponse, CheckoutSessionCustomerDetailsResponse, CheckoutSessionDetailsResponse, CheckoutSessionLineItemDataResponse, CheckoutSessionLineItemListResponse, CheckoutSessionListResponse, CheckoutSessionMode, CheckoutSessionPaymentMethodOptionsCardRequest, CheckoutSessionPaymentMethodOptionsRequest, CheckoutSessionStatus, CheckoutSessionSubmitType, CheckoutSessionUiMode, CheckoutSessionUpdateRequest, ClientOptions, ConfirmPaymentFlowData, ConfirmPaymentFlowError, ConfirmPaymentFlowErrors, ConfirmPaymentFlowResponse, ConfirmPaymentFlowResponses, Country, CreateBalanceUrlData, CreateBalanceUrlError, CreateBalanceUrlErrors, CreateBalanceUrlResponse, CreateBalanceUrlResponses, CreateCheckoutSessionData, CreateCheckoutSessionError, CreateCheckoutSessionErrors, CreateCheckoutSessionResponse, CreateCheckoutSessionResponses, CreateCustomerData, CreateCustomerError, CreateCustomerErrors, CreateCustomerResponse, CreateCustomerResponses, CreatePaymentFlowData, CreatePaymentFlowError, CreatePaymentFlowErrors, CreatePaymentFlowResponse, CreatePaymentFlowResponses, CreatePaymentMethodData, CreatePaymentMethodError, CreatePaymentMethodErrors, CreatePaymentMethodResponse, CreatePaymentMethodResponses, CreatePaymentRefundData, CreatePaymentRefundError, CreatePaymentRefundErrors, CreatePaymentRefundResponse, CreatePaymentRefundResponses, CreatePriceData, CreatePriceError, CreatePriceErrors, CreatePriceResponse, CreatePriceResponses, CreateProductData, CreateProductError, CreateProductErrors, CreateProductResponse, CreateProductResponses, CreateSetupFlowData, CreateSetupFlowError, CreateSetupFlowErrors, CreateSetupFlowResponse, CreateSetupFlowResponses, CreateStatementUrlData, CreateStatementUrlError, CreateStatementUrlErrors, CreateStatementUrlResponse, CreateStatementUrlResponses, CreateTaxRateData, CreateTaxRateError, CreateTaxRateErrors, CreateTaxRateResponse, CreateTaxRateResponses, Currency, CustomerCreateRequest, CustomerCreation, CustomerListResponse, CustomerResponse, CustomerUpdateRequest, DeleteCustomerData, DeleteCustomerError, DeleteCustomerErrors, DeleteCustomerResponse, DeleteCustomerResponses, DeleteProductData, DeleteProductError, DeleteProductErrors, DeleteProductResponse, DeleteProductResponses, DetachPaymentMethodData, DetachPaymentMethodError, DetachPaymentMethodErrors, DetachPaymentMethodResponse, DetachPaymentMethodResponses, DisplayPreferenceRequest, ErrorResponse, EventListResponse, EventResponse, GetAllBalancesData, GetAllBalancesError, GetAllBalancesErrors, GetAllBalancesResponse, GetAllBalancesResponses, GetAllCheckoutSessionLineItemsData, GetAllCheckoutSessionLineItemsError, GetAllCheckoutSessionLineItemsErrors, GetAllCheckoutSessionLineItemsResponse, GetAllCheckoutSessionLineItemsResponses, GetAllCheckoutSessionsData, GetAllCheckoutSessionsError, GetAllCheckoutSessionsErrors, GetAllCheckoutSessionsResponse, GetAllCheckoutSessionsResponses, GetAllCustomersData, GetAllCustomersError, GetAllCustomersErrors, GetAllCustomersResponse, GetAllCustomersResponses, GetAllEventsData, GetAllEventsError, GetAllEventsErrors, GetAllEventsResponse, GetAllEventsResponses, GetAllPaymentDisputesData, GetAllPaymentDisputesError, GetAllPaymentDisputesErrors, GetAllPaymentDisputesResponse, GetAllPaymentDisputesResponses, GetAllPaymentFlowsData, GetAllPaymentFlowsError, GetAllPaymentFlowsErrors, GetAllPaymentFlowsResponse, GetAllPaymentFlowsResponses, GetAllPaymentMethodConfigurationsData, GetAllPaymentMethodConfigurationsError, GetAllPaymentMethodConfigurationsErrors, GetAllPaymentMethodConfigurationsResponse, GetAllPaymentMethodConfigurationsResponses, GetAllPaymentMethodsData, GetAllPaymentMethodsError, GetAllPaymentMethodsErrors, GetAllPaymentMethodsResponse, GetAllPaymentMethodsResponses, GetAllPaymentRefundsData, GetAllPaymentRefundsError, GetAllPaymentRefundsErrors, GetAllPaymentRefundsResponse, GetAllPaymentRefundsResponses, GetAllPaymentTransactionsData, GetAllPaymentTransactionsError, GetAllPaymentTransactionsErrors, GetAllPaymentTransactionsResponse, GetAllPaymentTransactionsResponses, GetAllPricesData, GetAllPricesError, GetAllPricesErrors, GetAllPricesResponse, GetAllPricesResponses, GetAllProductsData, GetAllProductsError, GetAllProductsErrors, GetAllProductsResponse, GetAllProductsResponses, GetAllSetupFlowsData, GetAllSetupFlowsError, GetAllSetupFlowsErrors, GetAllSetupFlowsResponse, GetAllSetupFlowsResponses, GetAllStatementsData, GetAllStatementsError, GetAllStatementsErrors, GetAllStatementsResponse, GetAllStatementsResponses, GetAllTaxRatesData, GetAllTaxRatesError, GetAllTaxRatesErrors, GetAllTaxRatesResponse, GetAllTaxRatesResponses, GetAllTermsData, GetAllTermsError, GetAllTermsErrors, GetAllTermsResponse, GetAllTermsResponses, GetBalanceData, GetBalanceError, GetBalanceErrors, GetBalanceResponse, GetBalanceResponses, GetCheckoutSessionData, GetCheckoutSessionError, GetCheckoutSessionErrors, GetCheckoutSessionResponse, GetCheckoutSessionResponses, GetCustomerData, GetCustomerError, GetCustomerErrors, GetCustomerPaymentMethodsData, GetCustomerPaymentMethodsError, GetCustomerPaymentMethodsErrors, GetCustomerPaymentMethodsResponse, GetCustomerPaymentMethodsResponses, GetCustomerResponse, GetCustomerResponses, GetEventData, GetEventError, GetEventErrors, GetEventResponse, GetEventResponses, GetPaymentDisputeData, GetPaymentDisputeError, GetPaymentDisputeErrors, GetPaymentDisputeResponse, GetPaymentDisputeResponses, GetPaymentFlowData, GetPaymentFlowError, GetPaymentFlowErrors, GetPaymentFlowRefundsData, GetPaymentFlowRefundsError, GetPaymentFlowRefundsErrors, GetPaymentFlowRefundsResponse, GetPaymentFlowRefundsResponses, GetPaymentFlowResponse, GetPaymentFlowResponses, GetPaymentMethodByCardData, GetPaymentMethodByCardError, GetPaymentMethodByCardErrors, GetPaymentMethodByCardResponse, GetPaymentMethodByCardResponses, GetPaymentMethodConfigurationData, GetPaymentMethodConfigurationError, GetPaymentMethodConfigurationErrors, GetPaymentMethodConfigurationResponse, GetPaymentMethodConfigurationResponses, GetPaymentMethodData, GetPaymentMethodError, GetPaymentMethodErrors, GetPaymentMethodResponse, GetPaymentMethodResponses, GetPaymentRefundData, GetPaymentRefundError, GetPaymentRefundErrors, GetPaymentRefundResponse, GetPaymentRefundResponses, GetPaymentTransactionData, GetPaymentTransactionError, GetPaymentTransactionErrors, GetPaymentTransactionResponse, GetPaymentTransactionResponses, GetPriceData, GetPriceError, GetPriceErrors, GetPriceResponse, GetPriceResponses, GetProductData, GetProductError, GetProductErrors, GetProductResponse, GetProductResponses, GetSetupFlowData, GetSetupFlowError, GetSetupFlowErrors, GetSetupFlowResponse, GetSetupFlowResponses, GetStatementData, GetStatementError, GetStatementErrors, GetStatementResponse, GetStatementResponses, GetTaxRateData, GetTaxRateError, GetTaxRateErrors, GetTaxRateResponse, GetTaxRateResponses, GetTermData, GetTermError, GetTermErrors, GetTermResponse, GetTermResponses, LineItemRequest, Locale, PaymentDisputeListResponse, PaymentDisputeReason, PaymentDisputeResponse, PaymentDisputeStatus, PaymentFlowCancellationReason, PaymentFlowCancelRequest, PaymentFlowCaptureRequest, PaymentFlowConfirmRequest, PaymentFlowCreateRequest, PaymentFlowDataRequest, PaymentFlowListResponse, PaymentFlowPaymentMethodOptionsCardRequest, PaymentFlowPaymentMethodOptionsRequest, PaymentFlowResponse, PaymentFlowStatus, PaymentFlowUpdateRequest, PaymentMethodApplePayCreateRequest, PaymentMethodApplePayUpdateRequest, PaymentMethodAttachRequest, PaymentMethodBillingAddressRequest, PaymentMethodBillingAddressResponse, PaymentMethodBillingDetailsRequest, PaymentMethodBillingDetailsResponse, PaymentMethodCardBillingDetailsRequest, PaymentMethodCardCreateRequest, PaymentMethodCardDetailsResponse, PaymentMethodCardResponse, PaymentMethodCardUpdateRequest, PaymentMethodConfigurationDetailsResponse, PaymentMethodConfigurationDisplayPreference, PaymentMethodConfigurationListResponse, PaymentMethodConfigurationSettingResponse, PaymentMethodConfigurationUpdateRequest, PaymentMethodCreateCardDetailsRequest, PaymentMethodCreateRequest, PaymentMethodListResponse, PaymentMethodPayPayCreateRequest, PaymentMethodPayPayResponse, PaymentMethodPayPayUpdateRequest, PaymentMethodResponse, PaymentMethodTypes, PaymentMethodUpdateRequest, PaymentRefundCreateRequest, PaymentRefundListResponse, PaymentRefundReason, PaymentRefundResponse, PaymentRefundStatus, PaymentRefundUpdateRequest, PaymentTransactionListResponse, PaymentTransactionResponse, PaymentTransactionType, PayPayConfigRequest, PriceCreateRequest, PriceDataRequest, PriceDetailsResponse, PriceListResponse, PriceType, PriceUpdateRequest, ProductCreateRequest, ProductDataRequest, ProductDeletedResponse, ProductDetailsResponse, ProductListResponse, ProductUpdateRequest, SetupFlowCancellationReason, SetupFlowCancelRequest, SetupFlowCreateRequest, SetupFlowDataRequest, SetupFlowListResponse, SetupFlowPaymentMethodOptionsCardRequest, SetupFlowPaymentMethodOptionsRequest, SetupFlowResponse, SetupFlowStatus, SetupFlowUpdateRequest, StatementItemResponse, StatementListResponse, StatementResponse, StatementSubject, StatementType, StatementUrlResponse, TaxRateCreateRequest, TaxRateDetailsResponse, TaxRateListResponse, TaxRateUpdateRequest, TermListResponse, TermResponse, UpdateCheckoutSessionData, UpdateCheckoutSessionError, UpdateCheckoutSessionErrors, UpdateCheckoutSessionResponse, UpdateCheckoutSessionResponses, UpdateCustomerData, UpdateCustomerError, UpdateCustomerErrors, UpdateCustomerResponse, UpdateCustomerResponses, UpdatePaymentFlowData, UpdatePaymentFlowError, UpdatePaymentFlowErrors, UpdatePaymentFlowResponse, UpdatePaymentFlowResponses, UpdatePaymentMethodConfigurationData, UpdatePaymentMethodConfigurationError, UpdatePaymentMethodConfigurationErrors, UpdatePaymentMethodConfigurationResponse, UpdatePaymentMethodConfigurationResponses, UpdatePaymentMethodData, UpdatePaymentMethodError, UpdatePaymentMethodErrors, UpdatePaymentMethodResponse, UpdatePaymentMethodResponses, UpdatePaymentRefundData, UpdatePaymentRefundError, UpdatePaymentRefundErrors, UpdatePaymentRefundResponse, UpdatePaymentRefundResponses, UpdatePriceData, UpdatePriceError, UpdatePriceErrors, UpdatePriceResponse, UpdatePriceResponses, UpdateProductData, UpdateProductError, UpdateProductErrors, UpdateProductResponse, UpdateProductResponses, UpdateSetupFlowData, UpdateSetupFlowError, UpdateSetupFlowErrors, UpdateSetupFlowResponse, UpdateSetupFlowResponses, UpdateTaxRateData, UpdateTaxRateError, UpdateTaxRateErrors, UpdateTaxRateResponse, UpdateTaxRateResponses, Usage } from './types.gen'; +export { attachPaymentMethod, cancelPaymentFlow, cancelSetupFlow, capturePaymentFlow, confirmPaymentFlow, createBalanceUrl, createCheckoutSession, createCustomer, createPaymentFlow, createPaymentMethod, createPaymentRefund, createPrice, createProduct, createSetupFlow, createStatementUrl, createTaxRate, deleteCustomer, deleteProduct, detachPaymentMethod, expireCheckoutSession, getAllBalances, getAllCheckoutSessionLineItems, getAllCheckoutSessions, getAllCustomers, getAllEvents, getAllPaymentDisputes, getAllPaymentFlows, getAllPaymentMethodConfigurations, getAllPaymentMethods, getAllPaymentRefunds, getAllPaymentTransactions, getAllPrices, getAllProducts, getAllSetupFlows, getAllStatements, getAllTaxRates, getAllTerms, getBalance, getCheckoutSession, getCustomer, getCustomerPaymentMethods, getEvent, getPaymentDispute, getPaymentFlow, getPaymentFlowRefunds, getPaymentMethod, getPaymentMethodByCard, getPaymentMethodConfiguration, getPaymentRefund, getPaymentTransaction, getPrice, getProduct, getSetupFlow, getStatement, getTaxRate, getTerm, type Options, updateCheckoutSession, updateCustomer, updatePaymentFlow, updatePaymentMethod, updatePaymentMethodConfiguration, updatePaymentRefund, updatePrice, updateProduct, updateSetupFlow, updateTaxRate } from './sdk.gen'; +export type { ApplePayConfigRequest, AttachPaymentMethodData, AttachPaymentMethodError, AttachPaymentMethodErrors, AttachPaymentMethodResponse, AttachPaymentMethodResponses, BalanceListResponse, BalanceResponse, BalanceState, BalanceUrlResponse, BankInfoResponse, CancelPaymentFlowData, CancelPaymentFlowError, CancelPaymentFlowErrors, CancelPaymentFlowResponse, CancelPaymentFlowResponses, CancelSetupFlowData, CancelSetupFlowError, CancelSetupFlowErrors, CancelSetupFlowResponse, CancelSetupFlowResponses, CaptureMethod, CapturePaymentFlowData, CapturePaymentFlowError, CapturePaymentFlowErrors, CapturePaymentFlowResponse, CapturePaymentFlowResponses, CardConfigRequest, CheckoutSessionCreateRequest, CheckoutSessionCustomerDetailsAddressResponse, CheckoutSessionCustomerDetailsResponse, CheckoutSessionDetailsResponse, CheckoutSessionLineItemDataResponse, CheckoutSessionLineItemListResponse, CheckoutSessionListResponse, CheckoutSessionMode, CheckoutSessionPaymentMethodOptionsCardRequest, CheckoutSessionPaymentMethodOptionsRequest, CheckoutSessionStatus, CheckoutSessionSubmitType, CheckoutSessionUiMode, CheckoutSessionUpdateRequest, ClientOptions, ConfirmPaymentFlowData, ConfirmPaymentFlowError, ConfirmPaymentFlowErrors, ConfirmPaymentFlowResponse, ConfirmPaymentFlowResponses, Country, CreateBalanceUrlData, CreateBalanceUrlError, CreateBalanceUrlErrors, CreateBalanceUrlResponse, CreateBalanceUrlResponses, CreateCheckoutSessionData, CreateCheckoutSessionError, CreateCheckoutSessionErrors, CreateCheckoutSessionResponse, CreateCheckoutSessionResponses, CreateCustomerData, CreateCustomerError, CreateCustomerErrors, CreateCustomerResponse, CreateCustomerResponses, CreatePaymentFlowData, CreatePaymentFlowError, CreatePaymentFlowErrors, CreatePaymentFlowResponse, CreatePaymentFlowResponses, CreatePaymentMethodData, CreatePaymentMethodError, CreatePaymentMethodErrors, CreatePaymentMethodResponse, CreatePaymentMethodResponses, CreatePaymentRefundData, CreatePaymentRefundError, CreatePaymentRefundErrors, CreatePaymentRefundResponse, CreatePaymentRefundResponses, CreatePriceData, CreatePriceError, CreatePriceErrors, CreatePriceResponse, CreatePriceResponses, CreateProductData, CreateProductError, CreateProductErrors, CreateProductResponse, CreateProductResponses, CreateSetupFlowData, CreateSetupFlowError, CreateSetupFlowErrors, CreateSetupFlowResponse, CreateSetupFlowResponses, CreateStatementUrlData, CreateStatementUrlError, CreateStatementUrlErrors, CreateStatementUrlResponse, CreateStatementUrlResponses, CreateTaxRateData, CreateTaxRateError, CreateTaxRateErrors, CreateTaxRateResponse, CreateTaxRateResponses, Currency, CustomerCreateRequest, CustomerCreation, CustomerListResponse, CustomerResponse, CustomerUpdateRequest, DeleteCustomerData, DeleteCustomerError, DeleteCustomerErrors, DeleteCustomerResponse, DeleteCustomerResponses, DeleteProductData, DeleteProductError, DeleteProductErrors, DeleteProductResponse, DeleteProductResponses, DetachPaymentMethodData, DetachPaymentMethodError, DetachPaymentMethodErrors, DetachPaymentMethodResponse, DetachPaymentMethodResponses, DisplayPreferenceRequest, ErrorResponse, EventListResponse, EventResponse, ExpireCheckoutSessionData, ExpireCheckoutSessionError, ExpireCheckoutSessionErrors, ExpireCheckoutSessionResponse, ExpireCheckoutSessionResponses, GetAllBalancesData, GetAllBalancesError, GetAllBalancesErrors, GetAllBalancesResponse, GetAllBalancesResponses, GetAllCheckoutSessionLineItemsData, GetAllCheckoutSessionLineItemsError, GetAllCheckoutSessionLineItemsErrors, GetAllCheckoutSessionLineItemsResponse, GetAllCheckoutSessionLineItemsResponses, GetAllCheckoutSessionsData, GetAllCheckoutSessionsError, GetAllCheckoutSessionsErrors, GetAllCheckoutSessionsResponse, GetAllCheckoutSessionsResponses, GetAllCustomersData, GetAllCustomersError, GetAllCustomersErrors, GetAllCustomersResponse, GetAllCustomersResponses, GetAllEventsData, GetAllEventsError, GetAllEventsErrors, GetAllEventsResponse, GetAllEventsResponses, GetAllPaymentDisputesData, GetAllPaymentDisputesError, GetAllPaymentDisputesErrors, GetAllPaymentDisputesResponse, GetAllPaymentDisputesResponses, GetAllPaymentFlowsData, GetAllPaymentFlowsError, GetAllPaymentFlowsErrors, GetAllPaymentFlowsResponse, GetAllPaymentFlowsResponses, GetAllPaymentMethodConfigurationsData, GetAllPaymentMethodConfigurationsError, GetAllPaymentMethodConfigurationsErrors, GetAllPaymentMethodConfigurationsResponse, GetAllPaymentMethodConfigurationsResponses, GetAllPaymentMethodsData, GetAllPaymentMethodsError, GetAllPaymentMethodsErrors, GetAllPaymentMethodsResponse, GetAllPaymentMethodsResponses, GetAllPaymentRefundsData, GetAllPaymentRefundsError, GetAllPaymentRefundsErrors, GetAllPaymentRefundsResponse, GetAllPaymentRefundsResponses, GetAllPaymentTransactionsData, GetAllPaymentTransactionsError, GetAllPaymentTransactionsErrors, GetAllPaymentTransactionsResponse, GetAllPaymentTransactionsResponses, GetAllPricesData, GetAllPricesError, GetAllPricesErrors, GetAllPricesResponse, GetAllPricesResponses, GetAllProductsData, GetAllProductsError, GetAllProductsErrors, GetAllProductsResponse, GetAllProductsResponses, GetAllSetupFlowsData, GetAllSetupFlowsError, GetAllSetupFlowsErrors, GetAllSetupFlowsResponse, GetAllSetupFlowsResponses, GetAllStatementsData, GetAllStatementsError, GetAllStatementsErrors, GetAllStatementsResponse, GetAllStatementsResponses, GetAllTaxRatesData, GetAllTaxRatesError, GetAllTaxRatesErrors, GetAllTaxRatesResponse, GetAllTaxRatesResponses, GetAllTermsData, GetAllTermsError, GetAllTermsErrors, GetAllTermsResponse, GetAllTermsResponses, GetBalanceData, GetBalanceError, GetBalanceErrors, GetBalanceResponse, GetBalanceResponses, GetCheckoutSessionData, GetCheckoutSessionError, GetCheckoutSessionErrors, GetCheckoutSessionResponse, GetCheckoutSessionResponses, GetCustomerData, GetCustomerError, GetCustomerErrors, GetCustomerPaymentMethodsData, GetCustomerPaymentMethodsError, GetCustomerPaymentMethodsErrors, GetCustomerPaymentMethodsResponse, GetCustomerPaymentMethodsResponses, GetCustomerResponse, GetCustomerResponses, GetEventData, GetEventError, GetEventErrors, GetEventResponse, GetEventResponses, GetPaymentDisputeData, GetPaymentDisputeError, GetPaymentDisputeErrors, GetPaymentDisputeResponse, GetPaymentDisputeResponses, GetPaymentFlowData, GetPaymentFlowError, GetPaymentFlowErrors, GetPaymentFlowRefundsData, GetPaymentFlowRefundsError, GetPaymentFlowRefundsErrors, GetPaymentFlowRefundsResponse, GetPaymentFlowRefundsResponses, GetPaymentFlowResponse, GetPaymentFlowResponses, GetPaymentMethodByCardData, GetPaymentMethodByCardError, GetPaymentMethodByCardErrors, GetPaymentMethodByCardResponse, GetPaymentMethodByCardResponses, GetPaymentMethodConfigurationData, GetPaymentMethodConfigurationError, GetPaymentMethodConfigurationErrors, GetPaymentMethodConfigurationResponse, GetPaymentMethodConfigurationResponses, GetPaymentMethodData, GetPaymentMethodError, GetPaymentMethodErrors, GetPaymentMethodResponse, GetPaymentMethodResponses, GetPaymentRefundData, GetPaymentRefundError, GetPaymentRefundErrors, GetPaymentRefundResponse, GetPaymentRefundResponses, GetPaymentTransactionData, GetPaymentTransactionError, GetPaymentTransactionErrors, GetPaymentTransactionResponse, GetPaymentTransactionResponses, GetPriceData, GetPriceError, GetPriceErrors, GetPriceResponse, GetPriceResponses, GetProductData, GetProductError, GetProductErrors, GetProductResponse, GetProductResponses, GetSetupFlowData, GetSetupFlowError, GetSetupFlowErrors, GetSetupFlowResponse, GetSetupFlowResponses, GetStatementData, GetStatementError, GetStatementErrors, GetStatementResponse, GetStatementResponses, GetTaxRateData, GetTaxRateError, GetTaxRateErrors, GetTaxRateResponse, GetTaxRateResponses, GetTermData, GetTermError, GetTermErrors, GetTermResponse, GetTermResponses, LineItemRequest, Locale, PaymentDisputeListResponse, PaymentDisputeReason, PaymentDisputeResponse, PaymentDisputeStatus, PaymentFlowCancellationReason, PaymentFlowCancelRequest, PaymentFlowCaptureRequest, PaymentFlowConfirmRequest, PaymentFlowCreateRequest, PaymentFlowDataRequest, PaymentFlowListResponse, PaymentFlowPaymentMethodOptionsCardRequest, PaymentFlowPaymentMethodOptionsRequest, PaymentFlowResponse, PaymentFlowStatus, PaymentFlowUpdateRequest, PaymentMethodApplePayCreateRequest, PaymentMethodApplePayUpdateRequest, PaymentMethodAttachRequest, PaymentMethodBillingAddressRequest, PaymentMethodBillingAddressResponse, PaymentMethodBillingDetailsRequest, PaymentMethodBillingDetailsResponse, PaymentMethodCardBillingDetailsRequest, PaymentMethodCardCreateRequest, PaymentMethodCardDetailsResponse, PaymentMethodCardResponse, PaymentMethodCardUpdateRequest, PaymentMethodConfigurationDetailsResponse, PaymentMethodConfigurationDisplayPreference, PaymentMethodConfigurationListResponse, PaymentMethodConfigurationSettingResponse, PaymentMethodConfigurationUpdateRequest, PaymentMethodCreateCardDetailsRequest, PaymentMethodCreateRequest, PaymentMethodListResponse, PaymentMethodPayPayCreateRequest, PaymentMethodPayPayResponse, PaymentMethodPayPayUpdateRequest, PaymentMethodResponse, PaymentMethodTypes, PaymentMethodUpdateRequest, PaymentRefundCreateRequest, PaymentRefundListResponse, PaymentRefundReason, PaymentRefundResponse, PaymentRefundStatus, PaymentRefundUpdateRequest, PaymentTransactionListResponse, PaymentTransactionResponse, PaymentTransactionType, PayPayConfigRequest, PriceCreateRequest, PriceDataRequest, PriceDetailsResponse, PriceListResponse, PriceType, PriceUpdateRequest, ProductCreateRequest, ProductDataRequest, ProductDeletedResponse, ProductDetailsResponse, ProductListResponse, ProductUpdateRequest, SetupFlowCancellationReason, SetupFlowCancelRequest, SetupFlowCreateRequest, SetupFlowDataRequest, SetupFlowListResponse, SetupFlowPaymentMethodOptionsCardRequest, SetupFlowPaymentMethodOptionsRequest, SetupFlowResponse, SetupFlowStatus, SetupFlowUpdateRequest, StatementItemResponse, StatementListResponse, StatementResponse, StatementSubject, StatementType, StatementUrlResponse, TaxRateCreateRequest, TaxRateDetailsResponse, TaxRateListResponse, TaxRateUpdateRequest, TermListResponse, TermResponse, UpdateCheckoutSessionData, UpdateCheckoutSessionError, UpdateCheckoutSessionErrors, UpdateCheckoutSessionResponse, UpdateCheckoutSessionResponses, UpdateCustomerData, UpdateCustomerError, UpdateCustomerErrors, UpdateCustomerResponse, UpdateCustomerResponses, UpdatePaymentFlowData, UpdatePaymentFlowError, UpdatePaymentFlowErrors, UpdatePaymentFlowResponse, UpdatePaymentFlowResponses, UpdatePaymentMethodConfigurationData, UpdatePaymentMethodConfigurationError, UpdatePaymentMethodConfigurationErrors, UpdatePaymentMethodConfigurationResponse, UpdatePaymentMethodConfigurationResponses, UpdatePaymentMethodData, UpdatePaymentMethodError, UpdatePaymentMethodErrors, UpdatePaymentMethodResponse, UpdatePaymentMethodResponses, UpdatePaymentRefundData, UpdatePaymentRefundError, UpdatePaymentRefundErrors, UpdatePaymentRefundResponse, UpdatePaymentRefundResponses, UpdatePriceData, UpdatePriceError, UpdatePriceErrors, UpdatePriceResponse, UpdatePriceResponses, UpdateProductData, UpdateProductError, UpdateProductErrors, UpdateProductResponse, UpdateProductResponses, UpdateSetupFlowData, UpdateSetupFlowError, UpdateSetupFlowErrors, UpdateSetupFlowResponse, UpdateSetupFlowResponses, UpdateTaxRateData, UpdateTaxRateError, UpdateTaxRateErrors, UpdateTaxRateResponse, UpdateTaxRateResponses, Usage } from './types.gen'; diff --git a/client/sdk.gen.ts b/client/sdk.gen.ts index e763935..5312319 100644 --- a/client/sdk.gen.ts +++ b/client/sdk.gen.ts @@ -1,8 +1,8 @@ // This file is auto-generated by @hey-api/openapi-ts -import type { Client, Options as Options2, TDataShape } from './client'; +import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client'; import { client } from './client.gen'; -import type { AttachPaymentMethodData, AttachPaymentMethodErrors, AttachPaymentMethodResponses, CancelPaymentFlowData, CancelPaymentFlowErrors, CancelPaymentFlowResponses, CancelSetupFlowData, CancelSetupFlowErrors, CancelSetupFlowResponses, CapturePaymentFlowData, CapturePaymentFlowErrors, CapturePaymentFlowResponses, ConfirmPaymentFlowData, ConfirmPaymentFlowErrors, ConfirmPaymentFlowResponses, CreateBalanceUrlData, CreateBalanceUrlErrors, CreateBalanceUrlResponses, CreateCheckoutSessionData, CreateCheckoutSessionErrors, CreateCheckoutSessionResponses, CreateCustomerData, CreateCustomerErrors, CreateCustomerResponses, CreatePaymentFlowData, CreatePaymentFlowErrors, CreatePaymentFlowResponses, CreatePaymentMethodData, CreatePaymentMethodErrors, CreatePaymentMethodResponses, CreatePaymentRefundData, CreatePaymentRefundErrors, CreatePaymentRefundResponses, CreatePriceData, CreatePriceErrors, CreatePriceResponses, CreateProductData, CreateProductErrors, CreateProductResponses, CreateSetupFlowData, CreateSetupFlowErrors, CreateSetupFlowResponses, CreateStatementUrlData, CreateStatementUrlErrors, CreateStatementUrlResponses, CreateTaxRateData, CreateTaxRateErrors, CreateTaxRateResponses, DeleteCustomerData, DeleteCustomerErrors, DeleteCustomerResponses, DeleteProductData, DeleteProductErrors, DeleteProductResponses, DetachPaymentMethodData, DetachPaymentMethodErrors, DetachPaymentMethodResponses, GetAllBalancesData, GetAllBalancesErrors, GetAllBalancesResponses, GetAllCheckoutSessionLineItemsData, GetAllCheckoutSessionLineItemsErrors, GetAllCheckoutSessionLineItemsResponses, GetAllCheckoutSessionsData, GetAllCheckoutSessionsErrors, GetAllCheckoutSessionsResponses, GetAllCustomersData, GetAllCustomersErrors, GetAllCustomersResponses, GetAllEventsData, GetAllEventsErrors, GetAllEventsResponses, GetAllPaymentDisputesData, GetAllPaymentDisputesErrors, GetAllPaymentDisputesResponses, GetAllPaymentFlowsData, GetAllPaymentFlowsErrors, GetAllPaymentFlowsResponses, GetAllPaymentMethodConfigurationsData, GetAllPaymentMethodConfigurationsErrors, GetAllPaymentMethodConfigurationsResponses, GetAllPaymentMethodsData, GetAllPaymentMethodsErrors, GetAllPaymentMethodsResponses, GetAllPaymentRefundsData, GetAllPaymentRefundsErrors, GetAllPaymentRefundsResponses, GetAllPaymentTransactionsData, GetAllPaymentTransactionsErrors, GetAllPaymentTransactionsResponses, GetAllPricesData, GetAllPricesErrors, GetAllPricesResponses, GetAllProductsData, GetAllProductsErrors, GetAllProductsResponses, GetAllSetupFlowsData, GetAllSetupFlowsErrors, GetAllSetupFlowsResponses, GetAllStatementsData, GetAllStatementsErrors, GetAllStatementsResponses, GetAllTaxRatesData, GetAllTaxRatesErrors, GetAllTaxRatesResponses, GetAllTermsData, GetAllTermsErrors, GetAllTermsResponses, GetBalanceData, GetBalanceErrors, GetBalanceResponses, GetCheckoutSessionData, GetCheckoutSessionErrors, GetCheckoutSessionResponses, GetCustomerData, GetCustomerErrors, GetCustomerPaymentMethodsData, GetCustomerPaymentMethodsErrors, GetCustomerPaymentMethodsResponses, GetCustomerResponses, GetEventData, GetEventErrors, GetEventResponses, GetPaymentDisputeData, GetPaymentDisputeErrors, GetPaymentDisputeResponses, GetPaymentFlowData, GetPaymentFlowErrors, GetPaymentFlowRefundsData, GetPaymentFlowRefundsErrors, GetPaymentFlowRefundsResponses, GetPaymentFlowResponses, GetPaymentMethodByCardData, GetPaymentMethodByCardErrors, GetPaymentMethodByCardResponses, GetPaymentMethodConfigurationData, GetPaymentMethodConfigurationErrors, GetPaymentMethodConfigurationResponses, GetPaymentMethodData, GetPaymentMethodErrors, GetPaymentMethodResponses, GetPaymentRefundData, GetPaymentRefundErrors, GetPaymentRefundResponses, GetPaymentTransactionData, GetPaymentTransactionErrors, GetPaymentTransactionResponses, GetPriceData, GetPriceErrors, GetPriceResponses, GetProductData, GetProductErrors, GetProductResponses, GetSetupFlowData, GetSetupFlowErrors, GetSetupFlowResponses, GetStatementData, GetStatementErrors, GetStatementResponses, GetTaxRateData, GetTaxRateErrors, GetTaxRateResponses, GetTermData, GetTermErrors, GetTermResponses, UpdateCheckoutSessionData, UpdateCheckoutSessionErrors, UpdateCheckoutSessionResponses, UpdateCustomerData, UpdateCustomerErrors, UpdateCustomerResponses, UpdatePaymentFlowData, UpdatePaymentFlowErrors, UpdatePaymentFlowResponses, UpdatePaymentMethodConfigurationData, UpdatePaymentMethodConfigurationErrors, UpdatePaymentMethodConfigurationResponses, UpdatePaymentMethodData, UpdatePaymentMethodErrors, UpdatePaymentMethodResponses, UpdatePaymentRefundData, UpdatePaymentRefundErrors, UpdatePaymentRefundResponses, UpdatePriceData, UpdatePriceErrors, UpdatePriceResponses, UpdateProductData, UpdateProductErrors, UpdateProductResponses, UpdateSetupFlowData, UpdateSetupFlowErrors, UpdateSetupFlowResponses, UpdateTaxRateData, UpdateTaxRateErrors, UpdateTaxRateResponses } from './types.gen'; +import type { AttachPaymentMethodData, AttachPaymentMethodErrors, AttachPaymentMethodResponses, CancelPaymentFlowData, CancelPaymentFlowErrors, CancelPaymentFlowResponses, CancelSetupFlowData, CancelSetupFlowErrors, CancelSetupFlowResponses, CapturePaymentFlowData, CapturePaymentFlowErrors, CapturePaymentFlowResponses, ConfirmPaymentFlowData, ConfirmPaymentFlowErrors, ConfirmPaymentFlowResponses, CreateBalanceUrlData, CreateBalanceUrlErrors, CreateBalanceUrlResponses, CreateCheckoutSessionData, CreateCheckoutSessionErrors, CreateCheckoutSessionResponses, CreateCustomerData, CreateCustomerErrors, CreateCustomerResponses, CreatePaymentFlowData, CreatePaymentFlowErrors, CreatePaymentFlowResponses, CreatePaymentMethodData, CreatePaymentMethodErrors, CreatePaymentMethodResponses, CreatePaymentRefundData, CreatePaymentRefundErrors, CreatePaymentRefundResponses, CreatePriceData, CreatePriceErrors, CreatePriceResponses, CreateProductData, CreateProductErrors, CreateProductResponses, CreateSetupFlowData, CreateSetupFlowErrors, CreateSetupFlowResponses, CreateStatementUrlData, CreateStatementUrlErrors, CreateStatementUrlResponses, CreateTaxRateData, CreateTaxRateErrors, CreateTaxRateResponses, DeleteCustomerData, DeleteCustomerErrors, DeleteCustomerResponses, DeleteProductData, DeleteProductErrors, DeleteProductResponses, DetachPaymentMethodData, DetachPaymentMethodErrors, DetachPaymentMethodResponses, ExpireCheckoutSessionData, ExpireCheckoutSessionErrors, ExpireCheckoutSessionResponses, GetAllBalancesData, GetAllBalancesErrors, GetAllBalancesResponses, GetAllCheckoutSessionLineItemsData, GetAllCheckoutSessionLineItemsErrors, GetAllCheckoutSessionLineItemsResponses, GetAllCheckoutSessionsData, GetAllCheckoutSessionsErrors, GetAllCheckoutSessionsResponses, GetAllCustomersData, GetAllCustomersErrors, GetAllCustomersResponses, GetAllEventsData, GetAllEventsErrors, GetAllEventsResponses, GetAllPaymentDisputesData, GetAllPaymentDisputesErrors, GetAllPaymentDisputesResponses, GetAllPaymentFlowsData, GetAllPaymentFlowsErrors, GetAllPaymentFlowsResponses, GetAllPaymentMethodConfigurationsData, GetAllPaymentMethodConfigurationsErrors, GetAllPaymentMethodConfigurationsResponses, GetAllPaymentMethodsData, GetAllPaymentMethodsErrors, GetAllPaymentMethodsResponses, GetAllPaymentRefundsData, GetAllPaymentRefundsErrors, GetAllPaymentRefundsResponses, GetAllPaymentTransactionsData, GetAllPaymentTransactionsErrors, GetAllPaymentTransactionsResponses, GetAllPricesData, GetAllPricesErrors, GetAllPricesResponses, GetAllProductsData, GetAllProductsErrors, GetAllProductsResponses, GetAllSetupFlowsData, GetAllSetupFlowsErrors, GetAllSetupFlowsResponses, GetAllStatementsData, GetAllStatementsErrors, GetAllStatementsResponses, GetAllTaxRatesData, GetAllTaxRatesErrors, GetAllTaxRatesResponses, GetAllTermsData, GetAllTermsErrors, GetAllTermsResponses, GetBalanceData, GetBalanceErrors, GetBalanceResponses, GetCheckoutSessionData, GetCheckoutSessionErrors, GetCheckoutSessionResponses, GetCustomerData, GetCustomerErrors, GetCustomerPaymentMethodsData, GetCustomerPaymentMethodsErrors, GetCustomerPaymentMethodsResponses, GetCustomerResponses, GetEventData, GetEventErrors, GetEventResponses, GetPaymentDisputeData, GetPaymentDisputeErrors, GetPaymentDisputeResponses, GetPaymentFlowData, GetPaymentFlowErrors, GetPaymentFlowRefundsData, GetPaymentFlowRefundsErrors, GetPaymentFlowRefundsResponses, GetPaymentFlowResponses, GetPaymentMethodByCardData, GetPaymentMethodByCardErrors, GetPaymentMethodByCardResponses, GetPaymentMethodConfigurationData, GetPaymentMethodConfigurationErrors, GetPaymentMethodConfigurationResponses, GetPaymentMethodData, GetPaymentMethodErrors, GetPaymentMethodResponses, GetPaymentRefundData, GetPaymentRefundErrors, GetPaymentRefundResponses, GetPaymentTransactionData, GetPaymentTransactionErrors, GetPaymentTransactionResponses, GetPriceData, GetPriceErrors, GetPriceResponses, GetProductData, GetProductErrors, GetProductResponses, GetSetupFlowData, GetSetupFlowErrors, GetSetupFlowResponses, GetStatementData, GetStatementErrors, GetStatementResponses, GetTaxRateData, GetTaxRateErrors, GetTaxRateResponses, GetTermData, GetTermErrors, GetTermResponses, UpdateCheckoutSessionData, UpdateCheckoutSessionErrors, UpdateCheckoutSessionResponses, UpdateCustomerData, UpdateCustomerErrors, UpdateCustomerResponses, UpdatePaymentFlowData, UpdatePaymentFlowErrors, UpdatePaymentFlowResponses, UpdatePaymentMethodConfigurationData, UpdatePaymentMethodConfigurationErrors, UpdatePaymentMethodConfigurationResponses, UpdatePaymentMethodData, UpdatePaymentMethodErrors, UpdatePaymentMethodResponses, UpdatePaymentRefundData, UpdatePaymentRefundErrors, UpdatePaymentRefundResponses, UpdatePriceData, UpdatePriceErrors, UpdatePriceResponses, UpdateProductData, UpdateProductErrors, UpdateProductResponses, UpdateSetupFlowData, UpdateSetupFlowErrors, UpdateSetupFlowResponses, UpdateTaxRateData, UpdateTaxRateErrors, UpdateTaxRateResponses } from './types.gen'; export type Options = Options2 & { /** @@ -15,13 +15,13 @@ export type Options; + meta?: keyof ClientMeta extends never ? Record : ClientMeta; }; /** * Get All Payment Methods */ -export const getAllPaymentMethods = (options?: Options) => (options?.client ?? client).get({ +export const getAllPaymentMethods = (options?: Options): RequestResult => (options?.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/payment_methods', ...options @@ -32,7 +32,7 @@ export const getAllPaymentMethods = (optio * * **このエンドポイントはテストモードでのみ使用できます。** */ -export const createPaymentMethod = (options: Options) => (options.client ?? client).post({ +export const createPaymentMethod = (options: Options): RequestResult => (options.client ?? client).post({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/payment_methods', ...options, @@ -45,7 +45,7 @@ export const createPaymentMethod = (option /** * Get Payment Method */ -export const getPaymentMethod = (options: Options) => (options.client ?? client).get({ +export const getPaymentMethod = (options: Options): RequestResult => (options.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/payment_methods/{payment_method_id}', ...options @@ -54,7 +54,7 @@ export const getPaymentMethod = (options: /** * Update Payment Method */ -export const updatePaymentMethod = (options: Options) => (options.client ?? client).post({ +export const updatePaymentMethod = (options: Options): RequestResult => (options.client ?? client).post({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/payment_methods/{payment_method_id}', ...options, @@ -67,7 +67,7 @@ export const updatePaymentMethod = (option /** * Get Payment Method By Card */ -export const getPaymentMethodByCard = (options: Options) => (options.client ?? client).get({ +export const getPaymentMethodByCard = (options: Options): RequestResult => (options.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/payment_methods/cards/{card_id}', ...options @@ -76,7 +76,7 @@ export const getPaymentMethodByCard = (opt /** * Attach Payment Method */ -export const attachPaymentMethod = (options: Options) => (options.client ?? client).post({ +export const attachPaymentMethod = (options: Options): RequestResult => (options.client ?? client).post({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/payment_methods/{payment_method_id}/attach', ...options, @@ -89,7 +89,7 @@ export const attachPaymentMethod = (option /** * Detach Payment Method */ -export const detachPaymentMethod = (options: Options) => (options.client ?? client).post({ +export const detachPaymentMethod = (options: Options): RequestResult => (options.client ?? client).post({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/payment_methods/{payment_method_id}/detach', ...options @@ -98,7 +98,7 @@ export const detachPaymentMethod = (option /** * Get Payment Method Configuration */ -export const getPaymentMethodConfiguration = (options: Options) => (options.client ?? client).get({ +export const getPaymentMethodConfiguration = (options: Options): RequestResult => (options.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/payment_method_configurations/{payment_method_configuration_id}', ...options @@ -107,7 +107,7 @@ export const getPaymentMethodConfiguration = (options: Options) => (options.client ?? client).post({ +export const updatePaymentMethodConfiguration = (options: Options): RequestResult => (options.client ?? client).post({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/payment_method_configurations/{payment_method_configuration_id}', ...options, @@ -120,7 +120,7 @@ export const updatePaymentMethodConfiguration = (options?: Options) => (options?.client ?? client).get({ +export const getAllPaymentMethodConfigurations = (options?: Options): RequestResult => (options?.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/payment_method_configurations', ...options @@ -129,7 +129,7 @@ export const getAllPaymentMethodConfigurations = (options?: Options) => (options?.client ?? client).get({ +export const getAllProducts = (options?: Options): RequestResult => (options?.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/products', ...options @@ -138,7 +138,7 @@ export const getAllProducts = (options?: O /** * Create Product */ -export const createProduct = (options: Options) => (options.client ?? client).post({ +export const createProduct = (options: Options): RequestResult => (options.client ?? client).post({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/products', ...options, @@ -151,7 +151,7 @@ export const createProduct = (options: Opt /** * Delete Product */ -export const deleteProduct = (options: Options) => (options.client ?? client).delete({ +export const deleteProduct = (options: Options): RequestResult => (options.client ?? client).delete({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/products/{product_id}', ...options @@ -160,7 +160,7 @@ export const deleteProduct = (options: Opt /** * Get Product */ -export const getProduct = (options: Options) => (options.client ?? client).get({ +export const getProduct = (options: Options): RequestResult => (options.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/products/{product_id}', ...options @@ -169,7 +169,7 @@ export const getProduct = (options: Option /** * Update Product */ -export const updateProduct = (options: Options) => (options.client ?? client).post({ +export const updateProduct = (options: Options): RequestResult => (options.client ?? client).post({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/products/{product_id}', ...options, @@ -182,7 +182,7 @@ export const updateProduct = (options: Opt /** * Get All Prices */ -export const getAllPrices = (options?: Options) => (options?.client ?? client).get({ +export const getAllPrices = (options?: Options): RequestResult => (options?.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/prices', ...options @@ -191,7 +191,7 @@ export const getAllPrices = (options?: Opt /** * Create Price */ -export const createPrice = (options: Options) => (options.client ?? client).post({ +export const createPrice = (options: Options): RequestResult => (options.client ?? client).post({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/prices', ...options, @@ -204,7 +204,7 @@ export const createPrice = (options: Optio /** * Get Price */ -export const getPrice = (options: Options) => (options.client ?? client).get({ +export const getPrice = (options: Options): RequestResult => (options.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/prices/{price_id}', ...options @@ -213,7 +213,7 @@ export const getPrice = (options: Options< /** * Update Price */ -export const updatePrice = (options: Options) => (options.client ?? client).post({ +export const updatePrice = (options: Options): RequestResult => (options.client ?? client).post({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/prices/{price_id}', ...options, @@ -226,7 +226,7 @@ export const updatePrice = (options: Optio /** * Get Payment Flow */ -export const getPaymentFlow = (options: Options) => (options.client ?? client).get({ +export const getPaymentFlow = (options: Options): RequestResult => (options.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/payment_flows/{payment_flow_id}', ...options @@ -235,7 +235,7 @@ export const getPaymentFlow = (options: Op /** * Update Payment Flow */ -export const updatePaymentFlow = (options: Options) => (options.client ?? client).post({ +export const updatePaymentFlow = (options: Options): RequestResult => (options.client ?? client).post({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/payment_flows/{payment_flow_id}', ...options, @@ -248,7 +248,7 @@ export const updatePaymentFlow = (options: /** * Get All Payment Flows */ -export const getAllPaymentFlows = (options?: Options) => (options?.client ?? client).get({ +export const getAllPaymentFlows = (options?: Options): RequestResult => (options?.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/payment_flows', ...options @@ -257,7 +257,7 @@ export const getAllPaymentFlows = (options /** * Create Payment Flow */ -export const createPaymentFlow = (options: Options) => (options.client ?? client).post({ +export const createPaymentFlow = (options: Options): RequestResult => (options.client ?? client).post({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/payment_flows', ...options, @@ -270,7 +270,7 @@ export const createPaymentFlow = (options: /** * Cancel Payment Flow */ -export const cancelPaymentFlow = (options: Options) => (options.client ?? client).post({ +export const cancelPaymentFlow = (options: Options): RequestResult => (options.client ?? client).post({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/payment_flows/{payment_flow_id}/cancel', ...options, @@ -283,7 +283,7 @@ export const cancelPaymentFlow = (options: /** * Capture Payment Flow */ -export const capturePaymentFlow = (options: Options) => (options.client ?? client).post({ +export const capturePaymentFlow = (options: Options): RequestResult => (options.client ?? client).post({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/payment_flows/{payment_flow_id}/capture', ...options, @@ -296,7 +296,7 @@ export const capturePaymentFlow = (options /** * Confirm Payment Flow */ -export const confirmPaymentFlow = (options: Options) => (options.client ?? client).post({ +export const confirmPaymentFlow = (options: Options): RequestResult => (options.client ?? client).post({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/payment_flows/{payment_flow_id}/confirm', ...options, @@ -311,7 +311,7 @@ export const confirmPaymentFlow = (options * * Payment Flowに紐づくRefundsをリスト取得する */ -export const getPaymentFlowRefunds = (options: Options) => (options.client ?? client).get({ +export const getPaymentFlowRefunds = (options: Options): RequestResult => (options.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/payment_flows/{payment_flow_id}/refunds', ...options @@ -320,7 +320,7 @@ export const getPaymentFlowRefunds = (opti /** * Get Payment Refund */ -export const getPaymentRefund = (options: Options) => (options.client ?? client).get({ +export const getPaymentRefund = (options: Options): RequestResult => (options.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/payment_refunds/{payment_refund_id}', ...options @@ -329,7 +329,7 @@ export const getPaymentRefund = (options: /** * Update Payment Refund */ -export const updatePaymentRefund = (options: Options) => (options.client ?? client).post({ +export const updatePaymentRefund = (options: Options): RequestResult => (options.client ?? client).post({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/payment_refunds/{payment_refund_id}', ...options, @@ -342,7 +342,7 @@ export const updatePaymentRefund = (option /** * Get All Payment Refunds */ -export const getAllPaymentRefunds = (options?: Options) => (options?.client ?? client).get({ +export const getAllPaymentRefunds = (options?: Options): RequestResult => (options?.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/payment_refunds', ...options @@ -351,7 +351,7 @@ export const getAllPaymentRefunds = (optio /** * Create Payment Refund */ -export const createPaymentRefund = (options: Options) => (options.client ?? client).post({ +export const createPaymentRefund = (options: Options): RequestResult => (options.client ?? client).post({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/payment_refunds', ...options, @@ -364,7 +364,7 @@ export const createPaymentRefund = (option /** * Get Payment Dispute */ -export const getPaymentDispute = (options: Options) => (options.client ?? client).get({ +export const getPaymentDispute = (options: Options): RequestResult => (options.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/payment_disputes/{payment_dispute_id}', ...options @@ -373,7 +373,7 @@ export const getPaymentDispute = (options: /** * Get All Payment Disputes */ -export const getAllPaymentDisputes = (options?: Options) => (options?.client ?? client).get({ +export const getAllPaymentDisputes = (options?: Options): RequestResult => (options?.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/payment_disputes', ...options @@ -382,7 +382,7 @@ export const getAllPaymentDisputes = (opti /** * Get Setup Flow */ -export const getSetupFlow = (options: Options) => (options.client ?? client).get({ +export const getSetupFlow = (options: Options): RequestResult => (options.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/setup_flows/{setup_flow_id}', ...options @@ -391,7 +391,7 @@ export const getSetupFlow = (options: Opti /** * Update Setup Flow */ -export const updateSetupFlow = (options: Options) => (options.client ?? client).post({ +export const updateSetupFlow = (options: Options): RequestResult => (options.client ?? client).post({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/setup_flows/{setup_flow_id}', ...options, @@ -404,7 +404,7 @@ export const updateSetupFlow = (options: O /** * Get All Setup Flows */ -export const getAllSetupFlows = (options?: Options) => (options?.client ?? client).get({ +export const getAllSetupFlows = (options?: Options): RequestResult => (options?.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/setup_flows', ...options @@ -413,7 +413,7 @@ export const getAllSetupFlows = (options?: /** * Create Setup Flow */ -export const createSetupFlow = (options?: Options) => (options?.client ?? client).post({ +export const createSetupFlow = (options?: Options): RequestResult => (options?.client ?? client).post({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/setup_flows', ...options, @@ -426,7 +426,7 @@ export const createSetupFlow = (options?: /** * Cancel Setup Flow */ -export const cancelSetupFlow = (options: Options) => (options.client ?? client).post({ +export const cancelSetupFlow = (options: Options): RequestResult => (options.client ?? client).post({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/setup_flows/{setup_flow_id}/cancel', ...options, @@ -439,7 +439,7 @@ export const cancelSetupFlow = (options: O /** * Get Statement */ -export const getStatement = (options: Options) => (options.client ?? client).get({ +export const getStatement = (options: Options): RequestResult => (options.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/statements/{statement_id}', ...options @@ -448,7 +448,7 @@ export const getStatement = (options: Opti /** * Get All Statements */ -export const getAllStatements = (options?: Options) => (options?.client ?? client).get({ +export const getAllStatements = (options?: Options): RequestResult => (options?.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/statements', ...options @@ -457,7 +457,7 @@ export const getAllStatements = (options?: /** * Create Statement Url */ -export const createStatementUrl = (options: Options) => (options.client ?? client).post({ +export const createStatementUrl = (options: Options): RequestResult => (options.client ?? client).post({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/statements/{statement_id}/statement_urls', ...options @@ -466,7 +466,7 @@ export const createStatementUrl = (options /** * Get Balance */ -export const getBalance = (options: Options) => (options.client ?? client).get({ +export const getBalance = (options: Options): RequestResult => (options.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/balances/{balance_id}', ...options @@ -475,7 +475,7 @@ export const getBalance = (options: Option /** * Get All Balances */ -export const getAllBalances = (options?: Options) => (options?.client ?? client).get({ +export const getAllBalances = (options?: Options): RequestResult => (options?.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/balances', ...options @@ -484,7 +484,7 @@ export const getAllBalances = (options?: O /** * Create Balance Url */ -export const createBalanceUrl = (options: Options) => (options.client ?? client).post({ +export const createBalanceUrl = (options: Options): RequestResult => (options.client ?? client).post({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/balances/{balance_id}/balance_urls', ...options @@ -493,7 +493,7 @@ export const createBalanceUrl = (options: /** * Get All Checkout Sessions */ -export const getAllCheckoutSessions = (options?: Options) => (options?.client ?? client).get({ +export const getAllCheckoutSessions = (options?: Options): RequestResult => (options?.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/checkout/sessions', ...options @@ -502,7 +502,7 @@ export const getAllCheckoutSessions = (opt /** * Create Checkout Session */ -export const createCheckoutSession = (options: Options) => (options.client ?? client).post({ +export const createCheckoutSession = (options: Options): RequestResult => (options.client ?? client).post({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/checkout/sessions', ...options, @@ -515,7 +515,7 @@ export const createCheckoutSession = (opti /** * Get Checkout Session */ -export const getCheckoutSession = (options: Options) => (options.client ?? client).get({ +export const getCheckoutSession = (options: Options): RequestResult => (options.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/checkout/sessions/{checkout_session_id}', ...options @@ -524,7 +524,7 @@ export const getCheckoutSession = (options /** * Update Checkout Session */ -export const updateCheckoutSession = (options: Options) => (options.client ?? client).post({ +export const updateCheckoutSession = (options: Options): RequestResult => (options.client ?? client).post({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/checkout/sessions/{checkout_session_id}', ...options, @@ -534,10 +534,19 @@ export const updateCheckoutSession = (opti } }); +/** + * Expire Checkout Session + */ +export const expireCheckoutSession = (options: Options): RequestResult => (options.client ?? client).post({ + security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], + url: '/v2/checkout/sessions/{checkout_session_id}/expire', + ...options +}); + /** * Get All Checkout Session Line Items */ -export const getAllCheckoutSessionLineItems = (options: Options) => (options.client ?? client).get({ +export const getAllCheckoutSessionLineItems = (options: Options): RequestResult => (options.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/checkout/sessions/{checkout_session_id}/line_items', ...options @@ -546,7 +555,7 @@ export const getAllCheckoutSessionLineItems = (options?: Options) => (options?.client ?? client).get({ +export const getAllTaxRates = (options?: Options): RequestResult => (options?.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/tax_rates', ...options @@ -555,7 +564,7 @@ export const getAllTaxRates = (options?: O /** * Create Tax Rate */ -export const createTaxRate = (options: Options) => (options.client ?? client).post({ +export const createTaxRate = (options: Options): RequestResult => (options.client ?? client).post({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/tax_rates', ...options, @@ -568,7 +577,7 @@ export const createTaxRate = (options: Opt /** * Get Tax Rate */ -export const getTaxRate = (options: Options) => (options.client ?? client).get({ +export const getTaxRate = (options: Options): RequestResult => (options.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/tax_rates/{tax_rate_id}', ...options @@ -577,7 +586,7 @@ export const getTaxRate = (options: Option /** * Update Tax Rate */ -export const updateTaxRate = (options: Options) => (options.client ?? client).post({ +export const updateTaxRate = (options: Options): RequestResult => (options.client ?? client).post({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/tax_rates/{tax_rate_id}', ...options, @@ -590,7 +599,7 @@ export const updateTaxRate = (options: Opt /** * Get All Customers */ -export const getAllCustomers = (options?: Options) => (options?.client ?? client).get({ +export const getAllCustomers = (options?: Options): RequestResult => (options?.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/customers', ...options @@ -599,7 +608,7 @@ export const getAllCustomers = (options?: /** * Create Customer */ -export const createCustomer = (options: Options) => (options.client ?? client).post({ +export const createCustomer = (options: Options): RequestResult => (options.client ?? client).post({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/customers', ...options, @@ -612,7 +621,7 @@ export const createCustomer = (options: Op /** * Delete Customer */ -export const deleteCustomer = (options: Options) => (options.client ?? client).delete({ +export const deleteCustomer = (options: Options): RequestResult => (options.client ?? client).delete({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/customers/{customer_id}', ...options @@ -621,7 +630,7 @@ export const deleteCustomer = (options: Op /** * Get Customer */ -export const getCustomer = (options: Options) => (options.client ?? client).get({ +export const getCustomer = (options: Options): RequestResult => (options.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/customers/{customer_id}', ...options @@ -630,7 +639,7 @@ export const getCustomer = (options: Optio /** * Update Customer */ -export const updateCustomer = (options: Options) => (options.client ?? client).post({ +export const updateCustomer = (options: Options): RequestResult => (options.client ?? client).post({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/customers/{customer_id}', ...options, @@ -643,7 +652,7 @@ export const updateCustomer = (options: Op /** * Get Customer Payment Methods */ -export const getCustomerPaymentMethods = (options: Options) => (options.client ?? client).get({ +export const getCustomerPaymentMethods = (options: Options): RequestResult => (options.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/customers/{customer_id}/payment_methods', ...options @@ -652,7 +661,7 @@ export const getCustomerPaymentMethods = ( /** * Get All Events */ -export const getAllEvents = (options?: Options) => (options?.client ?? client).get({ +export const getAllEvents = (options?: Options): RequestResult => (options?.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/events', ...options @@ -661,7 +670,7 @@ export const getAllEvents = (options?: Opt /** * Get Event */ -export const getEvent = (options: Options) => (options.client ?? client).get({ +export const getEvent = (options: Options): RequestResult => (options.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/events/{event_id}', ...options @@ -670,7 +679,7 @@ export const getEvent = (options: Options< /** * Get Payment Transaction */ -export const getPaymentTransaction = (options: Options) => (options.client ?? client).get({ +export const getPaymentTransaction = (options: Options): RequestResult => (options.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/payment_transactions/{payment_transaction_id}', ...options @@ -679,7 +688,7 @@ export const getPaymentTransaction = (opti /** * Get All Payment Transactions */ -export const getAllPaymentTransactions = (options?: Options) => (options?.client ?? client).get({ +export const getAllPaymentTransactions = (options?: Options): RequestResult => (options?.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/payment_transactions', ...options @@ -688,7 +697,7 @@ export const getAllPaymentTransactions = ( /** * Get Term */ -export const getTerm = (options: Options) => (options.client ?? client).get({ +export const getTerm = (options: Options): RequestResult => (options.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/terms/{term_id}', ...options @@ -697,7 +706,7 @@ export const getTerm = (options: Options(options?: Options) => (options?.client ?? client).get({ +export const getAllTerms = (options?: Options): RequestResult => (options?.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }, { scheme: 'bearer', type: 'http' }], url: '/v2/terms', ...options diff --git a/client/types.gen.ts b/client/types.gen.ts index b09085d..cafc380 100644 --- a/client/types.gen.ts +++ b/client/types.gen.ts @@ -3219,6 +3219,8 @@ export type SetupFlowCancelRequest = { * | **abandoned**: 顧客が SetupFlow を完了しなかった場合。 | * | **requested_by_customer**: 顧客がキャンセルを要求した場合。 | * | **duplicate**: 支払い方法が重複している場合。 | + * + * `expired` はシステムが自動的に設定する値のため、リクエストでは指定できません。 */ cancellation_reason?: SetupFlowCancellationReason; }; @@ -3226,7 +3228,7 @@ export type SetupFlowCancelRequest = { /** * SetupFlowCancellationReason */ -export type SetupFlowCancellationReason = 'abandoned' | 'duplicate' | 'requested_by_customer'; +export type SetupFlowCancellationReason = 'abandoned' | 'duplicate' | 'expired' | 'requested_by_customer'; /** * SetupFlowCreateRequest @@ -3454,6 +3456,7 @@ export type SetupFlowResponse = { * |:---| * | **abandoned**: 放棄、中断 | * | **duplicate**: 重複 | + * | **expired**: 期限切れ(CheckoutSession の期限切れによるキャンセル) | * | **requested_by_customer**: 顧客からの要請 | */ cancellation_reason: SetupFlowCancellationReason | null; @@ -4940,7 +4943,7 @@ export type ConfirmPaymentFlowData = { export type ConfirmPaymentFlowErrors = { /** - * Invalid Status
Missing Payment Method
Detached Payment Method Not Usable
Payment Method Not Owned By Customer
Customer Required For Payment Method
Payment Method Type Not Allowed
Extended Authorization Not Available
Apple Pay Disabled In Livemode
Invalid Apple Pay Token
Unacceptable Brand On Apple Pay + * Invalid Status
Checkout Session Expired
Missing Payment Method
Detached Payment Method Not Usable
Payment Method Not Owned By Customer
Customer Required For Payment Method
Payment Method Type Not Allowed
Extended Authorization Not Available
Apple Pay Disabled In Livemode
Invalid Apple Pay Token
Unacceptable Brand On Apple Pay */ 400: ErrorResponse; /** @@ -5910,6 +5913,44 @@ export type UpdateCheckoutSessionResponses = { export type UpdateCheckoutSessionResponse = UpdateCheckoutSessionResponses[keyof UpdateCheckoutSessionResponses]; +export type ExpireCheckoutSessionData = { + body?: never; + path: { + /** + * Checkout Session Id + */ + checkout_session_id: string; + }; + query?: never; + url: '/v2/checkout/sessions/{checkout_session_id}/expire'; +}; + +export type ExpireCheckoutSessionErrors = { + /** + * Checkout Session Not Expirable + */ + 400: ErrorResponse; + /** + * Not Found + */ + 404: ErrorResponse; + /** + * Validation Error + */ + 422: ErrorResponse; +}; + +export type ExpireCheckoutSessionError = ExpireCheckoutSessionErrors[keyof ExpireCheckoutSessionErrors]; + +export type ExpireCheckoutSessionResponses = { + /** + * Successful Response + */ + 200: CheckoutSessionDetailsResponse; +}; + +export type ExpireCheckoutSessionResponse = ExpireCheckoutSessionResponses[keyof ExpireCheckoutSessionResponses]; + export type GetAllCheckoutSessionLineItemsData = { body?: never; path: { diff --git a/package-lock.json b/package-lock.json index 981517e..bf84680 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@payjp/payjpv2", - "version": "1.0.10", + "version": "1.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@payjp/payjpv2", - "version": "1.0.10", + "version": "1.2.0", "license": "MIT", "dependencies": { "@hey-api/client-fetch": "^0.10.1" diff --git a/package.json b/package.json index eb7c5f1..b9b8f1d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@payjp/payjpv2", - "version": "1.1.0", + "version": "1.2.0", "type": "module", "main": "dist/index.cjs", "module": "dist/index.mjs", diff --git a/payjpv2.ts b/payjpv2.ts index 4c4ff36..dc603d2 100644 --- a/payjpv2.ts +++ b/payjpv2.ts @@ -5,7 +5,7 @@ import { type Client, } from "./client/client"; -const BINDINGS_VERSION = '1.1.0'; +const BINDINGS_VERSION = '1.2.0'; const DEFAULT_BASE_URL = "https://api.pay.jp"; export interface ClientConfig {