@witnium-tech/witniumchain 0.6.1 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -4972,7 +4972,96 @@ interface paths$1 {
4972
4972
  };
4973
4973
  put?: never;
4974
4974
  post?: never;
4975
- delete?: never;
4975
+ /**
4976
+ * DEV-ONLY: delete the caller's account (pre-launch reset)
4977
+ * @description Hard-deletes the authenticated user + their organisation + contracts + delegated keys (Vault keys destroyed too) so signup can be re-run from scratch. Gated behind WITNIUM_PRE_LAUNCH — returns 403 otherwise. The on-chain contract is orphaned (immutable). This endpoint is removed before customer onboarding; do not build product UI on it.
4978
+ */
4979
+ delete: {
4980
+ parameters: {
4981
+ query?: never;
4982
+ header?: never;
4983
+ path?: never;
4984
+ cookie?: never;
4985
+ };
4986
+ requestBody?: never;
4987
+ responses: {
4988
+ /** @description Success */
4989
+ 200: {
4990
+ headers: {
4991
+ [name: string]: unknown;
4992
+ };
4993
+ content: {
4994
+ "application/json": {
4995
+ /** @enum {boolean} */
4996
+ deleted: true;
4997
+ /**
4998
+ * @description UUID v4
4999
+ * @example 550e8400-e29b-41d4-a716-446655440000
5000
+ */
5001
+ userId: string;
5002
+ /**
5003
+ * @description UUID v4
5004
+ * @example 550e8400-e29b-41d4-a716-446655440000
5005
+ */
5006
+ organizationId: string;
5007
+ /** @description How many OpenBao Transit keys were destroyed. */
5008
+ vaultKeysPurged: number;
5009
+ notice: string;
5010
+ };
5011
+ };
5012
+ };
5013
+ /** @description Unauthorized — authentication required or invalid */
5014
+ 401: {
5015
+ headers: {
5016
+ [name: string]: unknown;
5017
+ };
5018
+ content: {
5019
+ "application/json": {
5020
+ /**
5021
+ * @description HTTP status code
5022
+ * @example 400
5023
+ */
5024
+ statusCode?: number;
5025
+ /**
5026
+ * @description Short error label
5027
+ * @example Bad Request
5028
+ */
5029
+ error?: string;
5030
+ /**
5031
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
5032
+ * @example Validation failed
5033
+ */
5034
+ message: string | string[];
5035
+ };
5036
+ };
5037
+ };
5038
+ /** @description Forbidden — insufficient permissions or scope */
5039
+ 403: {
5040
+ headers: {
5041
+ [name: string]: unknown;
5042
+ };
5043
+ content: {
5044
+ "application/json": {
5045
+ /**
5046
+ * @description HTTP status code
5047
+ * @example 400
5048
+ */
5049
+ statusCode?: number;
5050
+ /**
5051
+ * @description Short error label
5052
+ * @example Bad Request
5053
+ */
5054
+ error?: string;
5055
+ /**
5056
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
5057
+ * @example Validation failed
5058
+ */
5059
+ message: string | string[];
5060
+ };
5061
+ };
5062
+ };
5063
+ };
5064
+ };
4976
5065
  options?: never;
4977
5066
  head?: never;
4978
5067
  patch?: never;
@@ -9319,6 +9408,7 @@ type FinalizeWitnessV5Response = Res<'/v5/contracts/{contractAddress}/witnesses/
9319
9408
  type RevokeWitnessV5Request = Req<'/v5/contracts/{contractAddress}/witnesses/{witnessId}/revoke', 'post'>;
9320
9409
  type RevokeWitnessV5Response = Res<'/v5/contracts/{contractAddress}/witnesses/{witnessId}/revoke', 'post'>;
9321
9410
  type AccountResponse = Res<'/v1/account', 'get'>;
9411
+ type ResetAccountResponse = Res<'/v1/account', 'delete'>;
9322
9412
  type LedgerResponse = Res<'/v1/account/ledger', 'get'>;
