glitch-javascript-sdk 1.2.3 → 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 +11 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Campaigns.d.ts +8 -0
- package/dist/esm/index.js +11 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/package.json +1 -1
- package/src/api/Campaigns.ts +11 -0
- package/src/routes/CampaignsRoute.ts +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -3054,6 +3054,14 @@ declare class Campaigns {
|
|
|
3054
3054
|
* @returns promise
|
|
3055
3055
|
*/
|
|
3056
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>>;
|
|
3057
3065
|
}
|
|
3058
3066
|
|
|
3059
3067
|
declare class Subscriptions {
|
package/package.json
CHANGED
package/src/api/Campaigns.ts
CHANGED
|
@@ -726,6 +726,17 @@ class Campaigns {
|
|
|
726
726
|
return Requests.processRoute(CampaignsRoute.routes.payInfluencer, data, { campaign_id: campaign_id, user_id : user_id }, params);
|
|
727
727
|
}
|
|
728
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
|
+
|
|
729
740
|
|
|
730
741
|
}
|
|
731
742
|
|
|
@@ -57,7 +57,8 @@ class CampaignsRoute {
|
|
|
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
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 },
|
|
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 },
|
|
61
62
|
|
|
62
63
|
|
|
63
64
|
|