@cubist-labs/cubesigner-sdk 0.2.28 → 0.3.8

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.
Files changed (146) hide show
  1. package/README.md +30 -28
  2. package/dist/cjs/package.json +41 -0
  3. package/dist/cjs/spec/env/beta.json +9 -0
  4. package/dist/cjs/spec/env/gamma.json +9 -0
  5. package/dist/cjs/spec/env/prod.json +9 -0
  6. package/dist/cjs/src/api.d.ts +652 -0
  7. package/dist/cjs/src/api.js +1345 -0
  8. package/dist/cjs/src/client.d.ts +642 -0
  9. package/dist/cjs/src/client.js +455 -0
  10. package/dist/cjs/src/env.d.ts +15 -0
  11. package/dist/cjs/src/env.js +35 -0
  12. package/dist/cjs/src/error.d.ts +32 -0
  13. package/dist/cjs/src/error.js +37 -0
  14. package/dist/cjs/src/events.d.ts +84 -0
  15. package/dist/cjs/src/events.js +195 -0
  16. package/dist/cjs/src/index.d.ts +203 -0
  17. package/dist/cjs/src/index.js +298 -0
  18. package/dist/cjs/src/key.d.ts +169 -0
  19. package/dist/cjs/src/key.js +262 -0
  20. package/dist/{src/fido.d.ts → cjs/src/mfa.d.ts} +38 -17
  21. package/dist/cjs/src/mfa.js +172 -0
  22. package/dist/cjs/src/org.d.ts +99 -0
  23. package/dist/cjs/src/org.js +95 -0
  24. package/dist/cjs/src/paginator.d.ts +76 -0
  25. package/dist/cjs/src/paginator.js +99 -0
  26. package/dist/cjs/src/response.d.ts +114 -0
  27. package/dist/cjs/src/response.js +203 -0
  28. package/dist/cjs/src/role.d.ts +289 -0
  29. package/dist/cjs/src/role.js +261 -0
  30. package/dist/cjs/src/schema.d.ts +6404 -0
  31. package/dist/cjs/src/schema.js +7 -0
  32. package/dist/cjs/src/schema_types.d.ts +116 -0
  33. package/dist/cjs/src/schema_types.js +3 -0
  34. package/dist/cjs/src/session/session_storage.d.ts +27 -0
  35. package/dist/cjs/src/session/session_storage.js +47 -0
  36. package/dist/cjs/src/session/signer_session_manager.d.ts +125 -0
  37. package/dist/cjs/src/session/signer_session_manager.js +239 -0
  38. package/dist/cjs/src/signer_session.d.ts +41 -0
  39. package/dist/cjs/src/signer_session.js +77 -0
  40. package/dist/cjs/src/user_export.d.ts +52 -0
  41. package/dist/cjs/src/user_export.js +129 -0
  42. package/dist/cjs/src/util.d.ts +56 -0
  43. package/dist/cjs/src/util.js +87 -0
  44. package/dist/esm/package.json +41 -0
  45. package/dist/esm/spec/env/beta.json +9 -0
  46. package/dist/esm/spec/env/gamma.json +9 -0
  47. package/dist/esm/spec/env/prod.json +9 -0
  48. package/dist/esm/src/api.d.ts +652 -0
  49. package/dist/esm/src/api.js +1335 -0
  50. package/dist/esm/src/client.d.ts +642 -0
  51. package/dist/esm/src/client.js +451 -0
  52. package/dist/esm/src/env.d.ts +15 -0
  53. package/dist/esm/src/env.js +9 -0
  54. package/dist/esm/src/error.d.ts +32 -0
  55. package/dist/esm/src/error.js +32 -0
  56. package/dist/esm/src/events.d.ts +84 -0
  57. package/dist/esm/src/events.js +189 -0
  58. package/dist/esm/src/index.d.ts +203 -0
  59. package/dist/esm/src/index.js +276 -0
  60. package/dist/esm/src/key.d.ts +169 -0
  61. package/dist/esm/src/key.js +256 -0
  62. package/dist/esm/src/mfa.d.ts +97 -0
  63. package/dist/esm/src/mfa.js +166 -0
  64. package/dist/esm/src/org.d.ts +99 -0
  65. package/dist/esm/src/org.js +91 -0
  66. package/dist/esm/src/paginator.d.ts +76 -0
  67. package/dist/esm/src/paginator.js +94 -0
  68. package/dist/esm/src/response.d.ts +114 -0
  69. package/dist/esm/src/response.js +198 -0
  70. package/dist/esm/src/role.d.ts +289 -0
  71. package/dist/esm/src/role.js +256 -0
  72. package/dist/esm/src/schema.d.ts +6404 -0
  73. package/dist/esm/src/schema.js +6 -0
  74. package/dist/esm/src/schema_types.d.ts +116 -0
  75. package/dist/esm/src/schema_types.js +2 -0
  76. package/dist/esm/src/session/session_storage.d.ts +27 -0
  77. package/dist/esm/src/session/session_storage.js +43 -0
  78. package/dist/esm/src/session/signer_session_manager.d.ts +125 -0
  79. package/dist/esm/src/session/signer_session_manager.js +235 -0
  80. package/dist/esm/src/signer_session.d.ts +41 -0
  81. package/dist/esm/src/signer_session.js +72 -0
  82. package/dist/esm/src/user_export.d.ts +52 -0
  83. package/dist/esm/src/user_export.js +99 -0
  84. package/dist/esm/src/util.d.ts +56 -0
  85. package/dist/esm/src/util.js +77 -0
  86. package/dist/package.json +13 -45
  87. package/dist/src/api.d.ts +29 -1
  88. package/dist/src/api.js +66 -1
  89. package/dist/src/client.d.ts +35 -14
  90. package/dist/src/client.js +12 -8
  91. package/dist/src/events.js +1 -1
  92. package/dist/src/index.d.ts +6 -11
  93. package/dist/src/index.js +9 -25
  94. package/dist/src/key.d.ts +18 -7
  95. package/dist/src/key.js +52 -19
  96. package/dist/src/role.d.ts +46 -3
  97. package/dist/src/role.js +60 -8
  98. package/dist/src/schema.d.ts +206 -72
  99. package/dist/src/schema.js +1 -1
  100. package/dist/src/schema_types.d.ts +3 -0
  101. package/dist/src/schema_types.js +1 -1
  102. package/dist/src/session/signer_session_manager.d.ts +38 -14
  103. package/dist/src/session/signer_session_manager.js +93 -33
  104. package/dist/src/util.d.ts +14 -0
  105. package/dist/src/util.js +24 -27
  106. package/package.json +19 -46
  107. package/src/api.ts +145 -19
  108. package/src/client.ts +106 -10
  109. package/src/error.ts +4 -0
  110. package/src/events.ts +2 -0
  111. package/src/index.ts +10 -24
  112. package/src/key.ts +67 -20
  113. package/src/mfa.ts +8 -4
  114. package/src/response.ts +50 -4
  115. package/src/role.ts +87 -7
  116. package/src/schema.ts +764 -152
  117. package/src/schema_types.ts +6 -0
  118. package/src/session/session_storage.ts +0 -32
  119. package/src/session/signer_session_manager.ts +126 -38
  120. package/src/util.ts +18 -10
  121. package/tsconfig.json +1 -21
  122. package/LICENSE-APACHE +0 -177
  123. package/LICENSE-MIT +0 -25
  124. package/NOTICE +0 -13
  125. package/dist/examples/ethers.d.ts +0 -1
  126. package/dist/examples/ethers.js +0 -142
  127. package/dist/src/ethers/index.d.ts +0 -95
  128. package/dist/src/ethers/index.js +0 -215
  129. package/dist/src/fido.js +0 -148
  130. package/dist/src/session/cognito_manager.d.ts +0 -71
  131. package/dist/src/session/cognito_manager.js +0 -129
  132. package/dist/src/session/generic.d.ts +0 -47
  133. package/dist/src/session/generic.js +0 -3
  134. package/dist/src/session/management_session_manager.d.ts +0 -59
  135. package/dist/src/session/management_session_manager.js +0 -111
  136. package/dist/src/session/oidc_session_manager.d.ts +0 -78
  137. package/dist/src/session/oidc_session_manager.js +0 -142
  138. package/dist/src/session/session_manager.d.ts +0 -99
  139. package/dist/src/session/session_manager.js +0 -136
  140. package/dist/src/sign.d.ts +0 -114
  141. package/dist/src/sign.js +0 -248
  142. package/dist/test/sessions.d.ts +0 -35
  143. package/dist/test/sessions.js +0 -56
  144. package/src/ethers/index.ts +0 -253
  145. package/src/session/cognito_manager.ts +0 -161
  146. package/src/session/session_manager.ts +0 -165
package/src/schema.ts CHANGED
@@ -3,6 +3,14 @@
3
3
  * Do not make direct changes to the file.
4
4
  */
5
5
 
6
+ /** OneOf type helpers */
7
+ type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
8
+ type XOR<T, U> = T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
9
+ type OneOf<T extends any[]> = T extends [infer Only]
10
+ ? Only
11
+ : T extends [infer A, infer B, ...infer Rest]
12
+ ? OneOf<[XOR<A, B>, ...Rest]>
13
+ : never;
6
14
 
