glitch-javascript-sdk 3.8.4 → 3.8.6
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 +18 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Scheduler.d.ts +9 -1
- package/dist/esm/api/Users.d.ts +39 -0
- package/dist/esm/index.js +18 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +48 -1
- package/package.json +2 -2
- package/src/api/Scheduler.ts +10 -1
- package/src/api/Users.ts +50 -0
- package/src/routes/UserRoutes.ts +2 -0
|
@@ -64,8 +64,11 @@ export interface DiscordMediaImportGroup {
|
|
|
64
64
|
message_id: string;
|
|
65
65
|
attachment_ids: string[];
|
|
66
66
|
}
|
|
67
|
+
export type DiscordTitleUpdateMode = 'grouped' | 'separate';
|
|
67
68
|
export interface DiscordMediaImportRequest {
|
|
68
69
|
groups: DiscordMediaImportGroup[];
|
|
70
|
+
/** Group files by Discord message or create one pending Library item per file. */
|
|
71
|
+
title_update_mode?: DiscordTitleUpdateMode;
|
|
69
72
|
}
|
|
70
73
|
export interface DiscordMediaImportAttachmentResult {
|
|
71
74
|
status: 'imported' | 'duplicate' | 'failed';
|
|
@@ -96,6 +99,8 @@ export interface DiscordUserCommandStatus {
|
|
|
96
99
|
destination_scheduler_id?: string | null;
|
|
97
100
|
destination_scheduler_name?: string | null;
|
|
98
101
|
installed_at?: string | null;
|
|
102
|
+
destination_count?: number;
|
|
103
|
+
linked_account_count?: number;
|
|
99
104
|
pending_count: number;
|
|
100
105
|
command_name: string;
|
|
101
106
|
setup_path: string;
|
|
@@ -156,6 +161,8 @@ export interface DiscordMediaCaptureListResponse {
|
|
|
156
161
|
export interface DiscordMediaCaptureImportRequest {
|
|
157
162
|
capture_id: string;
|
|
158
163
|
attachment_ids: string[];
|
|
164
|
+
/** Group selected files together or create one pending Library item per file. */
|
|
165
|
+
title_update_mode?: DiscordTitleUpdateMode;
|
|
159
166
|
}
|
|
160
167
|
declare class Scheduler {
|
|
161
168
|
/**
|
|
@@ -475,7 +482,8 @@ declare class Scheduler {
|
|
|
475
482
|
static searchDiscordMedia<T = DiscordMediaSearchResponse>(scheduler_id: string, params?: DiscordMediaSearchParams): AxiosPromise<Response<T>>;
|
|
476
483
|
/**
|
|
477
484
|
* Import explicitly selected Discord attachments as pending, unscheduled
|
|
478
|
-
* Library updates.
|
|
485
|
+
* Library updates. Callers can group files by message or create one item
|
|
486
|
+
* per file through title_update_mode.
|
|
479
487
|
*/
|
|
480
488
|
static importDiscordMedia<T = DiscordMediaImportResponse>(scheduler_id: string, data: DiscordMediaImportRequest, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
481
489
|
/** Get the current user's personal Save to Glitch command setup state. */
|
package/dist/esm/api/Users.d.ts
CHANGED
|
@@ -44,6 +44,35 @@ export interface InfluencerPayoutQuery {
|
|
|
44
44
|
orderBy?: "created_at" | "amount";
|
|
45
45
|
orderDirection?: "asc" | "desc";
|
|
46
46
|
}
|
|
47
|
+
/** Delivery state for the authenticated user's registered email address. */
|
|
48
|
+
export type EmailDeliveryState = "healthy" | "suppressed";
|
|
49
|
+
/** Recovery action selected by the API for the current suppression category. */
|
|
50
|
+
export type EmailDeliveryRecoveryAction = "none" | "self_service" | "change_email" | "contact_support";
|
|
51
|
+
/** Self-service and fallback actions available for an email-delivery state. */
|
|
52
|
+
export interface EmailDeliveryRecovery {
|
|
53
|
+
allowed: boolean;
|
|
54
|
+
action: EmailDeliveryRecoveryAction;
|
|
55
|
+
requires_acknowledgement: boolean;
|
|
56
|
+
account_verified?: boolean;
|
|
57
|
+
change_email_path?: string;
|
|
58
|
+
support_path?: string;
|
|
59
|
+
}
|
|
60
|
+
/** Current delivery state for the authenticated user's registered email. */
|
|
61
|
+
export interface EmailDeliveryStatus {
|
|
62
|
+
state: EmailDeliveryState;
|
|
63
|
+
action_required: boolean;
|
|
64
|
+
email: string | null;
|
|
65
|
+
category: string | null;
|
|
66
|
+
provider: string | null;
|
|
67
|
+
suppressed_at: string | null;
|
|
68
|
+
display_reason: string | null;
|
|
69
|
+
recovery: EmailDeliveryRecovery;
|
|
70
|
+
restored_now?: boolean;
|
|
71
|
+
}
|
|
72
|
+
/** Explicit confirmation required to remove an eligible active suppression. */
|
|
73
|
+
export interface RestoreEmailDeliveryRequest {
|
|
74
|
+
acknowledged: true;
|
|
75
|
+
}
|
|
47
76
|
declare class Users {
|
|
48
77
|
/**
|
|
49
78
|
* List all the users.
|
|
@@ -74,6 +103,16 @@ declare class Users {
|
|
|
74
103
|
* @returns promise
|
|
75
104
|
*/
|
|
76
105
|
static me<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
106
|
+
/**
|
|
107
|
+
* Gets the delivery and suppression state for the authenticated user's
|
|
108
|
+
* current registered email address.
|
|
109
|
+
*/
|
|
110
|
+
static emailDeliveryStatus(): AxiosPromise<Response<EmailDeliveryStatus>>;
|
|
111
|
+
/**
|
|
112
|
+
* Removes an eligible active suppression for the authenticated user's
|
|
113
|
+
* current verified email address.
|
|
114
|
+
*/
|
|
115
|
+
static restoreEmailDelivery(data: RestoreEmailDeliveryRequest): AxiosPromise<Response<EmailDeliveryStatus>>;
|
|
77
116
|
/**
|
|
78
117
|
* Gets the campaigns the users has been invited too.
|
|
79
118
|
*
|
package/dist/esm/index.js
CHANGED
|
@@ -8935,6 +8935,8 @@ var UserRoutes = /** @class */ (function () {
|
|
|
8935
8935
|
follow: { url: '/users/{user_id}/follow', method: HTTP_METHODS.POST },
|
|
8936
8936
|
profile: { url: '/users/{user_id}/profile', method: HTTP_METHODS.GET },
|
|
8937
8937
|
me: { url: '/users/me', method: HTTP_METHODS.GET },
|
|
8938
|
+
emailDeliveryStatus: { url: '/users/me/email-delivery', method: HTTP_METHODS.GET },
|
|
8939
|
+
restoreEmailDelivery: { url: '/users/me/email-delivery/restore', method: HTTP_METHODS.POST },
|
|
8938
8940
|
syncInfluencer: { url: '/users/syncInfluencer', method: HTTP_METHODS.POST },
|
|
8939
8941
|
generateInfluencerProfile: { url: '/users/generateInfluencerProfile', method: HTTP_METHODS.POST },
|
|
8940
8942
|
oneTimeToken: { url: '/users/oneTimeToken', method: HTTP_METHODS.GET },
|
|
@@ -9031,6 +9033,20 @@ var Users = /** @class */ (function () {
|
|
|
9031
9033
|
Users.me = function (params) {
|
|
9032
9034
|
return Requests.processRoute(UserRoutes.routes.me, {}, undefined, params);
|
|
9033
9035
|
};
|
|
9036
|
+
/**
|
|
9037
|
+
* Gets the delivery and suppression state for the authenticated user's
|
|
9038
|
+
* current registered email address.
|
|
9039
|
+
*/
|
|
9040
|
+
Users.emailDeliveryStatus = function () {
|
|
9041
|
+
return Requests.processRoute(UserRoutes.routes.emailDeliveryStatus);
|
|
9042
|
+
};
|
|
9043
|
+
/**
|
|
9044
|
+
* Removes an eligible active suppression for the authenticated user's
|
|
9045
|
+
* current verified email address.
|
|
9046
|
+
*/
|
|
9047
|
+
Users.restoreEmailDelivery = function (data) {
|
|
9048
|
+
return Requests.processRoute(UserRoutes.routes.restoreEmailDelivery, data);
|
|
9049
|
+
};
|
|
9034
9050
|
/**
|
|
9035
9051
|
* Gets the campaigns the users has been invited too.
|
|
9036
9052
|
*
|
|
@@ -16786,7 +16802,8 @@ var Scheduler = /** @class */ (function () {
|
|
|
16786
16802
|
};
|
|
16787
16803
|
/**
|
|
16788
16804
|
* Import explicitly selected Discord attachments as pending, unscheduled
|
|
16789
|
-
* Library updates.
|
|
16805
|
+
* Library updates. Callers can group files by message or create one item
|
|
16806
|
+
* per file through title_update_mode.
|
|
16790
16807
|
*/
|
|
16791
16808
|
Scheduler.importDiscordMedia = function (scheduler_id, data, params) {
|
|
16792
16809
|
return Requests.processRoute(SchedulerRoute.routes.importDiscordMedia, data, { scheduler_id: scheduler_id }, params);
|