@compassdigital/sdk.typescript 3.77.1 → 4.1.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.js.map +1 -1
- package/lib/index.d.ts +13 -6
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +11 -2
- package/lib/index.js.map +1 -1
- package/lib/interface/calendar.d.ts +1 -1
- package/lib/interface/delivery.d.ts +2 -2
- package/lib/interface/delivery.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 +3 -3
- package/lib/interface/frictionless.d.ts.map +1 -1
- package/lib/interface/location.d.ts +15 -6
- 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 +6 -5
- package/lib/interface/mealplan.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +498 -406
- 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 +8 -6
- package/lib/interface/order.d.ts.map +1 -1
- package/lib/interface/partner.d.ts +11 -6
- package/lib/interface/partner.d.ts.map +1 -1
- package/lib/interface/partner.js +6 -0
- package/lib/interface/partner.js.map +1 -1
- package/lib/interface/payment.d.ts +23 -18
- package/lib/interface/payment.d.ts.map +1 -1
- package/lib/interface/promo.d.ts +13 -6
- 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 +8 -8
- package/lib/interface/report.d.ts.map +1 -1
- package/lib/interface/shoppingcart.d.ts +14 -9
- 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 +14 -14
- package/lib/interface/task.d.ts.map +1 -1
- package/lib/interface/user.d.ts +16 -21
- package/lib/interface/user.d.ts.map +1 -1
- package/lib/interface/vendor.d.ts +5 -5
- package/lib/interface/vendor.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +26 -5
- package/src/interface/announcement.ts +1 -1
- package/src/interface/calendar.ts +1 -1
- package/src/interface/delivery.ts +15 -2
- package/src/interface/file.ts +1 -1
- package/src/interface/frictionless.ts +3 -3
- package/src/interface/location.ts +16 -8
- package/src/interface/mealplan.ts +8 -6
- package/src/interface/menu.ts +511 -415
- package/src/interface/notification.ts +2 -2
- package/src/interface/order.ts +27 -12
- package/src/interface/partner.ts +10 -6
- package/src/interface/payment.ts +26 -18
- package/src/interface/promo.ts +12 -6
- package/src/interface/report.ts +8 -8
- package/src/interface/shoppingcart.ts +14 -9
- package/src/interface/task.ts +26 -14
- package/src/interface/user.ts +21 -27
- package/src/interface/vendor.ts +5 -5
package/src/interface/user.ts
CHANGED
|
@@ -29,11 +29,11 @@ export interface User {
|
|
|
29
29
|
phone_country_code?: string;
|
|
30
30
|
// realm
|
|
31
31
|
realm?: string;
|
|
32
|
-
gender?:
|
|
32
|
+
gender?: "male" | "female" | "non-binary";
|
|
33
33
|
meta?: {
|
|
34
34
|
marketing_opt_in?: boolean;
|
|
35
35
|
marketing_opt_in_date?: string;
|
|
36
|
-
marketing_opt_in_source?:
|
|
36
|
+
marketing_opt_in_source?: "App" | "Web";
|
|
37
37
|
// Stores notification preference for order status, opt-in/opt-out from receiving order status update notifications
|
|
38
38
|
order_status_notification?: {
|
|
39
39
|
send_emails?: boolean;
|
|
@@ -106,7 +106,7 @@ export interface Changepassword {
|
|
|
106
106
|
|
|
107
107
|
export interface Forgotpassword {
|
|
108
108
|
email: string;
|
|
109
|
-
type?:
|
|
109
|
+
type?: "forgot_password" | "new_user";
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
export interface Resetpassword {
|
|
@@ -230,7 +230,7 @@ export interface Checkin {
|
|
|
230
230
|
user_id?: string;
|
|
231
231
|
date_queued?: string;
|
|
232
232
|
// The state of the user association process (attaching). Present for NFC check-ins only
|
|
233
|
-
state?:
|
|
233
|
+
state?: "new" | "unconfirmed" | "associated" | "failed";
|
|
234
234
|
meta?: CheckinMeta;
|
|
235
235
|
}
|
|
236
236
|
|
|
@@ -238,41 +238,23 @@ export interface PatchCheckin {
|
|
|
238
238
|
// Date when the checkin was put into the queue to be processed.
|
|
239
239
|
date_queued?: number;
|
|
240
240
|
// The state of the user association process (attaching). Present for NFC check-ins only
|
|
241
|
-
state?:
|
|
241
|
+
state?: "new" | "unconfirmed" | "associated" | "failed";
|
|
242
242
|
meta?: CheckinMeta;
|
|
243
243
|
}
|
|
244
244
|
|
|
245
245
|
export interface CheckinMeta {
|
|
246
246
|
order_id?: string;
|
|
247
|
-
status?:
|
|
247
|
+
status?: "processed" | "failed";
|
|
248
248
|
logs?: {
|
|
249
249
|
code?: number;
|
|
250
250
|
date?: string;
|
|
251
251
|
message?: string;
|
|
252
|
-
type?:
|
|
252
|
+
type?: "error" | "log";
|
|
253
253
|
[index: string]: any;
|
|
254
254
|
}[];
|
|
255
255
|
[index: string]: any;
|
|
256
256
|
}
|
|
257
257
|
|
|
258
|
-
export interface postOMS {
|
|
259
|
-
in?: any;
|
|
260
|
-
name?: any;
|
|
261
|
-
required?: any;
|
|
262
|
-
schema?: postOMSBody;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
export interface postOMSBody {
|
|
266
|
-
// OMS code from commpass sso
|
|
267
|
-
code?: string;
|
|
268
|
-
// the oms url for compass
|
|
269
|
-
oms_url?: string;
|
|
270
|
-
// the return uri for compassconnect
|
|
271
|
-
callback_uri?: string;
|
|
272
|
-
// the id of the application for compassconnect
|
|
273
|
-
client_id?: string;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
258
|
export interface RefreshToken {
|
|
277
259
|
refresh_token?: string;
|
|
278
260
|
}
|
|
@@ -358,7 +340,16 @@ export interface PostUserAuthRequest extends BaseRequest {
|
|
|
358
340
|
|
|
359
341
|
// POST /user/oauth - Fetches a jwt token containing a compass token
|
|
360
342
|
|
|
361
|
-
export
|
|
343
|
+
export interface PostUserOauthBody {
|
|
344
|
+
// OMS code from commpass sso
|
|
345
|
+
code?: string;
|
|
346
|
+
// the oms url for compass
|
|
347
|
+
oms_url?: string;
|
|
348
|
+
// the return uri for compassconnect
|
|
349
|
+
callback_uri?: string;
|
|
350
|
+
// the id of the application for compassconnect
|
|
351
|
+
client_id?: string;
|
|
352
|
+
}
|
|
362
353
|
|
|
363
354
|
export type PostUserOauthResponse = omsauth;
|
|
364
355
|
|
|
@@ -790,7 +781,10 @@ export interface PostUserGuestTokenRequest extends BaseRequest {
|
|
|
790
781
|
|
|
791
782
|
// POST /user/looker/embedurl - Create looker embed url
|
|
792
783
|
|
|
793
|
-
export
|
|
784
|
+
export interface PostUserEmbedurlBody {
|
|
785
|
+
// Url to be embedded
|
|
786
|
+
url?: string;
|
|
787
|
+
}
|
|
794
788
|
|
|
795
789
|
export interface PostUserEmbedurlResponse {
|
|
796
790
|
// Embed url
|
package/src/interface/vendor.ts
CHANGED
|
@@ -46,7 +46,7 @@ export interface ApplicationPatchBody {
|
|
|
46
46
|
};
|
|
47
47
|
[index: string]: any;
|
|
48
48
|
};
|
|
49
|
-
status?:
|
|
49
|
+
status?: "pending" | "approved" | "rejected";
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
export interface Application {
|
|
@@ -71,7 +71,7 @@ export interface Application {
|
|
|
71
71
|
vendor_id?: string;
|
|
72
72
|
[index: string]: any;
|
|
73
73
|
};
|
|
74
|
-
status?:
|
|
74
|
+
status?: "pending" | "approved" | "rejected";
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
export interface Applications {
|
|
@@ -146,7 +146,7 @@ export interface Key {
|
|
|
146
146
|
client_password?: string;
|
|
147
147
|
// Date the key becomes expired
|
|
148
148
|
date_expires?: string;
|
|
149
|
-
environment?:
|
|
149
|
+
environment?: "dev" | "staging" | "v1";
|
|
150
150
|
permissions?: string[];
|
|
151
151
|
// Flag identifying if the key is latest
|
|
152
152
|
active?: boolean;
|
|
@@ -158,7 +158,7 @@ export interface KeyPostBody {
|
|
|
158
158
|
vendor_id: string;
|
|
159
159
|
// Date the key becomes expired
|
|
160
160
|
date_expires: string;
|
|
161
|
-
environment:
|
|
161
|
+
environment: "dev" | "staging" | "v1";
|
|
162
162
|
permissions: string[];
|
|
163
163
|
}
|
|
164
164
|
|
|
@@ -211,7 +211,7 @@ export interface PostVendorApplicationRequest extends BaseRequest {
|
|
|
211
211
|
// GET /vendor/application - Get a list of all applications
|
|
212
212
|
|
|
213
213
|
export interface GetVendorApplicationQuery {
|
|
214
|
-
status?:
|
|
214
|
+
status?: "pending" | "approved" | "rejected";
|
|
215
215
|
// Pagination token to start query from
|
|
216
216
|
last_evaluated_key?: string;
|
|
217
217
|
// Graphql query string
|