@cubist-labs/cubesigner-sdk 0.3.1 → 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 (54) hide show
  1. package/dist/cjs/package.json +1 -1
  2. package/dist/cjs/src/api.d.ts +27 -9
  3. package/dist/cjs/src/api.js +58 -22
  4. package/dist/cjs/src/client.d.ts +68 -1
  5. package/dist/cjs/src/client.js +79 -2
  6. package/dist/cjs/src/error.d.ts +3 -0
  7. package/dist/cjs/src/error.js +2 -1
  8. package/dist/cjs/src/key.d.ts +19 -2
  9. package/dist/cjs/src/key.js +22 -2
  10. package/dist/cjs/src/mfa.d.ts +6 -3
  11. package/dist/cjs/src/mfa.js +8 -5
  12. package/dist/cjs/src/response.d.ts +14 -1
  13. package/dist/cjs/src/response.js +65 -26
  14. package/dist/cjs/src/role.d.ts +6 -0
  15. package/dist/cjs/src/role.js +9 -1
  16. package/dist/cjs/src/schema.d.ts +238 -43
  17. package/dist/cjs/src/schema.js +1 -1
  18. package/dist/cjs/src/schema_types.d.ts +3 -0
  19. package/dist/cjs/src/schema_types.js +1 -1
  20. package/dist/cjs/src/session/signer_session_manager.js +3 -3
  21. package/dist/cjs/src/util.js +3 -2
  22. package/dist/esm/package.json +1 -1
  23. package/dist/esm/src/api.d.ts +27 -9
  24. package/dist/esm/src/api.js +56 -20
  25. package/dist/esm/src/client.d.ts +68 -1
  26. package/dist/esm/src/client.js +79 -2
  27. package/dist/esm/src/error.d.ts +3 -0
  28. package/dist/esm/src/error.js +2 -1
  29. package/dist/esm/src/key.d.ts +19 -2
  30. package/dist/esm/src/key.js +22 -2
  31. package/dist/esm/src/mfa.d.ts +6 -3
  32. package/dist/esm/src/mfa.js +8 -5
  33. package/dist/esm/src/response.d.ts +14 -1
  34. package/dist/esm/src/response.js +65 -26
  35. package/dist/esm/src/role.d.ts +6 -0
  36. package/dist/esm/src/role.js +9 -1
  37. package/dist/esm/src/schema.d.ts +238 -43
  38. package/dist/esm/src/schema.js +1 -1
  39. package/dist/esm/src/schema_types.d.ts +3 -0
  40. package/dist/esm/src/schema_types.js +1 -1
  41. package/dist/esm/src/session/signer_session_manager.js +3 -3
  42. package/dist/esm/src/util.js +3 -2
  43. package/package.json +1 -1
  44. package/src/api.ts +66 -19
  45. package/src/client.ts +94 -2
  46. package/src/error.ts +4 -0
  47. package/src/key.ts +31 -2
  48. package/src/mfa.ts +8 -4
  49. package/src/response.ts +50 -4
  50. package/src/role.ts +9 -0
  51. package/src/schema.ts +496 -43
  52. package/src/schema_types.ts +3 -0
  53. package/src/session/signer_session_manager.ts +2 -2
  54. package/src/util.ts +2 -3
@@ -188,6 +188,15 @@ export interface paths {
188
188
  */
189
189
  patch: operations["updateKey"];
190
190
  };
191
+ "/v0/org/{org_id}/keys/{key_id}/roles": {
192
+ /**
193
+ * List Key Roles
194
+ * @description List Key Roles
195
+ *
196
+ * Get all roles the key is in
197
+ */
198
+ get: operations["listKeyRoles"];
199
+ };
191
200
  "/v0/org/{org_id}/mfa": {
192
201
  /**
193
202
  * List Pending MFA Requests
@@ -207,46 +216,52 @@ export interface paths {
207
216
  */
208
217
  get: operations["mfaGet"];
209
218
  /**
210
- * Approve MFA Request
211
- * @description Approve MFA Request
219
+ * Approve or Reject MFA Request
220
+ * @description Approve or Reject MFA Request
221
+ *
222
+ * Approve or reject request after logging in with CubeSigner.
212
223
  *
213
- * Approve request after logging in with CubeSigner. Adds the currently-logged user as an approver
224
+ * If approving, adds the currently-logged user as an approver
214
225
  * of a pending MFA request of the [Status::RequiredApprovers] kind. If the required number of
215
226
  * approvers is reached, the MFA request is approved; the confirmation receipt can be used to
216
227
  * resume the original HTTP request.
228
+ *
229
+ * If rejecting, immediately deletes the pending MFA request.
217
230
  */
218
- patch: operations["mfaApproveCs"];
231
+ patch: operations["mfaVoteCs"];
219
232
  };
