glitch-javascript-sdk 1.1.2 → 1.1.4
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 +25 -0
- package/src/routes/CampaignsRoute.ts +3 -1
package/dist/index.d.ts
CHANGED
|
@@ -2839,6 +2839,16 @@ declare class Campaigns {
|
|
|
2839
2839
|
*/
|
|
2840
2840
|
static widthdrawInfluencerInvite<T>(campaign_id: string, influencer_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2841
2841
|
/**
|
|
2842
|
+
* The route to mark an influencer reachout and finished, and it will no longer send reachouts.
|
|
2843
|
+
*
|
|
2844
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/finishInfluencerInvite
|
|
2845
|
+
*
|
|
2846
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
2847
|
+
*
|
|
2848
|
+
* @returns promise
|
|
2849
|
+
*/
|
|
2850
|
+
static finishInfluencerInvite<T>(campaign_id: string, influencer_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2851
|
+
/**
|
|
2842
2852
|
* The route to accept an influnecers request to join the campaign.
|
|
2843
2853
|
*
|
|
2844
2854
|
* @see https://api.glitch.fun/api/documentation#/Campaigns/acceptInfluencer
|
|
@@ -2878,6 +2888,14 @@ declare class Campaigns {
|
|
|
2878
2888
|
* @returns promise
|
|
2879
2889
|
*/
|
|
2880
2890
|
static generateContentForInfluencer<T>(campaign_id: string, user_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2891
|
+
/**
|
|
2892
|
+
* Get a list of all active campaigns.
|
|
2893
|
+
*
|
|
2894
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/getActiveCampaignLinks
|
|
2895
|
+
*
|
|
2896
|
+
* @returns promise
|
|
2897
|
+
*/
|
|
2898
|
+
static getActiveCampaignLinks<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2881
2899
|
}
|
|
2882
2900
|
|
|
2883
2901
|
declare class Subscriptions {
|
package/package.json
CHANGED
package/src/api/Campaigns.ts
CHANGED
|
@@ -589,6 +589,20 @@ class Campaigns {
|
|
|
589
589
|
return Requests.processRoute(CampaignsRoute.routes.widthdrawInfluencerInvite, data, { campaign_id: campaign_id, influencer_id: influencer_id }, params);
|
|
590
590
|
}
|
|
591
591
|
|
|
592
|
+
/**
|
|
593
|
+
* The route to mark an influencer reachout and finished, and it will no longer send reachouts.
|
|
594
|
+
*
|
|
595
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/finishInfluencerInvite
|
|
596
|
+
*
|
|
597
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
598
|
+
*
|
|
599
|
+
* @returns promise
|
|
600
|
+
*/
|
|
601
|
+
public static finishInfluencerInvite<T>(campaign_id: string, influencer_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
602
|
+
|
|
603
|
+
return Requests.processRoute(CampaignsRoute.routes.finishInfluencerInvite, data, { campaign_id: campaign_id, influencer_id: influencer_id }, params);
|
|
604
|
+
}
|
|
605
|
+
|
|
592
606
|
/**
|
|
593
607
|
* The route to accept an influnecers request to join the campaign.
|
|
594
608
|
*
|
|
@@ -645,6 +659,17 @@ class Campaigns {
|
|
|
645
659
|
return Requests.processRoute(CampaignsRoute.routes.generateContentForInfluencer, data, { campaign_id: campaign_id, user_id: user_id }, params);
|
|
646
660
|
}
|
|
647
661
|
|
|
662
|
+
/**
|
|
663
|
+
* Get a list of all active campaigns.
|
|
664
|
+
*
|
|
665
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/getActiveCampaignLinks
|
|
666
|
+
*
|
|
667
|
+
* @returns promise
|
|
668
|
+
*/
|
|
669
|
+
public static getActiveCampaignLinks<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
670
|
+
return Requests.processRoute(CampaignsRoute.routes.getActiveCampaignLinks, undefined, undefined, params);
|
|
671
|
+
}
|
|
672
|
+
|
|
648
673
|
|
|
649
674
|
}
|
|
650
675
|
|
|
@@ -47,11 +47,13 @@ class CampaignsRoute {
|
|
|
47
47
|
acceptInfluencerInvite : { url: '/campaigns/{campaign_id}/influencers/invites/{influencer_id}/accept', method: HTTP_METHODS.POST },
|
|
48
48
|
declineInfluencerInvite : { url: '/campaigns/{campaign_id}/influencers/invites/{influencer_id}/decline', method: HTTP_METHODS.POST },
|
|
49
49
|
widthdrawInfluencerInvite : { url: '/campaigns/{campaign_id}/influencers/invites/{influencer_id}/withdraw', method: HTTP_METHODS.POST },
|
|
50
|
+
finishInfluencerInvite : { url: '/campaigns/{campaign_id}/influencers/invites/{influencer_id}/finish', method: HTTP_METHODS.POST },
|
|
50
51
|
acceptInfluencerRequest : { url: '/campaigns/{campaign_id}/influencers/{user_id}/accept', method: HTTP_METHODS.POST },
|
|
51
52
|
declineInfluencerRequest : { url: '/campaigns/{campaign_id}/influencers/{user_id}/deny', method: HTTP_METHODS.POST },
|
|
52
53
|
reviewInfluencerRequest : { url: '/campaigns/{campaign_id}/influencers/{user_id}/review', method: HTTP_METHODS.POST },
|
|
53
54
|
getRecommendedInfluencers : { url: '/campaigns/{campaign_id}/recommendInfluencers', method: HTTP_METHODS.GET },
|
|
54
|
-
generateContentForInfluencer : { url: '/campaigns/{campaign_id}/influencers/{user_id}/generatePostContent', method: HTTP_METHODS.POST },
|
|
55
|
+
generateContentForInfluencer : { url: '/campaigns/{campaign_id}/influencers/{user_id}/generatePostContent', method: HTTP_METHODS.POST },
|
|
56
|
+
getActiveCampaignLinks : { url: '/campaigns/active', method: HTTP_METHODS.GET },
|
|
55
57
|
};
|
|
56
58
|
|
|
57
59
|
}
|