glitch-javascript-sdk 1.1.7 → 1.1.9
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 +157 -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 +72 -0
- package/dist/esm/api/Influencers.d.ts +8 -0
- package/dist/esm/api/Users.d.ts +8 -0
- package/dist/esm/index.js +157 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +118 -0
- package/package.json +1 -1
- package/src/api/Campaigns.ts +42 -0
- package/src/api/Communities.ts +102 -0
- package/src/api/Influencers.ts +11 -0
- package/src/api/Users.ts +12 -0
- package/src/routes/CampaignsRoute.ts +6 -1
- package/src/routes/CommunitiesRoute.ts +8 -0
- package/src/routes/InfluencerRoutes.ts +1 -0
- package/src/routes/UserRoutes.ts +1 -0
package/dist/cjs/index.js
CHANGED
|
@@ -19757,6 +19757,14 @@ var CommunitiesRoute = /** @class */ (function () {
|
|
|
19757
19757
|
getPaymentMethods: { url: '/communities/{community_id}/payment/methods', method: HTTP_METHODS.GET },
|
|
19758
19758
|
setDefaultPaymentMethod: { url: '/communities/{community_id}/payment/methods/default', method: HTTP_METHODS.POST },
|
|
19759
19759
|
getLedger: { url: '/communities/{community_id}/payment/ledger', method: HTTP_METHODS.GET },
|
|
19760
|
+
clearDocusignAuth: { url: '/communities/{community_id}/clearDocusignAuth', method: HTTP_METHODS.DELETE },
|
|
19761
|
+
clearHellosignAuth: { url: '/communities/{community_id}/clearHellosignAuth', method: HTTP_METHODS.DELETE },
|
|
19762
|
+
clearSimplesignAuth: { url: '/communities/{community_id}/clearSimplesignAuth', method: HTTP_METHODS.DELETE },
|
|
19763
|
+
listEmailTemplates: { url: '/communities/{community_id}/emails/templates', method: HTTP_METHODS.GET },
|
|
19764
|
+
createEmailTemplate: { url: '/communities/{community_id}/emails/templates', method: HTTP_METHODS.POST },
|
|
19765
|
+
viewEmailTemplate: { url: '/communities/{community_id}/emails/templates/{template_id}', method: HTTP_METHODS.GET },
|
|
19766
|
+
updateEmailTemplate: { url: '/communities/{community_id}/emails/templates/{template_id}', method: HTTP_METHODS.PUT },
|
|
19767
|
+
deleteEmailTemplate: { url: '/communities/{community_id}/emails/templates/{template_id}', method: HTTP_METHODS.DELETE },
|
|
19760
19768
|
};
|
|
19761
19769
|
return CommunitiesRoute;
|
|
19762
19770
|
}());
|
|
@@ -20087,6 +20095,94 @@ var Communities = /** @class */ (function () {
|
|
|
20087
20095
|
Communities.getLedger = function (community_id, params) {
|
|
20088
20096
|
return Requests.processRoute(CommunitiesRoute.routes.getLedger, {}, { community_id: community_id }, params);
|
|
20089
20097
|
};
|
|
20098
|
+
/**
|
|
20099
|
+
* Clear Docusign authentication information from the current user.
|
|
20100
|
+
*
|
|
20101
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
20102
|
+
*
|
|
20103
|
+
* @returns promise
|
|
20104
|
+
*/
|
|
20105
|
+
Communities.clearDocusignAuth = function (community_id) {
|
|
20106
|
+
return Requests.processRoute(CommunitiesRoute.routes.clearDocusignAuth, {}, { community_id: community_id });
|
|
20107
|
+
};
|
|
20108
|
+
/**
|
|
20109
|
+
* Clear SimpleSin authentication information from the current user.
|
|
20110
|
+
*
|
|
20111
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
20112
|
+
*
|
|
20113
|
+
* @returns promise
|
|
20114
|
+
*/
|
|
20115
|
+
Communities.clearSimplesignAuth = function (community_id) {
|
|
20116
|
+
return Requests.processRoute(CommunitiesRoute.routes.clearSimplesignAuth, {}, { community_id: community_id });
|
|
20117
|
+
};
|
|
20118
|
+
/**
|
|
20119
|
+
* Clear SimpleSin authentication information from the current user.
|
|
20120
|
+
*
|
|
20121
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
20122
|
+
*
|
|
20123
|
+
* @returns promise
|
|
20124
|
+
*/
|
|
20125
|
+
Communities.clearHellosignAuth = function (community_id) {
|
|
20126
|
+
return Requests.processRoute(CommunitiesRoute.routes.clearHellosignAuth, {}, { community_id: community_id });
|
|
20127
|
+
};
|
|
20128
|
+
/**
|
|
20129
|
+
* List all the saved email templates for the community.
|
|
20130
|
+
*
|
|
20131
|
+
* @see https://api.glitch.fun/api/documentation#/Community%20Route/resourceCommunityList
|
|
20132
|
+
*
|
|
20133
|
+
* @returns promise
|
|
20134
|
+
*/
|
|
20135
|
+
Communities.listEmailTemplates = function (community_id, params) {
|
|
20136
|
+
return Requests.processRoute(CommunitiesRoute.routes.listEmailTemplates, undefined, { community_id: community_id }, params);
|
|
20137
|
+
};
|
|
20138
|
+
/**
|
|
20139
|
+
* Create a new email template for the community
|
|
20140
|
+
*
|
|
20141
|
+
* @see https://api.glitch.fun/api/documentation#/Community%20Route/newCommunityResourceStorage
|
|
20142
|
+
*
|
|
20143
|
+
* @param data The data to be passed when creating a community.
|
|
20144
|
+
*
|
|
20145
|
+
* @returns Promise
|
|
20146
|
+
*/
|
|
20147
|
+
Communities.createEmailTemplate = function (community_id, data, params) {
|
|
20148
|
+
return Requests.processRoute(CommunitiesRoute.routes.createEmailTemplate, data, { community_id: community_id }, params);
|
|
20149
|
+
};
|
|
20150
|
+
/**
|
|
20151
|
+
* Update an email template for the community.
|
|
20152
|
+
*
|
|
20153
|
+
* @see https://api.glitch.fun/api/documentation#/Community%20Route/updateCommunityStorage
|
|
20154
|
+
*
|
|
20155
|
+
* @param community_id The id of the community to update.
|
|
20156
|
+
* @param data The data to update.
|
|
20157
|
+
*
|
|
20158
|
+
* @returns promise
|
|
20159
|
+
*/
|
|
20160
|
+
Communities.updateEmailTemplate = function (community_id, template_id, data, params) {
|
|
20161
|
+
return Requests.processRoute(CommunitiesRoute.routes.updateEmailTemplate, data, { community_id: community_id, template_id: template_id }, params);
|
|
20162
|
+
};
|
|
20163
|
+
/**
|
|
20164
|
+
* Retrieve a single email template for the community.
|
|
20165
|
+
*
|
|
20166
|
+
* @see https://api.glitch.fun/api/documentation#/Community%20Route/showCommunityStorage
|
|
20167
|
+
*
|
|
20168
|
+
* @param community_id The id fo the community to retrieve.
|
|
20169
|
+
*
|
|
20170
|
+
* @returns promise
|
|
20171
|
+
*/
|
|
20172
|
+
Communities.viewEmailTemplate = function (community_id, template_id, params) {
|
|
20173
|
+
return Requests.processRoute(CommunitiesRoute.routes.viewEmailTemplate, {}, { community_id: community_id, template_id: template_id }, params);
|
|
20174
|
+
};
|
|
20175
|
+
/**
|
|
20176
|
+
* Deletes an email template for the community.
|
|
20177
|
+
*
|
|
20178
|
+
* @see https://api.glitch.fun/api/documentation#/Community%20Route/destoryCommunityStorage
|
|
20179
|
+
*
|
|
20180
|
+
* @param community_id The id of the community to delete.
|
|
20181
|
+
* @returns promise
|
|
20182
|
+
*/
|
|
20183
|
+
Communities.deleteEmailTemplate = function (community_id, template_id, params) {
|
|
20184
|
+
return Requests.processRoute(CommunitiesRoute.routes.deleteEmailTemplate, {}, { community_id: community_id, template_id: template_id });
|
|
20185
|
+
};
|
|
20090
20186
|
return Communities;
|
|
20091
20187
|
}());
|
|
20092
20188
|
|
|
@@ -20113,6 +20209,7 @@ var UserRoutes = /** @class */ (function () {
|
|
|
20113
20209
|
clearYoutubeAuth: { url: '/users/clearYoutubeAuth', method: HTTP_METHODS.DELETE },
|
|
20114
20210
|
clearRedditAuth: { url: '/users/clearRedditAuth', method: HTTP_METHODS.DELETE },
|
|
20115
20211
|
clearTwitterAuth: { url: '/users/clearTwitterAuth', method: HTTP_METHODS.DELETE },
|
|
20212
|
+
clearDocusignAuth: { url: '/users/clearDocusignAuth', method: HTTP_METHODS.DELETE },
|
|
20116
20213
|
clearStreamElementsAuth: { url: '/users/clearStreamElementsAuth', method: HTTP_METHODS.DELETE },
|
|
20117
20214
|
getTipsReceivedForMonth: { url: '/users/getTipsReceivedForMonth', method: HTTP_METHODS.GET },
|
|
20118
20215
|
getTipsGivenForMonth: { url: '/users/getTipsGivenForMonth', method: HTTP_METHODS.GET },
|
|
@@ -20389,6 +20486,16 @@ var Users = /** @class */ (function () {
|
|
|
20389
20486
|
Users.clearRedditAuth = function () {
|
|
20390
20487
|
return Requests.processRoute(UserRoutes.routes.clearRedditAuth, {});
|
|
20391
20488
|
};
|
|
20489
|
+
/**
|
|
20490
|
+
* Clear Docusign authentication information from the current user.
|
|
20491
|
+
*
|
|
20492
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/clearDocusignAuth
|
|
20493
|
+
*
|
|
20494
|
+
* @returns promise
|
|
20495
|
+
*/
|
|
20496
|
+
Users.clearDocusignAuth = function () {
|
|
20497
|
+
return Requests.processRoute(UserRoutes.routes.clearDocusignAuth, {});
|
|
20498
|
+
};
|
|
20392
20499
|
/**
|
|
20393
20500
|
* Clear Twitter authentication information from the current user.
|
|
20394
20501
|
*
|
|
@@ -22371,6 +22478,9 @@ var CampaignsRoute = /** @class */ (function () {
|
|
|
22371
22478
|
getRecommendedInfluencers: { url: '/campaigns/{campaign_id}/recommendInfluencers', method: HTTP_METHODS.GET },
|
|
22372
22479
|
generateContentForInfluencer: { url: '/campaigns/{campaign_id}/influencers/{user_id}/generatePostContent', method: HTTP_METHODS.POST },
|
|
22373
22480
|
getActiveCampaignLinks: { url: '/campaigns/active', method: HTTP_METHODS.GET },
|
|
22481
|
+
generateContractFromInvite: { url: '/campaigns/{campaign_id}/influencers/invites/{influencer_id}/contract', method: HTTP_METHODS.POST },
|
|
22482
|
+
sendContractWithDocusign: { url: '/campaigns/{campaign_id}/influencers/invites/{influencer_id}/docusign', method: HTTP_METHODS.POST },
|
|
22483
|
+
resendAcceptanceEmail: { url: '/campaigns/{campaign_id}/influencers/{user_id}/resendInvite', method: HTTP_METHODS.POST },
|
|
22374
22484
|
};
|
|
22375
22485
|
return CampaignsRoute;
|
|
22376
22486
|
}());
|
|
@@ -22947,6 +23057,42 @@ var Campaigns = /** @class */ (function () {
|
|
|
22947
23057
|
Campaigns.getActiveCampaignLinks = function (params) {
|
|
22948
23058
|
return Requests.processRoute(CampaignsRoute.routes.getActiveCampaignLinks, undefined, undefined, params);
|
|
22949
23059
|
};
|
|
23060
|
+
/**
|
|
23061
|
+
* Generate a contract for the influencer based on the values in the invite.
|
|
23062
|
+
*
|
|
23063
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/generateInfluencerContract
|
|
23064
|
+
*
|
|
23065
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
23066
|
+
*
|
|
23067
|
+
* @returns promise
|
|
23068
|
+
*/
|
|
23069
|
+
Campaigns.generateContractFromInvite = function (campaign_id, influencer_id, data, params) {
|
|
23070
|
+
return Requests.processRoute(CampaignsRoute.routes.generateContractFromInvite, data, { campaign_id: campaign_id, influencer_id: influencer_id }, params);
|
|
23071
|
+
};
|
|
23072
|
+
/**
|
|
23073
|
+
* Send a contract with Docusign.
|
|
23074
|
+
*
|
|
23075
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/sendContractWithDocusign
|
|
23076
|
+
*
|
|
23077
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
23078
|
+
*
|
|
23079
|
+
* @returns promise
|
|
23080
|
+
*/
|
|
23081
|
+
Campaigns.sendContractWithDocusign = function (campaign_id, influencer_id, data, params) {
|
|
23082
|
+
return Requests.processRoute(CampaignsRoute.routes.sendContractWithDocusign, data, { campaign_id: campaign_id, influencer_id: influencer_id }, params);
|
|
23083
|
+
};
|
|
23084
|
+
/**
|
|
23085
|
+
* Resend the acceptance email for the influencer.
|
|
23086
|
+
*
|
|
23087
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/resendInfluencerAcceptance
|
|
23088
|
+
*
|
|
23089
|
+
* @param campaign_id The id fo the campaign to retrieve.
|
|
23090
|
+
*
|
|
23091
|
+
* @returns promise
|
|
23092
|
+
*/
|
|
23093
|
+
Campaigns.resendAcceptanceEmail = function (campaign_id, user_id, data, params) {
|
|
23094
|
+
return Requests.processRoute(CampaignsRoute.routes.resendAcceptanceEmail, data, { campaign_id: campaign_id, user_id: user_id }, params);
|
|
23095
|
+
};
|
|
22950
23096
|
return Campaigns;
|
|
22951
23097
|
}());
|
|
22952
23098
|
|
|
@@ -23212,6 +23358,7 @@ var InfluencerRoutes = /** @class */ (function () {
|
|
|
23212
23358
|
function InfluencerRoutes() {
|
|
23213
23359
|
}
|
|
23214
23360
|
InfluencerRoutes.routes = {
|
|
23361
|
+
addInfluencer: { url: '/influencers', method: HTTP_METHODS.POST },
|
|
23215
23362
|
listInfluencers: { url: '/influencers', method: HTTP_METHODS.GET },
|
|
23216
23363
|
viewInfluencer: { url: '/influencers/{influencer_id}', method: HTTP_METHODS.GET },
|
|
23217
23364
|
generateProfile: { url: '/influencers/{influencer_id}/generateProfile', method: HTTP_METHODS.POST },
|
|
@@ -23227,6 +23374,16 @@ var InfluencerRoutes = /** @class */ (function () {
|
|
|
23227
23374
|
var Influencers = /** @class */ (function () {
|
|
23228
23375
|
function Influencers() {
|
|
23229
23376
|
}
|
|
23377
|
+
/**
|
|
23378
|
+
* Add a new influencer to the platform.
|
|
23379
|
+
*
|
|
23380
|
+
* @see https://api.glitch.fun/api/documentation#/Influencers/createInfluencersNotes
|
|
23381
|
+
*
|
|
23382
|
+
* @returns promise
|
|
23383
|
+
*/
|
|
23384
|
+
Influencers.addInfluencer = function (data, params) {
|
|
23385
|
+
return Requests.processRoute(InfluencerRoutes.routes.addInfluencer, data, {}, params);
|
|
23386
|
+
};
|
|
23230
23387
|
/**
|
|
23231
23388
|
* Get a list of influencers available on he platform.
|
|
23232
23389
|
*
|