You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@xylabs/api

Package Overview
Dependencies
Maintainers
5
Versions
435
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xylabs/api

Base functionality used throughout XY Labs TypeScript/JavaScript libraries

5.0.2
latest
Source
npmnpm
Version published
Weekly downloads
2.3K
-16.48%
Maintainers
5
Weekly downloads
 
Created
Source

@xylabs/api

logo

main-build npm-badge npm-downloads-badge jsdelivr-badge npm-license-badge codacy-badge codeclimate-badge snyk-badge socket-badge

Base functionality used throughout XY Labs TypeScript/JavaScript libraries

Reference

@xylabs/api

Classes

Interfaces

Type Aliases

Variables

Functions

classes

ApiClient

@xylabs/api

Constructors

Constructor

new ApiClient(token?, stage?): ApiClient;

Parameters

token?

null | string

stage?

ApiStage

Returns

ApiClient

Properties

token?

protected optional token: null | string;

stage?

protected optional stage: ApiStage;

Methods

endPoint()

abstract endPoint(): string;

Returns

string

ApiEndpoint

@xylabs/api

Type Parameters

T

T

Constructors

Constructor

new ApiEndpoint<T>(config, path): ApiEndpoint<T>;

Parameters

config

ApiConfig

path

string

Returns

ApiEndpoint<T>

Accessors

value

Get Signature

get value(): undefined | T;

Returns

undefined | T

Methods

fetch()

fetch(): Promise<T>;

Returns

Promise<T>

get()

get(): Promise<T | NonNullable<T>>;

Returns

Promise<T | NonNullable<T>>

insert()

insert(value): Promise<T>;

Parameters

value

T

Returns

Promise<T>

functions

getApiStage

@xylabs/api

function getApiStage(hostname): "beta" | "local" | "prod";

Parameters

hostname

string

Returns

"beta" | "local" | "prod"

interfaces

ApiConfig

@xylabs/api

Properties

apiDomain

apiDomain: string;

apiKey?

optional apiKey: string;

jwtToken?

optional jwtToken: string;

userid?

optional userid: string;

type-aliases

ApiStage

@xylabs/api

type ApiStage = EnumValue<typeof ApiStage>;

variables

ApiStage

@xylabs/api

const ApiStage: Enum<{
  Beta: "beta";
  Local: "local";
  Prod: "prod";
}>;

Part of sdk-js

Maintainers

License

See the LICENSE file for license details

Credits

Made with 🔥 and ❄️ by XYLabs

Keywords

xylabs

FAQs

Package last updated on 31 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts