@onesignal/node-onesignal 1.0.0-beta9 → 2.0.0-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.
- package/.github/workflows/Zapier.yml +7 -2
- package/DefaultApi.md +3 -4
- package/README.md +4 -24
- package/apis/DefaultApi.ts +1 -6
- package/dist/apis/DefaultApi.d.ts +1 -1
- package/dist/apis/DefaultApi.js +1 -2
- package/dist/apis/DefaultApi.js.map +1 -1
- package/dist/models/CreateNotificationSuccessResponse.d.ts +2 -2
- package/dist/models/PropertiesDeltas.d.ts +0 -1
- package/dist/models/PropertiesDeltas.js +0 -6
- package/dist/models/PropertiesDeltas.js.map +1 -1
- package/dist/models/Purchase.d.ts +1 -0
- package/dist/models/Purchase.js +6 -0
- package/dist/models/Purchase.js.map +1 -1
- package/dist/types/ObjectParamAPI.d.ts +0 -1
- package/dist/types/ObjectParamAPI.js +1 -1
- package/dist/types/ObjectParamAPI.js.map +1 -1
- package/dist/types/ObservableAPI.d.ts +1 -1
- package/dist/types/ObservableAPI.js +2 -2
- package/dist/types/ObservableAPI.js.map +1 -1
- package/dist/types/PromiseAPI.d.ts +1 -1
- package/dist/types/PromiseAPI.js +2 -2
- package/dist/types/PromiseAPI.js.map +1 -1
- package/models/App.ts +1 -1
- package/models/BadRequestError.ts +1 -1
- package/models/BasicNotification.ts +1 -1
- package/models/BasicNotificationAllOf.ts +1 -1
- package/models/BasicNotificationAllOfAndroidBackgroundLayout.ts +1 -1
- package/models/BeginLiveActivityRequest.ts +1 -1
- package/models/Button.ts +1 -1
- package/models/CancelNotificationSuccessResponse.ts +1 -1
- package/models/CreateNotificationSuccessResponse.ts +3 -3
- package/models/CreatePlayerSuccessResponse.ts +1 -1
- package/models/CreateSegmentConflictResponse.ts +1 -1
- package/models/CreateSegmentSuccessResponse.ts +1 -1
- package/models/CreateSubscriptionRequestBody.ts +1 -1
- package/models/CreateUserConflictResponse.ts +1 -1
- package/models/CreateUserConflictResponseErrorsInner.ts +1 -1
- package/models/CreateUserConflictResponseErrorsItemsMeta.ts +1 -1
- package/models/DeletePlayerNotFoundResponse.ts +1 -1
- package/models/DeletePlayerSuccessResponse.ts +1 -1
- package/models/DeleteSegmentNotFoundResponse.ts +1 -1
- package/models/DeleteSegmentSuccessResponse.ts +1 -1
- package/models/DeliveryData.ts +1 -1
- package/models/ExportPlayersRequestBody.ts +1 -1
- package/models/ExportPlayersSuccessResponse.ts +1 -1
- package/models/Filter.ts +1 -1
- package/models/FilterExpressions.ts +1 -1
- package/models/GetNotificationRequestBody.ts +1 -1
- package/models/IdentifyUserConflictResponse.ts +1 -1
- package/models/IdentifyUserConflictResponseErrorsInner.ts +1 -1
- package/models/InlineResponse200.ts +1 -1
- package/models/InlineResponse2003.ts +1 -1
- package/models/InlineResponse201.ts +1 -1
- package/models/InlineResponse202.ts +1 -1
- package/models/InvalidIdentifierError.ts +1 -1
- package/models/Notification.ts +1 -1
- package/models/Notification200Errors.ts +1 -1
- package/models/NotificationAllOf.ts +1 -1
- package/models/NotificationHistorySuccessResponse.ts +1 -1
- package/models/NotificationSlice.ts +1 -1
- package/models/NotificationTarget.ts +1 -1
- package/models/NotificationWithMeta.ts +1 -1
- package/models/NotificationWithMetaAllOf.ts +1 -1
- package/models/Operator.ts +1 -1
- package/models/OutcomeData.ts +1 -1
- package/models/OutcomesData.ts +1 -1
- package/models/PlatformDeliveryData.ts +1 -1
- package/models/PlatformDeliveryDataEmailAllOf.ts +1 -1
- package/models/PlatformDeliveryDataSmsAllOf.ts +1 -1
- package/models/Player.ts +1 -1
- package/models/PlayerNotificationTarget.ts +1 -1
- package/models/PlayerNotificationTargetIncludeAliases.ts +1 -1
- package/models/PlayerSlice.ts +1 -1
- package/models/PropertiesDeltas.ts +1 -8
- package/models/PropertiesObject.ts +1 -1
- package/models/Purchase.ts +8 -1
- package/models/Segment.ts +1 -1
- package/models/SegmentNotificationTarget.ts +1 -1
- package/models/StringMap.ts +1 -1
- package/models/SubscriptionObject.ts +1 -1
- package/models/TransferSubscriptionRequestBody.ts +1 -1
- package/models/UpdateLiveActivityRequest.ts +1 -1
- package/models/UpdateLiveActivitySuccessResponse.ts +1 -1
- package/models/UpdatePlayerSuccessResponse.ts +1 -1
- package/models/UpdatePlayerTagsRequestBody.ts +1 -1
- package/models/UpdatePlayerTagsSuccessResponse.ts +1 -1
- package/models/UpdateSubscriptionRequestBody.ts +1 -1
- package/models/UpdateUserRequest.ts +1 -1
- package/models/User.ts +1 -1
- package/models/UserIdentityRequestBody.ts +1 -1
- package/models/UserIdentityResponse.ts +1 -1
- package/models/UserSubscriptionOptions.ts +1 -1
- package/package.json +2 -2
- package/types/ObjectParamAPI.ts +1 -7
- package/types/ObservableAPI.ts +2 -3
- package/types/PromiseAPI.ts +2 -3
|
@@ -8,6 +8,9 @@ on:
|
|
|
8
8
|
issues:
|
|
9
9
|
types: [closed]
|
|
10
10
|
|
|
11
|
+
permissions:
|
|
12
|
+
issues: read
|
|
13
|
+
|
|
11
14
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
12
15
|
jobs:
|
|
13
16
|
# This workflow contains a single job called "build"
|
|
@@ -20,10 +23,12 @@ jobs:
|
|
|
20
23
|
# Runs a set of commands using the runners shell
|
|
21
24
|
- name: Call Zapier web hook to close Asana task
|
|
22
25
|
if: ${{ !github.event.issue.pull_request }}
|
|
26
|
+
env:
|
|
27
|
+
ISSUE_TITLE: ${{ github.event.issue.title }}
|
|
23
28
|
run: |
|
|
24
29
|
curl --location --request POST 'https://hooks.zapier.com/hooks/catch/12728683/b7009qc/' \
|
|
25
30
|
--header 'Content-Type: application/json' \
|
|
26
31
|
--header 'Accept: application/json' \
|
|
27
32
|
--data-raw '{
|
|
28
|
-
"task_name" : "$
|
|
29
|
-
}'
|
|
33
|
+
"task_name" : "$ISSUE_TITLE"
|
|
34
|
+
}'
|
package/DefaultApi.md
CHANGED
|
@@ -562,6 +562,7 @@ let body:.DefaultApiCreateUserRequest = {
|
|
|
562
562
|
sku: "sku_example",
|
|
563
563
|
amount: "amount_example",
|
|
564
564
|
iso: "iso_example",
|
|
565
|
+
count: 3.14,
|
|
565
566
|
},
|
|
566
567
|
],
|
|
567
568
|
ip: "ip_example",
|
|
@@ -2370,6 +2371,7 @@ let body:.DefaultApiUpdateUserRequest = {
|
|
|
2370
2371
|
sku: "sku_example",
|
|
2371
2372
|
amount: "amount_example",
|
|
2372
2373
|
iso: "iso_example",
|
|
2374
|
+
count: 3.14,
|
|
2373
2375
|
},
|
|
2374
2376
|
],
|
|
2375
2377
|
ip: "ip_example",
|
|
@@ -2378,18 +2380,16 @@ let body:.DefaultApiUpdateUserRequest = {
|
|
|
2378
2380
|
deltas: {
|
|
2379
2381
|
session_time: 3.14,
|
|
2380
2382
|
session_count: 3.14,
|
|
2381
|
-
amount_spent: 3.14,
|
|
2382
2383
|
purchases: [
|
|
2383
2384
|
{
|
|
2384
2385
|
sku: "sku_example",
|
|
2385
2386
|
amount: "amount_example",
|
|
2386
2387
|
iso: "iso_example",
|
|
2388
|
+
count: 3.14,
|
|
2387
2389
|
},
|
|
2388
2390
|
],
|
|
2389
2391
|
},
|
|
2390
2392
|
},
|
|
2391
|
-
// string (optional)
|
|
2392
|
-
subscriptionId: "subscription_id_example",
|
|
2393
2393
|
};
|
|
2394
2394
|
|
|
2395
2395
|
apiInstance.updateUser(body).then((data:any) => {
|
|
@@ -2406,7 +2406,6 @@ Name | Type | Description | Notes
|
|
|
2406
2406
|
**appId** | [**string**] | | defaults to undefined
|
|
2407
2407
|
**aliasLabel** | [**string**] | | defaults to undefined
|
|
2408
2408
|
**aliasId** | [**string**] | | defaults to undefined
|
|
2409
|
-
**subscriptionId** | [**string**] | | (optional) defaults to undefined
|
|
2410
2409
|
|
|
2411
2410
|
|
|
2412
2411
|
### Return type
|
package/README.md
CHANGED
|
@@ -68,7 +68,7 @@ const configuration = OneSignal.createConfiguration({
|
|
|
68
68
|
const client = new OneSignal.DefaultApi(configuration);
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
#### Advanced Usage: Creating a brand
|
|
71
|
+
#### Advanced Usage: Creating a brand-new app
|
|
72
72
|
If creating a new app via the client, the response will return the app's API key via the `basic_auth_key` response
|
|
73
73
|
parameter. You can then use this to modify your configuration object and create a new client that will have both user-level and app-level authentication set up.
|
|
74
74
|
|
|
@@ -86,6 +86,8 @@ const client = new OneSignal.DefaultApi(configuration);
|
|
|
86
86
|
---
|
|
87
87
|
## API Reference
|
|
88
88
|
|
|
89
|
+
> See the full list of [API Endpoints](DefaultApi.MD).
|
|
90
|
+
|
|
89
91
|
To make stateful changes requests should take on the following pattern:
|
|
90
92
|
1. create or get an object
|
|
91
93
|
2. make changes to that object
|
|
@@ -96,28 +98,6 @@ Examples of important OneSignal objects include `App`, `Notification`, `Player`,
|
|
|
96
98
|
For example, see the section below on creating an app. First an app object is created via the instantiation of the `App`
|
|
97
99
|
class. Then, the app instance is modified directly. Finally, we use the `client` to create the app via a remote request.
|
|
98
100
|
|
|
99
|
-
| Function | HTTP Request | Description |
|
|
100
|
-
|---------------------------------------------------------|------------------------------------------------|-----------------------------------------------------|
|
|
101
|
-
| [cancelNotification](#canceling-a-notification) | Delete `/notifications/{notification_id}` | Stop a scheduled or currently outgoing notification |
|
|
102
|
-
| [createApp](#creating-an-app) | Post `/apps` | Create an app |
|
|
103
|
-
| [createNotification](#creating-a-notification) | Post `/notifications` | Create notification |
|
|
104
|
-
| [createPlayer](#creating-a-player) | Post `/players` | Add a device |
|
|
105
|
-
| [createSegments](#creating-a-segment) | Post `/apps/{app_id}/segments` | Create Segments |
|
|
106
|
-
| [deletePlayer](#deleting-a-player) | Delete `/players/{player_id}` | Delete a user record |
|
|
107
|
-
| [deleteSegments](#deleting-a-segment) | Delete `/apps/{app_id}/segments/{segment_id}` | Delete Segments |
|
|
108
|
-
| [exportPlayers](#exporting-a-player) | Post `/players/csv_export?app_id={app_id}` | CSV export |
|
|
109
|
-
| [getApp](#getting-an-app) | Get `/apps/{app_id}` | View an app |
|
|
110
|
-
| [getApps](#getting-multiple-apps) | Get `/apps` | View apps |
|
|
111
|
-
| [getNotification](#getting-a-notification) | Get `/notifications/{notification_id}` | View notification |
|
|
112
|
-
| [getNotificationHistory](#getting-notification-history) | Post `/notifications/{notification_id}/history` | Notification History |
|
|
113
|
-
| [getNotifications](#getting-a-notification) | Get `/notifications` | View notifications |
|
|
114
|
-
| [getOutcomes](#getting-outcomes) | Get `/apps/{app_id}/outcomes` | View Outcomes |
|
|
115
|
-
| [getPlayer](#getting-a-player) | Get `/players/{player_id}` | View device |
|
|
116
|
-
| [getPlayers](#getting-players) | Get `/players` | View devices |
|
|
117
|
-
| [updateApp](#getting-an-app) | Put `/apps/{app_id}` | Update an app |
|
|
118
|
-
| [updatePlayer](#updating-a-player) | Put `/players/{player_id}` | Edit device |
|
|
119
|
-
| [updatePlayerTags](#updating-player-tags) | Put `/apps/{app_id}/users/{external_user_id}` | Edit tags with external user id |
|
|
120
|
-
|
|
121
101
|
### Creating an app
|
|
122
102
|
Creates a new OneSignal app.
|
|
123
103
|
|
|
@@ -604,6 +584,6 @@ Give a ⭐️ if this project helped you!
|
|
|
604
584
|
|
|
605
585
|
## 📝 License
|
|
606
586
|
|
|
607
|
-
Copyright ©
|
|
587
|
+
Copyright © 2023 [OneSignal](https://github.com/OneSignal).
|
|
608
588
|
|
|
609
589
|
This project is [MIT](https://github.com/OneSignal/node-onesignal/blob/main/LICENSE) licensed.
|
package/apis/DefaultApi.ts
CHANGED
|
@@ -1971,9 +1971,8 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
1971
1971
|
* @param aliasLabel
|
|
1972
1972
|
* @param aliasId
|
|
1973
1973
|
* @param updateUserRequest
|
|
1974
|
-
* @param subscriptionId
|
|
1975
1974
|
*/
|
|
1976
|
-
public async updateUser(appId: string, aliasLabel: string, aliasId: string, updateUserRequest: UpdateUserRequest,
|
|
1975
|
+
public async updateUser(appId: string, aliasLabel: string, aliasId: string, updateUserRequest: UpdateUserRequest, _options?: Configuration): Promise<RequestContext> {
|
|
1977
1976
|
let _config = _options || this.configuration;
|
|
1978
1977
|
|
|
1979
1978
|
// verify required parameter 'appId' is not null or undefined
|
|
@@ -2000,7 +1999,6 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
2000
1999
|
}
|
|
2001
2000
|
|
|
2002
2001
|
|
|
2003
|
-
|
|
2004
2002
|
// Path Params
|
|
2005
2003
|
const localVarPath = '/apps/{app_id}/users/by/{alias_label}/{alias_id}'
|
|
2006
2004
|
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
|
|
@@ -2011,9 +2009,6 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
2011
2009
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
|
|
2012
2010
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
2013
2011
|
|
|
2014
|
-
// Header Params
|
|
2015
|
-
requestContext.setHeaderParam("subscription_id", ObjectSerializer.serialize(subscriptionId, "string", ""));
|
|
2016
|
-
|
|
2017
2012
|
|
|
2018
2013
|
// Body Params
|
|
2019
2014
|
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
@@ -72,7 +72,7 @@ export declare class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
72
72
|
updatePlayer(playerId: string, player: Player, _options?: Configuration): Promise<RequestContext>;
|
|
73
73
|
updatePlayerTags(appId: string, externalUserId: string, updatePlayerTagsRequestBody?: UpdatePlayerTagsRequestBody, _options?: Configuration): Promise<RequestContext>;
|
|
74
74
|
updateSubscription(appId: string, subscriptionId: string, updateSubscriptionRequestBody: UpdateSubscriptionRequestBody, _options?: Configuration): Promise<RequestContext>;
|
|
75
|
-
updateUser(appId: string, aliasLabel: string, aliasId: string, updateUserRequest: UpdateUserRequest,
|
|
75
|
+
updateUser(appId: string, aliasLabel: string, aliasId: string, updateUserRequest: UpdateUserRequest, _options?: Configuration): Promise<RequestContext>;
|
|
76
76
|
}
|
|
77
77
|
export declare class DefaultApiResponseProcessor {
|
|
78
78
|
beginLiveActivity(response: ResponseContext): Promise<void>;
|
package/dist/apis/DefaultApi.js
CHANGED
|
@@ -1502,7 +1502,7 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
1502
1502
|
});
|
|
1503
1503
|
});
|
|
1504
1504
|
};
|
|
1505
|
-
DefaultApiRequestFactory.prototype.updateUser = function (appId, aliasLabel, aliasId, updateUserRequest,
|
|
1505
|
+
DefaultApiRequestFactory.prototype.updateUser = function (appId, aliasLabel, aliasId, updateUserRequest, _options) {
|
|
1506
1506
|
var _a, _b, _c;
|
|
1507
1507
|
return __awaiter(this, void 0, void 0, function () {
|
|
1508
1508
|
var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
|
|
@@ -1528,7 +1528,6 @@ var DefaultApiRequestFactory = (function (_super) {
|
|
|
1528
1528
|
.replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
|
|
1529
1529
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
|
|
1530
1530
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
1531
|
-
requestContext.setHeaderParam("subscription_id", ObjectSerializer_1.ObjectSerializer.serialize(subscriptionId, "string", ""));
|
|
1532
1531
|
contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
1533
1532
|
"application/json"
|
|
1534
1533
|
]);
|