Liblab Typescript SDK 0.0.53
The Typescript SDK for Liblab.
- API version: 0.0.53
- SDK version: 0.0.53
Table of Contents
Installation
npm install sdk
Authentication
To see whether an endpoint needs a specific type of authentication check the endpoint's documentation.
Access Authentication with Refresh Tokens
The Liblab API uses access tokens for authentication, but these access tokens have a short expiration time. Refresh tokens have longer duration, and they have the ability to obtain new access tokens.
The access and refresh token can be set when initializing the SDK like this:
sdk = new Liblab('YOUR_REFRESH_TOKEN', 'YOUR_ACCESS_TOKEN')
Or at a later stage:
sdk = new Liblab()
sdk.setAccessToken('YOUR_ACCESS_TOKEN');
sdk.setRefreshToken('YOUR_REFRESH_TOKEN');
After the refresh token has been set, the SDK will automatically refresh the access 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({ refreshToken: process.env.LIBLAB_REFRESH_TOKEN, accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(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
Api
Org
OrgMember
Artifact
Sdk
Doc
User
Auth
Token
OrgPlan
Stripe
HealthCheck
Event
Invitation
Tags
Ai
All Methods
createBuild
- HTTP Method: POST
- Endpoint: /builds
Required Parameters
| input | object | Request body. |
Return Type
BuildResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const input = {};
const result = await sdk.build.createBuild(input);
console.log(result);
})();
getBuilds
- HTTP Method: GET
- Endpoint: /builds
Required Parameters
Name | Type | Description |
---|
offset | number | |
limit | number | |
orgId | number | |
apiSlug | string | |
Return Type
PaginatedBuildResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.build.getBuilds(
87187502.64244527,
81318122.49465513,
79806754.14759645,
'apiSlug',
);
console.log(result);
})();
buildSdk
- HTTP Method: POST
- Endpoint: /builds/sdk
Required Parameters
| input | object | Request body. |
Return Type
BuildResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const input = {};
const result = await sdk.build.buildSdk(input);
console.log(result);
})();
buildDoc
- HTTP Method: POST
- Endpoint: /builds/doc
Required Parameters
| input | object | Request body. |
Return Type
BuildResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(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
Return Type
GetBuildStatusesResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.build.getBuildStatuses();
console.log(result);
})();
getById
- HTTP Method: GET
- Endpoint: /builds/{id}
Required Parameters
Name | Type | Description |
---|
id | number | |
Return Type
BuildResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.build.getById(47128503.24661845);
console.log(result);
})();
tag
- HTTP Method: POST
- Endpoint: /builds/{buildId}/tag/{tagId}
Required Parameters
Name | Type | Description |
---|
buildId | number | |
tagId | number | |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.build.tag(89527670.37999773, -26263140.080386505);
console.log(result);
})();
untag
- HTTP Method: POST
- Endpoint: /builds/{buildId}/untag/{tagId}
Required Parameters
Name | Type | Description |
---|
buildId | number | |
tagId | number | |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.build.untag(-58952627.29017623, 6920191.850738406);
console.log(result);
})();
approveBuild
- HTTP Method: PATCH
- Endpoint: /builds/{buildId}/approve
Required Parameters
Name | Type | Description |
---|
buildId | number | |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.build.approveBuild(-12374167.472953886);
console.log(result);
})();
unApproveBuild
- HTTP Method: PATCH
- Endpoint: /builds/{buildId}/unapprove
Required Parameters
Name | Type | Description |
---|
buildId | number | |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.build.unApproveBuild(-94539666.35632902);
console.log(result);
})();
getApiBuilds
- HTTP Method: GET
- Endpoint: /apis/{id}/builds
Required Parameters
Name | Type | Description |
---|
id | number | |
offset | number | |
limit | number | |
Optional Parameters
Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
Name | Type | Description |
---|
sortBy | SortBy | |
direction | Direction | |
statuses | string[] | |
tags | number[] | |
createdByIds | number[] | |
Return Type
PaginatedBuildResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.api.getApiBuilds(
17905065.440249905,
-26463966.23818314,
-70834161.56310144,
{
sortBy: 'startTime',
direction: 'asc',
statuses: ['FAILURE', 'FAILURE'],
tags: [87176333.89020208, -69303592.38225305],
createdByIds: [-5332508.289275676, -41169213.481122434],
},
);
console.log(result);
})();
getApiBuildTags
- HTTP Method: GET
- Endpoint: /apis/{id}/builds/tags
Required Parameters
Name | Type | Description |
---|
id | number | |
Return Type
GetApiBuildTagsResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.api.getApiBuildTags(-4584496.444724932);
console.log(result);
})();
getApiSdks
- HTTP Method: GET
- Endpoint: /apis/{id}/sdks
Required Parameters
Name | Type | Description |
---|
id | number | |
offset | number | |
limit | number | |
Optional Parameters
Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
Name | Type | Description |
---|
statuses | string[] | |
tags | number[] | |
createdByIds | number[] | |
languages | string[] | |
sortBy | ApiSortBy | |
direction | Direction | |
Return Type
PaginatedSdkResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.api.getApiSdks(
73122785.7019518,
-84487087.61642112,
59033418.244484305,
{
statuses: ['SUCCESS', 'FAIL'],
tags: [-26573213.423745304, -90606303.1774881],
createdByIds: [50282726.9731735, -61094777.28312913],
languages: ['JAVA', 'TYPESCRIPT'],
sortBy: 'status',
direction: 'asc',
},
);
console.log(result);
})();
getApiDocs
- HTTP Method: GET
- Endpoint: /apis/{id}/docs
Required Parameters
Name | Type | Description |
---|
id | number | |
offset | number | |
limit | number | |
Optional Parameters
Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
Name | Type | Description |
---|
sortBy | ApiSortBy | |
direction | Direction | |
statuses | string[] | |
tags | number[] | |
createdByIds | number[] | |
Return Type
PaginatedDocResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.api.getApiDocs(
20746668.26828544,
49395375.969620496,
-21405571.589132458,
{
sortBy: 'status',
direction: 'asc',
statuses: ['IN_PROGRESS', 'IN_PROGRESS'],
tags: [19615129.347925693, 98413242.33112702],
createdByIds: [-21651858.876306385, -46712576.00450676],
},
);
console.log(result);
})();
createApi
- HTTP Method: POST
- Endpoint: /apis
Required Parameters
| input | object | Request body. |
Return Type
ApiResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const input = {};
const result = await sdk.api.createApi(input);
console.log(result);
})();
getApis
- HTTP Method: GET
- Endpoint: /apis
Required Parameters
Name | Type | Description |
---|
orgId | number | |
Return Type
GetApisResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.api.getApis(95672603.8864089);
console.log(result);
})();
searchApis
- HTTP Method: GET
- Endpoint: /apis/search
Required Parameters
Name | Type | Description |
---|
offset | number | |
limit | number | |
Optional Parameters
Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
Name | Type | Description |
---|
name | string | |
Return Type
PaginatedApiResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.api.searchApis(50771868.1112085, -40390148.36022523, { name: 'name' });
console.log(result);
})();
getApiById
- HTTP Method: GET
- Endpoint: /apis/{id}
Required Parameters
Name | Type | Description |
---|
id | number | |
Return Type
ApiResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.api.getApiById(78681038.24273384);
console.log(result);
})();
updateApi
- HTTP Method: PATCH
- Endpoint: /apis/{id}
Required Parameters
Name | Type | Description |
---|
id | number | |
input | object | Request body. |
Return Type
ApiResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const input = { name: 'My api name', version: '1.0.1' };
const result = await sdk.api.updateApi(input, -46734849.55888712);
console.log(result);
})();
removeApi
- HTTP Method: DELETE
- Endpoint: /apis/{id}
Required Parameters
Name | Type | Description |
---|
id | number | |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.api.removeApi(67810064.17038286);
console.log(result);
})();
getApiMembers
- HTTP Method: GET
- Endpoint: /apis/{id}/members
Required Parameters
Name | Type | Description |
---|
id | number | |
Return Type
GetApiMembersResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.api.getApiMembers(-5758001.445584744);
console.log(result);
})();
getApiByOrgSlugAndApiSlug
- HTTP Method: GET
- Endpoint: /apis/{orgSlug}/{apiSlug}
Required Parameters
Name | Type | Description |
---|
orgSlug | string | |
apiSlug | string | |
Return Type
GetApiByOrgSlugAndApiSlugResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.api.getApiByOrgSlugAndApiSlug('orgSlug', 'apiSlug');
console.log(result);
})();
createOrg
- HTTP Method: POST
- Endpoint: /orgs
Required Parameters
| input | object | Request body. |
Return Type
OrgResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(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
Name | Type | Description |
---|
offset | number | |
limit | number | |
Return Type
PaginatedOrgResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.org.getOrgsByCurrentUser(8912948.241767183, -91938853.86023389);
console.log(result);
})();
searchOrgs
- HTTP Method: GET
- Endpoint: /orgs/search
Required Parameters
Name | Type | Description |
---|
offset | number | |
limit | number | |
Optional Parameters
Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
Name | Type | Description |
---|
website | string | |
domain | string | |
name | string | |
Return Type
PaginatedOrgResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.org.searchOrgs(-11535367.651782557, 9719954.30992712, {
website: 'website',
domain: 'domain',
name: 'name',
});
console.log(result);
})();
getOrgById
- HTTP Method: GET
- Endpoint: /orgs/{id}
Required Parameters
Name | Type | Description |
---|
id | number | |
Return Type
OrgResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.org.getOrgById(59692172.81474215);
console.log(result);
})();
updateOrg
- HTTP Method: PATCH
- Endpoint: /orgs/{id}
Required Parameters
Name | Type | Description |
---|
id | number | |
input | object | Request body. |
Return Type
OrgResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(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, -99524144.48336323);
console.log(result);
})();
removeOrg
- HTTP Method: DELETE
- Endpoint: /orgs/{id}
Required Parameters
Name | Type | Description |
---|
id | number | |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.org.removeOrg(-54697495.77539558);
console.log(result);
})();
getApisByOrg
- HTTP Method: GET
- Endpoint: /orgs/{id}/apis
Required Parameters
Name | Type | Description |
---|
id | number | |
Return Type
GetApisByOrgResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.org.getApisByOrg(-86978193.20452113);
console.log(result);
})();
getPaymentsByOrg
- HTTP Method: GET
- Endpoint: /orgs/{id}/payments
Required Parameters
Name | Type | Description |
---|
id | number | |
Return Type
GetPaymentsByOrgResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.org.getPaymentsByOrg(54492447.95245868);
console.log(result);
})();
getArtifactsByOrg
- HTTP Method: GET
- Endpoint: /orgs/{id}/artifacts
Required Parameters
Name | Type | Description |
---|
id | number | |
offset | number | |
limit | number | |
Optional Parameters
Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
Return Type
PaginatedArtifactResponseWithTotalCount
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.org.getArtifactsByOrg(
82208090.67841151,
7489052.921281785,
79374158.86793002,
{
sortBy: 'startTime',
direction: 'asc',
artifactTypes: ['DOC', 'SDK'],
statuses: [{ imports: [] }, { imports: [] }],
createdByIds: [-50045031.73670325, 17270231.59486279],
},
);
console.log(result);
})();
getDocsByOrg
- HTTP Method: GET
- Endpoint: /orgs/{id}/docs
Required Parameters
Name | Type | Description |
---|
id | number | |
Return Type
GetDocsByOrgResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.org.getDocsByOrg(63396775.052996635);
console.log(result);
})();
getBuildByOrg
- HTTP Method: GET
- Endpoint: /orgs/{id}/builds
Required Parameters
Name | Type | Description |
---|
id | number | |
offset | number | |
limit | number | |
Optional Parameters
Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
Name | Type | Description |
---|
sortBy | SortBy | |
direction | Direction | |
statuses | string[] | |
tags | number[] | |
createdByIds | number[] | |
apiSlug | string | |
apiVersion | string | |
Return Type
PaginatedBuildWithJobsResponseWithTotalCount
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.org.getBuildByOrg(
-31057903.263684675,
23143341.068112686,
79074481.18427941,
{
sortBy: 'startTime',
direction: 'asc',
statuses: ['FAILURE', 'IN_PROGRESS'],
tags: [352626.1618615538, 58712681.560975045],
createdByIds: [57804173.814082235, 89818072.27938804],
apiSlug: 'apiSlug',
apiVersion: 'apiVersion',
},
);
console.log(result);
})();
getOrgApiBuilds
- HTTP Method: GET
- Endpoint: /orgs/{id}/api-builds
Required Parameters
Name | Type | Description |
---|
id | number | |
offset | number | |
limit | number | |
Return Type
GetOrgApiBuildsResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.org.getOrgApiBuilds(
74824163.76466858,
48002280.318362564,
94163003.02269557,
);
console.log(result);
})();
createMember
- HTTP Method: POST
- Endpoint: /orgs/{orgId}/members
Required Parameters
Name | Type | Description |
---|
orgId | number | |
input | object | Request body. |
Return Type
OrgMemberResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const input = { role: 'MEMBER', userId: 1 };
const result = await sdk.orgMember.createMember(input, 3214565.2805211544);
console.log(result);
})();
getByOrgId
- HTTP Method: GET
- Endpoint: /orgs/{orgId}/members
Required Parameters
Name | Type | Description |
---|
orgId | number | |
offset | number | |
limit | number | |
Optional Parameters
Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
Return Type
PaginatedOrgMemberResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.orgMember.getByOrgId(
61995471.51799402,
-64217112.02102958,
11460743.49416995,
{
email: 'email',
firstName: 'firstName',
lastName: 'lastName',
sortBy: 'createdAt',
direction: 'asc',
},
);
console.log(result);
})();
updateMember
- HTTP Method: PATCH
- Endpoint: /orgs/{orgId}/members/{memberId}
Required Parameters
Name | Type | Description |
---|
memberId | number | |
orgId | number | |
input | object | Request body. |
Return Type
OrgMemberResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const input = { role: 'MEMBER' };
const result = await sdk.orgMember.updateMember(input, 60138523.278197676, -8890074.819766626);
console.log(result);
})();
removeMember
- HTTP Method: DELETE
- Endpoint: /orgs/{orgId}/members/{memberId}
Required Parameters
Name | Type | Description |
---|
memberId | number | |
orgId | number | |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.orgMember.removeMember(-20989349.738103062, -66776174.7514029);
console.log(result);
})();
leaveOrg
- HTTP Method: DELETE
- Endpoint: /orgs/{orgId}/leave
Required Parameters
Name | Type | Description |
---|
orgId | number | |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.orgMember.leaveOrg(-6461591.262472585);
console.log(result);
})();
enableAllMembers
- HTTP Method: PATCH
- Endpoint: /orgs/{orgId}/enable
Required Parameters
Name | Type | Description |
---|
orgId | number | |
Return Type
UpdateManyOrgMembersResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.orgMember.enableAllMembers(2665278.160235435);
console.log(result);
})();
disableAllMembers
- HTTP Method: PATCH
- Endpoint: /orgs/{orgId}/disable
Required Parameters
Name | Type | Description |
---|
orgId | number | |
Return Type
UpdateManyOrgMembersResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.orgMember.disableAllMembers(14378056.554751992);
console.log(result);
})();
createArtifact
- HTTP Method: POST
- Endpoint: /artifacts
Required Parameters
| input | object | Request body. |
Return Type
ArtifactResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const input = {
artifactType: 'DOC',
bucketKey: 'bucketKey',
bucketName: 'bucketName',
buildId: 1,
status: 'SUCCESS',
};
const result = await sdk.artifact.createArtifact(input);
console.log(result);
})();
getArtifacts
- HTTP Method: GET
- Endpoint: /artifacts
Required Parameters
Name | Type | Description |
---|
buildId | number | |
Return Type
GetArtifactsResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.artifact.getArtifacts(78140543.870953);
console.log(result);
})();
getArtifactStatuses
- HTTP Method: GET
- Endpoint: /artifacts/statuses
Return Type
GetArtifactStatusesResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.artifact.getArtifactStatuses();
console.log(result);
})();
getArtifactById
- HTTP Method: GET
- Endpoint: /artifacts/{id}
Required Parameters
Name | Type | Description |
---|
id | number | |
Return Type
ArtifactResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.artifact.getArtifactById(1918828.2673404068);
console.log(result);
})();
removeArtifact
- HTTP Method: DELETE
- Endpoint: /artifacts/{id}
Required Parameters
Name | Type | Description |
---|
id | number | |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.artifact.removeArtifact(-76588555.04400855);
console.log(result);
})();
createSdk
- HTTP Method: POST
- Endpoint: /sdks
Required Parameters
| input | object | Request body. |
Return Type
SdkResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(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
Name | Type | Description |
---|
offset | number | |
limit | number | |
artifactId | number | |
Optional Parameters
Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
Return Type
PaginatedSdkResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.sdk.findSdks(
-18698287.794889927,
-5121253.748661652,
27076380.307431996,
{ sortBy: 'createdAt', direction: 'asc' },
);
console.log(result);
})();
getSdkById
- HTTP Method: GET
- Endpoint: /sdks/{id}
Required Parameters
Name | Type | Description |
---|
id | number | |
Return Type
SdkResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.sdk.getSdkById(35264977.49250841);
console.log(result);
})();
removeSdk
- HTTP Method: DELETE
- Endpoint: /sdks/{id}
Required Parameters
Name | Type | Description |
---|
id | number | |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.sdk.removeSdk(-12671838.525972575);
console.log(result);
})();
getApprovedByOrgSlugAndApiSlug
- HTTP Method: GET
- Endpoint: /docs/approved
Required Parameters
Name | Type | Description |
---|
orgSlug | string | |
Optional Parameters
Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
Name | Type | Description |
---|
apiSlug | string | |
apiVersion | string | |
Return Type
DocResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.doc.getApprovedByOrgSlugAndApiSlug('orgSlug', {
apiSlug: 'apiSlug',
apiVersion: 'apiVersion',
});
console.log(result);
})();
getAllApprovedByOrgSlugAndApiSlug
- HTTP Method: GET
- Endpoint: /docs/approved/all
Required Parameters
Name | Type | Description |
---|
orgSlug | string | |
Optional Parameters
Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
Name | Type | Description |
---|
apiSlug | string | |
apiVersion | string | |
Return Type
GetAllApprovedByOrgSlugAndApiSlugResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.doc.getAllApprovedByOrgSlugAndApiSlug('orgSlug', {
apiSlug: 'apiSlug',
apiVersion: 'apiVersion',
});
console.log(result);
})();
createDoc
- HTTP Method: POST
- Endpoint: /docs
Required Parameters
| input | object | Request body. |
Return Type
DocCreatedResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const input = {
apiId: 9496393.307948425,
artifactId: 1,
fileLocation: 'https://example.com',
previewSlug: 'previewSlug',
version: '1.0.0',
};
const result = await sdk.doc.createDoc(input);
console.log(result);
})();
findDocs
- HTTP Method: GET
- Endpoint: /docs
Required Parameters
Name | Type | Description |
---|
offset | number | |
limit | number | |
artifactId | number | |
Return Type
PaginatedDocResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.doc.findDocs(-83958629.66567713, 68788162.1777285, 61386895.3746683);
console.log(result);
})();
approve
- HTTP Method: POST
- Endpoint: /docs/{previewSlug}/approve
Required Parameters
Name | Type | Description |
---|
previewSlug | string | |
Return Type
DocResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.doc.approve('previewSlug');
console.log(result);
})();
unapprove
- HTTP Method: POST
- Endpoint: /docs/{previewSlug}/unapprove
Required Parameters
Name | Type | Description |
---|
previewSlug | string | |
Return Type
DocResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.doc.unapprove('previewSlug');
console.log(result);
})();
getDocById
- HTTP Method: GET
- Endpoint: /docs/{id}
Required Parameters
Name | Type | Description |
---|
id | number | |
Return Type
DocResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.doc.getDocById(73234692.12612882);
console.log(result);
})();
removeDoc
- HTTP Method: DELETE
- Endpoint: /docs/{id}
Required Parameters
Name | Type | Description |
---|
id | number | |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.doc.removeDoc(-66062358.37422929);
console.log(result);
})();
updateDoc
- HTTP Method: PUT
- Endpoint: /docs/{id}
Required Parameters
Name | Type | Description |
---|
id | number | |
input | object | Request body. |
Return Type
DocResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const input = { fileLocation: 'https://example.com', version: '1.0.0' };
const result = await sdk.doc.updateDoc(input, -87454969.46793127);
console.log(result);
})();
getDownloadUrl
- HTTP Method: GET
- Endpoint: /docs/{id}/getDownloadUrl
Required Parameters
Name | Type | Description |
---|
id | number | |
Return Type
DocDownloadResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.doc.getDownloadUrl(-90149254.36146224);
console.log(result);
})();
getCurrentUser
- HTTP Method: GET
- Endpoint: /users/current-user
Return Type
UserResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.user.getCurrentUser();
console.log(result);
})();
createUser
- HTTP Method: POST
- Endpoint: /users
Required Parameters
| input | object | Request body. |
Return Type
UserResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(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
Name | Type | Description |
---|
offset | number | |
limit | number | |
Optional Parameters
Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
Name | Type | Description |
---|
orgId | number | |
email | string | |
firstName | string | |
lastName | string | |
Return Type
PaginatedUserResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.user.getUsers(-35303772.50683503, 11196513.474254876, {
orgId: -32300483.226984248,
email: 'email',
firstName: 'firstName',
lastName: 'lastName',
});
console.log(result);
})();
getUserById
- HTTP Method: GET
- Endpoint: /users/{id}
Required Parameters
Name | Type | Description |
---|
id | number | |
Return Type
UserResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.user.getUserById(-50427658.42232875);
console.log(result);
})();
updateUser
- HTTP Method: PATCH
- Endpoint: /users/{id}
Required Parameters
Name | Type | Description |
---|
id | number | |
input | object | Request body. |
Return Type
UserResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const input = {
email: 'someone@example.com',
firstName: 'John',
isEnabled: true,
isLiblabAdmin: true,
lastName: 'Doe',
refreshTokenHash: 'refreshTokenHash',
};
const result = await sdk.user.updateUser(input, -64950726.606940724);
console.log(result);
})();
removeUser
- HTTP Method: DELETE
- Endpoint: /users/{id}
Required Parameters
Name | Type | Description |
---|
id | number | |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.user.removeUser(27513175.485102177);
console.log(result);
})();
updateEmailSubscription
- HTTP Method: PATCH
- Endpoint: /users/emails/subscriptions
Required Parameters
| input | object | Request body. |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const input = { isSubscribedToEmails: true };
const result = await sdk.user.updateEmailSubscription(input);
console.log(result);
})();
getUserOrgs
- HTTP Method: GET
- Endpoint: /users/orgs
Required Parameters
Name | Type | Description |
---|
offset | number | |
limit | number | |
Return Type
PaginatedOrgResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.user.getUserOrgs(-50556762.45729201, -97853025.90980777);
console.log(result);
})();
getUserApis
- HTTP Method: GET
- Endpoint: /users/apis
Return Type
GetUserApisResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.user.getUserApis();
console.log(result);
})();
signup
- HTTP Method: POST
- Endpoint: /auth/signup
Required Parameters
| input | object | Request body. |
Return Type
UserResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const input = { email: 'someone@example.com', password: 'Password123!' };
const result = await sdk.auth.signup(input);
console.log(result);
})();
signupWithAutomaticVerification
- HTTP Method: POST
- Endpoint: /auth/signup-automatic-verification
Required Parameters
| input | object | Request body. |
Return Type
UserResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const input = { email: 'someone@example.com', password: 'Password123!' };
const result = await sdk.auth.signupWithAutomaticVerification(input);
console.log(result);
})();
login
- HTTP Method: POST
- Endpoint: /auth/login
Required Parameters
| input | object | Request body. |
Return Type
AuthTokenResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(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
| input | object | Request body. |
Return Type
AuthTokenResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const input = { authCode: '4/0AZEOvhVfyMNU2NW45VW......' };
const result = await sdk.auth.googleLogin(input);
console.log(result);
})();
logout
- HTTP Method: POST
- Endpoint: /auth/logout
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.auth.logout();
console.log(result);
})();
refreshToken
- HTTP Method: POST
- Endpoint: /auth/refresh-jwt
Required Parameters
| input | object | Request body. |
Return Type
AuthTokenResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(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
| input | object | Request body. |
Return Type
AuthTokenResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(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
| input | object | Request body. |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(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
| input | object | Request body. |
Return Type
AuthTokenResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(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
| input | object | Request body. |
Return Type
AuthTokenResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(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
| input | object | Request body. |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(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
| input | object | Request body. |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(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
| input | object | Request body. |
Return Type
CreateTokenResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const input = {
expiresAt: '2023-09-21T20:26:39.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
Name | Type | Description |
---|
userId | number | |
Return Type
FindTokensByUserIdResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.token.findTokensByUserId(33229675.09690149);
console.log(result);
})();
getTokenById
- HTTP Method: GET
- Endpoint: /auth/tokens/{id}
Required Parameters
Name | Type | Description |
---|
id | number | |
Return Type
GetTokenResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.token.getTokenById(76162620.07010671);
console.log(result);
})();
removeToken
- HTTP Method: DELETE
- Endpoint: /auth/tokens/{id}
Required Parameters
Name | Type | Description |
---|
id | number | |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.token.removeToken(-12614114.311922282);
console.log(result);
})();
getOrgPlanHistory
- HTTP Method: GET
- Endpoint: /orgs/{orgId}/plans
Required Parameters
Name | Type | Description |
---|
orgId | number | |
Return Type
GetOrgPlanHistoryResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.orgPlan.getOrgPlanHistory(-43891363.45434097);
console.log(result);
})();
updateOrgPlan
- HTTP Method: PUT
- Endpoint: /orgs/{orgId}/plans
Required Parameters
Name | Type | Description |
---|
orgId | number | |
input | object | Request body. |
Return Type
OrgPlanResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const input = { plan: 'COMMUNITY' };
const result = await sdk.orgPlan.updateOrgPlan(input, -46700060.47749711);
console.log(result);
})();
getStripePaymentPortalUrl
- HTTP Method: GET
- Endpoint: /orgs/{orgId}/payment-portal
Required Parameters
Name | Type | Description |
---|
orgId | number | |
input | object | Request body. |
Return Type
OrgPaymentPortalResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const input = { returnUrl: 'https://app.liblab.com/' };
const result = await sdk.orgPlan.getStripePaymentPortalUrl(input, 12688519.96292381);
console.log(result);
})();
stripeWebhook
- HTTP Method: POST
- Endpoint: /stripe/webhook
Required Parameters
Name | Type | Description |
---|
stripeSignature | string | |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.stripe.stripeWebhook('stripe-signature');
console.log(result);
})();
healthCheckControllerCheck
- HTTP Method: GET
- Endpoint: /health-check
Return Type
HealthCheckResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.healthCheck.healthCheckControllerCheck();
console.log(result);
})();
track
- HTTP Method: POST
- Endpoint: /events
Required Parameters
| input | object | Request body. |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const input = { metadata: { foo: 'bar' }, name: 'my-event', userToken: 'userToken' };
const result = await sdk.event.track(input);
console.log(result);
})();
createInvite
- HTTP Method: POST
- Endpoint: /invitations/org/{orgId}
Required Parameters
Name | Type | Description |
---|
orgId | number | |
input | object | Request body. |
Return Type
InvitationResponse
InvitationResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const input = { email: 'someone@example.com', name: 'John Doe', role: 'MEMBER' };
const result = await sdk.invitation.createInvite(input, -67166092.74688014);
console.log(result);
})();
createAuthoInvite
- HTTP Method: POST
- Endpoint: /invitations/auth0/org/{orgId}
Required Parameters
Name | Type | Description |
---|
orgId | number | |
input | object | Request body. |
Return Type
InvitationResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const input = { email: 'someone@example.com' };
const result = await sdk.invitation.createAuthoInvite(input, -45826497.63274667);
console.log(result);
})();
acceptInvite
- HTTP Method: PATCH
- Endpoint: /invitations/accept/{inviteCode}
Required Parameters
Name | Type | Description |
---|
inviteCode | string | |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.invitation.acceptInvite('inviteCode');
console.log(result);
})();
declineInvite
- HTTP Method: PATCH
- Endpoint: /invitations/decline/{inviteCode}
Required Parameters
Name | Type | Description |
---|
inviteCode | string | |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.invitation.declineInvite('inviteCode');
console.log(result);
})();
inviteCode
- HTTP Method: GET
- Endpoint: /invitations/{inviteCode}
Required Parameters
Name | Type | Description |
---|
inviteCode | string | |
Return Type
InvitationResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.invitation.inviteCode('inviteCode');
console.log(result);
})();
getInvitesByUser
- HTTP Method: GET
- Endpoint: /invitations
Required Parameters
Name | Type | Description |
---|
offset | number | |
limit | number | |
Return Type
GetInvitesByUserResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.invitation.getInvitesByUser(19419597.792078942, -26131140.90570891);
console.log(result);
})();
create
- HTTP Method: POST
- Endpoint: /tags
Required Parameters
| input | object | Request body. |
Return Type
TagResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const input = { name: 'tag' };
const result = await sdk.tags.create(input);
console.log(result);
})();
search
- HTTP Method: GET
- Endpoint: /tags
Required Parameters
Name | Type | Description |
---|
offset | number | |
limit | number | |
searchQuery | string | |
Return Type
SearchResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const result = await sdk.tags.search(51719832.82993698, -18872428.367659837, 'searchQuery');
console.log(result);
})();
askAboutSpec
- HTTP Method: POST
- Endpoint: /ai/ask-about-spec
Required Parameters
| input | object | Request body. |
Return Type
AskAboutSpecResponse
Example Usage Code Snippet
import { Liblab } from './src';
const sdk = new Liblab({
refreshToken: process.env.LIBLAB_REFRESH_TOKEN,
accessToken: process.env.LIBLAB_ACCESS_TOKEN,
});
(async () => {
const input = { buildId: 12345, prompt: 'How can I login in this api?' };
const result = await sdk.ai.askAboutSpec(input);
console.log(result);
})();