@wix/auto_sdk_ecom_shippo-configurations 1.0.14 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.context.d.ts +13 -5
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.context.js +12 -4
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.context.js.map +1 -1
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.http.d.ts +7 -0
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.http.js +76 -1
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.http.js.map +1 -1
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.meta.d.ts +7 -0
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.meta.js +45 -1
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.meta.js.map +1 -1
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.public.d.ts +19 -2
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.public.js +13 -1
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.public.js.map +1 -1
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.types.d.ts +45 -17
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.types.js.map +1 -1
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.universal.d.ts +125 -39
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.universal.js +99 -1
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.universal.js.map +1 -1
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.context.d.ts +13 -5
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.context.js +12 -4
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.context.js.map +1 -1
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.http.d.ts +7 -0
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.http.js +73 -0
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.http.js.map +1 -1
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.meta.d.ts +7 -0
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.meta.js +42 -0
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.meta.js.map +1 -1
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.public.d.ts +19 -2
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.public.js +11 -1
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.public.js.map +1 -1
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.types.d.ts +45 -17
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.types.js.map +1 -1
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.universal.d.ts +125 -39
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.universal.js +96 -0
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.universal.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.context.d.ts +13 -5
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.context.js +12 -4
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.context.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.http.d.ts +7 -0
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.http.js +76 -1
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.http.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.meta.d.ts +7 -0
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.meta.js +45 -1
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.meta.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.public.d.ts +19 -2
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.public.js +13 -1
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.public.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.types.d.ts +45 -17
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.types.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.universal.d.ts +125 -39
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.universal.js +99 -1
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.universal.js.map +1 -1
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.context.d.ts +13 -5
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.context.js +12 -4
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.context.js.map +1 -1
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.http.d.ts +7 -0
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.http.js +73 -0
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.http.js.map +1 -1
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.meta.d.ts +7 -0
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.meta.js +42 -0
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.meta.js.map +1 -1
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.public.d.ts +19 -2
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.public.js +11 -1
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.public.js.map +1 -1
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.types.d.ts +45 -17
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.types.js.map +1 -1
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.universal.d.ts +125 -39
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.universal.js +96 -0
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.universal.js.map +1 -1
- package/package.json +2 -2
|
@@ -109,4 +109,46 @@ export function updateExtendedFields() {
|
|
|
109
109
|
__originalResponseType: null,
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
|
+
export function addDeliveryRegion() {
|
|
113
|
+
const payload = { shippoConfigurationId: ':shippoConfigurationId' };
|
|
114
|
+
const getRequestOptions = ambassadorWixEcomV1ShippoConfiguration.addDeliveryRegion(payload);
|
|
115
|
+
const getUrl = (context) => {
|
|
116
|
+
const { url } = getRequestOptions(context);
|
|
117
|
+
return url;
|
|
118
|
+
};
|
|
119
|
+
return {
|
|
120
|
+
getUrl,
|
|
121
|
+
httpMethod: 'POST',
|
|
122
|
+
path: '/v1/shippo-configurations/{shippoConfigurationId}/delivery-regions',
|
|
123
|
+
pathParams: { shippoConfigurationId: 'shippoConfigurationId' },
|
|
124
|
+
__requestType: null,
|
|
125
|
+
__originalRequestType: null,
|
|
126
|
+
__responseType: null,
|
|
127
|
+
__originalResponseType: null,
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
export function removeDeliveryRegion() {
|
|
131
|
+
const payload = {
|
|
132
|
+
shippoConfigurationId: ':shippoConfigurationId',
|
|
133
|
+
deliveryRegionId: ':deliveryRegionId',
|
|
134
|
+
};
|
|
135
|
+
const getRequestOptions = ambassadorWixEcomV1ShippoConfiguration.removeDeliveryRegion(payload);
|
|
136
|
+
const getUrl = (context) => {
|
|
137
|
+
const { url } = getRequestOptions(context);
|
|
138
|
+
return url;
|
|
139
|
+
};
|
|
140
|
+
return {
|
|
141
|
+
getUrl,
|
|
142
|
+
httpMethod: 'DELETE',
|
|
143
|
+
path: '/v1/shippo-configurations/{shippoConfigurationId}/delivery-regions/{deliveryRegionId}',
|
|
144
|
+
pathParams: {
|
|
145
|
+
shippoConfigurationId: 'shippoConfigurationId',
|
|
146
|
+
deliveryRegionId: 'deliveryRegionId',
|
|
147
|
+
},
|
|
148
|
+
__requestType: null,
|
|
149
|
+
__originalRequestType: null,
|
|
150
|
+
__responseType: null,
|
|
151
|
+
__originalResponseType: null,
|
|
152
|
+
};
|
|
153
|
+
}
|
|
112
154
|
//# sourceMappingURL=ecom-v1-shippo-configuration-shippo-configurations.meta.js.map
|
package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.meta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ecom-v1-shippo-configuration-shippo-configurations.meta.js","sourceRoot":"","sources":["../../../../src/ecom-v1-shippo-configuration-shippo-configurations.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,sCAAsC,MAAM,8DAA8D,CAAC;AAsBvH,MAAM,UAAU,yBAAyB;IAQvC,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,sCAAsC,CAAC,yBAAyB,CAAC,OAAO,CAAC,CAAC;IAE5E,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,2BAA2B;QACjC,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,sBAAsB;IAQpC,MAAM,OAAO,GAAG,EAAE,qBAAqB,EAAE,wBAAwB,EAAS,CAAC;IAE3E,MAAM,iBAAiB,GACrB,sCAAsC,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;IAEzE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,EAAE,MAAM;QAClB,IAAI,EAAE,uDAAuD;QAC7D,UAAU,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE;QACxB,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"ecom-v1-shippo-configuration-shippo-configurations.meta.js","sourceRoot":"","sources":["../../../../src/ecom-v1-shippo-configuration-shippo-configurations.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,sCAAsC,MAAM,8DAA8D,CAAC;AAsBvH,MAAM,UAAU,yBAAyB;IAQvC,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,sCAAsC,CAAC,yBAAyB,CAAC,OAAO,CAAC,CAAC;IAE5E,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,2BAA2B;QACjC,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,sBAAsB;IAQpC,MAAM,OAAO,GAAG,EAAE,qBAAqB,EAAE,wBAAwB,EAAS,CAAC;IAE3E,MAAM,iBAAiB,GACrB,sCAAsC,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;IAEzE,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd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AAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC"}
|
package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.public.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventDefinition, HttpClient } from '@wix/sdk-types';
|
|
2
|
-
import { CreateShippoConfigurationOptions, ShippoConfiguration, ShippoConfigurationCreatedEnvelope, ShippoConfigurationDeletedEnvelope, ShippoConfigurationUpdatedEnvelope, ShippoConfigurationsQueryBuilder, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, UpdateShippoConfiguration } from './ecom-v1-shippo-configuration-shippo-configurations.universal.js';
|
|
2
|
+
import { AddDeliveryRegionOptions, AddDeliveryRegionResponse, CreateShippoConfigurationOptions, RemoveDeliveryRegionIdentifiers, RemoveDeliveryRegionOptions, RemoveDeliveryRegionResponse, ShippoConfiguration, ShippoConfigurationCreatedEnvelope, ShippoConfigurationDeletedEnvelope, ShippoConfigurationUpdatedEnvelope, ShippoConfigurationsQueryBuilder, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, UpdateShippoConfiguration } from './ecom-v1-shippo-configuration-shippo-configurations.universal.js';
|
|
3
3
|
export declare const __metadata: {
|
|
4
4
|
PACKAGE_NAME: string;
|
|
5
5
|
};
|
|
@@ -61,7 +61,24 @@ interface UpdateExtendedFieldsSignature {
|
|
|
61
61
|
*/
|
|
62
62
|
(_id: string, namespace: string, options: UpdateExtendedFieldsOptions): Promise<UpdateExtendedFieldsResponse>;
|
|
63
63
|
}
|
|
64
|
+
export declare function addDeliveryRegion(httpClient: HttpClient): AddDeliveryRegionSignature;
|
|
65
|
+
interface AddDeliveryRegionSignature {
|
|
66
|
+
/**
|
|
67
|
+
* Adds a delivery region to a Shippo configuration.
|
|
68
|
+
* @param - ID of the ShippoConfiguration to add the delivery region to.
|
|
69
|
+
* @param - ID of the delivery region to add.
|
|
70
|
+
*/
|
|
71
|
+
(shippoConfigurationId: string, deliveryRegionId: string, options?: AddDeliveryRegionOptions | undefined): Promise<AddDeliveryRegionResponse>;
|
|
72
|
+
}
|
|
73
|
+
export declare function removeDeliveryRegion(httpClient: HttpClient): RemoveDeliveryRegionSignature;
|
|
74
|
+
interface RemoveDeliveryRegionSignature {
|
|
75
|
+
/**
|
|
76
|
+
* Removes a delivery region from a Shippo configuration.
|
|
77
|
+
* When passing the ID of the only existing delivery region, removing it will delete the Shippo configuration.
|
|
78
|
+
*/
|
|
79
|
+
(identifiers: RemoveDeliveryRegionIdentifiers, options?: RemoveDeliveryRegionOptions | undefined): Promise<RemoveDeliveryRegionResponse>;
|
|
80
|
+
}
|
|
64
81
|
export declare const onShippoConfigurationCreated: EventDefinition<ShippoConfigurationCreatedEnvelope, "wix.ecom.v1.shippo_configuration_created">;
|
|
65
82
|
export declare const onShippoConfigurationDeleted: EventDefinition<ShippoConfigurationDeletedEnvelope, "wix.ecom.v1.shippo_configuration_deleted">;
|
|
66
83
|
export declare const onShippoConfigurationUpdated: EventDefinition<ShippoConfigurationUpdatedEnvelope, "wix.ecom.v1.shippo_configuration_updated">;
|
|
67
|
-
export { ActionEvent, Address, AddressLocation, BaseEventMetadata, CalculationType, CreateShippoConfigurationOptions, CreateShippoConfigurationRequest, CreateShippoConfigurationResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeleteShippoConfigurationRequest, DeleteShippoConfigurationResponse, DomainEvent, DomainEventBodyOneOf, DomesticService, DomesticServiceSettings, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, GetShippoConfigurationRequest, GetShippoConfigurationResponse, HandlingFee, IdentificationData, IdentificationDataIdOneOf, InternationalService, InternationalServiceSettings, MessageEnvelope, PackageDetails, PackageDimensions, PackageType, QueryShippoConfigurationsRequest, QueryShippoConfigurationsResponse, RestoreInfo, ServiceSettings, ShippoConfiguration, ShippoConfigurationCreatedEnvelope, ShippoConfigurationDeletedEnvelope, ShippoConfigurationUpdatedEnvelope, ShippoConfigurationsQueryBuilder, ShippoConfigurationsQueryResult, SortOrder, Sorting, StreetAddress, UpdateExtendedFieldsOptions, UpdateExtendedFieldsRequest, UpdateExtendedFieldsResponse, UpdateShippoConfiguration, UpdateShippoConfigurationRequest, UpdateShippoConfigurationResponse, WebhookIdentityType, } from './ecom-v1-shippo-configuration-shippo-configurations.universal.js';
|
|
84
|
+
export { ActionEvent, AddDeliveryRegionOptions, AddDeliveryRegionRequest, AddDeliveryRegionResponse, Address, AddressLocation, BaseEventMetadata, CalculationType, CreateShippoConfigurationOptions, CreateShippoConfigurationRequest, CreateShippoConfigurationResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeleteShippoConfigurationRequest, DeleteShippoConfigurationResponse, DomainEvent, DomainEventBodyOneOf, DomesticService, DomesticServiceSettings, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, GetShippoConfigurationRequest, GetShippoConfigurationResponse, HandlingFee, IdentificationData, IdentificationDataIdOneOf, InternationalService, InternationalServiceSettings, MessageEnvelope, PackageDetails, PackageDimensions, PackageType, QueryShippoConfigurationsRequest, QueryShippoConfigurationsResponse, RemoveDeliveryRegionIdentifiers, RemoveDeliveryRegionOptions, RemoveDeliveryRegionRequest, RemoveDeliveryRegionResponse, RestoreInfo, ServiceSettings, ShippoConfiguration, ShippoConfigurationCreatedEnvelope, ShippoConfigurationDeletedEnvelope, ShippoConfigurationUpdatedEnvelope, ShippoConfigurationsQueryBuilder, ShippoConfigurationsQueryResult, SortOrder, Sorting, StreetAddress, UpdateExtendedFieldsOptions, UpdateExtendedFieldsRequest, UpdateExtendedFieldsResponse, UpdateShippoConfiguration, UpdateShippoConfigurationRequest, UpdateShippoConfigurationResponse, WebhookIdentityType, } from './ecom-v1-shippo-configuration-shippo-configurations.universal.js';
|
|
@@ -3,7 +3,7 @@ import { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformatio
|
|
|
3
3
|
import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';
|
|
4
4
|
import { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';
|
|
5
5
|
import { EventDefinition } from '@wix/sdk-types';
|
|
6
|
-
import { createShippoConfiguration as universalCreateShippoConfiguration, deleteShippoConfiguration as universalDeleteShippoConfiguration, getShippoConfiguration as universalGetShippoConfiguration, queryShippoConfigurations as universalQueryShippoConfigurations, updateExtendedFields as universalUpdateExtendedFields, updateShippoConfiguration as universalUpdateShippoConfiguration, } from './ecom-v1-shippo-configuration-shippo-configurations.universal.js';
|
|
6
|
+
import { addDeliveryRegion as universalAddDeliveryRegion, createShippoConfiguration as universalCreateShippoConfiguration, deleteShippoConfiguration as universalDeleteShippoConfiguration, getShippoConfiguration as universalGetShippoConfiguration, queryShippoConfigurations as universalQueryShippoConfigurations, removeDeliveryRegion as universalRemoveDeliveryRegion, updateExtendedFields as universalUpdateExtendedFields, updateShippoConfiguration as universalUpdateShippoConfiguration, } from './ecom-v1-shippo-configuration-shippo-configurations.universal.js';
|
|
7
7
|
export const __metadata = { PACKAGE_NAME: '@wix/ecom' };
|
|
8
8
|
export function createShippoConfiguration(httpClient) {
|
|
9
9
|
return (shippoConfiguration, options) => universalCreateShippoConfiguration(shippoConfiguration, options,
|
|
@@ -35,6 +35,16 @@ export function updateExtendedFields(httpClient) {
|
|
|
35
35
|
// @ts-ignore
|
|
36
36
|
{ httpClient });
|
|
37
37
|
}
|
|
38
|
+
export function addDeliveryRegion(httpClient) {
|
|
39
|
+
return (shippoConfigurationId, deliveryRegionId, options) => universalAddDeliveryRegion(shippoConfigurationId, deliveryRegionId, options,
|
|
40
|
+
// @ts-ignore
|
|
41
|
+
{ httpClient });
|
|
42
|
+
}
|
|
43
|
+
export function removeDeliveryRegion(httpClient) {
|
|
44
|
+
return (identifiers, options) => universalRemoveDeliveryRegion(identifiers, options,
|
|
45
|
+
// @ts-ignore
|
|
46
|
+
{ httpClient });
|
|
47
|
+
}
|
|
38
48
|
export const onShippoConfigurationCreated = EventDefinition('wix.ecom.v1.shippo_configuration_created', true, (event) => renameKeysFromRESTResponseToSDKResponse(transformPaths(event, [
|
|
39
49
|
{
|
|
40
50
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.public.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ecom-v1-shippo-configuration-shippo-configurations.public.js","sourceRoot":"","sources":["../../../../src/ecom-v1-shippo-configuration-shippo-configurations.public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uCAAuC,EAAE,MAAM,yCAAyC,CAAC;AAClG,OAAO,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AAC5F,OAAO,EAAE,oCAAoC,EAAE,MAAM,4CAA4C,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAClF,OAAO,EAAE,eAAe,EAAgC,MAAM,gBAAgB,CAAC;AAC/E,OAAO,
|
|
1
|
+
{"version":3,"file":"ecom-v1-shippo-configuration-shippo-configurations.public.js","sourceRoot":"","sources":["../../../../src/ecom-v1-shippo-configuration-shippo-configurations.public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uCAAuC,EAAE,MAAM,yCAAyC,CAAC;AAClG,OAAO,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AAC5F,OAAO,EAAE,oCAAoC,EAAE,MAAM,4CAA4C,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAClF,OAAO,EAAE,eAAe,EAAgC,MAAM,gBAAgB,CAAC;AAC/E,OAAO,EAeL,iBAAiB,IAAI,0BAA0B,EAC/C,yBAAyB,IAAI,kCAAkC,EAC/D,yBAAyB,IAAI,kCAAkC,EAC/D,sBAAsB,IAAI,+BAA+B,EACzD,yBAAyB,IAAI,kCAAkC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AE,CAAC,EAAE,IAAI,EAAE,wBAAwB,EAAE,CAAC;KAC5C;CACF,CAAC,CACH,CACJ,EAAsC,CAAC;AACxC,MAAM,CAAC,MAAM,4BAA4B,GAAG,eAAe,CACzD,0CAA0C,EAC1C,IAAI,EACJ,CAAC,KAAyC,EAAE,EAAE,CAC5C,uCAAuC,CACrC,cAAc,CAAC,KAAK,EAAE;IACpB;QACE,WAAW,EAAE,oCAAoC;QACjD,KAAK,EAAE;YACL,EAAE,IAAI,EAAE,oBAAoB,EAAE;YAC9B,EAAE,IAAI,EAAE,oBAAoB,EAAE;YAC9B,EAAE,IAAI,EAAE,oBAAoB,EAAE;SAC/B;KACF;IACD;QACE,WAAW,EAAE,gCAAgC;QAC7C,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,wBAAwB,EAAE,CAAC;KAC5C;CACF,CAAC,CACH,CACJ,EAAsC,CAAC;AAExC,OAAO,EAQL,eAAe,EAaf,eAAe,EAaf,oBAAoB,EAKpB,WAAW,EAeX,SAAS,EAST,mBAAmB,GACpB,MAAM,mEAAmE,CAAC"}
|
|
@@ -387,25 +387,21 @@ export interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
387
387
|
updatedEvent?: EntityUpdatedEvent;
|
|
388
388
|
deletedEvent?: EntityDeletedEvent;
|
|
389
389
|
actionEvent?: ActionEvent;
|
|
390
|
-
/**
|
|
391
|
-
* Unique event ID.
|
|
392
|
-
* Allows clients to ignore duplicate webhooks.
|
|
393
|
-
*/
|
|
390
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
394
391
|
id?: string;
|
|
395
392
|
/**
|
|
396
|
-
*
|
|
397
|
-
*
|
|
393
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
394
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
398
395
|
*/
|
|
399
396
|
entityFqdn?: string;
|
|
400
397
|
/**
|
|
401
|
-
*
|
|
402
|
-
*
|
|
403
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
|
398
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
399
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
404
400
|
*/
|
|
405
401
|
slug?: string;
|
|
406
402
|
/** ID of the entity associated with the event. */
|
|
407
403
|
entityId?: string;
|
|
408
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example
|
|
404
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
409
405
|
eventTime?: Date | null;
|
|
410
406
|
/**
|
|
411
407
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
@@ -415,12 +411,8 @@ export interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
415
411
|
/** If present, indicates the action that triggered the event. */
|
|
416
412
|
originatedFrom?: string | null;
|
|
417
413
|
/**
|
|
418
|
-
* A sequence number
|
|
419
|
-
*
|
|
420
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
421
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
422
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
423
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
414
|
+
* 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.
|
|
415
|
+
* 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.
|
|
424
416
|
*/
|
|
425
417
|
entityEventSequence?: string | null;
|
|
426
418
|
}
|
|
@@ -448,7 +440,7 @@ export interface EntityUpdatedEvent {
|
|
|
448
440
|
currentEntityAsJson?: string;
|
|
449
441
|
}
|
|
450
442
|
export interface EntityDeletedEvent {
|
|
451
|
-
/** Entity that was deleted */
|
|
443
|
+
/** Entity that was deleted. */
|
|
452
444
|
deletedEntityAsJson?: string | null;
|
|
453
445
|
}
|
|
454
446
|
export interface ActionEvent {
|
|
@@ -456,6 +448,42 @@ export interface ActionEvent {
|
|
|
456
448
|
}
|
|
457
449
|
export interface Empty {
|
|
458
450
|
}
|
|
451
|
+
export interface AddDeliveryRegionRequest {
|
|
452
|
+
/**
|
|
453
|
+
* ID of the ShippoConfiguration to add the delivery region to.
|
|
454
|
+
* @format GUID
|
|
455
|
+
*/
|
|
456
|
+
shippoConfigurationId: string;
|
|
457
|
+
/**
|
|
458
|
+
* ID of the delivery region to add.
|
|
459
|
+
* @format GUID
|
|
460
|
+
*/
|
|
461
|
+
deliveryRegionId: string;
|
|
462
|
+
/** Revision of the ShippoConfiguration. */
|
|
463
|
+
revision?: string | null;
|
|
464
|
+
}
|
|
465
|
+
export interface AddDeliveryRegionResponse {
|
|
466
|
+
/** The updated ShippoConfiguration. */
|
|
467
|
+
shippoConfiguration?: ShippoConfiguration;
|
|
468
|
+
}
|
|
469
|
+
export interface RemoveDeliveryRegionRequest {
|
|
470
|
+
/**
|
|
471
|
+
* ID of the ShippoConfiguration to remove the delivery region from.
|
|
472
|
+
* @format GUID
|
|
473
|
+
*/
|
|
474
|
+
shippoConfigurationId: string;
|
|
475
|
+
/**
|
|
476
|
+
* ID of the delivery region to remove.
|
|
477
|
+
* @format GUID
|
|
478
|
+
*/
|
|
479
|
+
deliveryRegionId: string;
|
|
480
|
+
/** Revision of the ShippoConfiguration. */
|
|
481
|
+
revision?: string | null;
|
|
482
|
+
}
|
|
483
|
+
export interface RemoveDeliveryRegionResponse {
|
|
484
|
+
/** The updated ShippoConfiguration, or empty if the ShippoConfiguration was deleted. */
|
|
485
|
+
shippoConfiguration?: ShippoConfiguration;
|
|
486
|
+
}
|
|
459
487
|
export interface MessageEnvelope {
|
|
460
488
|
/**
|
|
461
489
|
* App instance ID.
|
package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ecom-v1-shippo-configuration-shippo-configurations.types.js","sourceRoot":"","sources":["../../../../src/ecom-v1-shippo-configuration-shippo-configurations.types.ts"],"names":[],"mappings":"AAiFA,MAAM,CAAN,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,wEAAqD,CAAA;IACrD,wDAAqC,CAAA;IACrC,kDAA+B,CAAA;IAC/B,kEAA+C,CAAA;AACjD,CAAC,EALW,eAAe,KAAf,eAAe,QAK1B;AA2BD,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,gDAA6B,CAAA;IAC7B,kCAAe,CAAA;IACf,4CAAyB,CAAA;AAC3B,CAAC,EAJW,eAAe,KAAf,eAAe,QAI1B;AAeD,MAAM,CAAN,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,uFAA+D,CAAA;IAC/D,+FAAuE,CAAA;IACvE,mFAA2D,CAAA;IAC3D,mGAA2E,CAAA;AAC7E,CAAC,EALW,oBAAoB,KAApB,oBAAoB,QAK/B;AAED,MAAM,CAAN,IAAY,WASX;AATD,WAAY,WAAW;IACrB,4DAA6C,CAAA;IAC7C,gCAAiB,CAAA;IACjB,wDAAyC,CAAA;IACzC,sEAAuD,CAAA;IACvD,0DAA2C,CAAA;IAC3C,gEAAiD,CAAA;IACjD,gEAAiD,CAAA;IACjD,0DAA2C,CAAA;AAC7C,CAAC,EATW,WAAW,KAAX,WAAW,QAStB;AAwMD,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;
|
|
1
|
+
{"version":3,"file":"ecom-v1-shippo-configuration-shippo-configurations.types.js","sourceRoot":"","sources":["../../../../src/ecom-v1-shippo-configuration-shippo-configurations.types.ts"],"names":[],"mappings":"AAiFA,MAAM,CAAN,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,wEAAqD,CAAA;IACrD,wDAAqC,CAAA;IACrC,kDAA+B,CAAA;IAC/B,kEAA+C,CAAA;AACjD,CAAC,EALW,eAAe,KAAf,eAAe,QAK1B;AA2BD,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,gDAA6B,CAAA;IAC7B,kCAAe,CAAA;IACf,4CAAyB,CAAA;AAC3B,CAAC,EAJW,eAAe,KAAf,eAAe,QAI1B;AAeD,MAAM,CAAN,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,uFAA+D,CAAA;IAC/D,+FAAuE,CAAA;IACvE,mFAA2D,CAAA;IAC3D,mGAA2E,CAAA;AAC7E,CAAC,EALW,oBAAoB,KAApB,oBAAoB,QAK/B;AAED,MAAM,CAAN,IAAY,WASX;AATD,WAAY,WAAW;IACrB,4DAA6C,CAAA;IAC7C,gCAAiB,CAAA;IACjB,wDAAyC,CAAA;IACzC,sEAAuD,CAAA;IACvD,0DAA2C,CAAA;IAC3C,gEAAiD,CAAA;IACjD,gEAAiD,CAAA;IACjD,0DAA2C,CAAA;AAC7C,CAAC,EATW,WAAW,KAAX,WAAW,QAStB;AAwMD,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AAqPD,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B"}
|
package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.universal.d.ts
CHANGED
|
@@ -388,25 +388,21 @@ export interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
388
388
|
updatedEvent?: EntityUpdatedEvent;
|
|
389
389
|
deletedEvent?: EntityDeletedEvent;
|
|
390
390
|
actionEvent?: ActionEvent;
|
|
391
|
-
/**
|
|
392
|
-
* Unique event ID.
|
|
393
|
-
* Allows clients to ignore duplicate webhooks.
|
|
394
|
-
*/
|
|
391
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
395
392
|
_id?: string;
|
|
396
393
|
/**
|
|
397
|
-
*
|
|
398
|
-
*
|
|
394
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
395
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
399
396
|
*/
|
|
400
397
|
entityFqdn?: string;
|
|
401
398
|
/**
|
|
402
|
-
*
|
|
403
|
-
*
|
|
404
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
|
399
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
400
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
405
401
|
*/
|
|
406
402
|
slug?: string;
|
|
407
403
|
/** ID of the entity associated with the event. */
|
|
408
404
|
entityId?: string;
|
|
409
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example
|
|
405
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
410
406
|
eventTime?: Date | null;
|
|
411
407
|
/**
|
|
412
408
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
@@ -416,12 +412,8 @@ export interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
416
412
|
/** If present, indicates the action that triggered the event. */
|
|
417
413
|
originatedFrom?: string | null;
|
|
418
414
|
/**
|
|
419
|
-
* A sequence number
|
|
420
|
-
*
|
|
421
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
422
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
423
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
424
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
415
|
+
* 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.
|
|
416
|
+
* 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.
|
|
425
417
|
*/
|
|
426
418
|
entityEventSequence?: string | null;
|
|
427
419
|
}
|
|
@@ -447,7 +439,7 @@ export interface EntityUpdatedEvent {
|
|
|
447
439
|
currentEntity?: string;
|
|
448
440
|
}
|
|
449
441
|
export interface EntityDeletedEvent {
|
|
450
|
-
/** Entity that was deleted */
|
|
442
|
+
/** Entity that was deleted. */
|
|
451
443
|
deletedEntity?: string | null;
|
|
452
444
|
}
|
|
453
445
|
export interface ActionEvent {
|
|
@@ -455,6 +447,42 @@ export interface ActionEvent {
|
|
|
455
447
|
}
|
|
456
448
|
export interface Empty {
|
|
457
449
|
}
|
|
450
|
+
export interface AddDeliveryRegionRequest {
|
|
451
|
+
/**
|
|
452
|
+
* ID of the ShippoConfiguration to add the delivery region to.
|
|
453
|
+
* @format GUID
|
|
454
|
+
*/
|
|
455
|
+
shippoConfigurationId: string;
|
|
456
|
+
/**
|
|
457
|
+
* ID of the delivery region to add.
|
|
458
|
+
* @format GUID
|
|
459
|
+
*/
|
|
460
|
+
deliveryRegionId: string;
|
|
461
|
+
/** Revision of the ShippoConfiguration. */
|
|
462
|
+
revision?: string | null;
|
|
463
|
+
}
|
|
464
|
+
export interface AddDeliveryRegionResponse {
|
|
465
|
+
/** The updated ShippoConfiguration. */
|
|
466
|
+
shippoConfiguration?: ShippoConfiguration;
|
|
467
|
+
}
|
|
468
|
+
export interface RemoveDeliveryRegionRequest {
|
|
469
|
+
/**
|
|
470
|
+
* ID of the ShippoConfiguration to remove the delivery region from.
|
|
471
|
+
* @format GUID
|
|
472
|
+
*/
|
|
473
|
+
shippoConfigurationId: string;
|
|
474
|
+
/**
|
|
475
|
+
* ID of the delivery region to remove.
|
|
476
|
+
* @format GUID
|
|
477
|
+
*/
|
|
478
|
+
deliveryRegionId: string;
|
|
479
|
+
/** Revision of the ShippoConfiguration. */
|
|
480
|
+
revision?: string | null;
|
|
481
|
+
}
|
|
482
|
+
export interface RemoveDeliveryRegionResponse {
|
|
483
|
+
/** The updated ShippoConfiguration, or empty if the ShippoConfiguration was deleted. */
|
|
484
|
+
shippoConfiguration?: ShippoConfiguration;
|
|
485
|
+
}
|
|
458
486
|
export interface MessageEnvelope {
|
|
459
487
|
/**
|
|
460
488
|
* App instance ID.
|
|
@@ -540,25 +568,21 @@ export interface BaseEventMetadata {
|
|
|
540
568
|
identity?: IdentificationData;
|
|
541
569
|
}
|
|
542
570
|
export interface EventMetadata extends BaseEventMetadata {
|
|
543
|
-
/**
|
|
544
|
-
* Unique event ID.
|
|
545
|
-
* Allows clients to ignore duplicate webhooks.
|
|
546
|
-
*/
|
|
571
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
547
572
|
_id?: string;
|
|
548
573
|
/**
|
|
549
|
-
*
|
|
550
|
-
*
|
|
574
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
575
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
551
576
|
*/
|
|
552
577
|
entityFqdn?: string;
|
|
553
578
|
/**
|
|
554
|
-
*
|
|
555
|
-
*
|
|
556
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
|
579
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
580
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
557
581
|
*/
|
|
558
582
|
slug?: string;
|
|
559
583
|
/** ID of the entity associated with the event. */
|
|
560
584
|
entityId?: string;
|
|
561
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example
|
|
585
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
562
586
|
eventTime?: Date | null;
|
|
563
587
|
/**
|
|
564
588
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
@@ -568,12 +592,8 @@ export interface EventMetadata extends BaseEventMetadata {
|
|
|
568
592
|
/** If present, indicates the action that triggered the event. */
|
|
569
593
|
originatedFrom?: string | null;
|
|
570
594
|
/**
|
|
571
|
-
* A sequence number
|
|
572
|
-
*
|
|
573
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
574
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
575
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
576
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
595
|
+
* 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.
|
|
596
|
+
* 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.
|
|
577
597
|
*/
|
|
578
598
|
entityEventSequence?: string | null;
|
|
579
599
|
}
|
|
@@ -581,9 +601,13 @@ export interface ShippoConfigurationCreatedEnvelope {
|
|
|
581
601
|
entity: ShippoConfiguration;
|
|
582
602
|
metadata: EventMetadata;
|
|
583
603
|
}
|
|
584
|
-
/**
|
|
604
|
+
/**
|
|
605
|
+
* Triggered when a shipping option is created.
|
|
606
|
+
* @permissionScope Manage Stores
|
|
607
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
608
|
+
* @permissionId ECOM.SHIPPO_CONFIGURATION_READ
|
|
609
|
+
* @webhook
|
|
585
610
|
* @eventType wix.ecom.v1.shippo_configuration_created
|
|
586
|
-
* @serviceIdentifier wix.ecom.delivery.v1.ShippoService
|
|
587
611
|
* @slug created
|
|
588
612
|
* @documentationMaturity preview
|
|
589
613
|
*/
|
|
@@ -592,9 +616,13 @@ export interface ShippoConfigurationDeletedEnvelope {
|
|
|
592
616
|
entity: ShippoConfiguration;
|
|
593
617
|
metadata: EventMetadata;
|
|
594
618
|
}
|
|
595
|
-
/**
|
|
619
|
+
/**
|
|
620
|
+
* Triggered when a shipping option is deleted.
|
|
621
|
+
* @permissionScope Manage Stores
|
|
622
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
623
|
+
* @permissionId ECOM.SHIPPO_CONFIGURATION_READ
|
|
624
|
+
* @webhook
|
|
596
625
|
* @eventType wix.ecom.v1.shippo_configuration_deleted
|
|
597
|
-
* @serviceIdentifier wix.ecom.delivery.v1.ShippoService
|
|
598
626
|
* @slug deleted
|
|
599
627
|
* @documentationMaturity preview
|
|
600
628
|
*/
|
|
@@ -603,9 +631,13 @@ export interface ShippoConfigurationUpdatedEnvelope {
|
|
|
603
631
|
entity: ShippoConfiguration;
|
|
604
632
|
metadata: EventMetadata;
|
|
605
633
|
}
|
|
606
|
-
/**
|
|
634
|
+
/**
|
|
635
|
+
* Triggered when a shipping option is updated.
|
|
636
|
+
* @permissionScope Manage Stores
|
|
637
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
638
|
+
* @permissionId ECOM.SHIPPO_CONFIGURATION_READ
|
|
639
|
+
* @webhook
|
|
607
640
|
* @eventType wix.ecom.v1.shippo_configuration_updated
|
|
608
|
-
* @serviceIdentifier wix.ecom.delivery.v1.ShippoService
|
|
609
641
|
* @slug updated
|
|
610
642
|
* @documentationMaturity preview
|
|
611
643
|
*/
|
|
@@ -844,4 +876,58 @@ export interface UpdateExtendedFieldsOptions {
|
|
|
844
876
|
/** 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. */
|
|
845
877
|
namespaceData: Record<string, any> | null;
|
|
846
878
|
}
|
|
879
|
+
/**
|
|
880
|
+
* Adds a delivery region to a Shippo configuration.
|
|
881
|
+
* @param shippoConfigurationId - ID of the ShippoConfiguration to add the delivery region to.
|
|
882
|
+
* @param deliveryRegionId - ID of the delivery region to add.
|
|
883
|
+
* @public
|
|
884
|
+
* @documentationMaturity preview
|
|
885
|
+
* @requiredField deliveryRegionId
|
|
886
|
+
* @requiredField shippoConfigurationId
|
|
887
|
+
* @permissionId ECOM.SHIPPO_CONFIGURATION_UPDATE
|
|
888
|
+
* @permissionScope Manage Stores
|
|
889
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
890
|
+
* @applicableIdentity APP
|
|
891
|
+
* @fqn wix.ecom.delivery.v1.ShippoService.AddDeliveryRegion
|
|
892
|
+
*/
|
|
893
|
+
export declare function addDeliveryRegion(shippoConfigurationId: string, deliveryRegionId: string, options?: AddDeliveryRegionOptions): Promise<NonNullablePaths<AddDeliveryRegionResponse, {
|
|
894
|
+
[P in ShippoConfigurationNonNullablePaths]: `shippoConfiguration.${P}`;
|
|
895
|
+
}[ShippoConfigurationNonNullablePaths]>>;
|
|
896
|
+
export interface AddDeliveryRegionOptions {
|
|
897
|
+
/** Revision of the ShippoConfiguration. */
|
|
898
|
+
revision?: string | null;
|
|
899
|
+
}
|
|
900
|
+
/**
|
|
901
|
+
* Removes a delivery region from a Shippo configuration.
|
|
902
|
+
* When passing the ID of the only existing delivery region, removing it will delete the Shippo configuration.
|
|
903
|
+
* @public
|
|
904
|
+
* @documentationMaturity preview
|
|
905
|
+
* @requiredField identifiers
|
|
906
|
+
* @requiredField identifiers.deliveryRegionId
|
|
907
|
+
* @requiredField identifiers.shippoConfigurationId
|
|
908
|
+
* @permissionId ECOM.SHIPPO_CONFIGURATION_UPDATE
|
|
909
|
+
* @permissionScope Manage Stores
|
|
910
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
911
|
+
* @applicableIdentity APP
|
|
912
|
+
* @fqn wix.ecom.delivery.v1.ShippoService.RemoveDeliveryRegion
|
|
913
|
+
*/
|
|
914
|
+
export declare function removeDeliveryRegion(identifiers: NonNullablePaths<RemoveDeliveryRegionIdentifiers, `deliveryRegionId` | `shippoConfigurationId`>, options?: RemoveDeliveryRegionOptions): Promise<NonNullablePaths<RemoveDeliveryRegionResponse, {
|
|
915
|
+
[P in ShippoConfigurationNonNullablePaths]: `shippoConfiguration.${P}`;
|
|
916
|
+
}[ShippoConfigurationNonNullablePaths]>>;
|
|
917
|
+
export interface RemoveDeliveryRegionIdentifiers {
|
|
918
|
+
/**
|
|
919
|
+
* ID of the ShippoConfiguration to remove the delivery region from.
|
|
920
|
+
* @format GUID
|
|
921
|
+
*/
|
|
922
|
+
shippoConfigurationId: string;
|
|
923
|
+
/**
|
|
924
|
+
* ID of the delivery region to remove.
|
|
925
|
+
* @format GUID
|
|
926
|
+
*/
|
|
927
|
+
deliveryRegionId: string;
|
|
928
|
+
}
|
|
929
|
+
export interface RemoveDeliveryRegionOptions {
|
|
930
|
+
/** Revision of the ShippoConfiguration. */
|
|
931
|
+
revision?: string | null;
|
|
932
|
+
}
|
|
847
933
|
export {};
|
package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.universal.js
CHANGED
|
@@ -345,4 +345,100 @@ export async function updateExtendedFields(_id, namespace, options) {
|
|
|
345
345
|
throw transformedError;
|
|
346
346
|
}
|
|
347
347
|
}
|
|
348
|
+
/**
|
|
349
|
+
* Adds a delivery region to a Shippo configuration.
|
|
350
|
+
* @param shippoConfigurationId - ID of the ShippoConfiguration to add the delivery region to.
|
|
351
|
+
* @param deliveryRegionId - ID of the delivery region to add.
|
|
352
|
+
* @public
|
|
353
|
+
* @documentationMaturity preview
|
|
354
|
+
* @requiredField deliveryRegionId
|
|
355
|
+
* @requiredField shippoConfigurationId
|
|
356
|
+
* @permissionId ECOM.SHIPPO_CONFIGURATION_UPDATE
|
|
357
|
+
* @permissionScope Manage Stores
|
|
358
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
359
|
+
* @applicableIdentity APP
|
|
360
|
+
* @fqn wix.ecom.delivery.v1.ShippoService.AddDeliveryRegion
|
|
361
|
+
*/
|
|
362
|
+
export async function addDeliveryRegion(shippoConfigurationId, deliveryRegionId, options) {
|
|
363
|
+
// @ts-ignore
|
|
364
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
365
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
366
|
+
shippoConfigurationId: shippoConfigurationId,
|
|
367
|
+
deliveryRegionId: deliveryRegionId,
|
|
368
|
+
revision: options?.revision,
|
|
369
|
+
});
|
|
370
|
+
const reqOpts = ambassadorWixEcomV1ShippoConfiguration.addDeliveryRegion(payload);
|
|
371
|
+
sideEffects?.onSiteCall?.();
|
|
372
|
+
try {
|
|
373
|
+
const result = await httpClient.request(reqOpts);
|
|
374
|
+
sideEffects?.onSuccess?.(result);
|
|
375
|
+
return renameKeysFromRESTResponseToSDKResponse(transformPaths(result.data, [
|
|
376
|
+
{
|
|
377
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
378
|
+
paths: [{ path: 'shippoConfiguration.shipFromAddress' }],
|
|
379
|
+
},
|
|
380
|
+
]));
|
|
381
|
+
}
|
|
382
|
+
catch (err) {
|
|
383
|
+
const transformedError = sdkTransformError(err, {
|
|
384
|
+
spreadPathsToArguments: {},
|
|
385
|
+
explicitPathsToArguments: {
|
|
386
|
+
shippoConfigurationId: '$[0]',
|
|
387
|
+
deliveryRegionId: '$[1]',
|
|
388
|
+
revision: '$[2].revision',
|
|
389
|
+
},
|
|
390
|
+
singleArgumentUnchanged: false,
|
|
391
|
+
}, ['shippoConfigurationId', 'deliveryRegionId', 'options']);
|
|
392
|
+
sideEffects?.onError?.(err);
|
|
393
|
+
throw transformedError;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* Removes a delivery region from a Shippo configuration.
|
|
398
|
+
* When passing the ID of the only existing delivery region, removing it will delete the Shippo configuration.
|
|
399
|
+
* @public
|
|
400
|
+
* @documentationMaturity preview
|
|
401
|
+
* @requiredField identifiers
|
|
402
|
+
* @requiredField identifiers.deliveryRegionId
|
|
403
|
+
* @requiredField identifiers.shippoConfigurationId
|
|
404
|
+
* @permissionId ECOM.SHIPPO_CONFIGURATION_UPDATE
|
|
405
|
+
* @permissionScope Manage Stores
|
|
406
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
407
|
+
* @applicableIdentity APP
|
|
408
|
+
* @fqn wix.ecom.delivery.v1.ShippoService.RemoveDeliveryRegion
|
|
409
|
+
*/
|
|
410
|
+
export async function removeDeliveryRegion(identifiers, options) {
|
|
411
|
+
// @ts-ignore
|
|
412
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
413
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
414
|
+
shippoConfigurationId: identifiers?.shippoConfigurationId,
|
|
415
|
+
deliveryRegionId: identifiers?.deliveryRegionId,
|
|
416
|
+
revision: options?.revision,
|
|
417
|
+
});
|
|
418
|
+
const reqOpts = ambassadorWixEcomV1ShippoConfiguration.removeDeliveryRegion(payload);
|
|
419
|
+
sideEffects?.onSiteCall?.();
|
|
420
|
+
try {
|
|
421
|
+
const result = await httpClient.request(reqOpts);
|
|
422
|
+
sideEffects?.onSuccess?.(result);
|
|
423
|
+
return renameKeysFromRESTResponseToSDKResponse(transformPaths(result.data, [
|
|
424
|
+
{
|
|
425
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
426
|
+
paths: [{ path: 'shippoConfiguration.shipFromAddress' }],
|
|
427
|
+
},
|
|
428
|
+
]));
|
|
429
|
+
}
|
|
430
|
+
catch (err) {
|
|
431
|
+
const transformedError = sdkTransformError(err, {
|
|
432
|
+
spreadPathsToArguments: {},
|
|
433
|
+
explicitPathsToArguments: {
|
|
434
|
+
shippoConfigurationId: '$[0].shippoConfigurationId',
|
|
435
|
+
deliveryRegionId: '$[0].deliveryRegionId',
|
|
436
|
+
revision: '$[1].revision',
|
|
437
|
+
},
|
|
438
|
+
singleArgumentUnchanged: false,
|
|
439
|
+
}, ['identifiers', 'options']);
|
|
440
|
+
sideEffects?.onError?.(err);
|
|
441
|
+
throw transformedError;
|
|
442
|
+
}
|
|
443
|
+
}
|
|
348
444
|
//# sourceMappingURL=ecom-v1-shippo-configuration-shippo-configurations.universal.js.map
|