@privy-io/api-base 1.6.0 → 1.6.2-beta-20250903204105

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.
@@ -1 +1 @@
1
- "use strict";var r=require("../constants/error-codes.js");class s extends Error{toString(){return`${this.constructor.name}: ${this.message}${this.cause?` [cause: ${this.cause}]`:""}`}constructor(r,s,e,t){super(s),this.code=e,this.status=r,this.responseData=t}}class e extends s{constructor(r,s){super(401,r,s)}}exports.AccountTransferRequiredError=class extends s{constructor(s){super(400,"Account transfer required",r.PrivyErrorCode.ACCOUNT_TRANSFER_REQUIRED,s),this.data=s}},exports.AllowlistRejectedError=class extends e{constructor(s){super(s||"User is not allowed to login to this app.",r.PrivyErrorCode.ALLOWLIST_REJECTED)}},exports.ForbiddenError=class extends s{constructor(r,s){super(403,r,s)}},exports.HttpError=s,exports.InsufficientBalanceError=class extends s{constructor(s){super(400,s||"Insufficient balance.",r.PrivyErrorCode.INSUFFICIENT_FUNDS)}},exports.InternalServerError=class extends s{constructor(r){super(500,r||"Service unavailable.")}},exports.InvalidInputError=class extends s{constructor(s,e){super(400,s,e||r.PrivyErrorCode.INVALID_DATA)}},exports.LegacyInvalidInputError=class extends s{constructor(r,s){super(422,r,s)}},exports.NotFoundError=class extends s{constructor(r){super(404,r)}},exports.RequestTimeoutError=class extends s{constructor(r,s){super(408,r,s)}},exports.TooManyRequestsError=class extends s{constructor(s){super(429,s||"Too many requests. Please wait to try again.",r.PrivyErrorCode.TOO_MANY_REQUESTS)}},exports.UnauthorizedError=e,exports.UnsupportedMediaType=class extends s{constructor(r){super(415,r)}};
1
+ "use strict";var r=require("../constants/error-codes.js");class e extends Error{toString(){return`${this.name}: ${this.message}${this.cause?` [cause: ${this.cause}]`:""}`}constructor(r,e,s,t){super(e),this.status=r,this.code=s,this.name="HttpError",this.responseData=t}}class s extends e{constructor(r,e){super(401,r,e),this.name="UnauthorizedError"}}exports.AccountTransferRequiredError=class extends e{constructor(e){super(400,"Account transfer required",r.PrivyErrorCode.ACCOUNT_TRANSFER_REQUIRED,e),this.data=e,this.name="AccountTransferRequiredError"}},exports.AllowlistRejectedError=class extends s{constructor(e){super(e||"User is not allowed to login to this app.",r.PrivyErrorCode.ALLOWLIST_REJECTED),this.name="AllowlistRejectedError"}},exports.ForbiddenError=class extends e{constructor(r,e){super(403,r,e),this.name="ForbiddenError"}},exports.HttpError=e,exports.InsufficientBalanceError=class extends e{constructor(e){super(400,e||"Insufficient balance.",r.PrivyErrorCode.INSUFFICIENT_FUNDS),this.name="InsufficientBalanceError"}},exports.InternalServerError=class extends e{constructor(r){super(500,r||"Service unavailable."),this.name="InternalServerError"}},exports.InvalidInputError=class extends e{constructor(e,s){super(400,e,s||r.PrivyErrorCode.INVALID_DATA),this.name="InvalidInputError"}},exports.LegacyInvalidInputError=class extends e{constructor(r,e){super(422,r,e),this.name="LegacyInvalidInputError"}},exports.NotFoundError=class extends e{constructor(r){super(404,r),this.name="NotFoundError"}},exports.PaymentFailedError=class extends e{constructor(r){super(402,r||"Payment failed.")}},exports.RequestTimeoutError=class extends e{constructor(r,e){super(408,r,e),this.name="RequestTimeoutError"}},exports.ResourceConflictError=class extends e{constructor(e){super(409,e||"Conflict encountered while trying to modify resource.",r.PrivyErrorCode.RESOURCE_CONFLICT),this.name="ResourceConflictError"}},exports.TooManyRequestsError=class extends e{constructor(e){super(429,e||"Too many requests. Please wait to try again.",r.PrivyErrorCode.TOO_MANY_REQUESTS),this.name="TooManyRequestsError"}},exports.UnauthorizedError=s,exports.UnsupportedMediaType=class extends e{constructor(r){super(415,r),this.name="UnsupportedMediaType"}};
@@ -1 +1 @@
1
- "use strict";var r=require("./api-error.js");require("../constants/error-codes.js"),exports.AccountTransferRequiredError=r.AccountTransferRequiredError,exports.AllowlistRejectedError=r.AllowlistRejectedError,exports.ForbiddenError=r.ForbiddenError,exports.HttpError=r.HttpError,exports.InsufficientBalanceError=r.InsufficientBalanceError,exports.InternalServerError=r.InternalServerError,exports.InvalidInputError=r.InvalidInputError,exports.LegacyInvalidInputError=r.LegacyInvalidInputError,exports.NotFoundError=r.NotFoundError,exports.RequestTimeoutError=r.RequestTimeoutError,exports.TooManyRequestsError=r.TooManyRequestsError,exports.UnauthorizedError=r.UnauthorizedError,exports.UnsupportedMediaType=r.UnsupportedMediaType;
1
+ "use strict";var r=require("./api-error.js");require("../constants/error-codes.js"),exports.AccountTransferRequiredError=r.AccountTransferRequiredError,exports.AllowlistRejectedError=r.AllowlistRejectedError,exports.ForbiddenError=r.ForbiddenError,exports.HttpError=r.HttpError,exports.InsufficientBalanceError=r.InsufficientBalanceError,exports.InternalServerError=r.InternalServerError,exports.InvalidInputError=r.InvalidInputError,exports.LegacyInvalidInputError=r.LegacyInvalidInputError,exports.NotFoundError=r.NotFoundError,exports.PaymentFailedError=r.PaymentFailedError,exports.RequestTimeoutError=r.RequestTimeoutError,exports.ResourceConflictError=r.ResourceConflictError,exports.TooManyRequestsError=r.TooManyRequestsError,exports.UnauthorizedError=r.UnauthorizedError,exports.UnsupportedMediaType=r.UnsupportedMediaType;
@@ -1 +1 @@
1
- "use strict";var _,e=((_={}).OAUTH_ACCOUNT_SUSPENDED="oauth_account_suspended",_.MISSING_OR_INVALID_PRIVY_APP_ID="missing_or_invalid_privy_app_id",_.MISSING_OR_INVALID_PRIVY_CLIENT_ID="missing_or_invalid_privy_client_id",_.MISSING_OR_INVALID_PRIVY_ACCOUNT_ID="missing_or_invalid_privy_account_id",_.MISSING_OR_INVALID_TOKEN="missing_or_invalid_token",_.MISSING_OR_INVALID_MFA="missing_or_invalid_mfa",_.EXPIRED_OR_INVALID_MFA_TOKEN="expired_or_invalid_mfa_token",_.INVALID_DATA="invalid_data",_.INVALID_CREDENTIALS="invalid_credentials",_.INVALID_CAPTCHA="invalid_captcha",_.LINKED_TO_ANOTHER_USER="linked_to_another_user",_.ALLOWLIST_REJECTED="allowlist_rejected",_.CANNOT_UNLINK_EMBEDDED_WALLET="cannot_unlink_embedded_wallet",_.CANNOT_UNLINK_SOLE_ACCOUNT="cannot_unlink_sole_account",_.CANNOT_LINK_MORE_OF_TYPE="cannot_link_more_of_type",_.LINKED_ACCOUNT_NOT_FOUND="linked_account_not_found",_.TOO_MANY_REQUESTS="too_many_requests",_.INVALID_ORIGIN="invalid_origin",_.MISSING_ORIGIN="missing_origin",_.INVALID_NATIVE_APP_ID="invalid_native_app_id",_.TOKEN_ALREADY_USED="token_already_used",_.ALREADY_LOGGED_OUT="already_logged_out",_.NOT_SUPPORTED="not_supported",_.USER_UNSUBSCRIBED="user_unsubscribed",_.MAX_APPS_REACHED="max_apps_reached",_.USER_LIMIT_REACHED="max_accounts_reached",_.DEVICE_REVOKED="device_revoked",_.WALLET_PASSWORD_EXISTS="wallet_password_exists",_.OAUTH_STATE_MISMATCH="oauth_state_mismatch",_.MAX_DENYLIST_ENTRIES_REACHED="max_denylist_entries_reached",_.MAX_TEST_ACCOUNTS_REACHED="max_test_accounts_reached",_.DISALLOWED_LOGIN_METHOD="disallowed_login_method",_.DISALLOWED_PLUS_EMAIL="disallowed_plus_email",_.DISALLOWED_RECOVERY_METHOD="disallowed_recovery_method",_.LEGACY_DASHBOARD_LOGIN_CONFIGURATION="legacy_dashboard_login_configuration",_.CANNOT_SET_PASSWORD="cannot_set_password",_.INVALID_PKCE_PARAMETERS="invalid_pkce_parameters",_.INVALID_APP_URL_SCHEME_CONFIGURATION="invalid_app_url_scheme_configuration",_.CROSS_APP_CONNECTION_NOT_ALLOWED="cross_app_connection_not_allowed",_.USER_DOES_NOT_EXIST="user_does_not_exist",_.ALREADY_EXISTS="resource_already_exists",_.ACCOUNT_TRANSFER_REQUIRED="account_transfer_required",_.USER_HAS_NOT_DELEGATED_WALLET="user_has_not_delegated_wallet",_.FEATURE_NOT_ENABLED="feature_not_enabled",_.INSUFFICIENT_FUNDS="insufficient_funds",_.TRANSACTION_BROADCAST_FAILURE="transaction_broadcast_failure",_.INVALID_POLICY_FORMAT="invalid_policy_format",_.POLICY_VIOLATION="policy_violation",_.AUTHORIZATION_KEY_HAS_ASSOCIATED_WALLETS="authorization_key_has_associated_wallets",_.INVALID_REQUEST="invalid_request",_);exports.PrivyErrorCode=e;
1
+ "use strict";var _,e=((_={}).OAUTH_ACCOUNT_SUSPENDED="oauth_account_suspended",_.MISSING_OR_INVALID_PRIVY_APP_ID="missing_or_invalid_privy_app_id",_.MISSING_OR_INVALID_PRIVY_CLIENT_ID="missing_or_invalid_privy_client_id",_.MISSING_OR_INVALID_PRIVY_ACCOUNT_ID="missing_or_invalid_privy_account_id",_.MISSING_OR_INVALID_TOKEN="missing_or_invalid_token",_.MISSING_OR_INVALID_MFA="missing_or_invalid_mfa",_.EXPIRED_OR_INVALID_MFA_TOKEN="expired_or_invalid_mfa_token",_.INVALID_DATA="invalid_data",_.INVALID_CREDENTIALS="invalid_credentials",_.INVALID_CAPTCHA="invalid_captcha",_.LINKED_TO_ANOTHER_USER="linked_to_another_user",_.ALLOWLIST_REJECTED="allowlist_rejected",_.CANNOT_UNLINK_EMBEDDED_WALLET="cannot_unlink_embedded_wallet",_.CANNOT_UNLINK_SOLE_ACCOUNT="cannot_unlink_sole_account",_.CANNOT_LINK_MORE_OF_TYPE="cannot_link_more_of_type",_.LINKED_ACCOUNT_NOT_FOUND="linked_account_not_found",_.TOO_MANY_REQUESTS="too_many_requests",_.RESOURCE_CONFLICT="resource_conflict",_.INVALID_ORIGIN="invalid_origin",_.MISSING_ORIGIN="missing_origin",_.INVALID_NATIVE_APP_ID="invalid_native_app_id",_.TOKEN_ALREADY_USED="token_already_used",_.ALREADY_LOGGED_OUT="already_logged_out",_.NOT_SUPPORTED="not_supported",_.USER_UNSUBSCRIBED="user_unsubscribed",_.MAX_APPS_REACHED="max_apps_reached",_.USER_LIMIT_REACHED="max_accounts_reached",_.DEVICE_REVOKED="device_revoked",_.WALLET_PASSWORD_EXISTS="wallet_password_exists",_.OAUTH_STATE_MISMATCH="oauth_state_mismatch",_.MAX_DENYLIST_ENTRIES_REACHED="max_denylist_entries_reached",_.MAX_TEST_ACCOUNTS_REACHED="max_test_accounts_reached",_.DISALLOWED_LOGIN_METHOD="disallowed_login_method",_.DISALLOWED_PLUS_EMAIL="disallowed_plus_email",_.DISALLOWED_RECOVERY_METHOD="disallowed_recovery_method",_.LEGACY_DASHBOARD_LOGIN_CONFIGURATION="legacy_dashboard_login_configuration",_.CANNOT_SET_PASSWORD="cannot_set_password",_.INVALID_PKCE_PARAMETERS="invalid_pkce_parameters",_.INVALID_APP_URL_SCHEME_CONFIGURATION="invalid_app_url_scheme_configuration",_.CROSS_APP_CONNECTION_NOT_ALLOWED="cross_app_connection_not_allowed",_.USER_DOES_NOT_EXIST="user_does_not_exist",_.ALREADY_EXISTS="resource_already_exists",_.ACCOUNT_TRANSFER_REQUIRED="account_transfer_required",_.USER_HAS_NOT_DELEGATED_WALLET="user_has_not_delegated_wallet",_.FEATURE_NOT_ENABLED="feature_not_enabled",_.INSUFFICIENT_FUNDS="insufficient_funds",_.TRANSACTION_BROADCAST_FAILURE="transaction_broadcast_failure",_.INVALID_POLICY_FORMAT="invalid_policy_format",_.POLICY_VIOLATION="policy_violation",_.AUTHORIZATION_KEY_HAS_ASSOCIATED_WALLETS="authorization_key_has_associated_wallets",_.INVALID_REQUEST="invalid_request",_);exports.PrivyErrorCode=e;
package/dist/cjs/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var r=require("./classes/api-error.js"),e=require("./constants/error-codes.js"),o=require("./schemas/error.js");require("zod"),exports.AccountTransferRequiredError=r.AccountTransferRequiredError,exports.AllowlistRejectedError=r.AllowlistRejectedError,exports.ForbiddenError=r.ForbiddenError,exports.HttpError=r.HttpError,exports.InsufficientBalanceError=r.InsufficientBalanceError,exports.InternalServerError=r.InternalServerError,exports.InvalidInputError=r.InvalidInputError,exports.LegacyInvalidInputError=r.LegacyInvalidInputError,exports.NotFoundError=r.NotFoundError,exports.RequestTimeoutError=r.RequestTimeoutError,exports.TooManyRequestsError=r.TooManyRequestsError,exports.UnauthorizedError=r.UnauthorizedError,exports.UnsupportedMediaType=r.UnsupportedMediaType,exports.PrivyErrorCode=e.PrivyErrorCode,exports.APIError=o.APIError;
1
+ "use strict";var r=require("./classes/api-error.js"),e=require("./constants/error-codes.js"),o=require("./schemas/error.js");require("zod"),exports.AccountTransferRequiredError=r.AccountTransferRequiredError,exports.AllowlistRejectedError=r.AllowlistRejectedError,exports.ForbiddenError=r.ForbiddenError,exports.HttpError=r.HttpError,exports.InsufficientBalanceError=r.InsufficientBalanceError,exports.InternalServerError=r.InternalServerError,exports.InvalidInputError=r.InvalidInputError,exports.LegacyInvalidInputError=r.LegacyInvalidInputError,exports.NotFoundError=r.NotFoundError,exports.PaymentFailedError=r.PaymentFailedError,exports.RequestTimeoutError=r.RequestTimeoutError,exports.ResourceConflictError=r.ResourceConflictError,exports.TooManyRequestsError=r.TooManyRequestsError,exports.UnauthorizedError=r.UnauthorizedError,exports.UnsupportedMediaType=r.UnsupportedMediaType,exports.PrivyErrorCode=e.PrivyErrorCode,exports.APIError=o.APIError;
@@ -35,6 +35,8 @@ declare enum PrivyErrorCode {
35
35
  LINKED_ACCOUNT_NOT_FOUND = "linked_account_not_found",
36
36
  /** Too many requests. Please wait to try again. */
37
37
  TOO_MANY_REQUESTS = "too_many_requests",
38
+ /** Conflict encountered while trying to update resource. */
39
+ RESOURCE_CONFLICT = "resource_conflict",
38
40
  /** Origin was expected and is invalid. */
39
41
  INVALID_ORIGIN = "invalid_origin",
40
42
  /** Origin was expected and is not set. */
@@ -155,9 +157,15 @@ declare class LegacyInvalidInputError extends HttpError {
155
157
  declare class TooManyRequestsError extends HttpError {
156
158
  constructor(message?: string);
157
159
  }
160
+ declare class ResourceConflictError extends HttpError {
161
+ constructor(message?: string);
162
+ }
158
163
  declare class InsufficientBalanceError extends HttpError {
159
164
  constructor(message?: string);
160
165
  }
166
+ declare class PaymentFailedError extends HttpError {
167
+ constructor(message?: string);
168
+ }
161
169
  declare class InternalServerError extends HttpError {
162
170
  constructor(message?: string);
163
171
  }
@@ -202,4 +210,4 @@ declare const APIError: z.ZodObject<{
202
210
  code?: PrivyErrorCode | undefined;
203
211
  }>;
204
212
 
205
- export { APIError, AccountTransferRequiredError, AllowlistRejectedError, type ApiErrorType, ForbiddenError, HttpError, InsufficientBalanceError, InternalServerError, InvalidInputError, LegacyInvalidInputError, NotFoundError, PrivyErrorCode, RequestTimeoutError, TooManyRequestsError, UnauthorizedError, UnsupportedMediaType };
213
+ export { APIError, AccountTransferRequiredError, AllowlistRejectedError, type ApiErrorType, ForbiddenError, HttpError, InsufficientBalanceError, InternalServerError, InvalidInputError, LegacyInvalidInputError, NotFoundError, PaymentFailedError, PrivyErrorCode, RequestTimeoutError, ResourceConflictError, TooManyRequestsError, UnauthorizedError, UnsupportedMediaType };
@@ -35,6 +35,8 @@ declare enum PrivyErrorCode {
35
35
  LINKED_ACCOUNT_NOT_FOUND = "linked_account_not_found",
36
36
  /** Too many requests. Please wait to try again. */
37
37
  TOO_MANY_REQUESTS = "too_many_requests",
38
+ /** Conflict encountered while trying to update resource. */
39
+ RESOURCE_CONFLICT = "resource_conflict",
38
40
  /** Origin was expected and is invalid. */
39
41
  INVALID_ORIGIN = "invalid_origin",
40
42
  /** Origin was expected and is not set. */
@@ -155,9 +157,15 @@ declare class LegacyInvalidInputError extends HttpError {
155
157
  declare class TooManyRequestsError extends HttpError {
156
158
  constructor(message?: string);
157
159
  }
160
+ declare class ResourceConflictError extends HttpError {
161
+ constructor(message?: string);
162
+ }
158
163
  declare class InsufficientBalanceError extends HttpError {
159
164
  constructor(message?: string);
160
165
  }
166
+ declare class PaymentFailedError extends HttpError {
167
+ constructor(message?: string);
168
+ }
161
169
  declare class InternalServerError extends HttpError {
162
170
  constructor(message?: string);
163
171
  }
@@ -202,4 +210,4 @@ declare const APIError: z.ZodObject<{
202
210
  code?: PrivyErrorCode | undefined;
203
211
  }>;
204
212
 
205
- export { APIError, AccountTransferRequiredError, AllowlistRejectedError, type ApiErrorType, ForbiddenError, HttpError, InsufficientBalanceError, InternalServerError, InvalidInputError, LegacyInvalidInputError, NotFoundError, PrivyErrorCode, RequestTimeoutError, TooManyRequestsError, UnauthorizedError, UnsupportedMediaType };
213
+ export { APIError, AccountTransferRequiredError, AllowlistRejectedError, type ApiErrorType, ForbiddenError, HttpError, InsufficientBalanceError, InternalServerError, InvalidInputError, LegacyInvalidInputError, NotFoundError, PaymentFailedError, PrivyErrorCode, RequestTimeoutError, ResourceConflictError, TooManyRequestsError, UnauthorizedError, UnsupportedMediaType };
@@ -1 +1 @@
1
- import{PrivyErrorCode as s}from"../constants/error-codes.mjs";class t extends Error{toString(){return`${this.constructor.name}: ${this.message}${this.cause?` [cause: ${this.cause}]`:""}`}constructor(s,t,e,r){super(t),this.code=e,this.status=s,this.responseData=r}}class e extends t{constructor(t,e){super(400,t,e||s.INVALID_DATA)}}class r extends t{constructor(s,t){super(401,s,t)}}class c extends r{constructor(t){super(t||"User is not allowed to login to this app.",s.ALLOWLIST_REJECTED)}}class o extends t{constructor(s,t){super(403,s,t)}}class n extends t{constructor(s){super(404,s)}}class a extends t{constructor(s,t){super(408,s,t)}}class u extends t{constructor(s){super(415,s)}}class i extends t{constructor(s,t){super(422,s,t)}}class l extends t{constructor(t){super(429,t||"Too many requests. Please wait to try again.",s.TOO_MANY_REQUESTS)}}class d extends t{constructor(t){super(400,t||"Insufficient balance.",s.INSUFFICIENT_FUNDS)}}class p extends t{constructor(s){super(500,s||"Service unavailable.")}}class x extends t{constructor(t){super(400,"Account transfer required",s.ACCOUNT_TRANSFER_REQUIRED,t),this.data=t}}export{x as AccountTransferRequiredError,c as AllowlistRejectedError,o as ForbiddenError,t as HttpError,d as InsufficientBalanceError,p as InternalServerError,e as InvalidInputError,i as LegacyInvalidInputError,n as NotFoundError,a as RequestTimeoutError,l as TooManyRequestsError,r as UnauthorizedError,u as UnsupportedMediaType};
1
+ import{PrivyErrorCode as s}from"../constants/error-codes.mjs";class r extends Error{toString(){return`${this.name}: ${this.message}${this.cause?` [cause: ${this.cause}]`:""}`}constructor(s,r,e,t){super(r),this.status=s,this.code=e,this.name="HttpError",this.responseData=t}}class e extends r{constructor(r,e){super(400,r,e||s.INVALID_DATA),this.name="InvalidInputError"}}class t extends r{constructor(s,r){super(401,s,r),this.name="UnauthorizedError"}}class n extends t{constructor(r){super(r||"User is not allowed to login to this app.",s.ALLOWLIST_REJECTED),this.name="AllowlistRejectedError"}}class o extends r{constructor(s,r){super(403,s,r),this.name="ForbiddenError"}}class c extends r{constructor(s){super(404,s),this.name="NotFoundError"}}class a extends r{constructor(s,r){super(408,s,r),this.name="RequestTimeoutError"}}class u extends r{constructor(s){super(415,s),this.name="UnsupportedMediaType"}}class i extends r{constructor(s,r){super(422,s,r),this.name="LegacyInvalidInputError"}}class d extends r{constructor(r){super(429,r||"Too many requests. Please wait to try again.",s.TOO_MANY_REQUESTS),this.name="TooManyRequestsError"}}class l extends r{constructor(r){super(409,r||"Conflict encountered while trying to modify resource.",s.RESOURCE_CONFLICT),this.name="ResourceConflictError"}}class p extends r{constructor(r){super(400,r||"Insufficient balance.",s.INSUFFICIENT_FUNDS),this.name="InsufficientBalanceError"}}class h extends r{constructor(s){super(402,s||"Payment failed.")}}class E extends r{constructor(s){super(500,s||"Service unavailable."),this.name="InternalServerError"}}class m extends r{constructor(r){super(400,"Account transfer required",s.ACCOUNT_TRANSFER_REQUIRED,r),this.data=r,this.name="AccountTransferRequiredError"}}export{m as AccountTransferRequiredError,n as AllowlistRejectedError,o as ForbiddenError,r as HttpError,p as InsufficientBalanceError,E as InternalServerError,e as InvalidInputError,i as LegacyInvalidInputError,c as NotFoundError,h as PaymentFailedError,a as RequestTimeoutError,l as ResourceConflictError,d as TooManyRequestsError,t as UnauthorizedError,u as UnsupportedMediaType};
@@ -1 +1 @@
1
- export{AccountTransferRequiredError,AllowlistRejectedError,ForbiddenError,HttpError,InsufficientBalanceError,InternalServerError,InvalidInputError,LegacyInvalidInputError,NotFoundError,RequestTimeoutError,TooManyRequestsError,UnauthorizedError,UnsupportedMediaType}from"./api-error.mjs";import"../constants/error-codes.mjs";
1
+ export{AccountTransferRequiredError,AllowlistRejectedError,ForbiddenError,HttpError,InsufficientBalanceError,InternalServerError,InvalidInputError,LegacyInvalidInputError,NotFoundError,PaymentFailedError,RequestTimeoutError,ResourceConflictError,TooManyRequestsError,UnauthorizedError,UnsupportedMediaType}from"./api-error.mjs";import"../constants/error-codes.mjs";
@@ -1 +1 @@
1
- var _,e=((_={}).OAUTH_ACCOUNT_SUSPENDED="oauth_account_suspended",_.MISSING_OR_INVALID_PRIVY_APP_ID="missing_or_invalid_privy_app_id",_.MISSING_OR_INVALID_PRIVY_CLIENT_ID="missing_or_invalid_privy_client_id",_.MISSING_OR_INVALID_PRIVY_ACCOUNT_ID="missing_or_invalid_privy_account_id",_.MISSING_OR_INVALID_TOKEN="missing_or_invalid_token",_.MISSING_OR_INVALID_MFA="missing_or_invalid_mfa",_.EXPIRED_OR_INVALID_MFA_TOKEN="expired_or_invalid_mfa_token",_.INVALID_DATA="invalid_data",_.INVALID_CREDENTIALS="invalid_credentials",_.INVALID_CAPTCHA="invalid_captcha",_.LINKED_TO_ANOTHER_USER="linked_to_another_user",_.ALLOWLIST_REJECTED="allowlist_rejected",_.CANNOT_UNLINK_EMBEDDED_WALLET="cannot_unlink_embedded_wallet",_.CANNOT_UNLINK_SOLE_ACCOUNT="cannot_unlink_sole_account",_.CANNOT_LINK_MORE_OF_TYPE="cannot_link_more_of_type",_.LINKED_ACCOUNT_NOT_FOUND="linked_account_not_found",_.TOO_MANY_REQUESTS="too_many_requests",_.INVALID_ORIGIN="invalid_origin",_.MISSING_ORIGIN="missing_origin",_.INVALID_NATIVE_APP_ID="invalid_native_app_id",_.TOKEN_ALREADY_USED="token_already_used",_.ALREADY_LOGGED_OUT="already_logged_out",_.NOT_SUPPORTED="not_supported",_.USER_UNSUBSCRIBED="user_unsubscribed",_.MAX_APPS_REACHED="max_apps_reached",_.USER_LIMIT_REACHED="max_accounts_reached",_.DEVICE_REVOKED="device_revoked",_.WALLET_PASSWORD_EXISTS="wallet_password_exists",_.OAUTH_STATE_MISMATCH="oauth_state_mismatch",_.MAX_DENYLIST_ENTRIES_REACHED="max_denylist_entries_reached",_.MAX_TEST_ACCOUNTS_REACHED="max_test_accounts_reached",_.DISALLOWED_LOGIN_METHOD="disallowed_login_method",_.DISALLOWED_PLUS_EMAIL="disallowed_plus_email",_.DISALLOWED_RECOVERY_METHOD="disallowed_recovery_method",_.LEGACY_DASHBOARD_LOGIN_CONFIGURATION="legacy_dashboard_login_configuration",_.CANNOT_SET_PASSWORD="cannot_set_password",_.INVALID_PKCE_PARAMETERS="invalid_pkce_parameters",_.INVALID_APP_URL_SCHEME_CONFIGURATION="invalid_app_url_scheme_configuration",_.CROSS_APP_CONNECTION_NOT_ALLOWED="cross_app_connection_not_allowed",_.USER_DOES_NOT_EXIST="user_does_not_exist",_.ALREADY_EXISTS="resource_already_exists",_.ACCOUNT_TRANSFER_REQUIRED="account_transfer_required",_.USER_HAS_NOT_DELEGATED_WALLET="user_has_not_delegated_wallet",_.FEATURE_NOT_ENABLED="feature_not_enabled",_.INSUFFICIENT_FUNDS="insufficient_funds",_.TRANSACTION_BROADCAST_FAILURE="transaction_broadcast_failure",_.INVALID_POLICY_FORMAT="invalid_policy_format",_.POLICY_VIOLATION="policy_violation",_.AUTHORIZATION_KEY_HAS_ASSOCIATED_WALLETS="authorization_key_has_associated_wallets",_.INVALID_REQUEST="invalid_request",_);export{e as PrivyErrorCode};
1
+ var _,e=((_={}).OAUTH_ACCOUNT_SUSPENDED="oauth_account_suspended",_.MISSING_OR_INVALID_PRIVY_APP_ID="missing_or_invalid_privy_app_id",_.MISSING_OR_INVALID_PRIVY_CLIENT_ID="missing_or_invalid_privy_client_id",_.MISSING_OR_INVALID_PRIVY_ACCOUNT_ID="missing_or_invalid_privy_account_id",_.MISSING_OR_INVALID_TOKEN="missing_or_invalid_token",_.MISSING_OR_INVALID_MFA="missing_or_invalid_mfa",_.EXPIRED_OR_INVALID_MFA_TOKEN="expired_or_invalid_mfa_token",_.INVALID_DATA="invalid_data",_.INVALID_CREDENTIALS="invalid_credentials",_.INVALID_CAPTCHA="invalid_captcha",_.LINKED_TO_ANOTHER_USER="linked_to_another_user",_.ALLOWLIST_REJECTED="allowlist_rejected",_.CANNOT_UNLINK_EMBEDDED_WALLET="cannot_unlink_embedded_wallet",_.CANNOT_UNLINK_SOLE_ACCOUNT="cannot_unlink_sole_account",_.CANNOT_LINK_MORE_OF_TYPE="cannot_link_more_of_type",_.LINKED_ACCOUNT_NOT_FOUND="linked_account_not_found",_.TOO_MANY_REQUESTS="too_many_requests",_.RESOURCE_CONFLICT="resource_conflict",_.INVALID_ORIGIN="invalid_origin",_.MISSING_ORIGIN="missing_origin",_.INVALID_NATIVE_APP_ID="invalid_native_app_id",_.TOKEN_ALREADY_USED="token_already_used",_.ALREADY_LOGGED_OUT="already_logged_out",_.NOT_SUPPORTED="not_supported",_.USER_UNSUBSCRIBED="user_unsubscribed",_.MAX_APPS_REACHED="max_apps_reached",_.USER_LIMIT_REACHED="max_accounts_reached",_.DEVICE_REVOKED="device_revoked",_.WALLET_PASSWORD_EXISTS="wallet_password_exists",_.OAUTH_STATE_MISMATCH="oauth_state_mismatch",_.MAX_DENYLIST_ENTRIES_REACHED="max_denylist_entries_reached",_.MAX_TEST_ACCOUNTS_REACHED="max_test_accounts_reached",_.DISALLOWED_LOGIN_METHOD="disallowed_login_method",_.DISALLOWED_PLUS_EMAIL="disallowed_plus_email",_.DISALLOWED_RECOVERY_METHOD="disallowed_recovery_method",_.LEGACY_DASHBOARD_LOGIN_CONFIGURATION="legacy_dashboard_login_configuration",_.CANNOT_SET_PASSWORD="cannot_set_password",_.INVALID_PKCE_PARAMETERS="invalid_pkce_parameters",_.INVALID_APP_URL_SCHEME_CONFIGURATION="invalid_app_url_scheme_configuration",_.CROSS_APP_CONNECTION_NOT_ALLOWED="cross_app_connection_not_allowed",_.USER_DOES_NOT_EXIST="user_does_not_exist",_.ALREADY_EXISTS="resource_already_exists",_.ACCOUNT_TRANSFER_REQUIRED="account_transfer_required",_.USER_HAS_NOT_DELEGATED_WALLET="user_has_not_delegated_wallet",_.FEATURE_NOT_ENABLED="feature_not_enabled",_.INSUFFICIENT_FUNDS="insufficient_funds",_.TRANSACTION_BROADCAST_FAILURE="transaction_broadcast_failure",_.INVALID_POLICY_FORMAT="invalid_policy_format",_.POLICY_VIOLATION="policy_violation",_.AUTHORIZATION_KEY_HAS_ASSOCIATED_WALLETS="authorization_key_has_associated_wallets",_.INVALID_REQUEST="invalid_request",_);export{e as PrivyErrorCode};
@@ -1 +1 @@
1
- export{AccountTransferRequiredError,AllowlistRejectedError,ForbiddenError,HttpError,InsufficientBalanceError,InternalServerError,InvalidInputError,LegacyInvalidInputError,NotFoundError,RequestTimeoutError,TooManyRequestsError,UnauthorizedError,UnsupportedMediaType}from"./classes/api-error.mjs";export{PrivyErrorCode}from"./constants/error-codes.mjs";export{APIError}from"./schemas/error.mjs";import"zod";
1
+ export{AccountTransferRequiredError,AllowlistRejectedError,ForbiddenError,HttpError,InsufficientBalanceError,InternalServerError,InvalidInputError,LegacyInvalidInputError,NotFoundError,PaymentFailedError,RequestTimeoutError,ResourceConflictError,TooManyRequestsError,UnauthorizedError,UnsupportedMediaType}from"./classes/api-error.mjs";export{PrivyErrorCode}from"./constants/error-codes.mjs";export{APIError}from"./schemas/error.mjs";import"zod";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@privy-io/api-base",
3
- "version": "1.6.0",
3
+ "version": "1.6.2-beta-20250903204105",
4
4
  "sideEffects": false,
5
5
  "exports": {
6
6
  ".": {