export interface ShippoConfiguration { /** * ShippoConfiguration ID. * @readonly */ id?: string | null; /** @readonly */ revision?: string | null; /** * Date and time the ShippoConfiguration was created. * @readonly */ createdDate?: Date | null; /** * Date and time the ShippoConfiguration was last updated. * @readonly */ updatedDate?: Date | null; /** Associated delivery region ID. */ deliveryRegionId?: string | null; /** Settings of USPS domestic services. */ domesticServices?: DomesticServiceSettings[]; /** Settings of USPS international services. */ internationalServices?: InternationalServiceSettings[]; /** Package type. */ packageType?: PackageType; /** Package details. */ packageDetails?: PackageDetails; /** Location ID from OS location service. */ osLocationId?: string | null; /** * Ship from address materialized from OS location. * @readonly */ shipFromAddress?: Address; /** Backup weight. */ backupWeight?: string | null; /** Data extensions. */ extendedFields?: ExtendedFields; } export interface DomesticServiceSettings { /** USPS domestic service. */ service?: DomesticService; /** Service settings. */ serviceSettings?: ServiceSettings; } export declare enum DomesticService { UNKNOWN_DOMESTIC_SERVICE = "UNKNOWN_DOMESTIC_SERVICE", GROUND_ADVANTAGE = "GROUND_ADVANTAGE", PRIORITY_MAIL = "PRIORITY_MAIL", PRIORITY_MAIL_EXPRESS = "PRIORITY_MAIL_EXPRESS" } export interface ServiceSettings { /** Estimated delivery time. */ estimatedDeliveryTime?: string | null; /** Handling fee. */ handlingFee?: HandlingFee; /** Amount above which free delivery is offered. */ freeDeliveryMinimumAmount?: string | null; } export interface HandlingFee { /** Value that will be used to calculate the fee. For example, percentage fee with value 5% to calculate the fee. */ value?: string; /** How to calculate the fee: fixed amount or by percentage. */ calculationType?: CalculationType; } export declare enum CalculationType { UNKNOWN_TYPE = "UNKNOWN_TYPE", FIXED = "FIXED", PERCENTAGE = "PERCENTAGE" } export interface InternationalServiceSettings { /** USPS international service. */ service?: InternationalService; /** Service settings. */ serviceSettings?: ServiceSettings; } export declare enum InternationalService { UNKNOWN_INTERNATIONAL_SERVICE = "UNKNOWN_INTERNATIONAL_SERVICE", FIRST_CLASS_PACKAGE_INTERNATIONAL = "FIRST_CLASS_PACKAGE_INTERNATIONAL", PRIORITY_MAIL_INTERNATIONAL = "PRIORITY_MAIL_INTERNATIONAL", PRIORITY_MAIL_EXPRESS_INTERNATIONAL = "PRIORITY_MAIL_EXPRESS_INTERNATIONAL" } export declare enum PackageType { UNKNOWN_PACKAGE_TYPE = "UNKNOWN_PACKAGE_TYPE", CUSTOM = "CUSTOM", FLAT_RATE_ENVELOPE = "FLAT_RATE_ENVELOPE", PADDED_FLAT_RATE_ENVELOPE = "PADDED_FLAT_RATE_ENVELOPE", SMALL_FLAT_RATE_BOX = "SMALL_FLAT_RATE_BOX", MEDIUM_FLAT_RATE_BOX_1 = "MEDIUM_FLAT_RATE_BOX_1", MEDIUM_FLAT_RATE_BOX_2 = "MEDIUM_FLAT_RATE_BOX_2", LARGE_FLAT_RATE_BOX = "LARGE_FLAT_RATE_BOX" } export interface PackageDetails { /** * Package name. Must be set when package type is CUSTOM. * For other package types, it is read-only, and an exception will be thrown * if it set when creating a ShippoConfiguration. */ name?: string | null; /** * Package dimensions. Can only be set when package type is CUSTOM. * For other package types, it is read-only, and an exception will be thrown * if it set when creating a ShippoConfiguration. */ dimensions?: PackageDimensions; /** * Maximum number of products. Must be set when package type is NOT CUSTOM. * Otherwise, if the package type is CUSTOM, this field cannot be set and an * exception will be thrown if it is set when creating a ShippoConfiguration. */ maxNumberOfProducts?: string | null; } export interface PackageDimensions { /** Package length. */ length?: string; /** Package width. */ width?: string; /** Package height. */ height?: string; } /** Physical address */ export interface Address { /** Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */ country?: string | null; /** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */ subdivision?: string | null; /** City name. */ city?: string | null; /** Postal or zip code. */ postalCode?: string | null; /** Street address. */ streetAddress?: StreetAddress; /** Main address line (usually street name and number). */ addressLine?: string | null; /** Free text providing more detailed address info. Usually contains apt, suite, floor. */ addressLine2?: string | null; /** * Country's full name. * @readonly */ countryFullname?: string | null; /** * Subdivision full-name. * @readonly */ subdivisionFullname?: string | null; } export interface StreetAddress { /** Street number. */ number?: string; /** Street name. */ name?: string; } export interface AddressLocation { /** Address latitude. */ latitude?: number | null; /** Address longitude. */ longitude?: number | null; } export 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>; } export interface CreateShippoConfigurationRequest { /** ShippoConfiguration to be created. */ shippoConfiguration: ShippoConfiguration; backupRate?: string | null; } export interface CreateShippoConfigurationResponse { /** The created ShippoConfiguration. */ shippoConfiguration?: ShippoConfiguration; } export interface GetShippoConfigurationRequest { /** ID of the ShippoConfiguration to retrieve. */ shippoConfigurationId: string; } export interface GetShippoConfigurationResponse { /** The requested ShippoConfiguration. */ shippoConfiguration?: ShippoConfiguration; } export interface UpdateShippoConfigurationRequest { /** ShippoConfiguration to be updated, may be partial. */ shippoConfiguration: ShippoConfiguration; } export interface UpdateShippoConfigurationResponse { /** Updated ShippoConfiguration. */ shippoConfiguration?: ShippoConfiguration; } export interface DeleteShippoConfigurationRequest { /** ID of the ShippoConfiguration to delete. */ shippoConfigurationId: string; } export interface DeleteShippoConfigurationResponse { } export interface QueryShippoConfigurationsRequest { /** WQL expression. */ query?: CursorQuery; } export 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"}]` */ sort?: Sorting[]; } /** @oneof */ export 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; } export interface Sorting { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder; } export declare enum SortOrder { ASC = "ASC", DESC = "DESC" } export interface CursorPaging { /** Maximum number of items to return in the results. */ 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. */ cursor?: string | null; } export interface QueryShippoConfigurationsResponse { /** List of ShippoConfigurations. */ shippoConfigurations?: ShippoConfiguration[]; /** Paging metadata. */ pagingMetadata?: CursorPagingMetadata; } export 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; } export interface Cursors { /** Cursor string pointing to the next page in the list of results. */ next?: string | null; /** Cursor pointing to the previous page in the list of results. */ prev?: string | null; } export 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; } export interface UpdateExtendedFieldsResponse { /** Updated ShippoConfiguration. */ shippoConfiguration?: ShippoConfiguration; } 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 { entityAsJson?: string; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo; } 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. */ currentEntityAsJson?: string; } export interface EntityDeletedEvent { /** Entity that was deleted */ deletedEntityAsJson?: string | null; } export interface ActionEvent { bodyAsJson?: string; } export interface Empty { } 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 HandlingFeeNonNullableFields { value: string; calculationType: CalculationType; } interface ServiceSettingsNonNullableFields { handlingFee?: HandlingFeeNonNullableFields; } interface DomesticServiceSettingsNonNullableFields { service: DomesticService; serviceSettings?: ServiceSettingsNonNullableFields; } interface InternationalServiceSettingsNonNullableFields { service: InternationalService; serviceSettings?: ServiceSettingsNonNullableFields; } interface PackageDimensionsNonNullableFields { length: string; width: string; height: string; } interface PackageDetailsNonNullableFields { dimensions?: PackageDimensionsNonNullableFields; } interface StreetAddressNonNullableFields { number: string; name: string; apt: string; } interface AddressNonNullableFields { streetAddress?: StreetAddressNonNullableFields; } interface ShippoConfigurationNonNullableFields { domesticServices: DomesticServiceSettingsNonNullableFields[]; internationalServices: InternationalServiceSettingsNonNullableFields[]; packageType: PackageType; packageDetails?: PackageDetailsNonNullableFields; shipFromAddress?: AddressNonNullableFields; } export interface CreateShippoConfigurationResponseNonNullableFields { shippoConfiguration?: ShippoConfigurationNonNullableFields; } export interface GetShippoConfigurationResponseNonNullableFields { shippoConfiguration?: ShippoConfigurationNonNullableFields; } export interface UpdateShippoConfigurationResponseNonNullableFields { shippoConfiguration?: ShippoConfigurationNonNullableFields; } export interface QueryShippoConfigurationsResponseNonNullableFields { shippoConfigurations: ShippoConfigurationNonNullableFields[]; } export interface UpdateExtendedFieldsResponseNonNullableFields { shippoConfiguration?: ShippoConfigurationNonNullableFields; } export {};