import * as _wix_sdk_types from '@wix/sdk-types'; import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types'; interface ShippingOption { /** * ShippingOption ID. * @format GUID * @readonly */ _id?: string | null; /** * Revision number, which increments by 1 each time the ShippingOption is updated. * To prevent conflicting changes, * the current revision must be passed when updating the ShippingOption. * * Ignored when creating a ShippingOption. * @readonly */ revision?: string | null; /** * Date and time the ShippingOption was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the ShippingOption was last updated. * @readonly */ _updatedDate?: Date | null; /** * Associated delivery region id. * @format GUID * @immutable * @deprecated Associated delivery region id. * @replacedBy delivery_region_ids * @targetRemovalDate 2025-06-01 */ deliveryRegionId?: string; /** * This shipping option is active for the following delivery regions. * @maxSize 50 * @format GUID * @immutable */ deliveryRegionIds?: string[]; /** * Delivery option configured for the ShippingOption * @maxLength 1000 */ title?: string | null; /** * Estimated delivery time. For example, "2-3 business days". * @maxLength 500 */ estimatedDeliveryTime?: string | null; /** * at runtime for a given shipment input, up to one rate (price) should be returned in an option. If more than one rate is valid then we return the lowest one. * @minSize 1 * @maxSize 50 */ rates?: ConditionalRates[]; /** Data Extensions */ extendedFields?: ExtendedFields; } interface ConditionalRates { /** * there is an AND logic between all the conditions. Empty conditions means true. * The amount of the rate that will be returned if all conditions are met. * @decimalValue options { gte:0, lte:999999999, maxScale:3 } */ amount?: string; /** * For example: weight > 0 and weight <= 10 * @maxSize 10 */ conditions?: Condition[]; /** When this flag is set to true, multiply the amount by the number of line items passed on the request. */ multiplyByQuantity?: boolean; } interface Condition { type?: ConditionTypeWithLiterals; /** * The value in respective to the condition type * Weight values should be in the same weight units of the store: KG / LB * Total price is according to the store currency * Quantity of items should be integers * @decimalValue options { gte:0, lte:999999999, maxScale:6 } */ value?: string; /** Logical operator. */ operator?: LogicalOperatorWithLiterals; } declare enum ConditionType { BY_TOTAL_WEIGHT = "BY_TOTAL_WEIGHT", BY_TOTAL_PRICE = "BY_TOTAL_PRICE", BY_TOTAL_QUANTITY = "BY_TOTAL_QUANTITY" } /** @enumType */ type ConditionTypeWithLiterals = ConditionType | 'BY_TOTAL_WEIGHT' | 'BY_TOTAL_PRICE' | 'BY_TOTAL_QUANTITY'; declare enum LogicalOperator { EQ = "EQ", GT = "GT", GTE = "GTE", LT = "LT", LTE = "LTE" } /** @enumType */ type LogicalOperatorWithLiterals = LogicalOperator | 'EQ' | 'GT' | 'GTE' | 'LT' | 'LTE'; 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 CreateShippingOptionRequest { /** ShippingOption to be created. */ shippingOption: ShippingOption; } interface CreateShippingOptionResponse { /** The created ShippingOption. */ shippingOption?: ShippingOption; } interface GetShippingOptionRequest { /** * ID of the ShippingOption to retrieve. * @format GUID */ shippingOptionId: string; } interface GetShippingOptionResponse { /** The requested ShippingOption. */ shippingOption?: ShippingOption; } interface UpdateShippingOptionRequest { /** ShippingOption to be updated, may be partial. */ shippingOption: ShippingOption; } interface UpdateShippingOptionResponse { /** Updated ShippingOption. */ shippingOption?: ShippingOption; } interface DeleteShippingOptionRequest { /** * Id of the ShippingOption to delete. * @format GUID */ shippingOptionId: string; } interface DeleteShippingOptionResponse { } interface QueryShippingOptionsRequest { /** WQL expression. */ query?: CursorQuery; } interface CursorQuery extends CursorQueryPagingMethodOneOf { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging; /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: Record | null; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` * @maxSize 5 */ sort?: Sorting[]; } /** @oneof */ interface CursorQueryPagingMethodOneOf { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging; } interface Sorting { /** * Name of the field to sort by. * @maxLength 512 */ fieldName?: string; /** Sort order. */ order?: SortOrderWithLiterals; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; 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 QueryShippingOptionsResponse { /** * List of ShippingOptions. * @maxSize 100 */ shippingOptions?: ShippingOption[]; /** Paging metadata */ 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 UpdateExtendedFieldsRequest { /** ID of the entity to update. */ _id: string; /** Identifier for the app whose extended fields are being updated. */ namespace: string; /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */ namespaceData: Record | null; } interface UpdateExtendedFieldsResponse { /** Updated ShippingOption. */ shippingOption?: ShippingOption; } 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 AddDeliveryRegionRequest { /** * ID of the delivery region that should use this ShippingOption. * @format GUID */ deliveryRegionId: string; /** * ID of the ShippingOption to be updated. * @format GUID */ shippingOptionId: string; /** Revision of the ShippingOption. */ revision: string | null; } interface AddDeliveryRegionResponse { /** Updated ShippingOption. */ shippingOption?: ShippingOption; } interface RemoveDeliveryRegionRequest { /** * ID of the delivery region that should not use this ShippingOption anymore. * @format GUID */ deliveryRegionId: string; /** * ID of the ShippingOption to be updated. * @format GUID */ shippingOptionId: string; /** Revision of the ShippingOption. */ revision: string | null; } interface RemoveDeliveryRegionResponse { /** Updated ShippingOption. */ shippingOption?: ShippingOption; } 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 CreateShippingOptionApplicationErrors = { code?: 'INVALID_QUANTITY_VALUE'; description?: string; data?: Record; }; /** @docsIgnore */ type UpdateShippingOptionApplicationErrors = { code?: 'INVALID_QUANTITY_VALUE'; description?: string; data?: Record; }; interface BaseEventMetadata { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Details related to the account */ accountInfo?: AccountInfo; } interface EventMetadata extends BaseEventMetadata { /** 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; accountInfo?: AccountInfoMetadata; } interface AccountInfoMetadata { /** ID of the Wix account associated with the event */ accountId: string; /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */ siteId?: string; /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */ parentAccountId?: string; } interface ShippingOptionCreatedEnvelope { entity: ShippingOption; metadata: EventMetadata; } /** * Triggered when a shipping option is created. * @permissionScope Manage Stores - all permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES * @permissionScope Manage Stores * @permissionScopeId SCOPE.STORES.MANAGE-STORES * @permissionScope Read eCommerce - all read permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM * @permissionScope Wix Multilingual - Nile Wrapper Domain Events Read * @permissionScopeId SCOPE.MULTILINGUAL.NILE_WRAPPER_DOMAIN_EVENTS_READ * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionScope Manage eCommerce - all permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM * @permissionId ECOM.SHIPPING_OPTION_READ * @webhook * @eventType wix.ecom.v1.shipping_option_created * @slug created * @documentationMaturity preview */ declare function onShippingOptionCreated(handler: (event: ShippingOptionCreatedEnvelope) => void | Promise): void; interface ShippingOptionDeletedEnvelope { entity: ShippingOption; metadata: EventMetadata; } /** * Triggered when a shipping option is deleted. * @permissionScope Manage Stores - all permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES * @permissionScope Manage Stores * @permissionScopeId SCOPE.STORES.MANAGE-STORES * @permissionScope Read eCommerce - all read permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM * @permissionScope Wix Multilingual - Nile Wrapper Domain Events Read * @permissionScopeId SCOPE.MULTILINGUAL.NILE_WRAPPER_DOMAIN_EVENTS_READ * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionScope Manage eCommerce - all permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM * @permissionId ECOM.SHIPPING_OPTION_READ * @webhook * @eventType wix.ecom.v1.shipping_option_deleted * @slug deleted * @documentationMaturity preview */ declare function onShippingOptionDeleted(handler: (event: ShippingOptionDeletedEnvelope) => void | Promise): void; interface ShippingOptionUpdatedEnvelope { entity: ShippingOption; metadata: EventMetadata; /** @hidden */ modifiedFields: Record; } /** * Triggered when a shipping option is updated. * @permissionScope Manage Stores - all permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES * @permissionScope Manage Stores * @permissionScopeId SCOPE.STORES.MANAGE-STORES * @permissionScope Read eCommerce - all read permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM * @permissionScope Wix Multilingual - Nile Wrapper Domain Events Read * @permissionScopeId SCOPE.MULTILINGUAL.NILE_WRAPPER_DOMAIN_EVENTS_READ * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionScope Manage eCommerce - all permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM * @permissionId ECOM.SHIPPING_OPTION_READ * @webhook * @eventType wix.ecom.v1.shipping_option_updated * @slug updated * @documentationMaturity preview */ declare function onShippingOptionUpdated(handler: (event: ShippingOptionUpdatedEnvelope) => void | Promise): void; /** * Creates a ShippingOption. * * The request body must include shipping option and delivery region associated to. * @param shippingOption - ShippingOption to be created. * @public * @documentationMaturity preview * @requiredField shippingOption * @permissionId ECOM.SHIPPING_OPTION_CREATE * @applicableIdentity APP * @returns The created ShippingOption. * @fqn wix.ecom.delivery.v1.ShippingOptionService.CreateShippingOption */ declare function createShippingOption(shippingOption: ShippingOption): Promise & { __applicationErrorsType?: CreateShippingOptionApplicationErrors; }>; /** * Retrieves a ShippingOption. * @param shippingOptionId - ID of the ShippingOption to retrieve. * @public * @documentationMaturity preview * @requiredField shippingOptionId * @permissionId ECOM.SHIPPING_OPTION_READ * @applicableIdentity APP * @returns The requested ShippingOption. * @fqn wix.ecom.delivery.v1.ShippingOptionService.GetShippingOption */ declare function getShippingOption(shippingOptionId: string): Promise>; /** * Updates a ShippingOption. * * * Each time the ShippingOption is updated, * `revision` increments by 1. * The current `revision` must be passed when updating the ShippingOption. * This ensures you're working with the latest ShippingOption * and prevents unintended overwrites. * @param _id - ShippingOption ID. * @public * @documentationMaturity preview * @requiredField _id * @requiredField shippingOption * @requiredField shippingOption.revision * @permissionId ECOM.SHIPPING_OPTION_UPDATE * @applicableIdentity APP * @returns Updated ShippingOption. * @fqn wix.ecom.delivery.v1.ShippingOptionService.UpdateShippingOption */ declare function updateShippingOption(_id: string, shippingOption: NonNullablePaths): Promise & { __applicationErrorsType?: UpdateShippingOptionApplicationErrors; }>; interface UpdateShippingOption { /** * ShippingOption ID. * @format GUID * @readonly */ _id?: string | null; /** * Revision number, which increments by 1 each time the ShippingOption is updated. * To prevent conflicting changes, * the current revision must be passed when updating the ShippingOption. * * Ignored when creating a ShippingOption. * @readonly */ revision?: string | null; /** * Date and time the ShippingOption was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the ShippingOption was last updated. * @readonly */ _updatedDate?: Date | null; /** * Associated delivery region id. * @format GUID * @immutable * @deprecated Associated delivery region id. * @replacedBy delivery_region_ids * @targetRemovalDate 2025-06-01 */ deliveryRegionId?: string; /** * This shipping option is active for the following delivery regions. * @maxSize 50 * @format GUID * @immutable */ deliveryRegionIds?: string[]; /** * Delivery option configured for the ShippingOption * @maxLength 1000 */ title?: string | null; /** * Estimated delivery time. For example, "2-3 business days". * @maxLength 500 */ estimatedDeliveryTime?: string | null; /** * at runtime for a given shipment input, up to one rate (price) should be returned in an option. If more than one rate is valid then we return the lowest one. * @minSize 1 * @maxSize 50 */ rates?: ConditionalRates[]; /** Data Extensions */ extendedFields?: ExtendedFields; } /** * Deletes a ShippingOption. * Deleting a ShippingOption permanently removes them from the ShippingOption List. * @param shippingOptionId - Id of the ShippingOption to delete. * @public * @documentationMaturity preview * @requiredField shippingOptionId * @permissionId ECOM.SHIPPING_OPTION_DELETE * @applicableIdentity APP * @fqn wix.ecom.delivery.v1.ShippingOptionService.DeleteShippingOption */ declare function deleteShippingOption(shippingOptionId: string): Promise; /** * Retrieves a list of ShippingOptions, given the provided [paging, filtering, and sorting][1]. * * Up to 1,000 ShippingOptions can be returned per request. * * To learn how to query ShippingOptions, see [API Query Language][2]. * * [1]: https://dev.wix.com/api/rest/getting-started/sorting-and-paging * [2]: https://dev.wix.com/api/rest/getting-started/api-query-language * @public * @documentationMaturity preview * @permissionId ECOM.SHIPPING_OPTION_READ * @applicableIdentity APP * @fqn wix.ecom.delivery.v1.ShippingOptionService.QueryShippingOptions */ declare function queryShippingOptions(): ShippingOptionsQueryBuilder; interface QueryCursorResult { cursors: Cursors; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface ShippingOptionsQueryResult extends QueryCursorResult { items: ShippingOption[]; query: ShippingOptionsQueryBuilder; next: () => Promise; prev: () => Promise; } interface ShippingOptionsQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ eq: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'deliveryRegionId' | 'deliveryRegionIds' | 'estimatedDeliveryTime', value: any) => ShippingOptionsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ne: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'deliveryRegionId' | 'deliveryRegionIds' | 'estimatedDeliveryTime', value: any) => ShippingOptionsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ge: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'deliveryRegionId' | 'estimatedDeliveryTime', value: any) => ShippingOptionsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ gt: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'deliveryRegionId' | 'estimatedDeliveryTime', value: any) => ShippingOptionsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ le: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'deliveryRegionId' | 'estimatedDeliveryTime', value: any) => ShippingOptionsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ lt: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'deliveryRegionId' | 'estimatedDeliveryTime', value: any) => ShippingOptionsQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. * @documentationMaturity preview */ startsWith: (propertyName: '_id' | 'deliveryRegionId' | 'estimatedDeliveryTime', value: string) => ShippingOptionsQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. * @documentationMaturity preview */ hasSome: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'deliveryRegionId' | 'deliveryRegionIds' | 'estimatedDeliveryTime', value: any[]) => ShippingOptionsQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. * @documentationMaturity preview */ hasAll: (propertyName: 'deliveryRegionIds', value: any[]) => ShippingOptionsQueryBuilder; /** @documentationMaturity preview */ in: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'deliveryRegionId' | 'deliveryRegionIds' | 'estimatedDeliveryTime', value: any) => ShippingOptionsQueryBuilder; /** @documentationMaturity preview */ exists: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'deliveryRegionId' | 'deliveryRegionIds' | 'estimatedDeliveryTime', value: boolean) => ShippingOptionsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ ascending: (...propertyNames: Array<'_id' | '_createdDate' | '_updatedDate' | 'deliveryRegionId' | 'deliveryRegionIds' | 'estimatedDeliveryTime'>) => ShippingOptionsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ descending: (...propertyNames: Array<'_id' | '_createdDate' | '_updatedDate' | 'deliveryRegionId' | 'deliveryRegionIds' | 'estimatedDeliveryTime'>) => ShippingOptionsQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. * @documentationMaturity preview */ limit: (limit: number) => ShippingOptionsQueryBuilder; /** @param cursor - A pointer to specific record * @documentationMaturity preview */ skipTo: (cursor: string) => ShippingOptionsQueryBuilder; /** @documentationMaturity preview */ find: () => Promise; } /** * @hidden * @fqn wix.ecom.delivery.v1.ShippingOptionService.QueryShippingOptions * @requiredField query */ declare function typedQueryShippingOptions(query: ShippingOptionQuery): Promise>; interface ShippingOptionQuerySpec extends QuerySpec { paging: 'cursor'; wql: [ { fields: ['deliveryRegionIds']; operators: ['$hasAll', '$hasSome']; sort: 'BOTH'; }, { fields: [ '_createdDate', '_id', '_updatedDate', 'deliveryRegionId', 'estimatedDeliveryTime' ]; operators: '*'; sort: 'BOTH'; } ]; } type CommonQueryWithEntityContext = Query; type ShippingOptionQuery = { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: { /** Maximum number of items to return in the results. @max: 100 */ limit?: NonNullable['limit'] | 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?: NonNullable['cursor'] | null; }; /** Filter object in the following format: `"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"} }` Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: CommonQueryWithEntityContext['filter'] | null; /** Sort object in the following format: `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` @maxSize: 5 */ sort?: { /** Name of the field to sort by. @maxLength: 512 */ fieldName?: NonNullable[number]['fieldName']; /** Sort order. */ order?: NonNullable[number]['order']; }[]; }; declare const utils: { query: { QueryBuilder: () => _wix_sdk_types.QueryBuilder; Filter: _wix_sdk_types.FilterFactory; Sort: _wix_sdk_types.SortFactory; }; }; /** * Updates extended fields of a ShippingOption without incrementing revision * @param _id - ID of the entity to update. * @param namespace - Identifier for the app whose extended fields are being updated. * @public * @documentationMaturity preview * @requiredField _id * @requiredField namespace * @requiredField options * @requiredField options.namespaceData * @permissionId ECOM.SHIPPING_OPTION_UPDATE * @applicableIdentity APP * @fqn wix.ecom.delivery.v1.ShippingOptionService.UpdateExtendedFields */ declare function updateExtendedFields(_id: string, namespace: string, options: NonNullablePaths): Promise>; interface UpdateExtendedFieldsOptions { /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */ namespaceData: Record | null; } /** * Adds a delivery region to a shipping option. * @param shippingOptionId - ID of the ShippingOption to be updated. * @param deliveryRegionId - ID of the delivery region that should use this ShippingOption. * @public * @documentationMaturity preview * @requiredField deliveryRegionId * @requiredField options * @requiredField options.revision * @requiredField shippingOptionId * @permissionId ECOM.SHIPPING_OPTION_UPDATE * @applicableIdentity APP * @fqn wix.ecom.delivery.v1.ShippingOptionService.AddDeliveryRegion */ declare function addDeliveryRegion(shippingOptionId: string, deliveryRegionId: string, options: NonNullablePaths): Promise>; interface AddDeliveryRegionOptions { /** Revision of the ShippingOption. */ revision: string | null; } /** * Removes a delivery region from a shipping option. * @param shippingOptionId - ID of the ShippingOption to be updated. * @param deliveryRegionId - ID of the delivery region that should not use this ShippingOption anymore. * @public * @documentationMaturity preview * @requiredField deliveryRegionId * @requiredField options * @requiredField options.revision * @requiredField shippingOptionId * @permissionId ECOM.SHIPPING_OPTION_UPDATE * @applicableIdentity APP * @fqn wix.ecom.delivery.v1.ShippingOptionService.RemoveDeliveryRegion */ declare function removeDeliveryRegion(shippingOptionId: string, deliveryRegionId: string, options: NonNullablePaths): Promise>; interface RemoveDeliveryRegionOptions { /** Revision of the ShippingOption. */ revision: string | null; } export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type AddDeliveryRegionOptions, type AddDeliveryRegionRequest, type AddDeliveryRegionResponse, type BaseEventMetadata, type CommonQueryWithEntityContext, type Condition, ConditionType, type ConditionTypeWithLiterals, type ConditionalRates, type CreateShippingOptionApplicationErrors, type CreateShippingOptionRequest, type CreateShippingOptionResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteShippingOptionRequest, type DeleteShippingOptionResponse, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type GetShippingOptionRequest, type GetShippingOptionResponse, type IdentificationData, type IdentificationDataIdOneOf, LogicalOperator, type LogicalOperatorWithLiterals, type MessageEnvelope, type QueryShippingOptionsRequest, type QueryShippingOptionsResponse, type RemoveDeliveryRegionOptions, type RemoveDeliveryRegionRequest, type RemoveDeliveryRegionResponse, type RestoreInfo, type ShippingOption, type ShippingOptionCreatedEnvelope, type ShippingOptionDeletedEnvelope, type ShippingOptionQuery, type ShippingOptionQuerySpec, type ShippingOptionUpdatedEnvelope, type ShippingOptionsQueryBuilder, type ShippingOptionsQueryResult, SortOrder, type SortOrderWithLiterals, type Sorting, type UpdateExtendedFieldsOptions, type UpdateExtendedFieldsRequest, type UpdateExtendedFieldsResponse, type UpdateShippingOption, type UpdateShippingOptionApplicationErrors, type UpdateShippingOptionRequest, type UpdateShippingOptionResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, addDeliveryRegion, createShippingOption, deleteShippingOption, getShippingOption, onShippingOptionCreated, onShippingOptionDeleted, onShippingOptionUpdated, queryShippingOptions, removeDeliveryRegion, typedQueryShippingOptions, updateExtendedFields, updateShippingOption, utils };