@compassdigital/sdk.typescript 4.26.0 → 4.28.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.
Files changed (43) hide show
  1. package/.vscode/settings.json +5 -0
  2. package/lib/index.d.ts +63 -37
  3. package/lib/index.d.ts.map +1 -1
  4. package/lib/index.js +61 -36
  5. package/lib/index.js.map +1 -1
  6. package/lib/interface/consumer.d.ts +76 -0
  7. package/lib/interface/consumer.d.ts.map +1 -0
  8. package/lib/interface/consumer.js +5 -0
  9. package/lib/interface/consumer.js.map +1 -0
  10. package/lib/interface/frictionless.d.ts +107 -107
  11. package/lib/interface/frictionless.d.ts.map +1 -1
  12. package/lib/interface/location.d.ts +12 -13
  13. package/lib/interface/location.d.ts.map +1 -1
  14. package/lib/interface/mealplan.d.ts +0 -4
  15. package/lib/interface/mealplan.d.ts.map +1 -1
  16. package/lib/interface/menu.d.ts +16 -15
  17. package/lib/interface/menu.d.ts.map +1 -1
  18. package/lib/interface/order.d.ts +3 -1
  19. package/lib/interface/order.d.ts.map +1 -1
  20. package/lib/interface/partner.d.ts +5 -3
  21. package/lib/interface/partner.d.ts.map +1 -1
  22. package/lib/interface/promo.d.ts +10 -3
  23. package/lib/interface/promo.d.ts.map +1 -1
  24. package/lib/interface/task.d.ts +3 -0
  25. package/lib/interface/task.d.ts.map +1 -1
  26. package/lib/interface/user.d.ts +14 -12
  27. package/lib/interface/user.d.ts.map +1 -1
  28. package/lib/interface/vendor.d.ts.map +1 -1
  29. package/manifest.json +5 -1
  30. package/package.json +3 -3
  31. package/pipeline.yml +1 -1
  32. package/src/index.ts +168 -97
  33. package/src/interface/consumer.ts +105 -0
  34. package/src/interface/frictionless.ts +200 -158
  35. package/src/interface/location.ts +18 -16
  36. package/src/interface/mealplan.ts +1 -9
  37. package/src/interface/menu.ts +21 -15
  38. package/src/interface/order.ts +12 -1
  39. package/src/interface/partner.ts +14 -3
  40. package/src/interface/promo.ts +10 -3
  41. package/src/interface/task.ts +4 -0
  42. package/src/interface/user.ts +20 -14
  43. package/src/interface/vendor.ts +0 -1
@@ -3,43 +3,11 @@
3
3
 
4
4
  import { RequestQuery, BaseRequest } from "./util";
5
5
 