7
15
  export interface paths {
8
16
  "/v0/about_me": {
@@ -60,6 +68,15 @@ export interface paths {
60
68
  */
61
69
  put: operations["deriveKey"];
62
70
  };
71
+ "/v0/org/{org_id}/evm/eip191/sign/{pubkey}": {
72
+ /**
73
+ * Sign EIP-191 Data
74
+ * @description Sign EIP-191 Data
75
+ *
76
+ * Signs a message using EIP-191 personal_sign with a given Secp256k1 key.
77
+ */
78
+ post: operations["eip191Sign"];
79
+ };
63
80
  "/v0/org/{org_id}/evm/eip712/sign/{pubkey}": {
64
81
  /**
65
82
  * Sign EIP-712 Typed Data
@@ -175,6 +192,15 @@ export interface paths {
175
192
  */
176
193
  patch: operations["updateKey"];
177
194
  };
195
+ "/v0/org/{org_id}/keys/{key_id}/roles": {
196
+ /**
197
+ * List Key Roles
198
+ * @description List Key Roles
199
+ *
200
+ * Get all roles the key is in
201
+ */
202
+ get: operations["listKeyRoles"];
203
+ };
178
204
  "/v0/org/{org_id}/mfa": {
179
205
  /**
180
206
  * List Pending MFA Requests
@@ -194,46 +220,52 @@ export interface paths {
194
220
  */
195
221
  get: operations["mfaGet"];
196
222
  /**
197
- * Approve MFA Request
198
- * @description Approve MFA Request
223
+ * Approve or Reject MFA Request
224
+ * @description Approve or Reject MFA Request
225
+ *
226
+ * Approve or reject request after logging in with CubeSigner.
199
227
  *
200
- * Approve request after logging in with CubeSigner. Adds the currently-logged user as an approver
228
+ * If approving, adds the currently-logged user as an approver
201
229
  * of a pending MFA request of the [Status::RequiredApprovers] kind. If the required number of
202
230
  * approvers is reached, the MFA request is approved; the confirmation receipt can be used to
203
231
  * resume the original HTTP request.
232
+ *
233
+ * If rejecting, immediately deletes the pending MFA request.
204
234
  */
205
- patch: operations["mfaApproveCs"];
235
+ patch: operations["mfaVoteCs"];
206
236
  };
207
237
  "/v0/org/{org_id}/mfa/{mfa_id}/fido": {
208
238
  /**
209
- * Initiate Approving an MFA Request with FIDO
210
- * @description Initiate Approving an MFA Request with FIDO
239
+ * Initiate a FIDO MFA Approval/Rejection
240
+ * @description Initiate a FIDO MFA Approval/Rejection
211
241
  *
212
- * Initiates the approval process of an MFA Request using FIDO.
242
+ * Initiates the approval/rejection process of an MFA Request using FIDO.
213
243
  */
214
- post: operations["mfaApproveFido"];
244
+ post: operations["mfaFidoInit"];
215
245
  /**
216
- * Finalize a FIDO MFA Approval
217
- * @description Finalize a FIDO MFA Approval
218
- *
219
- * Adds an approver to a pending MFA request.
246
+ * Finalize a FIDO MFA Approval/Rejection
247
+ * @description Finalize a FIDO MFA Approval/Rejection
220
248
  *
249
+ * If approving, adds an approver to a pending MFA request.
221
250
  * If the required number of approvers is reached, the MFA request is approved;
222
251
  * the confirmation receipt can be used to resume the original HTTP request.
252
+ *
253
+ * If rejecting, immediately deletes the pending MFA request.
223
254
  */
224
- patch: operations["mfaApproveFidoComplete"];
255
+ patch: operations["mfaVoteFidoComplete"];
225
256
  };
226
257
  "/v0/org/{org_id}/mfa/{mfa_id}/totp": {
227
258
  /**
228
- * Approve a TOTP MFA Request
229
- * @description Approve a TOTP MFA Request
259
+ * Approve/Reject a TOTP MFA Request
260
+ * @description Approve/Reject a TOTP MFA Request
230
261
  *
231
- * Adds the current user as approver to a pending MFA request by providing TOTP code.
262
+ * If approving, adds the current user as approver to a pending MFA request by
263
+ * providing TOTP code. If the required number of approvers is reached, the MFA request is
264
+ * approved; the confirmation receipt can be used to resume the original HTTP request.
232
265
  *
233
- * If the required number of approvers is reached, the MFA request is approved;
234
- * the confirmation receipt can be used to resume the original HTTP request.
266
+ * If rejecting, immediately deletes the pending MFA request.
235
267
  */
236
- patch: operations["mfaApproveTotp"];
268
+ patch: operations["mfaVoteTotp"];
237
269
  };
238
270
  "/v0/org/{org_id}/oidc": {
239
271
  /**
@@ -274,14 +306,15 @@ export interface paths {
274
306
  * @description Delete Role
275
307
  *
276
308
  * Deletes a role in an organization.
277
- * Only organization owners can perform this action.
309
+ * Only users in the role can perform this action.
278
310
  */
279
311
  delete: operations["deleteRole"];
280
312
  /**
281
313
  * Update Role
282
314
  * @description Update Role
283
315
  *
284
- * Enables or disables a role.
316
+ * Enables or disables a role (this requires the `manage:role:update:enable` scope).
317
+ * Updates the role's policies (this requires the `manage:role:update:policy` scope).
285
318
  * The user must be in the role or an owner of the organization.
286
319
  */
287
320
  patch: operations["updateRole"];
@@ -377,6 +410,16 @@ export interface paths {
377
410
  */
378
411
  get: operations["listRoleUsers"];
379
412
  };
413
+ "/v0/org/{org_id}/roles/{role_id}/users/{user_id}": {
414
+ /**
415
+ * Remove User
416
+ * @description Remove User
417
+ *
418
+ * Removes an existing user from an existing role.
419
+ * Only users in the role or org owners can remove users from a role.
420
+ */
421
+ delete: operations["removeUserFromRole"];
422
+ };
380
423
  "/v0/org/{org_id}/session": {
381
424
  /**
382
425
  * List sessions
@@ -389,7 +432,8 @@ export interface paths {
389
432
  * Create new user session (management and/or signing)
390
433
  * @description Create new user session (management and/or signing)
391
434
  *
392
- * Create a new user session
435
+ * Creates a new user session, silently truncating requested session and auth lifetimes
436
+ * to be at most requestor's session and auth lifetime, respectively.
393
437
  */
394
438
  post: operations["createSession"];
395
439
  /**
@@ -731,6 +775,8 @@ export interface components {
731
775
  session?: components["schemas"]["NewSessionResponse"] | null;
732
776
  };
733
777
  };
778
+ /** @enum {string} */
779
+ AcceptedValueCode: "MfaRequired";
734
780
  AddKeysToRoleRequest: {
735
781
  /**
736
782
  * @description A list of keys to add to a role
@@ -775,7 +821,12 @@ export interface components {
775
821
  email: string;
776
822
  identity: components["schemas"]["OIDCIdentity"];
777
823
  /** @description Optional login MFA policy */
778
- mfa_policy?: Record<string, unknown> | null;
824
+ mfa_policy?: unknown;
825
+ /**
826
+ * @description Optional user full name
827
+ * @example Alice Wonderland
828
+ */
829
+ name?: string | null;
779
830
  role: components["schemas"]["MemberRole"];
780
831
  };
781
832
  AddThirdPartyUserResponse: {
@@ -937,6 +988,90 @@ export interface components {
937
988
  };
938
989
  /** @description Wrapper around a zeroizing 32-byte fixed-size array */
939
990
  B32: string;
991
+ /** @enum {string} */
992
+ BadRequestErrorCode:
993
+ | "GenericBadRequest"
994
+ | "InvalidBody"
995
+ | "InvalidMfaReceipt"
996
+ | "InvalidMfaPolicyCount"
997
+ | "InvalidMfaPolicyNumAuthFactors"
998
+ | "InvalidMfaPolicyNumAllowedApprovers"
999
+ | "InvalidMfaPolicyRedundantRule"
1000
+ | "InvalidCreateKeyCount"
1001
+ | "OrgInviteExistingUser"
1002
+ | "OrgNameTaken"
1003
+ | "RoleNameTaken"
1004
+ | "AddKeyToRoleCountTooHigh"
1005
+ | "InvalidKeyId"
1006
+ | "InvalidKeyMetadataLength"
1007
+ | "InvalidKeyMetadata"
1008
+ | "InvalidKeyMaterialId"
1009
+ | "KeyNotFound"
1010
+ | "UserExportDerivedKey"
1011
+ | "UserExportPublicKeyInvalid"
1012
+ | "UserExportInProgress"
1013
+ | "RoleNotFound"
1014
+ | "InvalidMfaReceiptOrgIdMissing"
1015
+ | "InvalidMfaReceiptInvalidOrgId"
1016
+ | "MfaRequestNotFound"
1017
+ | "InvalidKeyType"
1018
+ | "InvalidKeyMaterial"
1019
+ | "InvalidHexValue"
1020
+ | "InvalidBase32Value"
1021
+ | "InvalidBase58Value"
1022
+ | "InvalidForkVersionLength"
1023
+ | "InvalidEthAddress"
1024
+ | "InvalidStellarAddress"
1025
+ | "InvalidOrgNameOrId"
1026
+ | "InvalidStakeDeposit"
1027
+ | "InvalidBlobSignRequest"
1028
+ | "InvalidSolanaSignRequest"
1029
+ | "InvalidEip712SignRequest"
1030
+ | "InvalidEvmSignRequest"
1031
+ | "InvalidEth2SignRequest"
1032
+ | "InvalidDeriveKeyRequest"
1033
+ | "InvalidStakingAmount"
1034
+ | "CustomStakingAmountNotAllowedForWrapperContract"
1035
+ | "InvalidUnstakeRequest"
1036
+ | "InvalidCreateUserRequest"
1037
+ | "UserAlreadyExists"
1038
+ | "UserNotFound"
1039
+ | "PolicyRuleKeyMismatch"
1040
+ | "EmptyScopes"
1041
+ | "InvalidScopesForRoleSession"
1042
+ | "InvalidLifetime"
1043
+ | "NoSingleKeyForUser"
1044
+ | "InvalidOrgPolicyRule"
1045
+ | "SourceIpAllowlistEmpty"
1046
+ | "InvalidOrgPolicyRepeatedRule"
1047
+ | "AvaSignHashError"
1048
+ | "AvaSignError"
1049
+ | "BtcSegwitHashError"
1050
+ | "BtcSignError"
1051
+ | "Eip712SignError"
1052
+ | "InvalidMemberRoleInUserAdd"
1053
+ | "ThirdPartyUserAlreadyExists"
1054
+ | "ThirdPartyUserNotFound"
1055
+ | "DeleteOidcUserError"
1056
+ | "SessionRoleMismatch"
1057
+ | "InvalidOidcToken"
1058
+ | "OidcIssuerUnsupported"
1059
+ | "OidcIssuerNotAllowed"
1060
+ | "OidcIssuerNoApplicableJwk"
1061
+ | "FidoCredentialMissing"
1062
+ | "FidoKeyAlreadyRegistered"
1063
+ | "FidoKeySignCountTooLow"
1064
+ | "FidoVerificationFailed"
1065
+ | "FidoChallengeMfaMismatch"
1066
+ | "UnsupportedLegacyCognitoSession"
1067
+ | "InvalidIdentityProof"
1068
+ | "PaginationDataExpired"
1069
+ | "ExistingKeysViolateExclusiveKeyAccess"
1070
+ | "ExportDelayTooShort"
1071
+ | "ExportWindowTooLong"
1072
+ | "InvalidTotpFailureLimit"
1073
+ | "InvalidEip191SignRequest"
1074
+ | "CannotResendUserInvitation";
940
1075
  /**
941
1076
  * @example {
942
1077
  * "message_base64": "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoxMjM0NTYK"
@@ -956,7 +1091,13 @@ export interface components {
956
1091
  signature: string;
957
1092
  };
958
1093
  /** @enum {string} */
959
- BtcSighashType: "All" | "None" | "Single" | "AllPlusAnyoneCanPay" | "NonePlusAnyoneCanPay" | "SinglePlusAnyoneCanPay";
1094
+ BtcSighashType:
1095
+ | "All"
1096
+ | "None"
1097
+ | "Single"
1098
+ | "AllPlusAnyoneCanPay"
1099
+ | "NonePlusAnyoneCanPay"
1100
+ | "SinglePlusAnyoneCanPay";
960
1101
  BtcSignRequest: {
961
1102
  sig_kind: components["schemas"]["BtcSignatureKind"];
962
1103
  /** @description The bitcoin transaction to sign */
@@ -991,6 +1132,19 @@ export interface components {
991
1132
  value: number;
992
1133
  };
993
1134
  };
1135
+ /** @description Describes how to derive a WebAuthn challenge value. */
1136
+ ChallengePieces: {
1137
+ /**
1138
+ * @description A base64url encoding of UTF8 JSON. The data in that JSON is endpoint specific, and describes what this FIDO challenge will be used for.
1139
+ *
1140
+ * Clients can use `preimage` along with `random_seed` to reconstruct the challenge like so:
1141
+ *
1142
+ * `challenge = HMAC-SHA256(key=random_seed, message=preimage)`
1143
+ */
1144
+ preimage: string;
1145
+ /** @description A random seed that prevents replay attacks */
1146
+ random_seed: string;
1147
+ };
994
1148
  /**
995
1149
  * @description Session information sent to the client.
996
1150
  * This struct works in tandem with its server-side counterpart [`SessionData`].
@@ -1011,17 +1165,19 @@ export interface components {
1011
1165
  /** @description Session ID */
1012
1166
  session_id: string;
1013
1167
  };
1014
- ConfiguredMfa: {
1015
- /** @enum {string} */
1016
- type: "totp";
1017
- } | {
1018
- /** @description A unique credential id */
1019
- id: string;
1020
- /** @description A human-readable name given to the key */
1021
- name: string;
1022
- /** @enum {string} */
1023
- type: "fido";
1024
- };
1168
+ ConfiguredMfa:
1169
+ | {
1170
+ /** @enum {string} */
1171
+ type: "totp";
1172
+ }
1173
+ | {
1174
+ /** @description A unique credential id */
1175
+ id: string;
1176
+ /** @description A human-readable name given to the key */
1177
+ name: string;
1178
+ /** @enum {string} */
1179
+ type: "fido";
1180
+ };
1025
1181
  CreateKeyImportKeyResponse: components["schemas"]["KeyImportKey"] & {
1026
1182
  /**
1027
1183
  * @description An attestation document from a secure enclave, including an
@@ -1093,7 +1249,7 @@ export interface components {
1093
1249
  */
1094
1250
  scopes: string[];
1095
1251
  };
1096
- CreateTokenRequest: components["schemas"]["RatchetConfig"] & ({
1252
+ CreateTokenRequest: components["schemas"]["RatchetConfig"] & {
1097
1253
  /**
1098
1254
  * @description A human readable description of the purpose of the key
1099
1255
  * @example Validator Signing
@@ -1107,12 +1263,23 @@ export interface components {
1107
1263
  * ]
1108
1264
  */
1109
1265
  scopes?: string[] | null;
1110
- });
1266
+ };
1267
+ /**
1268
+ * @description An extended form of `PublicKeyCredentialCreationOptions` that allows clients to derive the WebAuthn challenge
1269
+ * from a structured preimage.
1270
+ *
1271
+ * This ensures that the webuathn signature can only be used for a specific purpose
1272
+ */
1273
+ CreationOptionsWithHash: components["schemas"]["ChallengePieces"] & {
1274
+ options: components["schemas"]["PublicKeyCredentialCreationOptions"];
1275
+ };
1111
1276
  CubeSignerUserInfo: {
1112
1277
  /** @description All multi-factor authentication methods configured for this user */
1113
1278
  configured_mfa: components["schemas"]["ConfiguredMfa"][];
1114
1279
  /** @description Set once the user successfully logs into CubeSigner */
1115
1280
  initialized: boolean;
1281
+ /** @description Optional human name for the user */
1282
+ name?: string | null;
1116
1283
  /** @description CubeSigner's user identifier */
1117
1284
  user_id: string;
1118
1285
  };
@@ -1160,6 +1327,22 @@ export interface components {
1160
1327
  */
1161
1328
  mnemonic_id: string;
1162
1329
  };
1330
+ Eip191Or712SignResponse: {
1331
+ /**
1332
+ * @description Hex-encoded signature comprising 65 bytes in the format required
1333
+ * by ecrecover: 32-byte r, 32-byte s, and one-byte recovery-id v
1334
+ * which is either 27 or 28.
1335
+ * @example 0x4355c47d63924e8a72e509b65029052eb6c299d53a04e167c5775fd466751c9d07299936d304c153f6443dfa05f40ff007d72911b6f72307f996231605b915621c
1336
+ */
1337
+ signature: string;
1338
+ };
1339
+ Eip191SignRequest: {
1340
+ /**
1341
+ * @description EIP-191 data to sign as hex-encoded bytes.
1342
+ * @example 0xdeadbeef13c0ffee
1343
+ */
1344
+ data: string;
1345
+ };
1163
1346
  /**
1164
1347
  * @example {
1165
1348
  * "chain_id": 1337,
@@ -1255,17 +1438,8 @@ export interface components {
1255
1438
  /** @description EIP-712 typed data. Refer to the JSON schema defined in EIP-712. */
1256
1439
  typed_data: Record<string, never>;
1257
1440
  };
1258
- Eip712SignResponse: {
1259
- /**
1260
- * @description Hex-encoded signature comprising 65 bytes in the format required
1261
- * by ecrecover: 32-byte r, 32-byte s, and one-byte recovery-id v
1262
- * which is either 27 or 28.
1263
- * @example 0x4355c47d63924e8a72e509b65029052eb6c299d53a04e167c5775fd466751c9d07299936d304c153f6443dfa05f40ff007d72911b6f72307f996231605b915621c
1264
- */
1265
- signature: string;
1266
- };
1267
1441
  /** @default null */
1268
- Empty: Record<string, unknown> | null;
1442
+ Empty: unknown;
1269
1443
  EmptyImpl: {
1270
1444
  status: string;
1271
1445
  };
@@ -1284,6 +1458,7 @@ export interface components {
1284
1458
  /** @description The structure of ErrorResponse must match the response template that AWS uses */
1285
1459
  ErrorResponse: {
1286
1460
  accepted?: components["schemas"]["AcceptedValue"] | null;
1461
+ error_code: components["schemas"]["SignerErrorCode"];
1287
1462
  /** @description Error message */
1288
1463
  message: string;
1289
1464
  /** @description Optional request identifier */
@@ -1361,16 +1536,37 @@ export interface components {
1361
1536
  */
1362
1537
  signature: string;
1363
1538
  };
1539
+ /** @enum {string} */
1540
+ EvmTxDepositErrorCode:
1541
+ | "EvmTxDepositReceiverMismatch"
1542
+ | "EvmTxDepositEmptyData"
1543
+ | "EvmTxDepositEmptyChainId"
1544
+ | "EvmTxDepositEmptyReceiver"
1545
+ | "EvmTxDepositUnexpectedValue"
1546
+ | "EvmTxDepositUnexpectedDataLength"
1547
+ | "EvmTxDepositNoAbi"
1548
+ | "EvmTxDepositNoDepositFunction"
1549
+ | "EvmTxDepositUnexpectedFunctionName"
1550
+ | "EvmTxDepositUnexpectedValidatorKey"
1551
+ | "EvmTxDepositInvalidValidatorKey"
1552
+ | "EvmTxDepositMissingDepositArg"
1553
+ | "EvmTxDepositWrongDepositArgType"
1554
+ | "EvmTxDepositWrongValidatorArgValue"
1555
+ | "EvmTxDepositValidatorKeyNotInRole"
1556
+ | "EvmTxDepositUnexpectedWithdrawalCredentials"
1557
+ | "EvmTxDepositUnresolvedRole"
1558
+ | "EvmTxDepositInvalidDepositEncoding";
1364
1559
  /** @description Sent from the client to the server to answer a fido challenge */
1365
1560
  FidoAssertAnswer: {
1366
1561
  /** @description The ID of the challenge that was returned from the POST endpoint */
1367
1562
  challenge_id: string;
1368
1563
  credential: components["schemas"]["PublicKeyCredential"];
1369
1564
  };
1370
- FidoAssertChallenge: {
1565
+ FidoAssertChallenge: (components["schemas"]["ChallengePieces"] & {
1566
+ options: components["schemas"]["PublicKeyCredentialRequestOptions"];
1567
+ }) & {
1371
1568
  /** @description The id of the challenge. Must be supplied when answering the challenge. */
1372
1569
  challenge_id: string;
1373
- options: components["schemas"]["PublicKeyCredentialRequestOptions"];
1374
1570
  };
1375
1571
  /** @description Sent from the client to the server to answer a fido challenge */
1376
1572
  FidoCreateChallengeAnswer: {
@@ -1382,10 +1578,11 @@ export interface components {
1382
1578
  * @description Sent by the server to the client. Contains the challenge data that must be
1383
1579
  * used to generate a new credential
1384
1580
  */
1385
- FidoCreateChallengeResponse: {
1581
+ FidoCreateChallengeResponse: (components["schemas"]["ChallengePieces"] & {
1582
+ options: components["schemas"]["PublicKeyCredentialCreationOptions"];
1583
+ }) & {
1386
1584
  /** @description The id of the challenge. Must be supplied when answering the challenge. */
1387
1585
  challenge_id: string;
1388
- options: components["schemas"]["PublicKeyCredentialCreationOptions"];
1389
1586
  };
1390
1587
  /** @description Declares intent to register a new FIDO key */
1391
1588
  FidoCreateRequest: {
@@ -1395,6 +1592,64 @@ export interface components {
1395
1592
  */
1396
1593
  name: string;
1397
1594
  };
1595
+ /** @enum {string} */
1596
+ ForbiddenErrorCode:
1597
+ | "FidoRequiredToRemoveTotp"
1598
+ | "MfaChallengeExpired"
1599
+ | "ChainIdNotAllowed"
1600
+ | "InvalidOrg"
1601
+ | "SessionForWrongOrg"
1602
+ | "OrgDisabled"
1603
+ | "OrgNotFound"
1604
+ | "OrgWithoutOwner"
1605
+ | "OrphanedUser"
1606
+ | "OidcUserNotFound"
1607
+ | "UserNotInOrg"
1608
+ | "UserNotOrgOwner"
1609
+ | "UserNotKeyOwner"
1610
+ | "InvalidRole"
1611
+ | "DisabledRole"
1612
+ | "KeyDisabled"
1613
+ | "RoleNotInOrg"
1614
+ | "KeyNotInRole"
1615
+ | "KeyNotInOrg"
1616
+ | "UserExportRequestNotInOrg"
1617
+ | "UserExportRequestInvalid"
1618
+ | "UserNotOriginalKeyOwner"
1619
+ | "UserNotInRole"
1620
+ | "MustBeFullMember"
1621
+ | "SessionExpired"
1622
+ | "SessionRevoked"
1623
+ | "ExpectedUserSession"
1624
+ | "SessionRoleChanged"
1625
+ | "ScopedNameNotFound"
1626
+ | "SessionInvalidEpochToken"
1627
+ | "SessionInvalidRefreshToken"
1628
+ | "SessionRefreshTokenExpired"
1629
+ | "InvalidAuthHeader"
1630
+ | "SessionNotFound"
1631
+ | "InvalidArn"
1632
+ | "SessionInvalidAuthToken"
1633
+ | "SessionAuthTokenExpired"
1634
+ | "SessionPossiblyStolenToken"
1635
+ | "MfaDisallowedIdentity"
1636
+ | "MfaDisallowedApprover"
1637
+ | "MfaTypeNotAllowed"
1638
+ | "MfaNotApprovedYet"
1639
+ | "MfaConfirmationCodeMismatch"
1640
+ | "MfaHttpRequestMismatch"
1641
+ | "MfaApprovalFromUserSession"
1642
+ | "MfaRemoveBelowMin"
1643
+ | "TotpAlreadyConfigured"
1644
+ | "TotpConfigurationChanged"
1645
+ | "MfaTotpBadConfiguration"
1646
+ | "MfaTotpBadCode"
1647
+ | "MfaTotpRateLimit"
1648
+ | "ImproperSessionScope"
1649
+ | "FullSessionRequired"
1650
+ | "SessionWithoutAnyScopeUnder"
1651
+ | "UserRoleUnprivileged"
1652
+ | "MfaNotConfigured";
1398
1653
  /**
1399
1654
  * @description Specifies a fork of the `BeaconChain`, to prevent replay attacks.
1400
1655
  * The schema of `Fork` is defined in the [Beacon chain
@@ -1460,6 +1715,8 @@ export interface components {
1460
1715
  * @description Number of requests currently being processed by cube3signer
1461
1716
  */
1462
1717
  current_num_requests_processing: number;
1718
+ /** @description Do not record metric data from this heartbeat */
1719
+ ignore?: boolean;
1463
1720
  /**
1464
1721
  * Format: int64
1465
1722
  * @description Number of new requests during this heartbeat period
@@ -1506,7 +1763,7 @@ export interface components {
1506
1763
  */
1507
1764
  HttpRequest: {
1508
1765
  /** @description HTTP request body */
1509
- body?: Record<string, unknown> | null;
1766
+ body?: unknown;
1510
1767
  /** @description HTTP method of the request */
1511
1768
  method: string;
1512
1769
  /** @description HTTP path of the request (including host or not?) */
@@ -1516,7 +1773,7 @@ export interface components {
1516
1773
  * @description Proof that an end-user provided CubeSigner with a valid auth token
1517
1774
  * (either an OIDC token or a CubeSigner session token)
1518
1775
  */
1519
- IdentityProof: ({
1776
+ IdentityProof: {
1520
1777
  /**
1521
1778
  * @description OIDC audience; set only if the proof was obtained by using OIDC token.
1522
1779
  *
@@ -1531,7 +1788,7 @@ export interface components {
1531
1788
  exp_epoch: components["schemas"]["EpochDateTime"];
1532
1789
  identity?: components["schemas"]["OIDCIdentity"] | null;
1533
1790
  user_info?: components["schemas"]["CubeSignerUserInfo"] | null;
1534
- }) & {
1791
+ } & {
1535
1792
  /** @description An opaque identifier for the proof */
1536
1793
  id: string;
1537
1794
  };
@@ -1557,6 +1814,60 @@ export interface components {
1557
1814
  */
1558
1815
  salt: string;
1559
1816
  };
1817
+ /** @enum {string} */
1818
+ InternalErrorCode:
1819
+ | "SystemTimeError"
1820
+ | "ReqwestError"
1821
+ | "DbQueryError"
1822
+ | "DbGetError"
1823
+ | "DbDeleteError"
1824
+ | "DbPutError"
1825
+ | "DbUpdateError"
1826
+ | "SerdeError"
1827
+ | "TestAndSetError"
1828
+ | "DbGetItemsError"
1829
+ | "DbWriteError"
1830
+ | "CubistSignerError"
1831
+ | "CwPutMetricDataError"
1832
+ | "KmsGenerateRandomError"
1833
+ | "MalformedTotpBytes"
1834
+ | "KmsGenerateRandomNoResponseError"
1835
+ | "CreateKeyError"
1836
+ | "ParseDerivationPathError"
1837
+ | "SplitSignerError"
1838
+ | "CreateImportKeyError"
1839
+ | "CognitoDeleteUserError"
1840
+ | "CognitoListUsersError"
1841
+ | "CognitoGetUserError"
1842
+ | "MissingUserEmail"
1843
+ | "CognitoResendUserInvitation"
1844
+ | "CognitoSetUserPasswordError"
1845
+ | "GenericInternalError"
1846
+ | "OidcAuthWithoutOrg"
1847
+ | "MissingKeyMetadata"
1848
+ | "KmsKeyWithoutId"
1849
+ | "KmsEnableKeyError"
1850
+ | "KmsDisableKeyError"
1851
+ | "SerializeEncryptedExportKeyError"
1852
+ | "DeserializeEncryptedExportKeyError"
1853
+ | "ReEncryptUserExport"
1854
+ | "S3UploadError"
1855
+ | "S3DownloadError"
1856
+ | "ManagedStateMissing"
1857
+ | "InternalHeaderMissing"
1858
+ | "InvalidInternalHeaderValue"
1859
+ | "RequestLocalStateAlreadySet"
1860
+ | "OidcOrgMismatch"
1861
+ | "OrphanedRoleKeyId"
1862
+ | "OidcIssuerJwkEndpointUnavailable"
1863
+ | "OidcIssuerInvalidJwk"
1864
+ | "InvalidPkForMaterialId"
1865
+ | "UncheckedOrg"
1866
+ | "AvaSignCredsMissing"
1867
+ | "AvaSignSignatureMissing"
1868
+ | "ExpectedRoleSession"
1869
+ | "InvalidThirdPartyIdentity"
1870
+ | "CognitoGetUser";
1560
1871
  InviteRequest: {
1561
1872
  /**
1562
1873
  * @description The user's email address
@@ -1564,7 +1875,7 @@ export interface components {
1564
1875
  */
1565
1876
  email: string;
1566
1877
  /** @description Optional login MFA policy */
1567
- mfa_policy?: Record<string, unknown> | null;
1878
+ mfa_policy?: unknown;
1568
1879
  /**
1569
1880
  * @description The user's full name
1570
1881
  * @example Alice Wonderland
@@ -1650,21 +1961,24 @@ export interface components {
1650
1961
  * );
1651
1962
  * ```
1652
1963
  */
1653
- JsonKeyPackage: ({
1654
- /** @enum {string} */
1655
- material_type: "raw_secret";
1656
- /** @description The value of the raw secret */
1657
- secret: string;
1658
- } | {
1659
- /** @description The derivation path */
1660
- derivation_path: string;
1661
- /** @enum {string} */
1662
- material_type: "english_mnemonic";
1663
- /** @description The mnemonic */
1664
- mnemonic: string;
1665
- /** @description The password (which may be empty) */
1666
- password: string;
1667
- }) & {
1964
+ JsonKeyPackage: (
1965
+ | {
1966
+ /** @enum {string} */
1967
+ material_type: "raw_secret";
1968
+ /** @description The value of the raw secret */
1969
+ secret: string;
1970
+ }
1971
+ | {
1972
+ /** @description The derivation path */
1973
+ derivation_path: string;
1974
+ /** @enum {string} */
1975
+ material_type: "english_mnemonic";
1976
+ /** @description The mnemonic */
1977
+ mnemonic: string;
1978
+ /** @description The password (which may be empty) */
1979
+ password: string;
1980
+ }
1981
+ ) & {
1668
1982
  /** @description The type of key this package represents */
1669
1983
  key_type: string;
1670
1984
  };
@@ -1712,6 +2026,11 @@ export interface components {
1712
2026
  * ]
1713
2027
  */
1714
2028
  policy?: Record<string, never>[];
2029
+ /**
2030
+ * @description Role ID
2031
+ * @example Role#e427c28a-9c5b-49cc-a257-878aea58a22c
2032
+ */
2033
+ role_id: string;
1715
2034
  };
1716
2035
  KeyInfo: {
1717
2036
  derivation_info?: components["schemas"]["KeyDerivationInfo"] | null;
@@ -1729,6 +2048,12 @@ export interface components {
1729
2048
  * @example 0x8e3484687e66cdd26cf04c3647633ab4f3570148
1730
2049
  */
1731
2050
  material_id: string;
2051
+ /**
2052
+ * @description User-defined metadata. When rendering (e.g., in the browser) you should treat
2053
+ * it as untrusted user data (and avoid injecting metadata into HTML directly) if
2054
+ * untrusted users can create/update keys (or their metadata).
2055
+ */
2056
+ metadata?: string;
1732
2057
  /**
1733
2058
  * @description Owner of the key
1734
2059
  * @example User#c3b9379c-4e8c-4216-bd0a-65ace53cf98f
@@ -1765,7 +2090,21 @@ export interface components {
1765
2090
  keys: components["schemas"]["KeyInfo"][];
1766
2091
  };
1767
2092
  /** @enum {string} */
1768
- KeyType: "SecpEthAddr" | "SecpBtc" | "SecpBtcTest" | "SecpAvaAddr" | "SecpAvaTestAddr" | "BlsPub" | "BlsInactive" | "Ed25519SolanaAddr" | "Ed25519SuiAddr" | "Ed25519AptosAddr" | "Ed25519CardanoAddrVk" | "Ed25519StellarAddr" | "Mnemonic" | "Stark";
2093
+ KeyType:
2094
+ | "SecpEthAddr"
2095
+ | "SecpBtc"
2096
+ | "SecpBtcTest"
2097
+ | "SecpAvaAddr"
2098
+ | "SecpAvaTestAddr"
2099
+ | "BlsPub"
2100
+ | "BlsInactive"
2101
+ | "Ed25519SolanaAddr"
2102
+ | "Ed25519SuiAddr"
2103
+ | "Ed25519AptosAddr"
2104
+ | "Ed25519CardanoAddrVk"
2105
+ | "Ed25519StellarAddr"
2106
+ | "Mnemonic"
2107
+ | "Stark";
1769
2108
  /**
1770
2109
  * @description Wrapper around encrypted [UnencryptedLastEvalKey] bytes.
1771
2110
  *
@@ -1794,8 +2133,25 @@ export interface components {
1794
2133
  request: components["schemas"]["HttpRequest"];
1795
2134
  status: components["schemas"]["Status"];
1796
2135
  };
2136
+ MfaType: OneOf<
2137
+ [
2138
+ "CubeSigner",
2139
+ "Totp",
2140
+ "Fido",
2141
+ {
2142
+ /** @description Answer a FIDO challenge with a specific FIDO key */
2143
+ FidoKey: {
2144
+ /**
2145
+ * @description The ID of the FIDO key that must be use to approve the request
2146
+ * @example FidoKey#EtDd...ZZc8=
2147
+ */
2148
+ key_id: string;
2149
+ };
2150
+ },
2151
+ ]
2152
+ >;
1797
2153
  /** @enum {string} */
1798
- MfaType: "CubeSigner" | "Totp" | "Fido";
2154
+ MfaVote: "approve" | "reject";
1799
2155
  /**
1800
2156
  * @description Network name ('mainnet', 'prater', 'goerli')
1801
2157
  * @example goerli
@@ -1817,14 +2173,21 @@ export interface components {
1817
2173
  */
1818
2174
  token: string;
1819
2175
  };
2176
+ /** @enum {string} */
2177
+ NotFoundErrorCode:
2178
+ | "UriSegmentMissing"
2179
+ | "UriSegmentInvalid"
2180
+ | "TotpNotConfigured"
2181
+ | "FidoKeyNotFound"
2182
+ | "FidoChallengeNotFound"
2183
+ | "TotpChallengeNotFound"
2184
+ | "UserExportRequestNotFound"
2185
+ | "UserExportCiphertextNotFound";
1820
2186
  /**
1821
2187
  * @description Represents a globally unique OIDC-authorized user by expressing the full "path" to a user. That is:
1822
2188
  *
1823
2189
  * (iss) (sub)
1824
2190
  * Issuer -> Subresource
1825
- *
1826
- * We include a non-standard third-tier `disambiguator` which allows us to map
1827
- * a single OIDC user to multiple `User`s in CubeSigner
1828
2191
  */
1829
2192
  OIDCIdentity: {
1830
2193
  /**
@@ -1945,20 +2308,35 @@ export interface components {
1945
2308
  */
1946
2309
  "page.start"?: string | null;
1947
2310
  };
2311
+ /**
2312
+ * @description Response type that wraps another type and adds base64url-encoded encrypted `last_evaluated_key`
2313
+ * value (which can the user pass back to use as a url query parameter to continue pagination).
2314
+ */
2315
+ PaginatedListKeyRolesResponse: {
2316
+ /** @description All roles the key is in */
2317
+ roles: components["schemas"]["KeyInRoleInfo"][];
2318
+ } & {
2319
+ /**
2320
+ * @description If set, the content of `response` does not contain the entire result set.
2321
+ * To fetch the next page of the result set, call the same endpoint
2322
+ * but specify this value as the 'page.start' query parameter.
2323
+ */
2324
+ last_evaluated_key?: string | null;
2325
+ };
1948
2326
  /**
1949
2327
  * @description Response type that wraps another type and adds base64url-encoded encrypted `last_evaluated_key`
1950
2328
  * value (which can the user pass back to use as a url query parameter to continue pagination).
1951
2329
  */
1952
2330
  PaginatedListKeysResponse: {
1953
2331
  keys: components["schemas"]["KeyInfo"][];
1954
- } & ({
2332
+ } & {
1955
2333
  /**
1956
2334
  * @description If set, the content of `response` does not contain the entire result set.
1957
2335
  * To fetch the next page of the result set, call the same endpoint
1958
2336
  * but specify this value as the 'page.start' query parameter.
1959
2337
  */
1960
2338
  last_evaluated_key?: string | null;
1961
- });
2339
+ };
1962
2340
  /**
1963
2341
  * @description Response type that wraps another type and adds base64url-encoded encrypted `last_evaluated_key`
1964
2342
  * value (which can the user pass back to use as a url query parameter to continue pagination).
@@ -1966,14 +2344,14 @@ export interface components {
1966
2344
  PaginatedListRoleKeysResponse: {
1967
2345
  /** @description All keys in a role */
1968
2346
  keys: components["schemas"]["KeyInRoleInfo"][];
1969
- } & ({
2347
+ } & {
1970
2348
  /**
1971
2349
  * @description If set, the content of `response` does not contain the entire result set.
1972
2350
  * To fetch the next page of the result set, call the same endpoint
1973
2351
  * but specify this value as the 'page.start' query parameter.
1974
2352
  */
1975
2353
  last_evaluated_key?: string | null;
1976
- });
2354
+ };
1977
2355
  /**
1978
2356
  * @description Response type that wraps another type and adds base64url-encoded encrypted `last_evaluated_key`
1979
2357
  * value (which can the user pass back to use as a url query parameter to continue pagination).
@@ -1981,14 +2359,14 @@ export interface components {
1981
2359
  PaginatedListRoleUsersResponse: {
1982
2360
  /** @description All users in a role */
1983
2361
  users: components["schemas"]["UserInRoleInfo"][];
1984
- } & ({
2362
+ } & {
1985
2363
  /**
1986
2364
  * @description If set, the content of `response` does not contain the entire result set.
1987
2365
  * To fetch the next page of the result set, call the same endpoint
1988
2366
  * but specify this value as the 'page.start' query parameter.
1989
2367
  */
1990
2368
  last_evaluated_key?: string | null;
1991
- });
2369
+ };
1992
2370
  /**
1993
2371
  * @description Response type that wraps another type and adds base64url-encoded encrypted `last_evaluated_key`
1994
2372
  * value (which can the user pass back to use as a url query parameter to continue pagination).
@@ -1996,14 +2374,14 @@ export interface components {
1996
2374
  PaginatedListRolesResponse: {
1997
2375
  /** @description All roles in an organization. */
1998
2376
  roles: components["schemas"]["RoleInfo"][];
1999
- } & ({
2377
+ } & {
2000
2378
  /**
2001
2379
  * @description If set, the content of `response` does not contain the entire result set.
2002
2380
  * To fetch the next page of the result set, call the same endpoint
2003
2381
  * but specify this value as the 'page.start' query parameter.
2004
2382
  */
2005
2383
  last_evaluated_key?: string | null;
2006
- });
2384
+ };
2007
2385
  /**
2008
2386
  * @description Response type that wraps another type and adds base64url-encoded encrypted `last_evaluated_key`
2009
2387
  * value (which can the user pass back to use as a url query parameter to continue pagination).
@@ -2011,28 +2389,64 @@ export interface components {
2011
2389
  PaginatedSessionsResponse: {
2012
2390
  /** @description The list of sessions */
2013
2391
  sessions: components["schemas"]["SessionInfo"][];
2014
- } & ({
2392
+ } & {
2015
2393
  /**
2016
2394
  * @description If set, the content of `response` does not contain the entire result set.
2017
2395
  * To fetch the next page of the result set, call the same endpoint
2018
2396
  * but specify this value as the 'page.start' query parameter.
2019
2397
  */
2020
2398
  last_evaluated_key?: string | null;
2021
- });
2399
+ };
2022
2400
  /**
2023
2401
  * @description Response type that wraps another type and adds base64url-encoded encrypted `last_evaluated_key`
2024
2402
  * value (which can the user pass back to use as a url query parameter to continue pagination).
2025
2403
  */
2026
2404
  PaginatedUserExportListResponse: {
2027
2405
  export_requests: components["schemas"]["UserExportInitResponse"][];
2028
- } & ({
2406
+ } & {
2029
2407
  /**
2030
2408
  * @description If set, the content of `response` does not contain the entire result set.
2031
2409
  * To fetch the next page of the result set, call the same endpoint
2032
2410
  * but specify this value as the 'page.start' query parameter.
2033
2411
  */
2034
2412
  last_evaluated_key?: string | null;
2035
- });
2413
+ };
2414
+ PolicyErrorCode:
2415
+ | components["schemas"]["PolicyErrorOwnCodes"]
2416
+ | components["schemas"]["EvmTxDepositErrorCode"];
2417
+ /** @enum {string} */
2418
+ PolicyErrorOwnCodes:
2419
+ | "EvmTxReceiverMismatch"
2420
+ | "EvmTxSenderMismatch"
2421
+ | "PolicyDisjunctionError"
2422
+ | "PolicyNegationError"
2423
+ | "Eth2ExceededMaxUnstake"
2424
+ | "Eth2ConcurrentUnstaking"
2425
+ | "NotInIpv4Allowlist"
2426
+ | "NotInOriginAllowlist"
2427
+ | "InvalidSourceIp"
2428
+ | "RawSigningNotAllowed"
2429
+ | "Eip712SigningNotAllowed"
2430
+ | "OidcSourceNotAllowed"
2431
+ | "NoOidcAuthSourcesDefined"
2432
+ | "AddKeyToRoleDisallowed"
2433
+ | "KeysAlreadyInRole"
2434
+ | "KeyInMultipleRoles"
2435
+ | "KeyAccessError"
2436
+ | "Eip191SigningNotAllowed";
2437
+ PreconditionErrorCode:
2438
+ | components["schemas"]["PreconditionErrorOwnCodes"]
2439
+ | components["schemas"]["PolicyErrorCode"];
2440
+ /** @enum {string} */
2441
+ PreconditionErrorOwnCodes:
2442
+ | "Eth2ProposerSlotTooLow"
2443
+ | "Eth2AttestationSourceEpochTooLow"
2444
+ | "Eth2AttestationTargetEpochTooLow"
2445
+ | "Eth2ConcurrentBlockSigning"
2446
+ | "Eth2ConcurrentAttestationSigning"
2447
+ | "Eth2MultiDepositToNonGeneratedKey"
2448
+ | "Eth2MultiDepositUnknownInitialDeposit"
2449
+ | "Eth2MultiDepositWithdrawalAddressMismatch";
2036
2450
  /**
2037
2451
  * @description This type represents a wire-encodable form of the PublicKeyCredential interface
2038
2452
  * Clients may need to manually encode into this format to communicate with the server
@@ -2057,7 +2471,7 @@ export interface components {
2057
2471
  * This operation returns the value of [[clientExtensionsResults]], which is a map containing extension identifier → client extension output entries produced by the extension’s client extension processing.
2058
2472
  * https://www.w3.org/TR/webauthn-2/#ref-for-dom-publickeycredential-getclientextensionresults
2059
2473
  */
2060
- clientExtensionResults?: Record<string, unknown> | null;
2474
+ clientExtensionResults?: unknown;
2061
2475
  /**
2062
2476
  * @description This internal slot contains the credential ID, chosen by the
2063
2477
  * authenticator. The credential ID is used to look up credentials for use,
@@ -2068,7 +2482,9 @@ export interface components {
2068
2482
  */
2069
2483
  id: string;
2070
2484
  /** @description Authenticators respond to Relying Party requests by returning an object derived from the AuthenticatorResponse interface */
2071
- response: components["schemas"]["AuthenticatorAttestationResponse"] | components["schemas"]["AuthenticatorAssertionResponse"];
2485
+ response:
2486
+ | components["schemas"]["AuthenticatorAttestationResponse"]
2487
+ | components["schemas"]["AuthenticatorAssertionResponse"];
2072
2488
  };
2073
2489
  /**
2074
2490
  * @description Defines the parameters for the creation of a new public key credential
@@ -2108,7 +2524,7 @@ export interface components {
2108
2524
  *
2109
2525
  * https://www.w3.org/TR/webauthn-2/#dom-publickeycredentialcreationoptions-extensions
2110
2526
  */
2111
- extensions?: Record<string, unknown> | null;
2527
+ extensions?: unknown;
2112
2528
  /**
2113
2529
  * @description This member contains information about the desired properties of the
2114
2530
  * credential to be created. The sequence is ordered from most preferred to
@@ -2202,7 +2618,7 @@ export interface components {
2202
2618
  * https://www.w3.org/TR/webauthn-2/#dom-publickeycredentialrequestoptions-challenge
2203
2619
  */
2204
2620
  challenge: string;
2205
- extensions?: Record<string, unknown> | null;
2621
+ extensions?: unknown;
2206
2622
  /**
2207
2623
  * @description This OPTIONAL member specifies the relying party identifier claimed by
2208
2624
  * the caller. If omitted, its value will be the CredentialsContainer
@@ -2349,13 +2765,13 @@ export interface components {
2349
2765
  name: string;
2350
2766
  };
2351
2767
  RatchetConfig: {
2352
- /** @default 300 */
2768
+ /** @default default_auth_lifetime */
2353
2769
  auth_lifetime?: components["schemas"]["Seconds"];
2354
2770
  /** @default default_grace_lifetime */
2355
2771
  grace_lifetime?: components["schemas"]["Seconds"];
2356
- /** @default 86400 */
2772
+ /** @default default_refresh_lifetime */
2357
2773
  refresh_lifetime?: components["schemas"]["Seconds"];
2358
- /** @default 31536000 */
2774
+ /** @default default_session_lifetime */
2359
2775
  session_lifetime?: components["schemas"]["Seconds"];
2360
2776
  };
2361
2777
  /** @description Receipt that an MFA request was approved. */
@@ -2369,6 +2785,15 @@ export interface components {
2369
2785
  final_approver: string;
2370
2786
  timestamp: components["schemas"]["EpochDateTime"];
2371
2787
  };
2788
+ /**
2789
+ * @description An extended form of `PublicKeyCredentialRequestOptions` that allows clients to derive the WebAuthn challenge
2790
+ * from a structured preimage.
2791
+ *
2792
+ * This ensures that the webuathn signature can only be used for a specific purpose
2793
+ */
2794
+ RequestOptionsWithHash: components["schemas"]["ChallengePieces"] & {
2795
+ options: components["schemas"]["PublicKeyCredentialRequestOptions"];
2796
+ };
2372
2797
  /**
2373
2798
  * @description This enumeration’s values describe the Relying Party's requirements for
2374
2799
  * client-side discoverable credentials (formerly known as resident credentials
@@ -2445,6 +2870,17 @@ export interface components {
2445
2870
  /** @description The list of sessions */
2446
2871
  sessions: components["schemas"]["SessionInfo"][];
2447
2872
  };
2873
+ SignerErrorCode:
2874
+ | components["schemas"]["SignerErrorOwnCodes"]
2875
+ | components["schemas"]["AcceptedValueCode"]
2876
+ | components["schemas"]["BadRequestErrorCode"]
2877
+ | components["schemas"]["NotFoundErrorCode"]
2878
+ | components["schemas"]["ForbiddenErrorCode"]
2879
+ | components["schemas"]["UnauthorizedErrorCode"]
2880
+ | components["schemas"]["PreconditionErrorCode"]
2881
+ | components["schemas"]["InternalErrorCode"];
2882
+ /** @enum {string} */
2883
+ SignerErrorOwnCodes: "UnhandledError" | "ProxyStartError" | "EnclaveError";
2448
2884
  /**
2449
2885
  * @example {
2450
2886
  * "message_base64": "AQABA8OKVzLEjststN4xXr39kLKHT8d58eQY1QEs6MeXwEFBrxTAlULX1troLbWxuAXQqgbQofGi6z8fJi7KAAIf7YMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJK0tn39k28s+X86W47EvbRRKnYBVQ8Q/l2m1EbfT7+vAQICAAEMAgAAAGQAAAAAAAAA"
@@ -2550,6 +2986,12 @@ export interface components {
2550
2986
  /** @description The name of the issuer; defaults to "Cubist". */
2551
2987
  issuer?: string | null;
2552
2988
  };
