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.1.0 to 1.2.0

dist/collections/webhooks.js

4

CHANGELOG.md
# Lokalise API Node Client Changelog
## 1.2.0 (20-Aug-19)
* Added support for [`Webhook` endpoint](https://lokalise.co/api2docs/node/#resource-webhooks)
## 1.1.0 (18-Jul-19)

@@ -4,0 +8,0 @@

@@ -37,2 +37,4 @@ "use strict";

exports.UserGroups = user_groups_1.UserGroups;
const webhooks_1 = require("./webhooks");
exports.Webhooks = webhooks_1.Webhooks;
//# sourceMappingURL=index.js.map

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

this.userGroups = new Collections.UserGroups();
this.webhooks = new Collections.Webhooks();
}

@@ -26,0 +27,0 @@ }

@@ -283,2 +283,10 @@ declare module '@lokalise/node-api' {

export interface Webhook {
webhook_id: number;
url: string;
secret: string;
events: string[];
event_lang_map: object;
}
export class ApiRequest {

@@ -472,2 +480,12 @@ private urlRoot;

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

@@ -474,0 +492,0 @@ comments: Comments;

18

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

@@ -24,14 +24,14 @@ "license": "MIT",

"@istanbuljs/nyc-config-typescript": "^0.1.3",
"@types/chai": "^4.1.7",
"@types/express": "^4.17.0",
"@types/chai": "^4.2.0",
"@types/express": "^4.17.1",
"@types/mocha": "^5.2.7",
"@types/node": "^12.6.8",
"acorn": "^6.2.0",
"dotenv": "^8.0.0",
"lodash": "^4.17.14",
"mocha": "^6.1.4",
"@types/node": "^12.7.2",
"acorn": "^7.0.0",
"dotenv": "^8.1.0",
"lodash": "^4.17.15",
"mocha": "^6.2.0",
"mocha-tape-deck": "0.0.9",
"nyc": "^14.1.1",
"request-promise": "^4.2.4",
"source-map-support": "^0.5.12",
"source-map-support": "^0.5.13",
"ts-node": "^8.3.0"

@@ -38,0 +38,0 @@ },

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

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

@@ -776,2 +777,46 @@ * [Running Tests](#running-tests)

### Webhooks
[Documentation](https://lokalise.co/api2docs/node/#resource-webhooks)
#### List webhooks
```js
lokaliseApi.webhooks.list({project_id: project_id});
```
#### Retrieve webhook
```js
lokaliseApi.webhooks.get(webhook_id, {project_id: project_id});
```
#### Create webhook
```js
lokaliseApi.webhooks.create(
{url: 'https://example.com', events: ['project.exported']},
{project_id: project_id}
);
```
#### Update webhook
```js
lokaliseApi.webhooks.update(
webhook_id,
{url: 'http://example.com', events: ['project.snapshot']},
{project_id: project_id}
);
```
#### Delete webhook
```js
lokaliseApi.webhooks.delete(
webhook_id,
{project_id: project_id}
);
```
## Additional Info

@@ -778,0 +823,0 @@

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

import { UserGroups } from './user_groups';
import { Webhooks } from './webhooks';

@@ -37,3 +38,4 @@ export {

TranslationStatuses,
UserGroups
UserGroups,
Webhooks
};

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

import { UserGroup } from './user_group';
import { Webhook } from './webhook';

@@ -37,3 +38,4 @@ export {

TranslationStatus,
UserGroup
UserGroup,
Webhook
}

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

public userGroups = new Collections.UserGroups();
public webhooks = new Collections.Webhooks();
}
import { BaseModel } from './base_model';
import { TranslationStatus as TranslationStatusInterface } from "../interfaces";
export class TranslationStatus extends BaseModel implements TranslationStatus {
export class TranslationStatus extends BaseModel implements TranslationStatusInterface {
public status_id: number;

@@ -6,0 +6,0 @@ public title: string;

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