@wix/auto_sdk_packages_packages 1.0.4 → 1.0.5
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/index.d.ts +2 -2
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/{premium-reseller-v1-packages-packages.universal-CeJKqN8_.d.ts → index.typings.d.ts} +309 -1
- package/build/cjs/index.typings.js +867 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +2 -1
- package/build/es/index.d.mts +2 -2
- package/build/es/index.mjs.map +1 -1
- package/build/es/{premium-reseller-v1-packages-packages.universal-CeJKqN8_.d.mts → index.typings.d.mts} +309 -1
- package/build/es/index.typings.mjs +817 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +2 -1
- package/build/internal/cjs/index.d.ts +2 -2
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/{premium-reseller-v1-packages-packages.universal-CeJKqN8_.d.ts → index.typings.d.ts} +309 -1
- package/build/internal/cjs/index.typings.js +867 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +2 -1
- package/build/internal/es/index.d.mts +2 -2
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/{premium-reseller-v1-packages-packages.universal-CeJKqN8_.d.mts → index.typings.d.mts} +309 -1
- package/build/internal/es/index.typings.mjs +817 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +2 -1
- package/package.json +3 -3
|
@@ -0,0 +1,867 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// index.typings.ts
|
|
21
|
+
var index_typings_exports = {};
|
|
22
|
+
__export(index_typings_exports, {
|
|
23
|
+
ContractSwitchReason: () => ContractSwitchReason,
|
|
24
|
+
ContractSwitchType: () => ContractSwitchType,
|
|
25
|
+
CycleDescriptorType: () => CycleDescriptorType,
|
|
26
|
+
FailureReasonFailureReason: () => FailureReasonFailureReason,
|
|
27
|
+
FieldToUpdate: () => FieldToUpdate,
|
|
28
|
+
Initiator: () => Initiator,
|
|
29
|
+
IntervalIntervalUnit: () => IntervalIntervalUnit,
|
|
30
|
+
IntervalUnit: () => IntervalUnit,
|
|
31
|
+
PriceIncreaseTrigger: () => PriceIncreaseTrigger,
|
|
32
|
+
ProductAdjustment: () => ProductAdjustment,
|
|
33
|
+
ProviderName: () => ProviderName,
|
|
34
|
+
ReactivationReasonEnum: () => ReactivationReasonEnum,
|
|
35
|
+
SortOrder: () => SortOrder,
|
|
36
|
+
Status: () => Status,
|
|
37
|
+
SubscriptionStatus: () => SubscriptionStatus,
|
|
38
|
+
UnassignReason: () => UnassignReason,
|
|
39
|
+
WebhookIdentityType: () => WebhookIdentityType,
|
|
40
|
+
adjustProductInstanceSpecifications: () => adjustProductInstanceSpecifications2,
|
|
41
|
+
assignProductInstanceToSite: () => assignProductInstanceToSite2,
|
|
42
|
+
cancelPackage: () => cancelPackage2,
|
|
43
|
+
cancelProductInstance: () => cancelProductInstance2,
|
|
44
|
+
createPackage: () => createPackage2,
|
|
45
|
+
createPackageV2: () => createPackageV22,
|
|
46
|
+
getPackage: () => getPackage2,
|
|
47
|
+
queryPackages: () => queryPackages2,
|
|
48
|
+
unassignProductInstanceFromSite: () => unassignProductInstanceFromSite2,
|
|
49
|
+
updatePackageExternalId: () => updatePackageExternalId2
|
|
50
|
+
});
|
|
51
|
+
module.exports = __toCommonJS(index_typings_exports);
|
|
52
|
+
|
|
53
|
+
// src/premium-reseller-v1-packages-packages.universal.ts
|
|
54
|
+
var import_transform_error = require("@wix/sdk-runtime/transform-error");
|
|
55
|
+
var import_query_builder = require("@wix/sdk-runtime/query-builder");
|
|
56
|
+
var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
57
|
+
|
|
58
|
+
// src/premium-reseller-v1-packages-packages.http.ts
|
|
59
|
+
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
60
|
+
var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
61
|
+
var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
62
|
+
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
63
|
+
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
64
|
+
function resolveComWixpressPremiumResellerPackagesV1PackagesUrl(opts) {
|
|
65
|
+
const domainToMappings = {
|
|
66
|
+
"www.wixapis.com": [
|
|
67
|
+
{
|
|
68
|
+
srcPath: "/resellers/v1/packages",
|
|
69
|
+
destPath: "/v1/packages"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
srcPath: "/resellers/v2/packages",
|
|
73
|
+
destPath: "/v2/packages"
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
};
|
|
77
|
+
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
78
|
+
}
|
|
79
|
+
var PACKAGE_NAME = "@wix/auto_sdk_packages_packages";
|
|
80
|
+
function createPackage(payload) {
|
|
81
|
+
function __createPackage({ host }) {
|
|
82
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
83
|
+
{
|
|
84
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
85
|
+
paths: [
|
|
86
|
+
{ path: "products.createdDate" },
|
|
87
|
+
{ path: "products.updatedDate" },
|
|
88
|
+
{ path: "products.expirationDate" }
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
]);
|
|
92
|
+
const metadata = {
|
|
93
|
+
entityFqdn: "wix.premium.reseller.v1.packages",
|
|
94
|
+
method: "POST",
|
|
95
|
+
methodFqn: "com.wixpress.premium.reseller.packages.v1.Packages.CreatePackage",
|
|
96
|
+
packageName: PACKAGE_NAME,
|
|
97
|
+
url: resolveComWixpressPremiumResellerPackagesV1PackagesUrl({
|
|
98
|
+
protoPath: "/v1/packages",
|
|
99
|
+
data: serializedData,
|
|
100
|
+
host
|
|
101
|
+
}),
|
|
102
|
+
data: serializedData,
|
|
103
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
104
|
+
{
|
|
105
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
106
|
+
paths: [
|
|
107
|
+
{ path: "package.createdDate" },
|
|
108
|
+
{ path: "package.updatedDate" },
|
|
109
|
+
{ path: "package.productInstances.createdDate" },
|
|
110
|
+
{ path: "package.productInstances.updatedDate" },
|
|
111
|
+
{ path: "package.productInstances.expirationDate" }
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
])
|
|
115
|
+
};
|
|
116
|
+
return metadata;
|
|
117
|
+
}
|
|
118
|
+
return __createPackage;
|
|
119
|
+
}
|
|
120
|
+
function createPackageV2(payload) {
|
|
121
|
+
function __createPackageV2({ host }) {
|
|
122
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
123
|
+
{
|
|
124
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
125
|
+
paths: [
|
|
126
|
+
{ path: "products.createdDate" },
|
|
127
|
+
{ path: "products.updatedDate" },
|
|
128
|
+
{ path: "products.expirationDate" }
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
]);
|
|
132
|
+
const metadata = {
|
|
133
|
+
entityFqdn: "wix.premium.reseller.v1.packages",
|
|
134
|
+
method: "POST",
|
|
135
|
+
methodFqn: "com.wixpress.premium.reseller.packages.v1.Packages.CreatePackageV2",
|
|
136
|
+
packageName: PACKAGE_NAME,
|
|
137
|
+
url: resolveComWixpressPremiumResellerPackagesV1PackagesUrl({
|
|
138
|
+
protoPath: "/v2/packages",
|
|
139
|
+
data: serializedData,
|
|
140
|
+
host
|
|
141
|
+
}),
|
|
142
|
+
data: serializedData,
|
|
143
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
144
|
+
{
|
|
145
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
146
|
+
paths: [
|
|
147
|
+
{ path: "package.createdDate" },
|
|
148
|
+
{ path: "package.updatedDate" },
|
|
149
|
+
{ path: "package.productInstances.createdDate" },
|
|
150
|
+
{ path: "package.productInstances.updatedDate" },
|
|
151
|
+
{ path: "package.productInstances.expirationDate" }
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
])
|
|
155
|
+
};
|
|
156
|
+
return metadata;
|
|
157
|
+
}
|
|
158
|
+
return __createPackageV2;
|
|
159
|
+
}
|
|
160
|
+
function cancelPackage(payload) {
|
|
161
|
+
function __cancelPackage({ host }) {
|
|
162
|
+
const metadata = {
|
|
163
|
+
entityFqdn: "wix.premium.reseller.v1.packages",
|
|
164
|
+
method: "DELETE",
|
|
165
|
+
methodFqn: "com.wixpress.premium.reseller.packages.v1.Packages.CancelPackage",
|
|
166
|
+
packageName: PACKAGE_NAME,
|
|
167
|
+
url: resolveComWixpressPremiumResellerPackagesV1PackagesUrl({
|
|
168
|
+
protoPath: "/v1/packages/{id}",
|
|
169
|
+
data: payload,
|
|
170
|
+
host
|
|
171
|
+
}),
|
|
172
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
173
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
174
|
+
{
|
|
175
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
176
|
+
paths: [
|
|
177
|
+
{ path: "package.createdDate" },
|
|
178
|
+
{ path: "package.updatedDate" },
|
|
179
|
+
{ path: "package.productInstances.createdDate" },
|
|
180
|
+
{ path: "package.productInstances.updatedDate" },
|
|
181
|
+
{ path: "package.productInstances.expirationDate" }
|
|
182
|
+
]
|
|
183
|
+
}
|
|
184
|
+
])
|
|
185
|
+
};
|
|
186
|
+
return metadata;
|
|
187
|
+
}
|
|
188
|
+
return __cancelPackage;
|
|
189
|
+
}
|
|
190
|
+
function getPackage(payload) {
|
|
191
|
+
function __getPackage({ host }) {
|
|
192
|
+
const metadata = {
|
|
193
|
+
entityFqdn: "wix.premium.reseller.v1.packages",
|
|
194
|
+
method: "GET",
|
|
195
|
+
methodFqn: "com.wixpress.premium.reseller.packages.v1.Packages.GetPackage",
|
|
196
|
+
packageName: PACKAGE_NAME,
|
|
197
|
+
url: resolveComWixpressPremiumResellerPackagesV1PackagesUrl({
|
|
198
|
+
protoPath: "/v1/packages/{id}",
|
|
199
|
+
data: payload,
|
|
200
|
+
host
|
|
201
|
+
}),
|
|
202
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
203
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
204
|
+
{
|
|
205
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
206
|
+
paths: [
|
|
207
|
+
{ path: "package.createdDate" },
|
|
208
|
+
{ path: "package.updatedDate" },
|
|
209
|
+
{ path: "package.productInstances.createdDate" },
|
|
210
|
+
{ path: "package.productInstances.updatedDate" },
|
|
211
|
+
{ path: "package.productInstances.expirationDate" }
|
|
212
|
+
]
|
|
213
|
+
}
|
|
214
|
+
])
|
|
215
|
+
};
|
|
216
|
+
return metadata;
|
|
217
|
+
}
|
|
218
|
+
return __getPackage;
|
|
219
|
+
}
|
|
220
|
+
function queryPackages(payload) {
|
|
221
|
+
function __queryPackages({ host }) {
|
|
222
|
+
const metadata = {
|
|
223
|
+
entityFqdn: "wix.premium.reseller.v1.packages",
|
|
224
|
+
method: "POST",
|
|
225
|
+
methodFqn: "com.wixpress.premium.reseller.packages.v1.Packages.QueryPackages",
|
|
226
|
+
packageName: PACKAGE_NAME,
|
|
227
|
+
url: resolveComWixpressPremiumResellerPackagesV1PackagesUrl({
|
|
228
|
+
protoPath: "/v1/packages/query",
|
|
229
|
+
data: payload,
|
|
230
|
+
host
|
|
231
|
+
}),
|
|
232
|
+
data: payload,
|
|
233
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
234
|
+
{
|
|
235
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
236
|
+
paths: [
|
|
237
|
+
{ path: "packages.createdDate" },
|
|
238
|
+
{ path: "packages.updatedDate" },
|
|
239
|
+
{ path: "packages.productInstances.createdDate" },
|
|
240
|
+
{ path: "packages.productInstances.updatedDate" },
|
|
241
|
+
{ path: "packages.productInstances.expirationDate" }
|
|
242
|
+
]
|
|
243
|
+
}
|
|
244
|
+
])
|
|
245
|
+
};
|
|
246
|
+
return metadata;
|
|
247
|
+
}
|
|
248
|
+
return __queryPackages;
|
|
249
|
+
}
|
|
250
|
+
function assignProductInstanceToSite(payload) {
|
|
251
|
+
function __assignProductInstanceToSite({ host }) {
|
|
252
|
+
const metadata = {
|
|
253
|
+
entityFqdn: "wix.premium.reseller.v1.packages",
|
|
254
|
+
method: "PATCH",
|
|
255
|
+
methodFqn: "com.wixpress.premium.reseller.packages.v1.Packages.AssignProductInstanceToSite",
|
|
256
|
+
packageName: PACKAGE_NAME,
|
|
257
|
+
url: resolveComWixpressPremiumResellerPackagesV1PackagesUrl({
|
|
258
|
+
protoPath: "/v1/packages/product-instances/{instanceId}/{siteId}",
|
|
259
|
+
data: payload,
|
|
260
|
+
host
|
|
261
|
+
}),
|
|
262
|
+
data: payload,
|
|
263
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
264
|
+
{
|
|
265
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
266
|
+
paths: [
|
|
267
|
+
{ path: "package.createdDate" },
|
|
268
|
+
{ path: "package.updatedDate" },
|
|
269
|
+
{ path: "package.productInstances.createdDate" },
|
|
270
|
+
{ path: "package.productInstances.updatedDate" },
|
|
271
|
+
{ path: "package.productInstances.expirationDate" }
|
|
272
|
+
]
|
|
273
|
+
}
|
|
274
|
+
])
|
|
275
|
+
};
|
|
276
|
+
return metadata;
|
|
277
|
+
}
|
|
278
|
+
return __assignProductInstanceToSite;
|
|
279
|
+
}
|
|
280
|
+
function unassignProductInstanceFromSite(payload) {
|
|
281
|
+
function __unassignProductInstanceFromSite({ host }) {
|
|
282
|
+
const metadata = {
|
|
283
|
+
entityFqdn: "wix.premium.reseller.v1.packages",
|
|
284
|
+
method: "PATCH",
|
|
285
|
+
methodFqn: "com.wixpress.premium.reseller.packages.v1.Packages.UnassignProductInstanceFromSite",
|
|
286
|
+
packageName: PACKAGE_NAME,
|
|
287
|
+
url: resolveComWixpressPremiumResellerPackagesV1PackagesUrl({
|
|
288
|
+
protoPath: "/v1/packages/product-instances/{instanceId}/unassign",
|
|
289
|
+
data: payload,
|
|
290
|
+
host
|
|
291
|
+
}),
|
|
292
|
+
data: payload,
|
|
293
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
294
|
+
{
|
|
295
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
296
|
+
paths: [
|
|
297
|
+
{ path: "package.createdDate" },
|
|
298
|
+
{ path: "package.updatedDate" },
|
|
299
|
+
{ path: "package.productInstances.createdDate" },
|
|
300
|
+
{ path: "package.productInstances.updatedDate" },
|
|
301
|
+
{ path: "package.productInstances.expirationDate" }
|
|
302
|
+
]
|
|
303
|
+
}
|
|
304
|
+
])
|
|
305
|
+
};
|
|
306
|
+
return metadata;
|
|
307
|
+
}
|
|
308
|
+
return __unassignProductInstanceFromSite;
|
|
309
|
+
}
|
|
310
|
+
function cancelProductInstance(payload) {
|
|
311
|
+
function __cancelProductInstance({ host }) {
|
|
312
|
+
const metadata = {
|
|
313
|
+
entityFqdn: "wix.premium.reseller.v1.packages",
|
|
314
|
+
method: "DELETE",
|
|
315
|
+
methodFqn: "com.wixpress.premium.reseller.packages.v1.Packages.CancelProductInstance",
|
|
316
|
+
packageName: PACKAGE_NAME,
|
|
317
|
+
url: resolveComWixpressPremiumResellerPackagesV1PackagesUrl({
|
|
318
|
+
protoPath: "/v1/packages/product-instances/{instanceId}",
|
|
319
|
+
data: payload,
|
|
320
|
+
host
|
|
321
|
+
}),
|
|
322
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
323
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
324
|
+
{
|
|
325
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
326
|
+
paths: [
|
|
327
|
+
{ path: "package.createdDate" },
|
|
328
|
+
{ path: "package.updatedDate" },
|
|
329
|
+
{ path: "package.productInstances.createdDate" },
|
|
330
|
+
{ path: "package.productInstances.updatedDate" },
|
|
331
|
+
{ path: "package.productInstances.expirationDate" }
|
|
332
|
+
]
|
|
333
|
+
}
|
|
334
|
+
])
|
|
335
|
+
};
|
|
336
|
+
return metadata;
|
|
337
|
+
}
|
|
338
|
+
return __cancelProductInstance;
|
|
339
|
+
}
|
|
340
|
+
function adjustProductInstanceSpecifications(payload) {
|
|
341
|
+
function __adjustProductInstanceSpecifications({ host }) {
|
|
342
|
+
const metadata = {
|
|
343
|
+
entityFqdn: "wix.premium.reseller.v1.packages",
|
|
344
|
+
method: "PATCH",
|
|
345
|
+
methodFqn: "com.wixpress.premium.reseller.packages.v1.Packages.AdjustProductInstanceSpecifications",
|
|
346
|
+
packageName: PACKAGE_NAME,
|
|
347
|
+
url: resolveComWixpressPremiumResellerPackagesV1PackagesUrl({
|
|
348
|
+
protoPath: "/v1/packages/product-instances/{instanceId}",
|
|
349
|
+
data: payload,
|
|
350
|
+
host
|
|
351
|
+
}),
|
|
352
|
+
data: payload,
|
|
353
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
354
|
+
{
|
|
355
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
356
|
+
paths: [
|
|
357
|
+
{ path: "package.createdDate" },
|
|
358
|
+
{ path: "package.updatedDate" },
|
|
359
|
+
{ path: "package.productInstances.createdDate" },
|
|
360
|
+
{ path: "package.productInstances.updatedDate" },
|
|
361
|
+
{ path: "package.productInstances.expirationDate" }
|
|
362
|
+
]
|
|
363
|
+
}
|
|
364
|
+
])
|
|
365
|
+
};
|
|
366
|
+
return metadata;
|
|
367
|
+
}
|
|
368
|
+
return __adjustProductInstanceSpecifications;
|
|
369
|
+
}
|
|
370
|
+
function updatePackageExternalId(payload) {
|
|
371
|
+
function __updatePackageExternalId({ host }) {
|
|
372
|
+
const metadata = {
|
|
373
|
+
entityFqdn: "wix.premium.reseller.v1.packages",
|
|
374
|
+
method: "PATCH",
|
|
375
|
+
methodFqn: "com.wixpress.premium.reseller.packages.v1.Packages.UpdatePackageExternalId",
|
|
376
|
+
packageName: PACKAGE_NAME,
|
|
377
|
+
url: resolveComWixpressPremiumResellerPackagesV1PackagesUrl({
|
|
378
|
+
protoPath: "/v1/packages/update/{packageId}/{externalId}",
|
|
379
|
+
data: payload,
|
|
380
|
+
host
|
|
381
|
+
}),
|
|
382
|
+
data: payload,
|
|
383
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
384
|
+
{
|
|
385
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
386
|
+
paths: [
|
|
387
|
+
{ path: "updatedPackage.createdDate" },
|
|
388
|
+
{ path: "updatedPackage.updatedDate" },
|
|
389
|
+
{ path: "updatedPackage.productInstances.createdDate" },
|
|
390
|
+
{ path: "updatedPackage.productInstances.updatedDate" },
|
|
391
|
+
{ path: "updatedPackage.productInstances.expirationDate" }
|
|
392
|
+
]
|
|
393
|
+
}
|
|
394
|
+
])
|
|
395
|
+
};
|
|
396
|
+
return metadata;
|
|
397
|
+
}
|
|
398
|
+
return __updatePackageExternalId;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
// src/premium-reseller-v1-packages-packages.universal.ts
|
|
402
|
+
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
403
|
+
var FailureReasonFailureReason = /* @__PURE__ */ ((FailureReasonFailureReason2) => {
|
|
404
|
+
FailureReasonFailureReason2["UNKNOWN"] = "UNKNOWN";
|
|
405
|
+
FailureReasonFailureReason2["DELIVERY_TIMEOUT"] = "DELIVERY_TIMEOUT";
|
|
406
|
+
FailureReasonFailureReason2["EXTERNAL_FAILURE"] = "EXTERNAL_FAILURE";
|
|
407
|
+
return FailureReasonFailureReason2;
|
|
408
|
+
})(FailureReasonFailureReason || {});
|
|
409
|
+
var IntervalIntervalUnit = /* @__PURE__ */ ((IntervalIntervalUnit2) => {
|
|
410
|
+
IntervalIntervalUnit2["UNKNOWN"] = "UNKNOWN";
|
|
411
|
+
IntervalIntervalUnit2["DAY"] = "DAY";
|
|
412
|
+
IntervalIntervalUnit2["WEEK"] = "WEEK";
|
|
413
|
+
IntervalIntervalUnit2["MONTH"] = "MONTH";
|
|
414
|
+
IntervalIntervalUnit2["YEAR"] = "YEAR";
|
|
415
|
+
return IntervalIntervalUnit2;
|
|
416
|
+
})(IntervalIntervalUnit || {});
|
|
417
|
+
var CycleDescriptorType = /* @__PURE__ */ ((CycleDescriptorType2) => {
|
|
418
|
+
CycleDescriptorType2["UNKNOWN"] = "UNKNOWN";
|
|
419
|
+
CycleDescriptorType2["ONE_TIME"] = "ONE_TIME";
|
|
420
|
+
CycleDescriptorType2["RECURRING"] = "RECURRING";
|
|
421
|
+
return CycleDescriptorType2;
|
|
422
|
+
})(CycleDescriptorType || {});
|
|
423
|
+
var Status = /* @__PURE__ */ ((Status2) => {
|
|
424
|
+
Status2["PENDING"] = "PENDING";
|
|
425
|
+
Status2["ENABLED"] = "ENABLED";
|
|
426
|
+
Status2["CANCELED"] = "CANCELED";
|
|
427
|
+
Status2["FAILED"] = "FAILED";
|
|
428
|
+
Status2["AWAITING_ACTION"] = "AWAITING_ACTION";
|
|
429
|
+
return Status2;
|
|
430
|
+
})(Status || {});
|
|
431
|
+
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
432
|
+
SortOrder2["ASC"] = "ASC";
|
|
433
|
+
SortOrder2["DESC"] = "DESC";
|
|
434
|
+
return SortOrder2;
|
|
435
|
+
})(SortOrder || {});
|
|
436
|
+
var ProviderName = /* @__PURE__ */ ((ProviderName2) => {
|
|
437
|
+
ProviderName2["UNKNOWN"] = "UNKNOWN";
|
|
438
|
+
ProviderName2["SBS"] = "SBS";
|
|
439
|
+
ProviderName2["LICENSER"] = "LICENSER";
|
|
440
|
+
ProviderName2["BASS"] = "BASS";
|
|
441
|
+
ProviderName2["RESELLER"] = "RESELLER";
|
|
442
|
+
ProviderName2["RECURRING_INVOICES"] = "RECURRING_INVOICES";
|
|
443
|
+
return ProviderName2;
|
|
444
|
+
})(ProviderName || {});
|
|
445
|
+
var IntervalUnit = /* @__PURE__ */ ((IntervalUnit2) => {
|
|
446
|
+
IntervalUnit2["UNKNOWN"] = "UNKNOWN";
|
|
447
|
+
IntervalUnit2["DAY"] = "DAY";
|
|
448
|
+
IntervalUnit2["WEEK"] = "WEEK";
|
|
449
|
+
IntervalUnit2["MONTH"] = "MONTH";
|
|
450
|
+
IntervalUnit2["YEAR"] = "YEAR";
|
|
451
|
+
return IntervalUnit2;
|
|
452
|
+
})(IntervalUnit || {});
|
|
453
|
+
var SubscriptionStatus = /* @__PURE__ */ ((SubscriptionStatus2) => {
|
|
454
|
+
SubscriptionStatus2["UNKNOWN"] = "UNKNOWN";
|
|
455
|
+
SubscriptionStatus2["AUTO_RENEW_ON"] = "AUTO_RENEW_ON";
|
|
456
|
+
SubscriptionStatus2["AUTO_RENEW_OFF"] = "AUTO_RENEW_OFF";
|
|
457
|
+
SubscriptionStatus2["MANUAL_RECURRING"] = "MANUAL_RECURRING";
|
|
458
|
+
SubscriptionStatus2["CANCELLED"] = "CANCELLED";
|
|
459
|
+
SubscriptionStatus2["TRANSFERRED"] = "TRANSFERRED";
|
|
460
|
+
return SubscriptionStatus2;
|
|
461
|
+
})(SubscriptionStatus || {});
|
|
462
|
+
var ReactivationReasonEnum = /* @__PURE__ */ ((ReactivationReasonEnum2) => {
|
|
463
|
+
ReactivationReasonEnum2["UNKNOWN"] = "UNKNOWN";
|
|
464
|
+
ReactivationReasonEnum2["BILLING_STATUS_CHANGE"] = "BILLING_STATUS_CHANGE";
|
|
465
|
+
ReactivationReasonEnum2["REACTIVATED_AFTER_CHARGEBACK"] = "REACTIVATED_AFTER_CHARGEBACK";
|
|
466
|
+
return ReactivationReasonEnum2;
|
|
467
|
+
})(ReactivationReasonEnum || {});
|
|
468
|
+
var Initiator = /* @__PURE__ */ ((Initiator2) => {
|
|
469
|
+
Initiator2["UNKNOWN"] = "UNKNOWN";
|
|
470
|
+
Initiator2["USER_REQUESTED"] = "USER_REQUESTED";
|
|
471
|
+
Initiator2["APP_MANAGED"] = "APP_MANAGED";
|
|
472
|
+
Initiator2["PASSIVE"] = "PASSIVE";
|
|
473
|
+
return Initiator2;
|
|
474
|
+
})(Initiator || {});
|
|
475
|
+
var UnassignReason = /* @__PURE__ */ ((UnassignReason2) => {
|
|
476
|
+
UnassignReason2["UNKNOWN"] = "UNKNOWN";
|
|
477
|
+
UnassignReason2["USER_REQUESTED"] = "USER_REQUESTED";
|
|
478
|
+
UnassignReason2["REPLACED_BY_ANOTHER_SUBSCRIPTION"] = "REPLACED_BY_ANOTHER_SUBSCRIPTION";
|
|
479
|
+
return UnassignReason2;
|
|
480
|
+
})(UnassignReason || {});
|
|
481
|
+
var ContractSwitchType = /* @__PURE__ */ ((ContractSwitchType2) => {
|
|
482
|
+
ContractSwitchType2["NOT_APPLICABLE"] = "NOT_APPLICABLE";
|
|
483
|
+
ContractSwitchType2["ADDITIONAL_QUANTITY"] = "ADDITIONAL_QUANTITY";
|
|
484
|
+
ContractSwitchType2["CREDIT_UNUSED_PERIOD"] = "CREDIT_UNUSED_PERIOD";
|
|
485
|
+
ContractSwitchType2["REFUND_PRICE_DIFF"] = "REFUND_PRICE_DIFF";
|
|
486
|
+
ContractSwitchType2["ADJUST_PERIOD_END"] = "ADJUST_PERIOD_END";
|
|
487
|
+
ContractSwitchType2["DOWNGRADE_GRACE_PERIOD"] = "DOWNGRADE_GRACE_PERIOD";
|
|
488
|
+
ContractSwitchType2["FULL_AMOUNT_PERIOD"] = "FULL_AMOUNT_PERIOD";
|
|
489
|
+
ContractSwitchType2["END_OF_PERIOD"] = "END_OF_PERIOD";
|
|
490
|
+
ContractSwitchType2["PENDING_CHANGES"] = "PENDING_CHANGES";
|
|
491
|
+
ContractSwitchType2["DOWNGRADE_RENEWAL"] = "DOWNGRADE_RENEWAL";
|
|
492
|
+
return ContractSwitchType2;
|
|
493
|
+
})(ContractSwitchType || {});
|
|
494
|
+
var ContractSwitchReason = /* @__PURE__ */ ((ContractSwitchReason2) => {
|
|
495
|
+
ContractSwitchReason2["EXTERNAL_PROVIDER_TRIGGER"] = "EXTERNAL_PROVIDER_TRIGGER";
|
|
496
|
+
ContractSwitchReason2["PRICE_INCREASE"] = "PRICE_INCREASE";
|
|
497
|
+
return ContractSwitchReason2;
|
|
498
|
+
})(ContractSwitchReason || {});
|
|
499
|
+
var PriceIncreaseTrigger = /* @__PURE__ */ ((PriceIncreaseTrigger2) => {
|
|
500
|
+
PriceIncreaseTrigger2["NEAR_RENEWAL"] = "NEAR_RENEWAL";
|
|
501
|
+
PriceIncreaseTrigger2["RECURRING_SUCCESS"] = "RECURRING_SUCCESS";
|
|
502
|
+
PriceIncreaseTrigger2["MANUAL"] = "MANUAL";
|
|
503
|
+
return PriceIncreaseTrigger2;
|
|
504
|
+
})(PriceIncreaseTrigger || {});
|
|
505
|
+
var ProductAdjustment = /* @__PURE__ */ ((ProductAdjustment2) => {
|
|
506
|
+
ProductAdjustment2["NOT_APPLICABLE"] = "NOT_APPLICABLE";
|
|
507
|
+
ProductAdjustment2["DOWNGRADE"] = "DOWNGRADE";
|
|
508
|
+
return ProductAdjustment2;
|
|
509
|
+
})(ProductAdjustment || {});
|
|
510
|
+
var FieldToUpdate = /* @__PURE__ */ ((FieldToUpdate2) => {
|
|
511
|
+
FieldToUpdate2["STATUS"] = "STATUS";
|
|
512
|
+
FieldToUpdate2["COUNTRY_CODE"] = "COUNTRY_CODE";
|
|
513
|
+
return FieldToUpdate2;
|
|
514
|
+
})(FieldToUpdate || {});
|
|
515
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
516
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
517
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
518
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
519
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
520
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
521
|
+
return WebhookIdentityType2;
|
|
522
|
+
})(WebhookIdentityType || {});
|
|
523
|
+
async function createPackage2(options) {
|
|
524
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
525
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
526
|
+
idempotencyKey: options?.idempotencyKey,
|
|
527
|
+
externalId: options?.externalId,
|
|
528
|
+
products: options?.products
|
|
529
|
+
});
|
|
530
|
+
const reqOpts = createPackage(payload);
|
|
531
|
+
sideEffects?.onSiteCall?.();
|
|
532
|
+
try {
|
|
533
|
+
const result = await httpClient.request(reqOpts);
|
|
534
|
+
sideEffects?.onSuccess?.(result);
|
|
535
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
536
|
+
} catch (err) {
|
|
537
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
538
|
+
err,
|
|
539
|
+
{
|
|
540
|
+
spreadPathsToArguments: {},
|
|
541
|
+
explicitPathsToArguments: {
|
|
542
|
+
idempotencyKey: "$[0].idempotencyKey",
|
|
543
|
+
externalId: "$[0].externalId",
|
|
544
|
+
products: "$[0].products"
|
|
545
|
+
},
|
|
546
|
+
singleArgumentUnchanged: false
|
|
547
|
+
},
|
|
548
|
+
["options"]
|
|
549
|
+
);
|
|
550
|
+
sideEffects?.onError?.(err);
|
|
551
|
+
throw transformedError;
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
async function createPackageV22(options) {
|
|
555
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
556
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
557
|
+
idempotencyKey: options?.idempotencyKey,
|
|
558
|
+
externalId: options?.externalId,
|
|
559
|
+
products: options?.products
|
|
560
|
+
});
|
|
561
|
+
const reqOpts = createPackageV2(payload);
|
|
562
|
+
sideEffects?.onSiteCall?.();
|
|
563
|
+
try {
|
|
564
|
+
const result = await httpClient.request(reqOpts);
|
|
565
|
+
sideEffects?.onSuccess?.(result);
|
|
566
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
567
|
+
} catch (err) {
|
|
568
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
569
|
+
err,
|
|
570
|
+
{
|
|
571
|
+
spreadPathsToArguments: {},
|
|
572
|
+
explicitPathsToArguments: {
|
|
573
|
+
idempotencyKey: "$[0].idempotencyKey",
|
|
574
|
+
externalId: "$[0].externalId",
|
|
575
|
+
products: "$[0].products"
|
|
576
|
+
},
|
|
577
|
+
singleArgumentUnchanged: false
|
|
578
|
+
},
|
|
579
|
+
["options"]
|
|
580
|
+
);
|
|
581
|
+
sideEffects?.onError?.(err);
|
|
582
|
+
throw transformedError;
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
async function cancelPackage2(_id, options) {
|
|
586
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
587
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
588
|
+
id: _id,
|
|
589
|
+
idempotencyKey: options?.idempotencyKey
|
|
590
|
+
});
|
|
591
|
+
const reqOpts = cancelPackage(payload);
|
|
592
|
+
sideEffects?.onSiteCall?.();
|
|
593
|
+
try {
|
|
594
|
+
const result = await httpClient.request(reqOpts);
|
|
595
|
+
sideEffects?.onSuccess?.(result);
|
|
596
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
597
|
+
} catch (err) {
|
|
598
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
599
|
+
err,
|
|
600
|
+
{
|
|
601
|
+
spreadPathsToArguments: {},
|
|
602
|
+
explicitPathsToArguments: {
|
|
603
|
+
id: "$[0]",
|
|
604
|
+
idempotencyKey: "$[1].idempotencyKey"
|
|
605
|
+
},
|
|
606
|
+
singleArgumentUnchanged: false
|
|
607
|
+
},
|
|
608
|
+
["_id", "options"]
|
|
609
|
+
);
|
|
610
|
+
sideEffects?.onError?.(err);
|
|
611
|
+
throw transformedError;
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
async function getPackage2(_id) {
|
|
615
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
616
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
|
|
617
|
+
const reqOpts = getPackage(payload);
|
|
618
|
+
sideEffects?.onSiteCall?.();
|
|
619
|
+
try {
|
|
620
|
+
const result = await httpClient.request(reqOpts);
|
|
621
|
+
sideEffects?.onSuccess?.(result);
|
|
622
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.package;
|
|
623
|
+
} catch (err) {
|
|
624
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
625
|
+
err,
|
|
626
|
+
{
|
|
627
|
+
spreadPathsToArguments: {},
|
|
628
|
+
explicitPathsToArguments: { id: "$[0]" },
|
|
629
|
+
singleArgumentUnchanged: false
|
|
630
|
+
},
|
|
631
|
+
["_id"]
|
|
632
|
+
);
|
|
633
|
+
sideEffects?.onError?.(err);
|
|
634
|
+
throw transformedError;
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
function queryPackages2() {
|
|
638
|
+
const { httpClient, sideEffects } = arguments[0];
|
|
639
|
+
return (0, import_query_builder.queryBuilder)({
|
|
640
|
+
func: async (payload) => {
|
|
641
|
+
const reqOpts = queryPackages(payload);
|
|
642
|
+
sideEffects?.onSiteCall?.();
|
|
643
|
+
try {
|
|
644
|
+
const result = await httpClient.request(reqOpts);
|
|
645
|
+
sideEffects?.onSuccess?.(result);
|
|
646
|
+
return result;
|
|
647
|
+
} catch (err) {
|
|
648
|
+
sideEffects?.onError?.(err);
|
|
649
|
+
throw err;
|
|
650
|
+
}
|
|
651
|
+
},
|
|
652
|
+
requestTransformer: (query) => {
|
|
653
|
+
const args = [query, {}];
|
|
654
|
+
return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
655
|
+
...args?.[1],
|
|
656
|
+
query: args?.[0]
|
|
657
|
+
});
|
|
658
|
+
},
|
|
659
|
+
responseTransformer: ({ data }) => {
|
|
660
|
+
const transformedData = (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
661
|
+
(0, import_transform_paths2.transformPaths)(data, [])
|
|
662
|
+
);
|
|
663
|
+
return {
|
|
664
|
+
items: transformedData?.packages,
|
|
665
|
+
pagingMetadata: transformedData?.metadata
|
|
666
|
+
};
|
|
667
|
+
},
|
|
668
|
+
errorTransformer: (err) => {
|
|
669
|
+
const transformedError = (0, import_transform_error.transformError)(err, {
|
|
670
|
+
spreadPathsToArguments: {},
|
|
671
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
672
|
+
singleArgumentUnchanged: false
|
|
673
|
+
});
|
|
674
|
+
throw transformedError;
|
|
675
|
+
},
|
|
676
|
+
pagingMethod: "CURSOR",
|
|
677
|
+
transformationPaths: {}
|
|
678
|
+
});
|
|
679
|
+
}
|
|
680
|
+
async function assignProductInstanceToSite2(identifiers, options) {
|
|
681
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
682
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
683
|
+
instanceId: identifiers?.instanceId,
|
|
684
|
+
siteId: identifiers?.siteId,
|
|
685
|
+
idempotencyKey: options?.idempotencyKey
|
|
686
|
+
});
|
|
687
|
+
const reqOpts = assignProductInstanceToSite(payload);
|
|
688
|
+
sideEffects?.onSiteCall?.();
|
|
689
|
+
try {
|
|
690
|
+
const result = await httpClient.request(reqOpts);
|
|
691
|
+
sideEffects?.onSuccess?.(result);
|
|
692
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
693
|
+
} catch (err) {
|
|
694
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
695
|
+
err,
|
|
696
|
+
{
|
|
697
|
+
spreadPathsToArguments: {},
|
|
698
|
+
explicitPathsToArguments: {
|
|
699
|
+
instanceId: "$[0].instanceId",
|
|
700
|
+
siteId: "$[0].siteId",
|
|
701
|
+
idempotencyKey: "$[1].idempotencyKey"
|
|
702
|
+
},
|
|
703
|
+
singleArgumentUnchanged: false
|
|
704
|
+
},
|
|
705
|
+
["identifiers", "options"]
|
|
706
|
+
);
|
|
707
|
+
sideEffects?.onError?.(err);
|
|
708
|
+
throw transformedError;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
async function unassignProductInstanceFromSite2(instanceId, options) {
|
|
712
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
713
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
714
|
+
instanceId,
|
|
715
|
+
idempotencyKey: options?.idempotencyKey
|
|
716
|
+
});
|
|
717
|
+
const reqOpts = unassignProductInstanceFromSite(
|
|
718
|
+
payload
|
|
719
|
+
);
|
|
720
|
+
sideEffects?.onSiteCall?.();
|
|
721
|
+
try {
|
|
722
|
+
const result = await httpClient.request(reqOpts);
|
|
723
|
+
sideEffects?.onSuccess?.(result);
|
|
724
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
725
|
+
} catch (err) {
|
|
726
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
727
|
+
err,
|
|
728
|
+
{
|
|
729
|
+
spreadPathsToArguments: {},
|
|
730
|
+
explicitPathsToArguments: {
|
|
731
|
+
instanceId: "$[0]",
|
|
732
|
+
idempotencyKey: "$[1].idempotencyKey"
|
|
733
|
+
},
|
|
734
|
+
singleArgumentUnchanged: false
|
|
735
|
+
},
|
|
736
|
+
["instanceId", "options"]
|
|
737
|
+
);
|
|
738
|
+
sideEffects?.onError?.(err);
|
|
739
|
+
throw transformedError;
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
async function cancelProductInstance2(instanceId, options) {
|
|
743
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
744
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
745
|
+
instanceId,
|
|
746
|
+
idempotencyKey: options?.idempotencyKey
|
|
747
|
+
});
|
|
748
|
+
const reqOpts = cancelProductInstance(payload);
|
|
749
|
+
sideEffects?.onSiteCall?.();
|
|
750
|
+
try {
|
|
751
|
+
const result = await httpClient.request(reqOpts);
|
|
752
|
+
sideEffects?.onSuccess?.(result);
|
|
753
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
754
|
+
} catch (err) {
|
|
755
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
756
|
+
err,
|
|
757
|
+
{
|
|
758
|
+
spreadPathsToArguments: {},
|
|
759
|
+
explicitPathsToArguments: {
|
|
760
|
+
instanceId: "$[0]",
|
|
761
|
+
idempotencyKey: "$[1].idempotencyKey"
|
|
762
|
+
},
|
|
763
|
+
singleArgumentUnchanged: false
|
|
764
|
+
},
|
|
765
|
+
["instanceId", "options"]
|
|
766
|
+
);
|
|
767
|
+
sideEffects?.onError?.(err);
|
|
768
|
+
throw transformedError;
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
async function adjustProductInstanceSpecifications2(instanceId, options) {
|
|
772
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
773
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
774
|
+
instanceId,
|
|
775
|
+
idempotencyKey: options?.idempotencyKey,
|
|
776
|
+
catalogProductId: options?.catalogProductId,
|
|
777
|
+
billingInfo: options?.billingInfo,
|
|
778
|
+
discountCode: options?.discountCode
|
|
779
|
+
});
|
|
780
|
+
const reqOpts = adjustProductInstanceSpecifications(
|
|
781
|
+
payload
|
|
782
|
+
);
|
|
783
|
+
sideEffects?.onSiteCall?.();
|
|
784
|
+
try {
|
|
785
|
+
const result = await httpClient.request(reqOpts);
|
|
786
|
+
sideEffects?.onSuccess?.(result);
|
|
787
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
788
|
+
} catch (err) {
|
|
789
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
790
|
+
err,
|
|
791
|
+
{
|
|
792
|
+
spreadPathsToArguments: {},
|
|
793
|
+
explicitPathsToArguments: {
|
|
794
|
+
instanceId: "$[0]",
|
|
795
|
+
idempotencyKey: "$[1].idempotencyKey",
|
|
796
|
+
catalogProductId: "$[1].catalogProductId",
|
|
797
|
+
billingInfo: "$[1].billingInfo",
|
|
798
|
+
discountCode: "$[1].discountCode"
|
|
799
|
+
},
|
|
800
|
+
singleArgumentUnchanged: false
|
|
801
|
+
},
|
|
802
|
+
["instanceId", "options"]
|
|
803
|
+
);
|
|
804
|
+
sideEffects?.onError?.(err);
|
|
805
|
+
throw transformedError;
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
async function updatePackageExternalId2(identifiers) {
|
|
809
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
810
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
811
|
+
packageId: identifiers?.packageId,
|
|
812
|
+
externalId: identifiers?.externalId
|
|
813
|
+
});
|
|
814
|
+
const reqOpts = updatePackageExternalId(payload);
|
|
815
|
+
sideEffects?.onSiteCall?.();
|
|
816
|
+
try {
|
|
817
|
+
const result = await httpClient.request(reqOpts);
|
|
818
|
+
sideEffects?.onSuccess?.(result);
|
|
819
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
820
|
+
} catch (err) {
|
|
821
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
822
|
+
err,
|
|
823
|
+
{
|
|
824
|
+
spreadPathsToArguments: {},
|
|
825
|
+
explicitPathsToArguments: {
|
|
826
|
+
packageId: "$[0].packageId",
|
|
827
|
+
externalId: "$[0].externalId"
|
|
828
|
+
},
|
|
829
|
+
singleArgumentUnchanged: false
|
|
830
|
+
},
|
|
831
|
+
["identifiers"]
|
|
832
|
+
);
|
|
833
|
+
sideEffects?.onError?.(err);
|
|
834
|
+
throw transformedError;
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
838
|
+
0 && (module.exports = {
|
|
839
|
+
ContractSwitchReason,
|
|
840
|
+
ContractSwitchType,
|
|
841
|
+
CycleDescriptorType,
|
|
842
|
+
FailureReasonFailureReason,
|
|
843
|
+
FieldToUpdate,
|
|
844
|
+
Initiator,
|
|
845
|
+
IntervalIntervalUnit,
|
|
846
|
+
IntervalUnit,
|
|
847
|
+
PriceIncreaseTrigger,
|
|
848
|
+
ProductAdjustment,
|
|
849
|
+
ProviderName,
|
|
850
|
+
ReactivationReasonEnum,
|
|
851
|
+
SortOrder,
|
|
852
|
+
Status,
|
|
853
|
+
SubscriptionStatus,
|
|
854
|
+
UnassignReason,
|
|
855
|
+
WebhookIdentityType,
|
|
856
|
+
adjustProductInstanceSpecifications,
|
|
857
|
+
assignProductInstanceToSite,
|
|
858
|
+
cancelPackage,
|
|
859
|
+
cancelProductInstance,
|
|
860
|
+
createPackage,
|
|
861
|
+
createPackageV2,
|
|
862
|
+
getPackage,
|
|
863
|
+
queryPackages,
|
|
864
|
+
unassignProductInstanceFromSite,
|
|
865
|
+
updatePackageExternalId
|
|
866
|
+
});
|
|
867
|
+
//# sourceMappingURL=index.typings.js.map
|