2989
+ /** @enum {string} */
2990
+ UnauthorizedErrorCode:
2991
+ | "ClaimsHeaderMissing"
2992
+ | "ClaimsParseError"
2993
+ | "OidcIdentityHeaderMissing"
2994
+ | "OidcIdentityParseError";
2553
2995
  /** @description Options that should be set only for local devnet testing. */
2554
2996
  UnsafeConf: {
2555
2997
  /**
@@ -2618,6 +3060,11 @@ export interface components {
2618
3060
  * Once disabled, a key cannot be used for signing.
2619
3061
  */
2620
3062
  enabled?: boolean | null;
3063
+ /**
3064
+ * @description If set, update this key's metadata. Validation regex: ^[A-Za-z0-9_=+/ \-\.\,]{0,1024}$
3065
+ * @example Contract admin key
3066
+ */
3067
+ metadata?: string | null;
2621
3068
  /**
2622
3069
  * @description If set, updates key's owner to this value.
2623
3070
  * The new owner must be an existing user who is a member of the same org.
@@ -2860,12 +3307,20 @@ export interface components {
2860
3307
  user_id: string;
2861
3308
  };
2862
3309
  UserInfo: {
2863
- /** @example alice@example.com */
3310
+ /**
3311
+ * @description Optional email
3312
+ * @example alice@example.com
3313
+ */
2864
3314
  email: string;
2865
3315
  /** @description All multi-factor authentication methods configured for this user */
2866
3316
  mfa: components["schemas"]["ConfiguredMfa"][];
2867
3317
  /** @description MFA policy, applies before logging in and other sensitive operations */
2868
- mfa_policy?: Record<string, unknown> | null;
3318
+ mfa_policy?: unknown;
3319
+ /**
3320
+ * @description Optional name
3321
+ * @example Alice
3322
+ */
3323
+ name?: string | null;
2869
3324
  /**
2870
3325
  * @description All organizations the user belongs to
2871
3326
  * @example [
@@ -2978,7 +3433,7 @@ export interface components {
2978
3433
  };
2979
3434
  };
2980
3435
  };
2981
- Eip712SignResponse: {
3436
+ Eip191Or712SignResponse: {
2982
3437
  content: {
2983
3438
  "application/json": {
2984
3439
  /**
@@ -3022,10 +3477,11 @@ export interface components {
3022
3477
  };
3023
3478
  FidoAssertChallenge: {
3024
3479
  content: {
3025
- "application/json": {
3480
+ "application/json": (components["schemas"]["ChallengePieces"] & {
3481
+ options: components["schemas"]["PublicKeyCredentialRequestOptions"];
3482
+ }) & {
3026
3483
  /** @description The id of the challenge. Must be supplied when answering the challenge. */
3027
3484
  challenge_id: string;
3028
- options: components["schemas"]["PublicKeyCredentialRequestOptions"];
3029
3485
  };
