@orchesty/connector-onesignal 1.0.1 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +74 -0
- package/dist/package.json +2 -2
- package/package.json +6 -3
package/README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# OneSignal Connector
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@orchesty/connector-onesignal)
|
|
4
|
+
[](https://github.com/Orchesty/orchesty-nodejs-connectors/blob/master/LICENSE)
|
|
5
|
+
|
|
6
|
+
An [Orchesty](https://orchesty.io) connector for OneSignal, the market-leading customer engagement solution offering mobile and web push notifications, in-app messaging, SMS, and email.
|
|
7
|
+
|
|
8
|
+
## Application Type
|
|
9
|
+
|
|
10
|
+
**Basic**
|
|
11
|
+
|
|
12
|
+
This connector authenticates using a REST API key sent as a `Basic` token in the `Authorization` header.
|
|
13
|
+
|
|
14
|
+
| Field | Description |
|
|
15
|
+
|---|---|
|
|
16
|
+
| `api_key` | Your OneSignal REST API key |
|
|
17
|
+
|
|
18
|
+
## Components
|
|
19
|
+
|
|
20
|
+
| Class | Type | Description |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| `OnesignalCreateAppConnector` | Connector | Creates a new OneSignal app via `POST /apps` |
|
|
23
|
+
| `OnesignalViewAppsBatch` | Batch | Fetches all OneSignal apps and emits each as a batch item via `GET /apps` |
|
|
24
|
+
|
|
25
|
+
## Setup
|
|
26
|
+
|
|
27
|
+
### Credentials
|
|
28
|
+
|
|
29
|
+
1. Log in to your [OneSignal Dashboard](https://app.onesignal.com/).
|
|
30
|
+
2. Navigate to your organization settings and locate the **Organization API Key** (used for app management operations).
|
|
31
|
+
3. Copy the key and paste it into the **api_key** field in Orchesty.
|
|
32
|
+
|
|
33
|
+
### API Documentation
|
|
34
|
+
|
|
35
|
+
OneSignal REST API Reference: [https://documentation.onesignal.com/reference/](https://documentation.onesignal.com/reference/)
|
|
36
|
+
|
|
37
|
+
## Installation & Usage
|
|
38
|
+
|
|
39
|
+
Install the package:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npm install @orchesty/connector-onesignal @orchesty/nodejs-sdk
|
|
43
|
+
# or
|
|
44
|
+
pnpm add @orchesty/connector-onesignal @orchesty/nodejs-sdk
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Register the application and nodes in your Orchesty DI container:
|
|
48
|
+
|
|
49
|
+
```typescript
|
|
50
|
+
import { container } from '@orchesty/nodejs-sdk';
|
|
51
|
+
import OnesignalApplication from '@orchesty/connector-onesignal/dist/OnesignalApplication';
|
|
52
|
+
import OnesignalCreateAppConnector from '@orchesty/connector-onesignal/dist/Connector/OnesignalCreateAppConnector';
|
|
53
|
+
import OnesignalViewAppsBatch from '@orchesty/connector-onesignal/dist/Batch/OnesignalViewAppsBatch';
|
|
54
|
+
|
|
55
|
+
const app = new OnesignalApplication();
|
|
56
|
+
container.setApplication(app);
|
|
57
|
+
container.setNode(new OnesignalCreateAppConnector(), app);
|
|
58
|
+
container.setNode(new OnesignalViewAppsBatch(), app);
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## License
|
|
62
|
+
|
|
63
|
+
This connector is released under the **Apache License 2.0**. See the [LICENSE](https://github.com/Orchesty/orchesty-nodejs-connectors/blob/master/LICENSE) file for the full license text.
|
|
64
|
+
|
|
65
|
+
## Contributing
|
|
66
|
+
|
|
67
|
+
Contributions are welcome! This connector is part of the open-source [Orchesty Node.js Connectors](https://github.com/Orchesty/orchesty-nodejs-connectors) monorepo.
|
|
68
|
+
|
|
69
|
+
For guidelines on how to create or update connectors — including project setup, coding conventions, and how to write tests — please refer to the **[Contributing to Connectors](https://orchesty.io/community/contributing-to-connectors)** guide.
|
|
70
|
+
|
|
71
|
+
All contributions should include:
|
|
72
|
+
- Source code in `src/` following the existing connector structure
|
|
73
|
+
- Tests in `src/**/__tests__/` with `input.json`, `mock.json`, and `output.json` fixtures
|
|
74
|
+
- An updated `CHANGELOG.md` entry
|
package/dist/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orchesty/connector-onesignal",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"url": "https://github.com/Orchesty/orchesty-nodejs-connectors",
|
|
7
7
|
"repository": "https://github.com/Orchesty/orchesty-nodejs-connectors",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"keywords": [],
|
|
18
18
|
"author": "info@hanaboso.com",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@orchesty/nodejs-sdk": "^
|
|
20
|
+
"@orchesty/nodejs-sdk": "^5.0.13"
|
|
21
21
|
},
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=24"
|
package/package.json
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orchesty/connector-onesignal",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.1",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"url": "https://github.com/Orchesty/orchesty-nodejs-connectors",
|
|
7
|
-
"repository":
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/Orchesty/orchesty-nodejs-connectors"
|
|
10
|
+
},
|
|
8
11
|
"files": [
|
|
9
12
|
"dist"
|
|
10
13
|
],
|
|
11
14
|
"keywords": [],
|
|
12
15
|
"author": "info@hanaboso.com",
|
|
13
16
|
"dependencies": {
|
|
14
|
-
"@orchesty/nodejs-sdk": "^
|
|
17
|
+
"@orchesty/nodejs-sdk": "^5.0.13"
|
|
15
18
|
},
|
|
16
19
|
"engines": {
|
|
17
20
|
"node": ">=24"
|