@wix/auto_sdk_ecom_shippo-configurations 1.0.20 → 1.0.21
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/{internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.universal.d.ts → ecom-v1-shippo-configuration-shippo-configurations.universal-D-nyXVmj.d.mts} +71 -240
- package/build/{internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.universal.d.ts → ecom-v1-shippo-configuration-shippo-configurations.universal-D-nyXVmj.d.ts} +71 -240
- package/build/index.d.mts +105 -0
- package/build/index.d.ts +105 -0
- package/build/index.js +901 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +861 -0
- package/build/index.mjs.map +1 -0
- package/build/{cjs/src/ecom-v1-shippo-configuration-shippo-configurations.universal.d.ts → internal/ecom-v1-shippo-configuration-shippo-configurations.universal-D-nyXVmj.d.mts} +71 -240
- package/build/{es/src/ecom-v1-shippo-configuration-shippo-configurations.universal.d.ts → internal/ecom-v1-shippo-configuration-shippo-configurations.universal-D-nyXVmj.d.ts} +71 -240
- package/build/internal/index.d.mts +105 -0
- package/build/internal/index.d.ts +105 -0
- package/build/internal/index.js +901 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +861 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/internal/{es/src/ecom-v1-shippo-configuration-shippo-configurations.types.d.ts → meta.d.mts} +78 -186
- package/build/{es/src/ecom-v1-shippo-configuration-shippo-configurations.types.d.ts → internal/meta.d.ts} +78 -186
- package/build/internal/meta.js +531 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +497 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/{cjs/src/ecom-v1-shippo-configuration-shippo-configurations.types.d.ts → meta.d.mts} +78 -186
- package/build/{internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.types.d.ts → meta.d.ts} +78 -186
- package/build/meta.js +531 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +497 -0
- package/build/meta.mjs.map +1 -0
- package/package.json +12 -11
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.context.d.ts +0 -28
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.context.js +0 -37
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.context.js.map +0 -1
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.http.d.ts +0 -29
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.http.js +0 -363
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.http.js.map +0 -1
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.meta.d.ts +0 -33
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.meta.js +0 -188
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.meta.js.map +0 -1
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.public.d.ts +0 -84
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.public.js +0 -108
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.public.js.map +0 -1
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.types.js +0 -48
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.types.js.map +0 -1
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.universal.js +0 -478
- package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/package.json +0 -3
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.context.d.ts +0 -28
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.context.js +0 -28
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.context.js.map +0 -1
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.http.d.ts +0 -29
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.http.js +0 -352
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.http.js.map +0 -1
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.meta.d.ts +0 -33
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.meta.js +0 -154
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.meta.js.map +0 -1
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.public.d.ts +0 -84
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.public.js +0 -91
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.public.js.map +0 -1
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.types.js +0 -45
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.types.js.map +0 -1
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.universal.js +0 -444
- package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.context.d.ts +0 -28
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.context.js +0 -37
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.context.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.http.d.ts +0 -29
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.http.js +0 -363
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.http.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.meta.d.ts +0 -33
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.meta.js +0 -188
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.meta.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.public.d.ts +0 -84
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.public.js +0 -108
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.public.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.types.js +0 -48
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.types.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.universal.js +0 -478
- package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.context.d.ts +0 -28
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.context.js +0 -28
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.context.js.map +0 -1
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.http.d.ts +0 -29
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.http.js +0 -352
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.http.js.map +0 -1
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.meta.d.ts +0 -33
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.meta.js +0 -154
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.meta.js.map +0 -1
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.public.d.ts +0 -84
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.public.js +0 -91
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.public.js.map +0 -1
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.types.js +0 -45
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.types.js.map +0 -1
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.universal.js +0 -444
- package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.universal.js.map +0 -1
|
@@ -0,0 +1,861 @@
|
|
|
1
|
+
// src/ecom-v1-shippo-configuration-shippo-configurations.public.ts
|
|
2
|
+
import { renameKeysFromRESTResponseToSDKResponse as renameKeysFromRESTResponseToSDKResponse2 } from "@wix/sdk-runtime/rename-all-nested-keys";
|
|
3
|
+
import { transformRESTAddressToSDKAddress as transformRESTAddressToSDKAddress2 } from "@wix/sdk-runtime/transformations/address";
|
|
4
|
+
import { transformRESTTimestampToSDKTimestamp as transformRESTTimestampToSDKTimestamp2 } from "@wix/sdk-runtime/transformations/timestamp";
|
|
5
|
+
import { transformPaths as transformPaths3 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
6
|
+
import { EventDefinition } from "@wix/sdk-types";
|
|
7
|
+
|
|
8
|
+
// src/ecom-v1-shippo-configuration-shippo-configurations.universal.ts
|
|
9
|
+
import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
|
|
10
|
+
import { queryBuilder } from "@wix/sdk-runtime/query-builder";
|
|
11
|
+
import {
|
|
12
|
+
renameKeysFromSDKRequestToRESTRequest,
|
|
13
|
+
renameKeysFromRESTResponseToSDKResponse
|
|
14
|
+
} from "@wix/sdk-runtime/rename-all-nested-keys";
|
|
15
|
+
|
|
16
|
+
// src/ecom-v1-shippo-configuration-shippo-configurations.http.ts
|
|
17
|
+
import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
|
|
18
|
+
import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
|
|
19
|
+
import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
|
|
20
|
+
import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
21
|
+
import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
22
|
+
import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
|
|
23
|
+
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
24
|
+
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
25
|
+
function resolveWixEcomDeliveryV1ShippoServiceUrl(opts) {
|
|
26
|
+
const domainToMappings = {
|
|
27
|
+
"manage._base_domain_": [
|
|
28
|
+
{
|
|
29
|
+
srcPath: "/_api/shippo-service",
|
|
30
|
+
destPath: ""
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"www.wixapis.com": [
|
|
34
|
+
{
|
|
35
|
+
srcPath: "/ecom/v1/shippo-configurations",
|
|
36
|
+
destPath: "/v1/shippo-configurations"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
};
|
|
40
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
41
|
+
}
|
|
42
|
+
var PACKAGE_NAME = "@wix/auto_sdk_ecom_shippo-configurations";
|
|
43
|
+
function createShippoConfiguration(payload) {
|
|
44
|
+
function __createShippoConfiguration({ host }) {
|
|
45
|
+
const serializedData = transformPaths(payload, [
|
|
46
|
+
{
|
|
47
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
48
|
+
paths: [
|
|
49
|
+
{ path: "shippoConfiguration.createdDate" },
|
|
50
|
+
{ path: "shippoConfiguration.updatedDate" }
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
55
|
+
paths: [
|
|
56
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.latitude" },
|
|
57
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.longitude" }
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
]);
|
|
61
|
+
const metadata = {
|
|
62
|
+
entityFqdn: "wix.ecom.v1.shippo_configuration",
|
|
63
|
+
method: "POST",
|
|
64
|
+
methodFqn: "wix.ecom.delivery.v1.ShippoService.CreateShippoConfiguration",
|
|
65
|
+
packageName: PACKAGE_NAME,
|
|
66
|
+
url: resolveWixEcomDeliveryV1ShippoServiceUrl({
|
|
67
|
+
protoPath: "/v1/shippo-configurations",
|
|
68
|
+
data: serializedData,
|
|
69
|
+
host
|
|
70
|
+
}),
|
|
71
|
+
data: serializedData,
|
|
72
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
73
|
+
{
|
|
74
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
75
|
+
paths: [
|
|
76
|
+
{ path: "shippoConfiguration.createdDate" },
|
|
77
|
+
{ path: "shippoConfiguration.updatedDate" }
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
82
|
+
paths: [
|
|
83
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.latitude" },
|
|
84
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.longitude" }
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
])
|
|
88
|
+
};
|
|
89
|
+
return metadata;
|
|
90
|
+
}
|
|
91
|
+
return __createShippoConfiguration;
|
|
92
|
+
}
|
|
93
|
+
function getShippoConfiguration(payload) {
|
|
94
|
+
function __getShippoConfiguration({ host }) {
|
|
95
|
+
const metadata = {
|
|
96
|
+
entityFqdn: "wix.ecom.v1.shippo_configuration",
|
|
97
|
+
method: "GET",
|
|
98
|
+
methodFqn: "wix.ecom.delivery.v1.ShippoService.GetShippoConfiguration",
|
|
99
|
+
packageName: PACKAGE_NAME,
|
|
100
|
+
url: resolveWixEcomDeliveryV1ShippoServiceUrl({
|
|
101
|
+
protoPath: "/v1/shippo-configurations/{shippoConfigurationId}",
|
|
102
|
+
data: payload,
|
|
103
|
+
host
|
|
104
|
+
}),
|
|
105
|
+
params: toURLSearchParams(payload),
|
|
106
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
107
|
+
{
|
|
108
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
109
|
+
paths: [
|
|
110
|
+
{ path: "shippoConfiguration.createdDate" },
|
|
111
|
+
{ path: "shippoConfiguration.updatedDate" }
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
116
|
+
paths: [
|
|
117
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.latitude" },
|
|
118
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.longitude" }
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
])
|
|
122
|
+
};
|
|
123
|
+
return metadata;
|
|
124
|
+
}
|
|
125
|
+
return __getShippoConfiguration;
|
|
126
|
+
}
|
|
127
|
+
function updateShippoConfiguration(payload) {
|
|
128
|
+
function __updateShippoConfiguration({ host }) {
|
|
129
|
+
const serializedData = transformPaths(payload, [
|
|
130
|
+
{
|
|
131
|
+
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
132
|
+
paths: [{ path: "fieldMask" }]
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
136
|
+
paths: [
|
|
137
|
+
{ path: "shippoConfiguration.createdDate" },
|
|
138
|
+
{ path: "shippoConfiguration.updatedDate" }
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
143
|
+
paths: [
|
|
144
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.latitude" },
|
|
145
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.longitude" }
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
]);
|
|
149
|
+
const metadata = {
|
|
150
|
+
entityFqdn: "wix.ecom.v1.shippo_configuration",
|
|
151
|
+
method: "PATCH",
|
|
152
|
+
methodFqn: "wix.ecom.delivery.v1.ShippoService.UpdateShippoConfiguration",
|
|
153
|
+
packageName: PACKAGE_NAME,
|
|
154
|
+
url: resolveWixEcomDeliveryV1ShippoServiceUrl({
|
|
155
|
+
protoPath: "/v1/shippo-configurations/{shippoConfiguration.id}",
|
|
156
|
+
data: serializedData,
|
|
157
|
+
host
|
|
158
|
+
}),
|
|
159
|
+
data: serializedData,
|
|
160
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
161
|
+
{
|
|
162
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
163
|
+
paths: [
|
|
164
|
+
{ path: "shippoConfiguration.createdDate" },
|
|
165
|
+
{ path: "shippoConfiguration.updatedDate" }
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
170
|
+
paths: [
|
|
171
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.latitude" },
|
|
172
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.longitude" }
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
])
|
|
176
|
+
};
|
|
177
|
+
return metadata;
|
|
178
|
+
}
|
|
179
|
+
return __updateShippoConfiguration;
|
|
180
|
+
}
|
|
181
|
+
function deleteShippoConfiguration(payload) {
|
|
182
|
+
function __deleteShippoConfiguration({ host }) {
|
|
183
|
+
const metadata = {
|
|
184
|
+
entityFqdn: "wix.ecom.v1.shippo_configuration",
|
|
185
|
+
method: "DELETE",
|
|
186
|
+
methodFqn: "wix.ecom.delivery.v1.ShippoService.DeleteShippoConfiguration",
|
|
187
|
+
packageName: PACKAGE_NAME,
|
|
188
|
+
url: resolveWixEcomDeliveryV1ShippoServiceUrl({
|
|
189
|
+
protoPath: "/v1/shippo-configurations/{shippoConfigurationId}",
|
|
190
|
+
data: payload,
|
|
191
|
+
host
|
|
192
|
+
}),
|
|
193
|
+
params: toURLSearchParams(payload)
|
|
194
|
+
};
|
|
195
|
+
return metadata;
|
|
196
|
+
}
|
|
197
|
+
return __deleteShippoConfiguration;
|
|
198
|
+
}
|
|
199
|
+
function queryShippoConfigurations(payload) {
|
|
200
|
+
function __queryShippoConfigurations({ host }) {
|
|
201
|
+
const metadata = {
|
|
202
|
+
entityFqdn: "wix.ecom.v1.shippo_configuration",
|
|
203
|
+
method: "POST",
|
|
204
|
+
methodFqn: "wix.ecom.delivery.v1.ShippoService.QueryShippoConfigurations",
|
|
205
|
+
packageName: PACKAGE_NAME,
|
|
206
|
+
url: resolveWixEcomDeliveryV1ShippoServiceUrl({
|
|
207
|
+
protoPath: "/v1/shippo-configurations/query",
|
|
208
|
+
data: payload,
|
|
209
|
+
host
|
|
210
|
+
}),
|
|
211
|
+
data: payload,
|
|
212
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
213
|
+
{
|
|
214
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
215
|
+
paths: [
|
|
216
|
+
{ path: "shippoConfigurations.createdDate" },
|
|
217
|
+
{ path: "shippoConfigurations.updatedDate" }
|
|
218
|
+
]
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
222
|
+
paths: [
|
|
223
|
+
{ path: "shippoConfigurations.shipFromAddress.geocode.latitude" },
|
|
224
|
+
{
|
|
225
|
+
path: "shippoConfigurations.shipFromAddress.geocode.longitude"
|
|
226
|
+
}
|
|
227
|
+
]
|
|
228
|
+
}
|
|
229
|
+
]),
|
|
230
|
+
fallback: [
|
|
231
|
+
{
|
|
232
|
+
method: "POST",
|
|
233
|
+
url: resolveWixEcomDeliveryV1ShippoServiceUrl({
|
|
234
|
+
protoPath: "/v1/shippo-configurations/query",
|
|
235
|
+
data: payload,
|
|
236
|
+
host
|
|
237
|
+
}),
|
|
238
|
+
data: payload
|
|
239
|
+
}
|
|
240
|
+
]
|
|
241
|
+
};
|
|
242
|
+
return metadata;
|
|
243
|
+
}
|
|
244
|
+
return __queryShippoConfigurations;
|
|
245
|
+
}
|
|
246
|
+
function updateExtendedFields(payload) {
|
|
247
|
+
function __updateExtendedFields({ host }) {
|
|
248
|
+
const metadata = {
|
|
249
|
+
entityFqdn: "wix.ecom.v1.shippo_configuration",
|
|
250
|
+
method: "POST",
|
|
251
|
+
methodFqn: "wix.ecom.delivery.v1.ShippoService.UpdateExtendedFields",
|
|
252
|
+
packageName: PACKAGE_NAME,
|
|
253
|
+
url: resolveWixEcomDeliveryV1ShippoServiceUrl({
|
|
254
|
+
protoPath: "/v1/shippo-configurations/{id}/update-extended-fields",
|
|
255
|
+
data: payload,
|
|
256
|
+
host
|
|
257
|
+
}),
|
|
258
|
+
data: payload,
|
|
259
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
260
|
+
{
|
|
261
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
262
|
+
paths: [
|
|
263
|
+
{ path: "shippoConfiguration.createdDate" },
|
|
264
|
+
{ path: "shippoConfiguration.updatedDate" }
|
|
265
|
+
]
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
269
|
+
paths: [
|
|
270
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.latitude" },
|
|
271
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.longitude" }
|
|
272
|
+
]
|
|
273
|
+
}
|
|
274
|
+
])
|
|
275
|
+
};
|
|
276
|
+
return metadata;
|
|
277
|
+
}
|
|
278
|
+
return __updateExtendedFields;
|
|
279
|
+
}
|
|
280
|
+
function addDeliveryRegion(payload) {
|
|
281
|
+
function __addDeliveryRegion({ host }) {
|
|
282
|
+
const metadata = {
|
|
283
|
+
entityFqdn: "wix.ecom.v1.shippo_configuration",
|
|
284
|
+
method: "POST",
|
|
285
|
+
methodFqn: "wix.ecom.delivery.v1.ShippoService.AddDeliveryRegion",
|
|
286
|
+
packageName: PACKAGE_NAME,
|
|
287
|
+
url: resolveWixEcomDeliveryV1ShippoServiceUrl({
|
|
288
|
+
protoPath: "/v1/shippo-configurations/{shippoConfigurationId}/delivery-regions",
|
|
289
|
+
data: payload,
|
|
290
|
+
host
|
|
291
|
+
}),
|
|
292
|
+
data: payload,
|
|
293
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
294
|
+
{
|
|
295
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
296
|
+
paths: [
|
|
297
|
+
{ path: "shippoConfiguration.createdDate" },
|
|
298
|
+
{ path: "shippoConfiguration.updatedDate" }
|
|
299
|
+
]
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
303
|
+
paths: [
|
|
304
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.latitude" },
|
|
305
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.longitude" }
|
|
306
|
+
]
|
|
307
|
+
}
|
|
308
|
+
])
|
|
309
|
+
};
|
|
310
|
+
return metadata;
|
|
311
|
+
}
|
|
312
|
+
return __addDeliveryRegion;
|
|
313
|
+
}
|
|
314
|
+
function removeDeliveryRegion(payload) {
|
|
315
|
+
function __removeDeliveryRegion({ host }) {
|
|
316
|
+
const metadata = {
|
|
317
|
+
entityFqdn: "wix.ecom.v1.shippo_configuration",
|
|
318
|
+
method: "DELETE",
|
|
319
|
+
methodFqn: "wix.ecom.delivery.v1.ShippoService.RemoveDeliveryRegion",
|
|
320
|
+
packageName: PACKAGE_NAME,
|
|
321
|
+
url: resolveWixEcomDeliveryV1ShippoServiceUrl({
|
|
322
|
+
protoPath: "/v1/shippo-configurations/{shippoConfigurationId}/delivery-regions/{deliveryRegionId}",
|
|
323
|
+
data: payload,
|
|
324
|
+
host
|
|
325
|
+
}),
|
|
326
|
+
params: toURLSearchParams(payload),
|
|
327
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
328
|
+
{
|
|
329
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
330
|
+
paths: [
|
|
331
|
+
{ path: "shippoConfiguration.createdDate" },
|
|
332
|
+
{ path: "shippoConfiguration.updatedDate" }
|
|
333
|
+
]
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
337
|
+
paths: [
|
|
338
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.latitude" },
|
|
339
|
+
{ path: "shippoConfiguration.shipFromAddress.geocode.longitude" }
|
|
340
|
+
]
|
|
341
|
+
}
|
|
342
|
+
])
|
|
343
|
+
};
|
|
344
|
+
return metadata;
|
|
345
|
+
}
|
|
346
|
+
return __removeDeliveryRegion;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
// src/ecom-v1-shippo-configuration-shippo-configurations.universal.ts
|
|
350
|
+
import { transformSDKAddressToRESTAddress } from "@wix/sdk-runtime/transformations/address";
|
|
351
|
+
import { transformRESTAddressToSDKAddress } from "@wix/sdk-runtime/transformations/address";
|
|
352
|
+
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
353
|
+
var DomesticService = /* @__PURE__ */ ((DomesticService2) => {
|
|
354
|
+
DomesticService2["UNKNOWN_DOMESTIC_SERVICE"] = "UNKNOWN_DOMESTIC_SERVICE";
|
|
355
|
+
DomesticService2["GROUND_ADVANTAGE"] = "GROUND_ADVANTAGE";
|
|
356
|
+
DomesticService2["PRIORITY_MAIL"] = "PRIORITY_MAIL";
|
|
357
|
+
DomesticService2["PRIORITY_MAIL_EXPRESS"] = "PRIORITY_MAIL_EXPRESS";
|
|
358
|
+
return DomesticService2;
|
|
359
|
+
})(DomesticService || {});
|
|
360
|
+
var CalculationType = /* @__PURE__ */ ((CalculationType2) => {
|
|
361
|
+
CalculationType2["UNKNOWN_TYPE"] = "UNKNOWN_TYPE";
|
|
362
|
+
CalculationType2["FIXED"] = "FIXED";
|
|
363
|
+
CalculationType2["PERCENTAGE"] = "PERCENTAGE";
|
|
364
|
+
return CalculationType2;
|
|
365
|
+
})(CalculationType || {});
|
|
366
|
+
var InternationalService = /* @__PURE__ */ ((InternationalService2) => {
|
|
367
|
+
InternationalService2["UNKNOWN_INTERNATIONAL_SERVICE"] = "UNKNOWN_INTERNATIONAL_SERVICE";
|
|
368
|
+
InternationalService2["FIRST_CLASS_PACKAGE_INTERNATIONAL"] = "FIRST_CLASS_PACKAGE_INTERNATIONAL";
|
|
369
|
+
InternationalService2["PRIORITY_MAIL_INTERNATIONAL"] = "PRIORITY_MAIL_INTERNATIONAL";
|
|
370
|
+
InternationalService2["PRIORITY_MAIL_EXPRESS_INTERNATIONAL"] = "PRIORITY_MAIL_EXPRESS_INTERNATIONAL";
|
|
371
|
+
return InternationalService2;
|
|
372
|
+
})(InternationalService || {});
|
|
373
|
+
var PackageType = /* @__PURE__ */ ((PackageType2) => {
|
|
374
|
+
PackageType2["UNKNOWN_PACKAGE_TYPE"] = "UNKNOWN_PACKAGE_TYPE";
|
|
375
|
+
PackageType2["CUSTOM"] = "CUSTOM";
|
|
376
|
+
PackageType2["FLAT_RATE_ENVELOPE"] = "FLAT_RATE_ENVELOPE";
|
|
377
|
+
PackageType2["PADDED_FLAT_RATE_ENVELOPE"] = "PADDED_FLAT_RATE_ENVELOPE";
|
|
378
|
+
PackageType2["SMALL_FLAT_RATE_BOX"] = "SMALL_FLAT_RATE_BOX";
|
|
379
|
+
PackageType2["MEDIUM_FLAT_RATE_BOX_1"] = "MEDIUM_FLAT_RATE_BOX_1";
|
|
380
|
+
PackageType2["MEDIUM_FLAT_RATE_BOX_2"] = "MEDIUM_FLAT_RATE_BOX_2";
|
|
381
|
+
PackageType2["LARGE_FLAT_RATE_BOX"] = "LARGE_FLAT_RATE_BOX";
|
|
382
|
+
return PackageType2;
|
|
383
|
+
})(PackageType || {});
|
|
384
|
+
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
385
|
+
SortOrder2["ASC"] = "ASC";
|
|
386
|
+
SortOrder2["DESC"] = "DESC";
|
|
387
|
+
return SortOrder2;
|
|
388
|
+
})(SortOrder || {});
|
|
389
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
390
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
391
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
392
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
393
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
394
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
395
|
+
return WebhookIdentityType2;
|
|
396
|
+
})(WebhookIdentityType || {});
|
|
397
|
+
async function createShippoConfiguration2(shippoConfiguration, options) {
|
|
398
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
399
|
+
const payload = transformPaths2(
|
|
400
|
+
renameKeysFromSDKRequestToRESTRequest({
|
|
401
|
+
shippoConfiguration,
|
|
402
|
+
backupRate: options?.backupRate
|
|
403
|
+
}),
|
|
404
|
+
[
|
|
405
|
+
{
|
|
406
|
+
transformFn: transformSDKAddressToRESTAddress,
|
|
407
|
+
paths: [{ path: "shippoConfiguration.shipFromAddress" }]
|
|
408
|
+
}
|
|
409
|
+
]
|
|
410
|
+
);
|
|
411
|
+
const reqOpts = createShippoConfiguration(payload);
|
|
412
|
+
sideEffects?.onSiteCall?.();
|
|
413
|
+
try {
|
|
414
|
+
const result = await httpClient.request(reqOpts);
|
|
415
|
+
sideEffects?.onSuccess?.(result);
|
|
416
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
417
|
+
transformPaths2(result.data, [
|
|
418
|
+
{
|
|
419
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
420
|
+
paths: [{ path: "shippoConfiguration.shipFromAddress" }]
|
|
421
|
+
}
|
|
422
|
+
])
|
|
423
|
+
)?.shippoConfiguration;
|
|
424
|
+
} catch (err) {
|
|
425
|
+
const transformedError = sdkTransformError(
|
|
426
|
+
err,
|
|
427
|
+
{
|
|
428
|
+
spreadPathsToArguments: {},
|
|
429
|
+
explicitPathsToArguments: {
|
|
430
|
+
shippoConfiguration: "$[0]",
|
|
431
|
+
backupRate: "$[1].backupRate"
|
|
432
|
+
},
|
|
433
|
+
singleArgumentUnchanged: false
|
|
434
|
+
},
|
|
435
|
+
["shippoConfiguration", "options"]
|
|
436
|
+
);
|
|
437
|
+
sideEffects?.onError?.(err);
|
|
438
|
+
throw transformedError;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
async function getShippoConfiguration2(shippoConfigurationId) {
|
|
442
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
443
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
444
|
+
shippoConfigurationId
|
|
445
|
+
});
|
|
446
|
+
const reqOpts = getShippoConfiguration(payload);
|
|
447
|
+
sideEffects?.onSiteCall?.();
|
|
448
|
+
try {
|
|
449
|
+
const result = await httpClient.request(reqOpts);
|
|
450
|
+
sideEffects?.onSuccess?.(result);
|
|
451
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
452
|
+
transformPaths2(result.data, [
|
|
453
|
+
{
|
|
454
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
455
|
+
paths: [{ path: "shippoConfiguration.shipFromAddress" }]
|
|
456
|
+
}
|
|
457
|
+
])
|
|
458
|
+
)?.shippoConfiguration;
|
|
459
|
+
} catch (err) {
|
|
460
|
+
const transformedError = sdkTransformError(
|
|
461
|
+
err,
|
|
462
|
+
{
|
|
463
|
+
spreadPathsToArguments: {},
|
|
464
|
+
explicitPathsToArguments: { shippoConfigurationId: "$[0]" },
|
|
465
|
+
singleArgumentUnchanged: false
|
|
466
|
+
},
|
|
467
|
+
["shippoConfigurationId"]
|
|
468
|
+
);
|
|
469
|
+
sideEffects?.onError?.(err);
|
|
470
|
+
throw transformedError;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
async function updateShippoConfiguration2(_id, shippoConfiguration) {
|
|
474
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
475
|
+
const payload = transformPaths2(
|
|
476
|
+
renameKeysFromSDKRequestToRESTRequest({
|
|
477
|
+
shippoConfiguration: { ...shippoConfiguration, id: _id }
|
|
478
|
+
}),
|
|
479
|
+
[
|
|
480
|
+
{
|
|
481
|
+
transformFn: transformSDKAddressToRESTAddress,
|
|
482
|
+
paths: [{ path: "shippoConfiguration.shipFromAddress" }]
|
|
483
|
+
}
|
|
484
|
+
]
|
|
485
|
+
);
|
|
486
|
+
const reqOpts = updateShippoConfiguration(payload);
|
|
487
|
+
sideEffects?.onSiteCall?.();
|
|
488
|
+
try {
|
|
489
|
+
const result = await httpClient.request(reqOpts);
|
|
490
|
+
sideEffects?.onSuccess?.(result);
|
|
491
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
492
|
+
transformPaths2(result.data, [
|
|
493
|
+
{
|
|
494
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
495
|
+
paths: [{ path: "shippoConfiguration.shipFromAddress" }]
|
|
496
|
+
}
|
|
497
|
+
])
|
|
498
|
+
)?.shippoConfiguration;
|
|
499
|
+
} catch (err) {
|
|
500
|
+
const transformedError = sdkTransformError(
|
|
501
|
+
err,
|
|
502
|
+
{
|
|
503
|
+
spreadPathsToArguments: { shippoConfiguration: "$[1]" },
|
|
504
|
+
explicitPathsToArguments: { "shippoConfiguration.id": "$[0]" },
|
|
505
|
+
singleArgumentUnchanged: false
|
|
506
|
+
},
|
|
507
|
+
["_id", "shippoConfiguration"]
|
|
508
|
+
);
|
|
509
|
+
sideEffects?.onError?.(err);
|
|
510
|
+
throw transformedError;
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
async function deleteShippoConfiguration2(shippoConfigurationId) {
|
|
514
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
515
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
516
|
+
shippoConfigurationId
|
|
517
|
+
});
|
|
518
|
+
const reqOpts = deleteShippoConfiguration(payload);
|
|
519
|
+
sideEffects?.onSiteCall?.();
|
|
520
|
+
try {
|
|
521
|
+
const result = await httpClient.request(reqOpts);
|
|
522
|
+
sideEffects?.onSuccess?.(result);
|
|
523
|
+
} catch (err) {
|
|
524
|
+
const transformedError = sdkTransformError(
|
|
525
|
+
err,
|
|
526
|
+
{
|
|
527
|
+
spreadPathsToArguments: {},
|
|
528
|
+
explicitPathsToArguments: { shippoConfigurationId: "$[0]" },
|
|
529
|
+
singleArgumentUnchanged: false
|
|
530
|
+
},
|
|
531
|
+
["shippoConfigurationId"]
|
|
532
|
+
);
|
|
533
|
+
sideEffects?.onError?.(err);
|
|
534
|
+
throw transformedError;
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
function queryShippoConfigurations2() {
|
|
538
|
+
const { httpClient, sideEffects } = arguments[0];
|
|
539
|
+
return queryBuilder({
|
|
540
|
+
func: async (payload) => {
|
|
541
|
+
const reqOpts = queryShippoConfigurations(
|
|
542
|
+
payload
|
|
543
|
+
);
|
|
544
|
+
sideEffects?.onSiteCall?.();
|
|
545
|
+
try {
|
|
546
|
+
const result = await httpClient.request(reqOpts);
|
|
547
|
+
sideEffects?.onSuccess?.(result);
|
|
548
|
+
return result;
|
|
549
|
+
} catch (err) {
|
|
550
|
+
sideEffects?.onError?.(err);
|
|
551
|
+
throw err;
|
|
552
|
+
}
|
|
553
|
+
},
|
|
554
|
+
requestTransformer: (query) => {
|
|
555
|
+
const args = [query, {}];
|
|
556
|
+
return renameKeysFromSDKRequestToRESTRequest({
|
|
557
|
+
...args?.[1],
|
|
558
|
+
query: args?.[0]
|
|
559
|
+
});
|
|
560
|
+
},
|
|
561
|
+
responseTransformer: ({
|
|
562
|
+
data
|
|
563
|
+
}) => {
|
|
564
|
+
const transformedData = renameKeysFromRESTResponseToSDKResponse(
|
|
565
|
+
transformPaths2(data, [
|
|
566
|
+
{
|
|
567
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
568
|
+
paths: [{ path: "shippoConfigurations.shipFromAddress" }]
|
|
569
|
+
}
|
|
570
|
+
])
|
|
571
|
+
);
|
|
572
|
+
return {
|
|
573
|
+
items: transformedData?.shippoConfigurations,
|
|
574
|
+
pagingMetadata: transformedData?.pagingMetadata
|
|
575
|
+
};
|
|
576
|
+
},
|
|
577
|
+
errorTransformer: (err) => {
|
|
578
|
+
const transformedError = sdkTransformError(err, {
|
|
579
|
+
spreadPathsToArguments: {},
|
|
580
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
581
|
+
singleArgumentUnchanged: false
|
|
582
|
+
});
|
|
583
|
+
throw transformedError;
|
|
584
|
+
},
|
|
585
|
+
pagingMethod: "CURSOR",
|
|
586
|
+
transformationPaths: {}
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
async function updateExtendedFields2(_id, namespace, options) {
|
|
590
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
591
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
592
|
+
id: _id,
|
|
593
|
+
namespace,
|
|
594
|
+
namespaceData: options?.namespaceData
|
|
595
|
+
});
|
|
596
|
+
const reqOpts = updateExtendedFields(payload);
|
|
597
|
+
sideEffects?.onSiteCall?.();
|
|
598
|
+
try {
|
|
599
|
+
const result = await httpClient.request(reqOpts);
|
|
600
|
+
sideEffects?.onSuccess?.(result);
|
|
601
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
602
|
+
transformPaths2(result.data, [
|
|
603
|
+
{
|
|
604
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
605
|
+
paths: [{ path: "shippoConfiguration.shipFromAddress" }]
|
|
606
|
+
}
|
|
607
|
+
])
|
|
608
|
+
);
|
|
609
|
+
} catch (err) {
|
|
610
|
+
const transformedError = sdkTransformError(
|
|
611
|
+
err,
|
|
612
|
+
{
|
|
613
|
+
spreadPathsToArguments: {},
|
|
614
|
+
explicitPathsToArguments: {
|
|
615
|
+
id: "$[0]",
|
|
616
|
+
namespace: "$[1]",
|
|
617
|
+
namespaceData: "$[2].namespaceData"
|
|
618
|
+
},
|
|
619
|
+
singleArgumentUnchanged: false
|
|
620
|
+
},
|
|
621
|
+
["_id", "namespace", "options"]
|
|
622
|
+
);
|
|
623
|
+
sideEffects?.onError?.(err);
|
|
624
|
+
throw transformedError;
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
async function addDeliveryRegion2(shippoConfigurationId, deliveryRegionId, options) {
|
|
628
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
629
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
630
|
+
shippoConfigurationId,
|
|
631
|
+
deliveryRegionId,
|
|
632
|
+
revision: options?.revision
|
|
633
|
+
});
|
|
634
|
+
const reqOpts = addDeliveryRegion(payload);
|
|
635
|
+
sideEffects?.onSiteCall?.();
|
|
636
|
+
try {
|
|
637
|
+
const result = await httpClient.request(reqOpts);
|
|
638
|
+
sideEffects?.onSuccess?.(result);
|
|
639
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
640
|
+
transformPaths2(result.data, [
|
|
641
|
+
{
|
|
642
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
643
|
+
paths: [{ path: "shippoConfiguration.shipFromAddress" }]
|
|
644
|
+
}
|
|
645
|
+
])
|
|
646
|
+
);
|
|
647
|
+
} catch (err) {
|
|
648
|
+
const transformedError = sdkTransformError(
|
|
649
|
+
err,
|
|
650
|
+
{
|
|
651
|
+
spreadPathsToArguments: {},
|
|
652
|
+
explicitPathsToArguments: {
|
|
653
|
+
shippoConfigurationId: "$[0]",
|
|
654
|
+
deliveryRegionId: "$[1]",
|
|
655
|
+
revision: "$[2].revision"
|
|
656
|
+
},
|
|
657
|
+
singleArgumentUnchanged: false
|
|
658
|
+
},
|
|
659
|
+
["shippoConfigurationId", "deliveryRegionId", "options"]
|
|
660
|
+
);
|
|
661
|
+
sideEffects?.onError?.(err);
|
|
662
|
+
throw transformedError;
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
async function removeDeliveryRegion2(identifiers, options) {
|
|
666
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
667
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
668
|
+
shippoConfigurationId: identifiers?.shippoConfigurationId,
|
|
669
|
+
deliveryRegionId: identifiers?.deliveryRegionId,
|
|
670
|
+
revision: options?.revision
|
|
671
|
+
});
|
|
672
|
+
const reqOpts = removeDeliveryRegion(payload);
|
|
673
|
+
sideEffects?.onSiteCall?.();
|
|
674
|
+
try {
|
|
675
|
+
const result = await httpClient.request(reqOpts);
|
|
676
|
+
sideEffects?.onSuccess?.(result);
|
|
677
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
678
|
+
transformPaths2(result.data, [
|
|
679
|
+
{
|
|
680
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
681
|
+
paths: [{ path: "shippoConfiguration.shipFromAddress" }]
|
|
682
|
+
}
|
|
683
|
+
])
|
|
684
|
+
);
|
|
685
|
+
} catch (err) {
|
|
686
|
+
const transformedError = sdkTransformError(
|
|
687
|
+
err,
|
|
688
|
+
{
|
|
689
|
+
spreadPathsToArguments: {},
|
|
690
|
+
explicitPathsToArguments: {
|
|
691
|
+
shippoConfigurationId: "$[0].shippoConfigurationId",
|
|
692
|
+
deliveryRegionId: "$[0].deliveryRegionId",
|
|
693
|
+
revision: "$[1].revision"
|
|
694
|
+
},
|
|
695
|
+
singleArgumentUnchanged: false
|
|
696
|
+
},
|
|
697
|
+
["identifiers", "options"]
|
|
698
|
+
);
|
|
699
|
+
sideEffects?.onError?.(err);
|
|
700
|
+
throw transformedError;
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
// src/ecom-v1-shippo-configuration-shippo-configurations.public.ts
|
|
705
|
+
function createShippoConfiguration3(httpClient) {
|
|
706
|
+
return (shippoConfiguration, options) => createShippoConfiguration2(
|
|
707
|
+
shippoConfiguration,
|
|
708
|
+
options,
|
|
709
|
+
// @ts-ignore
|
|
710
|
+
{ httpClient }
|
|
711
|
+
);
|
|
712
|
+
}
|
|
713
|
+
function getShippoConfiguration3(httpClient) {
|
|
714
|
+
return (shippoConfigurationId) => getShippoConfiguration2(
|
|
715
|
+
shippoConfigurationId,
|
|
716
|
+
// @ts-ignore
|
|
717
|
+
{ httpClient }
|
|
718
|
+
);
|
|
719
|
+
}
|
|
720
|
+
function updateShippoConfiguration3(httpClient) {
|
|
721
|
+
return (_id, shippoConfiguration) => updateShippoConfiguration2(
|
|
722
|
+
_id,
|
|
723
|
+
shippoConfiguration,
|
|
724
|
+
// @ts-ignore
|
|
725
|
+
{ httpClient }
|
|
726
|
+
);
|
|
727
|
+
}
|
|
728
|
+
function deleteShippoConfiguration3(httpClient) {
|
|
729
|
+
return (shippoConfigurationId) => deleteShippoConfiguration2(
|
|
730
|
+
shippoConfigurationId,
|
|
731
|
+
// @ts-ignore
|
|
732
|
+
{ httpClient }
|
|
733
|
+
);
|
|
734
|
+
}
|
|
735
|
+
function queryShippoConfigurations3(httpClient) {
|
|
736
|
+
return () => queryShippoConfigurations2(
|
|
737
|
+
// @ts-ignore
|
|
738
|
+
{ httpClient }
|
|
739
|
+
);
|
|
740
|
+
}
|
|
741
|
+
function updateExtendedFields3(httpClient) {
|
|
742
|
+
return (_id, namespace, options) => updateExtendedFields2(
|
|
743
|
+
_id,
|
|
744
|
+
namespace,
|
|
745
|
+
options,
|
|
746
|
+
// @ts-ignore
|
|
747
|
+
{ httpClient }
|
|
748
|
+
);
|
|
749
|
+
}
|
|
750
|
+
function addDeliveryRegion3(httpClient) {
|
|
751
|
+
return (shippoConfigurationId, deliveryRegionId, options) => addDeliveryRegion2(
|
|
752
|
+
shippoConfigurationId,
|
|
753
|
+
deliveryRegionId,
|
|
754
|
+
options,
|
|
755
|
+
// @ts-ignore
|
|
756
|
+
{ httpClient }
|
|
757
|
+
);
|
|
758
|
+
}
|
|
759
|
+
function removeDeliveryRegion3(httpClient) {
|
|
760
|
+
return (identifiers, options) => removeDeliveryRegion2(
|
|
761
|
+
identifiers,
|
|
762
|
+
options,
|
|
763
|
+
// @ts-ignore
|
|
764
|
+
{ httpClient }
|
|
765
|
+
);
|
|
766
|
+
}
|
|
767
|
+
var onShippoConfigurationCreated = EventDefinition(
|
|
768
|
+
"wix.ecom.v1.shippo_configuration_created",
|
|
769
|
+
true,
|
|
770
|
+
(event) => renameKeysFromRESTResponseToSDKResponse2(
|
|
771
|
+
transformPaths3(event, [
|
|
772
|
+
{
|
|
773
|
+
transformFn: transformRESTTimestampToSDKTimestamp2,
|
|
774
|
+
paths: [
|
|
775
|
+
{ path: "entity.createdDate" },
|
|
776
|
+
{ path: "entity.updatedDate" },
|
|
777
|
+
{ path: "metadata.eventTime" }
|
|
778
|
+
]
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
transformFn: transformRESTAddressToSDKAddress2,
|
|
782
|
+
paths: [{ path: "entity.shipFromAddress" }]
|
|
783
|
+
}
|
|
784
|
+
])
|
|
785
|
+
)
|
|
786
|
+
)();
|
|
787
|
+
var onShippoConfigurationDeleted = EventDefinition(
|
|
788
|
+
"wix.ecom.v1.shippo_configuration_deleted",
|
|
789
|
+
true,
|
|
790
|
+
(event) => renameKeysFromRESTResponseToSDKResponse2(
|
|
791
|
+
transformPaths3(event, [
|
|
792
|
+
{
|
|
793
|
+
transformFn: transformRESTTimestampToSDKTimestamp2,
|
|
794
|
+
paths: [
|
|
795
|
+
{ path: "entity.createdDate" },
|
|
796
|
+
{ path: "entity.updatedDate" },
|
|
797
|
+
{ path: "metadata.eventTime" }
|
|
798
|
+
]
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
transformFn: transformRESTAddressToSDKAddress2,
|
|
802
|
+
paths: [{ path: "entity.shipFromAddress" }]
|
|
803
|
+
}
|
|
804
|
+
])
|
|
805
|
+
)
|
|
806
|
+
)();
|
|
807
|
+
var onShippoConfigurationUpdated = EventDefinition(
|
|
808
|
+
"wix.ecom.v1.shippo_configuration_updated",
|
|
809
|
+
true,
|
|
810
|
+
(event) => renameKeysFromRESTResponseToSDKResponse2(
|
|
811
|
+
transformPaths3(event, [
|
|
812
|
+
{
|
|
813
|
+
transformFn: transformRESTTimestampToSDKTimestamp2,
|
|
814
|
+
paths: [
|
|
815
|
+
{ path: "entity.createdDate" },
|
|
816
|
+
{ path: "entity.updatedDate" },
|
|
817
|
+
{ path: "metadata.eventTime" }
|
|
818
|
+
]
|
|
819
|
+
},
|
|
820
|
+
{
|
|
821
|
+
transformFn: transformRESTAddressToSDKAddress2,
|
|
822
|
+
paths: [{ path: "entity.shipFromAddress" }]
|
|
823
|
+
}
|
|
824
|
+
])
|
|
825
|
+
)
|
|
826
|
+
)();
|
|
827
|
+
|
|
828
|
+
// src/ecom-v1-shippo-configuration-shippo-configurations.context.ts
|
|
829
|
+
import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
|
|
830
|
+
import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
|
|
831
|
+
var createShippoConfiguration4 = /* @__PURE__ */ createRESTModule(createShippoConfiguration3);
|
|
832
|
+
var getShippoConfiguration4 = /* @__PURE__ */ createRESTModule(getShippoConfiguration3);
|
|
833
|
+
var updateShippoConfiguration4 = /* @__PURE__ */ createRESTModule(updateShippoConfiguration3);
|
|
834
|
+
var deleteShippoConfiguration4 = /* @__PURE__ */ createRESTModule(deleteShippoConfiguration3);
|
|
835
|
+
var queryShippoConfigurations4 = /* @__PURE__ */ createRESTModule(queryShippoConfigurations3);
|
|
836
|
+
var updateExtendedFields4 = /* @__PURE__ */ createRESTModule(updateExtendedFields3);
|
|
837
|
+
var addDeliveryRegion4 = /* @__PURE__ */ createRESTModule(addDeliveryRegion3);
|
|
838
|
+
var removeDeliveryRegion4 = /* @__PURE__ */ createRESTModule(removeDeliveryRegion3);
|
|
839
|
+
var onShippoConfigurationCreated2 = createEventModule(onShippoConfigurationCreated);
|
|
840
|
+
var onShippoConfigurationDeleted2 = createEventModule(onShippoConfigurationDeleted);
|
|
841
|
+
var onShippoConfigurationUpdated2 = createEventModule(onShippoConfigurationUpdated);
|
|
842
|
+
export {
|
|
843
|
+
CalculationType,
|
|
844
|
+
DomesticService,
|
|
845
|
+
InternationalService,
|
|
846
|
+
PackageType,
|
|
847
|
+
SortOrder,
|
|
848
|
+
WebhookIdentityType,
|
|
849
|
+
addDeliveryRegion4 as addDeliveryRegion,
|
|
850
|
+
createShippoConfiguration4 as createShippoConfiguration,
|
|
851
|
+
deleteShippoConfiguration4 as deleteShippoConfiguration,
|
|
852
|
+
getShippoConfiguration4 as getShippoConfiguration,
|
|
853
|
+
onShippoConfigurationCreated2 as onShippoConfigurationCreated,
|
|
854
|
+
onShippoConfigurationDeleted2 as onShippoConfigurationDeleted,
|
|
855
|
+
onShippoConfigurationUpdated2 as onShippoConfigurationUpdated,
|
|
856
|
+
queryShippoConfigurations4 as queryShippoConfigurations,
|
|
857
|
+
removeDeliveryRegion4 as removeDeliveryRegion,
|
|
858
|
+
updateExtendedFields4 as updateExtendedFields,
|
|
859
|
+
updateShippoConfiguration4 as updateShippoConfiguration
|
|
860
|
+
};
|
|
861
|
+
//# sourceMappingURL=index.mjs.map
|