@privy-io/api-base 1.8.3 → 1.9.1
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/cjs/classes/api-error.js +1 -1
- package/dist/cjs/classes/api-error.js.map +1 -1
- package/dist/cjs/constants/error-codes.js +1 -1
- package/dist/cjs/constants/error-codes.js.map +1 -1
- package/dist/dts/index.d.mts +8 -3
- package/dist/dts/index.d.ts +8 -3
- package/dist/esm/classes/api-error.mjs +1 -1
- package/dist/esm/classes/api-error.mjs.map +1 -1
- package/dist/esm/constants/error-codes.mjs +1 -1
- package/dist/esm/constants/error-codes.mjs.map +1 -1
- package/package.json +13 -12
|
@@ -1,2 +1,2 @@
|
|
|
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
|
+
"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,s){super(409,e||"Conflict encountered while trying to modify resource.",s||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"}};
|
|
2
2
|
//# sourceMappingURL=api-error.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-error.js","sources":["../../../src/classes/api-error.ts"],"names":["HttpError","Error","toString","this","name","message","cause","constructor","status","code","responseData","super","UnauthorizedError","errorCode","t","PrivyErrorCode","ACCOUNT_TRANSFER_REQUIRED","data","ALLOWLIST_REJECTED","INSUFFICIENT_FUNDS","INVALID_DATA","RESOURCE_CONFLICT","TOO_MANY_REQUESTS"],"mappings":"0DAWO,MAAMA,UAAkBC,MAoB7B,QAAAC,GACE,MAAO,GAAGC,KAAKC,SAASD,KAAKE,UAAUF,KAAKG,MAAQ,YAAYH,KAAKG,SAAW,IAClF,CAhBAC,WAAAA,CACEC,EACAH,EACAI,EACAC,GAEAC,MAAMN,GACNF,KAAKK,OAASA,EACdL,KAAKM,KAAOA,EAEZN,KAAKC,KAAO,YACZD,KAAKO,aAAeA,CACtB,EAcK,MAAME,UAA0BZ,EACrCO,WAAAA,CAAYF,EAAiBQ,GAC3BF,MAAM,IAAKN,EAASQ,GACpBV,KAAKC,KAAO,mBACd,uCAuGK,cAA2CJ,EAChDO,WAAAA,CACEO,GAaAH,MAAM,IAAK,4BAA6BI,EAAAA,eAAeC,0BAA2BC,GAAAA,KAb3EA,KAAAA,EAcPd,KAAKC,KAAO,8BACd,kCArHK,cAAqCQ,EAM1CL,WAAAA,CAAYF,GACVM,MACEN,GAAW,4CACXU,EAAAA,eAAeG,oBAEjBf,KAAKC,KAAO,wBACd,0BAGK,cAA6BJ,EAClCO,WAAAA,CAAYF,EAAiBQ,GAC3BF,MAAM,IAAKN,EAASQ,GACpBV,KAAKC,KAAO,gBACd,wDA6DK,cAAuCJ,EAC5CO,WAAAA,CAAYF,GACVM,MAAM,IAAKN,GAAW,wBAAyBU,EAAAA,eAAeI,oBAC9DhB,KAAKC,KAAO,0BACd,+BASK,cAAkCJ,EACvCO,WAAAA,CAAYF,GACVM,MAAM,IAAKN,GAAW,wBACtBF,KAAKC,KAAO,qBACd,6BA/GK,cAAgCJ,EACrCO,WAAAA,CAAYF,EAAiBQ,GAC3BF,MAAM,IAAKN,EAASQ,GAAaE,EAAAA,eAAeK,cAChDjB,KAAKC,KAAO,mBACd,mCA4DK,cAAsCJ,EAC3CO,WAAAA,CAAYF,EAAiBQ,GAC3BF,MAAM,IAAKN,EAASQ,GACpBV,KAAKC,KAAO,yBACd,yBAhCK,cAA4BJ,EACjCO,WAAAA,CAAYF,GACVM,MAAM,IAAKN,GACXF,KAAKC,KAAO,eACd,8BA6DK,cAAiCJ,EACtCO,WAAAA,CAAYF,GACVM,MAAM,IAAKN,GAAW,kBACxB,+BA7DK,cAAkCL,EACvCO,WAAAA,CAAYF,EAAiBQ,GAC3BF,MAAM,IAAKN,EAASQ,GACpBV,KAAKC,KAAO,qBACd,iCAoCK,cAAoCJ,EACzCO,WAAAA,CAAYF,
|
|
1
|
+
{"version":3,"file":"api-error.js","sources":["../../../src/classes/api-error.ts"],"names":["HttpError","Error","toString","this","name","message","cause","constructor","status","code","responseData","super","UnauthorizedError","errorCode","t","PrivyErrorCode","ACCOUNT_TRANSFER_REQUIRED","data","ALLOWLIST_REJECTED","INSUFFICIENT_FUNDS","INVALID_DATA","RESOUR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O,WAAAA,CAAYF,GACVM,MAAM,IAAKN,GACXF,KAAKC,KAAO,eACd,8BA6DK,cAAiCJ,EACtCO,WAAAA,CAAYF,GACVM,MAAM,IAAKN,GAAW,kBACxB,+BA7DK,cAAkCL,EACvCO,WAAAA,CAAYF,EAAiBQ,GAC3BF,MAAM,IAAKN,EAASQ,GACpBV,KAAKC,KAAO,qBACd,iCAoCK,cAAoCJ,EACzCO,WAAAA,CAAYF,EAAkBQ,GAC5BF,MACE,IACAN,GAAW,wDACXQ,GAAaE,EAAAA,eAAeM,mBAE9BlB,KAAKC,KAAO,uBACd,gCApBK,cAAmCJ,EACxCO,WAAAA,CAAYF,GACVM,MACE,IACAN,GAAW,+CACXU,EAAAA,eAAeO,mBAEjBnB,KAAKC,KAAO,sBACd,4DA7BK,cAAmCJ,EACxCO,WAAAA,CAAYF,GACVM,MAAM,IAAKN,GACXF,KAAKC,KAAO,sBACd"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var _,i=((_={}).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_MFA_ENROLLMENT="missing_mfa_enrollment",_.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",_.TRANSACTION_EXECUTION_FAILURE="transaction_execution_failure",_.INVALID_SOLANA_TRANSACTION="invalid_solana_transaction",_.INVALID_POLICY_FORMAT="invalid_policy_format",_.INVALID_AGGREGATION_FORMAT="invalid_aggregation_format",_.POLICY_VIOLATION="policy_violation",_.AUTHORIZATION_KEY_HAS_ASSOCIATED_WALLETS="authorization_key_has_associated_wallets",_.INVALID_REQUEST="invalid_request",_.SIGNUP_DISABLED="signup_disabled",_);exports.PrivyErrorCode=i;
|
|
1
|
+
"use strict";var _,i=((_={}).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_MFA_ENROLLMENT="missing_mfa_enrollment",_.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",_.TRANSACTION_EXECUTION_FAILURE="transaction_execution_failure",_.INVALID_SOLANA_TRANSACTION="invalid_solana_transaction",_.INVALID_POLICY_FORMAT="invalid_policy_format",_.INVALID_AGGREGATION_FORMAT="invalid_aggregation_format",_.POLICY_VIOLATION="policy_violation",_.AUTHORIZATION_KEY_HAS_ASSOCIATED_WALLETS="authorization_key_has_associated_wallets",_.COMPLIANCE_BLOCKED="compliance_blocked",_.INVALID_REQUEST="invalid_request",_.SIGNUP_DISABLED="signup_disabled",_.INVALID_STATE="invalid_state",_);exports.PrivyErrorCode=i;
|
|
2
2
|
//# sourceMappingURL=error-codes.js.map
|
|
@@ -1 +1 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CAAAA,EAAAA,oBAAAA,sBAAAA,EAAAA,wBAAAA,0BAAAA,EAAAA,qCAAAA,uCAAAA,EAAAA,iCAAAA,mCAAAA,EAAAA,oBAAAA,sBAAAA,EAAAA,eAAAA,0BAAAA,EAAAA,0BAAAA,4BAAAA,EAAAA,8BAAAA,gCAAAA,EAAAA,oBAAAA,sBAAAA,EAAAA,mBAAAA,qBAAAA,EAAAA,8BAAAA,gCAAAA,EAAAA,8BAAAA,gCAAAA,EAAAA,2BAAAA,6BAAAA,EAAAA,sBAAAA,wBAAAA,EAAAA,2BAAAA,6BAAAA,EAAAA,iBAAAA,mBAAAA,EAAAA,yCAAAA,2CAAAA,EAAAA,mBAAAA,qBAAAA,EAAAA,gBAAAA,kBAAAA,EAAAA,gBAAAA,kBAAAA,EAAAA,cAAAA,gBAAAA"}
|
package/dist/dts/index.d.mts
CHANGED
|
@@ -108,10 +108,14 @@ declare enum PrivyErrorCode {
|
|
|
108
108
|
POLICY_VIOLATION = "policy_violation",
|
|
109
109
|
/** Authorization key has associated wallets */
|
|
110
110
|
AUTHORIZATION_KEY_HAS_ASSOCIATED_WALLETS = "authorization_key_has_associated_wallets",
|
|
111
|
+
/** Operation blocked for compliance reasons. */
|
|
112
|
+
COMPLIANCE_BLOCKED = "compliance_blocked",
|
|
111
113
|
/** Invalid request */
|
|
112
114
|
INVALID_REQUEST = "invalid_request",
|
|
113
115
|
/** User sign ups are suspended for this account. */
|
|
114
|
-
SIGNUP_DISABLED = "signup_disabled"
|
|
116
|
+
SIGNUP_DISABLED = "signup_disabled",
|
|
117
|
+
/** The resource exists but is not in a valid state for this operation. */
|
|
118
|
+
INVALID_STATE = "invalid_state"
|
|
115
119
|
}
|
|
116
120
|
|
|
117
121
|
type ApiErrorType = {
|
|
@@ -168,7 +172,7 @@ declare class TooManyRequestsError extends HttpError {
|
|
|
168
172
|
constructor(message?: string);
|
|
169
173
|
}
|
|
170
174
|
declare class ResourceConflictError extends HttpError {
|
|
171
|
-
constructor(message?: string);
|
|
175
|
+
constructor(message?: string, errorCode?: PrivyErrorCode);
|
|
172
176
|
}
|
|
173
177
|
declare class InsufficientBalanceError extends HttpError {
|
|
174
178
|
constructor(message?: string);
|
|
@@ -220,4 +224,5 @@ declare const APIError: z.ZodObject<{
|
|
|
220
224
|
code?: PrivyErrorCode | undefined;
|
|
221
225
|
}>;
|
|
222
226
|
|
|
223
|
-
export { APIError, AccountTransferRequiredError, AllowlistRejectedError,
|
|
227
|
+
export { APIError, AccountTransferRequiredError, AllowlistRejectedError, ForbiddenError, HttpError, InsufficientBalanceError, InternalServerError, InvalidInputError, LegacyInvalidInputError, NotFoundError, PaymentFailedError, PrivyErrorCode, RequestTimeoutError, ResourceConflictError, TooManyRequestsError, UnauthorizedError, UnsupportedMediaType };
|
|
228
|
+
export type { ApiErrorType };
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -108,10 +108,14 @@ declare enum PrivyErrorCode {
|
|
|
108
108
|
POLICY_VIOLATION = "policy_violation",
|
|
109
109
|
/** Authorization key has associated wallets */
|
|
110
110
|
AUTHORIZATION_KEY_HAS_ASSOCIATED_WALLETS = "authorization_key_has_associated_wallets",
|
|
111
|
+
/** Operation blocked for compliance reasons. */
|
|
112
|
+
COMPLIANCE_BLOCKED = "compliance_blocked",
|
|
111
113
|
/** Invalid request */
|
|
112
114
|
INVALID_REQUEST = "invalid_request",
|
|
113
115
|
/** User sign ups are suspended for this account. */
|
|
114
|
-
SIGNUP_DISABLED = "signup_disabled"
|
|
116
|
+
SIGNUP_DISABLED = "signup_disabled",
|
|
117
|
+
/** The resource exists but is not in a valid state for this operation. */
|
|
118
|
+
INVALID_STATE = "invalid_state"
|
|
115
119
|
}
|
|
116
120
|
|
|
117
121
|
type ApiErrorType = {
|
|
@@ -168,7 +172,7 @@ declare class TooManyRequestsError extends HttpError {
|
|
|
168
172
|
constructor(message?: string);
|
|
169
173
|
}
|
|
170
174
|
declare class ResourceConflictError extends HttpError {
|
|
171
|
-
constructor(message?: string);
|
|
175
|
+
constructor(message?: string, errorCode?: PrivyErrorCode);
|
|
172
176
|
}
|
|
173
177
|
declare class InsufficientBalanceError extends HttpError {
|
|
174
178
|
constructor(message?: string);
|
|
@@ -220,4 +224,5 @@ declare const APIError: z.ZodObject<{
|
|
|
220
224
|
code?: PrivyErrorCode | undefined;
|
|
221
225
|
}>;
|
|
222
226
|
|
|
223
|
-
export { APIError, AccountTransferRequiredError, AllowlistRejectedError,
|
|
227
|
+
export { APIError, AccountTransferRequiredError, AllowlistRejectedError, ForbiddenError, HttpError, InsufficientBalanceError, InternalServerError, InvalidInputError, LegacyInvalidInputError, NotFoundError, PaymentFailedError, PrivyErrorCode, RequestTimeoutError, ResourceConflictError, TooManyRequestsError, UnauthorizedError, UnsupportedMediaType };
|
|
228
|
+
export type { ApiErrorType };
|
|
@@ -1,2 +1,2 @@
|
|
|
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
|
+
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,e){super(409,r||"Conflict encountered while trying to modify resource.",e||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};
|
|
2
2
|
//# sourceMappingURL=api-error.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-error.mjs","sources":["../../../src/classes/api-error.ts"],"names":["HttpError","Error","toString","this","name","message","cause","constructor","status","code","responseData","super","InvalidInputError","errorCode","PrivyErrorCode","INVALID_DATA","UnauthorizedError","AllowlistRejectedError","ALLOWLIST_REJECTED","ForbiddenError","NotFoundError","RequestTimeoutError","UnsupportedMediaType","LegacyInvalidInputError","TooManyRequestsError","TOO_MANY_REQUESTS","ResourceConflictError","RESOURCE_CONFLICT","InsufficientBalanceError","INSUFFICIENT_FUNDS","PaymentFailedError","InternalServerError","AccountTransferRequiredError","t","ACCOUNT_TRANSFER_REQUIRED","data"],"mappings":"8DAWO,MAAMA,UAAkBC,MAoB7B,QAAAC,GACE,MAAO,GAAGC,KAAKC,SAASD,KAAKE,UAAUF,KAAKG,MAAQ,YAAYH,KAAKG,SAAW,IAClF,CAhBAC,WAAAA,CACEC,EACAH,EACAI,EACAC,GAEAC,MAAMN,GACNF,KAAKK,OAASA,EACdL,KAAKM,KAAOA,EAEZN,KAAKC,KAAO,YACZD,KAAKO,aAAeA,CACtB,EAOK,MAAME,UAA0BZ,EACrCO,WAAAA,CAAYF,EAAiBQ,GAC3BF,MAAM,IAAKN,EAASQ,GAAaC,EAAeC,cAChDZ,KAAKC,KAAO,mBACd,EAGK,MAAMY,UAA0BhB,EACrCO,WAAAA,CAAYF,EAAiBQ,GAC3BF,MAAM,IAAKN,EAASQ,GACpBV,KAAKC,KAAO,mBACd,EAGK,MAAMa,UAA+BD,EAM1CT,WAAAA,CAAYF,GACVM,MACEN,GAAW,4CACXS,EAAeI,oBAEjBf,KAAKC,KAAO,wBACd,EAGK,MAAMe,UAAuBnB,EAClCO,WAAAA,CAAYF,EAAiBQ,GAC3BF,MAAM,IAAKN,EAASQ,GACpBV,KAAKC,KAAO,gBACd,EAGK,MAAMgB,UAAsBpB,EACjCO,WAAAA,CAAYF,GACVM,MAAM,IAAKN,GACXF,KAAKC,KAAO,eACd,EAGK,MAAMiB,UAA4BrB,EACvCO,WAAAA,CAAYF,EAAiBQ,GAC3BF,MAAM,IAAKN,EAASQ,GACpBV,KAAKC,KAAO,qBACd,EAGK,MAAMkB,UAA6BtB,EACxCO,WAAAA,CAAYF,GACVM,MAAM,IAAKN,GACXF,KAAKC,KAAO,sBACd,EAUK,MAAMmB,UAAgCvB,EAC3CO,WAAAA,CAAYF,EAAiBQ,GAC3BF,MAAM,IAAKN,EAASQ,GACpBV,KAAKC,KAAO,yBACd,EAGK,MAAMoB,UAA6BxB,EACxCO,WAAAA,CAAYF,GACVM,MACE,IACAN,GAAW,+CACXS,EAAeW,mBAEjBtB,KAAKC,KAAO,sBACd,EAIK,MAAMsB,UAA8B1B,EACzCO,WAAAA,CAAYF,
|
|
1
|
+
{"version":3,"file":"api-error.mjs","sources":["../../../src/classes/api-error.ts"],"names":["HttpError","Error","toString","this","name","message","cause","constructor","status","code","responseData","super","InvalidInputError","errorCode","PrivyErrorCode","INVALID_DATA","UnauthorizedError","AllowlistRejectedError","ALLOWLIST_REJECTED","ForbiddenError","NotFoundError","RequestTimeoutError","UnsupportedMediaType","LegacyInvalidInputError","TooManyRequestsError","TOO_MANY_REQUESTS","ResourceConflictError","RESOURCE_CONFLICT","InsufficientBalanceError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B,EACxCO,WAAAA,CAAYF,GACVM,MACE,IACAN,GAAW,+CACXS,EAAeW,mBAEjBtB,KAAKC,KAAO,sBACd,EAIK,MAAMsB,UAA8B1B,EACzCO,WAAAA,CAAYF,EAAkBQ,GAC5BF,MACE,IACAN,GAAW,wDACXQ,GAAaC,EAAea,mBAE9BxB,KAAKC,KAAO,uBACd,EAGK,MAAMwB,UAAiC5B,EAC5CO,WAAAA,CAAYF,GACVM,MAAM,IAAKN,GAAW,wBAAyBS,EAAee,oBAC9D1B,KAAKC,KAAO,0BACd,EAGK,MAAM0B,UAA2B9B,EACtCO,WAAAA,CAAYF,GACVM,MAAM,IAAKN,GAAW,kBACxB,EAGK,MAAM0B,UAA4B/B,EACvCO,WAAAA,CAAYF,GACVM,MAAM,IAAKN,GAAW,wBACtBF,KAAKC,KAAO,qBACd,EAGK,MAAM4B,UAAqChC,EAChDO,WAAAA,CACE0B,GAaAtB,MAAM,IAAK,4BAA6BG,EAAeoB,0BAA2BC,GAAAA,KAb3EA,KAAAA,EAcPhC,KAAKC,KAAO,8BACd"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _,I=((_={}).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_MFA_ENROLLMENT="missing_mfa_enrollment",_.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",_.TRANSACTION_EXECUTION_FAILURE="transaction_execution_failure",_.INVALID_SOLANA_TRANSACTION="invalid_solana_transaction",_.INVALID_POLICY_FORMAT="invalid_policy_format",_.INVALID_AGGREGATION_FORMAT="invalid_aggregation_format",_.POLICY_VIOLATION="policy_violation",_.AUTHORIZATION_KEY_HAS_ASSOCIATED_WALLETS="authorization_key_has_associated_wallets",_.INVALID_REQUEST="invalid_request",_.SIGNUP_DISABLED="signup_disabled",_);export{I as PrivyErrorCode};
|
|
1
|
+
var _,I=((_={}).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_MFA_ENROLLMENT="missing_mfa_enrollment",_.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",_.TRANSACTION_EXECUTION_FAILURE="transaction_execution_failure",_.INVALID_SOLANA_TRANSACTION="invalid_solana_transaction",_.INVALID_POLICY_FORMAT="invalid_policy_format",_.INVALID_AGGREGATION_FORMAT="invalid_aggregation_format",_.POLICY_VIOLATION="policy_violation",_.AUTHORIZATION_KEY_HAS_ASSOCIATED_WALLETS="authorization_key_has_associated_wallets",_.COMPLIANCE_BLOCKED="compliance_blocked",_.INVALID_REQUEST="invalid_request",_.SIGNUP_DISABLED="signup_disabled",_.INVALID_STATE="invalid_state",_);export{I as PrivyErrorCode};
|
|
2
2
|
//# sourceMappingURL=error-codes.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-codes.mjs","sources":["../../../src/constants/error-codes.ts"],"names":["PrivyErrorCode"],"mappings":"IAAYA,EAAAA,IAAAA,EAAAA,CAAAA,GAAAA,wBAAAA,0BAAAA,EAAAA,gCAAAA,kCAAAA,EAAAA,mCAAAA,qCAAAA,EAAAA,oCAAAA,sCAAAA,EAAAA,yBAAAA,2BAAAA,EAAAA,uBAAAA,yBAAAA,EAAAA,uBAAAA,yBAAAA,EAAAA,6BAAAA,+BAAAA,EAAAA,aAAAA,eAAAA,EAAAA,oBAAAA,sBAAAA,EAAAA,gBAAAA,kBAAAA,EAAAA,uBAAAA,yBAAAA,EAAAA,mBAAAA,qBAAAA,EAAAA,8BAAAA,gCAAAA,EAAAA,2BAAAA,6BAAAA,EAAAA,yBAAAA,2BAAAA,EAAAA,yBAAAA,2BAAAA,EAAAA,kBAAAA,oBAAAA,EAAAA,kBAAAA,oBAAAA,EAAAA,eAAAA,iBAAAA,EAAAA,eAAAA,iBAAAA,EAAAA,sBAAAA,wBAAAA,EAAAA,mBAAAA,qBAAAA,EAAAA,mBAAAA,qBAAAA,EAAAA,cAAAA,gBAAAA,EAAAA,kBAAAA,oBAAAA,EAAAA,iBAAAA,mBAAAA,EAAAA,mBAAAA,uBAAAA,EAAAA,eAAAA,iBAAAA,EAAAA,uBAAAA,yBAAAA,EAAAA,qBAAAA,uBAAAA,EAAAA,6BAAAA,+BAAAA,EAAAA,0BAAAA,4BAAAA,EAAAA,wBAAAA,0BAAAA,EAAAA,sBAAAA,wBAAAA,EAAAA,2BAAAA,6BAAAA,EAAAA,qCAAAA,uCAAAA,EAAAA,oBAAAA,sBAAAA,EAAAA,wBAAAA,0BAAAA,EAAAA,qCAAAA,uCAAAA,EAAAA,iCAAAA,mCAAAA,EAAAA,oBAAAA,sBAAAA,EAAAA,eAAAA,0BAA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A,wBAAAA,0BAAAA,EAAAA,sBAAAA,wBAAAA,EAAAA,2BAAAA,6BAAAA,EAAAA,qCAAAA,uCAAAA,EAAAA,oBAAAA,sBAAAA,EAAAA,wBAAAA,0BAAAA,EAAAA,qCAAAA,uCAAAA,EAAAA,iCAAAA,mCAAAA,EAAAA,oBAAAA,sBAAAA,EAAAA,eAAAA,0BAAAA,EAAAA,0BAAAA,4BAAAA,EAAAA,8BAAAA,gCAAAA,EAAAA,oBAAAA,sBAAAA,EAAAA,mBAAAA,qBAAAA,EAAAA,8BAAAA,gCAAAA,EAAAA,8BAAAA,gCAAAA,EAAAA,2BAAAA,6BAAAA,EAAAA,sBAAAA,wBAAAA,EAAAA,2BAAAA,6BAAAA,EAAAA,iBAAAA,mBAAAA,EAAAA,yCAAAA,2CAAAA,EAAAA,mBAAAA,qBAAAA,EAAAA,gBAAAA,kBAAAA,EAAAA,gBAAAA,kBAAAA,EAAAA,cAAAA,gBAAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@privy-io/api-base",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -24,26 +24,27 @@
|
|
|
24
24
|
"README.md"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"zod": "^3.
|
|
27
|
+
"zod": "^3.25.76"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
+
"oxlint": "1.57.0",
|
|
31
|
+
"oxlint-tsgolint": "0.18.0",
|
|
30
32
|
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
31
33
|
"@rollup/plugin-replace": "^6.0.1",
|
|
32
34
|
"@rollup/plugin-swc": "^0.4.0",
|
|
33
35
|
"@rollup/plugin-terser": "^0.4.4",
|
|
34
36
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
35
37
|
"@swc/core": "^1.10.0",
|
|
36
|
-
"@swc/jest": "0.2.
|
|
38
|
+
"@swc/jest": "^0.2.39",
|
|
37
39
|
"@swc/plugin-styled-components": "^6.0.1",
|
|
38
40
|
"glob": "^10.3.12",
|
|
39
41
|
"jest": "^29.7.0",
|
|
40
42
|
"rollup": "4.60.1",
|
|
41
|
-
"rollup-plugin-copy": "
|
|
43
|
+
"rollup-plugin-copy": "3.5.0",
|
|
42
44
|
"rollup-plugin-dts": "^6.1.1",
|
|
43
|
-
"typescript": "~
|
|
44
|
-
"@privy-io/
|
|
45
|
-
"@privy-io/tsconfig": "0.0.0"
|
|
46
|
-
"@privy-io/build-config": "1.0.0"
|
|
45
|
+
"typescript": "~6.0.2",
|
|
46
|
+
"@privy-io/build-config": "1.0.0",
|
|
47
|
+
"@privy-io/tsconfig": "0.0.0"
|
|
47
48
|
},
|
|
48
49
|
"publishConfig": {
|
|
49
50
|
"access": "public"
|
|
@@ -52,12 +53,12 @@
|
|
|
52
53
|
"build:types": "rollup --config rollup.types.mjs",
|
|
53
54
|
"build:code": "rollup --config rollup.build.mjs",
|
|
54
55
|
"check-types": "tsc --noEmit",
|
|
55
|
-
"clean": "rm -rf dist .turbo .swc",
|
|
56
|
-
"clean:reset": "rm -rf dist .turbo .swc node_modules",
|
|
56
|
+
"clean": "rm -rf dist .turbo .swc *.tsbuildinfo",
|
|
57
|
+
"clean:reset": "rm -rf dist .turbo .swc node_modules *.tsbuildinfo",
|
|
57
58
|
"dev:code": "rollup --config rollup.dev.mjs --watch",
|
|
58
59
|
"dev:types": "rollup --config rollup.types.mjs --watch",
|
|
59
|
-
"format": "
|
|
60
|
-
"lint": "
|
|
60
|
+
"format": "oxlint src --fix",
|
|
61
|
+
"lint": "oxlint src",
|
|
61
62
|
"test": "jest"
|
|
62
63
|
}
|
|
63
64
|
}
|