glitch-javascript-sdk 3.8.1 → 3.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -89,6 +89,66 @@ export interface DiscordMediaImportResponse {
89
89
  }>;
90
90
  attachments: DiscordMediaImportAttachmentResult[];
91
91
  }
92
+ export interface DiscordUserCommandStatus {
93
+ linked: boolean;
94
+ linked_to_this_scheduler: boolean;
95
+ discord_username?: string | null;
96
+ destination_scheduler_id?: string | null;
97
+ destination_scheduler_name?: string | null;
98
+ installed_at?: string | null;
99
+ pending_count: number;
100
+ command_name: string;
101
+ setup_path: string;
102
+ configured: boolean;
103
+ }
104
+ export type DiscordMediaCaptureStatus = 'processing' | 'ready' | 'complete' | 'failed' | 'expired';
105
+ export type DiscordMediaCaptureAttachmentStatus = 'processing' | 'ready' | 'duplicate' | 'unsupported' | 'failed' | 'imported';
106
+ export interface DiscordMediaCaptureAttachment {
107
+ id: string;
108
+ discord_attachment_id: string;
109
+ filename: string;
110
+ mime_type?: string | null;
111
+ media_type: 'image' | 'video';
112
+ size: number;
113
+ width?: number | null;
114
+ height?: number | null;
115
+ duration_secs?: number | null;
116
+ description?: string | null;
117
+ status: DiscordMediaCaptureAttachmentStatus;
118
+ failure_reason?: string | null;
119
+ preview_url?: string | null;
120
+ media_id?: string | null;
121
+ title_update_id?: string | null;
122
+ }
123
+ export interface DiscordMediaCapture {
124
+ id: string;
125
+ status: DiscordMediaCaptureStatus;
126
+ content?: string | null;
127
+ author?: {
128
+ id?: string | null;
129
+ username: string;
130
+ avatar?: string | null;
131
+ bot: boolean;
132
+ } | null;
133
+ timestamp?: string | null;
134
+ jump_url?: string | null;
135
+ expires_at: string;
136
+ failure_reason?: string | null;
137
+ attachments: DiscordMediaCaptureAttachment[];
138
+ }
139
+ export interface DiscordMediaCaptureListParams {
140
+ cursor?: string;
141
+ search?: string;
142
+ limit?: number;
143
+ }
144
+ export interface DiscordMediaCaptureListResponse {
145
+ items: DiscordMediaCapture[];
146
+ next_cursor?: string | null;
147
+ }
148
+ export interface DiscordMediaCaptureImportRequest {
149
+ capture_id: string;
150
+ attachment_ids: string[];
151
+ }
92
152
  declare class Scheduler {
93
153
  /**
94
154
  * List promotion schedules.
@@ -410,6 +470,16 @@ declare class Scheduler {
410
470
  * Library updates. Attachments selected from one message stay grouped.
411
471
  */
412
472
  static importDiscordMedia<T = DiscordMediaImportResponse>(scheduler_id: string, data: DiscordMediaImportRequest, params?: Record<string, any>): AxiosPromise<Response<T>>;
473
+ /** Get the current user's personal Save to Glitch command setup state. */
474
+ static getDiscordUserCommandStatus<T = DiscordUserCommandStatus>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
475
+ /** Disconnect the current user's personal command from this Library. */
476
+ static disconnectDiscordUserCommand<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
477
+ /** List messages saved through the user-installed Discord command. */
478
+ static listDiscordMediaCaptures<T = DiscordMediaCaptureListResponse>(scheduler_id: string, params?: DiscordMediaCaptureListParams): AxiosPromise<Response<T>>;
479
+ /** Import selected staged attachments into pending Library content. */
480
+ static importDiscordMediaCapture<T = DiscordMediaImportResponse>(scheduler_id: string, data: DiscordMediaCaptureImportRequest, params?: Record<string, any>): AxiosPromise<Response<T>>;
481
+ /** Dismiss one saved Discord message and delete its temporary staged files. */
482
+ static dismissDiscordMediaCapture<T>(scheduler_id: string, capture_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
413
483
  /**
414
484
  * Clear Google Ads OAuth credentials from a promotion schedule.
415
485
  *
package/dist/esm/index.js CHANGED
@@ -16259,6 +16259,11 @@ var SchedulerRoute = /** @class */ (function () {
16259
16259
  getDiscordChannels: { url: '/schedulers/{scheduler_id}/discord/channels', method: HTTP_METHODS.GET },
16260
16260
  searchDiscordMedia: { url: '/schedulers/{scheduler_id}/discord/media', method: HTTP_METHODS.GET },
16261
16261
  importDiscordMedia: { url: '/schedulers/{scheduler_id}/discord/media/import', method: HTTP_METHODS.POST },
16262
+ getDiscordUserCommandStatus: { url: '/schedulers/{scheduler_id}/discord/user-command', method: HTTP_METHODS.GET },
16263
+ disconnectDiscordUserCommand: { url: '/schedulers/{scheduler_id}/discord/user-command', method: HTTP_METHODS.DELETE },
16264
+ listDiscordMediaCaptures: { url: '/schedulers/{scheduler_id}/discord/captures', method: HTTP_METHODS.GET },
16265
+ importDiscordMediaCapture: { url: '/schedulers/{scheduler_id}/discord/captures/import', method: HTTP_METHODS.POST },
16266
+ dismissDiscordMediaCapture: { url: '/schedulers/{scheduler_id}/discord/captures/{capture_id}', method: HTTP_METHODS.DELETE },
16262
16267
  crossPromoteListRelationships: {
16263
16268
  url: '/schedulers/{scheduler_id}/crosspromote/relationships',
16264
16269
  method: HTTP_METHODS.GET
@@ -16770,6 +16775,26 @@ var Scheduler = /** @class */ (function () {
16770
16775
  Scheduler.importDiscordMedia = function (scheduler_id, data, params) {
16771
16776
  return Requests.processRoute(SchedulerRoute.routes.importDiscordMedia, data, { scheduler_id: scheduler_id }, params);
16772
16777
  };
16778
+ /** Get the current user's personal Save to Glitch command setup state. */
16779
+ Scheduler.getDiscordUserCommandStatus = function (scheduler_id, params) {
16780
+ return Requests.processRoute(SchedulerRoute.routes.getDiscordUserCommandStatus, {}, { scheduler_id: scheduler_id }, params);
16781
+ };
16782
+ /** Disconnect the current user's personal command from this Library. */
16783
+ Scheduler.disconnectDiscordUserCommand = function (scheduler_id, params) {
16784
+ return Requests.processRoute(SchedulerRoute.routes.disconnectDiscordUserCommand, {}, { scheduler_id: scheduler_id }, params);
16785
+ };
16786
+ /** List messages saved through the user-installed Discord command. */
16787
+ Scheduler.listDiscordMediaCaptures = function (scheduler_id, params) {
16788
+ return Requests.processRoute(SchedulerRoute.routes.listDiscordMediaCaptures, {}, { scheduler_id: scheduler_id }, params);
16789
+ };
16790
+ /** Import selected staged attachments into pending Library content. */
16791
+ Scheduler.importDiscordMediaCapture = function (scheduler_id, data, params) {
16792
+ return Requests.processRoute(SchedulerRoute.routes.importDiscordMediaCapture, data, { scheduler_id: scheduler_id }, params);
16793
+ };
16794
+ /** Dismiss one saved Discord message and delete its temporary staged files. */
16795
+ Scheduler.dismissDiscordMediaCapture = function (scheduler_id, capture_id, params) {
16796
+ return Requests.processRoute(SchedulerRoute.routes.dismissDiscordMediaCapture, {}, { scheduler_id: scheduler_id, capture_id: capture_id }, params);
16797
+ };
16773
16798
  /**
16774
16799
  * Clear Google Ads OAuth credentials from a promotion schedule.
16775
16800
  *