glitch-javascript-sdk 1.2.7 → 1.2.8
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/dist/index.d.ts
CHANGED
|
@@ -990,6 +990,203 @@ declare class Communities {
|
|
|
990
990
|
* @returns Promise
|
|
991
991
|
*/
|
|
992
992
|
static populateEmailTemplate<T>(community_id: string, template_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
993
|
+
/**
|
|
994
|
+
* List all newsletters for a community.
|
|
995
|
+
*
|
|
996
|
+
* @param community_id The ID of the community.
|
|
997
|
+
* @param params Query parameters.
|
|
998
|
+
* @returns Promise
|
|
999
|
+
*/
|
|
1000
|
+
static listNewsletters<T>(community_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1001
|
+
/**
|
|
1002
|
+
* Create a new newsletter for a community.
|
|
1003
|
+
*
|
|
1004
|
+
* @param community_id The ID of the community.
|
|
1005
|
+
* @param data The data for the new newsletter.
|
|
1006
|
+
* @returns Promise
|
|
1007
|
+
*/
|
|
1008
|
+
static createNewsletter<T>(community_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1009
|
+
/**
|
|
1010
|
+
* Get a specific newsletter.
|
|
1011
|
+
*
|
|
1012
|
+
* @param community_id The ID of the community.
|
|
1013
|
+
* @param newsletter_id The ID of the newsletter.
|
|
1014
|
+
* @param params Query parameters.
|
|
1015
|
+
* @returns Promise
|
|
1016
|
+
*/
|
|
1017
|
+
static viewNewsletter<T>(community_id: string, newsletter_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1018
|
+
/**
|
|
1019
|
+
* Update a specific newsletter.
|
|
1020
|
+
*
|
|
1021
|
+
* @param community_id The ID of the community.
|
|
1022
|
+
* @param newsletter_id The ID of the newsletter.
|
|
1023
|
+
* @param data The data to update.
|
|
1024
|
+
* @returns Promise
|
|
1025
|
+
*/
|
|
1026
|
+
static updateNewsletter<T>(community_id: string, newsletter_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1027
|
+
/**
|
|
1028
|
+
* Delete a specific newsletter.
|
|
1029
|
+
*
|
|
1030
|
+
* @param community_id The ID of the community.
|
|
1031
|
+
* @param newsletter_id The ID of the newsletter.
|
|
1032
|
+
* @returns Promise
|
|
1033
|
+
*/
|
|
1034
|
+
static deleteNewsletter<T>(community_id: string, newsletter_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1035
|
+
/**
|
|
1036
|
+
* Import subscribers from a CSV or XLS file into a newsletter.
|
|
1037
|
+
*
|
|
1038
|
+
* @param community_id The ID of the community.
|
|
1039
|
+
* @param newsletter_id The ID of the newsletter.
|
|
1040
|
+
* @param file The CSV or XLS file.
|
|
1041
|
+
* @param params Additional parameters.
|
|
1042
|
+
* @returns Promise
|
|
1043
|
+
*/
|
|
1044
|
+
static importNewsletterSubscribers<T>(community_id: string, newsletter_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1045
|
+
/**
|
|
1046
|
+
* Updates the banner image for the game show using a File object.
|
|
1047
|
+
*
|
|
1048
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowBannerImage
|
|
1049
|
+
*
|
|
1050
|
+
* @param file The file object to upload.
|
|
1051
|
+
* @param data Any additional data to pass along to the upload.
|
|
1052
|
+
*
|
|
1053
|
+
* @returns promise
|
|
1054
|
+
*/
|
|
1055
|
+
static uploadNewsletterBannerImageFile<T>(community_id: string, newsletter_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1056
|
+
/**
|
|
1057
|
+
* Updates the banner image for the game show using a Blob.
|
|
1058
|
+
*
|
|
1059
|
+
* @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowBannerImage
|
|
1060
|
+
*
|
|
1061
|
+
* @param blob The blob to upload.
|
|
1062
|
+
* @param data Any additional data to pass along to the upload
|
|
1063
|
+
*
|
|
1064
|
+
* @returns promise
|
|
1065
|
+
*/
|
|
1066
|
+
static uploadNewsletterBannerImageBlob<T>(community_id: string, newsletter_id: string, blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1067
|
+
/**
|
|
1068
|
+
* List all campaigns for a newsletter.
|
|
1069
|
+
*
|
|
1070
|
+
* @param community_id The ID of the community.
|
|
1071
|
+
* @param newsletter_id The ID of the newsletter.
|
|
1072
|
+
* @param params Query parameters.
|
|
1073
|
+
* @returns Promise
|
|
1074
|
+
*/
|
|
1075
|
+
static listCampaigns<T>(community_id: string, newsletter_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1076
|
+
/**
|
|
1077
|
+
* Create a new campaign for a newsletter.
|
|
1078
|
+
*
|
|
1079
|
+
* @param community_id The ID of the community.
|
|
1080
|
+
* @param newsletter_id The ID of the newsletter.
|
|
1081
|
+
* @param data The data for the new campaign.
|
|
1082
|
+
* @returns Promise
|
|
1083
|
+
*/
|
|
1084
|
+
static createCampaign<T>(community_id: string, newsletter_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1085
|
+
/**
|
|
1086
|
+
* Get a specific campaign.
|
|
1087
|
+
*
|
|
1088
|
+
* @param community_id The ID of the community.
|
|
1089
|
+
* @param newsletter_id The ID of the newsletter.
|
|
1090
|
+
* @param campaign_id The ID of the campaign.
|
|
1091
|
+
* @param params Query parameters.
|
|
1092
|
+
* @returns Promise
|
|
1093
|
+
*/
|
|
1094
|
+
static viewCampaign<T>(community_id: string, newsletter_id: string, campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1095
|
+
/**
|
|
1096
|
+
* Update a specific campaign.
|
|
1097
|
+
*
|
|
1098
|
+
* @param community_id The ID of the community.
|
|
1099
|
+
* @param newsletter_id The ID of the newsletter.
|
|
1100
|
+
* @param campaign_id The ID of the campaign.
|
|
1101
|
+
* @param data The data to update.
|
|
1102
|
+
* @returns Promise
|
|
1103
|
+
*/
|
|
1104
|
+
static updateCampaign<T>(community_id: string, newsletter_id: string, campaign_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1105
|
+
/**
|
|
1106
|
+
* Delete a specific campaign.
|
|
1107
|
+
*
|
|
1108
|
+
* @param community_id The ID of the community.
|
|
1109
|
+
* @param newsletter_id The ID of the newsletter.
|
|
1110
|
+
* @param campaign_id The ID of the campaign.
|
|
1111
|
+
* @returns Promise
|
|
1112
|
+
*/
|
|
1113
|
+
static deleteCampaign<T>(community_id: string, newsletter_id: string, campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1114
|
+
/**
|
|
1115
|
+
* Send a campaign immediately.
|
|
1116
|
+
*
|
|
1117
|
+
* @param community_id The ID of the community.
|
|
1118
|
+
* @param newsletter_id The ID of the newsletter.
|
|
1119
|
+
* @param campaign_id The ID of the campaign.
|
|
1120
|
+
* @returns Promise
|
|
1121
|
+
*/
|
|
1122
|
+
static sendCampaign<T>(community_id: string, newsletter_id: string, campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1123
|
+
/**
|
|
1124
|
+
* Schedule a campaign to be sent later.
|
|
1125
|
+
*
|
|
1126
|
+
* @param community_id The ID of the community.
|
|
1127
|
+
* @param newsletter_id The ID of the newsletter.
|
|
1128
|
+
* @param campaign_id The ID of the campaign.
|
|
1129
|
+
* @param data The scheduling data (e.g., scheduled_at).
|
|
1130
|
+
* @returns Promise
|
|
1131
|
+
*/
|
|
1132
|
+
static scheduleCampaign<T>(community_id: string, newsletter_id: string, campaign_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1133
|
+
/**
|
|
1134
|
+
* List all emails sent in a campaign.
|
|
1135
|
+
*
|
|
1136
|
+
* @param community_id The ID of the community.
|
|
1137
|
+
* @param newsletter_id The ID of the newsletter.
|
|
1138
|
+
* @param campaign_id The ID of the campaign.
|
|
1139
|
+
* @param params Query parameters.
|
|
1140
|
+
* @returns Promise
|
|
1141
|
+
*/
|
|
1142
|
+
static listCampaignEmails<T>(community_id: string, newsletter_id: string, campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1143
|
+
/**
|
|
1144
|
+
* List all subscribers of a newsletter (admin only).
|
|
1145
|
+
*
|
|
1146
|
+
* @param community_id The ID of the community.
|
|
1147
|
+
* @param newsletter_id The ID of the newsletter.
|
|
1148
|
+
* @param params Query parameters.
|
|
1149
|
+
* @returns Promise
|
|
1150
|
+
*/
|
|
1151
|
+
static listNewsletterSubscribers<T>(community_id: string, newsletter_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1152
|
+
/**
|
|
1153
|
+
* Get a specific subscriber of a newsletter (admin only).
|
|
1154
|
+
*
|
|
1155
|
+
* @param community_id The ID of the community.
|
|
1156
|
+
* @param newsletter_id The ID of the newsletter.
|
|
1157
|
+
* @param subscriber_id The ID of the subscriber.
|
|
1158
|
+
* @param params Query parameters.
|
|
1159
|
+
* @returns Promise
|
|
1160
|
+
*/
|
|
1161
|
+
static viewNewsletterSubscriber<T>(community_id: string, newsletter_id: string, subscriber_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1162
|
+
/**
|
|
1163
|
+
* Update a specific subscriber of a newsletter (admin only).
|
|
1164
|
+
*
|
|
1165
|
+
* @param community_id The ID of the community.
|
|
1166
|
+
* @param newsletter_id The ID of the newsletter.
|
|
1167
|
+
* @param subscriber_id The ID of the subscriber.
|
|
1168
|
+
* @param data The data to update.
|
|
1169
|
+
* @returns Promise
|
|
1170
|
+
*/
|
|
1171
|
+
static updateNewsletterSubscriber<T>(community_id: string, newsletter_id: string, subscriber_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1172
|
+
/**
|
|
1173
|
+
* Delete a specific subscriber from a newsletter (admin only).
|
|
1174
|
+
*
|
|
1175
|
+
* @param community_id The ID of the community.
|
|
1176
|
+
* @param newsletter_id The ID of the newsletter.
|
|
1177
|
+
* @param subscriber_id The ID of the subscriber.
|
|
1178
|
+
* @returns Promise
|
|
1179
|
+
*/
|
|
1180
|
+
static deleteNewsletterSubscriber<T>(community_id: string, newsletter_id: string, subscriber_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1181
|
+
/**
|
|
1182
|
+
* Register a new subscriber to a newsletter.
|
|
1183
|
+
*
|
|
1184
|
+
* @param community_id The ID of the community.
|
|
1185
|
+
* @param newsletter_id The ID of the newsletter.
|
|
1186
|
+
* @param data The subscriber data.
|
|
1187
|
+
* @returns Promise
|
|
1188
|
+
*/
|
|
1189
|
+
static registerNewsletterSubscriber<T>(community_id: string, newsletter_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
993
1190
|
}
|
|
994
1191
|
|
|
995
1192
|
declare class Users {
|
|
@@ -3484,6 +3681,30 @@ declare class GameShows {
|
|
|
3484
3681
|
* @returns promise
|
|
3485
3682
|
*/
|
|
3486
3683
|
static uploadBannerImageBlob<T>(show_id: string, blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3684
|
+
/**
|
|
3685
|
+
* Register a title to a game show.
|
|
3686
|
+
*/
|
|
3687
|
+
static registerTitle<T>(show_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3688
|
+
/**
|
|
3689
|
+
* Add a title to a game show by admin.
|
|
3690
|
+
*/
|
|
3691
|
+
static addTitle<T>(show_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3692
|
+
/**
|
|
3693
|
+
* List all titles for a game show.
|
|
3694
|
+
*/
|
|
3695
|
+
static listTitles<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3696
|
+
/**
|
|
3697
|
+
* Get details of a specific title in a game show.
|
|
3698
|
+
*/
|
|
3699
|
+
static getTitle<T>(show_id: string, title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3700
|
+
/**
|
|
3701
|
+
* Update a specific title in a game show.
|
|
3702
|
+
*/
|
|
3703
|
+
static updateTitle<T>(show_id: string, title_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3704
|
+
/**
|
|
3705
|
+
* Delete a specific title from a game show.
|
|
3706
|
+
*/
|
|
3707
|
+
static deleteTitle<T>(show_id: string, title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3487
3708
|
}
|
|
3488
3709
|
|
|
3489
3710
|
interface Route {
|