@lokalise/node-api
Version:
Official Lokalise API 2.0 Node.js client
68 lines (49 loc) • 1.45 kB
Markdown
**Please note that this endpoint requires an instance of `LokaliseApiOta` with a JWT. Refer to the [OTA introduction article to learn more](https://lokalise.github.io/node-lokalise-api/ota/introduction).**
[](https://developers.lokalise.com/reference/list-bundles)
```ts
const bundles = await lokaliseApiOta.otaBundleManagement().list({
teamId: 123,
lokaliseProjectId: "123.abc",
});
bundles[0].id; // 56789
```
[](https://developers.lokalise.com/reference/get-bundle)
```ts
const bundleId = 5678;
const bundle = await lokaliseApiOta.otaBundleManagement().get(bundleId, {
teamId: 123,
lokaliseProjectId: "123.abc",
});
bundle.isProduction; // true
bundle.description; // "My demo bundle"
```
[](https://developers.lokalise.com/reference/update-bundle)
```ts
const bundleId = 5678;
const bundle = await lokaliseApiOta.otaBundleManagement().update(
bundleId,
{
description: "updated",
},
{
teamId: 123,
lokaliseProjectId: "123.abc",
},
);
bundle.description; // "updated"
```
[](https://developers.lokalise.com/reference/detele-bundle)
```ts
const response = await lokaliseApiOta
.otaBundleManagement()
.delete(tokenIdDelete, {
teamId: teamId,
lokaliseProjectId: projectId,
});
response.deleted; // true
```