import { NonNullablePaths } from '@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 { entity?: string; } 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. */ currentEntity?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntity?: string | null; } interface ActionEvent { body?: 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; }; /** * Retrieves the IDs of invoices associated with all specified orders. * * * The `listInvoicesForSingleOrder()` function returns a Promise that resolves when the specified order's transaction records are retrieved. * @param orderIds - Order IDs for which to retrieve invoices. * @public * @requiredField orderIds * @permissionId ECOM.READ_INVOICES * @applicableIdentity APP * @applicableIdentity MEMBER * @fqn com.wix.ecom.orders.invoices.v1.Invoices.ListInvoicesForMultipleOrders */ declare function listInvoicesForMultipleOrders(orderIds: string[]): Promise>; export { type AccountInfo, type ActionEvent, type AddInvoiceToOrderRequest, type AddInvoiceToOrderResponse, type ApplicationError, type BulkActionMetadata, type BulkGenerateInvoicesRequest, type BulkGenerateInvoicesResponse, type BulkInvoiceResult, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type GenerateInvoiceApplicationErrors, type GenerateInvoiceRequest, type GenerateInvoiceResponse, type GenerateInvoiceWithNumberRequest, type GenerateInvoiceWithNumberResponse, type GetOrderInvoiceRequest, type GetOrderInvoiceResponse, type IdentificationData, type IdentificationDataIdOneOf, type Invoice, type InvoiceForOrder, type InvoicesForOrder, type ItemMetadata, type ListInvoicesForMultipleOrdersRequest, type ListInvoicesForMultipleOrdersResponse, type ListInvoicesForSingleOrderRequest, type ListInvoicesForSingleOrderResponse, type MessageEnvelope, type RestoreInfo, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, listInvoicesForMultipleOrders };