9323
9413
  type TotpEnrollResponse = Res<'/v1/account/mfa/totp/enroll', 'post'>;
9324
9414
  type TotpConfirmRequest = Req<'/v1/account/mfa/totp/confirm', 'post'>;
@@ -9626,6 +9716,14 @@ declare class WitniumchainClient {
9626
9716
  revokeWitnessV5(contractAddress: string, witnessId: string, body: RevokeWitnessV5Request, idempotencyKey?: string): Promise<RevokeWitnessV5Response>;
9627
9717
  getAccount(): Promise<AccountResponse>;
9628
9718
  getLedger(): Promise<LedgerResponse>;
9719
+ /**
9720
+ * DEV-ONLY: hard-delete the authenticated user + their org + contracts +
9721
+ * delegated keys so signup can be re-run from scratch. Gated behind
9722
+ * WITNIUM_PRE_LAUNCH on the server (throws 403 otherwise). The on-chain
9723
+ * contract is orphaned (immutable). Removed before customer onboarding —
9724
+ * do not build product UI on this; it's a dev-loop convenience.
9725
+ */
9726
+ deleteAccount(): Promise<ResetAccountResponse>;
9629
9727
  enrollTotp(): Promise<TotpEnrollResponse>;
9630
9728
  confirmTotp(body: TotpConfirmRequest): Promise<TotpConfirmResponse>;
9631
9729
  disableTotp(): Promise<TotpDisableResponse>;
@@ -10070,4 +10168,4 @@ declare class WitniumchainApiError extends Error {
10070
10168
  });
10071
10169
  }
10072
10170
 
