@onesignal/node-onesignal 5.2.1-beta1 → 5.3.1-beta1

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 (198) hide show
  1. package/dist/apis/DefaultApi.d.ts +40 -0
  2. package/dist/apis/DefaultApi.js +1363 -100
  3. package/dist/models/ApiKeyToken.d.ts +23 -0
  4. package/dist/models/ApiKeyToken.js +52 -0
  5. package/dist/models/ApiKeyTokensListResponse.d.ts +18 -0
  6. package/dist/models/ApiKeyTokensListResponse.js +22 -0
  7. package/dist/models/CopyTemplateRequest.d.ts +17 -0
  8. package/dist/models/CopyTemplateRequest.js +22 -0
  9. package/dist/models/CreateApiKeyRequest.d.ts +20 -0
  10. package/dist/models/CreateApiKeyRequest.js +34 -0
  11. package/dist/models/CreateApiKeyResponse.d.ts +18 -0
  12. package/dist/models/CreateApiKeyResponse.js +28 -0
  13. package/dist/models/CreateTemplateRequest.d.ts +25 -0
  14. package/dist/models/CreateTemplateRequest.js +64 -0
  15. package/dist/models/CustomEvent.d.ts +23 -0
  16. package/dist/models/CustomEvent.js +46 -0
  17. package/dist/models/CustomEventsRequest.d.ts +18 -0
  18. package/dist/models/CustomEventsRequest.js +22 -0
  19. package/dist/models/NotificationWithMeta.d.ts +1 -0
  20. package/dist/models/NotificationWithMeta.js +6 -0
  21. package/dist/models/NotificationWithMetaAllOf.d.ts +1 -0
  22. package/dist/models/NotificationWithMetaAllOf.js +6 -0
  23. package/dist/models/ObjectSerializer.d.ts +14 -0
  24. package/dist/models/ObjectSerializer.js +47 -0
  25. package/dist/models/StartLiveActivityRequest.d.ts +37 -0
  26. package/dist/models/StartLiveActivityRequest.js +112 -0
  27. package/dist/models/StartLiveActivitySuccessResponse.d.ts +17 -0
  28. package/dist/models/StartLiveActivitySuccessResponse.js +22 -0
  29. package/dist/models/TemplateResource.d.ts +25 -0
  30. package/dist/models/TemplateResource.js +52 -0
  31. package/dist/models/TemplatesListResponse.d.ts +18 -0
  32. package/dist/models/TemplatesListResponse.js +22 -0
  33. package/dist/models/UpdateApiKeyRequest.d.ts +20 -0
  34. package/dist/models/UpdateApiKeyRequest.js +34 -0
  35. package/dist/models/UpdateTemplateRequest.d.ts +24 -0
  36. package/dist/models/UpdateTemplateRequest.js +58 -0
  37. package/dist/models/all.d.ts +14 -0
  38. package/dist/models/all.js +14 -0
  39. package/dist/types/ObjectParamAPI.d.ts +88 -0
  40. package/dist/types/ObjectParamAPI.js +42 -0
  41. package/dist/types/ObservableAPI.d.ts +26 -0
  42. package/dist/types/ObservableAPI.js +422 -86
  43. package/dist/types/PromiseAPI.d.ts +26 -0
  44. package/dist/types/PromiseAPI.js +56 -0
  45. package/package.json +9 -3
  46. package/.github/ISSUE_TEMPLATE/ask-question.yml +0 -25
  47. package/.github/ISSUE_TEMPLATE/bug-report.yml +0 -51
  48. package/.github/ISSUE_TEMPLATE/general-feedback.yml +0 -25
  49. package/.github/pull_request_template.md +0 -44
  50. package/.github/workflows/asana-add-comment.yml +0 -47
  51. package/.github/workflows/asana-create-task.yml +0 -119
  52. package/.github/workflows/asana-update-issue.yml +0 -172
  53. package/.github/workflows/npm_deploy.yml +0 -22
  54. package/.github/workflows/project.yml +0 -17
  55. package/CHANGELOG.md +0 -48
  56. package/DefaultApi.md +0 -2177
  57. package/RELEASE_INSTRUCTIONS.md +0 -2
  58. package/apis/DefaultApi.ts +0 -3270
  59. package/apis/baseapi.ts +0 -37
  60. package/apis/exception.ts +0 -15
  61. package/auth/auth.ts +0 -110
  62. package/configuration.ts +0 -85
  63. package/dist/apis/DefaultApi.js.map +0 -1
  64. package/dist/apis/baseapi.js.map +0 -1
  65. package/dist/apis/exception.js.map +0 -1
  66. package/dist/auth/auth.js.map +0 -1
  67. package/dist/configuration.js.map +0 -1
  68. package/dist/http/http.js.map +0 -1
  69. package/dist/http/isomorphic-fetch.js.map +0 -1
  70. package/dist/index.js.map +0 -1
  71. package/dist/middleware.js.map +0 -1
  72. package/dist/models/App.js.map +0 -1
  73. package/dist/models/BasicNotification.js.map +0 -1
  74. package/dist/models/BasicNotificationAllOf.js.map +0 -1
  75. package/dist/models/BasicNotificationAllOfAndroidBackgroundLayout.js.map +0 -1
  76. package/dist/models/Button.js.map +0 -1
  77. package/dist/models/CreateNotificationSuccessResponse.js.map +0 -1
  78. package/dist/models/CreateSegmentConflictResponse.js.map +0 -1
  79. package/dist/models/CreateSegmentSuccessResponse.js.map +0 -1
  80. package/dist/models/CreateUserConflictResponse.js.map +0 -1
  81. package/dist/models/CreateUserConflictResponseErrorsInner.js.map +0 -1
  82. package/dist/models/CreateUserConflictResponseErrorsItemsMeta.js.map +0 -1
  83. package/dist/models/DeliveryData.js.map +0 -1
  84. package/dist/models/ExportEventsSuccessResponse.js.map +0 -1
  85. package/dist/models/ExportSubscriptionsRequestBody.js.map +0 -1
  86. package/dist/models/ExportSubscriptionsSuccessResponse.js.map +0 -1
  87. package/dist/models/Filter.js.map +0 -1
  88. package/dist/models/FilterExpression.js.map +0 -1
  89. package/dist/models/GenericError.js.map +0 -1
  90. package/dist/models/GenericSuccessBoolResponse.js.map +0 -1
  91. package/dist/models/GetNotificationHistoryRequestBody.js.map +0 -1
  92. package/dist/models/GetSegmentsSuccessResponse.js.map +0 -1
  93. package/dist/models/LanguageStringMap.js.map +0 -1
  94. package/dist/models/Notification.js.map +0 -1
  95. package/dist/models/NotificationAllOf.js.map +0 -1
  96. package/dist/models/NotificationHistorySuccessResponse.js.map +0 -1
  97. package/dist/models/NotificationSlice.js.map +0 -1
  98. package/dist/models/NotificationTarget.js.map +0 -1
  99. package/dist/models/NotificationWithMeta.js.map +0 -1
  100. package/dist/models/NotificationWithMetaAllOf.js.map +0 -1
  101. package/dist/models/ObjectSerializer.js.map +0 -1
  102. package/dist/models/Operator.js.map +0 -1
  103. package/dist/models/OutcomeData.js.map +0 -1
  104. package/dist/models/OutcomesData.js.map +0 -1
  105. package/dist/models/PlatformDeliveryData.js.map +0 -1
  106. package/dist/models/PlatformDeliveryDataEmailAllOf.js.map +0 -1
  107. package/dist/models/PlatformDeliveryDataSmsAllOf.js.map +0 -1
  108. package/dist/models/PropertiesBody.js.map +0 -1
  109. package/dist/models/PropertiesDeltas.js.map +0 -1
  110. package/dist/models/PropertiesObject.js.map +0 -1
  111. package/dist/models/Purchase.js.map +0 -1
  112. package/dist/models/RateLimitError.js.map +0 -1
  113. package/dist/models/Segment.js.map +0 -1
  114. package/dist/models/SegmentData.js.map +0 -1
  115. package/dist/models/SegmentNotificationTarget.js.map +0 -1
  116. package/dist/models/Subscription.js.map +0 -1
  117. package/dist/models/SubscriptionBody.js.map +0 -1
  118. package/dist/models/SubscriptionNotificationTarget.js.map +0 -1
  119. package/dist/models/TransferSubscriptionRequestBody.js.map +0 -1
  120. package/dist/models/UpdateLiveActivityRequest.js.map +0 -1
  121. package/dist/models/UpdateLiveActivitySuccessResponse.js.map +0 -1
  122. package/dist/models/UpdateUserRequest.js.map +0 -1
  123. package/dist/models/User.js.map +0 -1
  124. package/dist/models/UserIdentityBody.js.map +0 -1
  125. package/dist/models/WebButton.js.map +0 -1
  126. package/dist/models/all.js.map +0 -1
  127. package/dist/rxjsStub.js.map +0 -1
  128. package/dist/servers.js.map +0 -1
  129. package/dist/types/ObjectParamAPI.js.map +0 -1
  130. package/dist/types/ObservableAPI.js.map +0 -1
  131. package/dist/types/PromiseAPI.js.map +0 -1
  132. package/dist/util.js.map +0 -1
  133. package/http/http.ts +0 -205
  134. package/http/isomorphic-fetch.ts +0 -30
  135. package/index.ts +0 -12
  136. package/middleware.ts +0 -66
  137. package/models/App.ts +0 -328
  138. package/models/BasicNotification.ts +0 -1088
  139. package/models/BasicNotificationAllOf.ts +0 -958
  140. package/models/BasicNotificationAllOfAndroidBackgroundLayout.ts +0 -57
  141. package/models/Button.ts +0 -45
  142. package/models/CreateNotificationSuccessResponse.ts +0 -48
  143. package/models/CreateSegmentConflictResponse.ts +0 -38
  144. package/models/CreateSegmentSuccessResponse.ts +0 -41
  145. package/models/CreateUserConflictResponse.ts +0 -32
  146. package/models/CreateUserConflictResponseErrorsInner.ts +0 -46
  147. package/models/CreateUserConflictResponseErrorsItemsMeta.ts +0 -31
  148. package/models/DeliveryData.ts +0 -74
  149. package/models/ExportEventsSuccessResponse.ts +0 -31
  150. package/models/ExportSubscriptionsRequestBody.ts +0 -54
  151. package/models/ExportSubscriptionsSuccessResponse.ts +0 -31
  152. package/models/Filter.ts +0 -107
  153. package/models/FilterExpression.ts +0 -120
  154. package/models/GenericError.ts +0 -45
  155. package/models/GenericSuccessBoolResponse.ts +0 -31
  156. package/models/GetNotificationHistoryRequestBody.ts +0 -54
  157. package/models/GetSegmentsSuccessResponse.ts +0 -65
  158. package/models/LanguageStringMap.ts +0 -454
  159. package/models/Notification.ts +0 -1098
  160. package/models/NotificationAllOf.ts +0 -34
  161. package/models/NotificationHistorySuccessResponse.ts +0 -38
  162. package/models/NotificationSlice.ts +0 -53
  163. package/models/NotificationTarget.ts +0 -156
  164. package/models/NotificationWithMeta.ts +0 -1196
  165. package/models/NotificationWithMetaAllOf.ts +0 -132
  166. package/models/ObjectSerializer.ts +0 -395
  167. package/models/Operator.ts +0 -37
  168. package/models/OutcomeData.ts +0 -48
  169. package/models/OutcomesData.ts +0 -32
  170. package/models/PlatformDeliveryData.ts +0 -86
  171. package/models/PlatformDeliveryDataEmailAllOf.ts +0 -94
  172. package/models/PlatformDeliveryDataSmsAllOf.ts +0 -54
  173. package/models/PropertiesBody.ts +0 -32
  174. package/models/PropertiesDeltas.ts +0 -46
  175. package/models/PropertiesObject.ts +0 -102
  176. package/models/Purchase.ts +0 -61
  177. package/models/RateLimitError.ts +0 -38
  178. package/models/Segment.ts +0 -55
  179. package/models/SegmentData.ts +0 -94
  180. package/models/SegmentNotificationTarget.ts +0 -44
  181. package/models/Subscription.ts +0 -146
  182. package/models/SubscriptionBody.ts +0 -32
  183. package/models/SubscriptionNotificationTarget.ts +0 -134
  184. package/models/TransferSubscriptionRequestBody.ts +0 -31
  185. package/models/UpdateLiveActivityRequest.ts +0 -109
  186. package/models/UpdateLiveActivitySuccessResponse.ts +0 -31
  187. package/models/UpdateUserRequest.ts +0 -47
  188. package/models/User.ts +0 -47
  189. package/models/UserIdentityBody.ts +0 -31
  190. package/models/WebButton.ts +0 -52
  191. package/models/all.ts +0 -53
  192. package/rxjsStub.ts +0 -27
  193. package/servers.ts +0 -53
  194. package/tsconfig.json +0 -28
  195. package/types/ObjectParamAPI.ts +0 -884
  196. package/types/ObservableAPI.ts +0 -831
  197. package/types/PromiseAPI.ts +0 -411
  198. package/util.ts +0 -37