220
233
  "/v0/org/{org_id}/mfa/{mfa_id}/fido": {
221
234
  /**
222
- * Initiate Approving an MFA Request with FIDO
223
- * @description Initiate Approving an MFA Request with FIDO
235
+ * Initiate a FIDO MFA Approval/Rejection
236
+ * @description Initiate a FIDO MFA Approval/Rejection
224
237
  *
225
- * Initiates the approval process of an MFA Request using FIDO.
238
+ * Initiates the approval/rejection process of an MFA Request using FIDO.
226
239
  */
227
- post: operations["mfaApproveFido"];
240
+ post: operations["mfaFidoInit"];
228
241
  /**
229
- * Finalize a FIDO MFA Approval
230
- * @description Finalize a FIDO MFA Approval
231
- *
232
- * Adds an approver to a pending MFA request.
242
+ * Finalize a FIDO MFA Approval/Rejection
243
+ * @description Finalize a FIDO MFA Approval/Rejection
233
244
  *
245
+ * If approving, adds an approver to a pending MFA request.
234
246
  * If the required number of approvers is reached, the MFA request is approved;
235
247
  * the confirmation receipt can be used to resume the original HTTP request.
248
+ *
249
+ * If rejecting, immediately deletes the pending MFA request.
236
250
  */
237
- patch: operations["mfaApproveFidoComplete"];
251
+ patch: operations["mfaVoteFidoComplete"];
238
252
  };
239
253
  "/v0/org/{org_id}/mfa/{mfa_id}/totp": {
240
254
  /**
241
- * Approve a TOTP MFA Request
242
- * @description Approve a TOTP MFA Request
255
+ * Approve/Reject a TOTP MFA Request
256
+ * @description Approve/Reject a TOTP MFA Request
243
257
  *
244
- * Adds the current user as approver to a pending MFA request by providing TOTP code.
258
+ * If approving, adds the current user as approver to a pending MFA request by
259
+ * providing TOTP code. If the required number of approvers is reached, the MFA request is
260
+ * approved; the confirmation receipt can be used to resume the original HTTP request.
245
261
  *
246
- * If the required number of approvers is reached, the MFA request is approved;
247
- * the confirmation receipt can be used to resume the original HTTP request.
262
+ * If rejecting, immediately deletes the pending MFA request.
248
263
  */
249
- patch: operations["mfaApproveTotp"];
264
+ patch: operations["mfaVoteTotp"];
250
265
  };
251
266
  "/v0/org/{org_id}/oidc": {
252
267
  /**
@@ -391,6 +406,16 @@ export interface paths {
391
406
  */
392
407
  get: operations["listRoleUsers"];
393
408
  };
