glitch-javascript-sdk 0.7.4 → 0.7.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.
@@ -95,7 +95,7 @@ declare class Campaigns {
95
95
  *
96
96
  * @returns promise
97
97
  */
98
- static listInfluencerCampaigns<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
98
+ static listInfluencerCampaigns<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
99
99
  /**
100
100
  * Create an influencer campaign
101
101
  *
@@ -138,15 +138,15 @@ declare class Events {
138
138
  */
139
139
  static syncAsLive<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
140
140
  /**
141
- * Updates the main image for the event using a File object.
142
- *
143
- * @see https://api.glitch.fun/api/documentation#/Event%20Route/uploadMainEventImage
144
- *
145
- * @param file The file object to upload.
146
- * @param data Any additional data to pass along to the upload.
147
- *
148
- * @returns promise
149
- */
141
+ * Updates the main image for the event using a File object.
142
+ *
143
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/uploadMainEventImage
144
+ *
145
+ * @param file The file object to upload.
146
+ * @param data Any additional data to pass along to the upload.
147
+ *
148
+ * @returns promise
149
+ */
150
150
  static uploadMainImageFile<T>(event_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
151
151
  /**
152
152
  * Updates the main image for the event using a Blob.
@@ -160,7 +160,7 @@ declare class Events {
160
160
  */
161
161
  static uploadMainImageBlob<T>(event_id: string, blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
162
162
  /**
163
- * Updates the banner image for the team using a File object.
163
+ * Updates the banner image for the event using a File object.
164
164
  *
165
165
  * @see https://api.glitch.fun/api/documentation#/Event%20Route/uploadBannerEventImage
166
166
  *
@@ -171,7 +171,7 @@ declare class Events {
171
171
  */
172
172
  static uploadBannerImageFile<T>(event_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
173
173
  /**
174
- * Updates the banner image for the team using a Blob.
174
+ * Updates the banner image for the event using a Blob.
175
175
  *
176
176
  * @see https://api.glitch.fun/api/documentation#/Event%20Route/uploadBannerEventImage
177
177
  *
@@ -69,5 +69,69 @@ declare class Titles {
69
69
  * @returns Promise
70
70
  */
71
71
  static reject<T>(title_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
72
+ /**
73
+ * Add a user as an administrator to a title
74
+ *
75
+ * @see https://api.glitch.fun/api/documentation#/Titles/addTitleAdministrator
76
+ *
77
+ * @param data The data to be passed when creating a title.
78
+ *
79
+ * @returns Promise
80
+ */
81
+ static addAdministrator<T>(title_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
82
+ /**
83
+ * Remove a user as an administrator toa tile
84
+ *
85
+ * @see https://api.glitch.fun/api/documentation#/Titles/removeTitleAdministrator
86
+ *
87
+ * @param data The data to be passed when creating a title.
88
+ *
89
+ * @returns Promise
90
+ */
91
+ static removeAdministrator<T>(title_id: string, user_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
92
+ /**
93
+ * Updates the main image for the title using a File object.
94
+ *
95
+ * @see https://api.glitch.fun/api/documentation#/Titles/uploadTitleMainImage
96
+ *
97
+ * @param file The file object to upload.
98
+ * @param data Any additional data to pass along to the upload.
99
+ *
100
+ * @returns promise
101
+ */
102
+ static uploadMainImageFile<T>(title_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
103
+ /**
104
+ * Updates the main image for the title using a Blob.
105
+ *
106
+ * @see https://api.glitch.fun/api/documentation#/Titles/uploadTitleMainImage
107
+ *
108
+ * @param blob The blob to upload.
109
+ * @param data Any additional data to pass along to the upload
110
+ *
111
+ * @returns promise
112
+ */
113
+ static uploadMainImageBlob<T>(title_id: string, blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
114
+ /**
115
+ * Updates the banner image for the title using a File object.
116
+ *
117
+ * @see https://api.glitch.fun/api/documentation#/Titles/uploadTitleBannerImage
118
+ *
119
+ * @param file The file object to upload.
120
+ * @param data Any additional data to pass along to the upload.
121
+ *
122
+ * @returns promise
123
+ */
124
+ static uploadBannerImageFile<T>(title_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
125
+ /**
126
+ * Updates the banner image for the title using a Blob.
127
+ *
128
+ * @see https://api.glitch.fun/api/documentation#/Titles/uploadTitleBannerImage
129
+ *
130
+ * @param blob The blob to upload.
131
+ * @param data Any additional data to pass along to the upload
132
+ *
133
+ * @returns promise
134
+ */
135
+ static uploadBannerImageBlob<T>(title_id: string, blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
72
136
  }
73
137
  export default Titles;
package/dist/esm/index.js CHANGED
@@ -7307,15 +7307,15 @@ var Events = /** @class */ (function () {
7307
7307
  return Requests.processRoute(EventsRoutes.routes.syncAsLive, data, { event_id: event_id }, params);
7308
7308
  };
7309
7309
  /**
7310
- * Updates the main image for the event using a File object.
7311
- *
7312
- * @see https://api.glitch.fun/api/documentation#/Event%20Route/uploadMainEventImage
7313
- *
7314
- * @param file The file object to upload.
7315
- * @param data Any additional data to pass along to the upload.
7316
- *
7317
- * @returns promise
7318
- */
7310
+ * Updates the main image for the event using a File object.
7311
+ *
7312
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/uploadMainEventImage
7313
+ *
7314
+ * @param file The file object to upload.
7315
+ * @param data Any additional data to pass along to the upload.
7316
+ *
7317
+ * @returns promise
7318
+ */
7319
7319
  Events.uploadMainImageFile = function (event_id, file, data, params) {
7320
7320
  var url = EventsRoutes.routes.uploadMainImage.url.replace('{event_id}', event_id);
7321
7321
  return Requests.uploadFile(url, 'image', file, data);
@@ -7335,7 +7335,7 @@ var Events = /** @class */ (function () {
7335
7335
  return Requests.uploadBlob(url, 'image', blob, data);
7336
7336
  };
7337
7337
  /**
7338
- * Updates the banner image for the team using a File object.
7338
+ * Updates the banner image for the event using a File object.
7339
7339
  *
7340
7340
  * @see https://api.glitch.fun/api/documentation#/Event%20Route/uploadBannerEventImage
7341
7341
  *
@@ -7349,7 +7349,7 @@ var Events = /** @class */ (function () {
7349
7349
  return Requests.uploadFile(url, 'image', file, data);
7350
7350
  };
7351
7351
  /**
7352
- * Updates the banner image for the team using a Blob.
7352
+ * Updates the banner image for the event using a Blob.
7353
7353
  *
7354
7354
  * @see https://api.glitch.fun/api/documentation#/Event%20Route/uploadBannerEventImage
7355
7355
  *
@@ -8590,7 +8590,11 @@ var TitlesRoute = /** @class */ (function () {
8590
8590
  update: { url: '/titles/{title_id}', method: HTTP_METHODS.PUT },
8591
8591
  delete: { url: '/titles/{title_id}', method: HTTP_METHODS.DELETE },
8592
8592
  approve: { url: '/titles/{title_id}/approve', method: HTTP_METHODS.POST },
8593
- reject: { url: '//titles/{title_id}/reject', method: HTTP_METHODS.POST },
8593
+ reject: { url: '/titles/{title_id}/reject', method: HTTP_METHODS.POST },
8594
+ uploadMainImage: { url: '/titles/{title_id}/uploadMainImage', method: HTTP_METHODS.POST },
8595
+ uploadBannerImage: { url: '/titles/{title_id}/uploadBannerImage', method: HTTP_METHODS.POST },
8596
+ addAdministrator: { url: '/titles/{title_id}/addAdministrator', method: HTTP_METHODS.POST },
8597
+ removeAdministrator: { url: '/titles/{title_id}/removeAdministrator/{user_id}', method: HTTP_METHODS.DELETE },
8594
8598
  };
8595
8599
  return TitlesRoute;
8596
8600
  }());
@@ -8680,6 +8684,86 @@ var Titles = /** @class */ (function () {
8680
8684
  Titles.reject = function (title_id, data, params) {
8681
8685
  return Requests.processRoute(TitlesRoute.routes.reject, data, { title_id: title_id }, params);
8682
8686
  };
8687
+ /**
8688
+ * Add a user as an administrator to a title
8689
+ *
8690
+ * @see https://api.glitch.fun/api/documentation#/Titles/addTitleAdministrator
8691
+ *
8692
+ * @param data The data to be passed when creating a title.
8693
+ *
8694
+ * @returns Promise
8695
+ */
8696
+ Titles.addAdministrator = function (title_id, data, params) {
8697
+ return Requests.processRoute(TitlesRoute.routes.addAdministrator, data, { title_id: title_id }, params);
8698
+ };
8699
+ /**
8700
+ * Remove a user as an administrator toa tile
8701
+ *
8702
+ * @see https://api.glitch.fun/api/documentation#/Titles/removeTitleAdministrator
8703
+ *
8704
+ * @param data The data to be passed when creating a title.
8705
+ *
8706
+ * @returns Promise
8707
+ */
8708
+ Titles.removeAdministrator = function (title_id, user_id, data, params) {
8709
+ return Requests.processRoute(TitlesRoute.routes.removeAdministrator, data, { title_id: title_id, user_id: user_id }, params);
8710
+ };
8711
+ /**
8712
+ * Updates the main image for the title using a File object.
8713
+ *
8714
+ * @see https://api.glitch.fun/api/documentation#/Titles/uploadTitleMainImage
8715
+ *
8716
+ * @param file The file object to upload.
8717
+ * @param data Any additional data to pass along to the upload.
8718
+ *
8719
+ * @returns promise
8720
+ */
8721
+ Titles.uploadMainImageFile = function (title_id, file, data, params) {
8722
+ var url = TitlesRoute.routes.uploadMainImage.url.replace('{title_id}', title_id);
8723
+ return Requests.uploadFile(url, 'image', file, data);
8724
+ };
8725
+ /**
8726
+ * Updates the main image for the title using a Blob.
8727
+ *
8728
+ * @see https://api.glitch.fun/api/documentation#/Titles/uploadTitleMainImage
8729
+ *
8730
+ * @param blob The blob to upload.
8731
+ * @param data Any additional data to pass along to the upload
8732
+ *
8733
+ * @returns promise
8734
+ */
8735
+ Titles.uploadMainImageBlob = function (title_id, blob, data, params) {
8736
+ var url = TitlesRoute.routes.uploadMainImage.url.replace('{title_id}', title_id);
8737
+ return Requests.uploadBlob(url, 'image', blob, data);
8738
+ };
8739
+ /**
8740
+ * Updates the banner image for the title using a File object.
8741
+ *
8742
+ * @see https://api.glitch.fun/api/documentation#/Titles/uploadTitleBannerImage
8743
+ *
8744
+ * @param file The file object to upload.
8745
+ * @param data Any additional data to pass along to the upload.
8746
+ *
8747
+ * @returns promise
8748
+ */
8749
+ Titles.uploadBannerImageFile = function (title_id, file, data, params) {
8750
+ var url = TitlesRoute.routes.uploadBannerImage.url.replace('{title_id}', title_id);
8751
+ return Requests.uploadFile(url, 'image', file, data);
8752
+ };
8753
+ /**
8754
+ * Updates the banner image for the title using a Blob.
8755
+ *
8756
+ * @see https://api.glitch.fun/api/documentation#/Titles/uploadTitleBannerImage
8757
+ *
8758
+ * @param blob The blob to upload.
8759
+ * @param data Any additional data to pass along to the upload
8760
+ *
8761
+ * @returns promise
8762
+ */
8763
+ Titles.uploadBannerImageBlob = function (title_id, blob, data, params) {
8764
+ var url = TitlesRoute.routes.uploadBannerImage.url.replace('{title_id}', title_id);
8765
+ return Requests.uploadBlob(url, 'image', blob, data);
8766
+ };
8683
8767
  return Titles;
8684
8768
  }());
8685
8769
 
@@ -8822,8 +8906,8 @@ var Campaigns = /** @class */ (function () {
8822
8906
  *
8823
8907
  * @returns promise
8824
8908
  */
8825
- Campaigns.listInfluencerCampaigns = function (campaign_id, params) {
8826
- return Requests.processRoute(CampaignsRoute.routes.listInfluencerCampaigns, undefined, { campaign_id: campaign_id }, params);
8909
+ Campaigns.listInfluencerCampaigns = function (params) {
8910
+ return Requests.processRoute(CampaignsRoute.routes.listInfluencerCampaigns, undefined, undefined, params);
8827
8911
  };
8828
8912
  /**
8829
8913
  * Create an influencer campaign