glitch-javascript-sdk 1.1.1 → 1.1.3
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 +24 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Campaigns.d.ts +18 -0
- package/dist/esm/index.js +24 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +18 -0
- package/package.json +1 -1
- package/src/api/Campaigns.ts +26 -0
- package/src/routes/CampaignsRoute.ts +3 -1
package/dist/index.d.ts
CHANGED
|
@@ -2798,6 +2798,16 @@ declare class Campaigns {
|
|
|
2798
2798
|
* @returns promise
|
|
2799
2799
|
*/
|
|
2800
2800
|
static updateInfluencerInvite<T>(campaign_id: string, influencer_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2801
|
+
/**
|
|
2802
|
+
* Updates the influencer invite compenstation information.
|
|
2803
|
+
*
|
|
2804
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/updateInfluencerCompensationInvite
|
|
2805
|
+
*
|
|
2806
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
2807
|
+
*
|
|
2808
|
+
* @returns promise
|
|
2809
|
+
*/
|
|
2810
|
+
static updateInfluencerCompensationInvite<T>(campaign_id: string, influencer_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2801
2811
|
/**
|
|
2802
2812
|
* The route for an influencer to accept an invite.
|
|
2803
2813
|
*
|
|
@@ -2868,6 +2878,14 @@ declare class Campaigns {
|
|
|
2868
2878
|
* @returns promise
|
|
2869
2879
|
*/
|
|
2870
2880
|
static generateContentForInfluencer<T>(campaign_id: string, user_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2881
|
+
/**
|
|
2882
|
+
* Get a list of all active campaigns.
|
|
2883
|
+
*
|
|
2884
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/getActiveCampaignLinks
|
|
2885
|
+
*
|
|
2886
|
+
* @returns promise
|
|
2887
|
+
*/
|
|
2888
|
+
static getActiveCampaignLinks<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2871
2889
|
}
|
|
2872
2890
|
|
|
2873
2891
|
declare class Subscriptions {
|
package/package.json
CHANGED
package/src/api/Campaigns.ts
CHANGED
|
@@ -532,6 +532,21 @@ class Campaigns {
|
|
|
532
532
|
return Requests.processRoute(CampaignsRoute.routes.updateInfluencerInvite, data, { campaign_id: campaign_id, influencer_id: influencer_id }, params);
|
|
533
533
|
}
|
|
534
534
|
|
|
535
|
+
/**
|
|
536
|
+
* Updates the influencer invite compenstation information.
|
|
537
|
+
*
|
|
538
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/updateInfluencerCompensationInvite
|
|
539
|
+
*
|
|
540
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
541
|
+
*
|
|
542
|
+
* @returns promise
|
|
543
|
+
*/
|
|
544
|
+
public static updateInfluencerCompensationInvite<T>(campaign_id: string,influencer_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
return Requests.processRoute(CampaignsRoute.routes.updateInfluencerCompensationInvite, data, { campaign_id: campaign_id, influencer_id: influencer_id }, params);
|
|
548
|
+
}
|
|
549
|
+
|
|
535
550
|
/**
|
|
536
551
|
* The route for an influencer to accept an invite.
|
|
537
552
|
*
|
|
@@ -630,6 +645,17 @@ class Campaigns {
|
|
|
630
645
|
return Requests.processRoute(CampaignsRoute.routes.generateContentForInfluencer, data, { campaign_id: campaign_id, user_id: user_id }, params);
|
|
631
646
|
}
|
|
632
647
|
|
|
648
|
+
/**
|
|
649
|
+
* Get a list of all active campaigns.
|
|
650
|
+
*
|
|
651
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/getActiveCampaignLinks
|
|
652
|
+
*
|
|
653
|
+
* @returns promise
|
|
654
|
+
*/
|
|
655
|
+
public static getActiveCampaignLinks<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
656
|
+
return Requests.processRoute(CampaignsRoute.routes.getActiveCampaignLinks, undefined, undefined, params);
|
|
657
|
+
}
|
|
658
|
+
|
|
633
659
|
|
|
634
660
|
}
|
|
635
661
|
|
|
@@ -41,6 +41,7 @@ class CampaignsRoute {
|
|
|
41
41
|
inviteInfluencer : { url: '/campaigns/{campaign_id}/influencers/invites', method: HTTP_METHODS.POST },
|
|
42
42
|
viewInfluencerInvite : { url: '/campaigns/{campaign_id}/influencers/invites/{influencer_id}', method: HTTP_METHODS.GET },
|
|
43
43
|
updateInfluencerInvite : { url: '/campaigns/{campaign_id}/influencers/invites/{influencer_id}', method: HTTP_METHODS.PUT },
|
|
44
|
+
updateInfluencerCompensationInvite : { url: '/campaigns/{campaign_id}/influencers/invites/{influencer_id}/compensation', method: HTTP_METHODS.PUT },
|
|
44
45
|
listInfluencerInvites : { url: '/campaigns/{campaign_id}/influencers/invites', method: HTTP_METHODS.GET },
|
|
45
46
|
sendInfluencerInvite : { url: '/campaigns/{campaign_id}/influencers/invites', method: HTTP_METHODS.POST },
|
|
46
47
|
acceptInfluencerInvite : { url: '/campaigns/{campaign_id}/influencers/invites/{influencer_id}/accept', method: HTTP_METHODS.POST },
|
|
@@ -50,7 +51,8 @@ class CampaignsRoute {
|
|
|
50
51
|
declineInfluencerRequest : { url: '/campaigns/{campaign_id}/influencers/{user_id}/deny', method: HTTP_METHODS.POST },
|
|
51
52
|
reviewInfluencerRequest : { url: '/campaigns/{campaign_id}/influencers/{user_id}/review', method: HTTP_METHODS.POST },
|
|
52
53
|
getRecommendedInfluencers : { url: '/campaigns/{campaign_id}/recommendInfluencers', method: HTTP_METHODS.GET },
|
|
53
|
-
generateContentForInfluencer : { url: '/campaigns/{campaign_id}/influencers/{user_id}/generatePostContent', method: HTTP_METHODS.POST },
|
|
54
|
+
generateContentForInfluencer : { url: '/campaigns/{campaign_id}/influencers/{user_id}/generatePostContent', method: HTTP_METHODS.POST },
|
|
55
|
+
getActiveCampaignLinks : { url: '/campaigns/active', method: HTTP_METHODS.GET },
|
|
54
56
|
};
|
|
55
57
|
|
|
56
58
|
}
|