glitch-javascript-sdk 2.0.2 → 2.0.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 CHANGED
@@ -21777,13 +21777,16 @@ var UserRoutes = /** @class */ (function () {
21777
21777
  addType: { url: '/users/addType', method: HTTP_METHODS.POST },
21778
21778
  removeType: { url: '/users/removeType/{type_id}', method: HTTP_METHODS.DELETE },
21779
21779
  getCampaignInvites: { url: '/users/getCampaignInvites', method: HTTP_METHODS.GET },
21780
- getPayouts: { url: '/users/payouts', method: HTTP_METHODS.GET },
21780
+ getPayouts: { url: '/users/getCampaignPayouts', method: HTTP_METHODS.GET },
21781
21781
  verifyAccount: { url: '/users/verify', method: HTTP_METHODS.POST },
21782
21782
  getInstagramAccounts: { url: '/users/instagramAccounts', method: HTTP_METHODS.GET },
21783
21783
  getFacebookPages: { url: "/users/facebookPages", method: HTTP_METHODS.GET },
21784
21784
  getSubreddits: { url: "/users/reddit/subreddits", method: HTTP_METHODS.GET },
21785
21785
  getSubredditFlairs: { url: "/users/reddit/redditflairs/{subreddit}", method: HTTP_METHODS.GET },
21786
21786
  search: { url: '/users/search', method: HTTP_METHODS.GET },
21787
+ resendVerificationEmail: { url: '/users/resendVerificationEmail', method: HTTP_METHODS.POST },
21788
+ clearInstagramAuth: { url: '/users/clearInstagramAuth', method: HTTP_METHODS.DELETE },
21789
+ getSubredditRules: { url: "/users/reddit/redditrules/{subreddit}", method: HTTP_METHODS.GET },
21787
21790
  };
21788
21791
  return UserRoutes;
21789
21792
  }());
@@ -22236,6 +22239,37 @@ var Users = /** @class */ (function () {
22236
22239
  Users.search = function (params) {
22237
22240
  return Requests.processRoute(UserRoutes.routes.search, undefined, undefined, params);
22238
22241
  };
22242
+ /**
22243
+ * Resends the verification email to the authenticated user.
22244
+ *
22245
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/resendVerificationEmail
22246
+ *
22247
+ * @returns Promise
22248
+ */
22249
+ Users.resendVerificationEmail = function () {
22250
+ return Requests.processRoute(UserRoutes.routes.resendVerificationEmail, {});
22251
+ };
22252
+ /**
22253
+ * Clear Instagram authentication information from the current user.
22254
+ *
22255
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/clearInstagramAuth
22256
+ *
22257
+ * @returns promise
22258
+ */
22259
+ Users.clearInstagramAuth = function () {
22260
+ return Requests.processRoute(UserRoutes.routes.clearInstagramAuth, {});
22261
+ };
22262
+ /**
22263
+ * Gets the rules for a specific subreddit.
22264
+ *
22265
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/getSubredditRules
22266
+ *
22267
+ * @param subreddit The name of the subreddit to get rules for.
22268
+ * @returns Promise resolving to the list of rules
22269
+ */
22270
+ Users.getSubredditRules = function (subreddit, params) {
22271
+ return Requests.processRoute(UserRoutes.routes.getSubredditRules, undefined, { subreddit: subreddit }, params);
22272
+ };
22239
22273
  return Users;
22240
22274
  }());
22241
22275
 
