import { UpsertSavedPaymentMethodRequest as UpsertSavedPaymentMethodRequest$1, UpsertSavedPaymentMethodResponse as UpsertSavedPaymentMethodResponse$1, GetSavedPaymentMethodRequest as GetSavedPaymentMethodRequest$1, GetSavedPaymentMethodResponse as GetSavedPaymentMethodResponse$1, DeleteSavedPaymentMethodRequest as DeleteSavedPaymentMethodRequest$1, DeleteSavedPaymentMethodResponse as DeleteSavedPaymentMethodResponse$1, ListSavedPaymentMethodsRequest as ListSavedPaymentMethodsRequest$1, ListSavedPaymentMethodsResponse as ListSavedPaymentMethodsResponse$1, UpdateSavedPaymentMethodRequest as UpdateSavedPaymentMethodRequest$1, UpdateSavedPaymentMethodResponse as UpdateSavedPaymentMethodResponse$1, MarkSavedPaymentMethodPrimaryRequest as MarkSavedPaymentMethodPrimaryRequest$1, MarkSavedPaymentMethodPrimaryResponse as MarkSavedPaymentMethodPrimaryResponse$1 } from './index.typings.js'; import '@wix/sdk-types'; interface SavedPaymentMethod { /** * Saved payment method ID. * @format GUID * @readonly */ id?: string | null; /** * Revision number, which increments by 1 each time the saved payment method is updated. * To prevent conflicting changes, the current revision must be passed when updating the saved payment method. * @readonly */ revision?: string | null; /** * Date and time the saved payment method was created. * @readonly */ createdDate?: Date | null; /** * Date and time the saved payment method was last updated. * @readonly */ updatedDate?: Date | null; /** * ID of the site member who owns this saved payment method. * @format GUID * @immutable */ siteMemberId?: string | null; /** * Whether this saved payment method is the primary one for the member. Each member can have at most one primary saved payment method. The primary method is selected by default during checkout. * @readonly */ primary?: boolean; /** Payment method details. */ paymentMethod?: PaymentMethod; /** * Whether the merchant can use this payment method for unscheduled payments, such as manual charges. * Even when set to `false`, the payment method can still be used for scheduled payments such as subscription renewals without the buyer being present. */ merchantUseAllowed?: boolean | null; /** * Saved payment method's sensitive information. * @readonly */ sensitiveInfo?: SensitiveInfo; /** * Custom field data for the saved payment method object. * * [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls. */ extendedFields?: ExtendedFields; } interface CardInfo { /** * Payment card's last 4 digits. * @minLength 4 * @maxLength 4 * @readonly */ lastFourDigits?: string | null; /** * Payment card's BIN (Bank Identification Number). First 4-6 digits of the card number. * @minLength 4 * @maxLength 6 * @readonly */ bin?: string | null; /** * Payment card's expiration month. * @min 1 * @max 12 * @immutable */ expirationMonth?: number | null; /** * Payment card's expiration year. * @min 2000 * @max 2099 * @immutable */ expirationYear?: number | null; /** * Cardholder's full name as it appears on the card. * @minLength 1 * @maxLength 1000 */ cardholderName?: string | null; } declare enum CardBrand { UNKNOWN_CARD_BRAND = "UNKNOWN_CARD_BRAND", AMEX = "AMEX", DANKORT = "DANKORT", DINERS = "DINERS", DISCOVER = "DISCOVER", ISRACARD = "ISRACARD", JCB = "JCB", MAESTRO = "MAESTRO", MASTERCARD = "MASTERCARD", UNIONPAY = "UNIONPAY", VISA = "VISA", RUPAY = "RUPAY" } /** @enumType */ type CardBrandWithLiterals = CardBrand | 'UNKNOWN_CARD_BRAND' | 'AMEX' | 'DANKORT' | 'DINERS' | 'DISCOVER' | 'ISRACARD' | 'JCB' | 'MAESTRO' | 'MASTERCARD' | 'UNIONPAY' | 'VISA' | 'RUPAY'; interface PaymentMethod { /** * Legacy payment method type ID. Supported values: `creditCard`, `payPal`. * @minLength 1 * @maxLength 100 * @immutable */ typeId?: string; /** * Payment method type ID. * @format GUID * @readonly * @immutable */ paymentMethodTypeId?: string; /** * Payment method brand ID. * @format GUID * @readonly * @immutable */ paymentMethodBrandId?: string | null; /** Payment card details. */ cardInfo?: CardInfo; } interface SensitiveInfo { /** Payment card sensitive details. */ cardSensitiveInfo?: CardSensitiveInfo; } interface CardSensitiveInfo { /** * Persistent token of a payment card tokenized by Wix. * @format GUID */ persistentToken?: string | null; } interface ExtendedFields { /** * Extended field data. Each key corresponds to the namespace of the app that created the extended fields. * The value of each key is structured according to the schema defined when the extended fields were configured. * * You can only access fields for which you have the appropriate permissions. * * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */ namespaces?: Record>; } interface UpsertSavedPaymentMethodRequest { /** Saved payment method to create or update. */ savedPaymentMethod: SavedPaymentMethod; /** * Temporary token of a payment card tokenized by Wix. Used to create a persistent token for future transactions. * @format GUID */ temporaryCardToken: string | null; } interface UpsertSavedPaymentMethodResponse { /** Created or updated saved payment method. */ savedPaymentMethod?: SavedPaymentMethod; } interface GetSavedPaymentMethodRequest { /** * Unique identifier of a saved payment method. * @format GUID */ savedPaymentMethodId: string; /** * Additional fields to return. * @maxSize 1 */ fields?: RequestedFieldsWithLiterals[]; } declare enum RequestedFields { /** Sensitive information such as payment card tokens. */ SENSITIVE_INFO = "SENSITIVE_INFO" } /** @enumType */ type RequestedFieldsWithLiterals = RequestedFields | 'SENSITIVE_INFO'; interface GetSavedPaymentMethodResponse { /** Retrieved saved payment method. */ savedPaymentMethod?: SavedPaymentMethod; } interface DeleteSavedPaymentMethodRequest { /** * Unique identifier of a saved payment method. * @format GUID */ savedPaymentMethodId: string; } interface DeleteSavedPaymentMethodResponse { } interface ListSavedPaymentMethodsRequest { /** * ID of the site member whose saved payment methods to list. Pass `me` to list the current site member's saved payment methods. * @minLength 2 * @maxLength 36 */ siteMemberId?: string | null; /** * Legacy payment method type ID. Supported values: `creditCard`, `payPal`. * @minLength 1 * @maxLength 100 */ paymentMethodTypeId?: string | null; /** Whether to filter by saved payment methods that are allowed for unscheduled merchant-initiated payments. */ merchantUseAllowed?: boolean | null; /** * Additional fields to return. * @maxSize 1 */ fields?: RequestedFieldsWithLiterals[]; /** * Cursor paging parameters. * * Default: `100` results per page. */ paging?: CursorPaging; } interface CursorPaging { /** * Maximum number of items to return in the results. * @max 100 */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. * @maxLength 16000 */ cursor?: string | null; } interface ListSavedPaymentMethodsResponse { /** List of saved payment methods. */ savedPaymentMethods?: SavedPaymentMethod[]; /** Details on the paged set of results returned. */ pagingMetadata?: CursorPagingMetadata; } interface CursorPagingMetadata { /** Number of items returned in the response. */ count?: number | null; /** Cursor strings that point to the next page, previous page, or both. */ cursors?: Cursors; /** * Whether there are more pages to retrieve following the current page. * * + `true`: Another page of results can be retrieved. * + `false`: This is the last page. */ hasNext?: boolean | null; } interface Cursors { /** * Cursor string pointing to the next page in the list of results. * @maxLength 16000 */ next?: string | null; /** * Cursor pointing to the previous page in the list of results. * @maxLength 16000 */ prev?: string | null; } interface UpdateSavedPaymentMethodRequest { /** Saved payment method to update. */ savedPaymentMethod?: SavedPaymentMethod; } interface UpdateSavedPaymentMethodResponse { /** Updated saved payment method. */ savedPaymentMethod?: SavedPaymentMethod; } interface MarkSavedPaymentMethodPrimaryRequest { /** * Unique identifier of a saved payment method. * @format GUID */ savedPaymentMethodId: string; } interface MarkSavedPaymentMethodPrimaryResponse { } interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number. * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entityAsJson?: string; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo; } interface RestoreInfo { deletedDate?: Date | null; } interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntityAsJson?: string | null; } interface ActionEvent { bodyAsJson?: string; } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; /** Details related to the account */ accountInfo?: AccountInfo; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } interface FindSavedCreditCardRequest { /** * temporary card token * @format GUID */ temporaryCardToken?: string; /** * site member id * @format GUID */ siteMemberId?: string; /** * expiration month * @min 1 * @max 12 */ expirationMonth?: number; /** * expiration year * @min 2000 * @max 2099 */ expirationYear?: number; } interface FindSavedCreditCardResponse { /** * saved payment method id * @format GUID */ savedPaymentMethodId?: string | null; } type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function upsertSavedPaymentMethod(): __PublicMethodMetaInfo<'POST', {}, UpsertSavedPaymentMethodRequest$1, UpsertSavedPaymentMethodRequest, UpsertSavedPaymentMethodResponse$1, UpsertSavedPaymentMethodResponse>; declare function getSavedPaymentMethod(): __PublicMethodMetaInfo<'GET', { savedPaymentMethodId: string; }, GetSavedPaymentMethodRequest$1, GetSavedPaymentMethodRequest, GetSavedPaymentMethodResponse$1, GetSavedPaymentMethodResponse>; declare function deleteSavedPaymentMethod(): __PublicMethodMetaInfo<'DELETE', { savedPaymentMethodId: string; }, DeleteSavedPaymentMethodRequest$1, DeleteSavedPaymentMethodRequest, DeleteSavedPaymentMethodResponse$1, DeleteSavedPaymentMethodResponse>; declare function listSavedPaymentMethods(): __PublicMethodMetaInfo<'GET', {}, ListSavedPaymentMethodsRequest$1, ListSavedPaymentMethodsRequest, ListSavedPaymentMethodsResponse$1, ListSavedPaymentMethodsResponse>; declare function updateSavedPaymentMethod(): __PublicMethodMetaInfo<'PATCH', { savedPaymentMethodId: string; }, UpdateSavedPaymentMethodRequest$1, UpdateSavedPaymentMethodRequest, UpdateSavedPaymentMethodResponse$1, UpdateSavedPaymentMethodResponse>; declare function markSavedPaymentMethodPrimary(): __PublicMethodMetaInfo<'GET', { savedPaymentMethodId: string; }, MarkSavedPaymentMethodPrimaryRequest$1, MarkSavedPaymentMethodPrimaryRequest, MarkSavedPaymentMethodPrimaryResponse$1, MarkSavedPaymentMethodPrimaryResponse>; export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, CardBrand as CardBrandOriginal, type CardBrandWithLiterals as CardBrandWithLiteralsOriginal, type CardInfo as CardInfoOriginal, type CardSensitiveInfo as CardSensitiveInfoOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type Cursors as CursorsOriginal, type DeleteSavedPaymentMethodRequest as DeleteSavedPaymentMethodRequestOriginal, type DeleteSavedPaymentMethodResponse as DeleteSavedPaymentMethodResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type ExtendedFields as ExtendedFieldsOriginal, type FindSavedCreditCardRequest as FindSavedCreditCardRequestOriginal, type FindSavedCreditCardResponse as FindSavedCreditCardResponseOriginal, type GetSavedPaymentMethodRequest as GetSavedPaymentMethodRequestOriginal, type GetSavedPaymentMethodResponse as GetSavedPaymentMethodResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type ListSavedPaymentMethodsRequest as ListSavedPaymentMethodsRequestOriginal, type ListSavedPaymentMethodsResponse as ListSavedPaymentMethodsResponseOriginal, type MarkSavedPaymentMethodPrimaryRequest as MarkSavedPaymentMethodPrimaryRequestOriginal, type MarkSavedPaymentMethodPrimaryResponse as MarkSavedPaymentMethodPrimaryResponseOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type PaymentMethod as PaymentMethodOriginal, RequestedFields as RequestedFieldsOriginal, type RequestedFieldsWithLiterals as RequestedFieldsWithLiteralsOriginal, type RestoreInfo as RestoreInfoOriginal, type SavedPaymentMethod as SavedPaymentMethodOriginal, type SensitiveInfo as SensitiveInfoOriginal, type UpdateSavedPaymentMethodRequest as UpdateSavedPaymentMethodRequestOriginal, type UpdateSavedPaymentMethodResponse as UpdateSavedPaymentMethodResponseOriginal, type UpsertSavedPaymentMethodRequest as UpsertSavedPaymentMethodRequestOriginal, type UpsertSavedPaymentMethodResponse as UpsertSavedPaymentMethodResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, deleteSavedPaymentMethod, getSavedPaymentMethod, listSavedPaymentMethods, markSavedPaymentMethodPrimary, updateSavedPaymentMethod, upsertSavedPaymentMethod };