glitch-javascript-sdk 1.9.4 → 1.9.6

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 CHANGED
@@ -20110,6 +20110,29 @@ var AdsRoute = /** @class */ (function () {
20110
20110
  url: "/ads/campaigns/scheduler/{scheduler_id}/syncAll",
20111
20111
  method: HTTP_METHODS.POST,
20112
20112
  },
20113
+ // ----------------------------------------------------------------
20114
+ // AD REPORTS
20115
+ // ----------------------------------------------------------------
20116
+ getPerformanceSummary: {
20117
+ url: "/ads/reports/summary",
20118
+ method: HTTP_METHODS.GET,
20119
+ },
20120
+ getSpendDeliveryReport: {
20121
+ url: "/ads/reports/spend-delivery",
20122
+ method: HTTP_METHODS.GET,
20123
+ },
20124
+ getPlatformComparisonReport: {
20125
+ url: "/ads/reports/platform-comparison",
20126
+ method: HTTP_METHODS.GET,
20127
+ },
20128
+ getCreativePerformanceReport: {
20129
+ url: "/ads/reports/creative-performance",
20130
+ method: HTTP_METHODS.GET,
20131
+ },
20132
+ getTimePerformanceReport: {
20133
+ url: "/ads/reports/time-performance",
20134
+ method: HTTP_METHODS.GET,
20135
+ },
20113
20136
  };
20114
20137
  return AdsRoute;
20115
20138
  }());
@@ -20676,6 +20699,39 @@ var Ads = /** @class */ (function () {
20676
20699
  Ads.syncSchedulerCampaigns = function (scheduler_id, params) {
20677
20700
  return Requests.processRoute(AdsRoute.routes.syncSchedulerCampaigns, undefined, { scheduler_id: scheduler_id }, params);
20678
20701
  };
20702
+ // ----------------------------------------------------------------------
20703
+ // AD REPORTS
20704
+ // ----------------------------------------------------------------------
20705
+ /**
20706
+ * Get campaign performance summary.
20707
+ */
20708
+ Ads.getPerformanceSummary = function (params) {
20709
+ return Requests.processRoute(AdsRoute.routes.getPerformanceSummary, undefined, undefined, params);
20710
+ };
20711
+ /**
20712
+ * Get spend and delivery metrics over time.
20713
+ */
20714
+ Ads.getSpendDeliveryReport = function (params) {
20715
+ return Requests.processRoute(AdsRoute.routes.getSpendDeliveryReport, undefined, undefined, params);
20716
+ };
20717
+ /**
20718
+ * Compare performance across platforms.
20719
+ */
20720
+ Ads.getPlatformComparisonReport = function (params) {
20721
+ return Requests.processRoute(AdsRoute.routes.getPlatformComparisonReport, undefined, undefined, params);
20722
+ };
20723
+ /**
20724
+ * Get performance metrics for individual ad creatives.
20725
+ */
20726
+ Ads.getCreativePerformanceReport = function (params) {
20727
+ return Requests.processRoute(AdsRoute.routes.getCreativePerformanceReport, undefined, undefined, params);
20728
+ };
20729
+ /**
20730
+ * Get time-based performance metrics by hour and day of week.
20731
+ */
20732
+ Ads.getTimePerformanceReport = function (params) {
20733
+ return Requests.processRoute(AdsRoute.routes.getTimePerformanceReport, undefined, undefined, params);
20734
+ };
20679
20735
  return Ads;
20680
20736
  }());
20681
20737
 
@@ -23999,6 +24055,22 @@ var TitlesRoute = /** @class */ (function () {
23999
24055
  url: "/titles/{title_id}/utm/analysis",
24000
24056
  method: HTTP_METHODS.GET,
24001
24057
  },
24058
+ chatListSessions: {
24059
+ url: '/titles/{title_id}/chat/sessions',
24060
+ method: HTTP_METHODS.GET
24061
+ },
24062
+ chatShowSession: {
24063
+ url: '/titles/{title_id}/chat/sessions/{session_id}',
24064
+ method: HTTP_METHODS.GET
24065
+ },
24066
+ chatListMessages: {
24067
+ url: '/titles/{title_id}/chat/messages',
24068
+ method: HTTP_METHODS.GET
24069
+ },
24070
+ chatUpdateMessage: {
24071
+ url: '/titles/{title_id}/chat/messages/{message_id}',
24072
+ method: HTTP_METHODS.PUT
24073
+ },
24002
24074
  };
24003
24075
  return TitlesRoute;
24004
24076
  }());
@@ -24354,6 +24426,30 @@ var Titles = /** @class */ (function () {
24354
24426
  Titles.analyzeUtmAnalytics = function (title_id, params) {
24355
24427
  return Requests.processRoute(TitlesRoute.routes.analyzeUtmAnalytics, {}, { title_id: title_id }, params);
24356
24428
  };
24429
+ /**
24430
+ * List all chat sessions for a title.
24431
+ */
24432
+ Titles.chatListSessions = function (title_id, params) {
24433
+ return Requests.processRoute(TitlesRoute.routes.chatListSessions, {}, { title_id: title_id }, params);
24434
+ };
24435
+ /**
24436
+ * Get a specific chat session and its messages.
24437
+ */
24438
+ Titles.chatShowSession = function (title_id, session_id, params) {
24439
+ return Requests.processRoute(TitlesRoute.routes.chatShowSession, {}, { title_id: title_id, session_id: session_id }, params);
24440
+ };
24441
+ /**
24442
+ * Search messages across all sessions of a title.
24443
+ */
24444
+ Titles.chatListMessages = function (title_id, params) {
24445
+ return Requests.processRoute(TitlesRoute.routes.chatListMessages, {}, { title_id: title_id }, params);
24446
+ };
24447
+ /**
24448
+ * Update a specific chat message.
24449
+ */
24450
+ Titles.chatUpdateMessage = function (title_id, message_id, data) {
24451
+ return Requests.processRoute(TitlesRoute.routes.chatUpdateMessage, data, { title_id: title_id, message_id: message_id });
24452
+ };
24357
24453
  return Titles;
24358
24454
  }());
