@compassdigital/sdk.typescript 4.123.0 → 4.124.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/manifest.json CHANGED
@@ -2,147 +2,147 @@
2
2
  "services": [
3
3
  {
4
4
  "name": "payment",
5
- "swagger": "../../platform2/payment/swagger.json"
5
+ "swagger": "../../api/platform2/payment/swagger.json"
6
6
  },
7
7
  {
8
8
  "name": "order",
9
- "swagger": "../../platform2/order/swagger.json"
9
+ "swagger": "../../api/platform2/order/swagger.json"
10
10
  },
11
11
  {
12
12
  "name": "location",
13
- "swagger": "../../platform2/location/swagger.json"
13
+ "swagger": "../../api/platform2/location/swagger.json"
14
14
  },
15
15
  {
16
16
  "name": "shoppingcart",
17
- "swagger": "../../platform2/shoppingcart/swagger.json"
17
+ "swagger": "../../api/platform2/shoppingcart/swagger.json"
18
18
  },
19
19
  {
20
20
  "name": "partner",
21
- "swagger": "../../platform2/partner/swagger.json"
21
+ "swagger": "../../api/platform2/partner/swagger.json"
22
22
  },
23
23
  {
24
24
  "name": "email",
25
- "swagger": "../../platform2/email/swagger.json"
25
+ "swagger": "../../api/platform2/email/swagger.json"
26
26
  },
27
27
  {
28
28
  "name": "task",
29
- "swagger": "../../platform2/task/swagger.json"
29
+ "swagger": "../../api/platform2/task/swagger.json"
30
30
  },
31
31
  {
32
32
  "name": "kds",
33
- "swagger": "../../platform2/kds/swagger.json"
33
+ "swagger": "../../api/platform2/kds/swagger.json"
34
34
  },
35
35
  {
36
36
  "name": "mealplan",
37
- "swagger": "../../platform2/mealplan/swagger.json"
37
+ "swagger": "../../api/platform2/mealplan/swagger.json"
38
38
  },
39
39
  {
40
40
  "name": "datalake",
41
- "swagger": "../../platform2/datalake/swagger.json"
41
+ "swagger": "../../api/platform2/datalake/swagger.json"
42
42
  },
43
43
  {
44
44
  "name": "promo",
45
- "swagger": "../../platform2/promo/swagger.json"
45
+ "swagger": "../../api/platform2/promo/swagger.json"
46
46
  },
47
47
  {
48
48
  "name": "config",
49
- "swagger": "../../platform2/config/swagger.json"
49
+ "swagger": "../../api/platform2/config/swagger.json"
50
50
  },
51
51
  {
52
52
  "name": "announcement",
53
- "swagger": "../../platform2/announcement/swagger.json"
53
+ "swagger": "../../api/platform2/announcement/swagger.json"
54
54
  },
55
55
  {
56
56
  "name": "report",
57
- "swagger": "../../platform2/report/swagger.json"
57
+ "swagger": "../../api/platform2/report/swagger.json"
58
58
  },
59
59
  {
60
60
  "name": "user",
61
- "swagger": "../../platform2/user/swagger.json"
61
+ "swagger": "../../api/platform2/user/swagger.json"
62
62
  },
63
63
  {
64
64
  "name": "calendar",
65
- "swagger": "../../platform2/calendar/swagger.json"
65
+ "swagger": "../../api/platform2/calendar/swagger.json"
66
66
  },
67
67
  {
68
68
  "name": "file",
69
- "swagger": "../../platform2/file/swagger.json"
69
+ "swagger": "../../api/platform2/file/swagger.json"
70
70
  },
71
71
  {
72
72
  "name": "menu",
73
- "swagger": "../../platform2/menu/swagger.json"
73
+ "swagger": "../../api/platform2/menu/swagger.json"
74
74
  },
75
75
  {
76
76
  "name": "notification",
77
- "swagger": "../../platform2/notification/swagger.json"
77
+ "swagger": "../../api/platform2/notification/swagger.json"
78
78
  },
79
79
  {
80
80
  "name": "compassconnect",
81
- "swagger": "../../platform2/compassconnect/swagger.json"
81
+ "swagger": "../../api/platform2/compassconnect/swagger.json"
82
82
  },
83
83
  {
84
84
  "name": "vendor",
85
- "swagger": "../../platform2/vendor/swagger.json"
85
+ "swagger": "../../api/platform2/vendor/swagger.json"
86
86
  },
87
87
  {
88
88
  "name": "frictionless",
89
- "swagger": "../../platform2/frictionless/swagger.json",
89
+ "swagger": "../../api/platform2/frictionless/swagger.json",
90
90
  "options": {
91
91
  "request": false
92
92
  }
93
93
  },
94
94
  {
95
95
  "name": "consumer",
96
- "swagger": "../../platform2/edges/consumer/swagger.json",
96
+ "swagger": "../../api/platform2/edges/consumer/swagger.json",
97
97
  "options": {
98
98
  "request": false
99
99
  }
100
100
  },
101
101
  {
102
102
  "name": "ai",
103
- "swagger": "../../platform2/ai/swagger.json",
103
+ "swagger": "../../api/platform2/ai/swagger.json",
104
104
  "options": {
105
105
  "request": false
106
106
  }
107
107
  },
108
108
  {
109
109
  "name": "centricos",
110
- "swagger": "../../platform2/edges/centricos/swagger.json",
110
+ "swagger": "../../api/platform2/edges/centricos/swagger.json",
111
111
  "options": {
112
112
  "request": false
113
113
  }
114
114
  },
115
115
  {
116
116
  "name": "tax",
117
- "swagger": "../../platform2/external-integrations/tax/swagger.json",
117
+ "swagger": "../../api/platform2/external-integrations/tax/swagger.json",
118
118
  "options": {
119
119
  "request": false
120
120
  }
121
121
  },
122
122
  {
123
123
  "name": "search",
124
- "swagger": "../../platform2/search/swagger.json",
124
+ "swagger": "../../api/platform2/search/swagger.json",
125
125
  "options": {
126
126
  "request": false
127
127
  }
128
128
  },
129
129
  {
130
130
  "name": "auth",
131
- "swagger": "../../platform2/auth/service/swagger.json",
131
+ "swagger": "../../api/platform2/auth/service/swagger.json",
132
132
  "options": {
133
133
  "request": false
134
134
  }
135
135
  },
136
136
  {
137
137
  "name": "review",
138
- "swagger": "../../platform2/review/swagger.json",
138
+ "swagger": "../../api/platform2/review/swagger.json",
139
139
  "options": {
140
140
  "request": false
141
141
  }
142
142
  },
143
143
  {
144
144
  "name": "discount",
145
- "swagger": "../../platform2/discount/swagger.json",
145
+ "swagger": "../../api/platform2/discount/swagger.json",
146
146
  "options": {
147
147
  "request": false
148
148
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compassdigital/sdk.typescript",
3
- "version": "4.123.0",
3
+ "version": "4.124.0",
4
4
  "description": "Compass Digital Labs TypeScript SDK",
5
5
  "type": "commonjs",
6
6
  "main": "./lib/index.js",
@@ -31,7 +31,7 @@
31
31
  "scripts": {
32
32
  "test": "jest",
33
33
  "build": "rimraf ./lib && tsc",
34
- "gen": "npm ci && rimraf ./src && sdk.typescript --events ../../events --manifest ./manifest.json && npm run build",
34
+ "gen": "npm ci && rimraf ./src && sdk.typescript --events ../../api/events --manifest ./manifest.json && npm run build",
35
35
  "prepare": "npm run build",
36
36
  "pretest": "eslint --quiet . --ext .js,.ts",
37
37
  "pre-commit": "lint-staged",
@@ -44,7 +44,7 @@
44
44
  "repository": {
45
45
  "type": "git",
46
46
  "url": "git+https://github.com/compassdigital/cdl.git",
47
- "directory": "api/npm/sdk.typescript"
47
+ "directory": "npm/sdk.typescript"
48
48
  },
49
49
  "dependencies": {
50
50
  "cross-fetch": "^4.0.0"
@@ -56,7 +56,7 @@
56
56
  "@swc/jest": "^0.2.36",
57
57
  "@types/jest": "^29.2.4",
58
58
  "@types/node": "^22.0.0",
59
- "esbuild": "^0.23.0",
59
+ "esbuild": "^0.25.2",
60
60
  "jest": "^29.7.0",
61
61
  "rimraf": "^6.0.1",
62
62
  "typescript": "^5.0.2"
package/src/index.ts CHANGED
@@ -1225,6 +1225,8 @@ import {
1225
1225
  GetDiscountsResponse,
1226
1226
  PostDiscountBody,
1227
1227
  PostDiscountResponse,
1228
+ GetDiscountsAllQuery,
1229
+ GetDiscountsAllResponse,
1228
1230
  PutDiscountPublishBody,
1229
1231
  PutDiscountPublishResponse,
1230
1232
  } from './interface/discount';
@@ -12702,6 +12704,19 @@ export class ServiceClient extends BaseServiceClient {
12702
12704
  return this.request('discount', '/discount', 'post', `/discount`, body, options);
12703
12705
  }
12704
12706
 
12707
+ /**
12708
+ * GET /discount/all - Get all discount
12709
+ *
12710
+ * @param options - additional request options
12711
+ */
12712
+ get_discounts_all(
12713
+ options?: {
12714
+ query?: GetDiscountsAllQuery;
12715
+ } & RequestOptions,
12716
+ ): ResponsePromise<GetDiscountsAllResponse> {
12717
+ return this.request('discount', '/discount/all', 'get', `/discount/all`, null, options);
12718
+ }
12719
+
12705
12720
  /**
12706
12721
  * PUT /discount/{id}/publish - update and publish a discount
12707
12722
  *
@@ -91,6 +91,26 @@ export interface GetDiscountsResponseDTO {
91
91
  discounts: DiscountDTO[];
92
92
  }
93
93
 
94
+ export interface DiscountWithSites {
95
+ // discount id
96
+ id: string;
97
+ // user id of discount creator
98
+ createdBy: string;
99
+ // user id of most recent update
100
+ updatedBy: string;
101
+ sites: string[];
102
+ createdAt: string;
103
+ updatedAt: string;
104
+ name: string;
105
+ status?: DiscountStatus;
106
+ is?: DiscountIs;
107
+ meta?: DiscountMeta;
108
+ }
109
+
110
+ export interface GetAllDiscountsResponseDTO {
111
+ discounts: DiscountWithSites[];
112
+ }
113
+
94
114
  export interface DiscountTaxonomy {
95
115
  site?: string[];
96
116
  brand?: string[];
@@ -218,6 +238,15 @@ export type PostDiscountBody = PostDiscountRequestDTO;
218
238
 
219
239
  export type PostDiscountResponse = PostDiscountResponseDTO;
220
240
 
241
+ // GET /discount/all - Get all discount
242
+
243
+ export interface GetDiscountsAllQuery {
244
+ // Graphql query string
245
+ _query?: string;
246
+ }
247
+
248
+ export type GetDiscountsAllResponse = GetAllDiscountsResponseDTO;
249
+
221
250
  // PUT /discount/{id}/publish - update and publish a discount
222
251
 
223
252
  export interface PutDiscountPublishPath {