10073
- export { type AccountResponse, type AccountType, type paths$1 as AccountsPaths, type AddSigningKeyRequest$1 as AddSigningKeyRequest, type AddSigningKeyResponse, type AdjustCreditsRequest, type AdjustCreditsResponse, type BeginOAuthLoginArgs, type BeginOAuthLoginResult, type paths as ChainPaths, type CheckoutRequest, type CheckoutResponse, type CreateOrgRequest, type CreateOrgResponse, type CreateOrganizationRequest, type CreateOrganizationResponse, type CreateUserRequest, type CreateUserResponse, DelegatedKeys, type FinalizeWitnessResponse, type ForgotPasswordRequest, type ForgotPasswordResponse, type GetWitnessResponse, type HealthLiveResponse, type HealthReadyResponse, type LedgerResponse, type ListDelegatedKeysResponse, type ListOauthSessionsResponse, type ListUsersResponse, type LoginRequest, type LoginResponse, type LogoutResponse, MfaNamespace, MfaRecoveryCodes, MfaTotp, type OAuthTokenSnapshot, OauthNamespace, OauthSessions, OrgUsers, type OwnerSigner, type PauseRequest$1 as PauseRequest, type PauseResponse, type PkceVerifierStorage, type PortalResponse, type PrepareDelegatedKeyRequest, type PreparedDelegatedKeyResponse, type ProposeWitnessRequest, type ProposeWitnessResponse, type ProvisionContractRequest, type ProvisionContractResponse, type ProvisionDelegatedKeyArgs, type ProvisionDelegatedKeyResult, type PublicOrgResponse, type RecoveryCodesRegenerateResponse, type ResetPasswordRequest, type ResetPasswordResponse, type RevokeDelegatedKeyResponse, type RevokeSigningKeyRequest$1 as RevokeSigningKeyRequest, type RevokeSigningKeyResponse, type RevokeWitnessRequest, type RevokeWitnessResponse, type RotateApiKeyResponse, type SetAccountTypeRequest, type SetAccountTypeResponse, type SignRequest, type SignResponse, type SignWitnessRequest, type SignWitnessResponse, type SignedRequestSigner, SigningKeys, type SignupRequest, type SignupResponse, type SubmitDelegatedKeyRequest, type SubmitDelegatedKeyResponse, Subscriptions, type TotpConfirmRequest, type TotpConfirmResponse, type TotpDisableResponse, type TotpEnrollResponse, type UnpauseRequest, type UnpauseResponse, type VerifyEmailResponse, type VerifyOrganizationResponse, WitniumchainAdminClient, type WitniumchainAdminClientConfig, WitniumchainApiError, WitniumchainChainAdminClient, type WitniumchainChainAdminClientConfig, WitniumchainClient, type WitniumchainClientConfig, WitniumchainOrgClient, type WitniumchainOrgClientConfig, defaultVerifierStorage };
10171
+ export { type AccountResponse, type AccountType, type paths$1 as AccountsPaths, type AddSigningKeyRequest$1 as AddSigningKeyRequest, type AddSigningKeyResponse, type AdjustCreditsRequest, type AdjustCreditsResponse, type BeginOAuthLoginArgs, type BeginOAuthLoginResult, type paths as ChainPaths, type CheckoutRequest, type CheckoutResponse, type CreateOrgRequest, type CreateOrgResponse, type CreateOrganizationRequest, type CreateOrganizationResponse, type CreateUserRequest, type CreateUserResponse, DelegatedKeys, type FinalizeWitnessResponse, type ForgotPasswordRequest, type ForgotPasswordResponse, type GetWitnessResponse, type HealthLiveResponse, type HealthReadyResponse, type LedgerResponse, type ListDelegatedKeysResponse, type ListOauthSessionsResponse, type ListUsersResponse, type LoginRequest, type LoginResponse, type LogoutResponse, MfaNamespace, MfaRecoveryCodes, MfaTotp, type OAuthTokenSnapshot, OauthNamespace, OauthSessions, OrgUsers, type OwnerSigner, type PauseRequest$1 as PauseRequest, type PauseResponse, type PkceVerifierStorage, type PortalResponse, type PrepareDelegatedKeyRequest, type PreparedDelegatedKeyResponse, type ProposeWitnessRequest, type ProposeWitnessResponse, type ProvisionContractRequest, type ProvisionContractResponse, type ProvisionDelegatedKeyArgs, type ProvisionDelegatedKeyResult, type PublicOrgResponse, type RecoveryCodesRegenerateResponse, type ResetAccountResponse, type ResetPasswordRequest, type ResetPasswordResponse, type RevokeDelegatedKeyResponse, type RevokeSigningKeyRequest$1 as RevokeSigningKeyRequest, type RevokeSigningKeyResponse, type RevokeWitnessRequest, type RevokeWitnessResponse, type RotateApiKeyResponse, type SetAccountTypeRequest, type SetAccountTypeResponse, type SignRequest, type SignResponse, type SignWitnessRequest, type SignWitnessResponse, type SignedRequestSigner, SigningKeys, type SignupRequest, type SignupResponse, type SubmitDelegatedKeyRequest, type SubmitDelegatedKeyResponse, Subscriptions, type TotpConfirmRequest, type TotpConfirmResponse, type TotpDisableResponse, type TotpEnrollResponse, type UnpauseRequest, type UnpauseResponse, type VerifyEmailResponse, type VerifyOrganizationResponse, WitniumchainAdminClient, type WitniumchainAdminClientConfig, WitniumchainApiError, WitniumchainChainAdminClient, type WitniumchainChainAdminClientConfig, WitniumchainClient, type WitniumchainClientConfig, WitniumchainOrgClient, type WitniumchainOrgClientConfig, defaultVerifierStorage };
package/dist/index.d.ts CHANGED
@@ -4972,7 +4972,96 @@ interface paths$1 {
4972
4972
  };
4973
4973
  put?: never;
4974
4974
  post?: never;