3030
3486
  };
3031
3487
  };
@@ -3035,10 +3491,11 @@ export interface components {
3035
3491
  */
3036
3492
  FidoCreateChallengeResponse: {
3037
3493
  content: {
3038
- "application/json": {
3494
+ "application/json": (components["schemas"]["ChallengePieces"] & {
3495
+ options: components["schemas"]["PublicKeyCredentialCreationOptions"];
3496
+ }) & {
3039
3497
  /** @description The id of the challenge. Must be supplied when answering the challenge. */
3040
3498
  challenge_id: string;
3041
- options: components["schemas"]["PublicKeyCredentialCreationOptions"];
3042
3499
  };
3043
3500
  };
3044
3501
  };
@@ -3056,7 +3513,7 @@ export interface components {
3056
3513
  */
3057
3514
  IdentityProof: {
3058
3515
  content: {
3059
- "application/json": ({
3516
+ "application/json": {
3060
3517
  /**
3061
3518
  * @description OIDC audience; set only if the proof was obtained by using OIDC token.
3062
3519
  *
@@ -3071,7 +3528,7 @@ export interface components {
3071
3528
  exp_epoch: components["schemas"]["EpochDateTime"];
3072
3529
  identity?: components["schemas"]["OIDCIdentity"] | null;
3073
3530
  user_info?: components["schemas"]["CubeSignerUserInfo"] | null;
3074
- }) & {
3531
+ } & {
3075
3532
  /** @description An opaque identifier for the proof */
3076
3533
  id: string;
3077
3534
  };
@@ -3127,6 +3584,12 @@ export interface components {
3127
3584
  * @example 0x8e3484687e66cdd26cf04c3647633ab4f3570148
3128
3585
  */
3129
3586
  material_id: string;
3587
+ /**
3588
+ * @description User-defined metadata. When rendering (e.g., in the browser) you should treat
3589
+ * it as untrusted user data (and avoid injecting metadata into HTML directly) if
3590
+ * untrusted users can create/update keys (or their metadata).
3591
+ */
3592
+ metadata?: string;
3130
3593
  /**
3131
3594
  * @description Owner of the key
3132
3595
  * @example User#c3b9379c-4e8c-4216-bd0a-65ace53cf98f
@@ -3283,18 +3746,33 @@ export interface components {
3283
3746
  };
3284
3747
  };
3285
3748
  };
3749
+ PaginatedListKeyRolesResponse: {
3750
+ content: {
3751
+ "application/json": {
3752
+ /** @description All roles the key is in */
3753
+ roles: components["schemas"]["KeyInRoleInfo"][];
3754
+ } & {
3755
+ /**
3756
+ * @description If set, the content of `response` does not contain the entire result set.
3757
+ * To fetch the next page of the result set, call the same endpoint
3758
+ * but specify this value as the 'page.start' query parameter.
3759
+ */
3760
+ last_evaluated_key?: string | null;
3761
+ };
3762
+ };
3763
+ };
3286
3764
  PaginatedListKeysResponse: {
3287
3765
  content: {
3288
3766
  "application/json": {
3289
3767
  keys: components["schemas"]["KeyInfo"][];
3290
- } & ({
3768
+ } & {
3291
3769
  /**
3292
3770
  * @description If set, the content of `response` does not contain the entire result set.
3293
3771
  * To fetch the next page of the result set, call the same endpoint
3294
3772
  * but specify this value as the 'page.start' query parameter.
3295
3773
  */
3296
3774
  last_evaluated_key?: string | null;
3297
- });
3775
+ };
3298
3776
  };
3299
3777
  };
3300
3778
  PaginatedListRoleKeysResponse: {
@@ -3302,14 +3780,14 @@ export interface components {
3302
3780
  "application/json": {
3303
3781
  /** @description All keys in a role */
3304
3782
  keys: components["schemas"]["KeyInRoleInfo"][];
3305
- } & ({
3783
+ } & {
3306
3784
  /**
3307
3785
  * @description If set, the content of `response` does not contain the entire result set.
3308
3786
  * To fetch the next page of the result set, call the same endpoint
3309
3787
  * but specify this value as the 'page.start' query parameter.
3310
3788
  */
3311
3789
  last_evaluated_key?: string | null;
3312
- });
3790
+ };
3313
3791
  };
3314
3792
  };
3315
3793
  PaginatedListRoleUsersResponse: {
@@ -3317,14 +3795,14 @@ export interface components {
3317
3795
  "application/json": {
3318
3796
  /** @description All users in a role */
3319
3797
  users: components["schemas"]["UserInRoleInfo"][];
3320
- } & ({
3798
+ } & {
3321
3799
  /**
3322
3800
  * @description If set, the content of `response` does not contain the entire result set.
3323
3801
  * To fetch the next page of the result set, call the same endpoint
3324
3802
  * but specify this value as the 'page.start' query parameter.
3325
3803
  */
3326
3804
  last_evaluated_key?: string | null;
3327
- });
3805
+ };
3328
3806
  };
3329
3807
  };
3330
3808
  PaginatedListRolesResponse: {
@@ -3332,14 +3810,14 @@ export interface components {
3332
3810
  "application/json": {
3333
3811
  /** @description All roles in an organization. */
3334
3812
  roles: components["schemas"]["RoleInfo"][];
3335
- } & ({
3813
+ } & {
3336
3814
  /**
3337
3815
  * @description If set, the content of `response` does not contain the entire result set.
3338
3816
  * To fetch the next page of the result set, call the same endpoint
3339
3817
  * but specify this value as the 'page.start' query parameter.
3340
3818
  */
3341
3819
  last_evaluated_key?: string | null;
3342
- });
3820
+ };
3343
3821
  };
3344
3822
  };
3345
3823
  PaginatedSessionsResponse: {
@@ -3347,28 +3825,28 @@ export interface components {
3347
3825
  "application/json": {
3348
3826
  /** @description The list of sessions */
3349
3827
  sessions: components["schemas"]["SessionInfo"][];
3350
- } & ({
3828
+ } & {
3351
3829
  /**
3352
3830
  * @description If set, the content of `response` does not contain the entire result set.
3353
3831
  * To fetch the next page of the result set, call the same endpoint
3354
3832
  * but specify this value as the 'page.start' query parameter.
3355
3833
  */
3356
3834
  last_evaluated_key?: string | null;
3357
- });
3835
+ };
3358
3836
  };
3359
3837
  };
