glitch-javascript-sdk 2.6.0 → 2.6.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 +50 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Education.d.ts +1 -0
- package/dist/esm/api/SocialPosts.d.ts +35 -0
- package/dist/esm/index.js +50 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +36 -0
- package/package.json +1 -1
- package/src/api/Education.ts +4 -1
- package/src/api/SocialPosts.ts +46 -0
- package/src/routes/SocialPostsRoute.ts +7 -0
package/dist/index.d.ts
CHANGED
|
@@ -3695,6 +3695,41 @@ declare class SocialPosts {
|
|
|
3695
3695
|
static replyViaDm<T>(comment_id: string, data: {
|
|
3696
3696
|
message: string;
|
|
3697
3697
|
}): AxiosPromise<Response<T>>;
|
|
3698
|
+
/**
|
|
3699
|
+
* List all discovered Reddit questions (Admin Only).
|
|
3700
|
+
*
|
|
3701
|
+
* @param params Query parameters: status, subreddit, is_question.
|
|
3702
|
+
*/
|
|
3703
|
+
static listRedditQuestions<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3704
|
+
/**
|
|
3705
|
+
* Retrieve details for a specific discovered Reddit question (Admin Only).
|
|
3706
|
+
*
|
|
3707
|
+
* @param id The UUID of the question.
|
|
3708
|
+
*/
|
|
3709
|
+
static viewRedditQuestion<T>(id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3710
|
+
/**
|
|
3711
|
+
* Update a Reddit question's status or metadata (Admin Only).
|
|
3712
|
+
*
|
|
3713
|
+
* @param id The UUID of the question.
|
|
3714
|
+
* @param data { status: 'pending'|'answered'|'ignored', metadata?: object }
|
|
3715
|
+
*/
|
|
3716
|
+
static updateRedditQuestion<T>(id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3717
|
+
/**
|
|
3718
|
+
* Delete a discovered Reddit question (Admin Only).
|
|
3719
|
+
*
|
|
3720
|
+
* @param id The UUID of the question.
|
|
3721
|
+
*/
|
|
3722
|
+
static deleteRedditQuestion<T>(id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3723
|
+
/**
|
|
3724
|
+
* Optimize a Reddit post for a specific subreddit using the AI engine (Admin Only).
|
|
3725
|
+
*
|
|
3726
|
+
* @param data { subreddit: string, content: string, title_id: string }
|
|
3727
|
+
*/
|
|
3728
|
+
static optimizeRedditPost<T>(data: {
|
|
3729
|
+
subreddit: string;
|
|
3730
|
+
content: string;
|
|
3731
|
+
title_id: string;
|
|
3732
|
+
}): AxiosPromise<Response<T>>;
|
|
3698
3733
|
}
|
|
3699
3734
|
|
|
3700
3735
|
declare class Titles {
|
|
@@ -7183,6 +7218,7 @@ declare class Education {
|
|
|
7183
7218
|
static heartbeat<T>(uuid: string, data: object): AxiosPromise<Response<T>>;
|
|
7184
7219
|
static getSecureVideo<T>(uuid: string): AxiosPromise<Response<T>>;
|
|
7185
7220
|
static getPreviewSecureVideo<T>(uuid: string): AxiosPromise<Response<T>>;
|
|
7221
|
+
static listAllProgress<T>(params?: object): AxiosPromise<Response<T>>;
|
|
7186
7222
|
static listTrackContent<T>(track_id: string): AxiosPromise<Response<T>>;
|
|
7187
7223
|
static addContentToTrack<T>(track_id: string, data: object): AxiosPromise<Response<T>>;
|
|
7188
7224
|
static removeContentFromTrack<T>(track_id: string, content_id: string): AxiosPromise<Response<T>>;
|
package/package.json
CHANGED
package/src/api/Education.ts
CHANGED
|
@@ -72,6 +72,9 @@ class Education {
|
|
|
72
72
|
public static getPreviewSecureVideo<T>(uuid: string): AxiosPromise<Response<T>> {
|
|
73
73
|
return Requests.processRoute(EducationRoute.routes.getPreviewSecureVideo, undefined, { uuid });
|
|
74
74
|
}
|
|
75
|
+
public static listAllProgress<T>(params?: object): AxiosPromise<Response<T>> {
|
|
76
|
+
return Requests.processRoute(EducationRoute.routes.listAllProgress, undefined, undefined, params);
|
|
77
|
+
}
|
|
75
78
|
|
|
76
79
|
// --- 4. TRACK CONTENT (PIVOT) ---
|
|
77
80
|
public static listTrackContent<T>(track_id: string): AxiosPromise<Response<T>> {
|
|
@@ -139,7 +142,7 @@ class Education {
|
|
|
139
142
|
return Requests.processRoute(EducationRoute.routes.deleteQuizQuestion, undefined, { uuid });
|
|
140
143
|
}
|
|
141
144
|
|
|
142
|
-
|
|
145
|
+
// --- QUIZ OPTIONS (CRUD) ---
|
|
143
146
|
public static viewQuizOption<T>(uuid: string): AxiosPromise<Response<T>> {
|
|
144
147
|
return Requests.processRoute(EducationRoute.routes.viewQuizOption, undefined, { uuid });
|
|
145
148
|
}
|
package/src/api/SocialPosts.ts
CHANGED
|
@@ -440,6 +440,52 @@ class SocialPosts {
|
|
|
440
440
|
public static replyViaDm<T>(comment_id: string, data: { message: string }): AxiosPromise<Response<T>> {
|
|
441
441
|
return Requests.processRoute(SocialPostsRoute.routes.replyViaDm, data, { comment_id });
|
|
442
442
|
}
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* List all discovered Reddit questions (Admin Only).
|
|
446
|
+
*
|
|
447
|
+
* @param params Query parameters: status, subreddit, is_question.
|
|
448
|
+
*/
|
|
449
|
+
public static listRedditQuestions<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
450
|
+
return Requests.processRoute(SocialPostsRoute.routes.listRedditQuestions, undefined, undefined, params);
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Retrieve details for a specific discovered Reddit question (Admin Only).
|
|
455
|
+
*
|
|
456
|
+
* @param id The UUID of the question.
|
|
457
|
+
*/
|
|
458
|
+
public static viewRedditQuestion<T>(id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
459
|
+
return Requests.processRoute(SocialPostsRoute.routes.viewRedditQuestion, {}, { id }, params);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* Update a Reddit question's status or metadata (Admin Only).
|
|
464
|
+
*
|
|
465
|
+
* @param id The UUID of the question.
|
|
466
|
+
* @param data { status: 'pending'|'answered'|'ignored', metadata?: object }
|
|
467
|
+
*/
|
|
468
|
+
public static updateRedditQuestion<T>(id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
469
|
+
return Requests.processRoute(SocialPostsRoute.routes.updateRedditQuestion, data, { id }, params);
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* Delete a discovered Reddit question (Admin Only).
|
|
474
|
+
*
|
|
475
|
+
* @param id The UUID of the question.
|
|
476
|
+
*/
|
|
477
|
+
public static deleteRedditQuestion<T>(id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
478
|
+
return Requests.processRoute(SocialPostsRoute.routes.deleteRedditQuestion, {}, { id }, params);
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* Optimize a Reddit post for a specific subreddit using the AI engine (Admin Only).
|
|
483
|
+
*
|
|
484
|
+
* @param data { subreddit: string, content: string, title_id: string }
|
|
485
|
+
*/
|
|
486
|
+
public static optimizeRedditPost<T>(data: { subreddit: string, content: string, title_id: string }): AxiosPromise<Response<T>> {
|
|
487
|
+
return Requests.processRoute(SocialPostsRoute.routes.optimizeRedditPost, data);
|
|
488
|
+
}
|
|
443
489
|
}
|
|
444
490
|
|
|
445
491
|
export default SocialPosts;
|
|
@@ -49,6 +49,13 @@ class SocialPostsRoute {
|
|
|
49
49
|
sendSocialMessage: { url: '/social/messages', method: HTTP_METHODS.POST },
|
|
50
50
|
replyViaDm: { url: '/socialposts/comments/{comment_id}/reply-via-dm', method: HTTP_METHODS.POST },
|
|
51
51
|
|
|
52
|
+
// Reddit Sales Engine (Admin Only)
|
|
53
|
+
listRedditQuestions: { url: '/admin/reddit/questions', method: HTTP_METHODS.GET },
|
|
54
|
+
viewRedditQuestion: { url: '/admin/reddit/questions/{id}', method: HTTP_METHODS.GET },
|
|
55
|
+
updateRedditQuestion: { url: '/admin/reddit/questions/{id}', method: HTTP_METHODS.PUT },
|
|
56
|
+
deleteRedditQuestion: { url: '/admin/reddit/questions/{id}', method: HTTP_METHODS.DELETE },
|
|
57
|
+
optimizeRedditPost: { url: '/admin/reddit/optimize', method: HTTP_METHODS.POST },
|
|
58
|
+
|
|
52
59
|
};
|
|
53
60
|
|
|
54
61
|
}
|