glitch-javascript-sdk 1.2.9 → 1.3.1
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 +167 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Newsletters.d.ts +15 -0
- package/dist/esm/api/PlayTests.d.ts +95 -0
- package/dist/esm/api/index.d.ts +4 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +167 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/routes/NewslettersRoutes.d.ts +7 -0
- package/dist/esm/routes/PlayTestsRoute.d.ts +7 -0
- package/dist/index.d.ts +108 -0
- package/package.json +1 -1
- package/src/api/Newsletters.ts +28 -0
- package/src/api/PlayTests.ts +131 -0
- package/src/api/index.ts +5 -1
- package/src/index.ts +5 -1
- package/src/routes/NewslettersRoutes.ts +12 -0
- package/src/routes/PlayTestsRoute.ts +20 -0
package/dist/cjs/index.js
CHANGED
|
@@ -24091,6 +24091,170 @@ var GameShows = /** @class */ (function () {
|
|
|
24091
24091
|
return GameShows;
|
|
24092
24092
|
}());
|
|
24093
24093
|
|
|
24094
|
+
var NewslettersRoutes = /** @class */ (function () {
|
|
24095
|
+
function NewslettersRoutes() {
|
|
24096
|
+
}
|
|
24097
|
+
NewslettersRoutes.routes = {
|
|
24098
|
+
downloadMarketingChecklist: { url: '/newsletters/downloadMarketingChecklist', method: HTTP_METHODS.POST },
|
|
24099
|
+
};
|
|
24100
|
+
return NewslettersRoutes;
|
|
24101
|
+
}());
|
|
24102
|
+
|
|
24103
|
+
var Newsletters = /** @class */ (function () {
|
|
24104
|
+
function Newsletters() {
|
|
24105
|
+
}
|
|
24106
|
+
/**
|
|
24107
|
+
* Download the list of publictions, podcasts and blogs.
|
|
24108
|
+
*
|
|
24109
|
+
* @see https://api.glitch.fun/api/documentation#/Newsletters/downloadMarketingChecklists
|
|
24110
|
+
*
|
|
24111
|
+
* @param data The data to be passed when creating a team.
|
|
24112
|
+
*
|
|
24113
|
+
* @returns Promise
|
|
24114
|
+
*/
|
|
24115
|
+
Newsletters.downloadMarketingChecklist = function (data, params) {
|
|
24116
|
+
return Requests.processRoute(NewslettersRoutes.routes.downloadMarketingChecklist, data, undefined, params);
|
|
24117
|
+
};
|
|
24118
|
+
return Newsletters;
|
|
24119
|
+
}());
|
|
24120
|
+
|
|
24121
|
+
var PlayTestsRoute = /** @class */ (function () {
|
|
24122
|
+
function PlayTestsRoute() {
|
|
24123
|
+
}
|
|
24124
|
+
PlayTestsRoute.routes = {
|
|
24125
|
+
index: { url: '/playtests/{title_id}', method: HTTP_METHODS.GET },
|
|
24126
|
+
request: { url: '/playtests/{title_id}/request', method: HTTP_METHODS.POST },
|
|
24127
|
+
invite: { url: '/playtests/{title_id}/invite', method: HTTP_METHODS.POST },
|
|
24128
|
+
submitAnswers: { url: '/playtests/{title_id}/answers/{playtest_id}', method: HTTP_METHODS.PUT },
|
|
24129
|
+
updateQuestions: { url: '/playtests/{title_id}/questions/{playtest_id}', method: HTTP_METHODS.PUT },
|
|
24130
|
+
acceptInvite: { url: '/playtests/{title_id}/accept/{playtest_id}', method: HTTP_METHODS.POST },
|
|
24131
|
+
rejectInvite: { url: '/playtests/{title_id}/reject/{playtest_id}', method: HTTP_METHODS.POST },
|
|
24132
|
+
approveRequest: { url: '/playtests/{title_id}/approve/{playtest_id}', method: HTTP_METHODS.POST },
|
|
24133
|
+
declineRequest: { url: '/playtests/{title_id}/decline/{playtest_id}', method: HTTP_METHODS.POST },
|
|
24134
|
+
cancelRequest: { url: '/playtests/{title_id}/cancel/{playtest_id}', method: HTTP_METHODS.POST },
|
|
24135
|
+
show: { url: '/playtests/{title_id}/view/{playtest_id}', method: HTTP_METHODS.GET },
|
|
24136
|
+
};
|
|
24137
|
+
return PlayTestsRoute;
|
|
24138
|
+
}());
|
|
24139
|
+
|
|
24140
|
+
var PlayTests = /** @class */ (function () {
|
|
24141
|
+
function PlayTests() {
|
|
24142
|
+
}
|
|
24143
|
+
/**
|
|
24144
|
+
* Get a list of play tests associated with a title.
|
|
24145
|
+
*
|
|
24146
|
+
* @param title_id The ID of the title.
|
|
24147
|
+
* @param params Optional query parameters.
|
|
24148
|
+
* @returns Promise
|
|
24149
|
+
*/
|
|
24150
|
+
PlayTests.index = function (title_id, params) {
|
|
24151
|
+
return Requests.processRoute(PlayTestsRoute.routes.index, undefined, { title_id: title_id }, params);
|
|
24152
|
+
};
|
|
24153
|
+
/**
|
|
24154
|
+
* User requests to test a title.
|
|
24155
|
+
*
|
|
24156
|
+
* @param title_id The ID of the title.
|
|
24157
|
+
* @param data Optional data for the request.
|
|
24158
|
+
* @returns Promise
|
|
24159
|
+
*/
|
|
24160
|
+
PlayTests.requestPlayTest = function (title_id, data) {
|
|
24161
|
+
return Requests.processRoute(PlayTestsRoute.routes.request, data, { title_id: title_id });
|
|
24162
|
+
};
|
|
24163
|
+
/**
|
|
24164
|
+
* Title administrator invites a user to test a title.
|
|
24165
|
+
*
|
|
24166
|
+
* @param title_id The ID of the title.
|
|
24167
|
+
* @param data The data containing user_id and other optional fields.
|
|
24168
|
+
* @returns Promise
|
|
24169
|
+
*/
|
|
24170
|
+
PlayTests.invitePlayTester = function (title_id, data) {
|
|
24171
|
+
return Requests.processRoute(PlayTestsRoute.routes.invite, data, { title_id: title_id });
|
|
24172
|
+
};
|
|
24173
|
+
/**
|
|
24174
|
+
* User submits or updates their answers for a play test.
|
|
24175
|
+
*
|
|
24176
|
+
* @param title_id The ID of the title.
|
|
24177
|
+
* @param playtest_id The ID of the play test.
|
|
24178
|
+
* @param data The answers data.
|
|
24179
|
+
* @returns Promise
|
|
24180
|
+
*/
|
|
24181
|
+
PlayTests.submitAnswers = function (title_id, playtest_id, data) {
|
|
24182
|
+
return Requests.processRoute(PlayTestsRoute.routes.submitAnswers, data, { title_id: title_id, playtest_id: playtest_id });
|
|
24183
|
+
};
|
|
24184
|
+
/**
|
|
24185
|
+
* Title admin updates test questions for a play test.
|
|
24186
|
+
*
|
|
24187
|
+
* @param title_id The ID of the title.
|
|
24188
|
+
* @param playtest_id The ID of the play test.
|
|
24189
|
+
* @param data The questions data.
|
|
24190
|
+
* @returns Promise
|
|
24191
|
+
*/
|
|
24192
|
+
PlayTests.updateQuestions = function (title_id, playtest_id, data) {
|
|
24193
|
+
return Requests.processRoute(PlayTestsRoute.routes.updateQuestions, data, { title_id: title_id, playtest_id: playtest_id });
|
|
24194
|
+
};
|
|
24195
|
+
/**
|
|
24196
|
+
* User accepts an invite to a play test.
|
|
24197
|
+
*
|
|
24198
|
+
* @param title_id The ID of the title.
|
|
24199
|
+
* @param playtest_id The ID of the play test.
|
|
24200
|
+
* @returns Promise
|
|
24201
|
+
*/
|
|
24202
|
+
PlayTests.acceptInvite = function (title_id, playtest_id) {
|
|
24203
|
+
return Requests.processRoute(PlayTestsRoute.routes.acceptInvite, {}, { title_id: title_id, playtest_id: playtest_id });
|
|
24204
|
+
};
|
|
24205
|
+
/**
|
|
24206
|
+
* User rejects an invite to a play test.
|
|
24207
|
+
*
|
|
24208
|
+
* @param title_id The ID of the title.
|
|
24209
|
+
* @param playtest_id The ID of the play test.
|
|
24210
|
+
* @returns Promise
|
|
24211
|
+
*/
|
|
24212
|
+
PlayTests.rejectInvite = function (title_id, playtest_id) {
|
|
24213
|
+
return Requests.processRoute(PlayTestsRoute.routes.rejectInvite, {}, { title_id: title_id, playtest_id: playtest_id });
|
|
24214
|
+
};
|
|
24215
|
+
/**
|
|
24216
|
+
* Title admin approves a user's play test request.
|
|
24217
|
+
*
|
|
24218
|
+
* @param title_id The ID of the title.
|
|
24219
|
+
* @param playtest_id The ID of the play test.
|
|
24220
|
+
* @returns Promise
|
|
24221
|
+
*/
|
|
24222
|
+
PlayTests.approveRequest = function (title_id, playtest_id) {
|
|
24223
|
+
return Requests.processRoute(PlayTestsRoute.routes.approveRequest, {}, { title_id: title_id, playtest_id: playtest_id });
|
|
24224
|
+
};
|
|
24225
|
+
/**
|
|
24226
|
+
* Title admin declines a user's play test request.
|
|
24227
|
+
*
|
|
24228
|
+
* @param title_id The ID of the title.
|
|
24229
|
+
* @param playtest_id The ID of the play test.
|
|
24230
|
+
* @returns Promise
|
|
24231
|
+
*/
|
|
24232
|
+
PlayTests.declineRequest = function (title_id, playtest_id) {
|
|
24233
|
+
return Requests.processRoute(PlayTestsRoute.routes.declineRequest, {}, { title_id: title_id, playtest_id: playtest_id });
|
|
24234
|
+
};
|
|
24235
|
+
/**
|
|
24236
|
+
* User cancels their own play test request.
|
|
24237
|
+
*
|
|
24238
|
+
* @param title_id The ID of the title.
|
|
24239
|
+
* @param playtest_id The ID of the play test.
|
|
24240
|
+
* @returns Promise
|
|
24241
|
+
*/
|
|
24242
|
+
PlayTests.cancelRequest = function (title_id, playtest_id) {
|
|
24243
|
+
return Requests.processRoute(PlayTestsRoute.routes.cancelRequest, {}, { title_id: title_id, playtest_id: playtest_id });
|
|
24244
|
+
};
|
|
24245
|
+
/**
|
|
24246
|
+
* Retrieve a single play test.
|
|
24247
|
+
*
|
|
24248
|
+
* @param title_id The ID of the title.
|
|
24249
|
+
* @param playtest_id The ID of the play test.
|
|
24250
|
+
* @returns Promise
|
|
24251
|
+
*/
|
|
24252
|
+
PlayTests.show = function (title_id, playtest_id) {
|
|
24253
|
+
return Requests.processRoute(PlayTestsRoute.routes.show, {}, { title_id: title_id, playtest_id: playtest_id });
|
|
24254
|
+
};
|
|
24255
|
+
return PlayTests;
|
|
24256
|
+
}());
|
|
24257
|
+
|
|
24094
24258
|
var Parser = /** @class */ (function () {
|
|
24095
24259
|
function Parser() {
|
|
24096
24260
|
}
|
|
@@ -24512,7 +24676,9 @@ var Glitch = /** @class */ (function () {
|
|
|
24512
24676
|
TipPackages: TipPackages,
|
|
24513
24677
|
TipEmojis: TipEmojis,
|
|
24514
24678
|
TipPackagePurchases: TipPackagePurchases,
|
|
24515
|
-
Publications: Publications
|
|
24679
|
+
Publications: Publications,
|
|
24680
|
+
Newsletters: Newsletters,
|
|
24681
|
+
PlayTests: PlayTests
|
|
24516
24682
|
};
|
|
24517
24683
|
Glitch.util = {
|
|
24518
24684
|
Requests: Requests,
|