3360
3838
  PaginatedUserExportListResponse: {
3361
3839
  content: {
3362
3840
  "application/json": {
3363
3841
  export_requests: components["schemas"]["UserExportInitResponse"][];
3364
- } & ({
3842
+ } & {
3365
3843
  /**
3366
3844
  * @description If set, the content of `response` does not contain the entire result set.
3367
3845
  * To fetch the next page of the result set, call the same endpoint
3368
3846
  * but specify this value as the 'page.start' query parameter.
3369
3847
  */
3370
3848
  last_evaluated_key?: string | null;
3371
- });
3849
+ };
3372
3850
  };
3373
3851
  };
3374
3852
  RevokeTokenResponse: {
@@ -3600,12 +4078,20 @@ export interface components {
3600
4078
  UserInfo: {
3601
4079
  content: {
3602
4080
  "application/json": {
3603
- /** @example alice@example.com */
4081
+ /**
4082
+ * @description Optional email
4083
+ * @example alice@example.com
4084
+ */
3604
4085
  email: string;
3605
4086
  /** @description All multi-factor authentication methods configured for this user */
3606
4087
  mfa: components["schemas"]["ConfiguredMfa"][];
3607
4088
  /** @description MFA policy, applies before logging in and other sensitive operations */
3608
- mfa_policy?: Record<string, unknown> | null;
4089
+ mfa_policy?: unknown;
4090
+ /**
4091
+ * @description Optional name
4092
+ * @example Alice
4093
+ */
4094
+ name?: string | null;
3609
4095
  /**
3610
4096
  * @description All organizations the user belongs to
3611
4097
  * @example [
@@ -3633,7 +4119,6 @@ export type $defs = Record<string, never>;
3633
4119
  export type external = Record<string, never>;
3634
4120
 
3635
4121
  export interface operations {
3636
-
3637
4122
  /**
3638
4123
  * User Info
3639
4124
  * @description User Info
@@ -3818,6 +4303,46 @@ export interface operations {
3818
4303
  };
3819
4304
  };
3820
4305
  };
4306
+ /**
4307
+ * Sign EIP-191 Data
4308
+ * @description Sign EIP-191 Data
4309
+ *
4310
+ * Signs a message using EIP-191 personal_sign with a given Secp256k1 key.
4311
+ */
4312
+ eip191Sign: {
4313
+ parameters: {
4314
+ path: {
4315
+ /**
4316
+ * @description Name or ID of the desired Org
4317
+ * @example Org#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
4318
+ */
4319
+ org_id: string;
4320
+ /**
4321
+ * @description Hex-encoded EVM address of the Secp256k1 key
4322
+ * @example 0x49011adbCC3bC9c0307BB07F37Dda1a1a9c69d2E
4323
+ */
4324
+ pubkey: string;
4325
+ };
4326
+ };
4327
+ requestBody: {
4328
+ content: {
4329
+ "application/json": components["schemas"]["Eip191SignRequest"];
4330
+ };
4331
+ };
4332
+ responses: {
4333
+ 200: components["responses"]["Eip191Or712SignResponse"];
4334
+ 202: {
4335
+ content: {
4336
+ "application/json": components["schemas"]["AcceptedResponse"];
4337
+ };
4338
+ };
4339
+ default: {
4340
+ content: {
4341
+ "application/json": components["schemas"]["ErrorResponse"];
4342
+ };
4343
+ };
4344
+ };
4345
+ };
3821
4346
  /**
3822
4347
  * Sign EIP-712 Typed Data
3823
4348
  * @description Sign EIP-712 Typed Data
@@ -3833,7 +4358,7 @@ export interface operations {
3833
4358
  */
3834
4359
  org_id: string;
3835
4360
  /**
3836
- * @description Hex-encoded ethereum address of the secp key
4361
+ * @description Hex-encoded EVM address of the Secp256k1 key
3837
4362
  * @example 0x49011adbCC3bC9c0307BB07F37Dda1a1a9c69d2E
3838
4363
  */
3839
4364
  pubkey: string;
@@ -3845,7 +4370,7 @@ export interface operations {
3845
4370
  };
3846
4371
  };
3847
4372
  responses: {
3848
- 200: components["responses"]["Eip712SignResponse"];
4373
+ 200: components["responses"]["Eip191Or712SignResponse"];
3849
4374
  202: {
3850
4375
  content: {
3851
4376
  "application/json": components["schemas"]["AcceptedResponse"];
@@ -3943,8 +4468,7 @@ export interface operations {
3943
4468
  "application/json": components["schemas"]["IdentityProof"];
3944
4469
  };
3945
4470
  };
3946
- responses: {
3947
- };
4471
+ responses: {};
3948
4472
  };
3949
4473
  /**
3950
4474
  * Create Key-Import Key
@@ -4202,6 +4726,51 @@ export interface operations {
4202
4726
  };
4203
4727
  };
4204
4728
  };
4729
+ /**
4730
+ * List Key Roles
4731
+ * @description List Key Roles
4732
+ *
4733
+ * Get all roles the key is in
4734
+ */
4735
+ listKeyRoles: {
4736
+ parameters: {
4737
+ query?: {
4738
+ /**
4739
+ * @description Max number of items to return per page.
4740
+ *
4741
+ * If the actual number of returned items may be less that this, even if there exist more
4742
+ * data in the result set. To reliably determine if more data is left in the result set,
4743
+ * inspect the [UnencryptedLastEvalKey] value in the response object.
4744
+ */
4745
+ "page.size"?: number;
4746
+ /**
4747
+ * @description The start of the page. Omit to start from the beginning; otherwise, only specify a
4748
+ * the exact value previously returned as 'last_evaluated_key' from the same endpoint.
4749
+ */
4750
+ "page.start"?: components["schemas"]["LastEvalKey"] | null;
4751
+ };
4752
+ path: {
4753
+ /**
4754
+ * @description Name or ID of the desired Org
4755
+ * @example Org#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
4756
+ */
4757
+ org_id: string;
4758
+ /**
4759
+ * @description ID of the desired Key
4760
+ * @example Key#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
4761
+ */
4762
+ key_id: string;
4763
+ };
4764
+ };
4765
+ responses: {
4766
+ 200: components["responses"]["PaginatedListKeyRolesResponse"];
4767
+ default: {
4768
+ content: {
4769
+ "application/json": components["schemas"]["ErrorResponse"];
4770
+ };
4771
+ };
4772
+ };
4773
+ };
4205
4774
  /**
4206
4775
  * List Pending MFA Requests
4207
4776
  * @description List Pending MFA Requests
@@ -4259,16 +4828,23 @@ export interface operations {
4259
4828
  };
4260
4829
  };
4261
4830
  /**
4262
- * Approve MFA Request
4263
- * @description Approve MFA Request
4831
+ * Approve or Reject MFA Request
4832
+ * @description Approve or Reject MFA Request
4264
4833
  *
4265
- * Approve request after logging in with CubeSigner. Adds the currently-logged user as an approver
4834
+ * Approve or reject request after logging in with CubeSigner.
4835
+ *
4836
+ * If approving, adds the currently-logged user as an approver
4266
4837
  * of a pending MFA request of the [Status::RequiredApprovers] kind. If the required number of
4267
4838
  * approvers is reached, the MFA request is approved; the confirmation receipt can be used to
4268
4839
  * resume the original HTTP request.
4840
+ *
4841
+ * If rejecting, immediately deletes the pending MFA request.
4269
4842
  */
4270
- mfaApproveCs: {
4843
+ mfaVoteCs: {
4271
4844
  parameters: {
4845
+ query?: {
4846
+ mfa_vote?: components["schemas"]["MfaVote"] | null;
4847
+ };
4272
4848
  path: {
4273
4849
  /**
4274
4850
  * @description Name or ID of the desired Org
@@ -4292,12 +4868,12 @@ export interface operations {
4292
4868
  };
4293
4869
  };
4294
4870
  /**
4295
- * Initiate Approving an MFA Request with FIDO
4296
- * @description Initiate Approving an MFA Request with FIDO
4871
+ * Initiate a FIDO MFA Approval/Rejection
4872
+ * @description Initiate a FIDO MFA Approval/Rejection
4297
4873
  *
4298
- * Initiates the approval process of an MFA Request using FIDO.
4874
+ * Initiates the approval/rejection process of an MFA Request using FIDO.
4299
4875
  */
4300
- mfaApproveFido: {
4876
+ mfaFidoInit: {
4301
4877
  parameters: {
4302
4878
  path: {
4303
4879
  /**
@@ -4322,16 +4898,20 @@ export interface operations {
4322
4898
  };
4323
4899
  };
4324
4900
  /**
4325
- * Finalize a FIDO MFA Approval
4326
- * @description Finalize a FIDO MFA Approval
4327
- *
4328
- * Adds an approver to a pending MFA request.
4901
+ * Finalize a FIDO MFA Approval/Rejection
4902
+ * @description Finalize a FIDO MFA Approval/Rejection
4329
4903
  *
4904
+ * If approving, adds an approver to a pending MFA request.
4330
4905
  * If the required number of approvers is reached, the MFA request is approved;
4331
4906
  * the confirmation receipt can be used to resume the original HTTP request.
4907
+ *
4908
+ * If rejecting, immediately deletes the pending MFA request.
4332
4909
  */
4333
- mfaApproveFidoComplete: {
4910
+ mfaVoteFidoComplete: {
4334
4911
  parameters: {
4912
+ query?: {
4913
+ mfa_vote?: components["schemas"]["MfaVote"] | null;
4914
+ };
4335
4915
  path: {
4336
4916
  /**
4337
4917
  * @description Name or ID of the desired Org
@@ -4360,16 +4940,20 @@ export interface operations {
4360
4940
  };
4361
4941
  };
4362
4942
  /**
4363
- * Approve a TOTP MFA Request
4364
- * @description Approve a TOTP MFA Request
4943
+ * Approve/Reject a TOTP MFA Request
4944
+ * @description Approve/Reject a TOTP MFA Request
4365
4945
  *
4366
- * Adds the current user as approver to a pending MFA request by providing TOTP code.
4946
+ * If approving, adds the current user as approver to a pending MFA request by
4947
+ * providing TOTP code. If the required number of approvers is reached, the MFA request is
4948
+ * approved; the confirmation receipt can be used to resume the original HTTP request.
4367
4949
  *
4368
- * If the required number of approvers is reached, the MFA request is approved;
4369
- * the confirmation receipt can be used to resume the original HTTP request.
4950
+ * If rejecting, immediately deletes the pending MFA request.
4370
4951
  */
4371
- mfaApproveTotp: {
4952
+ mfaVoteTotp: {
4372
4953
  parameters: {
4954
+ query?: {
4955
+ mfa_vote?: components["schemas"]["MfaVote"] | null;
4956
+ };
4373
4957
  path: {
4374
4958
  /**
4375
4959
  * @description Name or ID of the desired Org
@@ -4541,7 +5125,7 @@ export interface operations {
4541
5125
  * @description Delete Role
4542
5126
  *
4543
5127
  * Deletes a role in an organization.
4544
- * Only organization owners can perform this action.
5128
+ * Only users in the role can perform this action.
4545
5129
  */
4546
5130
  deleteRole: {
4547
5131
  parameters: {
@@ -4571,7 +5155,8 @@ export interface operations {
4571
5155
  * Update Role
4572
5156
  * @description Update Role
4573
5157
  *
4574
- * Enables or disables a role.
5158
+ * Enables or disables a role (this requires the `manage:role:update:enable` scope).
5159
+ * Updates the role's policies (this requires the `manage:role:update:policy` scope).
4575
5160
  * The user must be in the role or an owner of the organization.
4576
5161
  */
4577
5162
  updateRole: {
@@ -4629,8 +5214,7 @@ export interface operations {
4629
5214
  "application/json": components["schemas"]["AddKeysToRoleRequest"];
4630
5215
  };
4631
5216
  };
4632
- responses: {
4633
- };
5217
+ responses: {};
4634
5218
  };
4635
5219
  /**
4636
5220
  * Add User
@@ -4659,8 +5243,7 @@ export interface operations {
4659
5243
  user_id: string;
4660
5244
  };
4661
5245
  };
4662
- responses: {
4663
- };
5246
+ responses: {};
4664
5247
  };
4665
5248
  /**
4666
5249
  * List Role Keys
@@ -4733,8 +5316,7 @@ export interface operations {
4733
5316
  key_id: string;
4734
5317
  };
4735
5318
  };
4736
- responses: {
4737
- };
5319
+ responses: {};
4738
5320
  };
4739
5321
  /**
4740
5322
  * List a single page of Tokens (Deprecated)
@@ -4924,6 +5506,35 @@ export interface operations {
4924
5506
  };
4925
5507
  };
4926
5508
  };
5509
+ /**
5510
+ * Remove User
5511
+ * @description Remove User
5512
+ *
5513
+ * Removes an existing user from an existing role.
5514
+ * Only users in the role or org owners can remove users from a role.
5515
+ */
5516
+ removeUserFromRole: {
5517
+ parameters: {
5518
+ path: {
5519
+ /**
5520
+ * @description Name or ID of the desired Org
5521
+ * @example Org#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
5522
+ */
5523
+ org_id: string;
5524
+ /**
5525
+ * @description Name or ID of the desired Role
5526
+ * @example Role#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
5527
+ */
5528
+ role_id: string;
5529
+ /**
5530
+ * @description ID of the desired User
5531
+ * @example User#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
5532
+ */
5533
+ user_id: string;
5534
+ };
5535
+ };
5536
+ responses: {};
5537
+ };
4927
5538
  /**
4928
5539
  * List sessions
4929
5540
  * @description List sessions
@@ -4973,7 +5584,8 @@ export interface operations {
4973
5584
  * Create new user session (management and/or signing)
4974
5585
  * @description Create new user session (management and/or signing)
4975
5586
  *
4976
- * Create a new user session
5587
+ * Creates a new user session, silently truncating requested session and auth lifetimes
5588
+ * to be at most requestor's session and auth lifetime, respectively.
4977
5589
  */
4978
5590
  createSession: {
4979
5591
  parameters: {
@@ -5875,9 +6487,9 @@ export interface operations {
5875
6487
  org_id: string;
5876
6488
  };
5877
6489
  };
5878
- requestBody: {
6490
+ requestBody?: {
5879
6491
  content: {
5880
- "application/json": components["schemas"]["HeartbeatRequest"];
6492
+ "application/json": components["schemas"]["HeartbeatRequest"] | null;
5881
6493
  };
5882
6494
  };
5883
6495
  responses: {