@compassdigital/sdk.typescript 4.335.0 → 4.337.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compassdigital/sdk.typescript",
3
- "version": "4.335.0",
3
+ "version": "4.337.0",
4
4
  "description": "Compass Digital Labs TypeScript SDK",
5
5
  "type": "commonjs",
6
6
  "main": "./lib/index.js",
package/src/index.ts CHANGED
@@ -1390,6 +1390,8 @@ import {
1390
1390
  GetDiscountsAllResponse,
1391
1391
  PutDiscountPublishBody,
1392
1392
  PutDiscountPublishResponse,
1393
+ GetRewardsQuery,
1394
+ GetRewardsResponse,
1393
1395
  } from './interface/discount';
1394
1396
 
1395
1397
  import {
@@ -14873,6 +14875,26 @@ export class ServiceClient extends BaseServiceClient {
14873
14875
  );
14874
14876
  }
14875
14877
 
14878
+ /**
14879
+ * GET /discount/rewards - Get eligible rewards for a customer and site
14880
+ *
14881
+ * @param options - additional request options
14882
+ */
14883
+ get_rewards(
14884
+ options: {
14885
+ query: GetRewardsQuery;
14886
+ } & RequestOptions,
14887
+ ): ResponsePromise<GetRewardsResponse> {
14888
+ return this.request(
14889
+ 'discount',
14890
+ '/discount/rewards',
14891
+ 'GET',
14892
+ `/discount/rewards`,
14893
+ null,
14894
+ options,
14895
+ );
14896
+ }
14897
+
14876
14898
  /**
14877
14899
  * GET /timeslots/brand/{brandId} - Get timeslots for brand
14878
14900
  *
@@ -292,6 +292,80 @@ export interface PatchDiscountResponseDTO {
292
292
  channelConfig?: DiscountChannelConfig;
293
293
  }
294
294
 
295
+ export interface RewardWindowDTO {
296
+ // Campaign start date
297
+ startsAt: string;
298
+ // Campaign end date
299
+ endsAt: string;
300
+ }
301
+
302
+ export interface NextRewardDTO {
303
+ // Points required for next reward
304
+ requiredPoints: number;
305
+ // Current progress toward next reward
306
+ progress: number;
307
+ }
308
+
309
+ export interface RewardDiscountDTO {
310
+ // Discount type
311
+ type?: 'AMOUNT_OFF' | 'PERCENT_OFF';
312
+ // Percentage off (if type is PERCENT_OFF)
313
+ percentOff?: number;
314
+ // Amount off (if type is AMOUNT_OFF)
315
+ amountOff?: number;
316
+ }
317
+
318
+ export interface RewardDTO {
319
+ // Voucher ID
320
+ voucherId: string;
321
+ // Voucher code
322
+ voucherCode: string;
323
+ // Campaign ID
324
+ campaignId?: string;
325
+ // Reward name
326
+ name: string;
327
+ // Discount details
328
+ discount: RewardDiscountDTO;
329
+ // When the voucher was issued
330
+ issuedAt: string;
331
+ // Points required for this reward
332
+ requiredPoints: number;
333
+ // When the voucher was redeemed
334
+ redeemedAt?: string | null;
335
+ }
336
+
337
+ export interface CustomerRewardCampaignDTO {
338
+ // Campaign ID
339
+ campaignId: string;
340
+ // Campaign name
341
+ name: string;
342
+ // Campaign description
343
+ description?: string;
344
+ // Associated brand IDs
345
+ associatedBrands?: string[];
346
+ // Whether the campaign is active
347
+ active: boolean;
348
+ // Campaign time window
349
+ window: RewardWindowDTO;
350
+ // Customer points in this campaign
351
+ customerPoints: number;
352
+ // Next reward information
353
+ nextReward: NextRewardDTO;
354
+ // Available rewards
355
+ rewards: RewardDTO[];
356
+ }
357
+
358
+ export interface GetRewardsResponseDTO {
359
+ // Customer ID
360
+ customerId: string;
361
+ // Site ID
362
+ siteId: string;
363
+ // Total number of rewards
364
+ rewardCount: number;
365
+ // Available campaigns
366
+ campaigns: CustomerRewardCampaignDTO[];
367
+ }
368
+
295
369
  // GET /discount/{id} - Get a discount
296
370
 
297
371
  export interface GetDiscountPath {
@@ -374,3 +448,16 @@ export interface PutDiscountPublishPath {
374
448
  export type PutDiscountPublishBody = PutDiscountPublishRequestDTO;
375
449
 
376
450
  export type PutDiscountPublishResponse = PutDiscountPublishResponseDTO;
451
+
452
+ // GET /discount/rewards - Get eligible rewards for a customer and site
453
+
454
+ export interface GetRewardsQuery {
455
+ // Customer ID to fetch rewards for
456
+ customerId?: string;
457
+ // Site ID to filter rewards by
458
+ siteId: string;
459
+ // Graphql query string
460
+ _query?: string;
461
+ }
462
+
463
+ export type GetRewardsResponse = GetRewardsResponseDTO;
@@ -593,6 +593,28 @@ export interface GetOneOptionsDTO {
593
593
  [index: string]: any;
594
594
  }
595
595
 
596
+ export interface LocalMenuLabelGroupDTO {
597
+ // Global menu group ID
598
+ gmg_id: string;
599
+ // Global menu group name
600
+ gmg_name: string;
601
+ // Menu labels array
602
+ labels: MenuLabelItemDTO[];
603
+ [index: string]: any;
604
+ }
605
+
606
+ export interface MenuLabelItemDTO {
607
+ // Menu label ID
608
+ id?: string;
609
+ // Menu label text
610
+ text: string;
611
+ // S3 link for menu label image
612
+ s3_link?: string;
613
+ // Base64 image data
614
+ image_data?: string;
615
+ [index: string]: any;
616
+ }
617
+
596
618
  export interface NotFoundErrorDTO {
597
619
  number: number;
598
620
  message: string;
@@ -2523,6 +2545,8 @@ export interface GetMenuV3LocalMenuGroupQuery {
2523
2545
  export interface GetMenuV3LocalMenuGroupResponse {
2524
2546
  // GMG IDs currently in use by child brands
2525
2547
  global_menu_groups_in_use?: string[];
2548
+ // Menu labels inherited from global menu groups in use
2549
+ menu_labels?: LocalMenuLabelGroupDTO[];
2526
2550
  name: string;
2527
2551
  is_active?: boolean;
2528
2552
  allowed_global_menu_groups?: GlobalMenuGroupDTO[];