glitch-javascript-sdk 1.2.3 → 1.2.5
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 +37 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Campaigns.d.ts +28 -0
- package/dist/esm/index.js +37 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +28 -0
- package/package.json +1 -1
- package/src/api/Campaigns.ts +39 -0
- package/src/routes/CampaignsRoute.ts +4 -2
package/dist/index.d.ts
CHANGED
|
@@ -3054,6 +3054,34 @@ 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>>;
|
|
3065
|
+
/**
|
|
3066
|
+
* Generate a contract for the influencer based on the values in the campaign.
|
|
3067
|
+
*
|
|
3068
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/generateCampaignContract
|
|
3069
|
+
*
|
|
3070
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
3071
|
+
*
|
|
3072
|
+
* @returns promise
|
|
3073
|
+
*/
|
|
3074
|
+
static generateCampaignContract<T>(campaign_id: string, user_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3075
|
+
/**
|
|
3076
|
+
* Send a contract with Docusign.
|
|
3077
|
+
*
|
|
3078
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/sendCampaignContractWithDocusign
|
|
3079
|
+
*
|
|
3080
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
3081
|
+
*
|
|
3082
|
+
* @returns promise
|
|
3083
|
+
*/
|
|
3084
|
+
static sendCampaignContractWithDocusign<T>(campaign_id: string, user_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
3057
3085
|
}
|
|
3058
3086
|
|
|
3059
3087
|
declare class Subscriptions {
|
package/package.json
CHANGED
package/src/api/Campaigns.ts
CHANGED
|
@@ -726,6 +726,45 @@ 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
|
+
|
|
740
|
+
/**
|
|
741
|
+
* Generate a contract for the influencer based on the values in the campaign.
|
|
742
|
+
*
|
|
743
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/generateCampaignContract
|
|
744
|
+
*
|
|
745
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
746
|
+
*
|
|
747
|
+
* @returns promise
|
|
748
|
+
*/
|
|
749
|
+
public static generateCampaignContract<T>(campaign_id: string, user_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
750
|
+
|
|
751
|
+
return Requests.processRoute(CampaignsRoute.routes.generateCampaignContract, data, { campaign_id: campaign_id, user_id: user_id }, params);
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
/**
|
|
755
|
+
* Send a contract with Docusign.
|
|
756
|
+
*
|
|
757
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/sendCampaignContractWithDocusign
|
|
758
|
+
*
|
|
759
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
760
|
+
*
|
|
761
|
+
* @returns promise
|
|
762
|
+
*/
|
|
763
|
+
public static sendCampaignContractWithDocusign<T>(campaign_id: string, user_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
764
|
+
|
|
765
|
+
return Requests.processRoute(CampaignsRoute.routes.sendCampaignContractWithDocusign, data, { campaign_id: campaign_id, user_id: user_id }, params);
|
|
766
|
+
}
|
|
767
|
+
|
|
729
768
|
|
|
730
769
|
}
|
|
731
770
|
|
|
@@ -57,8 +57,10 @@ 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 },
|
|
61
|
-
|
|
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
|
+
generateCampaignContract : { url: '/campaigns/{campaign_id}/influencers/{user_id}/contract', method: HTTP_METHODS.POST },
|
|
63
|
+
sendCampaignContractWithDocusign : { url: '/campaigns/{campaign_id}/influencers/{user_id}/docusign', method: HTTP_METHODS.POST },
|
|
62
64
|
|
|
63
65
|
|
|
64
66
|
};
|