Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webhook event types #442

Merged
merged 2 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/_data/additional_items.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
path: api-rate-limits
- title: Proxy support
path: proxy_support
- title: Webhook events
path: webhook_events
- title: Contributing
path: contribution_guide
sub_paths:
Expand Down
4 changes: 4 additions & 0 deletions docs/additional_info/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 12.3.0 (19-Mar-2024)

* Our SDK now exports types for [webhook events](https://lokalise.github.io/node-lokalise-api/additional_info/webhook_events).

## 12.2.1 (13-Mar-2024)

* Expose more types
Expand Down
50 changes: 50 additions & 0 deletions docs/additional_info/webhook_events.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Webhook events

If you're working with [webhook events](https://developers.lokalise.com/docs/webhook-events), you take take advantage of the typings from our Node SDK.

For example, when processing `project.key.added` event:

```ts
import type { WebhookProjectKeyAdded } from "@lokalise/node-api";

const event: WebhookProjectKeyAdded = {
// ...
};
```

The following types are exported:

```
WebhookProjectImported
WebhookProjectExported
WebhookProjectCopied
WebhookProjectDeleted
WebhookProjectSnapshotCreated
WebhookProjectBranchAdded
WebhookProjectBranchDeleted
WebhookProjectBranchMerged
WebhookProjectLanguagesAdded
WebhookProjectLanguageRemoved
WebhookProjectLanguageSettingsChanged
WebhookProjectKeyAdded
WebhookProjectKeysAdded
WebhookProjectKeyModified
WebhookProjectKeysModified
WebhookProjectKeysDeleted
WebhookProjectKeyCommentAdded
WebhookProjectTranslationUpdated
WebhookProjectTranslationsUpdated
WebhookProjectTranslationProofread
WebhookProjectContributorAdded
WebhookProjectContributorAddedPublic
WebhookProjectContributorDeleted
WebhookProjectTaskCreated
WebhookProjectTaskQueued
WebhookProjectTaskClosed
WebhookProjectTaskDeleted
WebhookProjectTaskLanguageClosed
WebhookProjectTaskInitialTmLeverageCalculated
WebhookTeamOrderCreated
WebhookTeamOrderDeleted
WebhookTeamOrderCompleted
```
Loading
Loading