glitch-javascript-sdk 0.8.8 → 0.8.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.
@@ -264,5 +264,25 @@ declare class Campaigns {
264
264
  * @returns Promise
265
265
  */
266
266
  static removeEthnicity<T>(campaign_id: string, ethnicity_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
267
+ /**
268
+ * Associate a type with the campaign.
269
+ *
270
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/addGenderToCampaign
271
+ *
272
+ * @param data The type information to be passed to update the campaign information.
273
+ *
274
+ * @returns Promise
275
+ */
276
+ static addType<T>(campaign_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
277
+ /**
278
+ * Remove an type
279
+ *
280
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/removeGender
281
+ *
282
+ * @param type_id The id of the ethnicity to remove.
283
+ *
284
+ * @returns Promise
285
+ */
286
+ static removeType<T>(campaign_id: string, type_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
267
287
  }
268
288
  export default Campaigns;
@@ -243,5 +243,25 @@ declare class Users {
243
243
  * @returns Promise
244
244
  */
245
245
  static removeGenre<T>(genre_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
246
+ /**
247
+ * Add a type to a user.
248
+ *
249
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/updateUser
250
+ *
251
+ * @param data The genre information to be passed to update the type information.
252
+ *
253
+ * @returns Promise
254
+ */
255
+ static addType<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
256
+ /**
257
+ * Remove a genre from a user.
258
+ *
259
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/updateUser
260
+ *
261
+ * @param genre_id The id of the genre to remove.
262
+ *
263
+ * @returns Promise
264
+ */
265
+ static removeType<T>(type_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
246
266
  }
247
267
  export default Users;
package/dist/esm/index.js CHANGED
@@ -6880,6 +6880,8 @@ var UserRoutes = /** @class */ (function () {
6880
6880
  getFacebookGroups: { url: '/users/getFacebookGroups', method: HTTP_METHODS.GET },
6881
6881
  addGenre: { url: '/users/addGenre', method: HTTP_METHODS.POST },
6882
6882
  removeGenre: { url: '/users/removeGenre/{genre_id}', method: HTTP_METHODS.DELETE },
6883
+ addType: { url: '/users/addType', method: HTTP_METHODS.POST },
6884
+ removeType: { url: '/users/removeType/{type_id}', method: HTTP_METHODS.DELETE },
6883
6885
  };
6884
6886
  return UserRoutes;
6885
6887
  }());
@@ -7183,6 +7185,30 @@ var Users = /** @class */ (function () {
7183
7185
  Users.removeGenre = function (genre_id, params) {
7184
7186
  return Requests.processRoute(UserRoutes.routes.removeGenre, undefined, { genre_id: genre_id }, params);
7185
7187
  };
7188
+ /**
7189
+ * Add a type to a user.
7190
+ *
7191
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/updateUser
7192
+ *
7193
+ * @param data The genre information to be passed to update the type information.
7194
+ *
7195
+ * @returns Promise
7196
+ */
7197
+ Users.addType = function (data, params) {
7198
+ return Requests.processRoute(UserRoutes.routes.addType, data, undefined, params);
7199
+ };
7200
+ /**
7201
+ * Remove a genre from a user.
7202
+ *
7203
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/updateUser
7204
+ *
7205
+ * @param genre_id The id of the genre to remove.
7206
+ *
7207
+ * @returns Promise
7208
+ */
7209
+ Users.removeType = function (type_id, params) {
7210
+ return Requests.processRoute(UserRoutes.routes.removeType, undefined, { type_id: type_id }, params);
7211
+ };
7186
7212
  return Users;
7187
7213
  }());
7188
7214
 
@@ -8943,6 +8969,8 @@ var CampaignsRoute = /** @class */ (function () {
8943
8969
  removeGender: { url: '/campaigns/{campaign_id}/removeGender/{gender_id}', method: HTTP_METHODS.DELETE },
8944
8970
  addEthnicity: { url: '/campaigns/{campaign_id}/addEthnicity', method: HTTP_METHODS.POST },
8945
8971
  removeEthnicity: { url: '/campaigns/{campaign_id}/removeEthnicity/{ethnicity_id}', method: HTTP_METHODS.DELETE },
8972
+ addType: { url: '/campaigns/{campaign_id}/addType', method: HTTP_METHODS.POST },
8973
+ removeType: { url: '/campaigns/{campaign_id}/removeType/{type_id}', method: HTTP_METHODS.DELETE },
8946
8974
  };
8947
8975
  return CampaignsRoute;
8948
8976
  }());
@@ -9253,7 +9281,7 @@ var Campaigns = /** @class */ (function () {
9253
9281
  * @returns Promise
9254
9282
  */
9255
9283
  Campaigns.addEthnicity = function (campaign_id, data, params) {
9256
- return Requests.processRoute(CampaignsRoute.routes.addGender, data, { campaign_id: campaign_id }, params);
9284
+ return Requests.processRoute(CampaignsRoute.routes.addEthnicity, data, { campaign_id: campaign_id }, params);
9257
9285
  };
9258
9286
  /**
9259
9287
  * Remove an ethnicity
@@ -9265,7 +9293,31 @@ var Campaigns = /** @class */ (function () {
9265
9293
  * @returns Promise
9266
9294
  */
9267
9295
  Campaigns.removeEthnicity = function (campaign_id, ethnicity_id, params) {
9268
- return Requests.processRoute(CampaignsRoute.routes.removeGender, undefined, { campaign_id: campaign_id, ethnicity_id: ethnicity_id }, params);
9296
+ return Requests.processRoute(CampaignsRoute.routes.removeEthnicity, undefined, { campaign_id: campaign_id, ethnicity_id: ethnicity_id }, params);
9297
+ };
9298
+ /**
9299
+ * Associate a type with the campaign.
9300
+ *
9301
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/addGenderToCampaign
9302
+ *
9303
+ * @param data The type information to be passed to update the campaign information.
9304
+ *
9305
+ * @returns Promise
9306
+ */
9307
+ Campaigns.addType = function (campaign_id, data, params) {
9308
+ return Requests.processRoute(CampaignsRoute.routes.addType, data, { campaign_id: campaign_id }, params);
9309
+ };
9310
+ /**
9311
+ * Remove an type
9312
+ *
9313
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/removeGender
9314
+ *
9315
+ * @param type_id The id of the ethnicity to remove.
9316
+ *
9317
+ * @returns Promise
9318
+ */
9319
+ Campaigns.removeType = function (campaign_id, type_id, params) {
9320
+ return Requests.processRoute(CampaignsRoute.routes.removeType, undefined, { campaign_id: campaign_id, type_id: type_id }, params);
9269
9321
  };
9270
9322
  return Campaigns;
9271
9323
  }());