@wix/auto_sdk_ecom_shippo-configurations 1.0.9 → 1.0.10

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.
Files changed (129) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.context.d.ts +20 -0
  11. package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.context.js +29 -0
  12. package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.context.js.map +1 -0
  13. package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.http.d.ts +22 -0
  14. package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.http.js +288 -0
  15. package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.http.js.map +1 -0
  16. package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.meta.d.ts +26 -0
  17. package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.meta.js +144 -0
  18. package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.meta.js.map +1 -0
  19. package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.public.d.ts +67 -0
  20. package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.public.js +96 -0
  21. package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.public.js.map +1 -0
  22. package/build/{internal/meta.d.mts → cjs/src/ecom-v1-shippo-configuration-shippo-configurations.types.d.ts} +183 -62
  23. package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.types.js +48 -0
  24. package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.types.js.map +1 -0
  25. package/build/{ecom-v1-shippo-configuration-shippo-configurations.universal-nw2-6NKP.d.mts → cjs/src/ecom-v1-shippo-configuration-shippo-configurations.universal.d.ts} +163 -58
  26. package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.universal.js +362 -0
  27. package/build/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.context.d.ts +20 -0
  38. package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.context.js +20 -0
  39. package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.context.js.map +1 -0
  40. package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.http.d.ts +22 -0
  41. package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.http.js +279 -0
  42. package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.http.js.map +1 -0
  43. package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.meta.d.ts +26 -0
  44. package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.meta.js +112 -0
  45. package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.meta.js.map +1 -0
  46. package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.public.d.ts +67 -0
  47. package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.public.js +81 -0
  48. package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.public.js.map +1 -0
  49. package/build/{internal/meta.d.ts → es/src/ecom-v1-shippo-configuration-shippo-configurations.types.d.ts} +183 -62
  50. package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.types.js +45 -0
  51. package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.types.js.map +1 -0
  52. package/build/{ecom-v1-shippo-configuration-shippo-configurations.universal-nw2-6NKP.d.ts → es/src/ecom-v1-shippo-configuration-shippo-configurations.universal.d.ts} +163 -58
  53. package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.universal.js +330 -0
  54. package/build/es/src/ecom-v1-shippo-configuration-shippo-configurations.universal.js.map +1 -0
  55. package/build/internal/cjs/index.d.ts +1 -0
  56. package/build/internal/cjs/index.js +18 -0
  57. package/build/internal/cjs/index.js.map +1 -0
  58. package/build/internal/cjs/index.typings.d.ts +1 -0
  59. package/build/internal/cjs/index.typings.js +18 -0
  60. package/build/internal/cjs/index.typings.js.map +1 -0
  61. package/build/internal/cjs/meta.d.ts +1 -0
  62. package/build/internal/cjs/meta.js +18 -0
  63. package/build/internal/cjs/meta.js.map +1 -0
  64. package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.context.d.ts +20 -0
  65. package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.context.js +29 -0
  66. package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.context.js.map +1 -0
  67. package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.http.d.ts +22 -0
  68. package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.http.js +288 -0
  69. package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.http.js.map +1 -0
  70. package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.meta.d.ts +26 -0
  71. package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.meta.js +144 -0
  72. package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.meta.js.map +1 -0
  73. package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.public.d.ts +67 -0
  74. package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.public.js +96 -0
  75. package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.public.js.map +1 -0
  76. package/build/{meta.d.mts → internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.types.d.ts} +183 -62
  77. package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.types.js +48 -0
  78. package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.types.js.map +1 -0
  79. package/build/internal/{ecom-v1-shippo-configuration-shippo-configurations.universal-nw2-6NKP.d.mts → cjs/src/ecom-v1-shippo-configuration-shippo-configurations.universal.d.ts} +163 -58
  80. package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.universal.js +362 -0
  81. package/build/internal/cjs/src/ecom-v1-shippo-configuration-shippo-configurations.universal.js.map +1 -0
  82. package/build/internal/es/index.d.ts +1 -0
  83. package/build/internal/es/index.js +2 -0
  84. package/build/internal/es/index.js.map +1 -0
  85. package/build/internal/es/index.typings.d.ts +1 -0
  86. package/build/internal/es/index.typings.js +2 -0
  87. package/build/internal/es/index.typings.js.map +1 -0
  88. package/build/internal/es/meta.d.ts +1 -0
  89. package/build/internal/es/meta.js +2 -0
  90. package/build/internal/es/meta.js.map +1 -0
  91. package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.context.d.ts +20 -0
  92. package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.context.js +20 -0
  93. package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.context.js.map +1 -0
  94. package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.http.d.ts +22 -0
  95. package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.http.js +279 -0
  96. package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.http.js.map +1 -0
  97. package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.meta.d.ts +26 -0
  98. package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.meta.js +112 -0
  99. package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.meta.js.map +1 -0
  100. package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.public.d.ts +67 -0
  101. package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.public.js +81 -0
  102. package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.public.js.map +1 -0
  103. package/build/{meta.d.ts → internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.types.d.ts} +183 -62
  104. package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.types.js +45 -0
  105. package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.types.js.map +1 -0
  106. package/build/internal/{ecom-v1-shippo-configuration-shippo-configurations.universal-nw2-6NKP.d.ts → es/src/ecom-v1-shippo-configuration-shippo-configurations.universal.d.ts} +163 -58
  107. package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.universal.js +330 -0
  108. package/build/internal/es/src/ecom-v1-shippo-configuration-shippo-configurations.universal.js.map +1 -0
  109. package/package.json +11 -12
  110. package/build/index.d.mts +0 -78
  111. package/build/index.d.ts +0 -78
  112. package/build/index.js +0 -734
  113. package/build/index.js.map +0 -1
  114. package/build/index.mjs +0 -696
  115. package/build/index.mjs.map +0 -1
  116. package/build/internal/index.d.mts +0 -78
  117. package/build/internal/index.d.ts +0 -78
  118. package/build/internal/index.js +0 -734
  119. package/build/internal/index.js.map +0 -1
  120. package/build/internal/index.mjs +0 -696
  121. package/build/internal/index.mjs.map +0 -1
  122. package/build/internal/meta.js +0 -417
  123. package/build/internal/meta.js.map +0 -1
  124. package/build/internal/meta.mjs +0 -385
  125. package/build/internal/meta.mjs.map +0 -1
  126. package/build/meta.js +0 -417
  127. package/build/meta.js.map +0 -1
  128. package/build/meta.mjs +0 -385
  129. package/build/meta.mjs.map +0 -1