409
+ "/v0/org/{org_id}/roles/{role_id}/users/{user_id}": {
410
+ /**
411
+ * Remove User
412
+ * @description Remove User
413
+ *
414
+ * Removes an existing user from an existing role.
415
+ * Only users in the role or org owners can remove users from a role.
416
+ */
417
+ delete: operations["removeUserFromRole"];
418
+ };
394
419
  "/v0/org/{org_id}/session": {
395
420
  /**
396
421
  * List sessions
@@ -744,6 +769,8 @@ export interface components {
744
769
  session?: components["schemas"]["NewSessionResponse"] | null;
745
770
  };
746
771
  };
772
+ /** @enum {string} */
773
+ AcceptedValueCode: "MfaRequired";
747
774
  AddKeysToRoleRequest: {
748
775
  /**
749
776
  * @description A list of keys to add to a role
@@ -789,6 +816,11 @@ export interface components {
789
816
  identity: components["schemas"]["OIDCIdentity"];
790
817
  /** @description Optional login MFA policy */
791
818
  mfa_policy?: unknown;
819
+ /**
820
+ * @description Optional user full name
821
+ * @example Alice Wonderland
822
+ */
823
+ name?: string | null;
792
824
  role: components["schemas"]["MemberRole"];
793
825
  };
794
826
  AddThirdPartyUserResponse: {
@@ -950,6 +982,8 @@ export interface components {
950
982
  };
951
983
  /** @description Wrapper around a zeroizing 32-byte fixed-size array */
952
984
  B32: string;
985
+ /** @enum {string} */
986
+ BadRequestErrorCode: "GenericBadRequest" | "InvalidBody" | "InvalidMfaReceipt" | "InvalidMfaPolicyCount" | "InvalidMfaPolicyNumAuthFactors" | "InvalidMfaPolicyNumAllowedApprovers" | "InvalidMfaPolicyRedundantRule" | "InvalidCreateKeyCount" | "OrgInviteExistingUser" | "OrgNameTaken" | "RoleNameTaken" | "AddKeyToRoleCountTooHigh" | "InvalidKeyId" | "InvalidKeyMetadataLength" | "InvalidKeyMetadata" | "InvalidKeyMaterialId" | "KeyNotFound" | "UserExportDerivedKey" | "UserExportPublicKeyInvalid" | "UserExportInProgress" | "RoleNotFound" | "InvalidMfaReceiptOrgIdMissing" | "InvalidMfaReceiptInvalidOrgId" | "MfaRequestNotFound" | "InvalidKeyType" | "InvalidKeyMaterial" | "InvalidHexValue" | "InvalidBase32Value" | "InvalidBase58Value" | "InvalidForkVersionLength" | "InvalidEthAddress" | "InvalidStellarAddress" | "InvalidOrgNameOrId" | "InvalidStakeDeposit" | "InvalidBlobSignRequest" | "InvalidSolanaSignRequest" | "InvalidEip712SignRequest" | "InvalidEvmSignRequest" | "InvalidEth2SignRequest" | "InvalidDeriveKeyRequest" | "InvalidStakingAmount" | "CustomStakingAmountNotAllowedForWrapperContract" | "InvalidUnstakeRequest" | "InvalidCreateUserRequest" | "UserAlreadyExists" | "UserNotFound" | "PolicyRuleKeyMismatch" | "EmptyScopes" | "InvalidScopesForRoleSession" | "InvalidLifetime" | "NoSingleKeyForUser" | "InvalidOrgPolicyRule" | "SourceIpAllowlistEmpty" | "InvalidOrgPolicyRepeatedRule" | "AvaSignHashError" | "AvaSignError" | "BtcSegwitHashError" | "BtcSignError" | "Eip712SignError" | "InvalidMemberRoleInUserAdd" | "ThirdPartyUserAlreadyExists" | "ThirdPartyUserNotFound" | "DeleteOidcUserError" | "SessionRoleMismatch" | "InvalidOidcToken" | "OidcIssuerUnsupported" | "OidcIssuerNotAllowed" | "OidcIssuerNoApplicableJwk" | "FidoCredentialMissing" | "FidoKeyAlreadyRegistered" | "FidoKeySignCountTooLow" | "FidoVerificationFailed" | "FidoChallengeMfaMismatch" | "UnsupportedLegacyCognitoSession" | "InvalidIdentityProof" | "PaginationDataExpired" | "ExistingKeysViolateExclusiveKeyAccess" | "ExportDelayTooShort" | "ExportWindowTooLong" | "InvalidTotpFailureLimit" | "InvalidEip191SignRequest" | "CannotResendUserInvitation";
953
987
  /**
954
988
  * @example {
955
989
  * "message_base64": "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoxMjM0NTYK"
@@ -1148,6 +1182,8 @@ export interface components {
1148
1182
  configured_mfa: components["schemas"]["ConfiguredMfa"][];
1149
1183
  /** @description Set once the user successfully logs into CubeSigner */
1150
1184
  initialized: boolean;
1185
+ /** @description Optional human name for the user */
1186
+ name?: string | null;
1151
1187
  /** @description CubeSigner's user identifier */
1152
1188
  user_id: string;
1153
1189
  };
@@ -1326,6 +1362,7 @@ export interface components {
1326
1362
  /** @description The structure of ErrorResponse must match the response template that AWS uses */
1327
1363
  ErrorResponse: {
1328
1364
  accepted?: components["schemas"]["AcceptedValue"] | null;
1365
+ error_code: components["schemas"]["SignerErrorCode"];
1329
1366
  /** @description Error message */
1330
1367
  message: string;
1331
1368
  /** @description Optional request identifier */
@@ -1403,6 +1440,8 @@ export interface components {
1403
1440
  */
1404
1441
  signature: string;
1405
1442
  };
1443
+ /** @enum {string} */
1444
+ EvmTxDepositErrorCode: "EvmTxDepositReceiverMismatch" | "EvmTxDepositEmptyData" | "EvmTxDepositEmptyChainId" | "EvmTxDepositEmptyReceiver" | "EvmTxDepositUnexpectedValue" | "EvmTxDepositUnexpectedDataLength" | "EvmTxDepositNoAbi" | "EvmTxDepositNoDepositFunction" | "EvmTxDepositUnexpectedFunctionName" | "EvmTxDepositUnexpectedValidatorKey" | "EvmTxDepositInvalidValidatorKey" | "EvmTxDepositMissingDepositArg" | "EvmTxDepositWrongDepositArgType" | "EvmTxDepositWrongValidatorArgValue" | "EvmTxDepositValidatorKeyNotInRole" | "EvmTxDepositUnexpectedWithdrawalCredentials" | "EvmTxDepositUnresolvedRole" | "EvmTxDepositInvalidDepositEncoding";
1406
1445
  /** @description Sent from the client to the server to answer a fido challenge */
1407
1446
  FidoAssertAnswer: {
1408
1447
  /** @description The ID of the challenge that was returned from the POST endpoint */
@@ -1439,6 +1478,8 @@ export interface components {
1439
1478
  */
1440
1479
  name: string;
1441
1480
  };
1481
+ /** @enum {string} */
1482
+ ForbiddenErrorCode: "FidoRequiredToRemoveTotp" | "MfaChallengeExpired" | "ChainIdNotAllowed" | "InvalidOrg" | "SessionForWrongOrg" | "OrgDisabled" | "OrgNotFound" | "OrgWithoutOwner" | "OrphanedUser" | "OidcUserNotFound" | "UserNotInOrg" | "UserNotOrgOwner" | "UserNotKeyOwner" | "InvalidRole" | "DisabledRole" | "KeyDisabled" | "RoleNotInOrg" | "KeyNotInRole" | "KeyNotInOrg" | "UserExportRequestNotInOrg" | "UserExportRequestInvalid" | "UserNotOriginalKeyOwner" | "UserNotInRole" | "MustBeFullMember" | "SessionExpired" | "SessionRevoked" | "ExpectedUserSession" | "SessionRoleChanged" | "ScopedNameNotFound" | "SessionInvalidEpochToken" | "SessionInvalidRefreshToken" | "SessionRefreshTokenExpired" | "InvalidAuthHeader" | "SessionNotFound" | "InvalidArn" | "SessionInvalidAuthToken" | "SessionAuthTokenExpired" | "SessionPossiblyStolenToken" | "MfaDisallowedIdentity" | "MfaDisallowedApprover" | "MfaTypeNotAllowed" | "MfaNotApprovedYet" | "MfaConfirmationCodeMismatch" | "MfaHttpRequestMismatch" | "MfaApprovalFromUserSession" | "MfaRemoveBelowMin" | "TotpAlreadyConfigured" | "TotpConfigurationChanged" | "MfaTotpBadConfiguration" | "MfaTotpBadCode" | "MfaTotpRateLimit" | "ImproperSessionScope" | "FullSessionRequired" | "SessionWithoutAnyScopeUnder" | "UserRoleUnprivileged" | "MfaNotConfigured";
1442
1483
  /**
1443
1484
  * @description Specifies a fork of the `BeaconChain`, to prevent replay attacks.
1444
1485
  * The schema of `Fork` is defined in the [Beacon chain
@@ -1603,6 +1644,8 @@ export interface components {
1603
1644
  */
1604
1645
  salt: string;
1605
1646
  };
1647
+ /** @enum {string} */
1648
+ InternalErrorCode: "SystemTimeError" | "ReqwestError" | "DbQueryError" | "DbGetError" | "DbDeleteError" | "DbPutError" | "DbUpdateError" | "SerdeError" | "TestAndSetError" | "DbGetItemsError" | "DbWriteError" | "CubistSignerError" | "CwPutMetricDataError" | "KmsGenerateRandomError" | "MalformedTotpBytes" | "KmsGenerateRandomNoResponseError" | "CreateKeyError" | "ParseDerivationPathError" | "SplitSignerError" | "CreateImportKeyError" | "CognitoDeleteUserError" | "CognitoListUsersError" | "CognitoGetUserError" | "MissingUserEmail" | "CognitoResendUserInvitation" | "CognitoSetUserPasswordError" | "GenericInternalError" | "OidcAuthWithoutOrg" | "MissingKeyMetadata" | "KmsKeyWithoutId" | "KmsEnableKeyError" | "KmsDisableKeyError" | "SerializeEncryptedExportKeyError" | "DeserializeEncryptedExportKeyError" | "ReEncryptUserExport" | "S3UploadError" | "S3DownloadError" | "ManagedStateMissing" | "InternalHeaderMissing" | "InvalidInternalHeaderValue" | "RequestLocalStateAlreadySet" | "OidcOrgMismatch" | "OrphanedRoleKeyId" | "OidcIssuerJwkEndpointUnavailable" | "OidcIssuerInvalidJwk" | "InvalidPkForMaterialId" | "UncheckedOrg" | "AvaSignCredsMissing" | "AvaSignSignatureMissing" | "ExpectedRoleSession" | "InvalidThirdPartyIdentity" | "CognitoGetUser";
1606
1649
  InviteRequest: {
1607
1650
  /**
1608
1651
  * @description The user's email address
@@ -1758,6 +1801,11 @@ export interface components {
1758
1801
  * ]
1759
1802
  */
1760
1803
  policy?: Record<string, never>[];
1804
+ /**
1805
+ * @description Role ID
1806
+ * @example Role#e427c28a-9c5b-49cc-a257-878aea58a22c
1807
+ */
1808
+ role_id: string;
1761
1809
  };
1762
1810
  KeyInfo: {
1763
1811
  derivation_info?: components["schemas"]["KeyDerivationInfo"] | null;
@@ -1861,6 +1909,8 @@ export interface components {
1861
1909
  };
1862
1910
  }
1863
1911
  ]>;
1912
+ /** @enum {string} */
1913
+ MfaVote: "approve" | "reject";
1864
1914
  /**
1865
1915
  * @description Network name ('mainnet', 'prater', 'goerli')
1866
1916
  * @example goerli
@@ -1882,14 +1932,13 @@ export interface components {
1882
1932
  */
1883
1933
  token: string;
1884
1934
  };
1935
+ /** @enum {string} */
1936
+ NotFoundErrorCode: "UriSegmentMissing" | "UriSegmentInvalid" | "TotpNotConfigured" | "FidoKeyNotFound" | "FidoChallengeNotFound" | "TotpChallengeNotFound" | "UserExportRequestNotFound" | "UserExportCiphertextNotFound";
1885
1937
  /**
1886
1938
  * @description Represents a globally unique OIDC-authorized user by expressing the full "path" to a user. That is:
1887
1939
  *
1888
1940
  * (iss) (sub)
1889
1941
  * Issuer -> Subresource
1890
- *
1891
- * We include a non-standard third-tier `disambiguator` which allows us to map
1892
- * a single OIDC user to multiple `User`s in CubeSigner
1893
1942
  */
1894
1943
  OIDCIdentity: {
1895
1944
  /**
@@ -2010,6 +2059,21 @@ export interface components {
2010
2059
  */
2011
2060
  "page.start"?: string | null;
2012
2061
  };
2062
+ /**
2063
+ * @description Response type that wraps another type and adds base64url-encoded encrypted `last_evaluated_key`
2064
+ * value (which can the user pass back to use as a url query parameter to continue pagination).
2065
+ */
2066
+ PaginatedListKeyRolesResponse: {
2067
+ /** @description All roles the key is in */
2068
+ roles: components["schemas"]["KeyInRoleInfo"][];
2069
+ } & {
2070
+ /**
2071
+ * @description If set, the content of `response` does not contain the entire result set.
2072
+ * To fetch the next page of the result set, call the same endpoint
2073
+ * but specify this value as the 'page.start' query parameter.
2074
+ */
2075
+ last_evaluated_key?: string | null;
2076
+ };
2013
2077
  /**
2014
2078
  * @description Response type that wraps another type and adds base64url-encoded encrypted `last_evaluated_key`
2015
2079
  * value (which can the user pass back to use as a url query parameter to continue pagination).
@@ -2098,6 +2162,12 @@ export interface components {
2098
2162
  */
2099
2163
  last_evaluated_key?: string | null;
2100
2164
  };
