glitch-javascript-sdk 1.2.1 → 1.2.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 +14 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Campaigns.d.ts +10 -0
- package/dist/esm/index.js +14 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +10 -0
- package/package.json +1 -1
- package/src/api/Campaigns.ts +14 -0
- package/src/api/Communities.ts +1 -1
- package/src/routes/CampaignsRoute.ts +3 -1
package/dist/index.d.ts
CHANGED
|
@@ -3044,6 +3044,16 @@ declare class Campaigns {
|
|
|
3044
3044
|
* @returns promise
|
|
3045
3045
|
*/
|
|
3046
3046
|
static resendAcceptanceEmail<T>(campaign_id: string, user_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3047
|
+
/**
|
|
3048
|
+
* Pay the influencer a custom amount for the campaign.
|
|
3049
|
+
*
|
|
3050
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/payInfluencer
|
|
3051
|
+
*
|
|
3052
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
3053
|
+
*
|
|
3054
|
+
* @returns promise
|
|
3055
|
+
*/
|
|
3056
|
+
static payInfluencer<T>(campaign_id: string, user_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3047
3057
|
}
|
|
3048
3058
|
|
|
3049
3059
|
declare class Subscriptions {
|
package/package.json
CHANGED
package/src/api/Campaigns.ts
CHANGED
|
@@ -712,6 +712,20 @@ class Campaigns {
|
|
|
712
712
|
return Requests.processRoute(CampaignsRoute.routes.resendAcceptanceEmail, data, { campaign_id: campaign_id, user_id : user_id }, params);
|
|
713
713
|
}
|
|
714
714
|
|
|
715
|
+
/**
|
|
716
|
+
* Pay the influencer a custom amount for the campaign.
|
|
717
|
+
*
|
|
718
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/payInfluencer
|
|
719
|
+
*
|
|
720
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
721
|
+
*
|
|
722
|
+
* @returns promise
|
|
723
|
+
*/
|
|
724
|
+
public static payInfluencer<T>(campaign_id: string, user_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
725
|
+
|
|
726
|
+
return Requests.processRoute(CampaignsRoute.routes.payInfluencer, data, { campaign_id: campaign_id, user_id : user_id }, params);
|
|
727
|
+
}
|
|
728
|
+
|
|
715
729
|
|
|
716
730
|
}
|
|
717
731
|
|
package/src/api/Communities.ts
CHANGED
|
@@ -487,7 +487,7 @@ class Communities {
|
|
|
487
487
|
*/
|
|
488
488
|
public static populateEmailTemplate<T>(community_id : string, template_id : string, data : object, params?: Record<string, any>) : AxiosPromise<Response<T>> {
|
|
489
489
|
|
|
490
|
-
return Requests.processRoute(CommunitiesRoute.routes.
|
|
490
|
+
return Requests.processRoute(CommunitiesRoute.routes.populateEmailTemplate, data, {community_id : community_id, template_id : template_id}, params);
|
|
491
491
|
}
|
|
492
492
|
|
|
493
493
|
|
|
@@ -56,7 +56,9 @@ class CampaignsRoute {
|
|
|
56
56
|
getActiveCampaignLinks : { url: '/campaigns/active', method: HTTP_METHODS.GET },
|
|
57
57
|
generateContractFromInvite : { url: '/campaigns/{campaign_id}/influencers/invites/{influencer_id}/contract', method: HTTP_METHODS.POST },
|
|
58
58
|
sendContractWithDocusign : { url: '/campaigns/{campaign_id}/influencers/invites/{influencer_id}/docusign', method: HTTP_METHODS.POST },
|
|
59
|
-
resendAcceptanceEmail : { url: '/campaigns/{campaign_id}/influencers/{user_id}/resendInvite', method: HTTP_METHODS.POST },
|
|
59
|
+
resendAcceptanceEmail : { url: '/campaigns/{campaign_id}/influencers/{user_id}/resendInvite', method: HTTP_METHODS.POST },
|
|
60
|
+
payInfluencer : { url: '/campaigns/{campaign_id}/influencers/{user_id}/payInfluencer', method: HTTP_METHODS.POST },
|
|
61
|
+
|
|
60
62
|
|
|
61
63
|
|
|
62
64
|
};
|