4975
- delete?: never;
4975
+ /**
4976
+ * DEV-ONLY: delete the caller's account (pre-launch reset)
4977
+ * @description Hard-deletes the authenticated user + their organisation + contracts + delegated keys (Vault keys destroyed too) so signup can be re-run from scratch. Gated behind WITNIUM_PRE_LAUNCH — returns 403 otherwise. The on-chain contract is orphaned (immutable). This endpoint is removed before customer onboarding; do not build product UI on it.
4978
+ */
4979
+ delete: {
4980
+ parameters: {
4981
+ query?: never;
4982
+ header?: never;
4983
+ path?: never;
4984
+ cookie?: never;
4985
+ };
4986
+ requestBody?: never;
4987
+ responses: {
4988
+ /** @description Success */
4989
+ 200: {
4990
+ headers: {
4991
+ [name: string]: unknown;
4992
+ };
4993
+ content: {
4994
+ "application/json": {
4995
+ /** @enum {boolean} */
4996
+ deleted: true;
4997
+ /**
4998
+ * @description UUID v4
4999
+ * @example 550e8400-e29b-41d4-a716-446655440000
5000
+ */
5001
+ userId: string;
5002
+ /**
5003
+ * @description UUID v4
5004
+ * @example 550e8400-e29b-41d4-a716-446655440000
5005
+ */
5006
+ organizationId: string;
5007
+ /** @description How many OpenBao Transit keys were destroyed. */
5008
+ vaultKeysPurged: number;
5009
+ notice: string;
5010
+ };
5011
+ };
5012
+ };
5013
+ /** @description Unauthorized — authentication required or invalid */
5014
+ 401: {
5015
+ headers: {
5016
+ [name: string]: unknown;
5017
+ };
5018
+ content: {
5019
+ "application/json": {
5020
+ /**
5021
+ * @description HTTP status code
5022
+ * @example 400
5023
+ */
5024
+ statusCode?: number;
5025
+ /**
5026
+ * @description Short error label
5027
+ * @example Bad Request
5028
+ */
5029
+ error?: string;
5030
+ /**
5031
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
5032
+ * @example Validation failed
5033
+ */
5034
+ message: string | string[];
5035
+ };
5036
+ };
5037
+ };
5038
+ /** @description Forbidden — insufficient permissions or scope */
5039
+ 403: {
5040
+ headers: {
5041
+ [name: string]: unknown;
5042
+ };
5043
+ content: {
5044
+ "application/json": {
5045
+ /**
5046
+ * @description HTTP status code
5047
+ * @example 400
5048
+ */
5049
+ statusCode?: number;
5050
+ /**
5051
+ * @description Short error label
5052
+ * @example Bad Request
5053
+ */
5054
+ error?: string;
5055
+ /**
5056
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
5057
+ * @example Validation failed
5058
+ */
5059
+ message: string | string[];
5060
+ };
5061
+ };
5062
+ };
5063
+ };
5064
+ };
4976
5065
  options?: never;
4977
5066
  head?: never;
4978
5067
  patch?: never;
@@ -9319,6 +9408,7 @@ type FinalizeWitnessV5Response = Res<'/v5/contracts/{contractAddress}/witnesses/
9319
9408
  type RevokeWitnessV5Request = Req<'/v5/contracts/{contractAddress}/witnesses/{witnessId}/revoke', 'post'>;
9320
9409
  type RevokeWitnessV5Response = Res<'/v5/contracts/{contractAddress}/witnesses/{witnessId}/revoke', 'post'>;
9321
9410
  type AccountResponse = Res<'/v1/account', 'get'>;
9411
+ type ResetAccountResponse = Res<'/v1/account', 'delete'>;
9322
9412
  type LedgerResponse = Res<'/v1/account/ledger', 'get'>;
9323
9413
  type TotpEnrollResponse = Res<'/v1/account/mfa/totp/enroll', 'post'>;
9324
9414
  type TotpConfirmRequest = Req<'/v1/account/mfa/totp/confirm', 'post'>;
