Skip to content

Commit

Permalink
feat: add v2.0.3 package updates
Browse files Browse the repository at this point in the history
  • Loading branch information
OneSignal committed Jan 15, 2025
1 parent 94c6a5f commit 3cd12ad
Show file tree
Hide file tree
Showing 85 changed files with 478 additions and 456 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ A powerful way to send personalized messages at scale and build effective custom
## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.

- API version: 1.2.2
- API version: 1.3.0
- Package version: 2.0.3
- Build package: org.openapitools.codegen.languages.GoClientCodegen
For more information, please visit [https://onesignal.com](https://onesignal.com)
Expand Down Expand Up @@ -77,7 +77,7 @@ ctx = context.WithValue(context.Background(), onesignal.ContextOperationServerVa

## Documentation for API Endpoints

All URIs are relative to *https://onesignal.com/api/v1*
All URIs are relative to *https://api.onesignal.com*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
Expand Down
34 changes: 25 additions & 9 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ info:
customer engagement strategies. Learn more at onesignal.com
termsOfService: https://onesignal.com/tos
title: OneSignal
version: 1.2.2
version: 1.3.0
servers:
- url: https://onesignal.com/api/v1
- url: https://api.onesignal.com
paths:
/notifications:
get:
Expand Down Expand Up @@ -944,6 +944,8 @@ paths:
schema:
$ref: '#/components/schemas/RateLimiterError'
description: Rate Limit Exceeded
security:
- app_key: []
get:
description: "Returns the User’s properties, Aliases, and Subscriptions."
operationId: fetch_user
Expand Down Expand Up @@ -3703,15 +3705,29 @@ components:
type: string
writeOnly: true
external_id:
deprecated: true
description: "[DEPRECATED] Correlation and idempotency key.\nA request received\
\ with this parameter will first look for another notification with the\
\ same external_id. If one exists, a notification will not be sent, and\
\ result of the previous operation will instead be returned. Therefore,\
\ if you plan on using this feature, it's important to use a good source\
\ of randomness to generate the UUID passed here.\nThis key is only idempotent\
\ for 30 days. After 30 days, the notification could be removed from our\
\ system and a notification with the same external_id will be sent again.\n\
\ See Idempotent Notification Requests for more details\nwriteOnly: true\n"
nullable: true
type: string
idempotency_key:
description: "Correlation and idempotency key.\nA request received with\
\ this parameter will first look for another notification with the same\
\ external_id. If one exists, a notification will not be sent, and result\
\ of the previous operation will instead be returned. Therefore, if you\
\ plan on using this feature, it's important to use a good source of randomness\
\ to generate the UUID passed here.\nThis key is only idempotent for 30\
\ days. After 30 days, the notification could be removed from our system\
\ and a notification with the same external_id will be sent again.\n \
\ See Idempotent Notification Requests for more details\nwriteOnly: true\n"
\ idempotency key. If one exists, a notification will not be sent, and\
\ result of the previous operation will instead be returned. Therefore,\
\ if you plan on using this feature, it's important to use a good source\
\ of randomness to generate the UUID passed here.\nThis key is only idempotent\
\ for 30 days. After 30 days, the notification could be removed from our\
\ system and a notification with the same idempotency key will be sent\
\ again.\n See Idempotent Notification Requests for more details\nwriteOnly:\
\ true\n"
nullable: true
type: string
contents:
Expand Down
2 changes: 1 addition & 1 deletion api_default.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions configuration.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 37 additions & 1 deletion docs/BasicNotification.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ Name | Type | Description | Notes
**IsChrome** | Pointer to **NullableBool** | This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. | [optional]
**ChannelForExternalUserIds** | Pointer to **string** | Indicates if the message type when targeting with include_external_user_ids for cases where an email, sms, and/or push subscribers have the same external user id. Example: Use the string \"push\" to indicate you are sending a push notification or the string \"email\"for sending emails or \"sms\"for sending SMS. | [optional]
**AppId** | **string** | Required: Your OneSignal Application ID, which can be found in Keys & IDs. It is a UUID and looks similar to 8250eaf6-1a58-489e-b136-7c74a864b434. |
**ExternalId** | Pointer to **NullableString** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional]
**ExternalId** | Pointer to **NullableString** | [DEPRECATED] Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional]
**IdempotencyKey** | Pointer to **NullableString** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same idempotency key. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same idempotency key will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional]
**Contents** | Pointer to [**NullableStringMap**](StringMap.md) | | [optional]
**Headings** | Pointer to [**NullableStringMap**](StringMap.md) | | [optional]
**Subtitle** | Pointer to [**NullableStringMap**](StringMap.md) | | [optional]
Expand Down Expand Up @@ -1050,6 +1051,41 @@ HasExternalId returns a boolean if a field has been set.
`func (o *BasicNotification) UnsetExternalId()`

UnsetExternalId ensures that no value is present for ExternalId, not even an explicit nil
### GetIdempotencyKey

`func (o *BasicNotification) GetIdempotencyKey() string`

