@liblab/sdk
Liblab Typescript SDK 0.1.499
The Typescript SDK for Liblab.
- API version: 0.1.499
- SDK version: 0.1.499
Table of Contents
- Installation
- Authentication
- API Endpoint Services
- API Models
- Sample Usage
- Environments
- Liblab Services
- License
Installation
npm install sdk
Authentication
To see whether an endpoint needs a specific type of authentication check the endpoint's documentation.
Access Token
The Liblab API uses access tokens as a form of authentication. You can set the access token when initializing the SDK through the constructor:
const sdk = new Liblab('YOUR_ACCESS_TOKEN')
Or through the setAccessToken method:
const sdk = new Liblab()
sdk.setAccessToken('YOUR_ACCESS_TOKEN')
You can also set it for each service individually:
const sdk = new Liblab()
sdk.build.setAccessToken('YOUR_ACCESS_TOKEN')
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({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
try {
const result = await sdk.build
.getBuildStatuses();
console.log(result);
} catch (err) {
const error = err as Error;
console.error(error.message);
}
})();
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.
Services
Build
| Method | Description |
|---|---|
| createBuild | |
| getBuilds | |
| createSimpleBuild | |
| createBuildArtifact | |
| getBuildStatuses | |
| getById | |
| removeById | |
| tag | |
| untag | |
| approveBuild | |
| unApproveBuild |
Api
| Method | Description |
|---|---|
| getApiBuilds | |
| getApiBuildTags | |
| getApiSdks | |
| getApiDocs | |
| createApi | |
| getApis | |
| searchApis | |
| getApiById | |
| updateApi | |
| getApiMembers | |
| removeApi | |
| getApiByOrgSlugAndApiSlug |
Org
| Method | Description |
|---|---|
| createOrg | |
| getOrgs | |
| searchOrgs | |
| getOrgById | |
| updateOrg | |
| removeOrg | |
| getApisByOrg | |
| getOrgJobs | |
| getDocsByOrg | |
| getBuildByOrg | |
| getOrgApiBuilds | |
| getOrgArtifacts |
OrgMember
| Method | Description |
|---|---|
| createMember | |
| getByOrgId | |
| updateMember | |
| removeMember | |
| leaveOrg | |
| enableAllMembers | |
| disableAllMembers |
Artifact
| Method | Description |
|---|---|
| createArtifact | |
| getArtifacts | |
| getArtifactStatuses | |
| getArtifactLogs | |
| getArtifactById | |
| removeArtifact |
Sdk
| Method | Description |
|---|---|
| createSdk | |
| findSdks | |
| getSdkById | |
| removeSdk |
Doc
| Method | Description |
|---|---|
| getApprovedByOrgSlugAndApiSlug | |
| getAllApprovedByOrgSlugAndApiSlug | |
| createDoc | |
| findDocs | |
| approve | |
| unapprove | |
| getDocById | |
| removeDoc | |
| updateDoc | |
| getDownloadUrl |
HubSpot
| Method | Description |
|---|---|
| sendShadowForm |
OrgSubscriptions
| Method | Description |
|---|---|
| getActiveSubscription | |
| cancelActiveSubscription | |
| getActiveSubscriptionStatus | |
| getSubscriptionPaymentMethodUpdateLink | |
| getCheckoutLink |
OrgMcpSubscriptions
| Method | Description |
|---|---|
| getMcpSubscription | |
| updateMcpSubscription |
Subscriptions
| Method | Description |
|---|---|
| getSubscriptionsOverview |
PaymentProvider
| Method | Description |
|---|---|
| stripeWebhook | |
| syncStripeSubscriptions | |
| createStripePortalSession |
User
| Method | Description |
|---|---|
| getCurrentUser | |
| createUser | |
| getUsers | |
| getUserById | |
| updateUser | |
| removeUser | |
| updateEmailSubscription | |
| getUserOrgs | |
| getUserApis |
McpServer
Snippets
| Method | Description |
|---|---|
| getSnippetsByBuildId |
Integration
Workflows
| Method | Description |
|---|---|
| uploadWorkflows |
SpecValidation
| Method | Description |
|---|---|
| validateSpec | |
| getSpecValidation |
Token
| Method | Description |
|---|---|
| createToken | |
| findTokensByUserId | |
| getTokenById | |
| removeToken |
Invitation
| Method | Description |
|---|---|
| createOrgInvite | |
| redeemInvite | |
| declineInvite | |
| cancelInvite | |
| getReceivedInvites | |
| getSentInvites | |
| searchInvites | |
| getInviteByCode |
Auth0
| Method | Description |
|---|---|
| resetPasswordAuth0 | |
| passwordlessVerifyPassword | |
| passwordlessSetupPassword |
Plan
| Method | Description |
|---|---|
| getEnabledPlans |
Invoice
| Method | Description |
|---|---|
| getOrgInvoices |
HealthCheck
| Method | Description |
|---|---|
| healthCheckControllerCheck |
Tags
| Method | Description |
|---|---|
| create | |
| search |
Ai
| Method | Description |
|---|---|
| queryDocuments | Query documents |
Feedback
| Method | Description |
|---|---|
| sendFeedback |
UserEvent
| Method | Description |
|---|---|
| getUserEvents | |
| exportUserEventsToCsv | |
| trackUserPublishPrEvent |
ThirdPartyApplications
| Method | Description |
|---|---|
| thirdPartyApplicationsControllerCreate | |
| thirdPartyApplicationsControllerGetAll | |
| thirdPartyApplicationsControllerGetByOrgId | |
| thirdPartyApplicationsControllerDeleteById |
SpecFixer
| Method | Description |
|---|---|
| fixSpec |
All Methods
createBuild
- HTTP Method: POST
- Endpoint: /builds
Required Parameters
| input | object | Request body. |
Return Type
BuildResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ 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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.build.getBuilds(42, 10, 1, 'my-api');
console.log(result);
})();
createSimpleBuild
- HTTP Method: POST
- Endpoint: /builds/simple
Required Parameters
| input | object | Request body. |
Return Type
BuildResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = {
apiId: 1,
authentication: {},
baseUrl: 'https://api-dev.liblab.com',
docs: ['enhancedApiSpec', 'snippets', 'api'],
languages: ['typescript'],
liblabVersion: '2',
sdkName: 'liblab',
sdkVersion: '1.0.0',
};
const result = await sdk.build.createSimpleBuild(input);
console.log(result);
})();
createBuildArtifact
- HTTP Method: POST
- Endpoint: /builds/{id}/artifact
Required Parameters
| Name | Type | Description |
|---|---|---|
| id | number | |
| input | object | Request body. |
Return Type
BuildResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = {};
const result = await sdk.build.createBuildArtifact(input, -78121726.23106393);
console.log(result);
})();
getBuildStatuses
- HTTP Method: GET
- Endpoint: /builds/statuses
Return Type
GetBuildStatusesResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ 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
GetBuildByIdResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.build.getById(28934759.900535136);
console.log(result);
})();
removeById
- HTTP Method: DELETE
- Endpoint: /builds/{buildId}/{apiSlug}/{orgId}
Required Parameters
| Name | Type | Description |
|---|---|---|
| buildId | number | |
| apiSlug | string | |
| orgId | number |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.build.removeById(-26796701.109798834, 'apiSlug', -23796043.434081852);
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.build.tag(-69686100.35669544, -2713507.809237331);
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.build.untag(21625036.177896068, -9712276.912692055);
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.build.approveBuild(98591544.29773653);
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.build.unApproveBuild(-44411163.54278383);
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.api.getApiBuilds(104909.5033967495, 42, 10, {
sortBy: 'status',
direction: 'asc',
statuses: ['FAILURE'],
tags: [1],
createdByIds: [1],
});
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.api.getApiBuildTags(60617137.93982947);
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.api.getApiSdks(-54521931.00827518, 42, 10, {
statuses: ['FAIL'],
tags: [1],
createdByIds: [1],
languages: ['JAVA'],
sortBy: 'createdAt',
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.api.getApiDocs(92022323.83281216, 42, 10, {
sortBy: 'createdAt',
direction: 'asc',
statuses: ['FAIL'],
tags: [1],
createdByIds: [1],
});
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 '@liblab/sdk';
const sdk = new Liblab({ 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 |
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 |
Return Type
GetApisResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.api.getApis(1, { apiSlug: 'my-api' });
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 | |
| sortBy | ApiSortBy | |
| orgId | number | |
| direction | ApiDirection | |
| orgIds | number[] |
Return Type
ApisSearchPaginatedResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.api.searchApis(42, 10, {
name: 'alpaca',
sortBy: 'createdAt',
orgId: 1,
direction: 'asc',
orgIds: [1],
});
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.api.getApiById(65184548.17721003);
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = { name: 'My api name', version: '1.0.1' };
const result = await sdk.api.updateApi(input, 65624426.02952179);
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.api.getApiMembers(-34910251.958310924);
console.log(result);
})();
removeApi
- HTTP Method: DELETE
- Endpoint: /apis/delete/{apiSlug}/{orgId}
Required Parameters
| Name | Type | Description |
|---|---|---|
| apiSlug | string | |
| orgId | number |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.api.removeApi('apiSlug', 36332635.412119925);
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 '@liblab/sdk';
const sdk = new Liblab({ 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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = {
description: 'Example Org Description',
domain: 'business.com',
logoUrl: 'https://liblab.com/images/logo.png',
name: 'Example Org',
website: 'https://example.com',
};
const result = await sdk.org.createOrg(input);
console.log(result);
})();
getOrgs
- HTTP Method: GET
- Endpoint: /orgs
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 |
|---|---|---|
| direction | Direction | |
| sortBy | OrgSortBy |
Return Type
AdminPaginatedOrgResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.org.getOrgs(42, 10, { direction: 'asc', sortBy: 'status' });
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
AdminPaginatedOrgResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.org.searchOrgs(42, 10, {
website: 'https://liblab.com',
domain: 'liblab.com',
name: 'liblab',
});
console.log(result);
})();
getOrgById
- HTTP Method: GET
- Endpoint: /orgs/{id}
Required Parameters
| Name | Type | Description |
|---|---|---|
| id | number |
Return Type
GetOrgByIdResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.org.getOrgById(5055133.758084372);
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = {
description: 'Example Org Description',
domain: 'example.com',
isAllowedForBeta: true,
logoUrl: 'https://liblab.com/images/logo.png',
name: 'Example Org',
remainingCredits: 19,
website: 'https://example.com',
};
const result = await sdk.org.updateOrg(input, 74183722.44069493);
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.org.removeOrg(29484797.30473128);
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.org.getApisByOrg(90300358.1671145);
console.log(result);
})();
getOrgJobs
- HTTP Method: GET
- Endpoint: /orgs/{id}/jobs
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 | OrgSortBy | |
| direction | Direction | |
| statuses | string[] | |
| createdByIds | number[] | |
| apiSlug | string | |
| apiVersion | string | |
| buildType | string[] |
Return Type
PaginatedOrgJobsResponseWithTotalCount
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.org.getOrgJobs(256439.15729390085, 42, 10, {
sortBy: 'status',
direction: 'asc',
statuses: ['FAILURE'],
createdByIds: [1],
apiSlug: 'my-api',
apiVersion: '1.0.0',
buildType: ['SDK', 'DOC'],
});
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.org.getDocsByOrg(-32938643.7227936);
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 | OrgSortBy | |
| direction | Direction | |
| statuses | string[] | |
| tags | number[] | |
| createdByIds | number[] | |
| apiSlug | string | |
| apiVersion | string |
Return Type
PaginatedOrgBuildsWithJobsResponseWithTotalCount
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.org.getBuildByOrg(-67762136.76150067, 42, 10, {
sortBy: 'status',
direction: 'asc',
statuses: ['FAILURE'],
tags: [1],
createdByIds: [1],
apiSlug: 'my-api',
apiVersion: '1.0.0',
});
console.log(result);
})();
getOrgApiBuilds
- HTTP Method: GET
- Endpoint: /orgs/{id}/api-builds
Required Parameters
| Name | Type | Description |
|---|---|---|
| id | number |
Return Type
GetOrgApiBuildsResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.org.getOrgApiBuilds(82970657.07409507);
console.log(result);
})();
getOrgArtifacts
- 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'}
| Name | Type | Description |
|---|---|---|
| sortBy | OrgSortBy | |
| direction | OrgDirection | |
| artifactTypes | ArtifactTypes | |
| statuses | OrgStatuses | |
| createdByIds | number[] |
Return Type
PaginatedOrgArtifactsResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.org.getOrgArtifacts(19039710.90757732, 42, 10, {
sortBy: 'status',
direction: 'asc',
artifactTypes: ['SDK'],
statuses: ['IN_PROGRESS'],
createdByIds: [1],
});
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = { role: 'MEMBER', userId: 1 };
const result = await sdk.orgMember.createMember(input, 38281872.23550409);
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'}
| Name | Type | Description |
|---|---|---|
| string | ||
| firstName | string | |
| lastName | string | |
| sortBy | OrgMemberSortBy | |
| direction | Direction |
Return Type
PaginatedOrgMemberResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.orgMember.getByOrgId(-62166207.84238667, 42, 10, {
email: 'john@liblab.com',
firstName: 'John',
lastName: 'Doe',
sortBy: 'createdAt',
direction: 'asc',
});
console.log(result);
})();
updateMember
- HTTP Method: PATCH
- Endpoint: /orgs/{orgId}/members/{userId}
Required Parameters
| Name | Type | Description |
|---|---|---|
| userId | number | |
| orgId | number | |
| input | object | Request body. |
Return Type
OrgMemberResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = { orgId: 1, role: 'MEMBER' };
const result = await sdk.orgMember.updateMember(input, 45963300.29407638, -1724930.9730228633);
console.log(result);
})();
removeMember
- HTTP Method: DELETE
- Endpoint: /orgs/{orgId}/members/{userId}
Required Parameters
| Name | Type | Description |
|---|---|---|
| userId | number | |
| orgId | number |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.orgMember.removeMember(83533672.79767746, 61993940.96509114);
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.orgMember.leaveOrg(-26163685.76827748);
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.orgMember.enableAllMembers(-6452920.437261239);
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.orgMember.disableAllMembers(-61197111.701100186);
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 '@liblab/sdk';
const sdk = new Liblab({ 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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.artifact.getArtifacts(1);
console.log(result);
})();
getArtifactStatuses
- HTTP Method: GET
- Endpoint: /artifacts/statuses
Return Type
GetArtifactStatusesResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.artifact.getArtifactStatuses();
console.log(result);
})();
getArtifactLogs
- HTTP Method: GET
- Endpoint: /artifacts/{id}/logs
Required Parameters
| Name | Type | Description |
|---|---|---|
| id | number |
Return Type
GetArtifactLogsResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.artifact.getArtifactLogs(55206867.98036581);
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.artifact.getArtifactById(32195725.25222762);
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.artifact.removeArtifact(76056231.44405401);
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 '@liblab/sdk';
const sdk = new Liblab({ 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 |
Optional Parameters
Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
| Name | Type | Description |
|---|---|---|
| artifactId | number | |
| sortBy | SdkSortBy | |
| direction | Direction | |
| languages | string[] |
Return Type
PaginatedSdkResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.sdk.findSdks(42, 10, {
artifactId: 1,
sortBy: 'version',
direction: 'asc',
languages: ['TYPESCRIPT'],
});
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.sdk.getSdkById(25581214.653234825);
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.sdk.removeSdk(-11418004.284944862);
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 '@liblab/sdk';
const sdk = new Liblab({ 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 '@liblab/sdk';
const sdk = new Liblab({ 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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = {
apiId: -64923906.584890686,
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.doc.findDocs(42, 10, 1);
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 '@liblab/sdk';
const sdk = new Liblab({ 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 '@liblab/sdk';
const sdk = new Liblab({ 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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.doc.getDocById(-33229612.471661694);
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.doc.removeDoc(-24038357.756537467);
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = { fileLocation: 'https://example.com', version: '1.0.0' };
const result = await sdk.doc.updateDoc(input, -48898366.69830183);
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.doc.getDownloadUrl(-45281734.471104816);
console.log(result);
})();
sendShadowForm
- HTTP Method: POST
- Endpoint: /hubspot/shadow-form
Required Parameters
| input | object | Request body. |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = { fields: [{ name: 'test-name', value: 'test-field' }] };
const result = await sdk.hubSpot.sendShadowForm(input);
console.log(result);
})();
getActiveSubscription
- HTTP Method: GET
- Endpoint: /orgs/{orgId}/subscriptions/active
Required Parameters
| Name | Type | Description |
|---|---|---|
| orgId | number |
Return Type
SubscriptionResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.orgSubscriptions.getActiveSubscription(-71779870.69072866);
console.log(result);
})();
cancelActiveSubscription
- HTTP Method: POST
- Endpoint: /orgs/{orgId}/subscriptions/active/cancel
Required Parameters
| Name | Type | Description |
|---|---|---|
| orgId | number |
Return Type
SubscriptionResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.orgSubscriptions.cancelActiveSubscription(-14341615.16899079);
console.log(result);
})();
getActiveSubscriptionStatus
- HTTP Method: GET
- Endpoint: /orgs/{orgId}/subscriptions/active/state
Required Parameters
| Name | Type | Description |
|---|---|---|
| orgId | number |
Return Type
GetActiveSubscriptionStatusResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.orgSubscriptions.getActiveSubscriptionStatus(-89544480.58736615);
console.log(result);
})();
getSubscriptionPaymentMethodUpdateLink
- HTTP Method: GET
- Endpoint: /orgs/{orgId}/subscriptions/{subscriptionId}/payment-methods/update-link
Required Parameters
| Name | Type | Description |
|---|---|---|
| orgId | number | |
| subscriptionId | number |
Return Type
CheckoutLinkResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.orgSubscriptions.getSubscriptionPaymentMethodUpdateLink(
-93270816.62061384,
43391077.4494361,
);
console.log(result);
})();
getCheckoutLink
- HTTP Method: GET
- Endpoint: /orgs/{orgId}/subscriptions/checkout/link
Required Parameters
| Name | Type | Description |
|---|---|---|
| orgId | number | |
| planId | number | |
| billingInterval | BillingInterval |
Return Type
CheckoutLinkResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.orgSubscriptions.getCheckoutLink(-56857549.38173915, 1, 'year');
console.log(result);
})();
getMcpSubscription
- HTTP Method: GET
- Endpoint: /orgs/{orgId}/mcp-subscription
Required Parameters
| Name | Type | Description |
|---|---|---|
| orgId | number |
Return Type
McpSubscriptionResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.orgMcpSubscriptions.getMcpSubscription(-47425895.55909884);
console.log(result);
})();
updateMcpSubscription
- HTTP Method: PATCH
- Endpoint: /orgs/{orgId}/mcp-subscription
Required Parameters
| Name | Type | Description |
|---|---|---|
| orgId | number | |
| input | object | Request body. |
Return Type
McpSubscriptionResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = { planId: 1 };
const result = await sdk.orgMcpSubscriptions.updateMcpSubscription(input, -83614221.164725);
console.log(result);
})();
getSubscriptionsOverview
- HTTP Method: GET
- Endpoint: /subscriptions
Return Type
SubscriptionsOverviewResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.subscriptions.getSubscriptionsOverview();
console.log(result);
})();
stripeWebhook
- HTTP Method: POST
- Endpoint: /payment-provider/stripe/webhook
Required Parameters
| Name | Type | Description |
|---|---|---|
| stripeSignature | string |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.paymentProvider.stripeWebhook('stripe-signature');
console.log(result);
})();
syncStripeSubscriptions
- HTTP Method: POST
- Endpoint: /payment-provider/stripe/subscriptions/sync
Return Type
PortalSessionResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.paymentProvider.syncStripeSubscriptions();
console.log(result);
})();
createStripePortalSession
- HTTP Method: POST
- Endpoint: /payment-provider/stripe/portal-session
Return Type
PortalSessionResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.paymentProvider.createStripePortalSession();
console.log(result);
})();
getCurrentUser
- HTTP Method: GET
- Endpoint: /users/current-user
Return Type
CurrentUserResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ 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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = {
auth0Id: 'auth0|123',
email: 'someone@example.com',
firstName: 'John',
lastName: 'Doe',
password: 'Password123!',
signupMethod: 'DEFAULT',
};
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 | |
| string | ||
| firstName | string | |
| lastName | string | |
| orgIds | number[] | |
| sortBy | UserSortBy | |
| direction | UserDirection |
Return Type
UsersResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.user.getUsers(42, 10, {
orgId: 1,
email: 'john@liblab.com',
firstName: 'John',
lastName: 'Doe',
orgIds: [1],
sortBy: 'createdAt',
direction: 'desc',
});
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.user.getUserById(99323059.98547512);
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = {
auth0Id: 'auth0Id',
email: 'someone@example.com',
firstName: 'John',
isEnabled: true,
isLiblabAdmin: true,
isLiblabFinanceAdmin: false,
lastName: 'Doe',
refreshTokenHash: 'refreshTokenHash',
utmParams: {},
};
const result = await sdk.user.updateUser(input, 87627511.1215294);
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.user.removeUser(-38831476.94119007);
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 '@liblab/sdk';
const sdk = new Liblab({ 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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.user.getUserOrgs(42, 10);
console.log(result);
})();
getUserApis
- HTTP Method: GET
- Endpoint: /users/apis
Return Type
GetUserApisResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.user.getUserApis();
console.log(result);
})();
createMcpServerDeployment
- HTTP Method: POST
- Endpoint: /mcp-server-deployments
Required Parameters
| input | object | Request body. |
Return Type
McpServerDeploymentResponseDto
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = { artifactId: 1, status: 'SUCCESS' };
const result = await sdk.mcpServer.createMcpServerDeployment(input);
console.log(result);
})();
getMcpServerDeployments
- HTTP Method: GET
- Endpoint: /mcp-server-deployments
Return Type
GetMcpServerDeploymentsResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.mcpServer.getMcpServerDeployments();
console.log(result);
})();
getMcpServerDeploymentMetrics
- HTTP Method: GET
- Endpoint: /mcp-server-deployments/metrics
Optional Parameters
Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
| Name | Type | Description |
|---|---|---|
| startDate | string | Start date (ISO 8601) |
| endDate | string | End date (ISO 8601) |
| orgId | number | Organization ID to filter metrics for. Optional for admin to specify org. |
Return Type
GetMcpServerDeploymentMetricsResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.mcpServer.getMcpServerDeploymentMetrics({
startDate: '2025-01-01T00:00:00.000Z',
endDate: '2025-01-31T23:59:59.999Z',
orgId: 1,
});
console.log(result);
})();
orgHadPreviousMcpDeployments
- HTTP Method: GET
- Endpoint: /mcp-server-deployments/had-previous
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.mcpServer.orgHadPreviousMcpDeployments();
console.log(result);
})();
getMcpServerDeploymentById
- HTTP Method: GET
- Endpoint: /mcp-server-deployments/{id}
Required Parameters
| Name | Type | Description |
|---|---|---|
| id | number |
Return Type
McpServerDeploymentResponseDto
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.mcpServer.getMcpServerDeploymentById(98909387.05383646);
console.log(result);
})();
updateMcpServerDeployment
- HTTP Method: PATCH
- Endpoint: /mcp-server-deployments/{id}
Required Parameters
| Name | Type | Description |
|---|---|---|
| id | number | |
| input | object | Request body. |
Return Type
McpServerDeploymentResponseDto
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = {
error: 'This is an error message',
hostedUrl: 'xyz123.liblab.ai/mcp',
mcpServerMetadataId: 1,
status: 'SUCCESS',
};
const result = await sdk.mcpServer.updateMcpServerDeployment(input, 20706014.24488893);
console.log(result);
})();
deleteMcpServerDeployment
- HTTP Method: DELETE
- Endpoint: /mcp-server-deployments/{id}
Required Parameters
| Name | Type | Description |
|---|---|---|
| id | number |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.mcpServer.deleteMcpServerDeployment(-36834945.55874338);
console.log(result);
})();
getMcpServerPauseStatus
- HTTP Method: GET
- Endpoint: /mcp-server-deployments/{orgId}/pause-status
Required Parameters
| Name | Type | Description |
|---|---|---|
| orgId | number |
Return Type
GetMcpServerPauseStatusResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.mcpServer.getMcpServerPauseStatus(35533604.69045028);
console.log(result);
})();
setMcpServerPauseStatus
- HTTP Method: PUT
- Endpoint: /mcp-server-deployments/{orgId}/pause-status
Required Parameters
| Name | Type | Description |
|---|---|---|
| orgId | number | Organization ID |
| input | object | Request body. |
Return Type
SetMcpServerPauseStatusResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = { isPaused: true };
const result = await sdk.mcpServer.setMcpServerPauseStatus(input, -55528908.47375602);
console.log(result);
})();
setMcpCustomHostname
- HTTP Method: POST
- Endpoint: /mcp-custom-hostname
Required Parameters
| input | object | Request body. |
Return Type
McpCustomHostnameOutputPostDto
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = { customHostname: 'xyz123.liblab.ai', id: 1, workerScriptName: 'xyz123' };
const result = await sdk.mcpServer.setMcpCustomHostname(input);
console.log(result);
})();
deleteMcpCustomHostname
- HTTP Method: DELETE
- Endpoint: /mcp-custom-hostname/{id}
Required Parameters
| Name | Type | Description |
|---|---|---|
| id | number |
Return Type
CustomHostnameOutputBasicDto
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.mcpServer.deleteMcpCustomHostname(-17520966.703524143);
console.log(result);
})();
verifyMcpCustomHostname
- HTTP Method: PUT
- Endpoint: /mcp-custom-hostname/{id}
Required Parameters
| Name | Type | Description |
|---|---|---|
| id | number |
Return Type
CustomHostnameOutputBasicDto
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.mcpServer.verifyMcpCustomHostname(21591731.860796496);
console.log(result);
})();
getSnippetsByBuildId
- HTTP Method: GET
- Endpoint: /snippets/{id}
Required Parameters
| Name | Type | Description |
|---|---|---|
| id | number |
Return Type
SnippetsResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.snippets.getSnippetsByBuildId(75471269.06494185);
console.log(result);
})();
createIntegrationBuild
- HTTP Method: POST
- Endpoint: /integrations/builds
Required Parameters
| input | object | Request body. |
Return Type
IntegrationBuildResponseDto
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = {};
const result = await sdk.integration.createIntegrationBuild(input);
console.log(result);
})();
createPostmanIntegrationBuild
- HTTP Method: POST
- Endpoint: /integrations/postman/builds
Required Parameters
| input | object | Request body. |
Return Type
WebhookAcknowledgmentDto
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = {
config: {},
email: 'hello@example.com',
eventId: 'a7ff15ff-80e2-404c-9ca9-87da4703cc1c',
payload: {},
};
const result = await sdk.integration.createPostmanIntegrationBuild(input);
console.log(result);
})();
createPostmanServiceWorkerToken
- HTTP Method: POST
- Endpoint: /integrations/postman/tokens
Required Parameters
| input | object | Request body. |
Return Type
CreateTokenResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = {
expiresAt: '2025-01-01T01:01:01.0Z',
name: 'My token',
scope: ['API', 'DOC', 'SDK', 'BUILD', 'ARTIFACT', 'ORG'],
};
const result = await sdk.integration.createPostmanServiceWorkerToken(input);
console.log(result);
})();
getPostmanServiceWorkerTokens
- HTTP Method: GET
- Endpoint: /integrations/postman/tokens
Optional Parameters
Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
| Name | Type | Description |
|---|---|---|
| sort | Sort | Sort order for token expiration date |
Return Type
GetPostmanServiceWorkerTokensResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.integration.getPostmanServiceWorkerTokens({ sort: 'asc' });
console.log(result);
})();
createIntegrationCredentials
- HTTP Method: POST
- Endpoint: /integrations/credentials
Required Parameters
| input | object | Request body. |
Return Type
IntegrationCredentialsResponseDto
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = {
clientId: 'client-id-12345',
clientSecret: 'client-secret-abcde',
integrationSource: 'POSTMAN',
};
const result = await sdk.integration.createIntegrationCredentials(input);
console.log(result);
})();
getIntegrationCredentials
- HTTP Method: GET
- Endpoint: /integrations/credentials/{source}
Required Parameters
| Name | Type | Description |
|---|---|---|
| source | string |
Return Type
IntegrationCredentialsResponseDto
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.integration.getIntegrationCredentials('source');
console.log(result);
})();
updateIntegrationCredentials
- HTTP Method: PATCH
- Endpoint: /integrations/credentials/{source}
Required Parameters
| Name | Type | Description |
|---|---|---|
| source | string | |
| input | object | Request body. |
Return Type
IntegrationCredentialsResponseDto
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = {
clientId: 'updated-client-id',
clientSecret: 'updated-client-secret',
integrationSource: 'POSTMAN',
};
const result = await sdk.integration.updateIntegrationCredentials(input, 'source');
console.log(result);
})();
deleteIntegrationCredentials
- HTTP Method: DELETE
- Endpoint: /integrations/credentials/{source}
Required Parameters
| Name | Type | Description |
|---|---|---|
| source | string |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.integration.deleteIntegrationCredentials('source');
console.log(result);
})();
uploadWorkflows
- HTTP Method: POST
- Endpoint: /workflows
Required Parameters
| input | object | Request body. |
Return Type
CreateWorkflowsResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = {};
const result = await sdk.workflows.uploadWorkflows(input);
console.log(result);
})();
validateSpec
- HTTP Method: POST
- Endpoint: /spec-validations
Required Parameters
| input | object | Request body. |
Return Type
SpecValidationResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = { apiId: 1 };
const result = await sdk.specValidation.validateSpec(input);
console.log(result);
})();
getSpecValidation
- HTTP Method: GET
- Endpoint: /spec-validations/{id}
Required Parameters
| Name | Type | Description |
|---|---|---|
| id | number |
Return Type
SpecValidationResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.specValidation.getSpecValidation(37128483.481912345);
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = {
expiresAt: '2025-01-01T01:01:01.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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.token.findTokensByUserId(1);
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.token.getTokenById(53193894.225382596);
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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.token.removeToken(-37220213.38112711);
console.log(result);
})();
createOrgInvite
- HTTP Method: POST
- Endpoint: /invitations/org/{orgId}/invite
Required Parameters
| Name | Type | Description |
|---|---|---|
| orgId | number | |
| input | object | Request body. |
Return Type
InvitationResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = { email: 'harry@liblab.com' };
const result = await sdk.invitation.createOrgInvite(input, -64476186.66969932);
console.log(result);
})();
redeemInvite
- HTTP Method: PATCH
- Endpoint: /invitations/{inviteCode}/redeem
Required Parameters
| Name | Type | Description |
|---|---|---|
| inviteCode | string |
Return Type
InvitationResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.invitation.redeemInvite('inviteCode');
console.log(result);
})();
declineInvite
- HTTP Method: PATCH
- Endpoint: /invitations/{inviteCode}/decline
Required Parameters
| Name | Type | Description |
|---|---|---|
| inviteCode | string |
Return Type
InvitationResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.invitation.declineInvite('inviteCode');
console.log(result);
})();
cancelInvite
- HTTP Method: DELETE
- Endpoint: /invitations/{inviteId}/cancel
Required Parameters
| Name | Type | Description |
|---|---|---|
| inviteId | number |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.invitation.cancelInvite(94188702.63475698);
console.log(result);
})();
getReceivedInvites
- HTTP Method: GET
- Endpoint: /invitations/received
Required Parameters
| Name | Type | Description |
|---|---|---|
| offset | number | |
| limit | number |
Return Type
PaginatedOrgInvitesResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.invitation.getReceivedInvites(42, 10);
console.log(result);
})();
getSentInvites
- HTTP Method: GET
- Endpoint: /invitations/sent
Required Parameters
| Name | Type | Description |
|---|---|---|
| offset | number | |
| limit | number |
Return Type
PaginatedOrgInvitesResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.invitation.getSentInvites(42, 10);
console.log(result);
})();
searchInvites
- HTTP Method: GET
- Endpoint: /invitations/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 |
|---|---|---|
| orgName | string | Name of the organization |
| status | Status | Status of the invitation |
| sortBy | InvitationSortBy | Field to sort by |
| direction | InvitationDirection | Direction to sort by |
Return Type
PaginatedOrgInvitesResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.invitation.searchInvites(42, 10, {
orgName: 'liblab',
status: 'PENDING',
sortBy: 'createdAt',
direction: 'desc',
});
console.log(result);
})();
getInviteByCode
- HTTP Method: GET
- Endpoint: /invitations/{inviteCode}
Required Parameters
| Name | Type | Description |
|---|---|---|
| inviteCode | string |
Return Type
InvitationResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.invitation.getInviteByCode('inviteCode');
console.log(result);
})();
resetPasswordAuth0
- HTTP Method: POST
- Endpoint: /auth0/reset-password
Return Type
Auth0ResetPasswordResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.auth0.resetPasswordAuth0();
console.log(result);
})();
passwordlessVerifyPassword
- HTTP Method: POST
- Endpoint: /auth0/passwordless/verify-password
Return Type
VerifyPasswordResponseDto
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.auth0.passwordlessVerifyPassword();
console.log(result);
})();
passwordlessSetupPassword
- HTTP Method: POST
- Endpoint: /auth0/passwordless/setup-password
Required Parameters
| input | object | Request body. |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = { password: 'P@ssw0rd123' };
const result = await sdk.auth0.passwordlessSetupPassword(input);
console.log(result);
})();
getEnabledPlans
- HTTP Method: GET
- Endpoint: /plans/enabled
Return Type
GetEnabledPlansResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.plan.getEnabledPlans();
console.log(result);
})();
getOrgInvoices
- HTTP Method: GET
- Endpoint: /orgs/{orgId}/invoices
Required Parameters
| Name | Type | Description |
|---|---|---|
| orgId | number |
Return Type
OrgInvoicesResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.invoice.getOrgInvoices(-6978854.266728312);
console.log(result);
})();
healthCheckControllerCheck
- HTTP Method: GET
- Endpoint: /health-check
Return Type
HealthCheckResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.healthCheck.healthCheckControllerCheck();
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 '@liblab/sdk';
const sdk = new Liblab({ 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 '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.tags.search(42, 10, 'abc');
console.log(result);
})();
queryDocuments
Query documents
- HTTP Method: GET
- Endpoint: /ai/chat
Required Parameters
| Name | Type | Description |
|---|---|---|
| orgId | number | |
| apiSlug | string | |
| apiVersion | string | |
| sdkLanguage | string | |
| q | string |
Return Type
ChatResponseDto
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.ai.queryDocuments(
76178727.86816412,
'apiSlug',
'apiVersion',
'sdkLanguage',
'q',
);
console.log(result);
})();
sendFeedback
- HTTP Method: POST
- Endpoint: /feedback
Required Parameters
| input | object | Request body. |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = { message: 'message', title: 'title' };
const result = await sdk.feedback.sendFeedback(input);
console.log(result);
})();
getUserEvents
- HTTP Method: GET
- Endpoint: /user-events
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 |
|---|---|---|
| string | ||
| orgId | number | |
| sortBy | UserEventSortBy | |
| direction | UserEventDirection | |
| orgIds | number[] | |
| eventIds | number[] |
Return Type
PaginatedUserEventsResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.userEvent.getUserEvents(42, 10, {
email: 'sb@liblab.com',
orgId: 1,
sortBy: 'timestamp',
direction: 'desc',
orgIds: [-89266974.42526197, 32038401.07435894],
eventIds: [-26161998.315019548, 71366600.7169072],
});
console.log(result);
})();
exportUserEventsToCsv
- HTTP Method: GET
- Endpoint: /user-events/export-to-csv
Optional Parameters
Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
| Name | Type | Description |
|---|---|---|
| string | ||
| orgId | number | |
| filename | string | |
| orgIds | number[] | |
| eventIds | number[] |
Return Type
ExportUserEventsToCsvResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.userEvent.exportUserEventsToCsv({
email: 'sb@liblab.com',
orgId: 1,
filename: 'user-events.csv',
orgIds: [-34252232.02496874, 2228620.146070257],
eventIds: [-68555156.05041865, -3375109.8852198124],
});
console.log(result);
})();
trackUserPublishPrEvent
- HTTP Method: POST
- Endpoint: /user-events/track-user-publish-pr-event
Required Parameters
| input | object | Request body. |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = { language: 'typescript', sdk: 'My SDK', success: true };
const result = await sdk.userEvent.trackUserPublishPrEvent(input);
console.log(result);
})();
thirdPartyApplicationsControllerCreate
- HTTP Method: POST
- Endpoint: /third-party-applications
Required Parameters
| input | object | Request body. |
Return Type
ThirdPartyApplicationResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = {
callbackUrls: ['http://localhost:3000/api/auth/callback'],
logoUrl: 'https://liblab.com/img/logo.svg',
name: 'third-party application',
orgId: 1,
};
const result = await sdk.thirdPartyApplications.thirdPartyApplicationsControllerCreate(input);
console.log(result);
})();
thirdPartyApplicationsControllerGetAll
- HTTP Method: GET
- Endpoint: /third-party-applications
Return Type
ThirdPartyApplicationsControllerGetAllResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.thirdPartyApplications.thirdPartyApplicationsControllerGetAll();
console.log(result);
})();
thirdPartyApplicationsControllerGetByOrgId
- HTTP Method: GET
- Endpoint: /third-party-applications/{id}
Required Parameters
| Name | Type | Description |
|---|---|---|
| id | number |
Return Type
ThirdPartyApplicationsControllerGetByOrgIdResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.thirdPartyApplications.thirdPartyApplicationsControllerGetByOrgId(
-76248609.31672566,
);
console.log(result);
})();
thirdPartyApplicationsControllerDeleteById
- HTTP Method: DELETE
- Endpoint: /third-party-applications/{id}
Required Parameters
| Name | Type | Description |
|---|---|---|
| id | number |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.thirdPartyApplications.thirdPartyApplicationsControllerDeleteById(
64531065.99863893,
);
console.log(result);
})();
fixSpec
- HTTP Method: POST
- Endpoint: /spec-fixer/{id}/fix
Required Parameters
| Name | Type | Description |
|---|---|---|
| id | number |
Return Type
SpecFixerResponseDto
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const result = await sdk.specFixer.fixSpec(17753394.904994264);
console.log(result);
})();
License
License: MIT. See license in LICENSE.