Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lokalise/node-api

Package Overview
Dependencies
Maintainers
2
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lokalise/node-api - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

dist/collections/translation_statuses.js

9

CHANGELOG.md
# Lokalise API Node Client Changelog
## 1.1.0 (18-Jul-19)
* Incorporate new API changes
* Added support for [`TranslationStatus` endpoint](https://lokalise.co/api2docs/node/#resource-translation-statuses)
## 1.0.1 (12-07-19)
* Updated dependencies
## 1.0.0 (20-06-19)

@@ -4,0 +13,0 @@

2

dist/collections/index.js

@@ -33,4 +33,6 @@ "use strict";

exports.TranslationProviders = translation_providers_1.TranslationProviders;
const translation_statuses_1 = require("./translation_statuses");
exports.TranslationStatuses = translation_statuses_1.TranslationStatuses;
const user_groups_1 = require("./user_groups");
exports.UserGroups = user_groups_1.UserGroups;
//# sourceMappingURL=index.js.map

@@ -22,2 +22,3 @@ "use strict";

this.translations = new Collections.Translations();
this.translationStatuses = new Collections.TranslationStatuses();
this.userGroups = new Collections.UserGroups();

@@ -24,0 +25,0 @@ }

@@ -33,2 +33,4 @@ declare module '@lokalise/node-api' {

filter_filenames?: any[];
add_newline_eof?: boolean;
custom_translation_status_ids?: any[];
include_tags?: any[];

@@ -197,2 +199,3 @@ exclude_tags?: any[];

completed_by_email: string;
custom_translation_status_ids: number[];
}

@@ -232,2 +235,3 @@

words: number;
custom_translation_statuses: object[];
}

@@ -246,2 +250,8 @@

export interface TranslationStatus {
status_id: number;
title: string;
color: string;
}
export interface UploadFileParams {

@@ -442,2 +452,13 @@ data: string;

export class TranslationStatuses extends BaseCollection {
protected static rootElementName: string;
protected static prefixURI: string;
protected static elementClass: Object;
protected static rootElementNameSingular: string;
create(body, params: StandartParams): Promise<any>;
update(id, body, params: StandartParams): Promise<any>;
available_colors(params: StandartParams): Promise<any>;
}
export class UserGroups extends BaseCollection {

@@ -444,0 +465,0 @@ protected static rootElementName: string;

6

package.json
{
"name": "@lokalise/node-api",
"version": "1.0.1",
"version": "1.1.0",
"description": "Official Lokalise API 2.0 Node.js client",

@@ -27,3 +27,3 @@ "license": "MIT",

"@types/mocha": "^5.2.7",
"@types/node": "^12.6.2",
"@types/node": "^12.6.8",
"acorn": "^6.2.0",

@@ -40,3 +40,3 @@ "dotenv": "^8.0.0",

"dependencies": {
"@types/request": "^2.48.1",
"@types/request": "^2.48.2",
"axios": "^0.19.0",

@@ -43,0 +43,0 @@ "request": "^2.88.0",

@@ -30,2 +30,3 @@ # Lokalise API 2.0 official Node.js client

+ [Translation Providers](#translation-providers)
+ [Translation Statuses](#translation-statuses)
* [Additional Info](#additional-info)

@@ -728,2 +729,49 @@ * [Running Tests](#running-tests)

### Translation Statuses
[Documentation](https://lokalise.co/api2docs/node/#resource-translation-statuses)
#### List translation statuses
```js
lokaliseApi.translationStatuses.list({project_id: project_id});
```
#### Retrieve translation status
```js
lokaliseApi.translationStatuses.get(status_id, {project_id: project_id});
```
#### Create translation status
```js
lokaliseApi.translationStatuses.create(
{title: 'my status', color: '#344563'},
{project_id: project_id}
);
```
#### Update translation status
```js
lokaliseApi.translationStatuses.update(
status_id,
{title: 'my status updated', color: '#f2d600'},
{project_id: project_id}
);
```
#### Delete translation status
```js
lokaliseApi.translationStatuses.delete(status_id, {project_id: project_id});
```
#### Retrieve available colors for translation statuses
```js
lokaliseApi.translationStatuses.available_colors({project_id: project_id});
```
## Additional Info

@@ -741,3 +789,3 @@

This library is tested with Node 8, 9, 10, 11, and 12. To test locally:
This library is tested with Node 8, 9, 10, 11, and 12. To test it locally:

@@ -744,0 +792,0 @@ 1. Copypaste `.env.example` file as `.env`. Put your API token inside. The `.env` file is excluded from version control so your token is safe. All in all, we use pre-recorded cassettes, so the actual API requests won't be sent. However, providing at least some token is required.

@@ -16,2 +16,3 @@ import { Comments } from './comments';

import { TranslationProviders } from './translation_providers';
import { TranslationStatuses } from './translation_statuses';
import { UserGroups } from './user_groups';

@@ -35,3 +36,4 @@

TranslationProviders,
TranslationStatuses,
UserGroups
};

@@ -10,2 +10,4 @@ export interface DownloadFileParams {

filter_filenames?: any[];
add_newline_eof?: boolean;
custom_translation_status_ids?: any[];
include_tags?: any[];

@@ -12,0 +14,0 @@ exclude_tags?: any[];

@@ -16,2 +16,3 @@ import { Language } from './language';

import { TranslationProvider } from './translation_provider';
import { TranslationStatus } from './translation_status';
import { UserGroup } from './user_group';

@@ -35,3 +36,4 @@

TranslationProvider,
TranslationStatus,
UserGroup
}

@@ -27,2 +27,3 @@ export interface Task {

completed_by_email: string;
custom_translation_status_ids: number[];
}

@@ -14,2 +14,3 @@ export interface Translation {

words: number;
custom_translation_statuses: object[];
}

@@ -20,3 +20,4 @@ import * as Collections from '../collections/index';

public translations = new Collections.Translations();
public translationStatuses = new Collections.TranslationStatuses();
public userGroups = new Collections.UserGroups();
}

@@ -30,2 +30,3 @@ import { BaseModel } from './base_model';

public completed_by_email: string;
public custom_translation_status_ids: number[];
}

@@ -17,2 +17,3 @@ import { BaseModel } from './base_model';

public words: number;
public custom_translation_statuses: object[];
}

@@ -17,3 +17,5 @@ require('../setup');

deck.createTest('list_pagination', async () => {
const providers = await lokaliseApi.translationProviders.list({team_id: team_id, page: 2, limit: 1});
const providers = await lokaliseApi.translationProviders.list({
team_id: team_id, page: 2, limit: 1
});
expect(providers[0].name).to.eq('Lokalise');

@@ -20,0 +22,0 @@ }).register(this);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc