New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@liblab/sdk

Package Overview
Dependencies
Maintainers
1
Versions
451
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@liblab/sdk

Liblab

  • 0.0.38
  • npm
  • Socket score

Version published
Weekly downloads
261
decreased by-71.78%
Maintainers
1
Weekly downloads
 
Created
Source

Liblab Typescript SDK 0.0.38

The Typescript SDK for Liblab.

  • API version: 0.0.38
  • SDK version: 0.0.38

Table of Contents

  • Installation
  • Authentication
  • API Endpoint Services
  • API Models
  • Sample Usage
  • Environments
  • Liblab Services

Installation

npm install sdk  

Authentication

To see whether an endpoint needs a specific type of authentication check the endpoint's documentation.

Bearer Authentication with Refresh Tokens

The Liblab API uses bearer tokens for authentication, but these bearer tokens have a short expiration time. Refresh tokens have longer duration, and they have the ability to obtain new bearer tokens. The bearer and refresh token can be set when initializing the SDK like this:

sdk = new Liblab('YOUR_REFRESH_TOKEN', 'YOUR_BEARER_TOKEN')

Or at a later stage:

sdk = new Liblab()
sdk.setBearerToken('YOUR_BEARER_TOKEN');
sdk.setRefreshToken('YOUR_REFRESH_TOKEN');

After the refresh token has been set, the SDK will automatically refresh the bearer token when needed.

Sample Usage

Here is a simple program demonstrating usage of this SDK. It can also be found in the examples/src/index.ts file in this directory.

When running the sample make sure to use npm install to install all the dependencies.

import { Liblab } from '@liblab/sdk';


const sdk = new Liblab();

(async () => {
  const result = await sdk.build
    .getBuildStatuses();
  console.log(result);
})();
 

Environments

Here is the list of all available environments:

DEFAULT = 'https://api-dev.liblab.com',
PRODUCTION = 'https://api.liblab.com',
STAGING = 'https://api-staging.liblab.com',
DEVELOPMENT = 'https://api-dev.liblab.com'

How to set the environment:

const sdk = new Liblab();
sdk.setEnvironment(Environment.DEFAULT);

Liblab Services

A list of all services and services methods.

Build

MethodDescription
createBuild
getBuilds
buildSdk
buildDoc
getBuildStatuses
getById
tag
untag
approveBuild
unApproveBuild

Api

MethodDescription
getApiBuilds
getApiBuildTags
getApiSdks
getApiDocs
createApi
getApis
searchApis
getApiById
updateApi
removeApi
getApiMembers
getApiByOrgSlugAndApiSlug

Org

MethodDescription
createOrg
getOrgsByCurrentUser
searchOrgs
getOrgById
updateOrg
removeOrg
getApisByOrg
getPaymentsByOrg
getArtifactsByOrg
getDocsByOrg

OrgMember

MethodDescription
createMember
getByOrgId
updateMember
removeMember
leaveOrg
enableAllMembers
disableAllMembers

Artifact

MethodDescription
createArtifact
getArtifacts
getArtifactStatuses
getArtifactById
removeArtifact

Sdk

MethodDescription
createSdk
findSdks
getSdkById
removeSdk

Doc

MethodDescription
getApprovedByOrgSlugAndApiSlug
getAllApprovedByOrgSlugAndApiSlug
createDoc
findDocs
approve
unapprove
getDocById
removeDoc
updateDoc
getDownloadUrl

User

MethodDescription
getCurrentUser
createUser
getUsers
getUserById
updateUser
removeUser
updateEmailSubscription
getUserOrgs
getUserApis

Auth

MethodDescription
signup
login
googleLogin
logout
refreshToken
refreshGoogleToken
resetPassword
oneTimeLogin
changePassword
verifyEmail
resendVerificationEmail

Token

MethodDescription
createToken
findTokensByUserId
getTokenById
removeToken

OrgPlan

MethodDescription
getOrgPlanHistory
updateOrgPlan
getStripePaymentPortalUrl

Stripe

MethodDescription
stripeWebhook

HealthCheck

MethodDescription
healthCheckControllerCheck

Event

MethodDescription
track

Invitation

MethodDescription
createInvite
acceptInvite
declineInvite
inviteCode
getInvitesByUser

Tags

MethodDescription
create
search

All Methods

createBuild

  • HTTP Method: POST
  • Endpoint: /builds

