@onesignal/node-onesignal 5.12.0 → 5.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/apis/DefaultApi.d.ts +10 -0
  2. package/dist/apis/DefaultApi.js +250 -45
  3. package/dist/http/http.d.ts +1 -1
  4. package/dist/http/http.js +7 -0
  5. package/dist/models/AuditLogActor.d.ts +21 -0
  6. package/dist/models/AuditLogActor.js +45 -0
  7. package/dist/models/AuditLogContext.d.ts +20 -0
  8. package/dist/models/AuditLogContext.js +39 -0
  9. package/dist/models/AuditLogEvent.d.ts +29 -0
  10. package/dist/models/AuditLogEvent.js +75 -0
  11. package/dist/models/AuditLogTarget.d.ts +20 -0
  12. package/dist/models/AuditLogTarget.js +39 -0
  13. package/dist/models/BasicNotification.d.ts +1 -0
  14. package/dist/models/BasicNotification.js +6 -0
  15. package/dist/models/BasicNotificationAllOf.d.ts +1 -0
  16. package/dist/models/BasicNotificationAllOf.js +6 -0
  17. package/dist/models/GetSegmentSuccessResponse.d.ts +19 -0
  18. package/dist/models/GetSegmentSuccessResponse.js +27 -0
  19. package/dist/models/ListAuditLogsSuccessResponse.d.ts +20 -0
  20. package/dist/models/ListAuditLogsSuccessResponse.js +33 -0
  21. package/dist/models/Notification.d.ts +1 -0
  22. package/dist/models/Notification.js +6 -0
  23. package/dist/models/NotificationWithMeta.d.ts +1 -0
  24. package/dist/models/NotificationWithMeta.js +6 -0
  25. package/dist/models/ObjectSerializer.d.ts +9 -0
  26. package/dist/models/ObjectSerializer.js +38 -2
  27. package/dist/models/SegmentDetails.d.ts +24 -0
  28. package/dist/models/SegmentDetails.js +51 -0
  29. package/dist/models/UpdateSegmentRequest.d.ts +20 -0
  30. package/dist/models/UpdateSegmentRequest.js +33 -0
  31. package/dist/models/UpdateSegmentSuccessResponse.d.ts +18 -0
  32. package/dist/models/UpdateSegmentSuccessResponse.js +27 -0
  33. package/dist/models/all.d.ts +9 -0
  34. package/dist/models/all.js +9 -0
  35. package/dist/types/ObjectParamAPI.d.ts +31 -0
  36. package/dist/types/ObjectParamAPI.js +9 -0
  37. package/dist/types/ObservableAPI.d.ts +7 -0
  38. package/dist/types/ObservableAPI.js +45 -0
  39. package/dist/types/PromiseAPI.d.ts +7 -0
  40. package/dist/types/PromiseAPI.js +12 -0
  41. package/package.json +1 -1
@@ -36,7 +36,7 @@ export declare class RequestContext {
36
36
  [key: string]: string;
37
37
  };
38
38
  getBody(): RequestBody;
39
- setQueryParam(name: string, value: string): void;
39
+ setQueryParam(name: string, value: string | string[]): void;
40
40
  addCookie(name: string, value: string): void;
41
41
  setHeaderParam(key: string, value: string): void;
42
42
  }
package/dist/http/http.js CHANGED
@@ -61,6 +61,13 @@ class RequestContext {
61
61
  return this.body;
62
62
  }
63
63
  setQueryParam(name, value) {
64
+ if (Array.isArray(value)) {
65
+ this.url.searchParams.delete(name);
66
+ for (const item of value) {
67
+ this.url.searchParams.append(name, item);
68
+ }
69
+ return;
70
+ }
64
71
  this.url.searchParams.set(name, value);
65
72
  }
