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/index.d.ts CHANGED
@@ -908,6 +908,78 @@ declare class Communities {
908
908
  * @returns promise
909
909
  */
910
910
  static getLedger<T>(community_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
911
+ /**
912
+ * Clear Docusign authentication information from the current user.
913
+ *
914
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
915
+ *
916
+ * @returns promise
917
+ */
918
+ static clearDocusignAuth<T>(community_id: string): AxiosPromise<Response<T>>;
919
+ /**
920
+ * Clear SimpleSin authentication information from the current user.
921
+ *
922
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
923
+ *
924
+ * @returns promise
925
+ */
926
+ static clearSimplesignAuth<T>(community_id: string): AxiosPromise<Response<T>>;
927
+ /**
928
+ * Clear SimpleSin authentication information from the current user.
929
+ *
930
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
931
+ *
932
+ * @returns promise
933
+ */
934
+ static clearHellosignAuth<T>(community_id: string): AxiosPromise<Response<T>>;
935
+ /**
936
+ * List all the saved email templates for the community.
937
+ *
938
+ * @see https://api.glitch.fun/api/documentation#/Community%20Route/resourceCommunityList
939
+ *
940
+ * @returns promise
941
+ */
942
+ static listEmailTemplates<T>(community_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
943
+ /**
944
+ * Create a new email template for the community
945
+ *
946
+ * @see https://api.glitch.fun/api/documentation#/Community%20Route/newCommunityResourceStorage
947
+ *
948
+ * @param data The data to be passed when creating a community.
949
+ *
950
+ * @returns Promise
951
+ */
952
+ static createEmailTemplate<T>(community_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
953
+ /**
954
+ * Update an email template for the community.
955
+ *
956
+ * @see https://api.glitch.fun/api/documentation#/Community%20Route/updateCommunityStorage
957
+ *
958
+ * @param community_id The id of the community to update.
959
+ * @param data The data to update.
960
+ *
961
+ * @returns promise
962
+ */
963
+ static updateEmailTemplate<T>(community_id: string, template_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
964
+ /**
965
+ * Retrieve a single email template for the community.
966
+ *
967
+ * @see https://api.glitch.fun/api/documentation#/Community%20Route/showCommunityStorage
968
+ *
969
+ * @param community_id The id fo the community to retrieve.
970
+ *
971
+ * @returns promise
972
+ */
973
+ static viewEmailTemplate<T>(community_id: string, template_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
974
+ /**
975
+ * Deletes an email template for the community.
976
+ *
977
+ * @see https://api.glitch.fun/api/documentation#/Community%20Route/destoryCommunityStorage
978
+ *
979
+ * @param community_id The id of the community to delete.
980
+ * @returns promise
981
+ */
982
+ static deleteEmailTemplate<T>(community_id: string, template_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
911
983
  }
912
984
 
913
985
  declare class Users {
@@ -1121,6 +1193,14 @@ declare class Users {
1121
1193
  * @returns promise
1122
1194
  */
1123
1195
  static clearRedditAuth<T>(): AxiosPromise<Response<T>>;
1196
+ /**
1197
+ * Clear Docusign authentication information from the current user.
1198
+ *
1199
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/clearDocusignAuth
1200
+ *
1201
+ * @returns promise
1202
+ */
1203
+ static clearDocusignAuth<T>(): AxiosPromise<Response<T>>;
1124
1204
  /**
1125
1205
  * Clear Twitter authentication information from the current user.
1126
1206
  *
@@ -2924,6 +3004,36 @@ declare class Campaigns {
2924
3004
  * @returns promise
2925
3005
  */
2926
3006
  static getActiveCampaignLinks<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
3007
+ /**
3008
+ * Generate a contract for the influencer based on the values in the invite.
3009
+ *
3010
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/generateInfluencerContract
3011
+ *
3012
+ * @param campaign_id The id fo the campaign to retrieve.
3013
+ *
3014
+ * @returns promise
3015
+ */
3016
+ static generateContractFromInvite<T>(campaign_id: string, influencer_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
3017
+ /**
3018
+ * Send a contract with Docusign.
3019
+ *
3020
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/sendContractWithDocusign
3021
+ *
3022
+ * @param campaign_id The id fo the campaign to retrieve.
3023
+ *
3024
+ * @returns promise
3025
+ */
3026
+ static sendContractWithDocusign<T>(campaign_id: string, influencer_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
3027
+ /**
3028
+ * Resend the acceptance email for the influencer.
3029
+ *
3030
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/resendInfluencerAcceptance
3031
+ *
3032
+ * @param campaign_id The id fo the campaign to retrieve.
3033
+ *
3034
+ * @returns promise
3035
+ */
3036
+ static resendAcceptanceEmail<T>(campaign_id: string, user_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
2927
3037
  }
2928
3038
 
2929
3039
  declare class Subscriptions {
@@ -3095,6 +3205,14 @@ declare class Feedback {
3095
3205
  }
3096
3206
 
3097
3207
  declare class Influencers {
3208
+ /**
3209
+ * Add a new influencer to the platform.
3210
+ *
3211
+ * @see https://api.glitch.fun/api/documentation#/Influencers/createInfluencersNotes
3212
+ *
3213
+ * @returns promise
3214
+ */
3215
+ static addInfluencer<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
3098
3216
  /**
3099
3217
  * Get a list of influencers available on he platform.
3100
3218
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "1.1.7",
3
+ "version": "1.1.9",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -670,6 +670,48 @@ class Campaigns {
670
670
  return Requests.processRoute(CampaignsRoute.routes.getActiveCampaignLinks, undefined, undefined, params);
671
671
  }
672
672
 
673
+ /**
674
+ * Generate a contract for the influencer based on the values in the invite.
675
+ *
676
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/generateInfluencerContract
677
+ *
678
+ * @param campaign_id The id fo the campaign to retrieve.
679
+ *
680
+ * @returns promise
681
+ */
682
+ public static generateContractFromInvite<T>(campaign_id: string, influencer_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
683
+
684
+ return Requests.processRoute(CampaignsRoute.routes.generateContractFromInvite, data, { campaign_id: campaign_id, influencer_id: influencer_id }, params);
685
+ }
686
+
687
+ /**
688
+ * Send a contract with Docusign.
689
+ *
690
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/sendContractWithDocusign
691
+ *
692
+ * @param campaign_id The id fo the campaign to retrieve.
693
+ *
694
+ * @returns promise
695
+ */
696
+ public static sendContractWithDocusign<T>(campaign_id: string, influencer_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
697
+
698
+ return Requests.processRoute(CampaignsRoute.routes.sendContractWithDocusign, data, { campaign_id: campaign_id, influencer_id: influencer_id }, params);
699
+ }
700
+
701
+ /**
702
+ * Resend the acceptance email for the influencer.
703
+ *
704
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/resendInfluencerAcceptance
705
+ *
706
+ * @param campaign_id The id fo the campaign to retrieve.
707
+ *
708
+ * @returns promise
709
+ */
710
+ public static resendAcceptanceEmail<T>(campaign_id: string, user_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
711
+
712
+ return Requests.processRoute(CampaignsRoute.routes.resendAcceptanceEmail, data, { campaign_id: campaign_id, user_id : user_id }, params);
713
+ }
714
+
673
715
 
674
716
  }
675
717
 
@@ -373,6 +373,108 @@ class Communities {
373
373
  return Requests.processRoute(CommunitiesRoute.routes.getLedger, {}, {community_id : community_id}, params);
374
374
  }
375
375
 
376
+ /**
377
+ * Clear Docusign authentication information from the current user.
378
+ *
379
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
380
+ *
381
+ * @returns promise
382
+ */
383
+ public static clearDocusignAuth<T>(community_id : string): AxiosPromise<Response<T>> {
384
+
385
+ return Requests.processRoute(CommunitiesRoute.routes.clearDocusignAuth, {}, {community_id : community_id});
386
+ }
387
+
388
+ /**
389
+ * Clear SimpleSin authentication information from the current user.
390
+ *
391
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
392
+ *
393
+ * @returns promise
394
+ */
395
+ public static clearSimplesignAuth<T>(community_id : string): AxiosPromise<Response<T>> {
396
+
397
+ return Requests.processRoute(CommunitiesRoute.routes.clearSimplesignAuth, {}, {community_id : community_id});
398
+ }
399
+
400
+ /**
401
+ * Clear SimpleSin authentication information from the current user.
402
+ *
403
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
404
+ *
405
+ * @returns promise
406
+ */
407
+ public static clearHellosignAuth<T>(community_id : string): AxiosPromise<Response<T>> {
408
+
409
+ return Requests.processRoute(CommunitiesRoute.routes.clearHellosignAuth, {}, {community_id : community_id});
410
+ }
411
+
412
+ /**
413
+ * List all the saved email templates for the community.
414
+ *
415
+ * @see https://api.glitch.fun/api/documentation#/Community%20Route/resourceCommunityList
416
+ *
417
+ * @returns promise
418
+ */
419
+ public static listEmailTemplates<T>(community_id : string, params?: Record<string, any>) : AxiosPromise<Response<T>> {
420
+ return Requests.processRoute(CommunitiesRoute.routes.listEmailTemplates, undefined, {community_id : community_id}, params);
421
+ }
422
+
423
+ /**
424
+ * Create a new email template for the community
425
+ *
426
+ * @see https://api.glitch.fun/api/documentation#/Community%20Route/newCommunityResourceStorage
427
+ *
428
+ * @param data The data to be passed when creating a community.
429
+ *
430
+ * @returns Promise
431
+ */
432
+ public static createEmailTemplate<T>(community_id : string, data : object, params?: Record<string, any>) : AxiosPromise<Response<T>> {
433
+
434
+ return Requests.processRoute(CommunitiesRoute.routes.createEmailTemplate, data, {community_id : community_id}, params);
435
+ }
436
+
437
+ /**
438
+ * Update an email template for the community.
439
+ *
440
+ * @see https://api.glitch.fun/api/documentation#/Community%20Route/updateCommunityStorage
441
+ *
442
+ * @param community_id The id of the community to update.
443
+ * @param data The data to update.
444
+ *
445
+ * @returns promise
446
+ */
447
+ public static updateEmailTemplate<T>(community_id : string, template_id : string, data : object, params?: Record<string, any>) : AxiosPromise<Response<T>>{
448
+
449
+ return Requests.processRoute(CommunitiesRoute.routes.updateEmailTemplate, data, {community_id : community_id, template_id : template_id}, params);
450
+ }
451
+
452
+ /**
453
+ * Retrieve a single email template for the community.
454
+ *
455
+ * @see https://api.glitch.fun/api/documentation#/Community%20Route/showCommunityStorage
456
+ *
457
+ * @param community_id The id fo the community to retrieve.
458
+ *
459
+ * @returns promise
460
+ */
461
+ public static viewEmailTemplate<T>(community_id : string, template_id : string, params?: Record<string, any>) : AxiosPromise<Response<T>> {
462
+
463
+ return Requests.processRoute(CommunitiesRoute.routes.viewEmailTemplate, {}, {community_id : community_id, template_id : template_id}, params);
464
+ }
465
+
466
+ /**
467
+ * Deletes an email template for the community.
468
+ *
469
+ * @see https://api.glitch.fun/api/documentation#/Community%20Route/destoryCommunityStorage
470
+ *
471
+ * @param community_id The id of the community to delete.
472
+ * @returns promise
473
+ */
474
+ public static deleteEmailTemplate<T>(community_id : string, template_id : string, params?: Record<string, any>) : AxiosPromise<Response<T>> {
475
+
476
+ return Requests.processRoute(CommunitiesRoute.routes.deleteEmailTemplate, {}, {community_id : community_id, template_id : template_id});
477
+ }
376
478
 
377
479
 
378
480
 
@@ -5,6 +5,17 @@ import { AxiosPromise } from "axios";
5
5
 
6
6
  class Influencers {
7
7
 
8
+ /**
9
+ * Add a new influencer to the platform.
10
+ *
11
+ * @see https://api.glitch.fun/api/documentation#/Influencers/createInfluencersNotes
12
+ *
13
+ * @returns promise
14
+ */
15
+ public static addInfluencer<T>(data?: object, params?: Record<string, any>) : AxiosPromise<Response<T>> {
16
+ return Requests.processRoute(InfluencerRoutes.routes.addInfluencer, data, {}, params);
17
+ }
18
+
8
19
  /**
9
20
  * Get a list of influencers available on he platform.
10
21
  *
package/src/api/Users.ts CHANGED
@@ -304,6 +304,18 @@ class Users {
304
304
  return Requests.processRoute(UserRoutes.routes.clearRedditAuth, {});
305
305
  }
306
306
 
307
+ /**
308
+ * Clear Docusign authentication information from the current user.
309
+ *
310
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/clearDocusignAuth
311
+ *
312
+ * @returns promise
313
+ */
314
+ public static clearDocusignAuth<T>(): AxiosPromise<Response<T>> {
315
+
316
+ return Requests.processRoute(UserRoutes.routes.clearDocusignAuth, {});
317
+ }
318
+
307
319
  /**
308
320
  * Clear Twitter authentication information from the current user.
309
321
  *
@@ -53,7 +53,12 @@ class CampaignsRoute {
53
53
  reviewInfluencerRequest : { url: '/campaigns/{campaign_id}/influencers/{user_id}/review', method: HTTP_METHODS.POST },
54
54
  getRecommendedInfluencers : { url: '/campaigns/{campaign_id}/recommendInfluencers', method: HTTP_METHODS.GET },
55
55
  generateContentForInfluencer : { url: '/campaigns/{campaign_id}/influencers/{user_id}/generatePostContent', method: HTTP_METHODS.POST },
56
- getActiveCampaignLinks : { url: '/campaigns/active', method: HTTP_METHODS.GET },
56
+ getActiveCampaignLinks : { url: '/campaigns/active', method: HTTP_METHODS.GET },
57
+ generateContractFromInvite : { url: '/campaigns/{campaign_id}/influencers/invites/{influencer_id}/contract', method: HTTP_METHODS.POST },
58
+ sendContractWithDocusign : { url: '/campaigns/{campaign_id}/influencers/invites/{influencer_id}/docusign', method: HTTP_METHODS.POST },
59
+ resendAcceptanceEmail : { url: '/campaigns/{campaign_id}/influencers/{user_id}/resendInvite', method: HTTP_METHODS.POST },
60
+
61
+
57
62
  };
58
63
 
59
64
  }
@@ -27,6 +27,14 @@ class CommunitiesRoute {
27
27
  getPaymentMethods : {url : '/communities/{community_id}/payment/methods', method : HTTP_METHODS.GET},
28
28
  setDefaultPaymentMethod : {url : '/communities/{community_id}/payment/methods/default', method : HTTP_METHODS.POST},
29
29
  getLedger : {url : '/communities/{community_id}/payment/ledger', method : HTTP_METHODS.GET},
30
+ clearDocusignAuth : { url: '/communities/{community_id}/clearDocusignAuth', method: HTTP_METHODS.DELETE },
31
+ clearHellosignAuth : { url: '/communities/{community_id}/clearHellosignAuth', method: HTTP_METHODS.DELETE },
32
+ clearSimplesignAuth : { url: '/communities/{community_id}/clearSimplesignAuth', method: HTTP_METHODS.DELETE },
33
+ listEmailTemplates : { url: '/communities/{community_id}/emails/templates', method: HTTP_METHODS.GET },
34
+ createEmailTemplate: { url: '/communities/{community_id}/emails/templates', method: HTTP_METHODS.POST },
35
+ viewEmailTemplate : { url: '/communities/{community_id}/emails/templates/{template_id}', method: HTTP_METHODS.GET },
36
+ updateEmailTemplate :{ url: '/communities/{community_id}/emails/templates/{template_id}', method: HTTP_METHODS.PUT },
37
+ deleteEmailTemplate : { url: '/communities/{community_id}/emails/templates/{template_id}', method: HTTP_METHODS.DELETE },
30
38
 
31
39
  };
32
40
 
@@ -4,6 +4,7 @@ import HTTP_METHODS from "../constants/HttpMethods";
4
4
  class InfluencerRoutes {
5
5
 
6
6
  public static routes: { [key: string]: Route } = {
7
+ addInfluencer : { url: '/influencers', method: HTTP_METHODS.POST },
7
8
  listInfluencers: { url: '/influencers', method: HTTP_METHODS.GET },
8
9
  viewInfluencer: { url: '/influencers/{influencer_id}', method: HTTP_METHODS.GET },
9
10
  generateProfile: { url: '/influencers/{influencer_id}/generateProfile', method: HTTP_METHODS.POST },
@@ -23,6 +23,7 @@ class UserRoutes {
23
23
  clearYoutubeAuth : { url: '/users/clearYoutubeAuth', method: HTTP_METHODS.DELETE },
24
24
  clearRedditAuth : { url: '/users/clearRedditAuth', method: HTTP_METHODS.DELETE },
25
25
  clearTwitterAuth : { url: '/users/clearTwitterAuth', method: HTTP_METHODS.DELETE },
26
+ clearDocusignAuth : { url: '/users/clearDocusignAuth', method: HTTP_METHODS.DELETE },
26
27
  clearStreamElementsAuth : { url: '/users/clearStreamElementsAuth', method: HTTP_METHODS.DELETE },
27
28
  getTipsReceivedForMonth : { url: '/users/getTipsReceivedForMonth', method: HTTP_METHODS.GET },
28
29
  getTipsGivenForMonth : { url: '/users/getTipsGivenForMonth', method: HTTP_METHODS.GET },