Required Parameters

NameTypeDescription
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

BuildResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = {};
  const result = await sdk.build.createBuild(input);
  console.log(result);
})();

getBuilds

  • HTTP Method: GET
  • Endpoint: /builds

Required Parameters

NameTypeDescription
offsetnumber
limitnumber
apiIdnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

PaginatedBuildResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.build.getBuilds(
    -92797527.72008196,
    -87355212.37740791,
    66012473.163416356,
  );
  console.log(result);
})();

buildSdk

  • HTTP Method: POST
  • Endpoint: /builds/sdk

Required Parameters

NameTypeDescription
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

BuildResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = {};
  const result = await sdk.build.buildSdk(input);
  console.log(result);
})();

buildDoc

  • HTTP Method: POST
  • Endpoint: /builds/doc

Required Parameters

NameTypeDescription
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

BuildResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = {
    apiId: 1,
    openApiUrl:
      'https://dev-order-bucket.s3.amazonaws.com/specs/doc-specs/alpaca-broker+api_api_1.0.0.json',
  };
  const result = await sdk.build.buildDoc(input);
  console.log(result);
})();

getBuildStatuses

  • HTTP Method: GET
  • Endpoint: /builds/statuses

Required Parameters

NameTypeDescription

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

BuildGetBuildStatuses200Response

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.build.getBuildStatuses();
  console.log(result);
})();

getById

  • HTTP Method: GET
  • Endpoint: /builds/{id}

Required Parameters

NameTypeDescription
idnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

BuildResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.build.getById(41199098.61400798);
  console.log(result);
})();

tag

  • HTTP Method: POST
  • Endpoint: /builds/{buildId}/tag/{tagId}

Required Parameters

NameTypeDescription
buildIdnumber
tagIdnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

Returns a dict object.

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.build.tag(-36768384.26130571, -53445914.40915707);
  console.log(result);
})();

untag

  • HTTP Method: POST
  • Endpoint: /builds/{buildId}/untag/{tagId}

Required Parameters

NameTypeDescription
buildIdnumber
tagIdnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

Returns a dict object.

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.build.untag(49513979.63810074, -10694743.066546187);
  console.log(result);
})();

approveBuild

  • HTTP Method: PATCH
  • Endpoint: /builds/{buildId}/approve

Required Parameters

NameTypeDescription
buildIdnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

Returns a dict object.

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.build.approveBuild(86287907.07935327);
  console.log(result);
})();

unApproveBuild

  • HTTP Method: PATCH
  • Endpoint: /builds/{buildId}/unapprove

Required Parameters

NameTypeDescription
buildIdnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

Returns a dict object.

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.build.unApproveBuild(-56456573.726119295);
  console.log(result);
})();

getApiBuilds

  • HTTP Method: GET
  • Endpoint: /apis/{id}/builds

Required Parameters

NameTypeDescription
idnumber
offsetnumber
limitnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription
sortBystring
directionstring
statusesstring[]
tagsnumber[]
createdByIdsnumber[]

Return Type

PaginatedBuildResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.api.getApiBuilds(
    22205693.054521352,
    64057123.119157046,
    -49227260.29201301,
    {
      sortBy: 'status',
      direction: 'asc',
      statuses: ['IN_PROGRESS', 'FAILURE'],
      tags: [12744054.342116714, -14079166.762994215],
      createdByIds: [6166550.733509362, 54455239.52219173],
    },
  );
  console.log(result);
})();

getApiBuildTags

  • HTTP Method: GET
  • Endpoint: /apis/{id}/builds/tags

Required Parameters

NameTypeDescription
idnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

ApiGetApiBuildTags200Response

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.api.getApiBuildTags(-41965245.443966605);
  console.log(result);
})();

getApiSdks

  • HTTP Method: GET
  • Endpoint: /apis/{id}/sdks

Required Parameters

NameTypeDescription
idnumber
offsetnumber
limitnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription
statusesstring[]
tagsnumber[]
createdByIdsnumber[]
languagesstring[]
sortBystring
directionstring

Return Type

PaginatedSdkResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.api.getApiSdks(
    16579249.013658658,
    22145110.66287233,
    18845762.451870486,
    {
      statuses: ['IN_PROGRESS', 'FAIL'],
      tags: [81505170.16332412, -92747280.02023864],
      createdByIds: [13505489.63327612, 85081450.55597883],
      languages: ['JAVA', 'JAVA'],
      sortBy: 'version',
      direction: 'asc',
    },
  );
  console.log(result);
})();

getApiDocs

  • HTTP Method: GET
  • Endpoint: /apis/{id}/docs

Required Parameters

NameTypeDescription
idnumber
offsetnumber
limitnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription
sortBystring
directionstring
statusesstring[]
tagsnumber[]
createdByIdsnumber[]

Return Type

PaginatedDocResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.api.getApiDocs(26277037.34625779, 86467651.02327919, 53523791.91218585, {
    sortBy: 'status',
    direction: 'asc',
    statuses: ['FAIL', 'IN_PROGRESS'],
    tags: [-7249161.601562947, -24605171.50431624],
    createdByIds: [-81441302.37896761, -54991807.48381396],
  });
  console.log(result);
})();

createApi

  • HTTP Method: POST
  • Endpoint: /apis

Required Parameters

NameTypeDescription
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

ApiResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = {};
  const result = await sdk.api.createApi(input);
  console.log(result);
})();

getApis

  • HTTP Method: GET
  • Endpoint: /apis

Required Parameters

NameTypeDescription
orgIdnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

ApiGetApis200Response

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.api.getApis(61461469.62082398);
  console.log(result);
})();

searchApis

  • HTTP Method: GET
  • Endpoint: /apis/search

Required Parameters

NameTypeDescription
offsetnumber
limitnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription
namestring

Return Type

PaginatedApiResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.api.searchApis(51745467.35814661, 9268201.077524692, {
    name: 'sunt ut incididunt id fugiat',
  });
  console.log(result);
})();

getApiById

  • HTTP Method: GET
  • Endpoint: /apis/{id}

Required Parameters

NameTypeDescription
idnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

ApiResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.api.getApiById(-11621421.27476646);
  console.log(result);
})();

updateApi

  • HTTP Method: PATCH
  • Endpoint: /apis/{id}

Required Parameters

NameTypeDescription
idnumber
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

ApiResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = { name: 'My api name', version: '1.0.1' };
  const result = await sdk.api.updateApi(input, -21061252.476865098);
  console.log(result);
})();

removeApi

  • HTTP Method: DELETE
  • Endpoint: /apis/{id}

Required Parameters

NameTypeDescription
idnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

Returns a dict object.

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.api.removeApi(-85574418.13420907);
  console.log(result);
})();

getApiMembers

  • HTTP Method: GET
  • Endpoint: /apis/{id}/members

Required Parameters

NameTypeDescription
idnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

ApiGetApiMembers200Response

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.api.getApiMembers(70904.88629692793);
  console.log(result);
})();

getApiByOrgSlugAndApiSlug

  • HTTP Method: GET
  • Endpoint: /apis/{orgSlug}/{apiSlug}

Required Parameters

NameTypeDescription
orgSlugstring
apiSlugstring

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

ApiGetApiByOrgSlugAndApiSlug200Response

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.api.getApiByOrgSlugAndApiSlug('minim nostrud consequat', 'in tempor');
  console.log(result);
})();

createOrg

  • HTTP Method: POST
  • Endpoint: /orgs

Required Parameters

NameTypeDescription
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

OrgResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = {
    description: 'Example Org Description',
    domain: 'business.com',
    name: 'Example Org',
    website: 'https://example.com',
  };
  const result = await sdk.org.createOrg(input);
  console.log(result);
})();

getOrgsByCurrentUser

  • HTTP Method: GET
  • Endpoint: /orgs

Required Parameters

NameTypeDescription
offsetnumber
limitnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

PaginatedOrgResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.org.getOrgsByCurrentUser(32001755.21547854, 73819077.60901365);
  console.log(result);
})();

searchOrgs

  • HTTP Method: GET
  • Endpoint: /orgs/search

Required Parameters

NameTypeDescription
offsetnumber
limitnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription
websitestring
domainstring
namestring

Return Type

PaginatedOrgResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.org.searchOrgs(52167004.06944272, 70238213.16866887, {
    website: 'ut',
    domain: 'do',
    name: 'enim',
  });
  console.log(result);
})();

getOrgById

  • HTTP Method: GET
  • Endpoint: /orgs/{id}