@@ -9626,6 +9716,14 @@ declare class WitniumchainClient {
9626
9716
  revokeWitnessV5(contractAddress: string, witnessId: string, body: RevokeWitnessV5Request, idempotencyKey?: string): Promise<RevokeWitnessV5Response>;
9627
9717
  getAccount(): Promise<AccountResponse>;
9628
9718
  getLedger(): Promise<LedgerResponse>;
9719
+ /**
9720
+ * DEV-ONLY: hard-delete the authenticated user + their org + contracts +
9721
+ * delegated keys so signup can be re-run from scratch. Gated behind
9722
+ * WITNIUM_PRE_LAUNCH on the server (throws 403 otherwise). The on-chain
9723
+ * contract is orphaned (immutable). Removed before customer onboarding —
9724
+ * do not build product UI on this; it's a dev-loop convenience.
9725
+ */
9726
+ deleteAccount(): Promise<ResetAccountResponse>;
9629
9727
  enrollTotp(): Promise<TotpEnrollResponse>;
9630
9728
  confirmTotp(body: TotpConfirmRequest): Promise<TotpConfirmResponse>;
9631
9729
  disableTotp(): Promise<TotpDisableResponse>;
@@ -10070,4 +10168,4 @@ declare class WitniumchainApiError extends Error {
10070
10168
  });
10071
10169
  }
10072
10170
 
