glitch-javascript-sdk 2.2.5 → 2.2.7

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.
@@ -685,5 +685,17 @@ declare class Campaigns {
685
685
  static updateCustomRanking<T>(campaign_id: string, data: object): AxiosPromise<Response<T>>;
686
686
  static updateCreatorBucket<T>(campaign_id: string, creator_id: string, data: object): AxiosPromise<Response<T>>;
687
687
  static reRankSourcedCreators<T>(campaign_id: string, data: object): AxiosPromise<Response<T>>;
688
+ /**
689
+ * Queue multiple sourced creators for profile enrichment.
690
+ * This dispatches a background job for each creator to find their social media profiles and contact information.
691
+ *
692
+ * @param campaign_id The UUID of the campaign.
693
+ * @param data An object containing the array of SourcedCreator IDs to enrich.
694
+ * @param data.creator_ids An array of SourcedCreator UUIDs.
695
+ * @returns A promise that resolves with a confirmation message and the count of queued jobs.
696
+ */
697
+ static bulkEnrichSourcedCreators<T>(campaign_id: string, data: {
698
+ creator_ids: string[];
699
+ }): AxiosPromise<Response<T>>;
688
700
  }
689
701
  export default Campaigns;
@@ -0,0 +1,66 @@
1
+ import Response from "../util/Response";
2
+ import { AxiosPromise } from "axios";
3
+ declare class TwitchReporting {
4
+ /**
5
+ * Get a streamer's Concurrent Viewership (CCV) history.
6
+ *
7
+ * @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getCreatorCcvHistory
8
+ *
9
+ * @param twitch_streamer_id The ID of the Twitch streamer.
10
+ * @param params Optional query parameters for filtering (e.g., start_date, end_date, per_page).
11
+ *
12
+ * @returns promise
13
+ */
14
+ static getCreatorCcvHistory<T>(twitch_streamer_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
15
+ /**
16
+ * Get a summary of game performance metrics.
17
+ *
18
+ * @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getGamesSummary
19
+ *
20
+ * @param params Optional query parameters for filtering and sorting (e.g., start_date, end_date, sort_by, limit).
21
+ *
22
+ * @returns promise
23
+ */
24
+ static getGamesSummary<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
25
+ /**
26
+ * Get most recently active streamers.
27
+ *
28
+ * @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getMostActiveStreamers
29
+ *
30
+ * @param params Optional query parameters (e.g., limit).
31
+ *
32
+ * @returns promise
33
+ */
34
+ static getMostActiveStreamers<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
35
+ /**
36
+ * Get most recently streamed games.
37
+ *
38
+ * @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getMostActiveGames
39
+ *
40
+ * @param params Optional query parameters (e.g., limit).
41
+ *
42
+ * @returns promise
43
+ */
44
+ static getMostActiveGames<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
45
+ /**
46
+ * Get top streamers by performance (average or peak CCV).
47
+ *
48
+ * @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getTopStreamers
49
+ *
50
+ * @param params Optional query parameters for filtering and sorting (e.g., sort_by, start_date, limit).
51
+ *
52
+ * @returns promise
53
+ */
54
+ static getTopStreamers<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
55
+ /**
56
+ * Get a streamer's typical streaming schedule as a heatmap.
57
+ *
58
+ * @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getCreatorStreamingSchedule
59
+ *
60
+ * @param twitch_streamer_id The ID of the Twitch streamer.
61
+ *
62
+ * @returns promise
63
+ */
64
+ static getCreatorStreamingSchedule<T>(twitch_streamer_id: string): AxiosPromise<Response<T>>;
65
+ }
66
+ export default TwitchReporting;
@@ -37,6 +37,7 @@ import WebsiteAnalytics from "./WebsiteAnalytics";
37
37
  import ShortLinks from "./ShortLinks";
38
38
  import AIUsage from "./AIUsage";
39
39
  import MarketingAgencies from "./MarketingAgencies";
40
+ import TwitchReporting from "./TwitchReporting";
40
41
  export { Ads };
41
42
  export { AccessKeys };
42
43
  export { Auth };
@@ -76,3 +77,4 @@ export { Fingerprinting };
76
77
  export { ShortLinks };
77
78
  export { AIUsage };
78
79
  export { MarketingAgencies };
80
+ export { TwitchReporting };
@@ -37,6 +37,7 @@ import { Fingerprinting } from "./api";
37
37
  import { ShortLinks } from "./api";
38
38
  import { AIUsage } from "./api";
39
39
  import { MarketingAgencies } from "./api";
40
+ import { TwitchReporting } from './api';
40
41
  import Requests from "./util/Requests";
41
42
  import Parser from "./util/Parser";
42
43
  import Session from "./util/Session";
@@ -95,6 +96,7 @@ declare class Glitch {
95
96
  ShortLinks: typeof ShortLinks;
96
97
  AIUsage: typeof AIUsage;
97
98
  MarketingAgencies: typeof MarketingAgencies;
99
+ TwitchReporting: typeof TwitchReporting;
98
100
  };
99
101
  static util: {
100
102
  Requests: typeof Requests;
package/dist/esm/index.js CHANGED
@@ -12000,6 +12000,7 @@ var CampaignsRoute = /** @class */ (function () {
12000
12000
  updateCustomRanking: { url: '/campaigns/{campaign_id}/sourcing/custom-ranking', method: HTTP_METHODS.PUT },
12001
12001
  updateCreatorBucket: { url: '/campaigns/{campaign_id}/sourcing/creators/{creator_id}/bucket', method: HTTP_METHODS.PUT },
12002
12002
  reRankSourcedCreators: { url: '/campaigns/{campaign_id}/sourcing/re-rank', method: HTTP_METHODS.POST },
12003
+ bulkEnrichSourcedCreators: { url: '/campaigns/{campaign_id}/sourcing/creators/bulk-enrich', method: HTTP_METHODS.POST },
12003
12004
  };
12004
12005
  return CampaignsRoute;
12005
12006
  }());
@@ -12833,6 +12834,18 @@ var Campaigns = /** @class */ (function () {
12833
12834
  Campaigns.reRankSourcedCreators = function (campaign_id, data) {
12834
12835
  return Requests.processRoute(CampaignsRoute.routes.reRankSourcedCreators, data, { campaign_id: campaign_id });
12835
12836
  };
12837
+ /**
12838
+ * Queue multiple sourced creators for profile enrichment.
12839
+ * This dispatches a background job for each creator to find their social media profiles and contact information.
12840
+ *
12841
+ * @param campaign_id The UUID of the campaign.
12842
+ * @param data An object containing the array of SourcedCreator IDs to enrich.
12843
+ * @param data.creator_ids An array of SourcedCreator UUIDs.
12844
+ * @returns A promise that resolves with a confirmation message and the count of queued jobs.
12845
+ */
12846
+ Campaigns.bulkEnrichSourcedCreators = function (campaign_id, data) {
12847
+ return Requests.processRoute(CampaignsRoute.routes.bulkEnrichSourcedCreators, data, { campaign_id: campaign_id });
12848
+ };
12836
12849
  return Campaigns;
12837
12850
  }());
12838
12851
 
@@ -15592,6 +15605,117 @@ var MarketingAgencies = /** @class */ (function () {
15592
15605
  return MarketingAgencies;
15593
15606
  }());
15594
15607
 
15608
+ var TwitchReportingRoute = /** @class */ (function () {
15609
+ function TwitchReportingRoute() {
15610
+ }
15611
+ TwitchReportingRoute.routes = {
15612
+ getCreatorCcvHistory: {
15613
+ url: '/reporting/twitch/streamers/{twitch_streamer_id}/ccv-history',
15614
+ method: HTTP_METHODS.GET
15615
+ },
15616
+ getGamesSummary: {
15617
+ url: '/reporting/twitch/games/summary',
15618
+ method: HTTP_METHODS.GET
15619
+ },
15620
+ getMostActiveStreamers: {
15621
+ url: '/reporting/twitch/streamers/most-active',
15622
+ method: HTTP_METHODS.GET
15623
+ },
15624
+ getMostActiveGames: {
15625
+ url: '/reporting/twitch/games/most-active',
15626
+ method: HTTP_METHODS.GET
15627
+ },
15628
+ getTopStreamers: {
15629
+ url: '/reporting/twitch/streamers/top',
15630
+ method: HTTP_METHODS.GET
15631
+ },
15632
+ getCreatorStreamingSchedule: {
15633
+ url: '/reporting/twitch/streamers/{twitch_streamer_id}/streaming-schedule',
15634
+ method: HTTP_METHODS.GET
15635
+ },
15636
+ };
15637
+ return TwitchReportingRoute;
15638
+ }());
15639
+
15640
+ var TwitchReporting = /** @class */ (function () {
15641
+ function TwitchReporting() {
15642
+ }
15643
+ /**
15644
+ * Get a streamer's Concurrent Viewership (CCV) history.
15645
+ *
15646
+ * @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getCreatorCcvHistory
15647
+ *
15648
+ * @param twitch_streamer_id The ID of the Twitch streamer.
15649
+ * @param params Optional query parameters for filtering (e.g., start_date, end_date, per_page).
15650
+ *
15651
+ * @returns promise
15652
+ */
15653
+ TwitchReporting.getCreatorCcvHistory = function (twitch_streamer_id, params) {
15654
+ return Requests.processRoute(TwitchReportingRoute.routes.getCreatorCcvHistory, undefined, { twitch_streamer_id: twitch_streamer_id }, params);
15655
+ };
15656
+ /**
15657
+ * Get a summary of game performance metrics.
15658
+ *
15659
+ * @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getGamesSummary
15660
+ *
15661
+ * @param params Optional query parameters for filtering and sorting (e.g., start_date, end_date, sort_by, limit).
15662
+ *
15663
+ * @returns promise
15664
+ */
15665
+ TwitchReporting.getGamesSummary = function (params) {
15666
+ return Requests.processRoute(TwitchReportingRoute.routes.getGamesSummary, undefined, undefined, params);
15667
+ };
15668
+ /**
15669
+ * Get most recently active streamers.
15670
+ *
15671
+ * @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getMostActiveStreamers
15672
+ *
15673
+ * @param params Optional query parameters (e.g., limit).
15674
+ *
15675
+ * @returns promise
15676
+ */
15677
+ TwitchReporting.getMostActiveStreamers = function (params) {
15678
+ return Requests.processRoute(TwitchReportingRoute.routes.getMostActiveStreamers, undefined, undefined, params);
15679
+ };
15680
+ /**
15681
+ * Get most recently streamed games.
15682
+ *
15683
+ * @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getMostActiveGames
15684
+ *
15685
+ * @param params Optional query parameters (e.g., limit).
15686
+ *
15687
+ * @returns promise
15688
+ */
15689
+ TwitchReporting.getMostActiveGames = function (params) {
15690
+ return Requests.processRoute(TwitchReportingRoute.routes.getMostActiveGames, undefined, undefined, params);
15691
+ };
15692
+ /**
15693
+ * Get top streamers by performance (average or peak CCV).
15694
+ *
15695
+ * @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getTopStreamers
15696
+ *
15697
+ * @param params Optional query parameters for filtering and sorting (e.g., sort_by, start_date, limit).
15698
+ *
15699
+ * @returns promise
15700
+ */
15701
+ TwitchReporting.getTopStreamers = function (params) {
15702
+ return Requests.processRoute(TwitchReportingRoute.routes.getTopStreamers, undefined, undefined, params);
15703
+ };
15704
+ /**
15705
+ * Get a streamer's typical streaming schedule as a heatmap.
15706
+ *
15707
+ * @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getCreatorStreamingSchedule
15708
+ *
15709
+ * @param twitch_streamer_id The ID of the Twitch streamer.
15710
+ *
15711
+ * @returns promise
15712
+ */
15713
+ TwitchReporting.getCreatorStreamingSchedule = function (twitch_streamer_id) {
15714
+ return Requests.processRoute(TwitchReportingRoute.routes.getCreatorStreamingSchedule, undefined, { twitch_streamer_id: twitch_streamer_id });
15715
+ };
15716
+ return TwitchReporting;
15717
+ }());
15718
+
15595
15719
  var Parser = /** @class */ (function () {
15596
15720
  function Parser() {
15597
15721
  }
@@ -16118,7 +16242,8 @@ var Glitch = /** @class */ (function () {
16118
16242
  Fingerprinting: Fingerprinting,
16119
16243
  ShortLinks: ShortLinks,
16120
16244
  AIUsage: AIUsage,
16121
- MarketingAgencies: MarketingAgencies
16245
+ MarketingAgencies: MarketingAgencies,
16246
+ TwitchReporting: TwitchReporting,
16122
16247
  };
16123
16248
  Glitch.util = {
16124
16249
  Requests: Requests,