export interface Invoice { /** Invoice ID. */ _id?: string; /** ID of the app that set the invoice. */ appId?: string; } export interface ListInvoicesForSingleOrderRequest { /** Order ID. */ orderId?: string; } export interface ListInvoicesForSingleOrderResponse { /** List of invoices. */ invoices?: Invoice[]; } export interface ListInvoicesForMultipleOrdersRequest { /** Order IDs for which to retrieve invoices. */ orderIds: string[]; } export interface ListInvoicesForMultipleOrdersResponse { /** List of order IDs and their associated invoices. */ invoicesForOrder?: InvoicesForOrder[]; } export interface InvoicesForOrder { /** Order ID. */ orderId?: string; /** Invoices info. */ invoicesInfo?: Invoice[]; } export interface GenerateInvoiceRequest { /** Order ID. */ orderId?: string; } export interface GenerateInvoiceResponse { /** Invoice ID. */ invoiceId?: string; } export interface BulkGenerateInvoicesRequest { /** Order IDs. */ orderIds?: string[]; } export interface BulkGenerateInvoicesResponse { results?: BulkInvoiceResult[]; bulkActionMetadata?: BulkActionMetadata; } export interface BulkInvoiceResult { itemMetadata?: ItemMetadata; item?: InvoiceForOrder; } export 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; } export interface ApplicationError { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } export interface InvoiceForOrder { /** Order ID. */ orderId?: string; /** Invoice ID. */ invoiceId?: string; } export 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; } export interface AddInvoiceToOrderRequest { /** Order ID. */ orderId?: string; /** Invoice info. */ invoiceInfo?: Invoice; } export interface AddInvoiceToOrderResponse { /** List of order invoices. */ orderInvoices?: Invoice[]; } export interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * 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 defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ export interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } export interface EntityCreatedEvent { entity?: string; } export interface RestoreInfo { deletedDate?: Date | null; } export 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; } export interface EntityDeletedEvent { /** Entity that was deleted */ deletedEntity?: string | null; } export interface ActionEvent { body?: string; } export interface Empty { } export interface GetOrderInvoiceRequest { /** Invoice ID. */ invoiceId?: string; } export interface GetOrderInvoiceResponse { /** Order ID. */ orderId?: string; /** Invoice info. */ invoiceInfo?: Invoice; } export interface GenerateInvoiceWithNumberRequest { /** Order ID. */ orderId?: string; 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; } export interface GenerateInvoiceWithNumberResponse { /** Invoice ID. */ invoiceId?: string; } export interface MessageEnvelope { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; } export interface IdentificationData extends IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType; } /** @oneof */ export interface IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } export declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } interface InvoiceNonNullableFields { _id: string; appId: string; } interface InvoicesForOrderNonNullableFields { orderId: string; invoices: InvoiceNonNullableFields[]; invoicesInfo: InvoiceNonNullableFields[]; } export interface ListInvoicesForMultipleOrdersResponseNonNullableFields { invoicesForOrder: InvoicesForOrderNonNullableFields[]; } /** * 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 * @documentationMaturity preview * @requiredField orderIds * @permissionId ECOM.READ_INVOICES * @permissionScope Manage Stores - all permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES * @permissionScope Read eCommerce - all read permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM * @permissionScope Read Orders * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS * @permissionScope Read Stores - all read permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionScope Manage eCommerce - all permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM * @permissionScope Manage Orders * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS * @applicableIdentity APP * @applicableIdentity MEMBER * @fqn com.wix.ecom.orders.invoices.v1.Invoices.ListInvoicesForMultipleOrders */ export declare function listInvoicesForMultipleOrders(orderIds: string[]): Promise; export {};