glitch-javascript-sdk 2.7.6 → 2.7.8
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 +57 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Campaigns.d.ts +10 -0
- package/dist/esm/api/Communities.d.ts +14 -0
- package/dist/esm/api/Games.d.ts +50 -0
- package/dist/esm/index.js +57 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +74 -0
- package/package.json +1 -1
- package/src/api/Campaigns.ts +20 -11
- package/src/api/Communities.ts +20 -0
- package/src/api/Games.ts +77 -11
- package/src/routes/CampaignsRoute.ts +2 -0
- package/src/routes/CommunitiesRoute.ts +6 -3
- package/src/routes/GamesRoutes.ts +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -21069,6 +21069,8 @@ var CommunitiesRoute = /** @class */ (function () {
|
|
|
21069
21069
|
url: '/communities/{community_id}/payment/statement',
|
|
21070
21070
|
method: HTTP_METHODS.GET
|
|
21071
21071
|
},
|
|
21072
|
+
listSavedInfluencers: { url: '/communities/{community_id}/influencers', method: HTTP_METHODS.GET },
|
|
21073
|
+
saveInfluencerToPool: { url: '/communities/{community_id}/influencers', method: HTTP_METHODS.POST }
|
|
21072
21074
|
};
|
|
21073
21075
|
return CommunitiesRoute;
|
|
21074
21076
|
}());
|
|
@@ -21895,6 +21897,24 @@ var Communities = /** @class */ (function () {
|
|
|
21895
21897
|
Communities.listInvoices = function (community_id) {
|
|
21896
21898
|
return Requests.processRoute(CommunitiesRoute.routes.listInvoices, undefined, { community_id: community_id });
|
|
21897
21899
|
};
|
|
21900
|
+
/**
|
|
21901
|
+
* List influencers saved to the community's private talent pool.
|
|
21902
|
+
*
|
|
21903
|
+
* @param community_id The UUID of the community.
|
|
21904
|
+
* @param params Optional filters like 'list_name'.
|
|
21905
|
+
*/
|
|
21906
|
+
Communities.listSavedInfluencers = function (community_id, params) {
|
|
21907
|
+
return Requests.processRoute(CommunitiesRoute.routes.listSavedInfluencers, undefined, { community_id: community_id }, params);
|
|
21908
|
+
};
|
|
21909
|
+
/**
|
|
21910
|
+
* Save an influencer to the community's talent pool (Shortlist).
|
|
21911
|
+
*
|
|
21912
|
+
* @param community_id The UUID of the community.
|
|
21913
|
+
* @param data { influencer_id: string, list_name?: string, tags?: string[] }
|
|
21914
|
+
*/
|
|
21915
|
+
Communities.saveInfluencerToPool = function (community_id, data) {
|
|
21916
|
+
return Requests.processRoute(CommunitiesRoute.routes.saveInfluencerToPool, data, { community_id: community_id });
|
|
21917
|
+
};
|
|
21898
21918
|
return Communities;
|
|
21899
21919
|
}());
|
|
21900
21920
|
|
|
@@ -25582,6 +25602,7 @@ var CampaignsRoute = /** @class */ (function () {
|
|
|
25582
25602
|
method: HTTP_METHODS.POST
|
|
25583
25603
|
},
|
|
25584
25604
|
sendOnboarding: { url: '/campaigns/{campaign_id}/influencers/{user_id}/onboarding', method: HTTP_METHODS.POST },
|
|
25605
|
+
crossPromote: { url: '/campaigns/{campaign_id}/cross-promote', method: HTTP_METHODS.POST },
|
|
25585
25606
|
};
|
|
25586
25607
|
return CampaignsRoute;
|
|
25587
25608
|
}());
|
|
@@ -26489,6 +26510,15 @@ var Campaigns = /** @class */ (function () {
|
|
|
26489
26510
|
Campaigns.sendOnboarding = function (campaign_id, user_id, data) {
|
|
26490
26511
|
return Requests.processRoute(CampaignsRoute.routes.sendOnboarding, data, { campaign_id: campaign_id, user_id: user_id });
|
|
26491
26512
|
};
|
|
26513
|
+
/**
|
|
26514
|
+
* Bulk invite influencers from a previous campaign into the current one.
|
|
26515
|
+
*
|
|
26516
|
+
* @param campaign_id The UUID of the target campaign.
|
|
26517
|
+
* @param data { source_campaign_id: string, only_successful: boolean }
|
|
26518
|
+
*/
|
|
26519
|
+
Campaigns.crossPromote = function (campaign_id, data) {
|
|
26520
|
+
return Requests.processRoute(CampaignsRoute.routes.crossPromote, data, { campaign_id: campaign_id });
|
|
26521
|
+
};
|
|
26492
26522
|
return Campaigns;
|
|
26493
26523
|
}());
|
|
26494
26524
|
|
|
@@ -26909,6 +26939,7 @@ var GamesRoutes = /** @class */ (function () {
|
|
|
26909
26939
|
createCampaignWithTitle: { url: '/games/{game_id}/generateCampaignWithTitle', method: HTTP_METHODS.POST },
|
|
26910
26940
|
createGameTitle: { url: '/games/{game_id}/generateTitle', method: HTTP_METHODS.POST },
|
|
26911
26941
|
createGameScheduler: { url: '/games/{game_id}/generateScheduler', method: HTTP_METHODS.POST },
|
|
26942
|
+
releaseStats: { url: '/games/release-stats', method: HTTP_METHODS.GET },
|
|
26912
26943
|
};
|
|
26913
26944
|
return GamesRoutes;
|
|
26914
26945
|
}());
|
|
@@ -26974,6 +27005,32 @@ var Games = /** @class */ (function () {
|
|
|
26974
27005
|
Games.createGameScheduler = function (game_id, data, params) {
|
|
26975
27006
|
return Requests.processRoute(GamesRoutes.routes.createGameScheduler, data, { game_id: game_id }, params);
|
|
26976
27007
|
};
|
|
27008
|
+
/**
|
|
27009
|
+
* Get release competition statistics and Steam danger zones.
|
|
27010
|
+
*
|
|
27011
|
+
* This tool analyzes the 'ExternalGames' database to show how many other games
|
|
27012
|
+
* are releasing around a specific date. It also overlays hard-coded Steam events
|
|
27013
|
+
* like NextFest and Seasonal Sales.
|
|
27014
|
+
*
|
|
27015
|
+
* @see https://api.glitch.fun/api/documentation#/ExternalGames/getReleaseStats
|
|
27016
|
+
*
|
|
27017
|
+
* @param params Filtering options:
|
|
27018
|
+
* - precision: 'day' | 'month' | 'year' (Default: 'day'). Use 'month' for long-term planning.
|
|
27019
|
+
* - start_date: 'YYYY-MM-DD'. The date to begin the analysis from.
|
|
27020
|
+
*
|
|
27021
|
+
* @returns AxiosPromise<Response<ReleaseStatsResponse>>
|
|
27022
|
+
*
|
|
27023
|
+
* @example
|
|
27024
|
+
* Games.getReleaseStats({ precision: 'day', start_date: '2025-06-01' })
|
|
27025
|
+
* .then(res => console.log(res.data.data));
|
|
27026
|
+
*/
|
|
27027
|
+
Games.getReleaseStats = function (params) {
|
|
27028
|
+
// Defensive check: ensure precision is valid if provided
|
|
27029
|
+
if ((params === null || params === void 0 ? void 0 : params.precision) && !['day', 'month', 'year'].includes(params.precision)) {
|
|
27030
|
+
console.warn("Invalid precision '".concat(params.precision, "' passed to getReleaseStats. Defaulting to 'day'."));
|
|
27031
|
+
}
|
|
27032
|
+
return Requests.processRoute(GamesRoutes.routes.releaseStats, undefined, undefined, params);
|
|
27033
|
+
};
|
|
26977
27034
|
return Games;
|
|
26978
27035
|
}());
|
|
26979
27036
|
|