glitch-javascript-sdk 1.2.7 → 1.2.9
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 +319 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Communities.d.ts +197 -0
- package/dist/esm/api/GameShows.d.ts +24 -0
- package/dist/esm/index.js +319 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +221 -0
- package/package.json +1 -1
- package/src/api/Communities.ts +359 -74
- package/src/api/GameShows.ts +42 -0
- package/src/routes/CommunitiesRoute.ts +69 -39
- package/src/routes/GameShowsRoute.ts +6 -0
package/src/api/GameShows.ts
CHANGED
|
@@ -140,6 +140,48 @@ class GameShows {
|
|
|
140
140
|
return Requests.uploadBlob(url, 'image', blob, data);
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
+
/**
|
|
144
|
+
* Register a title to a game show.
|
|
145
|
+
*/
|
|
146
|
+
public static registerTitle<T>(show_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
147
|
+
return Requests.processRoute(GameShowsRoute.routes.registerTitle, data, { show_id: show_id }, params);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Add a title to a game show by admin.
|
|
152
|
+
*/
|
|
153
|
+
public static addTitle<T>(show_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
154
|
+
return Requests.processRoute(GameShowsRoute.routes.addTitle, data, { show_id: show_id }, params);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* List all titles for a game show.
|
|
159
|
+
*/
|
|
160
|
+
public static listTitles<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
161
|
+
return Requests.processRoute(GameShowsRoute.routes.listTitles, {}, { show_id: show_id }, params);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Get details of a specific title in a game show.
|
|
166
|
+
*/
|
|
167
|
+
public static getTitle<T>(show_id: string, title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
168
|
+
return Requests.processRoute(GameShowsRoute.routes.getTitle, {}, { show_id: show_id, title_id: title_id }, params);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Update a specific title in a game show.
|
|
173
|
+
*/
|
|
174
|
+
public static updateTitle<T>(show_id: string, title_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
175
|
+
return Requests.processRoute(GameShowsRoute.routes.updateTitle, data, { show_id: show_id, title_id: title_id }, params);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Delete a specific title from a game show.
|
|
180
|
+
*/
|
|
181
|
+
public static deleteTitle<T>(show_id: string, title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
182
|
+
return Requests.processRoute(GameShowsRoute.routes.deleteTitle, {}, { show_id: show_id, title_id: title_id }, params);
|
|
183
|
+
}
|
|
184
|
+
|
|
143
185
|
}
|
|
144
186
|
|
|
145
187
|
export default GameShows;
|
|
@@ -2,42 +2,72 @@ import Route from "./interface";
|
|
|
2
2
|
import HTTP_METHODS from "../constants/HttpMethods";
|
|
3
3
|
|
|
4
4
|
class CommunitiesRoute {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
5
|
+
|
|
6
|
+
public static routes: { [key: string]: Route } = {
|
|
7
|
+
list: { url: '/communities', method: HTTP_METHODS.GET },
|
|
8
|
+
create: { url: '/communities', method: HTTP_METHODS.POST },
|
|
9
|
+
view: { url: '/communities/{community_id}', method: HTTP_METHODS.GET },
|
|
10
|
+
update: { url: '/communities/{community_id}', method: HTTP_METHODS.PUT },
|
|
11
|
+
delete: { url: '/communities/{community_id}', method: HTTP_METHODS.DELETE },
|
|
12
|
+
uploadLogo: { url: '/communities/{community_id}/uploadLogo', method: HTTP_METHODS.POST },
|
|
13
|
+
uploadBannerImage: { url: '/communities/{community_id}/uploadBannerImage', method: HTTP_METHODS.POST },
|
|
14
|
+
uploadVideoLogo: { url: '/communities/{community_id}/uploadVideoLogo', method: HTTP_METHODS.POST },
|
|
15
|
+
listInvites: { url: '/communities/{community_id}/invites', method: HTTP_METHODS.GET },
|
|
16
|
+
sendInvite: { url: '/communities/{community_id}/sendInvite', method: HTTP_METHODS.POST },
|
|
17
|
+
acceptInvite: { url: '/communities/{community_id}/acceptInvite', method: HTTP_METHODS.POST },
|
|
18
|
+
retrieveInvite: { url: '/communities/{community_id}/invites/{token}', method: HTTP_METHODS.GET },
|
|
19
|
+
listUsers: { url: '/communities/{community_id}/users', method: HTTP_METHODS.GET },
|
|
20
|
+
addUser: { url: '/communities/{community_id}/users', method: HTTP_METHODS.POST },
|
|
21
|
+
showUser: { url: '/communities/{community_id}/users/{user_id}', method: HTTP_METHODS.GET },
|
|
22
|
+
updateUser: { url: '/communities/{community_id}/users/{user_id}', method: HTTP_METHODS.PUT },
|
|
23
|
+
removeUser: { url: '/communities/{community_id}/users/{user_id}', method: HTTP_METHODS.DELETE },
|
|
24
|
+
join: { url: '/communities/{community_id}/join', method: HTTP_METHODS.POST },
|
|
25
|
+
findByDomain: { url: '/communities/findByDomain/{domain}', method: HTTP_METHODS.GET },
|
|
26
|
+
addPaymentMethod: { url: '/communities/{community_id}/payment/methods', method: HTTP_METHODS.POST },
|
|
27
|
+
getPaymentMethods: { url: '/communities/{community_id}/payment/methods', method: HTTP_METHODS.GET },
|
|
28
|
+
setDefaultPaymentMethod: { url: '/communities/{community_id}/payment/methods/default', method: HTTP_METHODS.POST },
|
|
29
|
+
getLedger: { url: '/communities/{community_id}/payment/ledger', method: HTTP_METHODS.GET },
|
|
30
|
+
clearDocusignAuth: { url: '/communities/{community_id}/clearDocusignAuth', method: HTTP_METHODS.DELETE },
|
|
31
|
+
clearHellosignAuth: { url: '/communities/{community_id}/clearHellosignAuth', method: HTTP_METHODS.DELETE },
|
|
32
|
+
clearSimplesignAuth: { url: '/communities/{community_id}/clearSimplesignAuth', method: HTTP_METHODS.DELETE },
|
|
33
|
+
listEmailTemplates: { url: '/communities/{community_id}/emails/templates', method: HTTP_METHODS.GET },
|
|
34
|
+
createEmailTemplate: { url: '/communities/{community_id}/emails/templates', method: HTTP_METHODS.POST },
|
|
35
|
+
viewEmailTemplate: { url: '/communities/{community_id}/emails/templates/{template_id}', method: HTTP_METHODS.GET },
|
|
36
|
+
updateEmailTemplate: { url: '/communities/{community_id}/emails/templates/{template_id}', method: HTTP_METHODS.PUT },
|
|
37
|
+
deleteEmailTemplate: { url: '/communities/{community_id}/emails/templates/{template_id}', method: HTTP_METHODS.DELETE },
|
|
38
|
+
populateEmailTemplate: { url: '/communities/{community_id}/emails/templates/{template_id}/populate', method: HTTP_METHODS.POST },
|
|
39
|
+
|
|
40
|
+
// Newsletters
|
|
41
|
+
listNewsletters: { url: '/communities/newsletters', method: HTTP_METHODS.GET },
|
|
42
|
+
createNewsletter: { url: '/communities/{community_id}/newsletters', method: HTTP_METHODS.POST },
|
|
43
|
+
viewNewsletter: { url: '/communities/{community_id}/newsletters/{newsletter_id}', method: HTTP_METHODS.GET },
|
|
44
|
+
updateNewsletter: { url: '/communities/{community_id}/newsletters/{newsletter_id}', method: HTTP_METHODS.PUT },
|
|
45
|
+
deleteNewsletter: { url: '/communities/{community_id}/newsletters/{newsletter_id}', method: HTTP_METHODS.DELETE },
|
|
46
|
+
importNewsletterSubscribers: { url: '/communities/{community_id}/newsletters/{newsletter_id}/subscribers/import', method: HTTP_METHODS.POST },
|
|
47
|
+
uploadNewsletterBannerImage: { url: '/communities/{community_id}/newsletters/{newsletter_id}/uploadBannerImage', method: HTTP_METHODS.POST },
|
|
48
|
+
|
|
49
|
+
// Campaigns
|
|
50
|
+
listCampaigns: { url: '/communities/{community_id}/newsletters/{newsletter_id}/campaigns', method: HTTP_METHODS.GET },
|
|
51
|
+
createCampaign: { url: '/communities/{community_id}/newsletters/{newsletter_id}/campaigns', method: HTTP_METHODS.POST },
|
|
52
|
+
viewCampaign: { url: '/communities/{community_id}/newsletters/{newsletter_id}/campaigns/{campaign_id}', method: HTTP_METHODS.GET },
|
|
53
|
+
updateCampaign: { url: '/communities/{community_id}/newsletters/{newsletter_id}/campaigns/{campaign_id}', method: HTTP_METHODS.PUT },
|
|
54
|
+
deleteCampaign: { url: '/communities/{community_id}/newsletters/{newsletter_id}/campaigns/{campaign_id}', method: HTTP_METHODS.DELETE },
|
|
55
|
+
sendCampaign: { url: '/communities/{community_id}/newsletters/{newsletter_id}/campaigns/{campaign_id}/send', method: HTTP_METHODS.POST },
|
|
56
|
+
scheduleCampaign: { url: '/communities/{community_id}/newsletters/{newsletter_id}/campaigns/{campaign_id}/schedule', method: HTTP_METHODS.POST },
|
|
57
|
+
|
|
58
|
+
// Emails
|
|
59
|
+
listCampaignEmails: { url: '/communities/{community_id}/newsletters/{newsletter_id}/campaigns/{campaign_id}/emails', method: HTTP_METHODS.GET },
|
|
60
|
+
|
|
61
|
+
// Subscribers (admin routes)
|
|
62
|
+
listNewsletterSubscribers: { url: '/communities/{community_id}/newsletters/{newsletter_id}/subscribers', method: HTTP_METHODS.GET },
|
|
63
|
+
viewNewsletterSubscriber: { url: '/communities/{community_id}/newsletters/{newsletter_id}/subscribers/{subscriber_id}', method: HTTP_METHODS.GET },
|
|
64
|
+
updateNewsletterSubscriber: { url: '/communities/{community_id}/newsletters/{newsletter_id}/subscribers/{subscriber_id}', method: HTTP_METHODS.PUT },
|
|
65
|
+
deleteNewsletterSubscriber: { url: '/communities/{community_id}/newsletters/{newsletter_id}/subscribers/{subscriber_id}', method: HTTP_METHODS.DELETE },
|
|
66
|
+
|
|
67
|
+
// Subscriber registration (open route)
|
|
68
|
+
registerNewsletterSubscriber: { url: '/communities/{community_id}/newsletters/{newsletter_id}/subscribers', method: HTTP_METHODS.POST },
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export default CommunitiesRoute;
|
|
@@ -11,6 +11,12 @@ class GameShowsRoute {
|
|
|
11
11
|
delete : { url: '/gameshows/{show_id}', method: HTTP_METHODS.DELETE },
|
|
12
12
|
uploadLogo : {url : '/gameshows/{show_id}/uploadLogo', method: HTTP_METHODS.POST},
|
|
13
13
|
uploadBannerImage : {url : '/gameshows/{show_id}/uploadBannerImage', method: HTTP_METHODS.POST},
|
|
14
|
+
registerTitle: { url: '/gameshows/{show_id}/registerTitle', method: HTTP_METHODS.POST },
|
|
15
|
+
listTitles: { url: '/gameshows/{show_id}/titles', method: HTTP_METHODS.GET },
|
|
16
|
+
addTitle: { url: '/gameshows/{show_id}/addTitle', method: HTTP_METHODS.POST },
|
|
17
|
+
viewTitle: { url: '/gameshows/{show_id}/titles/{title_id}', method: HTTP_METHODS.GET },
|
|
18
|
+
updateTitle: { url: '/gameshows/{show_id}/titles/{title_id}', method: HTTP_METHODS.PUT },
|
|
19
|
+
deleteTitle: { url: '/gameshows/{show_id}/titles/{title_id}', method: HTTP_METHODS.DELETE },
|
|
14
20
|
};
|
|
15
21
|
|
|
16
22
|
}
|