From d331e0dff3bc55d8cd456e5adee95412cfc00e95 Mon Sep 17 00:00:00 2001 From: advaith Date: Fri, 29 Apr 2022 14:20:00 -0700 Subject: [PATCH] chore(ActivityPlatform): update platform enum and mark it as unstable (#404) * chore(ActivityPlatform): update platform enum * chore: descs and @unstable --- deno/payloads/v10/gateway.ts | 25 +++++++++++++++++++++++-- deno/payloads/v9/gateway.ts | 16 ++++++++++++++-- payloads/v10/gateway.ts | 25 +++++++++++++++++++++++-- payloads/v9/gateway.ts | 16 ++++++++++++++-- 4 files changed, 74 insertions(+), 8 deletions(-) diff --git a/deno/payloads/v10/gateway.ts b/deno/payloads/v10/gateway.ts index cb75484b..8999476f 100644 --- a/deno/payloads/v10/gateway.ts +++ b/deno/payloads/v10/gateway.ts @@ -127,6 +127,7 @@ export interface GatewayPresenceClientStatus { export interface GatewayActivity { /** * The activity's id + * @unstable */ id: string; /** @@ -151,8 +152,16 @@ export interface GatewayActivity { * Unix timestamps for start and/or end of the game */ timestamps?: GatewayActivityTimestamps; + /** + * The Spotify song id + * @unstable + */ sync_id?: string; - platform?: ActivityPlatform; + /** + * The platform this activity is being done on + * @unstable You can use {@link ActivityPlatform} as a stepping stone, but this might be inaccurate + */ + platform?: string; /** * Application id for the game */ @@ -171,6 +180,9 @@ export interface GatewayActivity { * See https://discord.com/developers/docs/topics/gateway#activity-object-activity-emoji */ emoji?: GatewayActivityEmoji; + /** + * @unstable + */ session_id?: string; /** * Information for the current party of the player @@ -208,10 +220,19 @@ export interface GatewayActivity { buttons?: string[] | GatewayActivityButton[]; } +/** + * @unstable This enum is currently not documented by Discord but has known values which we will try to keep up to date. + * Values might be added or removed without a major version bump. + */ export enum ActivityPlatform { Desktop = 'desktop', - Samsung = 'samsung', Xbox = 'xbox', + Samsung = 'samsung', + IOS = 'ios', + Android = 'android', + Embedded = 'embedded', + PS4 = 'ps4', + PS5 = 'ps5', } /** diff --git a/deno/payloads/v9/gateway.ts b/deno/payloads/v9/gateway.ts index cb75484b..78d3665a 100644 --- a/deno/payloads/v9/gateway.ts +++ b/deno/payloads/v9/gateway.ts @@ -152,7 +152,10 @@ export interface GatewayActivity { */ timestamps?: GatewayActivityTimestamps; sync_id?: string; - platform?: ActivityPlatform; + /** + * {@link ActivityPlatform} + */ + platform?: string; /** * Application id for the game */ @@ -208,10 +211,19 @@ export interface GatewayActivity { buttons?: string[] | GatewayActivityButton[]; } +/** + * @unstable This enum is currently not documented by Discord but has known values which we will try to keep up to date. + * Values might be added or removed without a major version bump. + */ export enum ActivityPlatform { Desktop = 'desktop', - Samsung = 'samsung', Xbox = 'xbox', + Samsung = 'samsung', + IOS = 'ios', + Android = 'android', + Embedded = 'embedded', + PS4 = 'ps4', + PS5 = 'ps5', } /** diff --git a/payloads/v10/gateway.ts b/payloads/v10/gateway.ts index 131fff6f..c3f37ba7 100644 --- a/payloads/v10/gateway.ts +++ b/payloads/v10/gateway.ts @@ -127,6 +127,7 @@ export interface GatewayPresenceClientStatus { export interface GatewayActivity { /** * The activity's id + * @unstable */ id: string; /** @@ -151,8 +152,16 @@ export interface GatewayActivity { * Unix timestamps for start and/or end of the game */ timestamps?: GatewayActivityTimestamps; + /** + * The Spotify song id + * @unstable + */ sync_id?: string; - platform?: ActivityPlatform; + /** + * The platform this activity is being done on + * @unstable You can use {@link ActivityPlatform} as a stepping stone, but this might be inaccurate + */ + platform?: string; /** * Application id for the game */ @@ -171,6 +180,9 @@ export interface GatewayActivity { * See https://discord.com/developers/docs/topics/gateway#activity-object-activity-emoji */ emoji?: GatewayActivityEmoji; + /** + * @unstable + */ session_id?: string; /** * Information for the current party of the player @@ -208,10 +220,19 @@ export interface GatewayActivity { buttons?: string[] | GatewayActivityButton[]; } +/** + * @unstable This enum is currently not documented by Discord but has known values which we will try to keep up to date. + * Values might be added or removed without a major version bump. + */ export enum ActivityPlatform { Desktop = 'desktop', - Samsung = 'samsung', Xbox = 'xbox', + Samsung = 'samsung', + IOS = 'ios', + Android = 'android', + Embedded = 'embedded', + PS4 = 'ps4', + PS5 = 'ps5', } /** diff --git a/payloads/v9/gateway.ts b/payloads/v9/gateway.ts index 131fff6f..6d38e289 100644 --- a/payloads/v9/gateway.ts +++ b/payloads/v9/gateway.ts @@ -152,7 +152,10 @@ export interface GatewayActivity { */ timestamps?: GatewayActivityTimestamps; sync_id?: string; - platform?: ActivityPlatform; + /** + * {@link ActivityPlatform} + */ + platform?: string; /** * Application id for the game */ @@ -208,10 +211,19 @@ export interface GatewayActivity { buttons?: string[] | GatewayActivityButton[]; } +/** + * @unstable This enum is currently not documented by Discord but has known values which we will try to keep up to date. + * Values might be added or removed without a major version bump. + */ export enum ActivityPlatform { Desktop = 'desktop', - Samsung = 'samsung', Xbox = 'xbox', + Samsung = 'samsung', + IOS = 'ios', + Android = 'android', + Embedded = 'embedded', + PS4 = 'ps4', + PS5 = 'ps5', } /**