@compassdigital/sdk.typescript 4.130.0 → 4.132.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/index.d.ts +9 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +10 -0
- package/lib/index.js.map +1 -1
- package/lib/interface/consumer.d.ts +59 -1
- package/lib/interface/consumer.d.ts.map +1 -1
- package/lib/interface/discount.d.ts +34 -11
- package/lib/interface/discount.d.ts.map +1 -1
- package/lib/interface/promo.d.ts +2 -1
- package/lib/interface/promo.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +17 -0
- package/src/interface/consumer.ts +59 -1
- package/src/interface/discount.ts +48 -12
- package/src/interface/promo.ts +2 -1
|
@@ -7,6 +7,7 @@ export interface DiscountStatus {
|
|
|
7
7
|
live?: boolean;
|
|
8
8
|
publishedTo3rdParty?: boolean;
|
|
9
9
|
readyToPublish?: boolean;
|
|
10
|
+
active?: boolean;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
export interface DiscountIs {
|
|
@@ -47,7 +48,7 @@ export interface GetDiscountResponseDTO {
|
|
|
47
48
|
createdAt: string;
|
|
48
49
|
updatedAt: string;
|
|
49
50
|
name: string;
|
|
50
|
-
status
|
|
51
|
+
status: DiscountStatus;
|
|
51
52
|
is?: DiscountIs;
|
|
52
53
|
meta?: DiscountMeta;
|
|
53
54
|
}
|
|
@@ -86,7 +87,7 @@ export interface DiscountDTO {
|
|
|
86
87
|
createdAt: string;
|
|
87
88
|
updatedAt: string;
|
|
88
89
|
name: string;
|
|
89
|
-
status
|
|
90
|
+
status: DiscountStatus;
|
|
90
91
|
is?: DiscountIs;
|
|
91
92
|
meta?: DiscountMeta;
|
|
92
93
|
}
|
|
@@ -106,7 +107,7 @@ export interface DiscountWithSites {
|
|
|
106
107
|
createdAt: string;
|
|
107
108
|
updatedAt: string;
|
|
108
109
|
name: string;
|
|
109
|
-
status
|
|
110
|
+
status: DiscountStatus;
|
|
110
111
|
is?: DiscountIs;
|
|
111
112
|
meta?: DiscountMeta;
|
|
112
113
|
}
|
|
@@ -124,31 +125,32 @@ export interface PostDiscountRequestDTO {
|
|
|
124
125
|
createdBy: string;
|
|
125
126
|
updatedBy?: string;
|
|
126
127
|
name: string;
|
|
127
|
-
status?: DiscountStatus;
|
|
128
128
|
is?: DiscountIs;
|
|
129
129
|
meta?: DiscountMeta;
|
|
130
130
|
taxonomy?: DiscountTaxonomy;
|
|
131
|
+
status?: DiscountStatus;
|
|
131
132
|
}
|
|
132
133
|
|
|
133
134
|
export interface PostDiscountResponseDTO {
|
|
135
|
+
// discount id
|
|
134
136
|
id: string;
|
|
137
|
+
// user id of discount creator
|
|
138
|
+
createdBy: string;
|
|
139
|
+
// user id of most recent update
|
|
140
|
+
updatedBy: string;
|
|
135
141
|
createdAt: string;
|
|
136
142
|
updatedAt: string;
|
|
137
|
-
updatedBy: string;
|
|
138
143
|
name: string;
|
|
139
|
-
status
|
|
144
|
+
status: DiscountStatus;
|
|
140
145
|
is?: DiscountIs;
|
|
141
146
|
meta?: DiscountMeta;
|
|
142
|
-
taxonomy?: DiscountTaxonomy;
|
|
143
|
-
createdBy: string;
|
|
144
147
|
}
|
|
145
148
|
|
|
146
149
|
export interface PutDiscountRequestDTO {
|
|
147
|
-
// user id of most recent update
|
|
148
150
|
updatedBy: string;
|
|
149
151
|
taxonomy?: DiscountTaxonomy;
|
|
150
|
-
name: string;
|
|
151
152
|
status?: DiscountStatus;
|
|
153
|
+
name: string;
|
|
152
154
|
is?: DiscountIs;
|
|
153
155
|
meta?: DiscountMeta;
|
|
154
156
|
}
|
|
@@ -163,7 +165,7 @@ export interface PutDiscountResponseDTO {
|
|
|
163
165
|
createdAt: string;
|
|
164
166
|
updatedAt: string;
|
|
165
167
|
name: string;
|
|
166
|
-
status
|
|
168
|
+
status: DiscountStatus;
|
|
167
169
|
is?: DiscountIs;
|
|
168
170
|
meta?: DiscountMeta;
|
|
169
171
|
}
|
|
@@ -183,7 +185,7 @@ export interface PutDiscountPublishResponseDTO {
|
|
|
183
185
|
createdAt: string;
|
|
184
186
|
updatedAt: string;
|
|
185
187
|
name: string;
|
|
186
|
-
status
|
|
188
|
+
status: DiscountStatus;
|
|
187
189
|
is?: DiscountIs;
|
|
188
190
|
meta?: DiscountMeta;
|
|
189
191
|
}
|
|
@@ -192,6 +194,29 @@ export interface DeleteDiscountResponseDTO {
|
|
|
192
194
|
success: boolean;
|
|
193
195
|
}
|
|
194
196
|
|
|
197
|
+
export interface PatchDiscountRequestDTO {
|
|
198
|
+
updatedBy: string;
|
|
199
|
+
status?: DiscountStatus;
|
|
200
|
+
name?: string;
|
|
201
|
+
is?: DiscountIs;
|
|
202
|
+
meta?: DiscountMeta;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export interface PatchDiscountResponseDTO {
|
|
206
|
+
// discount id
|
|
207
|
+
id: string;
|
|
208
|
+
// user id of discount creator
|
|
209
|
+
createdBy: string;
|
|
210
|
+
// user id of most recent update
|
|
211
|
+
updatedBy: string;
|
|
212
|
+
createdAt: string;
|
|
213
|
+
updatedAt: string;
|
|
214
|
+
name: string;
|
|
215
|
+
status: DiscountStatus;
|
|
216
|
+
is?: DiscountIs;
|
|
217
|
+
meta?: DiscountMeta;
|
|
218
|
+
}
|
|
219
|
+
|
|
195
220
|
// GET /discount/{id} - Get a discount
|
|
196
221
|
|
|
197
222
|
export interface GetDiscountPath {
|
|
@@ -226,6 +251,17 @@ export interface DeleteDiscountPath {
|
|
|
226
251
|
|
|
227
252
|
export type DeleteDiscountResponse = DeleteDiscountResponseDTO;
|
|
228
253
|
|
|
254
|
+
// PATCH /discount/{id} - Patch a discount
|
|
255
|
+
|
|
256
|
+
export interface PatchDiscountPath {
|
|
257
|
+
// Discount ID
|
|
258
|
+
id: string;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export type PatchDiscountBody = PatchDiscountRequestDTO;
|
|
262
|
+
|
|
263
|
+
export type PatchDiscountResponse = PatchDiscountResponseDTO;
|
|
264
|
+
|
|
229
265
|
// GET /discount - Get discounts by taxonomy
|
|
230
266
|
|
|
231
267
|
export interface GetDiscountsQuery {
|
package/src/interface/promo.ts
CHANGED
|
@@ -231,11 +231,12 @@ export interface Voucher {
|
|
|
231
231
|
provider_data?: FPValidationData;
|
|
232
232
|
redeemables?: Redeemable[];
|
|
233
233
|
stacked_vouchers?: Redeemable[];
|
|
234
|
+
inapplicable_redeemables?: Redeemable[];
|
|
234
235
|
[index: string]: any;
|
|
235
236
|
}
|
|
236
237
|
|
|
237
238
|
export interface Redeemable {
|
|
238
|
-
status: 'APPLICABLE';
|
|
239
|
+
status: 'APPLICABLE' | 'INAPPLICABLE';
|
|
239
240
|
// redeemable
|
|
240
241
|
id: string;
|
|
241
242
|
object: 'voucher' | 'promotion_stack' | 'promotion_tier';
|