glitch-javascript-sdk 3.8.0 → 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.
- package/dist/cjs/index.js +42 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Scheduler.d.ts +170 -0
- package/dist/esm/index.js +42 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +170 -0
- package/package.json +2 -2
- package/src/api/Scheduler.ts +231 -0
- package/src/routes/SchedulerRoute.ts +7 -0
package/dist/index.d.ts
CHANGED
|
@@ -6966,6 +6966,155 @@ declare class Media {
|
|
|
6966
6966
|
static process<T>(media_id: string, data: VideoProcessRequest): AxiosPromise<Response<T>>;
|
|
6967
6967
|
}
|
|
6968
6968
|
|
|
6969
|
+
type DiscordMediaType = 'all' | 'image' | 'video' | 'gif';
|
|
6970
|
+
type DiscordMediaAuthorType = 'all' | 'user' | 'bot' | 'webhook';
|
|
6971
|
+
interface DiscordMediaSearchParams {
|
|
6972
|
+
cursor?: string;
|
|
6973
|
+
channel_id?: string;
|
|
6974
|
+
search?: string;
|
|
6975
|
+
search_scope?: 'content' | 'filename';
|
|
6976
|
+
media_type?: DiscordMediaType;
|
|
6977
|
+
author_type?: DiscordMediaAuthorType;
|
|
6978
|
+
date_from?: string;
|
|
6979
|
+
date_to?: string;
|
|
6980
|
+
sort_order?: 'asc' | 'desc';
|
|
6981
|
+
include_imported?: boolean;
|
|
6982
|
+
include_unsupported?: boolean;
|
|
6983
|
+
include_nsfw?: boolean;
|
|
6984
|
+
}
|
|
6985
|
+
interface DiscordMediaAttachment {
|
|
6986
|
+
id: string;
|
|
6987
|
+
filename: string;
|
|
6988
|
+
title?: string | null;
|
|
6989
|
+
description?: string | null;
|
|
6990
|
+
mime_type: string;
|
|
6991
|
+
media_type: 'image' | 'video';
|
|
6992
|
+
size: number;
|
|
6993
|
+
url?: string | null;
|
|
6994
|
+
proxy_url?: string | null;
|
|
6995
|
+
width?: number | null;
|
|
6996
|
+
height?: number | null;
|
|
6997
|
+
duration_secs?: number | null;
|
|
6998
|
+
supported: boolean;
|
|
6999
|
+
unsupported_reason?: string | null;
|
|
7000
|
+
already_imported: boolean;
|
|
7001
|
+
imported_title_update_id?: string | null;
|
|
7002
|
+
imported_media_id?: string | null;
|
|
7003
|
+
duplicate_import: boolean;
|
|
7004
|
+
}
|
|
7005
|
+
interface DiscordMediaMessage {
|
|
7006
|
+
id: string;
|
|
7007
|
+
channel_id: string;
|
|
7008
|
+
content: string;
|
|
7009
|
+
timestamp?: string | null;
|
|
7010
|
+
edited_timestamp?: string | null;
|
|
7011
|
+
jump_url: string;
|
|
7012
|
+
author: {
|
|
7013
|
+
id?: string | null;
|
|
7014
|
+
username: string;
|
|
7015
|
+
avatar?: string | null;
|
|
7016
|
+
bot: boolean;
|
|
7017
|
+
};
|
|
7018
|
+
webhook_id?: string | null;
|
|
7019
|
+
attachments: DiscordMediaAttachment[];
|
|
7020
|
+
}
|
|
7021
|
+
interface DiscordMediaSearchResponse {
|
|
7022
|
+
items: DiscordMediaMessage[];
|
|
7023
|
+
total_results: number;
|
|
7024
|
+
next_cursor?: string | null;
|
|
7025
|
+
indexing: boolean;
|
|
7026
|
+
retry_after?: number | null;
|
|
7027
|
+
}
|
|
7028
|
+
interface DiscordMediaImportGroup {
|
|
7029
|
+
channel_id: string;
|
|
7030
|
+
message_id: string;
|
|
7031
|
+
attachment_ids: string[];
|
|
7032
|
+
}
|
|
7033
|
+
interface DiscordMediaImportRequest {
|
|
7034
|
+
groups: DiscordMediaImportGroup[];
|
|
7035
|
+
}
|
|
7036
|
+
interface DiscordMediaImportAttachmentResult {
|
|
7037
|
+
status: 'imported' | 'duplicate' | 'failed';
|
|
7038
|
+
channel_id: string;
|
|
7039
|
+
message_id: string;
|
|
7040
|
+
attachment_id: string;
|
|
7041
|
+
media_id?: string;
|
|
7042
|
+
title_update_id?: string;
|
|
7043
|
+
reason?: string;
|
|
7044
|
+
}
|
|
7045
|
+
interface DiscordMediaImportResponse {
|
|
7046
|
+
imported_count: number;
|
|
7047
|
+
duplicate_count: number;
|
|
7048
|
+
failed_count: number;
|
|
7049
|
+
updates: Array<{
|
|
7050
|
+
id: string;
|
|
7051
|
+
title?: string | null;
|
|
7052
|
+
scheduled_status: 'pending';
|
|
7053
|
+
schedule_for_social: false;
|
|
7054
|
+
media_count: number;
|
|
7055
|
+
}>;
|
|
7056
|
+
attachments: DiscordMediaImportAttachmentResult[];
|
|
7057
|
+
}
|
|
7058
|
+
interface DiscordUserCommandStatus {
|
|
7059
|
+
linked: boolean;
|
|
7060
|
+
linked_to_this_scheduler: boolean;
|
|
7061
|
+
discord_username?: string | null;
|
|
7062
|
+
destination_scheduler_id?: string | null;
|
|
7063
|
+
destination_scheduler_name?: string | null;
|
|
7064
|
+
installed_at?: string | null;
|
|
7065
|
+
pending_count: number;
|
|
7066
|
+
command_name: string;
|
|
7067
|
+
setup_path: string;
|
|
7068
|
+
configured: boolean;
|
|
7069
|
+
}
|
|
7070
|
+
type DiscordMediaCaptureStatus = 'processing' | 'ready' | 'complete' | 'failed' | 'expired';
|
|
7071
|
+
type DiscordMediaCaptureAttachmentStatus = 'processing' | 'ready' | 'duplicate' | 'unsupported' | 'failed' | 'imported';
|
|
7072
|
+
interface DiscordMediaCaptureAttachment {
|
|
7073
|
+
id: string;
|
|
7074
|
+
discord_attachment_id: string;
|
|
7075
|
+
filename: string;
|
|
7076
|
+
mime_type?: string | null;
|
|
7077
|
+
media_type: 'image' | 'video';
|
|
7078
|
+
size: number;
|
|
7079
|
+
width?: number | null;
|
|
7080
|
+
height?: number | null;
|
|
7081
|
+
duration_secs?: number | null;
|
|
7082
|
+
description?: string | null;
|
|
7083
|
+
status: DiscordMediaCaptureAttachmentStatus;
|
|
7084
|
+
failure_reason?: string | null;
|
|
7085
|
+
preview_url?: string | null;
|
|
7086
|
+
media_id?: string | null;
|
|
7087
|
+
title_update_id?: string | null;
|
|
7088
|
+
}
|
|
7089
|
+
interface DiscordMediaCapture {
|
|
7090
|
+
id: string;
|
|
7091
|
+
status: DiscordMediaCaptureStatus;
|
|
7092
|
+
content?: string | null;
|
|
7093
|
+
author?: {
|
|
7094
|
+
id?: string | null;
|
|
7095
|
+
username: string;
|
|
7096
|
+
avatar?: string | null;
|
|
7097
|
+
bot: boolean;
|
|
7098
|
+
} | null;
|
|
7099
|
+
timestamp?: string | null;
|
|
7100
|
+
jump_url?: string | null;
|
|
7101
|
+
expires_at: string;
|
|
7102
|
+
failure_reason?: string | null;
|
|
7103
|
+
attachments: DiscordMediaCaptureAttachment[];
|
|
7104
|
+
}
|
|
7105
|
+
interface DiscordMediaCaptureListParams {
|
|
7106
|
+
cursor?: string;
|
|
7107
|
+
search?: string;
|
|
7108
|
+
limit?: number;
|
|
7109
|
+
}
|
|
7110
|
+
interface DiscordMediaCaptureListResponse {
|
|
7111
|
+
items: DiscordMediaCapture[];
|
|
7112
|
+
next_cursor?: string | null;
|
|
7113
|
+
}
|
|
7114
|
+
interface DiscordMediaCaptureImportRequest {
|
|
7115
|
+
capture_id: string;
|
|
7116
|
+
attachment_ids: string[];
|
|
7117
|
+
}
|
|
6969
7118
|
declare class Scheduler {
|
|
6970
7119
|
/**
|
|
6971
7120
|
* List promotion schedules.
|
|
@@ -7276,6 +7425,27 @@ declare class Scheduler {
|
|
|
7276
7425
|
* @returns promise
|
|
7277
7426
|
*/
|
|
7278
7427
|
static getDiscordChannels<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
7428
|
+
/**
|
|
7429
|
+
* Search image and video attachments in the connected Discord server.
|
|
7430
|
+
* This call only returns remote candidates; it does not copy files into the
|
|
7431
|
+
* Library and does not create or schedule social posts.
|
|
7432
|
+
*/
|
|
7433
|
+
static searchDiscordMedia<T = DiscordMediaSearchResponse>(scheduler_id: string, params?: DiscordMediaSearchParams): AxiosPromise<Response<T>>;
|
|
7434
|
+
/**
|
|
7435
|
+
* Import explicitly selected Discord attachments as pending, unscheduled
|
|
7436
|
+
* Library updates. Attachments selected from one message stay grouped.
|
|
7437
|
+
*/
|
|
7438
|
+
static importDiscordMedia<T = DiscordMediaImportResponse>(scheduler_id: string, data: DiscordMediaImportRequest, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
7439
|
+
/** Get the current user's personal Save to Glitch command setup state. */
|
|
7440
|
+
static getDiscordUserCommandStatus<T = DiscordUserCommandStatus>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
7441
|
+
/** Disconnect the current user's personal command from this Library. */
|
|
7442
|
+
static disconnectDiscordUserCommand<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
7443
|
+
/** List messages saved through the user-installed Discord command. */
|
|
7444
|
+
static listDiscordMediaCaptures<T = DiscordMediaCaptureListResponse>(scheduler_id: string, params?: DiscordMediaCaptureListParams): AxiosPromise<Response<T>>;
|
|
7445
|
+
/** Import selected staged attachments into pending Library content. */
|
|
7446
|
+
static importDiscordMediaCapture<T = DiscordMediaImportResponse>(scheduler_id: string, data: DiscordMediaCaptureImportRequest, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
7447
|
+
/** Dismiss one saved Discord message and delete its temporary staged files. */
|
|
7448
|
+
static dismissDiscordMediaCapture<T>(scheduler_id: string, capture_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
7279
7449
|
/**
|
|
7280
7450
|
* Clear Google Ads OAuth credentials from a promotion schedule.
|
|
7281
7451
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "glitch-javascript-sdk",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.2",
|
|
4
4
|
"description": "Javascript SDK for Glitch",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
],
|
|
14
14
|
"types": "dist/index.d.ts",
|
|
15
15
|
"scripts": {
|
|
16
|
-
"test": "node scripts/test-game-advertising-routes.cjs",
|
|
16
|
+
"test": "node scripts/test-game-advertising-routes.cjs && node scripts/test-discord-media-routes.cjs",
|
|
17
17
|
"build": "rm -Rf dist && rollup -c --bundleConfigAsCjs",
|
|
18
18
|
"build-docs": "rm -rf docs && typedoc --tsconfig tsconfig.json src/"
|
|
19
19
|
},
|
package/src/api/Scheduler.ts
CHANGED
|
@@ -3,6 +3,171 @@ import Requests from "../util/Requests";
|
|
|
3
3
|
import Response from "../util/Response";
|
|
4
4
|
import { AxiosPromise } from "axios";
|
|
5
5
|
|
|
6
|
+
export type DiscordMediaType = 'all' | 'image' | 'video' | 'gif';
|
|
7
|
+
export type DiscordMediaAuthorType = 'all' | 'user' | 'bot' | 'webhook';
|
|
8
|
+
|
|
9
|
+
export interface DiscordMediaSearchParams {
|
|
10
|
+
cursor?: string;
|
|
11
|
+
channel_id?: string;
|
|
12
|
+
search?: string;
|
|
13
|
+
search_scope?: 'content' | 'filename';
|
|
14
|
+
media_type?: DiscordMediaType;
|
|
15
|
+
author_type?: DiscordMediaAuthorType;
|
|
16
|
+
date_from?: string;
|
|
17
|
+
date_to?: string;
|
|
18
|
+
sort_order?: 'asc' | 'desc';
|
|
19
|
+
include_imported?: boolean;
|
|
20
|
+
include_unsupported?: boolean;
|
|
21
|
+
include_nsfw?: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface DiscordMediaAttachment {
|
|
25
|
+
id: string;
|
|
26
|
+
filename: string;
|
|
27
|
+
title?: string | null;
|
|
28
|
+
description?: string | null;
|
|
29
|
+
mime_type: string;
|
|
30
|
+
media_type: 'image' | 'video';
|
|
31
|
+
size: number;
|
|
32
|
+
url?: string | null;
|
|
33
|
+
proxy_url?: string | null;
|
|
34
|
+
width?: number | null;
|
|
35
|
+
height?: number | null;
|
|
36
|
+
duration_secs?: number | null;
|
|
37
|
+
supported: boolean;
|
|
38
|
+
unsupported_reason?: string | null;
|
|
39
|
+
already_imported: boolean;
|
|
40
|
+
imported_title_update_id?: string | null;
|
|
41
|
+
imported_media_id?: string | null;
|
|
42
|
+
duplicate_import: boolean;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface DiscordMediaMessage {
|
|
46
|
+
id: string;
|
|
47
|
+
channel_id: string;
|
|
48
|
+
content: string;
|
|
49
|
+
timestamp?: string | null;
|
|
50
|
+
edited_timestamp?: string | null;
|
|
51
|
+
jump_url: string;
|
|
52
|
+
author: {
|
|
53
|
+
id?: string | null;
|
|
54
|
+
username: string;
|
|
55
|
+
avatar?: string | null;
|
|
56
|
+
bot: boolean;
|
|
57
|
+
};
|
|
58
|
+
webhook_id?: string | null;
|
|
59
|
+
attachments: DiscordMediaAttachment[];
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface DiscordMediaSearchResponse {
|
|
63
|
+
items: DiscordMediaMessage[];
|
|
64
|
+
total_results: number;
|
|
65
|
+
next_cursor?: string | null;
|
|
66
|
+
indexing: boolean;
|
|
67
|
+
retry_after?: number | null;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface DiscordMediaImportGroup {
|
|
71
|
+
channel_id: string;
|
|
72
|
+
message_id: string;
|
|
73
|
+
attachment_ids: string[];
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface DiscordMediaImportRequest {
|
|
77
|
+
groups: DiscordMediaImportGroup[];
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface DiscordMediaImportAttachmentResult {
|
|
81
|
+
status: 'imported' | 'duplicate' | 'failed';
|
|
82
|
+
channel_id: string;
|
|
83
|
+
message_id: string;
|
|
84
|
+
attachment_id: string;
|
|
85
|
+
media_id?: string;
|
|
86
|
+
title_update_id?: string;
|
|
87
|
+
reason?: string;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface DiscordMediaImportResponse {
|
|
91
|
+
imported_count: number;
|
|
92
|
+
duplicate_count: number;
|
|
93
|
+
failed_count: number;
|
|
94
|
+
updates: Array<{
|
|
95
|
+
id: string;
|
|
96
|
+
title?: string | null;
|
|
97
|
+
scheduled_status: 'pending';
|
|
98
|
+
schedule_for_social: false;
|
|
99
|
+
media_count: number;
|
|
100
|
+
}>;
|
|
101
|
+
attachments: DiscordMediaImportAttachmentResult[];
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export interface DiscordUserCommandStatus {
|
|
105
|
+
linked: boolean;
|
|
106
|
+
linked_to_this_scheduler: boolean;
|
|
107
|
+
discord_username?: string | null;
|
|
108
|
+
destination_scheduler_id?: string | null;
|
|
109
|
+
destination_scheduler_name?: string | null;
|
|
110
|
+
installed_at?: string | null;
|
|
111
|
+
pending_count: number;
|
|
112
|
+
command_name: string;
|
|
113
|
+
setup_path: string;
|
|
114
|
+
configured: boolean;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export type DiscordMediaCaptureStatus = 'processing' | 'ready' | 'complete' | 'failed' | 'expired';
|
|
118
|
+
export type DiscordMediaCaptureAttachmentStatus = 'processing' | 'ready' | 'duplicate' | 'unsupported' | 'failed' | 'imported';
|
|
119
|
+
|
|
120
|
+
export interface DiscordMediaCaptureAttachment {
|
|
121
|
+
id: string;
|
|
122
|
+
discord_attachment_id: string;
|
|
123
|
+
filename: string;
|
|
124
|
+
mime_type?: string | null;
|
|
125
|
+
media_type: 'image' | 'video';
|
|
126
|
+
size: number;
|
|
127
|
+
width?: number | null;
|
|
128
|
+
height?: number | null;
|
|
129
|
+
duration_secs?: number | null;
|
|
130
|
+
description?: string | null;
|
|
131
|
+
status: DiscordMediaCaptureAttachmentStatus;
|
|
132
|
+
failure_reason?: string | null;
|
|
133
|
+
preview_url?: string | null;
|
|
134
|
+
media_id?: string | null;
|
|
135
|
+
title_update_id?: string | null;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export interface DiscordMediaCapture {
|
|
139
|
+
id: string;
|
|
140
|
+
status: DiscordMediaCaptureStatus;
|
|
141
|
+
content?: string | null;
|
|
142
|
+
author?: {
|
|
143
|
+
id?: string | null;
|
|
144
|
+
username: string;
|
|
145
|
+
avatar?: string | null;
|
|
146
|
+
bot: boolean;
|
|
147
|
+
} | null;
|
|
148
|
+
timestamp?: string | null;
|
|
149
|
+
jump_url?: string | null;
|
|
150
|
+
expires_at: string;
|
|
151
|
+
failure_reason?: string | null;
|
|
152
|
+
attachments: DiscordMediaCaptureAttachment[];
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export interface DiscordMediaCaptureListParams {
|
|
156
|
+
cursor?: string;
|
|
157
|
+
search?: string;
|
|
158
|
+
limit?: number;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export interface DiscordMediaCaptureListResponse {
|
|
162
|
+
items: DiscordMediaCapture[];
|
|
163
|
+
next_cursor?: string | null;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export interface DiscordMediaCaptureImportRequest {
|
|
167
|
+
capture_id: string;
|
|
168
|
+
attachment_ids: string[];
|
|
169
|
+
}
|
|
170
|
+
|
|
6
171
|
class Scheduler {
|
|
7
172
|
/**
|
|
8
173
|
* List promotion schedules.
|
|
@@ -431,6 +596,72 @@ class Scheduler {
|
|
|
431
596
|
return Requests.processRoute(SchedulerRoute.routes.getDiscordChannels, {}, { scheduler_id }, params);
|
|
432
597
|
}
|
|
433
598
|
|
|
599
|
+
/**
|
|
600
|
+
* Search image and video attachments in the connected Discord server.
|
|
601
|
+
* This call only returns remote candidates; it does not copy files into the
|
|
602
|
+
* Library and does not create or schedule social posts.
|
|
603
|
+
*/
|
|
604
|
+
public static searchDiscordMedia<T = DiscordMediaSearchResponse>(
|
|
605
|
+
scheduler_id: string,
|
|
606
|
+
params?: DiscordMediaSearchParams
|
|
607
|
+
): AxiosPromise<Response<T>> {
|
|
608
|
+
return Requests.processRoute(SchedulerRoute.routes.searchDiscordMedia, {}, { scheduler_id }, params);
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* Import explicitly selected Discord attachments as pending, unscheduled
|
|
613
|
+
* Library updates. Attachments selected from one message stay grouped.
|
|
614
|
+
*/
|
|
615
|
+
public static importDiscordMedia<T = DiscordMediaImportResponse>(
|
|
616
|
+
scheduler_id: string,
|
|
617
|
+
data: DiscordMediaImportRequest,
|
|
618
|
+
params?: Record<string, any>
|
|
619
|
+
): AxiosPromise<Response<T>> {
|
|
620
|
+
return Requests.processRoute(SchedulerRoute.routes.importDiscordMedia, data, { scheduler_id }, params);
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/** Get the current user's personal Save to Glitch command setup state. */
|
|
624
|
+
public static getDiscordUserCommandStatus<T = DiscordUserCommandStatus>(
|
|
625
|
+
scheduler_id: string,
|
|
626
|
+
params?: Record<string, any>
|
|
627
|
+
): AxiosPromise<Response<T>> {
|
|
628
|
+
return Requests.processRoute(SchedulerRoute.routes.getDiscordUserCommandStatus, {}, { scheduler_id }, params);
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
/** Disconnect the current user's personal command from this Library. */
|
|
632
|
+
public static disconnectDiscordUserCommand<T>(
|
|
633
|
+
scheduler_id: string,
|
|
634
|
+
params?: Record<string, any>
|
|
635
|
+
): AxiosPromise<Response<T>> {
|
|
636
|
+
return Requests.processRoute(SchedulerRoute.routes.disconnectDiscordUserCommand, {}, { scheduler_id }, params);
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
/** List messages saved through the user-installed Discord command. */
|
|
640
|
+
public static listDiscordMediaCaptures<T = DiscordMediaCaptureListResponse>(
|
|
641
|
+
scheduler_id: string,
|
|
642
|
+
params?: DiscordMediaCaptureListParams
|
|
643
|
+
): AxiosPromise<Response<T>> {
|
|
644
|
+
return Requests.processRoute(SchedulerRoute.routes.listDiscordMediaCaptures, {}, { scheduler_id }, params);
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
/** Import selected staged attachments into pending Library content. */
|
|
648
|
+
public static importDiscordMediaCapture<T = DiscordMediaImportResponse>(
|
|
649
|
+
scheduler_id: string,
|
|
650
|
+
data: DiscordMediaCaptureImportRequest,
|
|
651
|
+
params?: Record<string, any>
|
|
652
|
+
): AxiosPromise<Response<T>> {
|
|
653
|
+
return Requests.processRoute(SchedulerRoute.routes.importDiscordMediaCapture, data, { scheduler_id }, params);
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
/** Dismiss one saved Discord message and delete its temporary staged files. */
|
|
657
|
+
public static dismissDiscordMediaCapture<T>(
|
|
658
|
+
scheduler_id: string,
|
|
659
|
+
capture_id: string,
|
|
660
|
+
params?: Record<string, any>
|
|
661
|
+
): AxiosPromise<Response<T>> {
|
|
662
|
+
return Requests.processRoute(SchedulerRoute.routes.dismissDiscordMediaCapture, {}, { scheduler_id, capture_id }, params);
|
|
663
|
+
}
|
|
664
|
+
|
|
434
665
|
/**
|
|
435
666
|
* Clear Google Ads OAuth credentials from a promotion schedule.
|
|
436
667
|
*
|
|
@@ -50,6 +50,13 @@ class SchedulerRoute {
|
|
|
50
50
|
getRedditSubredditFlairs: { url: '/schedulers/{scheduler_id}/reddit/subreddits/{subreddit}/flairs', method: HTTP_METHODS.GET },
|
|
51
51
|
getRedditSubredditRules: { url: '/schedulers/{scheduler_id}/reddit/subreddits/{subreddit}/rules', method: HTTP_METHODS.GET },
|
|
52
52
|
getDiscordChannels: { url: '/schedulers/{scheduler_id}/discord/channels', method: HTTP_METHODS.GET },
|
|
53
|
+
searchDiscordMedia: { url: '/schedulers/{scheduler_id}/discord/media', method: HTTP_METHODS.GET },
|
|
54
|
+
importDiscordMedia: { url: '/schedulers/{scheduler_id}/discord/media/import', method: HTTP_METHODS.POST },
|
|
55
|
+
getDiscordUserCommandStatus: { url: '/schedulers/{scheduler_id}/discord/user-command', method: HTTP_METHODS.GET },
|
|
56
|
+
disconnectDiscordUserCommand: { url: '/schedulers/{scheduler_id}/discord/user-command', method: HTTP_METHODS.DELETE },
|
|
57
|
+
listDiscordMediaCaptures: { url: '/schedulers/{scheduler_id}/discord/captures', method: HTTP_METHODS.GET },
|
|
58
|
+
importDiscordMediaCapture: { url: '/schedulers/{scheduler_id}/discord/captures/import', method: HTTP_METHODS.POST },
|
|
59
|
+
dismissDiscordMediaCapture: { url: '/schedulers/{scheduler_id}/discord/captures/{capture_id}', method: HTTP_METHODS.DELETE },
|
|
53
60
|
|
|
54
61
|
crossPromoteListRelationships: {
|
|
55
62
|
url: '/schedulers/{scheduler_id}/crosspromote/relationships',
|