GetIdempotencyKey returns the IdempotencyKey field if non-nil, zero value otherwise.

### GetIdempotencyKeyOk

`func (o *BasicNotification) GetIdempotencyKeyOk() (*string, bool)`

GetIdempotencyKeyOk returns a tuple with the IdempotencyKey field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetIdempotencyKey

`func (o *BasicNotification) SetIdempotencyKey(v string)`

SetIdempotencyKey sets IdempotencyKey field to given value.

### HasIdempotencyKey

`func (o *BasicNotification) HasIdempotencyKey() bool`

HasIdempotencyKey returns a boolean if a field has been set.

### SetIdempotencyKeyNil

`func (o *BasicNotification) SetIdempotencyKeyNil(b bool)`

SetIdempotencyKeyNil sets the value for IdempotencyKey to be an explicit nil

### UnsetIdempotencyKey
`func (o *BasicNotification) UnsetIdempotencyKey()`

UnsetIdempotencyKey ensures that no value is present for IdempotencyKey, not even an explicit nil
### GetContents

`func (o *BasicNotification) GetContents() StringMap`
Expand Down
38 changes: 37 additions & 1 deletion docs/BasicNotificationAllOf.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ Name | Type | Description | Notes
**IsChrome** | Pointer to **NullableBool** | This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. | [optional]
**ChannelForExternalUserIds** | Pointer to **string** | Indicates if the message type when targeting with include_external_user_ids for cases where an email, sms, and/or push subscribers have the same external user id. Example: Use the string \"push\" to indicate you are sending a push notification or the string \"email\"for sending emails or \"sms\"for sending SMS. | [optional]
**AppId** | Pointer to **string** | Required: Your OneSignal Application ID, which can be found in Keys & IDs. It is a UUID and looks similar to 8250eaf6-1a58-489e-b136-7c74a864b434. | [optional]
**ExternalId** | Pointer to **NullableString** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional]
**ExternalId** | Pointer to **NullableString** | [DEPRECATED] Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional]
**IdempotencyKey** | Pointer to **NullableString** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same idempotency key. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same idempotency key will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional]
**Contents** | Pointer to [**NullableStringMap**](StringMap.md) | | [optional]
**Headings** | Pointer to [**NullableStringMap**](StringMap.md) | | [optional]
**Subtitle** | Pointer to [**NullableStringMap**](StringMap.md) | | [optional]
Expand Down Expand Up @@ -661,6 +662,41 @@ HasExternalId returns a boolean if a field has been set.
`func (o *BasicNotificationAllOf) UnsetExternalId()`

UnsetExternalId ensures that no value is present for ExternalId, not even an explicit nil
### GetIdempotencyKey

`func (o *BasicNotificationAllOf) GetIdempotencyKey() string`

GetIdempotencyKey returns the IdempotencyKey field if non-nil, zero value otherwise.

### GetIdempotencyKeyOk

`func (o *BasicNotificationAllOf) GetIdempotencyKeyOk() (*string, bool)`

GetIdempotencyKeyOk returns a tuple with the IdempotencyKey field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetIdempotencyKey

`func (o *BasicNotificationAllOf) SetIdempotencyKey(v string)`

SetIdempotencyKey sets IdempotencyKey field to given value.

### HasIdempotencyKey

`func (o *BasicNotificationAllOf) HasIdempotencyKey() bool`

HasIdempotencyKey returns a boolean if a field has been set.

### SetIdempotencyKeyNil

`func (o *BasicNotificationAllOf) SetIdempotencyKeyNil(b bool)`

SetIdempotencyKeyNil sets the value for IdempotencyKey to be an explicit nil

### UnsetIdempotencyKey
`func (o *BasicNotificationAllOf) UnsetIdempotencyKey()`

UnsetIdempotencyKey ensures that no value is present for IdempotencyKey, not even an explicit nil
### GetContents

`func (o *BasicNotificationAllOf) GetContents() StringMap`
Expand Down
7 changes: 4 additions & 3 deletions docs/DefaultApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# \DefaultApi

All URIs are relative to *https://onesignal.com/api/v1*
All URIs are relative to *https://api.onesignal.com*

Method | HTTP request | Description
------------- | ------------- | -------------
Expand Down Expand Up @@ -974,7 +974,7 @@ Name | Type | Description | Notes

### Authorization

No authorization required
[app_key](../README.md#app_key)

### Example

Expand All @@ -997,8 +997,9 @@ func main() {
configuration := onesignal.NewConfiguration()
apiClient := onesignal.NewAPIClient(configuration)

appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "APP_KEY_STRING")

resp, r, err := apiClient.DefaultApi.DeleteUser(, appId, aliasLabel, aliasId).Execute()
resp, r, err := apiClient.DefaultApi.DeleteUser(appAuth, appId, aliasLabel, aliasId).Execute()

if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteUser``: %v\n", err)
Expand Down
Loading

0 comments on commit 3cd12ad

Please sign in to comment.