diff --git a/api/openapi.yaml b/api/openapi.yaml index 7bb44f7..1879df9 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -64,7 +64,27 @@ paths: example: 0 type: integer style: form + - description: "Time-offset pagination cursor for sequential pulls of all messages.\ + \ Accepts either an ISO 8601 formatted timestamp (e.g. `2025-01-01T00:00:00.000Z`)\ + \ or the opaque Base64 cursor token returned as `next_time_offset` in a\ + \ prior response. When set, results are sorted ascending by send_after\ + \ and the standard `offset` parameter cannot be used. Repeat the request\ + \ with each `next_time_offset` until an empty notifications array is returned." + explode: true + in: query + name: time_offset + required: false + schema: + example: 2025-01-01T00:00:00.000Z + type: string + style: form responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -106,6 +126,12 @@ paths: $ref: '#/components/schemas/Notification' required: true responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -163,6 +189,12 @@ paths: type: string style: simple responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -213,6 +245,12 @@ paths: type: string style: simple responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -295,6 +333,12 @@ paths: type: object required: true responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -329,6 +373,12 @@ paths: description: View the details of all of your current OneSignal apps operationId: get_apps responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -361,6 +411,12 @@ paths: $ref: '#/components/schemas/App' required: true responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -399,6 +455,12 @@ paths: type: string style: simple responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -442,6 +504,12 @@ paths: $ref: '#/components/schemas/App' required: true responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -500,6 +568,12 @@ paths: type: integer style: form responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "201": content: application/json: @@ -549,6 +623,12 @@ paths: $ref: '#/components/schemas/Segment' required: false responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "201": content: application/json: @@ -607,6 +687,12 @@ paths: type: string style: simple responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -713,6 +799,12 @@ paths: type: string style: form responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -767,6 +859,12 @@ paths: $ref: '#/components/schemas/StartLiveActivityRequest' required: true responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "201": content: application/json: @@ -820,6 +918,12 @@ paths: $ref: '#/components/schemas/UpdateLiveActivityRequest' required: true responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -865,6 +969,12 @@ paths: $ref: '#/components/schemas/User' required: true responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -937,6 +1047,12 @@ paths: type: string style: simple responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": description: OK "400": @@ -989,6 +1105,12 @@ paths: type: string style: simple responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -1051,6 +1173,12 @@ paths: $ref: '#/components/schemas/UpdateUserRequest' required: true responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "202": content: application/json: @@ -1109,6 +1237,12 @@ paths: type: string style: simple responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -1172,6 +1306,12 @@ paths: $ref: '#/components/schemas/UserIdentityBody' required: true responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -1244,6 +1384,12 @@ paths: type: string style: simple responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -1314,6 +1460,12 @@ paths: $ref: '#/components/schemas/SubscriptionBody' required: true responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "201": content: application/json: @@ -1377,6 +1529,12 @@ paths: type: string style: simple responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "202": description: ACCEPTED "400": @@ -1433,6 +1591,12 @@ paths: $ref: '#/components/schemas/SubscriptionBody' required: true responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": description: OK "400": @@ -1485,6 +1649,12 @@ paths: type: string style: simple responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -1533,6 +1703,12 @@ paths: $ref: '#/components/schemas/UserIdentityBody' required: true responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -1596,6 +1772,12 @@ paths: $ref: '#/components/schemas/TransferSubscriptionRequestBody' required: true responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -1672,6 +1854,12 @@ paths: $ref: '#/components/schemas/SubscriptionBody' required: true responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "202": content: application/json: @@ -1731,6 +1919,12 @@ paths: type: string style: form responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "202": content: application/json: @@ -1831,6 +2025,12 @@ paths: title: export_subscriptions_request_body type: object responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -1880,6 +2080,12 @@ paths: type: string style: form responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -1956,6 +2162,12 @@ paths: type: string style: form responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -1988,6 +2200,12 @@ paths: $ref: '#/components/schemas/CreateTemplateRequest' required: true responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -2033,6 +2251,12 @@ paths: type: string style: form responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -2076,6 +2300,12 @@ paths: type: string style: form responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -2125,6 +2355,12 @@ paths: $ref: '#/components/schemas/UpdateTemplateRequest' required: true responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -2170,6 +2406,12 @@ paths: $ref: '#/components/schemas/CopyTemplateRequest' required: true responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -2202,6 +2444,12 @@ paths: type: string style: simple responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -2240,6 +2488,12 @@ paths: $ref: '#/components/schemas/CreateApiKeyRequest' required: true responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -2281,6 +2535,12 @@ paths: type: string style: simple responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -2325,6 +2585,12 @@ paths: $ref: '#/components/schemas/UpdateApiKeyRequest' required: true responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -2367,6 +2633,12 @@ paths: type: string style: simple responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -2406,6 +2678,12 @@ paths: $ref: '#/components/schemas/CustomEventsRequest' required: true responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Unexpected error "200": content: application/json: @@ -3000,8 +3278,10 @@ components: NotificationSlice: example: offset: 6 + time_offset: time_offset total_count: 0 limit: 1 + next_time_offset: next_time_offset notifications: - null - null @@ -3012,6 +3292,14 @@ components: type: integer limit: type: integer + time_offset: + description: "The time_offset cursor specified in the request, if any." + type: string + next_time_offset: + description: An opaque Base64 cursor token representing the next page of + messages to fetch. Present when time_offset was provided in the request. Pass + this value as time_offset on the next request to continue paginating. + type: string notifications: items: $ref: '#/components/schemas/NotificationWithMeta' @@ -3685,9 +3973,12 @@ components: errors: "" properties: id: - description: Notification identifier when the request created a notification. - An empty string means no notification was created; read `errors` for details - (HTTP may still be 200). + description: "Notification identifier when the request created a notification.\ + \ An empty string means no notification was created; read `errors` for\ + \ details (HTTP may still be 200). All OneSignal server SDKs expose message-sent\ + \ / message-not-sent narrowing helpers (named idiomatically per language\ + \ — e.g. `isMessageSent`, `is_message_sent`, `message_sent?`); prefer\ + \ them over comparing `id` directly." type: string external_id: description: Optional correlation / idempotency-related value from the API diff --git a/docs/CreateNotificationSuccessResponse.md b/docs/CreateNotificationSuccessResponse.md index ff1e64e..1e59d72 100644 --- a/docs/CreateNotificationSuccessResponse.md +++ b/docs/CreateNotificationSuccessResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | Notification identifier when the request created a notification. An empty string means no notification was created; read `errors` for details (HTTP may still be 200). | [optional] | +|**id** | **String** | Notification identifier when the request created a notification. An empty string means no notification was created; read `errors` for details (HTTP may still be 200). All OneSignal server SDKs expose message-sent / message-not-sent narrowing helpers (named idiomatically per language — e.g. `isMessageSent`, `is_message_sent`, `message_sent?`); prefer them over comparing `id` directly. | [optional] | |**externalId** | **String** | Optional correlation / idempotency-related value from the API response. This is not the end-user External ID used for targeting recipients (that lives under `include_aliases.external_id`). | [optional] | |**errors** | **Object** | Polymorphic field: may be an array of human-readable strings and/or an object (for example with `invalid_aliases`, `invalid_external_user_ids`, or `invalid_player_ids`) depending on the API response; HTTP may still be 200 with partial success. Typed SDKs model this loosely so both shapes deserialize. | [optional] | diff --git a/docs/DefaultApi.md b/docs/DefaultApi.md index 3b1e532..dbd6d6a 100644 --- a/docs/DefaultApi.md +++ b/docs/DefaultApi.md @@ -160,6 +160,7 @@ public class Example { | **400** | Bad Request | - | | **404** | Not Found | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **copyTemplateToApp** @@ -235,6 +236,7 @@ public class Example { |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | +| **0** | Unexpected error | - | # **createAlias** @@ -315,6 +317,7 @@ public class Example { | **404** | Not Found | - | | **409** | Conflict | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **createAliasBySubscription** @@ -393,6 +396,7 @@ public class Example { | **404** | Not Found | - | | **409** | Conflict | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **createApiKey** @@ -466,6 +470,7 @@ public class Example { |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | +| **0** | Unexpected error | - | # **createApp** @@ -538,6 +543,7 @@ public class Example { | **200** | OK | - | | **400** | Bad Request | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **createCustomEvents** @@ -613,6 +619,7 @@ public class Example { | **400** | Bad Request | - | | **401** | Unauthorized | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **createNotification** @@ -770,6 +777,7 @@ public class Example { | **200** | OK, invalid_aliases, or No Subscribed Players If a message was successfully created, you will get a 200 response with a non-empty `id` for the notification. If the 200 response contains `invalid_aliases`, that marks devices that exist in the provided app_id but are no longer subscribed. If `id` is an empty string, no notification was created: check the `errors` array (for example messages such as \"All included players are not subscribed\") even though HTTP status is still 200. This can happen when alias keys are wrong, External IDs do not resolve to subscribed users, or other validation issues. If no id is returned, then a message was not created and the targeted User IDs do not exist under the provided app_id. Any User IDs sent in the request that do not exist under the specified app_id will be ignored. | - | | **400** | Bad Request | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **createSegment** @@ -845,6 +853,7 @@ public class Example { | **400** | Bad Request | - | | **409** | Conflict | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **createSubscription** @@ -926,6 +935,7 @@ public class Example { | **404** | Not Found | - | | **409** | Operation is not permitted due to user having the maximum number of subscriptions assigned | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **createTemplate** @@ -998,6 +1008,7 @@ public class Example { | **200** | OK | - | | **400** | Bad Request | - | | **422** | Unprocessable Entity | - | +| **0** | Unexpected error | - | # **createUser** @@ -1089,6 +1100,7 @@ if (e.getCode() == 409) { | **400** | Bad Request | - | | **409** | Multiple User Identity Conflict | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **deleteAlias** @@ -1169,6 +1181,7 @@ public class Example { | **404** | Not Found | - | | **409** | Conflict | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **deleteApiKey** @@ -1242,6 +1255,7 @@ public class Example { |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | +| **0** | Unexpected error | - | # **deleteSegment** @@ -1317,6 +1331,7 @@ public class Example { | **400** | Bad Request | - | | **404** | Not Found | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **deleteSubscription** @@ -1392,6 +1407,7 @@ null (empty response body) | **404** | Not Found | - | | **409** | Conflict | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **deleteTemplate** @@ -1466,6 +1482,7 @@ public class Example { | **200** | OK | - | | **400** | Bad Request | - | | **404** | Not Found | - | +| **0** | Unexpected error | - | # **deleteUser** @@ -1542,6 +1559,7 @@ null (empty response body) | **400** | Bad Request | - | | **409** | Conflict | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **exportEvents** @@ -1617,6 +1635,7 @@ public class Example { | **400** | Bad Request | - | | **404** | Not Found | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **exportSubscriptions** @@ -1691,6 +1710,7 @@ public class Example { | **200** | OK | - | | **400** | Bad Request | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **getAliases** @@ -1768,6 +1788,7 @@ public class Example { | **400** | Bad Request | - | | **404** | Not Found | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **getAliasesBySubscription** @@ -1842,6 +1863,7 @@ public class Example { | **200** | OK | - | | **400** | Bad Request | - | | **404** | Not Found | - | +| **0** | Unexpected error | - | # **getApp** @@ -1914,6 +1936,7 @@ public class Example { | **200** | OK | - | | **400** | Bad Request | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **getApps** @@ -1982,6 +2005,7 @@ This endpoint does not need any parameter. | **200** | OK | - | | **400** | Bad Request | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **getNotification** @@ -2057,6 +2081,7 @@ public class Example { | **400** | Bad Request | - | | **404** | Not Found | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **getNotificationHistory** @@ -2132,10 +2157,11 @@ public class Example { | **400** | Bad Request | - | | **404** | Not Found | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **getNotifications** -> NotificationSlice getNotifications(appId, limit, offset, kind) +> NotificationSlice getNotifications(appId, limit, offset, kind, timeOffset) View notifications @@ -2165,8 +2191,9 @@ public class Example { Integer limit = 10; // Integer | How many notifications to return. Max is 50. Default is 50. Integer offset = 0; // Integer | Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. Integer kind = 0; // Integer | Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only + String timeOffset = "2025-01-01T00:00:00.000Z"; // String | Time-offset pagination cursor for sequential pulls of all messages. Accepts either an ISO 8601 formatted timestamp (e.g. `2025-01-01T00:00:00.000Z`) or the opaque Base64 cursor token returned as `next_time_offset` in a prior response. When set, results are sorted ascending by send_after and the standard `offset` parameter cannot be used. Repeat the request with each `next_time_offset` until an empty notifications array is returned. try { - NotificationSlice result = apiInstance.getNotifications(appId, limit, offset, kind); + NotificationSlice result = apiInstance.getNotifications(appId, limit, offset, kind, timeOffset); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling DefaultApi#getNotifications"); @@ -2190,6 +2217,7 @@ public class Example { | **limit** | **Integer**| How many notifications to return. Max is 50. Default is 50. | [optional] | | **offset** | **Integer**| Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. | [optional] | | **kind** | **Integer**| Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only | [optional] [enum: 0, 1, 3] | +| **timeOffset** | **String**| Time-offset pagination cursor for sequential pulls of all messages. Accepts either an ISO 8601 formatted timestamp (e.g. `2025-01-01T00:00:00.000Z`) or the opaque Base64 cursor token returned as `next_time_offset` in a prior response. When set, results are sorted ascending by send_after and the standard `offset` parameter cannot be used. Repeat the request with each `next_time_offset` until an empty notifications array is returned. | [optional] | ### Return type @@ -2210,6 +2238,7 @@ public class Example { | **200** | OK | - | | **400** | Bad Request | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **getOutcomes** @@ -2292,6 +2321,7 @@ public class Example { | **200** | OK | - | | **400** | Bad Request | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **getSegments** @@ -2368,6 +2398,7 @@ public class Example { | **201** | OK | - | | **400** | Bad Request | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **getUser** @@ -2445,6 +2476,7 @@ public class Example { | **400** | Bad Request | - | | **404** | Not Found | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **rotateApiKey** @@ -2518,6 +2550,7 @@ public class Example { |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | +| **0** | Unexpected error | - | # **startLiveActivity** @@ -2594,6 +2627,7 @@ public class Example { | **201** | Created | - | | **400** | Bad Request | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **transferSubscription** @@ -2672,6 +2706,7 @@ public class Example { | **404** | Not Found | - | | **409** | Conflict | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **unsubscribeEmailWithToken** @@ -2748,6 +2783,7 @@ public class Example { | **202** | OK | - | | **400** | Bad Request | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **updateApiKey** @@ -2823,6 +2859,7 @@ public class Example { |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | +| **0** | Unexpected error | - | # **updateApp** @@ -2897,6 +2934,7 @@ public class Example { | **200** | OK | - | | **400** | Bad Request | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **updateLiveActivity** @@ -2973,6 +3011,7 @@ public class Example { | **200** | OK | - | | **400** | Bad Request | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **updateSubscription** @@ -3050,6 +3089,7 @@ null (empty response body) | **404** | Not Found | - | | **409** | Conflict | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **updateSubscriptionByToken** @@ -3128,6 +3168,7 @@ public class Example { | **202** | ACCEPTED | - | | **400** | Bad Request | - | | **404** | Not Found | - | +| **0** | Unexpected error | - | # **updateTemplate** @@ -3203,6 +3244,7 @@ public class Example { |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | +| **0** | Unexpected error | - | # **updateUser** @@ -3282,6 +3324,7 @@ public class Example { | **400** | Bad Request | - | | **409** | Conflict | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | # **viewApiKeys** @@ -3353,6 +3396,7 @@ public class Example { |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | +| **0** | Unexpected error | - | # **viewTemplate** @@ -3427,6 +3471,7 @@ public class Example { | **200** | OK | - | | **400** | Bad Request | - | | **404** | Not Found | - | +| **0** | Unexpected error | - | # **viewTemplates** @@ -3505,4 +3550,5 @@ public class Example { | **200** | OK | - | | **400** | Bad Request | - | | **429** | Rate Limit Exceeded | - | +| **0** | Unexpected error | - | diff --git a/docs/NotificationSlice.md b/docs/NotificationSlice.md index 5392a03..8ce0674 100644 --- a/docs/NotificationSlice.md +++ b/docs/NotificationSlice.md @@ -10,6 +10,8 @@ |**totalCount** | **Integer** | | [optional] | |**offset** | **Integer** | | [optional] | |**limit** | **Integer** | | [optional] | +|**timeOffset** | **String** | The time_offset cursor specified in the request, if any. | [optional] | +|**nextTimeOffset** | **String** | An opaque Base64 cursor token representing the next page of messages to fetch. Present when time_offset was provided in the request. Pass this value as time_offset on the next request to continue paginating. | [optional] | |**notifications** | [**List<NotificationWithMeta>**](NotificationWithMeta.md) | | [optional] | diff --git a/src/main/java/com/onesignal/client/NotificationHelpers.java b/src/main/java/com/onesignal/client/NotificationHelpers.java index a7b9e8a..1087228 100644 --- a/src/main/java/com/onesignal/client/NotificationHelpers.java +++ b/src/main/java/com/onesignal/client/NotificationHelpers.java @@ -103,6 +103,34 @@ public static CreateNotificationWithRetryResult createNotificationWithRetry(Defa } } + /** + * Whether a POST /notifications 200 response is the "message sent" branch. + * + *

POST /notifications returns 200 in two cases that share the + * {@link CreateNotificationSuccessResponse} shape: a notification was + * created (non-empty {@code id}), or none was (empty {@code id}, with + * {@code errors} carrying the reason). Prefer this guard over inspecting + * {@code id} directly. + * + * @param response a create-notification success response + * @return {@code true} when a notification was created + */ + public static boolean isMessageSent(CreateNotificationSuccessResponse response) { + return response != null && response.getId() != null && !response.getId().isEmpty(); + } + + /** + * Whether a POST /notifications 200 response is the "message not sent" + * branch -- no notification was created ({@code id} absent or empty); + * inspect {@code errors} for why. + * + * @param response a create-notification success response + * @return {@code true} when no notification was created + */ + public static boolean isMessageNotSent(CreateNotificationSuccessResponse response) { + return !isMessageSent(response); + } + private static String headerValue(Map> headers, String name) { if (headers == null) { return null; diff --git a/src/main/java/com/onesignal/client/api/DefaultApi.java b/src/main/java/com/onesignal/client/api/DefaultApi.java index d7454b8..66694e1 100644 --- a/src/main/java/com/onesignal/client/api/DefaultApi.java +++ b/src/main/java/com/onesignal/client/api/DefaultApi.java @@ -125,6 +125,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 400 Bad Request - 404 Not Found - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call cancelNotificationCall(String appId, String notificationId, final ApiCallback _callback) throws ApiException { @@ -213,6 +214,7 @@ private okhttp3.Call cancelNotificationValidateBeforeCall(String appId, String n 400 Bad Request - 404 Not Found - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public GenericSuccessBoolResponse cancelNotification(String appId, String notificationId) throws ApiException { @@ -234,6 +236,7 @@ public GenericSuccessBoolResponse cancelNotification(String appId, String notifi 400 Bad Request - 404 Not Found - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse cancelNotificationWithHttpInfo(String appId, String notificationId) throws ApiException { @@ -257,6 +260,7 @@ public ApiResponse cancelNotificationWithHttpInfo(St 400 Bad Request - 404 Not Found - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call cancelNotificationAsync(String appId, String notificationId, final ApiCallback _callback) throws ApiException { @@ -279,6 +283,7 @@ public okhttp3.Call cancelNotificationAsync(String appId, String notificationId, Status Code Description Response Headers 200 OK - 400 Bad Request - + 0 Unexpected error - */ public okhttp3.Call copyTemplateToAppCall(String templateId, String appId, CopyTemplateRequest copyTemplateRequest, final ApiCallback _callback) throws ApiException { @@ -371,6 +376,7 @@ private okhttp3.Call copyTemplateToAppValidateBeforeCall(String templateId, Stri Status Code Description Response Headers 200 OK - 400 Bad Request - + 0 Unexpected error - */ public TemplateResource copyTemplateToApp(String templateId, String appId, CopyTemplateRequest copyTemplateRequest) throws ApiException { @@ -391,6 +397,7 @@ public TemplateResource copyTemplateToApp(String templateId, String appId, CopyT Status Code Description Response Headers 200 OK - 400 Bad Request - + 0 Unexpected error - */ public ApiResponse copyTemplateToAppWithHttpInfo(String templateId, String appId, CopyTemplateRequest copyTemplateRequest) throws ApiException { @@ -413,6 +420,7 @@ public ApiResponse copyTemplateToAppWithHttpInfo(String templa Status Code Description Response Headers 200 OK - 400 Bad Request - + 0 Unexpected error - */ public okhttp3.Call copyTemplateToAppAsync(String templateId, String appId, CopyTemplateRequest copyTemplateRequest, final ApiCallback _callback) throws ApiException { @@ -439,6 +447,7 @@ public okhttp3.Call copyTemplateToAppAsync(String templateId, String appId, Copy 404 Not Found - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call createAliasCall(String appId, String aliasLabel, String aliasId, UserIdentityBody userIdentityBody, final ApiCallback _callback) throws ApiException { @@ -538,6 +547,7 @@ private okhttp3.Call createAliasValidateBeforeCall(String appId, String aliasLab 404 Not Found - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public UserIdentityBody createAlias(String appId, String aliasLabel, String aliasId, UserIdentityBody userIdentityBody) throws ApiException { @@ -562,6 +572,7 @@ public UserIdentityBody createAlias(String appId, String aliasLabel, String alia 404 Not Found - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse createAliasWithHttpInfo(String appId, String aliasLabel, String aliasId, UserIdentityBody userIdentityBody) throws ApiException { @@ -588,6 +599,7 @@ public ApiResponse createAliasWithHttpInfo(String appId, Strin 404 Not Found - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call createAliasAsync(String appId, String aliasLabel, String aliasId, UserIdentityBody userIdentityBody, final ApiCallback _callback) throws ApiException { @@ -613,6 +625,7 @@ public okhttp3.Call createAliasAsync(String appId, String aliasLabel, String ali 404 Not Found - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call createAliasBySubscriptionCall(String appId, String subscriptionId, UserIdentityBody userIdentityBody, final ApiCallback _callback) throws ApiException { @@ -705,6 +718,7 @@ private okhttp3.Call createAliasBySubscriptionValidateBeforeCall(String appId, S 404 Not Found - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public UserIdentityBody createAliasBySubscription(String appId, String subscriptionId, UserIdentityBody userIdentityBody) throws ApiException { @@ -728,6 +742,7 @@ public UserIdentityBody createAliasBySubscription(String appId, String subscript 404 Not Found - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse createAliasBySubscriptionWithHttpInfo(String appId, String subscriptionId, UserIdentityBody userIdentityBody) throws ApiException { @@ -753,6 +768,7 @@ public ApiResponse createAliasBySubscriptionWithHttpInfo(Strin 404 Not Found - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call createAliasBySubscriptionAsync(String appId, String subscriptionId, UserIdentityBody userIdentityBody, final ApiCallback _callback) throws ApiException { @@ -774,6 +790,7 @@ public okhttp3.Call createAliasBySubscriptionAsync(String appId, String subscrip Status Code Description Response Headers 200 OK - 400 Bad Request - + 0 Unexpected error - */ public okhttp3.Call createApiKeyCall(String appId, CreateApiKeyRequest createApiKeyRequest, final ApiCallback _callback) throws ApiException { @@ -856,6 +873,7 @@ private okhttp3.Call createApiKeyValidateBeforeCall(String appId, CreateApiKeyRe Status Code Description Response Headers 200 OK - 400 Bad Request - + 0 Unexpected error - */ public CreateApiKeyResponse createApiKey(String appId, CreateApiKeyRequest createApiKeyRequest) throws ApiException { @@ -875,6 +893,7 @@ public CreateApiKeyResponse createApiKey(String appId, CreateApiKeyRequest creat Status Code Description Response Headers 200 OK - 400 Bad Request - + 0 Unexpected error - */ public ApiResponse createApiKeyWithHttpInfo(String appId, CreateApiKeyRequest createApiKeyRequest) throws ApiException { @@ -896,6 +915,7 @@ public ApiResponse createApiKeyWithHttpInfo(String appId, Status Code Description Response Headers 200 OK - 400 Bad Request - + 0 Unexpected error - */ public okhttp3.Call createApiKeyAsync(String appId, CreateApiKeyRequest createApiKeyRequest, final ApiCallback _callback) throws ApiException { @@ -917,6 +937,7 @@ public okhttp3.Call createApiKeyAsync(String appId, CreateApiKeyRequest createAp 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call createAppCall(App app, final ApiCallback _callback) throws ApiException { @@ -993,6 +1014,7 @@ private okhttp3.Call createAppValidateBeforeCall(App app, final ApiCallback _cal 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public App createApp(App app) throws ApiException { @@ -1012,6 +1034,7 @@ public App createApp(App app) throws ApiException { 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse createAppWithHttpInfo(App app) throws ApiException { @@ -1033,6 +1056,7 @@ public ApiResponse createAppWithHttpInfo(App app) throws ApiException { 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call createAppAsync(App app, final ApiCallback _callback) throws ApiException { @@ -1056,6 +1080,7 @@ public okhttp3.Call createAppAsync(App app, final ApiCallback _callback) th 400 Bad Request - 401 Unauthorized - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call createCustomEventsCall(String appId, CustomEventsRequest customEventsRequest, final ApiCallback _callback) throws ApiException { @@ -1140,6 +1165,7 @@ private okhttp3.Call createCustomEventsValidateBeforeCall(String appId, CustomEv 400 Bad Request - 401 Unauthorized - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public Object createCustomEvents(String appId, CustomEventsRequest customEventsRequest) throws ApiException { @@ -1161,6 +1187,7 @@ public Object createCustomEvents(String appId, CustomEventsRequest customEventsR 400 Bad Request - 401 Unauthorized - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse createCustomEventsWithHttpInfo(String appId, CustomEventsRequest customEventsRequest) throws ApiException { @@ -1184,6 +1211,7 @@ public ApiResponse createCustomEventsWithHttpInfo(String appId, CustomEv 400 Bad Request - 401 Unauthorized - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call createCustomEventsAsync(String appId, CustomEventsRequest customEventsRequest, final ApiCallback _callback) throws ApiException { @@ -1205,6 +1233,7 @@ public okhttp3.Call createCustomEventsAsync(String appId, CustomEventsRequest cu 200 OK, invalid_aliases, or No Subscribed Players If a message was successfully created, you will get a 200 response with a non-empty `id` for the notification. If the 200 response contains `invalid_aliases`, that marks devices that exist in the provided app_id but are no longer subscribed. If `id` is an empty string, no notification was created: check the `errors` array (for example messages such as \"All included players are not subscribed\") even though HTTP status is still 200. This can happen when alias keys are wrong, External IDs do not resolve to subscribed users, or other validation issues. If no id is returned, then a message was not created and the targeted User IDs do not exist under the provided app_id. Any User IDs sent in the request that do not exist under the specified app_id will be ignored. - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call createNotificationCall(Notification notification, final ApiCallback _callback) throws ApiException { @@ -1281,6 +1310,7 @@ private okhttp3.Call createNotificationValidateBeforeCall(Notification notificat 200 OK, invalid_aliases, or No Subscribed Players If a message was successfully created, you will get a 200 response with a non-empty `id` for the notification. If the 200 response contains `invalid_aliases`, that marks devices that exist in the provided app_id but are no longer subscribed. If `id` is an empty string, no notification was created: check the `errors` array (for example messages such as \"All included players are not subscribed\") even though HTTP status is still 200. This can happen when alias keys are wrong, External IDs do not resolve to subscribed users, or other validation issues. If no id is returned, then a message was not created and the targeted User IDs do not exist under the provided app_id. Any User IDs sent in the request that do not exist under the specified app_id will be ignored. - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public CreateNotificationSuccessResponse createNotification(Notification notification) throws ApiException { @@ -1300,6 +1330,7 @@ public CreateNotificationSuccessResponse createNotification(Notification notific 200 OK, invalid_aliases, or No Subscribed Players If a message was successfully created, you will get a 200 response with a non-empty `id` for the notification. If the 200 response contains `invalid_aliases`, that marks devices that exist in the provided app_id but are no longer subscribed. If `id` is an empty string, no notification was created: check the `errors` array (for example messages such as \"All included players are not subscribed\") even though HTTP status is still 200. This can happen when alias keys are wrong, External IDs do not resolve to subscribed users, or other validation issues. If no id is returned, then a message was not created and the targeted User IDs do not exist under the provided app_id. Any User IDs sent in the request that do not exist under the specified app_id will be ignored. - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse createNotificationWithHttpInfo(Notification notification) throws ApiException { @@ -1321,6 +1352,7 @@ public ApiResponse createNotificationWithHttp 200 OK, invalid_aliases, or No Subscribed Players If a message was successfully created, you will get a 200 response with a non-empty `id` for the notification. If the 200 response contains `invalid_aliases`, that marks devices that exist in the provided app_id but are no longer subscribed. If `id` is an empty string, no notification was created: check the `errors` array (for example messages such as \"All included players are not subscribed\") even though HTTP status is still 200. This can happen when alias keys are wrong, External IDs do not resolve to subscribed users, or other validation issues. If no id is returned, then a message was not created and the targeted User IDs do not exist under the provided app_id. Any User IDs sent in the request that do not exist under the specified app_id will be ignored. - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call createNotificationAsync(Notification notification, final ApiCallback _callback) throws ApiException { @@ -1344,6 +1376,7 @@ public okhttp3.Call createNotificationAsync(Notification notification, final Api 400 Bad Request - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call createSegmentCall(String appId, Segment segment, final ApiCallback _callback) throws ApiException { @@ -1423,6 +1456,7 @@ private okhttp3.Call createSegmentValidateBeforeCall(String appId, Segment segme 400 Bad Request - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public CreateSegmentSuccessResponse createSegment(String appId, Segment segment) throws ApiException { @@ -1444,6 +1478,7 @@ public CreateSegmentSuccessResponse createSegment(String appId, Segment segment) 400 Bad Request - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse createSegmentWithHttpInfo(String appId, Segment segment) throws ApiException { @@ -1467,6 +1502,7 @@ public ApiResponse createSegmentWithHttpInfo(Strin 400 Bad Request - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call createSegmentAsync(String appId, Segment segment, final ApiCallback _callback) throws ApiException { @@ -1494,6 +1530,7 @@ public okhttp3.Call createSegmentAsync(String appId, Segment segment, final ApiC 404 Not Found - 409 Operation is not permitted due to user having the maximum number of subscriptions assigned - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call createSubscriptionCall(String appId, String aliasLabel, String aliasId, SubscriptionBody subscriptionBody, final ApiCallback _callback) throws ApiException { @@ -1594,6 +1631,7 @@ private okhttp3.Call createSubscriptionValidateBeforeCall(String appId, String a 404 Not Found - 409 Operation is not permitted due to user having the maximum number of subscriptions assigned - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public SubscriptionBody createSubscription(String appId, String aliasLabel, String aliasId, SubscriptionBody subscriptionBody) throws ApiException { @@ -1619,6 +1657,7 @@ public SubscriptionBody createSubscription(String appId, String aliasLabel, Stri 404 Not Found - 409 Operation is not permitted due to user having the maximum number of subscriptions assigned - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse createSubscriptionWithHttpInfo(String appId, String aliasLabel, String aliasId, SubscriptionBody subscriptionBody) throws ApiException { @@ -1646,6 +1685,7 @@ public ApiResponse createSubscriptionWithHttpInfo(String appId 404 Not Found - 409 Operation is not permitted due to user having the maximum number of subscriptions assigned - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call createSubscriptionAsync(String appId, String aliasLabel, String aliasId, SubscriptionBody subscriptionBody, final ApiCallback _callback) throws ApiException { @@ -1667,6 +1707,7 @@ public okhttp3.Call createSubscriptionAsync(String appId, String aliasLabel, Str 200 OK - 400 Bad Request - 422 Unprocessable Entity - + 0 Unexpected error - */ public okhttp3.Call createTemplateCall(CreateTemplateRequest createTemplateRequest, final ApiCallback _callback) throws ApiException { @@ -1743,6 +1784,7 @@ private okhttp3.Call createTemplateValidateBeforeCall(CreateTemplateRequest crea 200 OK - 400 Bad Request - 422 Unprocessable Entity - + 0 Unexpected error - */ public TemplateResource createTemplate(CreateTemplateRequest createTemplateRequest) throws ApiException { @@ -1762,6 +1804,7 @@ public TemplateResource createTemplate(CreateTemplateRequest createTemplateReque 200 OK - 400 Bad Request - 422 Unprocessable Entity - + 0 Unexpected error - */ public ApiResponse createTemplateWithHttpInfo(CreateTemplateRequest createTemplateRequest) throws ApiException { @@ -1783,6 +1826,7 @@ public ApiResponse createTemplateWithHttpInfo(CreateTemplateRe 200 OK - 400 Bad Request - 422 Unprocessable Entity - + 0 Unexpected error - */ public okhttp3.Call createTemplateAsync(CreateTemplateRequest createTemplateRequest, final ApiCallback _callback) throws ApiException { @@ -1808,6 +1852,7 @@ public okhttp3.Call createTemplateAsync(CreateTemplateRequest createTemplateRequ 400 Bad Request - 409 Multiple User Identity Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call createUserCall(String appId, User user, final ApiCallback _callback) throws ApiException { @@ -1894,6 +1939,7 @@ private okhttp3.Call createUserValidateBeforeCall(String appId, User user, final 400 Bad Request - 409 Multiple User Identity Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public User createUser(String appId, User user) throws ApiException { @@ -1917,6 +1963,7 @@ public User createUser(String appId, User user) throws ApiException { 400 Bad Request - 409 Multiple User Identity Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse createUserWithHttpInfo(String appId, User user) throws ApiException { @@ -1942,6 +1989,7 @@ public ApiResponse createUserWithHttpInfo(String appId, User user) throws 400 Bad Request - 409 Multiple User Identity Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call createUserAsync(String appId, User user, final ApiCallback _callback) throws ApiException { @@ -1968,6 +2016,7 @@ public okhttp3.Call createUserAsync(String appId, User user, final ApiCallback 404 Not Found - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call deleteAliasCall(String appId, String aliasLabel, String aliasId, String aliasLabelToDelete, final ApiCallback _callback) throws ApiException { @@ -2068,6 +2117,7 @@ private okhttp3.Call deleteAliasValidateBeforeCall(String appId, String aliasLab 404 Not Found - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public UserIdentityBody deleteAlias(String appId, String aliasLabel, String aliasId, String aliasLabelToDelete) throws ApiException { @@ -2092,6 +2142,7 @@ public UserIdentityBody deleteAlias(String appId, String aliasLabel, String alia 404 Not Found - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse deleteAliasWithHttpInfo(String appId, String aliasLabel, String aliasId, String aliasLabelToDelete) throws ApiException { @@ -2118,6 +2169,7 @@ public ApiResponse deleteAliasWithHttpInfo(String appId, Strin 404 Not Found - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call deleteAliasAsync(String appId, String aliasLabel, String aliasId, String aliasLabelToDelete, final ApiCallback _callback) throws ApiException { @@ -2139,6 +2191,7 @@ public okhttp3.Call deleteAliasAsync(String appId, String aliasLabel, String ali Status Code Description Response Headers 200 OK - 400 Bad Request - + 0 Unexpected error - */ public okhttp3.Call deleteApiKeyCall(String appId, String tokenId, final ApiCallback _callback) throws ApiException { @@ -2222,6 +2275,7 @@ private okhttp3.Call deleteApiKeyValidateBeforeCall(String appId, String tokenId Status Code Description Response Headers 200 OK - 400 Bad Request - + 0 Unexpected error - */ public Object deleteApiKey(String appId, String tokenId) throws ApiException { @@ -2241,6 +2295,7 @@ public Object deleteApiKey(String appId, String tokenId) throws ApiException { Status Code Description Response Headers 200 OK - 400 Bad Request - + 0 Unexpected error - */ public ApiResponse deleteApiKeyWithHttpInfo(String appId, String tokenId) throws ApiException { @@ -2262,6 +2317,7 @@ public ApiResponse deleteApiKeyWithHttpInfo(String appId, String tokenId Status Code Description Response Headers 200 OK - 400 Bad Request - + 0 Unexpected error - */ public okhttp3.Call deleteApiKeyAsync(String appId, String tokenId, final ApiCallback _callback) throws ApiException { @@ -2285,6 +2341,7 @@ public okhttp3.Call deleteApiKeyAsync(String appId, String tokenId, final ApiCal 400 Bad Request - 404 Not Found - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call deleteSegmentCall(String appId, String segmentId, final ApiCallback _callback) throws ApiException { @@ -2370,6 +2427,7 @@ private okhttp3.Call deleteSegmentValidateBeforeCall(String appId, String segmen 400 Bad Request - 404 Not Found - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public GenericSuccessBoolResponse deleteSegment(String appId, String segmentId) throws ApiException { @@ -2391,6 +2449,7 @@ public GenericSuccessBoolResponse deleteSegment(String appId, String segmentId) 400 Bad Request - 404 Not Found - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse deleteSegmentWithHttpInfo(String appId, String segmentId) throws ApiException { @@ -2414,6 +2473,7 @@ public ApiResponse deleteSegmentWithHttpInfo(String 400 Bad Request - 404 Not Found - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call deleteSegmentAsync(String appId, String segmentId, final ApiCallback _callback) throws ApiException { @@ -2438,6 +2498,7 @@ public okhttp3.Call deleteSegmentAsync(String appId, String segmentId, final Api 404 Not Found - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call deleteSubscriptionCall(String appId, String subscriptionId, final ApiCallback _callback) throws ApiException { @@ -2523,6 +2584,7 @@ private okhttp3.Call deleteSubscriptionValidateBeforeCall(String appId, String s 404 Not Found - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public void deleteSubscription(String appId, String subscriptionId) throws ApiException { @@ -2544,6 +2606,7 @@ public void deleteSubscription(String appId, String subscriptionId) throws ApiEx 404 Not Found - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse deleteSubscriptionWithHttpInfo(String appId, String subscriptionId) throws ApiException { @@ -2567,6 +2630,7 @@ public ApiResponse deleteSubscriptionWithHttpInfo(String appId, String sub 404 Not Found - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call deleteSubscriptionAsync(String appId, String subscriptionId, final ApiCallback _callback) throws ApiException { @@ -2588,6 +2652,7 @@ public okhttp3.Call deleteSubscriptionAsync(String appId, String subscriptionId, 200 OK - 400 Bad Request - 404 Not Found - + 0 Unexpected error - */ public okhttp3.Call deleteTemplateCall(String templateId, String appId, final ApiCallback _callback) throws ApiException { @@ -2675,6 +2740,7 @@ private okhttp3.Call deleteTemplateValidateBeforeCall(String templateId, String 200 OK - 400 Bad Request - 404 Not Found - + 0 Unexpected error - */ public GenericSuccessBoolResponse deleteTemplate(String templateId, String appId) throws ApiException { @@ -2695,6 +2761,7 @@ public GenericSuccessBoolResponse deleteTemplate(String templateId, String appId 200 OK - 400 Bad Request - 404 Not Found - + 0 Unexpected error - */ public ApiResponse deleteTemplateWithHttpInfo(String templateId, String appId) throws ApiException { @@ -2717,6 +2784,7 @@ public ApiResponse deleteTemplateWithHttpInfo(String 200 OK - 400 Bad Request - 404 Not Found - + 0 Unexpected error - */ public okhttp3.Call deleteTemplateAsync(String templateId, String appId, final ApiCallback _callback) throws ApiException { @@ -2741,6 +2809,7 @@ public okhttp3.Call deleteTemplateAsync(String templateId, String appId, final A 400 Bad Request - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call deleteUserCall(String appId, String aliasLabel, String aliasId, final ApiCallback _callback) throws ApiException { @@ -2832,6 +2901,7 @@ private okhttp3.Call deleteUserValidateBeforeCall(String appId, String aliasLabe 400 Bad Request - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public void deleteUser(String appId, String aliasLabel, String aliasId) throws ApiException { @@ -2853,6 +2923,7 @@ public void deleteUser(String appId, String aliasLabel, String aliasId) throws A 400 Bad Request - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse deleteUserWithHttpInfo(String appId, String aliasLabel, String aliasId) throws ApiException { @@ -2876,6 +2947,7 @@ public ApiResponse deleteUserWithHttpInfo(String appId, String aliasLabel, 400 Bad Request - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call deleteUserAsync(String appId, String aliasLabel, String aliasId, final ApiCallback _callback) throws ApiException { @@ -2898,6 +2970,7 @@ public okhttp3.Call deleteUserAsync(String appId, String aliasLabel, String alia 400 Bad Request - 404 Not Found - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call exportEventsCall(String notificationId, String appId, final ApiCallback _callback) throws ApiException { @@ -2986,6 +3059,7 @@ private okhttp3.Call exportEventsValidateBeforeCall(String notificationId, Strin 400 Bad Request - 404 Not Found - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ExportEventsSuccessResponse exportEvents(String notificationId, String appId) throws ApiException { @@ -3007,6 +3081,7 @@ public ExportEventsSuccessResponse exportEvents(String notificationId, String ap 400 Bad Request - 404 Not Found - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse exportEventsWithHttpInfo(String notificationId, String appId) throws ApiException { @@ -3030,6 +3105,7 @@ public ApiResponse exportEventsWithHttpInfo(String 400 Bad Request - 404 Not Found - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call exportEventsAsync(String notificationId, String appId, final ApiCallback _callback) throws ApiException { @@ -3052,6 +3128,7 @@ public okhttp3.Call exportEventsAsync(String notificationId, String appId, final 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call exportSubscriptionsCall(String appId, ExportSubscriptionsRequestBody exportSubscriptionsRequestBody, final ApiCallback _callback) throws ApiException { @@ -3130,6 +3207,7 @@ private okhttp3.Call exportSubscriptionsValidateBeforeCall(String appId, ExportS 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ExportSubscriptionsSuccessResponse exportSubscriptions(String appId, ExportSubscriptionsRequestBody exportSubscriptionsRequestBody) throws ApiException { @@ -3150,6 +3228,7 @@ public ExportSubscriptionsSuccessResponse exportSubscriptions(String appId, Expo 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse exportSubscriptionsWithHttpInfo(String appId, ExportSubscriptionsRequestBody exportSubscriptionsRequestBody) throws ApiException { @@ -3172,6 +3251,7 @@ public ApiResponse exportSubscriptionsWithHt 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call exportSubscriptionsAsync(String appId, ExportSubscriptionsRequestBody exportSubscriptionsRequestBody, final ApiCallback _callback) throws ApiException { @@ -3196,6 +3276,7 @@ public okhttp3.Call exportSubscriptionsAsync(String appId, ExportSubscriptionsRe 400 Bad Request - 404 Not Found - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call getAliasesCall(String appId, String aliasLabel, String aliasId, final ApiCallback _callback) throws ApiException { @@ -3288,6 +3369,7 @@ private okhttp3.Call getAliasesValidateBeforeCall(String appId, String aliasLabe 400 Bad Request - 404 Not Found - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public UserIdentityBody getAliases(String appId, String aliasLabel, String aliasId) throws ApiException { @@ -3310,6 +3392,7 @@ public UserIdentityBody getAliases(String appId, String aliasLabel, String alias 400 Bad Request - 404 Not Found - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse getAliasesWithHttpInfo(String appId, String aliasLabel, String aliasId) throws ApiException { @@ -3334,6 +3417,7 @@ public ApiResponse getAliasesWithHttpInfo(String appId, String 400 Bad Request - 404 Not Found - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call getAliasesAsync(String appId, String aliasLabel, String aliasId, final ApiCallback _callback) throws ApiException { @@ -3356,6 +3440,7 @@ public okhttp3.Call getAliasesAsync(String appId, String aliasLabel, String alia 200 OK - 400 Bad Request - 404 Not Found - + 0 Unexpected error - */ public okhttp3.Call getAliasesBySubscriptionCall(String appId, String subscriptionId, final ApiCallback _callback) throws ApiException { @@ -3440,6 +3525,7 @@ private okhttp3.Call getAliasesBySubscriptionValidateBeforeCall(String appId, St 200 OK - 400 Bad Request - 404 Not Found - + 0 Unexpected error - */ public UserIdentityBody getAliasesBySubscription(String appId, String subscriptionId) throws ApiException { @@ -3460,6 +3546,7 @@ public UserIdentityBody getAliasesBySubscription(String appId, String subscripti 200 OK - 400 Bad Request - 404 Not Found - + 0 Unexpected error - */ public ApiResponse getAliasesBySubscriptionWithHttpInfo(String appId, String subscriptionId) throws ApiException { @@ -3482,6 +3569,7 @@ public ApiResponse getAliasesBySubscriptionWithHttpInfo(String 200 OK - 400 Bad Request - 404 Not Found - + 0 Unexpected error - */ public okhttp3.Call getAliasesBySubscriptionAsync(String appId, String subscriptionId, final ApiCallback _callback) throws ApiException { @@ -3503,6 +3591,7 @@ public okhttp3.Call getAliasesBySubscriptionAsync(String appId, String subscript 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call getAppCall(String appId, final ApiCallback _callback) throws ApiException { @@ -3580,6 +3669,7 @@ private okhttp3.Call getAppValidateBeforeCall(String appId, final ApiCallback _c 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public App getApp(String appId) throws ApiException { @@ -3599,6 +3689,7 @@ public App getApp(String appId) throws ApiException { 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse getAppWithHttpInfo(String appId) throws ApiException { @@ -3620,6 +3711,7 @@ public ApiResponse getAppWithHttpInfo(String appId) throws ApiException { 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call getAppAsync(String appId, final ApiCallback _callback) throws ApiException { @@ -3640,6 +3732,7 @@ public okhttp3.Call getAppAsync(String appId, final ApiCallback _callback) 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call getAppsCall(final ApiCallback _callback) throws ApiException { @@ -3710,6 +3803,7 @@ private okhttp3.Call getAppsValidateBeforeCall(final ApiCallback _callback) thro 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public List getApps() throws ApiException { @@ -3728,6 +3822,7 @@ public List getApps() throws ApiException { 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse> getAppsWithHttpInfo() throws ApiException { @@ -3748,6 +3843,7 @@ public ApiResponse> getAppsWithHttpInfo() throws ApiException { 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call getAppsAsync(final ApiCallback> _callback) throws ApiException { @@ -3771,6 +3867,7 @@ public okhttp3.Call getAppsAsync(final ApiCallback> _callback) throws 400 Bad Request - 404 Not Found - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call getNotificationCall(String appId, String notificationId, final ApiCallback _callback) throws ApiException { @@ -3859,6 +3956,7 @@ private okhttp3.Call getNotificationValidateBeforeCall(String appId, String noti 400 Bad Request - 404 Not Found - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public NotificationWithMeta getNotification(String appId, String notificationId) throws ApiException { @@ -3880,6 +3978,7 @@ public NotificationWithMeta getNotification(String appId, String notificationId) 400 Bad Request - 404 Not Found - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse getNotificationWithHttpInfo(String appId, String notificationId) throws ApiException { @@ -3903,6 +4002,7 @@ public ApiResponse getNotificationWithHttpInfo(String appI 400 Bad Request - 404 Not Found - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call getNotificationAsync(String appId, String notificationId, final ApiCallback _callback) throws ApiException { @@ -3926,6 +4026,7 @@ public okhttp3.Call getNotificationAsync(String appId, String notificationId, fi 400 Bad Request - 404 Not Found - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call getNotificationHistoryCall(String notificationId, GetNotificationHistoryRequestBody getNotificationHistoryRequestBody, final ApiCallback _callback) throws ApiException { @@ -4010,6 +4111,7 @@ private okhttp3.Call getNotificationHistoryValidateBeforeCall(String notificatio 400 Bad Request - 404 Not Found - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public NotificationHistorySuccessResponse getNotificationHistory(String notificationId, GetNotificationHistoryRequestBody getNotificationHistoryRequestBody) throws ApiException { @@ -4031,6 +4133,7 @@ public NotificationHistorySuccessResponse getNotificationHistory(String notifica 400 Bad Request - 404 Not Found - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse getNotificationHistoryWithHttpInfo(String notificationId, GetNotificationHistoryRequestBody getNotificationHistoryRequestBody) throws ApiException { @@ -4054,6 +4157,7 @@ public ApiResponse getNotificationHistoryWit 400 Bad Request - 404 Not Found - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call getNotificationHistoryAsync(String notificationId, GetNotificationHistoryRequestBody getNotificationHistoryRequestBody, final ApiCallback _callback) throws ApiException { @@ -4069,6 +4173,7 @@ public okhttp3.Call getNotificationHistoryAsync(String notificationId, GetNotifi * @param limit How many notifications to return. Max is 50. Default is 50. (optional) * @param offset Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. (optional) * @param kind Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only (optional) + * @param timeOffset Time-offset pagination cursor for sequential pulls of all messages. Accepts either an ISO 8601 formatted timestamp (e.g. `2025-01-01T00:00:00.000Z`) or the opaque Base64 cursor token returned as `next_time_offset` in a prior response. When set, results are sorted ascending by send_after and the standard `offset` parameter cannot be used. Repeat the request with each `next_time_offset` until an empty notifications array is returned. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -4078,9 +4183,10 @@ public okhttp3.Call getNotificationHistoryAsync(String notificationId, GetNotifi 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ - public okhttp3.Call getNotificationsCall(String appId, Integer limit, Integer offset, Integer kind, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getNotificationsCall(String appId, Integer limit, Integer offset, Integer kind, String timeOffset, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -4124,6 +4230,10 @@ public okhttp3.Call getNotificationsCall(String appId, Integer limit, Integer of localVarQueryParams.addAll(localVarApiClient.parameterToPair("kind", kind)); } + if (timeOffset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("time_offset", timeOffset)); + } + final String[] localVarAccepts = { "application/json" }; @@ -4145,7 +4255,7 @@ public okhttp3.Call getNotificationsCall(String appId, Integer limit, Integer of } @SuppressWarnings("rawtypes") - private okhttp3.Call getNotificationsValidateBeforeCall(String appId, Integer limit, Integer offset, Integer kind, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getNotificationsValidateBeforeCall(String appId, Integer limit, Integer offset, Integer kind, String timeOffset, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { @@ -4153,7 +4263,7 @@ private okhttp3.Call getNotificationsValidateBeforeCall(String appId, Integer li } - okhttp3.Call localVarCall = getNotificationsCall(appId, limit, offset, kind, _callback); + okhttp3.Call localVarCall = getNotificationsCall(appId, limit, offset, kind, timeOffset, _callback); return localVarCall; } @@ -4165,6 +4275,7 @@ private okhttp3.Call getNotificationsValidateBeforeCall(String appId, Integer li * @param limit How many notifications to return. Max is 50. Default is 50. (optional) * @param offset Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. (optional) * @param kind Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only (optional) + * @param timeOffset Time-offset pagination cursor for sequential pulls of all messages. Accepts either an ISO 8601 formatted timestamp (e.g. `2025-01-01T00:00:00.000Z`) or the opaque Base64 cursor token returned as `next_time_offset` in a prior response. When set, results are sorted ascending by send_after and the standard `offset` parameter cannot be used. Repeat the request with each `next_time_offset` until an empty notifications array is returned. (optional) * @return NotificationSlice * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -4173,10 +4284,11 @@ private okhttp3.Call getNotificationsValidateBeforeCall(String appId, Integer li 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ - public NotificationSlice getNotifications(String appId, Integer limit, Integer offset, Integer kind) throws ApiException { - ApiResponse localVarResp = getNotificationsWithHttpInfo(appId, limit, offset, kind); + public NotificationSlice getNotifications(String appId, Integer limit, Integer offset, Integer kind, String timeOffset) throws ApiException { + ApiResponse localVarResp = getNotificationsWithHttpInfo(appId, limit, offset, kind, timeOffset); return localVarResp.getData(); } @@ -4187,6 +4299,7 @@ public NotificationSlice getNotifications(String appId, Integer limit, Integer o * @param limit How many notifications to return. Max is 50. Default is 50. (optional) * @param offset Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. (optional) * @param kind Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only (optional) + * @param timeOffset Time-offset pagination cursor for sequential pulls of all messages. Accepts either an ISO 8601 formatted timestamp (e.g. `2025-01-01T00:00:00.000Z`) or the opaque Base64 cursor token returned as `next_time_offset` in a prior response. When set, results are sorted ascending by send_after and the standard `offset` parameter cannot be used. Repeat the request with each `next_time_offset` until an empty notifications array is returned. (optional) * @return ApiResponse<NotificationSlice> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -4195,10 +4308,11 @@ public NotificationSlice getNotifications(String appId, Integer limit, Integer o 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ - public ApiResponse getNotificationsWithHttpInfo(String appId, Integer limit, Integer offset, Integer kind) throws ApiException { - okhttp3.Call localVarCall = getNotificationsValidateBeforeCall(appId, limit, offset, kind, null); + public ApiResponse getNotificationsWithHttpInfo(String appId, Integer limit, Integer offset, Integer kind, String timeOffset) throws ApiException { + okhttp3.Call localVarCall = getNotificationsValidateBeforeCall(appId, limit, offset, kind, timeOffset, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -4210,6 +4324,7 @@ public ApiResponse getNotificationsWithHttpInfo(String appId, * @param limit How many notifications to return. Max is 50. Default is 50. (optional) * @param offset Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. (optional) * @param kind Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only (optional) + * @param timeOffset Time-offset pagination cursor for sequential pulls of all messages. Accepts either an ISO 8601 formatted timestamp (e.g. `2025-01-01T00:00:00.000Z`) or the opaque Base64 cursor token returned as `next_time_offset` in a prior response. When set, results are sorted ascending by send_after and the standard `offset` parameter cannot be used. Repeat the request with each `next_time_offset` until an empty notifications array is returned. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -4219,11 +4334,12 @@ public ApiResponse getNotificationsWithHttpInfo(String appId, 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ - public okhttp3.Call getNotificationsAsync(String appId, Integer limit, Integer offset, Integer kind, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getNotificationsAsync(String appId, Integer limit, Integer offset, Integer kind, String timeOffset, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getNotificationsValidateBeforeCall(appId, limit, offset, kind, _callback); + okhttp3.Call localVarCall = getNotificationsValidateBeforeCall(appId, limit, offset, kind, timeOffset, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -4245,6 +4361,7 @@ public okhttp3.Call getNotificationsAsync(String appId, Integer limit, Integer o 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call getOutcomesCall(String appId, String outcomeNames, String outcomeNames2, String outcomeTimeRange, String outcomePlatforms, String outcomeAttribution, final ApiCallback _callback) throws ApiException { @@ -4352,6 +4469,7 @@ private okhttp3.Call getOutcomesValidateBeforeCall(String appId, String outcomeN 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public OutcomesData getOutcomes(String appId, String outcomeNames, String outcomeNames2, String outcomeTimeRange, String outcomePlatforms, String outcomeAttribution) throws ApiException { @@ -4376,6 +4494,7 @@ public OutcomesData getOutcomes(String appId, String outcomeNames, String outcom 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse getOutcomesWithHttpInfo(String appId, String outcomeNames, String outcomeNames2, String outcomeTimeRange, String outcomePlatforms, String outcomeAttribution) throws ApiException { @@ -4402,6 +4521,7 @@ public ApiResponse getOutcomesWithHttpInfo(String appId, String ou 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call getOutcomesAsync(String appId, String outcomeNames, String outcomeNames2, String outcomeTimeRange, String outcomePlatforms, String outcomeAttribution, final ApiCallback _callback) throws ApiException { @@ -4425,6 +4545,7 @@ public okhttp3.Call getOutcomesAsync(String appId, String outcomeNames, String o 201 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call getSegmentsCall(String appId, Integer offset, Integer limit, final ApiCallback _callback) throws ApiException { @@ -4512,6 +4633,7 @@ private okhttp3.Call getSegmentsValidateBeforeCall(String appId, Integer offset, 201 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public GetSegmentsSuccessResponse getSegments(String appId, Integer offset, Integer limit) throws ApiException { @@ -4533,6 +4655,7 @@ public GetSegmentsSuccessResponse getSegments(String appId, Integer offset, Inte 201 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse getSegmentsWithHttpInfo(String appId, Integer offset, Integer limit) throws ApiException { @@ -4556,6 +4679,7 @@ public ApiResponse getSegmentsWithHttpInfo(String ap 201 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call getSegmentsAsync(String appId, Integer offset, Integer limit, final ApiCallback _callback) throws ApiException { @@ -4580,6 +4704,7 @@ public okhttp3.Call getSegmentsAsync(String appId, Integer offset, Integer limit 400 Bad Request - 404 Not Found - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call getUserCall(String appId, String aliasLabel, String aliasId, final ApiCallback _callback) throws ApiException { @@ -4672,6 +4797,7 @@ private okhttp3.Call getUserValidateBeforeCall(String appId, String aliasLabel, 400 Bad Request - 404 Not Found - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public User getUser(String appId, String aliasLabel, String aliasId) throws ApiException { @@ -4694,6 +4820,7 @@ public User getUser(String appId, String aliasLabel, String aliasId) throws ApiE 400 Bad Request - 404 Not Found - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse getUserWithHttpInfo(String appId, String aliasLabel, String aliasId) throws ApiException { @@ -4718,6 +4845,7 @@ public ApiResponse getUserWithHttpInfo(String appId, String aliasLabel, St 400 Bad Request - 404 Not Found - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call getUserAsync(String appId, String aliasLabel, String aliasId, final ApiCallback _callback) throws ApiException { @@ -4739,6 +4867,7 @@ public okhttp3.Call getUserAsync(String appId, String aliasLabel, String aliasId Status Code Description Response Headers 200 OK - 400 Bad Request - + 0 Unexpected error - */ public okhttp3.Call rotateApiKeyCall(String appId, String tokenId, final ApiCallback _callback) throws ApiException { @@ -4822,6 +4951,7 @@ private okhttp3.Call rotateApiKeyValidateBeforeCall(String appId, String tokenId Status Code Description Response Headers 200 OK - 400 Bad Request - + 0 Unexpected error - */ public CreateApiKeyResponse rotateApiKey(String appId, String tokenId) throws ApiException { @@ -4841,6 +4971,7 @@ public CreateApiKeyResponse rotateApiKey(String appId, String tokenId) throws Ap Status Code Description Response Headers 200 OK - 400 Bad Request - + 0 Unexpected error - */ public ApiResponse rotateApiKeyWithHttpInfo(String appId, String tokenId) throws ApiException { @@ -4862,6 +4993,7 @@ public ApiResponse rotateApiKeyWithHttpInfo(String appId, Status Code Description Response Headers 200 OK - 400 Bad Request - + 0 Unexpected error - */ public okhttp3.Call rotateApiKeyAsync(String appId, String tokenId, final ApiCallback _callback) throws ApiException { @@ -4885,6 +5017,7 @@ public okhttp3.Call rotateApiKeyAsync(String appId, String tokenId, final ApiCal 201 Created - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call startLiveActivityCall(String appId, String activityType, StartLiveActivityRequest startLiveActivityRequest, final ApiCallback _callback) throws ApiException { @@ -4975,6 +5108,7 @@ private okhttp3.Call startLiveActivityValidateBeforeCall(String appId, String ac 201 Created - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public StartLiveActivitySuccessResponse startLiveActivity(String appId, String activityType, StartLiveActivityRequest startLiveActivityRequest) throws ApiException { @@ -4996,6 +5130,7 @@ public StartLiveActivitySuccessResponse startLiveActivity(String appId, String a 201 Created - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse startLiveActivityWithHttpInfo(String appId, String activityType, StartLiveActivityRequest startLiveActivityRequest) throws ApiException { @@ -5019,6 +5154,7 @@ public ApiResponse startLiveActivityWithHttpIn 201 Created - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call startLiveActivityAsync(String appId, String activityType, StartLiveActivityRequest startLiveActivityRequest, final ApiCallback _callback) throws ApiException { @@ -5044,6 +5180,7 @@ public okhttp3.Call startLiveActivityAsync(String appId, String activityType, St 404 Not Found - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call transferSubscriptionCall(String appId, String subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody, final ApiCallback _callback) throws ApiException { @@ -5136,6 +5273,7 @@ private okhttp3.Call transferSubscriptionValidateBeforeCall(String appId, String 404 Not Found - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public UserIdentityBody transferSubscription(String appId, String subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody) throws ApiException { @@ -5159,6 +5297,7 @@ public UserIdentityBody transferSubscription(String appId, String subscriptionId 404 Not Found - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse transferSubscriptionWithHttpInfo(String appId, String subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody) throws ApiException { @@ -5184,6 +5323,7 @@ public ApiResponse transferSubscriptionWithHttpInfo(String app 404 Not Found - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call transferSubscriptionAsync(String appId, String subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody, final ApiCallback _callback) throws ApiException { @@ -5207,6 +5347,7 @@ public okhttp3.Call transferSubscriptionAsync(String appId, String subscriptionI 202 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call unsubscribeEmailWithTokenCall(String appId, String notificationId, String token, final ApiCallback _callback) throws ApiException { @@ -5301,6 +5442,7 @@ private okhttp3.Call unsubscribeEmailWithTokenValidateBeforeCall(String appId, S 202 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public GenericSuccessBoolResponse unsubscribeEmailWithToken(String appId, String notificationId, String token) throws ApiException { @@ -5322,6 +5464,7 @@ public GenericSuccessBoolResponse unsubscribeEmailWithToken(String appId, String 202 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse unsubscribeEmailWithTokenWithHttpInfo(String appId, String notificationId, String token) throws ApiException { @@ -5345,6 +5488,7 @@ public ApiResponse unsubscribeEmailWithTokenWithHttp 202 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call unsubscribeEmailWithTokenAsync(String appId, String notificationId, String token, final ApiCallback _callback) throws ApiException { @@ -5367,6 +5511,7 @@ public okhttp3.Call unsubscribeEmailWithTokenAsync(String appId, String notifica Status Code Description Response Headers 200 OK - 400 Bad Request - + 0 Unexpected error - */ public okhttp3.Call updateApiKeyCall(String appId, String tokenId, UpdateApiKeyRequest updateApiKeyRequest, final ApiCallback _callback) throws ApiException { @@ -5456,6 +5601,7 @@ private okhttp3.Call updateApiKeyValidateBeforeCall(String appId, String tokenId Status Code Description Response Headers 200 OK - 400 Bad Request - + 0 Unexpected error - */ public Object updateApiKey(String appId, String tokenId, UpdateApiKeyRequest updateApiKeyRequest) throws ApiException { @@ -5476,6 +5622,7 @@ public Object updateApiKey(String appId, String tokenId, UpdateApiKeyRequest upd Status Code Description Response Headers 200 OK - 400 Bad Request - + 0 Unexpected error - */ public ApiResponse updateApiKeyWithHttpInfo(String appId, String tokenId, UpdateApiKeyRequest updateApiKeyRequest) throws ApiException { @@ -5498,6 +5645,7 @@ public ApiResponse updateApiKeyWithHttpInfo(String appId, String tokenId Status Code Description Response Headers 200 OK - 400 Bad Request - + 0 Unexpected error - */ public okhttp3.Call updateApiKeyAsync(String appId, String tokenId, UpdateApiKeyRequest updateApiKeyRequest, final ApiCallback _callback) throws ApiException { @@ -5520,6 +5668,7 @@ public okhttp3.Call updateApiKeyAsync(String appId, String tokenId, UpdateApiKey 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call updateAppCall(String appId, App app, final ApiCallback _callback) throws ApiException { @@ -5603,6 +5752,7 @@ private okhttp3.Call updateAppValidateBeforeCall(String appId, App app, final Ap 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public App updateApp(String appId, App app) throws ApiException { @@ -5623,6 +5773,7 @@ public App updateApp(String appId, App app) throws ApiException { 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse updateAppWithHttpInfo(String appId, App app) throws ApiException { @@ -5645,6 +5796,7 @@ public ApiResponse updateAppWithHttpInfo(String appId, App app) throws ApiE 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call updateAppAsync(String appId, App app, final ApiCallback _callback) throws ApiException { @@ -5668,6 +5820,7 @@ public okhttp3.Call updateAppAsync(String appId, App app, final ApiCallback 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call updateLiveActivityCall(String appId, String activityId, UpdateLiveActivityRequest updateLiveActivityRequest, final ApiCallback _callback) throws ApiException { @@ -5758,6 +5911,7 @@ private okhttp3.Call updateLiveActivityValidateBeforeCall(String appId, String a 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public UpdateLiveActivitySuccessResponse updateLiveActivity(String appId, String activityId, UpdateLiveActivityRequest updateLiveActivityRequest) throws ApiException { @@ -5779,6 +5933,7 @@ public UpdateLiveActivitySuccessResponse updateLiveActivity(String appId, String 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse updateLiveActivityWithHttpInfo(String appId, String activityId, UpdateLiveActivityRequest updateLiveActivityRequest) throws ApiException { @@ -5802,6 +5957,7 @@ public ApiResponse updateLiveActivityWithHttp 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call updateLiveActivityAsync(String appId, String activityId, UpdateLiveActivityRequest updateLiveActivityRequest, final ApiCallback _callback) throws ApiException { @@ -5827,6 +5983,7 @@ public okhttp3.Call updateLiveActivityAsync(String appId, String activityId, Upd 404 Not Found - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call updateSubscriptionCall(String appId, String subscriptionId, SubscriptionBody subscriptionBody, final ApiCallback _callback) throws ApiException { @@ -5918,6 +6075,7 @@ private okhttp3.Call updateSubscriptionValidateBeforeCall(String appId, String s 404 Not Found - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public void updateSubscription(String appId, String subscriptionId, SubscriptionBody subscriptionBody) throws ApiException { @@ -5940,6 +6098,7 @@ public void updateSubscription(String appId, String subscriptionId, Subscription 404 Not Found - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse updateSubscriptionWithHttpInfo(String appId, String subscriptionId, SubscriptionBody subscriptionBody) throws ApiException { @@ -5964,6 +6123,7 @@ public ApiResponse updateSubscriptionWithHttpInfo(String appId, String sub 404 Not Found - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call updateSubscriptionAsync(String appId, String subscriptionId, SubscriptionBody subscriptionBody, final ApiCallback _callback) throws ApiException { @@ -5987,6 +6147,7 @@ public okhttp3.Call updateSubscriptionAsync(String appId, String subscriptionId, 202 ACCEPTED - 400 Bad Request - 404 Not Found - + 0 Unexpected error - */ public okhttp3.Call updateSubscriptionByTokenCall(String appId, String tokenType, String token, SubscriptionBody subscriptionBody, final ApiCallback _callback) throws ApiException { @@ -6084,6 +6245,7 @@ private okhttp3.Call updateSubscriptionByTokenValidateBeforeCall(String appId, S 202 ACCEPTED - 400 Bad Request - 404 Not Found - + 0 Unexpected error - */ public Object updateSubscriptionByToken(String appId, String tokenType, String token, SubscriptionBody subscriptionBody) throws ApiException { @@ -6106,6 +6268,7 @@ public Object updateSubscriptionByToken(String appId, String tokenType, String t 202 ACCEPTED - 400 Bad Request - 404 Not Found - + 0 Unexpected error - */ public ApiResponse updateSubscriptionByTokenWithHttpInfo(String appId, String tokenType, String token, SubscriptionBody subscriptionBody) throws ApiException { @@ -6130,6 +6293,7 @@ public ApiResponse updateSubscriptionByTokenWithHttpInfo(String appId, S 202 ACCEPTED - 400 Bad Request - 404 Not Found - + 0 Unexpected error - */ public okhttp3.Call updateSubscriptionByTokenAsync(String appId, String tokenType, String token, SubscriptionBody subscriptionBody, final ApiCallback _callback) throws ApiException { @@ -6152,6 +6316,7 @@ public okhttp3.Call updateSubscriptionByTokenAsync(String appId, String tokenTyp Status Code Description Response Headers 200 OK - 400 Bad Request - + 0 Unexpected error - */ public okhttp3.Call updateTemplateCall(String templateId, String appId, UpdateTemplateRequest updateTemplateRequest, final ApiCallback _callback) throws ApiException { @@ -6244,6 +6409,7 @@ private okhttp3.Call updateTemplateValidateBeforeCall(String templateId, String Status Code Description Response Headers 200 OK - 400 Bad Request - + 0 Unexpected error - */ public TemplateResource updateTemplate(String templateId, String appId, UpdateTemplateRequest updateTemplateRequest) throws ApiException { @@ -6264,6 +6430,7 @@ public TemplateResource updateTemplate(String templateId, String appId, UpdateTe Status Code Description Response Headers 200 OK - 400 Bad Request - + 0 Unexpected error - */ public ApiResponse updateTemplateWithHttpInfo(String templateId, String appId, UpdateTemplateRequest updateTemplateRequest) throws ApiException { @@ -6286,6 +6453,7 @@ public ApiResponse updateTemplateWithHttpInfo(String templateI Status Code Description Response Headers 200 OK - 400 Bad Request - + 0 Unexpected error - */ public okhttp3.Call updateTemplateAsync(String templateId, String appId, UpdateTemplateRequest updateTemplateRequest, final ApiCallback _callback) throws ApiException { @@ -6311,6 +6479,7 @@ public okhttp3.Call updateTemplateAsync(String templateId, String appId, UpdateT 400 Bad Request - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call updateUserCall(String appId, String aliasLabel, String aliasId, UpdateUserRequest updateUserRequest, final ApiCallback _callback) throws ApiException { @@ -6409,6 +6578,7 @@ private okhttp3.Call updateUserValidateBeforeCall(String appId, String aliasLabe 400 Bad Request - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public PropertiesBody updateUser(String appId, String aliasLabel, String aliasId, UpdateUserRequest updateUserRequest) throws ApiException { @@ -6432,6 +6602,7 @@ public PropertiesBody updateUser(String appId, String aliasLabel, String aliasId 400 Bad Request - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse updateUserWithHttpInfo(String appId, String aliasLabel, String aliasId, UpdateUserRequest updateUserRequest) throws ApiException { @@ -6457,6 +6628,7 @@ public ApiResponse updateUserWithHttpInfo(String appId, String a 400 Bad Request - 409 Conflict - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call updateUserAsync(String appId, String aliasLabel, String aliasId, UpdateUserRequest updateUserRequest, final ApiCallback _callback) throws ApiException { @@ -6477,6 +6649,7 @@ public okhttp3.Call updateUserAsync(String appId, String aliasLabel, String alia Status Code Description Response Headers 200 OK - 400 Bad Request - + 0 Unexpected error - */ public okhttp3.Call viewApiKeysCall(String appId, final ApiCallback _callback) throws ApiException { @@ -6553,6 +6726,7 @@ private okhttp3.Call viewApiKeysValidateBeforeCall(String appId, final ApiCallba Status Code Description Response Headers 200 OK - 400 Bad Request - + 0 Unexpected error - */ public ApiKeyTokensListResponse viewApiKeys(String appId) throws ApiException { @@ -6571,6 +6745,7 @@ public ApiKeyTokensListResponse viewApiKeys(String appId) throws ApiException { Status Code Description Response Headers 200 OK - 400 Bad Request - + 0 Unexpected error - */ public ApiResponse viewApiKeysWithHttpInfo(String appId) throws ApiException { @@ -6591,6 +6766,7 @@ public ApiResponse viewApiKeysWithHttpInfo(String appI Status Code Description Response Headers 200 OK - 400 Bad Request - + 0 Unexpected error - */ public okhttp3.Call viewApiKeysAsync(String appId, final ApiCallback _callback) throws ApiException { @@ -6613,6 +6789,7 @@ public okhttp3.Call viewApiKeysAsync(String appId, final ApiCallback 200 OK - 400 Bad Request - 404 Not Found - + 0 Unexpected error - */ public okhttp3.Call viewTemplateCall(String templateId, String appId, final ApiCallback _callback) throws ApiException { @@ -6700,6 +6877,7 @@ private okhttp3.Call viewTemplateValidateBeforeCall(String templateId, String ap 200 OK - 400 Bad Request - 404 Not Found - + 0 Unexpected error - */ public TemplateResource viewTemplate(String templateId, String appId) throws ApiException { @@ -6720,6 +6898,7 @@ public TemplateResource viewTemplate(String templateId, String appId) throws Api 200 OK - 400 Bad Request - 404 Not Found - + 0 Unexpected error - */ public ApiResponse viewTemplateWithHttpInfo(String templateId, String appId) throws ApiException { @@ -6742,6 +6921,7 @@ public ApiResponse viewTemplateWithHttpInfo(String templateId, 200 OK - 400 Bad Request - 404 Not Found - + 0 Unexpected error - */ public okhttp3.Call viewTemplateAsync(String templateId, String appId, final ApiCallback _callback) throws ApiException { @@ -6766,6 +6946,7 @@ public okhttp3.Call viewTemplateAsync(String templateId, String appId, final Api 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call viewTemplatesCall(String appId, Integer limit, Integer offset, String channel, final ApiCallback _callback) throws ApiException { @@ -6861,6 +7042,7 @@ private okhttp3.Call viewTemplatesValidateBeforeCall(String appId, Integer limit 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public TemplatesListResponse viewTemplates(String appId, Integer limit, Integer offset, String channel) throws ApiException { @@ -6883,6 +7065,7 @@ public TemplatesListResponse viewTemplates(String appId, Integer limit, Integer 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public ApiResponse viewTemplatesWithHttpInfo(String appId, Integer limit, Integer offset, String channel) throws ApiException { @@ -6907,6 +7090,7 @@ public ApiResponse viewTemplatesWithHttpInfo(String appId 200 OK - 400 Bad Request - 429 Rate Limit Exceeded - + 0 Unexpected error - */ public okhttp3.Call viewTemplatesAsync(String appId, Integer limit, Integer offset, String channel, final ApiCallback _callback) throws ApiException { diff --git a/src/main/java/com/onesignal/client/model/CreateNotificationSuccessResponse.java b/src/main/java/com/onesignal/client/model/CreateNotificationSuccessResponse.java index 1d080b7..b998e3c 100644 --- a/src/main/java/com/onesignal/client/model/CreateNotificationSuccessResponse.java +++ b/src/main/java/com/onesignal/client/model/CreateNotificationSuccessResponse.java @@ -75,11 +75,11 @@ public CreateNotificationSuccessResponse id(String id) { } /** - * Notification identifier when the request created a notification. An empty string means no notification was created; read `errors` for details (HTTP may still be 200). + * Notification identifier when the request created a notification. An empty string means no notification was created; read `errors` for details (HTTP may still be 200). All OneSignal server SDKs expose message-sent / message-not-sent narrowing helpers (named idiomatically per language — e.g. `isMessageSent`, `is_message_sent`, `message_sent?`); prefer them over comparing `id` directly. * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Notification identifier when the request created a notification. An empty string means no notification was created; read `errors` for details (HTTP may still be 200).") + @ApiModelProperty(value = "Notification identifier when the request created a notification. An empty string means no notification was created; read `errors` for details (HTTP may still be 200). All OneSignal server SDKs expose message-sent / message-not-sent narrowing helpers (named idiomatically per language — e.g. `isMessageSent`, `is_message_sent`, `message_sent?`); prefer them over comparing `id` directly.") public String getId() { return id; diff --git a/src/main/java/com/onesignal/client/model/NotificationSlice.java b/src/main/java/com/onesignal/client/model/NotificationSlice.java index 18462a1..e8d6e91 100644 --- a/src/main/java/com/onesignal/client/model/NotificationSlice.java +++ b/src/main/java/com/onesignal/client/model/NotificationSlice.java @@ -67,6 +67,14 @@ public class NotificationSlice { @SerializedName(SERIALIZED_NAME_LIMIT) private Integer limit; + public static final String SERIALIZED_NAME_TIME_OFFSET = "time_offset"; + @SerializedName(SERIALIZED_NAME_TIME_OFFSET) + private String timeOffset; + + public static final String SERIALIZED_NAME_NEXT_TIME_OFFSET = "next_time_offset"; + @SerializedName(SERIALIZED_NAME_NEXT_TIME_OFFSET) + private String nextTimeOffset; + public static final String SERIALIZED_NAME_NOTIFICATIONS = "notifications"; @SerializedName(SERIALIZED_NAME_NOTIFICATIONS) private List notifications = null; @@ -143,6 +151,52 @@ public void setLimit(Integer limit) { } + public NotificationSlice timeOffset(String timeOffset) { + + this.timeOffset = timeOffset; + return this; + } + + /** + * The time_offset cursor specified in the request, if any. + * @return timeOffset + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The time_offset cursor specified in the request, if any.") + + public String getTimeOffset() { + return timeOffset; + } + + + public void setTimeOffset(String timeOffset) { + this.timeOffset = timeOffset; + } + + + public NotificationSlice nextTimeOffset(String nextTimeOffset) { + + this.nextTimeOffset = nextTimeOffset; + return this; + } + + /** + * An opaque Base64 cursor token representing the next page of messages to fetch. Present when time_offset was provided in the request. Pass this value as time_offset on the next request to continue paginating. + * @return nextTimeOffset + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "An opaque Base64 cursor token representing the next page of messages to fetch. Present when time_offset was provided in the request. Pass this value as time_offset on the next request to continue paginating.") + + public String getNextTimeOffset() { + return nextTimeOffset; + } + + + public void setNextTimeOffset(String nextTimeOffset) { + this.nextTimeOffset = nextTimeOffset; + } + + public NotificationSlice notifications(List notifications) { this.notifications = notifications; @@ -187,12 +241,14 @@ public boolean equals(Object o) { return Objects.equals(this.totalCount, notificationSlice.totalCount) && Objects.equals(this.offset, notificationSlice.offset) && Objects.equals(this.limit, notificationSlice.limit) && + Objects.equals(this.timeOffset, notificationSlice.timeOffset) && + Objects.equals(this.nextTimeOffset, notificationSlice.nextTimeOffset) && Objects.equals(this.notifications, notificationSlice.notifications); } @Override public int hashCode() { - return Objects.hash(totalCount, offset, limit, notifications); + return Objects.hash(totalCount, offset, limit, timeOffset, nextTimeOffset, notifications); } @Override @@ -202,6 +258,8 @@ public String toString() { sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n"); sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" timeOffset: ").append(toIndentedString(timeOffset)).append("\n"); + sb.append(" nextTimeOffset: ").append(toIndentedString(nextTimeOffset)).append("\n"); sb.append(" notifications: ").append(toIndentedString(notifications)).append("\n"); sb.append("}"); return sb.toString(); @@ -228,6 +286,8 @@ private String toIndentedString(Object o) { openapiFields.add("total_count"); openapiFields.add("offset"); openapiFields.add("limit"); + openapiFields.add("time_offset"); + openapiFields.add("next_time_offset"); openapiFields.add("notifications"); // a set of required properties/fields (JSON key names)