@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,172 +0,0 @@
1
- name: Github --> Asana Issue Updates Workflow
2
-
3
- on:
4
- issues:
5
- types: [edited, deleted, closed, reopened, assigned, unassigned, labeled, unlabeled, milestoned, demilestoned, pinned, unpinned, locked, unlocked, transferred]
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: Determine Action and Post to Asana
30
- env:
31
- ACTION_TYPE: ${{ github.event.action }}
32
- ACTOR_NAME: ${{ github.event.sender.login }}
33
- ISSUE_TITLE: ${{ github.event.issue.title }}
34
- ISSUE_NUMBER: ${{ github.event.issue.number }}
35
- ISSUE_STATE: ${{ github.event.issue.state }}
36
- run: |
37
- # Map GitHub action types to human-readable descriptions
38
- case "$ACTION_TYPE" in
39
- "edited")
40
- ACTION_DESC="edited the issue"
41
- ;;
42
- "deleted")
43
- ACTION_DESC="deleted the issue"
44
- ;;
45
- "closed")
46
- ACTION_DESC="closed the issue"
47
- ;;
48
- "reopened")
49
- ACTION_DESC="reopened the issue"
50
- ;;
51
- "assigned")
52
- ACTION_DESC="assigned the issue"
53
- ;;
54
- "unassigned")
55
- ACTION_DESC="unassigned the issue"
56
- ;;
57
- "labeled")
58
- ACTION_DESC="added labels to the issue"
59
- ;;
60
- "unlabeled")
61
- ACTION_DESC="removed labels from the issue"
62
- ;;
63
- "milestoned")
64
- ACTION_DESC="added the issue to a milestone"
65
- ;;
66
- "demilestoned")
67
- ACTION_DESC="removed the issue from a milestone"
68
- ;;
69
- "pinned")
70
- ACTION_DESC="pinned the issue"
71
- ;;
72
- "unpinned")
73
- ACTION_DESC="unpinned the issue"
74
- ;;
75
- "locked")
76
- ACTION_DESC="locked the issue"
77
- ;;
78
- "unlocked")
79
- ACTION_DESC="unlocked the issue"
80
- ;;
81
- "transferred")
82
- ACTION_DESC="transferred the issue"
83
- ;;
84
- *)
85
- ACTION_DESC="performed an action on the issue"
86
- ;;
87
- esac
88
-
89
- # Add additional context for specific actions based on webhook payload
90
- if [ "$ACTION_TYPE" = "assigned" ] && [ -n "${{ github.event.assignee.login }}" ]; then
91
- ACTION_DESC="assigned the issue to ${{ github.event.assignee.login }}"
92
- fi
93
-
94
- if [ "$ACTION_TYPE" = "unassigned" ] && [ -n "${{ github.event.assignee.login }}" ]; then
95
- ACTION_DESC="unassigned the issue from ${{ github.event.assignee.login }}"
96
- fi
97
-
98
- if [ "$ACTION_TYPE" = "labeled" ] && [ -n "${{ github.event.label.name }}" ]; then
99
- LABEL_COLOR="${{ github.event.label.color }}"
100
- ACTION_DESC="added label '${{ github.event.label.name }}' to the issue"
101
- if [ -n "$LABEL_COLOR" ]; then
102
- ACTION_DESC="$ACTION_DESC (color: #$LABEL_COLOR)"
103
- fi
104
- fi
105
-
106
- if [ "$ACTION_TYPE" = "unlabeled" ] && [ -n "${{ github.event.label.name }}" ]; then
107
- LABEL_COLOR="${{ github.event.label.color }}"
108
- ACTION_DESC="removed label '${{ github.event.label.name }}' from the issue"
109
- if [ -n "$LABEL_COLOR" ]; then
110
- ACTION_DESC="$ACTION_DESC (color: #$LABEL_COLOR)"
111
- fi
112
- fi
113
-
114
- if [ "$ACTION_TYPE" = "milestoned" ] && [ -n "${{ github.event.milestone.title }}" ]; then
115
- MILESTONE_DUE_DATE="${{ github.event.milestone.due_on }}"
116
- ACTION_DESC="added the issue to milestone '${{ github.event.milestone.title }}'"
117
- if [ -n "$MILESTONE_DUE_DATE" ] && [ "$MILESTONE_DUE_DATE" != "null" ]; then
118
- ACTION_DESC="$ACTION_DESC (due: $MILESTONE_DUE_DATE)"
119
- fi
120
- fi
121
-
122
- if [ "$ACTION_TYPE" = "demilestoned" ] && [ -n "${{ github.event.milestone.title }}" ]; then
123
- ACTION_DESC="removed the issue from milestone '${{ github.event.milestone.title }}'"
124
- fi
125
-
126
- if [ "$ACTION_TYPE" = "transferred" ] && [ -n "${{ github.event.changes.new_repository.full_name }}" ]; then
127
- ACTION_DESC="transferred the issue to repository ${{ github.event.changes.new_repository.full_name }}"
128
- fi
129
-
130
- if [ "$ACTION_TYPE" = "edited" ] && [ -n "${{ github.event.changes.title.from }}" ]; then
131
- OLD_TITLE="${{ github.event.changes.title.from }}"
132
- NEW_TITLE="${{ github.event.issue.title }}"
133
- ACTION_DESC="edited the issue title from '$OLD_TITLE' to '$NEW_TITLE'"
134
- fi
135
-
136
- echo "ACTION_DESC=$ACTION_DESC" >> $GITHUB_ENV
137
-
138
- # Only proceed if we found a task
139
- if [ "$TASK_GID" != "null" ] && [ -n "$TASK_GID" ]; then
140
- # Create a more detailed message with additional context
141
- MESSAGE_TEXT="$ACTOR_NAME performed an action: $ACTION_DESC"
142
-
143
- # Add issue state information for state changes
144
- if [ "$ACTION_TYPE" = "closed" ] || [ "$ACTION_TYPE" = "reopened" ]; then
145
- MESSAGE_TEXT=$(printf "%s\nIssue state: %s" "$MESSAGE_TEXT" "$ISSUE_STATE")
146
- fi
147
-
148
- # Add repository information for transferred issues
149
- if [ "$ACTION_TYPE" = "transferred" ]; then
150
- REPO_NAME="${{ github.event.repository.full_name }}"
151
- MESSAGE_TEXT=$(printf "%s\nFrom repository: %s" "$MESSAGE_TEXT" "$REPO_NAME")
152
- fi
153
-
154
- MESSAGE_TEXT=$(printf "%s\n\nIssue: #%s - %s" "$MESSAGE_TEXT" "$ISSUE_NUMBER" "$ISSUE_TITLE")
155
-
156
- BODY_DATA=$(jq -n \
157
- --arg text "$MESSAGE_TEXT" \
158
- '{
159
- "data": {
160
- "text": $text
161
- }
162
- }')
163
-
164
- curl --request POST \
165
- --url https://app.asana.com/api/1.0/tasks/$TASK_GID/stories \
166
- --header 'accept: application/json' \
167
- --header 'authorization: Bearer ${{ secrets.ASANA_PAT }}' \
168
- --header 'content-type: application/json' \
169
- --data "$BODY_DATA"
170
- else
171
- echo "No corresponding Asana task found for issue ID: $ISSUE_ID"
172
- fi
@@ -1,22 +0,0 @@
1
- name: NPM Publish
2
-
3
- on:
4
- release:
5
- types: [created]
6
-
7
- jobs:
8
- publish:
9
- runs-on: ubuntu-latest
10
- steps:
11
- - uses: actions/checkout@v3
12
- - uses: actions/setup-node@v3
13
- with:
14
- node-version: 18
15
- - name: Install Node types
16
- run: npm install @types/node
17
- - name: Run build
18
- run: npm run build
19
- - name: Publish package
20
- uses: JS-DevTools/npm-publish@v1
21
- with:
22
- token: ${{ secrets.NPM }}
@@ -1,17 +0,0 @@
1
- name: Add issues to project
2
-
3
- on:
4
- issues:
5
- types:
6
- - opened
7
-
8
- jobs:
9
- add-to-project:
10
- runs-on: ubuntu-latest
11
- steps:
12
- - name: Add issue to project
13
- uses: actions/add-to-project@v1.0.2
14
- with:
15
- # SDK Server Project
16
- project-url: https://github.com/orgs/OneSignal/projects/11
17
- github-token: ${{ secrets.GH_PROJECTS_TOKEN }}
package/CHANGELOG.md DELETED
@@ -1,48 +0,0 @@
1
- # Changelog
2
- All notable changes to this project will be documented in this file.
3
-
4
- ## January 2023
5
- ### `1.0.0-beta9` - 09/06/2023
6
- - Added User model endpoints
7
- - Limitations
8
- - Recommend using only in development and staging environments for Alpha releases.
9
- - Aliases will be available in a future release
10
- - Outcomes will be available in a future release
11
- - Users are deleted when the last subscription is removed
12
- - Known issues
13
- - User properties may not update when Subscriptions are transferred
14
- - Identity Verification
15
- - We will be introducing JWT in follow up Alpha or Beta release
16
- - Extra disabled subscriptions are created when switching Users in the SDK.
17
-
18
- ## December 2022
19
- ### `1.0.0-beta8` - 11/14/2022
20
- - Added Live Activity endpoints
21
- - Fixed various bugs
22
-
23
- ## November 2022
24
- ### `1.0.0-beta5` - 11/14/2022
25
- #### Api Changes
26
- - Configuration setup has been simplified and streamlined. Now it looks like this:
27
- ```js
28
- const configuration = OneSignal.createConfiguration({
29
- userKey: USER_KEY_TOKEN,
30
- appKey: APP_KEY_TOKEN,
31
- });
32
- ```
33
- - Player ID is no longer required when creating a player
34
-
35
- #### Fixed
36
- - Bug in the OpenAPI schema not allowing users to use filters when creating a notification.
37
- - Bug in the OpenAPI schema not allowing to set the notification name.
38
-
39
-
40
- ## February 2022
41
-
42
- ### `1.0.0-beta4` - 02/25/2022
43
- #### Added
44
- - .npmignore file
45
-
46
- #### Fixed
47
- - Missing `dist` directory since npm was ignoring it due to lack of .npmignore
48
-