@@ -24241,6 +24275,46 @@ var TitlesRoute = /** @class */ (function () {
24241
24275
  url: '/titles/{title_id}/chat/messages/{message_id}',
24242
24276
  method: HTTP_METHODS.PUT
24243
24277
  },
24278
+ // ─────────────────────────────────────────────────────────────────
24279
+ // Purchase/Revenue Endpoints
24280
+ // ─────────────────────────────────────────────────────────────────
24281
+ purchasesList: {
24282
+ url: "/titles/{title_id}/purchases",
24283
+ method: HTTP_METHODS.GET,
24284
+ },
24285
+ purchasesShow: {
24286
+ url: "/titles/{title_id}/purchases/{purchase_id}",
24287
+ method: HTTP_METHODS.GET,
24288
+ },
24289
+ purchasesCreate: {
24290
+ url: "/titles/{title_id}/purchases",
24291
+ method: HTTP_METHODS.POST,
24292
+ },
24293
+ purchasesSummary: {
24294
+ url: "/titles/{title_id}/purchases/summary",
24295
+ method: HTTP_METHODS.GET,
24296
+ },
24297
+ // Advanced analytics sub-routes
24298
+ purchasesTimeReport: {
24299
+ url: "/titles/{title_id}/purchases/reports/time",
24300
+ method: HTTP_METHODS.GET,
24301
+ },
24302
+ purchasesLtv30Report: {
24303
+ url: "/titles/{title_id}/purchases/reports/ltv30",
24304
+ method: HTTP_METHODS.GET,
24305
+ },
24306
+ purchasesCurrencyBreakdown: {
24307
+ url: "/titles/{title_id}/purchases/reports/currency",
24308
+ method: HTTP_METHODS.GET,
24309
+ },
24310
+ purchasesInstallDistribution: {
24311
+ url: "/titles/{title_id}/purchases/reports/install-distribution",
24312
+ method: HTTP_METHODS.GET,
24313
+ },
24314
+ purchasesItemTypeStats: {
24315
+ url: "/titles/{title_id}/purchases/reports/item-type-stats",
24316
+ method: HTTP_METHODS.GET,
24317
+ },
24244
24318
  };
24245
24319
  return TitlesRoute;
24246
24320
  }());
@@ -24620,6 +24694,69 @@ var Titles = /** @class */ (function () {
24620
24694
  Titles.chatUpdateMessage = function (title_id, message_id, data) {
24621
24695
  return Requests.processRoute(TitlesRoute.routes.chatUpdateMessage, data, { title_id: title_id, message_id: message_id });
24622
24696
  };
24697
+ /**
24698
+ * List all purchase events for a specific title.
24699
+ * Matches GET /titles/{title_id}/purchases
24700
+ */
24701
+ Titles.listPurchases = function (title_id, params) {
24702
+ return Requests.processRoute(TitlesRoute.routes.purchasesList, {}, { title_id: title_id }, params);
24703
+ };
24704
+ /**
24705
+ * Retrieve a single purchase record by ID.
24706
+ * Matches GET /titles/{title_id}/purchases/{purchase_id}
24707
+ */
24708
+ Titles.viewPurchase = function (title_id, purchase_id, params) {
24709
+ return Requests.processRoute(TitlesRoute.routes.purchasesShow, {}, { title_id: title_id, purchase_id: purchase_id }, params);
24710
+ };
24711
+ /**
24712
+ * Create a new purchase record.
24713
+ * Matches POST /titles/{title_id}/purchases
24714
+ */
24715
+ Titles.createPurchase = function (title_id, data, params) {
24716
+ return Requests.processRoute(TitlesRoute.routes.purchasesCreate, data, { title_id: title_id }, params);
24717
+ };
24718
+ /**
24719
+ * Get a summary of total revenue, grouped by day or purchase_type.
24720
+ * Matches GET /titles/{title_id}/purchases/summary
24721
+ */
24722
+ Titles.purchaseSummary = function (title_id, params) {
24723
+ return Requests.processRoute(TitlesRoute.routes.purchasesSummary, {}, { title_id: title_id }, params);
24724
+ };
24725
+ /**
24726
+ * Revenue by time (daily, weekly, or monthly).
24727
+ * Matches GET /titles/{title_id}/purchases/reports/time
24728
+ */
24729
+ Titles.purchaseRevenueByTime = function (title_id, params) {
24730
+ return Requests.processRoute(TitlesRoute.routes.purchasesTimeReport, {}, { title_id: title_id }, params);
24731
+ };
24732
+ /**
24733
+ * 30-day LTV (Lifetime Value) per install.
24734
+ * Matches GET /titles/{title_id}/purchases/reports/ltv30
24735
+ */
24736
+ Titles.purchaseLtv30 = function (title_id, params) {
24737
+ return Requests.processRoute(TitlesRoute.routes.purchasesLtv30Report, {}, { title_id: title_id }, params);
24738
+ };
24739
+ /**
24740
+ * Show breakdown of revenue per currency, with optional USD conversion.
24741
+ * Matches GET /titles/{title_id}/purchases/reports/currency
24742
+ */
24743
+ Titles.purchaseCurrencyBreakdown = function (title_id, params) {
24744
+ return Requests.processRoute(TitlesRoute.routes.purchasesCurrencyBreakdown, {}, { title_id: title_id }, params);
24745
+ };
24746
+ /**
24747
+ * Distribution of installs by total revenue, plus a histogram array.
24748
+ * Matches GET /titles/{title_id}/purchases/reports/install-distribution
24749
+ */
24750
+ Titles.installRevenueDistribution = function (title_id, params) {
24751
+ return Requests.processRoute(TitlesRoute.routes.purchasesInstallDistribution, {}, { title_id: title_id }, params);
24752
+ };
24753
+ /**
24754
+ * Stats by item SKU, purchase type, and repeat purchase analysis.
24755
+ * Matches GET /titles/{title_id}/purchases/reports/item-type-stats
24756
+ */
24757
+ Titles.itemAndPurchaseTypeStats = function (title_id, params) {
24758
+ return Requests.processRoute(TitlesRoute.routes.purchasesItemTypeStats, {}, { title_id: title_id }, params);
24759
+ };
24623
24760
  return Titles;
24624
24761
  }());
