glitch-javascript-sdk 1.2.6 → 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.
@@ -0,0 +1,7 @@
1
+ import Route from "./interface";
2
+ declare class GameShowsRoute {
3
+ static routes: {
4
+ [key: string]: Route;
5
+ };
6
+ }
7
+ export default GameShowsRoute;
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 {
@@ -3333,6 +3530,14 @@ declare class Influencers {
3333
3530
  * @returns promise
3334
3531
  */
3335
3532
  static listContracts<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
3533
+ /**
3534
+ * Download the influencer work
3535
+ *
3536
+ * @see https://api.glitch.fun/api/documentation#/Influencers/downloadInfluencersWorkbook
3537
+ *
3538
+ * @returns promise
3539
+ */
3540
+ static workbook<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
3336
3541
  }
3337
3542
 
3338
3543
  declare class Games {
@@ -3380,7 +3585,126 @@ declare class Publications {
3380
3585
  *
3381
3586
  * @returns Promise
3382
3587
  */
3588
+ static download<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
3589
+ }
3590
+
3591
+ declare class GameShows {
3592
+ /**
3593
+ * List all the GameShows.
3594
+ *
3595
+ * @see https://api.glitch.fun/api/documentation#/GameShows/getGameShows
3596
+ *
3597
+ * @returns promise
3598
+ */
3599
+ static list<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
3600
+ /**
3601
+ * Create a new game show.
3602
+ *
3603
+ * @see https://api.glitch.fun/api/documentation#/GameShows/createGameShow
3604
+ *
3605
+ * @param data The data to be passed when creating a game show.
3606
+ *
3607
+ * @returns Promise
3608
+ */
3383
3609
  static create<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
3610
+ /**
3611
+ * Update a game show.
3612
+ *
3613
+ * @see https://api.glitch.fun/api/documentation#/GameShows/updateGameShow
3614
+ *
3615
+ * @param show_id The id of the game show to update.
3616
+ * @param data The data to update.
3617
+ *
3618
+ * @returns promise
3619
+ */
3620
+ static update<T>(show_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
3621
+ /**
3622
+ * Retrieve the information for a single game show.
3623
+ *
3624
+ * @see https://api.glitch.fun/api/documentation#/GameShows/getGameShowByUuid
3625
+ *
3626
+ * @param show_id The id fo the game show to retrieve.
3627
+ *
3628
+ * @returns promise
3629
+ */
3630
+ static view<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
3631
+ /**
3632
+ * Deletes a game show.
3633
+ *
3634
+ * @see https://api.glitch.fun/api/documentation#/GameShows/deleteGameShow
3635
+ *
3636
+ * @param show_id The id of the game show to delete.
3637
+ * @returns promise
3638
+ */
3639
+ static delete<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
3640
+ /**
3641
+ * Updates the main image for the game show using a File object.
3642
+ *
3643
+ * @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowLogo
3644
+ *
3645
+ * @param file The file object to upload.
3646
+ * @param data Any additional data to pass along to the upload.
3647
+ *
3648
+ * @returns promise
3649
+ */
3650
+ static uploadLogoFile<T>(show_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
3651
+ /**
3652
+ * Updates the main image for the game show using a Blob.
3653
+ *
3654
+ * @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowLogo
3655
+ *
3656
+ * @param blob The blob to upload.
3657
+ * @param data Any additional data to pass along to the upload
3658
+ *
3659
+ * @returns promise
3660
+ */
3661
+ static uploadLogoBlob<T>(show_id: string, blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
3662
+ /**
3663
+ * Updates the banner image for the game show using a File object.
3664
+ *
3665
+ * @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowBannerImage
3666
+ *
3667
+ * @param file The file object to upload.
3668
+ * @param data Any additional data to pass along to the upload.
3669
+ *
3670
+ * @returns promise
3671
+ */
3672
+ static uploadBannerImageFile<T>(show_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
3673
+ /**
3674
+ * Updates the banner image for the game show using a Blob.
3675
+ *
3676
+ * @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowBannerImage
3677
+ *
3678
+ * @param blob The blob to upload.
3679
+ * @param data Any additional data to pass along to the upload
3680
+ *
3681
+ * @returns promise
3682
+ */
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>>;
3384
3708
  }
3385
3709
 
3386
3710
  interface Route {
@@ -3689,6 +4013,7 @@ declare class Glitch {
3689
4013
  Users: typeof Users;
3690
4014
  Events: typeof Events;
3691
4015
  Games: typeof Games;
4016
+ GameShows: typeof GameShows;
3692
4017
  Feedback: typeof Feedback;
3693
4018
  Influencers: typeof Influencers;
3694
4019
  Teams: typeof Teams;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "1.2.6",
3
+ "version": "1.2.8",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",