Required Parameters

NameTypeDescription
idnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

OrgResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.org.getOrgById(840019.7294096202);
  console.log(result);
})();

updateOrg

  • HTTP Method: PATCH
  • Endpoint: /orgs/{id}

Required Parameters

NameTypeDescription
idnumber
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

OrgResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = {
    description: 'Example Org Description',
    domain: 'example.com',
    isAllowedForBeta: true,
    name: 'Example Org',
    website: 'https://example.com',
  };
  const result = await sdk.org.updateOrg(input, 90791424.48698822);
  console.log(result);
})();

removeOrg

  • HTTP Method: DELETE
  • Endpoint: /orgs/{id}

Required Parameters

NameTypeDescription
idnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

Returns a dict object.

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.org.removeOrg(-43429114.39871675);
  console.log(result);
})();

getApisByOrg

  • HTTP Method: GET
  • Endpoint: /orgs/{id}/apis

Required Parameters

NameTypeDescription
idnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

OrgGetApisByOrg200Response

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.org.getApisByOrg(-50524842.4553566);
  console.log(result);
})();

getPaymentsByOrg

  • HTTP Method: GET
  • Endpoint: /orgs/{id}/payments

Required Parameters

NameTypeDescription
idnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

OrgGetPaymentsByOrg200Response

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.org.getPaymentsByOrg(-94544209.37441395);
  console.log(result);
})();

getArtifactsByOrg

  • HTTP Method: GET
  • Endpoint: /orgs/{id}/artifacts

Required Parameters

NameTypeDescription
idnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

OrgGetArtifactsByOrg200Response

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.org.getArtifactsByOrg(-67394255.09455109);
  console.log(result);
})();

getDocsByOrg

  • HTTP Method: GET
  • Endpoint: /orgs/{id}/docs

Required Parameters

NameTypeDescription
idnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

OrgGetDocsByOrg200Response

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.org.getDocsByOrg(757686.770453155);
  console.log(result);
})();

createMember

  • HTTP Method: POST
  • Endpoint: /orgs/{orgId}/members

Required Parameters

NameTypeDescription
orgIdnumber
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

OrgMemberResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = { role: 'MEMBER', userId: 1 };
  const result = await sdk.orgMember.createMember(input, -30862262.715245724);
  console.log(result);
})();

getByOrgId

  • HTTP Method: GET
  • Endpoint: /orgs/{orgId}/members

Required Parameters

NameTypeDescription
orgIdnumber
offsetnumber
limitnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

PaginatedOrgMemberResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.orgMember.getByOrgId(
    -80697853.68252468,
    10840823.284781024,
    -58606657.2289603,
  );
  console.log(result);
})();

updateMember

  • HTTP Method: PATCH
  • Endpoint: /orgs/{orgId}/members/{memberId}

Required Parameters

NameTypeDescription
memberIdnumber
orgIdnumber
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

OrgMemberResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = { role: 'MEMBER' };
  const result = await sdk.orgMember.updateMember(input, -61902276.028146155, -84210384.21471705);
  console.log(result);
})();

removeMember

  • HTTP Method: DELETE
  • Endpoint: /orgs/{orgId}/members/{memberId}

Required Parameters

NameTypeDescription
memberIdnumber
orgIdnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

Returns a dict object.

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.orgMember.removeMember(-78640836.51192254, 94371985.61236194);
  console.log(result);
})();

leaveOrg

  • HTTP Method: DELETE
  • Endpoint: /orgs/{orgId}/leave

Required Parameters

NameTypeDescription
orgIdnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

Returns a dict object.

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.orgMember.leaveOrg(-10648713.841545641);
  console.log(result);
})();

enableAllMembers

  • HTTP Method: PATCH
  • Endpoint: /orgs/{orgId}/enable

Required Parameters

NameTypeDescription
orgIdnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

UpdateManyOrgMembersResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.orgMember.enableAllMembers(51493055.69796786);
  console.log(result);
})();

disableAllMembers

  • HTTP Method: PATCH
  • Endpoint: /orgs/{orgId}/disable

Required Parameters

NameTypeDescription
orgIdnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

UpdateManyOrgMembersResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.orgMember.disableAllMembers(11665397.63553676);
  console.log(result);
})();

createArtifact

  • HTTP Method: POST
  • Endpoint: /artifacts

