glitch-javascript-sdk 1.7.0 → 1.7.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 +161 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Scheduler.d.ts +71 -0
- package/dist/esm/api/Titles.d.ts +10 -0
- package/dist/esm/index.js +161 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +81 -0
- package/package.json +1 -1
- package/src/api/Scheduler.ts +165 -14
- package/src/api/Titles.ts +37 -5
- package/src/routes/SchedulerRoute.ts +57 -0
- package/src/routes/TitlesRoute.ts +8 -0
|
@@ -288,5 +288,76 @@ declare class Scheduler {
|
|
|
288
288
|
* @returns promise
|
|
289
289
|
*/
|
|
290
290
|
static getSchedulerProgression<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
291
|
+
/**
|
|
292
|
+
* List active cross-promote relationships for a scheduler.
|
|
293
|
+
*
|
|
294
|
+
* @param scheduler_id The ID of the promotion schedule
|
|
295
|
+
* @param params Optional query params
|
|
296
|
+
*/
|
|
297
|
+
static crossPromoteListRelationships<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
298
|
+
/**
|
|
299
|
+
* Find potential cross-promote partners for a scheduler.
|
|
300
|
+
*
|
|
301
|
+
* @param scheduler_id The ID of the promotion schedule
|
|
302
|
+
* @param params Optional query params
|
|
303
|
+
*/
|
|
304
|
+
static crossPromoteFind<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
305
|
+
/**
|
|
306
|
+
* List cross-promote invites for a scheduler.
|
|
307
|
+
*
|
|
308
|
+
* @param scheduler_id The ID of the promotion schedule
|
|
309
|
+
* @param params Optional query params
|
|
310
|
+
*/
|
|
311
|
+
static crossPromoteInvitesList<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
312
|
+
/**
|
|
313
|
+
* Send an invite to cross-promote.
|
|
314
|
+
*
|
|
315
|
+
* @param scheduler_id The ID of the promotion schedule
|
|
316
|
+
* @param data { partner_scheduler_id, optional_message }
|
|
317
|
+
*/
|
|
318
|
+
static crossPromoteInviteSend<T>(scheduler_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
319
|
+
/**
|
|
320
|
+
* Accept an invite to cross-promote.
|
|
321
|
+
*
|
|
322
|
+
* @param scheduler_id The ID of the promotion schedule
|
|
323
|
+
* @param invite_id The ID of the invite
|
|
324
|
+
*/
|
|
325
|
+
static crossPromoteInviteAccept<T>(scheduler_id: string, invite_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
326
|
+
/**
|
|
327
|
+
* Reject an invite to cross-promote.
|
|
328
|
+
*
|
|
329
|
+
* @param scheduler_id The ID of the promotion schedule
|
|
330
|
+
* @param invite_id The ID of the invite
|
|
331
|
+
*/
|
|
332
|
+
static crossPromoteInviteReject<T>(scheduler_id: string, invite_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
333
|
+
/**
|
|
334
|
+
* End a cross-promote relationship.
|
|
335
|
+
*
|
|
336
|
+
* @param scheduler_id The ID of the promotion schedule
|
|
337
|
+
* @param relationship_id The ID of the relationship
|
|
338
|
+
*/
|
|
339
|
+
static crossPromoteRelationshipDelete<T>(scheduler_id: string, relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
340
|
+
/**
|
|
341
|
+
* Get which platforms are cross-promoted in an existing relationship.
|
|
342
|
+
*
|
|
343
|
+
* @param scheduler_id The ID of the promotion schedule
|
|
344
|
+
* @param relationship_id The ID of the relationship
|
|
345
|
+
*/
|
|
346
|
+
static crossPromoteRelationshipGetPlatforms<T>(scheduler_id: string, relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
347
|
+
/**
|
|
348
|
+
* Set which platforms are cross-promoted in an existing relationship.
|
|
349
|
+
*
|
|
350
|
+
* @param scheduler_id The ID of the promotion schedule
|
|
351
|
+
* @param relationship_id The ID of the relationship
|
|
352
|
+
* @param data An object like { platforms: ['twitter', 'facebook', ...] }
|
|
353
|
+
*/
|
|
354
|
+
static crossPromoteRelationshipSetPlatforms<T>(scheduler_id: string, relationship_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
355
|
+
/**
|
|
356
|
+
* Get recently cross-promoted posts under a relationship.
|
|
357
|
+
*
|
|
358
|
+
* @param scheduler_id The ID of the promotion schedule
|
|
359
|
+
* @param relationship_id The ID of the relationship
|
|
360
|
+
*/
|
|
361
|
+
static crossPromoteRelationshipPosts<T>(scheduler_id: string, relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
291
362
|
}
|
|
292
363
|
export default Scheduler;
|
package/dist/esm/api/Titles.d.ts
CHANGED
|
@@ -222,5 +222,15 @@ declare class Titles {
|
|
|
222
222
|
static activeRetentions<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
223
223
|
static retentionAnalysis<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
224
224
|
static distinctDimensions<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
225
|
+
/**
|
|
226
|
+
* List sessions for a specific title, with optional filters and pagination.
|
|
227
|
+
* Returns a paginated list of sessions with start/end times, session_length, user info, etc.
|
|
228
|
+
*/
|
|
229
|
+
static listSessions<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
230
|
+
/**
|
|
231
|
+
* Get aggregated average session length data (daily/weekly/monthly) for a title.
|
|
232
|
+
* Optionally filter by platform/device_type/OS/version and group by one dimension.
|
|
233
|
+
*/
|
|
234
|
+
static sessionsAverage<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
225
235
|
}
|
|
226
236
|
export default Titles;
|
package/dist/esm/index.js
CHANGED
|
@@ -9642,6 +9642,14 @@ var TitlesRoute = /** @class */ (function () {
|
|
|
9642
9642
|
activeRetentions: { url: '/titles/{title_id}/retentions/active', method: HTTP_METHODS.GET },
|
|
9643
9643
|
retentionAnalysis: { url: '/titles/{title_id}/retentions/analysis', method: HTTP_METHODS.GET },
|
|
9644
9644
|
distinctDimensions: { url: '/titles/{title_id}/installs/distinctDimensions', method: HTTP_METHODS.GET },
|
|
9645
|
+
listSessions: {
|
|
9646
|
+
url: '/titles/{title_id}/installs/sessions',
|
|
9647
|
+
method: HTTP_METHODS.GET
|
|
9648
|
+
},
|
|
9649
|
+
sessionsAverage: {
|
|
9650
|
+
url: '/titles/{title_id}/installs/sessions/average',
|
|
9651
|
+
method: HTTP_METHODS.GET
|
|
9652
|
+
},
|
|
9645
9653
|
};
|
|
9646
9654
|
return TitlesRoute;
|
|
9647
9655
|
}());
|
|
@@ -9931,6 +9939,20 @@ var Titles = /** @class */ (function () {
|
|
|
9931
9939
|
Titles.distinctDimensions = function (title_id, params) {
|
|
9932
9940
|
return Requests.processRoute(TitlesRoute.routes.distinctDimensions, {}, { title_id: title_id }, params);
|
|
9933
9941
|
};
|
|
9942
|
+
/**
|
|
9943
|
+
* List sessions for a specific title, with optional filters and pagination.
|
|
9944
|
+
* Returns a paginated list of sessions with start/end times, session_length, user info, etc.
|
|
9945
|
+
*/
|
|
9946
|
+
Titles.listSessions = function (title_id, params) {
|
|
9947
|
+
return Requests.processRoute(TitlesRoute.routes.listSessions, {}, { title_id: title_id }, params);
|
|
9948
|
+
};
|
|
9949
|
+
/**
|
|
9950
|
+
* Get aggregated average session length data (daily/weekly/monthly) for a title.
|
|
9951
|
+
* Optionally filter by platform/device_type/OS/version and group by one dimension.
|
|
9952
|
+
*/
|
|
9953
|
+
Titles.sessionsAverage = function (title_id, params) {
|
|
9954
|
+
return Requests.processRoute(TitlesRoute.routes.sessionsAverage, {}, { title_id: title_id }, params);
|
|
9955
|
+
};
|
|
9934
9956
|
return Titles;
|
|
9935
9957
|
}());
|
|
9936
9958
|
|
|
@@ -11613,6 +11635,54 @@ var SchedulerRoute = /** @class */ (function () {
|
|
|
11613
11635
|
getRedditSubreddits: { url: '/schedulers/{scheduler_id}/reddit/subreddits', method: HTTP_METHODS.GET },
|
|
11614
11636
|
getRedditSubredditFlairs: { url: '/schedulers/{scheduler_id}/reddit/subreddits/{subreddit}/flairs', method: HTTP_METHODS.GET },
|
|
11615
11637
|
getDiscordChannels: { url: '/schedulers/{scheduler_id}/discord/channels', method: HTTP_METHODS.GET },
|
|
11638
|
+
crossPromoteListRelationships: {
|
|
11639
|
+
url: '/schedulers/{scheduler_id}/crosspromote/relationships',
|
|
11640
|
+
method: HTTP_METHODS.GET
|
|
11641
|
+
},
|
|
11642
|
+
// 2) Find potential cross-promote partners
|
|
11643
|
+
crossPromoteFind: {
|
|
11644
|
+
url: '/schedulers/{scheduler_id}/crosspromote/find',
|
|
11645
|
+
method: HTTP_METHODS.GET
|
|
11646
|
+
},
|
|
11647
|
+
// 3) List invites
|
|
11648
|
+
crossPromoteInvitesList: {
|
|
11649
|
+
url: '/schedulers/{scheduler_id}/crosspromote/invites',
|
|
11650
|
+
method: HTTP_METHODS.GET
|
|
11651
|
+
},
|
|
11652
|
+
// 4) Send an invite to cross-promote
|
|
11653
|
+
crossPromoteInviteSend: {
|
|
11654
|
+
url: '/schedulers/{scheduler_id}/crosspromote/invites',
|
|
11655
|
+
method: HTTP_METHODS.POST
|
|
11656
|
+
},
|
|
11657
|
+
// 5) Accept an invite
|
|
11658
|
+
crossPromoteInviteAccept: {
|
|
11659
|
+
url: '/schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/accept',
|
|
11660
|
+
method: HTTP_METHODS.POST
|
|
11661
|
+
},
|
|
11662
|
+
// 6) Reject an invite
|
|
11663
|
+
crossPromoteInviteReject: {
|
|
11664
|
+
url: '/schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/reject',
|
|
11665
|
+
method: HTTP_METHODS.POST
|
|
11666
|
+
},
|
|
11667
|
+
// 7) End a cross-promote relationship
|
|
11668
|
+
crossPromoteRelationshipDelete: {
|
|
11669
|
+
url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}',
|
|
11670
|
+
method: HTTP_METHODS.DELETE
|
|
11671
|
+
},
|
|
11672
|
+
// 8) Get/Set which platforms are cross-promoted in an existing relationship
|
|
11673
|
+
crossPromoteRelationshipGetPlatforms: {
|
|
11674
|
+
url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms',
|
|
11675
|
+
method: HTTP_METHODS.GET
|
|
11676
|
+
},
|
|
11677
|
+
crossPromoteRelationshipSetPlatforms: {
|
|
11678
|
+
url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms',
|
|
11679
|
+
method: HTTP_METHODS.PUT
|
|
11680
|
+
},
|
|
11681
|
+
// 9) Get recently cross-promoted posts under a relationship
|
|
11682
|
+
crossPromoteRelationshipPosts: {
|
|
11683
|
+
url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/posts',
|
|
11684
|
+
method: HTTP_METHODS.GET
|
|
11685
|
+
},
|
|
11616
11686
|
};
|
|
11617
11687
|
return SchedulerRoute;
|
|
11618
11688
|
}());
|
|
@@ -11975,6 +12045,97 @@ var Scheduler = /** @class */ (function () {
|
|
|
11975
12045
|
Scheduler.getSchedulerProgression = function (scheduler_id, params) {
|
|
11976
12046
|
return Requests.processRoute(SchedulerRoute.routes.getSchedulerProgression, {}, { scheduler_id: scheduler_id }, params);
|
|
11977
12047
|
};
|
|
12048
|
+
/**
|
|
12049
|
+
* List active cross-promote relationships for a scheduler.
|
|
12050
|
+
*
|
|
12051
|
+
* @param scheduler_id The ID of the promotion schedule
|
|
12052
|
+
* @param params Optional query params
|
|
12053
|
+
*/
|
|
12054
|
+
Scheduler.crossPromoteListRelationships = function (scheduler_id, params) {
|
|
12055
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteListRelationships, {}, { scheduler_id: scheduler_id }, params);
|
|
12056
|
+
};
|
|
12057
|
+
/**
|
|
12058
|
+
* Find potential cross-promote partners for a scheduler.
|
|
12059
|
+
*
|
|
12060
|
+
* @param scheduler_id The ID of the promotion schedule
|
|
12061
|
+
* @param params Optional query params
|
|
12062
|
+
*/
|
|
12063
|
+
Scheduler.crossPromoteFind = function (scheduler_id, params) {
|
|
12064
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteFind, {}, { scheduler_id: scheduler_id }, params);
|
|
12065
|
+
};
|
|
12066
|
+
/**
|
|
12067
|
+
* List cross-promote invites for a scheduler.
|
|
12068
|
+
*
|
|
12069
|
+
* @param scheduler_id The ID of the promotion schedule
|
|
12070
|
+
* @param params Optional query params
|
|
12071
|
+
*/
|
|
12072
|
+
Scheduler.crossPromoteInvitesList = function (scheduler_id, params) {
|
|
12073
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteInvitesList, {}, { scheduler_id: scheduler_id }, params);
|
|
12074
|
+
};
|
|
12075
|
+
/**
|
|
12076
|
+
* Send an invite to cross-promote.
|
|
12077
|
+
*
|
|
12078
|
+
* @param scheduler_id The ID of the promotion schedule
|
|
12079
|
+
* @param data { partner_scheduler_id, optional_message }
|
|
12080
|
+
*/
|
|
12081
|
+
Scheduler.crossPromoteInviteSend = function (scheduler_id, data, params) {
|
|
12082
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteInviteSend, data, { scheduler_id: scheduler_id }, params);
|
|
12083
|
+
};
|
|
12084
|
+
/**
|
|
12085
|
+
* Accept an invite to cross-promote.
|
|
12086
|
+
*
|
|
12087
|
+
* @param scheduler_id The ID of the promotion schedule
|
|
12088
|
+
* @param invite_id The ID of the invite
|
|
12089
|
+
*/
|
|
12090
|
+
Scheduler.crossPromoteInviteAccept = function (scheduler_id, invite_id, params) {
|
|
12091
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteInviteAccept, {}, { scheduler_id: scheduler_id, invite_id: invite_id }, params);
|
|
12092
|
+
};
|
|
12093
|
+
/**
|
|
12094
|
+
* Reject an invite to cross-promote.
|
|
12095
|
+
*
|
|
12096
|
+
* @param scheduler_id The ID of the promotion schedule
|
|
12097
|
+
* @param invite_id The ID of the invite
|
|
12098
|
+
*/
|
|
12099
|
+
Scheduler.crossPromoteInviteReject = function (scheduler_id, invite_id, params) {
|
|
12100
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteInviteReject, {}, { scheduler_id: scheduler_id, invite_id: invite_id }, params);
|
|
12101
|
+
};
|
|
12102
|
+
/**
|
|
12103
|
+
* End a cross-promote relationship.
|
|
12104
|
+
*
|
|
12105
|
+
* @param scheduler_id The ID of the promotion schedule
|
|
12106
|
+
* @param relationship_id The ID of the relationship
|
|
12107
|
+
*/
|
|
12108
|
+
Scheduler.crossPromoteRelationshipDelete = function (scheduler_id, relationship_id, params) {
|
|
12109
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipDelete, {}, { scheduler_id: scheduler_id, relationship_id: relationship_id }, params);
|
|
12110
|
+
};
|
|
12111
|
+
/**
|
|
12112
|
+
* Get which platforms are cross-promoted in an existing relationship.
|
|
12113
|
+
*
|
|
12114
|
+
* @param scheduler_id The ID of the promotion schedule
|
|
12115
|
+
* @param relationship_id The ID of the relationship
|
|
12116
|
+
*/
|
|
12117
|
+
Scheduler.crossPromoteRelationshipGetPlatforms = function (scheduler_id, relationship_id, params) {
|
|
12118
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipGetPlatforms, {}, { scheduler_id: scheduler_id, relationship_id: relationship_id }, params);
|
|
12119
|
+
};
|
|
12120
|
+
/**
|
|
12121
|
+
* Set which platforms are cross-promoted in an existing relationship.
|
|
12122
|
+
*
|
|
12123
|
+
* @param scheduler_id The ID of the promotion schedule
|
|
12124
|
+
* @param relationship_id The ID of the relationship
|
|
12125
|
+
* @param data An object like { platforms: ['twitter', 'facebook', ...] }
|
|
12126
|
+
*/
|
|
12127
|
+
Scheduler.crossPromoteRelationshipSetPlatforms = function (scheduler_id, relationship_id, data, params) {
|
|
12128
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipSetPlatforms, data, { scheduler_id: scheduler_id, relationship_id: relationship_id }, params);
|
|
12129
|
+
};
|
|
12130
|
+
/**
|
|
12131
|
+
* Get recently cross-promoted posts under a relationship.
|
|
12132
|
+
*
|
|
12133
|
+
* @param scheduler_id The ID of the promotion schedule
|
|
12134
|
+
* @param relationship_id The ID of the relationship
|
|
12135
|
+
*/
|
|
12136
|
+
Scheduler.crossPromoteRelationshipPosts = function (scheduler_id, relationship_id, params) {
|
|
12137
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipPosts, {}, { scheduler_id: scheduler_id, relationship_id: relationship_id }, params);
|
|
12138
|
+
};
|
|
11978
12139
|
return Scheduler;
|
|
11979
12140
|
}());
|
|
11980
12141
|
|