2165
+ PolicyErrorCode: components["schemas"]["PolicyErrorOwnCodes"] | components["schemas"]["EvmTxDepositErrorCode"];
2166
+ /** @enum {string} */
2167
+ PolicyErrorOwnCodes: "EvmTxReceiverMismatch" | "EvmTxSenderMismatch" | "PolicyDisjunctionError" | "PolicyNegationError" | "Eth2ExceededMaxUnstake" | "Eth2ConcurrentUnstaking" | "NotInIpv4Allowlist" | "NotInOriginAllowlist" | "InvalidSourceIp" | "RawSigningNotAllowed" | "Eip712SigningNotAllowed" | "OidcSourceNotAllowed" | "NoOidcAuthSourcesDefined" | "AddKeyToRoleDisallowed" | "KeysAlreadyInRole" | "KeyInMultipleRoles" | "KeyAccessError" | "Eip191SigningNotAllowed";
2168
+ PreconditionErrorCode: components["schemas"]["PreconditionErrorOwnCodes"] | components["schemas"]["PolicyErrorCode"];
2169
+ /** @enum {string} */
2170
+ PreconditionErrorOwnCodes: "Eth2ProposerSlotTooLow" | "Eth2AttestationSourceEpochTooLow" | "Eth2AttestationTargetEpochTooLow" | "Eth2ConcurrentBlockSigning" | "Eth2ConcurrentAttestationSigning" | "Eth2MultiDepositToNonGeneratedKey" | "Eth2MultiDepositUnknownInitialDeposit" | "Eth2MultiDepositWithdrawalAddressMismatch";
2101
2171
  /**
2102
2172
  * @description This type represents a wire-encodable form of the PublicKeyCredential interface
2103
2173
  * Clients may need to manually encode into this format to communicate with the server
@@ -2519,6 +2589,9 @@ export interface components {
2519
2589
  /** @description The list of sessions */
