@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,52 +0,0 @@
1
- /**
2
- * OneSignal
3
- * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
4
- *
5
- * API Version: 5.2.0
6
- * Contact: devrel@onesignal.com
7
- */
8
-
9
- import { HttpFile } from '../http/http';
10
-
11
- export class WebButton {
12
- 'id': string;
13
- 'text'?: string;
14
- 'icon'?: string;
15
- 'url'?: string;
16
-
17
- static readonly discriminator: string | undefined = undefined;
18
-
19
- static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
20
- {
21
- "name": "id",
22
- "baseName": "id",
23
- "type": "string",
24
- "format": ""
25
- },
26
- {
27
- "name": "text",
28
- "baseName": "text",
29
- "type": "string",
30
- "format": ""
31
- },
32
- {
33
- "name": "icon",
34
- "baseName": "icon",
35
- "type": "string",
36
- "format": ""
37
- },
38
- {
39
- "name": "url",
40
- "baseName": "url",
41
- "type": "string",
42
- "format": ""
43
- } ];
44
-
45
- static getAttributeTypeMap() {
46
- return WebButton.attributeTypeMap;
47
- }
48
-
49
- public constructor() {
50
- }
51
- }
52
-
package/models/all.ts DELETED
@@ -1,53 +0,0 @@
1
- export * from './App'
2
- export * from './BasicNotification'
3
- export * from './BasicNotificationAllOf'
4
- export * from './BasicNotificationAllOfAndroidBackgroundLayout'
5
- export * from './Button'
6
- export * from './CreateNotificationSuccessResponse'
7
- export * from './CreateSegmentConflictResponse'
8
- export * from './CreateSegmentSuccessResponse'
9
- export * from './CreateUserConflictResponse'
10
- export * from './CreateUserConflictResponseErrorsInner'
11
- export * from './CreateUserConflictResponseErrorsItemsMeta'
12
- export * from './DeliveryData'
13
- export * from './ExportEventsSuccessResponse'
14
- export * from './ExportSubscriptionsRequestBody'
15
- export * from './ExportSubscriptionsSuccessResponse'
16
- export * from './Filter'
17
- export * from './FilterExpression'
18
- export * from './GenericError'
19
- export * from './GenericSuccessBoolResponse'
20
- export * from './GetNotificationHistoryRequestBody'
21
- export * from './GetSegmentsSuccessResponse'
22
- export * from './LanguageStringMap'
23
- export * from './Notification'
24
- export * from './NotificationAllOf'
25
- export * from './NotificationHistorySuccessResponse'
26
- export * from './NotificationSlice'
27
- export * from './NotificationTarget'
28
- export * from './NotificationWithMeta'
29
- export * from './NotificationWithMetaAllOf'
30
- export * from './Operator'
31
- export * from './OutcomeData'
32
- export * from './OutcomesData'
33
- export * from './PlatformDeliveryData'
34
- export * from './PlatformDeliveryDataEmailAllOf'
35
- export * from './PlatformDeliveryDataSmsAllOf'
36
- export * from './PropertiesBody'
37
- export * from './PropertiesDeltas'
38
- export * from './PropertiesObject'
39
- export * from './Purchase'
40
- export * from './RateLimitError'
41
- export * from './Segment'
42
- export * from './SegmentData'
43
- export * from './SegmentNotificationTarget'
44
- export * from './Subscription'
45
- export * from './SubscriptionBody'
46
- export * from './SubscriptionNotificationTarget'
47
- export * from './TransferSubscriptionRequestBody'
48
- export * from './UpdateLiveActivityRequest'
49
- export * from './UpdateLiveActivitySuccessResponse'
50
- export * from './UpdateUserRequest'
51
- export * from './User'
52
- export * from './UserIdentityBody'
53
- export * from './WebButton'
package/rxjsStub.ts DELETED
@@ -1,27 +0,0 @@
1
- export class Observable<T> {
2
- constructor(private promise: Promise<T>) {}
3
-
4
- toPromise() {
5
- return this.promise;
6
- }
7
-
8
- pipe<S>(callback: (value: T) => S | Promise<S>): Observable<S> {
9
- return new Observable(this.promise.then(callback));
10
- }
11
- }
12
-
13
- export function from<T>(promise: Promise<any>) {
14
- return new Observable(promise);
15
- }
16
-
17
- export function of<T>(value: T) {
18
- return new Observable<T>(Promise.resolve(value));
19
- }
20
-
21
- export function mergeMap<T, S>(callback: (value: T) => Observable<S>) {
22
- return (value: T) => callback(value).toPromise();
23
- }
24
-
25
- export function map(callback: any) {
26
- return callback;
27
- }
package/servers.ts DELETED
@@ -1,53 +0,0 @@
1
- import { RequestContext, HttpMethod } from "./http/http";
2
-
3
- export interface BaseServerConfiguration {
4
- makeRequestContext(endpoint: string, httpMethod: HttpMethod): RequestContext;
5
- }
6
-
7
- /**
8
- *
9
- * Represents the configuration of a server including its
10
- * url template and variable configuration based on the url.
11
- *
12
- */
13
- export class ServerConfiguration<T extends { [key: string]: string }> implements BaseServerConfiguration {
14
- public constructor(private url: string, private variableConfiguration: T) {}
15
-
16
- /**
17
- * Sets the value of the variables of this server.
18
- *
19
- * @param variableConfiguration a partial variable configuration for the variables contained in the url
20
- */
21
- public setVariables(variableConfiguration: Partial<T>) {
22
- Object.assign(this.variableConfiguration, variableConfiguration);
23
- }
24
-
25
- public getConfiguration(): T {
26
- return this.variableConfiguration
27
- }
28
-
29
- private getUrl() {
30
- let replacedUrl = this.url;
31
- for (const key in this.variableConfiguration) {
32
- var re = new RegExp("{" + key + "}","g");
33
- replacedUrl = replacedUrl.replace(re, this.variableConfiguration[key]);
34
- }
35
- return replacedUrl
36
- }
37
-
38
- /**
39
- * Creates a new request context for this server using the url with variables
40
- * replaced with their respective values and the endpoint of the request appended.
41
- *
42
- * @param endpoint the endpoint to be queried on the server
43
- * @param httpMethod httpMethod to be used
44
- *
45
- */
46
- public makeRequestContext(endpoint: string, httpMethod: HttpMethod): RequestContext {
47
- return new RequestContext(this.getUrl() + endpoint, httpMethod);
48
- }
49
- }
50
-
51
- export const server1 = new ServerConfiguration<{ }>("https://api.onesignal.com", { })
52
-
53
- export const servers = [server1];
package/tsconfig.json DELETED
@@ -1,28 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "strict": true,
4
- /* Basic Options */
5
- "target": "es5",
6
- "moduleResolution": "node",
7
- "declaration": true,
8
-
9
- /* Additional Checks */
10
- "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!)
11
- "noUnusedParameters": false, /* Report errors on unused parameters. */ // TODO: set to true again
12
- "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
13
- "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
14
-
15
- "removeComments": true,
16
- "sourceMap": true,
17
- "outDir": "./dist",
18
- "noLib": false,
19
- "lib": [ "es6" ],
20
- },
21
- "exclude": [
22
- "dist",
23
- "node_modules"
24
- ],
25
- "filesGlob": [
26
- "./**/*.ts",
27
- ]
28
- }