@compassdigital/sdk.typescript 4.464.0 → 4.466.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.464.0",
3
+ "version": "4.466.0",
4
4
  "description": "Compass Digital Labs TypeScript SDK",
5
5
  "type": "commonjs",
6
6
  "main": "./lib/index.js",
package/src/index.ts CHANGED
@@ -938,6 +938,10 @@ import {
938
938
  PostMenuV4BrandMenuDuplicateResponse,
939
939
  GetMenuV4BrandExportQuery,
940
940
  GetMenuV4BrandExportResponse,
941
+ PostMenuV4BrandsFetchQuery,
942
+ PostMenuV4BrandsFetchResponse,
943
+ PostMenuV4BrandItemsSearchQuery,
944
+ PostMenuV4BrandItemsSearchResponse,
941
945
  PostMenuV4ItemAttachmentQuery,
942
946
  PostMenuV4ItemAttachmentResponse,
943
947
  PostMenuV4ItemBody,
@@ -1024,6 +1028,10 @@ import {
1024
1028
  DeleteMenuV4CategoryDetachItemsResponse,
1025
1029
  GetMenuV4CategoryAttachableItemsQuery,
1026
1030
  GetMenuV4CategoryAttachableItemsResponse,
1031
+ PostMenuV4StationsMenusFetchQuery,
1032
+ PostMenuV4StationsMenusFetchResponse,
1033
+ PostMenuV4StationItemsSearchQuery,
1034
+ PostMenuV4StationItemsSearchResponse,
1027
1035
  GetMenuV3PingResponse,
1028
1036
  GetMenuV3HealthResponse,
1029
1037
  } from './interface/menu';
@@ -1353,7 +1361,6 @@ import {
1353
1361
  GetDiscountsResponse,
1354
1362
  PostDiscountBody,
1355
1363
  PostDiscountResponse,
1356
- GetDiscountsAllResponse,
1357
1364
  PostDiscountEventBody,
1358
1365
  PostDiscountEventResponse,
1359
1366
  PostRewardsQuery,
@@ -10867,6 +10874,46 @@ export class ServiceClient extends BaseServiceClient {
10867
10874
  );
10868
10875
  }
10869
10876
 
10877
+ /**
10878
+ * POST /menu/v4/brands/fetch
10879
+ *
10880
+ * @param options - additional request options
10881
+ */
10882
+ post_menu_v4_brands_fetch(
10883
+ options?: {
10884
+ query?: PostMenuV4BrandsFetchQuery;
10885
+ } & RequestOptions,
10886
+ ): ResponsePromise<PostMenuV4BrandsFetchResponse> {
10887
+ return this.request(
10888
+ 'menu',
10889
+ '/menu/v4/brands/fetch',
10890
+ 'POST',
10891
+ `/menu/v4/brands/fetch`,
10892
+ null,
10893
+ options,
10894
+ );
10895
+ }
10896
+
10897
+ /**
10898
+ * POST /menu/v4/brand/items/search
10899
+ *
10900
+ * @param options - additional request options
10901
+ */
10902
+ post_menu_v4_brand_items_search(
10903
+ options?: {
10904
+ query?: PostMenuV4BrandItemsSearchQuery;
10905
+ } & RequestOptions,
10906
+ ): ResponsePromise<PostMenuV4BrandItemsSearchResponse> {
10907
+ return this.request(
10908
+ 'menu',
10909
+ '/menu/v4/brand/items/search',
10910
+ 'POST',
10911
+ `/menu/v4/brand/items/search`,
10912
+ null,
10913
+ options,
10914
+ );
10915
+ }
10916
+
10870
10917
  /**
10871
10918
  * POST /menu/v4/item/{id}/attachment/{name}
10872
10919
  *
@@ -11802,6 +11849,46 @@ export class ServiceClient extends BaseServiceClient {
11802
11849
  );
11803
11850
  }
11804
11851
 
11852
+ /**
11853
+ * POST /menu/v4/stations/menus/fetch
11854
+ *
11855
+ * @param options - additional request options
11856
+ */
11857
+ post_menu_v4_stations_menus_fetch(
11858
+ options?: {
11859
+ query?: PostMenuV4StationsMenusFetchQuery;
11860
+ } & RequestOptions,
11861
+ ): ResponsePromise<PostMenuV4StationsMenusFetchResponse> {
11862
+ return this.request(
11863
+ 'menu',
11864
+ '/menu/v4/stations/menus/fetch',
11865
+ 'POST',
11866
+ `/menu/v4/stations/menus/fetch`,
11867
+ null,
11868
+ options,
11869
+ );
11870
+ }
11871
+
11872
+ /**
11873
+ * POST /menu/v4/station/items/search
11874
+ *
11875
+ * @param options - additional request options
11876
+ */
11877
+ post_menu_v4_station_items_search(
11878
+ options?: {
11879
+ query?: PostMenuV4StationItemsSearchQuery;
11880
+ } & RequestOptions,
11881
+ ): ResponsePromise<PostMenuV4StationItemsSearchResponse> {
11882
+ return this.request(
11883
+ 'menu',
11884
+ '/menu/v4/station/items/search',
11885
+ 'POST',
11886
+ `/menu/v4/station/items/search`,
11887
+ null,
11888
+ options,
11889
+ );
11890
+ }
11891
+
11805
11892
  /**
11806
11893
  * GET /menu/v3/ping
11807
11894
  *
@@ -15218,15 +15305,6 @@ export class ServiceClient extends BaseServiceClient {
15218
15305
  return this.request('discount', '/discount', 'POST', `/discount`, body, options);
15219
15306
  }
15220
15307
 
15221
- /**
15222
- * GET /discount/all - Get all discounts
15223
- *
15224
- * @param options - additional request options
15225
- */
15226
- get_discounts_all(options?: RequestOptions): ResponsePromise<GetDiscountsAllResponse> {
15227
- return this.request('discount', '/discount/all', 'GET', `/discount/all`, null, options);
15228
- }
15229
-
15230
15308
  /**
15231
15309
  * POST /discount/event - Handle discount event
15232
15310
  *
@@ -225,36 +225,6 @@ export interface GetDiscountsResponseDTO {
225
225
  discounts: DiscountDTO[];
226
226
  }
227
227
 
228
- export interface DiscountWithEntities {
229
- // discount id
230
- id: string;
231
- // user id of discount creator
232
- createdBy: string;
233
- // user id of most recent update
234
- updatedBy: string;
235
- // What the discount applies to
236
- appliesTo: 'order' | 'items';
237
- // What the discount type is
238
- type: 'Total Order' | 'Single Items' | 'Bundle';
239
- createdAt: string;
240
- updatedAt: string;
241
- name: string;
242
- status: DiscountStatus;
243
- is?: DiscountIs;
244
- meta?: DiscountMeta;
245
- schedule?: DiscountSchedule;
246
- channelConfig: DiscountChannelConfig;
247
- itemLevelConfig?: ItemLevelConfig;
248
- siteCount: number;
249
- brandCount: number;
250
- sites?: DiscountSite[];
251
- brands?: DiscountBrand[];
252
- }
253
-
254
- export interface GetAllDiscountsResponseDTO {
255
- discounts: DiscountWithEntities[];
256
- }
257
-
258
228
  export interface PatchDiscountRequestDTO {
259
229
  // What the discount applies to
260
230
  appliesTo?: 'order' | 'items';
@@ -573,10 +543,6 @@ export type PostDiscountBody = PostDiscountRequestDTO;
573
543
 
574
544
  export type PostDiscountResponse = PostDiscountResponseDTO;
575
545
 
576
- // GET /discount/all - Get all discounts
577
-
578
- export type GetDiscountsAllResponse = GetAllDiscountsResponseDTO;
579
-
580
546
  // POST /discount/event - Handle discount event
581
547
 
582
548
  export type PostDiscountEventBody = PostDiscountEventRequestDTO;
@@ -2040,6 +2040,50 @@ export interface SwappedCategoryDTO {
2040
2040
  sequence?: number;
2041
2041
  }
2042
2042
 
2043
+ export interface FetchMetaDTO {
2044
+ result_count?: number;
2045
+ }
2046
+
2047
+ export interface FetchEntityWithMenusDTO {
2048
+ id?: string;
2049
+ name?: string;
2050
+ menus?: FetchMenuDTO[];
2051
+ }
2052
+
2053
+ export interface FetchMenuDTO {
2054
+ id?: string;
2055
+ name?: string;
2056
+ categories?: FetchCategoryDTO[];
2057
+ }
2058
+
2059
+ export interface FetchCategoryDTO {
2060
+ id?: string;
2061
+ name?: string;
2062
+ }
2063
+
2064
+ export interface FetchEntityWithMenusAndItemsDTO {
2065
+ id?: string;
2066
+ name?: string;
2067
+ menus?: FetchMenuWithItemsDTO[];
2068
+ }
2069
+
2070
+ export interface FetchMenuWithItemsDTO {
2071
+ id?: string;
2072
+ name?: string;
2073
+ categories?: FetchCategoryWithItemsDTO[];
2074
+ }
2075
+
2076
+ export interface FetchCategoryWithItemsDTO {
2077
+ id?: string;
2078
+ name?: string;
2079
+ items?: FetchItemDTO[];
2080
+ }
2081
+
2082
+ export interface FetchItemDTO {
2083
+ id?: string;
2084
+ name?: string;
2085
+ }
2086
+
2043
2087
  export interface PartialItemDTO {
2044
2088
  base_item_id?: string;
2045
2089
  is_published?: boolean;
@@ -2141,6 +2185,43 @@ export interface MenuSizeDTO {
2141
2185
  [index: string]: any;
2142
2186
  }
2143
2187
 
2188
+ export interface FetchStationWithMenusDTO {
2189
+ id?: string;
2190
+ name?: string;
2191
+ menus?: FetchStationMenuDTO[];
2192
+ }
2193
+
2194
+ export interface FetchStationMenuDTO {
2195
+ id?: string;
2196
+ name?: string;
2197
+ categories?: FetchStationCategoryDTO[];
2198
+ }
2199
+
2200
+ export interface FetchStationCategoryDTO {
2201
+ items?: FetchItemDTO[];
2202
+ id?: string;
2203
+ name?: string;
2204
+ [index: string]: any;
2205
+ }
2206
+
2207
+ export interface FetchSiteWithStationsDTO {
2208
+ id?: string;
2209
+ name?: string;
2210
+ stations?: FetchStationDTO[];
2211
+ }
2212
+
2213
+ export interface FetchStationDTO {
2214
+ id?: string;
2215
+ name?: string;
2216
+ menus?: FetchStationItemStationMenuDTO[];
2217
+ }
2218
+
2219
+ export interface FetchStationItemStationMenuDTO {
2220
+ id?: string;
2221
+ name?: string;
2222
+ categories?: FetchCategoryWithItemsDTO[];
2223
+ }
2224
+
2144
2225
  export interface HealthDependencyDTO {
2145
2226
  name: string;
2146
2227
  status: string;
@@ -8761,6 +8842,36 @@ export interface GetMenuV4BrandExportRequest
8761
8842
  RequestQuery<GetMenuV4BrandExportQuery>,
8762
8843
  GetMenuV4BrandExportPath {}
8763
8844
 
8845
+ // POST /menu/v4/brands/fetch
8846
+
8847
+ export interface PostMenuV4BrandsFetchQuery {
8848
+ 'body.brand_ids'?: string[];
8849
+ }
8850
+
8851
+ export interface PostMenuV4BrandsFetchResponse {
8852
+ meta?: FetchMetaDTO;
8853
+ results?: FetchEntityWithMenusDTO[];
8854
+ }
8855
+
8856
+ export interface PostMenuV4BrandsFetchRequest
8857
+ extends BaseRequest,
8858
+ RequestQuery<PostMenuV4BrandsFetchQuery> {}
8859
+
8860
+ // POST /menu/v4/brand/items/search
8861
+
8862
+ export interface PostMenuV4BrandItemsSearchQuery {
8863
+ 'body.brand_ids'?: string[];
8864
+ }
8865
+
8866
+ export interface PostMenuV4BrandItemsSearchResponse {
8867
+ meta?: FetchMetaDTO;
8868
+ menuBrands?: FetchEntityWithMenusAndItemsDTO[];
8869
+ }
8870
+
8871
+ export interface PostMenuV4BrandItemsSearchRequest
8872
+ extends BaseRequest,
8873
+ RequestQuery<PostMenuV4BrandItemsSearchQuery> {}
8874
+
8764
8875
  // POST /menu/v4/item/{id}/attachment/{name}
8765
8876
 
8766
8877
  export interface PostMenuV4ItemAttachmentPath {
@@ -10818,6 +10929,36 @@ export interface GetMenuV4CategoryAttachableItemsRequest
10818
10929
  RequestQuery<GetMenuV4CategoryAttachableItemsQuery>,
10819
10930
  GetMenuV4CategoryAttachableItemsPath {}
10820
10931
 
10932
+ // POST /menu/v4/stations/menus/fetch
10933
+
10934
+ export interface PostMenuV4StationsMenusFetchQuery {
10935
+ 'body.station_ids'?: string[];
10936
+ }
10937
+
10938
+ export interface PostMenuV4StationsMenusFetchResponse {
10939
+ meta?: FetchMetaDTO;
10940
+ results?: FetchStationWithMenusDTO[];
10941
+ }
10942
+
10943
+ export interface PostMenuV4StationsMenusFetchRequest
10944
+ extends BaseRequest,
10945
+ RequestQuery<PostMenuV4StationsMenusFetchQuery> {}
10946
+
10947
+ // POST /menu/v4/station/items/search
10948
+
10949
+ export interface PostMenuV4StationItemsSearchQuery {
10950
+ 'body.station_ids'?: string[];
10951
+ }
10952
+
10953
+ export interface PostMenuV4StationItemsSearchResponse {
10954
+ meta?: FetchMetaDTO;
10955
+ sites?: FetchSiteWithStationsDTO[];
10956
+ }
10957
+
10958
+ export interface PostMenuV4StationItemsSearchRequest
10959
+ extends BaseRequest,
10960
+ RequestQuery<PostMenuV4StationItemsSearchQuery> {}
10961
+
10821
10962
  // GET /menu/v3/ping
10822
10963
 
10823
10964
  export interface GetMenuV3PingResponse {