Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions DefaultApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -2276,6 +2276,8 @@ let body: Onesignal.DefaultApiGetNotificationsRequest = {
offset: 0,
// 0 | 1 | 3 | Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only (optional)
kind: 0,
// 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)
timeOffset: "2025-01-01T00:00:00.000Z",
};

try {
Expand All @@ -2301,6 +2303,7 @@ Name | Type | Description | Notes
**limit** | [**number**] | How many notifications to return. Max is 50. Default is 50. | (optional) defaults to undefined
**offset** | [**number**] | 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) defaults to undefined
**kind** | [**0 | 1 | 3**]**Array<0 &#124; 1 &#124; 3>** | Kind of notifications returned: * unset - All notification types (default) * &#x60;0&#x60; - Dashboard only * &#x60;1&#x60; - API only * &#x60;3&#x60; - Automated only | (optional) defaults to undefined
**timeOffset** | [**string**] | Time-offset pagination cursor for sequential pulls of all messages. Accepts either an ISO 8601 formatted timestamp (e.g. &#x60;2025-01-01T00:00:00.000Z&#x60;) or the opaque Base64 cursor token returned as &#x60;next_time_offset&#x60; in a prior response. When set, results are sorted ascending by send_after and the standard &#x60;offset&#x60; parameter cannot be used. Repeat the request with each &#x60;next_time_offset&#x60; until an empty notifications array is returned. | (optional) defaults to undefined


### Return type
Expand Down
9 changes: 8 additions & 1 deletion apis/DefaultApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1499,8 +1499,9 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
* @param limit How many notifications to return. Max is 50. Default is 50.
* @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.
* @param kind Kind of notifications returned: * unset - All notification types (default) * &#x60;0&#x60; - Dashboard only * &#x60;1&#x60; - API only * &#x60;3&#x60; - Automated only
* @param timeOffset Time-offset pagination cursor for sequential pulls of all messages. Accepts either an ISO 8601 formatted timestamp (e.g. &#x60;2025-01-01T00:00:00.000Z&#x60;) or the opaque Base64 cursor token returned as &#x60;next_time_offset&#x60; in a prior response. When set, results are sorted ascending by send_after and the standard &#x60;offset&#x60; parameter cannot be used. Repeat the request with each &#x60;next_time_offset&#x60; until an empty notifications array is returned.
*/
public async getNotifications(appId: string, limit?: number, offset?: number, kind?: 0 | 1 | 3, _options?: Configuration): Promise<RequestContext> {
public async getNotifications(appId: string, limit?: number, offset?: number, kind?: 0 | 1 | 3, timeOffset?: string, _options?: Configuration): Promise<RequestContext> {
let _config = _options || this.configuration;

// verify required parameter 'appId' is not null or undefined
Expand All @@ -1512,6 +1513,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {




// Path Params
const localVarPath = '/notifications';

Expand Down Expand Up @@ -1542,6 +1544,11 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
requestContext.setQueryParam("kind", ObjectSerializer.serialize(kind, "0 | 1 | 3", ""));
}

// Query Params
if (timeOffset !== undefined) {
requestContext.setQueryParam("time_offset", ObjectSerializer.serialize(timeOffset, "string", ""));
}


let authMethod: SecurityAuthentication | undefined;
// Apply auth methods
Expand Down
2 changes: 1 addition & 1 deletion dist/apis/DefaultApi.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export declare class DefaultApiRequestFactory extends BaseAPIRequestFactory {
getApps(_options?: Configuration): Promise<RequestContext>;
getNotification(appId: string, notificationId: string, _options?: Configuration): Promise<RequestContext>;
getNotificationHistory(notificationId: string, getNotificationHistoryRequestBody: GetNotificationHistoryRequestBody, _options?: Configuration): Promise<RequestContext>;
getNotifications(appId: string, limit?: number, offset?: number, kind?: 0 | 1 | 3, _options?: Configuration): Promise<RequestContext>;
getNotifications(appId: string, limit?: number, offset?: number, kind?: 0 | 1 | 3, timeOffset?: string, _options?: Configuration): Promise<RequestContext>;
getOutcomes(appId: string, outcomeNames: string, outcomeNames2?: string, outcomeTimeRange?: string, outcomePlatforms?: string, outcomeAttribution?: string, _options?: Configuration): Promise<RequestContext>;
getSegments(appId: string, offset?: number, limit?: number, _options?: Configuration): Promise<RequestContext>;
getUser(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Promise<RequestContext>;
Expand Down
5 changes: 4 additions & 1 deletion dist/apis/DefaultApi.js

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

2 changes: 1 addition & 1 deletion dist/apis/DefaultApi.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions dist/helpers.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ export interface CreateNotificationWithRetryResult {
wasReplayed: boolean;
}
export declare function createNotificationWithRetry(configuration: Configuration, notification: Notification, options?: CreateNotificationWithRetryOptions): Promise<CreateNotificationWithRetryResult>;
export type MessageSent = CreateNotificationSuccessResponse;
export type MessageNotSent = CreateNotificationSuccessResponse;
export declare function isMessageSent(response: CreateNotificationSuccessResponse): response is MessageSent;
export declare function isMessageNotSent(response: CreateNotificationSuccessResponse): response is MessageNotSent;
10 changes: 9 additions & 1 deletion dist/helpers.js

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

2 changes: 1 addition & 1 deletion dist/helpers.js.map

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

2 changes: 2 additions & 0 deletions dist/models/NotificationSlice.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ export declare class NotificationSlice {
'total_count'?: number;
'offset'?: number;
'limit'?: number;
'time_offset'?: string;
'next_time_offset'?: string;
'notifications'?: Array<NotificationWithMeta>;
static readonly discriminator: string | undefined;
static readonly attributeTypeMap: Array<{
Expand Down
12 changes: 12 additions & 0 deletions dist/models/NotificationSlice.js

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

2 changes: 1 addition & 1 deletion dist/models/NotificationSlice.js.map

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

1 change: 1 addition & 0 deletions dist/types/ObjectParamAPI.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ export interface DefaultApiGetNotificationsRequest {
limit?: number;
offset?: number;
kind?: 0 | 1 | 3;
timeOffset?: string;
}
export interface DefaultApiGetOutcomesRequest {
appId: string;
Expand Down
2 changes: 1 addition & 1 deletion dist/types/ObjectParamAPI.js

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

Loading