glitch-javascript-sdk 1.2.2 → 1.2.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 +4 -1
package/dist/index.d.ts
CHANGED
|
@@ -3044,6 +3044,24 @@ 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>>;
|
|
3057
|
+
/**
|
|
3058
|
+
* Get the ledger for this campaign.
|
|
3059
|
+
*
|
|
3060
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/getCampaignPayouts
|
|
3061
|
+
*
|
|
3062
|
+
* @returns promise
|
|
3063
|
+
*/
|
|
3064
|
+
static listPayouts<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3047
3065
|
}
|
|
3048
3066
|
|
|
3049
3067
|
declare class Subscriptions {
|
package/package.json
CHANGED
package/src/api/Campaigns.ts
CHANGED
|
@@ -712,6 +712,31 @@ 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
|
+
|
|
729
|
+
/**
|
|
730
|
+
* Get the ledger for this campaign.
|
|
731
|
+
*
|
|
732
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/getCampaignPayouts
|
|
733
|
+
*
|
|
734
|
+
* @returns promise
|
|
735
|
+
*/
|
|
736
|
+
public static listPayouts<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
737
|
+
return Requests.processRoute(CampaignsRoute.routes.getLedger, undefined, { campaign_id: campaign_id }, params);
|
|
738
|
+
}
|
|
739
|
+
|
|
715
740
|
|
|
716
741
|
}
|
|
717
742
|
|
|
@@ -56,7 +56,10 @@ 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
|
+
listPayouts :{ url: '/campaigns/{campaign_id}/payouts', method: HTTP_METHODS.GET },
|
|
62
|
+
|
|
60
63
|
|
|
61
64
|
|
|
62
65
|
};
|