Required Parameters

NameTypeDescription
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

ArtifactResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = {
    artifactType: 'DOC',
    bucketKey: 'sunt in deserunt cupidatat anim',
    bucketName: 'Excepteur sit labore commodo aliqua',
    buildId: 1,
    status: 'SUCCESS',
  };
  const result = await sdk.artifact.createArtifact(input);
  console.log(result);
})();

getArtifacts

  • HTTP Method: GET
  • Endpoint: /artifacts

Required Parameters

NameTypeDescription
buildIdnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

ArtifactGetArtifacts200Response

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.artifact.getArtifacts(48029445.343793005);
  console.log(result);
})();

getArtifactStatuses

  • HTTP Method: GET
  • Endpoint: /artifacts/statuses

Required Parameters

NameTypeDescription

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

ArtifactGetArtifactStatuses200Response

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.artifact.getArtifactStatuses();
  console.log(result);
})();

getArtifactById

  • HTTP Method: GET
  • Endpoint: /artifacts/{id}

Required Parameters

NameTypeDescription
idnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

ArtifactResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.artifact.getArtifactById(-75990829.37032619);
  console.log(result);
})();

removeArtifact

  • HTTP Method: DELETE
  • Endpoint: /artifacts/{id}

Required Parameters

NameTypeDescription
idnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

Returns a dict object.

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.artifact.removeArtifact(-31568934.112132713);
  console.log(result);
})();

createSdk

  • HTTP Method: POST
  • Endpoint: /sdks

Required Parameters

NameTypeDescription
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

SdkResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = {
    artifactId: 1,
    fileLocation: 'https://my-file.location',
    language: 'JAVA',
    version: '1.0.0',
  };
  const result = await sdk.sdk.createSdk(input);
  console.log(result);
})();

findSdks

  • HTTP Method: GET
  • Endpoint: /sdks

Required Parameters

NameTypeDescription
offsetnumber
limitnumber
artifactIdnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription
sortBystring
directionstring

Return Type

PaginatedSdkResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.sdk.findSdks(40264939.76345137, -60824421.95911195, -46495729.14239424, {
    sortBy: 'version',
    direction: 'asc',
  });
  console.log(result);
})();

getSdkById

  • HTTP Method: GET
  • Endpoint: /sdks/{id}

Required Parameters

NameTypeDescription
idnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

SdkResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.sdk.getSdkById(23423654.035799757);
  console.log(result);
})();

removeSdk

  • HTTP Method: DELETE
  • Endpoint: /sdks/{id}

Required Parameters

NameTypeDescription
idnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

Returns a dict object.

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.sdk.removeSdk(-95002555.84177597);
  console.log(result);
})();

getApprovedByOrgSlugAndApiSlug

  • HTTP Method: GET
  • Endpoint: /docs/approved

Required Parameters

NameTypeDescription
orgSlugstring

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription
apiSlugstring
apiVersionstring

Return Type

DocResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.doc.getApprovedByOrgSlugAndApiSlug('ad occaecat', {
    apiSlug: 'in nulla',
    apiVersion: 'irure nulla',
  });
  console.log(result);
})();

getAllApprovedByOrgSlugAndApiSlug

  • HTTP Method: GET
  • Endpoint: /docs/approved/all

Required Parameters

NameTypeDescription
orgSlugstring

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription
apiSlugstring
apiVersionstring

Return Type

DocGetAllApprovedByOrgSlugAndApiSlug200Response

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.doc.getAllApprovedByOrgSlugAndApiSlug('et ipsum', {
    apiSlug: 'ex laboris enim elit',
    apiVersion: 'sunt occaecat amet in laboris',
  });
  console.log(result);
})();

createDoc

  • HTTP Method: POST
  • Endpoint: /docs

Required Parameters

NameTypeDescription
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

DocCreatedResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = {
    apiId: -54253295.78056344,
    artifactId: 1,
    fileLocation: 'https://example.com',
    previewSlug: 'ea adipisicing dolor in pariatur',
    version: '1.0.0',
  };
  const result = await sdk.doc.createDoc(input);
  console.log(result);
})();

findDocs

  • HTTP Method: GET
  • Endpoint: /docs

Required Parameters

NameTypeDescription
offsetnumber
limitnumber
artifactIdnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

PaginatedDocResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.doc.findDocs(
    -34239367.135346964,
    -8400912.049773797,
    18747632.850284114,
  );
  console.log(result);
})();

approve

  • HTTP Method: POST
  • Endpoint: /docs/{previewSlug}/approve

Required Parameters

NameTypeDescription
previewSlugstring

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

DocResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.doc.approve('dolor amet in');
  console.log(result);
})();

unapprove

  • HTTP Method: POST
  • Endpoint: /docs/{previewSlug}/unapprove

Required Parameters

NameTypeDescription
previewSlugstring

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

DocResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.doc.unapprove('nulla ut');
  console.log(result);
})();

getDocById

  • HTTP Method: GET
  • Endpoint: /docs/{id}

Required Parameters

NameTypeDescription
idnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

DocResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.doc.getDocById(66763732.26051009);
  console.log(result);
})();

removeDoc

  • HTTP Method: DELETE
  • Endpoint: /docs/{id}

Required Parameters

NameTypeDescription
idnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

Returns a dict object.

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.doc.removeDoc(70790137.04625073);
  console.log(result);
})();

updateDoc

  • HTTP Method: PUT
  • Endpoint: /docs/{id}

Required Parameters

NameTypeDescription
idnumber
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

DocResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = { fileLocation: 'https://example.com', version: '1.0.0' };
  const result = await sdk.doc.updateDoc(input, -54381780.738916904);
  console.log(result);
})();

getDownloadUrl

  • HTTP Method: GET
  • Endpoint: /docs/{id}/getDownloadUrl

Required Parameters

NameTypeDescription
idnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

DocDownloadResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.doc.getDownloadUrl(-14370642.845514908);
  console.log(result);
})();

getCurrentUser

  • HTTP Method: GET
  • Endpoint: /users/current-user

Required Parameters

NameTypeDescription

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

UserResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.user.getCurrentUser();
  console.log(result);
})();

createUser

  • HTTP Method: POST
  • Endpoint: /users

Required Parameters

NameTypeDescription
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

UserResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = {
    email: 'someone@example.com',
    firstName: 'John',
    lastName: 'Doe',
    password: 'Password123!',
  };
  const result = await sdk.user.createUser(input);
  console.log(result);
})();

getUsers

  • HTTP Method: GET
  • Endpoint: /users

Required Parameters

NameTypeDescription
offsetnumber
limitnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription
orgIdnumber
emailstring
firstNamestring
lastNamestring

Return Type

PaginatedUserResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.user.getUsers(-5554132.173764974, -71735353.64462076, {
    orgId: 333091.3040544987,
    email: 'do nostrud ullamco',
    firstName: 'fugiat enim in ea pariatur',
    lastName: 'aliquip nostrud',
  });
  console.log(result);
})();

getUserById

  • HTTP Method: GET
  • Endpoint: /users/{id}

Required Parameters

NameTypeDescription
idnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

UserResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.user.getUserById(64835693.49284321);
  console.log(result);
})();

updateUser

  • HTTP Method: PATCH
  • Endpoint: /users/{id}

Required Parameters

NameTypeDescription
idnumber
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

UserResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = {
    email: 'someone@example.com',
    firstName: 'John',
    isEnabled: true,
    isLiblabAdmin: true,
    lastName: 'Doe',
    refreshTokenHash: 'refreshTokenHash',
  };
  const result = await sdk.user.updateUser(input, 20802518.70346421);
  console.log(result);
})();

removeUser

  • HTTP Method: DELETE
  • Endpoint: /users/{id}

Required Parameters

NameTypeDescription
idnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

Returns a dict object.

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.user.removeUser(-36864653.94294047);
  console.log(result);
})();

updateEmailSubscription

  • HTTP Method: PATCH
  • Endpoint: /users/emails/subscriptions

Required Parameters

NameTypeDescription
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

Returns a dict object.

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = { isSubscribedToEmails: true };
  const result = await sdk.user.updateEmailSubscription(input);
  console.log(result);
})();

getUserOrgs

  • HTTP Method: GET
  • Endpoint: /users/orgs

Required Parameters

NameTypeDescription
offsetnumber
limitnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

PaginatedOrgResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.user.getUserOrgs(6916076.193201974, -1333102.0013689846);
  console.log(result);
})();