66
73
  addCookie(name, value) {
@@ -0,0 +1,21 @@
1
+ export declare class AuditLogActor {
2
+ 'email'?: string;
3
+ 'id'?: string;
4
+ 'metadata'?: object;
5
+ 'name'?: string;
6
+ 'type'?: string;
7
+ static readonly discriminator: string | undefined;
8
+ static readonly attributeTypeMap: Array<{
9
+ name: string;
10
+ baseName: string;
11
+ type: string;
12
+ format: string;
13
+ }>;
14
+ static getAttributeTypeMap(): {
15
+ name: string;
16
+ baseName: string;
17
+ type: string;
18
+ format: string;
19
+ }[];
20
+ constructor();
21
+ }
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuditLogActor = void 0;
4
+ class AuditLogActor {
5
+ static getAttributeTypeMap() {
6
+ return AuditLogActor.attributeTypeMap;
7
+ }
8
+ constructor() {
9
+ }
10
+ }
11
+ exports.AuditLogActor = AuditLogActor;
12
+ AuditLogActor.discriminator = undefined;
13
+ AuditLogActor.attributeTypeMap = [
14
+ {
15
+ "name": "email",
16
+ "baseName": "email",
17
+ "type": "string",
18
+ "format": ""
19
+ },
20
+ {
21
+ "name": "id",
22
+ "baseName": "id",
23
+ "type": "string",
24
+ "format": ""
25
+ },
26
+ {
27
+ "name": "metadata",
28
+ "baseName": "metadata",
29
+ "type": "object",
30
+ "format": ""
31
+ },
32
+ {
33
+ "name": "name",
34
+ "baseName": "name",
35
+ "type": "string",
36
+ "format": ""
37
+ },
38
+ {
39
+ "name": "type",
40
+ "baseName": "type",
41
+ "type": "string",
42
+ "format": ""
43
+ }
44
+ ];
45
+ //# sourceMappingURL=AuditLogActor.js.map
@@ -0,0 +1,20 @@
1
+ export declare class AuditLogContext {
2
+ 'country'?: string;
3
+ 'ip'?: string;
4
+ 'metadata'?: object;
5
+ 'user_agent'?: string;
6
+ static readonly discriminator: string | undefined;
7
+ static readonly attributeTypeMap: Array<{
8
+ name: string;
9
+ baseName: string;
10
+ type: string;
11
+ format: string;
12
+ }>;
13
+ static getAttributeTypeMap(): {
14
+ name: string;
15
+ baseName: string;
16
+ type: string;
17
+ format: string;
18
+ }[];
19
+ constructor();
20
+ }
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuditLogContext = void 0;
4
+ class AuditLogContext {
5
+ static getAttributeTypeMap() {
6
+ return AuditLogContext.attributeTypeMap;
7
+ }
8
+ constructor() {
9
+ }
10
+ }
11
+ exports.AuditLogContext = AuditLogContext;
12
+ AuditLogContext.discriminator = undefined;
13
+ AuditLogContext.attributeTypeMap = [
14
+ {
15
+ "name": "country",
16
+ "baseName": "country",
17
+ "type": "string",
18
+ "format": ""
19
+ },
20
+ {
21
+ "name": "ip",
22
+ "baseName": "ip",
23
+ "type": "string",
24
+ "format": ""
25
+ },
26
+ {
27
+ "name": "metadata",
28
+ "baseName": "metadata",
29
+ "type": "object",
30
+ "format": ""
31
+ },
32
+ {
33
+ "name": "user_agent",
34
+ "baseName": "user_agent",
35
+ "type": "string",
36
+ "format": ""
37
+ }
38
+ ];
39
+ //# sourceMappingURL=AuditLogContext.js.map
@@ -0,0 +1,29 @@
1
+ import { AuditLogActor } from './AuditLogActor';
2
+ import { AuditLogContext } from './AuditLogContext';
3
+ import { AuditLogTarget } from './AuditLogTarget';
4
+ export declare class AuditLogEvent {
5
+ 'action'?: string;
6
+ 'actor'?: AuditLogActor;
7
+ 'app_id'?: string;
8
+ 'context'?: AuditLogContext;
9
+ 'id'?: string;
10
+ 'metadata'?: object;
11
+ 'occurred_at'?: string;
12
+ 'organization_id'?: string;
13
+ 'targets'?: Array<AuditLogTarget>;
14
+ 'version'?: number;
15
+ static readonly discriminator: string | undefined;
16
+ static readonly attributeTypeMap: Array<{
17
+ name: string;
18
+ baseName: string;
19
+ type: string;
20
+ format: string;
21
+ }>;
22
+ static getAttributeTypeMap(): {
23
+ name: string;
24
+ baseName: string;
25
+ type: string;
26
+ format: string;
27
+ }[];
28
+ constructor();
29
+ }
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuditLogEvent = void 0;
4
+ class AuditLogEvent {
5
+ static getAttributeTypeMap() {
6
+ return AuditLogEvent.attributeTypeMap;
7
+ }
8
+ constructor() {
9
+ }
10
+ }
11
+ exports.AuditLogEvent = AuditLogEvent;
12
+ AuditLogEvent.discriminator = undefined;
13
+ AuditLogEvent.attributeTypeMap = [
14
+ {
15
+ "name": "action",
16
+ "baseName": "action",
17
+ "type": "string",
18
+ "format": ""
19
+ },
20
+ {
21
+ "name": "actor",
22
+ "baseName": "actor",
23
+ "type": "AuditLogActor",
24
+ "format": ""
25
+ },
26
+ {
27
+ "name": "app_id",
28
+ "baseName": "app_id",
29
+ "type": "string",
30
+ "format": ""
31
+ },
32
+ {
33
+ "name": "context",
34
+ "baseName": "context",
35
+ "type": "AuditLogContext",
36
+ "format": ""
37
+ },
38
+ {
39
+ "name": "id",
40
+ "baseName": "id",
41
+ "type": "string",
42
+ "format": ""
43
+ },
44
+ {
45
+ "name": "metadata",
46
+ "baseName": "metadata",
47
+ "type": "object",
48
+ "format": ""
49
+ },
50
+ {
51
+ "name": "occurred_at",
52
+ "baseName": "occurred_at",
53
+ "type": "string",
54
+ "format": ""
55
+ },
56
+ {
57
+ "name": "organization_id",
58
+ "baseName": "organization_id",
59
+ "type": "string",
60
+ "format": ""
61
+ },
62
+ {
63
+ "name": "targets",
64
+ "baseName": "targets",
65
+ "type": "Array<AuditLogTarget>",
66
+ "format": ""
67
+ },
68
+ {
69
+ "name": "version",
70
+ "baseName": "version",
71
+ "type": "number",
72
+ "format": ""
73
+ }
74
+ ];
75
+ //# sourceMappingURL=AuditLogEvent.js.map
@@ -0,0 +1,20 @@
1
+ export declare class AuditLogTarget {
2
+ 'id'?: string;
3
+ 'metadata'?: object;
4
+ 'name'?: string;
5
+ 'type'?: string;
6
+ static readonly discriminator: string | undefined;
7
+ static readonly attributeTypeMap: Array<{
8
+ name: string;
9
+ baseName: string;
10
+ type: string;
11
+ format: string;
12
+ }>;
13
+ static getAttributeTypeMap(): {
14
+ name: string;
15
+ baseName: string;
16
+ type: string;
17
+ format: string;
18
+ }[];
19
+ constructor();
20
+ }
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuditLogTarget = void 0;
4
+ class AuditLogTarget {
5
+ static getAttributeTypeMap() {
6
+ return AuditLogTarget.attributeTypeMap;
7
+ }
8
+ constructor() {
9
+ }
10
+ }
11
+ exports.AuditLogTarget = AuditLogTarget;
12
+ AuditLogTarget.discriminator = undefined;
13
+ AuditLogTarget.attributeTypeMap = [
14
+ {
15
+ "name": "id",
16
+ "baseName": "id",
17
+ "type": "string",
18
+ "format": ""
19
+ },
20
+ {
21
+ "name": "metadata",
22
+ "baseName": "metadata",
23
+ "type": "object",
24
+ "format": ""
25
+ },
26
+ {
27
+ "name": "name",
28
+ "baseName": "name",
29
+ "type": "string",
30
+ "format": ""
31
+ },
32
+ {
33
+ "name": "type",
34
+ "baseName": "type",
35
+ "type": "string",
36
+ "format": ""
37
+ }
38
+ ];
39
+ //# sourceMappingURL=AuditLogTarget.js.map
@@ -51,6 +51,7 @@ export declare class BasicNotification {
51
51
  'mutable_content'?: boolean;
52
52
  'target_content_identifier'?: string;
53
53
  'big_picture'?: string;
54
+ 'global_image'?: string;
54
55
  'huawei_big_picture'?: string;
55
56
  'adm_big_picture'?: string;
56
57
  'chrome_big_picture'?: string;
@@ -281,6 +281,12 @@ BasicNotification.attributeTypeMap = [
281
281
  "type": "string",
282
282
  "format": ""
283
283
  },
284
+ {
285
+ "name": "global_image",
286
+ "baseName": "global_image",
287
+ "type": "string",
288
+ "format": ""
289
+ },
284
290
  {
285
291
  "name": "huawei_big_picture",
286
292
  "baseName": "huawei_big_picture",
@@ -35,6 +35,7 @@ export declare class BasicNotificationAllOf {
35
35
  'mutable_content'?: boolean;
36
36
  'target_content_identifier'?: string;
37
37
  'big_picture'?: string;
38
+ 'global_image'?: string;
38
39
  'huawei_big_picture'?: string;
39
40
  'adm_big_picture'?: string;
40
41
  'chrome_big_picture'?: string;
@@ -197,6 +197,12 @@ BasicNotificationAllOf.attributeTypeMap = [
197
197
  "type": "string",
198
198
  "format": ""
199
199
  },
200
+ {
201
+ "name": "global_image",
202
+ "baseName": "global_image",
203
+ "type": "string",
204
+ "format": ""
205
+ },
200
206
  {
201
207
  "name": "huawei_big_picture",
202
208
  "baseName": "huawei_big_picture",
@@ -0,0 +1,19 @@
1
+ import { SegmentDetails } from './SegmentDetails';
2
+ export declare class GetSegmentSuccessResponse {
3
+ 'subscriber_count'?: number;
4
+ 'payload'?: SegmentDetails;
5
+ static readonly discriminator: string | undefined;
6
+ static readonly attributeTypeMap: Array<{
7
+ name: string;
8
+ baseName: string;
9
+ type: string;
10
+ format: string;
11
+ }>;
12
+ static getAttributeTypeMap(): {
13
+ name: string;
14
+ baseName: string;
15
+ type: string;
16
+ format: string;
17
+ }[];
18
+ constructor();
19
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetSegmentSuccessResponse = void 0;
4
+ class GetSegmentSuccessResponse {
5
+ static getAttributeTypeMap() {
6
+ return GetSegmentSuccessResponse.attributeTypeMap;
7
+ }
8
+ constructor() {
9
+ }
10
+ }
11
+ exports.GetSegmentSuccessResponse = GetSegmentSuccessResponse;
12
+ GetSegmentSuccessResponse.discriminator = undefined;
13
+ GetSegmentSuccessResponse.attributeTypeMap = [
14
+ {
15
+ "name": "subscriber_count",
16
+ "baseName": "subscriber_count",
17
+ "type": "number",
18
+ "format": ""
19
+ },
20
+ {
21
+ "name": "payload",
22
+ "baseName": "payload",
23
+ "type": "SegmentDetails",
24
+ "format": ""
25
+ }
26
+ ];
27
+ //# sourceMappingURL=GetSegmentSuccessResponse.js.map
@@ -0,0 +1,20 @@
1
+ import { AuditLogEvent } from './AuditLogEvent';
2
+ export declare class ListAuditLogsSuccessResponse {
3
+ 'audit_logs'?: Array<AuditLogEvent>;
4
+ 'has_more'?: boolean;
5
+ 'next_cursor'?: string;
6
+ static readonly discriminator: string | undefined;
7
+ static readonly attributeTypeMap: Array<{
8
+ name: string;
9
+ baseName: string;
10
+ type: string;
11
+ format: string;
12
+ }>;
13
+ static getAttributeTypeMap(): {
14
+ name: string;
15
+ baseName: string;
16
+ type: string;
17
+ format: string;
18
+ }[];
19
+ constructor();
20
+ }
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListAuditLogsSuccessResponse = void 0;
4
+ class ListAuditLogsSuccessResponse {
5
+ static getAttributeTypeMap() {
6
+ return ListAuditLogsSuccessResponse.attributeTypeMap;
7
+ }
8
+ constructor() {
9
+ }
10
+ }
11
+ exports.ListAuditLogsSuccessResponse = ListAuditLogsSuccessResponse;
12
+ ListAuditLogsSuccessResponse.discriminator = undefined;
13
+ ListAuditLogsSuccessResponse.attributeTypeMap = [
14
+ {
15
+ "name": "audit_logs",
16
+ "baseName": "audit_logs",
17
+ "type": "Array<AuditLogEvent>",
18
+ "format": ""
19
+ },
20
+ {
21
+ "name": "has_more",
22
+ "baseName": "has_more",
23
+ "type": "boolean",
24
+ "format": ""
25
+ },
26
+ {
27
+ "name": "next_cursor",
28
+ "baseName": "next_cursor",
29
+ "type": "string",
30
+ "format": ""
31
+ }
32
+ ];
33
+ //# sourceMappingURL=ListAuditLogsSuccessResponse.js.map
@@ -51,6 +51,7 @@ export declare class Notification {
51
51
  'mutable_content'?: boolean;
52
52
  'target_content_identifier'?: string;
53
53
  'big_picture'?: string;
54
+ 'global_image'?: string;
54
55
  'huawei_big_picture'?: string;
55
56
  'adm_big_picture'?: string;
56
57
  'chrome_big_picture'?: string;
@@ -281,6 +281,12 @@ Notification.attributeTypeMap = [
281
281
  "type": "string",
282
282
  "format": ""
283
283
  },
284
+ {
285
+ "name": "global_image",
286
+ "baseName": "global_image",
287
+ "type": "string",
288
+ "format": ""
289
+ },
284
290
  {
285
291
  "name": "huawei_big_picture",
286
292
  "baseName": "huawei_big_picture",
@@ -53,6 +53,7 @@ export declare class NotificationWithMeta {
53
53
  'mutable_content'?: boolean;
54
54
  'target_content_identifier'?: string;
55
55
  'big_picture'?: string;
56
+ 'global_image'?: string;
56
57
  'huawei_big_picture'?: string;
57
58
  'adm_big_picture'?: string;
58
59
  'chrome_big_picture'?: string;
@@ -281,6 +281,12 @@ NotificationWithMeta.attributeTypeMap = [
281
281
  "type": "string",
282
282
  "format": ""
283
283
  },
284
+ {
285
+ "name": "global_image",
286
+ "baseName": "global_image",
287
+ "type": "string",
288
+ "format": ""
289
+ },
284
290
  {
285
291
  "name": "huawei_big_picture",
286
292
  "baseName": "huawei_big_picture",
@@ -1,6 +1,10 @@
1
1
  export * from './ApiKeyToken';
2
2
  export * from './ApiKeyTokensListResponse';
3
3
  export * from './App';
4
+ export * from './AuditLogActor';
5
+ export * from './AuditLogContext';
6
+ export * from './AuditLogEvent';
7
+ export * from './AuditLogTarget';
4
8
  export * from './BasicNotification';
5
9
  export * from './BasicNotificationAllOf';
6
10
  export * from './BasicNotificationAllOfAndroidBackgroundLayout';
@@ -26,8 +30,10 @@ export * from './FilterExpression';
26
30
  export * from './GenericError';
27
31
  export * from './GenericSuccessBoolResponse';
28
32
  export * from './GetNotificationHistoryRequestBody';
33
+ export * from './GetSegmentSuccessResponse';
29
34
  export * from './GetSegmentsSuccessResponse';
30
35
  export * from './LanguageStringMap';
36
+ export * from './ListAuditLogsSuccessResponse';
31
37
  export * from './Notification';
32
38
  export * from './NotificationAllOf';
33
39
  export * from './NotificationHistorySuccessResponse';
@@ -48,6 +54,7 @@ export * from './Purchase';
48
54
  export * from './RateLimitError';
49
55
  export * from './Segment';
50
56
  export * from './SegmentData';
57
+ export * from './SegmentDetails';
51
58
  export * from './SegmentNotificationTarget';
52
59
  export * from './StartLiveActivityRequest';
53
60
  export * from './StartLiveActivitySuccessResponse';
@@ -60,6 +67,8 @@ export * from './TransferSubscriptionRequestBody';
60
67
  export * from './UpdateApiKeyRequest';
61
68
  export * from './UpdateLiveActivityRequest';
62
69
  export * from './UpdateLiveActivitySuccessResponse';
70
+ export * from './UpdateSegmentRequest';
71
+ export * from './UpdateSegmentSuccessResponse';
63
72
  export * from './UpdateTemplateRequest';
64
73
  export * from './UpdateUserRequest';
65
74
  export * from './User';