@compassdigital/sdk.typescript 4.615.0 → 4.617.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/src/index.ts CHANGED
@@ -1190,8 +1190,13 @@ import {
1190
1190
  GetConsumerFrictionlessCheckinResponse,
1191
1191
  PostFrictionlessQrcodeBody,
1192
1192
  PostFrictionlessQrcodeResponse,
1193
+ PostConsumerV2FrictionlessQrcodeBody,
1194
+ PostConsumerV2FrictionlessQrcodeResponse,
1193
1195
  PostConsumerForgotPasswordBody,
1194
1196
  PostConsumerForgotPasswordResponse,
1197
+ PostConsumerV2ForgotPasswordQuery,
1198
+ PostConsumerV2ForgotPasswordBody,
1199
+ PostConsumerV2ForgotPasswordResponse,
1195
1200
  PostConsumerAddSecretBody,
1196
1201
  PostConsumerAddSecretResponse,
1197
1202
  GetConsumerLocationGroupQuery,
@@ -13679,6 +13684,26 @@ export class ServiceClient extends BaseServiceClient {
13679
13684
  );
13680
13685
  }
13681
13686
 
13687
+ /**
13688
+ * POST /consumer/v2/frictionless/qrCode - Create a QR code for a frictionless checkin
13689
+ *
13690
+ * @param body
13691
+ * @param options - additional request options
13692
+ */
13693
+ post_consumer_v2_frictionless_qrcode(
13694
+ body: PostConsumerV2FrictionlessQrcodeBody,
13695
+ options?: RequestOptions,
13696
+ ): ResponsePromise<PostConsumerV2FrictionlessQrcodeResponse> {
13697
+ return this.request(
13698
+ 'consumer',
13699
+ '/consumer/v2/frictionless/qrCode',
13700
+ 'POST',
13701
+ `/consumer/v2/frictionless/qrCode`,
13702
+ body,
13703
+ options,
13704
+ );
13705
+ }
13706
+
13682
13707
  /**
13683
13708
  * POST /consumer/forgotpassword - Forgot password
13684
13709
  *
@@ -13699,6 +13724,28 @@ export class ServiceClient extends BaseServiceClient {
13699
13724
  );
13700
13725
  }
13701
13726
 
13727
+ /**
13728
+ * POST /consumer/v2/forgotpassword - Forgot password
13729
+ *
13730
+ * @param body
13731
+ * @param options - additional request options
13732
+ */
13733
+ post_consumer_v2_forgot_password(
13734
+ body: PostConsumerV2ForgotPasswordBody,
13735
+ options: {
13736
+ query: PostConsumerV2ForgotPasswordQuery;
13737
+ } & RequestOptions,
13738
+ ): ResponsePromise<PostConsumerV2ForgotPasswordResponse> {
13739
+ return this.request(
13740
+ 'consumer',
13741
+ '/consumer/v2/forgotpassword',
13742
+ 'POST',
13743
+ `/consumer/v2/forgotpassword`,
13744
+ body,
13745
+ options,
13746
+ );
13747
+ }
13748
+
13702
13749
  /**
13703
13750
  * POST /consumer/user/{id}/secret/{key} - Add user secret
13704
13751
  *
@@ -1512,13 +1512,28 @@ export interface HomePageResponse {
1512
1512
  }
1513
1513
 
1514
1514
  export interface FrictionlessCheckinResponse {
1515
+ // Check-in session ID
1515
1516
  id: string;
1516
- provider: Record<string, any>;
1517
- status: Record<string, any>;
1517
+ // Frictionless provider
1518
+ provider: 'AWS' | 'SC';
1519
+ // Current status of the check-in session
1520
+ status:
1521
+ | 'CREATING'
1522
+ | 'ACTIVE'
1523
+ | 'ERROR'
1524
+ | 'CANCELED'
1525
+ | 'PROCESSING'
1526
+ | 'UPDATE_PAYMENT_REQUIRED'
1527
+ | 'COMPLETED';
1528
+ // Reason the session failed
1518
1529
  reasonOfFail?: string;
1530
+ // Third-party correlated ID
1519
1531
  thirdPartyCorrelatedID?: string;
1532
+ // Shopping cart ID associated with the session
1520
1533
  shoppingCartID?: string;
1534
+ // Brand ID
1521
1535
  brandID: string;
1536
+ // User ID
1522
1537
  userID: string;
1523
1538
  }
1524
1539
 
@@ -1535,14 +1550,44 @@ export interface FrictionlessQrCodeResponse {
1535
1550
  id: string;
1536
1551
  }
1537
1552
 
1538
- export interface ForgotPasswordRequest {
1553
+ export interface FrictionlessMealplanPaymentDto {
1554
+ // Meal plan tender ID
1555
+ tenderID: string;
1556
+ // Meal plan name
1557
+ name: string;
1558
+ }
1559
+
1560
+ export interface FrictionlessCreditCardPaymentDto {
1561
+ // Credit card type
1562
+ cardType: string;
1563
+ // Last 4 digits of the credit card
1564
+ last4: string;
1565
+ }
1566
+
1567
+ export interface FrictionlessPaymentMethodDto {
1568
+ // Meal plan payment details
1569
+ mealplan?: FrictionlessMealplanPaymentDto;
1570
+ // Credit card payment details
1571
+ creditCard?: FrictionlessCreditCardPaymentDto;
1572
+ // Payment token
1573
+ token?: string;
1574
+ }
1575
+
1576
+ export interface FrictionlessQrCodeV2Request {
1577
+ // brand id
1578
+ brandId: string;
1579
+ // payment method
1580
+ paymentMethod: FrictionlessPaymentMethodDto;
1581
+ }
1582
+
1583
+ export interface ForgotPasswordV1Request {
1539
1584
  // email
1540
1585
  email: string;
1541
1586
  // captchaResponseKey
1542
1587
  captchaResponseKey: string;
1543
- // realm
1588
+ // The realm of the user
1544
1589
  realm?: string;
1545
- // lang
1590
+ // The language, e.g. en, fr
1546
1591
  lang?: string;
1547
1592
  }
1548
1593
 
@@ -1551,10 +1596,15 @@ export interface ForgotPasswordResponse {
1551
1596
  success?: boolean;
1552
1597
  }
1553
1598
 
1554
- export interface PostConsumerUserAddSecretBody {
1555
- key?: string;
1599
+ export interface ForgotPasswordRequest {
1600
+ // email
1601
+ email: string;
1602
+ // Type of password reset
1603
+ type?: 'forgot_password' | 'new_user';
1556
1604
  }
1557
1605
 
1606
+ export type PostConsumerUserAddSecretBody = Record<string, any>;
1607
+
1558
1608
  export interface PostUserAddSecret {
1559
1609
  key?: string;
1560
1610
  }
@@ -2096,10 +2146,12 @@ export interface ConsumerCashlessLog {
2096
2146
  }
2097
2147
 
2098
2148
  export interface ConsumerUserMeta {
2099
- is_guest?: boolean;
2149
+ // Whether the user has opted in to marketing
2100
2150
  marketing_opt_in?: boolean;
2151
+ // Date the user opted in to marketing
2101
2152
  marketing_opt_in_date?: string;
2102
- marketing_opt_in_source?: Record<string, any>;
2153
+ // Source where the user opted in to marketing
2154
+ marketing_opt_in_source?: 'App' | 'Web';
2103
2155
  order_status_notification?: {
2104
2156
  send_emails?: boolean;
2105
2157
  send_emails_date_updated?: string;
@@ -2143,6 +2195,17 @@ export interface ConsumerUserIs {
2143
2195
  placeholder?: boolean;
2144
2196
  }
2145
2197
 
2198
+ export interface ConsumerScopes {
2199
+ scopes?: string[];
2200
+ }
2201
+
2202
+ export interface ConsumerTemporaryPermissions {
2203
+ // Expiry date of the temporary permissions
2204
+ expiry: string;
2205
+ // Permission scopes
2206
+ scopes: string[];
2207
+ }
2208
+
2146
2209
  export interface PostConsumerUserChangePasswordResponse {
2147
2210
  // The ID of the user
2148
2211
  id: string;
@@ -2152,17 +2215,37 @@ export interface PostConsumerUserChangePasswordResponse {
2152
2215
  name?: ConsumerUserName;
2153
2216
  // The date the user was created
2154
2217
  date?: ConsumerUserDate;
2218
+ // The birthday of the user
2219
+ birthday?: string;
2220
+ // The password of the user
2221
+ password?: string;
2222
+ // The phone of the user
2223
+ phone?: number;
2224
+ // The phone country code of the user
2225
+ phone_country_code?: string;
2226
+ // The realm of the user
2227
+ realm?: string;
2228
+ // The location group of the user
2229
+ location_group?: string;
2230
+ // The ssoId of the user
2231
+ ssoId?: string;
2232
+ // The last accessed date of the user
2233
+ last_accessed?: string;
2155
2234
  // The gender of the user
2156
- gender?: Record<string, any>;
2235
+ gender?: 'male' | 'female' | 'non-binary';
2236
+ // The meta of the user
2157
2237
  meta?: ConsumerUserMeta;
2238
+ // Quick boolean details for the user
2158
2239
  is?: ConsumerUserIs;
2159
- }
2160
-
2161
- export interface ConsumerScopes {
2162
- scopes?: string[];
2240
+ // The permissions of the user
2241
+ permissions?: ConsumerScopes;
2242
+ // Temporary permissions for the user
2243
+ temporary_permissions?: ConsumerTemporaryPermissions;
2163
2244
  }
2164
2245
 
2165
2246
  export interface PutConsumerUserRequest {
2247
+ // The id of the user
2248
+ id?: string;
2166
2249
  // The email of the user
2167
2250
  email?: string;
2168
2251
  // The name of the user
@@ -2180,7 +2263,7 @@ export interface PutConsumerUserRequest {
2180
2263
  // The realm of the user
2181
2264
  realm?: string;
2182
2265
  // The gender of the user
2183
- gender?: Record<string, any>;
2266
+ gender?: 'male' | 'female' | 'non-binary';
2184
2267
  // The meta of the user
2185
2268
  meta?: ConsumerUserMeta;
2186
2269
  // The is of the user
@@ -2227,6 +2310,8 @@ export interface PutConsumerUserResponse {
2227
2310
  }
2228
2311
 
2229
2312
  export interface PatchConsumerUserRequest {
2313
+ // The id of the user
2314
+ id?: string;
2230
2315
  // The email of the user
2231
2316
  email?: string;
2232
2317
  // The name of the user
@@ -2244,7 +2329,7 @@ export interface PatchConsumerUserRequest {
2244
2329
  // The realm of the user
2245
2330
  realm?: string;
2246
2331
  // The gender of the user
2247
- gender?: Record<string, any>;
2332
+ gender?: 'male' | 'female' | 'non-binary';
2248
2333
  // The meta of the user
2249
2334
  meta?: ConsumerUserMeta;
2250
2335
  // The is of the user
@@ -2295,7 +2380,7 @@ export interface GetConsumerUserResponse {
2295
2380
  // The realm of the user
2296
2381
  realm?: string;
2297
2382
  // The gender of the user
2298
- gender?: Record<string, any>;
2383
+ gender?: 'male' | 'female' | 'non-binary';
2299
2384
  // The meta of the user
2300
2385
  meta?: ConsumerUserMeta;
2301
2386
  // The is of the user
@@ -2306,6 +2391,8 @@ export interface GetConsumerUserResponse {
2306
2391
  location_group?: string;
2307
2392
  // The ssoId of the user
2308
2393
  ssoId?: string;
2394
+ // The last accessed date of the user
2395
+ last_accessed?: string;
2309
2396
  }
2310
2397
 
2311
2398
  export interface ConsumerCashlessTender {
@@ -3272,29 +3359,12 @@ export interface PatchConsumerShoppingCartResponse {
3272
3359
  }
3273
3360
 
3274
3361
  export interface PostConsumerShoppingCartCloneBodyRequest {
3275
- location?: string;
3276
- menu?: string;
3277
- brand?: string;
3278
- promo?: ShoppingcartPromoDetails;
3279
- discount?: ShoppingcartPromoDetails;
3280
- payment_method?: ShoppingcartPaymentMethod;
3281
- taxes?: ShoppingcartTaxes;
3282
- exemptions?: {
3283
- tax?: boolean;
3284
- };
3285
- service_fee?: ShoppingcartMonetaryValue;
3286
- delivery_fee?: ShoppingcartMonetaryValue;
3287
- is?: {
3288
- type?: Record<string, any>;
3289
- mx_cart?: boolean;
3290
- email_tax_exempt?: boolean;
3291
- tax_calculation_required?: boolean;
3292
- system365?: boolean;
3293
- };
3294
- meta?: {
3295
- vendor?: Record<string, any>;
3296
- [index: string]: any;
3297
- };
3362
+ // menu id
3363
+ menu: string;
3364
+ // order type
3365
+ order_type: string;
3366
+ // array of item indexes that should be cloned
3367
+ items_to_clone: string[];
3298
3368
  }
3299
3369
 
3300
3370
  export interface PostCustomerRewardsBodyDTO {
@@ -3462,20 +3532,57 @@ export interface PostConsumerUserGuestRequest {
3462
3532
  name: ConsumerUserName;
3463
3533
  }
3464
3534
 
3535
+ export interface GuestUserAccess {
3536
+ // Access token
3537
+ token?: string;
3538
+ // Token expiry date
3539
+ expires?: string;
3540
+ }
3541
+
3542
+ export interface GuestUserProfile {
3543
+ // The ID of the user
3544
+ id?: string;
3545
+ // The email of the user
3546
+ email?: string;
3547
+ // The name of the user
3548
+ name?: ConsumerUserName;
3549
+ // The date of the user
3550
+ date?: ConsumerUserDate;
3551
+ // The birthday of the user
3552
+ birthday?: string;
3553
+ // The password of the user
3554
+ password?: string;
3555
+ // The phone of the user
3556
+ phone?: number;
3557
+ // The phone country code of the user
3558
+ phone_country_code?: string;
3559
+ // The realm of the user
3560
+ realm?: string;
3561
+ // The gender of the user
3562
+ gender?: 'male' | 'female' | 'non-binary';
3563
+ // The meta of the user
3564
+ meta?: ConsumerUserMeta;
3565
+ // Quick boolean details for the user
3566
+ is?: ConsumerUserIs;
3567
+ // The permissions of the user
3568
+ permissions?: ConsumerScopes;
3569
+ // The location group of the user
3570
+ location_group?: string;
3571
+ // The ssoId of the user
3572
+ ssoId?: string;
3573
+ // The last accessed date of the user
3574
+ last_accessed?: string;
3575
+ }
3576
+
3465
3577
  export interface PostConsumerUserGuestResponse {
3466
- // The token of the guest user
3578
+ // @deprecated
3467
3579
  token?: string;
3468
- access?: {
3469
- token?: string;
3470
- expires?: string;
3471
- };
3580
+ // The access information of the guest user
3581
+ access?: GuestUserAccess;
3472
3582
  // The user ID of the guest user
3473
3583
  user?: string;
3474
- profile?: {
3475
- id?: string;
3476
- email?: string;
3477
- realm?: string;
3478
- };
3584
+ // The profile of the guest user
3585
+ profile?: GuestUserProfile;
3479
3586
  }
3480
3587
 
3481
3588
  export interface OpenAiToolCallFunction {
@@ -3779,12 +3886,33 @@ export type PostFrictionlessQrcodeBody = FrictionlessQrCodeRequest;
3779
3886
 
3780
3887
  export type PostFrictionlessQrcodeResponse = FrictionlessQrCodeResponse;
3781
3888
 
3889
+ // POST /consumer/v2/frictionless/qrCode - Create a QR code for a frictionless checkin
3890
+
3891
+ export type PostConsumerV2FrictionlessQrcodeBody = FrictionlessQrCodeV2Request;
3892
+
3893
+ export type PostConsumerV2FrictionlessQrcodeResponse = FrictionlessQrCodeResponse;
3894
+
3782
3895
  // POST /consumer/forgotpassword - Forgot password
3783
3896
 
3784
- export type PostConsumerForgotPasswordBody = ForgotPasswordRequest;
3897
+ export type PostConsumerForgotPasswordBody = ForgotPasswordV1Request;
3785
3898
 
3786
3899
  export type PostConsumerForgotPasswordResponse = ForgotPasswordResponse;
3787
3900
 
3901
+ // POST /consumer/v2/forgotpassword - Forgot password
3902
+
3903
+ export interface PostConsumerV2ForgotPasswordQuery {
3904
+ // hCaptcha response key
3905
+ captchaResponseKey: string;
3906
+ // The realm of the user
3907
+ realm?: string;
3908
+ // The language, e.g. en, fr
3909
+ lang?: string;
3910
+ }
3911
+
3912
+ export type PostConsumerV2ForgotPasswordBody = ForgotPasswordRequest;
3913
+
3914
+ export type PostConsumerV2ForgotPasswordResponse = ForgotPasswordResponse;
3915
+
3788
3916
  // POST /consumer/user/{id}/secret/{key} - Add user secret
3789
3917
 
3790
3918
  export interface PostConsumerAddSecretPath {