@compassdigital/sdk.typescript 4.126.1 → 4.127.0
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/lib/base.d.ts.map +1 -1
- package/lib/base.js +3 -0
- package/lib/base.js.map +1 -1
- package/lib/index.d.ts +19 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +17 -0
- package/lib/index.js.map +1 -1
- package/lib/interface/centricos.d.ts +11 -0
- package/lib/interface/centricos.d.ts.map +1 -1
- package/lib/interface/vendor.d.ts +9 -0
- package/lib/interface/vendor.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/base.ts +3 -0
- package/src/index.ts +46 -0
- package/src/interface/centricos.ts +19 -0
- package/src/interface/vendor.ts +18 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@compassdigital/sdk.typescript",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.127.0",
|
|
4
4
|
"description": "Compass Digital Labs TypeScript SDK",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@compassdigital/review": "^7.6.3",
|
|
54
|
-
"@compassdigital/sdk.typescript.cli": "^4.43.
|
|
54
|
+
"@compassdigital/sdk.typescript.cli": "^4.43.3",
|
|
55
55
|
"@swc/core": "^1.4.1",
|
|
56
56
|
"@swc/jest": "^0.2.36",
|
|
57
57
|
"@types/jest": "^29.2.4",
|
package/src/base.ts
CHANGED
|
@@ -390,6 +390,9 @@ export abstract class BaseServiceClient {
|
|
|
390
390
|
// add query parameters.
|
|
391
391
|
const query: string[] = [];
|
|
392
392
|
for (const [name, values] of Object.entries(params)) {
|
|
393
|
+
if (typeof values === 'undefined') {
|
|
394
|
+
continue;
|
|
395
|
+
}
|
|
393
396
|
for (const value of Array.isArray(values) ? values : [values]) {
|
|
394
397
|
query.push(`${encodeURIComponent(name)}=${encodeURIComponent(value)}`);
|
|
395
398
|
}
|
package/src/index.ts
CHANGED
|
@@ -1029,6 +1029,8 @@ import {
|
|
|
1029
1029
|
PostVendorApplicationResponse,
|
|
1030
1030
|
GetVendorApplicationsQuery,
|
|
1031
1031
|
GetVendorApplicationsResponse,
|
|
1032
|
+
GetVendorApplicationQuery,
|
|
1033
|
+
GetVendorApplicationResponse,
|
|
1032
1034
|
PatchVendorApplicationBody,
|
|
1033
1035
|
PatchVendorApplicationResponse,
|
|
1034
1036
|
PostVendorBody,
|
|
@@ -1172,6 +1174,8 @@ import {
|
|
|
1172
1174
|
DeleteCentricosDiscountsVoucherifyResponse,
|
|
1173
1175
|
GetCentricosDiscountQuery,
|
|
1174
1176
|
GetCentricosDiscountResponse,
|
|
1177
|
+
GetCentricosDiscountAllQuery,
|
|
1178
|
+
GetCentricosDiscountAllResponse,
|
|
1175
1179
|
} from './interface/centricos';
|
|
1176
1180
|
|
|
1177
1181
|
import {
|
|
@@ -11060,6 +11064,28 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
11060
11064
|
);
|
|
11061
11065
|
}
|
|
11062
11066
|
|
|
11067
|
+
/**
|
|
11068
|
+
* GET /vendor/application/{id} - Get a single application by ID
|
|
11069
|
+
*
|
|
11070
|
+
* @param id
|
|
11071
|
+
* @param options - additional request options
|
|
11072
|
+
*/
|
|
11073
|
+
get_vendor_application(
|
|
11074
|
+
id: string,
|
|
11075
|
+
options?: {
|
|
11076
|
+
query?: GetVendorApplicationQuery;
|
|
11077
|
+
} & RequestOptions,
|
|
11078
|
+
): ResponsePromise<GetVendorApplicationResponse> {
|
|
11079
|
+
return this.request(
|
|
11080
|
+
'vendor',
|
|
11081
|
+
'/vendor/application/{id}',
|
|
11082
|
+
'get',
|
|
11083
|
+
`/vendor/application/${id}`,
|
|
11084
|
+
null,
|
|
11085
|
+
options,
|
|
11086
|
+
);
|
|
11087
|
+
}
|
|
11088
|
+
|
|
11063
11089
|
/**
|
|
11064
11090
|
* PATCH /vendor/application/{id} - Update an application (or update status)
|
|
11065
11091
|
*
|
|
@@ -12429,6 +12455,26 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
12429
12455
|
);
|
|
12430
12456
|
}
|
|
12431
12457
|
|
|
12458
|
+
/**
|
|
12459
|
+
* GET /centricos/discount/all - Get all discounts
|
|
12460
|
+
*
|
|
12461
|
+
* @param options - additional request options
|
|
12462
|
+
*/
|
|
12463
|
+
get_centricos_discount_all(
|
|
12464
|
+
options?: {
|
|
12465
|
+
query?: GetCentricosDiscountAllQuery;
|
|
12466
|
+
} & RequestOptions,
|
|
12467
|
+
): ResponsePromise<GetCentricosDiscountAllResponse> {
|
|
12468
|
+
return this.request(
|
|
12469
|
+
'centricos',
|
|
12470
|
+
'/centricos/discount/all',
|
|
12471
|
+
'get',
|
|
12472
|
+
`/centricos/discount/all`,
|
|
12473
|
+
null,
|
|
12474
|
+
options,
|
|
12475
|
+
);
|
|
12476
|
+
}
|
|
12477
|
+
|
|
12432
12478
|
/**
|
|
12433
12479
|
* GET /tax/v1/health-check - Health Check
|
|
12434
12480
|
*
|
|
@@ -334,6 +334,16 @@ export interface GetDiscountResponseDTO {
|
|
|
334
334
|
sites: SiteDTO[];
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
+
export interface DiscountWithSitesDTO {
|
|
338
|
+
discount: DiscountDTO;
|
|
339
|
+
// The sites associated with the discount
|
|
340
|
+
sites: SiteDTO[];
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
export interface GetAllDiscountsResponseDTO {
|
|
344
|
+
discounts: DiscountWithSitesDTO[];
|
|
345
|
+
}
|
|
346
|
+
|
|
337
347
|
// POST /centricos/ai/item/description - Generate item description
|
|
338
348
|
|
|
339
349
|
export type PostCentricosAiItemDescriptionBody = AIItemDescriptionRequest;
|
|
@@ -561,3 +571,12 @@ export interface GetCentricosDiscountQuery {
|
|
|
561
571
|
}
|
|
562
572
|
|
|
563
573
|
export type GetCentricosDiscountResponse = GetDiscountResponseDTO;
|
|
574
|
+
|
|
575
|
+
// GET /centricos/discount/all - Get all discounts
|
|
576
|
+
|
|
577
|
+
export interface GetCentricosDiscountAllQuery {
|
|
578
|
+
// Graphql query string
|
|
579
|
+
_query?: string;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
export type GetCentricosDiscountAllResponse = GetAllDiscountsResponseDTO;
|
package/src/interface/vendor.ts
CHANGED
|
@@ -218,6 +218,24 @@ export interface GetVendorApplicationsRequest
|
|
|
218
218
|
extends BaseRequest,
|
|
219
219
|
RequestQuery<GetVendorApplicationsQuery> {}
|
|
220
220
|
|
|
221
|
+
// GET /vendor/application/{id} - Get a single application by ID
|
|
222
|
+
|
|
223
|
+
export interface GetVendorApplicationPath {
|
|
224
|
+
id: string;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export interface GetVendorApplicationQuery {
|
|
228
|
+
// Graphql query string
|
|
229
|
+
_query?: string;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export type GetVendorApplicationResponse = Application;
|
|
233
|
+
|
|
234
|
+
export interface GetVendorApplicationRequest
|
|
235
|
+
extends BaseRequest,
|
|
236
|
+
RequestQuery<GetVendorApplicationQuery>,
|
|
237
|
+
GetVendorApplicationPath {}
|
|
238
|
+
|
|
221
239
|
// PATCH /vendor/application/{id} - Update an application (or update status)
|
|
222
240
|
|
|
223
241
|
export interface PatchVendorApplicationPath {
|