From 2bf2692e6fa8085db6984ddfc3031f461e36b046 Mon Sep 17 00:00:00 2001 From: activitysmith-bot Date: Fri, 30 Jan 2026 07:51:19 +0000 Subject: [PATCH] chore: regenerate SDK --- generated/.openapi-generator/FILES | 21 - generated/.openapi-generator/VERSION | 1 - generated/.regen-branch.txt | 1 + generated/apis/LiveActivitiesApi.ts | 34 +- ...icationsApi.ts => PushNotificationsApi.ts} | 16 +- generated/apis/index.ts | 2 +- generated/models/ContentStateEnd.ts | 144 ----- generated/models/ContentStateStart.ts | 154 ----- generated/models/ContentStateUpdate.ts | 136 ----- generated/models/LiveActivityEndRequest.ts | 77 --- generated/models/LiveActivityEndResponse.ts | 95 --- generated/models/LiveActivityLimitError.ts | 88 --- generated/models/LiveActivityStartRequest.ts | 68 --- generated/models/LiveActivityStartResponse.ts | 95 --- generated/models/LiveActivityUpdateRequest.ts | 77 --- .../models/LiveActivityUpdateResponse.ts | 95 --- generated/models/PushNotificationRequest.ts | 77 --- generated/models/PushNotificationResponse.ts | 86 --- generated/models/RateLimitError.ts | 70 --- .../models/SendPushNotification429Response.ts | 67 --- generated/models/index.ts | 539 +++++++++++++++++- generated/runtime.ts | 6 - 22 files changed, 540 insertions(+), 1409 deletions(-) delete mode 100644 generated/.openapi-generator/FILES delete mode 100644 generated/.openapi-generator/VERSION create mode 100644 generated/.regen-branch.txt rename generated/apis/{NotificationsApi.ts => PushNotificationsApi.ts} (79%) delete mode 100644 generated/models/ContentStateEnd.ts delete mode 100644 generated/models/ContentStateStart.ts delete mode 100644 generated/models/ContentStateUpdate.ts delete mode 100644 generated/models/LiveActivityEndRequest.ts delete mode 100644 generated/models/LiveActivityEndResponse.ts delete mode 100644 generated/models/LiveActivityLimitError.ts delete mode 100644 generated/models/LiveActivityStartRequest.ts delete mode 100644 generated/models/LiveActivityStartResponse.ts delete mode 100644 generated/models/LiveActivityUpdateRequest.ts delete mode 100644 generated/models/LiveActivityUpdateResponse.ts delete mode 100644 generated/models/PushNotificationRequest.ts delete mode 100644 generated/models/PushNotificationResponse.ts delete mode 100644 generated/models/RateLimitError.ts delete mode 100644 generated/models/SendPushNotification429Response.ts diff --git a/generated/.openapi-generator/FILES b/generated/.openapi-generator/FILES deleted file mode 100644 index 723247d..0000000 --- a/generated/.openapi-generator/FILES +++ /dev/null @@ -1,21 +0,0 @@ -.openapi-generator-ignore -apis/LiveActivitiesApi.ts -apis/NotificationsApi.ts -apis/index.ts -index.ts -models/ContentStateEnd.ts -models/ContentStateStart.ts -models/ContentStateUpdate.ts -models/LiveActivityEndRequest.ts -models/LiveActivityEndResponse.ts -models/LiveActivityLimitError.ts -models/LiveActivityStartRequest.ts -models/LiveActivityStartResponse.ts -models/LiveActivityUpdateRequest.ts -models/LiveActivityUpdateResponse.ts -models/PushNotificationRequest.ts -models/PushNotificationResponse.ts -models/RateLimitError.ts -models/SendPushNotification429Response.ts -models/index.ts -runtime.ts diff --git a/generated/.openapi-generator/VERSION b/generated/.openapi-generator/VERSION deleted file mode 100644 index 1985849..0000000 --- a/generated/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.7.0 diff --git a/generated/.regen-branch.txt b/generated/.regen-branch.txt new file mode 100644 index 0000000..84c8ed9 --- /dev/null +++ b/generated/.regen-branch.txt @@ -0,0 +1 @@ +regen/openapi-main diff --git a/generated/apis/LiveActivitiesApi.ts b/generated/apis/LiveActivitiesApi.ts index c839f32..42e6ad9 100644 --- a/generated/apis/LiveActivitiesApi.ts +++ b/generated/apis/LiveActivitiesApi.ts @@ -23,22 +23,6 @@ import type { LiveActivityUpdateResponse, RateLimitError, } from '../models/index'; -import { - LiveActivityEndRequestFromJSON, - LiveActivityEndRequestToJSON, - LiveActivityEndResponseFromJSON, - LiveActivityEndResponseToJSON, - LiveActivityStartRequestFromJSON, - LiveActivityStartRequestToJSON, - LiveActivityStartResponseFromJSON, - LiveActivityStartResponseToJSON, - LiveActivityUpdateRequestFromJSON, - LiveActivityUpdateRequestToJSON, - LiveActivityUpdateResponseFromJSON, - LiveActivityUpdateResponseToJSON, - RateLimitErrorFromJSON, - RateLimitErrorToJSON, -} from '../models/index'; export interface EndLiveActivityRequest { liveActivityEndRequest: LiveActivityEndRequest; @@ -77,7 +61,7 @@ export class LiveActivitiesApi extends runtime.BaseAPI { if (this.configuration && this.configuration.accessToken) { const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + const tokenString = await token("apiKeyAuth", []); if (tokenString) { headerParameters["Authorization"] = `Bearer ${tokenString}`; @@ -88,10 +72,10 @@ export class LiveActivitiesApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: LiveActivityEndRequestToJSON(requestParameters['liveActivityEndRequest']), + body: requestParameters['liveActivityEndRequest'], }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => LiveActivityEndResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response); } /** @@ -123,7 +107,7 @@ export class LiveActivitiesApi extends runtime.BaseAPI { if (this.configuration && this.configuration.accessToken) { const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + const tokenString = await token("apiKeyAuth", []); if (tokenString) { headerParameters["Authorization"] = `Bearer ${tokenString}`; @@ -134,10 +118,10 @@ export class LiveActivitiesApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: LiveActivityStartRequestToJSON(requestParameters['liveActivityStartRequest']), + body: requestParameters['liveActivityStartRequest'], }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => LiveActivityStartResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response); } /** @@ -169,7 +153,7 @@ export class LiveActivitiesApi extends runtime.BaseAPI { if (this.configuration && this.configuration.accessToken) { const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + const tokenString = await token("apiKeyAuth", []); if (tokenString) { headerParameters["Authorization"] = `Bearer ${tokenString}`; @@ -180,10 +164,10 @@ export class LiveActivitiesApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: LiveActivityUpdateRequestToJSON(requestParameters['liveActivityUpdateRequest']), + body: requestParameters['liveActivityUpdateRequest'], }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => LiveActivityUpdateResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response); } /** diff --git a/generated/apis/NotificationsApi.ts b/generated/apis/PushNotificationsApi.ts similarity index 79% rename from generated/apis/NotificationsApi.ts rename to generated/apis/PushNotificationsApi.ts index 0d74cb9..20e0d77 100644 --- a/generated/apis/NotificationsApi.ts +++ b/generated/apis/PushNotificationsApi.ts @@ -19,14 +19,6 @@ import type { PushNotificationResponse, SendPushNotification429Response, } from '../models/index'; -import { - PushNotificationRequestFromJSON, - PushNotificationRequestToJSON, - PushNotificationResponseFromJSON, - PushNotificationResponseToJSON, - SendPushNotification429ResponseFromJSON, - SendPushNotification429ResponseToJSON, -} from '../models/index'; export interface SendPushNotificationRequest { pushNotificationRequest: PushNotificationRequest; @@ -35,7 +27,7 @@ export interface SendPushNotificationRequest { /** * */ -export class NotificationsApi extends runtime.BaseAPI { +export class PushNotificationsApi extends runtime.BaseAPI { /** * Sends a push notification to every paired device in your account. @@ -57,7 +49,7 @@ export class NotificationsApi extends runtime.BaseAPI { if (this.configuration && this.configuration.accessToken) { const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + const tokenString = await token("apiKeyAuth", []); if (tokenString) { headerParameters["Authorization"] = `Bearer ${tokenString}`; @@ -68,10 +60,10 @@ export class NotificationsApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, - body: PushNotificationRequestToJSON(requestParameters['pushNotificationRequest']), + body: requestParameters['pushNotificationRequest'], }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => PushNotificationResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response); } /** diff --git a/generated/apis/index.ts b/generated/apis/index.ts index fc657de..8b4f924 100644 --- a/generated/apis/index.ts +++ b/generated/apis/index.ts @@ -1,4 +1,4 @@ /* tslint:disable */ /* eslint-disable */ export * from './LiveActivitiesApi'; -export * from './NotificationsApi'; +export * from './PushNotificationsApi'; diff --git a/generated/models/ContentStateEnd.ts b/generated/models/ContentStateEnd.ts deleted file mode 100644 index 46ba414..0000000 --- a/generated/models/ContentStateEnd.ts +++ /dev/null @@ -1,144 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * ActivitySmith API - * Send push notifications and Live Activities to your own devices via a single API key. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * End payload. Required fields are title and current_step. number_of_steps is optional. - * @export - * @interface ContentStateEnd - */ -export interface ContentStateEnd { - /** - * - * @type {string} - * @memberof ContentStateEnd - */ - title: string; - /** - * - * @type {string} - * @memberof ContentStateEnd - */ - subtitle?: string; - /** - * - * @type {number} - * @memberof ContentStateEnd - */ - numberOfSteps?: number; - /** - * - * @type {number} - * @memberof ContentStateEnd - */ - currentStep: number; - /** - * Optional. Accent color for the Live Activity. Defaults to blue. - * @type {string} - * @memberof ContentStateEnd - */ - color?: ContentStateEndColorEnum; - /** - * Optional. Overrides color for the current step. - * @type {string} - * @memberof ContentStateEnd - */ - stepColor?: ContentStateEndStepColorEnum; - /** - * Optional. Minutes before the ended Live Activity is dismissed. Default 3. Set 0 for immediate dismissal. iOS will dismiss ended Live Activities after ~4 hours max. - * @type {number} - * @memberof ContentStateEnd - */ - autoDismissMinutes?: number; -} - - -/** - * @export - */ -export const ContentStateEndColorEnum = { - Lime: 'lime', - Green: 'green', - Cyan: 'cyan', - Blue: 'blue', - Purple: 'purple', - Magenta: 'magenta', - Red: 'red', - Orange: 'orange', - Yellow: 'yellow' -} as const; -export type ContentStateEndColorEnum = typeof ContentStateEndColorEnum[keyof typeof ContentStateEndColorEnum]; - -/** - * @export - */ -export const ContentStateEndStepColorEnum = { - Lime: 'lime', - Green: 'green', - Cyan: 'cyan', - Blue: 'blue', - Purple: 'purple', - Magenta: 'magenta', - Red: 'red', - Orange: 'orange', - Yellow: 'yellow' -} as const; -export type ContentStateEndStepColorEnum = typeof ContentStateEndStepColorEnum[keyof typeof ContentStateEndStepColorEnum]; - - -/** - * Check if a given object implements the ContentStateEnd interface. - */ -export function instanceOfContentStateEnd(value: object): value is ContentStateEnd { - if (!('title' in value) || value['title'] === undefined) return false; - if (!('currentStep' in value) || value['currentStep'] === undefined) return false; - return true; -} - -export function ContentStateEndFromJSON(json: any): ContentStateEnd { - return ContentStateEndFromJSONTyped(json, false); -} - -export function ContentStateEndFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContentStateEnd { - if (json == null) { - return json; - } - return { - - 'title': json['title'], - 'subtitle': json['subtitle'] == null ? undefined : json['subtitle'], - 'numberOfSteps': json['number_of_steps'] == null ? undefined : json['number_of_steps'], - 'currentStep': json['current_step'], - 'color': json['color'] == null ? undefined : json['color'], - 'stepColor': json['step_color'] == null ? undefined : json['step_color'], - 'autoDismissMinutes': json['auto_dismiss_minutes'] == null ? undefined : json['auto_dismiss_minutes'], - }; -} - -export function ContentStateEndToJSON(value?: ContentStateEnd | null): any { - if (value == null) { - return value; - } - return { - - 'title': value['title'], - 'subtitle': value['subtitle'], - 'number_of_steps': value['numberOfSteps'], - 'current_step': value['currentStep'], - 'color': value['color'], - 'step_color': value['stepColor'], - 'auto_dismiss_minutes': value['autoDismissMinutes'], - }; -} - diff --git a/generated/models/ContentStateStart.ts b/generated/models/ContentStateStart.ts deleted file mode 100644 index f282a96..0000000 --- a/generated/models/ContentStateStart.ts +++ /dev/null @@ -1,154 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * ActivitySmith API - * Send push notifications and Live Activities to your own devices via a single API key. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Start payload requires title, number_of_steps, current_step, and type. - * @export - * @interface ContentStateStart - */ -export interface ContentStateStart { - /** - * - * @type {string} - * @memberof ContentStateStart - */ - title: string; - /** - * - * @type {string} - * @memberof ContentStateStart - */ - subtitle?: string; - /** - * - * @type {number} - * @memberof ContentStateStart - */ - numberOfSteps: number; - /** - * - * @type {number} - * @memberof ContentStateStart - */ - currentStep: number; - /** - * - * @type {string} - * @memberof ContentStateStart - */ - type: ContentStateStartTypeEnum; - /** - * Optional. Accent color for the Live Activity. Defaults to blue. - * @type {string} - * @memberof ContentStateStart - */ - color?: ContentStateStartColorEnum; - /** - * Optional. Overrides color for the current step. - * @type {string} - * @memberof ContentStateStart - */ - stepColor?: ContentStateStartStepColorEnum; -} - - -/** - * @export - */ -export const ContentStateStartTypeEnum = { - SegmentedProgress: 'segmented_progress' -} as const; -export type ContentStateStartTypeEnum = typeof ContentStateStartTypeEnum[keyof typeof ContentStateStartTypeEnum]; - -/** - * @export - */ -export const ContentStateStartColorEnum = { - Lime: 'lime', - Green: 'green', - Cyan: 'cyan', - Blue: 'blue', - Purple: 'purple', - Magenta: 'magenta', - Red: 'red', - Orange: 'orange', - Yellow: 'yellow' -} as const; -export type ContentStateStartColorEnum = typeof ContentStateStartColorEnum[keyof typeof ContentStateStartColorEnum]; - -/** - * @export - */ -export const ContentStateStartStepColorEnum = { - Lime: 'lime', - Green: 'green', - Cyan: 'cyan', - Blue: 'blue', - Purple: 'purple', - Magenta: 'magenta', - Red: 'red', - Orange: 'orange', - Yellow: 'yellow' -} as const; -export type ContentStateStartStepColorEnum = typeof ContentStateStartStepColorEnum[keyof typeof ContentStateStartStepColorEnum]; - - -/** - * Check if a given object implements the ContentStateStart interface. - */ -export function instanceOfContentStateStart(value: object): value is ContentStateStart { - if (!('title' in value) || value['title'] === undefined) return false; - if (!('numberOfSteps' in value) || value['numberOfSteps'] === undefined) return false; - if (!('currentStep' in value) || value['currentStep'] === undefined) return false; - if (!('type' in value) || value['type'] === undefined) return false; - return true; -} - -export function ContentStateStartFromJSON(json: any): ContentStateStart { - return ContentStateStartFromJSONTyped(json, false); -} - -export function ContentStateStartFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContentStateStart { - if (json == null) { - return json; - } - return { - - 'title': json['title'], - 'subtitle': json['subtitle'] == null ? undefined : json['subtitle'], - 'numberOfSteps': json['number_of_steps'], - 'currentStep': json['current_step'], - 'type': json['type'], - 'color': json['color'] == null ? undefined : json['color'], - 'stepColor': json['step_color'] == null ? undefined : json['step_color'], - }; -} - -export function ContentStateStartToJSON(value?: ContentStateStart | null): any { - if (value == null) { - return value; - } - return { - - 'title': value['title'], - 'subtitle': value['subtitle'], - 'number_of_steps': value['numberOfSteps'], - 'current_step': value['currentStep'], - 'type': value['type'], - 'color': value['color'], - 'step_color': value['stepColor'], - }; -} - diff --git a/generated/models/ContentStateUpdate.ts b/generated/models/ContentStateUpdate.ts deleted file mode 100644 index 9f2fc12..0000000 --- a/generated/models/ContentStateUpdate.ts +++ /dev/null @@ -1,136 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * ActivitySmith API - * Send push notifications and Live Activities to your own devices via a single API key. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Update payload. Required fields are title and current_step. number_of_steps is optional. - * @export - * @interface ContentStateUpdate - */ -export interface ContentStateUpdate { - /** - * - * @type {string} - * @memberof ContentStateUpdate - */ - title: string; - /** - * - * @type {string} - * @memberof ContentStateUpdate - */ - subtitle?: string; - /** - * - * @type {number} - * @memberof ContentStateUpdate - */ - numberOfSteps?: number; - /** - * - * @type {number} - * @memberof ContentStateUpdate - */ - currentStep: number; - /** - * Optional. Accent color for the Live Activity. Defaults to blue. - * @type {string} - * @memberof ContentStateUpdate - */ - color?: ContentStateUpdateColorEnum; - /** - * Optional. Overrides color for the current step. - * @type {string} - * @memberof ContentStateUpdate - */ - stepColor?: ContentStateUpdateStepColorEnum; -} - - -/** - * @export - */ -export const ContentStateUpdateColorEnum = { - Lime: 'lime', - Green: 'green', - Cyan: 'cyan', - Blue: 'blue', - Purple: 'purple', - Magenta: 'magenta', - Red: 'red', - Orange: 'orange', - Yellow: 'yellow' -} as const; -export type ContentStateUpdateColorEnum = typeof ContentStateUpdateColorEnum[keyof typeof ContentStateUpdateColorEnum]; - -/** - * @export - */ -export const ContentStateUpdateStepColorEnum = { - Lime: 'lime', - Green: 'green', - Cyan: 'cyan', - Blue: 'blue', - Purple: 'purple', - Magenta: 'magenta', - Red: 'red', - Orange: 'orange', - Yellow: 'yellow' -} as const; -export type ContentStateUpdateStepColorEnum = typeof ContentStateUpdateStepColorEnum[keyof typeof ContentStateUpdateStepColorEnum]; - - -/** - * Check if a given object implements the ContentStateUpdate interface. - */ -export function instanceOfContentStateUpdate(value: object): value is ContentStateUpdate { - if (!('title' in value) || value['title'] === undefined) return false; - if (!('currentStep' in value) || value['currentStep'] === undefined) return false; - return true; -} - -export function ContentStateUpdateFromJSON(json: any): ContentStateUpdate { - return ContentStateUpdateFromJSONTyped(json, false); -} - -export function ContentStateUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContentStateUpdate { - if (json == null) { - return json; - } - return { - - 'title': json['title'], - 'subtitle': json['subtitle'] == null ? undefined : json['subtitle'], - 'numberOfSteps': json['number_of_steps'] == null ? undefined : json['number_of_steps'], - 'currentStep': json['current_step'], - 'color': json['color'] == null ? undefined : json['color'], - 'stepColor': json['step_color'] == null ? undefined : json['step_color'], - }; -} - -export function ContentStateUpdateToJSON(value?: ContentStateUpdate | null): any { - if (value == null) { - return value; - } - return { - - 'title': value['title'], - 'subtitle': value['subtitle'], - 'number_of_steps': value['numberOfSteps'], - 'current_step': value['currentStep'], - 'color': value['color'], - 'step_color': value['stepColor'], - }; -} - diff --git a/generated/models/LiveActivityEndRequest.ts b/generated/models/LiveActivityEndRequest.ts deleted file mode 100644 index 008ba35..0000000 --- a/generated/models/LiveActivityEndRequest.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * ActivitySmith API - * Send push notifications and Live Activities to your own devices via a single API key. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { ContentStateEnd } from './ContentStateEnd'; -import { - ContentStateEndFromJSON, - ContentStateEndFromJSONTyped, - ContentStateEndToJSON, -} from './ContentStateEnd'; - -/** - * - * @export - * @interface LiveActivityEndRequest - */ -export interface LiveActivityEndRequest { - /** - * - * @type {string} - * @memberof LiveActivityEndRequest - */ - activityId: string; - /** - * - * @type {ContentStateEnd} - * @memberof LiveActivityEndRequest - */ - contentState: ContentStateEnd; -} - -/** - * Check if a given object implements the LiveActivityEndRequest interface. - */ -export function instanceOfLiveActivityEndRequest(value: object): value is LiveActivityEndRequest { - if (!('activityId' in value) || value['activityId'] === undefined) return false; - if (!('contentState' in value) || value['contentState'] === undefined) return false; - return true; -} - -export function LiveActivityEndRequestFromJSON(json: any): LiveActivityEndRequest { - return LiveActivityEndRequestFromJSONTyped(json, false); -} - -export function LiveActivityEndRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): LiveActivityEndRequest { - if (json == null) { - return json; - } - return { - - 'activityId': json['activity_id'], - 'contentState': ContentStateEndFromJSON(json['content_state']), - }; -} - -export function LiveActivityEndRequestToJSON(value?: LiveActivityEndRequest | null): any { - if (value == null) { - return value; - } - return { - - 'activity_id': value['activityId'], - 'content_state': ContentStateEndToJSON(value['contentState']), - }; -} - diff --git a/generated/models/LiveActivityEndResponse.ts b/generated/models/LiveActivityEndResponse.ts deleted file mode 100644 index 62e5ac6..0000000 --- a/generated/models/LiveActivityEndResponse.ts +++ /dev/null @@ -1,95 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * ActivitySmith API - * Send push notifications and Live Activities to your own devices via a single API key. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface LiveActivityEndResponse - */ -export interface LiveActivityEndResponse { - /** - * - * @type {boolean} - * @memberof LiveActivityEndResponse - */ - success: boolean; - /** - * - * @type {string} - * @memberof LiveActivityEndResponse - */ - activityId: string; - /** - * - * @type {number} - * @memberof LiveActivityEndResponse - */ - devicesQueued?: number; - /** - * - * @type {number} - * @memberof LiveActivityEndResponse - */ - devicesNotified?: number; - /** - * - * @type {Date} - * @memberof LiveActivityEndResponse - */ - timestamp: Date; -} - -/** - * Check if a given object implements the LiveActivityEndResponse interface. - */ -export function instanceOfLiveActivityEndResponse(value: object): value is LiveActivityEndResponse { - if (!('success' in value) || value['success'] === undefined) return false; - if (!('activityId' in value) || value['activityId'] === undefined) return false; - if (!('timestamp' in value) || value['timestamp'] === undefined) return false; - return true; -} - -export function LiveActivityEndResponseFromJSON(json: any): LiveActivityEndResponse { - return LiveActivityEndResponseFromJSONTyped(json, false); -} - -export function LiveActivityEndResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): LiveActivityEndResponse { - if (json == null) { - return json; - } - return { - - 'success': json['success'], - 'activityId': json['activity_id'], - 'devicesQueued': json['devices_queued'] == null ? undefined : json['devices_queued'], - 'devicesNotified': json['devices_notified'] == null ? undefined : json['devices_notified'], - 'timestamp': (new Date(json['timestamp'])), - }; -} - -export function LiveActivityEndResponseToJSON(value?: LiveActivityEndResponse | null): any { - if (value == null) { - return value; - } - return { - - 'success': value['success'], - 'activity_id': value['activityId'], - 'devices_queued': value['devicesQueued'], - 'devices_notified': value['devicesNotified'], - 'timestamp': ((value['timestamp']).toISOString()), - }; -} - diff --git a/generated/models/LiveActivityLimitError.ts b/generated/models/LiveActivityLimitError.ts deleted file mode 100644 index c3e7c36..0000000 --- a/generated/models/LiveActivityLimitError.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * ActivitySmith API - * Send push notifications and Live Activities to your own devices via a single API key. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface LiveActivityLimitError - */ -export interface LiveActivityLimitError { - /** - * - * @type {string} - * @memberof LiveActivityLimitError - */ - error: string; - /** - * - * @type {string} - * @memberof LiveActivityLimitError - */ - message: string; - /** - * - * @type {number} - * @memberof LiveActivityLimitError - */ - limit: number; - /** - * Current number of active Live Activities. - * @type {number} - * @memberof LiveActivityLimitError - */ - active: number; -} - -/** - * Check if a given object implements the LiveActivityLimitError interface. - */ -export function instanceOfLiveActivityLimitError(value: object): value is LiveActivityLimitError { - if (!('error' in value) || value['error'] === undefined) return false; - if (!('message' in value) || value['message'] === undefined) return false; - if (!('limit' in value) || value['limit'] === undefined) return false; - if (!('active' in value) || value['active'] === undefined) return false; - return true; -} - -export function LiveActivityLimitErrorFromJSON(json: any): LiveActivityLimitError { - return LiveActivityLimitErrorFromJSONTyped(json, false); -} - -export function LiveActivityLimitErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): LiveActivityLimitError { - if (json == null) { - return json; - } - return { - - 'error': json['error'], - 'message': json['message'], - 'limit': json['limit'], - 'active': json['active'], - }; -} - -export function LiveActivityLimitErrorToJSON(value?: LiveActivityLimitError | null): any { - if (value == null) { - return value; - } - return { - - 'error': value['error'], - 'message': value['message'], - 'limit': value['limit'], - 'active': value['active'], - }; -} - diff --git a/generated/models/LiveActivityStartRequest.ts b/generated/models/LiveActivityStartRequest.ts deleted file mode 100644 index 185e09e..0000000 --- a/generated/models/LiveActivityStartRequest.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * ActivitySmith API - * Send push notifications and Live Activities to your own devices via a single API key. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { ContentStateStart } from './ContentStateStart'; -import { - ContentStateStartFromJSON, - ContentStateStartFromJSONTyped, - ContentStateStartToJSON, -} from './ContentStateStart'; - -/** - * - * @export - * @interface LiveActivityStartRequest - */ -export interface LiveActivityStartRequest { - /** - * - * @type {ContentStateStart} - * @memberof LiveActivityStartRequest - */ - contentState: ContentStateStart; -} - -/** - * Check if a given object implements the LiveActivityStartRequest interface. - */ -export function instanceOfLiveActivityStartRequest(value: object): value is LiveActivityStartRequest { - if (!('contentState' in value) || value['contentState'] === undefined) return false; - return true; -} - -export function LiveActivityStartRequestFromJSON(json: any): LiveActivityStartRequest { - return LiveActivityStartRequestFromJSONTyped(json, false); -} - -export function LiveActivityStartRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): LiveActivityStartRequest { - if (json == null) { - return json; - } - return { - - 'contentState': ContentStateStartFromJSON(json['content_state']), - }; -} - -export function LiveActivityStartRequestToJSON(value?: LiveActivityStartRequest | null): any { - if (value == null) { - return value; - } - return { - - 'content_state': ContentStateStartToJSON(value['contentState']), - }; -} - diff --git a/generated/models/LiveActivityStartResponse.ts b/generated/models/LiveActivityStartResponse.ts deleted file mode 100644 index 1a9cb32..0000000 --- a/generated/models/LiveActivityStartResponse.ts +++ /dev/null @@ -1,95 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * ActivitySmith API - * Send push notifications and Live Activities to your own devices via a single API key. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface LiveActivityStartResponse - */ -export interface LiveActivityStartResponse { - /** - * - * @type {boolean} - * @memberof LiveActivityStartResponse - */ - success: boolean; - /** - * - * @type {number} - * @memberof LiveActivityStartResponse - */ - devicesNotified?: number; - /** - * - * @type {number} - * @memberof LiveActivityStartResponse - */ - usersNotified?: number; - /** - * - * @type {string} - * @memberof LiveActivityStartResponse - */ - activityId: string; - /** - * - * @type {Date} - * @memberof LiveActivityStartResponse - */ - timestamp: Date; -} - -/** - * Check if a given object implements the LiveActivityStartResponse interface. - */ -export function instanceOfLiveActivityStartResponse(value: object): value is LiveActivityStartResponse { - if (!('success' in value) || value['success'] === undefined) return false; - if (!('activityId' in value) || value['activityId'] === undefined) return false; - if (!('timestamp' in value) || value['timestamp'] === undefined) return false; - return true; -} - -export function LiveActivityStartResponseFromJSON(json: any): LiveActivityStartResponse { - return LiveActivityStartResponseFromJSONTyped(json, false); -} - -export function LiveActivityStartResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): LiveActivityStartResponse { - if (json == null) { - return json; - } - return { - - 'success': json['success'], - 'devicesNotified': json['devices_notified'] == null ? undefined : json['devices_notified'], - 'usersNotified': json['users_notified'] == null ? undefined : json['users_notified'], - 'activityId': json['activity_id'], - 'timestamp': (new Date(json['timestamp'])), - }; -} - -export function LiveActivityStartResponseToJSON(value?: LiveActivityStartResponse | null): any { - if (value == null) { - return value; - } - return { - - 'success': value['success'], - 'devices_notified': value['devicesNotified'], - 'users_notified': value['usersNotified'], - 'activity_id': value['activityId'], - 'timestamp': ((value['timestamp']).toISOString()), - }; -} - diff --git a/generated/models/LiveActivityUpdateRequest.ts b/generated/models/LiveActivityUpdateRequest.ts deleted file mode 100644 index ed99be9..0000000 --- a/generated/models/LiveActivityUpdateRequest.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * ActivitySmith API - * Send push notifications and Live Activities to your own devices via a single API key. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { ContentStateUpdate } from './ContentStateUpdate'; -import { - ContentStateUpdateFromJSON, - ContentStateUpdateFromJSONTyped, - ContentStateUpdateToJSON, -} from './ContentStateUpdate'; - -/** - * - * @export - * @interface LiveActivityUpdateRequest - */ -export interface LiveActivityUpdateRequest { - /** - * - * @type {string} - * @memberof LiveActivityUpdateRequest - */ - activityId: string; - /** - * - * @type {ContentStateUpdate} - * @memberof LiveActivityUpdateRequest - */ - contentState: ContentStateUpdate; -} - -/** - * Check if a given object implements the LiveActivityUpdateRequest interface. - */ -export function instanceOfLiveActivityUpdateRequest(value: object): value is LiveActivityUpdateRequest { - if (!('activityId' in value) || value['activityId'] === undefined) return false; - if (!('contentState' in value) || value['contentState'] === undefined) return false; - return true; -} - -export function LiveActivityUpdateRequestFromJSON(json: any): LiveActivityUpdateRequest { - return LiveActivityUpdateRequestFromJSONTyped(json, false); -} - -export function LiveActivityUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): LiveActivityUpdateRequest { - if (json == null) { - return json; - } - return { - - 'activityId': json['activity_id'], - 'contentState': ContentStateUpdateFromJSON(json['content_state']), - }; -} - -export function LiveActivityUpdateRequestToJSON(value?: LiveActivityUpdateRequest | null): any { - if (value == null) { - return value; - } - return { - - 'activity_id': value['activityId'], - 'content_state': ContentStateUpdateToJSON(value['contentState']), - }; -} - diff --git a/generated/models/LiveActivityUpdateResponse.ts b/generated/models/LiveActivityUpdateResponse.ts deleted file mode 100644 index 3950264..0000000 --- a/generated/models/LiveActivityUpdateResponse.ts +++ /dev/null @@ -1,95 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * ActivitySmith API - * Send push notifications and Live Activities to your own devices via a single API key. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface LiveActivityUpdateResponse - */ -export interface LiveActivityUpdateResponse { - /** - * - * @type {boolean} - * @memberof LiveActivityUpdateResponse - */ - success: boolean; - /** - * - * @type {string} - * @memberof LiveActivityUpdateResponse - */ - activityId: string; - /** - * - * @type {number} - * @memberof LiveActivityUpdateResponse - */ - devicesQueued?: number; - /** - * - * @type {number} - * @memberof LiveActivityUpdateResponse - */ - devicesNotified?: number; - /** - * - * @type {Date} - * @memberof LiveActivityUpdateResponse - */ - timestamp: Date; -} - -/** - * Check if a given object implements the LiveActivityUpdateResponse interface. - */ -export function instanceOfLiveActivityUpdateResponse(value: object): value is LiveActivityUpdateResponse { - if (!('success' in value) || value['success'] === undefined) return false; - if (!('activityId' in value) || value['activityId'] === undefined) return false; - if (!('timestamp' in value) || value['timestamp'] === undefined) return false; - return true; -} - -export function LiveActivityUpdateResponseFromJSON(json: any): LiveActivityUpdateResponse { - return LiveActivityUpdateResponseFromJSONTyped(json, false); -} - -export function LiveActivityUpdateResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): LiveActivityUpdateResponse { - if (json == null) { - return json; - } - return { - - 'success': json['success'], - 'activityId': json['activity_id'], - 'devicesQueued': json['devices_queued'] == null ? undefined : json['devices_queued'], - 'devicesNotified': json['devices_notified'] == null ? undefined : json['devices_notified'], - 'timestamp': (new Date(json['timestamp'])), - }; -} - -export function LiveActivityUpdateResponseToJSON(value?: LiveActivityUpdateResponse | null): any { - if (value == null) { - return value; - } - return { - - 'success': value['success'], - 'activity_id': value['activityId'], - 'devices_queued': value['devicesQueued'], - 'devices_notified': value['devicesNotified'], - 'timestamp': ((value['timestamp']).toISOString()), - }; -} - diff --git a/generated/models/PushNotificationRequest.ts b/generated/models/PushNotificationRequest.ts deleted file mode 100644 index 71ea5fe..0000000 --- a/generated/models/PushNotificationRequest.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * ActivitySmith API - * Send push notifications and Live Activities to your own devices via a single API key. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface PushNotificationRequest - */ -export interface PushNotificationRequest { - /** - * - * @type {string} - * @memberof PushNotificationRequest - */ - title: string; - /** - * - * @type {string} - * @memberof PushNotificationRequest - */ - message?: string; - /** - * - * @type {string} - * @memberof PushNotificationRequest - */ - subtitle?: string; -} - -/** - * Check if a given object implements the PushNotificationRequest interface. - */ -export function instanceOfPushNotificationRequest(value: object): value is PushNotificationRequest { - if (!('title' in value) || value['title'] === undefined) return false; - return true; -} - -export function PushNotificationRequestFromJSON(json: any): PushNotificationRequest { - return PushNotificationRequestFromJSONTyped(json, false); -} - -export function PushNotificationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PushNotificationRequest { - if (json == null) { - return json; - } - return { - - 'title': json['title'], - 'message': json['message'] == null ? undefined : json['message'], - 'subtitle': json['subtitle'] == null ? undefined : json['subtitle'], - }; -} - -export function PushNotificationRequestToJSON(value?: PushNotificationRequest | null): any { - if (value == null) { - return value; - } - return { - - 'title': value['title'], - 'message': value['message'], - 'subtitle': value['subtitle'], - }; -} - diff --git a/generated/models/PushNotificationResponse.ts b/generated/models/PushNotificationResponse.ts deleted file mode 100644 index ee7ca34..0000000 --- a/generated/models/PushNotificationResponse.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * ActivitySmith API - * Send push notifications and Live Activities to your own devices via a single API key. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface PushNotificationResponse - */ -export interface PushNotificationResponse { - /** - * - * @type {boolean} - * @memberof PushNotificationResponse - */ - success: boolean; - /** - * - * @type {number} - * @memberof PushNotificationResponse - */ - devicesNotified?: number; - /** - * - * @type {number} - * @memberof PushNotificationResponse - */ - usersNotified?: number; - /** - * - * @type {Date} - * @memberof PushNotificationResponse - */ - timestamp: Date; -} - -/** - * Check if a given object implements the PushNotificationResponse interface. - */ -export function instanceOfPushNotificationResponse(value: object): value is PushNotificationResponse { - if (!('success' in value) || value['success'] === undefined) return false; - if (!('timestamp' in value) || value['timestamp'] === undefined) return false; - return true; -} - -export function PushNotificationResponseFromJSON(json: any): PushNotificationResponse { - return PushNotificationResponseFromJSONTyped(json, false); -} - -export function PushNotificationResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PushNotificationResponse { - if (json == null) { - return json; - } - return { - - 'success': json['success'], - 'devicesNotified': json['devices_notified'] == null ? undefined : json['devices_notified'], - 'usersNotified': json['users_notified'] == null ? undefined : json['users_notified'], - 'timestamp': (new Date(json['timestamp'])), - }; -} - -export function PushNotificationResponseToJSON(value?: PushNotificationResponse | null): any { - if (value == null) { - return value; - } - return { - - 'success': value['success'], - 'devices_notified': value['devicesNotified'], - 'users_notified': value['usersNotified'], - 'timestamp': ((value['timestamp']).toISOString()), - }; -} - diff --git a/generated/models/RateLimitError.ts b/generated/models/RateLimitError.ts deleted file mode 100644 index 397c52c..0000000 --- a/generated/models/RateLimitError.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * ActivitySmith API - * Send push notifications and Live Activities to your own devices via a single API key. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface RateLimitError - */ -export interface RateLimitError { - /** - * - * @type {string} - * @memberof RateLimitError - */ - error: string; - /** - * - * @type {string} - * @memberof RateLimitError - */ - message: string; -} - -/** - * Check if a given object implements the RateLimitError interface. - */ -export function instanceOfRateLimitError(value: object): value is RateLimitError { - if (!('error' in value) || value['error'] === undefined) return false; - if (!('message' in value) || value['message'] === undefined) return false; - return true; -} - -export function RateLimitErrorFromJSON(json: any): RateLimitError { - return RateLimitErrorFromJSONTyped(json, false); -} - -export function RateLimitErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): RateLimitError { - if (json == null) { - return json; - } - return { - - 'error': json['error'], - 'message': json['message'], - }; -} - -export function RateLimitErrorToJSON(value?: RateLimitError | null): any { - if (value == null) { - return value; - } - return { - - 'error': value['error'], - 'message': value['message'], - }; -} - diff --git a/generated/models/SendPushNotification429Response.ts b/generated/models/SendPushNotification429Response.ts deleted file mode 100644 index 07d4edb..0000000 --- a/generated/models/SendPushNotification429Response.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * ActivitySmith API - * Send push notifications and Live Activities to your own devices via a single API key. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import type { LiveActivityLimitError } from './LiveActivityLimitError'; -import { - instanceOfLiveActivityLimitError, - LiveActivityLimitErrorFromJSON, - LiveActivityLimitErrorFromJSONTyped, - LiveActivityLimitErrorToJSON, -} from './LiveActivityLimitError'; -import type { RateLimitError } from './RateLimitError'; -import { - instanceOfRateLimitError, - RateLimitErrorFromJSON, - RateLimitErrorFromJSONTyped, - RateLimitErrorToJSON, -} from './RateLimitError'; - -/** - * @type SendPushNotification429Response - * - * @export - */ -export type SendPushNotification429Response = LiveActivityLimitError | RateLimitError; - -export function SendPushNotification429ResponseFromJSON(json: any): SendPushNotification429Response { - return SendPushNotification429ResponseFromJSONTyped(json, false); -} - -export function SendPushNotification429ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendPushNotification429Response { - if (json == null) { - return json; - } - if (instanceOfLiveActivityLimitError(json)) { - return LiveActivityLimitErrorFromJSONTyped(json, true); - } - if (instanceOfRateLimitError(json)) { - return RateLimitErrorFromJSONTyped(json, true); - } -} - -export function SendPushNotification429ResponseToJSON(value?: SendPushNotification429Response | null): any { - if (value == null) { - return value; - } - - if (instanceOfLiveActivityLimitError(value)) { - return LiveActivityLimitErrorToJSON(value as LiveActivityLimitError); - } - if (instanceOfRateLimitError(value)) { - return RateLimitErrorToJSON(value as RateLimitError); - } - - return {}; -} - diff --git a/generated/models/index.ts b/generated/models/index.ts index e9b597e..7f669a0 100644 --- a/generated/models/index.ts +++ b/generated/models/index.ts @@ -1,16 +1,527 @@ /* tslint:disable */ /* eslint-disable */ -export * from './ContentStateEnd'; -export * from './ContentStateStart'; -export * from './ContentStateUpdate'; -export * from './LiveActivityEndRequest'; -export * from './LiveActivityEndResponse'; -export * from './LiveActivityLimitError'; -export * from './LiveActivityStartRequest'; -export * from './LiveActivityStartResponse'; -export * from './LiveActivityUpdateRequest'; -export * from './LiveActivityUpdateResponse'; -export * from './PushNotificationRequest'; -export * from './PushNotificationResponse'; -export * from './RateLimitError'; -export * from './SendPushNotification429Response'; +/** + * End payload. Required fields are title and current_step. number_of_steps is optional. + * @export + * @interface ContentStateEnd + */ +export interface ContentStateEnd { + /** + * + * @type {string} + * @memberof ContentStateEnd + */ + title: string; + /** + * + * @type {string} + * @memberof ContentStateEnd + */ + subtitle?: string; + /** + * + * @type {number} + * @memberof ContentStateEnd + */ + number_of_steps?: number; + /** + * + * @type {number} + * @memberof ContentStateEnd + */ + current_step: number; + /** + * Optional. Accent color for the Live Activity. Defaults to blue. + * @type {string} + * @memberof ContentStateEnd + */ + color?: ContentStateEndColorEnum; + /** + * Optional. Overrides color for the current step. + * @type {string} + * @memberof ContentStateEnd + */ + step_color?: ContentStateEndStepColorEnum; + /** + * Optional. Minutes before the ended Live Activity is dismissed. Default 3. Set 0 for immediate dismissal. iOS will dismiss ended Live Activities after ~4 hours max. + * @type {number} + * @memberof ContentStateEnd + */ + auto_dismiss_minutes?: number; +} + + +/** + * @export + */ +export const ContentStateEndColorEnum = { + Lime: 'lime', + Green: 'green', + Cyan: 'cyan', + Blue: 'blue', + Purple: 'purple', + Magenta: 'magenta', + Red: 'red', + Orange: 'orange', + Yellow: 'yellow' +} as const; +export type ContentStateEndColorEnum = typeof ContentStateEndColorEnum[keyof typeof ContentStateEndColorEnum]; + +/** + * @export + */ +export const ContentStateEndStepColorEnum = { + Lime: 'lime', + Green: 'green', + Cyan: 'cyan', + Blue: 'blue', + Purple: 'purple', + Magenta: 'magenta', + Red: 'red', + Orange: 'orange', + Yellow: 'yellow' +} as const; +export type ContentStateEndStepColorEnum = typeof ContentStateEndStepColorEnum[keyof typeof ContentStateEndStepColorEnum]; + +/** + * Start payload requires title, number_of_steps, current_step, and type. + * @export + * @interface ContentStateStart + */ +export interface ContentStateStart { + /** + * + * @type {string} + * @memberof ContentStateStart + */ + title: string; + /** + * + * @type {string} + * @memberof ContentStateStart + */ + subtitle?: string; + /** + * + * @type {number} + * @memberof ContentStateStart + */ + number_of_steps: number; + /** + * + * @type {number} + * @memberof ContentStateStart + */ + current_step: number; + /** + * + * @type {string} + * @memberof ContentStateStart + */ + type: ContentStateStartTypeEnum; + /** + * Optional. Accent color for the Live Activity. Defaults to blue. + * @type {string} + * @memberof ContentStateStart + */ + color?: ContentStateStartColorEnum; + /** + * Optional. Overrides color for the current step. + * @type {string} + * @memberof ContentStateStart + */ + step_color?: ContentStateStartStepColorEnum; +} + + +/** + * @export + */ +export const ContentStateStartTypeEnum = { + SegmentedProgress: 'segmented_progress' +} as const; +export type ContentStateStartTypeEnum = typeof ContentStateStartTypeEnum[keyof typeof ContentStateStartTypeEnum]; + +/** + * @export + */ +export const ContentStateStartColorEnum = { + Lime: 'lime', + Green: 'green', + Cyan: 'cyan', + Blue: 'blue', + Purple: 'purple', + Magenta: 'magenta', + Red: 'red', + Orange: 'orange', + Yellow: 'yellow' +} as const; +export type ContentStateStartColorEnum = typeof ContentStateStartColorEnum[keyof typeof ContentStateStartColorEnum]; + +/** + * @export + */ +export const ContentStateStartStepColorEnum = { + Lime: 'lime', + Green: 'green', + Cyan: 'cyan', + Blue: 'blue', + Purple: 'purple', + Magenta: 'magenta', + Red: 'red', + Orange: 'orange', + Yellow: 'yellow' +} as const; +export type ContentStateStartStepColorEnum = typeof ContentStateStartStepColorEnum[keyof typeof ContentStateStartStepColorEnum]; + +/** + * Update payload. Required fields are title and current_step. number_of_steps is optional. + * @export + * @interface ContentStateUpdate + */ +export interface ContentStateUpdate { + /** + * + * @type {string} + * @memberof ContentStateUpdate + */ + title: string; + /** + * + * @type {string} + * @memberof ContentStateUpdate + */ + subtitle?: string; + /** + * + * @type {number} + * @memberof ContentStateUpdate + */ + number_of_steps?: number; + /** + * + * @type {number} + * @memberof ContentStateUpdate + */ + current_step: number; + /** + * Optional. Accent color for the Live Activity. Defaults to blue. + * @type {string} + * @memberof ContentStateUpdate + */ + color?: ContentStateUpdateColorEnum; + /** + * Optional. Overrides color for the current step. + * @type {string} + * @memberof ContentStateUpdate + */ + step_color?: ContentStateUpdateStepColorEnum; +} + + +/** + * @export + */ +export const ContentStateUpdateColorEnum = { + Lime: 'lime', + Green: 'green', + Cyan: 'cyan', + Blue: 'blue', + Purple: 'purple', + Magenta: 'magenta', + Red: 'red', + Orange: 'orange', + Yellow: 'yellow' +} as const; +export type ContentStateUpdateColorEnum = typeof ContentStateUpdateColorEnum[keyof typeof ContentStateUpdateColorEnum]; + +/** + * @export + */ +export const ContentStateUpdateStepColorEnum = { + Lime: 'lime', + Green: 'green', + Cyan: 'cyan', + Blue: 'blue', + Purple: 'purple', + Magenta: 'magenta', + Red: 'red', + Orange: 'orange', + Yellow: 'yellow' +} as const; +export type ContentStateUpdateStepColorEnum = typeof ContentStateUpdateStepColorEnum[keyof typeof ContentStateUpdateStepColorEnum]; + +/** + * + * @export + * @interface LiveActivityEndRequest + */ +export interface LiveActivityEndRequest { + /** + * + * @type {string} + * @memberof LiveActivityEndRequest + */ + activity_id: string; + /** + * + * @type {ContentStateEnd} + * @memberof LiveActivityEndRequest + */ + content_state: ContentStateEnd; +} +/** + * + * @export + * @interface LiveActivityEndResponse + */ +export interface LiveActivityEndResponse { + /** + * + * @type {boolean} + * @memberof LiveActivityEndResponse + */ + success: boolean; + /** + * + * @type {string} + * @memberof LiveActivityEndResponse + */ + activity_id: string; + /** + * + * @type {number} + * @memberof LiveActivityEndResponse + */ + devices_queued?: number; + /** + * + * @type {number} + * @memberof LiveActivityEndResponse + */ + devices_notified?: number; + /** + * + * @type {string} + * @memberof LiveActivityEndResponse + */ + timestamp: string; +} +/** + * + * @export + * @interface LiveActivityLimitError + */ +export interface LiveActivityLimitError { + /** + * + * @type {string} + * @memberof LiveActivityLimitError + */ + error: string; + /** + * + * @type {string} + * @memberof LiveActivityLimitError + */ + message: string; + /** + * + * @type {number} + * @memberof LiveActivityLimitError + */ + limit: number; + /** + * Current number of active Live Activities. + * @type {number} + * @memberof LiveActivityLimitError + */ + active: number; +} +/** + * + * @export + * @interface LiveActivityStartRequest + */ +export interface LiveActivityStartRequest { + /** + * + * @type {ContentStateStart} + * @memberof LiveActivityStartRequest + */ + content_state: ContentStateStart; +} +/** + * + * @export + * @interface LiveActivityStartResponse + */ +export interface LiveActivityStartResponse { + /** + * + * @type {boolean} + * @memberof LiveActivityStartResponse + */ + success: boolean; + /** + * + * @type {number} + * @memberof LiveActivityStartResponse + */ + devices_notified?: number; + /** + * + * @type {number} + * @memberof LiveActivityStartResponse + */ + users_notified?: number; + /** + * + * @type {string} + * @memberof LiveActivityStartResponse + */ + activity_id: string; + /** + * + * @type {string} + * @memberof LiveActivityStartResponse + */ + timestamp: string; +} +/** + * + * @export + * @interface LiveActivityUpdateRequest + */ +export interface LiveActivityUpdateRequest { + /** + * + * @type {string} + * @memberof LiveActivityUpdateRequest + */ + activity_id: string; + /** + * + * @type {ContentStateUpdate} + * @memberof LiveActivityUpdateRequest + */ + content_state: ContentStateUpdate; +} +/** + * + * @export + * @interface LiveActivityUpdateResponse + */ +export interface LiveActivityUpdateResponse { + /** + * + * @type {boolean} + * @memberof LiveActivityUpdateResponse + */ + success: boolean; + /** + * + * @type {string} + * @memberof LiveActivityUpdateResponse + */ + activity_id: string; + /** + * + * @type {number} + * @memberof LiveActivityUpdateResponse + */ + devices_queued?: number; + /** + * + * @type {number} + * @memberof LiveActivityUpdateResponse + */ + devices_notified?: number; + /** + * + * @type {string} + * @memberof LiveActivityUpdateResponse + */ + timestamp: string; +} +/** + * + * @export + * @interface PushNotificationRequest + */ +export interface PushNotificationRequest { + /** + * + * @type {string} + * @memberof PushNotificationRequest + */ + title: string; + /** + * + * @type {string} + * @memberof PushNotificationRequest + */ + message?: string; + /** + * + * @type {string} + * @memberof PushNotificationRequest + */ + subtitle?: string; +} +/** + * + * @export + * @interface PushNotificationResponse + */ +export interface PushNotificationResponse { + /** + * + * @type {boolean} + * @memberof PushNotificationResponse + */ + success: boolean; + /** + * + * @type {number} + * @memberof PushNotificationResponse + */ + devices_notified?: number; + /** + * + * @type {number} + * @memberof PushNotificationResponse + */ + users_notified?: number; + /** + * + * @type {string} + * @memberof PushNotificationResponse + */ + timestamp: string; +} +/** + * + * @export + * @interface RateLimitError + */ +export interface RateLimitError { + /** + * + * @type {string} + * @memberof RateLimitError + */ + error: string; + /** + * + * @type {string} + * @memberof RateLimitError + */ + message: string; +} +/** + * @type SendPushNotification429Response + * + * @export + */ +export type SendPushNotification429Response = LiveActivityLimitError | RateLimitError; diff --git a/generated/runtime.ts b/generated/runtime.ts index 4ff08cf..cbecbbe 100644 --- a/generated/runtime.ts +++ b/generated/runtime.ts @@ -337,12 +337,6 @@ function querystringSingleKey(key: string, value: string | number | null | undef return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; } -export function mapValues(data: any, fn: (item: any) => any) { - return Object.keys(data).reduce( - (acc, key) => ({ ...acc, [key]: fn(data[key]) }), - {} - ); -} export function canConsumeForm(consumes: Consume[]): boolean { for (const consume of consumes) {