Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@xylabs/api

Package Overview
Dependencies
Maintainers
7
Versions
220
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xylabs/api - npm Package Compare versions

Comparing version 2.10.0 to 2.10.1

41

dist/index.d.ts

@@ -1,5 +0,36 @@

export { ApiClient } from './ApiClient.js';
export { ApiConfig } from './ApiConfig.js';
export { ApiEndpoint } from './ApiEndpoint.js';
export { ApiStage } from './ApiStage.js';
export { getApiStage } from './getApiStage.js';
declare enum ApiStage {
Beta = "beta",
Local = "local",
Prod = "prod"
}
declare abstract class ApiClient {
protected token?: string | null | undefined;
protected stage?: ApiStage | undefined;
constructor(token?: string | null | undefined, stage?: ApiStage | undefined);
abstract endPoint(): string;
}
interface ApiConfig {
apiDomain: string;
apiKey?: string;
jwtToken?: string;
userid?: string;
}
declare class ApiEndpoint<T> {
private _value?;
private config;
private path;
constructor(config: ApiConfig, path: string);
get value(): T | undefined;
private get headers();
private get url();
fetch(): Promise<T>;
get(): Promise<T | NonNullable<T>>;
insert(value: T): Promise<T>;
}
declare const getApiStage: (hostname: string) => ApiStage;
export { ApiClient, ApiConfig, ApiEndpoint, ApiStage, getApiStage };

5

package.json

@@ -58,4 +58,3 @@ {

"dependencies": {
"axios": "^1.5.0",
"tslib": "^2.6.2"
"axios": "^1.5.0"
},

@@ -76,4 +75,4 @@ "devDependencies": {

"sideEffects": false,
"version": "2.10.0",
"version": "2.10.1",
"packageManager": "yarn@3.3.1"
}
import { ApiStage } from './ApiStage'
abstract class ApiClient {
public constructor(protected token?: string | null, protected stage?: ApiStage) {
public constructor(
protected token?: string | null,
protected stage?: ApiStage,
) {
this.stage = stage ?? ApiStage.Prod

@@ -6,0 +9,0 @@ this.token = token

@@ -8,8 +8,10 @@ import { defineConfig } from 'tsup'

clean: true,
dts: true,
entry: ['src'],
dts: {
entry: ['src/index.ts'],
},
entry: ['src/index.ts'],
format: ['cjs', 'esm'],
sourcemap: true,
splitting: false,
tsconfig: 'tsconfig.json',
tsconfig: 'tsconfig.build.json',
})

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc