glitch-javascript-sdk 1.2.4 → 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 +26 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Campaigns.d.ts +20 -0
- package/dist/esm/index.js +26 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +20 -0
- package/package.json +1 -1
- package/src/api/Campaigns.ts +28 -0
- package/src/routes/CampaignsRoute.ts +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -3062,6 +3062,26 @@ declare class Campaigns {
|
|
|
3062
3062
|
* @returns promise
|
|
3063
3063
|
*/
|
|
3064
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>>;
|
|
3065
3085
|
}
|
|
3066
3086
|
|
|
3067
3087
|
declare class Subscriptions {
|
package/package.json
CHANGED
package/src/api/Campaigns.ts
CHANGED
|
@@ -737,6 +737,34 @@ class Campaigns {
|
|
|
737
737
|
return Requests.processRoute(CampaignsRoute.routes.getLedger, undefined, { campaign_id: campaign_id }, params);
|
|
738
738
|
}
|
|
739
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
|
+
|
|
740
768
|
|
|
741
769
|
}
|
|
742
770
|
|
|
@@ -59,7 +59,8 @@ class CampaignsRoute {
|
|
|
59
59
|
resendAcceptanceEmail : { url: '/campaigns/{campaign_id}/influencers/{user_id}/resendInvite', method: HTTP_METHODS.POST },
|
|
60
60
|
payInfluencer : { url: '/campaigns/{campaign_id}/influencers/{user_id}/payInfluencer', method: HTTP_METHODS.POST },
|
|
61
61
|
listPayouts :{ url: '/campaigns/{campaign_id}/payouts', method: HTTP_METHODS.GET },
|
|
62
|
-
|
|
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 },
|
|
63
64
|
|
|
64
65
|
|
|
65
66
|
};
|