package/build/index.mjs DELETED
@@ -1,696 +0,0 @@
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
-
281
- // src/ecom-v1-shippo-configuration-shippo-configurations.universal.ts
282
- import { transformSDKAddressToRESTAddress } from "@wix/sdk-runtime/transformations/address";
283
- import { transformRESTAddressToSDKAddress } from "@wix/sdk-runtime/transformations/address";
284
- import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
285
- var DomesticService = /* @__PURE__ */ ((DomesticService2) => {
286
- DomesticService2["UNKNOWN_DOMESTIC_SERVICE"] = "UNKNOWN_DOMESTIC_SERVICE";
287
- DomesticService2["GROUND_ADVANTAGE"] = "GROUND_ADVANTAGE";
288
- DomesticService2["PRIORITY_MAIL"] = "PRIORITY_MAIL";
289
- DomesticService2["PRIORITY_MAIL_EXPRESS"] = "PRIORITY_MAIL_EXPRESS";
290
- return DomesticService2;
291
- })(DomesticService || {});
292
- var CalculationType = /* @__PURE__ */ ((CalculationType2) => {
293
- CalculationType2["UNKNOWN_TYPE"] = "UNKNOWN_TYPE";
294
- CalculationType2["FIXED"] = "FIXED";
295
- CalculationType2["PERCENTAGE"] = "PERCENTAGE";
296
- return CalculationType2;
297
- })(CalculationType || {});
298
- var InternationalService = /* @__PURE__ */ ((InternationalService2) => {
299
- InternationalService2["UNKNOWN_INTERNATIONAL_SERVICE"] = "UNKNOWN_INTERNATIONAL_SERVICE";
300
- InternationalService2["FIRST_CLASS_PACKAGE_INTERNATIONAL"] = "FIRST_CLASS_PACKAGE_INTERNATIONAL";
301
- InternationalService2["PRIORITY_MAIL_INTERNATIONAL"] = "PRIORITY_MAIL_INTERNATIONAL";
302
- InternationalService2["PRIORITY_MAIL_EXPRESS_INTERNATIONAL"] = "PRIORITY_MAIL_EXPRESS_INTERNATIONAL";
303
- return InternationalService2;
304
- })(InternationalService || {});
305
- var PackageType = /* @__PURE__ */ ((PackageType2) => {
306
- PackageType2["UNKNOWN_PACKAGE_TYPE"] = "UNKNOWN_PACKAGE_TYPE";
307
- PackageType2["CUSTOM"] = "CUSTOM";
308
- PackageType2["FLAT_RATE_ENVELOPE"] = "FLAT_RATE_ENVELOPE";
309
- PackageType2["PADDED_FLAT_RATE_ENVELOPE"] = "PADDED_FLAT_RATE_ENVELOPE";
310
- PackageType2["SMALL_FLAT_RATE_BOX"] = "SMALL_FLAT_RATE_BOX";
311
- PackageType2["MEDIUM_FLAT_RATE_BOX_1"] = "MEDIUM_FLAT_RATE_BOX_1";
312
- PackageType2["MEDIUM_FLAT_RATE_BOX_2"] = "MEDIUM_FLAT_RATE_BOX_2";
313
- PackageType2["LARGE_FLAT_RATE_BOX"] = "LARGE_FLAT_RATE_BOX";
314
- return PackageType2;
315
- })(PackageType || {});
316
- var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
317
- SortOrder2["ASC"] = "ASC";
318
- SortOrder2["DESC"] = "DESC";
319
- return SortOrder2;
320
- })(SortOrder || {});
321
- var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
322
- WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
323
- WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
324
- WebhookIdentityType2["MEMBER"] = "MEMBER";
325
- WebhookIdentityType2["WIX_USER"] = "WIX_USER";
326
- WebhookIdentityType2["APP"] = "APP";
327
- return WebhookIdentityType2;
328
- })(WebhookIdentityType || {});
329
- async function createShippoConfiguration2(shippoConfiguration, options) {
330
- const { httpClient, sideEffects } = arguments[2];
331
- const payload = transformPaths2(
332
- renameKeysFromSDKRequestToRESTRequest({
333
- shippoConfiguration,
334
- backupRate: options?.backupRate
335
- }),
336
- [
337
- {
338
- transformFn: transformSDKAddressToRESTAddress,
339
- paths: [{ path: "shippoConfiguration.shipFromAddress" }]
340
- }
341
- ]
342
- );
343
- const reqOpts = createShippoConfiguration(payload);
344
- sideEffects?.onSiteCall?.();
345
- try {
346
- const result = await httpClient.request(reqOpts);
347
- sideEffects?.onSuccess?.(result);
348
- return renameKeysFromRESTResponseToSDKResponse(
349
- transformPaths2(result.data, [
350
- {
351
- transformFn: transformRESTAddressToSDKAddress,
352
- paths: [{ path: "shippoConfiguration.shipFromAddress" }]
353
- }
354
- ])
355
- )?.shippoConfiguration;
356
- } catch (err) {
357
- const transformedError = sdkTransformError(
358
- err,
359
- {
360
- spreadPathsToArguments: {},
361
- explicitPathsToArguments: {
362
- shippoConfiguration: "$[0]",
363
- backupRate: "$[1].backupRate"
364
- },
365
- singleArgumentUnchanged: false
366
- },
367
- ["shippoConfiguration", "options"]
368
- );
369
- sideEffects?.onError?.(err);
370
- throw transformedError;
371
- }
372
- }
373
- async function getShippoConfiguration2(shippoConfigurationId) {
374
- const { httpClient, sideEffects } = arguments[1];
375
- const payload = renameKeysFromSDKRequestToRESTRequest({
376
- shippoConfigurationId
377
- });
378
- const reqOpts = getShippoConfiguration(payload);
379
- sideEffects?.onSiteCall?.();
380
- try {
381
- const result = await httpClient.request(reqOpts);
382
- sideEffects?.onSuccess?.(result);
383
- return renameKeysFromRESTResponseToSDKResponse(
384
- transformPaths2(result.data, [
385
- {
386
- transformFn: transformRESTAddressToSDKAddress,
387
- paths: [{ path: "shippoConfiguration.shipFromAddress" }]
388
- }
389
- ])
390
- )?.shippoConfiguration;
391
- } catch (err) {
392
- const transformedError = sdkTransformError(
393
- err,
394
- {
395
- spreadPathsToArguments: {},
396
- explicitPathsToArguments: { shippoConfigurationId: "$[0]" },
397
- singleArgumentUnchanged: false
398
- },
399
- ["shippoConfigurationId"]
400
- );
401
- sideEffects?.onError?.(err);
402
- throw transformedError;
403
- }
404
- }
405
- async function updateShippoConfiguration2(_id, shippoConfiguration) {
406
- const { httpClient, sideEffects } = arguments[2];
407
- const payload = transformPaths2(
408
- renameKeysFromSDKRequestToRESTRequest({
409
- shippoConfiguration: { ...shippoConfiguration, id: _id }
410
- }),
411
- [
412
- {
413
- transformFn: transformSDKAddressToRESTAddress,
414
- paths: [{ path: "shippoConfiguration.shipFromAddress" }]
415
- }
416
- ]
417
- );
418
- const reqOpts = updateShippoConfiguration(payload);
419
- sideEffects?.onSiteCall?.();
420
- try {
421
- const result = await httpClient.request(reqOpts);
422
- sideEffects?.onSuccess?.(result);
423
- return renameKeysFromRESTResponseToSDKResponse(
424
- transformPaths2(result.data, [
425
- {
426
- transformFn: transformRESTAddressToSDKAddress,
427
- paths: [{ path: "shippoConfiguration.shipFromAddress" }]
428
- }
429
- ])
430
- )?.shippoConfiguration;
431
- } catch (err) {
432
- const transformedError = sdkTransformError(
433
- err,
434
- {
435
- spreadPathsToArguments: { shippoConfiguration: "$[1]" },
436
- explicitPathsToArguments: { "shippoConfiguration.id": "$[0]" },
437
- singleArgumentUnchanged: false
438
- },
439
- ["_id", "shippoConfiguration"]
440
- );
441
- sideEffects?.onError?.(err);
442
- throw transformedError;
443
- }
444
- }
445
- async function deleteShippoConfiguration2(shippoConfigurationId) {
446
- const { httpClient, sideEffects } = arguments[1];
447
- const payload = renameKeysFromSDKRequestToRESTRequest({
448
- shippoConfigurationId
449
- });
450
- const reqOpts = deleteShippoConfiguration(payload);
451
- sideEffects?.onSiteCall?.();
452
- try {
453
- const result = await httpClient.request(reqOpts);
454
- sideEffects?.onSuccess?.(result);
455
- } catch (err) {
456
- const transformedError = sdkTransformError(
457
- err,
458
- {
459
- spreadPathsToArguments: {},
460
- explicitPathsToArguments: { shippoConfigurationId: "$[0]" },
461
- singleArgumentUnchanged: false
462
- },
463
- ["shippoConfigurationId"]
464
- );
465
- sideEffects?.onError?.(err);
466
- throw transformedError;
467
- }
468
- }
469
- function queryShippoConfigurations2() {
470
- const { httpClient, sideEffects } = arguments[0];
471
- return queryBuilder({
472
- func: async (payload) => {
473
- const reqOpts = queryShippoConfigurations(
474
- payload
475
- );
476
- sideEffects?.onSiteCall?.();
477
- try {
478
- const result = await httpClient.request(reqOpts);
479
- sideEffects?.onSuccess?.(result);
480
- return result;
481
- } catch (err) {
482
- sideEffects?.onError?.(err);
483
- throw err;
484
- }
485
- },
486
- requestTransformer: (query) => {
487
- const args = [query, {}];
488
- return renameKeysFromSDKRequestToRESTRequest({
489
- ...args?.[1],
490
- query: args?.[0]
491
- });
492
- },
493
- responseTransformer: ({
494
- data
495
- }) => {
496
- const transformedData = renameKeysFromRESTResponseToSDKResponse(
497
- transformPaths2(data, [
498
- {
499
- transformFn: transformRESTAddressToSDKAddress,
500
- paths: [{ path: "shippoConfigurations.shipFromAddress" }]
501
- }
502
- ])
503
- );
504
- return {
505
- items: transformedData?.shippoConfigurations,
506
- pagingMetadata: transformedData?.pagingMetadata
507
- };
508
- },
509
- errorTransformer: (err) => {
510
- const transformedError = sdkTransformError(err, {
511
- spreadPathsToArguments: {},
512
- explicitPathsToArguments: { query: "$[0]" },
513
- singleArgumentUnchanged: false
514
- });
515
- throw transformedError;
516
- },
517
- pagingMethod: "CURSOR",
518
- transformationPaths: {}
519
- });
520
- }
521
- async function updateExtendedFields2(_id, namespace, options) {
522
- const { httpClient, sideEffects } = arguments[3];
523
- const payload = renameKeysFromSDKRequestToRESTRequest({
524
- id: _id,
525
- namespace,
526
- namespaceData: options?.namespaceData
527
- });
528
- const reqOpts = updateExtendedFields(payload);
529
- sideEffects?.onSiteCall?.();
530
- try {
531
- const result = await httpClient.request(reqOpts);
532
- sideEffects?.onSuccess?.(result);
533
- return renameKeysFromRESTResponseToSDKResponse(
534
- transformPaths2(result.data, [
535
- {
536
- transformFn: transformRESTAddressToSDKAddress,
537
- paths: [{ path: "shippoConfiguration.shipFromAddress" }]
538
- }
539
- ])
540
- );
541
- } catch (err) {
542
- const transformedError = sdkTransformError(
543
- err,
544
- {
545
- spreadPathsToArguments: {},
546
- explicitPathsToArguments: {
547
- id: "$[0]",
548
- namespace: "$[1]",
549
- namespaceData: "$[2].namespaceData"
550
- },
551
- singleArgumentUnchanged: false
552
- },
553
- ["_id", "namespace", "options"]
554
- );
555
- sideEffects?.onError?.(err);
556
- throw transformedError;
557
- }
558
- }
559
-
560
- // src/ecom-v1-shippo-configuration-shippo-configurations.public.ts
561
- function createShippoConfiguration3(httpClient) {
562
- return (shippoConfiguration, options) => createShippoConfiguration2(
563
- shippoConfiguration,
564
- options,
565
- // @ts-ignore
566
- { httpClient }
567
- );
568
- }
569
- function getShippoConfiguration3(httpClient) {
570
- return (shippoConfigurationId) => getShippoConfiguration2(
571
- shippoConfigurationId,
572
- // @ts-ignore
573
- { httpClient }
574
- );
575
- }
576
- function updateShippoConfiguration3(httpClient) {
577
- return (_id, shippoConfiguration) => updateShippoConfiguration2(
578
- _id,
579
- shippoConfiguration,
580
- // @ts-ignore
581
- { httpClient }
582
- );
583
- }
584
- function deleteShippoConfiguration3(httpClient) {
585
- return (shippoConfigurationId) => deleteShippoConfiguration2(
586
- shippoConfigurationId,
587
- // @ts-ignore
588
- { httpClient }
589
- );
590
- }
591
- function queryShippoConfigurations3(httpClient) {
592
- return () => queryShippoConfigurations2(
593
- // @ts-ignore
594
- { httpClient }
595
- );
596
- }
597
- function updateExtendedFields3(httpClient) {
598
- return (_id, namespace, options) => updateExtendedFields2(
599
- _id,
600
- namespace,
601
- options,
602
- // @ts-ignore
603
- { httpClient }
604
- );
605
- }
606
- var onShippoConfigurationCreated = EventDefinition(
607
- "wix.ecom.v1.shippo_configuration_created",
608
- true,
609
- (event) => renameKeysFromRESTResponseToSDKResponse2(
610
- transformPaths3(event, [
611
- {
612
- transformFn: transformRESTTimestampToSDKTimestamp2,
613
- paths: [
614
- { path: "entity.createdDate" },
615
- { path: "entity.updatedDate" },
616
- { path: "metadata.eventTime" }
617
- ]
618
- },
619
- {
620
- transformFn: transformRESTAddressToSDKAddress2,
621
- paths: [{ path: "entity.shipFromAddress" }]
622
- }
623
- ])
624
- )
625
- )();
626
- var onShippoConfigurationDeleted = EventDefinition(
627
- "wix.ecom.v1.shippo_configuration_deleted",
628
- true,
629
- (event) => renameKeysFromRESTResponseToSDKResponse2(
630
- transformPaths3(event, [
631
- {
632
- transformFn: transformRESTTimestampToSDKTimestamp2,
633
- paths: [
634
- { path: "entity.createdDate" },
635
- { path: "entity.updatedDate" },
636
- { path: "metadata.eventTime" }
637
- ]
638
- },
639
- {
640
- transformFn: transformRESTAddressToSDKAddress2,
641
- paths: [{ path: "entity.shipFromAddress" }]
642
- }
643
- ])
644
- )
645
- )();
646
- var onShippoConfigurationUpdated = EventDefinition(
647
- "wix.ecom.v1.shippo_configuration_updated",
648
- true,
649
- (event) => renameKeysFromRESTResponseToSDKResponse2(
650
- transformPaths3(event, [
651
- {
652
- transformFn: transformRESTTimestampToSDKTimestamp2,
653
- paths: [
654
- { path: "entity.createdDate" },
655
- { path: "entity.updatedDate" },
656
- { path: "metadata.eventTime" }
657
- ]
658
- },
659
- {
660
- transformFn: transformRESTAddressToSDKAddress2,
661
- paths: [{ path: "entity.shipFromAddress" }]
662
- }
663
- ])
664
- )
665
- )();
666
-
667
- // src/ecom-v1-shippo-configuration-shippo-configurations.context.ts
668
- import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
669
- import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
670
- var createShippoConfiguration4 = /* @__PURE__ */ createRESTModule(createShippoConfiguration3);
671
- var getShippoConfiguration4 = /* @__PURE__ */ createRESTModule(getShippoConfiguration3);
672
- var updateShippoConfiguration4 = /* @__PURE__ */ createRESTModule(updateShippoConfiguration3);
673
- var deleteShippoConfiguration4 = /* @__PURE__ */ createRESTModule(deleteShippoConfiguration3);
674
- var queryShippoConfigurations4 = /* @__PURE__ */ createRESTModule(queryShippoConfigurations3);
675
- var updateExtendedFields4 = /* @__PURE__ */ createRESTModule(updateExtendedFields3);
676
- var onShippoConfigurationCreated2 = createEventModule(onShippoConfigurationCreated);
677
- var onShippoConfigurationDeleted2 = createEventModule(onShippoConfigurationDeleted);
678
- var onShippoConfigurationUpdated2 = createEventModule(onShippoConfigurationUpdated);
679
- export {
680
- CalculationType,
681
- DomesticService,
682
- InternationalService,
683
- PackageType,
684
- SortOrder,
685
- WebhookIdentityType,
686
- createShippoConfiguration4 as createShippoConfiguration,
687
- deleteShippoConfiguration4 as deleteShippoConfiguration,
688
- getShippoConfiguration4 as getShippoConfiguration,
689
- onShippoConfigurationCreated2 as onShippoConfigurationCreated,
690
- onShippoConfigurationDeleted2 as onShippoConfigurationDeleted,
691
- onShippoConfigurationUpdated2 as onShippoConfigurationUpdated,
692
- queryShippoConfigurations4 as queryShippoConfigurations,
693
- updateExtendedFields4 as updateExtendedFields,
694
- updateShippoConfiguration4 as updateShippoConfiguration
695
- };
696
- //# sourceMappingURL=index.mjs.map