The Typescript SDK for Liblab.
- API version: 0.1.170
- SDK version: 0.1.170
- Installation
- Authentication
- API Endpoint Services
- API Models
- Sample Usage
- Environments
- Liblab Services
- License
npm install sdk
To see whether an endpoint needs a specific type of authentication check the endpoint's documentation.
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')
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);
}
})();
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);
A list of all services and services methods.
-
Services
Method | Description |
---|---|
createBuild | |
getBuilds | |
getBuildStatuses | |
getById | |
removeById | |
tag | |
untag | |
approveBuild | |
unApproveBuild |
Method | Description |
---|---|
getApiBuilds | |
getApiBuildTags | |
getApiSdks | |
getApiDocs | |
createApi | |
getApis | |
searchApis | |
getApiById | |
updateApi | |
getApiMembers | |
removeApi | |
getApiByOrgSlugAndApiSlug |
Method | Description |
---|---|
createOrg | |
getOrgs | |
searchOrgs | |
getOrgById | |
updateOrg | |
removeOrg | |
getApisByOrg | |
getOrgJobs | |
getDocsByOrg | |
getBuildByOrg | |
getOrgApiBuilds | |
getOrgArtifacts |
Method | Description |
---|---|
createMember | |
getByOrgId | |
updateMember | |
removeMember | |
leaveOrg | |
enableAllMembers | |
disableAllMembers |
Method | Description |
---|---|
createArtifact | |
getArtifacts | |
getArtifactStatuses | |
getArtifactById | |
removeArtifact |
Method | Description |
---|---|
createSdk | |
findSdks | |
getSdkById | |
removeSdk |
Method | Description |
---|---|
getApprovedByOrgSlugAndApiSlug | |
getAllApprovedByOrgSlugAndApiSlug | |
createDoc | |
findDocs | |
approve | |
unapprove | |
getDocById | |
removeDoc | |
updateDoc | |
getDownloadUrl |
Method | Description |
---|---|
sendShadowForm |
Method | Description |
---|---|
getActiveSubscription | |
cancelActiveSubscription | |
getActiveSubscriptionStatus | |
getSubscriptionPaymentMethodUpdateLink | |
getCheckoutLink | |
createOpenSourceSubscription |
Method | Description |
---|---|
stripeWebhook | |
syncStripeSubscriptions |
Method | Description |
---|---|
getCurrentUser | |
createUser | |
getUsers | |
getUserById | |
updateUser | |
removeUser | |
updateEmailSubscription | |
getUserOrgs | |
getUserApis |
Method | Description |
---|---|
getSnippetsByBuildId |
Method | Description |
---|---|
createToken | |
findTokensByUserId | |
getTokenById | |
removeToken |
Method | Description |
---|---|
createOrgInvite | |
redeemInvite | |
declineInvite | |
getReceivedInvites | |
getSentInvites | |
searchInvites | |
getInviteByCode |
Method | Description |
---|---|
resetPasswordAuth0 |
Method | Description |
---|---|
getEnabledPlans |
Method | Description |
---|---|
getOrgInvoices |
Method | Description |
---|---|
validateSpec |
Method | Description |
---|---|
healthCheckControllerCheck |
Method | Description |
---|---|
create | |
search |
Method | Description |
---|---|
askAboutSpec |
Method | Description |
---|---|
sendFeedback |
Method | Description |
---|---|
getUserEvents | |
exportUserEventsToCsv | |
trackUserPublishPrEvent |
- 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);
})();
- 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(
82563456.02971327,
-23420816.146370485,
28270686.561582714,
'apiSlug',
);
console.log(result);
})();
- 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);
})();
- 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(-40208359.37193215);
console.log(result);
})();
- 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(-44339449.740950964, 'apiSlug', 79497693.33630323);
console.log(result);
})();
- 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(23961025.134772345, -66307465.70512746);
console.log(result);
})();
- 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(-68884502.1328615, -6983340.16050382);
console.log(result);
})();
- 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(26456593.070628643);
console.log(result);
})();
- 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(-4146321.4541081637);
console.log(result);
})();
- 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(
83269958.38200083,
-52566321.51288971,
-14559802.81306243,
{
sortBy: 'status',
direction: 'asc',
statuses: ['FAILURE', 'FAILURE'],
tags: [93089605.79510576, 79732348.29611093],
createdByIds: [86484679.98975685, 74010523.85775629],
},
);
console.log(result);
})();
- 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(-4412715.665746972);
console.log(result);
})();
- 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(
86525470.96179265,
51659568.261363864,
-75803350.24735141,
{
statuses: ['FAIL', 'SUCCESS'],
tags: [-68980784.60582004, 14251741.3202416],
createdByIds: [-47812419.08967995, 44750115.30562875],
languages: ['CSHARP', 'SWIFT'],
sortBy: 'createdAt',
direction: 'asc',
},
);
console.log(result);
})();
- 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(
98534067.17156804,
-74187802.71980645,
-85875413.82004617,
{
sortBy: 'createdAt',
direction: 'asc',
statuses: ['FAIL', 'IN_PROGRESS'],
tags: [-16355043.855438784, -10739401.47154811],
createdByIds: [-32471345.752135366, 13716886.201927185],
},
);
console.log(result);
})();
- 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);
})();
- 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(-15642531.578727022, { apiSlug: 'apiSlug' });
console.log(result);
})();
- 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(-60003547.99669734, -37461647.54906599, {
name: 'name',
sortBy: 'createdAt',
orgId: 4448211.3489829,
direction: 'desc',
orgIds: [47316608.9558779, -59226253.855744295],
});
console.log(result);
})();
- 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(-99789010.64989975);
console.log(result);
})();
- 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, 68786798.93630096);
console.log(result);
})();
- 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(-32401588.75527355);
console.log(result);
})();
- 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', -20687105.22150381);
console.log(result);
})();
- 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);
})();
- 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);
})();
- 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(-79082723.54191066, -22995505.479965717, {
direction: 'asc',
sortBy: 'createdAt',
});
console.log(result);
})();
- 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(-63271442.61506201, -90974707.96279109, {
website: 'website',
domain: 'domain',
name: 'name',
});
console.log(result);
})();
- 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(88395757.34323269);
console.log(result);
})();
- 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, -68014770.74599504);
console.log(result);
})();
- 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(-7609382.961816281);
console.log(result);
})();
- 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(-36620090.94182621);
console.log(result);
})();
- 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(
62585972.94759464,
35676006.65498817,
-14320554.26633282,
{
sortBy: 'startTime',
direction: 'asc',
statuses: ['IN_PROGRESS', 'FAILURE'],
createdByIds: [-71271966.24114482, 24690251.78862241],
apiSlug: 'apiSlug',
apiVersion: 'apiVersion',
buildType: ['SNIPPETS', 'SNIPPETS'],
},
);
console.log(result);
})();
- 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(-31377236.31976232);
console.log(result);
})();
- 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(
31800578.29767278,
7220589.216856912,
-20412843.333371222,
{
sortBy: 'createdAt',
direction: 'asc',
statuses: ['FAILURE', 'IN_PROGRESS'],
tags: [-69669842.91307661, -6347723.310458079],
createdByIds: [-64205662.18834058, -74416947.286957],
apiSlug: 'apiSlug',
apiVersion: 'apiVersion',
},
);
console.log(result);
})();
- 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(-11564982.276290566);
console.log(result);
})();
- 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(
-12338229.853676274,
97865152.0108824,
-54154326.73410881,
{
sortBy: 'status',
direction: 'desc',
artifactTypes: ['DOC', 'SDK'],
statuses: [{ imports: [] }, { imports: [] }],
createdByIds: [47700813.02901298, -88310417.79129176],
},
);
console.log(result);
})();
- 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, 40248349.00026262);
console.log(result);
})();
- 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(
48721696.21724382,
73956714.3846834,
-18447142.48900312,
{
email: 'email',
firstName: 'firstName',
lastName: 'lastName',
sortBy: 'createdAt',
direction: 'asc',
},
);
console.log(result);
})();
- 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, -58243179.13873301, -93631982.10904215);
console.log(result);
})();
- 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(-52890443.69981379, -23860756.57590738);
console.log(result);
})();
- 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(-64282359.131071895);
console.log(result);
})();
- 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(-79010693.15872386);
console.log(result);
})();
- 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(-35510292.10145034);
console.log(result);
})();
- 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);
})();
- 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(-862974.7946000248);
console.log(result);
})();
- 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);
})();
- 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(80218140.40069824);
console.log(result);
})();
- 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(57445186.50779322);
console.log(result);
})();
- 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);
})();
- 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(52161715.73194495, -68618405.00500882, {
artifactId: 91181669.21116564,
sortBy: 'createdAt',
direction: 'asc',
languages: ['TERRAFORM', 'GO'],
});
console.log(result);
})();
- 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(-16863098.784481555);
console.log(result);
})();
- 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(-50244693.72890503);
console.log(result);
})();
- 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);
})();
- 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);
})();
- 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: -20775788.24055925,
artifactId: 1,
fileLocation: 'https://example.com',
previewSlug: 'previewSlug',
version: '1.0.0',
};
const result = await sdk.doc.createDoc(input);
console.log(result);
})();
- 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(-78525559.7231166, -18337681.165534973, 96884780.2322757);
console.log(result);
})();
- 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);
})();
- 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);
})();
- 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(-1208021.57346192);
console.log(result);
})();
- 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(-38645302.20467453);
console.log(result);
})();
- 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, -72361951.85604717);
console.log(result);
})();
- 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(99005808.24572289);
console.log(result);
})();
- 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);
})();
- 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.subscription.getActiveSubscription(94927508.54225919);
console.log(result);
})();
- 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.subscription.cancelActiveSubscription(28137269.918771774);
console.log(result);
})();
- 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.subscription.getActiveSubscriptionStatus(-60324283.38277111);
console.log(result);
})();
- 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.subscription.getSubscriptionPaymentMethodUpdateLink(
-24282899.206446946,
99438063.55804378,
);
console.log(result);
})();
- 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.subscription.getCheckoutLink(
-97183809.03663148,
-36731155.57521198,
'year',
);
console.log(result);
})();
- HTTP Method: POST
- Endpoint: /orgs/{orgId}/subscriptions/open-source
Required Parameters
Name | Type | Description |
---|---|---|
orgId | number | |
input | object | Request body. |
Return Type
SubscriptionResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });
(async () => {
const input = { openSourceProjectUrl: 'https://github.com/liblaber/api' };
const result = await sdk.subscription.createOpenSourceSubscription(input, -65779837.96204188);
console.log(result);
})();
- 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);
})();
- HTTP Method: POST
- Endpoint: /payment-provider/stripe/subscriptions/sync
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.syncStripeSubscriptions();
console.log(result);
})();
- 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);
})();
- 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);
})();
- 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(8830582.698466301, -63169394.912257195, {
orgId: 99842719.24795645,
email: 'email',
firstName: 'firstName',
lastName: 'lastName',
orgIds: [83448460.90504241, 82026844.19600496],
sortBy: 'createdAt',
direction: 'desc',
});
console.log(result);
})();
- 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(26823139.940286905);
console.log(result);
})();
- 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 = {
email: 'someone@example.com',
firstName: 'John',
isEnabled: true,
isLiblabAdmin: true,
lastName: 'Doe',
refreshTokenHash: 'refreshTokenHash',
};
const result = await sdk.user.updateUser(input, -24653011.15650305);
console.log(result);
})();
- 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(41644941.29451275);
console.log(result);
})();
- 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);
})();
- 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(42374810.85676661, -95424349.09221289);
console.log(result);
})();
- 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);
})();
- 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(74793872.44383249);
console.log(result);
})();
- 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: '2024-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);
})();
- 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(46662221.82019371);
console.log(result);
})();
- 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(51591848.27792585);
console.log(result);
})();
- 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(-33281085.52785687);
console.log(result);
})();
- 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, 36126475.90427688);
console.log(result);
})();
- 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);
})();
- 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);
})();
- 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(-24375352.674071938, -3464051.2007071674);
console.log(result);
})();
- 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(45193843.37628311, -9013804.421277493);
console.log(result);
})();
- 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(21003885.179783493, -89088412.17851742, {
orgName: 'orgName',
status: 'REDEEMED',
sortBy: 'createdAt',
direction: 'desc',
});
console.log(result);
})();
- 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);
})();
- 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);
})();
- 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);
})();
- 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(68205751.0917134);
console.log(result);
})();
- HTTP Method: POST
- Endpoint: /spec/validate
Required Parameters
| input | object | Request body. |
Return Type
ValidateSpecResponse
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.spec.validateSpec(input);
console.log(result);
})();
- 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);
})();
- 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);
})();
- 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(66220480.66495013, -31578833.88995403, 'searchQuery');
console.log(result);
})();
- HTTP Method: POST
- Endpoint: /ai/ask-about-spec
Required Parameters
| input | object | Request body. |
Return Type
AskAboutSpecResponse
Example Usage Code Snippet
import { Liblab } from '@liblab/sdk';
const sdk = new Liblab({ 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);
})();
- 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);
})();
- 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(-82213463.15144044, -69163959.59860042, {
email: 'email',
orgId: 33552526.19611071,
sortBy: 'timestamp',
direction: 'desc',
orgIds: [69974003.85694826, -90574864.32546203],
eventIds: [27728325.954479784, 46468591.662644],
});
console.log(result);
})();
- 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: 'email',
orgId: -61670013.41995748,
filename: 'filename',
orgIds: [-44136752.19071029, 24949078.963252887],
eventIds: [72416542.43601352, 64688483.11460143],
});
console.log(result);
})();
- 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);
})();
License: MIT. See license in LICENSE.