10073
- export { type AccountResponse, type AccountType, type paths$1 as AccountsPaths, type AddSigningKeyRequest$1 as AddSigningKeyRequest, type AddSigningKeyResponse, type AdjustCreditsRequest, type AdjustCreditsResponse, type BeginOAuthLoginArgs, type BeginOAuthLoginResult, type paths as ChainPaths, type CheckoutRequest, type CheckoutResponse, type CreateOrgRequest, type CreateOrgResponse, type CreateOrganizationRequest, type CreateOrganizationResponse, type CreateUserRequest, type CreateUserResponse, DelegatedKeys, type FinalizeWitnessResponse, type ForgotPasswordRequest, type ForgotPasswordResponse, type GetWitnessResponse, type HealthLiveResponse, type HealthReadyResponse, type LedgerResponse, type ListDelegatedKeysResponse, type ListOauthSessionsResponse, type ListUsersResponse, type LoginRequest, type LoginResponse, type LogoutResponse, MfaNamespace, MfaRecoveryCodes, MfaTotp, type OAuthTokenSnapshot, OauthNamespace, OauthSessions, OrgUsers, type OwnerSigner, type PauseRequest$1 as PauseRequest, type PauseResponse, type PkceVerifierStorage, type PortalResponse, type PrepareDelegatedKeyRequest, type PreparedDelegatedKeyResponse, type ProposeWitnessRequest, type ProposeWitnessResponse, type ProvisionContractRequest, type ProvisionContractResponse, type ProvisionDelegatedKeyArgs, type ProvisionDelegatedKeyResult, type PublicOrgResponse, type RecoveryCodesRegenerateResponse, type ResetPasswordRequest, type ResetPasswordResponse, type RevokeDelegatedKeyResponse, type RevokeSigningKeyRequest$1 as RevokeSigningKeyRequest, type RevokeSigningKeyResponse, type RevokeWitnessRequest, type RevokeWitnessResponse, type RotateApiKeyResponse, type SetAccountTypeRequest, type SetAccountTypeResponse, type SignRequest, type SignResponse, type SignWitnessRequest, type SignWitnessResponse, type SignedRequestSigner, SigningKeys, type SignupRequest, type SignupResponse, type SubmitDelegatedKeyRequest, type SubmitDelegatedKeyResponse, Subscriptions, type TotpConfirmRequest, type TotpConfirmResponse, type TotpDisableResponse, type TotpEnrollResponse, type UnpauseRequest, type UnpauseResponse, type VerifyEmailResponse, type VerifyOrganizationResponse, WitniumchainAdminClient, type WitniumchainAdminClientConfig, WitniumchainApiError, WitniumchainChainAdminClient, type WitniumchainChainAdminClientConfig, WitniumchainClient, type WitniumchainClientConfig, WitniumchainOrgClient, type WitniumchainOrgClientConfig, defaultVerifierStorage };
10171
+ export { type AccountResponse, type AccountType, type paths$1 as AccountsPaths, type AddSigningKeyRequest$1 as AddSigningKeyRequest, type AddSigningKeyResponse, type AdjustCreditsRequest, type AdjustCreditsResponse, type BeginOAuthLoginArgs, type BeginOAuthLoginResult, type paths as ChainPaths, type CheckoutRequest, type CheckoutResponse, type CreateOrgRequest, type CreateOrgResponse, type CreateOrganizationRequest, type CreateOrganizationResponse, type CreateUserRequest, type CreateUserResponse, DelegatedKeys, type FinalizeWitnessResponse, type ForgotPasswordRequest, type ForgotPasswordResponse, type GetWitnessResponse, type HealthLiveResponse, type HealthReadyResponse, type LedgerResponse, type ListDelegatedKeysResponse, type ListOauthSessionsResponse, type ListUsersResponse, type LoginRequest, type LoginResponse, type LogoutResponse, MfaNamespace, MfaRecoveryCodes, MfaTotp, type OAuthTokenSnapshot, OauthNamespace, OauthSessions, OrgUsers, type OwnerSigner, type PauseRequest$1 as PauseRequest, type PauseResponse, type PkceVerifierStorage, type PortalResponse, type PrepareDelegatedKeyRequest, type PreparedDelegatedKeyResponse, type ProposeWitnessRequest, type ProposeWitnessResponse, type ProvisionContractRequest, type ProvisionContractResponse, type ProvisionDelegatedKeyArgs, type ProvisionDelegatedKeyResult, type PublicOrgResponse, type RecoveryCodesRegenerateResponse, type ResetAccountResponse, type ResetPasswordRequest, type ResetPasswordResponse, type RevokeDelegatedKeyResponse, type RevokeSigningKeyRequest$1 as RevokeSigningKeyRequest, type RevokeSigningKeyResponse, type RevokeWitnessRequest, type RevokeWitnessResponse, type RotateApiKeyResponse, type SetAccountTypeRequest, type SetAccountTypeResponse, type SignRequest, type SignResponse, type SignWitnessRequest, type SignWitnessResponse, type SignedRequestSigner, SigningKeys, type SignupRequest, type SignupResponse, type SubmitDelegatedKeyRequest, type SubmitDelegatedKeyResponse, Subscriptions, type TotpConfirmRequest, type TotpConfirmResponse, type TotpDisableResponse, type TotpEnrollResponse, type UnpauseRequest, type UnpauseResponse, type VerifyEmailResponse, type VerifyOrganizationResponse, WitniumchainAdminClient, type WitniumchainAdminClientConfig, WitniumchainApiError, WitniumchainChainAdminClient, type WitniumchainChainAdminClientConfig, WitniumchainClient, type WitniumchainClientConfig, WitniumchainOrgClient, type WitniumchainOrgClientConfig, defaultVerifierStorage };
package/dist/index.js CHANGED
@@ -414,6 +414,16 @@ var WitniumchainClient = class {
414
414
  getLedger() {
415
415
  return this.req("GET", "/v1/account/ledger", { auth: "SessionCookie" });
416
416
  }
417
+ /**
418
+ * DEV-ONLY: hard-delete the authenticated user + their org + contracts +
419
+ * delegated keys so signup can be re-run from scratch. Gated behind
420
+ * WITNIUM_PRE_LAUNCH on the server (throws 403 otherwise). The on-chain
421
+ * contract is orphaned (immutable). Removed before customer onboarding —
422
+ * do not build product UI on this; it's a dev-loop convenience.
423
+ */
424
+ deleteAccount() {
425
+ return this.req("DELETE", "/v1/account", { auth: "SessionCookie" });
426
+ }
417
427
  // ────────────────────────────────────────────────────────────────────────
418
428
  // MFA (/v1/account/mfa/*)
419
429
  //