getUserApis

  • HTTP Method: GET
  • Endpoint: /users/apis

Required Parameters

NameTypeDescription

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

UserGetUserApis200Response

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.user.getUserApis();
  console.log(result);
})();

signup

  • HTTP Method: POST
  • Endpoint: /auth/signup

Required Parameters

NameTypeDescription
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

UserResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = { email: 'someone@example.com', password: 'Password123!' };
  const result = await sdk.auth.signup(input);
  console.log(result);
})();

login

  • HTTP Method: POST
  • Endpoint: /auth/login

Required Parameters

NameTypeDescription
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

AuthTokenResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = { email: 'someone@example.com', password: 'Password123!' };
  const result = await sdk.auth.login(input);
  console.log(result);
})();

googleLogin

  • HTTP Method: POST
  • Endpoint: /auth/login/google

Required Parameters

NameTypeDescription
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

AuthTokenResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = { authCode: '4/0AZEOvhVfyMNU2NW45VW......' };
  const result = await sdk.auth.googleLogin(input);
  console.log(result);
})();

logout

  • HTTP Method: POST
  • Endpoint: /auth/logout

Required Parameters

NameTypeDescription

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

Returns a dict object.

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.auth.logout();
  console.log(result);
})();

refreshToken

  • HTTP Method: POST
  • Endpoint: /auth/refresh-jwt

Required Parameters

NameTypeDescription
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

AuthTokenResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = { refreshToken: 'refreshToken' };
  const result = await sdk.auth.refreshToken(input);
  console.log(result);
})();

refreshGoogleToken

  • HTTP Method: POST
  • Endpoint: /auth/refresh-jwt/google

Required Parameters

NameTypeDescription
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

AuthTokenResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = { refreshToken: 'refreshToken' };
  const result = await sdk.auth.refreshGoogleToken(input);
  console.log(result);
})();

resetPassword

  • HTTP Method: POST
  • Endpoint: /auth/reset-password

Required Parameters

NameTypeDescription
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

Returns a dict object.

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = { email: 'someone@example.com' };
  const result = await sdk.auth.resetPassword(input);
  console.log(result);
})();

oneTimeLogin

  • HTTP Method: POST
  • Endpoint: /auth/one-time-login

Required Parameters

NameTypeDescription
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

AuthTokenResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = { code: 'code', email: 'someone@example.com' };
  const result = await sdk.auth.oneTimeLogin(input);
  console.log(result);
})();

changePassword

  • HTTP Method: POST
  • Endpoint: /auth/change-password

Required Parameters

NameTypeDescription
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

AuthTokenResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = { password: 'Password123!' };
  const result = await sdk.auth.changePassword(input);
  console.log(result);
})();

verifyEmail

  • HTTP Method: POST
  • Endpoint: /auth/verify-email

Required Parameters

NameTypeDescription
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

Returns a dict object.

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = { code: 'code', email: 'someone@example.com' };
  const result = await sdk.auth.verifyEmail(input);
  console.log(result);
})();

resendVerificationEmail

  • HTTP Method: POST
  • Endpoint: /auth/resend-verify-email

Required Parameters

NameTypeDescription
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

Returns a dict object.

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = { email: 'someone@example.com' };
  const result = await sdk.auth.resendVerificationEmail(input);
  console.log(result);
})();

createToken

  • HTTP Method: POST
  • Endpoint: /auth/tokens

Required Parameters

NameTypeDescription
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

CreateTokenResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = {
    expiresAt: '2023-07-31T15:50:28.0Z',
    name: 'My token',
    scope: ['API', 'DOC', 'SDK', 'BUILD', 'ARTIFACT', 'ORG'],
  };
  const result = await sdk.token.createToken(input);
  console.log(result);
})();

findTokensByUserId

  • HTTP Method: GET
  • Endpoint: /auth/tokens

Required Parameters

NameTypeDescription
userIdnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

TokenFindTokensByUserId200Response

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.token.findTokensByUserId(-68291047.3990189);
  console.log(result);
})();

getTokenById

  • HTTP Method: GET
  • Endpoint: /auth/tokens/{id}

Required Parameters

NameTypeDescription
idnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

GetTokenResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.token.getTokenById(-26561402.609074578);
  console.log(result);
})();

removeToken

  • HTTP Method: DELETE
  • Endpoint: /auth/tokens/{id}

