@compassdigital/sdk.typescript 4.731.0 → 4.733.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
@@ -1235,6 +1235,8 @@ import {
1235
1235
  GetConsumerLocationGroupResponse$0,
1236
1236
  GetConsumerLocationMultigroupQuery,
1237
1237
  GetConsumerLocationMultigroupResponse,
1238
+ GetConsumerClientGroupsQuery,
1239
+ GetConsumerClientGroupsResponse$0,
1238
1240
  GetConsumerActiveMenusQuery,
1239
1241
  GetConsumerActiveMenusResponse,
1240
1242
  GetConsumerMenuRecommendedItemsQuery,
@@ -1455,6 +1457,17 @@ import {
1455
1457
  PostAuthJwtAssertionBody,
1456
1458
  PostAuthJwtAssertionResponse,
1457
1459
  GetAuthJwtAssertionJwkResponse,
1460
+ GetAuthConnectProviderAuthorizeQuery,
1461
+ GetAuthConnectProviderAuthorizeResponse,
1462
+ PostAuthConnectProviderConfigBody,
1463
+ PostAuthConnectProviderConfigResponse,
1464
+ PutAuthConnectProviderConfigBody,
1465
+ PutAuthConnectProviderConfigResponse,
1466
+ GetAuthConnectProviderConfigQuery,
1467
+ GetAuthConnectProviderConfigResponse,
1468
+ DeleteAuthConnectProviderConfigQuery,
1469
+ DeleteAuthConnectProviderConfigResponse,
1470
+ GetAuthConnectProvidersResponse,
1458
1471
  } from './interface/auth';
1459
1472
 
1460
1473
  import {
@@ -14275,6 +14288,28 @@ export class ServiceClient extends BaseServiceClient {
14275
14288
  );
14276
14289
  }
14277
14290
 
14291
+ /**
14292
+ * GET /consumer/client-groups/{client} - Get a client's nearest sites with their business units and stations
14293
+ *
14294
+ * @param client - Client slug whose sites are returned
14295
+ * @param options - additional request options
14296
+ */
14297
+ get_consumer_client_groups(
14298
+ client: string,
14299
+ options: {
14300
+ query: GetConsumerClientGroupsQuery;
14301
+ } & RequestOptions,
14302
+ ): ResponsePromise<GetConsumerClientGroupsResponse$0> {
14303
+ return this.request(
14304
+ 'consumer',
14305
+ '/consumer/client-groups/{client}',
14306
+ 'GET',
14307
+ `/consumer/client-groups/${client}`,
14308
+ null,
14309
+ options,
14310
+ );
14311
+ }
14312
+
14278
14313
  /**
14279
14314
  * GET /consumer/active-menus/{stationId} - Get current menu
14280
14315
  *
@@ -16803,6 +16838,134 @@ export class ServiceClient extends BaseServiceClient {
16803
16838
  );
16804
16839
  }
16805
16840
 
16841
+ /**
16842
+ * GET /auth/connect/providers/{provider}/authorize - Starts linking a messaging identity (Slack, Teams) to the caller's CD account.
16843
+ *
16844
+ * @param provider
16845
+ * @param options - additional request options
16846
+ */
16847
+ get_auth_connect_provider_authorize(
16848
+ provider: string,
16849
+ options: {
16850
+ query: GetAuthConnectProviderAuthorizeQuery;
16851
+ } & RequestOptions,
16852
+ ): ResponsePromise<GetAuthConnectProviderAuthorizeResponse> {
16853
+ return this.request(
16854
+ 'auth',
16855
+ '/auth/connect/providers/{provider}/authorize',
16856
+ 'GET',
16857
+ `/auth/connect/providers/${provider}/authorize`,
16858
+ null,
16859
+ options,
16860
+ );
16861
+ }
16862
+
16863
+ /**
16864
+ * POST /auth/connect/providers/{provider} - Registers a provider's OIDC config for a product (e.g. Slack for thrive).
16865
+ *
16866
+ * @param provider
16867
+ * @param body
16868
+ * @param options - additional request options
16869
+ */
16870
+ post_auth_connect_provider_config(
16871
+ provider: string,
16872
+ body: PostAuthConnectProviderConfigBody,
16873
+ options?: RequestOptions,
16874
+ ): ResponsePromise<PostAuthConnectProviderConfigResponse> {
16875
+ return this.request(
16876
+ 'auth',
16877
+ '/auth/connect/providers/{provider}',
16878
+ 'POST',
16879
+ `/auth/connect/providers/${provider}`,
16880
+ body,
16881
+ options,
16882
+ );
16883
+ }
16884
+
16885
+ /**
16886
+ * PUT /auth/connect/providers/{provider} - Updates a product's existing OIDC provider config (full replace).
16887
+ *
16888
+ * @param provider
16889
+ * @param body
16890
+ * @param options - additional request options
16891
+ */
16892
+ put_auth_connect_provider_config(
16893
+ provider: string,
16894
+ body: PutAuthConnectProviderConfigBody,
16895
+ options?: RequestOptions,
16896
+ ): ResponsePromise<PutAuthConnectProviderConfigResponse> {
16897
+ return this.request(
16898
+ 'auth',
16899
+ '/auth/connect/providers/{provider}',
16900
+ 'PUT',
16901
+ `/auth/connect/providers/${provider}`,
16902
+ body,
16903
+ options,
16904
+ );
16905
+ }
16906
+
16907
+ /**
16908
+ * GET /auth/connect/providers/{provider} - Returns a product's registered OIDC provider config.
16909
+ *
16910
+ * @param provider
16911
+ * @param options - additional request options
16912
+ */
16913
+ get_auth_connect_provider_config(
16914
+ provider: string,
16915
+ options: {
16916
+ query: GetAuthConnectProviderConfigQuery;
16917
+ } & RequestOptions,
16918
+ ): ResponsePromise<GetAuthConnectProviderConfigResponse> {
16919
+ return this.request(
16920
+ 'auth',
16921
+ '/auth/connect/providers/{provider}',
16922
+ 'GET',
16923
+ `/auth/connect/providers/${provider}`,
16924
+ null,
16925
+ options,
16926
+ );
16927
+ }
16928
+
16929
+ /**
16930
+ * DELETE /auth/connect/providers/{provider} - Deletes a product's OIDC provider config.
16931
+ *
16932
+ * @param provider
16933
+ * @param options - additional request options
16934
+ */
16935
+ delete_auth_connect_provider_config(
16936
+ provider: string,
16937
+ options: {
16938
+ query: DeleteAuthConnectProviderConfigQuery;
16939
+ } & RequestOptions,
16940
+ ): ResponsePromise<DeleteAuthConnectProviderConfigResponse> {
16941
+ return this.request(
16942
+ 'auth',
16943
+ '/auth/connect/providers/{provider}',
16944
+ 'DELETE',
16945
+ `/auth/connect/providers/${provider}`,
16946
+ null,
16947
+ options,
16948
+ );
16949
+ }
16950
+
16951
+ /**
16952
+ * GET /auth/connect/providers - Returns every registered connect provider config, across every product.
16953
+ *
16954
+ * @param options - additional request options
16955
+ */
16956
+ get_auth_connect_providers(
16957
+ options?: RequestOptions,
16958
+ ): ResponsePromise<GetAuthConnectProvidersResponse> {
16959
+ return this.request(
16960
+ 'auth',
16961
+ '/auth/connect/providers',
16962
+ 'GET',
16963
+ `/auth/connect/providers`,
16964
+ null,
16965
+ options,
16966
+ );
16967
+ }
16968
+
16806
16969
  /**
16807
16970
  * GET /review - Get reviews by taxonomy
16808
16971
  *
@@ -155,6 +155,56 @@ export interface JwtAssertionJwkResponse {
155
155
  n: string;
156
156
  }
157
157
 
158
+ export interface ConnectAuthorizeResponseDTO {
159
+ // The provider's full authorization URL — the product frontend just redirects the browser here.
160
+ authorizeUrl: string;
161
+ }
162
+
163
+ export interface ConnectProviderConfigRequestDTO {
164
+ // Which internal product this registration belongs to, e.g. "thrive".
165
+ product: string;
166
+ // The client_id this provider (Slack/Teams) assigned to our app.
167
+ oauthClientId: string;
168
+ // The client_secret this provider (Slack/Teams) assigned to our app.
169
+ oauthClientSecret: string;
170
+ authorizationEndpoint: string;
171
+ tokenEndpoint: string;
172
+ jwksUri: string;
173
+ // May contain a {tenantid} placeholder for multi-tenant issuers (e.g. Microsoft Entra).
174
+ issuer: string;
175
+ // Which id_token claim carries the external subject id.
176
+ subjectClaim: string;
177
+ // Which id_token claim carries the tenant/team id.
178
+ tenantClaim: string;
179
+ successUrl: string;
180
+ errorUrl: string;
181
+ }
182
+
183
+ export interface ConnectProviderConfigResponseDTO {
184
+ success: boolean;
185
+ }
186
+
187
+ export interface ConnectProviderConfigListResponseDTO {
188
+ // Which internal product this registration belongs to, e.g. "thrive".
189
+ product: string;
190
+ // The client_id this provider (Slack/Teams) assigned to our app.
191
+ oauthClientId: string;
192
+ authorizationEndpoint: string;
193
+ tokenEndpoint: string;
194
+ jwksUri: string;
195
+ // May contain a {tenantid} placeholder for multi-tenant issuers (e.g. Microsoft Entra).
196
+ issuer: string;
197
+ // Which id_token claim carries the external subject id.
198
+ subjectClaim: string;
199
+ // Which id_token claim carries the tenant/team id.
200
+ tenantClaim: string;
201
+ successUrl: string;
202
+ errorUrl: string;
203
+ // Which provider this registration is for, e.g. "slack".
204
+ provider: string;
205
+ createdAt: string;
206
+ }
207
+
158
208
  // POST /auth/flow - Determines the authentication flow for a user based on their email address
159
209
 
160
210
  export type PostAuthFlowBody = SSOFlowRequestDTO;
@@ -228,3 +278,66 @@ export type PostAuthJwtAssertionResponse = JwtAssertionResponse;
228
278
  // GET /auth/jwt-assertion/jwk - Get the public JWK for JWT assertion
229
279
 
230
280
  export type GetAuthJwtAssertionJwkResponse = JwtAssertionJwkResponse;
281
+
282
+ // GET /auth/connect/providers/{provider}/authorize - Starts linking a messaging identity (Slack, Teams) to the caller's CD account.
283
+
284
+ export interface GetAuthConnectProviderAuthorizePath {
285
+ provider: string;
286
+ }
287
+
288
+ export interface GetAuthConnectProviderAuthorizeQuery {
289
+ // Which internal product owns this registration, e.g. "thrive".
290
+ product: string;
291
+ }
292
+
293
+ export type GetAuthConnectProviderAuthorizeResponse = ConnectAuthorizeResponseDTO;
294
+
295
+ // POST /auth/connect/providers/{provider} - Registers a provider's OIDC config for a product (e.g. Slack for thrive).
296
+
297
+ export interface PostAuthConnectProviderConfigPath {
298
+ provider: string;
299
+ }
300
+
301
+ export type PostAuthConnectProviderConfigBody = ConnectProviderConfigRequestDTO;
302
+
303
+ export type PostAuthConnectProviderConfigResponse = ConnectProviderConfigResponseDTO;
304
+
305
+ // PUT /auth/connect/providers/{provider} - Updates a product's existing OIDC provider config (full replace).
306
+
307
+ export interface PutAuthConnectProviderConfigPath {
308
+ provider: string;
309
+ }
310
+
311
+ export type PutAuthConnectProviderConfigBody = ConnectProviderConfigRequestDTO;
312
+
313
+ export type PutAuthConnectProviderConfigResponse = ConnectProviderConfigResponseDTO;
314
+
315
+ // GET /auth/connect/providers/{provider} - Returns a product's registered OIDC provider config.
316
+
317
+ export interface GetAuthConnectProviderConfigPath {
318
+ provider: string;
319
+ }
320
+
321
+ export interface GetAuthConnectProviderConfigQuery {
322
+ // Which internal product owns this registration, e.g. "thrive".
323
+ product: string;
324
+ }
325
+
326
+ export type GetAuthConnectProviderConfigResponse = ConnectProviderConfigListResponseDTO;
327
+
328
+ // DELETE /auth/connect/providers/{provider} - Deletes a product's OIDC provider config.
329
+
330
+ export interface DeleteAuthConnectProviderConfigPath {
331
+ provider: string;
332
+ }
333
+
334
+ export interface DeleteAuthConnectProviderConfigQuery {
335
+ // Which internal product owns this registration, e.g. "thrive".
336
+ product: string;
337
+ }
338
+
339
+ export type DeleteAuthConnectProviderConfigResponse = ConnectProviderConfigResponseDTO;
340
+
341
+ // GET /auth/connect/providers - Returns every registered connect provider config, across every product.
342
+
343
+ export type GetAuthConnectProvidersResponse = ConnectProviderConfigListResponseDTO[];
@@ -1580,6 +1580,8 @@ export interface ConsumerGroupMobile {
1580
1580
 
1581
1581
  export interface ConsumerGroup {
1582
1582
  status?: 'active' | 'inactive';
1583
+ // client slug the site is assigned to
1584
+ client?: string;
1583
1585
  id?: string;
1584
1586
  name?: string;
1585
1587
  label?: {
@@ -1627,6 +1629,8 @@ export interface HomePageResponse {
1627
1629
  orders?: HomePageOrder[];
1628
1630
  // location object for the site
1629
1631
  location?: ConsumerGroup;
1632
+ // nearest sites for the client, hydrated with business units and stations
1633
+ clientGroups?: ConsumerGroup[];
1630
1634
  // free coffee object
1631
1635
  freeCoffee?: FreeCoffeeDTO;
1632
1636
  // mealplan barcode object
@@ -1759,6 +1763,8 @@ export interface GetConsumerLocationGroupResponse {
1759
1763
  timezone?: string;
1760
1764
  // site operational status
1761
1765
  status?: Record<string, any>;
1766
+ // client slug the site is assigned to
1767
+ client?: string;
1762
1768
  locations?: ConsumerLocation[];
1763
1769
  address?: ConsumerAddress;
1764
1770
  }
@@ -1772,6 +1778,13 @@ export interface GetConsumerLocationMultiGroupResponse {
1772
1778
  groups: Record<string, any>[];
1773
1779
  }
1774
1780
 
1781
+ export interface GetConsumerClientGroupsResponse {
1782
+ // Multigroup id the sites were searched within
1783
+ id: string;
1784
+ // Nearest sites assigned to the client, each hydrated with its business units and stations, ordered nearest-first.
1785
+ groups: ConsumerGroup[];
1786
+ }
1787
+
1775
1788
  export interface ConsumerGetActiveMenusResponse {
1776
1789
  // menus
1777
1790
  menus: ConsumerMenuHours[];
@@ -4697,6 +4710,12 @@ export interface GetConsumerHomePageQuery {
4697
4710
  appName?: string;
4698
4711
  // reorder eligible
4699
4712
  reorderEligible: boolean;
4713
+ // Client slug whose nearest sites are added to the response (needs latitude and longitude to sort)
4714
+ client?: string;
4715
+ // Latitude used to sort the client nearest sites
4716
+ latitude?: number;
4717
+ // Longitude used to sort the client nearest sites
4718
+ longitude?: number;
4700
4719
  }
4701
4720
 
4702
4721
  export type GetConsumerHomePageResponse = HomePageResponse;
@@ -4847,6 +4866,28 @@ export interface GetConsumerLocationMultigroupQuery {
4847
4866
 
4848
4867
  export type GetConsumerLocationMultigroupResponse = GetConsumerLocationMultiGroupResponse;
4849
4868
 
4869
+ // GET /consumer/client-groups/{client} - Get a client's nearest sites with their business units and stations
4870
+
4871
+ export interface GetConsumerClientGroupsPath {
4872
+ // Client slug whose sites are returned
4873
+ client: string;
4874
+ }
4875
+
4876
+ export interface GetConsumerClientGroupsQuery {
4877
+ // Multigroup (realm) id to search within, e.g. the app's Thrive/Boost multigroup
4878
+ multigroup: string;
4879
+ // Latitude used to sort sites by proximity
4880
+ latitude?: number;
4881
+ // Longitude used to sort sites by proximity
4882
+ longitude?: number;
4883
+ // Maximum number of nearest sites to return (default 10)
4884
+ limit?: number;
4885
+ // Optional maximum distance in km; sites farther than this are excluded. Requires numeric latitude and longitude — supplying it without them returns 400.
4886
+ max_distance_km?: number;
4887
+ }
4888
+
4889
+ export type GetConsumerClientGroupsResponse$0 = GetConsumerClientGroupsResponse;
4890
+
4850
4891
  // GET /consumer/active-menus/{stationId} - Get current menu
4851
4892
 
4852
4893
  export interface GetConsumerActiveMenusPath {