@cubist-labs/cubesigner-sdk 0.4.227 → 0.4.228

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/schema.ts CHANGED
@@ -1129,6 +1129,15 @@ export interface paths {
1129
1129
  */
1130
1130
  put: operations["addUserToRole"];
1131
1131
  };
1132
+ "/v0/org/{org_id}/roles/{role_id}/attest": {
1133
+ /**
1134
+ * Attest to Role Properties
1135
+ * @description Attest to Role Properties
1136
+ *
1137
+ * The response is a JWT whose claims are the requested role properties.
1138
+ */
1139
+ get: operations["attestRole"];
1140
+ };
1132
1141
  "/v0/org/{org_id}/roles/{role_id}/keys": {
1133
1142
  /**
1134
1143
  * List Role Keys
@@ -2923,6 +2932,7 @@ export interface components {
2923
2932
  | "ResetMemberMfa"
2924
2933
  | "CompleteResetMemberMfa"
2925
2934
  | "CreateRole"
2935
+ | "AttestRole"
2926
2936
  | "GetRole"
2927
2937
  | "ListTokenKeys"
2928
2938
  | "ListRoles"
@@ -4614,6 +4624,7 @@ export interface components {
4614
4624
  | "manage:role:create"
4615
4625
  | "manage:role:delete"
4616
4626
  | "manage:role:get:*"
4627
+ | "manage:role:attest"
4617
4628
  | "manage:role:get:keys"
4618
4629
  | "manage:role:get:keys:list"
4619
4630
  | "manage:role:get:keys:get"
@@ -5320,6 +5331,13 @@ export interface components {
5320
5331
  /** @description The keys included in this set */
5321
5332
  keys: Record<string, never>[];
5322
5333
  };
