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.
- package/dist/cjs/index.js +18 -18
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Campaigns.d.ts +6 -6
- package/dist/esm/index.js +18 -18
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +6 -6
- package/package.json +1 -1
- package/src/api/Campaigns.ts +12 -12
- package/src/routes/CampaignsRoute.ts +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -2501,7 +2501,7 @@ declare class Campaigns {
|
|
|
2501
2501
|
*
|
|
2502
2502
|
* @returns Promise
|
|
2503
2503
|
*/
|
|
2504
|
-
static addCountry<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2504
|
+
static addCountry<T>(campaign_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2505
2505
|
/**
|
|
2506
2506
|
* Remove a country
|
|
2507
2507
|
*
|
|
@@ -2511,7 +2511,7 @@ declare class Campaigns {
|
|
|
2511
2511
|
*
|
|
2512
2512
|
* @returns Promise
|
|
2513
2513
|
*/
|
|
2514
|
-
static removeCountry<T>(country_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2514
|
+
static removeCountry<T>(campaign_id: string, country_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2515
2515
|
/**
|
|
2516
2516
|
* Associate a gender with the campaign.
|
|
2517
2517
|
*
|
|
@@ -2521,7 +2521,7 @@ declare class Campaigns {
|
|
|
2521
2521
|
*
|
|
2522
2522
|
* @returns Promise
|
|
2523
2523
|
*/
|
|
2524
|
-
static addGender<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2524
|
+
static addGender<T>(campaign_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2525
2525
|
/**
|
|
2526
2526
|
* Remove a gender
|
|
2527
2527
|
*
|
|
@@ -2531,7 +2531,7 @@ declare class Campaigns {
|
|
|
2531
2531
|
*
|
|
2532
2532
|
* @returns Promise
|
|
2533
2533
|
*/
|
|
2534
|
-
static removeGender<T>(gender_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2534
|
+
static removeGender<T>(campaign_id: string, gender_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2535
2535
|
/**
|
|
2536
2536
|
* Associate an ethnicity with the campaign.
|
|
2537
2537
|
*
|
|
@@ -2541,7 +2541,7 @@ declare class Campaigns {
|
|
|
2541
2541
|
*
|
|
2542
2542
|
* @returns Promise
|
|
2543
2543
|
*/
|
|
2544
|
-
static addEthnicity<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2544
|
+
static addEthnicity<T>(campaign_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2545
2545
|
/**
|
|
2546
2546
|
* Remove an ethnicity
|
|
2547
2547
|
*
|
|
@@ -2551,7 +2551,7 @@ declare class Campaigns {
|
|
|
2551
2551
|
*
|
|
2552
2552
|
* @returns Promise
|
|
2553
2553
|
*/
|
|
2554
|
-
static removeEthnicity<T>(ethnicity_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2554
|
+
static removeEthnicity<T>(campaign_id: string, ethnicity_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2555
2555
|
}
|
|
2556
2556
|
|
|
2557
2557
|
declare class Subscriptions {
|
package/package.json
CHANGED
package/src/api/Campaigns.ts
CHANGED
|
@@ -296,9 +296,9 @@ class Campaigns {
|
|
|
296
296
|
*
|
|
297
297
|
* @returns Promise
|
|
298
298
|
*/
|
|
299
|
-
public static addCountry<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
299
|
+
public static addCountry<T>(campaign_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
300
300
|
|
|
301
|
-
return Requests.processRoute(CampaignsRoute.routes.addCountry, data,
|
|
301
|
+
return Requests.processRoute(CampaignsRoute.routes.addCountry, data, {campaign_id : campaign_id}, params);
|
|
302
302
|
}
|
|
303
303
|
|
|
304
304
|
/**
|
|
@@ -310,9 +310,9 @@ class Campaigns {
|
|
|
310
310
|
*
|
|
311
311
|
* @returns Promise
|
|
312
312
|
*/
|
|
313
|
-
public static removeCountry<T>(country_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
313
|
+
public static removeCountry<T>(campaign_id: string, country_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
314
314
|
|
|
315
|
-
return Requests.processRoute(CampaignsRoute.routes.removeCountry, undefined, {country_id : country_id}, params);
|
|
315
|
+
return Requests.processRoute(CampaignsRoute.routes.removeCountry, undefined, {campaign_id : campaign_id, country_id : country_id}, params);
|
|
316
316
|
}
|
|
317
317
|
|
|
318
318
|
/**
|
|
@@ -324,9 +324,9 @@ class Campaigns {
|
|
|
324
324
|
*
|
|
325
325
|
* @returns Promise
|
|
326
326
|
*/
|
|
327
|
-
public static addGender<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
327
|
+
public static addGender<T>(campaign_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
328
328
|
|
|
329
|
-
return Requests.processRoute(CampaignsRoute.routes.addGender, data,
|
|
329
|
+
return Requests.processRoute(CampaignsRoute.routes.addGender, data, {campaign_id : campaign_id}, params);
|
|
330
330
|
}
|
|
331
331
|
|
|
332
332
|
/**
|
|
@@ -338,9 +338,9 @@ class Campaigns {
|
|
|
338
338
|
*
|
|
339
339
|
* @returns Promise
|
|
340
340
|
*/
|
|
341
|
-
public static removeGender<T>(gender_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
341
|
+
public static removeGender<T>(campaign_id : string, gender_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
342
342
|
|
|
343
|
-
return Requests.processRoute(CampaignsRoute.routes.removeGender, undefined, {gender_id : gender_id}, params);
|
|
343
|
+
return Requests.processRoute(CampaignsRoute.routes.removeGender, undefined, {campaign_id : campaign_id, gender_id : gender_id}, params);
|
|
344
344
|
}
|
|
345
345
|
|
|
346
346
|
/**
|
|
@@ -352,9 +352,9 @@ class Campaigns {
|
|
|
352
352
|
*
|
|
353
353
|
* @returns Promise
|
|
354
354
|
*/
|
|
355
|
-
public static addEthnicity<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
355
|
+
public static addEthnicity<T>(campaign_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
356
356
|
|
|
357
|
-
return Requests.processRoute(CampaignsRoute.routes.addGender, data,
|
|
357
|
+
return Requests.processRoute(CampaignsRoute.routes.addGender, data, {campaign_id : campaign_id}, params);
|
|
358
358
|
}
|
|
359
359
|
|
|
360
360
|
/**
|
|
@@ -366,9 +366,9 @@ class Campaigns {
|
|
|
366
366
|
*
|
|
367
367
|
* @returns Promise
|
|
368
368
|
*/
|
|
369
|
-
public static removeEthnicity<T>(ethnicity_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
369
|
+
public static removeEthnicity<T>(campaign_id: string, ethnicity_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
370
370
|
|
|
371
|
-
return Requests.processRoute(CampaignsRoute.routes.removeGender, undefined, {ethnicity_id : ethnicity_id}, params);
|
|
371
|
+
return Requests.processRoute(CampaignsRoute.routes.removeGender, undefined, {campaign_id : campaign_id, ethnicity_id : ethnicity_id}, params);
|
|
372
372
|
}
|
|
373
373
|
|
|
374
374
|
|
|
@@ -25,12 +25,12 @@ class CampaignsRoute {
|
|
|
25
25
|
getCampaignMention :{ url: '/campaigns/{campaign_id}/mentions/{mention_id}', method: HTTP_METHODS.GET },
|
|
26
26
|
updateCampaignMention :{ url: '/campaigns/{campaign_id}/mentions/{mention_id}', method: HTTP_METHODS.PUT },
|
|
27
27
|
deleteCampaignMention :{ url: '/campaigns/{campaign_id}/mentions/{mention_id}', method: HTTP_METHODS.DELETE },
|
|
28
|
-
addCountry : { url: '/
|
|
29
|
-
removeCountry : { url: '/
|
|
30
|
-
addGender : { url: '/
|
|
31
|
-
removeGender : { url: '/
|
|
32
|
-
addEthnicity : { url: '/
|
|
33
|
-
removeEthnicity : { url: '/
|
|
28
|
+
addCountry : { url: '/campaigns/{campaign_id}/addCountry', method: HTTP_METHODS.POST },
|
|
29
|
+
removeCountry : { url: '/campaigns/{campaign_id}/removeCountry/{country_id}', method: HTTP_METHODS.DELETE },
|
|
30
|
+
addGender : { url: '/campaigns/{campaign_id}/addGender', method: HTTP_METHODS.POST },
|
|
31
|
+
removeGender : { url: '/campaigns/{campaign_id}/removeGender/{gender_id}', method: HTTP_METHODS.DELETE },
|
|
32
|
+
addEthnicity : { url: '/campaigns/{campaign_id}/addEthnicity', method: HTTP_METHODS.POST },
|
|
33
|
+
removeEthnicity : { url: '/campaigns/{campaign_id}/removeEthnicity/{ethnicity_id}', method: HTTP_METHODS.DELETE },
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
}
|