2520
2590
  sessions: components["schemas"]["SessionInfo"][];
2521
2591
  };
2592
+ SignerErrorCode: components["schemas"]["SignerErrorOwnCodes"] | components["schemas"]["AcceptedValueCode"] | components["schemas"]["BadRequestErrorCode"] | components["schemas"]["NotFoundErrorCode"] | components["schemas"]["ForbiddenErrorCode"] | components["schemas"]["UnauthorizedErrorCode"] | components["schemas"]["PreconditionErrorCode"] | components["schemas"]["InternalErrorCode"];
2593
+ /** @enum {string} */
2594
+ SignerErrorOwnCodes: "UnhandledError" | "ProxyStartError" | "EnclaveError";
2522
2595
  /**
2523
2596
  * @example {
2524
2597
  * "message_base64": "AQABA8OKVzLEjststN4xXr39kLKHT8d58eQY1QEs6MeXwEFBrxTAlULX1troLbWxuAXQqgbQofGi6z8fJi7KAAIf7YMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJK0tn39k28s+X86W47EvbRRKnYBVQ8Q/l2m1EbfT7+vAQICAAEMAgAAAGQAAAAAAAAA"
@@ -2624,6 +2697,8 @@ export interface components {
2624
2697
  /** @description The name of the issuer; defaults to "Cubist". */
