import { ListInvoicesForMultipleOrdersRequest as ListInvoicesForMultipleOrdersRequest$1, ListInvoicesForMultipleOrdersResponse as ListInvoicesForMultipleOrdersResponse$1, GenerateInvoiceRequest as GenerateInvoiceRequest$1, GenerateInvoiceResponse as GenerateInvoiceResponse$1, BulkGenerateInvoicesRequest as BulkGenerateInvoicesRequest$1, BulkGenerateInvoicesResponse as BulkGenerateInvoicesResponse$1, AddInvoiceToOrderRequest as AddInvoiceToOrderRequest$1, AddInvoiceToOrderResponse as AddInvoiceToOrderResponse$1 } from './index.typings.js'; import '@wix/sdk-types'; /** An invoice record associated with an order. */ interface Invoice { /** Invoice ID. */ id?: string; /** ID of the app that set the invoice. */ appId?: string; } interface ListInvoicesForSingleOrderRequest { /** * Order ID. * @minLength 1 * @maxLength 100 */ orderId?: string; } interface ListInvoicesForSingleOrderResponse { /** List of invoices. */ invoices?: Invoice[]; } interface ListInvoicesForMultipleOrdersRequest { /** * Order IDs for which to retrieve invoices. * @maxSize 100 * @minLength 1 * @maxLength 100 */ orderIds: string[]; } interface ListInvoicesForMultipleOrdersResponse { /** List of order IDs and their associated invoices. */ invoicesForOrder?: InvoicesForOrder[]; } interface InvoicesForOrder { /** Order ID. */ orderId?: string; /** * Invoices info. * @maxSize 300 */ invoicesInfo?: Invoice[]; } interface GenerateInvoiceRequest { /** * Order ID. * @minLength 1 * @maxLength 100 */ orderId: string; } interface GenerateInvoiceResponse { /** Invoice ID. */ invoiceId?: string; } interface BulkGenerateInvoicesRequest { /** * Order IDs. * @minSize 1 * @maxSize 300 * @minLength 1 * @maxLength 100 */ orderIds: string[]; } interface BulkGenerateInvoicesResponse { results?: BulkInvoiceResult[]; bulkActionMetadata?: BulkActionMetadata; } interface BulkInvoiceResult { itemMetadata?: ItemMetadata; item?: InvoiceForOrder; } interface ItemMetadata { /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */ id?: string | null; /** Index of the item within the request array. Allows for correlation between request and response items. */ originalIndex?: number; /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */ success?: boolean; /** Details about the error in case of failure. */ error?: ApplicationError; } interface ApplicationError { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } interface InvoiceForOrder { /** Order ID. */ orderId?: string; /** Invoice ID. */ invoiceId?: string; } interface BulkActionMetadata { /** Number of items that were successfully processed. */ totalSuccesses?: number; /** Number of items that couldn't be processed. */ totalFailures?: number; /** Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures?: number; } interface AddInvoiceToOrderRequest { /** * Order ID. * @minLength 1 * @maxLength 100 */ orderId: string; /** Invoice info. */ invoiceInfo: Invoice; } interface AddInvoiceToOrderResponse { /** List of order invoices. */ orderInvoices?: Invoice[]; } 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 Empty { } interface GetOrderInvoiceRequest { /** * Invoice ID. * @minLength 1 * @maxLength 100 */ invoiceId?: string; } interface GetOrderInvoiceResponse { /** * Order ID. * @minLength 1 * @maxLength 100 */ orderId?: string; /** Invoice info. */ invoiceInfo?: Invoice; } interface GenerateInvoiceWithNumberRequest { /** * Order ID. * @minLength 1 * @maxLength 100 */ orderId?: string; /** * @minLength 1 * @maxLength 11 */ invoiceNumber?: string; /** Date and time the payment was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. Defaults to current time when not provided. */ issueDate?: Date | null; } interface GenerateInvoiceWithNumberResponse { /** * Invoice ID. * @minLength 1 * @maxLength 100 */ invoiceId?: 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; } /** @docsIgnore */ type GenerateInvoiceApplicationErrors = { code?: 'GENERATE_INVOICE_NOT_SUPPORTED'; description?: string; data?: Record; } | { code?: 'INVOICE_ALREADY_EXISTS'; description?: string; data?: Record; } | { code?: 'MISSING_CONTACT'; description?: string; data?: Record; } | { code?: 'MISSING_CONTACT_EMAIL'; description?: string; data?: Record; } | { code?: 'INVALID_EMAIL'; description?: string; data?: Record; } | { code?: 'INVALID_PRICE_AMOUNT'; description?: string; data?: Record; } | { code?: 'CONTACT_NOT_FOUND'; description?: string; data?: Record; } | { code?: 'FAILED_TO_RETRIEVE_CONTACT'; description?: string; data?: Record; } | { code?: 'UNKNOWN_CURRENCY'; description?: string; data?: Record; } | { code?: 'ORDER_HAS_CHARGEBACKS'; description?: string; data?: Record; }; type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function listInvoicesForMultipleOrders(): __PublicMethodMetaInfo<'POST', {}, ListInvoicesForMultipleOrdersRequest$1, ListInvoicesForMultipleOrdersRequest, ListInvoicesForMultipleOrdersResponse$1, ListInvoicesForMultipleOrdersResponse>; declare function generateInvoice(): __PublicMethodMetaInfo<'POST', { orderId: string; }, GenerateInvoiceRequest$1, GenerateInvoiceRequest, GenerateInvoiceResponse$1, GenerateInvoiceResponse>; declare function bulkGenerateInvoices(): __PublicMethodMetaInfo<'POST', {}, BulkGenerateInvoicesRequest$1, BulkGenerateInvoicesRequest, BulkGenerateInvoicesResponse$1, BulkGenerateInvoicesResponse>; declare function addInvoiceToOrder(): __PublicMethodMetaInfo<'POST', { orderId: string; }, AddInvoiceToOrderRequest$1, AddInvoiceToOrderRequest, AddInvoiceToOrderResponse$1, AddInvoiceToOrderResponse>; export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type AddInvoiceToOrderRequest as AddInvoiceToOrderRequestOriginal, type AddInvoiceToOrderResponse as AddInvoiceToOrderResponseOriginal, type ApplicationError as ApplicationErrorOriginal, type BulkActionMetadata as BulkActionMetadataOriginal, type BulkGenerateInvoicesRequest as BulkGenerateInvoicesRequestOriginal, type BulkGenerateInvoicesResponse as BulkGenerateInvoicesResponseOriginal, type BulkInvoiceResult as BulkInvoiceResultOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type GenerateInvoiceApplicationErrors as GenerateInvoiceApplicationErrorsOriginal, type GenerateInvoiceRequest as GenerateInvoiceRequestOriginal, type GenerateInvoiceResponse as GenerateInvoiceResponseOriginal, type GenerateInvoiceWithNumberRequest as GenerateInvoiceWithNumberRequestOriginal, type GenerateInvoiceWithNumberResponse as GenerateInvoiceWithNumberResponseOriginal, type GetOrderInvoiceRequest as GetOrderInvoiceRequestOriginal, type GetOrderInvoiceResponse as GetOrderInvoiceResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type InvoiceForOrder as InvoiceForOrderOriginal, type Invoice as InvoiceOriginal, type InvoicesForOrder as InvoicesForOrderOriginal, type ItemMetadata as ItemMetadataOriginal, type ListInvoicesForMultipleOrdersRequest as ListInvoicesForMultipleOrdersRequestOriginal, type ListInvoicesForMultipleOrdersResponse as ListInvoicesForMultipleOrdersResponseOriginal, type ListInvoicesForSingleOrderRequest as ListInvoicesForSingleOrderRequestOriginal, type ListInvoicesForSingleOrderResponse as ListInvoicesForSingleOrderResponseOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type RestoreInfo as RestoreInfoOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, addInvoiceToOrder, bulkGenerateInvoices, generateInvoice, listInvoicesForMultipleOrders };