interface OrdersSettings { /** * Defines when to update the store inventory. * * - `ON_ORDER_PAID`: Stock quantities will update only after the payment is approved. * - `ON_ORDER_PLACED`: Stock quantities will update while the payment is being processed. If the payment did not go through, items will restock. * * Default: `ON_ORDER_PLACED` */ inventoryUpdateTrigger?: InventoryUpdateTrigger; /** * Whether to automatically create invoices for every new order paid online. * Default: `false` */ createInvoice?: boolean | null; /** * Date and time the orders settings were created. * @readonly */ _createdDate?: Date | null; /** * Date and time the orders settings were updated. * @readonly */ _updatedDate?: Date | null; } declare enum InventoryUpdateTrigger { UNKNOWN_INVENTORY_UPDATE_TRIGGER = "UNKNOWN_INVENTORY_UPDATE_TRIGGER", /** Stock quantities will update only after the payment is approved. */ ON_ORDER_PAID = "ON_ORDER_PAID", /** Stock quantities will update while the payment is being processed. If the payment did not go through, items will restock. */ ON_ORDER_PLACED = "ON_ORDER_PLACED" } interface GetOrdersSettingsRequest { } interface GetOrdersSettingsResponse { /** Orders settings. */ ordersSettings?: OrdersSettings; } interface UpdateOrdersSettingsRequest { /** Orders settings to update. */ ordersSettings: OrdersSettings; } interface UpdateOrdersSettingsResponse { /** The updated orders settings. */ ordersSettings?: OrdersSettings; } interface DeleteOrdersSettingsRequest { } interface DeleteOrdersSettingsResponse { } interface ListOrdersSettingsRequest { } interface ListOrdersSettingsResponse { /** List of retrieved orders settings. */ ordersSettings?: OrdersSettings[]; } 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 */ 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 MessageEnvelope { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; } 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 */ 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; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } interface OrdersSettingsNonNullableFields { inventoryUpdateTrigger: InventoryUpdateTrigger; } interface GetOrdersSettingsResponseNonNullableFields { ordersSettings?: OrdersSettingsNonNullableFields; } interface UpdateOrdersSettingsResponseNonNullableFields { ordersSettings?: OrdersSettingsNonNullableFields; } interface BaseEventMetadata { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; } interface EventMetadata extends BaseEventMetadata { /** * 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; } interface OrdersSettingsUpdatedEnvelope { entity: OrdersSettings; metadata: EventMetadata; } export { type ActionEvent as A, type BaseEventMetadata as B, type DeleteOrdersSettingsRequest as D, type EntityCreatedEvent as E, type GetOrdersSettingsResponse as G, InventoryUpdateTrigger as I, type ListOrdersSettingsRequest as L, type MessageEnvelope as M, type OrdersSettings as O, type RestoreInfo as R, type UpdateOrdersSettingsResponse as U, WebhookIdentityType as W, type GetOrdersSettingsResponseNonNullableFields as a, type UpdateOrdersSettingsResponseNonNullableFields as b, type GetOrdersSettingsRequest as c, type UpdateOrdersSettingsRequest as d, type DeleteOrdersSettingsResponse as e, type ListOrdersSettingsResponse as f, type DomainEvent as g, type DomainEventBodyOneOf as h, type EntityUpdatedEvent as i, type EntityDeletedEvent as j, type IdentificationData as k, type IdentificationDataIdOneOf as l, type EventMetadata as m, type OrdersSettingsUpdatedEnvelope as n };