6
- export interface StandardCognitionEvent {
7
- event_id: string;
8
- event_type: string;
9
- external_customer_id: string;
10
- tenant_id: string;
11
- order_id: string;
12
- }
13
-
14
- export interface AmazonJWOAuthEventDTO {
15
- // Value that uniquely identifies each authorization event that occurs when a shopper interacts with a JWO gate
16
- id: string;
17
- // Contains the timestamp when the authorization event took place
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
20
- location: "ENTRY" | "EXIT";
21
- }
22
-
23
- export interface AmazonJWOIdentityKeysRequestDTO {
24
- authEvent: AmazonJWOAuthEventDTO;
25
- identityKey: string;
26
- requestId: string;
27
- storeId: string;
28
- }
29
-
30
- export interface VisitorDetailsDTO {
31
- id: string;
32
- type: "SHOPPER" | "ASSOCIATE" | "CASH_SHOPPER";
33
- }
34
-
35
- export interface AmazonJWOIdentityKeysResponseDTO {
36
- visitorDetails: VisitorDetailsDTO;
37
- }
38
-
39
- export interface BadRequestErrorDTO {
40
- message: string;
41
- code: number;
42
- data: Record<string, any>;
6
+ export interface FrictionlessSupportResponseDTO {
7
+ // Whether the brand supports frictionless checkins
8
+ supported: boolean;
9
+ // The version of the frictionless support
10
+ version?: "NFC" | "QR";
43
11
  }
44
12
 
45
13
  export interface UnauthorizedErrorDTO {
@@ -48,55 +16,6 @@ export interface UnauthorizedErrorDTO {
48
16
  data: Record<string, any>;
49
17
  }
50
18
 
51
- export interface ShoppingTrip {
52
- // Contains a timestamp for the time the shopping trip starts. This value is not validated on our service.
53
- startTime: string;
54
- // Contains a timestamp for the time the shopping trip ends. This value is not validated on our service.
55
- endTime: string;
56
- authEvents: AmazonJWOAuthEventDTO[];
57
- }
58
-
59
- export interface Quantity {
60
- // Contains the number of each item the shopper purchased
61
- value: string;
62
- // Contains the type of unique identifier your store uses to identify each item in the cart
63
- unit: "unit" | "each";
64
- }
65
-
66
- export interface CartItem {
67
- // Contain a unique identifier for the item in the cart. This identifier will be an SKU for Compass
68
- id: string;
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";
71
- quantity: Quantity;
72
- }
73
-
74
- export interface ShopperIdentity {
75
- // Contains a unique identifier for each shopper AWS sends back. Refers to our CheckIn ID.
76
- id: string;
77
- }
78
-
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.
81
- requestId: string;
82
- // Contains a Universally Unique ID (UUID) for the current shopping trip. Amazon generates this UUID for each shopping trip
83
- idempotentShoppingTripId: string;
84
- // The storeId field contains a unique identifier for your store on AWS system
85
- storeId: string;
86
- shoppingTrip: ShoppingTrip;
87
- cartItems: CartItem[];
88
- shopperIdentity: ShopperIdentity;
89
- }
90
-
91
- export interface AmazonJWOOrderingResponseDTO {
92
- purchaseId: string;
93
- }
94
-
95
- export interface FrictionlessSupportResponse {
96
- supported: boolean;
97
- version?: "NFC" | "QR";
98
- }
99
-
100
19
  export interface ForbiddenErrorDTO {
101
20
  message: string;
102
21
  code: number;
@@ -110,30 +29,40 @@ export interface NotFoundErrorDTO {
110
29
  }
111
30
 
112
31
  export interface MealplanDTO {
32
+ // The unique identifier of the mealplan tender
113
33
  tenderID: string;
34
+ // The name of the mealplan
114
35
  name: string;
115
36
  }
116
37
 
117
38
  export interface CreditCardDTO {
39
+ // The CreditCard Type. This field is not validated. It is used to enrich checkin metadata
118
40
  cardType: string;
41
+ // The last 4 digits of the credit card
119
42
  last4: string;
120
43
  }
121
44
 
122
45
  export interface PaymentMethodDTO {
123
46
  mealplan?: MealplanDTO;
124
47
  creditCard?: CreditCardDTO;
48
+ // Token used for identify the payment method
125
49
  token: string;
126
50
  }
127
51
 
128
- export interface CreateFrictionlessQRCodeCommand {
52
+ export interface CreateFrictionlessQRCodeCommandDTO {
53
+ // The unique identifier of the brand that the checkin should be created with
129
54
  brandID: string;
55
+ // The unique identifier of the user that the checkin should be created with
130
56
  userID: string;
131
57
  paymentMethod: PaymentMethodDTO;
132
58
  }
133
59
 
134
- export interface QRCodeCreationResponse {
60
+ export interface QRCodeCreationResponseDTO {
61
+ // The base64 encoded QR code
135
62
  qrcode: string;
63
+ // The expiration time of the QR code in unix time. Always in future.
136
64
  expiration: number;
65
+ // The unique identifier for the checkin created for this QR code
137
66
  id: string;
138
67
  }
139
68
 
@@ -155,14 +84,8 @@ export interface UnprocessableEntityErrorDTO {
155
84
  data: ErrorDataDTO;
156
85
  }
157
86
 
158
- export interface FailedCheckInDTO {
159
- id: string;
160
- shopperID: string;
161
- brandID: string;
162
- reason: string;
163
- }
164
-
165
87
  export interface GetCheckInStatusResponseDTO {
88
+ // The status of the checkin
166
89
  status:
167
90
  | "CREATING"
168
91
  | "ACTIVE"
@@ -173,53 +96,138 @@ export interface GetCheckInStatusResponseDTO {
173
96
  | "COMPLETED";
174
97
  }
175
98
 
176
- export interface CheckInPaymentRequiredDTO {
177
- id: string;
178
- }
179
-
180
99
  export interface GetCheckinResponseDTO {
100
+ // The unique identifier for this checkin
181
101
  id: string;
182
- provider: string;
183
- status: string;
102
+ // The third-party provider that the checkin was created on. The value varies based on the technology installed in the station.
103
+ provider: "AWS" | "SC";
104
+ // The status of the checkin
105
+ status:
106
+ | "CREATING"
107
+ | "ACTIVE"
108
+ | "ERROR"
109
+ | "CANCELED"
110
+ | "PROCESSING"
111
+ | "UPDATE_PAYMENT_REQUIRED"
112
+ | "COMPLETED";
113
+ // The reason why the checkin failed. This field is only present when the status is 'FAILED'
184
114
  reasonOfFail?: string;
115
+ // The ID of the checkin that was created in the third-party system. They might call this entity with other terminology
185
116
  thirdPartyCorrelatedID?: string;
117
+ // The shopping cart ID for this checkin. This field is only present if the checkin was processed or is being processed but the shopping cart was already created.
186
118
  shoppingCartID?: string;
119
+ // The unique identifier of the brand that the checkin was created on
187
120
  brandID: string;
121
+ // The unique identifier of the user that created the checkin
188
122
  userID: string;
189
123
  }
190
124
 
191
- // POST /frictionless/webhook/standardcognition - Receive frictionless standard cognition events
125
+ export interface CheckInPaymentRequiredDTO {
126
+ // The unique identifier for this checkin
127
+ id: string;
128
+ }
192
129
 
193
- export type PostFrictionlessWebhookStandardcognitionBody = StandardCognitionEvent;
130
+ export interface FailedCheckInDTO {
131
+ // The unique identifier for this checkin
132
+ id: string;
133
+ // The unique identifier of the user that created the checkin
134
+ shopperID: string;
135
+ // The unique identifier of the brand that the checkin was created on
136
+ brandID: string;
137
+ // The reason why the checkin failed
138
+ reason: string;
139
+ }
194
140
 
195
- export type PostFrictionlessWebhookStandardcognitionResponse = {};
141
+ export interface AmazonJWOAuthEventDTO {
142
+ // Value that uniquely identifies each authorization event that occurs when a shopper interacts with a JWO gate
143
+ id: string;
144
+ // Contains the timestamp when the authorization event took place
145
+ timestamp: string;
146
+ // 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
147
+ location: "ENTRY" | "EXIT";
148
+ }
196
149
 
197
- export interface PostFrictionlessWebhookStandardcognitionRequest extends BaseRequest {
198
- body: PostFrictionlessWebhookStandardcognitionBody;
150
+ export interface AmazonJWOIdentityKeysRequestDTO {
151
+ authEvent: AmazonJWOAuthEventDTO;
152
+ // The Payload of the QR Code generated for the shopper to scan. Amazon calls this "Identity Key"
153
+ identityKey: string;
154
+ // The unique identifier for this request.
155
+ requestId: string;
156
+ // The unique identifier for the store that the shopper is interacting with on Amazon System
157
+ storeId: string;
199
158
  }
200
159
 
201
- // POST /frictionless/amazon-jwo-connector/v1/identity/identity-keys - Amazon JWO Identity Key Connector
160
+ export interface VisitorDetailsDTO {
161
+ // The unique identifier for this visitor on AWS System. Coincides with our Checkin ID
162
+ id: string;
163
+ type: "SHOPPER" | "ASSOCIATE" | "CASH_SHOPPER";
164
+ }
202
165
 
203
- export type PostFrictionlessAmazonJwoConnectorV1IdentityIdentityKeysBody =
204
- AmazonJWOIdentityKeysRequestDTO;
166
+ export interface AmazonJWOIdentityKeysResponseDTO {
167
+ visitorDetails: VisitorDetailsDTO;
168
+ }
205
169
 
206
- export type PostFrictionlessAmazonJwoConnectorV1IdentityIdentityKeysResponse =
207
- AmazonJWOIdentityKeysResponseDTO;
170
+ export interface BadRequestErrorDTO {
171
+ message: string;
172
+ code: number;
173
+ data: Record<string, any>;
174
+ }
208
175
 
209
- export interface PostFrictionlessAmazonJwoConnectorV1IdentityIdentityKeysRequest
210
- extends BaseRequest {
211
- body: PostFrictionlessAmazonJwoConnectorV1IdentityIdentityKeysBody;
176
+ export interface ShoppingTrip {
177
+ // Contains a timestamp for the time the shopping trip starts. This value is not validated on our service.
178
+ startTime: string;
179
+ // Contains a timestamp for the time the shopping trip ends. This value is not validated on our service.
180
+ endTime: string;
181
+ authEvents: AmazonJWOAuthEventDTO[];
212
182
  }
213
183
 
214
- // POST /frictionless/amazon-jwo-connector/v1/order/purchases - Amazon JWO Ordering Connector
184
+ export interface QuantityDTO {
185
+ // Contains the number of each item the shopper purchased
186
+ value: string;
187
+ // Contains the type of unique identifier your store uses to identify each item in the cart
188
+ unit: "unit" | "each";
189
+ }
215
190
 
216
- export type PostFrictionlessAmazonJwoConnectorV1OrderPurchasesBody = AmazonJWOOrderingRequestDTO;
191
+ export interface CartItemDTO {
192
+ // Contain a unique identifier for the item in the cart. This identifier will be an SKU for Compass
193
+ id: string;
194
+ // Contains the type of unique identifier the store uses to identify each item in the cart. This field will be always SKU for Compass
195
+ type: "SKU";
196
+ quantity: QuantityDTO;
197
+ }
217
198
 
218
- export type PostFrictionlessAmazonJwoConnectorV1OrderPurchasesResponse =
219
- AmazonJWOOrderingResponseDTO;
199
+ export interface ShopperIdentity {
200
+ // Contains a unique identifier for each shopper AWS sends back. Refers to our CheckIn ID.
201
+ id: string;
202
+ }
220
203
 
221
- export interface PostFrictionlessAmazonJwoConnectorV1OrderPurchasesRequest extends BaseRequest {
222
- body: PostFrictionlessAmazonJwoConnectorV1OrderPurchasesBody;
204
+ export interface AmazonJWOOrderingRequestDTO {
205
+ // 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.
206
+ requestId: string;
207
+ // Contains a Universally Unique ID (UUID) for the current shopping trip. Amazon generates this UUID for each shopping trip
208
+ idempotentShoppingTripId: string;
209
+ // The storeId field contains a unique identifier for your store on AWS system
210
+ storeId: string;
211
+ shoppingTrip: ShoppingTrip;
212
+ cartItems: CartItemDTO[];
213
+ shopperIdentity: ShopperIdentity;
214
+ }
215
+
216
+ export interface AmazonJWOOrderingResponseDTO {
217
+ purchaseId: string;
218
+ }
219
+
220
+ export interface StandardCognitionEventDTO {
221
+ // Value that uniquely identifies each event that occurs in Standard Cognition's system
222
+ event_id: string;
223
+ // Contains an enumerated string that tells the system what type of event took place. Current values are external-customer-order-created for when a new order is created and external-customer-order-state-changed for when an order changes state
224
+ event_type: "external-customer-order-created" | "external-customer-order-state-changed";
225
+ // Value that uniquely identifies each customer in Standard Cognition's system. Coincides with our Checkin ID
226
+ external_customer_id: string;
227
+ // Value that uniquely identifies each store in Standard Cognition's system
228
+ tenant_id: string;
229
+ // Value that uniquely identifies each order in Standard Cognition's system
230
+ order_id: string;
223
231
  }
224
232
 
225
233
  // GET /frictionless/brand/{id_brand}/frictionless-status - Check frictionless support of a given brand
@@ -234,7 +242,7 @@ export interface GetFrictionlessBrandFrictionlessStatusQuery {
234
242
  _query?: string;
235
243
  }
236
244
 
237
- export type GetFrictionlessBrandFrictionlessStatusResponse = FrictionlessSupportResponse;
245
+ export type GetFrictionlessBrandFrictionlessStatusResponse = FrictionlessSupportResponseDTO;
238
246
 
239
247
  export interface GetFrictionlessBrandFrictionlessStatusRequest
240
248
  extends BaseRequest,
@@ -243,56 +251,49 @@ export interface GetFrictionlessBrandFrictionlessStatusRequest
243
251
 
244
252
  // POST /frictionless/qrcode - Create Frictionless QR Code to make user able to check in
245
253
 
246
- export type PostFrictionlessQrCodeBody = CreateFrictionlessQRCodeCommand;
254
+ export type PostFrictionlessQrCodeBody = CreateFrictionlessQRCodeCommandDTO;
247
255
 
248
- export type PostFrictionlessQrCodeResponse = QRCodeCreationResponse;
256
+ export type PostFrictionlessQrCodeResponse = QRCodeCreationResponseDTO;
249
257
 
250
258
  export interface PostFrictionlessQrCodeRequest extends BaseRequest {
251
259
  body: PostFrictionlessQrCodeBody;
252
260
  }
253
261
 
254
- // GET /frictionless/failed-checkins - List check-ins on error
262
+ // GET /frictionless/checkin/{id_checkin}/status - Fetch CheckIn Status
255
263
 
256
- export interface GetFrictionlessFailedCheckinsQuery {
257
- // Graphql query string
258
- _query?: string;
264
+ export interface GetFrictionlessCheckinStatusPath {
265
+ id_checkin: string;
259
266
  }
260
267
 
261
- export type GetFrictionlessFailedCheckinsResponse = FailedCheckInDTO[];
262
-
263
- export interface GetFrictionlessFailedCheckinsRequest
264
- extends BaseRequest,
265
- RequestQuery<GetFrictionlessFailedCheckinsQuery> {}
266
-
267
- // POST /frictionless/checkins/{id_checkin}/reprocess - Reprocess checkin on error
268
-
269
- export interface PostFrictionlessCheckinsReprocessPath {
270
- id_checkin: string;
268
+ export interface GetFrictionlessCheckinStatusQuery {
269
+ // Graphql query string
270
+ _query?: string;
271
271
  }
272
272
 
273
- export type PostFrictionlessCheckinsReprocessResponse = {};
273
+ export type GetFrictionlessCheckinStatusResponse = GetCheckInStatusResponseDTO;
274
274
 
275
- export interface PostFrictionlessCheckinsReprocessRequest
275
+ export interface GetFrictionlessCheckinStatusRequest
276
276
  extends BaseRequest,
277
- PostFrictionlessCheckinsReprocessPath {}
277
+ RequestQuery<GetFrictionlessCheckinStatusQuery>,
278
+ GetFrictionlessCheckinStatusPath {}
278
279
 
279
- // GET /frictionless/checkin/{id_checkin}/status - Fetch CheckIn Status
280
+ // GET /frictionless/checkin/{id_checkin} - Fetch CheckIn
280
281
 
281
- export interface GetFrictionlessCheckinStatusPath {
282
+ export interface GetFrictionlessCheckinPath {
282
283
  id_checkin: string;
283
284
  }
284
285
 
285
- export interface GetFrictionlessCheckinStatusQuery {
286
+ export interface GetFrictionlessCheckinQuery {
286
287
  // Graphql query string
287
288
  _query?: string;
288
289
  }
289
290
 
290
- export type GetFrictionlessCheckinStatusResponse = GetCheckInStatusResponseDTO;
291
+ export type GetFrictionlessCheckinResponse = GetCheckinResponseDTO;
291
292
 
292
- export interface GetFrictionlessCheckinStatusRequest
293
+ export interface GetFrictionlessCheckinRequest
293
294
  extends BaseRequest,
294
- RequestQuery<GetFrictionlessCheckinStatusQuery>,
295
- GetFrictionlessCheckinStatusPath {}
295
+ RequestQuery<GetFrictionlessCheckinQuery>,
296
+ GetFrictionlessCheckinPath {}
296
297
 
297
298
  // GET /frictionless/users/{user_id}/checkins/payment-issues - List check-ins with update payment required per user
298
299
 
@@ -312,6 +313,31 @@ export interface GetFrictionlessUsersPaymentIssuesRequest
312
313
  RequestQuery<GetFrictionlessUsersPaymentIssuesQuery>,
313
314
  GetFrictionlessUsersPaymentIssuesPath {}
314
315
 
316
+ // GET /frictionless/failed-checkins - List check-ins on error
317
+
318
+ export interface GetFrictionlessFailedCheckinsQuery {
319
+ // Graphql query string
320
+ _query?: string;
321
+ }
322
+
323
+ export type GetFrictionlessFailedCheckinsResponse = FailedCheckInDTO[];
324
+
325
+ export interface GetFrictionlessFailedCheckinsRequest
326
+ extends BaseRequest,
327
+ RequestQuery<GetFrictionlessFailedCheckinsQuery> {}
328
+
329
+ // POST /frictionless/checkins/{id_checkin}/reprocess - Reprocess checkin on error
330
+
331
+ export interface PostFrictionlessCheckinsReprocessPath {
332
+ id_checkin: string;
333
+ }
334
+
335
+ export type PostFrictionlessCheckinsReprocessResponse = {};
336
+
337
+ export interface PostFrictionlessCheckinsReprocessRequest
338
+ extends BaseRequest,
339
+ PostFrictionlessCheckinsReprocessPath {}
340
+
315
341
  // POST /frictionless/checkins/{checkin_id}/reprocess-payment - Update payment at checkin and trigger reprocessing
316
342
 
317
343
  export interface PostFrictionlessCheckinReprocessPaymentPath {
@@ -328,20 +354,36 @@ export interface PostFrictionlessCheckinReprocessPaymentRequest
328
354
  body: PostFrictionlessCheckinReprocessPaymentBody;
329
355
  }
330
356
 
331
- // GET /frictionless/checkin/{id_checkin} - Fetch CheckIn
357
+ // POST /frictionless/amazon-jwo-connector/v1/identity/identity-keys - Amazon JWO Identity Key Connector
332
358
 
333
- export interface GetFrictionlessCheckinPath {
334
- id_checkin: string;
359
+ export type PostFrictionlessAmazonJwoConnectorV1IdentityIdentityKeysBody =
360
+ AmazonJWOIdentityKeysRequestDTO;
361
+
362
+ export type PostFrictionlessAmazonJwoConnectorV1IdentityIdentityKeysResponse =
363
+ AmazonJWOIdentityKeysResponseDTO;
364
+
365
+ export interface PostFrictionlessAmazonJwoConnectorV1IdentityIdentityKeysRequest
366
+ extends BaseRequest {
367
+ body: PostFrictionlessAmazonJwoConnectorV1IdentityIdentityKeysBody;
335
368
  }
336
369
 
337
- export interface GetFrictionlessCheckinQuery {
338
- // Graphql query string
339
- _query?: string;
370
+ // POST /frictionless/amazon-jwo-connector/v1/order/purchases - Amazon JWO Ordering Connector
371
+
372
+ export type PostFrictionlessAmazonJwoConnectorV1OrderPurchasesBody = AmazonJWOOrderingRequestDTO;
373
+
374
+ export type PostFrictionlessAmazonJwoConnectorV1OrderPurchasesResponse =
375
+ AmazonJWOOrderingResponseDTO;
376
+
377
+ export interface PostFrictionlessAmazonJwoConnectorV1OrderPurchasesRequest extends BaseRequest {
378
+ body: PostFrictionlessAmazonJwoConnectorV1OrderPurchasesBody;
340
379
  }
341
380
 
342
- export type GetFrictionlessCheckinResponse = GetCheckinResponseDTO;
381
+ // POST /frictionless/webhook/standardcognition - Receive frictionless standard cognition events
343
382
 
344
- export interface GetFrictionlessCheckinRequest
345
- extends BaseRequest,
346
- RequestQuery<GetFrictionlessCheckinQuery>,
347
- GetFrictionlessCheckinPath {}
383
+ export type PostFrictionlessWebhookStandardcognitionBody = StandardCognitionEventDTO;
384
+
385
+ export type PostFrictionlessWebhookStandardcognitionResponse = {};
386
+
387
+ export interface PostFrictionlessWebhookStandardcognitionRequest extends BaseRequest {
388
+ body: PostFrictionlessWebhookStandardcognitionBody;
389
+ }
@@ -85,7 +85,9 @@ export interface Brand {
85
85
  };
86
86
  timezone?: string;
87
87
  description?: string;
88
+ //@deprecated
88
89
  latitude?: number;
90
+ //@deprecated
89
91
  longitude?: number;
90
92
  address?: Address;
91
93
  menus?: MenuHours[];
@@ -95,10 +97,10 @@ export interface Brand {
95
97
  };
96
98
  hours?: Hours[];
97
99
  deliveryHours?: DeliveryHours[];
98
- style?: any;
100
+ style?: Record<string, any>;
99
101
  // pos
100
102
  pos?: string;
101
- terminals?: any[];
103
+ terminals?: Record<string, any>[];
102
104
  timeslots?: {
103
105
  time?: string;
104
106
  averagePrepTime?: string;
@@ -141,12 +143,13 @@ export interface Brand {
141
143
  group?: string;
142
144
  // payment
143
145
  payment_provider?: string;
146
+ //@deprecated
144
147
  location_description?: string;
145
148
  // company
146
149
  company?: string;
147
150
  config?: {
148
- private?: any;
149
- public?: any;
151
+ private?: Record<string, any>;
152
+ public?: Record<string, any>;
150
153
  };
151
154
  tax_rate?: number;
152
155
  meta?: {
@@ -254,8 +257,8 @@ export interface Location {
254
257
  en?: string;
255
258
  fr?: string;
256
259
  };
257
- hours?: any;
258
- deliveryHours?: any;
260
+ hours?: Record<string, any>;
261
+ deliveryHours?: Record<string, any>;
259
262
  service_fee?: {
260
263
  type?: string;
261
264
  value?: number;
@@ -280,7 +283,7 @@ export interface Group {
280
283
  meta?: {
281
284
  [index: string]: any;
282
285
  };
283
- style?: any;
286
+ style?: Record<string, any>;
284
287
  timezone?: string;
285
288
  [index: string]: any;
286
289
  }
@@ -300,7 +303,7 @@ export interface success {
300
303
  export interface Error {
301
304
  error?: string;
302
305
  code?: number;
303
- data?: any;
306
+ data?: Record<string, any>;
304
307
  }
305
308
 
306
309
  export interface Sector {
@@ -341,6 +344,7 @@ export interface Locations {
341
344
  }
342
345
 
343
346
  export interface Multigroups {
347
+ //@deprecated
344
348
  groups?: MultiGroup[];
345
349
  multigroups?: MultiGroup[];
346
350
  }
@@ -419,7 +423,7 @@ export interface BadRequest {
419
423
  error?: string;
420
424
  }
421
425
 
422
- export type PartnerStatus = string;
426
+ export type PartnerStatus = "await_partner" | "await_scout" | "completed";
423
427
 
424
428
  export interface WaitTime {
425
429
  // maxium wait time to the next time slot in minutes
@@ -430,7 +434,7 @@ export interface WaitTime {
430
434
  ready_time: number;
431
435
  }
432
436
 
433
- export type BrandOrMenuState = string;
437
+ export type BrandOrMenuState = "open" | "closed" | "preorder";
434
438
 
435
439
  export interface MenuAssociations {
436
440
  menu_associations?: MenuAssociation[];
@@ -490,9 +494,9 @@ export interface GetLocationsRequest extends BaseRequest, RequestQuery<GetLocati
490
494
  // GET /location/search - Gets Location within a radius of the provided point
491
495
 
492
496
  export interface GetLocationSearchQuery {
493
- // The latitude to be used
497
+ //@deprecated
494
498
  lat?: number;
495
- // The longitude to be used
499
+ //@deprecated
496
500
  long?: number;
497
501
  // Operation id to be used
498
502
  operation_id?: number;
@@ -517,7 +521,7 @@ export interface GetLocationQuery {
517
521
  // When fetching location, brands will come with private and public configs
518
522
  include_brands_config?: boolean;
519
523
  // active cafes
520
- active_cafes?: any[];
524
+ active_cafes?: Record<string, any>[];
521
525
  // show additional hidden properties/entities
522
526
  extended?: boolean;
523
527
  // Graphql query string
@@ -815,8 +819,6 @@ export interface GetLocationGroupWaittimesPath {
815
819
  }
816
820
 
817
821
  export interface GetLocationGroupWaittimesQuery {
818
- // show additional hidden properties/entities
819
- extended?: boolean;
820
822
  // Graphql query string
821
823
  _query?: string;
822
824
  nocache?: boolean;
@@ -1273,7 +1275,7 @@ export interface PostLocationCompanyBody {
1273
1275
  name: string;
1274
1276
  // sector
1275
1277
  sector: string;
1276
- label?: any;
1278
+ label?: Record<string, any>;
1277
1279
  is?: {
1278
1280
  global_images_enabled?: boolean;
1279
1281
  };
@@ -72,8 +72,6 @@ export interface AuthPayload {
72
72
  export interface PostMealplanPath {
73
73
  // Meal plan ID
74
74
  id: string;
75
- // Tender ID
76
- tender: string;
77
75
  }
78
76
 
79
77
  export interface PostMealplanBody {
@@ -97,8 +95,6 @@ export interface PostMealplanRequest extends BaseRequest, PostMealplanPath {
97
95
  export interface PutMealplanPath {
98
96
  // Meal plan ID
99
97
  id: string;
100
- // Tender ID
101
- tender: string;
102
98
  }
103
99
 
104
100
  export interface PutMealplanBody {
@@ -118,8 +114,6 @@ export interface PutMealplanRequest extends BaseRequest, PutMealplanPath {
118
114
  export interface GetMealplanPath {
119
115
  // Meal plan ID
120
116
  id: string;
121
- // Tender ID
122
- tender: string;
123
117
  }
124
118
 
125
119
  export interface GetMealplanQuery {
@@ -139,8 +133,6 @@ export interface GetMealplanRequest
139
133
  export interface DeleteMealplanPath {
140
134
  // Meal plan ID
141
135
  id: string;
142
- // Tender ID
143
- tender: string;
144
136
  }
145
137
 
146
138
  export interface DeleteMealplanBody {
@@ -174,7 +166,7 @@ export interface PostMealplanCallbackBody {
174
166
 
175
167
  export interface PostMealplanCallbackResponse {
176
168
  token?: string;
177
- // DH 1.0 format for returning the token
169
+ //@deprecated
178
170
  cardNumber?: string;
179
171
  }
180
172