2625
2698
  issuer?: string | null;
2626
2699
  };
2700
+ /** @enum {string} */
2701
+ UnauthorizedErrorCode: "ClaimsHeaderMissing" | "ClaimsParseError" | "OidcIdentityHeaderMissing" | "OidcIdentityParseError";
2627
2702
  /** @description Options that should be set only for local devnet testing. */
2628
2703
  UnsafeConf: {
2629
2704
  /**
@@ -2939,12 +3014,20 @@ export interface components {
2939
3014
  user_id: string;
2940
3015
  };
2941
3016
  UserInfo: {
2942
- /** @example alice@example.com */
3017
+ /**
3018
+ * @description Optional email
3019
+ * @example alice@example.com
3020
+ */
2943
3021
  email: string;
2944
3022
  /** @description All multi-factor authentication methods configured for this user */
2945
3023
  mfa: components["schemas"]["ConfiguredMfa"][];
2946
3024
  /** @description MFA policy, applies before logging in and other sensitive operations */
2947
3025
  mfa_policy?: unknown;
3026
+ /**
3027
+ * @description Optional name
3028
+ * @example Alice
3029
+ */
3030
+ name?: string | null;
2948
3031
  /**
2949
3032
  * @description All organizations the user belongs to
2950
3033
  * @example [
@@ -3370,6 +3453,21 @@ export interface components {
3370
3453
  };
3371
3454
  };
3372
3455
  };
3456
+ PaginatedListKeyRolesResponse: {
3457
+ content: {
3458
+ "application/json": {
3459
+ /** @description All roles the key is in */
3460
+ roles: components["schemas"]["KeyInRoleInfo"][];
3461
+ } & {
3462
+ /**
3463
+ * @description If set, the content of `response` does not contain the entire result set.
3464
+ * To fetch the next page of the result set, call the same endpoint
3465
+ * but specify this value as the 'page.start' query parameter.
3466
+ */
3467
+ last_evaluated_key?: string | null;
3468
+ };
3469
+ };
3470
+ };
3373
3471
  PaginatedListKeysResponse: {
3374
3472
  content: {
3375
3473
  "application/json": {
@@ -3687,12 +3785,20 @@ export interface components {
3687
3785
  UserInfo: {
3688
3786
  content: {
3689
3787
  "application/json": {
3690
- /** @example alice@example.com */
3788
+ /**
3789
+ * @description Optional email
3790
+ * @example alice@example.com
3791
+ */
3691
3792
  email: string;
3692
3793
  /** @description All multi-factor authentication methods configured for this user */
3693
3794
  mfa: components["schemas"]["ConfiguredMfa"][];
3694
3795
  /** @description MFA policy, applies before logging in and other sensitive operations */
3695
3796
  mfa_policy?: unknown;
3797
+ /**
3798
+ * @description Optional name
3799
+ * @example Alice
3800
+ */
3801
+ name?: string | null;
3696
3802
  /**
3697
3803
  * @description All organizations the user belongs to
3698
3804
  * @example [
@@ -4324,6 +4430,51 @@ export interface operations {
4324
4430
  };
4325
4431
  };
4326
4432
  };
4433
+ /**
4434
+ * List Key Roles
4435
+ * @description List Key Roles
4436
+ *
4437
+ * Get all roles the key is in
4438
+ */
4439
+ listKeyRoles: {
4440
+ parameters: {
4441
+ query?: {
4442
+ /**
4443
+ * @description Max number of items to return per page.
4444
+ *
4445
+ * If the actual number of returned items may be less that this, even if there exist more
4446
+ * data in the result set. To reliably determine if more data is left in the result set,
4447
+ * inspect the [UnencryptedLastEvalKey] value in the response object.
4448
+ */
4449
+ "page.size"?: number;
4450
+ /**
4451
+ * @description The start of the page. Omit to start from the beginning; otherwise, only specify a
4452
+ * the exact value previously returned as 'last_evaluated_key' from the same endpoint.
4453
+ */
4454
+ "page.start"?: components["schemas"]["LastEvalKey"] | null;
4455
+ };
4456
+ path: {
4457
+ /**
4458
+ * @description Name or ID of the desired Org
4459
+ * @example Org#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
4460
+ */
4461
+ org_id: string;
4462
+ /**
4463
+ * @description ID of the desired Key
4464
+ * @example Key#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
4465
+ */
4466
+ key_id: string;
4467
+ };
4468
+ };
4469
+ responses: {
4470
+ 200: components["responses"]["PaginatedListKeyRolesResponse"];
4471
+ default: {
4472
+ content: {
4473
+ "application/json": components["schemas"]["ErrorResponse"];
4474
+ };
4475
+ };
4476
+ };
4477
+ };
4327
4478
  /**
4328
4479
  * List Pending MFA Requests
4329
4480
  * @description List Pending MFA Requests
@@ -4381,16 +4532,23 @@ export interface operations {
4381
4532
  };
4382
4533
  };
4383
4534
  /**
4384
- * Approve MFA Request
4385
- * @description Approve MFA Request
4535
+ * Approve or Reject MFA Request
4536
+ * @description Approve or Reject MFA Request
4386
4537
  *
4387
- * Approve request after logging in with CubeSigner. Adds the currently-logged user as an approver
4538
+ * Approve or reject request after logging in with CubeSigner.
4539
+ *
4540
+ * If approving, adds the currently-logged user as an approver
4388
4541
  * of a pending MFA request of the [Status::RequiredApprovers] kind. If the required number of
4389
4542
  * approvers is reached, the MFA request is approved; the confirmation receipt can be used to
4390
4543
  * resume the original HTTP request.
4544
+ *
4545
+ * If rejecting, immediately deletes the pending MFA request.
4391
4546
  */
4392
- mfaApproveCs: {
4547
+ mfaVoteCs: {
4393
4548
  parameters: {
4549
+ query?: {
4550
+ mfa_vote?: components["schemas"]["MfaVote"] | null;
4551
+ };
4394
4552
  path: {
4395
4553
  /**
4396
4554
  * @description Name or ID of the desired Org
@@ -4414,12 +4572,12 @@ export interface operations {
4414
4572
  };
4415
4573
  };
4416
4574
  /**
4417
- * Initiate Approving an MFA Request with FIDO
4418
- * @description Initiate Approving an MFA Request with FIDO
4575
+ * Initiate a FIDO MFA Approval/Rejection
4576
+ * @description Initiate a FIDO MFA Approval/Rejection
4419
4577
  *
4420
- * Initiates the approval process of an MFA Request using FIDO.
4578
+ * Initiates the approval/rejection process of an MFA Request using FIDO.
4421
4579
  */
4422
- mfaApproveFido: {
4580
+ mfaFidoInit: {
4423
4581
  parameters: {
4424
4582
  path: {
4425
4583
  /**
@@ -4444,16 +4602,20 @@ export interface operations {
4444
4602
  };
4445
4603
  };
4446
4604
  /**
4447
- * Finalize a FIDO MFA Approval
4448
- * @description Finalize a FIDO MFA Approval
4449
- *
4450
- * Adds an approver to a pending MFA request.
4605
+ * Finalize a FIDO MFA Approval/Rejection
4606
+ * @description Finalize a FIDO MFA Approval/Rejection
4451
4607
  *
4608
+ * If approving, adds an approver to a pending MFA request.
4452
4609
  * If the required number of approvers is reached, the MFA request is approved;
4453
4610
  * the confirmation receipt can be used to resume the original HTTP request.
4611
+ *
4612
+ * If rejecting, immediately deletes the pending MFA request.
4454
4613
  */
4455
- mfaApproveFidoComplete: {
4614
+ mfaVoteFidoComplete: {
4456
4615
  parameters: {
4616
+ query?: {
4617
+ mfa_vote?: components["schemas"]["MfaVote"] | null;
4618
+ };
4457
4619
  path: {
4458
4620
  /**
4459
4621
  * @description Name or ID of the desired Org
@@ -4482,16 +4644,20 @@ export interface operations {
4482
4644
  };
4483
4645
  };
4484
4646
  /**
4485
- * Approve a TOTP MFA Request
4486
- * @description Approve a TOTP MFA Request
4647
+ * Approve/Reject a TOTP MFA Request
4648
+ * @description Approve/Reject a TOTP MFA Request
4487
4649
  *
4488
- * Adds the current user as approver to a pending MFA request by providing TOTP code.
4650
+ * If approving, adds the current user as approver to a pending MFA request by
4651
+ * providing TOTP code. If the required number of approvers is reached, the MFA request is
4652
+ * approved; the confirmation receipt can be used to resume the original HTTP request.
4489
4653
  *
4490
- * If the required number of approvers is reached, the MFA request is approved;
4491
- * the confirmation receipt can be used to resume the original HTTP request.
4654
+ * If rejecting, immediately deletes the pending MFA request.
4492
4655
  */
4493
- mfaApproveTotp: {
4656
+ mfaVoteTotp: {
4494
4657
  parameters: {
4658
+ query?: {
4659
+ mfa_vote?: components["schemas"]["MfaVote"] | null;
4660
+ };
4495
4661
  path: {
4496
4662
  /**
4497
4663
  * @description Name or ID of the desired Org
@@ -5044,6 +5210,35 @@ export interface operations {
5044
5210
  };
5045
5211
  };
5046
5212
  };
5213
+ /**
5214
+ * Remove User
5215
+ * @description Remove User
5216
+ *
5217
+ * Removes an existing user from an existing role.
5218
+ * Only users in the role or org owners can remove users from a role.
5219
+ */
5220
+ removeUserFromRole: {
5221
+ parameters: {
5222
+ path: {
5223
+ /**
5224
+ * @description Name or ID of the desired Org
5225
+ * @example Org#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
5226
+ */
5227
+ org_id: string;
5228
+ /**
5229
+ * @description Name or ID of the desired Role
5230
+ * @example Role#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
5231
+ */
5232
+ role_id: string;
5233
+ /**
5234
+ * @description ID of the desired User
5235
+ * @example User#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
5236
+ */
5237
+ user_id: string;
5238
+ };
5239
+ };
5240
+ responses: {};
5241
+ };
5047
5242
  /**
5048
5243
  * List sessions
5049
5244
  * @description List sessions