Required Parameters

NameTypeDescription
idnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

Returns a dict object.

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.token.removeToken(-16115439.851338029);
  console.log(result);
})();

getOrgPlanHistory

  • HTTP Method: GET
  • Endpoint: /orgs/{orgId}/plans

Required Parameters

NameTypeDescription
orgIdnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

OrgPlanGetOrgPlanHistory200Response

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.orgPlan.getOrgPlanHistory(-8723944.282117471);
  console.log(result);
})();

updateOrgPlan

  • HTTP Method: PUT
  • Endpoint: /orgs/{orgId}/plans

Required Parameters

NameTypeDescription
orgIdnumber
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

OrgPlanResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = { plan: 'COMMUNITY' };
  const result = await sdk.orgPlan.updateOrgPlan(input, -308647.74569261074);
  console.log(result);
})();

getStripePaymentPortalUrl

  • HTTP Method: GET
  • Endpoint: /orgs/{orgId}/payment-portal

Required Parameters

NameTypeDescription
orgIdnumber
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

OrgPaymentPortalResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = { returnUrl: 'https://app.liblab.com/' };
  const result = await sdk.orgPlan.getStripePaymentPortalUrl(input, 7644641.634921312);
  console.log(result);
})();

stripeWebhook

  • HTTP Method: POST
  • Endpoint: /stripe/webhook

Required Parameters

NameTypeDescription
stripeSignaturestring

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

Returns a dict object.

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.stripe.stripeWebhook('in qui');
  console.log(result);
})();

healthCheckControllerCheck

  • HTTP Method: GET
  • Endpoint: /health-check

Required Parameters

NameTypeDescription

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

HealthCheckResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.healthCheck.healthCheckControllerCheck();
  console.log(result);
})();

track

  • HTTP Method: POST
  • Endpoint: /events

Required Parameters

NameTypeDescription
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

Returns a dict object.

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = { metadata: { foo: 'bar' }, name: 'my-event', userToken: 'proident et est' };
  const result = await sdk.event.track(input);
  console.log(result);
})();

createInvite

  • HTTP Method: POST
  • Endpoint: /invitations/org/{orgId}

Required Parameters

NameTypeDescription
orgIdnumber
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

InvitationResponse InvitationResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = { email: 'someone@example.com', name: 'John Doe', role: 'MEMBER' };
  const result = await sdk.invitation.createInvite(input, -64549497.32753512);
  console.log(result);
})();

acceptInvite

  • HTTP Method: PATCH
  • Endpoint: /invitations/accept/{inviteCode}

Required Parameters

NameTypeDescription
inviteCodestring

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

Returns a dict object.

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.invitation.acceptInvite('ad');
  console.log(result);
})();

declineInvite

  • HTTP Method: PATCH
  • Endpoint: /invitations/decline/{inviteCode}

Required Parameters

NameTypeDescription
inviteCodestring

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

Returns a dict object.

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.invitation.declineInvite('consequat ut enim');
  console.log(result);
})();

inviteCode

  • HTTP Method: GET
  • Endpoint: /invitations/{inviteCode}

Required Parameters

NameTypeDescription
inviteCodestring

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

InvitationResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.invitation.inviteCode('ut');
  console.log(result);
})();

getInvitesByUser

  • HTTP Method: GET
  • Endpoint: /invitations

Required Parameters

NameTypeDescription
offsetnumber
limitnumber

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

InvitationGetInvitesByUser200Response

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.invitation.getInvitesByUser(86272607.76006693, -22887840.719514772);
  console.log(result);
})();

create

  • HTTP Method: POST
  • Endpoint: /tags

Required Parameters

NameTypeDescription
inputobjectRequest body.

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

TagResponse

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const input = { name: 'tag' };
  const result = await sdk.tags.create(input);
  console.log(result);
})();

  • HTTP Method: GET
  • Endpoint: /tags

Required Parameters

NameTypeDescription
offsetnumber
limitnumber
searchQuerystring

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

NameTypeDescription

Return Type

TagsSearch200Response

Example Usage Code Snippet

import { Liblab } from './src';

const sdk = new Liblab();

(async () => {
  const result = await sdk.tags.search(40540772.60587144, 81101596.1555675, 'reprehenderit');
  console.log(result);
})();

FAQs

Package last updated on 31 Jul 2023

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

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