24359
24455
 
@@ -27159,6 +27255,88 @@ var WebsiteAnalytics = /** @class */ (function () {
27159
27255
  return WebsiteAnalytics;
27160
27256
  }());
27161
27257
 
27258
+ var ShortLinksRoute = /** @class */ (function () {
27259
+ function ShortLinksRoute() {
27260
+ }
27261
+ ShortLinksRoute.routes = {
27262
+ listShortLinks: { url: '/shortlinks', method: HTTP_METHODS.GET },
27263
+ createShortLink: { url: '/shortlinks', method: HTTP_METHODS.POST },
27264
+ viewShortLink: { url: '/shortlinks/{id}', method: HTTP_METHODS.GET },
27265
+ updateShortLink: { url: '/shortlinks/{id}', method: HTTP_METHODS.PUT },
27266
+ // Delete can be added if supported
27267
+ // deleteShortLink: { url: '/shortlinks/{id}', method: HTTP_METHODS.DELETE }
27268
+ };
27269
+ return ShortLinksRoute;
27270
+ }());
27271
+
27272
+ var ShortLinks = /** @class */ (function () {
27273
+ function ShortLinks() {
27274
+ }
27275
+ /**
27276
+ * List all short links with optional filters
27277
+ */
27278
+ ShortLinks.list = function (params) {
27279
+ return Requests.processRoute(ShortLinksRoute.routes.listShortLinks, undefined, undefined, params);
27280
+ };
27281
+ /**
27282
+ * Create a new short link
27283
+ */
27284
+ ShortLinks.create = function (data, params) {
27285
+ return Requests.processRoute(ShortLinksRoute.routes.createShortLink, data, {}, params);
27286
+ };
27287
+ /**
27288
+ * Get a specific short link by ID
27289
+ */
27290
+ ShortLinks.view = function (id, params) {
27291
+ return Requests.processRoute(ShortLinksRoute.routes.viewShortLink, {}, { id: id }, params);
27292
+ };
27293
+ /**
27294
+ * Update a short link
27295
+ */
27296
+ ShortLinks.update = function (id, data, params) {
27297
+ return Requests.processRoute(ShortLinksRoute.routes.updateShortLink, data, { id: id }, params);
27298
+ };
27299
+ return ShortLinks;
27300
+ }());
27301
+
27302
+ var AIUsageRoute = /** @class */ (function () {
27303
+ function AIUsageRoute() {
27304
+ }
27305
+ AIUsageRoute.routes = {
27306
+ listUsage: { url: '/billing/ai-usage', method: HTTP_METHODS.GET },
27307
+ summaryUsage: { url: '/billing/ai-usage/summary', method: HTTP_METHODS.GET }
27308
+ };
27309
+ return AIUsageRoute;
27310
+ }());
27311
+
27312
+ var AIUsage = /** @class */ (function () {
27313
+ function AIUsage() {
27314
+ }
27315
+ /**
27316
+ * List all AI usage entries with optional filters (date range, service, model, etc.).
27317
+ *
27318
+ * @see https://api.glitch.fun/api/documentation#/AI%20Usage/getAIUsage
27319
+ *
27320
+ * @param params Query parameters for filtering and grouping
27321
+ * @returns AxiosPromise
27322
+ */
27323
+ AIUsage.list = function (params) {
27324
+ return Requests.processRoute(AIUsageRoute.routes.listUsage, undefined, undefined, params);
27325
+ };
27326
+ /**
27327
+ * Get summarized AI usage statistics (token totals, cost, grouped by service/model).
27328
+ *
27329
+ * @see https://api.glitch.fun/api/documentation#/AI%20Usage/getAIUsageSummary
27330
+ *
27331
+ * @param params Query parameters for filtering by date range
27332
+ * @returns AxiosPromise
27333
+ */
27334
+ AIUsage.summary = function (params) {
27335
+ return Requests.processRoute(AIUsageRoute.routes.summaryUsage, undefined, undefined, params);
27336
+ };
27337
+ return AIUsage;
27338
+ }());
27339
+
27162
27340
  var Parser = /** @class */ (function () {
27163
27341
  function Parser() {
27164
27342
  }
@@ -27681,7 +27859,9 @@ var Glitch = /** @class */ (function () {
27681
27859
  Funnel: Funnel,
27682
27860
  SocialStats: SocialStats,
27683
27861
  WebsiteAnalytics: WebsiteAnalytics,
27684
- Fingerprinting: Fingerprinting
27862
+ Fingerprinting: Fingerprinting,
27863
+ ShortLinks: ShortLinks,
27864
+ AIUsage: AIUsage
27685
27865
  };
27686
27866
  Glitch.util = {
27687
27867
  Requests: Requests,