glitch-javascript-sdk 1.1.8 → 1.2.0
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 +85 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Communities.d.ts +48 -0
- package/dist/esm/api/Influencers.d.ts +16 -0
- package/dist/esm/index.js +85 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +64 -0
- package/package.json +1 -1
- package/src/api/Communities.ts +66 -0
- package/src/api/Influencers.ts +22 -0
- package/src/routes/CommunitiesRoute.ts +5 -0
- package/src/routes/InfluencerRoutes.ts +2 -0
|
@@ -290,5 +290,53 @@ declare class Communities {
|
|
|
290
290
|
* @returns promise
|
|
291
291
|
*/
|
|
292
292
|
static clearHellosignAuth<T>(community_id: string): AxiosPromise<Response<T>>;
|
|
293
|
+
/**
|
|
294
|
+
* List all the saved email templates for the community.
|
|
295
|
+
*
|
|
296
|
+
* @see https://api.glitch.fun/api/documentation#/Community%20Route/resourceCommunityList
|
|
297
|
+
*
|
|
298
|
+
* @returns promise
|
|
299
|
+
*/
|
|
300
|
+
static listEmailTemplates<T>(community_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
301
|
+
/**
|
|
302
|
+
* Create a new email template for the community
|
|
303
|
+
*
|
|
304
|
+
* @see https://api.glitch.fun/api/documentation#/Community%20Route/newCommunityResourceStorage
|
|
305
|
+
*
|
|
306
|
+
* @param data The data to be passed when creating a community.
|
|
307
|
+
*
|
|
308
|
+
* @returns Promise
|
|
309
|
+
*/
|
|
310
|
+
static createEmailTemplate<T>(community_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
311
|
+
/**
|
|
312
|
+
* Update an email template for the community.
|
|
313
|
+
*
|
|
314
|
+
* @see https://api.glitch.fun/api/documentation#/Community%20Route/updateCommunityStorage
|
|
315
|
+
*
|
|
316
|
+
* @param community_id The id of the community to update.
|
|
317
|
+
* @param data The data to update.
|
|
318
|
+
*
|
|
319
|
+
* @returns promise
|
|
320
|
+
*/
|
|
321
|
+
static updateEmailTemplate<T>(community_id: string, template_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
322
|
+
/**
|
|
323
|
+
* Retrieve a single email template for the community.
|
|
324
|
+
*
|
|
325
|
+
* @see https://api.glitch.fun/api/documentation#/Community%20Route/showCommunityStorage
|
|
326
|
+
*
|
|
327
|
+
* @param community_id The id fo the community to retrieve.
|
|
328
|
+
*
|
|
329
|
+
* @returns promise
|
|
330
|
+
*/
|
|
331
|
+
static viewEmailTemplate<T>(community_id: string, template_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
332
|
+
/**
|
|
333
|
+
* Deletes an email template for the community.
|
|
334
|
+
*
|
|
335
|
+
* @see https://api.glitch.fun/api/documentation#/Community%20Route/destoryCommunityStorage
|
|
336
|
+
*
|
|
337
|
+
* @param community_id The id of the community to delete.
|
|
338
|
+
* @returns promise
|
|
339
|
+
*/
|
|
340
|
+
static deleteEmailTemplate<T>(community_id: string, template_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
293
341
|
}
|
|
294
342
|
export default Communities;
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import Response from "../util/Response";
|
|
2
2
|
import { AxiosPromise } from "axios";
|
|
3
3
|
declare class Influencers {
|
|
4
|
+
/**
|
|
5
|
+
* Add a new influencer to the platform.
|
|
6
|
+
*
|
|
7
|
+
* @see https://api.glitch.fun/api/documentation#/Influencers/createInfluencersNotes
|
|
8
|
+
*
|
|
9
|
+
* @returns promise
|
|
10
|
+
*/
|
|
11
|
+
static addInfluencer<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4
12
|
/**
|
|
5
13
|
* Get a list of influencers available on he platform.
|
|
6
14
|
*
|
|
@@ -65,5 +73,13 @@ declare class Influencers {
|
|
|
65
73
|
* @returns promise
|
|
66
74
|
*/
|
|
67
75
|
static deleteNote<T>(influencer_id: string, note_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
76
|
+
/**
|
|
77
|
+
* Get a list of contracts associated with an influencer.
|
|
78
|
+
*
|
|
79
|
+
* @see https://api.glitch.fun/api/documentation#/Influencers/getInfluencers
|
|
80
|
+
*
|
|
81
|
+
* @returns promise
|
|
82
|
+
*/
|
|
83
|
+
static listContracts<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
68
84
|
}
|
|
69
85
|
export default Influencers;
|
package/dist/esm/index.js
CHANGED
|
@@ -6576,6 +6576,11 @@ var CommunitiesRoute = /** @class */ (function () {
|
|
|
6576
6576
|
clearDocusignAuth: { url: '/communities/{community_id}/clearDocusignAuth', method: HTTP_METHODS.DELETE },
|
|
6577
6577
|
clearHellosignAuth: { url: '/communities/{community_id}/clearHellosignAuth', method: HTTP_METHODS.DELETE },
|
|
6578
6578
|
clearSimplesignAuth: { url: '/communities/{community_id}/clearSimplesignAuth', method: HTTP_METHODS.DELETE },
|
|
6579
|
+
listEmailTemplates: { url: '/communities/{community_id}/emails/templates', method: HTTP_METHODS.GET },
|
|
6580
|
+
createEmailTemplate: { url: '/communities/{community_id}/emails/templates', method: HTTP_METHODS.POST },
|
|
6581
|
+
viewEmailTemplate: { url: '/communities/{community_id}/emails/templates/{template_id}', method: HTTP_METHODS.GET },
|
|
6582
|
+
updateEmailTemplate: { url: '/communities/{community_id}/emails/templates/{template_id}', method: HTTP_METHODS.PUT },
|
|
6583
|
+
deleteEmailTemplate: { url: '/communities/{community_id}/emails/templates/{template_id}', method: HTTP_METHODS.DELETE },
|
|
6579
6584
|
};
|
|
6580
6585
|
return CommunitiesRoute;
|
|
6581
6586
|
}());
|
|
@@ -6936,6 +6941,64 @@ var Communities = /** @class */ (function () {
|
|
|
6936
6941
|
Communities.clearHellosignAuth = function (community_id) {
|
|
6937
6942
|
return Requests.processRoute(CommunitiesRoute.routes.clearHellosignAuth, {}, { community_id: community_id });
|
|
6938
6943
|
};
|
|
6944
|
+
/**
|
|
6945
|
+
* List all the saved email templates for the community.
|
|
6946
|
+
*
|
|
6947
|
+
* @see https://api.glitch.fun/api/documentation#/Community%20Route/resourceCommunityList
|
|
6948
|
+
*
|
|
6949
|
+
* @returns promise
|
|
6950
|
+
*/
|
|
6951
|
+
Communities.listEmailTemplates = function (community_id, params) {
|
|
6952
|
+
return Requests.processRoute(CommunitiesRoute.routes.listEmailTemplates, undefined, { community_id: community_id }, params);
|
|
6953
|
+
};
|
|
6954
|
+
/**
|
|
6955
|
+
* Create a new email template for the community
|
|
6956
|
+
*
|
|
6957
|
+
* @see https://api.glitch.fun/api/documentation#/Community%20Route/newCommunityResourceStorage
|
|
6958
|
+
*
|
|
6959
|
+
* @param data The data to be passed when creating a community.
|
|
6960
|
+
*
|
|
6961
|
+
* @returns Promise
|
|
6962
|
+
*/
|
|
6963
|
+
Communities.createEmailTemplate = function (community_id, data, params) {
|
|
6964
|
+
return Requests.processRoute(CommunitiesRoute.routes.createEmailTemplate, data, { community_id: community_id }, params);
|
|
6965
|
+
};
|
|
6966
|
+
/**
|
|
6967
|
+
* Update an email template for the community.
|
|
6968
|
+
*
|
|
6969
|
+
* @see https://api.glitch.fun/api/documentation#/Community%20Route/updateCommunityStorage
|
|
6970
|
+
*
|
|
6971
|
+
* @param community_id The id of the community to update.
|
|
6972
|
+
* @param data The data to update.
|
|
6973
|
+
*
|
|
6974
|
+
* @returns promise
|
|
6975
|
+
*/
|
|
6976
|
+
Communities.updateEmailTemplate = function (community_id, template_id, data, params) {
|
|
6977
|
+
return Requests.processRoute(CommunitiesRoute.routes.updateEmailTemplate, data, { community_id: community_id, template_id: template_id }, params);
|
|
6978
|
+
};
|
|
6979
|
+
/**
|
|
6980
|
+
* Retrieve a single email template for the community.
|
|
6981
|
+
*
|
|
6982
|
+
* @see https://api.glitch.fun/api/documentation#/Community%20Route/showCommunityStorage
|
|
6983
|
+
*
|
|
6984
|
+
* @param community_id The id fo the community to retrieve.
|
|
6985
|
+
*
|
|
6986
|
+
* @returns promise
|
|
6987
|
+
*/
|
|
6988
|
+
Communities.viewEmailTemplate = function (community_id, template_id, params) {
|
|
6989
|
+
return Requests.processRoute(CommunitiesRoute.routes.viewEmailTemplate, {}, { community_id: community_id, template_id: template_id }, params);
|
|
6990
|
+
};
|
|
6991
|
+
/**
|
|
6992
|
+
* Deletes an email template for the community.
|
|
6993
|
+
*
|
|
6994
|
+
* @see https://api.glitch.fun/api/documentation#/Community%20Route/destoryCommunityStorage
|
|
6995
|
+
*
|
|
6996
|
+
* @param community_id The id of the community to delete.
|
|
6997
|
+
* @returns promise
|
|
6998
|
+
*/
|
|
6999
|
+
Communities.deleteEmailTemplate = function (community_id, template_id, params) {
|
|
7000
|
+
return Requests.processRoute(CommunitiesRoute.routes.deleteEmailTemplate, {}, { community_id: community_id, template_id: template_id });
|
|
7001
|
+
};
|
|
6939
7002
|
return Communities;
|
|
6940
7003
|
}());
|
|
6941
7004
|
|
|
@@ -10111,6 +10174,7 @@ var InfluencerRoutes = /** @class */ (function () {
|
|
|
10111
10174
|
function InfluencerRoutes() {
|
|
10112
10175
|
}
|
|
10113
10176
|
InfluencerRoutes.routes = {
|
|
10177
|
+
addInfluencer: { url: '/influencers', method: HTTP_METHODS.POST },
|
|
10114
10178
|
listInfluencers: { url: '/influencers', method: HTTP_METHODS.GET },
|
|
10115
10179
|
viewInfluencer: { url: '/influencers/{influencer_id}', method: HTTP_METHODS.GET },
|
|
10116
10180
|
generateProfile: { url: '/influencers/{influencer_id}/generateProfile', method: HTTP_METHODS.POST },
|
|
@@ -10119,6 +10183,7 @@ var InfluencerRoutes = /** @class */ (function () {
|
|
|
10119
10183
|
createNote: { url: '/influencers/{influencer_id}/notes', method: HTTP_METHODS.POST },
|
|
10120
10184
|
updateNote: { url: '/influencers/{influencer_id}/notes/{note_id}', method: HTTP_METHODS.PUT },
|
|
10121
10185
|
deleteNote: { url: '/influencers/{influencer_id}/notes/{note_id}', method: HTTP_METHODS.DELETE },
|
|
10186
|
+
listContracts: { url: '/influencers/contracts', method: HTTP_METHODS.GET },
|
|
10122
10187
|
};
|
|
10123
10188
|
return InfluencerRoutes;
|
|
10124
10189
|
}());
|
|
@@ -10126,6 +10191,16 @@ var InfluencerRoutes = /** @class */ (function () {
|
|
|
10126
10191
|
var Influencers = /** @class */ (function () {
|
|
10127
10192
|
function Influencers() {
|
|
10128
10193
|
}
|
|
10194
|
+
/**
|
|
10195
|
+
* Add a new influencer to the platform.
|
|
10196
|
+
*
|
|
10197
|
+
* @see https://api.glitch.fun/api/documentation#/Influencers/createInfluencersNotes
|
|
10198
|
+
*
|
|
10199
|
+
* @returns promise
|
|
10200
|
+
*/
|
|
10201
|
+
Influencers.addInfluencer = function (data, params) {
|
|
10202
|
+
return Requests.processRoute(InfluencerRoutes.routes.addInfluencer, data, {}, params);
|
|
10203
|
+
};
|
|
10129
10204
|
/**
|
|
10130
10205
|
* Get a list of influencers available on he platform.
|
|
10131
10206
|
*
|
|
@@ -10206,6 +10281,16 @@ var Influencers = /** @class */ (function () {
|
|
|
10206
10281
|
Influencers.deleteNote = function (influencer_id, note_id, data, params) {
|
|
10207
10282
|
return Requests.processRoute(InfluencerRoutes.routes.deleteNote, data, { influencer_id: influencer_id, note_id: note_id }, params);
|
|
10208
10283
|
};
|
|
10284
|
+
/**
|
|
10285
|
+
* Get a list of contracts associated with an influencer.
|
|
10286
|
+
*
|
|
10287
|
+
* @see https://api.glitch.fun/api/documentation#/Influencers/getInfluencers
|
|
10288
|
+
*
|
|
10289
|
+
* @returns promise
|
|
10290
|
+
*/
|
|
10291
|
+
Influencers.listContracts = function (params) {
|
|
10292
|
+
return Requests.processRoute(InfluencerRoutes.routes.listContracts, undefined, undefined, params);
|
|
10293
|
+
};
|
|
10209
10294
|
return Influencers;
|
|
10210
10295
|
}());
|
|
10211
10296
|
|