@onesignal/node-onesignal 5.4.0 → 5.5.0

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 CHANGED
@@ -1,4 +1,4 @@
1
- <h1 align="center">Welcome to @onesignal/node-onesignal 👋</h1>
1
+ <h1 align="center">Welcome to @onesignal/node-onesignal</h1>
2
2
  <p>
3
3
  <a href="https://www.npmjs.com/package/@onesignal/node-onesignal" target="_blank">
4
4
  <img alt="Version" src="https://img.shields.io/npm/v/@onesignal/node-onesignal.svg">
@@ -9,581 +9,87 @@
9
9
  <a href="https://github.com/OneSignal/node-onesignal/graphs/commit-activity" target="_blank">
10
10
  <img alt="Maintenance" src="https://img.shields.io/badge/Maintained%3F-yes-green.svg" />
11
11
  </a>
12
- <a href="https://twitter.com/onesignal" target="_blank">
13
- <img alt="Twitter: onesignal" src="https://img.shields.io/twitter/follow/onesignal.svg?style=social" />
14
- </a>
15
12
  </p>
16
13
 
17
- > OpenAPI client for node-onesignal
18
-
19
- ### 🏠 [Homepage](https://github.com/OneSignal/node-onesignal#readme)
20
- ### 🖤 [npm](https://www.npmjs.com/package/@onesignal/node-onesignal)
21
-
22
- # Node Client SDK
23
- The OneSignal Node client is a server OneSignal SDK for NodeJS. Integrate OneSignal with your backend events, data, and
24
- more.
14
+ The OneSignal Node client is a server SDK for NodeJS. A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at [onesignal.com](https://onesignal.com).
25
15
 
26
-
27
- # Install
16
+ ## Installation
28
17
 
29
18
  ```sh
30
- # yarn
31
- yarn add @onesignal/node-onesignal
32
-
33
19
  # npm
34
- npm install @onesignal/node-onesignal --save
35
- ```
36
-
37
- # Usage
38
- ```js
39
- const OneSignal = require('@onesignal/node-onesignal');
40
- ```
41
- ```js
42
- import * as OneSignal from '@onesignal/node-onesignal';
43
- ```
20
+ npm install @onesignal/node-onesignal
44
21
 
45
- ## Creating a client
46
- ### Configuration
47
- We can configure the client using the `createConfiguration` function. You can find more info on each configuration
48
- parameter [here](https://github.com/OpenAPITools/openapi-generator/pull/10283/files).
22
+ # pnpm
23
+ pnpm add @onesignal/node-onesignal
49
24
 
50
- ```js
51
- const configuration = OneSignal.createConfiguration(configParams);
52
- ```
25
+ # bun
26
+ bun add @onesignal/node-onesignal
53
27
 
54
- ### Initializing the Client
55
- ```js
56
- const client = new OneSignal.DefaultApi(configuration);
28
+ # yarn
29
+ yarn add @onesignal/node-onesignal
57
30
  ```
58
31
 
59
- ### Authentication
60
- You can configure auth parameters passing them like this:
32
+ ## Configuration
61
33
 
62
- ```js
63
- const configuration = OneSignal.createConfiguration({
64
- organizationApiKey: '<YOUR_ORGANIZATION_API_KEY>', // Organization key is only required for creating new apps and other top-level endpoints
65
- restApiKey: '<YOUR_REST_API_KEY>', // App REST API key required for most endpoints
66
- });
34
+ Every SDK requires authentication via API keys. Two key types are available:
67
35
 
68
- const client = new OneSignal.DefaultApi(configuration);
69
- ```
36
+ - **REST API Key** — required for most endpoints (sending notifications, managing users, etc.). Found in your app's **Settings > Keys & IDs**.
37
+ - **Organization API Key** — only required for organization-level endpoints like creating or listing apps. Found in **Organization Settings**.
70
38
 
71
- #### Advanced Usage: Creating a brand-new app
72
- If creating a new app via the client, the response will return the app's API key via the `basic_auth_key` response
73
- parameter. You can then use this to modify your configuration object and create a new client that will have both user-level and app-level authentication set up.
39
+ > **Warning:** Store your API keys in environment variables or a secrets manager. Never commit them to source control.
74
40
 
75
- ```js
76
- const response = await client.createApp(newapp);
41
+ ```javascript
42
+ const OneSignal = require('@onesignal/node-onesignal');
77
43
 
78
44
  const configuration = OneSignal.createConfiguration({
79
- organizationApiKey: '<YOUR_ORGANIZATION_API_KEY>', // Organization key is only required for creating new apps and other top-level endpoints
80
- restApiKey: response.basic_auth_key,
45
+ restApiKey: 'YOUR_REST_API_KEY',
46
+ organizationApiKey: 'YOUR_ORGANIZATION_API_KEY',
81
47
  });
82
48
 
83
49
  const client = new OneSignal.DefaultApi(configuration);
84
50
  ```
85
51
 
86
- ---
87
- ## API Reference
88
-
89
- > See the full list of [API Endpoints](DefaultApi.MD).
90
-
91
- To make stateful changes requests should take on the following pattern:
92
- 1. create or get an object
93
- 2. make changes to that object
94
- 3. pass the object to the request function to make the changes
95
-
96
- Examples of important OneSignal objects include `App`, `Notification`, `Player`, and `Segment`.
97
-
98
- For example, see the section below on creating an app. First an app object is created via the instantiation of the `App`
99
- class. Then, the app instance is modified directly. Finally, we use the `client` to create the app via a remote request.
100
-
101
- ### Creating an app
102
- Creates a new OneSignal app.
103
-
104
- **Example**
105
- ```js
106
- const app = new OneSignal.App();
107
-
108
- // configure your application
109
- app.name = 'app_name';
110
- app.gcm_key = '<your key here>';
111
- app.android_gcm_sender_id = '<your id here>';
112
-
113
- const response = await client.createApp(app);
114
- ```
115
-
116
- ### Getting an app
117
- View the details of a single OneSignal app.
118
-
119
- **Example**
120
- ```js
121
- const app = await client.getApp('<app id>');
122
- ```
123
-
124
- ### Getting multiple apps
125
- View apps.
126
-
127
- **Example**
128
- ```js
129
- const apps = await client.getApps();
130
- ```
131
-
132
- ### Updating an app
133
- Updates the name or configuration settings of an existing OneSignal app.
134
-
135
- **Example**
136
- ```js
137
- const app = new OneSignal.App();
138
- app.name = 'modified_app_name';
139
-
140
- const udpateAppResponse = await client.updateApp('<existing_app_id>', app);
141
- ```
52
+ ## Send a push notification
142
53
 
143
- ### Creating a notification
144
- Sends a notification to your users.
145
-
146
- **Example**
147
- ```js
148
- const notification = new OneSignal.Notification();
149
- notification.app_id = app.id;
150
- // Name property may be required in some case, for instance when sending an SMS.
151
- notification.name = "test_notification_name";
152
- notification.contents = {
153
- en: "Gig'em Ags"
154
- }
155
-
156
- // required for Huawei
157
- notification.headings = {
158
- en: "Gig'em Ags"
159
- }
160
- const notification = await client.createNotification(notification);
161
- ```
162
- ### Creating a notification using Filters
163
- Sends a notification to your users filtered by specific criteria.
164
-
165
- **Example**
166
- ```js
54
+ ```javascript
167
55
  const notification = new OneSignal.Notification();
168
- notification.app_id = app.id;
169
-
170
- notification.contents = {
171
- en: "Gig'em Ags"
172
- }
173
-
174
- // required for Huawei
175
- notification.headings = {
176
- en: "Gig'em Ags"
177
- }
178
-
179
- // Find all the users that have not spent any amount in USD on IAP.
180
- // https://documentation.onesignal.com/reference/create-notification#send-to-users-based-on-filters
181
- notification.filters = [
182
- {
183
- field: 'amount_spent',
184
- relation: '=',
185
- value: "0"
186
- },
187
- ];
188
-
189
- const notification = await client.createNotification(notification);
190
- ```
56
+ notification.app_id = 'YOUR_APP_ID';
57
+ notification.contents = { en: 'Hello from OneSignal!' };
58
+ notification.headings = { en: 'Push Notification' };
59
+ notification.included_segments = ['Subscribed Users'];
191
60
 
192
- ### Canceling a notification
193
- Stop a scheduled or currently outgoing notification.
194
-
195
- **Example**
196
-
197
- ```js
198
- const cancelNotificationResponse = await client.cancelNotification('<app id>', '<notification id>');
199
- ```
200
-
201
-
202
- ### Getting a notification
203
- View the details of a single notification and outcomes associated with it.
204
-
205
- **Example**
206
- ```js
207
- await client.getNotification('<app id>', '<notification id>');
61
+ const response = await client.createNotification(notification);
62
+ console.log('Notification ID:', response.id);
208
63
  ```
209
64
 
210
- ### Getting notifications
211
- View the details of multiple notifications.
212
-
213
- | Param | Type | Description |
214
- |--------|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
215
- | app_id | string | The OneSignal App ID for your app. Available in Keys &amp; IDs. |
216
- | limit | string | How many notifications to return. Max is 50. Default is 50. |
217
- | offset | number | Page offset. Default is 0. Results are sorted by queued_at in descending order. `queued_at` is a representation of the time that the notification was queued at. |
218
- | kind | number | Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only |
219
-
220
-
221
- **Example**
222
- ```js
223
- const notifications = await client.getNotifications('<app id>', '50', 0, 1);
224
- ```
225
-
226
- ### Getting notification history
227
- View the devices sent a message - **OneSignal Paid Plan Required**
228
- This method will return all devices that were sent the given `notification_id` of an Email or Push Notification if used
229
- within 7 days of the date sent.
230
-
231
- **Example**
232
- ```js
233
- const notificationHistory = await client.getNotificationHistory('<notification id>');
234
- ```
235
-
236
- ### Creating a segment
237
- Create segments visible and usable in the dashboard and API - **Required: OneSignal Paid Plan**
238
-
239
- **Example**
240
- ```js
241
- const segment = new OneSignal.Segment();
242
-
243
- segment.filters = [
244
- { field: 'session_count', relation: '&gt;', value: '1' },
245
- { field: 'tag', key: 'my_tag', relation: 'exists' }
246
- ]
247
-
248
- const segment = await client.createSegments(app.id, segment);
249
- ```
250
-
251
- ### Deleting a segment
252
- Delete segments (not user devices) - **Required: OneSignal Paid Plan**
253
- You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header
254
- that has admin access on the app.
255
- The `segment_id` can be found in the URL of the segment when viewing it in the dashboard.
256
-
257
- **Example**
258
- ```js
259
- const deleteSegmentsResponse = await client.deleteSegments('<app id>', '<segment id>');
260
- ```
261
-
262
- ### Creating a player
263
- Add a device.
264
-
265
- **Example**
266
- ```js
267
- const player = new OneSignal.Player();
268
- player.device_type = 1;
269
- player.app_id = app_id;
270
- player.identifier = '<identifier>';
271
- const player = await client.createPlayer(player);
272
- ```
273
-
274
- ### Getting a player
275
- View the details of an existing device in one of your OneSignal apps.
276
- The email and the hash is **only required if you have enabled Identity Verification and `device_type` is email**.
277
-
278
- **Example**
279
- ```js
280
- const player = await client.getPlayer('<app id>', '<player id>', '<email auth hash>');
281
- ```
282
-
283
- ### Getting players
284
- View the details of multiple devices in one of your OneSignal apps.
285
-
286
- ⚠️ Unavailable for Apps Over 80,000 Users.
65
+ ## Send an email
287
66
 
288
- | Param | Type | Description |
289
- |--------|--------|------------------------------------------------------------------|
290
- | app_id | string | The OneSignal App ID for your app. Available in Keys &amp; IDs. |
291
- | limit | string | How many devices to return. Max is 300. Default is 300 |
292
- | offset | number | Result offset. Default is 0. Results are sorted by id; |
293
-
294
-
295
- **Example**
296
- ```js
297
- const players = await client.getPlayers('<app id>', '300', 0);
298
- ```
299
-
300
- ### Exporting a player
301
- Generate a compressed CSV export of all of your current user data. This method can be used to generate a compressed CSV
302
- export of all of your existing user data and is a better alternative to retrieving this data using the /players API endpoint.
303
-
304
- See [full CSV Export Reference](https://documentation.onesignal.com/reference/csv-export)
305
-
306
- **Example**
307
- ```js
308
- const exportPlayerResponse = await client.exportPlayer('<app id>', {
309
- extra_fields: ['location', 'external_user_id'],
310
- last_active_since: 1469392779,
311
- segment_name: "Subscribed Users"
312
- });
313
- ```
314
-
315
-
316
- ### Updating a player
317
- Update an existing device in one of your OneSignal apps.
318
-
319
- **Example**
320
- ```js
321
- const updatePlayerResponse = await client.updatePlayer('<player id>', player);
322
- ```
323
-
324
- ### Updating player tags
325
- Update an existing device's tags in one of your OneSignal apps using the External User ID.
326
-
327
- ```js
328
- const playerToUpdate = new OneSignal.Player();
329
-
330
- player.app_id = APP_ID;
331
- player.device_type = 1;
332
-
333
- playerToUpdate.external_user_id = 'your_player_external_id'; // setting the same external_user_id as before
334
- const updatePlayerTagsRequestBody = new OneSignal.UpdatePlayerTagsRequestBody();
335
- updatePlayerTagsRequestBody.tags = {'typescript_test_tag': 1};
336
- const updatePlayerResponse = await api.updatePlayerTags(APP_ID, PLAYER_EXTERNAL_USER_ID, updatePlayerTagsRequestBody);
337
- ```
338
- #### Deleting Tags
339
- To delete a tag, include its key and set its value to blank (""). Omitting a key/value will not delete it.
340
-
341
- For example, if you wanted to delete two existing tags rank and category while simultaneously adding a new tag class, the
342
- tags JSON would look like the following:
343
-
344
- **Example**
345
- ```json
346
- "tags": {
347
- "rank": "",
348
- "category": "",
349
- "class": "my_new_value"
350
- }
351
- ```
352
-
353
- ### Deleting a player
354
- Deletes a user record.
355
-
356
- **Example**
357
- ```js
358
- const deletePlayerResponse = await client.deletePlayer(app.id, '<player id>')
359
- ```
360
-
361
- ### Getting outcomes
362
- View the details of all the outcomes associated with your app.
363
-
364
- 🚧 **Requires your OneSignal App's REST API Key, available in Keys & IDs** 🚧
365
-
366
- Outcome data are accessible for 30 days before being deleted from our servers. You can export this data monthly if you need it for a more extended period.
367
-
368
- | Param | Type | Description |
369
- |---------------------|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
370
- | app_id | string | The OneSignal App ID for your app. Available in Keys &amp; IDs. |
371
- | outcome_names | string | Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the “os” prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum |
372
- | outcome_names2 | string | If outcome names contain any commas, then please specify only one value at a time. Example: `outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count` where “Sales, Purchase” is the custom outcomes with a comma in the name. |
373
- | outcome_time_range | string | Optional Time range for the returned data. The values can be `1h` (for the last 1 hour data), `1d` (for the last 1 day data), or `1mo` (for the last 1 month data). Default is 1h if the parameter is omitted. |
374
- | outcome_platforms | string | Optional Platform id. Refer device&#39;s platform ids for values. **Example:** `outcome_platform=0` for iOS `outcome_platform=7`, `8` for Safari and Firefox Default is data from all platforms if the parameter is omitted. |
375
- | outcome_attribution | string | Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted. |
376
-
377
- **Example**
378
- ```js
379
- const outcomes = await client.getOutcomes(app.id, 'os__click.count,os_session_duration.count,my_outcome.sum');
380
- ```
381
-
382
- ### Begin Live Activity
383
- Starts a Live Activity event
384
- ```js
385
- // Create a player first
386
- const player = new OneSignal.Player();
387
- player.device_type = 0;
388
- player.app_id = '<app id>';
389
- const playerResponse = await api.createPlayer(player);
390
-
391
- // Prepare a request
392
- const beginLiveActivityRequest: BeginLiveActivityRequest = {
393
- push_token: '<push_token>',
394
- subscription_id: playerResponse.id!,
395
- };
396
- const activityId = '<activity_id>'; // any string
397
-
398
- // Begin activity
399
- await api.beginLiveActivity('<app_id>', activityId, beginLiveActivityRequest);
400
- ```
401
-
402
- ### Update Live Activity
403
- Updates a Live Activity event
404
- ```js
405
- const updateLiveActivityRequest: UpdateLiveActivityRequest = {
406
- event_updates: {
407
- data: 'test'
408
- },
409
- event: "update",
410
- name: "contents"
411
- };
412
-
413
- await api.updateLiveActivity('<app_id>', '<activity_id>', updateLiveActivityRequest);
414
- ```
415
-
416
- ### End Live Activity
417
- Stops a Live Activity event
418
- ```js
419
- const subscriptionId = '<subscription_id>'; // player id
420
- await api.endLiveActivity('<app_id>', '<activity_id>', subscriptionId);
421
- ```
422
-
423
- ### Subscription types
424
- * iOSPush
425
- * AndroidPush
426
- * FireOSPush
427
- * ChromeExtensionPush
428
- * ChromePush
429
- * WindowsPush
430
- * SafariLegacyPush
431
- * FirefoxPush
432
- * macOSPush
433
- * HuaweiPush
434
- * SafariPush
435
- * Email
436
- * SMS
437
-
438
- ## Users
439
- ### Creating a OneSignal User
440
- ```js
441
- const user = new OneSignal.User();
442
-
443
- const aliasLabel = '<alias_label>';
444
- const aliasId = '<alias_id>';
445
- const subscriptionToken = '<subscription_token>';
446
-
447
- user.identity = {
448
- [aliasLabel]: aliasId,
449
- };
450
-
451
- user.subscriptions = [
452
- {
453
- type: "iOSPush",
454
- token: subscriptionToken,
455
- }
456
- ];
457
-
458
- const createdUser = await api.createUser('<app_id>', user);
459
- assert(createdUser.identity!['onesignal_id'] != null);
460
- ```
461
-
462
- ### Getting a user by `onesignal_id`
463
- ```js
464
- const oneisgnalAliasLabel = "onesignal_id";
465
- const onesignalAliasId = createdUser.identity!['onesignal_id'];
466
-
467
- const fetchedUser = await api.fetchUser('<app_id>', oneisgnalAliasLabel, onesignalAliasId);
468
- ```
469
-
470
- ### Getting a user by an alias
471
- ```js
472
- const fetchedUser = await api.fetchUser('<app_id>', alias_label, alias_id);
473
- ```
474
-
475
- ### Updating a user
476
- ```js
477
- const updateUserRequest: UpdateUserRequest = {
478
- properties: {
479
- language: 'fr'
480
- }
481
- };
482
-
483
- const updatedUser = await api.updateUser('<app_id>', aliasLabel, aliasId, updateUserRequest);
484
- ```
485
-
486
- ### Deleting a user
487
- ```js
488
- await api.deleteUser('<app_id>', aliasLabel, aliasId);
489
- ```
490
-
491
- ## Subscriptions
492
- ### Creating a subscription for existing user
493
- ```js
494
- const createSubscriptionRequestBody: CreateSubscriptionRequestBody = {
495
- subscription: {
496
- type: "AndroidPush",
497
- token: '<subscription_token>',
498
- }
499
- };
500
-
501
- const response = await api.createSubscription('<app_id>', '<alias_label>', '<alias_id>', createSubscriptionRequestBody);
502
- ```
503
-
504
- ### Updating a subscription
505
- ```js
506
- const updateSubscriptionRequestBody: UpdateSubscriptionRequestBody = {
507
- subscription: {
508
- type: "iOSPush",
509
- token: '<new-subscription-token>',
510
- }
511
- };
512
-
513
- await api.updateSubscription('<app_id>', '<existing_subscription_id>', updateSubscriptionRequestBody);
514
- ```
515
-
516
- ### Deleting a subscription
517
- ```js
518
- await api.deleteSubscription('<app_id>', '<subscription_id>');
519
- ```
520
-
521
- ### Transfer subscription ownership
522
- Transfers the subscription from one user to another.
523
- ```js
524
- // Setting the user for transfering the subscription to. User is identyfied by an IdentityObject.
525
- const transferSubscriptionRequestBody: TransferSubscriptionRequestBody = {
526
- identity: otherUserIdentityObject
527
- };
528
-
529
- const transferResponse = await api.transferSubscription('<app_id>', '<subscription_id>', transferSubscriptionRequestBody);
530
- ```
531
-
532
- ## Aliases
533
- ### Fetching aliases for a user
534
- ```js
535
- const fetchResponse = await api.fetchAliases('<app_id>', '<subscription_id>');
536
- ```
537
-
538
- ### Fetching user identity
539
- ```js
540
- const fetchResponse = await api.fetchUserIdentity('<app_id>', '<alias_label>', '<alias_id>');
541
- ```
542
- ### Identifying user by alias
543
- ```js
544
- const userIdentityRequestBody: UserIdentityRequestBody = {
545
- identity: {
546
- ['<new_alias_label>']: '<new_alias_id>'
547
- }
548
- };
67
+ ```javascript
68
+ const notification = new OneSignal.Notification();
69
+ notification.app_id = 'YOUR_APP_ID';
70
+ notification.email_subject = 'Important Update';
71
+ notification.email_body = '<h1>Hello!</h1><p>This is an HTML email.</p>';
72
+ notification.included_segments = ['Subscribed Users'];
73
+ notification.channel_for_external_user_ids = 'email';
549
74
 
550
- const identifyResponse = await api.identifyUserByAlias('<app_id>',
551
- '<existing_alias_label>',
552
- '<existing_alias_id>',
553
- userIdentityRequestBody);
75
+ const response = await client.createNotification(notification);
554
76
  ```
555
77
 
556
- ### Identifying user by subscription id
557
- ```js
558
- const userIdentityRequestBody: UserIdentityRequestBody = {
559
- identity: {
560
- ['<new_alias_label>']: '<new_alias_id>'
561
- }
562
- };
78
+ ## Send an SMS
563
79
 
564
- const identifyResponse = await api.identifyUserBySubscriptionId('<app_id>', '<existing_subscription_id>', userIdentityRequestBody);
565
- ```
80
+ ```javascript
81
+ const notification = new OneSignal.Notification();
82
+ notification.app_id = 'YOUR_APP_ID';
83
+ notification.contents = { en: 'Your SMS message content here' };
84
+ notification.included_segments = ['Subscribed Users'];
85
+ notification.channel_for_external_user_ids = 'sms';
86
+ notification.sms_from = '+15551234567';
566
87
 
567
- ### Deleting an alias
568
- ```js
569
- await api.deleteAlias('<app_id>', '<alias_label>', '<alias_id>', '<alias_label_to_delete>');
88
+ const response = await client.createNotification(notification);
570
89
  ```
571
- ## Author
572
-
573
- * Website: https://onesignal.com
574
- * Twitter: [@onesignal](https://twitter.com/onesignal)
575
- * Github: [@OneSignal](https://github.com/OneSignal)
576
-
577
- ## 🤝 Contributing
578
-
579
- Contributions, issues and feature requests are welcome!<br />Feel free to check [issues page](https://github.com/OneSignal/node-onesignal/issues).
580
-
581
- ## Show your support
582
-
583
- Give a ⭐️ if this project helped you!
584
90
 
585
- ## 📝 License
91
+ ## Full API reference
586
92
 
587
- Copyright © 2023 [OneSignal](https://github.com/OneSignal).
93
+ The complete list of API endpoints and their parameters is available in the [DefaultApi documentation](https://github.com/OneSignal/node-onesignal/blob/main/DefaultApi.md).
588
94
 
589
- This project is [MIT](https://github.com/OneSignal/node-onesignal/blob/main/LICENSE) licensed.
95
+ For the underlying REST API, see the [OneSignal API reference](https://documentation.onesignal.com/reference).
@@ -80,7 +80,7 @@ var DefaultApiRequestFactory = (function (_super) {
80
80
  .replace('{' + 'notification_id' + '}', encodeURIComponent(String(notificationId)));
81
81
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
82
82
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
83
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
83
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
84
84
  if (appId !== undefined) {
85
85
  requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
86
86
  }
@@ -123,7 +123,7 @@ var DefaultApiRequestFactory = (function (_super) {
123
123
  .replace('{' + 'template_id' + '}', encodeURIComponent(String(templateId)));
124
124
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
125
125
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
126
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
126
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
127
127
  if (appId !== undefined) {
128
128
  requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
129
129
  }
@@ -177,7 +177,7 @@ var DefaultApiRequestFactory = (function (_super) {
177
177
  .replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
178
178
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
179
179
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
180
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
180
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
181
181
  contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
182
182
  "application/json"
183
183
  ]);
@@ -224,7 +224,7 @@ var DefaultApiRequestFactory = (function (_super) {
224
224
  .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
225
225
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
226
226
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
227
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
227
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
228
228
  contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
229
229
  "application/json"
230
230
  ]);
@@ -267,7 +267,7 @@ var DefaultApiRequestFactory = (function (_super) {
267
267
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
268
268
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
269
269
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
270
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
270
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
271
271
  contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
272
272
  "application/json"
273
273
  ]);
@@ -306,7 +306,7 @@ var DefaultApiRequestFactory = (function (_super) {
306
306
  localVarPath = '/apps';
307
307
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
308
308
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
309
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
309
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
310
310
  contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
311
311
  "application/json"
312
312
  ]);
@@ -349,7 +349,7 @@ var DefaultApiRequestFactory = (function (_super) {
349
349
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
350
350
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
351
351
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
352
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
352
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
353
353
  contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
354
354
  "application/json"
355
355
  ]);
@@ -388,7 +388,7 @@ var DefaultApiRequestFactory = (function (_super) {
388
388
  localVarPath = '/notifications';
389
389
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
390
390
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
391
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
391
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
392
392
  contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
393
393
  "application/json"
394
394
  ]);
@@ -428,7 +428,7 @@ var DefaultApiRequestFactory = (function (_super) {
428
428
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
429
429
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
430
430
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
431
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
431
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
432
432
  contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
433
433
  "application/json"
434
434
  ]);
@@ -479,7 +479,7 @@ var DefaultApiRequestFactory = (function (_super) {
479
479
  .replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
480
480
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
481
481
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
482
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
482
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
483
483
  contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
484
484
  "application/json"
485
485
  ]);
@@ -518,7 +518,7 @@ var DefaultApiRequestFactory = (function (_super) {
518
518
  localVarPath = '/templates';
519
519
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
520
520
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
521
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
521
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
522
522
  contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
523
523
  "application/json"
524
524
  ]);
@@ -561,7 +561,7 @@ var DefaultApiRequestFactory = (function (_super) {
561
561
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
562
562
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
563
563
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
564
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
564
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
565
565
  contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
566
566
  "application/json"
567
567
  ]);
@@ -613,7 +613,7 @@ var DefaultApiRequestFactory = (function (_super) {
613
613
  .replace('{' + 'alias_label_to_delete' + '}', encodeURIComponent(String(aliasLabelToDelete)));
614
614
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
615
615
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
616
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
616
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
617
617
  authMethod = _config.authMethods["rest_api_key"];
618
618
  if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
619
619
  return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
@@ -651,7 +651,7 @@ var DefaultApiRequestFactory = (function (_super) {
651
651
  .replace('{' + 'token_id' + '}', encodeURIComponent(String(tokenId)));
652
652
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
653
653
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
654
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
654
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
655
655
  authMethod = _config.authMethods["organization_api_key"];
656
656
  if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
657
657
  return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
@@ -689,7 +689,7 @@ var DefaultApiRequestFactory = (function (_super) {
689
689
  .replace('{' + 'segment_id' + '}', encodeURIComponent(String(segmentId)));
690
690
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
691
691
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
692
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
692
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
693
693
  authMethod = _config.authMethods["rest_api_key"];
694
694
  if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
695
695
  return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
@@ -727,7 +727,7 @@ var DefaultApiRequestFactory = (function (_super) {
727
727
  .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
728
728
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
729
729
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
730
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
730
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
731
731
  authMethod = _config.authMethods["rest_api_key"];
732
732
  if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
733
733
  return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
@@ -764,7 +764,7 @@ var DefaultApiRequestFactory = (function (_super) {
764
764
  .replace('{' + 'template_id' + '}', encodeURIComponent(String(templateId)));
765
765
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
766
766
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
767
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
767
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
768
768
  if (appId !== undefined) {
769
769
  requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
770
770
  }
@@ -809,7 +809,7 @@ var DefaultApiRequestFactory = (function (_super) {
809
809
  .replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
810
810
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
811
811
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
812
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
812
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
813
813
  authMethod = _config.authMethods["rest_api_key"];
814
814
  if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
815
815
  return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
@@ -846,7 +846,7 @@ var DefaultApiRequestFactory = (function (_super) {
846
846
  .replace('{' + 'notification_id' + '}', encodeURIComponent(String(notificationId)));
847
847
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
848
848
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
849
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
849
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
850
850
  if (appId !== undefined) {
851
851
  requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
852
852
  }
@@ -883,7 +883,7 @@ var DefaultApiRequestFactory = (function (_super) {
883
883
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
884
884
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
885
885
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
886
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
886
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
887
887
  contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
888
888
  "application/json"
889
889
  ]);
@@ -931,7 +931,7 @@ var DefaultApiRequestFactory = (function (_super) {
931
931
  .replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
932
932
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
933
933
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
934
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
934
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
935
935
  authMethod = _config.authMethods["rest_api_key"];
936
936
  if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
937
937
  return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
@@ -969,7 +969,7 @@ var DefaultApiRequestFactory = (function (_super) {
969
969
  .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
970
970
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
971
971
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
972
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
972
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
973
973
  authMethod = _config.authMethods["rest_api_key"];
974
974
  if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
975
975
  return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
@@ -1003,7 +1003,7 @@ var DefaultApiRequestFactory = (function (_super) {
1003
1003
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
1004
1004
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
1005
1005
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1006
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
1006
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
1007
1007
  authMethod = _config.authMethods["organization_api_key"];
1008
1008
  if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
1009
1009
  return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
@@ -1033,7 +1033,7 @@ var DefaultApiRequestFactory = (function (_super) {
1033
1033
  localVarPath = '/apps';
1034
1034
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
1035
1035
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1036
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
1036
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
1037
1037
  authMethod = _config.authMethods["organization_api_key"];
1038
1038
  if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
1039
1039
  return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
@@ -1070,7 +1070,7 @@ var DefaultApiRequestFactory = (function (_super) {
1070
1070
  .replace('{' + 'notification_id' + '}', encodeURIComponent(String(notificationId)));
1071
1071
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
1072
1072
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1073
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
1073
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
1074
1074
  if (appId !== undefined) {
1075
1075
  requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
1076
1076
  }
@@ -1110,7 +1110,7 @@ var DefaultApiRequestFactory = (function (_super) {
1110
1110
  .replace('{' + 'notification_id' + '}', encodeURIComponent(String(notificationId)));
1111
1111
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
1112
1112
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1113
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
1113
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
1114
1114
  contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
1115
1115
  "application/json"
1116
1116
  ]);
@@ -1149,7 +1149,7 @@ var DefaultApiRequestFactory = (function (_super) {
1149
1149
  localVarPath = '/notifications';
1150
1150
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
1151
1151
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1152
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
1152
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
1153
1153
  if (appId !== undefined) {
1154
1154
  requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
1155
1155
  }
@@ -1198,7 +1198,7 @@ var DefaultApiRequestFactory = (function (_super) {
1198
1198
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
1199
1199
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
1200
1200
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1201
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
1201
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
1202
1202
  if (outcomeNames !== undefined) {
1203
1203
  requestContext.setQueryParam("outcome_names", ObjectSerializer_1.ObjectSerializer.serialize(outcomeNames, "string", ""));
1204
1204
  }
@@ -1247,7 +1247,7 @@ var DefaultApiRequestFactory = (function (_super) {
1247
1247
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
1248
1248
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
1249
1249
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1250
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
1250
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
1251
1251
  if (offset !== undefined) {
1252
1252
  requestContext.setQueryParam("offset", ObjectSerializer_1.ObjectSerializer.serialize(offset, "number", ""));
1253
1253
  }
@@ -1295,7 +1295,7 @@ var DefaultApiRequestFactory = (function (_super) {
1295
1295
  .replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
1296
1296
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
1297
1297
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1298
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
1298
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
1299
1299
  authMethod = _config.authMethods["rest_api_key"];
1300
1300
  if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
1301
1301
  return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
@@ -1333,7 +1333,7 @@ var DefaultApiRequestFactory = (function (_super) {
1333
1333
  .replace('{' + 'token_id' + '}', encodeURIComponent(String(tokenId)));
1334
1334
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
1335
1335
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1336
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
1336
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
1337
1337
  authMethod = _config.authMethods["organization_api_key"];
1338
1338
  if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
1339
1339
  return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
@@ -1374,7 +1374,7 @@ var DefaultApiRequestFactory = (function (_super) {
1374
1374
  .replace('{' + 'activity_type' + '}', encodeURIComponent(String(activityType)));
1375
1375
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
1376
1376
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1377
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
1377
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
1378
1378
  contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
1379
1379
  "application/json"
1380
1380
  ]);
@@ -1421,7 +1421,7 @@ var DefaultApiRequestFactory = (function (_super) {
1421
1421
  .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
1422
1422
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
1423
1423
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1424
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
1424
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
1425
1425
  contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
1426
1426
  "application/json"
1427
1427
  ]);
@@ -1468,7 +1468,7 @@ var DefaultApiRequestFactory = (function (_super) {
1468
1468
  .replace('{' + 'notification_id' + '}', encodeURIComponent(String(notificationId)));
1469
1469
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
1470
1470
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1471
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
1471
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
1472
1472
  if (token !== undefined) {
1473
1473
  requestContext.setQueryParam("token", ObjectSerializer_1.ObjectSerializer.serialize(token, "string", ""));
1474
1474
  }
@@ -1512,7 +1512,7 @@ var DefaultApiRequestFactory = (function (_super) {
1512
1512
  .replace('{' + 'token_id' + '}', encodeURIComponent(String(tokenId)));
1513
1513
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
1514
1514
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1515
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
1515
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
1516
1516
  contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
1517
1517
  "application/json"
1518
1518
  ]);
@@ -1555,7 +1555,7 @@ var DefaultApiRequestFactory = (function (_super) {
1555
1555
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
1556
1556
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PUT);
1557
1557
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1558
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
1558
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
1559
1559
  contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
1560
1560
  "application/json"
1561
1561
  ]);
@@ -1602,7 +1602,7 @@ var DefaultApiRequestFactory = (function (_super) {
1602
1602
  .replace('{' + 'activity_id' + '}', encodeURIComponent(String(activityId)));
1603
1603
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
1604
1604
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1605
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
1605
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
1606
1606
  contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
1607
1607
  "application/json"
1608
1608
  ]);
@@ -1649,7 +1649,7 @@ var DefaultApiRequestFactory = (function (_super) {
1649
1649
  .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
1650
1650
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
1651
1651
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1652
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
1652
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
1653
1653
  contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
1654
1654
  "application/json"
1655
1655
  ]);
@@ -1700,7 +1700,7 @@ var DefaultApiRequestFactory = (function (_super) {
1700
1700
  .replace('{' + 'token' + '}', encodeURIComponent(String(token)));
1701
1701
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
1702
1702
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1703
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
1703
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
1704
1704
  contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
1705
1705
  "application/json"
1706
1706
  ]);
@@ -1746,7 +1746,7 @@ var DefaultApiRequestFactory = (function (_super) {
1746
1746
  .replace('{' + 'template_id' + '}', encodeURIComponent(String(templateId)));
1747
1747
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
1748
1748
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1749
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
1749
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
1750
1750
  if (appId !== undefined) {
1751
1751
  requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
1752
1752
  }
@@ -1800,7 +1800,7 @@ var DefaultApiRequestFactory = (function (_super) {
1800
1800
  .replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
1801
1801
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
1802
1802
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1803
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
1803
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
1804
1804
  contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
1805
1805
  "application/json"
1806
1806
  ]);
@@ -1840,7 +1840,7 @@ var DefaultApiRequestFactory = (function (_super) {
1840
1840
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
1841
1841
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
1842
1842
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1843
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
1843
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
1844
1844
  authMethod = _config.authMethods["organization_api_key"];
1845
1845
  if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
1846
1846
  return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
@@ -1877,7 +1877,7 @@ var DefaultApiRequestFactory = (function (_super) {
1877
1877
  .replace('{' + 'template_id' + '}', encodeURIComponent(String(templateId)));
1878
1878
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
1879
1879
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1880
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
1880
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
1881
1881
  if (appId !== undefined) {
1882
1882
  requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
1883
1883
  }
@@ -1913,7 +1913,7 @@ var DefaultApiRequestFactory = (function (_super) {
1913
1913
  localVarPath = '/templates';
1914
1914
  requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
1915
1915
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1916
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.4.0");
1916
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.5.0");
1917
1917
  if (appId !== undefined) {
1918
1918
  requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
1919
1919
  }
@@ -3,6 +3,8 @@ export declare class CreateTemplateRequest {
3
3
  'app_id': string;
4
4
  'name': string;
5
5
  'contents': LanguageStringMap;
6
+ 'headings'?: LanguageStringMap;
7
+ 'subtitle'?: LanguageStringMap;
6
8
  'is_email'?: boolean;
7
9
  'email_subject'?: string;
8
10
  'email_body'?: string;
@@ -27,6 +27,18 @@ var CreateTemplateRequest = (function () {
27
27
  "type": "LanguageStringMap",
28
28
  "format": ""
29
29
  },
30
+ {
31
+ "name": "headings",
32
+ "baseName": "headings",
33
+ "type": "LanguageStringMap",
34
+ "format": ""
35
+ },
36
+ {
37
+ "name": "subtitle",
38
+ "baseName": "subtitle",
39
+ "type": "LanguageStringMap",
40
+ "format": ""
41
+ },
30
42
  {
31
43
  "name": "is_email",
32
44
  "baseName": "isEmail",
@@ -2,6 +2,8 @@ import { LanguageStringMap } from './LanguageStringMap';
2
2
  export declare class UpdateTemplateRequest {
3
3
  'name'?: string;
4
4
  'contents'?: LanguageStringMap;
5
+ 'headings'?: LanguageStringMap;
6
+ 'subtitle'?: LanguageStringMap;
5
7
  'is_email'?: boolean;
6
8
  'email_subject'?: string;
7
9
  'email_body'?: string;
@@ -21,6 +21,18 @@ var UpdateTemplateRequest = (function () {
21
21
  "type": "LanguageStringMap",
22
22
  "format": ""
23
23
  },
24
+ {
25
+ "name": "headings",
26
+ "baseName": "headings",
27
+ "type": "LanguageStringMap",
28
+ "format": ""
29
+ },
30
+ {
31
+ "name": "subtitle",
32
+ "baseName": "subtitle",
33
+ "type": "LanguageStringMap",
34
+ "format": ""
35
+ },
24
36
  {
25
37
  "name": "is_email",
26
38
  "baseName": "isEmail",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onesignal/node-onesignal",
3
- "version": "5.4.0",
3
+ "version": "5.5.0",
4
4
  "description": "OpenAPI client for @onesignal/node-onesignal",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [