Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@liblab/sdk
Advanced tools
The Typescript SDK for Liblab.
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 | |
createSimpleBuild | |
createBuildArtifact | |
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 |
Method | Description |
---|---|
getSubscriptionsOverview |
Method | Description |
---|---|
stripeWebhook | |
syncStripeSubscriptions |
Method | Description |
---|---|
getCurrentUser | |
createUser | |
getUsers | |
getUserById | |
updateUser | |
removeUser | |
updateEmailSubscription | |
getUserOrgs | |
getUserApis |
Method | Description |
---|---|
getSnippetsByBuildId |
Method | Description |
---|---|
uploadWorkflows |
Method | Description |
---|---|
validateSpec | |
getSpecValidation |
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 |
---|---|
healthCheckControllerCheck |
Method | Description |
---|---|
create | |
search |
Method | Description |
---|---|
askAboutSpec |
Method | Description |
---|---|
sendFeedback |
Method | Description |
---|---|
getUserEvents | |
exportUserEventsToCsv | |
trackUserPublishPrEvent |
Method | Description |
---|---|
thirdPartyApplicationsControllerCreate | |
thirdPartyApplicationsControllerGetAll | |
thirdPartyApplicationsControllerGetByOrgId | |
thirdPartyApplicationsControllerDeleteById |
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);
})();
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(
-26195998.696531534,
-63884222.88496331,
-51269954.78529634,
'apiSlug',
);
console.log(result);
})();
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);
})();
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, -43470051.93980795);
console.log(result);
})();
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);
})();
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(54936556.78644273);
console.log(result);
})();
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(-56153399.67561184, 'apiSlug', 52018195.097875744);
console.log(result);
})();
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(-87680293.12545376, -99492721.44880491);
console.log(result);
})();
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(78385637.25515833, -20579254.500724137);
console.log(result);
})();
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(-92322074.6050573);
console.log(result);
})();
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(45432635.24396294);
console.log(result);
})();
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(
12472897.396942616,
94507927.92777419,
-67560757.85295717,
{
sortBy: 'startTime',
direction: 'asc',
statuses: ['SUCCESS', 'IN_PROGRESS'],
tags: [-57180466.13091037, -50277832.27782936],
createdByIds: [-66526462.17565761, 9331997.834213153],
},
);
console.log(result);
})();
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(73223864.71236816);
console.log(result);
})();
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(
-12420006.997838497,
80881697.88418171,
-98060551.42246598,
{
statuses: ['IN_PROGRESS', 'SUCCESS'],
tags: [6456611.233738482, 23981491.61572571],
createdByIds: [-26563017.853061542, 28624427.0893147],
languages: ['JAVA', 'PYTHON'],
sortBy: 'createdAt',
direction: 'asc',
},
);
console.log(result);
})();
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(
-64542173.08134491,
-93626401.80008341,
-8083504.256527498,
{
sortBy: 'createdAt',
direction: 'asc',
statuses: ['SUCCESS', 'SUCCESS'],
tags: [-73721853.83341186, -78705889.2673977],
createdByIds: [59097536.18168473, -26261828.11328435],
},
);
console.log(result);
})();
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);
})();
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(16666007.09532769, { apiSlug: 'apiSlug' });
console.log(result);
})();
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(-36341795.85625272, -30461844.267085925, {
name: 'name',
sortBy: 'createdAt',
orgId: 29797846.577876538,
direction: 'desc',
orgIds: [-27337952.227444753, -37645583.88510317],
});
console.log(result);
})();
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(48716275.071998805);
console.log(result);
})();
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, -72838308.61052239);
console.log(result);
})();
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(-38887483.1429062);
console.log(result);
})();
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', -42387267.4569075);
console.log(result);
})();
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);
})();
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);
})();
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(33232490.444174394, -7465257.356030613, {
direction: 'asc',
sortBy: 'createdAt',
});
console.log(result);
})();
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(-80117932.50953704, -84317405.74177897, {
website: 'website',
domain: 'domain',
name: 'name',
});
console.log(result);
})();
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(-86428925.39149863);
console.log(result);
})();
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, -9032599.470900312);
console.log(result);
})();
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(-36350411.56851662);
console.log(result);
})();
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(-23687809.27302967);
console.log(result);
})();
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(
-9438198.50286612,
-34743708.20855528,
-10974666.692829922,
{
sortBy: 'createdAt',
direction: 'asc',
statuses: ['IN_PROGRESS', 'SUCCESS'],
createdByIds: [-54028355.34931056, -93076570.40762623],
apiSlug: 'apiSlug',
apiVersion: 'apiVersion',
buildType: ['SNIPPETS', 'SNIPPETS'],
},
);
console.log(result);
})();
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(52760456.09353149);
console.log(result);
})();
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(
-39994201.33876592,
46178345.78885889,
-49283340.98616236,
{
sortBy: 'status',
direction: 'asc',
statuses: ['IN_PROGRESS', 'FAILURE'],
tags: [-67447397.95481794, -92433813.4840227],
createdByIds: [-13168594.527776942, 42927232.72847843],
apiSlug: 'apiSlug',
apiVersion: 'apiVersion',
},
);
console.log(result);
})();
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(1232513.0654929727);
console.log(result);
})();
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(
-56112740.99888637,
-15718464.332838029,
-40251030.8512076,
{
sortBy: 'startTime',
direction: 'desc',
artifactTypes: ['DOC', 'SDK'],
statuses: [{ imports: [] }, { imports: [] }],
createdByIds: [-459265.5257984847, -43939533.84079774],
},
);
console.log(result);
})();
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, 758980.0751495659);
console.log(result);
})();
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(
-76773640.0409679,
-3792044.3928818256,
-36071072.42195735,
{
email: 'email',
firstName: 'firstName',
lastName: 'lastName',
sortBy: 'role',
direction: 'asc',
},
);
console.log(result);
})();
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, -68827819.34355822, -25036610.48747401);
console.log(result);
})();
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(-87288799.1050332, 5523032.753573135);
console.log(result);
})();
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(-92302903.66736832);
console.log(result);
})();
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(-72396595.9977412);
console.log(result);
})();
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(-9346261.757938296);
console.log(result);
})();
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);
})();
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(93282666.82370135);
console.log(result);
})();
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);
})();
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(82877705.47756663);
console.log(result);
})();
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(-53679654.92501909);
console.log(result);
})();
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);
})();
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(-35595690.907410435, -26192485.970257714, {
artifactId: -49887736.26726215,
sortBy: 'language',
direction: 'asc',
languages: ['TERRAFORM', 'JAVA'],
});
console.log(result);
})();
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(-35055447.50221543);
console.log(result);
})();
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(15522094.472521216);
console.log(result);
})();
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);
})();
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);
})();
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: -14377777.84719558,
artifactId: 1,
fileLocation: 'https://example.com',
previewSlug: 'previewSlug',
version: '1.0.0',
};
const result = await sdk.doc.createDoc(input);
console.log(result);
})();
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(68454911.5017691, -4024174.8553486913, 63911722.9625974);
console.log(result);
})();
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);
})();
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);
})();
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(-34707595.429252654);
console.log(result);
})();
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(47247667.691043794);
console.log(result);
})();
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, -70625429.31192799);
console.log(result);
})();
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(22428250.80991064);
console.log(result);
})();
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);
})();
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(52858802.9932538);
console.log(result);
})();
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(-82739155.64435458);
console.log(result);
})();
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(72392822.15924957);
console.log(result);
})();
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(
24636610.338778913,
2441734.0760813504,
);
console.log(result);
})();
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(
-57803412.27873147,
-44094682.98046213,
'month',
);
console.log(result);
})();
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);
})();
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);
})();
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);
})();
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);
})();
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);
})();
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(-86731923.19317144, -51877924.11346012, {
orgId: 16169619.51101312,
email: 'email',
firstName: 'firstName',
lastName: 'lastName',
orgIds: [-46249700.69926651, -7460878.150288776],
sortBy: 'createdAt',
direction: 'desc',
});
console.log(result);
})();
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(19185561.566808358);
console.log(result);
})();
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, -39100936.570502445);
console.log(result);
})();
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(-11363032.598190248);
console.log(result);
})();
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);
})();
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(-22714129.237648845, -71828249.44561696);
console.log(result);
})();
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);
})();
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(-57686159.30759702);
console.log(result);
})();
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);
})();
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);
})();
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(-32784362.859456763);
console.log(result);
})();
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);
})();
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(-84218491.234369);
console.log(result);
})();
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(99138024.75642928);
console.log(result);
})();
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(-18956591.004108027);
console.log(result);
})();
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, -68737394.98053561);
console.log(result);
})();
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);
})();
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);
})();
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(40053748.803809196, -52604104.76923693);
console.log(result);
})();
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(-10571510.30761312, -87439856.27081333);
console.log(result);
})();
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(22837157.493602827, -81058654.09075159, {
orgName: 'orgName',
status: 'REVOKED',
sortBy: 'createdAt',
direction: 'desc',
});
console.log(result);
})();
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);
})();
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);
})();
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);
})();
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(-48526009.29102002);
console.log(result);
})();
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);
})();
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);
})();
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(81803548.19100714, -25935169.52689828, 'searchQuery');
console.log(result);
})();
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);
})();
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);
})();
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(91157212.9932113, -70547372.34416653, {
email: 'email',
orgId: -30987598.782736152,
sortBy: 'timestamp',
direction: 'desc',
orgIds: [80816576.61878806, -87882812.3012911],
eventIds: [59185040.081556976, -57467109.60669552],
});
console.log(result);
})();
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: 43611509.57485646,
filename: 'filename',
orgIds: [20012303.730645, 78481353.14283985],
eventIds: [-55737691.53081525, -72817873.86652878],
});
console.log(result);
})();
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);
})();
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);
})();
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);
})();
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(
-85414528.28650007,
);
console.log(result);
})();
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(
12147752.080186829,
);
console.log(result);
})();
License: MIT. See license in LICENSE.
FAQs
Liblab
The npm package @liblab/sdk receives a total of 0 weekly downloads. As such, @liblab/sdk popularity was classified as not popular.
We found that @liblab/sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.