glitch-javascript-sdk 2.0.5 → 2.0.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.
- package/dist/cjs/index.js +39 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Campaigns.d.ts +11 -0
- package/dist/esm/api/WebsiteAnalytics.d.ts +17 -0
- package/dist/esm/index.js +39 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +28 -0
- package/package.json +1 -1
- package/src/api/Campaigns.ts +15 -0
- package/src/api/WebsiteAnalytics.ts +25 -0
- package/src/routes/CampaignsRoute.ts +1 -0
- package/src/routes/WebsiteAnalyticsRoute.ts +5 -0
|
@@ -610,5 +610,16 @@ declare class Campaigns {
|
|
|
610
610
|
static assignKeyToInfluencer<T>(campaign_id: string, user_id: string, data: {
|
|
611
611
|
platform: string;
|
|
612
612
|
}, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
613
|
+
/**
|
|
614
|
+
* Manually trigger a real-time profile enrichment for a sourced creator.
|
|
615
|
+
* This synchronously scrapes and parses social media profiles to enrich the creator's data and returns the updated record.
|
|
616
|
+
*
|
|
617
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns%20Sourcing/enrichSourcedCreator
|
|
618
|
+
*
|
|
619
|
+
* @param campaign_id The UUID of the campaign.
|
|
620
|
+
* @param sourced_creator_id The UUID of the sourced creator to enrich.
|
|
621
|
+
* @returns promise containing the fully enriched SourcedCreator object.
|
|
622
|
+
*/
|
|
623
|
+
static enrichSourcedCreator<T>(campaign_id: string, sourced_creator_id: string): AxiosPromise<Response<T>>;
|
|
613
624
|
}
|
|
614
625
|
export default Campaigns;
|
|
@@ -183,5 +183,22 @@ declare class WebsiteAnalytics {
|
|
|
183
183
|
* @returns Promise with UTM performance data
|
|
184
184
|
*/
|
|
185
185
|
static utmPerformance<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
186
|
+
/**
|
|
187
|
+
* Get a combined user journey across short link clicks, web sessions, game installations, etc.
|
|
188
|
+
*
|
|
189
|
+
* @param params Filtering options. All are optional except `title_id`.
|
|
190
|
+
* - title_id: string Required. The UUID of the title to unify user events.
|
|
191
|
+
* - device_id?: string Filter by device ID
|
|
192
|
+
* - session_id?: string Filter by session ID
|
|
193
|
+
* - short_link_click_id?: string Filter by short link click ID
|
|
194
|
+
* - user_install_id?: string Filter by game install user_install_id
|
|
195
|
+
* - browser_fingerprint?: string Filter by browser fingerprint hash
|
|
196
|
+
* - hardware_fingerprint?: string Filter by hardware fingerprint hash
|
|
197
|
+
* - start_date?: string Optional. Start date (YYYY-MM-DD) if your API supports time limiting
|
|
198
|
+
* - end_date?: string Optional. End date (YYYY-MM-DD) if your API supports time limiting
|
|
199
|
+
*
|
|
200
|
+
* @returns Promise with a unified timeline of the user’s journey, in chronological order.
|
|
201
|
+
*/
|
|
202
|
+
static userJourney<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
186
203
|
}
|
|
187
204
|
export default WebsiteAnalytics;
|
package/dist/esm/index.js
CHANGED
|
@@ -11717,6 +11717,7 @@ var CampaignsRoute = /** @class */ (function () {
|
|
|
11717
11717
|
getSourcedCreator: { url: '/campaigns/{campaign_id}/sourcing/creators/{sourced_creator_id}', method: HTTP_METHODS.GET },
|
|
11718
11718
|
updateSourcedCreator: { url: '/campaigns/{campaign_id}/sourcing/creators/{sourced_creator_id}', method: HTTP_METHODS.PUT },
|
|
11719
11719
|
assignKeyToInfluencer: { url: '/campaigns/{campaign_id}/influencers/{user_id}/assign-key', method: HTTP_METHODS.POST },
|
|
11720
|
+
enrichSourcedCreator: { url: '/campaigns/{campaign_id}/sourcing/creators/{sourced_creator_id}/enrich', method: HTTP_METHODS.POST },
|
|
11720
11721
|
};
|
|
11721
11722
|
return CampaignsRoute;
|
|
11722
11723
|
}());
|
|
@@ -12463,6 +12464,19 @@ var Campaigns = /** @class */ (function () {
|
|
|
12463
12464
|
Campaigns.assignKeyToInfluencer = function (campaign_id, user_id, data, params) {
|
|
12464
12465
|
return Requests.processRoute(CampaignsRoute.routes.assignKeyToInfluencer, data, { campaign_id: campaign_id, user_id: user_id }, params);
|
|
12465
12466
|
};
|
|
12467
|
+
/**
|
|
12468
|
+
* Manually trigger a real-time profile enrichment for a sourced creator.
|
|
12469
|
+
* This synchronously scrapes and parses social media profiles to enrich the creator's data and returns the updated record.
|
|
12470
|
+
*
|
|
12471
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns%20Sourcing/enrichSourcedCreator
|
|
12472
|
+
*
|
|
12473
|
+
* @param campaign_id The UUID of the campaign.
|
|
12474
|
+
* @param sourced_creator_id The UUID of the sourced creator to enrich.
|
|
12475
|
+
* @returns promise containing the fully enriched SourcedCreator object.
|
|
12476
|
+
*/
|
|
12477
|
+
Campaigns.enrichSourcedCreator = function (campaign_id, sourced_creator_id) {
|
|
12478
|
+
return Requests.processRoute(CampaignsRoute.routes.enrichSourcedCreator, {}, { campaign_id: campaign_id, sourced_creator_id: sourced_creator_id });
|
|
12479
|
+
};
|
|
12466
12480
|
return Campaigns;
|
|
12467
12481
|
}());
|
|
12468
12482
|
|
|
@@ -14419,6 +14433,10 @@ var WebsiteAnalyticsRoute = /** @class */ (function () {
|
|
|
14419
14433
|
utmPerformance: {
|
|
14420
14434
|
url: '/analytics/utm-performance',
|
|
14421
14435
|
method: HTTP_METHODS.GET
|
|
14436
|
+
},
|
|
14437
|
+
journey: {
|
|
14438
|
+
url: '/analytics/journey',
|
|
14439
|
+
method: HTTP_METHODS.GET
|
|
14422
14440
|
}
|
|
14423
14441
|
};
|
|
14424
14442
|
return WebsiteAnalyticsRoute;
|
|
@@ -14639,6 +14657,27 @@ var WebsiteAnalytics = /** @class */ (function () {
|
|
|
14639
14657
|
WebsiteAnalytics.utmPerformance = function (params) {
|
|
14640
14658
|
return Requests.processRoute(WebsiteAnalyticsRoute.routes.utmPerformance, {}, undefined, params);
|
|
14641
14659
|
};
|
|
14660
|
+
/**
|
|
14661
|
+
* Get a combined user journey across short link clicks, web sessions, game installations, etc.
|
|
14662
|
+
*
|
|
14663
|
+
* @param params Filtering options. All are optional except `title_id`.
|
|
14664
|
+
* - title_id: string Required. The UUID of the title to unify user events.
|
|
14665
|
+
* - device_id?: string Filter by device ID
|
|
14666
|
+
* - session_id?: string Filter by session ID
|
|
14667
|
+
* - short_link_click_id?: string Filter by short link click ID
|
|
14668
|
+
* - user_install_id?: string Filter by game install user_install_id
|
|
14669
|
+
* - browser_fingerprint?: string Filter by browser fingerprint hash
|
|
14670
|
+
* - hardware_fingerprint?: string Filter by hardware fingerprint hash
|
|
14671
|
+
* - start_date?: string Optional. Start date (YYYY-MM-DD) if your API supports time limiting
|
|
14672
|
+
* - end_date?: string Optional. End date (YYYY-MM-DD) if your API supports time limiting
|
|
14673
|
+
*
|
|
14674
|
+
* @returns Promise with a unified timeline of the user’s journey, in chronological order.
|
|
14675
|
+
*/
|
|
14676
|
+
WebsiteAnalytics.userJourney = function (params) {
|
|
14677
|
+
return Requests.processRoute(WebsiteAnalyticsRoute.routes.journey, // references our new route definition
|
|
14678
|
+
{}, // no body data (GET request)
|
|
14679
|
+
undefined, params);
|
|
14680
|
+
};
|
|
14642
14681
|
return WebsiteAnalytics;
|
|
14643
14682
|
}());
|
|
14644
14683
|
|