diff --git a/generated/.regen-branch.txt b/generated/.regen-branch.txt index 4014fec..804d3cc 100644 --- a/generated/.regen-branch.txt +++ b/generated/.regen-branch.txt @@ -1 +1 @@ -regen/openapi-2e618c9b53b45115eb880ab971dae2a3dae7d3f4 +regen/openapi-6d3b1d7d018b46a98f00541eef596a2fd6e74587 diff --git a/generated/apis/PushNotificationsApi.ts b/generated/apis/PushNotificationsApi.ts index 1461d6b..dc22673 100644 --- a/generated/apis/PushNotificationsApi.ts +++ b/generated/apis/PushNotificationsApi.ts @@ -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> { @@ -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 { diff --git a/generated/models/index.ts b/generated/models/index.ts index 04d9beb..114ae3b 100644 --- a/generated/models/index.ts +++ b/generated/models/index.ts @@ -572,6 +572,55 @@ export interface NoRecipientsError { */ effective_channel_slugs?: Array; } +/** + * + * @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 @@ -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} + * @memberof PushNotificationRequest + */ + actions?: Array; /** * * @type {{ [key: string]: any; }} @@ -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