@compassdigital/sdk.typescript 4.14.0 → 4.16.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 +1 -11
- package/lib/base.d.ts.map +1 -1
- package/lib/base.js +3 -21
- package/lib/base.js.map +1 -1
- package/lib/index.d.ts +54 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +55 -1
- package/lib/index.js.map +1 -1
- package/lib/interface/ai.d.ts +3 -3
- package/lib/interface/ai.d.ts.map +1 -1
- package/lib/interface/announcement.d.ts +2 -2
- package/lib/interface/announcement.d.ts.map +1 -1
- package/lib/interface/calendar.d.ts +2 -2
- package/lib/interface/calendar.d.ts.map +1 -1
- package/lib/interface/centricos.d.ts +46 -4
- package/lib/interface/centricos.d.ts.map +1 -1
- package/lib/interface/compassconnect.d.ts +1 -1
- package/lib/interface/compassconnect.d.ts.map +1 -1
- package/lib/interface/config.d.ts +3 -5
- package/lib/interface/config.d.ts.map +1 -1
- package/lib/interface/datalake.d.ts +2 -2
- package/lib/interface/datalake.d.ts.map +1 -1
- package/lib/interface/delivery.d.ts +1 -1
- package/lib/interface/delivery.d.ts.map +1 -1
- package/lib/interface/email.d.ts +2 -2
- package/lib/interface/email.d.ts.map +1 -1
- package/lib/interface/file.d.ts +1 -1
- package/lib/interface/file.d.ts.map +1 -1
- package/lib/interface/frictionless.d.ts +26 -7
- package/lib/interface/frictionless.d.ts.map +1 -1
- package/lib/interface/kds.d.ts +1 -1
- package/lib/interface/kds.d.ts.map +1 -1
- package/lib/interface/location.d.ts +27 -16
- package/lib/interface/location.d.ts.map +1 -1
- package/lib/interface/location.js +12 -0
- package/lib/interface/location.js.map +1 -1
- package/lib/interface/mealplan.d.ts +1 -1
- package/lib/interface/mealplan.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +264 -249
- package/lib/interface/menu.d.ts.map +1 -1
- package/lib/interface/menu.js +6 -0
- package/lib/interface/menu.js.map +1 -1
- package/lib/interface/notification.d.ts +2 -2
- package/lib/interface/notification.d.ts.map +1 -1
- package/lib/interface/order.d.ts +3 -3
- package/lib/interface/order.d.ts.map +1 -1
- package/lib/interface/partner.d.ts +51 -19
- package/lib/interface/partner.d.ts.map +1 -1
- package/lib/interface/partner.js +11 -0
- package/lib/interface/partner.js.map +1 -1
- package/lib/interface/payment.d.ts +1 -1
- package/lib/interface/payment.d.ts.map +1 -1
- package/lib/interface/promo.d.ts +12 -5
- package/lib/interface/promo.d.ts.map +1 -1
- package/lib/interface/promo.js +8 -0
- package/lib/interface/promo.js.map +1 -1
- package/lib/interface/report.d.ts +20 -5
- package/lib/interface/report.d.ts.map +1 -1
- package/lib/interface/shoppingcart.d.ts +12 -8
- package/lib/interface/shoppingcart.d.ts.map +1 -1
- package/lib/interface/shoppingcart.js +5 -0
- package/lib/interface/shoppingcart.js.map +1 -1
- package/lib/interface/task.d.ts +19 -11
- package/lib/interface/task.d.ts.map +1 -1
- package/lib/interface/task.js +9 -0
- package/lib/interface/task.js.map +1 -1
- package/lib/interface/user.d.ts +4 -4
- package/lib/interface/user.d.ts.map +1 -1
- package/lib/interface/util.d.ts +19 -0
- package/lib/interface/util.d.ts.map +1 -1
- package/lib/interface/vendor.d.ts +1 -1
- package/lib/interface/vendor.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/base.ts +6 -25
- package/src/index.ts +140 -1
- package/src/interface/ai.ts +3 -3
- package/src/interface/announcement.ts +2 -2
- package/src/interface/calendar.ts +2 -2
- package/src/interface/centricos.ts +76 -4
- package/src/interface/compassconnect.ts +1 -1
- package/src/interface/config.ts +3 -5
- package/src/interface/datalake.ts +2 -2
- package/src/interface/delivery.ts +1 -1
- package/src/interface/email.ts +2 -2
- package/src/interface/file.ts +1 -1
- package/src/interface/frictionless.ts +49 -7
- package/src/interface/kds.ts +1 -1
- package/src/interface/location.ts +26 -16
- package/src/interface/mealplan.ts +1 -1
- package/src/interface/menu.ts +263 -249
- package/src/interface/notification.ts +2 -2
- package/src/interface/order.ts +3 -3
- package/src/interface/partner.ts +53 -19
- package/src/interface/payment.ts +1 -1
- package/src/interface/promo.ts +11 -5
- package/src/interface/report.ts +34 -6
- package/src/interface/shoppingcart.ts +11 -8
- package/src/interface/task.ts +18 -17
- package/src/interface/user.ts +4 -4
- package/src/interface/util.ts +21 -0
- package/src/interface/vendor.ts +1 -1
package/src/base.ts
CHANGED
|
@@ -14,8 +14,6 @@ export interface RequestOptions {
|
|
|
14
14
|
debug?: boolean;
|
|
15
15
|
// the number of times to retry a request
|
|
16
16
|
retry?: number;
|
|
17
|
-
// timeout in milliseconds
|
|
18
|
-
timeout?: number;
|
|
19
17
|
// make requests against this base url.
|
|
20
18
|
// per-service base urls are configured as an object
|
|
21
19
|
// eg. { order: 'http://localhost:3000', shoppingcart: 'http://localhost:4000' }
|
|
@@ -23,6 +21,9 @@ export interface RequestOptions {
|
|
|
23
21
|
base_url?: string | Record<string, string>
|
|
24
22
|
// intercept outgoing http requests
|
|
25
23
|
intercept?: InterceptFn;
|
|
24
|
+
// throw this error value instead of a ServiceError
|
|
25
|
+
// note: the ServiceError will be set as the cause property.
|
|
26
|
+
throws?: any;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
/**
|
|
@@ -114,22 +115,6 @@ export class ResponsePromise<T> implements Promise<T> {
|
|
|
114
115
|
combine(...codes: number[]): Promise<EitherResponse<T>> {
|
|
115
116
|
return new ResponsePromise(ServiceError.combine<T>(codes, this.promise));
|
|
116
117
|
}
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Creates a new resolved promise for the provided value.
|
|
120
|
-
*/
|
|
121
|
-
static resolve<T>(value: T): ResponsePromise<T> {
|
|
122
|
-
return new ResponsePromise(Promise.resolve(value));
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* Creates a new rejected promise for the provided reason.
|
|
127
|
-
* @param reason The reason the promise was rejected.
|
|
128
|
-
* @returns A new rejected Promise.
|
|
129
|
-
*/
|
|
130
|
-
static reject<T = never>(reason?: any): ResponsePromise<T> {
|
|
131
|
-
return new ResponsePromise(Promise.reject(reason));
|
|
132
|
-
}
|
|
133
118
|
}
|
|
134
119
|
|
|
135
120
|
/**
|
|
@@ -352,17 +337,10 @@ export abstract class BaseServiceClient {
|
|
|
352
337
|
return options.intercept(req, this.fetch.bind(this));
|
|
353
338
|
}
|
|
354
339
|
try {
|
|
355
|
-
let signal: AbortSignal | undefined;
|
|
356
|
-
if (options?.timeout) {
|
|
357
|
-
const controller = new AbortController();
|
|
358
|
-
setTimeout(() => controller.abort("timeout"), options.timeout);
|
|
359
|
-
signal = controller.signal;
|
|
360
|
-
}
|
|
361
340
|
const res = await fetch(req.url, {
|
|
362
341
|
method: req.method,
|
|
363
342
|
body: req.body,
|
|
364
343
|
headers: req.headers,
|
|
365
|
-
signal,
|
|
366
344
|
});
|
|
367
345
|
return {
|
|
368
346
|
ok: res.ok,
|
|
@@ -469,6 +447,9 @@ export abstract class BaseServiceClient {
|
|
|
469
447
|
options.retry--;
|
|
470
448
|
return this.request(service, name, method, route, body, options);
|
|
471
449
|
}
|
|
450
|
+
if (options.throws) {
|
|
451
|
+
throw Object.assign(options.throws, { cause: err });
|
|
452
|
+
}
|
|
472
453
|
throw err;
|
|
473
454
|
}
|
|
474
455
|
const data = res.body ? JSON.parse(res.body) : res.body;
|
package/src/index.ts
CHANGED
|
@@ -369,6 +369,9 @@ import {
|
|
|
369
369
|
GetReportEodGroupItemsResponse,
|
|
370
370
|
PutReportGroupConfigBody,
|
|
371
371
|
PutReportGroupConfigResponse,
|
|
372
|
+
GetReportGroupConfigQuery,
|
|
373
|
+
GetReportGroupConfigResponse,
|
|
374
|
+
DeleteReportGroupConfigResponse,
|
|
372
375
|
} from "./interface/report";
|
|
373
376
|
|
|
374
377
|
import {
|
|
@@ -881,6 +884,8 @@ import {
|
|
|
881
884
|
GetFrictionlessUsersPaymentIssuesResponse,
|
|
882
885
|
PostFrictionlessCheckinReprocessPaymentBody,
|
|
883
886
|
PostFrictionlessCheckinReprocessPaymentResponse,
|
|
887
|
+
GetFrictionlessCheckinQuery,
|
|
888
|
+
GetFrictionlessCheckinResponse,
|
|
884
889
|
} from "./interface/frictionless";
|
|
885
890
|
|
|
886
891
|
import {
|
|
@@ -897,6 +902,12 @@ import {
|
|
|
897
902
|
PostCentricosAiItemImageResponse,
|
|
898
903
|
PostCentricosOrdersExportQuery,
|
|
899
904
|
PostCentricosOrdersExportResponse,
|
|
905
|
+
GetCentricosReportGroupConfigQuery,
|
|
906
|
+
GetCentricosReportGroupConfigResponse,
|
|
907
|
+
PutCentricosReportGroupConfigBody,
|
|
908
|
+
PutCentricosReportGroupConfigResponse,
|
|
909
|
+
GetCentricosReportConfigDefaultQuery,
|
|
910
|
+
GetCentricosReportConfigDefaultResponse,
|
|
900
911
|
} from "./interface/centricos";
|
|
901
912
|
|
|
902
913
|
import { BaseServiceClient, RequestOptions, ResponsePromise } from "./base";
|
|
@@ -4167,7 +4178,7 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
4167
4178
|
}
|
|
4168
4179
|
|
|
4169
4180
|
/**
|
|
4170
|
-
* PUT /report/group/{location_group}/config - Update report configuration for a location group
|
|
4181
|
+
* PUT /report/group/{location_group}/config - Update report configuration for a location group. Times are in UTC.
|
|
4171
4182
|
*
|
|
4172
4183
|
* @param location_group
|
|
4173
4184
|
* @param body
|
|
@@ -4188,6 +4199,48 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
4188
4199
|
);
|
|
4189
4200
|
}
|
|
4190
4201
|
|
|
4202
|
+
/**
|
|
4203
|
+
* GET /report/group/{location_group}/config - Get report configuration for a location group. Times are in UTC.
|
|
4204
|
+
*
|
|
4205
|
+
* @param location_group
|
|
4206
|
+
* @param options - additional request options
|
|
4207
|
+
*/
|
|
4208
|
+
get_report_group_config(
|
|
4209
|
+
location_group: string,
|
|
4210
|
+
options?: {
|
|
4211
|
+
query?: GetReportGroupConfigQuery;
|
|
4212
|
+
} & RequestOptions
|
|
4213
|
+
): ResponsePromise<GetReportGroupConfigResponse> {
|
|
4214
|
+
return this.request(
|
|
4215
|
+
"report",
|
|
4216
|
+
"get_report_group_config",
|
|
4217
|
+
"get",
|
|
4218
|
+
`/report/group/${location_group}/config`,
|
|
4219
|
+
null,
|
|
4220
|
+
options
|
|
4221
|
+
);
|
|
4222
|
+
}
|
|
4223
|
+
|
|
4224
|
+
/**
|
|
4225
|
+
* DELETE /report/group/{location_group}/config - Delete report configuration for a location group
|
|
4226
|
+
*
|
|
4227
|
+
* @param location_group
|
|
4228
|
+
* @param options - additional request options
|
|
4229
|
+
*/
|
|
4230
|
+
delete_report_group_config(
|
|
4231
|
+
location_group: string,
|
|
4232
|
+
options?: RequestOptions
|
|
4233
|
+
): ResponsePromise<DeleteReportGroupConfigResponse> {
|
|
4234
|
+
return this.request(
|
|
4235
|
+
"report",
|
|
4236
|
+
"delete_report_group_config",
|
|
4237
|
+
"delete",
|
|
4238
|
+
`/report/group/${location_group}/config`,
|
|
4239
|
+
null,
|
|
4240
|
+
options
|
|
4241
|
+
);
|
|
4242
|
+
}
|
|
4243
|
+
|
|
4191
4244
|
/**
|
|
4192
4245
|
* GET /user/auth - Gets the JWT token for a user
|
|
4193
4246
|
*
|
|
@@ -9069,6 +9122,28 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
9069
9122
|
);
|
|
9070
9123
|
}
|
|
9071
9124
|
|
|
9125
|
+
/**
|
|
9126
|
+
* GET /frictionless/checkin/{id_checkin} - Fetch CheckIn
|
|
9127
|
+
*
|
|
9128
|
+
* @param id_checkin
|
|
9129
|
+
* @param options - additional request options
|
|
9130
|
+
*/
|
|
9131
|
+
get_frictionless_checkin(
|
|
9132
|
+
id_checkin: string,
|
|
9133
|
+
options?: {
|
|
9134
|
+
query?: GetFrictionlessCheckinQuery;
|
|
9135
|
+
} & RequestOptions
|
|
9136
|
+
): ResponsePromise<GetFrictionlessCheckinResponse> {
|
|
9137
|
+
return this.request(
|
|
9138
|
+
"frictionless",
|
|
9139
|
+
"get_frictionless_checkin",
|
|
9140
|
+
"get",
|
|
9141
|
+
`/frictionless/checkin/${id_checkin}`,
|
|
9142
|
+
null,
|
|
9143
|
+
options
|
|
9144
|
+
);
|
|
9145
|
+
}
|
|
9146
|
+
|
|
9072
9147
|
/**
|
|
9073
9148
|
* POST /ai/language/generate - Generate text from a given prompt
|
|
9074
9149
|
*
|
|
@@ -9168,4 +9243,68 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
9168
9243
|
options
|
|
9169
9244
|
);
|
|
9170
9245
|
}
|
|
9246
|
+
|
|
9247
|
+
/**
|
|
9248
|
+
* GET /centricos/report/group/{location_group}/config - Get report configuration for a location group. Times are in UTC.
|
|
9249
|
+
*
|
|
9250
|
+
* @param location_group - TODO: add parameter to swagger.json
|
|
9251
|
+
* @param options - additional request options
|
|
9252
|
+
*/
|
|
9253
|
+
get_centricos_report_group_config(
|
|
9254
|
+
location_group: string,
|
|
9255
|
+
options?: {
|
|
9256
|
+
query?: GetCentricosReportGroupConfigQuery;
|
|
9257
|
+
} & RequestOptions
|
|
9258
|
+
): ResponsePromise<GetCentricosReportGroupConfigResponse> {
|
|
9259
|
+
return this.request(
|
|
9260
|
+
"centricos",
|
|
9261
|
+
"get_centricos_report_group_config",
|
|
9262
|
+
"get",
|
|
9263
|
+
`/centricos/report/group/${location_group}/config`,
|
|
9264
|
+
null,
|
|
9265
|
+
options
|
|
9266
|
+
);
|
|
9267
|
+
}
|
|
9268
|
+
|
|
9269
|
+
/**
|
|
9270
|
+
* PUT /centricos/report/group/{location_group}/config - Update report configuration for a location group. Times are in UTC.
|
|
9271
|
+
*
|
|
9272
|
+
* @param location_group - TODO: add parameter to swagger.json
|
|
9273
|
+
* @param body
|
|
9274
|
+
* @param options - additional request options
|
|
9275
|
+
*/
|
|
9276
|
+
put_centricos_report_group_config(
|
|
9277
|
+
location_group: string,
|
|
9278
|
+
body: PutCentricosReportGroupConfigBody,
|
|
9279
|
+
options?: RequestOptions
|
|
9280
|
+
): ResponsePromise<PutCentricosReportGroupConfigResponse> {
|
|
9281
|
+
return this.request(
|
|
9282
|
+
"centricos",
|
|
9283
|
+
"put_centricos_report_group_config",
|
|
9284
|
+
"put",
|
|
9285
|
+
`/centricos/report/group/${location_group}/config`,
|
|
9286
|
+
body,
|
|
9287
|
+
options
|
|
9288
|
+
);
|
|
9289
|
+
}
|
|
9290
|
+
|
|
9291
|
+
/**
|
|
9292
|
+
* GET /centricos/report/config/default - Get default report configuration. Times are in UTC.
|
|
9293
|
+
*
|
|
9294
|
+
* @param options - additional request options
|
|
9295
|
+
*/
|
|
9296
|
+
get_centricos_report_config_default(
|
|
9297
|
+
options?: {
|
|
9298
|
+
query?: GetCentricosReportConfigDefaultQuery;
|
|
9299
|
+
} & RequestOptions
|
|
9300
|
+
): ResponsePromise<GetCentricosReportConfigDefaultResponse> {
|
|
9301
|
+
return this.request(
|
|
9302
|
+
"centricos",
|
|
9303
|
+
"get_centricos_report_config_default",
|
|
9304
|
+
"get",
|
|
9305
|
+
`/centricos/report/config/default`,
|
|
9306
|
+
null,
|
|
9307
|
+
options
|
|
9308
|
+
);
|
|
9309
|
+
}
|
|
9171
9310
|
}
|
package/src/interface/ai.ts
CHANGED
|
@@ -25,16 +25,16 @@ export interface GenerateTextResponse {
|
|
|
25
25
|
export interface BadRequestErrorDTO {
|
|
26
26
|
message: string;
|
|
27
27
|
code: number;
|
|
28
|
-
data:
|
|
28
|
+
data: any;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
export interface UnauthorizedErrorDTO {
|
|
32
32
|
message: string;
|
|
33
33
|
code: number;
|
|
34
|
-
data:
|
|
34
|
+
data: any;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
export type InternalServerErrorException =
|
|
37
|
+
export type InternalServerErrorException = any;
|
|
38
38
|
|
|
39
39
|
export interface GenerateImageRequest {
|
|
40
40
|
prompt: string;
|
|
@@ -6,7 +6,7 @@ import { RequestQuery, BaseRequest } from "./util";
|
|
|
6
6
|
export interface Error {
|
|
7
7
|
code?: number;
|
|
8
8
|
message?: string;
|
|
9
|
-
data?:
|
|
9
|
+
data?: any;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export interface Success {
|
|
@@ -33,7 +33,7 @@ export interface Announcement {
|
|
|
33
33
|
en?: Announcement_info;
|
|
34
34
|
fr?: Announcement_info;
|
|
35
35
|
};
|
|
36
|
-
date?:
|
|
36
|
+
date?: any;
|
|
37
37
|
[index: string]: any;
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -6,7 +6,7 @@ import { RequestQuery, BaseRequest } from "./util";
|
|
|
6
6
|
export interface Error {
|
|
7
7
|
message?: string;
|
|
8
8
|
code?: number;
|
|
9
|
-
data?:
|
|
9
|
+
data?: any;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export interface Event {
|
|
@@ -150,7 +150,7 @@ export interface GetCalendarCdlPath {
|
|
|
150
150
|
|
|
151
151
|
export interface GetCalendarCdlQuery {
|
|
152
152
|
// Start date in ms to get 7 day calendar from. Defaults now.
|
|
153
|
-
start_date?:
|
|
153
|
+
start_date?: number;
|
|
154
154
|
// Graphql query string
|
|
155
155
|
_query?: string;
|
|
156
156
|
}
|
|
@@ -15,16 +15,16 @@ export interface AIItemDescriptionResponse {
|
|
|
15
15
|
export interface BadRequestErrorDTO {
|
|
16
16
|
message: string;
|
|
17
17
|
code: number;
|
|
18
|
-
data:
|
|
18
|
+
data: any;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export interface UnauthorizedErrorDTO {
|
|
22
22
|
message: string;
|
|
23
23
|
code: number;
|
|
24
|
-
data:
|
|
24
|
+
data: any;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
export type InternalServerErrorException =
|
|
27
|
+
export type InternalServerErrorException = any;
|
|
28
28
|
|
|
29
29
|
export interface AIItemImageRequest {
|
|
30
30
|
name?: string;
|
|
@@ -50,6 +50,29 @@ export interface OrdersExportResponse {
|
|
|
50
50
|
fileName: string;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
export interface DayPart {
|
|
54
|
+
label: string;
|
|
55
|
+
start: string;
|
|
56
|
+
end: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface ReportGroupConfigResponse {
|
|
60
|
+
location_group_id: string;
|
|
61
|
+
day_start: string;
|
|
62
|
+
day_parts: DayPart[];
|
|
63
|
+
is_default: boolean;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface ReportGroupConfigRequest {
|
|
67
|
+
day_start: string;
|
|
68
|
+
day_parts: DayPart[];
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface ReportDefaultConfigResponse {
|
|
72
|
+
day_start: string;
|
|
73
|
+
day_parts: DayPart[];
|
|
74
|
+
}
|
|
75
|
+
|
|
53
76
|
// POST /centricos/ai/item/description - Generate item description
|
|
54
77
|
|
|
55
78
|
export type PostCentricosAiItemDescriptionBody = AIItemDescriptionRequest;
|
|
@@ -90,7 +113,7 @@ export interface PostCentricosOrdersExportQuery {
|
|
|
90
113
|
// Filter orders by payment category
|
|
91
114
|
payment_category?: ("digital wallet" | "badge pay" | "credit card" | "mealplan")[];
|
|
92
115
|
// Search order by refund_status
|
|
93
|
-
refund_status?: ("partial" | "full")[];
|
|
116
|
+
refund_status?: ("partial" | "full" | "")[];
|
|
94
117
|
// Return items sorted by this column
|
|
95
118
|
sortBy?:
|
|
96
119
|
| "date_created"
|
|
@@ -118,3 +141,52 @@ export type PostCentricosOrdersExportResponse = OrdersExportResponse;
|
|
|
118
141
|
export interface PostCentricosOrdersExportRequest
|
|
119
142
|
extends BaseRequest,
|
|
120
143
|
RequestQuery<PostCentricosOrdersExportQuery> {}
|
|
144
|
+
|
|
145
|
+
// GET /centricos/report/group/{location_group}/config - Get report configuration for a location group. Times are in UTC.
|
|
146
|
+
|
|
147
|
+
export interface GetCentricosReportGroupConfigPath {
|
|
148
|
+
// TODO: add parameter to swagger.json
|
|
149
|
+
location_group: string;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export interface GetCentricosReportGroupConfigQuery {
|
|
153
|
+
// Graphql query string
|
|
154
|
+
_query?: string;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export type GetCentricosReportGroupConfigResponse = ReportGroupConfigResponse;
|
|
158
|
+
|
|
159
|
+
export interface GetCentricosReportGroupConfigRequest
|
|
160
|
+
extends BaseRequest,
|
|
161
|
+
RequestQuery<GetCentricosReportGroupConfigQuery>,
|
|
162
|
+
GetCentricosReportGroupConfigPath {}
|
|
163
|
+
|
|
164
|
+
// PUT /centricos/report/group/{location_group}/config - Update report configuration for a location group. Times are in UTC.
|
|
165
|
+
|
|
166
|
+
export interface PutCentricosReportGroupConfigPath {
|
|
167
|
+
// TODO: add parameter to swagger.json
|
|
168
|
+
location_group: string;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export type PutCentricosReportGroupConfigBody = ReportGroupConfigRequest;
|
|
172
|
+
|
|
173
|
+
export type PutCentricosReportGroupConfigResponse = ReportGroupConfigResponse;
|
|
174
|
+
|
|
175
|
+
export interface PutCentricosReportGroupConfigRequest
|
|
176
|
+
extends BaseRequest,
|
|
177
|
+
PutCentricosReportGroupConfigPath {
|
|
178
|
+
body: PutCentricosReportGroupConfigBody;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// GET /centricos/report/config/default - Get default report configuration. Times are in UTC.
|
|
182
|
+
|
|
183
|
+
export interface GetCentricosReportConfigDefaultQuery {
|
|
184
|
+
// Graphql query string
|
|
185
|
+
_query?: string;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export type GetCentricosReportConfigDefaultResponse = ReportDefaultConfigResponse;
|
|
189
|
+
|
|
190
|
+
export interface GetCentricosReportConfigDefaultRequest
|
|
191
|
+
extends BaseRequest,
|
|
192
|
+
RequestQuery<GetCentricosReportConfigDefaultQuery> {}
|
package/src/interface/config.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import { RequestQuery, BaseRequest } from "./util";
|
|
5
5
|
|
|
6
|
-
export type CreateConfig =
|
|
6
|
+
export type CreateConfig = any;
|
|
7
7
|
|
|
8
8
|
export interface Config {
|
|
9
9
|
[index: string]: any;
|
|
@@ -12,7 +12,7 @@ export interface Config {
|
|
|
12
12
|
export interface Error {
|
|
13
13
|
error?: string;
|
|
14
14
|
code?: number;
|
|
15
|
-
data?:
|
|
15
|
+
data?: any;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export interface Success {
|
|
@@ -91,9 +91,7 @@ export interface PrivateConfig {
|
|
|
91
91
|
}[];
|
|
92
92
|
};
|
|
93
93
|
mealplan?: PrivateMealplanConfig[];
|
|
94
|
-
keystore?:
|
|
95
|
-
schema?: Keystore;
|
|
96
|
-
};
|
|
94
|
+
keystore?: Keystore;
|
|
97
95
|
[index: string]: any;
|
|
98
96
|
}
|
|
99
97
|
|
|
@@ -6,7 +6,7 @@ import { RequestQuery, BaseRequest } from "./util";
|
|
|
6
6
|
export interface Error {
|
|
7
7
|
error?: string;
|
|
8
8
|
code?: number;
|
|
9
|
-
data?:
|
|
9
|
+
data?: any;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export interface QueryBody {
|
|
@@ -34,7 +34,7 @@ export interface GetDatalakeSwaggerQuery {
|
|
|
34
34
|
_query?: string;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
export type GetDatalakeSwaggerResponse =
|
|
37
|
+
export type GetDatalakeSwaggerResponse = any;
|
|
38
38
|
|
|
39
39
|
export interface GetDatalakeSwaggerRequest
|
|
40
40
|
extends BaseRequest,
|
package/src/interface/email.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { RequestQuery, BaseRequest } from "./util";
|
|
|
6
6
|
export interface Error {
|
|
7
7
|
message?: string;
|
|
8
8
|
code?: number;
|
|
9
|
-
data?:
|
|
9
|
+
data?: any;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export interface Success {
|
|
@@ -20,7 +20,7 @@ export interface EmailPayload {
|
|
|
20
20
|
// Text of an email instead of template_id/data
|
|
21
21
|
text?: string;
|
|
22
22
|
template_id?: string;
|
|
23
|
-
data?:
|
|
23
|
+
data?: any;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
// POST /email - Send an email
|
package/src/interface/file.ts
CHANGED
|
@@ -12,8 +12,11 @@ export interface StandardCognitionEvent {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export interface AmazonJWOAuthEventDTO {
|
|
15
|
+
// Value that uniquely identifies each authorization event that occurs when a shopper interacts with a JWO gate
|
|
15
16
|
id: string;
|
|
17
|
+
// Contains the timestamp when the authorization event took place
|
|
16
18
|
timestamp: string;
|
|
19
|
+
// Contains an enumerated string that tells the system where the authorization event took place. Current values are ENTRY for the JWO Entry Gate and EXIT for the Exit Gate
|
|
17
20
|
location: "ENTRY" | "EXIT";
|
|
18
21
|
}
|
|
19
22
|
|
|
@@ -36,39 +39,49 @@ export interface AmazonJWOIdentityKeysResponseDTO {
|
|
|
36
39
|
export interface BadRequestErrorDTO {
|
|
37
40
|
message: string;
|
|
38
41
|
code: number;
|
|
39
|
-
data:
|
|
42
|
+
data: any;
|
|
40
43
|
}
|
|
41
44
|
|
|
42
45
|
export interface UnauthorizedErrorDTO {
|
|
43
46
|
message: string;
|
|
44
47
|
code: number;
|
|
45
|
-
data:
|
|
48
|
+
data: any;
|
|
46
49
|
}
|
|
47
50
|
|
|
48
51
|
export interface ShoppingTrip {
|
|
52
|
+
// Contains a timestamp for the time the shopping trip starts. This value is not validated on our service.
|
|
49
53
|
startTime: string;
|
|
54
|
+
// Contains a timestamp for the time the shopping trip ends. This value is not validated on our service.
|
|
50
55
|
endTime: string;
|
|
51
56
|
authEvents: AmazonJWOAuthEventDTO[];
|
|
52
57
|
}
|
|
53
58
|
|
|
54
59
|
export interface Quantity {
|
|
60
|
+
// Contains the number of each item the shopper purchased
|
|
55
61
|
value: string;
|
|
56
|
-
|
|
62
|
+
// Contains the type of unique identifier your store uses to identify each item in the cart
|
|
63
|
+
unit: "unit" | "each";
|
|
57
64
|
}
|
|
58
65
|
|
|
59
66
|
export interface CartItem {
|
|
67
|
+
// Contain a unique identifier for the item in the cart. This identifier will be an SKU for Compass
|
|
60
68
|
id: string;
|
|
61
|
-
type
|
|
69
|
+
// Contains the type of unique identifier the store uses to identify each item in the cart. This field will be always SKU for Compass
|
|
70
|
+
type: "SKU";
|
|
62
71
|
quantity: Quantity;
|
|
63
72
|
}
|
|
64
73
|
|
|
65
74
|
export interface ShopperIdentity {
|
|
75
|
+
// Contains a unique identifier for each shopper AWS sends back. Refers to our CheckIn ID.
|
|
66
76
|
id: string;
|
|
67
77
|
}
|
|
68
78
|
|
|
69
79
|
export interface AmazonJWOOrderingRequestDTO {
|
|
80
|
+
// Contains a UUID for each checkout request. Amazon generates this UUID for each request. If Amazon has to send the same request more than once, the requestId will be different for each request. Compare the requestId to the idempotentShoppingTripId field, which remains the same throughout the shopping trip.
|
|
70
81
|
requestId: string;
|
|
82
|
+
// Contains a Universally Unique ID (UUID) for the current shopping trip. Amazon generates this UUID for each shopping trip
|
|
71
83
|
idempotentShoppingTripId: string;
|
|
84
|
+
// The storeId field contains a unique identifier for your store on AWS system
|
|
72
85
|
storeId: string;
|
|
73
86
|
shoppingTrip: ShoppingTrip;
|
|
74
87
|
cartItems: CartItem[];
|
|
@@ -87,13 +100,13 @@ export interface FrictionlessSupportResponse {
|
|
|
87
100
|
export interface ForbiddenErrorDTO {
|
|
88
101
|
message: string;
|
|
89
102
|
code: number;
|
|
90
|
-
data:
|
|
103
|
+
data: any;
|
|
91
104
|
}
|
|
92
105
|
|
|
93
106
|
export interface NotFoundErrorDTO {
|
|
94
107
|
message: string;
|
|
95
108
|
code: number;
|
|
96
|
-
data:
|
|
109
|
+
data: any;
|
|
97
110
|
}
|
|
98
111
|
|
|
99
112
|
export interface MealplanDTO {
|
|
@@ -164,6 +177,17 @@ export interface CheckInPaymentRequiredDTO {
|
|
|
164
177
|
id: string;
|
|
165
178
|
}
|
|
166
179
|
|
|
180
|
+
export interface GetCheckinResponseDTO {
|
|
181
|
+
id: string;
|
|
182
|
+
provider: string;
|
|
183
|
+
status: string;
|
|
184
|
+
reasonOfFail?: string;
|
|
185
|
+
thirdPartyCorrelatedID?: string;
|
|
186
|
+
shoppingCartID?: string;
|
|
187
|
+
brandID: string;
|
|
188
|
+
userID: string;
|
|
189
|
+
}
|
|
190
|
+
|
|
167
191
|
// POST /frictionless/webhook/standardcognition - Receive frictionless standard cognition events
|
|
168
192
|
|
|
169
193
|
export type PostFrictionlessWebhookStandardcognitionBody = StandardCognitionEvent;
|
|
@@ -221,7 +245,7 @@ export interface GetFrictionlessBrandFrictionlessStatusRequest
|
|
|
221
245
|
|
|
222
246
|
export type PostFrictionlessQrCodeBody = CreateFrictionlessQRCodeCommand;
|
|
223
247
|
|
|
224
|
-
export type PostFrictionlessQrCodeResponse =
|
|
248
|
+
export type PostFrictionlessQrCodeResponse = {};
|
|
225
249
|
|
|
226
250
|
export interface PostFrictionlessQrCodeRequest extends BaseRequest {
|
|
227
251
|
body: PostFrictionlessQrCodeBody;
|
|
@@ -303,3 +327,21 @@ export interface PostFrictionlessCheckinReprocessPaymentRequest
|
|
|
303
327
|
PostFrictionlessCheckinReprocessPaymentPath {
|
|
304
328
|
body: PostFrictionlessCheckinReprocessPaymentBody;
|
|
305
329
|
}
|
|
330
|
+
|
|
331
|
+
// GET /frictionless/checkin/{id_checkin} - Fetch CheckIn
|
|
332
|
+
|
|
333
|
+
export interface GetFrictionlessCheckinPath {
|
|
334
|
+
id_checkin: string;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
export interface GetFrictionlessCheckinQuery {
|
|
338
|
+
// Graphql query string
|
|
339
|
+
_query?: string;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export type GetFrictionlessCheckinResponse = GetCheckinResponseDTO;
|
|
343
|
+
|
|
344
|
+
export interface GetFrictionlessCheckinRequest
|
|
345
|
+
extends BaseRequest,
|
|
346
|
+
RequestQuery<GetFrictionlessCheckinQuery>,
|
|
347
|
+
GetFrictionlessCheckinPath {}
|