glitch-javascript-sdk 0.5.4 → 0.5.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 +120 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Events.d.ts +50 -0
- package/dist/esm/api/Users.d.ts +40 -0
- package/dist/esm/index.js +120 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +90 -0
- package/package.json +1 -1
- package/src/api/Events.ts +70 -0
- package/src/api/Users.ts +60 -0
- package/src/routes/EventsRoute.ts +5 -1
- package/src/routes/UserRoutes.ts +5 -0
package/dist/esm/api/Events.d.ts
CHANGED
|
@@ -322,5 +322,55 @@ declare class Events {
|
|
|
322
322
|
* @returns promise
|
|
323
323
|
*/
|
|
324
324
|
static disableWidget<T>(event_id: string, widget_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
325
|
+
/**
|
|
326
|
+
* Get all the tips associated with the current event.
|
|
327
|
+
*
|
|
328
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventRecording
|
|
329
|
+
*
|
|
330
|
+
* @param event_id The id of the event to update.
|
|
331
|
+
*
|
|
332
|
+
* @returns promise
|
|
333
|
+
*/
|
|
334
|
+
static getTips<T>(event_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
335
|
+
/**
|
|
336
|
+
* Sets the personality attribute of the AI to adjust how it will respond.
|
|
337
|
+
*
|
|
338
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/disableOverlay
|
|
339
|
+
*
|
|
340
|
+
* @param event_id The id of the event.
|
|
341
|
+
*
|
|
342
|
+
* @returns promise
|
|
343
|
+
*/
|
|
344
|
+
static setAIAvatarPersonalityAttribute<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
345
|
+
/**
|
|
346
|
+
* Sets the AI Avatars name, which it can respond too.
|
|
347
|
+
*
|
|
348
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/disableOverlay
|
|
349
|
+
*
|
|
350
|
+
* @param event_id The id of the event.
|
|
351
|
+
*
|
|
352
|
+
* @returns promise
|
|
353
|
+
*/
|
|
354
|
+
static setAIAvatarName<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
355
|
+
/**
|
|
356
|
+
* Sets the AI Avatar to that it willr respond to users in the chat.
|
|
357
|
+
*
|
|
358
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/disableOverlay
|
|
359
|
+
*
|
|
360
|
+
* @param event_id The id of the event.
|
|
361
|
+
*
|
|
362
|
+
* @returns promise
|
|
363
|
+
*/
|
|
364
|
+
static setAIAvatarRespondToChat<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
365
|
+
/**
|
|
366
|
+
* Sets the AI Avatar so that it will respond to you.
|
|
367
|
+
*
|
|
368
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/disableOverlay
|
|
369
|
+
*
|
|
370
|
+
* @param event_id The id of the event.
|
|
371
|
+
*
|
|
372
|
+
* @returns promise
|
|
373
|
+
*/
|
|
374
|
+
static setAIAvatarRespondToMe<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
325
375
|
}
|
|
326
376
|
export default Events;
|
package/dist/esm/api/Users.d.ts
CHANGED
|
@@ -159,5 +159,45 @@ declare class Users {
|
|
|
159
159
|
* @returns promise
|
|
160
160
|
*/
|
|
161
161
|
static clearYoutubeAuth<T>(): AxiosPromise<Response<T>>;
|
|
162
|
+
/**
|
|
163
|
+
* Returns a list of tips received by the authenticated user for a given month and year
|
|
164
|
+
*
|
|
165
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
166
|
+
*
|
|
167
|
+
* @returns promise
|
|
168
|
+
*/
|
|
169
|
+
static getTipsReceivedForMonth<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
170
|
+
/**
|
|
171
|
+
* Returns a list of tips given by the authenticated user for a given month and year.
|
|
172
|
+
*
|
|
173
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
174
|
+
*
|
|
175
|
+
* @returns promise
|
|
176
|
+
*/
|
|
177
|
+
static getTipsGivenForMonth<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
178
|
+
/**
|
|
179
|
+
* Returns the aggregated monthly tips received by the authenticated user over a certain number of months. Defaults to 12 months if not provided.
|
|
180
|
+
*
|
|
181
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
182
|
+
*
|
|
183
|
+
* @returns promise
|
|
184
|
+
*/
|
|
185
|
+
static aggregateMonthlyReceivedTips<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
186
|
+
/**
|
|
187
|
+
* Returns the aggregated monthly tips given by the authenticated user over a certain number of months. Defaults to 12 months if not provided.
|
|
188
|
+
*
|
|
189
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
190
|
+
*
|
|
191
|
+
* @returns promise
|
|
192
|
+
*/
|
|
193
|
+
static aggregateMonthlyGivenTips<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
194
|
+
/**
|
|
195
|
+
* Returns the user associated Youtube a channels a user has.
|
|
196
|
+
*
|
|
197
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
198
|
+
*
|
|
199
|
+
* @returns promise
|
|
200
|
+
*/
|
|
201
|
+
static getYoutubeChannels<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
162
202
|
}
|
|
163
203
|
export default Users;
|
package/dist/esm/index.js
CHANGED
|
@@ -31342,6 +31342,11 @@ var UserRoutes = /** @class */ (function () {
|
|
|
31342
31342
|
clearStripeAuth: { url: '/users/clearStripeAuth', method: HTTP_METHODS.DELETE },
|
|
31343
31343
|
clearTikTokAuth: { url: '/users/clearTikTokAuth', method: HTTP_METHODS.DELETE },
|
|
31344
31344
|
clearYoutubeAuth: { url: '/users/clearYoutubeAuth', method: HTTP_METHODS.DELETE },
|
|
31345
|
+
getTipsReceivedForMonth: { url: '/users/getTipsReceivedForMonth', method: HTTP_METHODS.GET },
|
|
31346
|
+
getTipsGivenForMonth: { url: '/users/getTipsGivenForMonth', method: HTTP_METHODS.GET },
|
|
31347
|
+
aggregateMonthlyReceivedTips: { url: '/users/aggregateMonthlyReceivedTips', method: HTTP_METHODS.GET },
|
|
31348
|
+
aggregateMonthlyGivenTips: { url: '/users/aggregateMonthlyGivenTips', method: HTTP_METHODS.GET },
|
|
31349
|
+
getYoutubeChannels: { url: '/users/getYoutubeChannels', method: HTTP_METHODS.GET },
|
|
31345
31350
|
};
|
|
31346
31351
|
return UserRoutes;
|
|
31347
31352
|
}());
|
|
@@ -31541,6 +31546,56 @@ var Users = /** @class */ (function () {
|
|
|
31541
31546
|
Users.clearYoutubeAuth = function () {
|
|
31542
31547
|
return Requests.processRoute(UserRoutes.routes.clearYoutubeAuth, {});
|
|
31543
31548
|
};
|
|
31549
|
+
/**
|
|
31550
|
+
* Returns a list of tips received by the authenticated user for a given month and year
|
|
31551
|
+
*
|
|
31552
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
31553
|
+
*
|
|
31554
|
+
* @returns promise
|
|
31555
|
+
*/
|
|
31556
|
+
Users.getTipsReceivedForMonth = function (params) {
|
|
31557
|
+
return Requests.processRoute(UserRoutes.routes.getTipsReceivedForMonth, undefined, undefined, params);
|
|
31558
|
+
};
|
|
31559
|
+
/**
|
|
31560
|
+
* Returns a list of tips given by the authenticated user for a given month and year.
|
|
31561
|
+
*
|
|
31562
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
31563
|
+
*
|
|
31564
|
+
* @returns promise
|
|
31565
|
+
*/
|
|
31566
|
+
Users.getTipsGivenForMonth = function (params) {
|
|
31567
|
+
return Requests.processRoute(UserRoutes.routes.getTipsGivenForMonth, undefined, undefined, params);
|
|
31568
|
+
};
|
|
31569
|
+
/**
|
|
31570
|
+
* Returns the aggregated monthly tips received by the authenticated user over a certain number of months. Defaults to 12 months if not provided.
|
|
31571
|
+
*
|
|
31572
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
31573
|
+
*
|
|
31574
|
+
* @returns promise
|
|
31575
|
+
*/
|
|
31576
|
+
Users.aggregateMonthlyReceivedTips = function (params) {
|
|
31577
|
+
return Requests.processRoute(UserRoutes.routes.aggregateMonthlyReceivedTips, undefined, undefined, params);
|
|
31578
|
+
};
|
|
31579
|
+
/**
|
|
31580
|
+
* Returns the aggregated monthly tips given by the authenticated user over a certain number of months. Defaults to 12 months if not provided.
|
|
31581
|
+
*
|
|
31582
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
31583
|
+
*
|
|
31584
|
+
* @returns promise
|
|
31585
|
+
*/
|
|
31586
|
+
Users.aggregateMonthlyGivenTips = function (params) {
|
|
31587
|
+
return Requests.processRoute(UserRoutes.routes.aggregateMonthlyGivenTips, undefined, undefined, params);
|
|
31588
|
+
};
|
|
31589
|
+
/**
|
|
31590
|
+
* Returns the user associated Youtube a channels a user has.
|
|
31591
|
+
*
|
|
31592
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
31593
|
+
*
|
|
31594
|
+
* @returns promise
|
|
31595
|
+
*/
|
|
31596
|
+
Users.getYoutubeChannels = function (params) {
|
|
31597
|
+
return Requests.processRoute(UserRoutes.routes.getYoutubeChannels, undefined, undefined, params);
|
|
31598
|
+
};
|
|
31544
31599
|
return Users;
|
|
31545
31600
|
}());
|
|
31546
31601
|
|
|
@@ -31576,6 +31631,11 @@ var EventsRoutes = /** @class */ (function () {
|
|
|
31576
31631
|
addYoutubeMulticast: { url: '/events/{event_id}/addYoutubeMulticast', method: HTTP_METHODS.POST },
|
|
31577
31632
|
enableWidget: { url: '/events/{event_id}/enableWidget/{widget_id}', method: HTTP_METHODS.POST },
|
|
31578
31633
|
disableWidget: { url: '/events/{event_id}/disableWidget/{widget_id}', method: HTTP_METHODS.DELETE },
|
|
31634
|
+
getTips: { url: '/events/{event_id}/tips', method: HTTP_METHODS.GET },
|
|
31635
|
+
setAIAvatarPersonalityAttribute: { url: '/events/{event_id}/setAIAvatarPersonalityAttribute', method: HTTP_METHODS.POST },
|
|
31636
|
+
setAIAvatarName: { url: '/events/{event_id}/setAIAvatarName', method: HTTP_METHODS.POST },
|
|
31637
|
+
setAIAvatarRespondToChat: { url: '/events/{event_id}/setAIAvatarRespondToChat', method: HTTP_METHODS.POST },
|
|
31638
|
+
setAIAvatarRespondToMe: { url: '/events/{event_id}/setAIAvatarRespondToMe', method: HTTP_METHODS.POST },
|
|
31579
31639
|
};
|
|
31580
31640
|
return EventsRoutes;
|
|
31581
31641
|
}());
|
|
@@ -31983,6 +32043,66 @@ var Events = /** @class */ (function () {
|
|
|
31983
32043
|
Events.disableWidget = function (event_id, widget_id, data, params) {
|
|
31984
32044
|
return Requests.processRoute(EventsRoutes.routes.disableWidget, data, { event_id: event_id, widget_id: widget_id }, params);
|
|
31985
32045
|
};
|
|
32046
|
+
/**
|
|
32047
|
+
* Get all the tips associated with the current event.
|
|
32048
|
+
*
|
|
32049
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventRecording
|
|
32050
|
+
*
|
|
32051
|
+
* @param event_id The id of the event to update.
|
|
32052
|
+
*
|
|
32053
|
+
* @returns promise
|
|
32054
|
+
*/
|
|
32055
|
+
Events.getTips = function (event_id, params) {
|
|
32056
|
+
return Requests.processRoute(EventsRoutes.routes.getTips, {}, { event_id: event_id }, params);
|
|
32057
|
+
};
|
|
32058
|
+
/**
|
|
32059
|
+
* Sets the personality attribute of the AI to adjust how it will respond.
|
|
32060
|
+
*
|
|
32061
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/disableOverlay
|
|
32062
|
+
*
|
|
32063
|
+
* @param event_id The id of the event.
|
|
32064
|
+
*
|
|
32065
|
+
* @returns promise
|
|
32066
|
+
*/
|
|
32067
|
+
Events.setAIAvatarPersonalityAttribute = function (event_id, data, params) {
|
|
32068
|
+
return Requests.processRoute(EventsRoutes.routes.setAIAvatarPersonalityAttribute, data, { event_id: event_id }, params);
|
|
32069
|
+
};
|
|
32070
|
+
/**
|
|
32071
|
+
* Sets the AI Avatars name, which it can respond too.
|
|
32072
|
+
*
|
|
32073
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/disableOverlay
|
|
32074
|
+
*
|
|
32075
|
+
* @param event_id The id of the event.
|
|
32076
|
+
*
|
|
32077
|
+
* @returns promise
|
|
32078
|
+
*/
|
|
32079
|
+
Events.setAIAvatarName = function (event_id, data, params) {
|
|
32080
|
+
return Requests.processRoute(EventsRoutes.routes.setAIAvatarName, data, { event_id: event_id }, params);
|
|
32081
|
+
};
|
|
32082
|
+
/**
|
|
32083
|
+
* Sets the AI Avatar to that it willr respond to users in the chat.
|
|
32084
|
+
*
|
|
32085
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/disableOverlay
|
|
32086
|
+
*
|
|
32087
|
+
* @param event_id The id of the event.
|
|
32088
|
+
*
|
|
32089
|
+
* @returns promise
|
|
32090
|
+
*/
|
|
32091
|
+
Events.setAIAvatarRespondToChat = function (event_id, data, params) {
|
|
32092
|
+
return Requests.processRoute(EventsRoutes.routes.setAIAvatarRespondToChat, data, { event_id: event_id }, params);
|
|
32093
|
+
};
|
|
32094
|
+
/**
|
|
32095
|
+
* Sets the AI Avatar so that it will respond to you.
|
|
32096
|
+
*
|
|
32097
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/disableOverlay
|
|
32098
|
+
*
|
|
32099
|
+
* @param event_id The id of the event.
|
|
32100
|
+
*
|
|
32101
|
+
* @returns promise
|
|
32102
|
+
*/
|
|
32103
|
+
Events.setAIAvatarRespondToMe = function (event_id, data, params) {
|
|
32104
|
+
return Requests.processRoute(EventsRoutes.routes.setAIAvatarRespondToMe, data, { event_id: event_id }, params);
|
|
32105
|
+
};
|
|
31986
32106
|
return Events;
|
|
31987
32107
|
}());
|
|
31988
32108
|
|