Skip to content
Merged
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
2 changes: 1 addition & 1 deletion generated/.regen-branch.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
regen/openapi-2e618c9b53b45115eb880ab971dae2a3dae7d3f4
regen/openapi-13a315d7312968827894bc81e8925cabf13db62a
4 changes: 2 additions & 2 deletions generated/apis/PushNotificationsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface SendPushNotificationRequest {
export class PushNotificationsApi extends runtime.BaseAPI {

/**
* Sends a push notification to devices matched by API key scope and optional target channels.
* Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL (tap) and up to 4 interactive actions (long-press on iOS).
* Send a push notification
*/
async sendPushNotificationRaw(requestParameters: SendPushNotificationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PushNotificationResponse>> {
Expand Down Expand Up @@ -70,7 +70,7 @@ export class PushNotificationsApi extends runtime.BaseAPI {
}

/**
* Sends a push notification to devices matched by API key scope and optional target channels.
* Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL (tap) and up to 4 interactive actions (long-press on iOS).
* Send a push notification
*/
async sendPushNotification(requestParameters: SendPushNotificationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PushNotificationResponse> {
Expand Down
72 changes: 72 additions & 0 deletions generated/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,55 @@ export interface NoRecipientsError {
*/
effective_channel_slugs?: Array<string>;
}
/**
*
* @export
* @interface PushNotificationAction
*/
export interface PushNotificationAction {
[key: string]: any | any;
/**
* Button title displayed in iOS expanded notification UI.
* @type {string}
* @memberof PushNotificationAction
*/
title: string;
/**
*
* @type {PushNotificationActionType}
* @memberof PushNotificationAction
*/
type: PushNotificationActionType;
/**
* HTTPS URL. For open_url it is opened in browser. For webhook it is called by ActivitySmith backend.
* @type {string}
* @memberof PushNotificationAction
*/
url: string;
/**
* Webhook HTTP method. Used only when type=webhook.
* @type {PushNotificationWebhookMethod}
* @memberof PushNotificationAction
*/
method?: PushNotificationWebhookMethod;
/**
* Optional webhook payload body. Used only when type=webhook.
* @type {{ [key: string]: any; }}
* @memberof PushNotificationAction
*/
body?: { [key: string]: any; };
}

/**
*
* @export
*/
export const PushNotificationActionType = {
OpenUrl: 'open_url',
Webhook: 'webhook'
} as const;
export type PushNotificationActionType = typeof PushNotificationActionType[keyof typeof PushNotificationActionType];

/**
*
* @export
Expand All @@ -597,6 +646,18 @@ export interface PushNotificationRequest {
* @memberof PushNotificationRequest
*/
subtitle?: string;
/**
* Optional HTTPS URL opened when user taps the notification body.
* @type {string}
* @memberof PushNotificationRequest
*/
redirection?: string;
/**
* Optional interactive actions shown on iOS long-press.
* @type {Array<PushNotificationAction>}
* @memberof PushNotificationRequest
*/
actions?: Array<PushNotificationAction>;
/**
*
* @type {{ [key: string]: any; }}
Expand Down Expand Up @@ -660,6 +721,17 @@ export interface PushNotificationResponse {
*/
timestamp: string;
}

/**
*
* @export
*/
export const PushNotificationWebhookMethod = {
Get: 'GET',
Post: 'POST'
} as const;
export type PushNotificationWebhookMethod = typeof PushNotificationWebhookMethod[keyof typeof PushNotificationWebhookMethod];

/**
*
* @export
Expand Down