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
package/dist/cjs/index.js
CHANGED
|
@@ -22826,6 +22826,14 @@ var TitlesRoute = /** @class */ (function () {
|
|
|
22826
22826
|
activeRetentions: { url: '/titles/{title_id}/retentions/active', method: HTTP_METHODS.GET },
|
|
22827
22827
|
retentionAnalysis: { url: '/titles/{title_id}/retentions/analysis', method: HTTP_METHODS.GET },
|
|
22828
22828
|
distinctDimensions: { url: '/titles/{title_id}/installs/distinctDimensions', method: HTTP_METHODS.GET },
|
|
22829
|
+
listSessions: {
|
|
22830
|
+
url: '/titles/{title_id}/installs/sessions',
|
|
22831
|
+
method: HTTP_METHODS.GET
|
|
22832
|
+
},
|
|
22833
|
+
sessionsAverage: {
|
|
22834
|
+
url: '/titles/{title_id}/installs/sessions/average',
|
|
22835
|
+
method: HTTP_METHODS.GET
|
|
22836
|
+
},
|
|
22829
22837
|
};
|
|
22830
22838
|
return TitlesRoute;
|
|
22831
22839
|
}());
|
|
@@ -23115,6 +23123,20 @@ var Titles = /** @class */ (function () {
|
|
|
23115
23123
|
Titles.distinctDimensions = function (title_id, params) {
|
|
23116
23124
|
return Requests.processRoute(TitlesRoute.routes.distinctDimensions, {}, { title_id: title_id }, params);
|
|
23117
23125
|
};
|
|
23126
|
+
/**
|
|
23127
|
+
* List sessions for a specific title, with optional filters and pagination.
|
|
23128
|
+
* Returns a paginated list of sessions with start/end times, session_length, user info, etc.
|
|
23129
|
+
*/
|
|
23130
|
+
Titles.listSessions = function (title_id, params) {
|
|
23131
|
+
return Requests.processRoute(TitlesRoute.routes.listSessions, {}, { title_id: title_id }, params);
|
|
23132
|
+
};
|
|
23133
|
+
/**
|
|
23134
|
+
* Get aggregated average session length data (daily/weekly/monthly) for a title.
|
|
23135
|
+
* Optionally filter by platform/device_type/OS/version and group by one dimension.
|
|
23136
|
+
*/
|
|
23137
|
+
Titles.sessionsAverage = function (title_id, params) {
|
|
23138
|
+
return Requests.processRoute(TitlesRoute.routes.sessionsAverage, {}, { title_id: title_id }, params);
|
|
23139
|
+
};
|
|
23118
23140
|
return Titles;
|
|
23119
23141
|
}());
|
|
23120
23142
|
|
|
@@ -24797,6 +24819,54 @@ var SchedulerRoute = /** @class */ (function () {
|
|
|
24797
24819
|
getRedditSubreddits: { url: '/schedulers/{scheduler_id}/reddit/subreddits', method: HTTP_METHODS.GET },
|
|
24798
24820
|
getRedditSubredditFlairs: { url: '/schedulers/{scheduler_id}/reddit/subreddits/{subreddit}/flairs', method: HTTP_METHODS.GET },
|
|
24799
24821
|
getDiscordChannels: { url: '/schedulers/{scheduler_id}/discord/channels', method: HTTP_METHODS.GET },
|
|
24822
|
+
crossPromoteListRelationships: {
|
|
24823
|
+
url: '/schedulers/{scheduler_id}/crosspromote/relationships',
|
|
24824
|
+
method: HTTP_METHODS.GET
|
|
24825
|
+
},
|
|
24826
|
+
// 2) Find potential cross-promote partners
|
|
24827
|
+
crossPromoteFind: {
|
|
24828
|
+
url: '/schedulers/{scheduler_id}/crosspromote/find',
|
|
24829
|
+
method: HTTP_METHODS.GET
|
|
24830
|
+
},
|
|
24831
|
+
// 3) List invites
|
|
24832
|
+
crossPromoteInvitesList: {
|
|
24833
|
+
url: '/schedulers/{scheduler_id}/crosspromote/invites',
|
|
24834
|
+
method: HTTP_METHODS.GET
|
|
24835
|
+
},
|
|
24836
|
+
// 4) Send an invite to cross-promote
|
|
24837
|
+
crossPromoteInviteSend: {
|
|
24838
|
+
url: '/schedulers/{scheduler_id}/crosspromote/invites',
|
|
24839
|
+
method: HTTP_METHODS.POST
|
|
24840
|
+
},
|
|
24841
|
+
// 5) Accept an invite
|
|
24842
|
+
crossPromoteInviteAccept: {
|
|
24843
|
+
url: '/schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/accept',
|
|
24844
|
+
method: HTTP_METHODS.POST
|
|
24845
|
+
},
|
|
24846
|
+
// 6) Reject an invite
|
|
24847
|
+
crossPromoteInviteReject: {
|
|
24848
|
+
url: '/schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/reject',
|
|
24849
|
+
method: HTTP_METHODS.POST
|
|
24850
|
+
},
|
|
24851
|
+
// 7) End a cross-promote relationship
|
|
24852
|
+
crossPromoteRelationshipDelete: {
|
|
24853
|
+
url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}',
|
|
24854
|
+
method: HTTP_METHODS.DELETE
|
|
24855
|
+
},
|
|
24856
|
+
// 8) Get/Set which platforms are cross-promoted in an existing relationship
|
|
24857
|
+
crossPromoteRelationshipGetPlatforms: {
|
|
24858
|
+
url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms',
|
|
24859
|
+
method: HTTP_METHODS.GET
|
|
24860
|
+
},
|
|
24861
|
+
crossPromoteRelationshipSetPlatforms: {
|
|
24862
|
+
url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms',
|
|
24863
|
+
method: HTTP_METHODS.PUT
|
|
24864
|
+
},
|
|
24865
|
+
// 9) Get recently cross-promoted posts under a relationship
|
|
24866
|
+
crossPromoteRelationshipPosts: {
|
|
24867
|
+
url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/posts',
|
|
24868
|
+
method: HTTP_METHODS.GET
|
|
24869
|
+
},
|
|
24800
24870
|
};
|
|
24801
24871
|
return SchedulerRoute;
|
|
24802
24872
|
}());
|
|
@@ -25159,6 +25229,97 @@ var Scheduler = /** @class */ (function () {
|
|
|
25159
25229
|
Scheduler.getSchedulerProgression = function (scheduler_id, params) {
|
|
25160
25230
|
return Requests.processRoute(SchedulerRoute.routes.getSchedulerProgression, {}, { scheduler_id: scheduler_id }, params);
|
|
25161
25231
|
};
|
|
25232
|
+
/**
|
|
25233
|
+
* List active cross-promote relationships for a scheduler.
|
|
25234
|
+
*
|
|
25235
|
+
* @param scheduler_id The ID of the promotion schedule
|
|
25236
|
+
* @param params Optional query params
|
|
25237
|
+
*/
|
|
25238
|
+
Scheduler.crossPromoteListRelationships = function (scheduler_id, params) {
|
|
25239
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteListRelationships, {}, { scheduler_id: scheduler_id }, params);
|
|
25240
|
+
};
|
|
25241
|
+
/**
|
|
25242
|
+
* Find potential cross-promote partners for a scheduler.
|
|
25243
|
+
*
|
|
25244
|
+
* @param scheduler_id The ID of the promotion schedule
|
|
25245
|
+
* @param params Optional query params
|
|
25246
|
+
*/
|
|
25247
|
+
Scheduler.crossPromoteFind = function (scheduler_id, params) {
|
|
25248
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteFind, {}, { scheduler_id: scheduler_id }, params);
|
|
25249
|
+
};
|
|
25250
|
+
/**
|
|
25251
|
+
* List cross-promote invites for a scheduler.
|
|
25252
|
+
*
|
|
25253
|
+
* @param scheduler_id The ID of the promotion schedule
|
|
25254
|
+
* @param params Optional query params
|
|
25255
|
+
*/
|
|
25256
|
+
Scheduler.crossPromoteInvitesList = function (scheduler_id, params) {
|
|
25257
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteInvitesList, {}, { scheduler_id: scheduler_id }, params);
|
|
25258
|
+
};
|
|
25259
|
+
/**
|
|
25260
|
+
* Send an invite to cross-promote.
|
|
25261
|
+
*
|
|
25262
|
+
* @param scheduler_id The ID of the promotion schedule
|
|
25263
|
+
* @param data { partner_scheduler_id, optional_message }
|
|
25264
|
+
*/
|
|
25265
|
+
Scheduler.crossPromoteInviteSend = function (scheduler_id, data, params) {
|
|
25266
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteInviteSend, data, { scheduler_id: scheduler_id }, params);
|
|
25267
|
+
};
|
|
25268
|
+
/**
|
|
25269
|
+
* Accept an invite to cross-promote.
|
|
25270
|
+
*
|
|
25271
|
+
* @param scheduler_id The ID of the promotion schedule
|
|
25272
|
+
* @param invite_id The ID of the invite
|
|
25273
|
+
*/
|
|
25274
|
+
Scheduler.crossPromoteInviteAccept = function (scheduler_id, invite_id, params) {
|
|
25275
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteInviteAccept, {}, { scheduler_id: scheduler_id, invite_id: invite_id }, params);
|
|
25276
|
+
};
|
|
25277
|
+
/**
|
|
25278
|
+
* Reject an invite to cross-promote.
|
|
25279
|
+
*
|
|
25280
|
+
* @param scheduler_id The ID of the promotion schedule
|
|
25281
|
+
* @param invite_id The ID of the invite
|
|
25282
|
+
*/
|
|
25283
|
+
Scheduler.crossPromoteInviteReject = function (scheduler_id, invite_id, params) {
|
|
25284
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteInviteReject, {}, { scheduler_id: scheduler_id, invite_id: invite_id }, params);
|
|
25285
|
+
};
|
|
25286
|
+
/**
|
|
25287
|
+
* End a cross-promote relationship.
|
|
25288
|
+
*
|
|
25289
|
+
* @param scheduler_id The ID of the promotion schedule
|
|
25290
|
+
* @param relationship_id The ID of the relationship
|
|
25291
|
+
*/
|
|
25292
|
+
Scheduler.crossPromoteRelationshipDelete = function (scheduler_id, relationship_id, params) {
|
|
25293
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipDelete, {}, { scheduler_id: scheduler_id, relationship_id: relationship_id }, params);
|
|
25294
|
+
};
|
|
25295
|
+
/**
|
|
25296
|
+
* Get which platforms are cross-promoted in an existing relationship.
|
|
25297
|
+
*
|
|
25298
|
+
* @param scheduler_id The ID of the promotion schedule
|
|
25299
|
+
* @param relationship_id The ID of the relationship
|
|
25300
|
+
*/
|
|
25301
|
+
Scheduler.crossPromoteRelationshipGetPlatforms = function (scheduler_id, relationship_id, params) {
|
|
25302
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipGetPlatforms, {}, { scheduler_id: scheduler_id, relationship_id: relationship_id }, params);
|
|
25303
|
+
};
|
|
25304
|
+
/**
|
|
25305
|
+
* Set which platforms are cross-promoted in an existing relationship.
|
|
25306
|
+
*
|
|
25307
|
+
* @param scheduler_id The ID of the promotion schedule
|
|
25308
|
+
* @param relationship_id The ID of the relationship
|
|
25309
|
+
* @param data An object like { platforms: ['twitter', 'facebook', ...] }
|
|
25310
|
+
*/
|
|
25311
|
+
Scheduler.crossPromoteRelationshipSetPlatforms = function (scheduler_id, relationship_id, data, params) {
|
|
25312
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipSetPlatforms, data, { scheduler_id: scheduler_id, relationship_id: relationship_id }, params);
|
|
25313
|
+
};
|
|
25314
|
+
/**
|
|
25315
|
+
* Get recently cross-promoted posts under a relationship.
|
|
25316
|
+
*
|
|
25317
|
+
* @param scheduler_id The ID of the promotion schedule
|
|
25318
|
+
* @param relationship_id The ID of the relationship
|
|
25319
|
+
*/
|
|
25320
|
+
Scheduler.crossPromoteRelationshipPosts = function (scheduler_id, relationship_id, params) {
|
|
25321
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipPosts, {}, { scheduler_id: scheduler_id, relationship_id: relationship_id }, params);
|
|
25322
|
+
};
|
|
25162
25323
|
return Scheduler;
|
|
25163
25324
|
}());
|
|
25164
25325
|
|