glitch-javascript-sdk 1.9.3 → 1.9.4
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 +54 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Ads.d.ts +16 -0
- package/dist/esm/api/Scheduler.d.ts +14 -0
- package/dist/esm/index.js +54 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +30 -0
- package/package.json +1 -1
- package/src/api/Ads.ts +87 -49
- package/src/api/Scheduler.ts +48 -12
- package/src/routes/AdsRoute.ts +8 -0
- package/src/routes/SchedulerRoute.ts +2 -0
package/dist/esm/api/Ads.d.ts
CHANGED
|
@@ -358,5 +358,21 @@ declare class Ads {
|
|
|
358
358
|
static twitterBatchTargetingCriteria<T>(data: object[], params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
359
359
|
static lookupTwitterTargeting<T>(resource: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
360
360
|
static twitterTargetingSuggestions<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
361
|
+
/**
|
|
362
|
+
* Deep-sync a campaign tree (campaign → groups → ads) with its remote platform.
|
|
363
|
+
*
|
|
364
|
+
* @param campaign_id UUID of the campaign to sync
|
|
365
|
+
* @param params Optional query params
|
|
366
|
+
* @returns Fully-hydrated AdCampaign resource
|
|
367
|
+
*/
|
|
368
|
+
static syncCampaignTree<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
369
|
+
/**
|
|
370
|
+
* Deep-sync all the campaigns for a scheduler.
|
|
371
|
+
*
|
|
372
|
+
* @param scheduler_id UUID of the campaign to sync
|
|
373
|
+
* @param params Optional query params
|
|
374
|
+
* @returns Fully-hydrated AdCampaign resource
|
|
375
|
+
*/
|
|
376
|
+
static syncSchedulerCampaigns<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
361
377
|
}
|
|
362
378
|
export default Ads;
|
|
@@ -302,6 +302,20 @@ declare class Scheduler {
|
|
|
302
302
|
* @returns promise
|
|
303
303
|
*/
|
|
304
304
|
static getDiscordChannels<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
305
|
+
/**
|
|
306
|
+
* Clear Google Ads OAuth credentials from a promotion schedule.
|
|
307
|
+
*
|
|
308
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
309
|
+
* @returns promise
|
|
310
|
+
*/
|
|
311
|
+
static clearGoogleAdsAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
312
|
+
/**
|
|
313
|
+
* Clear Tiktok Ads OAuth credentials from a promotion schedule.
|
|
314
|
+
*
|
|
315
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
316
|
+
* @returns promise
|
|
317
|
+
*/
|
|
318
|
+
static clearTiktokAdsAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
305
319
|
/**
|
|
306
320
|
* Get aggregated reports for a promotion schedule.
|
|
307
321
|
*
|
package/dist/esm/index.js
CHANGED
|
@@ -6918,6 +6918,14 @@ var AdsRoute = /** @class */ (function () {
|
|
|
6918
6918
|
url: "/ads/twitter/targeting/suggestions",
|
|
6919
6919
|
method: HTTP_METHODS.GET,
|
|
6920
6920
|
},
|
|
6921
|
+
syncCampaignTree: {
|
|
6922
|
+
url: "/ads/campaigns/{campaign_id}/sync_tree",
|
|
6923
|
+
method: HTTP_METHODS.POST,
|
|
6924
|
+
},
|
|
6925
|
+
syncSchedulerCampaigns: {
|
|
6926
|
+
url: "/ads/campaigns/scheduler/{scheduler_id}/syncAll",
|
|
6927
|
+
method: HTTP_METHODS.POST,
|
|
6928
|
+
},
|
|
6921
6929
|
};
|
|
6922
6930
|
return AdsRoute;
|
|
6923
6931
|
}());
|
|
@@ -7464,6 +7472,26 @@ var Ads = /** @class */ (function () {
|
|
|
7464
7472
|
Ads.twitterTargetingSuggestions = function (params) {
|
|
7465
7473
|
return Requests.processRoute(AdsRoute.routes.twitterTargetingSuggestions, undefined, undefined, params);
|
|
7466
7474
|
};
|
|
7475
|
+
/**
|
|
7476
|
+
* Deep-sync a campaign tree (campaign → groups → ads) with its remote platform.
|
|
7477
|
+
*
|
|
7478
|
+
* @param campaign_id UUID of the campaign to sync
|
|
7479
|
+
* @param params Optional query params
|
|
7480
|
+
* @returns Fully-hydrated AdCampaign resource
|
|
7481
|
+
*/
|
|
7482
|
+
Ads.syncCampaignTree = function (campaign_id, params) {
|
|
7483
|
+
return Requests.processRoute(AdsRoute.routes.syncCampaignTree, undefined, { campaign_id: campaign_id }, params);
|
|
7484
|
+
};
|
|
7485
|
+
/**
|
|
7486
|
+
* Deep-sync all the campaigns for a scheduler.
|
|
7487
|
+
*
|
|
7488
|
+
* @param scheduler_id UUID of the campaign to sync
|
|
7489
|
+
* @param params Optional query params
|
|
7490
|
+
* @returns Fully-hydrated AdCampaign resource
|
|
7491
|
+
*/
|
|
7492
|
+
Ads.syncSchedulerCampaigns = function (scheduler_id, params) {
|
|
7493
|
+
return Requests.processRoute(AdsRoute.routes.syncSchedulerCampaigns, undefined, { scheduler_id: scheduler_id }, params);
|
|
7494
|
+
};
|
|
7467
7495
|
return Ads;
|
|
7468
7496
|
}());
|
|
7469
7497
|
|
|
@@ -12820,6 +12848,8 @@ var SchedulerRoute = /** @class */ (function () {
|
|
|
12820
12848
|
clearSteamAuth: { url: '/schedulers/{scheduler_id}/clearSteamAuth', method: HTTP_METHODS.DELETE },
|
|
12821
12849
|
clearDiscordAuth: { url: '/schedulers/{scheduler_id}/clearDiscordAuth', method: HTTP_METHODS.DELETE },
|
|
12822
12850
|
clearBlueskyAuth: { url: '/schedulers/{scheduler_id}/clearBlueskyAuth', method: HTTP_METHODS.DELETE },
|
|
12851
|
+
clearTiktokAdsAuth: { url: '/schedulers/{scheduler_id}/clearTiktokAdsAuth', method: HTTP_METHODS.DELETE },
|
|
12852
|
+
clearGoogleAdsAuth: { url: '/schedulers/{scheduler_id}/clearGoogleAdsAuth', method: HTTP_METHODS.DELETE },
|
|
12823
12853
|
//Social Utility Routes
|
|
12824
12854
|
getFacebookGroups: { url: '/schedulers/{scheduler_id}/facebook/groups', method: HTTP_METHODS.GET },
|
|
12825
12855
|
getInstagramAccounts: { url: '/schedulers/{scheduler_id}/instagram/accounts', method: HTTP_METHODS.GET },
|
|
@@ -13263,6 +13293,30 @@ var Scheduler = /** @class */ (function () {
|
|
|
13263
13293
|
Scheduler.getDiscordChannels = function (scheduler_id, params) {
|
|
13264
13294
|
return Requests.processRoute(SchedulerRoute.routes.getDiscordChannels, {}, { scheduler_id: scheduler_id }, params);
|
|
13265
13295
|
};
|
|
13296
|
+
/**
|
|
13297
|
+
* Clear Google Ads OAuth credentials from a promotion schedule.
|
|
13298
|
+
*
|
|
13299
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
13300
|
+
* @returns promise
|
|
13301
|
+
*/
|
|
13302
|
+
Scheduler.clearGoogleAdsAuth = function (scheduler_id, params) {
|
|
13303
|
+
return Requests.processRoute(SchedulerRoute.routes.clearGoogleAdsAuth, {}, // no body
|
|
13304
|
+
{ scheduler_id: scheduler_id }, // path params
|
|
13305
|
+
params // optional query params
|
|
13306
|
+
);
|
|
13307
|
+
};
|
|
13308
|
+
/**
|
|
13309
|
+
* Clear Tiktok Ads OAuth credentials from a promotion schedule.
|
|
13310
|
+
*
|
|
13311
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
13312
|
+
* @returns promise
|
|
13313
|
+
*/
|
|
13314
|
+
Scheduler.clearTiktokAdsAuth = function (scheduler_id, params) {
|
|
13315
|
+
return Requests.processRoute(SchedulerRoute.routes.clearTiktokAdsAuth, {}, // no body
|
|
13316
|
+
{ scheduler_id: scheduler_id }, // path params
|
|
13317
|
+
params // optional query params
|
|
13318
|
+
);
|
|
13319
|
+
};
|
|
13266
13320
|
/**
|
|
13267
13321
|
* Get aggregated reports for a promotion schedule.
|
|
13268
13322
|
*
|