npm package: @liblab/sdk
Description: Liblab
Author: Liblab
Latest version: 0.1.499

# Liblab Typescript SDK 0.1.499

The Typescript SDK for Liblab.

- API version: 0.1.499
- SDK version: 0.1.499

## Table of Contents

- [Installation](#installation)
- [Authentication](#authentication)
  - [Access Token](#access-token)
- [API Endpoint Services](#api-endpoint-services)
- [API Models](#api-models)
- [Sample Usage](#sample-usage)
- [Environments](#environments)
- [Liblab Services](#liblab-services)
- [License](#license)

## Installation

```sh
npm install sdk
```

## Authentication

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

### Access Token

The Liblab API uses access tokens as a form of authentication. You can set the access token when initializing the SDK through the constructor:

```
const sdk = new Liblab('YOUR_ACCESS_TOKEN')
```

Or through the `setAccessToken` method:

```
const sdk = new Liblab()
sdk.setAccessToken('YOUR_ACCESS_TOKEN')
```

You can also set it for each service individually:

```
const sdk = new Liblab()
sdk.build.setAccessToken('YOUR_ACCESS_TOKEN')
```

## Sample Usage

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

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

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


const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  try {
    const result = await sdk.build
      .getBuildStatuses();
    console.log(result);
  } catch (err) {
    const error = err as Error;
    console.error(error.message);
  }
})();


```

## Environments

Here is the list of all available environments:

```Typescript
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:

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

# Liblab Services

A list of all services and services methods.

- Services

  - [Build](#build)

  - [Api](#api)

  - [Org](#org)

  - [OrgMember](#orgmember)

  - [Artifact](#artifact)

  - [Sdk](#sdk)

  - [Doc](#doc)

  - [HubSpot](#hubspot)

  - [OrgSubscriptions](#orgsubscriptions)

  - [OrgMcpSubscriptions](#orgmcpsubscriptions)

  - [Subscriptions](#subscriptions)

  - [PaymentProvider](#paymentprovider)

  - [User](#user)

  - [McpServer](#mcpserver)

  - [Snippets](#snippets)

  - [Integration](#integration)

  - [Workflows](#workflows)

  - [SpecValidation](#specvalidation)

  - [Token](#token)

  - [Invitation](#invitation)

  - [Auth0](#auth0)

  - [Plan](#plan)

  - [Invoice](#invoice)

  - [HealthCheck](#healthcheck)

  - [Tags](#tags)

  - [Ai](#ai)

  - [Feedback](#feedback)

  - [UserEvent](#userevent)

  - [ThirdPartyApplications](#thirdpartyapplications)

  - [SpecFixer](#specfixer)

- [All Methods](#all-methods)

## Build

| Method                                      | Description |
| :------------------------------------------ | :---------- |
| [createBuild](#createbuild)                 |             |
| [getBuilds](#getbuilds)                     |             |
| [createSimpleBuild](#createsimplebuild)     |             |
| [createBuildArtifact](#createbuildartifact) |             |
| [getBuildStatuses](#getbuildstatuses)       |             |
| [getById](#getbyid)                         |             |
| [removeById](#removebyid)                   |             |
| [tag](#tag)                                 |             |
| [untag](#untag)                             |             |
| [approveBuild](#approvebuild)               |             |
| [unApproveBuild](#unapprovebuild)           |             |

## Api

| Method                                                  | Description |
| :------------------------------------------------------ | :---------- |
| [getApiBuilds](#getapibuilds)                           |             |
| [getApiBuildTags](#getapibuildtags)                     |             |
| [getApiSdks](#getapisdks)                               |             |
| [getApiDocs](#getapidocs)                               |             |
| [createApi](#createapi)                                 |             |
| [getApis](#getapis)                                     |             |
| [searchApis](#searchapis)                               |             |
| [getApiById](#getapibyid)                               |             |
| [updateApi](#updateapi)                                 |             |
| [getApiMembers](#getapimembers)                         |             |
| [removeApi](#removeapi)                                 |             |
| [getApiByOrgSlugAndApiSlug](#getapibyorgslugandapislug) |             |

## Org

| Method                              | Description |
| :---------------------------------- | :---------- |
| [createOrg](#createorg)             |             |
| [getOrgs](#getorgs)                 |             |
| [searchOrgs](#searchorgs)           |             |
| [getOrgById](#getorgbyid)           |             |
| [updateOrg](#updateorg)             |             |
| [removeOrg](#removeorg)             |             |
| [getApisByOrg](#getapisbyorg)       |             |
| [getOrgJobs](#getorgjobs)           |             |
| [getDocsByOrg](#getdocsbyorg)       |             |
| [getBuildByOrg](#getbuildbyorg)     |             |
| [getOrgApiBuilds](#getorgapibuilds) |             |
| [getOrgArtifacts](#getorgartifacts) |             |

## OrgMember

| Method                                  | Description |
| :-------------------------------------- | :---------- |
| [createMember](#createmember)           |             |
| [getByOrgId](#getbyorgid)               |             |
| [updateMember](#updatemember)           |             |
| [removeMember](#removemember)           |             |
| [leaveOrg](#leaveorg)                   |             |
| [enableAllMembers](#enableallmembers)   |             |
| [disableAllMembers](#disableallmembers) |             |

## Artifact

| Method                                      | Description |
| :------------------------------------------ | :---------- |
| [createArtifact](#createartifact)           |             |
| [getArtifacts](#getartifacts)               |             |
| [getArtifactStatuses](#getartifactstatuses) |             |
| [getArtifactLogs](#getartifactlogs)         |             |
| [getArtifactById](#getartifactbyid)         |             |
| [removeArtifact](#removeartifact)           |             |

## Sdk

| Method                    | Description |
| :------------------------ | :---------- |
| [createSdk](#createsdk)   |             |
| [findSdks](#findsdks)     |             |
| [getSdkById](#getsdkbyid) |             |
| [removeSdk](#removesdk)   |             |

## Doc

| Method                                                                  | Description |
| :---------------------------------------------------------------------- | :---------- |
| [getApprovedByOrgSlugAndApiSlug](#getapprovedbyorgslugandapislug)       |             |
| [getAllApprovedByOrgSlugAndApiSlug](#getallapprovedbyorgslugandapislug) |             |
| [createDoc](#createdoc)                                                 |             |
| [findDocs](#finddocs)                                                   |             |
| [approve](#approve)                                                     |             |
| [unapprove](#unapprove)                                                 |             |
| [getDocById](#getdocbyid)                                               |             |
| [removeDoc](#removedoc)                                                 |             |
| [updateDoc](#updatedoc)                                                 |             |
| [getDownloadUrl](#getdownloadurl)                                       |             |

## HubSpot

| Method                            | Description |
| :-------------------------------- | :---------- |
| [sendShadowForm](#sendshadowform) |             |

## OrgSubscriptions

| Method                                                                            | Description |
| :-------------------------------------------------------------------------------- | :---------- |
| [getActiveSubscription](#getactivesubscription)                                   |             |
| [cancelActiveSubscription](#cancelactivesubscription)                             |             |
| [getActiveSubscriptionStatus](#getactivesubscriptionstatus)                       |             |
| [getSubscriptionPaymentMethodUpdateLink](#getsubscriptionpaymentmethodupdatelink) |             |
| [getCheckoutLink](#getcheckoutlink)                                               |             |

## OrgMcpSubscriptions

| Method                                          | Description |
| :---------------------------------------------- | :---------- |
| [getMcpSubscription](#getmcpsubscription)       |             |
| [updateMcpSubscription](#updatemcpsubscription) |             |

## Subscriptions

| Method                                                | Description |
| :---------------------------------------------------- | :---------- |
| [getSubscriptionsOverview](#getsubscriptionsoverview) |             |

## PaymentProvider

| Method                                                  | Description |
| :------------------------------------------------------ | :---------- |
| [stripeWebhook](#stripewebhook)                         |             |
| [syncStripeSubscriptions](#syncstripesubscriptions)     |             |
| [createStripePortalSession](#createstripeportalsession) |             |

## User

| Method                                              | Description |
| :-------------------------------------------------- | :---------- |
| [getCurrentUser](#getcurrentuser)                   |             |
| [createUser](#createuser)                           |             |
| [getUsers](#getusers)                               |             |
| [getUserById](#getuserbyid)                         |             |
| [updateUser](#updateuser)                           |             |
| [removeUser](#removeuser)                           |             |
| [updateEmailSubscription](#updateemailsubscription) |             |
| [getUserOrgs](#getuserorgs)                         |             |
| [getUserApis](#getuserapis)                         |             |

## McpServer

| Method                                                          | Description |
| :-------------------------------------------------------------- | :---------- |
| [createMcpServerDeployment](#createmcpserverdeployment)         |             |
| [getMcpServerDeployments](#getmcpserverdeployments)             |             |
| [getMcpServerDeploymentMetrics](#getmcpserverdeploymentmetrics) |             |
| [orgHadPreviousMcpDeployments](#orghadpreviousmcpdeployments)   |             |
| [getMcpServerDeploymentById](#getmcpserverdeploymentbyid)       |             |
| [updateMcpServerDeployment](#updatemcpserverdeployment)         |             |
| [deleteMcpServerDeployment](#deletemcpserverdeployment)         |             |
| [getMcpServerPauseStatus](#getmcpserverpausestatus)             |             |
| [setMcpServerPauseStatus](#setmcpserverpausestatus)             |             |
| [setMcpCustomHostname](#setmcpcustomhostname)                   |             |
| [deleteMcpCustomHostname](#deletemcpcustomhostname)             |             |
| [verifyMcpCustomHostname](#verifymcpcustomhostname)             |             |

## Snippets

| Method                                        | Description |
| :-------------------------------------------- | :---------- |
| [getSnippetsByBuildId](#getsnippetsbybuildid) |             |

## Integration

| Method                                                              | Description |
| :------------------------------------------------------------------ | :---------- |
| [createIntegrationBuild](#createintegrationbuild)                   |             |
| [createPostmanIntegrationBuild](#createpostmanintegrationbuild)     |             |
| [createPostmanServiceWorkerToken](#createpostmanserviceworkertoken) |             |
| [getPostmanServiceWorkerTokens](#getpostmanserviceworkertokens)     |             |
| [createIntegrationCredentials](#createintegrationcredentials)       |             |
| [getIntegrationCredentials](#getintegrationcredentials)             |             |
| [updateIntegrationCredentials](#updateintegrationcredentials)       |             |
| [deleteIntegrationCredentials](#deleteintegrationcredentials)       |             |

## Workflows

| Method                              | Description |
| :---------------------------------- | :---------- |
| [uploadWorkflows](#uploadworkflows) |             |

## SpecValidation

| Method                                  | Description |
| :-------------------------------------- | :---------- |
| [validateSpec](#validatespec)           |             |
| [getSpecValidation](#getspecvalidation) |             |

## Token

| Method                                    | Description |
| :---------------------------------------- | :---------- |
| [createToken](#createtoken)               |             |
| [findTokensByUserId](#findtokensbyuserid) |             |
| [getTokenById](#gettokenbyid)             |             |
| [removeToken](#removetoken)               |             |

## Invitation

| Method                                    | Description |
| :---------------------------------------- | :---------- |
| [createOrgInvite](#createorginvite)       |             |
| [redeemInvite](#redeeminvite)             |             |
| [declineInvite](#declineinvite)           |             |
| [cancelInvite](#cancelinvite)             |             |
| [getReceivedInvites](#getreceivedinvites) |             |
| [getSentInvites](#getsentinvites)         |             |
| [searchInvites](#searchinvites)           |             |
| [getInviteByCode](#getinvitebycode)       |             |

## Auth0

| Method                                                    | Description |
| :-------------------------------------------------------- | :---------- |
| [resetPasswordAuth0](#resetpasswordauth0)                 |             |
| [passwordlessVerifyPassword](#passwordlessverifypassword) |             |
| [passwordlessSetupPassword](#passwordlesssetuppassword)   |             |

## Plan

| Method                              | Description |
| :---------------------------------- | :---------- |
| [getEnabledPlans](#getenabledplans) |             |

## Invoice

| Method                            | Description |
| :-------------------------------- | :---------- |
| [getOrgInvoices](#getorginvoices) |             |

## HealthCheck

| Method                                                    | Description |
| :-------------------------------------------------------- | :---------- |
| [healthCheckControllerCheck](#healthcheckcontrollercheck) |             |

## Tags

| Method            | Description |
| :---------------- | :---------- |
| [create](#create) |             |
| [search](#search) |             |

## Ai

| Method                            | Description     |
| :-------------------------------- | :-------------- |
| [queryDocuments](#querydocuments) | Query documents |

## Feedback

| Method                        | Description |
| :---------------------------- | :---------- |
| [sendFeedback](#sendfeedback) |             |

## UserEvent

| Method                                              | Description |
| :-------------------------------------------------- | :---------- |
| [getUserEvents](#getuserevents)                     |             |
| [exportUserEventsToCsv](#exportusereventstocsv)     |             |
| [trackUserPublishPrEvent](#trackuserpublishprevent) |             |

## ThirdPartyApplications

| Method                                                                                    | Description |
| :---------------------------------------------------------------------------------------- | :---------- |
| [thirdPartyApplicationsControllerCreate](#thirdpartyapplicationscontrollercreate)         |             |
| [thirdPartyApplicationsControllerGetAll](#thirdpartyapplicationscontrollergetall)         |             |
| [thirdPartyApplicationsControllerGetByOrgId](#thirdpartyapplicationscontrollergetbyorgid) |             |
| [thirdPartyApplicationsControllerDeleteById](#thirdpartyapplicationscontrollerdeletebyid) |             |

## SpecFixer

| Method              | Description |
| :------------------ | :---------- |
| [fixSpec](#fixspec) |             |

## All Methods

### **createBuild**

- HTTP Method: POST
- Endpoint: /builds

**Required Parameters**

| input | object | Request body. |

**Return Type**

BuildResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **getBuilds**

- HTTP Method: GET
- Endpoint: /builds

**Required Parameters**

| Name    | Type   | Description |
| :------ | :----- | :---------- |
| offset  | number |             |
| limit   | number |             |
| orgId   | number |             |
| apiSlug | string |             |

**Return Type**

PaginatedBuildResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const result = await sdk.build.getBuilds(42, 10, 1, 'my-api');
  console.log(result);
})();

```

### **createSimpleBuild**

- HTTP Method: POST
- Endpoint: /builds/simple

**Required Parameters**

| input | object | Request body. |

**Return Type**

BuildResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const input = {
    apiId: 1,
    authentication: {},
    baseUrl: 'https://api-dev.liblab.com',
    docs: ['enhancedApiSpec', 'snippets', 'api'],
    languages: ['typescript'],
    liblabVersion: '2',
    sdkName: 'liblab',
    sdkVersion: '1.0.0',
  };
  const result = await sdk.build.createSimpleBuild(input);
  console.log(result);
})();

```

### **createBuildArtifact**

- HTTP Method: POST
- Endpoint: /builds/{id}/artifact

**Required Parameters**

| Name  | Type   | Description   |
| :---- | :----- | :------------ |
| id    | number |               |
| input | object | Request body. |

**Return Type**

BuildResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const input = {};
  const result = await sdk.build.createBuildArtifact(input, -78121726.23106393);
  console.log(result);
})();

```

### **getBuildStatuses**

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

**Return Type**

GetBuildStatusesResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **getById**

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

**Required Parameters**

| Name | Type   | Description |
| :--- | :----- | :---------- |
| id   | number |             |

**Return Type**

GetBuildByIdResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **removeById**

- HTTP Method: DELETE
- Endpoint: /builds/{buildId}/{apiSlug}/{orgId}

**Required Parameters**

| Name    | Type   | Description |
| :------ | :----- | :---------- |
| buildId | number |             |
| apiSlug | string |             |
| orgId   | number |             |

**Return Type**

Returns a dict object.

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const result = await sdk.build.removeById(-26796701.109798834, 'apiSlug', -23796043.434081852);
  console.log(result);
})();

```

### **tag**

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

**Required Parameters**

| Name    | Type   | Description |
| :------ | :----- | :---------- |
| buildId | number |             |
| tagId   | number |             |

**Return Type**

Returns a dict object.

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **untag**

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

**Required Parameters**

| Name    | Type   | Description |
| :------ | :----- | :---------- |
| buildId | number |             |
| tagId   | number |             |

**Return Type**

Returns a dict object.

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **approveBuild**

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

**Required Parameters**

| Name    | Type   | Description |
| :------ | :----- | :---------- |
| buildId | number |             |

**Return Type**

Returns a dict object.

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **unApproveBuild**

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

**Required Parameters**

| Name    | Type   | Description |
| :------ | :----- | :---------- |
| buildId | number |             |

**Return Type**

Returns a dict object.

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **getApiBuilds**

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

**Required Parameters**

| Name   | Type   | Description |
| :----- | :----- | :---------- |
| id     | number |             |
| offset | number |             |
| limit  | number |             |

**Optional Parameters**

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

| Name         | Type                                         | Description |
| :----------- | :------------------------------------------- | :---------- |
| sortBy       | [SortBy](/src/models/README.md#sortby)       |             |
| direction    | [Direction](/src/models/README.md#direction) |             |
| statuses     | string[]                                     |             |
| tags         | number[]                                     |             |
| createdByIds | number[]                                     |             |

**Return Type**

PaginatedBuildResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const result = await sdk.api.getApiBuilds(104909.5033967495, 42, 10, {
    sortBy: 'status',
    direction: 'asc',
    statuses: ['FAILURE'],
    tags: [1],
    createdByIds: [1],
  });
  console.log(result);
})();

```

### **getApiBuildTags**

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

**Required Parameters**

| Name | Type   | Description |
| :--- | :----- | :---------- |
| id   | number |             |

**Return Type**

GetApiBuildTagsResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **getApiSdks**

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

**Required Parameters**

| Name   | Type   | Description |
| :----- | :----- | :---------- |
| id     | number |             |
| offset | number |             |
| limit  | number |             |

**Optional Parameters**

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

| Name         | Type                                         | Description |
| :----------- | :------------------------------------------- | :---------- |
| statuses     | string[]                                     |             |
| tags         | number[]                                     |             |
| createdByIds | number[]                                     |             |
| languages    | string[]                                     |             |
| sortBy       | [ApiSortBy](/src/models/README.md#apisortby) |             |
| direction    | [Direction](/src/models/README.md#direction) |             |

**Return Type**

PaginatedSdkResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const result = await sdk.api.getApiSdks(-54521931.00827518, 42, 10, {
    statuses: ['FAIL'],
    tags: [1],
    createdByIds: [1],
    languages: ['JAVA'],
    sortBy: 'createdAt',
    direction: 'asc',
  });
  console.log(result);
})();

```

### **getApiDocs**

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

**Required Parameters**

| Name   | Type   | Description |
| :----- | :----- | :---------- |
| id     | number |             |
| offset | number |             |
| limit  | number |             |

**Optional Parameters**

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

| Name         | Type                                         | Description |
| :----------- | :------------------------------------------- | :---------- |
| sortBy       | [ApiSortBy](/src/models/README.md#apisortby) |             |
| direction    | [Direction](/src/models/README.md#direction) |             |
| statuses     | string[]                                     |             |
| tags         | number[]                                     |             |
| createdByIds | number[]                                     |             |

**Return Type**

PaginatedDocResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const result = await sdk.api.getApiDocs(92022323.83281216, 42, 10, {
    sortBy: 'createdAt',
    direction: 'asc',
    statuses: ['FAIL'],
    tags: [1],
    createdByIds: [1],
  });
  console.log(result);
})();

```

### **createApi**

- HTTP Method: POST
- Endpoint: /apis

**Required Parameters**

| input | object | Request body. |

**Return Type**

ApiResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **getApis**

- HTTP Method: GET
- Endpoint: /apis

**Required Parameters**

| Name  | Type   | Description |
| :---- | :----- | :---------- |
| orgId | number |             |

**Optional Parameters**

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

| Name    | Type   | Description |
| :------ | :----- | :---------- |
| apiSlug | string |             |

**Return Type**

GetApisResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const result = await sdk.api.getApis(1, { apiSlug: 'my-api' });
  console.log(result);
})();

```

### **searchApis**

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

**Required Parameters**

| Name   | Type   | Description |
| :----- | :----- | :---------- |
| offset | number |             |
| limit  | number |             |

**Optional Parameters**

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

| Name      | Type                                               | Description |
| :-------- | :------------------------------------------------- | :---------- |
| name      | string                                             |             |
| sortBy    | [ApiSortBy](/src/models/README.md#apisortby)       |             |
| orgId     | number                                             |             |
| direction | [ApiDirection](/src/models/README.md#apidirection) |             |
| orgIds    | number[]                                           |             |

**Return Type**

ApisSearchPaginatedResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const result = await sdk.api.searchApis(42, 10, {
    name: 'alpaca',
    sortBy: 'createdAt',
    orgId: 1,
    direction: 'asc',
    orgIds: [1],
  });
  console.log(result);
})();

```

### **getApiById**

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

**Required Parameters**

| Name | Type   | Description |
| :--- | :----- | :---------- |
| id   | number |             |

**Return Type**

ApiResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **updateApi**

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

**Required Parameters**

| Name  | Type   | Description   |
| :---- | :----- | :------------ |
| id    | number |               |
| input | object | Request body. |

**Return Type**

ApiResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **getApiMembers**

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

**Required Parameters**

| Name | Type   | Description |
| :--- | :----- | :---------- |
| id   | number |             |

**Return Type**

GetApiMembersResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **removeApi**

- HTTP Method: DELETE
- Endpoint: /apis/delete/{apiSlug}/{orgId}

**Required Parameters**

| Name    | Type   | Description |
| :------ | :----- | :---------- |
| apiSlug | string |             |
| orgId   | number |             |

**Return Type**

Returns a dict object.

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const result = await sdk.api.removeApi('apiSlug', 36332635.412119925);
  console.log(result);
})();

```

### **getApiByOrgSlugAndApiSlug**

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

**Required Parameters**

| Name    | Type   | Description |
| :------ | :----- | :---------- |
| orgSlug | string |             |
| apiSlug | string |             |

**Return Type**

GetApiByOrgSlugAndApiSlugResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const result = await sdk.api.getApiByOrgSlugAndApiSlug('orgSlug', 'apiSlug');
  console.log(result);
})();

```

### **createOrg**

- HTTP Method: POST
- Endpoint: /orgs

**Required Parameters**

| input | object | Request body. |

**Return Type**

OrgResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **getOrgs**

- HTTP Method: GET
- Endpoint: /orgs

**Required Parameters**

| Name   | Type   | Description |
| :----- | :----- | :---------- |
| offset | number |             |
| limit  | number |             |

**Optional Parameters**

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

| Name      | Type                                         | Description |
| :-------- | :------------------------------------------- | :---------- |
| direction | [Direction](/src/models/README.md#direction) |             |
| sortBy    | [OrgSortBy](/src/models/README.md#orgsortby) |             |

**Return Type**

AdminPaginatedOrgResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const result = await sdk.org.getOrgs(42, 10, { direction: 'asc', sortBy: 'status' });
  console.log(result);
})();

```

### **searchOrgs**

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

**Required Parameters**

| Name   | Type   | Description |
| :----- | :----- | :---------- |
| offset | number |             |
| limit  | number |             |

**Optional Parameters**

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

| Name    | Type   | Description |
| :------ | :----- | :---------- |
| website | string |             |
| domain  | string |             |
| name    | string |             |

**Return Type**

AdminPaginatedOrgResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const result = await sdk.org.searchOrgs(42, 10, {
    website: 'https://liblab.com',
    domain: 'liblab.com',
    name: 'liblab',
  });
  console.log(result);
})();

```

### **getOrgById**

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

**Required Parameters**

| Name | Type   | Description |
| :--- | :----- | :---------- |
| id   | number |             |

**Return Type**

GetOrgByIdResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **updateOrg**

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

**Required Parameters**

| Name  | Type   | Description   |
| :---- | :----- | :------------ |
| id    | number |               |
| input | object | Request body. |

**Return Type**

OrgResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const input = {
    description: 'Example Org Description',
    domain: 'example.com',
    isAllowedForBeta: true,
    logoUrl: 'https://liblab.com/images/logo.png',
    name: 'Example Org',
    remainingCredits: 19,
    website: 'https://example.com',
  };
  const result = await sdk.org.updateOrg(input, 74183722.44069493);
  console.log(result);
})();

```

### **removeOrg**

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

**Required Parameters**

| Name | Type   | Description |
| :--- | :----- | :---------- |
| id   | number |             |

**Return Type**

Returns a dict object.

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **getApisByOrg**

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

**Required Parameters**

| Name | Type   | Description |
| :--- | :----- | :---------- |
| id   | number |             |

**Return Type**

GetApisByOrgResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **getOrgJobs**

- HTTP Method: GET
- Endpoint: /orgs/{id}/jobs

**Required Parameters**

| Name   | Type   | Description |
| :----- | :----- | :---------- |
| id     | number |             |
| offset | number |             |
| limit  | number |             |

**Optional Parameters**

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

| Name         | Type                                         | Description |
| :----------- | :------------------------------------------- | :---------- |
| sortBy       | [OrgSortBy](/src/models/README.md#orgsortby) |             |
| direction    | [Direction](/src/models/README.md#direction) |             |
| statuses     | string[]                                     |             |
| createdByIds | number[]                                     |             |
| apiSlug      | string                                       |             |
| apiVersion   | string                                       |             |
| buildType    | string[]                                     |             |

**Return Type**

PaginatedOrgJobsResponseWithTotalCount

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const result = await sdk.org.getOrgJobs(256439.15729390085, 42, 10, {
    sortBy: 'status',
    direction: 'asc',
    statuses: ['FAILURE'],
    createdByIds: [1],
    apiSlug: 'my-api',
    apiVersion: '1.0.0',
    buildType: ['SDK', 'DOC'],
  });
  console.log(result);
})();

```

### **getDocsByOrg**

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

**Required Parameters**

| Name | Type   | Description |
| :--- | :----- | :---------- |
| id   | number |             |

**Return Type**

GetDocsByOrgResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **getBuildByOrg**

- HTTP Method: GET
- Endpoint: /orgs/{id}/builds

**Required Parameters**

| Name   | Type   | Description |
| :----- | :----- | :---------- |
| id     | number |             |
| offset | number |             |
| limit  | number |             |

**Optional Parameters**

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

| Name         | Type                                         | Description |
| :----------- | :------------------------------------------- | :---------- |
| sortBy       | [OrgSortBy](/src/models/README.md#orgsortby) |             |
| direction    | [Direction](/src/models/README.md#direction) |             |
| statuses     | string[]                                     |             |
| tags         | number[]                                     |             |
| createdByIds | number[]                                     |             |
| apiSlug      | string                                       |             |
| apiVersion   | string                                       |             |

**Return Type**

PaginatedOrgBuildsWithJobsResponseWithTotalCount

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const result = await sdk.org.getBuildByOrg(-67762136.76150067, 42, 10, {
    sortBy: 'status',
    direction: 'asc',
    statuses: ['FAILURE'],
    tags: [1],
    createdByIds: [1],
    apiSlug: 'my-api',
    apiVersion: '1.0.0',
  });
  console.log(result);
})();

```

### **getOrgApiBuilds**

- HTTP Method: GET
- Endpoint: /orgs/{id}/api-builds

**Required Parameters**

| Name | Type   | Description |
| :--- | :----- | :---------- |
| id   | number |             |

**Return Type**

GetOrgApiBuildsResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **getOrgArtifacts**

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

**Required Parameters**

| Name   | Type   | Description |
| :----- | :----- | :---------- |
| id     | number |             |
| offset | number |             |
| limit  | number |             |

**Optional Parameters**

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

| Name          | Type                                                 | Description |
| :------------ | :--------------------------------------------------- | :---------- |
| sortBy        | [OrgSortBy](/src/models/README.md#orgsortby)         |             |
| direction     | [OrgDirection](/src/models/README.md#orgdirection)   |             |
| artifactTypes | [ArtifactTypes](/src/models/README.md#artifacttypes) |             |
| statuses      | [OrgStatuses](/src/models/README.md#orgstatuses)     |             |
| createdByIds  | number[]                                             |             |

**Return Type**

PaginatedOrgArtifactsResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const result = await sdk.org.getOrgArtifacts(19039710.90757732, 42, 10, {
    sortBy: 'status',
    direction: 'asc',
    artifactTypes: ['SDK'],
    statuses: ['IN_PROGRESS'],
    createdByIds: [1],
  });
  console.log(result);
})();

```

### **createMember**

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

**Required Parameters**

| Name  | Type   | Description   |
| :---- | :----- | :------------ |
| orgId | number |               |
| input | object | Request body. |

**Return Type**

OrgMemberResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **getByOrgId**

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

**Required Parameters**

| Name   | Type   | Description |
| :----- | :----- | :---------- |
| orgId  | number |             |
| offset | number |             |
| limit  | number |             |

**Optional Parameters**

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

| Name      | Type                                                     | Description |
| :-------- | :------------------------------------------------------- | :---------- |
| email     | string                                                   |             |
| firstName | string                                                   |             |
| lastName  | string                                                   |             |
| sortBy    | [OrgMemberSortBy](/src/models/README.md#orgmembersortby) |             |
| direction | [Direction](/src/models/README.md#direction)             |             |

**Return Type**

PaginatedOrgMemberResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const result = await sdk.orgMember.getByOrgId(-62166207.84238667, 42, 10, {
    email: 'john@liblab.com',
    firstName: 'John',
    lastName: 'Doe',
    sortBy: 'createdAt',
    direction: 'asc',
  });
  console.log(result);
})();

```

### **updateMember**

- HTTP Method: PATCH
- Endpoint: /orgs/{orgId}/members/{userId}

**Required Parameters**

| Name   | Type   | Description   |
| :----- | :----- | :------------ |
| userId | number |               |
| orgId  | number |               |
| input  | object | Request body. |

**Return Type**

OrgMemberResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **removeMember**

- HTTP Method: DELETE
- Endpoint: /orgs/{orgId}/members/{userId}

**Required Parameters**

| Name   | Type   | Description |
| :----- | :----- | :---------- |
| userId | number |             |
| orgId  | number |             |

**Return Type**

Returns a dict object.

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const result = await sdk.orgMember.removeMember(83533672.79767746, 61993940.96509114);
  console.log(result);
})();

```

### **leaveOrg**

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

**Required Parameters**

| Name  | Type   | Description |
| :---- | :----- | :---------- |
| orgId | number |             |

**Return Type**

Returns a dict object.

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **enableAllMembers**

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

**Required Parameters**

| Name  | Type   | Description |
| :---- | :----- | :---------- |
| orgId | number |             |

**Return Type**

UpdateManyOrgMembersResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **disableAllMembers**

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

**Required Parameters**

| Name  | Type   | Description |
| :---- | :----- | :---------- |
| orgId | number |             |

**Return Type**

UpdateManyOrgMembersResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **createArtifact**

- HTTP Method: POST
- Endpoint: /artifacts

**Required Parameters**

| input | object | Request body. |

**Return Type**

ArtifactResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const input = {
    artifactType: 'DOC',
    bucketKey: 'bucketKey',
    bucketName: 'bucketName',
    buildId: 1,
    status: 'SUCCESS',
  };
  const result = await sdk.artifact.createArtifact(input);
  console.log(result);
})();

```

### **getArtifacts**

- HTTP Method: GET
- Endpoint: /artifacts

**Required Parameters**

| Name    | Type   | Description |
| :------ | :----- | :---------- |
| buildId | number |             |

**Return Type**

GetArtifactsResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **getArtifactStatuses**

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

**Return Type**

GetArtifactStatusesResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **getArtifactLogs**

- HTTP Method: GET
- Endpoint: /artifacts/{id}/logs

**Required Parameters**

| Name | Type   | Description |
| :--- | :----- | :---------- |
| id   | number |             |

**Return Type**

GetArtifactLogsResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **getArtifactById**

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

**Required Parameters**

| Name | Type   | Description |
| :--- | :----- | :---------- |
| id   | number |             |

**Return Type**

ArtifactResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **removeArtifact**

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

**Required Parameters**

| Name | Type   | Description |
| :--- | :----- | :---------- |
| id   | number |             |

**Return Type**

Returns a dict object.

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **createSdk**

- HTTP Method: POST
- Endpoint: /sdks

**Required Parameters**

| input | object | Request body. |

**Return Type**

SdkResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **findSdks**

- HTTP Method: GET
- Endpoint: /sdks

**Required Parameters**

| Name   | Type   | Description |
| :----- | :----- | :---------- |
| offset | number |             |
| limit  | number |             |

**Optional Parameters**

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

| Name       | Type                                         | Description |
| :--------- | :------------------------------------------- | :---------- |
| artifactId | number                                       |             |
| sortBy     | [SdkSortBy](/src/models/README.md#sdksortby) |             |
| direction  | [Direction](/src/models/README.md#direction) |             |
| languages  | string[]                                     |             |

**Return Type**

PaginatedSdkResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const result = await sdk.sdk.findSdks(42, 10, {
    artifactId: 1,
    sortBy: 'version',
    direction: 'asc',
    languages: ['TYPESCRIPT'],
  });
  console.log(result);
})();

```

### **getSdkById**

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

**Required Parameters**

| Name | Type   | Description |
| :--- | :----- | :---------- |
| id   | number |             |

**Return Type**

SdkResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **removeSdk**

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

**Required Parameters**

| Name | Type   | Description |
| :--- | :----- | :---------- |
| id   | number |             |

**Return Type**

Returns a dict object.

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **getApprovedByOrgSlugAndApiSlug**

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

**Required Parameters**

| Name    | Type   | Description |
| :------ | :----- | :---------- |
| orgSlug | string |             |

**Optional Parameters**

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

| Name       | Type   | Description |
| :--------- | :----- | :---------- |
| apiSlug    | string |             |
| apiVersion | string |             |

**Return Type**

DocResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const result = await sdk.doc.getApprovedByOrgSlugAndApiSlug('orgSlug', {
    apiSlug: 'apiSlug',
    apiVersion: 'apiVersion',
  });
  console.log(result);
})();

```

### **getAllApprovedByOrgSlugAndApiSlug**

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

**Required Parameters**

| Name    | Type   | Description |
| :------ | :----- | :---------- |
| orgSlug | string |             |

**Optional Parameters**

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

| Name       | Type   | Description |
| :--------- | :----- | :---------- |
| apiSlug    | string |             |
| apiVersion | string |             |

**Return Type**

GetAllApprovedByOrgSlugAndApiSlugResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const result = await sdk.doc.getAllApprovedByOrgSlugAndApiSlug('orgSlug', {
    apiSlug: 'apiSlug',
    apiVersion: 'apiVersion',
  });
  console.log(result);
})();

```

### **createDoc**

- HTTP Method: POST
- Endpoint: /docs

**Required Parameters**

| input | object | Request body. |

**Return Type**

DocCreatedResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **findDocs**

- HTTP Method: GET
- Endpoint: /docs

**Required Parameters**

| Name       | Type   | Description |
| :--------- | :----- | :---------- |
| offset     | number |             |
| limit      | number |             |
| artifactId | number |             |

**Return Type**

PaginatedDocResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const result = await sdk.doc.findDocs(42, 10, 1);
  console.log(result);
})();

```

### **approve**

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

**Required Parameters**

| Name        | Type   | Description |
| :---------- | :----- | :---------- |
| previewSlug | string |             |

**Return Type**

DocResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **unapprove**

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

**Required Parameters**

| Name        | Type   | Description |
| :---------- | :----- | :---------- |
| previewSlug | string |             |

**Return Type**

DocResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **getDocById**

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

**Required Parameters**

| Name | Type   | Description |
| :--- | :----- | :---------- |
| id   | number |             |

**Return Type**

DocResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **removeDoc**

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

**Required Parameters**

| Name | Type   | Description |
| :--- | :----- | :---------- |
| id   | number |             |

**Return Type**

Returns a dict object.

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **updateDoc**

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

**Required Parameters**

| Name  | Type   | Description   |
| :---- | :----- | :------------ |
| id    | number |               |
| input | object | Request body. |

**Return Type**

DocResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **getDownloadUrl**

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

**Required Parameters**

| Name | Type   | Description |
| :--- | :----- | :---------- |
| id   | number |             |

**Return Type**

DocDownloadResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

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

```

### **sendShadowForm**

- HTTP Method: POST
- Endpoint: /hubspot/shadow-form

**Required Parameters**

| input | object | Request body. |

**Return Type**

Returns a dict object.

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const input = { fields: [{ name: 'test-name', value: 'test-field' }] };
  const result = await sdk.hubSpot.sendShadowForm(input);
  console.log(result);
})();

```

### **getActiveSubscription**

- HTTP Method: GET
- Endpoint: /orgs/{orgId}/subscriptions/active

**Required Parameters**

| Name  | Type   | Description |
| :---- | :----- | :---------- |
| orgId | number |             |

**Return Type**

SubscriptionResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const result = await sdk.orgSubscriptions.getActiveSubscription(-71779870.69072866);
  console.log(result);
})();

```

### **cancelActiveSubscription**

- HTTP Method: POST
- Endpoint: /orgs/{orgId}/subscriptions/active/cancel

**Required Parameters**

| Name  | Type   | Description |
| :---- | :----- | :---------- |
| orgId | number |             |

**Return Type**

SubscriptionResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const result = await sdk.orgSubscriptions.cancelActiveSubscription(-14341615.16899079);
  console.log(result);
})();

```

### **getActiveSubscriptionStatus**

- HTTP Method: GET
- Endpoint: /orgs/{orgId}/subscriptions/active/state

**Required Parameters**

| Name  | Type   | Description |
| :---- | :----- | :---------- |
| orgId | number |             |

**Return Type**

GetActiveSubscriptionStatusResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const result = await sdk.orgSubscriptions.getActiveSubscriptionStatus(-89544480.58736615);
  console.log(result);
})();

```

### **getSubscriptionPaymentMethodUpdateLink**

- HTTP Method: GET
- Endpoint: /orgs/{orgId}/subscriptions/{subscriptionId}/payment-methods/update-link

**Required Parameters**

| Name           | Type   | Description |
| :------------- | :----- | :---------- |
| orgId          | number |             |
| subscriptionId | number |             |

**Return Type**

CheckoutLinkResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const result = await sdk.orgSubscriptions.getSubscriptionPaymentMethodUpdateLink(
    -93270816.62061384,
    43391077.4494361,
  );
  console.log(result);
})();

```

### **getCheckoutLink**

- HTTP Method: GET
- Endpoint: /orgs/{orgId}/subscriptions/checkout/link

**Required Parameters**

| Name            | Type                                                     | Description |
| :-------------- | :------------------------------------------------------- | :---------- |
| orgId           | number                                                   |             |
| planId          | number                                                   |             |
| billingInterval | [BillingInterval](/src/models/README.md#billinginterval) |             |

**Return Type**

CheckoutLinkResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const result = await sdk.orgSubscriptions.getCheckoutLink(-56857549.38173915, 1, 'year');
  console.log(result);
})();

```

### **getMcpSubscription**

- HTTP Method: GET
- Endpoint: /orgs/{orgId}/mcp-subscription

**Required Parameters**

| Name  | Type   | Description |
| :---- | :----- | :---------- |
| orgId | number |             |

**Return Type**

McpSubscriptionResponse

**Example Usage Code Snippet**

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

const sdk = new Liblab({ accessToken: process.env.LIBLAB_ACCESS_TOKEN });

(async () => {
  const result = await sdk.orgMcpSubscriptions.getMcpSubscription(-47425895.55909884);
  console.log(result);
})();

```

### **updateMcpSubscription**

- HTTP Method: PATCH
- Endpoint: /orgs/{orgId}/mcp-subscription

**Required Parameters**

| Name  | Type   | Description   |
| :---- | :----- | :------------ |
| orgId | number |               |
| input | object | Request body. |

**Return Type**