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
package/dist/index.d.ts
CHANGED
|
@@ -4440,6 +4440,17 @@ declare class Campaigns {
|
|
|
4440
4440
|
static assignKeyToInfluencer<T>(campaign_id: string, user_id: string, data: {
|
|
4441
4441
|
platform: string;
|
|
4442
4442
|
}, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4443
|
+
/**
|
|
4444
|
+
* Manually trigger a real-time profile enrichment for a sourced creator.
|
|
4445
|
+
* This synchronously scrapes and parses social media profiles to enrich the creator's data and returns the updated record.
|
|
4446
|
+
*
|
|
4447
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns%20Sourcing/enrichSourcedCreator
|
|
4448
|
+
*
|
|
4449
|
+
* @param campaign_id The UUID of the campaign.
|
|
4450
|
+
* @param sourced_creator_id The UUID of the sourced creator to enrich.
|
|
4451
|
+
* @returns promise containing the fully enriched SourcedCreator object.
|
|
4452
|
+
*/
|
|
4453
|
+
static enrichSourcedCreator<T>(campaign_id: string, sourced_creator_id: string): AxiosPromise<Response<T>>;
|
|
4443
4454
|
}
|
|
4444
4455
|
|
|
4445
4456
|
declare class Subscriptions {
|
|
@@ -5856,6 +5867,23 @@ declare class WebsiteAnalytics {
|
|
|
5856
5867
|
* @returns Promise with UTM performance data
|
|
5857
5868
|
*/
|
|
5858
5869
|
static utmPerformance<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
5870
|
+
/**
|
|
5871
|
+
* Get a combined user journey across short link clicks, web sessions, game installations, etc.
|
|
5872
|
+
*
|
|
5873
|
+
* @param params Filtering options. All are optional except `title_id`.
|
|
5874
|
+
* - title_id: string Required. The UUID of the title to unify user events.
|
|
5875
|
+
* - device_id?: string Filter by device ID
|
|
5876
|
+
* - session_id?: string Filter by session ID
|
|
5877
|
+
* - short_link_click_id?: string Filter by short link click ID
|
|
5878
|
+
* - user_install_id?: string Filter by game install user_install_id
|
|
5879
|
+
* - browser_fingerprint?: string Filter by browser fingerprint hash
|
|
5880
|
+
* - hardware_fingerprint?: string Filter by hardware fingerprint hash
|
|
5881
|
+
* - start_date?: string Optional. Start date (YYYY-MM-DD) if your API supports time limiting
|
|
5882
|
+
* - end_date?: string Optional. End date (YYYY-MM-DD) if your API supports time limiting
|
|
5883
|
+
*
|
|
5884
|
+
* @returns Promise with a unified timeline of the user’s journey, in chronological order.
|
|
5885
|
+
*/
|
|
5886
|
+
static userJourney<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
5859
5887
|
}
|
|
5860
5888
|
|
|
5861
5889
|
declare class ShortLinks {
|
package/package.json
CHANGED
package/src/api/Campaigns.ts
CHANGED
|
@@ -862,6 +862,21 @@ class Campaigns {
|
|
|
862
862
|
public static assignKeyToInfluencer<T>(campaign_id: string, user_id: string, data: { platform: string }, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
863
863
|
return Requests.processRoute(CampaignsRoute.routes.assignKeyToInfluencer, data, { campaign_id, user_id }, params);
|
|
864
864
|
}
|
|
865
|
+
|
|
866
|
+
/**
|
|
867
|
+
* Manually trigger a real-time profile enrichment for a sourced creator.
|
|
868
|
+
* This synchronously scrapes and parses social media profiles to enrich the creator's data and returns the updated record.
|
|
869
|
+
*
|
|
870
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns%20Sourcing/enrichSourcedCreator
|
|
871
|
+
*
|
|
872
|
+
* @param campaign_id The UUID of the campaign.
|
|
873
|
+
* @param sourced_creator_id The UUID of the sourced creator to enrich.
|
|
874
|
+
* @returns promise containing the fully enriched SourcedCreator object.
|
|
875
|
+
*/
|
|
876
|
+
public static enrichSourcedCreator<T>(campaign_id: string, sourced_creator_id: string): AxiosPromise<Response<T>> {
|
|
877
|
+
return Requests.processRoute(CampaignsRoute.routes.enrichSourcedCreator, {}, { campaign_id, sourced_creator_id });
|
|
878
|
+
}
|
|
879
|
+
|
|
865
880
|
}
|
|
866
881
|
|
|
867
882
|
export default Campaigns;
|
|
@@ -303,6 +303,31 @@ class WebsiteAnalytics {
|
|
|
303
303
|
params
|
|
304
304
|
);
|
|
305
305
|
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Get a combined user journey across short link clicks, web sessions, game installations, etc.
|
|
309
|
+
*
|
|
310
|
+
* @param params Filtering options. All are optional except `title_id`.
|
|
311
|
+
* - title_id: string Required. The UUID of the title to unify user events.
|
|
312
|
+
* - device_id?: string Filter by device ID
|
|
313
|
+
* - session_id?: string Filter by session ID
|
|
314
|
+
* - short_link_click_id?: string Filter by short link click ID
|
|
315
|
+
* - user_install_id?: string Filter by game install user_install_id
|
|
316
|
+
* - browser_fingerprint?: string Filter by browser fingerprint hash
|
|
317
|
+
* - hardware_fingerprint?: string Filter by hardware fingerprint hash
|
|
318
|
+
* - start_date?: string Optional. Start date (YYYY-MM-DD) if your API supports time limiting
|
|
319
|
+
* - end_date?: string Optional. End date (YYYY-MM-DD) if your API supports time limiting
|
|
320
|
+
*
|
|
321
|
+
* @returns Promise with a unified timeline of the user’s journey, in chronological order.
|
|
322
|
+
*/
|
|
323
|
+
public static userJourney<T>(params: Record<string, any>): AxiosPromise<Response<T>> {
|
|
324
|
+
return Requests.processRoute(
|
|
325
|
+
WebsiteAnalyticsRoute.routes.journey, // references our new route definition
|
|
326
|
+
{}, // no body data (GET request)
|
|
327
|
+
undefined,
|
|
328
|
+
params
|
|
329
|
+
);
|
|
330
|
+
}
|
|
306
331
|
}
|
|
307
332
|
|
|
308
333
|
export default WebsiteAnalytics;
|
|
@@ -70,6 +70,7 @@ class CampaignsRoute {
|
|
|
70
70
|
getSourcedCreator: { url: '/campaigns/{campaign_id}/sourcing/creators/{sourced_creator_id}', method: HTTP_METHODS.GET },
|
|
71
71
|
updateSourcedCreator: { url: '/campaigns/{campaign_id}/sourcing/creators/{sourced_creator_id}', method: HTTP_METHODS.PUT },
|
|
72
72
|
assignKeyToInfluencer: { url: '/campaigns/{campaign_id}/influencers/{user_id}/assign-key', method: HTTP_METHODS.POST },
|
|
73
|
+
enrichSourcedCreator: { url: '/campaigns/{campaign_id}/sourcing/creators/{sourced_creator_id}/enrich', method: HTTP_METHODS.POST },
|
|
73
74
|
|
|
74
75
|
|
|
75
76
|
};
|