@juhuu/sdk-ts 1.2.246 → 1.2.248
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/dist/index.d.mts +1755 -16
- package/dist/index.d.ts +1755 -16
- package/dist/index.js +1410 -32
- package/dist/index.mjs +1410 -32
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -9,6 +9,8 @@ var Service = class {
|
|
|
9
9
|
this.getAccessToken = config.getAccessToken ?? (() => null);
|
|
10
10
|
this.setRefreshToken = config.setRefreshToken ?? (() => Promise.resolve());
|
|
11
11
|
this.getRefreshToken = config.getRefreshToken ?? (() => Promise.resolve(null));
|
|
12
|
+
this.logger = config.logger ?? (() => {
|
|
13
|
+
});
|
|
12
14
|
this.clientVersion = config.clientVersion;
|
|
13
15
|
this.apiKey = config.apiKey ?? null;
|
|
14
16
|
this.defaultRequestOptions = config.defaultRequestOptions ?? {};
|
|
@@ -43,6 +45,7 @@ var Service = class {
|
|
|
43
45
|
setAccessToken;
|
|
44
46
|
getRefreshToken;
|
|
45
47
|
setRefreshToken;
|
|
48
|
+
logger;
|
|
46
49
|
async sendRequest({
|
|
47
50
|
url,
|
|
48
51
|
method,
|
|
@@ -65,7 +68,7 @@ var Service = class {
|
|
|
65
68
|
}
|
|
66
69
|
}
|
|
67
70
|
}
|
|
68
|
-
|
|
71
|
+
this.logger("authenticationMode", this.authenticationMode);
|
|
69
72
|
if (currentRequestOptions.refreshTokensIfNecessary === void 0) {
|
|
70
73
|
switch (this.authenticationMode) {
|
|
71
74
|
case "jwt": {
|
|
@@ -78,7 +81,7 @@ var Service = class {
|
|
|
78
81
|
}
|
|
79
82
|
}
|
|
80
83
|
}
|
|
81
|
-
|
|
84
|
+
this.logger("currentOptions", currentRequestOptions);
|
|
82
85
|
let token = null;
|
|
83
86
|
let apiKey = null;
|
|
84
87
|
switch (this.authenticationMode) {
|
|
@@ -88,7 +91,7 @@ var Service = class {
|
|
|
88
91
|
} else {
|
|
89
92
|
token = currentRequestOptions.accessToken;
|
|
90
93
|
}
|
|
91
|
-
|
|
94
|
+
this.logger("accessToken:", token);
|
|
92
95
|
if ((token === null || token === void 0) && authenticationNotOptional === true) {
|
|
93
96
|
console.error(
|
|
94
97
|
"endpoint",
|
|
@@ -125,7 +128,7 @@ var Service = class {
|
|
|
125
128
|
const uri = this.httpBaseUrl + url;
|
|
126
129
|
let response = null;
|
|
127
130
|
let responseObject = null;
|
|
128
|
-
|
|
131
|
+
this.logger(
|
|
129
132
|
"sending request to",
|
|
130
133
|
uri,
|
|
131
134
|
"with apiKey",
|
|
@@ -169,20 +172,20 @@ var Service = class {
|
|
|
169
172
|
statusText: response?.statusText ?? "",
|
|
170
173
|
status: response?.status ?? 0
|
|
171
174
|
};
|
|
172
|
-
|
|
175
|
+
this.logger(
|
|
173
176
|
"refreshTokensIfNecessary",
|
|
174
177
|
currentRequestOptions.refreshTokensIfNecessary
|
|
175
178
|
);
|
|
176
|
-
|
|
179
|
+
this.logger("responseObject.status", responseObject.status);
|
|
177
180
|
if (responseObject.status === 403 && currentRequestOptions.refreshTokensIfNecessary === true) {
|
|
178
|
-
|
|
181
|
+
this.logger("refreshing tokens...");
|
|
179
182
|
const oldRefreshToken = await this.getRefreshToken();
|
|
180
|
-
|
|
183
|
+
this.logger("old refresh token", oldRefreshToken);
|
|
181
184
|
if (oldRefreshToken === null) {
|
|
182
|
-
|
|
185
|
+
this.logger("no old refresh token found");
|
|
183
186
|
return responseObject;
|
|
184
187
|
}
|
|
185
|
-
|
|
188
|
+
this.logger("sending request to refresh tokens...");
|
|
186
189
|
const query = await this.sendRequest(
|
|
187
190
|
{
|
|
188
191
|
method: "GET",
|
|
@@ -197,12 +200,12 @@ var Service = class {
|
|
|
197
200
|
refreshTokensIfNecessary: false
|
|
198
201
|
}
|
|
199
202
|
);
|
|
200
|
-
|
|
203
|
+
this.logger("query for new tokens", query);
|
|
201
204
|
if (query.ok === false) {
|
|
202
205
|
return responseObject;
|
|
203
206
|
}
|
|
204
207
|
if (query.data === null) {
|
|
205
|
-
|
|
208
|
+
this.logger("no data in query");
|
|
206
209
|
return responseObject;
|
|
207
210
|
}
|
|
208
211
|
const accessToken = query.data.accessToken;
|
|
@@ -211,7 +214,7 @@ var Service = class {
|
|
|
211
214
|
this.setRefreshToken(refreshToken),
|
|
212
215
|
this.setAccessToken(accessToken)
|
|
213
216
|
]);
|
|
214
|
-
|
|
217
|
+
this.logger("retrying original request...");
|
|
215
218
|
const retryResponse = await this.sendRequest(
|
|
216
219
|
{
|
|
217
220
|
url,
|
|
@@ -224,7 +227,7 @@ var Service = class {
|
|
|
224
227
|
refreshTokensIfNecessary: false
|
|
225
228
|
}
|
|
226
229
|
);
|
|
227
|
-
|
|
230
|
+
this.logger("retry response", retryResponse);
|
|
228
231
|
if (retryResponse.ok === true) {
|
|
229
232
|
return retryResponse;
|
|
230
233
|
} else {
|
|
@@ -235,7 +238,7 @@ var Service = class {
|
|
|
235
238
|
await this.onException(responseObject);
|
|
236
239
|
}
|
|
237
240
|
} finally {
|
|
238
|
-
|
|
241
|
+
this.logger(
|
|
239
242
|
method + ": " + uri + " (body: " + JSON.stringify(body, null, 2) + ") => " + JSON.stringify(responseObject, null, 2)
|
|
240
243
|
);
|
|
241
244
|
}
|
|
@@ -327,10 +330,10 @@ var Service = class {
|
|
|
327
330
|
}
|
|
328
331
|
connectToWebsocket({ url }) {
|
|
329
332
|
const uri = this.wssBaseUrl + url;
|
|
330
|
-
|
|
333
|
+
this.logger("connecting to websocket", uri);
|
|
331
334
|
const socket = io(uri, { transports: ["websocket"] });
|
|
332
335
|
socket.on("connect", () => {
|
|
333
|
-
|
|
336
|
+
this.logger("connected to websocket", uri);
|
|
334
337
|
});
|
|
335
338
|
socket.on("connect_error", (error) => {
|
|
336
339
|
console.error("Connection error:", error);
|
|
@@ -342,6 +345,137 @@ var Service = class {
|
|
|
342
345
|
}
|
|
343
346
|
};
|
|
344
347
|
|
|
348
|
+
// src/achievements/achievements.service.ts
|
|
349
|
+
var AchievementsService = class extends Service {
|
|
350
|
+
constructor(config) {
|
|
351
|
+
super(config);
|
|
352
|
+
}
|
|
353
|
+
async create(params, options) {
|
|
354
|
+
return await super.sendRequest(
|
|
355
|
+
{
|
|
356
|
+
method: "POST",
|
|
357
|
+
url: "achievements",
|
|
358
|
+
body: {
|
|
359
|
+
userId: params.userId,
|
|
360
|
+
name: params.name,
|
|
361
|
+
title: params.title,
|
|
362
|
+
description: params.description,
|
|
363
|
+
type: params.type,
|
|
364
|
+
status: params.status,
|
|
365
|
+
category: params.category,
|
|
366
|
+
difficulty: params.difficulty,
|
|
367
|
+
criteria: params.criteria,
|
|
368
|
+
rewards: params.rewards,
|
|
369
|
+
metadata: params.metadata,
|
|
370
|
+
progressPercentage: params.progressPercentage,
|
|
371
|
+
pointsAwarded: params.pointsAwarded,
|
|
372
|
+
isHidden: params.isHidden,
|
|
373
|
+
isRepeatable: params.isRepeatable,
|
|
374
|
+
timesCompleted: params.timesCompleted
|
|
375
|
+
},
|
|
376
|
+
authenticationNotOptional: true
|
|
377
|
+
},
|
|
378
|
+
options
|
|
379
|
+
);
|
|
380
|
+
}
|
|
381
|
+
async list(params, options) {
|
|
382
|
+
const queryArray = [];
|
|
383
|
+
if (params?.userId !== void 0) {
|
|
384
|
+
queryArray.push("userId=" + params.userId);
|
|
385
|
+
}
|
|
386
|
+
if (params?.name !== void 0) {
|
|
387
|
+
queryArray.push("name=" + params.name);
|
|
388
|
+
}
|
|
389
|
+
if (params?.type !== void 0) {
|
|
390
|
+
queryArray.push("type=" + params.type);
|
|
391
|
+
}
|
|
392
|
+
if (params?.status !== void 0) {
|
|
393
|
+
queryArray.push("status=" + params.status);
|
|
394
|
+
}
|
|
395
|
+
if (params?.category !== void 0) {
|
|
396
|
+
queryArray.push("category=" + params.category);
|
|
397
|
+
}
|
|
398
|
+
if (params?.difficulty !== void 0) {
|
|
399
|
+
queryArray.push("difficulty=" + params.difficulty);
|
|
400
|
+
}
|
|
401
|
+
if (params?.isHidden !== void 0) {
|
|
402
|
+
queryArray.push("isHidden=" + params.isHidden);
|
|
403
|
+
}
|
|
404
|
+
if (params?.isRepeatable !== void 0) {
|
|
405
|
+
queryArray.push("isRepeatable=" + params.isRepeatable);
|
|
406
|
+
}
|
|
407
|
+
if (params?.rarity !== void 0) {
|
|
408
|
+
queryArray.push("rarity=" + params.rarity);
|
|
409
|
+
}
|
|
410
|
+
if (options?.limit !== void 0) {
|
|
411
|
+
queryArray.push("limit=" + options.limit);
|
|
412
|
+
}
|
|
413
|
+
if (options?.skip !== void 0) {
|
|
414
|
+
queryArray.push("skip=" + options.skip);
|
|
415
|
+
}
|
|
416
|
+
return await super.sendRequest(
|
|
417
|
+
{
|
|
418
|
+
method: "GET",
|
|
419
|
+
url: "achievements?" + queryArray.join("&"),
|
|
420
|
+
body: void 0,
|
|
421
|
+
authenticationNotOptional: false
|
|
422
|
+
},
|
|
423
|
+
options
|
|
424
|
+
);
|
|
425
|
+
}
|
|
426
|
+
async retrieve(params, options) {
|
|
427
|
+
const queryArray = [];
|
|
428
|
+
return await super.sendRequest(
|
|
429
|
+
{
|
|
430
|
+
method: "GET",
|
|
431
|
+
url: "achievements/" + params.achievementId + "?" + queryArray.join("&"),
|
|
432
|
+
body: void 0,
|
|
433
|
+
authenticationNotOptional: false
|
|
434
|
+
},
|
|
435
|
+
options
|
|
436
|
+
);
|
|
437
|
+
}
|
|
438
|
+
async update(params, options) {
|
|
439
|
+
return await super.sendRequest(
|
|
440
|
+
{
|
|
441
|
+
method: "PATCH",
|
|
442
|
+
url: "achievements/" + params.achievementId,
|
|
443
|
+
body: {
|
|
444
|
+
userId: params.userId,
|
|
445
|
+
name: params.name,
|
|
446
|
+
title: params.title,
|
|
447
|
+
description: params.description,
|
|
448
|
+
type: params.type,
|
|
449
|
+
status: params.status,
|
|
450
|
+
category: params.category,
|
|
451
|
+
difficulty: params.difficulty,
|
|
452
|
+
criteria: params.criteria,
|
|
453
|
+
rewards: params.rewards,
|
|
454
|
+
metadata: params.metadata,
|
|
455
|
+
progressPercentage: params.progressPercentage,
|
|
456
|
+
pointsAwarded: params.pointsAwarded,
|
|
457
|
+
isHidden: params.isHidden,
|
|
458
|
+
isRepeatable: params.isRepeatable,
|
|
459
|
+
timesCompleted: params.timesCompleted
|
|
460
|
+
},
|
|
461
|
+
authenticationNotOptional: true
|
|
462
|
+
},
|
|
463
|
+
options
|
|
464
|
+
);
|
|
465
|
+
}
|
|
466
|
+
async delete(params, options) {
|
|
467
|
+
return await super.sendRequest(
|
|
468
|
+
{
|
|
469
|
+
method: "DELETE",
|
|
470
|
+
url: "achievements/" + params.achievementId,
|
|
471
|
+
authenticationNotOptional: true,
|
|
472
|
+
body: void 0
|
|
473
|
+
},
|
|
474
|
+
options
|
|
475
|
+
);
|
|
476
|
+
}
|
|
477
|
+
};
|
|
478
|
+
|
|
345
479
|
// src/sessions/sessions.service.ts
|
|
346
480
|
var SessionService = class extends Service {
|
|
347
481
|
constructor(config) {
|
|
@@ -532,7 +666,7 @@ var SessionService = class extends Service {
|
|
|
532
666
|
return {
|
|
533
667
|
onUpdated,
|
|
534
668
|
close: () => {
|
|
535
|
-
|
|
669
|
+
this.logger("closing websocket connection");
|
|
536
670
|
socket.close();
|
|
537
671
|
}
|
|
538
672
|
};
|
|
@@ -1258,7 +1392,7 @@ var DevicesService = class extends Service {
|
|
|
1258
1392
|
return {
|
|
1259
1393
|
onUpdated,
|
|
1260
1394
|
close: () => {
|
|
1261
|
-
|
|
1395
|
+
this.logger("closing websocket connection");
|
|
1262
1396
|
socket.close();
|
|
1263
1397
|
}
|
|
1264
1398
|
};
|
|
@@ -1431,7 +1565,12 @@ var LocationsService = class extends Service {
|
|
|
1431
1565
|
latitude: LocationUpdateParams.latitude,
|
|
1432
1566
|
longitude: LocationUpdateParams.longitude,
|
|
1433
1567
|
disabled: LocationUpdateParams.disabled,
|
|
1434
|
-
visible: LocationUpdateParams.visible
|
|
1568
|
+
visible: LocationUpdateParams.visible,
|
|
1569
|
+
termId: LocationUpdateParams.termId,
|
|
1570
|
+
logoLight: LocationUpdateParams.logoLight,
|
|
1571
|
+
logoDark: LocationUpdateParams.logoDark,
|
|
1572
|
+
iconLight: LocationUpdateParams.iconLight,
|
|
1573
|
+
iconDark: LocationUpdateParams.iconDark
|
|
1435
1574
|
},
|
|
1436
1575
|
authenticationNotOptional: true
|
|
1437
1576
|
},
|
|
@@ -1713,18 +1852,9 @@ var ProductService = class extends Service {
|
|
|
1713
1852
|
method: "POST",
|
|
1714
1853
|
url: "products",
|
|
1715
1854
|
body: {
|
|
1716
|
-
propertyId: ProductCreateParams.propertyId,
|
|
1717
1855
|
name: ProductCreateParams.name,
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
highlightArray: ProductCreateParams.highlightArray,
|
|
1721
|
-
purposeArray: ProductCreateParams.purposeArray,
|
|
1722
|
-
technologyArray: ProductCreateParams.technologyArray,
|
|
1723
|
-
articleId: ProductCreateParams.articleId,
|
|
1724
|
-
bannerImageDark: ProductCreateParams.bannerImageDark,
|
|
1725
|
-
bannerImageLight: ProductCreateParams.bannerImageLight,
|
|
1726
|
-
model3d: ProductCreateParams.model3d,
|
|
1727
|
-
datasheet: ProductCreateParams.datasheet
|
|
1856
|
+
propertyId: ProductCreateParams.propertyId,
|
|
1857
|
+
template: ProductCreateParams.template
|
|
1728
1858
|
},
|
|
1729
1859
|
authenticationNotOptional: true
|
|
1730
1860
|
},
|
|
@@ -2987,7 +3117,7 @@ var ParametersService = class extends Service {
|
|
|
2987
3117
|
return {
|
|
2988
3118
|
onUpdated,
|
|
2989
3119
|
close: () => {
|
|
2990
|
-
|
|
3120
|
+
this.logger("closing websocket connection");
|
|
2991
3121
|
socket.close();
|
|
2992
3122
|
}
|
|
2993
3123
|
};
|
|
@@ -3620,6 +3750,1232 @@ var MqttTopicsService = class extends Service {
|
|
|
3620
3750
|
}
|
|
3621
3751
|
};
|
|
3622
3752
|
|
|
3753
|
+
// src/licensePlates/licensePlates.service.ts
|
|
3754
|
+
var LicensePlatesService = class extends Service {
|
|
3755
|
+
constructor(config) {
|
|
3756
|
+
super(config);
|
|
3757
|
+
}
|
|
3758
|
+
async create(params, options) {
|
|
3759
|
+
return await super.sendRequest(
|
|
3760
|
+
{
|
|
3761
|
+
method: "POST",
|
|
3762
|
+
url: "licensePlates",
|
|
3763
|
+
body: {
|
|
3764
|
+
userId: params.userId,
|
|
3765
|
+
name: params.name
|
|
3766
|
+
},
|
|
3767
|
+
authenticationNotOptional: true
|
|
3768
|
+
},
|
|
3769
|
+
options
|
|
3770
|
+
);
|
|
3771
|
+
}
|
|
3772
|
+
async list(params, options) {
|
|
3773
|
+
const queryArray = [];
|
|
3774
|
+
if (params?.userId !== void 0) {
|
|
3775
|
+
queryArray.push("userId=" + params.userId);
|
|
3776
|
+
}
|
|
3777
|
+
if (options?.limit !== void 0) {
|
|
3778
|
+
queryArray.push("limit=" + options.limit);
|
|
3779
|
+
}
|
|
3780
|
+
if (options?.skip !== void 0) {
|
|
3781
|
+
queryArray.push("skip=" + options.skip);
|
|
3782
|
+
}
|
|
3783
|
+
return await super.sendRequest(
|
|
3784
|
+
{
|
|
3785
|
+
method: "GET",
|
|
3786
|
+
url: "licensePlates?" + queryArray.join("&"),
|
|
3787
|
+
body: void 0,
|
|
3788
|
+
authenticationNotOptional: false
|
|
3789
|
+
},
|
|
3790
|
+
options
|
|
3791
|
+
);
|
|
3792
|
+
}
|
|
3793
|
+
async retrieve(params, options) {
|
|
3794
|
+
const queryArray = [];
|
|
3795
|
+
return await super.sendRequest(
|
|
3796
|
+
{
|
|
3797
|
+
method: "GET",
|
|
3798
|
+
url: "licensePlates/" + params.licensePlateId + "?" + queryArray.join("&"),
|
|
3799
|
+
body: void 0,
|
|
3800
|
+
authenticationNotOptional: false
|
|
3801
|
+
},
|
|
3802
|
+
options
|
|
3803
|
+
);
|
|
3804
|
+
}
|
|
3805
|
+
async update(params, options) {
|
|
3806
|
+
return await super.sendRequest(
|
|
3807
|
+
{
|
|
3808
|
+
method: "PATCH",
|
|
3809
|
+
url: "licensePlates/" + params.licensePlateId,
|
|
3810
|
+
body: {
|
|
3811
|
+
userId: params.userId,
|
|
3812
|
+
name: params.name
|
|
3813
|
+
},
|
|
3814
|
+
authenticationNotOptional: true
|
|
3815
|
+
},
|
|
3816
|
+
options
|
|
3817
|
+
);
|
|
3818
|
+
}
|
|
3819
|
+
async delete(params, options) {
|
|
3820
|
+
return await super.sendRequest(
|
|
3821
|
+
{
|
|
3822
|
+
method: "DELETE",
|
|
3823
|
+
url: "licensePlates/" + params.licensePlateId,
|
|
3824
|
+
authenticationNotOptional: true,
|
|
3825
|
+
body: void 0
|
|
3826
|
+
},
|
|
3827
|
+
options
|
|
3828
|
+
);
|
|
3829
|
+
}
|
|
3830
|
+
};
|
|
3831
|
+
|
|
3832
|
+
// src/vehicles/vehicles.service.ts
|
|
3833
|
+
var VehiclesService = class extends Service {
|
|
3834
|
+
constructor(config) {
|
|
3835
|
+
super(config);
|
|
3836
|
+
}
|
|
3837
|
+
async create(params, options) {
|
|
3838
|
+
return await super.sendRequest(
|
|
3839
|
+
{
|
|
3840
|
+
method: "POST",
|
|
3841
|
+
url: "vehicles",
|
|
3842
|
+
body: {
|
|
3843
|
+
userId: params.userId,
|
|
3844
|
+
licensePlateNumber: params.licensePlateNumber,
|
|
3845
|
+
make: params.make,
|
|
3846
|
+
model: params.model,
|
|
3847
|
+
year: params.year,
|
|
3848
|
+
color: params.color,
|
|
3849
|
+
vin: params.vin,
|
|
3850
|
+
template: params.template
|
|
3851
|
+
},
|
|
3852
|
+
authenticationNotOptional: true
|
|
3853
|
+
},
|
|
3854
|
+
options
|
|
3855
|
+
);
|
|
3856
|
+
}
|
|
3857
|
+
async list(params, options) {
|
|
3858
|
+
const queryArray = [];
|
|
3859
|
+
if (params?.userId !== void 0) {
|
|
3860
|
+
queryArray.push("userId=" + params.userId);
|
|
3861
|
+
}
|
|
3862
|
+
if (params?.licensePlateNumber !== void 0) {
|
|
3863
|
+
queryArray.push("licensePlateNumber=" + params.licensePlateNumber);
|
|
3864
|
+
}
|
|
3865
|
+
if (params?.make !== void 0) {
|
|
3866
|
+
queryArray.push("make=" + params.make);
|
|
3867
|
+
}
|
|
3868
|
+
if (params?.model !== void 0) {
|
|
3869
|
+
queryArray.push("model=" + params.model);
|
|
3870
|
+
}
|
|
3871
|
+
if (options?.limit !== void 0) {
|
|
3872
|
+
queryArray.push("limit=" + options.limit);
|
|
3873
|
+
}
|
|
3874
|
+
if (options?.skip !== void 0) {
|
|
3875
|
+
queryArray.push("skip=" + options.skip);
|
|
3876
|
+
}
|
|
3877
|
+
return await super.sendRequest(
|
|
3878
|
+
{
|
|
3879
|
+
method: "GET",
|
|
3880
|
+
url: "vehicles?" + queryArray.join("&"),
|
|
3881
|
+
body: void 0,
|
|
3882
|
+
authenticationNotOptional: false
|
|
3883
|
+
},
|
|
3884
|
+
options
|
|
3885
|
+
);
|
|
3886
|
+
}
|
|
3887
|
+
async retrieve(params, options) {
|
|
3888
|
+
const queryArray = [];
|
|
3889
|
+
return await super.sendRequest(
|
|
3890
|
+
{
|
|
3891
|
+
method: "GET",
|
|
3892
|
+
url: "vehicles/" + params.vehicleId + "?" + queryArray.join("&"),
|
|
3893
|
+
body: void 0,
|
|
3894
|
+
authenticationNotOptional: false
|
|
3895
|
+
},
|
|
3896
|
+
options
|
|
3897
|
+
);
|
|
3898
|
+
}
|
|
3899
|
+
async update(params, options) {
|
|
3900
|
+
return await super.sendRequest(
|
|
3901
|
+
{
|
|
3902
|
+
method: "PATCH",
|
|
3903
|
+
url: "vehicles/" + params.vehicleId,
|
|
3904
|
+
body: {
|
|
3905
|
+
userId: params.userId,
|
|
3906
|
+
licensePlateNumber: params.licensePlateNumber,
|
|
3907
|
+
make: params.make,
|
|
3908
|
+
model: params.model,
|
|
3909
|
+
year: params.year,
|
|
3910
|
+
color: params.color,
|
|
3911
|
+
vin: params.vin
|
|
3912
|
+
},
|
|
3913
|
+
authenticationNotOptional: true
|
|
3914
|
+
},
|
|
3915
|
+
options
|
|
3916
|
+
);
|
|
3917
|
+
}
|
|
3918
|
+
async delete(params, options) {
|
|
3919
|
+
return await super.sendRequest(
|
|
3920
|
+
{
|
|
3921
|
+
method: "DELETE",
|
|
3922
|
+
url: "vehicles/" + params.vehicleId,
|
|
3923
|
+
authenticationNotOptional: true,
|
|
3924
|
+
body: void 0
|
|
3925
|
+
},
|
|
3926
|
+
options
|
|
3927
|
+
);
|
|
3928
|
+
}
|
|
3929
|
+
};
|
|
3930
|
+
|
|
3931
|
+
// src/orders/orders.service.ts
|
|
3932
|
+
var OrdersService = class extends Service {
|
|
3933
|
+
constructor(config) {
|
|
3934
|
+
super(config);
|
|
3935
|
+
}
|
|
3936
|
+
async create(params, options) {
|
|
3937
|
+
return await super.sendRequest(
|
|
3938
|
+
{
|
|
3939
|
+
method: "POST",
|
|
3940
|
+
url: "orders",
|
|
3941
|
+
body: {
|
|
3942
|
+
userId: params.userId,
|
|
3943
|
+
orderNumber: params.orderNumber,
|
|
3944
|
+
status: params.status,
|
|
3945
|
+
paymentStatus: params.paymentStatus,
|
|
3946
|
+
items: params.items,
|
|
3947
|
+
subtotal: params.subtotal,
|
|
3948
|
+
tax: params.tax,
|
|
3949
|
+
shipping: params.shipping,
|
|
3950
|
+
total: params.total,
|
|
3951
|
+
currency: params.currency,
|
|
3952
|
+
shippingAddress: params.shippingAddress,
|
|
3953
|
+
billingAddress: params.billingAddress,
|
|
3954
|
+
orderDate: params.orderDate,
|
|
3955
|
+
estimatedDeliveryDate: params.estimatedDeliveryDate,
|
|
3956
|
+
actualDeliveryDate: params.actualDeliveryDate,
|
|
3957
|
+
notes: params.notes
|
|
3958
|
+
},
|
|
3959
|
+
authenticationNotOptional: true
|
|
3960
|
+
},
|
|
3961
|
+
options
|
|
3962
|
+
);
|
|
3963
|
+
}
|
|
3964
|
+
async list(params, options) {
|
|
3965
|
+
const queryArray = [];
|
|
3966
|
+
if (params?.userId !== void 0) {
|
|
3967
|
+
queryArray.push("userId=" + params.userId);
|
|
3968
|
+
}
|
|
3969
|
+
if (params?.orderNumber !== void 0) {
|
|
3970
|
+
queryArray.push("orderNumber=" + params.orderNumber);
|
|
3971
|
+
}
|
|
3972
|
+
if (params?.status !== void 0) {
|
|
3973
|
+
queryArray.push("status=" + params.status);
|
|
3974
|
+
}
|
|
3975
|
+
if (params?.paymentStatus !== void 0) {
|
|
3976
|
+
queryArray.push("paymentStatus=" + params.paymentStatus);
|
|
3977
|
+
}
|
|
3978
|
+
if (params?.currency !== void 0) {
|
|
3979
|
+
queryArray.push("currency=" + params.currency);
|
|
3980
|
+
}
|
|
3981
|
+
if (options?.limit !== void 0) {
|
|
3982
|
+
queryArray.push("limit=" + options.limit);
|
|
3983
|
+
}
|
|
3984
|
+
if (options?.skip !== void 0) {
|
|
3985
|
+
queryArray.push("skip=" + options.skip);
|
|
3986
|
+
}
|
|
3987
|
+
return await super.sendRequest(
|
|
3988
|
+
{
|
|
3989
|
+
method: "GET",
|
|
3990
|
+
url: "orders?" + queryArray.join("&"),
|
|
3991
|
+
body: void 0,
|
|
3992
|
+
authenticationNotOptional: false
|
|
3993
|
+
},
|
|
3994
|
+
options
|
|
3995
|
+
);
|
|
3996
|
+
}
|
|
3997
|
+
async retrieve(params, options) {
|
|
3998
|
+
const queryArray = [];
|
|
3999
|
+
return await super.sendRequest(
|
|
4000
|
+
{
|
|
4001
|
+
method: "GET",
|
|
4002
|
+
url: "orders/" + params.orderId + "?" + queryArray.join("&"),
|
|
4003
|
+
body: void 0,
|
|
4004
|
+
authenticationNotOptional: false
|
|
4005
|
+
},
|
|
4006
|
+
options
|
|
4007
|
+
);
|
|
4008
|
+
}
|
|
4009
|
+
async update(params, options) {
|
|
4010
|
+
return await super.sendRequest(
|
|
4011
|
+
{
|
|
4012
|
+
method: "PATCH",
|
|
4013
|
+
url: "orders/" + params.orderId,
|
|
4014
|
+
body: {
|
|
4015
|
+
userId: params.userId,
|
|
4016
|
+
orderNumber: params.orderNumber,
|
|
4017
|
+
status: params.status,
|
|
4018
|
+
paymentStatus: params.paymentStatus,
|
|
4019
|
+
items: params.items,
|
|
4020
|
+
subtotal: params.subtotal,
|
|
4021
|
+
tax: params.tax,
|
|
4022
|
+
shipping: params.shipping,
|
|
4023
|
+
total: params.total,
|
|
4024
|
+
currency: params.currency,
|
|
4025
|
+
shippingAddress: params.shippingAddress,
|
|
4026
|
+
billingAddress: params.billingAddress,
|
|
4027
|
+
orderDate: params.orderDate,
|
|
4028
|
+
estimatedDeliveryDate: params.estimatedDeliveryDate,
|
|
4029
|
+
actualDeliveryDate: params.actualDeliveryDate,
|
|
4030
|
+
notes: params.notes
|
|
4031
|
+
},
|
|
4032
|
+
authenticationNotOptional: true
|
|
4033
|
+
},
|
|
4034
|
+
options
|
|
4035
|
+
);
|
|
4036
|
+
}
|
|
4037
|
+
async delete(params, options) {
|
|
4038
|
+
return await super.sendRequest(
|
|
4039
|
+
{
|
|
4040
|
+
method: "DELETE",
|
|
4041
|
+
url: "orders/" + params.orderId,
|
|
4042
|
+
authenticationNotOptional: true,
|
|
4043
|
+
body: void 0
|
|
4044
|
+
},
|
|
4045
|
+
options
|
|
4046
|
+
);
|
|
4047
|
+
}
|
|
4048
|
+
};
|
|
4049
|
+
|
|
4050
|
+
// src/baskets/baskets.service.ts
|
|
4051
|
+
var BasketsService = class extends Service {
|
|
4052
|
+
constructor(config) {
|
|
4053
|
+
super(config);
|
|
4054
|
+
}
|
|
4055
|
+
async create(params, options) {
|
|
4056
|
+
return await super.sendRequest(
|
|
4057
|
+
{
|
|
4058
|
+
method: "POST",
|
|
4059
|
+
url: "baskets",
|
|
4060
|
+
body: {
|
|
4061
|
+
userId: params.userId,
|
|
4062
|
+
sessionId: params.sessionId,
|
|
4063
|
+
status: params.status,
|
|
4064
|
+
items: params.items,
|
|
4065
|
+
itemCount: params.itemCount,
|
|
4066
|
+
subtotal: params.subtotal,
|
|
4067
|
+
discountTotal: params.discountTotal,
|
|
4068
|
+
taxEstimate: params.taxEstimate,
|
|
4069
|
+
shippingEstimate: params.shippingEstimate,
|
|
4070
|
+
total: params.total,
|
|
4071
|
+
currency: params.currency,
|
|
4072
|
+
expiresAt: params.expiresAt,
|
|
4073
|
+
notes: params.notes
|
|
4074
|
+
},
|
|
4075
|
+
authenticationNotOptional: true
|
|
4076
|
+
},
|
|
4077
|
+
options
|
|
4078
|
+
);
|
|
4079
|
+
}
|
|
4080
|
+
async list(params, options) {
|
|
4081
|
+
const queryArray = [];
|
|
4082
|
+
if (params?.userId !== void 0) {
|
|
4083
|
+
queryArray.push("userId=" + params.userId);
|
|
4084
|
+
}
|
|
4085
|
+
if (params?.sessionId !== void 0) {
|
|
4086
|
+
queryArray.push("sessionId=" + params.sessionId);
|
|
4087
|
+
}
|
|
4088
|
+
if (params?.status !== void 0) {
|
|
4089
|
+
queryArray.push("status=" + params.status);
|
|
4090
|
+
}
|
|
4091
|
+
if (params?.currency !== void 0) {
|
|
4092
|
+
queryArray.push("currency=" + params.currency);
|
|
4093
|
+
}
|
|
4094
|
+
if (options?.limit !== void 0) {
|
|
4095
|
+
queryArray.push("limit=" + options.limit);
|
|
4096
|
+
}
|
|
4097
|
+
if (options?.skip !== void 0) {
|
|
4098
|
+
queryArray.push("skip=" + options.skip);
|
|
4099
|
+
}
|
|
4100
|
+
return await super.sendRequest(
|
|
4101
|
+
{
|
|
4102
|
+
method: "GET",
|
|
4103
|
+
url: "baskets?" + queryArray.join("&"),
|
|
4104
|
+
body: void 0,
|
|
4105
|
+
authenticationNotOptional: false
|
|
4106
|
+
},
|
|
4107
|
+
options
|
|
4108
|
+
);
|
|
4109
|
+
}
|
|
4110
|
+
async retrieve(params, options) {
|
|
4111
|
+
const queryArray = [];
|
|
4112
|
+
return await super.sendRequest(
|
|
4113
|
+
{
|
|
4114
|
+
method: "GET",
|
|
4115
|
+
url: "baskets/" + params.basketId + "?" + queryArray.join("&"),
|
|
4116
|
+
body: void 0,
|
|
4117
|
+
authenticationNotOptional: false
|
|
4118
|
+
},
|
|
4119
|
+
options
|
|
4120
|
+
);
|
|
4121
|
+
}
|
|
4122
|
+
async update(params, options) {
|
|
4123
|
+
return await super.sendRequest(
|
|
4124
|
+
{
|
|
4125
|
+
method: "PATCH",
|
|
4126
|
+
url: "baskets/" + params.basketId,
|
|
4127
|
+
body: {
|
|
4128
|
+
userId: params.userId,
|
|
4129
|
+
sessionId: params.sessionId,
|
|
4130
|
+
status: params.status,
|
|
4131
|
+
items: params.items,
|
|
4132
|
+
itemCount: params.itemCount,
|
|
4133
|
+
subtotal: params.subtotal,
|
|
4134
|
+
discountTotal: params.discountTotal,
|
|
4135
|
+
taxEstimate: params.taxEstimate,
|
|
4136
|
+
shippingEstimate: params.shippingEstimate,
|
|
4137
|
+
total: params.total,
|
|
4138
|
+
currency: params.currency,
|
|
4139
|
+
expiresAt: params.expiresAt,
|
|
4140
|
+
notes: params.notes
|
|
4141
|
+
},
|
|
4142
|
+
authenticationNotOptional: true
|
|
4143
|
+
},
|
|
4144
|
+
options
|
|
4145
|
+
);
|
|
4146
|
+
}
|
|
4147
|
+
async delete(params, options) {
|
|
4148
|
+
return await super.sendRequest(
|
|
4149
|
+
{
|
|
4150
|
+
method: "DELETE",
|
|
4151
|
+
url: "baskets/" + params.basketId,
|
|
4152
|
+
authenticationNotOptional: true,
|
|
4153
|
+
body: void 0
|
|
4154
|
+
},
|
|
4155
|
+
options
|
|
4156
|
+
);
|
|
4157
|
+
}
|
|
4158
|
+
};
|
|
4159
|
+
|
|
4160
|
+
// src/benefitCards/benefitCards.service.ts
|
|
4161
|
+
var BenefitCardsService = class extends Service {
|
|
4162
|
+
constructor(config) {
|
|
4163
|
+
super(config);
|
|
4164
|
+
}
|
|
4165
|
+
async create(params, options) {
|
|
4166
|
+
return await super.sendRequest(
|
|
4167
|
+
{
|
|
4168
|
+
method: "POST",
|
|
4169
|
+
url: "benefitCards",
|
|
4170
|
+
body: {
|
|
4171
|
+
userId: params.userId,
|
|
4172
|
+
cardNumber: params.cardNumber,
|
|
4173
|
+
cardHolderName: params.cardHolderName,
|
|
4174
|
+
type: params.type,
|
|
4175
|
+
status: params.status,
|
|
4176
|
+
benefits: params.benefits,
|
|
4177
|
+
limits: params.limits,
|
|
4178
|
+
metadata: params.metadata,
|
|
4179
|
+
pointsBalance: params.pointsBalance,
|
|
4180
|
+
cashbackBalance: params.cashbackBalance,
|
|
4181
|
+
totalSavings: params.totalSavings,
|
|
4182
|
+
totalSpent: params.totalSpent,
|
|
4183
|
+
transactionCount: params.transactionCount,
|
|
4184
|
+
expiresAt: params.expiresAt,
|
|
4185
|
+
isDigital: params.isDigital,
|
|
4186
|
+
isTransferable: params.isTransferable,
|
|
4187
|
+
requiresPin: params.requiresPin,
|
|
4188
|
+
pin: params.pin,
|
|
4189
|
+
qrCode: params.qrCode,
|
|
4190
|
+
barcode: params.barcode
|
|
4191
|
+
},
|
|
4192
|
+
authenticationNotOptional: true
|
|
4193
|
+
},
|
|
4194
|
+
options
|
|
4195
|
+
);
|
|
4196
|
+
}
|
|
4197
|
+
async list(params, options) {
|
|
4198
|
+
const queryArray = [];
|
|
4199
|
+
if (params?.userId !== void 0) {
|
|
4200
|
+
queryArray.push("userId=" + params.userId);
|
|
4201
|
+
}
|
|
4202
|
+
if (params?.cardNumber !== void 0) {
|
|
4203
|
+
queryArray.push("cardNumber=" + params.cardNumber);
|
|
4204
|
+
}
|
|
4205
|
+
if (params?.cardHolderName !== void 0) {
|
|
4206
|
+
queryArray.push("cardHolderName=" + params.cardHolderName);
|
|
4207
|
+
}
|
|
4208
|
+
if (params?.type !== void 0) {
|
|
4209
|
+
queryArray.push("type=" + params.type);
|
|
4210
|
+
}
|
|
4211
|
+
if (params?.status !== void 0) {
|
|
4212
|
+
queryArray.push("status=" + params.status);
|
|
4213
|
+
}
|
|
4214
|
+
if (params?.issuer !== void 0) {
|
|
4215
|
+
queryArray.push("issuer=" + params.issuer);
|
|
4216
|
+
}
|
|
4217
|
+
if (params?.brand !== void 0) {
|
|
4218
|
+
queryArray.push("brand=" + params.brand);
|
|
4219
|
+
}
|
|
4220
|
+
if (params?.level !== void 0) {
|
|
4221
|
+
queryArray.push("level=" + params.level);
|
|
4222
|
+
}
|
|
4223
|
+
if (params?.isDigital !== void 0) {
|
|
4224
|
+
queryArray.push("isDigital=" + params.isDigital);
|
|
4225
|
+
}
|
|
4226
|
+
if (params?.isTransferable !== void 0) {
|
|
4227
|
+
queryArray.push("isTransferable=" + params.isTransferable);
|
|
4228
|
+
}
|
|
4229
|
+
if (params?.requiresPin !== void 0) {
|
|
4230
|
+
queryArray.push("requiresPin=" + params.requiresPin);
|
|
4231
|
+
}
|
|
4232
|
+
if (options?.limit !== void 0) {
|
|
4233
|
+
queryArray.push("limit=" + options.limit);
|
|
4234
|
+
}
|
|
4235
|
+
if (options?.skip !== void 0) {
|
|
4236
|
+
queryArray.push("skip=" + options.skip);
|
|
4237
|
+
}
|
|
4238
|
+
return await super.sendRequest(
|
|
4239
|
+
{
|
|
4240
|
+
method: "GET",
|
|
4241
|
+
url: "benefitCards?" + queryArray.join("&"),
|
|
4242
|
+
body: void 0,
|
|
4243
|
+
authenticationNotOptional: false
|
|
4244
|
+
},
|
|
4245
|
+
options
|
|
4246
|
+
);
|
|
4247
|
+
}
|
|
4248
|
+
async retrieve(params, options) {
|
|
4249
|
+
const queryArray = [];
|
|
4250
|
+
return await super.sendRequest(
|
|
4251
|
+
{
|
|
4252
|
+
method: "GET",
|
|
4253
|
+
url: "benefitCards/" + params.benefitCardId + "?" + queryArray.join("&"),
|
|
4254
|
+
body: void 0,
|
|
4255
|
+
authenticationNotOptional: false
|
|
4256
|
+
},
|
|
4257
|
+
options
|
|
4258
|
+
);
|
|
4259
|
+
}
|
|
4260
|
+
async update(params, options) {
|
|
4261
|
+
return await super.sendRequest(
|
|
4262
|
+
{
|
|
4263
|
+
method: "PATCH",
|
|
4264
|
+
url: "benefitCards/" + params.benefitCardId,
|
|
4265
|
+
body: {
|
|
4266
|
+
userId: params.userId,
|
|
4267
|
+
cardNumber: params.cardNumber,
|
|
4268
|
+
cardHolderName: params.cardHolderName,
|
|
4269
|
+
type: params.type,
|
|
4270
|
+
status: params.status,
|
|
4271
|
+
benefits: params.benefits,
|
|
4272
|
+
limits: params.limits,
|
|
4273
|
+
metadata: params.metadata,
|
|
4274
|
+
pointsBalance: params.pointsBalance,
|
|
4275
|
+
cashbackBalance: params.cashbackBalance,
|
|
4276
|
+
totalSavings: params.totalSavings,
|
|
4277
|
+
totalSpent: params.totalSpent,
|
|
4278
|
+
transactionCount: params.transactionCount,
|
|
4279
|
+
expiresAt: params.expiresAt,
|
|
4280
|
+
isDigital: params.isDigital,
|
|
4281
|
+
isTransferable: params.isTransferable,
|
|
4282
|
+
requiresPin: params.requiresPin,
|
|
4283
|
+
pin: params.pin,
|
|
4284
|
+
qrCode: params.qrCode,
|
|
4285
|
+
barcode: params.barcode
|
|
4286
|
+
},
|
|
4287
|
+
authenticationNotOptional: true
|
|
4288
|
+
},
|
|
4289
|
+
options
|
|
4290
|
+
);
|
|
4291
|
+
}
|
|
4292
|
+
async delete(params, options) {
|
|
4293
|
+
return await super.sendRequest(
|
|
4294
|
+
{
|
|
4295
|
+
method: "DELETE",
|
|
4296
|
+
url: "benefitCards/" + params.benefitCardId,
|
|
4297
|
+
authenticationNotOptional: true,
|
|
4298
|
+
body: void 0
|
|
4299
|
+
},
|
|
4300
|
+
options
|
|
4301
|
+
);
|
|
4302
|
+
}
|
|
4303
|
+
};
|
|
4304
|
+
|
|
4305
|
+
// src/catalogs/catalogs.service.ts
|
|
4306
|
+
var CatalogsService = class extends Service {
|
|
4307
|
+
constructor(config) {
|
|
4308
|
+
super(config);
|
|
4309
|
+
}
|
|
4310
|
+
async create(params, options) {
|
|
4311
|
+
return await super.sendRequest(
|
|
4312
|
+
{
|
|
4313
|
+
method: "POST",
|
|
4314
|
+
url: "catalogs",
|
|
4315
|
+
body: {
|
|
4316
|
+
userId: params.userId,
|
|
4317
|
+
name: params.name,
|
|
4318
|
+
type: params.type,
|
|
4319
|
+
status: params.status,
|
|
4320
|
+
visibility: params.visibility,
|
|
4321
|
+
categories: params.categories,
|
|
4322
|
+
products: params.products,
|
|
4323
|
+
settings: params.settings,
|
|
4324
|
+
metadata: params.metadata,
|
|
4325
|
+
publishedAt: params.publishedAt,
|
|
4326
|
+
archivedAt: params.archivedAt,
|
|
4327
|
+
lastSyncedAt: params.lastSyncedAt,
|
|
4328
|
+
version: params.version,
|
|
4329
|
+
isDefault: params.isDefault,
|
|
4330
|
+
viewCount: params.viewCount,
|
|
4331
|
+
productCount: params.productCount,
|
|
4332
|
+
categoryCount: params.categoryCount,
|
|
4333
|
+
accessToken: params.accessToken,
|
|
4334
|
+
externalId: params.externalId,
|
|
4335
|
+
webhookUrl: params.webhookUrl
|
|
4336
|
+
},
|
|
4337
|
+
authenticationNotOptional: true
|
|
4338
|
+
},
|
|
4339
|
+
options
|
|
4340
|
+
);
|
|
4341
|
+
}
|
|
4342
|
+
async list(params, options) {
|
|
4343
|
+
const queryArray = [];
|
|
4344
|
+
if (params?.userId !== void 0) {
|
|
4345
|
+
queryArray.push("userId=" + params.userId);
|
|
4346
|
+
}
|
|
4347
|
+
if (params?.name !== void 0) {
|
|
4348
|
+
queryArray.push("name=" + params.name);
|
|
4349
|
+
}
|
|
4350
|
+
if (params?.type !== void 0) {
|
|
4351
|
+
queryArray.push("type=" + params.type);
|
|
4352
|
+
}
|
|
4353
|
+
if (params?.status !== void 0) {
|
|
4354
|
+
queryArray.push("status=" + params.status);
|
|
4355
|
+
}
|
|
4356
|
+
if (params?.visibility !== void 0) {
|
|
4357
|
+
queryArray.push("visibility=" + params.visibility);
|
|
4358
|
+
}
|
|
4359
|
+
if (params?.isDefault !== void 0) {
|
|
4360
|
+
queryArray.push("isDefault=" + params.isDefault);
|
|
4361
|
+
}
|
|
4362
|
+
if (params?.industry !== void 0) {
|
|
4363
|
+
queryArray.push("industry=" + params.industry);
|
|
4364
|
+
}
|
|
4365
|
+
if (params?.region !== void 0) {
|
|
4366
|
+
queryArray.push("region=" + params.region);
|
|
4367
|
+
}
|
|
4368
|
+
if (params?.language !== void 0) {
|
|
4369
|
+
queryArray.push("language=" + params.language);
|
|
4370
|
+
}
|
|
4371
|
+
if (params?.externalId !== void 0) {
|
|
4372
|
+
queryArray.push("externalId=" + params.externalId);
|
|
4373
|
+
}
|
|
4374
|
+
if (params?.sortBy !== void 0) {
|
|
4375
|
+
queryArray.push("sortBy=" + params.sortBy);
|
|
4376
|
+
}
|
|
4377
|
+
if (params?.sortOrder !== void 0) {
|
|
4378
|
+
queryArray.push("sortOrder=" + params.sortOrder);
|
|
4379
|
+
}
|
|
4380
|
+
if (options?.limit !== void 0) {
|
|
4381
|
+
queryArray.push("limit=" + options.limit);
|
|
4382
|
+
}
|
|
4383
|
+
return await super.sendRequest(
|
|
4384
|
+
{
|
|
4385
|
+
method: "GET",
|
|
4386
|
+
url: "catalogs?" + queryArray.join("&"),
|
|
4387
|
+
body: void 0,
|
|
4388
|
+
authenticationNotOptional: false
|
|
4389
|
+
},
|
|
4390
|
+
options
|
|
4391
|
+
);
|
|
4392
|
+
}
|
|
4393
|
+
async retrieve(params, options) {
|
|
4394
|
+
const queryArray = [];
|
|
4395
|
+
return await super.sendRequest(
|
|
4396
|
+
{
|
|
4397
|
+
method: "GET",
|
|
4398
|
+
url: "catalogs/" + params.catalogId + "?" + queryArray.join("&"),
|
|
4399
|
+
body: void 0,
|
|
4400
|
+
authenticationNotOptional: false
|
|
4401
|
+
},
|
|
4402
|
+
options
|
|
4403
|
+
);
|
|
4404
|
+
}
|
|
4405
|
+
async update(params, options) {
|
|
4406
|
+
return await super.sendRequest(
|
|
4407
|
+
{
|
|
4408
|
+
method: "PATCH",
|
|
4409
|
+
url: "catalogs/" + params.catalogId,
|
|
4410
|
+
body: {
|
|
4411
|
+
userId: params.userId,
|
|
4412
|
+
name: params.name,
|
|
4413
|
+
type: params.type,
|
|
4414
|
+
status: params.status,
|
|
4415
|
+
visibility: params.visibility,
|
|
4416
|
+
categories: params.categories,
|
|
4417
|
+
products: params.products,
|
|
4418
|
+
settings: params.settings,
|
|
4419
|
+
metadata: params.metadata,
|
|
4420
|
+
publishedAt: params.publishedAt,
|
|
4421
|
+
archivedAt: params.archivedAt,
|
|
4422
|
+
lastSyncedAt: params.lastSyncedAt,
|
|
4423
|
+
version: params.version,
|
|
4424
|
+
isDefault: params.isDefault,
|
|
4425
|
+
viewCount: params.viewCount,
|
|
4426
|
+
productCount: params.productCount,
|
|
4427
|
+
categoryCount: params.categoryCount,
|
|
4428
|
+
accessToken: params.accessToken,
|
|
4429
|
+
externalId: params.externalId,
|
|
4430
|
+
webhookUrl: params.webhookUrl
|
|
4431
|
+
},
|
|
4432
|
+
authenticationNotOptional: true
|
|
4433
|
+
},
|
|
4434
|
+
options
|
|
4435
|
+
);
|
|
4436
|
+
}
|
|
4437
|
+
async delete(params, options) {
|
|
4438
|
+
return await super.sendRequest(
|
|
4439
|
+
{
|
|
4440
|
+
method: "DELETE",
|
|
4441
|
+
url: "catalogs/" + params.catalogId,
|
|
4442
|
+
authenticationNotOptional: true,
|
|
4443
|
+
body: void 0
|
|
4444
|
+
},
|
|
4445
|
+
options
|
|
4446
|
+
);
|
|
4447
|
+
}
|
|
4448
|
+
};
|
|
4449
|
+
|
|
4450
|
+
// src/offers/offers.service.ts
|
|
4451
|
+
var OffersService = class extends Service {
|
|
4452
|
+
constructor(config) {
|
|
4453
|
+
super(config);
|
|
4454
|
+
}
|
|
4455
|
+
async create(params, options) {
|
|
4456
|
+
return await super.sendRequest(
|
|
4457
|
+
{
|
|
4458
|
+
method: "POST",
|
|
4459
|
+
url: "offers",
|
|
4460
|
+
body: {
|
|
4461
|
+
userId: params.userId,
|
|
4462
|
+
name: params.name,
|
|
4463
|
+
description: params.description,
|
|
4464
|
+
type: params.type,
|
|
4465
|
+
status: params.status,
|
|
4466
|
+
scope: params.scope,
|
|
4467
|
+
code: params.code,
|
|
4468
|
+
title: params.title,
|
|
4469
|
+
subtitle: params.subtitle,
|
|
4470
|
+
imageUrl: params.imageUrl,
|
|
4471
|
+
bannerUrl: params.bannerUrl,
|
|
4472
|
+
landingPageUrl: params.landingPageUrl,
|
|
4473
|
+
termsAndConditions: params.termsAndConditions,
|
|
4474
|
+
conditions: params.conditions,
|
|
4475
|
+
discount: params.discount,
|
|
4476
|
+
usage: params.usage,
|
|
4477
|
+
targeting: params.targeting,
|
|
4478
|
+
scheduling: params.scheduling,
|
|
4479
|
+
metrics: params.metrics,
|
|
4480
|
+
priority: params.priority,
|
|
4481
|
+
isStackable: params.isStackable,
|
|
4482
|
+
requiresCouponCode: params.requiresCouponCode,
|
|
4483
|
+
isPublic: params.isPublic,
|
|
4484
|
+
isAutomaticallyApplied: params.isAutomaticallyApplied,
|
|
4485
|
+
notificationSettings: params.notificationSettings,
|
|
4486
|
+
lastModifiedBy: params.lastModifiedBy,
|
|
4487
|
+
approvedBy: params.approvedBy,
|
|
4488
|
+
approvedAt: params.approvedAt,
|
|
4489
|
+
tags: params.tags,
|
|
4490
|
+
customFields: params.customFields,
|
|
4491
|
+
integrationData: params.integrationData
|
|
4492
|
+
},
|
|
4493
|
+
authenticationNotOptional: true
|
|
4494
|
+
},
|
|
4495
|
+
options
|
|
4496
|
+
);
|
|
4497
|
+
}
|
|
4498
|
+
async list(params, options) {
|
|
4499
|
+
const queryArray = [];
|
|
4500
|
+
if (params?.userId !== void 0) {
|
|
4501
|
+
queryArray.push("userId=" + params.userId);
|
|
4502
|
+
}
|
|
4503
|
+
if (params?.name !== void 0) {
|
|
4504
|
+
queryArray.push("name=" + params.name);
|
|
4505
|
+
}
|
|
4506
|
+
if (params?.type !== void 0) {
|
|
4507
|
+
queryArray.push("type=" + params.type);
|
|
4508
|
+
}
|
|
4509
|
+
if (params?.status !== void 0) {
|
|
4510
|
+
queryArray.push("status=" + params.status);
|
|
4511
|
+
}
|
|
4512
|
+
if (params?.scope !== void 0) {
|
|
4513
|
+
queryArray.push("scope=" + params.scope);
|
|
4514
|
+
}
|
|
4515
|
+
if (params?.code !== void 0) {
|
|
4516
|
+
queryArray.push("code=" + params.code);
|
|
4517
|
+
}
|
|
4518
|
+
if (params?.isPublic !== void 0) {
|
|
4519
|
+
queryArray.push("isPublic=" + params.isPublic);
|
|
4520
|
+
}
|
|
4521
|
+
if (params?.isActive !== void 0) {
|
|
4522
|
+
queryArray.push("isActive=" + params.isActive);
|
|
4523
|
+
}
|
|
4524
|
+
if (params?.requiresCouponCode !== void 0) {
|
|
4525
|
+
queryArray.push("requiresCouponCode=" + params.requiresCouponCode);
|
|
4526
|
+
}
|
|
4527
|
+
if (params?.priority !== void 0) {
|
|
4528
|
+
queryArray.push("priority=" + params.priority);
|
|
4529
|
+
}
|
|
4530
|
+
if (params?.tags !== void 0) {
|
|
4531
|
+
queryArray.push("tags=" + params.tags.join(","));
|
|
4532
|
+
}
|
|
4533
|
+
if (params?.sortBy !== void 0) {
|
|
4534
|
+
queryArray.push("sortBy=" + params.sortBy);
|
|
4535
|
+
}
|
|
4536
|
+
if (params?.sortOrder !== void 0) {
|
|
4537
|
+
queryArray.push("sortOrder=" + params.sortOrder);
|
|
4538
|
+
}
|
|
4539
|
+
if (options?.limit !== void 0) {
|
|
4540
|
+
queryArray.push("limit=" + options.limit);
|
|
4541
|
+
}
|
|
4542
|
+
return await super.sendRequest(
|
|
4543
|
+
{
|
|
4544
|
+
method: "GET",
|
|
4545
|
+
url: "offers?" + queryArray.join("&"),
|
|
4546
|
+
body: void 0,
|
|
4547
|
+
authenticationNotOptional: false
|
|
4548
|
+
},
|
|
4549
|
+
options
|
|
4550
|
+
);
|
|
4551
|
+
}
|
|
4552
|
+
async retrieve(params, options) {
|
|
4553
|
+
const queryArray = [];
|
|
4554
|
+
return await super.sendRequest(
|
|
4555
|
+
{
|
|
4556
|
+
method: "GET",
|
|
4557
|
+
url: "offers/" + params.offerId + "?" + queryArray.join("&"),
|
|
4558
|
+
body: void 0,
|
|
4559
|
+
authenticationNotOptional: false
|
|
4560
|
+
},
|
|
4561
|
+
options
|
|
4562
|
+
);
|
|
4563
|
+
}
|
|
4564
|
+
async update(params, options) {
|
|
4565
|
+
return await super.sendRequest(
|
|
4566
|
+
{
|
|
4567
|
+
method: "PATCH",
|
|
4568
|
+
url: "offers/" + params.offerId,
|
|
4569
|
+
body: {
|
|
4570
|
+
userId: params.userId,
|
|
4571
|
+
name: params.name,
|
|
4572
|
+
description: params.description,
|
|
4573
|
+
type: params.type,
|
|
4574
|
+
status: params.status,
|
|
4575
|
+
scope: params.scope,
|
|
4576
|
+
code: params.code,
|
|
4577
|
+
title: params.title,
|
|
4578
|
+
subtitle: params.subtitle,
|
|
4579
|
+
imageUrl: params.imageUrl,
|
|
4580
|
+
bannerUrl: params.bannerUrl,
|
|
4581
|
+
landingPageUrl: params.landingPageUrl,
|
|
4582
|
+
termsAndConditions: params.termsAndConditions,
|
|
4583
|
+
conditions: params.conditions,
|
|
4584
|
+
discount: params.discount,
|
|
4585
|
+
usage: params.usage,
|
|
4586
|
+
targeting: params.targeting,
|
|
4587
|
+
scheduling: params.scheduling,
|
|
4588
|
+
metrics: params.metrics,
|
|
4589
|
+
priority: params.priority,
|
|
4590
|
+
isStackable: params.isStackable,
|
|
4591
|
+
requiresCouponCode: params.requiresCouponCode,
|
|
4592
|
+
isPublic: params.isPublic,
|
|
4593
|
+
isAutomaticallyApplied: params.isAutomaticallyApplied,
|
|
4594
|
+
notificationSettings: params.notificationSettings,
|
|
4595
|
+
lastModifiedBy: params.lastModifiedBy,
|
|
4596
|
+
approvedBy: params.approvedBy,
|
|
4597
|
+
approvedAt: params.approvedAt,
|
|
4598
|
+
tags: params.tags,
|
|
4599
|
+
customFields: params.customFields,
|
|
4600
|
+
integrationData: params.integrationData
|
|
4601
|
+
},
|
|
4602
|
+
authenticationNotOptional: true
|
|
4603
|
+
},
|
|
4604
|
+
options
|
|
4605
|
+
);
|
|
4606
|
+
}
|
|
4607
|
+
async delete(params, options) {
|
|
4608
|
+
return await super.sendRequest(
|
|
4609
|
+
{
|
|
4610
|
+
method: "DELETE",
|
|
4611
|
+
url: "offers/" + params.offerId,
|
|
4612
|
+
authenticationNotOptional: true,
|
|
4613
|
+
body: void 0
|
|
4614
|
+
},
|
|
4615
|
+
options
|
|
4616
|
+
);
|
|
4617
|
+
}
|
|
4618
|
+
};
|
|
4619
|
+
|
|
4620
|
+
// src/kits/kits.service.ts
|
|
4621
|
+
var KitsService = class extends Service {
|
|
4622
|
+
constructor(config) {
|
|
4623
|
+
super(config);
|
|
4624
|
+
}
|
|
4625
|
+
async create(params, options) {
|
|
4626
|
+
return await super.sendRequest(
|
|
4627
|
+
{
|
|
4628
|
+
method: "POST",
|
|
4629
|
+
url: "kits",
|
|
4630
|
+
body: {
|
|
4631
|
+
name: params.name,
|
|
4632
|
+
propertyId: params.propertyId,
|
|
4633
|
+
template: params.template
|
|
4634
|
+
},
|
|
4635
|
+
authenticationNotOptional: true
|
|
4636
|
+
},
|
|
4637
|
+
options
|
|
4638
|
+
);
|
|
4639
|
+
}
|
|
4640
|
+
async list(params, options) {
|
|
4641
|
+
const queryArray = [];
|
|
4642
|
+
if (params?.name !== void 0) {
|
|
4643
|
+
queryArray.push("name=" + params.name);
|
|
4644
|
+
}
|
|
4645
|
+
if (params?.propertyId !== void 0) {
|
|
4646
|
+
queryArray.push("propertyId=" + params.propertyId);
|
|
4647
|
+
}
|
|
4648
|
+
if (params?.type !== void 0) {
|
|
4649
|
+
queryArray.push("type=" + params.type);
|
|
4650
|
+
}
|
|
4651
|
+
if (options?.limit !== void 0) {
|
|
4652
|
+
queryArray.push("limit=" + options.limit);
|
|
4653
|
+
}
|
|
4654
|
+
return await super.sendRequest(
|
|
4655
|
+
{
|
|
4656
|
+
method: "GET",
|
|
4657
|
+
url: "kits?" + queryArray.join("&"),
|
|
4658
|
+
body: void 0,
|
|
4659
|
+
authenticationNotOptional: false
|
|
4660
|
+
},
|
|
4661
|
+
options
|
|
4662
|
+
);
|
|
4663
|
+
}
|
|
4664
|
+
async retrieve(params, options) {
|
|
4665
|
+
const queryArray = [];
|
|
4666
|
+
return await super.sendRequest(
|
|
4667
|
+
{
|
|
4668
|
+
method: "GET",
|
|
4669
|
+
url: "kits/" + params.kitId + "?" + queryArray.join("&"),
|
|
4670
|
+
body: void 0,
|
|
4671
|
+
authenticationNotOptional: false
|
|
4672
|
+
},
|
|
4673
|
+
options
|
|
4674
|
+
);
|
|
4675
|
+
}
|
|
4676
|
+
async update(params, options) {
|
|
4677
|
+
return await super.sendRequest(
|
|
4678
|
+
{
|
|
4679
|
+
method: "PATCH",
|
|
4680
|
+
url: "kits/" + params.kitId,
|
|
4681
|
+
body: {
|
|
4682
|
+
name: params.name
|
|
4683
|
+
},
|
|
4684
|
+
authenticationNotOptional: true
|
|
4685
|
+
},
|
|
4686
|
+
options
|
|
4687
|
+
);
|
|
4688
|
+
}
|
|
4689
|
+
async delete(params, options) {
|
|
4690
|
+
return await super.sendRequest(
|
|
4691
|
+
{
|
|
4692
|
+
method: "DELETE",
|
|
4693
|
+
url: "kits/" + params.kitId,
|
|
4694
|
+
authenticationNotOptional: true,
|
|
4695
|
+
body: void 0
|
|
4696
|
+
},
|
|
4697
|
+
options
|
|
4698
|
+
);
|
|
4699
|
+
}
|
|
4700
|
+
};
|
|
4701
|
+
|
|
4702
|
+
// src/panels/panels.service.ts
|
|
4703
|
+
var PanelsService = class extends Service {
|
|
4704
|
+
constructor(config) {
|
|
4705
|
+
super(config);
|
|
4706
|
+
}
|
|
4707
|
+
async create(params, options) {
|
|
4708
|
+
return await super.sendRequest(
|
|
4709
|
+
{
|
|
4710
|
+
method: "POST",
|
|
4711
|
+
url: "panels",
|
|
4712
|
+
body: {
|
|
4713
|
+
userId: params.userId,
|
|
4714
|
+
name: params.name,
|
|
4715
|
+
title: params.title,
|
|
4716
|
+
description: params.description,
|
|
4717
|
+
type: params.type,
|
|
4718
|
+
status: params.status,
|
|
4719
|
+
size: params.size,
|
|
4720
|
+
isResizable: params.isResizable,
|
|
4721
|
+
isDraggable: params.isDraggable,
|
|
4722
|
+
isVisible: params.isVisible,
|
|
4723
|
+
position: params.position,
|
|
4724
|
+
config: params.config,
|
|
4725
|
+
accessCount: params.accessCount,
|
|
4726
|
+
permissions: params.permissions,
|
|
4727
|
+
tags: params.tags,
|
|
4728
|
+
parentPanelId: params.parentPanelId,
|
|
4729
|
+
order: params.order
|
|
4730
|
+
},
|
|
4731
|
+
authenticationNotOptional: true
|
|
4732
|
+
},
|
|
4733
|
+
options
|
|
4734
|
+
);
|
|
4735
|
+
}
|
|
4736
|
+
async list(params, options) {
|
|
4737
|
+
const queryArray = [];
|
|
4738
|
+
if (params?.userId !== void 0) {
|
|
4739
|
+
queryArray.push("userId=" + params.userId);
|
|
4740
|
+
}
|
|
4741
|
+
if (params?.name !== void 0) {
|
|
4742
|
+
queryArray.push("name=" + params.name);
|
|
4743
|
+
}
|
|
4744
|
+
if (params?.type !== void 0) {
|
|
4745
|
+
queryArray.push("type=" + params.type);
|
|
4746
|
+
}
|
|
4747
|
+
if (params?.status !== void 0) {
|
|
4748
|
+
queryArray.push("status=" + params.status);
|
|
4749
|
+
}
|
|
4750
|
+
if (params?.size !== void 0) {
|
|
4751
|
+
queryArray.push("size=" + params.size);
|
|
4752
|
+
}
|
|
4753
|
+
if (params?.isVisible !== void 0) {
|
|
4754
|
+
queryArray.push("isVisible=" + params.isVisible);
|
|
4755
|
+
}
|
|
4756
|
+
if (params?.parentPanelId !== void 0) {
|
|
4757
|
+
queryArray.push("parentPanelId=" + params.parentPanelId);
|
|
4758
|
+
}
|
|
4759
|
+
if (options?.limit !== void 0) {
|
|
4760
|
+
queryArray.push("limit=" + options.limit);
|
|
4761
|
+
}
|
|
4762
|
+
if (options?.skip !== void 0) {
|
|
4763
|
+
queryArray.push("skip=" + options.skip);
|
|
4764
|
+
}
|
|
4765
|
+
return await super.sendRequest(
|
|
4766
|
+
{
|
|
4767
|
+
method: "GET",
|
|
4768
|
+
url: "panels?" + queryArray.join("&"),
|
|
4769
|
+
body: void 0,
|
|
4770
|
+
authenticationNotOptional: false
|
|
4771
|
+
},
|
|
4772
|
+
options
|
|
4773
|
+
);
|
|
4774
|
+
}
|
|
4775
|
+
async retrieve(params, options) {
|
|
4776
|
+
const queryArray = [];
|
|
4777
|
+
return await super.sendRequest(
|
|
4778
|
+
{
|
|
4779
|
+
method: "GET",
|
|
4780
|
+
url: "panels/" + params.panelId + "?" + queryArray.join("&"),
|
|
4781
|
+
body: void 0,
|
|
4782
|
+
authenticationNotOptional: false
|
|
4783
|
+
},
|
|
4784
|
+
options
|
|
4785
|
+
);
|
|
4786
|
+
}
|
|
4787
|
+
async update(params, options) {
|
|
4788
|
+
return await super.sendRequest(
|
|
4789
|
+
{
|
|
4790
|
+
method: "PATCH",
|
|
4791
|
+
url: "panels/" + params.panelId,
|
|
4792
|
+
body: {
|
|
4793
|
+
userId: params.userId,
|
|
4794
|
+
name: params.name,
|
|
4795
|
+
title: params.title,
|
|
4796
|
+
description: params.description,
|
|
4797
|
+
type: params.type,
|
|
4798
|
+
status: params.status,
|
|
4799
|
+
size: params.size,
|
|
4800
|
+
isResizable: params.isResizable,
|
|
4801
|
+
isDraggable: params.isDraggable,
|
|
4802
|
+
isVisible: params.isVisible,
|
|
4803
|
+
position: params.position,
|
|
4804
|
+
config: params.config,
|
|
4805
|
+
permissions: params.permissions,
|
|
4806
|
+
tags: params.tags,
|
|
4807
|
+
parentPanelId: params.parentPanelId,
|
|
4808
|
+
order: params.order
|
|
4809
|
+
},
|
|
4810
|
+
authenticationNotOptional: true
|
|
4811
|
+
},
|
|
4812
|
+
options
|
|
4813
|
+
);
|
|
4814
|
+
}
|
|
4815
|
+
async delete(params, options) {
|
|
4816
|
+
return await super.sendRequest(
|
|
4817
|
+
{
|
|
4818
|
+
method: "DELETE",
|
|
4819
|
+
url: "panels/" + params.panelId,
|
|
4820
|
+
authenticationNotOptional: true,
|
|
4821
|
+
body: void 0
|
|
4822
|
+
},
|
|
4823
|
+
options
|
|
4824
|
+
);
|
|
4825
|
+
}
|
|
4826
|
+
};
|
|
4827
|
+
|
|
4828
|
+
// src/prices/prices.service.ts
|
|
4829
|
+
var PricesService = class extends Service {
|
|
4830
|
+
constructor(config) {
|
|
4831
|
+
super(config);
|
|
4832
|
+
}
|
|
4833
|
+
async create(params, options) {
|
|
4834
|
+
return await super.sendRequest(
|
|
4835
|
+
{
|
|
4836
|
+
method: "POST",
|
|
4837
|
+
url: "prices",
|
|
4838
|
+
body: {
|
|
4839
|
+
userId: params.userId,
|
|
4840
|
+
productId: params.productId,
|
|
4841
|
+
name: params.name,
|
|
4842
|
+
type: params.type,
|
|
4843
|
+
status: params.status,
|
|
4844
|
+
amount: params.amount,
|
|
4845
|
+
currency: params.currency,
|
|
4846
|
+
taxBehavior: params.taxBehavior,
|
|
4847
|
+
taxPercentage: params.taxPercentage,
|
|
4848
|
+
recurringInterval: params.recurringInterval,
|
|
4849
|
+
recurringIntervalCount: params.recurringIntervalCount,
|
|
4850
|
+
trialPeriodDays: params.trialPeriodDays,
|
|
4851
|
+
usageType: params.usageType,
|
|
4852
|
+
tiers: params.tiers,
|
|
4853
|
+
discounts: params.discounts,
|
|
4854
|
+
metadata: params.metadata,
|
|
4855
|
+
isDefault: params.isDefault,
|
|
4856
|
+
priority: params.priority,
|
|
4857
|
+
minQuantity: params.minQuantity,
|
|
4858
|
+
maxQuantity: params.maxQuantity,
|
|
4859
|
+
unitLabel: params.unitLabel,
|
|
4860
|
+
transformQuantityDivideBy: params.transformQuantityDivideBy,
|
|
4861
|
+
transformQuantityRound: params.transformQuantityRound
|
|
4862
|
+
},
|
|
4863
|
+
authenticationNotOptional: true
|
|
4864
|
+
},
|
|
4865
|
+
options
|
|
4866
|
+
);
|
|
4867
|
+
}
|
|
4868
|
+
async list(params, options) {
|
|
4869
|
+
const queryArray = [];
|
|
4870
|
+
if (params?.userId !== void 0) {
|
|
4871
|
+
queryArray.push("userId=" + params.userId);
|
|
4872
|
+
}
|
|
4873
|
+
if (params?.productId !== void 0) {
|
|
4874
|
+
queryArray.push("productId=" + params.productId);
|
|
4875
|
+
}
|
|
4876
|
+
if (params?.name !== void 0) {
|
|
4877
|
+
queryArray.push("name=" + params.name);
|
|
4878
|
+
}
|
|
4879
|
+
if (params?.type !== void 0) {
|
|
4880
|
+
queryArray.push("type=" + params.type);
|
|
4881
|
+
}
|
|
4882
|
+
if (params?.status !== void 0) {
|
|
4883
|
+
queryArray.push("status=" + params.status);
|
|
4884
|
+
}
|
|
4885
|
+
if (params?.currency !== void 0) {
|
|
4886
|
+
queryArray.push("currency=" + params.currency);
|
|
4887
|
+
}
|
|
4888
|
+
if (params?.taxBehavior !== void 0) {
|
|
4889
|
+
queryArray.push("taxBehavior=" + params.taxBehavior);
|
|
4890
|
+
}
|
|
4891
|
+
if (params?.recurringInterval !== void 0) {
|
|
4892
|
+
queryArray.push("recurringInterval=" + params.recurringInterval);
|
|
4893
|
+
}
|
|
4894
|
+
if (params?.usageType !== void 0) {
|
|
4895
|
+
queryArray.push("usageType=" + params.usageType);
|
|
4896
|
+
}
|
|
4897
|
+
if (params?.isDefault !== void 0) {
|
|
4898
|
+
queryArray.push("isDefault=" + params.isDefault);
|
|
4899
|
+
}
|
|
4900
|
+
if (params?.category !== void 0) {
|
|
4901
|
+
queryArray.push("category=" + params.category);
|
|
4902
|
+
}
|
|
4903
|
+
if (options?.limit !== void 0) {
|
|
4904
|
+
queryArray.push("limit=" + options.limit);
|
|
4905
|
+
}
|
|
4906
|
+
if (options?.skip !== void 0) {
|
|
4907
|
+
queryArray.push("skip=" + options.skip);
|
|
4908
|
+
}
|
|
4909
|
+
return await super.sendRequest(
|
|
4910
|
+
{
|
|
4911
|
+
method: "GET",
|
|
4912
|
+
url: "prices?" + queryArray.join("&"),
|
|
4913
|
+
body: void 0,
|
|
4914
|
+
authenticationNotOptional: false
|
|
4915
|
+
},
|
|
4916
|
+
options
|
|
4917
|
+
);
|
|
4918
|
+
}
|
|
4919
|
+
async retrieve(params, options) {
|
|
4920
|
+
const queryArray = [];
|
|
4921
|
+
return await super.sendRequest(
|
|
4922
|
+
{
|
|
4923
|
+
method: "GET",
|
|
4924
|
+
url: "prices/" + params.priceId + "?" + queryArray.join("&"),
|
|
4925
|
+
body: void 0,
|
|
4926
|
+
authenticationNotOptional: false
|
|
4927
|
+
},
|
|
4928
|
+
options
|
|
4929
|
+
);
|
|
4930
|
+
}
|
|
4931
|
+
async update(params, options) {
|
|
4932
|
+
return await super.sendRequest(
|
|
4933
|
+
{
|
|
4934
|
+
method: "PATCH",
|
|
4935
|
+
url: "prices/" + params.priceId,
|
|
4936
|
+
body: {
|
|
4937
|
+
userId: params.userId,
|
|
4938
|
+
productId: params.productId,
|
|
4939
|
+
name: params.name,
|
|
4940
|
+
type: params.type,
|
|
4941
|
+
status: params.status,
|
|
4942
|
+
amount: params.amount,
|
|
4943
|
+
currency: params.currency,
|
|
4944
|
+
taxBehavior: params.taxBehavior,
|
|
4945
|
+
taxPercentage: params.taxPercentage,
|
|
4946
|
+
recurringInterval: params.recurringInterval,
|
|
4947
|
+
recurringIntervalCount: params.recurringIntervalCount,
|
|
4948
|
+
trialPeriodDays: params.trialPeriodDays,
|
|
4949
|
+
usageType: params.usageType,
|
|
4950
|
+
tiers: params.tiers,
|
|
4951
|
+
discounts: params.discounts,
|
|
4952
|
+
metadata: params.metadata,
|
|
4953
|
+
isDefault: params.isDefault,
|
|
4954
|
+
priority: params.priority,
|
|
4955
|
+
minQuantity: params.minQuantity,
|
|
4956
|
+
maxQuantity: params.maxQuantity,
|
|
4957
|
+
unitLabel: params.unitLabel,
|
|
4958
|
+
transformQuantityDivideBy: params.transformQuantityDivideBy,
|
|
4959
|
+
transformQuantityRound: params.transformQuantityRound
|
|
4960
|
+
},
|
|
4961
|
+
authenticationNotOptional: true
|
|
4962
|
+
},
|
|
4963
|
+
options
|
|
4964
|
+
);
|
|
4965
|
+
}
|
|
4966
|
+
async delete(params, options) {
|
|
4967
|
+
return await super.sendRequest(
|
|
4968
|
+
{
|
|
4969
|
+
method: "DELETE",
|
|
4970
|
+
url: "prices/" + params.priceId,
|
|
4971
|
+
authenticationNotOptional: true,
|
|
4972
|
+
body: void 0
|
|
4973
|
+
},
|
|
4974
|
+
options
|
|
4975
|
+
);
|
|
4976
|
+
}
|
|
4977
|
+
};
|
|
4978
|
+
|
|
3623
4979
|
// src/types/types.ts
|
|
3624
4980
|
var LanguageCodeArray = [
|
|
3625
4981
|
"en",
|
|
@@ -3769,6 +5125,7 @@ var ConditionType = /* @__PURE__ */ ((ConditionType2) => {
|
|
|
3769
5125
|
// src/index.ts
|
|
3770
5126
|
var Juhuu = class {
|
|
3771
5127
|
constructor(config) {
|
|
5128
|
+
this.achievements = new AchievementsService(config);
|
|
3772
5129
|
this.sessions = new SessionService(config);
|
|
3773
5130
|
this.links = new LinkService(config);
|
|
3774
5131
|
this.users = new UsersService(config);
|
|
@@ -3806,10 +5163,21 @@ var Juhuu = class {
|
|
|
3806
5163
|
this.flows = new FlowsService(config);
|
|
3807
5164
|
this.flowTraces = new FlowTracesService(config);
|
|
3808
5165
|
this.mqttTopics = new MqttTopicsService(config);
|
|
5166
|
+
this.licensePlates = new LicensePlatesService(config);
|
|
5167
|
+
this.vehicles = new VehiclesService(config);
|
|
5168
|
+
this.orders = new OrdersService(config);
|
|
5169
|
+
this.baskets = new BasketsService(config);
|
|
5170
|
+
this.benefitCards = new BenefitCardsService(config);
|
|
5171
|
+
this.catalogs = new CatalogsService(config);
|
|
5172
|
+
this.offers = new OffersService(config);
|
|
5173
|
+
this.kits = new KitsService(config);
|
|
5174
|
+
this.panels = new PanelsService(config);
|
|
5175
|
+
this.prices = new PricesService(config);
|
|
3809
5176
|
}
|
|
3810
5177
|
/**
|
|
3811
5178
|
* Top Level Resources
|
|
3812
5179
|
*/
|
|
5180
|
+
achievements;
|
|
3813
5181
|
sessions;
|
|
3814
5182
|
links;
|
|
3815
5183
|
users;
|
|
@@ -3846,6 +5214,16 @@ var Juhuu = class {
|
|
|
3846
5214
|
flows;
|
|
3847
5215
|
flowTraces;
|
|
3848
5216
|
mqttTopics;
|
|
5217
|
+
licensePlates;
|
|
5218
|
+
vehicles;
|
|
5219
|
+
orders;
|
|
5220
|
+
baskets;
|
|
5221
|
+
benefitCards;
|
|
5222
|
+
catalogs;
|
|
5223
|
+
offers;
|
|
5224
|
+
kits;
|
|
5225
|
+
panels;
|
|
5226
|
+
prices;
|
|
3849
5227
|
};
|
|
3850
5228
|
var JUHUU;
|
|
3851
5229
|
((JUHUU2) => {
|