glitch-javascript-sdk 0.8.7 → 0.8.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.
@@ -213,7 +213,7 @@ declare class Campaigns {
213
213
  *
214
214
  * @returns Promise
215
215
  */
216
- static addCountry<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
216
+ static addCountry<T>(campaign_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
217
217
  /**
218
218
  * Remove a country
219
219
  *
@@ -223,7 +223,7 @@ declare class Campaigns {
223
223
  *
224
224
  * @returns Promise
225
225
  */
226
- static removeCountry<T>(country_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
226
+ static removeCountry<T>(campaign_id: string, country_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
227
227
  /**
228
228
  * Associate a gender with the campaign.
229
229
  *
@@ -233,7 +233,7 @@ declare class Campaigns {
233
233
  *
234
234
  * @returns Promise
235
235
  */
236
- static addGender<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
236
+ static addGender<T>(campaign_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
237
237
  /**
238
238
  * Remove a gender
239
239
  *
@@ -243,7 +243,7 @@ declare class Campaigns {
243
243
  *
244
244
  * @returns Promise
245
245
  */
246
- static removeGender<T>(gender_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
246
+ static removeGender<T>(campaign_id: string, gender_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
247
247
  /**
248
248
  * Associate an ethnicity with the campaign.
249
249
  *
@@ -253,7 +253,7 @@ declare class Campaigns {
253
253
  *
254
254
  * @returns Promise
255
255
  */
256
- static addEthnicity<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
256
+ static addEthnicity<T>(campaign_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
257
257
  /**
258
258
  * Remove an ethnicity
259
259
  *
@@ -263,6 +263,6 @@ declare class Campaigns {
263
263
  *
264
264
  * @returns Promise
265
265
  */
266
- static removeEthnicity<T>(ethnicity_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
266
+ static removeEthnicity<T>(campaign_id: string, ethnicity_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
267
267
  }
268
268
  export default Campaigns;
package/dist/esm/index.js CHANGED
@@ -8937,12 +8937,12 @@ var CampaignsRoute = /** @class */ (function () {
8937
8937
  getCampaignMention: { url: '/campaigns/{campaign_id}/mentions/{mention_id}', method: HTTP_METHODS.GET },
8938
8938
  updateCampaignMention: { url: '/campaigns/{campaign_id}/mentions/{mention_id}', method: HTTP_METHODS.PUT },
8939
8939
  deleteCampaignMention: { url: '/campaigns/{campaign_id}/mentions/{mention_id}', method: HTTP_METHODS.DELETE },
8940
- addCountry: { url: '/users/addCountry', method: HTTP_METHODS.POST },
8941
- removeCountry: { url: '/users/removeCountry/{country_id}', method: HTTP_METHODS.DELETE },
8942
- addGender: { url: '/users/addGender', method: HTTP_METHODS.POST },
8943
- removeGender: { url: '/users/removeGender/{gender_id}', method: HTTP_METHODS.DELETE },
8944
- addEthnicity: { url: '/users/addEthnicity', method: HTTP_METHODS.POST },
8945
- removeEthnicity: { url: '/users/removeEthnicity/{ethnicity_id}', method: HTTP_METHODS.DELETE },
8940
+ addCountry: { url: '/campaigns/{campaign_id}/addCountry', method: HTTP_METHODS.POST },
8941
+ removeCountry: { url: '/campaigns/{campaign_id}/removeCountry/{country_id}', method: HTTP_METHODS.DELETE },
8942
+ addGender: { url: '/campaigns/{campaign_id}/addGender', method: HTTP_METHODS.POST },
8943
+ removeGender: { url: '/campaigns/{campaign_id}/removeGender/{gender_id}', method: HTTP_METHODS.DELETE },
8944
+ addEthnicity: { url: '/campaigns/{campaign_id}/addEthnicity', method: HTTP_METHODS.POST },
8945
+ removeEthnicity: { url: '/campaigns/{campaign_id}/removeEthnicity/{ethnicity_id}', method: HTTP_METHODS.DELETE },
8946
8946
  };
8947
8947
  return CampaignsRoute;
8948
8948
  }());
@@ -9204,8 +9204,8 @@ var Campaigns = /** @class */ (function () {
9204
9204
  *
9205
9205
  * @returns Promise
9206
9206
  */
9207
- Campaigns.addCountry = function (data, params) {
9208
- return Requests.processRoute(CampaignsRoute.routes.addCountry, data, undefined, params);
9207
+ Campaigns.addCountry = function (campaign_id, data, params) {
9208
+ return Requests.processRoute(CampaignsRoute.routes.addCountry, data, { campaign_id: campaign_id }, params);
9209
9209
  };
9210
9210
  /**
9211
9211
  * Remove a country
@@ -9216,8 +9216,8 @@ var Campaigns = /** @class */ (function () {
9216
9216
  *
9217
9217
  * @returns Promise
9218
9218
  */
9219
- Campaigns.removeCountry = function (country_id, params) {
9220
- return Requests.processRoute(CampaignsRoute.routes.removeCountry, undefined, { country_id: country_id }, params);
9219
+ Campaigns.removeCountry = function (campaign_id, country_id, params) {
9220
+ return Requests.processRoute(CampaignsRoute.routes.removeCountry, undefined, { campaign_id: campaign_id, country_id: country_id }, params);
9221
9221
  };
9222
9222
  /**
9223
9223
  * Associate a gender with the campaign.
@@ -9228,8 +9228,8 @@ var Campaigns = /** @class */ (function () {
9228
9228
  *
9229
9229
  * @returns Promise
9230
9230
  */
9231
- Campaigns.addGender = function (data, params) {
9232
- return Requests.processRoute(CampaignsRoute.routes.addGender, data, undefined, params);
9231
+ Campaigns.addGender = function (campaign_id, data, params) {
9232
+ return Requests.processRoute(CampaignsRoute.routes.addGender, data, { campaign_id: campaign_id }, params);
9233
9233
  };
9234
9234
  /**
9235
9235
  * Remove a gender
@@ -9240,8 +9240,8 @@ var Campaigns = /** @class */ (function () {
9240
9240
  *
9241
9241
  * @returns Promise
9242
9242
  */
9243
- Campaigns.removeGender = function (gender_id, params) {
9244
- return Requests.processRoute(CampaignsRoute.routes.removeGender, undefined, { gender_id: gender_id }, params);
9243
+ Campaigns.removeGender = function (campaign_id, gender_id, params) {
9244
+ return Requests.processRoute(CampaignsRoute.routes.removeGender, undefined, { campaign_id: campaign_id, gender_id: gender_id }, params);
9245
9245
  };
9246
9246
  /**
9247
9247
  * Associate an ethnicity with the campaign.
@@ -9252,8 +9252,8 @@ var Campaigns = /** @class */ (function () {
9252
9252
  *
9253
9253
  * @returns Promise
9254
9254
  */
9255
- Campaigns.addEthnicity = function (data, params) {
9256
- return Requests.processRoute(CampaignsRoute.routes.addGender, data, undefined, params);
9255
+ Campaigns.addEthnicity = function (campaign_id, data, params) {
9256
+ return Requests.processRoute(CampaignsRoute.routes.addGender, data, { campaign_id: campaign_id }, params);
9257
9257
  };
9258
9258
  /**
9259
9259
  * Remove an ethnicity
@@ -9264,8 +9264,8 @@ var Campaigns = /** @class */ (function () {
9264
9264
  *
9265
9265
  * @returns Promise
9266
9266
  */
9267
- Campaigns.removeEthnicity = function (ethnicity_id, params) {
9268
- return Requests.processRoute(CampaignsRoute.routes.removeGender, undefined, { ethnicity_id: ethnicity_id }, params);
9267
+ 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);
9269
9269
  };
9270
9270
  return Campaigns;
9271
9271
  }());