Socket
Book a DemoInstallSign in
Socket

@privy-io/api-base

Package Overview
Dependencies
Maintainers
8
Versions
167
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@privy-io/api-base - npm Package Compare versions

Comparing version

to
1.6.0

2

dist/cjs/classes/api-error.js

@@ -1,1 +0,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.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)}};
"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,1 +0,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.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;
"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,1 +0,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.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;
"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;

@@ -158,2 +158,5 @@ import { z } from 'zod';

}
declare class InsufficientBalanceError extends HttpError {
constructor(message?: string);
}
declare class InternalServerError extends HttpError {

@@ -203,2 +206,2 @@ constructor(message?: string);

export { APIError, AccountTransferRequiredError, AllowlistRejectedError, type ApiErrorType, ForbiddenError, HttpError, InternalServerError, InvalidInputError, LegacyInvalidInputError, NotFoundError, PrivyErrorCode, RequestTimeoutError, TooManyRequestsError, UnauthorizedError, UnsupportedMediaType };
export { APIError, AccountTransferRequiredError, AllowlistRejectedError, type ApiErrorType, ForbiddenError, HttpError, InsufficientBalanceError, InternalServerError, InvalidInputError, LegacyInvalidInputError, NotFoundError, PrivyErrorCode, RequestTimeoutError, TooManyRequestsError, UnauthorizedError, UnsupportedMediaType };
{
"name": "@privy-io/api-base",
"version": "1.5.2",
"version": "1.6.0",
"sideEffects": false,

@@ -57,6 +57,2 @@ "exports": {

},
"engines": {
"node": ">=18.0.0",
"npm": ">=8.0.0"
},
"publishConfig": {

@@ -63,0 +59,0 @@ "access": "public"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet