glitch-javascript-sdk 1.9.4 → 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.
@@ -374,5 +374,48 @@ declare class Ads {
374
374
  * @returns Fully-hydrated AdCampaign resource
375
375
  */
376
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>>;
377
420
  }
378
421
  export default Ads;
package/dist/esm/index.js CHANGED
@@ -6926,6 +6926,29 @@ var AdsRoute = /** @class */ (function () {
6926
6926
  url: "/ads/campaigns/scheduler/{scheduler_id}/syncAll",
6927
6927
  method: HTTP_METHODS.POST,
6928
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
+ },
6929
6952
  };
6930
6953
  return AdsRoute;
6931
6954
  }());
@@ -7492,6 +7515,39 @@ var Ads = /** @class */ (function () {
7492
7515
  Ads.syncSchedulerCampaigns = function (scheduler_id, params) {
7493
7516
  return Requests.processRoute(AdsRoute.routes.syncSchedulerCampaigns, undefined, { scheduler_id: scheduler_id }, params);
7494
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
+ };
7495
7551
  return Ads;
7496
7552
  }());
7497
7553