glitch-javascript-sdk 1.9.3 → 1.9.5
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 +110 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Ads.d.ts +59 -0
- package/dist/esm/api/Scheduler.d.ts +14 -0
- package/dist/esm/index.js +110 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +73 -0
- package/package.json +1 -1
- package/src/api/Ads.ts +150 -49
- package/src/api/Scheduler.ts +48 -12
- package/src/routes/AdsRoute.ts +36 -0
- package/src/routes/SchedulerRoute.ts +2 -0
package/dist/esm/api/Ads.d.ts
CHANGED
|
@@ -358,5 +358,64 @@ 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>>;
|
|
377
|
+
/**
|
|
378
|
+
* Get campaign performance summary.
|
|
379
|
+
*/
|
|
380
|
+
static getPerformanceSummary<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
381
|
+
/**
|
|
382
|
+
* Get spend and delivery metrics over time.
|
|
383
|
+
*/
|
|
384
|
+
static getSpendDeliveryReport<T>(params: {
|
|
385
|
+
start_date: string;
|
|
386
|
+
end_date: string;
|
|
387
|
+
group_by?: 'day' | 'week' | 'month';
|
|
388
|
+
community_id?: string;
|
|
389
|
+
platform?: string;
|
|
390
|
+
}): AxiosPromise<Response<T>>;
|
|
391
|
+
/**
|
|
392
|
+
* Compare performance across platforms.
|
|
393
|
+
*/
|
|
394
|
+
static getPlatformComparisonReport<T>(params?: {
|
|
395
|
+
start_date?: string;
|
|
396
|
+
end_date?: string;
|
|
397
|
+
community_id?: string;
|
|
398
|
+
}): AxiosPromise<Response<T>>;
|
|
399
|
+
/**
|
|
400
|
+
* Get performance metrics for individual ad creatives.
|
|
401
|
+
*/
|
|
402
|
+
static getCreativePerformanceReport<T>(params?: {
|
|
403
|
+
community_id?: string;
|
|
404
|
+
platform?: string;
|
|
405
|
+
start_date?: string;
|
|
406
|
+
end_date?: string;
|
|
407
|
+
limit?: number;
|
|
408
|
+
sort?: 'spend' | 'impressions' | 'clicks' | 'ctr' | 'cpm' | 'cpc';
|
|
409
|
+
order?: 'asc' | 'desc';
|
|
410
|
+
}): AxiosPromise<Response<T>>;
|
|
411
|
+
/**
|
|
412
|
+
* Get time-based performance metrics by hour and day of week.
|
|
413
|
+
*/
|
|
414
|
+
static getTimePerformanceReport<T>(params: {
|
|
415
|
+
start_date: string;
|
|
416
|
+
end_date: string;
|
|
417
|
+
community_id?: string;
|
|
418
|
+
platform?: string;
|
|
419
|
+
}): AxiosPromise<Response<T>>;
|
|
361
420
|
}
|
|
362
421
|
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,37 @@ 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
|
+
},
|
|
6929
|
+
// ----------------------------------------------------------------
|
|
6930
|
+
// AD REPORTS
|
|
6931
|
+
// ----------------------------------------------------------------
|
|
6932
|
+
getPerformanceSummary: {
|
|
6933
|
+
url: "/ads/reports/summary",
|
|
6934
|
+
method: HTTP_METHODS.GET,
|
|
6935
|
+
},
|
|
6936
|
+
getSpendDeliveryReport: {
|
|
6937
|
+
url: "/ads/reports/spend-delivery",
|
|
6938
|
+
method: HTTP_METHODS.GET,
|
|
6939
|
+
},
|
|
6940
|
+
getPlatformComparisonReport: {
|
|
6941
|
+
url: "/ads/reports/platform-comparison",
|
|
6942
|
+
method: HTTP_METHODS.GET,
|
|
6943
|
+
},
|
|
6944
|
+
getCreativePerformanceReport: {
|
|
6945
|
+
url: "/ads/reports/creative-performance",
|
|
6946
|
+
method: HTTP_METHODS.GET,
|
|
6947
|
+
},
|
|
6948
|
+
getTimePerformanceReport: {
|
|
6949
|
+
url: "/ads/reports/time-performance",
|
|
6950
|
+
method: HTTP_METHODS.GET,
|
|
6951
|
+
},
|
|
6921
6952
|
};
|
|
6922
6953
|
return AdsRoute;
|
|
6923
6954
|
}());
|
|
@@ -7464,6 +7495,59 @@ var Ads = /** @class */ (function () {
|
|
|
7464
7495
|
Ads.twitterTargetingSuggestions = function (params) {
|
|
7465
7496
|
return Requests.processRoute(AdsRoute.routes.twitterTargetingSuggestions, undefined, undefined, params);
|
|
7466
7497
|
};
|
|
7498
|
+
/**
|
|
7499
|
+
* Deep-sync a campaign tree (campaign → groups → ads) with its remote platform.
|
|
7500
|
+
*
|
|
7501
|
+
* @param campaign_id UUID of the campaign to sync
|
|
7502
|
+
* @param params Optional query params
|
|
7503
|
+
* @returns Fully-hydrated AdCampaign resource
|
|
7504
|
+
*/
|
|
7505
|
+
Ads.syncCampaignTree = function (campaign_id, params) {
|
|
7506
|
+
return Requests.processRoute(AdsRoute.routes.syncCampaignTree, undefined, { campaign_id: campaign_id }, params);
|
|
7507
|
+
};
|
|
7508
|
+
/**
|
|
7509
|
+
* Deep-sync all the campaigns for a scheduler.
|
|
7510
|
+
*
|
|
7511
|
+
* @param scheduler_id UUID of the campaign to sync
|
|
7512
|
+
* @param params Optional query params
|
|
7513
|
+
* @returns Fully-hydrated AdCampaign resource
|
|
7514
|
+
*/
|
|
7515
|
+
Ads.syncSchedulerCampaigns = function (scheduler_id, params) {
|
|
7516
|
+
return Requests.processRoute(AdsRoute.routes.syncSchedulerCampaigns, undefined, { scheduler_id: scheduler_id }, params);
|
|
7517
|
+
};
|
|
7518
|
+
// ----------------------------------------------------------------------
|
|
7519
|
+
// AD REPORTS
|
|
7520
|
+
// ----------------------------------------------------------------------
|
|
7521
|
+
/**
|
|
7522
|
+
* Get campaign performance summary.
|
|
7523
|
+
*/
|
|
7524
|
+
Ads.getPerformanceSummary = function (params) {
|
|
7525
|
+
return Requests.processRoute(AdsRoute.routes.getPerformanceSummary, undefined, undefined, params);
|
|
7526
|
+
};
|
|
7527
|
+
/**
|
|
7528
|
+
* Get spend and delivery metrics over time.
|
|
7529
|
+
*/
|
|
7530
|
+
Ads.getSpendDeliveryReport = function (params) {
|
|
7531
|
+
return Requests.processRoute(AdsRoute.routes.getSpendDeliveryReport, undefined, undefined, params);
|
|
7532
|
+
};
|
|
7533
|
+
/**
|
|
7534
|
+
* Compare performance across platforms.
|
|
7535
|
+
*/
|
|
7536
|
+
Ads.getPlatformComparisonReport = function (params) {
|
|
7537
|
+
return Requests.processRoute(AdsRoute.routes.getPlatformComparisonReport, undefined, undefined, params);
|
|
7538
|
+
};
|
|
7539
|
+
/**
|
|
7540
|
+
* Get performance metrics for individual ad creatives.
|
|
7541
|
+
*/
|
|
7542
|
+
Ads.getCreativePerformanceReport = function (params) {
|
|
7543
|
+
return Requests.processRoute(AdsRoute.routes.getCreativePerformanceReport, undefined, undefined, params);
|
|
7544
|
+
};
|
|
7545
|
+
/**
|
|
7546
|
+
* Get time-based performance metrics by hour and day of week.
|
|
7547
|
+
*/
|
|
7548
|
+
Ads.getTimePerformanceReport = function (params) {
|
|
7549
|
+
return Requests.processRoute(AdsRoute.routes.getTimePerformanceReport, undefined, undefined, params);
|
|
7550
|
+
};
|
|
7467
7551
|
return Ads;
|
|
7468
7552
|
}());
|
|
7469
7553
|
|
|
@@ -12820,6 +12904,8 @@ var SchedulerRoute = /** @class */ (function () {
|
|
|
12820
12904
|
clearSteamAuth: { url: '/schedulers/{scheduler_id}/clearSteamAuth', method: HTTP_METHODS.DELETE },
|
|
12821
12905
|
clearDiscordAuth: { url: '/schedulers/{scheduler_id}/clearDiscordAuth', method: HTTP_METHODS.DELETE },
|
|
12822
12906
|
clearBlueskyAuth: { url: '/schedulers/{scheduler_id}/clearBlueskyAuth', method: HTTP_METHODS.DELETE },
|
|
12907
|
+
clearTiktokAdsAuth: { url: '/schedulers/{scheduler_id}/clearTiktokAdsAuth', method: HTTP_METHODS.DELETE },
|
|
12908
|
+
clearGoogleAdsAuth: { url: '/schedulers/{scheduler_id}/clearGoogleAdsAuth', method: HTTP_METHODS.DELETE },
|
|
12823
12909
|
//Social Utility Routes
|
|
12824
12910
|
getFacebookGroups: { url: '/schedulers/{scheduler_id}/facebook/groups', method: HTTP_METHODS.GET },
|
|
12825
12911
|
getInstagramAccounts: { url: '/schedulers/{scheduler_id}/instagram/accounts', method: HTTP_METHODS.GET },
|
|
@@ -13263,6 +13349,30 @@ var Scheduler = /** @class */ (function () {
|
|
|
13263
13349
|
Scheduler.getDiscordChannels = function (scheduler_id, params) {
|
|
13264
13350
|
return Requests.processRoute(SchedulerRoute.routes.getDiscordChannels, {}, { scheduler_id: scheduler_id }, params);
|
|
13265
13351
|
};
|
|
13352
|
+
/**
|
|
13353
|
+
* Clear Google Ads OAuth credentials from a promotion schedule.
|
|
13354
|
+
*
|
|
13355
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
13356
|
+
* @returns promise
|
|
13357
|
+
*/
|
|
13358
|
+
Scheduler.clearGoogleAdsAuth = function (scheduler_id, params) {
|
|
13359
|
+
return Requests.processRoute(SchedulerRoute.routes.clearGoogleAdsAuth, {}, // no body
|
|
13360
|
+
{ scheduler_id: scheduler_id }, // path params
|
|
13361
|
+
params // optional query params
|
|
13362
|
+
);
|
|
13363
|
+
};
|
|
13364
|
+
/**
|
|
13365
|
+
* Clear Tiktok Ads OAuth credentials from a promotion schedule.
|
|
13366
|
+
*
|
|
13367
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
13368
|
+
* @returns promise
|
|
13369
|
+
*/
|
|
13370
|
+
Scheduler.clearTiktokAdsAuth = function (scheduler_id, params) {
|
|
13371
|
+
return Requests.processRoute(SchedulerRoute.routes.clearTiktokAdsAuth, {}, // no body
|
|
13372
|
+
{ scheduler_id: scheduler_id }, // path params
|
|
13373
|
+
params // optional query params
|
|
13374
|
+
);
|
|
13375
|
+
};
|
|
13266
13376
|
/**
|
|
13267
13377
|
* Get aggregated reports for a promotion schedule.
|
|
13268
13378
|
*
|