@@ -1,7 +1,13 @@
1
1
  import { Configuration } from '../configuration';
2
+ import { ApiKeyTokensListResponse } from '../models/ApiKeyTokensListResponse';
2
3
  import { App } from '../models/App';
4
+ import { CopyTemplateRequest } from '../models/CopyTemplateRequest';
5
+ import { CreateApiKeyRequest } from '../models/CreateApiKeyRequest';
6
+ import { CreateApiKeyResponse } from '../models/CreateApiKeyResponse';
3
7
  import { CreateNotificationSuccessResponse } from '../models/CreateNotificationSuccessResponse';
4
8
  import { CreateSegmentSuccessResponse } from '../models/CreateSegmentSuccessResponse';
9
+ import { CreateTemplateRequest } from '../models/CreateTemplateRequest';
10
+ import { CustomEventsRequest } from '../models/CustomEventsRequest';
5
11
  import { ExportEventsSuccessResponse } from '../models/ExportEventsSuccessResponse';
6
12
  import { ExportSubscriptionsRequestBody } from '../models/ExportSubscriptionsRequestBody';
7
13
  import { ExportSubscriptionsSuccessResponse } from '../models/ExportSubscriptionsSuccessResponse';
@@ -15,10 +21,16 @@ import { NotificationWithMeta } from '../models/NotificationWithMeta';
15
21
  import { OutcomesData } from '../models/OutcomesData';
