@compassdigital/sdk.typescript 4.765.0 → 4.767.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.765.0",
3
+ "version": "4.767.0",
4
4
  "description": "Compass Digital Labs TypeScript SDK",
5
5
  "type": "commonjs",
6
6
  "main": "./lib/index.js",
package/src/index.ts CHANGED
@@ -1487,6 +1487,16 @@ import {
1487
1487
  PutAuthOauthClientResponse,
1488
1488
  GetAuthOauthClientResponse,
1489
1489
  DeleteAuthOauthClientResponse,
1490
+ GetAuthOpenidConfigurationResponse,
1491
+ PostAuthOidcRegisterBody,
1492
+ PostAuthOidcRegisterResponse,
1493
+ GetAuthAuthorizeQuery,
1494
+ GetAuthAuthorizeResponse,
1495
+ GetAuthAuthorizeRequestResponse,
1496
+ PostAuthAuthorizeLoginBody,
1497
+ PostAuthAuthorizeLoginResponse,
1498
+ PostAuthAuthorizeSsoBody,
1499
+ PostAuthAuthorizeSsoResponse,
1490
1500
  } from './interface/auth';
1491
1501
 
1492
1502
  import {
@@ -17225,6 +17235,117 @@ export class ServiceClient extends BaseServiceClient {
17225
17235
  );
17226
17236
  }
17227
17237
 
17238
+ /**
17239
+ * GET /auth/.well-known/openid-configuration - OpenID Provider metadata (RFC 8414 discovery document).
17240
+ *
17241
+ * @param options - additional request options
17242
+ */
17243
+ get_auth_openid_configuration(
17244
+ options?: RequestOptions,
17245
+ ): ResponsePromise<GetAuthOpenidConfigurationResponse> {
17246
+ return this.request(
17247
+ 'auth',
17248
+ '/auth/.well-known/openid-configuration',
17249
+ 'GET',
17250
+ `/auth/.well-known/openid-configuration`,
17251
+ null,
17252
+ options,
17253
+ );
17254
+ }
17255
+
17256
+ /**
17257
+ * POST /auth/oidc/register - RFC 7591 dynamic client registration for public (PKCE-only) clients.
17258
+ *
17259
+ * @param body
17260
+ * @param options - additional request options
17261
+ */
17262
+ post_auth_oidc_register(
17263
+ body: PostAuthOidcRegisterBody,
17264
+ options?: RequestOptions,
17265
+ ): ResponsePromise<PostAuthOidcRegisterResponse> {
17266
+ return this.request(
17267
+ 'auth',
17268
+ '/auth/oidc/register',
17269
+ 'POST',
17270
+ `/auth/oidc/register`,
17271
+ body,
17272
+ options,
17273
+ );
17274
+ }
17275
+
17276
+ /**
17277
+ * GET /auth/authorize - OAuth 2.1 authorization endpoint. Stores the request and redirects to the login page.
17278
+ *
17279
+ * @param options - additional request options
17280
+ */
17281
+ get_auth_authorize(
17282
+ options?: {
17283
+ query?: GetAuthAuthorizeQuery;
17284
+ } & RequestOptions,
17285
+ ): ResponsePromise<GetAuthAuthorizeResponse> {
17286
+ return this.request('auth', '/auth/authorize', 'GET', `/auth/authorize`, null, options);
17287
+ }
17288
+
17289
+ /**
17290
+ * GET /auth/authorize/request/{request_id} - What the login page needs to render a pending authorization request.
17291
+ *
17292
+ * @param request_id
17293
+ * @param options - additional request options
17294
+ */
17295
+ get_auth_authorize_request(
17296
+ request_id: string,
17297
+ options?: RequestOptions,
17298
+ ): ResponsePromise<GetAuthAuthorizeRequestResponse> {
17299
+ return this.request(
17300
+ 'auth',
17301
+ '/auth/authorize/request/{request_id}',
17302
+ 'GET',
17303
+ `/auth/authorize/request/${request_id}`,
17304
+ null,
17305
+ options,
17306
+ );
17307
+ }
17308
+
17309
+ /**
17310
+ * POST /auth/authorize/login - Password login for a pending authorization request.
17311
+ *
17312
+ * @param body
17313
+ * @param options - additional request options
17314
+ */
17315
+ post_auth_authorize_login(
17316
+ body: PostAuthAuthorizeLoginBody,
17317
+ options?: RequestOptions,
17318
+ ): ResponsePromise<PostAuthAuthorizeLoginResponse> {
17319
+ return this.request(
17320
+ 'auth',
17321
+ '/auth/authorize/login',
17322
+ 'POST',
17323
+ `/auth/authorize/login`,
17324
+ body,
17325
+ options,
17326
+ );
17327
+ }
17328
+
17329
+ /**
17330
+ * POST /auth/authorize/sso - SSO login for a pending authorization request, using the secure exchange token minted by POST /auth/sso/exchange.
17331
+ *
17332
+ * @param body
17333
+ * @param options - additional request options
17334
+ */
17335
+ post_auth_authorize_sso(
17336
+ body: PostAuthAuthorizeSsoBody,
17337
+ options?: RequestOptions,
17338
+ ): ResponsePromise<PostAuthAuthorizeSsoResponse> {
17339
+ return this.request(
17340
+ 'auth',
17341
+ '/auth/authorize/sso',
17342
+ 'POST',
17343
+ `/auth/authorize/sso`,
17344
+ body,
17345
+ options,
17346
+ );
17347
+ }
17348
+
17228
17349
  /**
17229
17350
  * GET /review - Get reviews by taxonomy
17230
17351
  *
@@ -214,6 +214,14 @@ export interface TokenRequestDTO {
214
214
  subject_token?: string;
215
215
  subject_token_type?: string;
216
216
  requested_token_type?: string;
217
+ // authorization_code grant: the single-use code.
218
+ code?: string;
219
+ // authorization_code grant: the PKCE code_verifier.
220
+ code_verifier?: string;
221
+ // authorization_code grant: must match the authorization request.
222
+ redirect_uri?: string;
223
+ // refresh_token grant: the refresh token to rotate.
224
+ refresh_token?: string;
217
225
  }
218
226
 
219
227
  export interface TokenResponseDTO {
@@ -223,6 +231,16 @@ export interface TokenResponseDTO {
223
231
  expires_in: number;
224
232
  // Only present on the token_exchange grant, per RFC 8693 §2.2.1.
225
233
  issued_token_type?: string;
234
+ // Only present on the authorization_code and refresh_token grants. Rotated on every refresh.
235
+ refresh_token?: string;
236
+ // Space-delimited scopes granted, echoed back on the authorization_code and refresh_token grants.
237
+ scope?: string;
238
+ }
239
+
240
+ export interface OAuthErrorResponseDTO {
241
+ // OAuth error code, e.g. invalid_grant.
242
+ error: string;
243
+ error_description: string;
226
244
  }
227
245
 
228
246
  export interface OAuthClientCreateRequestDTO {
@@ -259,6 +277,64 @@ export interface OAuthClientListResponseDTO {
259
277
  createdAt: string;
260
278
  }
261
279
 
280
+ export interface OpenIdConfigurationResponseDTO {
281
+ issuer: string;
282
+ authorization_endpoint: string;
283
+ token_endpoint: string;
284
+ registration_endpoint: string;
285
+ response_types_supported: string[];
286
+ grant_types_supported: string[];
287
+ code_challenge_methods_supported: string[];
288
+ token_endpoint_auth_methods_supported: string[];
289
+ scopes_supported: string[];
290
+ }
291
+
292
+ export interface OidcRegisterRequestDTO {
293
+ redirect_uris: string[];
294
+ client_name?: string;
295
+ grant_types?: string[];
296
+ token_endpoint_auth_method?: 'none';
297
+ // Space-delimited scope string.
298
+ scope?: string;
299
+ }
300
+
301
+ export interface OidcRegisterResponseDTO {
302
+ client_id: string;
303
+ // Epoch seconds.
304
+ client_id_issued_at: number;
305
+ client_name?: string;
306
+ redirect_uris: string[];
307
+ grant_types: string[];
308
+ response_types: string[];
309
+ token_endpoint_auth_method: 'none';
310
+ // Space-delimited scope string.
311
+ scope: string;
312
+ }
313
+
314
+ export interface AuthorizeRequestResponseDTO {
315
+ // Display name of the OAuth client requesting access.
316
+ client_name: string;
317
+ scopes: string[];
318
+ realm: string;
319
+ }
320
+
321
+ export interface AuthorizeLoginRequestDTO {
322
+ request_id: string;
323
+ email: string;
324
+ password: string;
325
+ }
326
+
327
+ export interface AuthorizeRedirectResponseDTO {
328
+ // Where the login page must send the browser next: the client's redirect_uri with `code` and `state` appended.
329
+ redirect_to: string;
330
+ }
331
+
332
+ export interface AuthorizeSsoRequestDTO {
333
+ request_id: string;
334
+ // Secure exchange token minted by POST /auth/sso/exchange.
335
+ token: string;
336
+ }
337
+
262
338
  // POST /auth/flow - Determines the authentication flow for a user based on their email address
263
339
 
264
340
  export type PostAuthFlowBody = SSOFlowRequestDTO;
@@ -437,3 +513,50 @@ export interface DeleteAuthOauthClientPath {
437
513
  }
438
514
 
439
515
  export type DeleteAuthOauthClientResponse = OAuthClientResponseDTO;
516
+
517
+ // GET /auth/.well-known/openid-configuration - OpenID Provider metadata (RFC 8414 discovery document).
518
+
519
+ export type GetAuthOpenidConfigurationResponse = OpenIdConfigurationResponseDTO;
520
+
521
+ // POST /auth/oidc/register - RFC 7591 dynamic client registration for public (PKCE-only) clients.
522
+
523
+ export type PostAuthOidcRegisterBody = OidcRegisterRequestDTO;
524
+
525
+ export type PostAuthOidcRegisterResponse = OidcRegisterResponseDTO;
526
+
527
+ // GET /auth/authorize - OAuth 2.1 authorization endpoint. Stores the request and redirects to the login page.
528
+
529
+ export interface GetAuthAuthorizeQuery {
530
+ client_id?: string;
531
+ redirect_uri?: string;
532
+ response_type?: 'code';
533
+ // Space-delimited scope string.
534
+ scope?: string;
535
+ state?: string;
536
+ code_challenge?: string;
537
+ code_challenge_method?: 'S256';
538
+ // RFC 8707 resource indicator.
539
+ resource?: string;
540
+ }
541
+
542
+ export type GetAuthAuthorizeResponse = {};
543
+
544
+ // GET /auth/authorize/request/{request_id} - What the login page needs to render a pending authorization request.
545
+
546
+ export interface GetAuthAuthorizeRequestPath {
547
+ request_id: string;
548
+ }
549
+
550
+ export type GetAuthAuthorizeRequestResponse = AuthorizeRequestResponseDTO;
551
+
552
+ // POST /auth/authorize/login - Password login for a pending authorization request.
553
+
554
+ export type PostAuthAuthorizeLoginBody = AuthorizeLoginRequestDTO;
555
+
556
+ export type PostAuthAuthorizeLoginResponse = AuthorizeRedirectResponseDTO;
557
+
558
+ // POST /auth/authorize/sso - SSO login for a pending authorization request, using the secure exchange token minted by POST /auth/sso/exchange.
559
+
560
+ export type PostAuthAuthorizeSsoBody = AuthorizeSsoRequestDTO;
561
+
562
+ export type PostAuthAuthorizeSsoResponse = AuthorizeRedirectResponseDTO;
@@ -2096,6 +2096,13 @@ export interface ReorderMenuItemDTO {
2096
2096
  [index: string]: any;
2097
2097
  }
2098
2098
 
2099
+ export interface BulkGeneratedBarcodeDTO {
2100
+ item_id: string;
2101
+ barcode: string;
2102
+ generated: boolean;
2103
+ [index: string]: any;
2104
+ }
2105
+
2099
2106
  export interface DraftModifierGroupEntityDTO {
2100
2107
  parent?: DraftModifierGroupDTO;
2101
2108
  children?: DraftModifierGroupDTO[];
@@ -8743,7 +8750,10 @@ export interface PostMenuV4BrandGenerateBarcodesBody {
8743
8750
  }
8744
8751
 
8745
8752
  export interface PostMenuV4BrandGenerateBarcodesResponse {
8746
- generated?: number;
8753
+ generated: number;
8754
+ items: BulkGeneratedBarcodeDTO[];
8755
+ not_found: string[];
8756
+ [index: string]: any;
8747
8757
  }
8748
8758
 
8749
8759
  export interface PostMenuV4BrandGenerateBarcodesRequest