@withjoy/sdk-js
Version:
Joy Javascript SDK
206 lines (205 loc) • 7.32 kB
TypeScript
export declare class HttpError extends Error {
statusCode: number;
constructor(statusCode: number, name: string, message?: string);
isInformational(): boolean;
isSuccessfull(): boolean;
isRedirection(): boolean;
isClient(): boolean;
isServer(): boolean;
}
export declare const createErrorClass: (statusCode: number, name: string) => {
new (message: string): {
statusCode: number;
isInformational(): boolean;
isSuccessfull(): boolean;
isRedirection(): boolean;
isClient(): boolean;
isServer(): boolean;
name: string;
message: string;
stack?: string;
};
captureStackTrace(targetObject: Object, constructorOpt?: Function): void;
prepareStackTrace?: (err: Error, stackTraces: NodeJS.CallSite[]) => any;
stackTraceLimit: number;
};
export declare const client: {
BadRequest: {
new (message: string): {
statusCode: number;
isInformational(): boolean;
isSuccessfull(): boolean;
isRedirection(): boolean;
isClient(): boolean;
isServer(): boolean;
name: string;
message: string;
stack?: string;
};
captureStackTrace(targetObject: Object, constructorOpt?: Function): void;
prepareStackTrace?: (err: Error, stackTraces: NodeJS.CallSite[]) => any;
stackTraceLimit: number;
};
Unauthorized: {
new (message: string): {
statusCode: number;
isInformational(): boolean;
isSuccessfull(): boolean;
isRedirection(): boolean;
isClient(): boolean;
isServer(): boolean;
name: string;
message: string;
stack?: string;
};
captureStackTrace(targetObject: Object, constructorOpt?: Function): void;
prepareStackTrace?: (err: Error, stackTraces: NodeJS.CallSite[]) => any;
stackTraceLimit: number;
};
Forbidden: {
new (message: string): {
statusCode: number;
isInformational(): boolean;
isSuccessfull(): boolean;
isRedirection(): boolean;
isClient(): boolean;
isServer(): boolean;
name: string;
message: string;
stack?: string;
};
captureStackTrace(targetObject: Object, constructorOpt?: Function): void;
prepareStackTrace?: (err: Error, stackTraces: NodeJS.CallSite[]) => any;
stackTraceLimit: number;
};
NotFound: {
new (message: string): {
statusCode: number;
isInformational(): boolean;
isSuccessfull(): boolean;
isRedirection(): boolean;
isClient(): boolean;
isServer(): boolean;
name: string;
message: string;
stack?: string;
};
captureStackTrace(targetObject: Object, constructorOpt?: Function): void;
prepareStackTrace?: (err: Error, stackTraces: NodeJS.CallSite[]) => any;
stackTraceLimit: number;
};
Conflict: {
new (message: string): {
statusCode: number;
isInformational(): boolean;
isSuccessfull(): boolean;
isRedirection(): boolean;
isClient(): boolean;
isServer(): boolean;
name: string;
message: string;
stack?: string;
};
captureStackTrace(targetObject: Object, constructorOpt?: Function): void;
prepareStackTrace?: (err: Error, stackTraces: NodeJS.CallSite[]) => any;
stackTraceLimit: number;
};
Gone: {
new (message: string): {
statusCode: number;
isInformational(): boolean;
isSuccessfull(): boolean;
isRedirection(): boolean;
isClient(): boolean;
isServer(): boolean;
name: string;
message: string;
stack?: string;
};
captureStackTrace(targetObject: Object, constructorOpt?: Function): void;
prepareStackTrace?: (err: Error, stackTraces: NodeJS.CallSite[]) => any;
stackTraceLimit: number;
};
TooManyRequests: {
new (message: string): {
statusCode: number;
isInformational(): boolean;
isSuccessfull(): boolean;
isRedirection(): boolean;
isClient(): boolean;
isServer(): boolean;
name: string;
message: string;
stack?: string;
};
captureStackTrace(targetObject: Object, constructorOpt?: Function): void;
prepareStackTrace?: (err: Error, stackTraces: NodeJS.CallSite[]) => any;
stackTraceLimit: number;
};
};
export declare const server: {
ApplicationException: {
new (message: string): {
statusCode: number;
isInformational(): boolean;
isSuccessfull(): boolean;
isRedirection(): boolean;
isClient(): boolean;
isServer(): boolean;
name: string;
message: string;
stack?: string;
};
captureStackTrace(targetObject: Object, constructorOpt?: Function): void;
prepareStackTrace?: (err: Error, stackTraces: NodeJS.CallSite[]) => any;
stackTraceLimit: number;
};
InternalServerError: {
new (message: string): {
statusCode: number;
isInformational(): boolean;
isSuccessfull(): boolean;
isRedirection(): boolean;
isClient(): boolean;
isServer(): boolean;
name: string;
message: string;
stack?: string;
};
captureStackTrace(targetObject: Object, constructorOpt?: Function): void;
prepareStackTrace?: (err: Error, stackTraces: NodeJS.CallSite[]) => any;
stackTraceLimit: number;
};
NotImplemented: {
new (message: string): {
statusCode: number;
isInformational(): boolean;
isSuccessfull(): boolean;
isRedirection(): boolean;
isClient(): boolean;
isServer(): boolean;
name: string;
message: string;
stack?: string;
};
captureStackTrace(targetObject: Object, constructorOpt?: Function): void;
prepareStackTrace?: (err: Error, stackTraces: NodeJS.CallSite[]) => any;
stackTraceLimit: number;
};
BadGateway: {
new (message: string): {
statusCode: number;
isInformational(): boolean;
isSuccessfull(): boolean;
isRedirection(): boolean;
isClient(): boolean;
isServer(): boolean;
name: string;
message: string;
stack?: string;
};
captureStackTrace(targetObject: Object, constructorOpt?: Function): void;
prepareStackTrace?: (err: Error, stackTraces: NodeJS.CallSite[]) => any;
stackTraceLimit: number;
};
};