16
22
  import { PropertiesBody } from '../models/PropertiesBody';
17
23
  import { Segment } from '../models/Segment';
24
+ import { StartLiveActivityRequest } from '../models/StartLiveActivityRequest';
25
+ import { StartLiveActivitySuccessResponse } from '../models/StartLiveActivitySuccessResponse';
18
26
  import { SubscriptionBody } from '../models/SubscriptionBody';
27
+ import { TemplateResource } from '../models/TemplateResource';
28
+ import { TemplatesListResponse } from '../models/TemplatesListResponse';
19
29
  import { TransferSubscriptionRequestBody } from '../models/TransferSubscriptionRequestBody';
30
+ import { UpdateApiKeyRequest } from '../models/UpdateApiKeyRequest';
20
31
  import { UpdateLiveActivityRequest } from '../models/UpdateLiveActivityRequest';
21
32
  import { UpdateLiveActivitySuccessResponse } from '../models/UpdateLiveActivitySuccessResponse';
33
+ import { UpdateTemplateRequest } from '../models/UpdateTemplateRequest';
22
34
  import { UpdateUserRequest } from '../models/UpdateUserRequest';
23
35
  import { User } from '../models/User';
24
36
  import { UserIdentityBody } from '../models/UserIdentityBody';
@@ -27,16 +39,22 @@ export declare class PromiseDefaultApi {
27
39
  private api;
28
40
  constructor(configuration: Configuration, requestFactory?: DefaultApiRequestFactory, responseProcessor?: DefaultApiResponseProcessor);
29
41
  cancelNotification(appId: string, notificationId: string, _options?: Configuration): Promise<GenericSuccessBoolResponse>;
42
+ copyTemplateToApp(templateId: string, appId: string, copyTemplateRequest: CopyTemplateRequest, _options?: Configuration): Promise<TemplateResource>;
30
43
  createAlias(appId: string, aliasLabel: string, aliasId: string, userIdentityBody: UserIdentityBody, _options?: Configuration): Promise<UserIdentityBody>;
31
44
  createAliasBySubscription(appId: string, subscriptionId: string, userIdentityBody: UserIdentityBody, _options?: Configuration): Promise<UserIdentityBody>;
45
+ createApiKey(appId: string, createApiKeyRequest: CreateApiKeyRequest, _options?: Configuration): Promise<CreateApiKeyResponse>;
32
46
  createApp(app: App, _options?: Configuration): Promise<App>;
47
+ createCustomEvents(appId: string, customEventsRequest: CustomEventsRequest, _options?: Configuration): Promise<object>;
33
48
  createNotification(notification: Notification, _options?: Configuration): Promise<CreateNotificationSuccessResponse>;
34
49
  createSegment(appId: string, segment?: Segment, _options?: Configuration): Promise<CreateSegmentSuccessResponse>;
35
50
  createSubscription(appId: string, aliasLabel: string, aliasId: string, subscriptionBody: SubscriptionBody, _options?: Configuration): Promise<SubscriptionBody>;
51
+ createTemplate(createTemplateRequest: CreateTemplateRequest, _options?: Configuration): Promise<TemplateResource>;
36
52
  createUser(appId: string, user: User, _options?: Configuration): Promise<User>;
37
53
  deleteAlias(appId: string, aliasLabel: string, aliasId: string, aliasLabelToDelete: string, _options?: Configuration): Promise<UserIdentityBody>;
54
+ deleteApiKey(appId: string, tokenId: string, _options?: Configuration): Promise<object>;
38
55
  deleteSegment(appId: string, segmentId: string, _options?: Configuration): Promise<GenericSuccessBoolResponse>;
39
56
  deleteSubscription(appId: string, subscriptionId: string, _options?: Configuration): Promise<void>;
57
+ deleteTemplate(templateId: string, appId: string, _options?: Configuration): Promise<GenericSuccessBoolResponse>;
40
58
  deleteUser(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Promise<void>;
41
59
  exportEvents(notificationId: string, appId: string, _options?: Configuration): Promise<ExportEventsSuccessResponse>;
42
60
  exportSubscriptions(appId: string, exportSubscriptionsRequestBody?: ExportSubscriptionsRequestBody, _options?: Configuration): Promise<ExportSubscriptionsSuccessResponse>;
@@ -50,10 +68,18 @@ export declare class PromiseDefaultApi {
50
68
  getOutcomes(appId: string, outcomeNames: string, outcomeNames2?: string, outcomeTimeRange?: string, outcomePlatforms?: string, outcomeAttribution?: string, _options?: Configuration): Promise<OutcomesData>;
51
69
  getSegments(appId: string, offset?: number, limit?: number, _options?: Configuration): Promise<GetSegmentsSuccessResponse>;
52
70
  getUser(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Promise<User>;
71
+ rotateApiKey(appId: string, tokenId: string, _options?: Configuration): Promise<CreateApiKeyResponse>;
72
+ startLiveActivity(appId: string, activityType: string, startLiveActivityRequest: StartLiveActivityRequest, _options?: Configuration): Promise<StartLiveActivitySuccessResponse>;
53
73
  transferSubscription(appId: string, subscriptionId: string, transferSubscriptionRequestBody: TransferSubscriptionRequestBody, _options?: Configuration): Promise<UserIdentityBody>;
54
74
  unsubscribeEmailWithToken(appId: string, notificationId: string, token: string, _options?: Configuration): Promise<GenericSuccessBoolResponse>;
75
+ updateApiKey(appId: string, tokenId: string, updateApiKeyRequest: UpdateApiKeyRequest, _options?: Configuration): Promise<object>;
55
76
  updateApp(appId: string, app: App, _options?: Configuration): Promise<App>;
56
77
  updateLiveActivity(appId: string, activityId: string, updateLiveActivityRequest: UpdateLiveActivityRequest, _options?: Configuration): Promise<UpdateLiveActivitySuccessResponse>;
57
78
  updateSubscription(appId: string, subscriptionId: string, subscriptionBody: SubscriptionBody, _options?: Configuration): Promise<void>;
79
+ updateSubscriptionByToken(appId: string, tokenType: string, token: string, subscriptionBody: SubscriptionBody, _options?: Configuration): Promise<object>;
80
+ updateTemplate(templateId: string, appId: string, updateTemplateRequest: UpdateTemplateRequest, _options?: Configuration): Promise<TemplateResource>;
58
81
  updateUser(appId: string, aliasLabel: string, aliasId: string, updateUserRequest: UpdateUserRequest, _options?: Configuration): Promise<PropertiesBody>;
82
+ viewApiKeys(appId: string, _options?: Configuration): Promise<ApiKeyTokensListResponse>;
83
+ viewTemplate(templateId: string, appId: string, _options?: Configuration): Promise<TemplateResource>;
84
+ viewTemplates(appId: string, limit?: number, offset?: number, channel?: 'push' | 'email' | 'sms', _options?: Configuration): Promise<TemplatesListResponse>;
59
85
  }
@@ -10,6 +10,10 @@ var PromiseDefaultApi = (function () {
10
10
  var result = this.api.cancelNotification(appId, notificationId, _options);
11
11
  return result.toPromise();
12
12
  };
13
+ PromiseDefaultApi.prototype.copyTemplateToApp = function (templateId, appId, copyTemplateRequest, _options) {
14
+ var result = this.api.copyTemplateToApp(templateId, appId, copyTemplateRequest, _options);
15
+ return result.toPromise();
16
+ };
13
17
  PromiseDefaultApi.prototype.createAlias = function (appId, aliasLabel, aliasId, userIdentityBody, _options) {
14
18
  var result = this.api.createAlias(appId, aliasLabel, aliasId, userIdentityBody, _options);
15
19
  return result.toPromise();
@@ -18,10 +22,18 @@ var PromiseDefaultApi = (function () {
18
22
  var result = this.api.createAliasBySubscription(appId, subscriptionId, userIdentityBody, _options);
19
23
  return result.toPromise();
20
24
  };
25
+ PromiseDefaultApi.prototype.createApiKey = function (appId, createApiKeyRequest, _options) {
26
+ var result = this.api.createApiKey(appId, createApiKeyRequest, _options);
27
+ return result.toPromise();
28
+ };
21
29
  PromiseDefaultApi.prototype.createApp = function (app, _options) {
22
30
  var result = this.api.createApp(app, _options);
23
31
  return result.toPromise();
24
32
  };
33
+ PromiseDefaultApi.prototype.createCustomEvents = function (appId, customEventsRequest, _options) {
34
+ var result = this.api.createCustomEvents(appId, customEventsRequest, _options);
35
+ return result.toPromise();
36
+ };
25
37
  PromiseDefaultApi.prototype.createNotification = function (notification, _options) {
26
38
  var result = this.api.createNotification(notification, _options);
27
39
  return result.toPromise();
@@ -34,6 +46,10 @@ var PromiseDefaultApi = (function () {
34
46
  var result = this.api.createSubscription(appId, aliasLabel, aliasId, subscriptionBody, _options);
35
47
  return result.toPromise();
36
48
  };
49
+ PromiseDefaultApi.prototype.createTemplate = function (createTemplateRequest, _options) {
50
+ var result = this.api.createTemplate(createTemplateRequest, _options);
51
+ return result.toPromise();
52
+ };
37
53
  PromiseDefaultApi.prototype.createUser = function (appId, user, _options) {
38
54
  var result = this.api.createUser(appId, user, _options);
39
55
  return result.toPromise();
@@ -42,6 +58,10 @@ var PromiseDefaultApi = (function () {
42
58
  var result = this.api.deleteAlias(appId, aliasLabel, aliasId, aliasLabelToDelete, _options);
43
59
  return result.toPromise();
44
60
  };
61
+ PromiseDefaultApi.prototype.deleteApiKey = function (appId, tokenId, _options) {
62
+ var result = this.api.deleteApiKey(appId, tokenId, _options);
63
+ return result.toPromise();
64
+ };
45
65
  PromiseDefaultApi.prototype.deleteSegment = function (appId, segmentId, _options) {
46
66
  var result = this.api.deleteSegment(appId, segmentId, _options);
47
67
  return result.toPromise();
@@ -50,6 +70,10 @@ var PromiseDefaultApi = (function () {
50
70
  var result = this.api.deleteSubscription(appId, subscriptionId, _options);
51
71
  return result.toPromise();
52
72
  };
73
+ PromiseDefaultApi.prototype.deleteTemplate = function (templateId, appId, _options) {
74
+ var result = this.api.deleteTemplate(templateId, appId, _options);
75
+ return result.toPromise();
76
+ };
53
77
  PromiseDefaultApi.prototype.deleteUser = function (appId, aliasLabel, aliasId, _options) {
54
78
  var result = this.api.deleteUser(appId, aliasLabel, aliasId, _options);
55
79
  return result.toPromise();
@@ -102,6 +126,14 @@ var PromiseDefaultApi = (function () {
102
126
  var result = this.api.getUser(appId, aliasLabel, aliasId, _options);
103
127
  return result.toPromise();
104
128
  };
129
+ PromiseDefaultApi.prototype.rotateApiKey = function (appId, tokenId, _options) {
130
+ var result = this.api.rotateApiKey(appId, tokenId, _options);
131
+ return result.toPromise();
132
+ };
133
+ PromiseDefaultApi.prototype.startLiveActivity = function (appId, activityType, startLiveActivityRequest, _options) {
134
+ var result = this.api.startLiveActivity(appId, activityType, startLiveActivityRequest, _options);
135
+ return result.toPromise();
136
+ };
105
137
  PromiseDefaultApi.prototype.transferSubscription = function (appId, subscriptionId, transferSubscriptionRequestBody, _options) {
106
138
  var result = this.api.transferSubscription(appId, subscriptionId, transferSubscriptionRequestBody, _options);
107
139
  return result.toPromise();
@@ -110,6 +142,10 @@ var PromiseDefaultApi = (function () {
110
142
  var result = this.api.unsubscribeEmailWithToken(appId, notificationId, token, _options);
111
143
  return result.toPromise();
112
144
  };
145
+ PromiseDefaultApi.prototype.updateApiKey = function (appId, tokenId, updateApiKeyRequest, _options) {
146
+ var result = this.api.updateApiKey(appId, tokenId, updateApiKeyRequest, _options);
147
+ return result.toPromise();
148
+ };
113
149
  PromiseDefaultApi.prototype.updateApp = function (appId, app, _options) {
114
150
  var result = this.api.updateApp(appId, app, _options);
115
151
  return result.toPromise();
@@ -122,10 +158,30 @@ var PromiseDefaultApi = (function () {
122
158
  var result = this.api.updateSubscription(appId, subscriptionId, subscriptionBody, _options);
123
159
  return result.toPromise();
124
160
  };
161
+ PromiseDefaultApi.prototype.updateSubscriptionByToken = function (appId, tokenType, token, subscriptionBody, _options) {
162
+ var result = this.api.updateSubscriptionByToken(appId, tokenType, token, subscriptionBody, _options);
163
+ return result.toPromise();
164
+ };
165
+ PromiseDefaultApi.prototype.updateTemplate = function (templateId, appId, updateTemplateRequest, _options) {
166
+ var result = this.api.updateTemplate(templateId, appId, updateTemplateRequest, _options);
167
+ return result.toPromise();
168
+ };
125
169
  PromiseDefaultApi.prototype.updateUser = function (appId, aliasLabel, aliasId, updateUserRequest, _options) {
126
170
  var result = this.api.updateUser(appId, aliasLabel, aliasId, updateUserRequest, _options);
127
171
  return result.toPromise();
128
172
  };
173
+ PromiseDefaultApi.prototype.viewApiKeys = function (appId, _options) {
174
+ var result = this.api.viewApiKeys(appId, _options);
175
+ return result.toPromise();
176
+ };
177
+ PromiseDefaultApi.prototype.viewTemplate = function (templateId, appId, _options) {
178
+ var result = this.api.viewTemplate(templateId, appId, _options);
179
+ return result.toPromise();
180
+ };
181
+ PromiseDefaultApi.prototype.viewTemplates = function (appId, limit, offset, channel, _options) {
182
+ var result = this.api.viewTemplates(appId, limit, offset, channel, _options);
183
+ return result.toPromise();
184
+ };
129
185
  return PromiseDefaultApi;
130
186
  }());
131
187
  exports.PromiseDefaultApi = PromiseDefaultApi;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onesignal/node-onesignal",
3
- "version": "5.2.1-beta1",
3
+ "version": "5.3.1-beta1",
4
4
  "description": "OpenAPI client for @onesignal/node-onesignal",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [
@@ -17,12 +17,17 @@
17
17
  ".": "./dist/index.js"
18
18
  },
19
19
  "typings": "./dist/index.d.ts",
20
+ "files": [
21
+ "dist/**/*.js",
22
+ "dist/**/*.d.ts",
23
+ "README.md",
24
+ "LICENSE"
25
+ ],
20
26
  "scripts": {
21
27
  "build": "tsc",
22
28
  "prepare": "npm run build"
23
29
  },
24
30
  "dependencies": {
25
- "@types/node": "24.1.0",
26
31
  "form-data": "^2.5.0",
27
32
  "btoa": "^1.2.1",
28
33
  "es6-promise": "^4.2.4",
@@ -30,6 +35,7 @@
30
35
  },
31
36
  "devDependencies": {
32
37
  "typescript": "^4.0",
33
- "@types/url-parse": "1.4.4"
38
+ "@types/url-parse": "1.4.4",
39
+ "@types/node": "24.1.0"
34
40
  }
35
41
  }
@@ -1,25 +0,0 @@
1
- name: 🙋‍♂️ Ask a question
2
- description: Tell us what's on your mind
3
- title: "[Question]: "
4
- labels: ["Question"]
5
- body:
6
- - type: markdown
7
- attributes:
8
- value: |
9
- Having issues integrating this API library?
10
- - type: textarea
11
- id: question
12
- attributes:
13
- label: How can we help?
14
- description: Specific question regarding integrating this API library.
15
- placeholder: How do I...?
16
- validations:
17
- required: true
18
- - type: checkboxes
19
- id: terms
20
- attributes:
21
- label: Code of Conduct
22
- description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/OneSignal/api/blob/main/CONTRIBUTING.md)
23
- options:
24
- - label: I agree to follow this project's Code of Conduct
25
- required: true
@@ -1,51 +0,0 @@
1
- name: 🪳 Bug report
2
- description: File a bug report
3
- title: "[Bug]: "
4
- labels: ["Bug"]
5
- body:
6
- - type: markdown
7
- attributes:
8
- value: |
9
- Thanks for taking the time to fill out this bug report!
10
- - type: textarea
11
- id: what-happened
12
- attributes:
13
- label: What happened?
14
- description: Provide a thorough description of whats going on.
15
- placeholder: The latest version of the API library throws an exception when creating a notification targetting all Active Users.
16
- validations:
17
- required: true
18
- - type: textarea
19
- id: reproduction-steps
20
- attributes:
21
- label: Steps to reproduce?
22
- description: Provide as much detail as posible to reproduce the issue.
23
- placeholder: |
24
- 1. Install vX.Y.Z of dependency
25
- 2. Run provided code snippet
26
- 3. Note that the app crashes
27
- render: Markdown
28
- validations:
29
- required: true
30
- - type: textarea
31
- id: what-are-expectations
32
- attributes:
33
- label: What did you expect to happen?
34
- description: Also tell us, what did you expect to happen?
35
- placeholder: I expected the API library to properly deserialize any response returned by OneSignal.
36
- validations:
37
- required: true
38
- - type: textarea
39
- id: logs
40
- attributes:
41
- label: Relevant log output
42
- description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
43
- render: Shell
44
- - type: checkboxes
45
- id: terms
46
- attributes:
47
- label: Code of Conduct
48
- description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/OneSignal/api/blob/main/CONTRIBUTING.md)
49
- options:
50
- - label: I agree to follow this project's Code of Conduct
51
- required: true
@@ -1,25 +0,0 @@
1
- name: 📣 General feedback
2
- description: Tell us what's on your mind
3
- title: "[Feedback]: "
4
- labels: ["Feedback"]
5
- body:
6
- - type: markdown
7
- attributes:
8
- value: |
9
- Thanks for sharing your valuable feedback!
10
- - type: textarea
11
- id: feedback
12
- attributes:
13
- label: What's on your mind?
14
- description: Feedback regarding this API library.
15
- placeholder: Share your feedback...
16
- validations:
17
- required: true
18
- - type: checkboxes
19
- id: terms
20
- attributes:
21
- label: Code of Conduct
22
- description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/OneSignal/api/blob/main/CONTRIBUTING.md)
23
- options:
24
- - label: I agree to follow this project's Code of Conduct
25
- required: true
@@ -1,44 +0,0 @@
1
- <!-- START -->
2
- # READ AND DELETE THIS SECTION BEFORE SUBMITTING PR
3
- * **Fill out each _REQUIRED_ section**
4
- * **Fill out _OPTIONAL_ sections, remove section if it doesn't apply to your PR**
5
- * **Read and fill out each of the checklists below**
6
- * **Remove this section after reading**
7
- <!-- END -->
8
-
9
- # Description
10
- ## One Line Summary
11
- **REQUIRED** - Very short description that summaries the changes in this PR.
12
-
13
- ## Details
14
-
15
- ### Motivation
16
- **REQUIRED -** Why is this code change being made? Or what is the goal of this PR? Examples: Fixes a specific bug, provides additional logging to debug future issues, feature to allow X.
17
-
18
- ### Scope
19
- **RECOMMEND - OPTIONAL -** What is intended to be effected. What is known not to change. Example: Notifications are grouped when parameter X is set, not enabled by default.
20
-
21
- ### OPTIONAL - Other
22
- **OPTIONAL -** Feel free to add any other sections or sub-sections that can explain your PR better.
23
-
24
- # Testing
25
-
26
- ## Manual testing
27
- **REQUIRED -** Explain what scenarios were tested and the environment.
28
-
29
-
30
- # Checklist
31
- ## Overview
32
- - [ ] I have filled out all **REQUIRED** sections above
33
- - [ ] PR does one thing
34
- - If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR
35
- - [ ] Any Public API changes are explained in the PR details and conform to existing APIs
36
-
37
- ## Testing
38
- - [ ] I have personally tested this on my device, or explained why that is not possible
39
-
40
- ## Final pass
41
- - [ ] Code is as readable as possible.
42
- - Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
43
- - [ ] I have reviewed this PR myself, ensuring it meets each checklist item
44
- - WIP (Work In Progress) is ok, but explain what is still in progress and what you would like feedback on. Start the PR title with "WIP" to indicate this.
@@ -1,47 +0,0 @@
1
- name: Github --> Asana Add Comment Workflow
2
-
3
- on:
4
- issue_comment:
5
- types: [created]
6
- workflow_dispatch:
7
-
8
- jobs:
9
- build:
10
- runs-on: ubuntu-latest
11
- permissions:
12
- issues: read
13
- steps:
14
- - name: Get Asana Task Corresponding to Issue
15
- env:
16
- ISSUE_ID: ${{ github.event.issue.id }}
17
- REPO_FULL_NAME: ${{ github.event.repository.full_name }}
18
- WORKSPACE_ID: "780103692902078"
19
- run: |
20
- REPO_SCOPED_ISSUE_ID="$REPO_FULL_NAME#$ISSUE_ID"
21
-
22
- curl --request GET \
23
- --url "https://app.asana.com/api/1.0/workspaces/$WORKSPACE_ID/tasks/search?opt_fields=notes&text=$REPO_SCOPED_ISSUE_ID&sort_by=modified_at&sort_ascending=false" \
24
- --header 'accept: application/json' \
25
- --header 'authorization: Bearer ${{ secrets.ASANA_PAT }}' \
26
- --output response.json
27
- TASK_GID=$(jq -r '.data[0].gid' response.json)
28
- echo "TASK_GID=$TASK_GID" >> $GITHUB_ENV
29
- - name: Comment on Asana Task
30
- env:
31
- ISSUE_COMMENT: ${{ github.event.comment.body }}
32
- COMMENTER_NAME: ${{ github.event.comment.user.login }}
33
- run: |
34
- BODY_DATA=$(jq -n \
35
- --arg text "$ISSUE_COMMENT" \
36
- --arg commenter_name "$COMMENTER_NAME" \
37
- '{
38
- "data": {
39
- "text": "\($commenter_name) left a comment:\n\n\($text)",
40
- }
41
- }')
42
- curl --request POST \
43
- --url https://app.asana.com/api/1.0/tasks/$TASK_GID/stories \
44
- --header 'accept: application/json' \
45
- --header 'authorization: Bearer ${{ secrets.ASANA_PAT }}' \
46
- --header 'content-type: application/json' \
47
- --data "$BODY_DATA"
@@ -1,119 +0,0 @@
1
- name: Github --> Asana Create Task Workflow
2
-
3
- on:
4
- issues:
5
- types: [opened]
6
- workflow_dispatch:
7
-
8
- jobs:
9
- build:
10
- runs-on: ubuntu-latest
11
- permissions:
12
- issues: read
13
- steps:
14
- - name: Create Asana task
15
- env:
16
- ISSUE_TITLE: ${{ github.event.issue.title }}
17
- ISSUE_BODY: ${{ github.event.issue.body }}
18
- ISSUE_HTML_URL: ${{ github.event.issue.html_url }}
19
- ISSUE_ID: ${{ github.event.issue.id }}
20
- ISSUE_NUMBER: ${{ github.event.issue.number }}
21
- REPO_FULL_NAME: ${{ github.event.repository.full_name }}
22
- SDK_PLATFORM_GROUP: "1208961704779581"
23
- SDK_PLATFORM_GROUP_SERVER: "1208961704779585"
24
- SDK_PLATFORM: "1208961704779592"
25
- SDK_PLATFORM_TYPESCRIPT: "1208961704779609"
26
- DSA_PRIORITY: "1208779519954980"
27
- DSA_PRIORITY_NO_PRIORITY: "1208779521616959"
28
- DSA_STATUS: "1210103546117753"
29
- DSA_STATUS_TRIAGE: "1210103546117756"
30
- DSA_REPO_TICKET_URL: "1210347857768758"
31
- WORKSPACE_ID: "780103692902078"
32
- PROJECT_ID_GITHUB_AND_IMPORTANT_SDK_ISSUES: "1208970714650308"
33
- PROJECT_ID_SDK_BACKLOG: "1208777198342772"
34
- run: |
35
- DATA_BODY=$(jq -n \
36
- --arg title "$ISSUE_TITLE" \
37
- --arg body "$ISSUE_BODY" \
38
- --arg url "$ISSUE_HTML_URL" \
39
- --arg id "$ISSUE_ID" \
40
- --arg number "$ISSUE_NUMBER" \
41
- --arg repo_full_name "$REPO_FULL_NAME" \
42
- --arg sdk_platform_group "$SDK_PLATFORM_GROUP" \
43
- --arg sdk_platform_group_server "$SDK_PLATFORM_GROUP_SERVER" \
44
- --arg sdk_platform "$SDK_PLATFORM" \
45
- --arg sdk_platform_typescript "$SDK_PLATFORM_TYPESCRIPT" \
46
- --arg dsa_priority "$DSA_PRIORITY" \
47
- --arg dsa_priority_no_priority "$DSA_PRIORITY_NO_PRIORITY" \
48
- --arg dsa_status "$DSA_STATUS" \
49
- --arg dsa_status_triage "$DSA_STATUS_TRIAGE" \
50
- --arg dsa_repo_ticket_url "$DSA_REPO_TICKET_URL" \
51
- --arg workspace_id "$WORKSPACE_ID" \
52
- --arg project_id_github_and_important_sdk_issues "$PROJECT_ID_GITHUB_AND_IMPORTANT_SDK_ISSUES" \
53
- --arg project_id_sdk_backlog "$PROJECT_ID_SDK_BACKLOG" \
54
- '{
55
- "data": {
56
- "custom_fields": {
57
- $sdk_platform_group: $sdk_platform_group_server,
58
- $sdk_platform: $sdk_platform_typescript,
59
- $dsa_priority: $dsa_priority_no_priority,
60
- $dsa_status: $dsa_status_triage,
61
- $dsa_repo_ticket_url: $url
62
- },
63
- "name": $title,
64
- "workspace": $workspace_id,
65
- "projects": [$project_id_github_and_important_sdk_issues, $project_id_sdk_backlog],
66
- "notes": "Issue ID: \($repo_full_name)#\($id)\nIssue number: \($number)\nCreated via GitHub Actions\n----\n\n\($body)"
67
- }
68
- }')
69
-
70
- curl --request POST \
71
- --url https://app.asana.com/api/1.0/tasks?opt_pretty=true \
72
- --header 'accept: application/json' \
73
- --header 'authorization: Bearer ${{ secrets.ASANA_PAT }}' \
74
- --header 'content-type: application/json' \
75
- --data "$DATA_BODY" \
76
- --output response.json
77
-
78
- TASK_GID=$(jq -r '.data.gid' response.json)
79
- echo "TASK_GID=$TASK_GID" >> $GITHUB_ENV
80
- - name: Move to "0 Unclassified" section in "Github & Important SDK Issues" project
81
- env:
82
- SECTION_ID_GITHUB_AND_IMPORTANT_SDK_ISSUES: "1208970755434051"
83
- run: |
84
- DATA_BODY=$(jq -n \
85
- --arg task_gid "$TASK_GID" \
86
- --arg section_id "$SECTION_ID_GITHUB_AND_IMPORTANT_SDK_ISSUES" \
87
- '{
88
- "data": {
89
- "task": $task_gid,
90
- "insert_after": "null"
91
- }
92
- }')
93
-
94
- curl --request POST \
95
- --url https://app.asana.com/api/1.0/sections/$section_id/addTask \
96
- --header 'accept: application/json' \
97
- --header 'authorization: Bearer ${{ secrets.ASANA_PAT }}' \
98
- --header 'content-type: application/json' \
99
- --data "$DATA_BODY"
100
- - name: Move to "Untriaged" section in "SDK / Backlog" project
101
- env:
102
- SECTION_ID_SDK_BACKLOG: "1208899729378982"
103
- run: |
104
- DATA_BODY=$(jq -n \
105
- --arg task_gid "$TASK_GID" \
106
- --arg section_id "$SECTION_ID_SDK_BACKLOG" \
107
- '{
108
- "data": {
109
- "task": $task_gid,
110
- "insert_after": "null"
111
- }
112
- }')
113
-
114
- curl --request POST \
115
- --url https://app.asana.com/api/1.0/sections/$section_id/addTask \
116
- --header 'accept: application/json' \
117
- --header 'authorization: Bearer ${{ secrets.ASANA_PAT }}' \
118
- --header 'content-type: application/json' \
119
- --data "$DATA_BODY"