5334
+ KeyAttestationClaims: {
5335
+ exp: components["schemas"]["EpochDateTime"];
5336
+ iat: components["schemas"]["EpochDateTime"];
5337
+ key_info: components["schemas"]["KeyInfo"];
5338
+ /** @description If requested, the roles the key is currently in. */
5339
+ key_roles?: components["schemas"]["KeyInRoleInfo"][] | null;
5340
+ };
5323
5341
  KeyCountDimensions: {
5324
5342
  /** @description The key type */
5325
5343
  key_type: string;
@@ -7552,13 +7570,32 @@ export interface components {
7552
7570
  * @enum {string}
7553
7571
  */
7554
7572
  RoleAction: "CreateToken" | "GetKey";
7573
+ RoleAttestationClaims: {
7574
+ exp: components["schemas"]["EpochDateTime"];
7575
+ iat: components["schemas"]["EpochDateTime"];
7576
+ query: components["schemas"]["RoleAttestationQuery"];
7577
+ role_info: components["schemas"]["RoleInfo"];
7578
+ /** @description The information about the keys currently in this role. */
7579
+ role_keys?: components["schemas"]["KeyInRoleInfo"][] | null;
7580
+ /** @description The IDs of the users who are currently in this role. */
7581
+ role_users: string[];
7582
+ };
7583
+ RoleAttestationQuery: {
7584
+ key_filter?: components["schemas"]["Id"] | null;
7585
+ verbosity?: components["schemas"]["RoleAttestationVerbosity"];
7586
+ };
7587
+ /**
7588
+ * @description Specifies which role properties to include in an attestation
7589
+ * @enum {string}
7590
+ */
7591
+ RoleAttestationVerbosity: "Summary" | "WithKeys" | "Full";
7555
7592
  RoleInfo: components["schemas"]["CommonFields"] & {
7556
7593
  /**
7557
7594
  * @description Whether the role is enabled
7558
7595
  * @example true
7559
7596
  */
7560
7597
  enabled: boolean;
7561
- /** @description Deprecated The CubeSigner IDs of at most 100 keys associated with this role */
7598
+ /** @description Deprecated. The CubeSigner IDs of at most 100 keys associated with this role. */
7562
7599
  keys?: components["schemas"]["KeyInRoleInfo"][] | null;
7563
7600
  /**
7564
7601
  * @description Whether the current user is a member of the role. This is always true,
@@ -7595,6 +7632,11 @@ export interface components {
7595
7632
  /** @description Deprecated. The list of at most 100 users with access to the role. */
7596
7633
  users?: string[] | null;
7597
7634
  };
7635
+ /** @description Response returned when requesting a role attestation. */
7636
+ RoleInfoJwt: {
7637
+ /** @description A JSON Web Token whose claims contain the `RoleInfo` structure. */
7638
+ jwt: string;
7639
+ };
7598
7640
  /** @description All scopes for accessing CubeSigner APIs */
7599
7641
  Scope: components["schemas"]["ExplicitScope"] | string;
7600
7642
  /** @description A set of scopes. */
@@ -10326,7 +10368,7 @@ export interface components {
10326
10368
  * @example true
10327
10369
  */
10328
10370
  enabled: boolean;
10329
- /** @description Deprecated The CubeSigner IDs of at most 100 keys associated with this role */
10371
+ /** @description Deprecated. The CubeSigner IDs of at most 100 keys associated with this role. */
10330
10372
  keys?: components["schemas"]["KeyInRoleInfo"][] | null;
10331
10373
  /**
10332
10374
  * @description Whether the current user is a member of the role. This is always true,
@@ -10365,6 +10407,15 @@ export interface components {
10365
10407
  };
10366
10408
  };
10367
10409
  };
10410
+ /** @description Response returned when requesting a role attestation. */
10411
+ RoleInfoJwt: {
10412
+ content: {
10413
+ "application/json": {
10414
+ /** @description A JSON Web Token whose claims contain the `RoleInfo` structure. */
10415
+ jwt: string;
10416
+ };
10417
+ };
10418
+ };
10368
10419
  SessionInfo: {
10369
10420
  content: {
10370
10421
  "application/json": components["schemas"]["SessionMetadata"] & {
@@ -12780,6 +12831,9 @@ export interface operations {
12780
12831
  */
12781
12832
  attestKey: {
12782
12833
  parameters: {
12834
+ query?: {
12835
+ include_roles?: boolean | null;
12836
+ };
12783
12837
  path: {
12784
12838
  /**
12785
12839
  * @description Name or ID of the desired Org
@@ -14234,6 +14288,9 @@ export interface operations {
14234
14288
  */
14235
14289
  getRole: {
14236
14290
  parameters: {
14291
+ query?: {
14292
+ summarize?: boolean | null;
14293
+ };
14237
14294
  path: {
14238
14295
  /**
14239
14296
  * @description Name or ID of the desired Org
@@ -14440,6 +14497,48 @@ export interface operations {
14440
14497
  };
14441
14498
  };
14442
14499
  };
14500
+ /**
14501
+ * Attest to Role Properties
14502
+ * @description Attest to Role Properties
14503
+ *
14504
+ * The response is a JWT whose claims are the requested role properties.
14505
+ */
14506
+ attestRole: {
14507
+ parameters: {
14508
+ query?: {
14509
+ /**
14510
+ * @description Role properties to include in an attestation. Defaults to basic role
14511
+ * properties, including associated users, but excluding associated keys.
14512
+ */
14513
+ verbosity?: components["schemas"]["RoleAttestationVerbosity"];
14514
+ /**
14515
+ * @description Associated keys filter, i.e., when specified, out all other associated
14516
+ * keys are filtered out. Defaults to including all associated keys.
14517
+ */
14518
+ key_filter?: components["schemas"]["Id"] | null;
14519
+ };
14520
+ path: {
14521
+ /**
14522
+ * @description Name or ID of the desired Org
14523
+ * @example Org#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
14524
+ */
14525
+ org_id: string;
14526
+ /**
14527
+ * @description Name or ID of the desired Role
14528
+ * @example Role#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
14529
+ */
14530
+ role_id: string;
14531
+ };
14532
+ };
14533
+ responses: {
14534
+ 200: components["responses"]["RoleInfoJwt"];
14535
+ default: {
14536
+ content: {
14537
+ "application/json": components["schemas"]["ErrorResponse"];
14538
+ };
14539
+ };
14540
+ };
14541
+ };
14443
14542
  /**
14444
14543
  * List Role Keys
14445
14544
  * @description List Role Keys
@@ -1,4 +1,4 @@
1
- import type { components, operations } from "./schema";
1
+ import type { components, operations, paths } from "./schema";
2
2
  import type { JsonMap, JsonValue } from "./util";
3
3
 
4
4
  export type schemas = components["schemas"];
@@ -81,6 +81,14 @@ export type KeyProperties = schemas["CreateAndUpdateKeyProperties"];
81
81
  export type CreateKeyRequest = schemas["CreateKeyRequest"];
82
82
  export type KeyInfo = schemas["KeyInfo"];
83
83
  export type KeyInfoJwt = schemas["KeyInfoJwt"];
84
+ export type KeyAttestationClaims = schemas["KeyAttestationClaims"];
85
+ export type KeyAttestationQuery =
86
+ paths["/v0/org/{org_id}/keys/{key_id}/attest"]["get"]["parameters"]["query"];
87
+ export type RoleInfoJwt = schemas["RoleInfoJwt"];
88
+ export type RoleAttestationClaims = schemas["RoleAttestationClaims"];
89
+ export type RoleAttestationQuery =
90
+ paths["/v0/org/{org_id}/roles/{role_id}/attest"]["get"]["parameters"]["query"];
91
+ export type RoleAttestationVerbosity = schemas["RoleAttestationVerbosity"];
84
92
  export type KeyInRoleInfo = schemas["KeyInRoleInfo"];
85
93
  export type GetUsersInOrgResponse = schemas["PaginatedGetUsersInOrgResponse"];
86
94
  export type GetUserByEmailResponse = schemas["GetUserByEmailResponse"];
package/src/scopes.ts CHANGED
@@ -129,6 +129,7 @@ export const AllScopes: Record<ExplicitScope, string> =
129
129
  "manage:policy:createImportKey" : "Allows access only to the policy key endpoint",
130
130
  "manage:role:*" : "Allows access to all role endpoints",
131
131
  "manage:role:readonly" : "Allows access to all role readonly endpoints",
132
+ "manage:role:attest" : "Allows access only to the role 'attest' endpoint",
132
133
  "manage:role:create" : "Allows access only to the role 'create' endpoint",
133
134
  "manage:role:delete" : "Allows access only to the role 'delete' endpoint",
134
135
  "manage:role:get:*" : "Allows access only to the role 'get' endpoint",