Skip to content

Commit 9d4d452

Browse files
authored
Merge pull request #56 from OneSignal/user-api-updates
Add v5.3.0-beta1 package updates
2 parents c3f1cd5 + 36e975b commit 9d4d452

File tree

172 files changed

+9488
-969
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+9488
-969
lines changed

README.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
1818

19-
- API version: 5.2.1
20-
- Package version: 5.2.2-beta1
19+
- API version: 5.3.0
20+
- Package version: 5.3.0-beta1
2121
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
2222

2323
## Requirements.
@@ -83,16 +83,22 @@ All URIs are relative to *https://api.onesignal.com*
8383
Class | Method | HTTP request | Description
8484
------------ | ------------- | ------------- | -------------
8585
*DefaultApi* | [**cancel_notification**](docs/DefaultApi.md#cancel_notification) | **DELETE** /notifications/{notification_id} | Stop a scheduled or currently outgoing notification
86+
*DefaultApi* | [**copy_template_to_app**](docs/DefaultApi.md#copy_template_to_app) | **POST** /templates/{template_id}/copy_to_app | Copy template to another app
8687
*DefaultApi* | [**create_alias**](docs/DefaultApi.md#create_alias) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity |
8788
*DefaultApi* | [**create_alias_by_subscription**](docs/DefaultApi.md#create_alias_by_subscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/user/identity |
89+
*DefaultApi* | [**create_api_key**](docs/DefaultApi.md#create_api_key) | **POST** /apps/{app_id}/auth/tokens | Create API key
8890
*DefaultApi* | [**create_app**](docs/DefaultApi.md#create_app) | **POST** /apps | Create an app
91+
*DefaultApi* | [**create_custom_events**](docs/DefaultApi.md#create_custom_events) | **POST** /apps/{app_id}/integrations/custom_events | Create custom events
8992
*DefaultApi* | [**create_notification**](docs/DefaultApi.md#create_notification) | **POST** /notifications | Create notification
9093
*DefaultApi* | [**create_segment**](docs/DefaultApi.md#create_segment) | **POST** /apps/{app_id}/segments | Create Segment
9194
*DefaultApi* | [**create_subscription**](docs/DefaultApi.md#create_subscription) | **POST** /apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions |
95+
*DefaultApi* | [**create_template**](docs/DefaultApi.md#create_template) | **POST** /templates | Create template
9296
*DefaultApi* | [**create_user**](docs/DefaultApi.md#create_user) | **POST** /apps/{app_id}/users |
9397
*DefaultApi* | [**delete_alias**](docs/DefaultApi.md#delete_alias) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete} |
98+
*DefaultApi* | [**delete_api_key**](docs/DefaultApi.md#delete_api_key) | **DELETE** /apps/{app_id}/auth/tokens/{token_id} | Delete API key
9499
*DefaultApi* | [**delete_segment**](docs/DefaultApi.md#delete_segment) | **DELETE** /apps/{app_id}/segments/{segment_id} | Delete Segment
95100
*DefaultApi* | [**delete_subscription**](docs/DefaultApi.md#delete_subscription) | **DELETE** /apps/{app_id}/subscriptions/{subscription_id} |
101+
*DefaultApi* | [**delete_template**](docs/DefaultApi.md#delete_template) | **DELETE** /templates/{template_id} | Delete template
96102
*DefaultApi* | [**delete_user**](docs/DefaultApi.md#delete_user) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
97103
*DefaultApi* | [**export_events**](docs/DefaultApi.md#export_events) | **POST** /notifications/{notification_id}/export_events?app_id={app_id} | Export CSV of Events
98104
*DefaultApi* | [**export_subscriptions**](docs/DefaultApi.md#export_subscriptions) | **POST** /players/csv_export?app_id={app_id} | Export CSV of Subscriptions
@@ -106,28 +112,44 @@ Class | Method | HTTP request | Description
106112
*DefaultApi* | [**get_outcomes**](docs/DefaultApi.md#get_outcomes) | **GET** /apps/{app_id}/outcomes | View Outcomes
107113
*DefaultApi* | [**get_segments**](docs/DefaultApi.md#get_segments) | **GET** /apps/{app_id}/segments | Get Segments
108114
*DefaultApi* | [**get_user**](docs/DefaultApi.md#get_user) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
115+
*DefaultApi* | [**rotate_api_key**](docs/DefaultApi.md#rotate_api_key) | **POST** /apps/{app_id}/auth/tokens/{token_id}/rotate | Rotate API key
116+
*DefaultApi* | [**start_live_activity**](docs/DefaultApi.md#start_live_activity) | **POST** /apps/{app_id}/activities/activity/{activity_type} | Start Live Activity
109117
*DefaultApi* | [**transfer_subscription**](docs/DefaultApi.md#transfer_subscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/owner |
110118
*DefaultApi* | [**unsubscribe_email_with_token**](docs/DefaultApi.md#unsubscribe_email_with_token) | **POST** /apps/{app_id}/notifications/{notification_id}/unsubscribe | Unsubscribe with token
119+
*DefaultApi* | [**update_api_key**](docs/DefaultApi.md#update_api_key) | **PATCH** /apps/{app_id}/auth/tokens/{token_id} | Update API key
111120
*DefaultApi* | [**update_app**](docs/DefaultApi.md#update_app) | **PUT** /apps/{app_id} | Update an app
112121
*DefaultApi* | [**update_live_activity**](docs/DefaultApi.md#update_live_activity) | **POST** /apps/{app_id}/live_activities/{activity_id}/notifications | Update a Live Activity via Push
113122
*DefaultApi* | [**update_subscription**](docs/DefaultApi.md#update_subscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id} |
123+
*DefaultApi* | [**update_subscription_by_token**](docs/DefaultApi.md#update_subscription_by_token) | **PATCH** /apps/{app_id}/subscriptions_by_token/{token_type}/{token} | Update subscription by token
124+
*DefaultApi* | [**update_template**](docs/DefaultApi.md#update_template) | **PATCH** /templates/{template_id} | Update template
114125
*DefaultApi* | [**update_user**](docs/DefaultApi.md#update_user) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
126+
*DefaultApi* | [**view_api_keys**](docs/DefaultApi.md#view_api_keys) | **GET** /apps/{app_id}/auth/tokens | View API keys
127+
*DefaultApi* | [**view_template**](docs/DefaultApi.md#view_template) | **GET** /templates/{template_id} | View template
128+
*DefaultApi* | [**view_templates**](docs/DefaultApi.md#view_templates) | **GET** /templates | View templates
115129

116130

117131
## Documentation For Models
118132

133+
- [ApiKeyToken](docs/ApiKeyToken.md)
134+
- [ApiKeyTokensListResponse](docs/ApiKeyTokensListResponse.md)
119135
- [App](docs/App.md)
120136
- [Apps](docs/Apps.md)
121137
- [BasicNotification](docs/BasicNotification.md)
122138
- [BasicNotificationAllOf](docs/BasicNotificationAllOf.md)
123139
- [BasicNotificationAllOfAndroidBackgroundLayout](docs/BasicNotificationAllOfAndroidBackgroundLayout.md)
124140
- [Button](docs/Button.md)
141+
- [CopyTemplateRequest](docs/CopyTemplateRequest.md)
142+
- [CreateApiKeyRequest](docs/CreateApiKeyRequest.md)
143+
- [CreateApiKeyResponse](docs/CreateApiKeyResponse.md)
125144
- [CreateNotificationSuccessResponse](docs/CreateNotificationSuccessResponse.md)
126145
- [CreateSegmentConflictResponse](docs/CreateSegmentConflictResponse.md)
127146
- [CreateSegmentSuccessResponse](docs/CreateSegmentSuccessResponse.md)
147+
- [CreateTemplateRequest](docs/CreateTemplateRequest.md)
128148
- [CreateUserConflictResponse](docs/CreateUserConflictResponse.md)
129149
- [CreateUserConflictResponseErrorsInner](docs/CreateUserConflictResponseErrorsInner.md)
130150
- [CreateUserConflictResponseErrorsItemsMeta](docs/CreateUserConflictResponseErrorsItemsMeta.md)
151+
- [CustomEvent](docs/CustomEvent.md)
152+
- [CustomEventsRequest](docs/CustomEventsRequest.md)
131153
- [DeliveryData](docs/DeliveryData.md)
132154
- [ExportEventsSuccessResponse](docs/ExportEventsSuccessResponse.md)
133155
- [ExportSubscriptionsRequestBody](docs/ExportSubscriptionsRequestBody.md)
@@ -139,6 +161,7 @@ Class | Method | HTTP request | Description
139161
- [GetNotificationHistoryRequestBody](docs/GetNotificationHistoryRequestBody.md)
140162
- [GetSegmentsSuccessResponse](docs/GetSegmentsSuccessResponse.md)
141163
- [IdentityObject](docs/IdentityObject.md)
164+
- [IncludeAliases](docs/IncludeAliases.md)
142165
- [LanguageStringMap](docs/LanguageStringMap.md)
143166
- [Notification](docs/Notification.md)
144167
- [NotificationAllOf](docs/NotificationAllOf.md)
@@ -161,12 +184,18 @@ Class | Method | HTTP request | Description
161184
- [Segment](docs/Segment.md)
162185
- [SegmentData](docs/SegmentData.md)
163186
- [SegmentNotificationTarget](docs/SegmentNotificationTarget.md)
187+
- [StartLiveActivityRequest](docs/StartLiveActivityRequest.md)
188+
- [StartLiveActivitySuccessResponse](docs/StartLiveActivitySuccessResponse.md)
164189
- [Subscription](docs/Subscription.md)
165190
- [SubscriptionBody](docs/SubscriptionBody.md)
166191
- [SubscriptionNotificationTarget](docs/SubscriptionNotificationTarget.md)
192+
- [TemplateResource](docs/TemplateResource.md)
193+
- [TemplatesListResponse](docs/TemplatesListResponse.md)
167194
- [TransferSubscriptionRequestBody](docs/TransferSubscriptionRequestBody.md)
195+
- [UpdateApiKeyRequest](docs/UpdateApiKeyRequest.md)
168196
- [UpdateLiveActivityRequest](docs/UpdateLiveActivityRequest.md)
169197
- [UpdateLiveActivitySuccessResponse](docs/UpdateLiveActivitySuccessResponse.md)
198+
- [UpdateTemplateRequest](docs/UpdateTemplateRequest.md)
170199
- [UpdateUserRequest](docs/UpdateUserRequest.md)
171200
- [User](docs/User.md)
172201
- [UserIdentityBody](docs/UserIdentityBody.md)

docs/ApiKeyToken.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# ApiKeyToken
2+
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**token_id** | **str** | | [optional]
8+
**updated_at** | **str** | | [optional]
9+
**created_at** | **str** | | [optional]
10+
**name** | **str** | | [optional]
11+
**ip_allowlist_mode** | **str** | | [optional]
12+
**ip_allowlist** | **[str]** | | [optional]
13+
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
14+
15+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
16+
17+

docs/ApiKeyTokensListResponse.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# ApiKeyTokensListResponse
2+
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**tokens** | [**[ApiKeyToken]**](ApiKeyToken.md) | | [optional]
8+
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11+
12+

docs/BasicNotification.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Name | Type | Description | Notes
1616
**include_chrome_reg_ids** | **[str]** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional]
1717
**include_chrome_web_reg_ids** | **[str]** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional]
1818
**include_android_reg_ids** | **[str]** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional]
19-
**include_aliases** | **{str: ([str],)}, none_type** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call Note: If targeting push, email, or sms subscribers with same ids, use with target_channel to indicate you are sending a push or email or sms. | [optional]
19+
**include_aliases** | [**IncludeAliases**](IncludeAliases.md) | | [optional]
2020
**target_channel** | **str** | | [optional]
2121
**id** | **str** | | [optional]
2222
**value** | **int** | | [optional] [readonly]

docs/CopyTemplateRequest.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# CopyTemplateRequest
2+
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**target_app_id** | **str** | Destination OneSignal App ID in UUID v4 format. |
8+
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11+
12+

docs/CreateApiKeyRequest.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# CreateApiKeyRequest
2+
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**name** | **str** | | [optional]
8+
**ip_allowlist_mode** | **str** | | [optional]
9+
**ip_allowlist** | **[str]** | | [optional]
10+
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
11+
12+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13+
14+

docs/CreateApiKeyResponse.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# CreateApiKeyResponse
2+
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**token_id** | **str** | | [optional]
8+
**formatted_token** | **str** | | [optional]
9+
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
10+
11+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12+
13+

docs/CreateTemplateRequest.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# CreateTemplateRequest
2+
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**app_id** | **str** | Your OneSignal App ID in UUID v4 format. |
8+
**name** | **str** | Name of the template. |
9+
**contents** | [**LanguageStringMap**](LanguageStringMap.md) | |
10+
**is_email** | **bool** | Set true for an Email template. | [optional]
11+
**email_subject** | **str, none_type** | Subject of the email. | [optional]
12+
**email_body** | **str, none_type** | Body of the email (HTML supported). | [optional]
13+
**is_sms** | **bool** | Set true for an SMS template. | [optional]
14+
**dynamic_content** | **str, none_type** | JSON string for dynamic content personalization. | [optional]
15+
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
16+
17+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
18+
19+

docs/CustomEvent.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# CustomEvent
2+
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**name** | **str** | The identifier or name of the event. Maximum 128 characters. |
8+
**external_id** | **str, none_type** | The external ID of the user targeted for the event. Either the user's External ID or OneSignal ID is required. | [optional]
9+
**onesignal_id** | **str, none_type** | The OneSignal ID of the user targeted for the event. Either the user's External ID or OneSignal ID is required. | [optional]
10+
**timestamp** | **datetime** | Time the event occurred as an ISO8601 formatted string. Defaults to now if not included or past date provided. | [optional]
11+
**payload** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | Properties or data related to the event, like {\"geography\": \"USA\"} | [optional]
12+
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
13+
14+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
15+
16+

docs/CustomEventsRequest.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# CustomEventsRequest
2+
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**events** | [**[CustomEvent]**](CustomEvent.md) | |
8+
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11+
12+

0 commit comments

Comments
 (0)