24625
24762
 
@@ -27612,6 +27749,10 @@ var ShortLinksRoute = /** @class */ (function () {
27612
27749
  updateShortLink: { url: '/shortlinks/{id}', method: HTTP_METHODS.PUT },
27613
27750
  // Delete can be added if supported
27614
27751
  // deleteShortLink: { url: '/shortlinks/{id}', method: HTTP_METHODS.DELETE }
27752
+ clickSummary: { url: '/shortlinks/reports/click-summary', method: HTTP_METHODS.GET },
27753
+ geoDeviceBreakdown: { url: '/shortlinks/reports/geo-device', method: HTTP_METHODS.GET },
27754
+ timeSeries: { url: '/shortlinks/reports/time-series', method: HTTP_METHODS.GET },
27755
+ referrerReport: { url: '/shortlinks/reports/referrer', method: HTTP_METHODS.GET },
27615
27756
  };
27616
27757
  return ShortLinksRoute;
27617
27758
  }());
@@ -27643,6 +27784,38 @@ var ShortLinks = /** @class */ (function () {
27643
27784
  ShortLinks.update = function (id, data, params) {
27644
27785
  return Requests.processRoute(ShortLinksRoute.routes.updateShortLink, data, { id: id }, params);
27645
27786
  };
27787
+ // Uncomment when delete is supported
27788
+ // public static delete<T>(id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
27789
+ // return Requests.processRoute(ShortLinksRoute.routes.deleteShortLink, {}, { id }, params);
27790
+ // }
27791
+ /**
27792
+ * Get click-summary report
27793
+ * - Example usage: ShortLinks.clickSummary({ short_link_id: 'uuid-here' })
27794
+ */
27795
+ ShortLinks.clickSummary = function (params) {
27796
+ return Requests.processRoute(ShortLinksRoute.routes.clickSummary, undefined, undefined, params);
27797
+ };
27798
+ /**
27799
+ * Get geo & device breakdown report
27800
+ * - Example usage: ShortLinks.geoDeviceBreakdown({ short_link_id: 'uuid-here' })
27801
+ */
27802
+ ShortLinks.geoDeviceBreakdown = function (params) {
27803
+ return Requests.processRoute(ShortLinksRoute.routes.geoDeviceBreakdown, undefined, undefined, params);
27804
+ };
27805
+ /**
27806
+ * Get time-series report
27807
+ * - Example usage: ShortLinks.timeSeries({ short_link_id: 'uuid-here', group_by: 'day' })
27808
+ */
27809
+ ShortLinks.timeSeries = function (params) {
27810
+ return Requests.processRoute(ShortLinksRoute.routes.timeSeries, undefined, undefined, params);
27811
+ };
27812
+ /**
27813
+ * Get referrer & UTM report
27814
+ * - Example usage: ShortLinks.referrerReport({ short_link_id: 'uuid-here' })
27815
+ */
27816
+ ShortLinks.referrerReport = function (params) {
27817
+ return Requests.processRoute(ShortLinksRoute.routes.referrerReport, undefined, undefined, params);
27818
+ };
27646
27819
  return ShortLinks;
27647
27820
  }());
27648
27821