@onesignal/node-onesignal 5.9.0 → 5.11.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
@@ -13,6 +13,8 @@
13
13
 
14
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).
15
15
 
16
+ > **Building with an AI agent or LLM?** See [AGENTS.md](https://github.com/OneSignal/node-onesignal/blob/main/AGENTS.md) for an agent-oriented integration guide — authentication, calling conventions, idempotent retries, and the full API reference.
17
+
16
18
  ## Installation
17
19
 
18
20
  ```sh
@@ -63,7 +63,7 @@ export declare class DefaultApiRequestFactory extends BaseAPIRequestFactory {
63
63
  getApps(_options?: Configuration): Promise<RequestContext>;
64
64
  getNotification(appId: string, notificationId: string, _options?: Configuration): Promise<RequestContext>;
65
65
  getNotificationHistory(notificationId: string, getNotificationHistoryRequestBody: GetNotificationHistoryRequestBody, _options?: Configuration): Promise<RequestContext>;
66
- getNotifications(appId: string, limit?: number, offset?: number, kind?: 0 | 1 | 3, _options?: Configuration): Promise<RequestContext>;
66
+ getNotifications(appId: string, limit?: number, offset?: number, kind?: 0 | 1 | 3, timeOffset?: string, _options?: Configuration): Promise<RequestContext>;
67
67
  getOutcomes(appId: string, outcomeNames: string, outcomeNames2?: string, outcomeTimeRange?: string, outcomePlatforms?: string, outcomeAttribution?: string, _options?: Configuration): Promise<RequestContext>;
68
68
  getSegments(appId: string, offset?: number, limit?: number, _options?: Configuration): Promise<RequestContext>;
69
69
  getUser(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Promise<RequestContext>;
@@ -19,7 +19,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
19
19
  .replace('{' + 'notification_id' + '}', encodeURIComponent(String(notificationId)));
20
20
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
21
21
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
22
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
22
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
23
23
  if (appId !== undefined) {
24
24
  requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
25
25
  }
@@ -49,7 +49,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
49
49
  .replace('{' + 'template_id' + '}', encodeURIComponent(String(templateId)));
50
50
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
51
51
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
52
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
52
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
53
53
  if (appId !== undefined) {
54
54
  requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
55
55
  }
@@ -90,7 +90,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
90
90
  .replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
91
91
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
92
92
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
93
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
93
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
94
94
  const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
95
95
  "application/json"
96
96
  ]);
@@ -124,7 +124,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
124
124
  .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
125
125
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
126
126
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
127
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
127
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
128
128
  const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
129
129
  "application/json"
130
130
  ]);
@@ -154,7 +154,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
154
154
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
155
155
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
156
156
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
157
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
157
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
158
158
  const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
159
159
  "application/json"
160
160
  ]);
@@ -180,7 +180,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
180
180
  const localVarPath = '/apps';
181
181
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
182
182
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
183
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
183
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
184
184
  const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
185
185
  "application/json"
186
186
  ]);
@@ -210,7 +210,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
210
210
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
211
211
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
212
212
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
213
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
213
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
214
214
  const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
215
215
  "application/json"
216
216
  ]);
@@ -236,7 +236,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
236
236
  const localVarPath = '/notifications';
237
237
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
238
238
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
239
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
239
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
240
240
  const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
241
241
  "application/json"
242
242
  ]);
@@ -263,7 +263,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
263
263
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
264
264
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
265
265
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
266
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
266
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
267
267
  const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
268
268
  "application/json"
269
269
  ]);
@@ -301,7 +301,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
301
301
  .replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
302
302
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
303
303
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
304
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
304
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
305
305
  const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
306
306
  "application/json"
307
307
  ]);
@@ -327,7 +327,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
327
327
  const localVarPath = '/templates';
328
328
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
329
329
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
330
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
330
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
331
331
  const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
332
332
  "application/json"
333
333
  ]);
@@ -357,7 +357,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
357
357
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
358
358
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
359
359
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
360
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
360
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
361
361
  const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
362
362
  "application/json"
363
363
  ]);
@@ -396,7 +396,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
396
396
  .replace('{' + 'alias_label_to_delete' + '}', encodeURIComponent(String(aliasLabelToDelete)));
397
397
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
398
398
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
399
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
399
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
400
400
  let authMethod;
401
401
  authMethod = _config.authMethods["rest_api_key"];
402
402
  if (authMethod?.applySecurityAuthentication) {
@@ -421,7 +421,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
421
421
  .replace('{' + 'token_id' + '}', encodeURIComponent(String(tokenId)));
422
422
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
423
423
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
424
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
424
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
425
425
  let authMethod;
426
426
  authMethod = _config.authMethods["organization_api_key"];
427
427
  if (authMethod?.applySecurityAuthentication) {
@@ -446,7 +446,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
446
446
  .replace('{' + 'segment_id' + '}', encodeURIComponent(String(segmentId)));
447
447
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
448
448
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
449
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
449
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
450
450
  let authMethod;
451
451
  authMethod = _config.authMethods["rest_api_key"];
452
452
  if (authMethod?.applySecurityAuthentication) {
@@ -471,7 +471,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
471
471
  .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
472
472
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
473
473
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
474
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
474
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
475
475
  let authMethod;
476
476
  authMethod = _config.authMethods["rest_api_key"];
477
477
  if (authMethod?.applySecurityAuthentication) {
@@ -495,7 +495,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
495
495
  .replace('{' + 'template_id' + '}', encodeURIComponent(String(templateId)));
496
496
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
497
497
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
498
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
498
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
499
499
  if (appId !== undefined) {
500
500
  requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
501
501
  }
@@ -527,7 +527,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
527
527
  .replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
528
528
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
529
529
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
530
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
530
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
531
531
  let authMethod;
532
532
  authMethod = _config.authMethods["rest_api_key"];
533
533
  if (authMethod?.applySecurityAuthentication) {
@@ -551,7 +551,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
551
551
  .replace('{' + 'notification_id' + '}', encodeURIComponent(String(notificationId)));
552
552
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
553
553
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
554
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
554
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
555
555
  if (appId !== undefined) {
556
556
  requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
557
557
  }
@@ -575,7 +575,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
575
575
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
576
576
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
577
577
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
578
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
578
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
579
579
  const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
580
580
  "application/json"
581
581
  ]);
@@ -610,7 +610,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
610
610
  .replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
611
611
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
612
612
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
613
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
613
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
614
614
  let authMethod;
615
615
  authMethod = _config.authMethods["rest_api_key"];
616
616
  if (authMethod?.applySecurityAuthentication) {
@@ -635,7 +635,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
635
635
  .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
636
636
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
637
637
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
638
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
638
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
639
639
  let authMethod;
640
640
  authMethod = _config.authMethods["rest_api_key"];
641
641
  if (authMethod?.applySecurityAuthentication) {
@@ -656,7 +656,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
656
656
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
657
657
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
658
658
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
659
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
659
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
660
660
  let authMethod;
661
661
  authMethod = _config.authMethods["organization_api_key"];
662
662
  if (authMethod?.applySecurityAuthentication) {
@@ -673,7 +673,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
673
673
  const localVarPath = '/apps';
674
674
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
675
675
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
676
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
676
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
677
677
  let authMethod;
678
678
  authMethod = _config.authMethods["organization_api_key"];
679
679
  if (authMethod?.applySecurityAuthentication) {
@@ -697,7 +697,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
697
697
  .replace('{' + 'notification_id' + '}', encodeURIComponent(String(notificationId)));
698
698
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
699
699
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
700
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
700
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
701
701
  if (appId !== undefined) {
702
702
  requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
703
703
  }
@@ -724,7 +724,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
724
724
  .replace('{' + 'notification_id' + '}', encodeURIComponent(String(notificationId)));
725
725
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
726
726
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
727
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
727
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
728
728
  const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
729
729
  "application/json"
730
730
  ]);
@@ -742,7 +742,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
742
742
  }
743
743
  return requestContext;
744
744
  }
745
- async getNotifications(appId, limit, offset, kind, _options) {
745
+ async getNotifications(appId, limit, offset, kind, timeOffset, _options) {
746
746
  let _config = _options || this.configuration;
747
747
  if (appId === null || appId === undefined) {
748
748
  throw new baseapi_1.RequiredError("DefaultApi", "getNotifications", "appId");
@@ -750,7 +750,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
750
750
  const localVarPath = '/notifications';
751
751
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
752
752
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
753
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
753
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
754
754
  if (appId !== undefined) {
755
755
  requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
756
756
  }
@@ -763,6 +763,9 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
763
763
  if (kind !== undefined) {
764
764
  requestContext.setQueryParam("kind", ObjectSerializer_1.ObjectSerializer.serialize(kind, "0 | 1 | 3", ""));
765
765
  }
766
+ if (timeOffset !== undefined) {
767
+ requestContext.setQueryParam("time_offset", ObjectSerializer_1.ObjectSerializer.serialize(timeOffset, "string", ""));
768
+ }
766
769
  let authMethod;
767
770
  authMethod = _config.authMethods["rest_api_key"];
768
771
  if (authMethod?.applySecurityAuthentication) {
@@ -786,7 +789,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
786
789
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
787
790
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
788
791
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
789
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
792
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
790
793
  if (outcomeNames !== undefined) {
791
794
  requestContext.setQueryParam("outcome_names", ObjectSerializer_1.ObjectSerializer.serialize(outcomeNames, "string", ""));
792
795
  }
@@ -822,7 +825,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
822
825
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
823
826
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
824
827
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
825
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
828
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
826
829
  if (offset !== undefined) {
827
830
  requestContext.setQueryParam("offset", ObjectSerializer_1.ObjectSerializer.serialize(offset, "number", ""));
828
831
  }
@@ -857,7 +860,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
857
860
  .replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
858
861
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
859
862
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
860
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
863
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
861
864
  let authMethod;
862
865
  authMethod = _config.authMethods["rest_api_key"];
863
866
  if (authMethod?.applySecurityAuthentication) {
@@ -882,7 +885,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
882
885
  .replace('{' + 'token_id' + '}', encodeURIComponent(String(tokenId)));
883
886
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
884
887
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
885
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
888
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
886
889
  let authMethod;
887
890
  authMethod = _config.authMethods["organization_api_key"];
888
891
  if (authMethod?.applySecurityAuthentication) {
@@ -910,7 +913,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
910
913
  .replace('{' + 'activity_type' + '}', encodeURIComponent(String(activityType)));
911
914
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
912
915
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
913
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
916
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
914
917
  const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
915
918
  "application/json"
916
919
  ]);
@@ -944,7 +947,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
944
947
  .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
945
948
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
946
949
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
947
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
950
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
948
951
  const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
949
952
  "application/json"
950
953
  ]);
@@ -978,7 +981,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
978
981
  .replace('{' + 'notification_id' + '}', encodeURIComponent(String(notificationId)));
979
982
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
980
983
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
981
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
984
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
982
985
  if (token !== undefined) {
983
986
  requestContext.setQueryParam("token", ObjectSerializer_1.ObjectSerializer.serialize(token, "string", ""));
984
987
  }
@@ -1009,7 +1012,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
1009
1012
  .replace('{' + 'token_id' + '}', encodeURIComponent(String(tokenId)));
1010
1013
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
1011
1014
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1012
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
1015
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
1013
1016
  const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
1014
1017
  "application/json"
1015
1018
  ]);
@@ -1039,7 +1042,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
1039
1042
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
1040
1043
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PUT);
1041
1044
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1042
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
1045
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
1043
1046
  const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
1044
1047
  "application/json"
1045
1048
  ]);
@@ -1073,7 +1076,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
1073
1076
  .replace('{' + 'activity_id' + '}', encodeURIComponent(String(activityId)));
1074
1077
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
1075
1078
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1076
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
1079
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
1077
1080
  const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
1078
1081
  "application/json"
1079
1082
  ]);
@@ -1107,7 +1110,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
1107
1110
  .replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
1108
1111
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
1109
1112
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1110
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
1113
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
1111
1114
  const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
1112
1115
  "application/json"
1113
1116
  ]);
@@ -1145,7 +1148,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
1145
1148
  .replace('{' + 'token' + '}', encodeURIComponent(String(token)));
1146
1149
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
1147
1150
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1148
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
1151
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
1149
1152
  const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
1150
1153
  "application/json"
1151
1154
  ]);
@@ -1178,7 +1181,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
1178
1181
  .replace('{' + 'template_id' + '}', encodeURIComponent(String(templateId)));
1179
1182
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
1180
1183
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1181
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
1184
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
1182
1185
  if (appId !== undefined) {
1183
1186
  requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
1184
1187
  }
@@ -1219,7 +1222,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
1219
1222
  .replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
1220
1223
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
1221
1224
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1222
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
1225
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
1223
1226
  const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
1224
1227
  "application/json"
1225
1228
  ]);
@@ -1246,7 +1249,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
1246
1249
  .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
1247
1250
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
1248
1251
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1249
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
1252
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
1250
1253
  let authMethod;
1251
1254
  authMethod = _config.authMethods["organization_api_key"];
1252
1255
  if (authMethod?.applySecurityAuthentication) {
@@ -1270,7 +1273,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
1270
1273
  .replace('{' + 'template_id' + '}', encodeURIComponent(String(templateId)));
1271
1274
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
1272
1275
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1273
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
1276
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
1274
1277
  if (appId !== undefined) {
1275
1278
  requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
1276
1279
  }
@@ -1293,7 +1296,7 @@ class DefaultApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
1293
1296
  const localVarPath = '/templates';
1294
1297
  const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
1295
1298
  requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1296
- requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.8.0");
1299
+ requestContext.setHeaderParam("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-typescript, version=5.10.0");
1297
1300
  if (appId !== undefined) {
1298
1301
  requestContext.setQueryParam("app_id", ObjectSerializer_1.ObjectSerializer.serialize(appId, "string", ""));
1299
1302
  }
@@ -1338,6 +1341,10 @@ class DefaultApiResponseProcessor {
1338
1341
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
1339
1342
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
1340
1343
  }
1344
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
1345
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1346
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
1347
+ }
1341
1348
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1342
1349
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericSuccessBoolResponse", "");
1343
1350
  return body;
@@ -1354,6 +1361,10 @@ class DefaultApiResponseProcessor {
1354
1361
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1355
1362
  throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
1356
1363
  }
1364
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
1365
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1366
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
1367
+ }
1357
1368
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1358
1369
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "TemplateResource", "");
1359
1370
  return body;
@@ -1382,6 +1393,10 @@ class DefaultApiResponseProcessor {
1382
1393
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
1383
1394
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
1384
1395
  }
1396
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
1397
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1398
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
1399
+ }
1385
1400
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1386
1401
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UserIdentityBody", "");
1387
1402
  return body;
@@ -1410,6 +1425,10 @@ class DefaultApiResponseProcessor {
1410
1425
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
1411
1426
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
1412
1427
  }
1428
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
1429
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1430
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
1431
+ }
1413
1432
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1414
1433
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UserIdentityBody", "");
1415
1434
  return body;
@@ -1426,6 +1445,10 @@ class DefaultApiResponseProcessor {
1426
1445
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1427
1446
  throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
1428
1447
  }
1448
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
1449
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1450
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
1451
+ }
1429
1452
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1430
1453
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "CreateApiKeyResponse", "");
1431
1454
  return body;
@@ -1446,6 +1469,10 @@ class DefaultApiResponseProcessor {
1446
1469
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
1447
1470
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
1448
1471
  }
1472
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
1473
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1474
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
1475
+ }
1449
1476
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1450
1477
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "App", "");
1451
1478
  return body;
@@ -1470,6 +1497,10 @@ class DefaultApiResponseProcessor {
1470
1497
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
1471
1498
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
1472
1499
  }
1500
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
1501
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1502
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
1503
+ }
1473
1504
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1474
1505
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "object", "");
1475
1506
  return body;
@@ -1490,6 +1521,10 @@ class DefaultApiResponseProcessor {
1490
1521
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
1491
1522
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
1492
1523
  }
1524
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
1525
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1526
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
1527
+ }
1493
1528
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1494
1529
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "CreateNotificationSuccessResponse", "");
1495
1530
  return body;
@@ -1514,6 +1549,10 @@ class DefaultApiResponseProcessor {
1514
1549
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
1515
1550
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
1516
1551
  }
1552
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
1553
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1554
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
1555
+ }
1517
1556
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1518
1557
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "CreateSegmentSuccessResponse", "");
1519
1558
  return body;
@@ -1546,6 +1585,10 @@ class DefaultApiResponseProcessor {
1546
1585
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
1547
1586
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
1548
1587
  }
1588
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
1589
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1590
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
1591
+ }
1549
1592
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1550
1593
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "SubscriptionBody", "");
1551
1594
  return body;
@@ -1566,6 +1609,10 @@ class DefaultApiResponseProcessor {
1566
1609
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1567
1610
  throw new exception_1.ApiException(422, "Unprocessable Entity", body, response.headers);
1568
1611
  }
1612
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
1613
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1614
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
1615
+ }
1569
1616
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1570
1617
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "TemplateResource", "");
1571
1618
  return body;
@@ -1598,6 +1645,10 @@ class DefaultApiResponseProcessor {
1598
1645
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
1599
1646
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
1600
1647
  }
1648
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
1649
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1650
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
1651
+ }
1601
1652
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1602
1653
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "User", "");
1603
1654
  return body;
@@ -1626,6 +1677,10 @@ class DefaultApiResponseProcessor {
1626
1677
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
1627
1678
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
1628
1679
  }
1680
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
1681
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1682
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
1683
+ }
1629
1684
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1630
1685
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UserIdentityBody", "");
1631
1686
  return body;
@@ -1642,6 +1697,10 @@ class DefaultApiResponseProcessor {
1642
1697
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1643
1698
  throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
1644
1699
  }
1700
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
1701
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1702
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
1703
+ }
1645
1704
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1646
1705
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "object", "");
1647
1706
  return body;
@@ -1666,6 +1725,10 @@ class DefaultApiResponseProcessor {
1666
1725
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
1667
1726
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
1668
1727
  }
1728
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
1729
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1730
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
1731
+ }
1669
1732
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1670
1733
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericSuccessBoolResponse", "");
1671
1734
  return body;
@@ -1693,6 +1756,10 @@ class DefaultApiResponseProcessor {
1693
1756
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
1694
1757
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
1695
1758
  }
1759
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
1760
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1761
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
1762
+ }
1696
1763
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1697
1764
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "void", "");
1698
1765
  return body;
@@ -1713,6 +1780,10 @@ class DefaultApiResponseProcessor {
1713
1780
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1714
1781
  throw new exception_1.ApiException(404, "Not Found", body, response.headers);
1715
1782
  }
1783
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
1784
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1785
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
1786
+ }
1716
1787
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1717
1788
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericSuccessBoolResponse", "");
1718
1789
  return body;
@@ -1736,6 +1807,10 @@ class DefaultApiResponseProcessor {
1736
1807
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
1737
1808
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
1738
1809
  }
1810
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
1811
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1812
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
1813
+ }
1739
1814
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1740
1815
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "void", "");
1741
1816
  return body;
@@ -1760,6 +1835,10 @@ class DefaultApiResponseProcessor {
1760
1835
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
1761
1836
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
1762
1837
  }
1838
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
1839
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1840
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
1841
+ }
1763
1842
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1764
1843
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ExportEventsSuccessResponse", "");
1765
1844
  return body;
@@ -1780,6 +1859,10 @@ class DefaultApiResponseProcessor {
1780
1859
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
1781
1860
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
1782
1861
  }
1862
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
1863
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1864
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
1865
+ }
1783
1866
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1784
1867
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ExportSubscriptionsSuccessResponse", "");
1785
1868
  return body;
@@ -1804,6 +1887,10 @@ class DefaultApiResponseProcessor {
1804
1887
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
1805
1888
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
1806
1889
  }
1890
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
1891
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1892
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
1893
+ }
1807
1894
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1808
1895
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UserIdentityBody", "");
1809
1896
  return body;
@@ -1824,6 +1911,10 @@ class DefaultApiResponseProcessor {
1824
1911
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1825
1912
  throw new exception_1.ApiException(404, "Not Found", body, response.headers);
1826
1913
  }
1914
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
1915
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1916
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
1917
+ }
1827
1918
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1828
1919
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UserIdentityBody", "");
1829
1920
  return body;
@@ -1844,6 +1935,10 @@ class DefaultApiResponseProcessor {
1844
1935
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
1845
1936
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
1846
1937
  }
1938
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
1939
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1940
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
1941
+ }
1847
1942
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1848
1943
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "App", "");
1849
1944
  return body;
@@ -1864,6 +1959,10 @@ class DefaultApiResponseProcessor {
1864
1959
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
1865
1960
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
1866
1961
  }
1962
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
1963
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1964
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
1965
+ }
1867
1966
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1868
1967
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Array<App>", "");
1869
1968
  return body;
@@ -1888,6 +1987,10 @@ class DefaultApiResponseProcessor {
1888
1987
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
1889
1988
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
1890
1989
  }
1990
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
1991
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
1992
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
1993
+ }
1891
1994
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1892
1995
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotificationWithMeta", "");
1893
1996
  return body;
@@ -1912,6 +2015,10 @@ class DefaultApiResponseProcessor {
1912
2015
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
1913
2016
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
1914
2017
  }
2018
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
2019
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
2020
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
2021
+ }
1915
2022
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1916
2023
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotificationHistorySuccessResponse", "");
1917
2024
  return body;
@@ -1932,6 +2039,10 @@ class DefaultApiResponseProcessor {
1932
2039
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
1933
2040
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
1934
2041
  }
2042
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
2043
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
2044
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
2045
+ }
1935
2046
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1936
2047
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotificationSlice", "");
1937
2048
  return body;
@@ -1952,6 +2063,10 @@ class DefaultApiResponseProcessor {
1952
2063
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
1953
2064
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
1954
2065
  }
2066
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
2067
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
2068
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
2069
+ }
1955
2070
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1956
2071
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "OutcomesData", "");
1957
2072
  return body;
@@ -1972,6 +2087,10 @@ class DefaultApiResponseProcessor {
1972
2087
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
1973
2088
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
1974
2089
  }
2090
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
2091
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
2092
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
2093
+ }
1975
2094
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1976
2095
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetSegmentsSuccessResponse", "");
1977
2096
  return body;
@@ -1996,6 +2115,10 @@ class DefaultApiResponseProcessor {
1996
2115
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
1997
2116
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
1998
2117
  }
2118
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
2119
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
2120
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
2121
+ }
1999
2122
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2000
2123
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "User", "");
2001
2124
  return body;
@@ -2012,6 +2135,10 @@ class DefaultApiResponseProcessor {
2012
2135
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
2013
2136
  throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
2014
2137
  }
2138
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
2139
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
2140
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
2141
+ }
2015
2142
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2016
2143
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "CreateApiKeyResponse", "");
2017
2144
  return body;
@@ -2032,6 +2159,10 @@ class DefaultApiResponseProcessor {
2032
2159
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
2033
2160
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
2034
2161
  }
2162
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
2163
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
2164
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
2165
+ }
2035
2166
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2036
2167
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "StartLiveActivitySuccessResponse", "");
2037
2168
  return body;
@@ -2060,6 +2191,10 @@ class DefaultApiResponseProcessor {
2060
2191
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
2061
2192
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
2062
2193
  }
2194
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
2195
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
2196
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
2197
+ }
2063
2198
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2064
2199
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UserIdentityBody", "");
2065
2200
  return body;
@@ -2080,6 +2215,10 @@ class DefaultApiResponseProcessor {
2080
2215
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
2081
2216
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
2082
2217
  }
2218
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
2219
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
2220
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
2221
+ }
2083
2222
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2084
2223
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericSuccessBoolResponse", "");
2085
2224
  return body;
@@ -2096,6 +2235,10 @@ class DefaultApiResponseProcessor {
2096
2235
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
2097
2236
  throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
2098
2237
  }
2238
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
2239
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
2240
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
2241
+ }
2099
2242
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2100
2243
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "object", "");
2101
2244
  return body;
@@ -2116,6 +2259,10 @@ class DefaultApiResponseProcessor {
2116
2259
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
2117
2260
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
2118
2261
  }
2262
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
2263
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
2264
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
2265
+ }
2119
2266
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2120
2267
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "App", "");
2121
2268
  return body;
@@ -2136,6 +2283,10 @@ class DefaultApiResponseProcessor {
2136
2283
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
2137
2284
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
2138
2285
  }
2286
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
2287
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
2288
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
2289
+ }
2139
2290
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2140
2291
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UpdateLiveActivitySuccessResponse", "");
2141
2292
  return body;
@@ -2163,6 +2314,10 @@ class DefaultApiResponseProcessor {
2163
2314
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
2164
2315
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
2165
2316
  }
2317
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
2318
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
2319
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
2320
+ }
2166
2321
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2167
2322
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "void", "");
2168
2323
  return body;
@@ -2183,6 +2338,10 @@ class DefaultApiResponseProcessor {
2183
2338
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
2184
2339
  throw new exception_1.ApiException(404, "Not Found", body, response.headers);
2185
2340
  }
2341
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
2342
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
2343
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
2344
+ }
2186
2345
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2187
2346
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "object", "");
2188
2347
  return body;
@@ -2199,6 +2358,10 @@ class DefaultApiResponseProcessor {
2199
2358
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
2200
2359
  throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
2201
2360
  }
2361
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
2362
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
2363
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
2364
+ }
2202
2365
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2203
2366
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "TemplateResource", "");
2204
2367
  return body;
@@ -2223,6 +2386,10 @@ class DefaultApiResponseProcessor {
2223
2386
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
2224
2387
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
2225
2388
  }
2389
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
2390
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
2391
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
2392
+ }
2226
2393
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2227
2394
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "PropertiesBody", "");
2228
2395
  return body;
@@ -2239,6 +2406,10 @@ class DefaultApiResponseProcessor {
2239
2406
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
2240
2407
  throw new exception_1.ApiException(400, "Bad Request", body, response.headers);
2241
2408
  }
2409
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
2410
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
2411
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
2412
+ }
2242
2413
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2243
2414
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ApiKeyTokensListResponse", "");
2244
2415
  return body;
@@ -2259,6 +2430,10 @@ class DefaultApiResponseProcessor {
2259
2430
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
2260
2431
  throw new exception_1.ApiException(404, "Not Found", body, response.headers);
2261
2432
  }
2433
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
2434
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
2435
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
2436
+ }
2262
2437
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2263
2438
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "TemplateResource", "");
2264
2439
  return body;
@@ -2279,6 +2454,10 @@ class DefaultApiResponseProcessor {
2279
2454
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitError", "");
2280
2455
  throw new exception_1.ApiException(429, "Rate Limit Exceeded", body, response.headers);
2281
2456
  }
2457
+ if ((0, util_1.isCodeInRange)("0", response.httpStatusCode) && response.httpStatusCode >= 300) {
2458
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GenericError", "");
2459
+ throw new exception_1.ApiException(response.httpStatusCode, "Unexpected error", body, response.headers);
2460
+ }
2282
2461
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2283
2462
  const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "TemplatesListResponse", "");
2284
2463
  return body;
package/dist/helpers.d.ts CHANGED
@@ -10,3 +10,7 @@ export interface CreateNotificationWithRetryResult {
10
10
  wasReplayed: boolean;
11
11
  }
12
12
  export declare function createNotificationWithRetry(configuration: Configuration, notification: Notification, options?: CreateNotificationWithRetryOptions): Promise<CreateNotificationWithRetryResult>;
13
+ export type MessageSent = CreateNotificationSuccessResponse;
14
+ export type MessageNotSent = CreateNotificationSuccessResponse;
15
+ export declare function isMessageSent(response: CreateNotificationSuccessResponse): response is MessageSent;
16
+ export declare function isMessageNotSent(response: CreateNotificationSuccessResponse): response is MessageNotSent;
package/dist/helpers.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createNotificationWithRetry = void 0;
3
+ exports.isMessageNotSent = exports.isMessageSent = exports.createNotificationWithRetry = void 0;
4
4
  const crypto_1 = require("crypto");
5
5
  const DefaultApi_1 = require("./apis/DefaultApi");
6
6
  const RETRYABLE_STATUSES = [429, 503];
@@ -76,4 +76,12 @@ function generateUuidV4() {
76
76
  function sleep(ms) {
77
77
  return new Promise((resolve) => setTimeout(resolve, ms));
78
78
  }
79
+ function isMessageSent(response) {
80
+ return typeof response.id === 'string' && response.id.length > 0;
81
+ }
82
+ exports.isMessageSent = isMessageSent;
83
+ function isMessageNotSent(response) {
84
+ return !isMessageSent(response);
85
+ }
86
+ exports.isMessageNotSent = isMessageNotSent;
79
87
  //# sourceMappingURL=helpers.js.map
@@ -3,6 +3,8 @@ export declare class NotificationSlice {
3
3
  'total_count'?: number;
4
4
  'offset'?: number;
5
5
  'limit'?: number;
6
+ 'time_offset'?: string;
7
+ 'next_time_offset'?: string;
6
8
  'notifications'?: Array<NotificationWithMeta>;
7
9
  static readonly discriminator: string | undefined;
8
10
  static readonly attributeTypeMap: Array<{
@@ -29,6 +29,18 @@ NotificationSlice.attributeTypeMap = [
29
29
  "type": "number",
30
30
  "format": ""
31
31
  },
32
+ {
33
+ "name": "time_offset",
34
+ "baseName": "time_offset",
35
+ "type": "string",
36
+ "format": ""
37
+ },
38
+ {
39
+ "name": "next_time_offset",
40
+ "baseName": "next_time_offset",
41
+ "type": "string",
42
+ "format": ""
43
+ },
32
44
  {
33
45
  "name": "notifications",
34
46
  "baseName": "notifications",
@@ -148,6 +148,7 @@ export interface DefaultApiGetNotificationsRequest {
148
148
  limit?: number;
149
149
  offset?: number;
150
150
  kind?: 0 | 1 | 3;
151
+ timeOffset?: string;
151
152
  }
152
153
  export interface DefaultApiGetOutcomesRequest {
153
154
  appId: string;
@@ -85,7 +85,7 @@ class ObjectDefaultApi {
85
85
  return this.api.getNotificationHistory(param.notificationId, param.getNotificationHistoryRequestBody, options).toPromise();
86
86
  }
87
87
  getNotifications(param, options) {
88
- return this.api.getNotifications(param.appId, param.limit, param.offset, param.kind, options).toPromise();
88
+ return this.api.getNotifications(param.appId, param.limit, param.offset, param.kind, param.timeOffset, options).toPromise();
89
89
  }
90
90
  getOutcomes(param, options) {
91
91
  return this.api.getOutcomes(param.appId, param.outcomeNames, param.outcomeNames2, param.outcomeTimeRange, param.outcomePlatforms, param.outcomeAttribution, options).toPromise();
@@ -67,7 +67,7 @@ export declare class ObservableDefaultApi {
67
67
  getApps(_options?: Configuration): Observable<Array<App>>;
68
68
  getNotification(appId: string, notificationId: string, _options?: Configuration): Observable<NotificationWithMeta>;
69
69
  getNotificationHistory(notificationId: string, getNotificationHistoryRequestBody: GetNotificationHistoryRequestBody, _options?: Configuration): Observable<NotificationHistorySuccessResponse>;
70
- getNotifications(appId: string, limit?: number, offset?: number, kind?: 0 | 1 | 3, _options?: Configuration): Observable<NotificationSlice>;
70
+ getNotifications(appId: string, limit?: number, offset?: number, kind?: 0 | 1 | 3, timeOffset?: string, _options?: Configuration): Observable<NotificationSlice>;
71
71
  getOutcomes(appId: string, outcomeNames: string, outcomeNames2?: string, outcomeTimeRange?: string, outcomePlatforms?: string, outcomeAttribution?: string, _options?: Configuration): Observable<OutcomesData>;
72
72
  getSegments(appId: string, offset?: number, limit?: number, _options?: Configuration): Observable<GetSegmentsSuccessResponse>;
73
73
  getUser(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Observable<User>;
@@ -400,8 +400,8 @@ class ObservableDefaultApi {
400
400
  return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.getNotificationHistory(rsp)));
401
401
  }));
402
402
  }
403
- getNotifications(appId, limit, offset, kind, _options) {
404
- const requestContextPromise = this.requestFactory.getNotifications(appId, limit, offset, kind, _options);
403
+ getNotifications(appId, limit, offset, kind, timeOffset, _options) {
404
+ const requestContextPromise = this.requestFactory.getNotifications(appId, limit, offset, kind, timeOffset, _options);
405
405
  let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
406
406
  for (let middleware of this.configuration.middleware) {
407
407
  middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
@@ -68,7 +68,7 @@ export declare class PromiseDefaultApi {
68
68
  getApps(_options?: Configuration): Promise<Array<App>>;
69
69
  getNotification(appId: string, notificationId: string, _options?: Configuration): Promise<NotificationWithMeta>;
70
70
  getNotificationHistory(notificationId: string, getNotificationHistoryRequestBody: GetNotificationHistoryRequestBody, _options?: Configuration): Promise<NotificationHistorySuccessResponse>;
71
- getNotifications(appId: string, limit?: number, offset?: number, kind?: 0 | 1 | 3, _options?: Configuration): Promise<NotificationSlice>;
71
+ getNotifications(appId: string, limit?: number, offset?: number, kind?: 0 | 1 | 3, timeOffset?: string, _options?: Configuration): Promise<NotificationSlice>;
72
72
  getOutcomes(appId: string, outcomeNames: string, outcomeNames2?: string, outcomeTimeRange?: string, outcomePlatforms?: string, outcomeAttribution?: string, _options?: Configuration): Promise<OutcomesData>;
73
73
  getSegments(appId: string, offset?: number, limit?: number, _options?: Configuration): Promise<GetSegmentsSuccessResponse>;
74
74
  getUser(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Promise<User>;
@@ -115,8 +115,8 @@ class PromiseDefaultApi {
115
115
  const result = this.api.getNotificationHistory(notificationId, getNotificationHistoryRequestBody, _options);
116
116
  return result.toPromise();
117
117
  }
118
- getNotifications(appId, limit, offset, kind, _options) {
119
- const result = this.api.getNotifications(appId, limit, offset, kind, _options);
118
+ getNotifications(appId, limit, offset, kind, timeOffset, _options) {
119
+ const result = this.api.getNotifications(appId, limit, offset, kind, timeOffset, _options);
120
120
  return result.toPromise();
121
121
  }
122
122
  getOutcomes(appId, outcomeNames, outcomeNames2, outcomeTimeRange, outcomePlatforms, outcomeAttribution, _options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onesignal/node-onesignal",
3
- "version": "5.9.0",
3
+ "version": "5.11.0",
4
4
  "description": "OpenAPI client for @onesignal/node-onesignal",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [