Skip to content

Commit

Permalink
v12.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bodrovis committed Oct 15, 2024
1 parent c867a9e commit fc978f9
Show file tree
Hide file tree
Showing 30 changed files with 319 additions and 311 deletions.
12 changes: 11 additions & 1 deletion docs/additional_info/changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## Unreleased
## 12.8.0 (15-Oct-2024)

* Added support for a new [`PermissionTemplates` endpoint](https://developers.lokalise.com/reference/list-all-permission-templates):

Expand All @@ -26,6 +26,16 @@ const user_group = await lokaliseApi.userGroups().get(groupId, {
user_group.role_id; // => 5
```

* Added `role_id` attribute to the contributor object. For example:

```js
const contributor = await lokaliseApi.contributors().get(userId, {
project_id: projectId,
});

contributor.role_id; // => 5
```

* Migrate from eslint to biome
* Use tsup for compilation

Expand Down
14 changes: 6 additions & 8 deletions docs/api/branches.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# Branches

[Branches attributes](https://app.lokalise.com/api2docs/curl/#resource-branches)

## Fetch branches

[API doc](https://app.lokalise.com/api2docs/curl/#transition-list-all-branches-get)
[API doc](https://developers.lokalise.com/reference/list-all-branches)

```js
const branches = await lokaliseApi.branches().list({project_id: project_id, page: 2, limit: 3});
Expand All @@ -14,7 +12,7 @@ branches.items[0].branch_id;

## Fetch branch

[API doc](https://app.lokalise.com/api2docs/curl/#transition-retrieve-a-branch-get)
[API doc](https://developers.lokalise.com/reference/retrieve-a-branch)

```js
const branch = await lokaliseApi.branches().get(branch_id, {project_id: project_id});
Expand All @@ -24,7 +22,7 @@ branch.name;

## Create branch

[API doc](https://app.lokalise.com/api2docs/curl/#transition-retrieve-a-branch-get)
[API doc](https://developers.lokalise.com/reference/retrieve-a-branch)

```js
const branch = await lokaliseApi.branches().create(
Expand All @@ -37,7 +35,7 @@ branch.name;

## Update branch

[API doc](https://app.lokalise.com/api2docs/curl/#transition-update-a-branch-put)
[API doc](https://developers.lokalise.com/reference/update-a-branch)

```js
const branch = await lokaliseApi.branches().update(branch_id,
Expand All @@ -50,7 +48,7 @@ branch.name;

## Delete branch

[API doc](https://app.lokalise.com/api2docs/curl/#transition-delete-a-branch-delete)
[API doc](https://developers.lokalise.com/reference/delete-a-branch)

```js
const response = await lokaliseApi.branches().delete(branch_id, {project_id: project_id});
Expand All @@ -60,7 +58,7 @@ response.branch_deleted;

## Merge branch

[API doc](https://app.lokalise.com/api2docs/curl/#transition-merge-a-branch-post)
[API doc](https://developers.lokalise.com/reference/merge-a-branch)

```js
const response = await lokaliseApi.branches().merge(branch_id_to_merge,
Expand Down
12 changes: 6 additions & 6 deletions docs/api/comments.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Comments

[Comments attributes](https://app.lokalise.com/api2docs/curl/#resource-comments)
[Comments attributes](https://developers.lokalise.com/reference/comment-object)

## Fetch project comments

[API doc](https://app.lokalise.com/api2docs/curl/#transition-list-project-comments-get)
[API doc](https://developers.lokalise.com/reference/list-project-comments)

```js
const comments = await lokaliseApi.comments().list_project_comments({
Expand All @@ -18,7 +18,7 @@ comments.items[0].comment_id;

## Fetch key comments

[API doc](https://app.lokalise.com/api2docs/curl/#transition-list-key-comments-get)
[API doc](https://developers.lokalise.com/reference/list-key-comments)

```js
const comments = lokaliseApi.comments().list({
Expand All @@ -33,7 +33,7 @@ comments.items[0].comment_id;

## Create key comments

[API doc](https://app.lokalise.com/api2docs/curl/#transition-create-comments-post)
[API doc](https://developers.lokalise.com/reference/create-comments)

```js
const comments = await lokaliseApi.comments().create(
Expand All @@ -47,7 +47,7 @@ comments[0].comment;

## Fetch key comment

[API doc](https://app.lokalise.com/api2docs/curl/#transition-retrieve-a-comment-get)
[API doc](https://developers.lokalise.com/reference/retrieve-a-comment)

```js
const comment = await lokaliseApi.comments().get(comment_id, {project_id: project_id, key_id: key_id});
Expand All @@ -57,7 +57,7 @@ comment.comment_id;

## Delete key comment

[API doc](https://app.lokalise.com/api2docs/curl/#transition-delete-a-comment-delete)
[API doc](https://developers.lokalise.com/reference/delete-a-comment)

```js
const response = await lokaliseApi.comments().delete(comment_id, {project_id: project_id, key_id: key_id});
Expand Down
12 changes: 7 additions & 5 deletions docs/api/contributors.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Contributors

[Contributor attributes](https://developers.lokalise.com/reference/contributor-object)

## Fetch contributors

[API doc](https://app.lokalise.com/api2docs/curl/#transition-list-all-contributors-get)
[API doc](https://developers.lokalise.com/reference/list-all-contributors)

```js
const contributors = await lokaliseApi.contributors().list({
Expand All @@ -16,7 +18,7 @@ contributors.items[0].user_id;

## Fetch a single contributor

[API doc](https://app.lokalise.com/api2docs/curl/#transition-retrieve-a-contributor-get)
[API doc](https://developers.lokalise.com/reference/retrieve-a-contributor)

```js
const contributor = await lokaliseApi.contributors().get(user_id, {project_id: project_id});
Expand All @@ -26,7 +28,7 @@ contributor.email;

## Create contributors

[API doc](https://app.lokalise.com/api2docs/curl/#transition-create-contributors-post)
[API doc](https://developers.lokalise.com/reference/create-contributors)

```js
const contributors = await lokaliseApi.contributors().create([
Expand All @@ -49,7 +51,7 @@ contributors[0].user_id

## Update contributor

[API doc](https://app.lokalise.com/api2docs/curl/#transition-update-a-contributor-put)
[API doc](https://developers.lokalise.com/reference/update-a-contributor)

```js
const contributor = await lokaliseApi.contributors().update(
Expand All @@ -63,7 +65,7 @@ contributor.user_id;

## Delete contributor

[API doc](https://app.lokalise.com/api2docs/curl/#transition-delete-a-contributor-delete)
[API doc](https://developers.lokalise.com/reference/delete-a-contributor)

```js
const response = await lokaliseApi.contributors().delete(user_id, {project_id: project_id});
Expand Down
14 changes: 7 additions & 7 deletions docs/api/custom-translation-statuses.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Custom translation statuses

[Translation Status attributes](https://app.lokalise.com/api2docs/curl/#object-translation-statuses)
[Translation Status attributes](https://developers.lokalise.com/reference/custom-translation-status-object)

*Custom translation statuses must be enabled for the project before using this endpoint!* It can be done in the project settings.

## Fetch translation statuses

[API doc](https://app.lokalise.com/api2docs/curl/#transition-list-all-statuses-get)
[API doc](https://developers.lokalise.com/reference/list-all-statuses)

```js
const statuses = await lokaliseApi.translationStatuses().list({
Expand All @@ -20,7 +20,7 @@ statuses.items[0].title;

## Fetch a single translation status

[API doc](https://app.lokalise.com/api2docs/curl/#transition-retrieve-a-status-get)
[API doc](https://developers.lokalise.com/reference/retrieve-a-status)

```js
const status = await lokaliseApi.translationStatuses().get(status_id, {project_id: project_id});
Expand All @@ -30,7 +30,7 @@ status.title;

## Create translation status

[API doc](https://app.lokalise.com/api2docs/curl/#transition-create-a-status-post)
[API doc](https://developers.lokalise.com/reference/create-a-status)

```js
const status = await lokaliseApi.translationStatuses().create(
Expand All @@ -43,7 +43,7 @@ status.title;

## Update translation status

[API doc](https://app.lokalise.com/api2docs/curl/#transition-update-a-status-put)
[API doc](https://developers.lokalise.com/reference/update-a-status)

```js
const status = await lokaliseApi.translationStatuses().update(
Expand All @@ -57,7 +57,7 @@ status.title;

## Delete translation status

[API doc](https://app.lokalise.com/api2docs/curl/#transition-delete-a-status-delete)
[API doc](https://developers.lokalise.com/reference/delete-a-status)

```js
const response = await lokaliseApi.translationStatuses().delete(status_id, {project_id: project_id});
Expand All @@ -67,7 +67,7 @@ response.custom_translation_status_deleted;

## Supported color codes for translation statuses

[API doc](https://app.lokalise.com/api2docs/curl/#transition-retrieve-available-colors-get)
[API doc](https://developers.lokalise.com/reference/retrieve-available-colors)

As long as Lokalise supports only very limited array of color hexadecimal codes for custom translation statuses, this method can be used to fetch all permitted values.

Expand Down
8 changes: 4 additions & 4 deletions docs/api/files.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Translation files

[File attributes](https://app.lokalise.com/api2docs/curl/#object-files)
[File attributes](https://developers.lokalise.com/reference/file-object)

## Fetch translation files

[API doc](https://app.lokalise.com/api2docs/curl/#transition-list-all-files-get)
[API doc](https://developers.lokalise.com/reference/list-all-files)

```js
const files = await lokaliseApi.files().list({
Expand All @@ -18,7 +18,7 @@ files.items[0].filename;

## Download translation files

[API doc](https://app.lokalise.com/api2docs/curl/#transition-download-files-post)
[API doc](https://developers.lokalise.com/reference/download-files)

Exports project files as a `.zip` bundle and makes them available to download (the link is valid for 12 months).

Expand All @@ -32,7 +32,7 @@ response.bundle_url;

## Upload translation file

[API doc](https://app.lokalise.com/api2docs/curl/#transition-upload-a-file-post)
[API doc](https://developers.lokalise.com/reference/upload-a-file)

**Background uploading is the only method of importing files since July 2020.**

Expand Down
16 changes: 8 additions & 8 deletions docs/api/keys.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Translation keys

[Key attributes](https://app.lokalise.com/api2docs/curl/#object-keys)
[Key attributes](https://developers.lokalise.com/reference/key-object)

## Fetch project keys

[API doc](https://app.lokalise.com/api2docs/curl/#transition-list-all-keys-get)
[API doc](https://developers.lokalise.com/reference/list-all-keys)

**This endpoint also supports cursor pagination which is now a recommended approach, especially for fetching large amounts of data. Please [learn more in the Pagination docs](https://lokalise.github.io/node-lokalise-api/api/getting-started#cursor-pagination).**

Expand All @@ -20,7 +20,7 @@ keys.items[0].key_id;

## Fetch a single project key

[API doc](https://app.lokalise.com/api2docs/curl/#transition-retrieve-a-key-get)
[API doc](https://developers.lokalise.com/reference/retrieve-a-key)

```js
const key = await lokaliseApi.keys().get(key_id, {
Expand All @@ -33,7 +33,7 @@ key.key_name.ios;

## Create project keys

[API doc](https://app.lokalise.com/api2docs/curl/#transition-create-keys-post)
[API doc](https://developers.lokalise.com/reference/create-keys)

```js
const keys = await lokaliseApi.keys().create(
Expand Down Expand Up @@ -111,7 +111,7 @@ Things to note:

## Update project key

[API doc](https://app.lokalise.com/api2docs/curl/#transition-update-a-key-put)
[API doc](https://developers.lokalise.com/reference/update-a-key)

```js
const key = await lokaliseApi.keys().update(key_id, {
Expand All @@ -124,7 +124,7 @@ key.platforms;

## Bulk update project keys

[API doc](https://app.lokalise.com/api2docs/curl/#transition-bulk-update-put)
[API doc](https://developers.lokalise.com/reference/bulk-update)

```js
const keys = await lokaliseApi.keys().bulk_update(
Expand All @@ -150,7 +150,7 @@ keys.errors;

## Delete project key

[API doc](https://app.lokalise.com/api2docs/curl/#transition-delete-a-key-delete)
[API doc](https://developers.lokalise.com/reference/delete-a-key)

```js
const response = await lokaliseApi.keys().delete(key_id, { project_id: project_id });
Expand All @@ -160,7 +160,7 @@ response.key_removed;

## Bulk delete project keys

[API doc](https://app.lokalise.com/api2docs/curl/#transition-delete-multiple-keys-delete)
[API doc](https://developers.lokalise.com/reference/delete-multiple-keys)

```js
const response = await lokaliseApi.keys().bulk_delete([
Expand Down
14 changes: 7 additions & 7 deletions docs/api/languages.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Languages

[Language attributes](https://app.lokalise.com/api2docs/curl/#object-languages)
[Language attributes](https://developers.lokalise.com/reference/language-object)

## Fetch system languages

[API doc](https://app.lokalise.com/api2docs/curl/#transition-list-system-languages-get)
[API doc](https://developers.lokalise.com/reference/list-system-languages)

```js
const languages = await lokaliseApi.languages().system_languages({
Expand All @@ -17,7 +17,7 @@ languages.items[0].lang_id;

## Fetch project languages

[API doc](https://app.lokalise.com/api2docs/curl/#transition-list-project-languages-get)
[API doc](https://developers.lokalise.com/reference/list-project-languages)

```js
const languages = await lokaliseApi.languages().list({
Expand All @@ -31,7 +31,7 @@ languages.items[0].lang_id;

## Fetch a single project language

[API doc](https://app.lokalise.com/api2docs/curl/#transition-retrieve-a-language-get)
[API doc](https://developers.lokalise.com/reference/retrieve-a-language)

```js
const language = await lokaliseApi.languages().get(lang_id, {
Expand All @@ -43,7 +43,7 @@ language.lang_name;

## Create project languages

[API doc](https://app.lokalise.com/api2docs/curl/#transition-create-languages-post)
[API doc](https://developers.lokalise.com/reference/create-languages)

```js
const languages = await lokaliseApi.languages().create([
Expand All @@ -58,7 +58,7 @@ languages.errors;

## Update project language

[API doc](https://app.lokalise.com/api2docs/curl/#transition-update-a-language-put)
[API doc](https://developers.lokalise.com/reference/update-a-language)

```js
const language = await lokaliseApi.languages().update(lang_id, {
Expand All @@ -70,7 +70,7 @@ language.lang_name;

## Delete project language

[API doc](https://app.lokalise.com/api2docs/curl/#transition-delete-a-language-delete)
[API doc](https://developers.lokalise.com/reference/delete-a-language)

```js
const response = await lokaliseApi.languages().delete(lang_id, { project_id: project_id });
Expand Down
Loading

0 comments on commit fc978f9

Please sign in to comment.