glitch-javascript-sdk 1.1.6 → 1.1.8
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 +96 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Campaigns.d.ts +30 -0
- package/dist/esm/api/Communities.d.ts +24 -0
- package/dist/esm/api/SocialPosts.d.ts +10 -0
- package/dist/esm/api/Users.d.ts +8 -0
- package/dist/esm/index.js +96 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +72 -0
- package/package.json +1 -1
- package/src/api/Campaigns.ts +42 -0
- package/src/api/Communities.ts +36 -0
- package/src/api/SocialPosts.ts +14 -0
- package/src/api/Users.ts +12 -0
- package/src/routes/CampaignsRoute.ts +6 -1
- package/src/routes/CommunitiesRoute.ts +3 -0
- package/src/routes/SocialPostsRoute.ts +1 -0
- package/src/routes/UserRoutes.ts +1 -0
|
@@ -470,5 +470,35 @@ declare class Campaigns {
|
|
|
470
470
|
* @returns promise
|
|
471
471
|
*/
|
|
472
472
|
static getActiveCampaignLinks<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
473
|
+
/**
|
|
474
|
+
* Generate a contract for the influencer based on the values in the invite.
|
|
475
|
+
*
|
|
476
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/generateInfluencerContract
|
|
477
|
+
*
|
|
478
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
479
|
+
*
|
|
480
|
+
* @returns promise
|
|
481
|
+
*/
|
|
482
|
+
static generateContractFromInvite<T>(campaign_id: string, influencer_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
483
|
+
/**
|
|
484
|
+
* Send a contract with Docusign.
|
|
485
|
+
*
|
|
486
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/sendContractWithDocusign
|
|
487
|
+
*
|
|
488
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
489
|
+
*
|
|
490
|
+
* @returns promise
|
|
491
|
+
*/
|
|
492
|
+
static sendContractWithDocusign<T>(campaign_id: string, influencer_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
493
|
+
/**
|
|
494
|
+
* Resend the acceptance email for the influencer.
|
|
495
|
+
*
|
|
496
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/resendInfluencerAcceptance
|
|
497
|
+
*
|
|
498
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
499
|
+
*
|
|
500
|
+
* @returns promise
|
|
501
|
+
*/
|
|
502
|
+
static resendAcceptanceEmail<T>(campaign_id: string, user_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
473
503
|
}
|
|
474
504
|
export default Campaigns;
|
|
@@ -266,5 +266,29 @@ declare class Communities {
|
|
|
266
266
|
* @returns promise
|
|
267
267
|
*/
|
|
268
268
|
static getLedger<T>(community_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
269
|
+
/**
|
|
270
|
+
* Clear Docusign authentication information from the current user.
|
|
271
|
+
*
|
|
272
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
273
|
+
*
|
|
274
|
+
* @returns promise
|
|
275
|
+
*/
|
|
276
|
+
static clearDocusignAuth<T>(community_id: string): AxiosPromise<Response<T>>;
|
|
277
|
+
/**
|
|
278
|
+
* Clear SimpleSin authentication information from the current user.
|
|
279
|
+
*
|
|
280
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
281
|
+
*
|
|
282
|
+
* @returns promise
|
|
283
|
+
*/
|
|
284
|
+
static clearSimplesignAuth<T>(community_id: string): AxiosPromise<Response<T>>;
|
|
285
|
+
/**
|
|
286
|
+
* Clear SimpleSin authentication information from the current user.
|
|
287
|
+
*
|
|
288
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
289
|
+
*
|
|
290
|
+
* @returns promise
|
|
291
|
+
*/
|
|
292
|
+
static clearHellosignAuth<T>(community_id: string): AxiosPromise<Response<T>>;
|
|
269
293
|
}
|
|
270
294
|
export default Communities;
|
|
@@ -37,5 +37,15 @@ declare class SocialPosts {
|
|
|
37
37
|
* @returns promise
|
|
38
38
|
*/
|
|
39
39
|
static dispute<T>(post_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
40
|
+
/**
|
|
41
|
+
* Get the change of the post metrics over a period of time.
|
|
42
|
+
*
|
|
43
|
+
* @see https://api.glitch.fun/api/documentation#/Social%20Media%20Posts/getSocialMediaPostHistory
|
|
44
|
+
*
|
|
45
|
+
* @param post_id The id fo the post to retrieve.
|
|
46
|
+
*
|
|
47
|
+
* @returns promise
|
|
48
|
+
*/
|
|
49
|
+
static history<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
40
50
|
}
|
|
41
51
|
export default SocialPosts;
|
package/dist/esm/api/Users.d.ts
CHANGED
|
@@ -211,6 +211,14 @@ declare class Users {
|
|
|
211
211
|
* @returns promise
|
|
212
212
|
*/
|
|
213
213
|
static clearRedditAuth<T>(): AxiosPromise<Response<T>>;
|
|
214
|
+
/**
|
|
215
|
+
* Clear Docusign authentication information from the current user.
|
|
216
|
+
*
|
|
217
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/clearDocusignAuth
|
|
218
|
+
*
|
|
219
|
+
* @returns promise
|
|
220
|
+
*/
|
|
221
|
+
static clearDocusignAuth<T>(): AxiosPromise<Response<T>>;
|
|
214
222
|
/**
|
|
215
223
|
* Clear Twitter authentication information from the current user.
|
|
216
224
|
*
|
package/dist/esm/index.js
CHANGED
|
@@ -6573,6 +6573,9 @@ var CommunitiesRoute = /** @class */ (function () {
|
|
|
6573
6573
|
getPaymentMethods: { url: '/communities/{community_id}/payment/methods', method: HTTP_METHODS.GET },
|
|
6574
6574
|
setDefaultPaymentMethod: { url: '/communities/{community_id}/payment/methods/default', method: HTTP_METHODS.POST },
|
|
6575
6575
|
getLedger: { url: '/communities/{community_id}/payment/ledger', method: HTTP_METHODS.GET },
|
|
6576
|
+
clearDocusignAuth: { url: '/communities/{community_id}/clearDocusignAuth', method: HTTP_METHODS.DELETE },
|
|
6577
|
+
clearHellosignAuth: { url: '/communities/{community_id}/clearHellosignAuth', method: HTTP_METHODS.DELETE },
|
|
6578
|
+
clearSimplesignAuth: { url: '/communities/{community_id}/clearSimplesignAuth', method: HTTP_METHODS.DELETE },
|
|
6576
6579
|
};
|
|
6577
6580
|
return CommunitiesRoute;
|
|
6578
6581
|
}());
|
|
@@ -6903,6 +6906,36 @@ var Communities = /** @class */ (function () {
|
|
|
6903
6906
|
Communities.getLedger = function (community_id, params) {
|
|
6904
6907
|
return Requests.processRoute(CommunitiesRoute.routes.getLedger, {}, { community_id: community_id }, params);
|
|
6905
6908
|
};
|
|
6909
|
+
/**
|
|
6910
|
+
* Clear Docusign authentication information from the current user.
|
|
6911
|
+
*
|
|
6912
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
6913
|
+
*
|
|
6914
|
+
* @returns promise
|
|
6915
|
+
*/
|
|
6916
|
+
Communities.clearDocusignAuth = function (community_id) {
|
|
6917
|
+
return Requests.processRoute(CommunitiesRoute.routes.clearDocusignAuth, {}, { community_id: community_id });
|
|
6918
|
+
};
|
|
6919
|
+
/**
|
|
6920
|
+
* Clear SimpleSin authentication information from the current user.
|
|
6921
|
+
*
|
|
6922
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
6923
|
+
*
|
|
6924
|
+
* @returns promise
|
|
6925
|
+
*/
|
|
6926
|
+
Communities.clearSimplesignAuth = function (community_id) {
|
|
6927
|
+
return Requests.processRoute(CommunitiesRoute.routes.clearSimplesignAuth, {}, { community_id: community_id });
|
|
6928
|
+
};
|
|
6929
|
+
/**
|
|
6930
|
+
* Clear SimpleSin authentication information from the current user.
|
|
6931
|
+
*
|
|
6932
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
6933
|
+
*
|
|
6934
|
+
* @returns promise
|
|
6935
|
+
*/
|
|
6936
|
+
Communities.clearHellosignAuth = function (community_id) {
|
|
6937
|
+
return Requests.processRoute(CommunitiesRoute.routes.clearHellosignAuth, {}, { community_id: community_id });
|
|
6938
|
+
};
|
|
6906
6939
|
return Communities;
|
|
6907
6940
|
}());
|
|
6908
6941
|
|
|
@@ -6929,6 +6962,7 @@ var UserRoutes = /** @class */ (function () {
|
|
|
6929
6962
|
clearYoutubeAuth: { url: '/users/clearYoutubeAuth', method: HTTP_METHODS.DELETE },
|
|
6930
6963
|
clearRedditAuth: { url: '/users/clearRedditAuth', method: HTTP_METHODS.DELETE },
|
|
6931
6964
|
clearTwitterAuth: { url: '/users/clearTwitterAuth', method: HTTP_METHODS.DELETE },
|
|
6965
|
+
clearDocusignAuth: { url: '/users/clearDocusignAuth', method: HTTP_METHODS.DELETE },
|
|
6932
6966
|
clearStreamElementsAuth: { url: '/users/clearStreamElementsAuth', method: HTTP_METHODS.DELETE },
|
|
6933
6967
|
getTipsReceivedForMonth: { url: '/users/getTipsReceivedForMonth', method: HTTP_METHODS.GET },
|
|
6934
6968
|
getTipsGivenForMonth: { url: '/users/getTipsGivenForMonth', method: HTTP_METHODS.GET },
|
|
@@ -7205,6 +7239,16 @@ var Users = /** @class */ (function () {
|
|
|
7205
7239
|
Users.clearRedditAuth = function () {
|
|
7206
7240
|
return Requests.processRoute(UserRoutes.routes.clearRedditAuth, {});
|
|
7207
7241
|
};
|
|
7242
|
+
/**
|
|
7243
|
+
* Clear Docusign authentication information from the current user.
|
|
7244
|
+
*
|
|
7245
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/clearDocusignAuth
|
|
7246
|
+
*
|
|
7247
|
+
* @returns promise
|
|
7248
|
+
*/
|
|
7249
|
+
Users.clearDocusignAuth = function () {
|
|
7250
|
+
return Requests.processRoute(UserRoutes.routes.clearDocusignAuth, {});
|
|
7251
|
+
};
|
|
7208
7252
|
/**
|
|
7209
7253
|
* Clear Twitter authentication information from the current user.
|
|
7210
7254
|
*
|
|
@@ -8879,6 +8923,7 @@ var SocialPostsRoute = /** @class */ (function () {
|
|
|
8879
8923
|
createPost: { url: '/socialposts', method: HTTP_METHODS.POST },
|
|
8880
8924
|
retrievePost: { url: '/socialposts/{post_id}', method: HTTP_METHODS.GET },
|
|
8881
8925
|
dispute: { url: '/social/{post_id}/dispute', method: HTTP_METHODS.POST },
|
|
8926
|
+
history: { url: '/socialposts/{post_id}/history', method: HTTP_METHODS.GET },
|
|
8882
8927
|
};
|
|
8883
8928
|
return SocialPostsRoute;
|
|
8884
8929
|
}());
|
|
@@ -8930,6 +8975,18 @@ var SocialPosts = /** @class */ (function () {
|
|
|
8930
8975
|
SocialPosts.dispute = function (post_id, data, params) {
|
|
8931
8976
|
return Requests.processRoute(SocialPostsRoute.routes.dispute, data, { post_id: post_id }, params);
|
|
8932
8977
|
};
|
|
8978
|
+
/**
|
|
8979
|
+
* Get the change of the post metrics over a period of time.
|
|
8980
|
+
*
|
|
8981
|
+
* @see https://api.glitch.fun/api/documentation#/Social%20Media%20Posts/getSocialMediaPostHistory
|
|
8982
|
+
*
|
|
8983
|
+
* @param post_id The id fo the post to retrieve.
|
|
8984
|
+
*
|
|
8985
|
+
* @returns promise
|
|
8986
|
+
*/
|
|
8987
|
+
SocialPosts.history = function (post_id, params) {
|
|
8988
|
+
return Requests.processRoute(SocialPostsRoute.routes.history, {}, { post_id: post_id }, params);
|
|
8989
|
+
};
|
|
8933
8990
|
return SocialPosts;
|
|
8934
8991
|
}());
|
|
8935
8992
|
|
|
@@ -9174,6 +9231,9 @@ var CampaignsRoute = /** @class */ (function () {
|
|
|
9174
9231
|
getRecommendedInfluencers: { url: '/campaigns/{campaign_id}/recommendInfluencers', method: HTTP_METHODS.GET },
|
|
9175
9232
|
generateContentForInfluencer: { url: '/campaigns/{campaign_id}/influencers/{user_id}/generatePostContent', method: HTTP_METHODS.POST },
|
|
9176
9233
|
getActiveCampaignLinks: { url: '/campaigns/active', method: HTTP_METHODS.GET },
|
|
9234
|
+
generateContractFromInvite: { url: '/campaigns/{campaign_id}/influencers/invites/{influencer_id}/contract', method: HTTP_METHODS.POST },
|
|
9235
|
+
sendContractWithDocusign: { url: '/campaigns/{campaign_id}/influencers/invites/{influencer_id}/docusign', method: HTTP_METHODS.POST },
|
|
9236
|
+
resendAcceptanceEmail: { url: '/campaigns/{campaign_id}/influencers/{user_id}/resendInvite', method: HTTP_METHODS.POST },
|
|
9177
9237
|
};
|
|
9178
9238
|
return CampaignsRoute;
|
|
9179
9239
|
}());
|
|
@@ -9750,6 +9810,42 @@ var Campaigns = /** @class */ (function () {
|
|
|
9750
9810
|
Campaigns.getActiveCampaignLinks = function (params) {
|
|
9751
9811
|
return Requests.processRoute(CampaignsRoute.routes.getActiveCampaignLinks, undefined, undefined, params);
|
|
9752
9812
|
};
|
|
9813
|
+
/**
|
|
9814
|
+
* Generate a contract for the influencer based on the values in the invite.
|
|
9815
|
+
*
|
|
9816
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/generateInfluencerContract
|
|
9817
|
+
*
|
|
9818
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
9819
|
+
*
|
|
9820
|
+
* @returns promise
|
|
9821
|
+
*/
|
|
9822
|
+
Campaigns.generateContractFromInvite = function (campaign_id, influencer_id, data, params) {
|
|
9823
|
+
return Requests.processRoute(CampaignsRoute.routes.generateContractFromInvite, data, { campaign_id: campaign_id, influencer_id: influencer_id }, params);
|
|
9824
|
+
};
|
|
9825
|
+
/**
|
|
9826
|
+
* Send a contract with Docusign.
|
|
9827
|
+
*
|
|
9828
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/sendContractWithDocusign
|
|
9829
|
+
*
|
|
9830
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
9831
|
+
*
|
|
9832
|
+
* @returns promise
|
|
9833
|
+
*/
|
|
9834
|
+
Campaigns.sendContractWithDocusign = function (campaign_id, influencer_id, data, params) {
|
|
9835
|
+
return Requests.processRoute(CampaignsRoute.routes.sendContractWithDocusign, data, { campaign_id: campaign_id, influencer_id: influencer_id }, params);
|
|
9836
|
+
};
|
|
9837
|
+
/**
|
|
9838
|
+
* Resend the acceptance email for the influencer.
|
|
9839
|
+
*
|
|
9840
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/resendInfluencerAcceptance
|
|
9841
|
+
*
|
|
9842
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
9843
|
+
*
|
|
9844
|
+
* @returns promise
|
|
9845
|
+
*/
|
|
9846
|
+
Campaigns.resendAcceptanceEmail = function (campaign_id, user_id, data, params) {
|
|
9847
|
+
return Requests.processRoute(CampaignsRoute.routes.resendAcceptanceEmail, data, { campaign_id: campaign_id, user_id: user_id }, params);
|
|
9848
|
+
};
|
|
9753
9849
|
return Campaigns;
|
|
9754
9850
|
}());
|
|
9755
9851
|
|