glitch-javascript-sdk 3.2.14 → 3.2.16

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
@@ -5610,6 +5610,13 @@ declare class Subscriptions {
5610
5610
  * @returns promise
5611
5611
  */
5612
5612
  static listCommunityInfluencerSubscriptions<T>(community_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
5613
+ /**
5614
+ * Check whether the current user can access developer tool creation for a feature.
5615
+ *
5616
+ * @param params { feature: 'social_media'|'influencers'|'ads', community_id?: string, title_id?: string, scheduler_id?: string }
5617
+ * @returns promise
5618
+ */
5619
+ static getDeveloperToolAccess<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
5613
5620
  /**
5614
5621
  * Create a new subscription of a content creator
5615
5622
  *
@@ -5780,6 +5787,30 @@ declare class Feedback {
5780
5787
  * @returns promise
5781
5788
  */
5782
5789
  static viewFeedback<T>(feedback_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
5790
+ /**
5791
+ * List support tickets owned by the logged-in user.
5792
+ */
5793
+ static listSupportTickets<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
5794
+ /**
5795
+ * Create a support ticket for the logged-in user.
5796
+ */
5797
+ static createSupportTicket<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
5798
+ /**
5799
+ * View a support ticket owned by the logged-in user.
5800
+ */
5801
+ static viewSupportTicket<T>(feedback_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
5802
+ /**
5803
+ * Reply to a support ticket owned by the logged-in user.
5804
+ */
5805
+ static replySupportTicket<T>(feedback_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
5806
+ /**
5807
+ * Admin support inbox covering support tickets and feedback.
5808
+ */
5809
+ static adminListFeedback<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
5810
+ static adminViewFeedback<T>(feedback_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
5811
+ static adminUpdateFeedback<T>(feedback_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
5812
+ static adminReplyFeedback<T>(feedback_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
5813
+ static adminRewardFeedback<T>(feedback_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
5783
5814
  /**
5784
5815
  * Submit feedback.
5785
5816
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "3.2.14",
3
+ "version": "3.2.16",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -27,6 +27,57 @@ class Feedback {
27
27
  return Requests.processRoute(FeedbackRoute.routes.viewFeedback, undefined, { feedback_id: feedback_id }, params);
28
28
  }
29
29
 
30
+ /**
31
+ * List support tickets owned by the logged-in user.
32
+ */
33
+ public static listSupportTickets<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
34
+ return Requests.processRoute(FeedbackRoute.routes.listSupportTickets, undefined, undefined, params);
35
+ }
36
+
37
+ /**
38
+ * Create a support ticket for the logged-in user.
39
+ */
40
+ public static createSupportTicket<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
41
+ return Requests.processRoute(FeedbackRoute.routes.createSupportTicket, data, {}, params);
42
+ }
43
+
44
+ /**
45
+ * View a support ticket owned by the logged-in user.
46
+ */
47
+ public static viewSupportTicket<T>(feedback_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
48
+ return Requests.processRoute(FeedbackRoute.routes.viewSupportTicket, undefined, { feedback_id: feedback_id }, params);
49
+ }
50
+
51
+ /**
52
+ * Reply to a support ticket owned by the logged-in user.
53
+ */
54
+ public static replySupportTicket<T>(feedback_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
55
+ return Requests.processRoute(FeedbackRoute.routes.replySupportTicket, data, { feedback_id: feedback_id }, params);
56
+ }
57
+
58
+ /**
59
+ * Admin support inbox covering support tickets and feedback.
60
+ */
61
+ public static adminListFeedback<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
62
+ return Requests.processRoute(FeedbackRoute.routes.adminListFeedback, undefined, undefined, params);
63
+ }
64
+
65
+ public static adminViewFeedback<T>(feedback_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
66
+ return Requests.processRoute(FeedbackRoute.routes.adminViewFeedback, undefined, { feedback_id: feedback_id }, params);
67
+ }
68
+
69
+ public static adminUpdateFeedback<T>(feedback_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
70
+ return Requests.processRoute(FeedbackRoute.routes.adminUpdateFeedback, data, { feedback_id: feedback_id }, params);
71
+ }
72
+
73
+ public static adminReplyFeedback<T>(feedback_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
74
+ return Requests.processRoute(FeedbackRoute.routes.adminReplyFeedback, data, { feedback_id: feedback_id }, params);
75
+ }
76
+
77
+ public static adminRewardFeedback<T>(feedback_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
78
+ return Requests.processRoute(FeedbackRoute.routes.adminRewardFeedback, data, { feedback_id: feedback_id }, params);
79
+ }
80
+
30
81
  /**
31
82
  * Submit feedback.
32
83
  *
@@ -77,4 +128,4 @@ class Feedback {
77
128
 
78
129
  }
79
130
 
80
- export default Feedback;
131
+ export default Feedback;
@@ -49,6 +49,16 @@ class Subscriptions {
49
49
  return Requests.processRoute(SubscriptionsRoute.routes.listCommunityInfluencerSubscriptions, undefined, { community_id: community_id }, params);
50
50
  }
51
51
 
52
+ /**
53
+ * Check whether the current user can access developer tool creation for a feature.
54
+ *
55
+ * @param params { feature: 'social_media'|'influencers'|'ads', community_id?: string, title_id?: string, scheduler_id?: string }
56
+ * @returns promise
57
+ */
58
+ public static getDeveloperToolAccess<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
59
+ return Requests.processRoute(SubscriptionsRoute.routes.getDeveloperToolAccess, undefined, undefined, params);
60
+ }
61
+
52
62
  /**
53
63
  * Create a new subscription of a content creator
54
64
  *
@@ -185,4 +195,4 @@ class Subscriptions {
185
195
 
186
196
  }
187
197
 
188
- export default Subscriptions;
198
+ export default Subscriptions;
@@ -7,8 +7,17 @@ class FeedbackRoute {
7
7
  listFeedback: { url: '/feedback', method: HTTP_METHODS.GET },
8
8
  sendFeedback: { url: '/feedback', method: HTTP_METHODS.POST },
9
9
  viewFeedback: { url: '/feedback/{feedback_id}', method: HTTP_METHODS.GET },
10
+ listSupportTickets: { url: '/support/tickets', method: HTTP_METHODS.GET },
11
+ createSupportTicket: { url: '/support/tickets', method: HTTP_METHODS.POST },
12
+ viewSupportTicket: { url: '/support/tickets/{feedback_id}', method: HTTP_METHODS.GET },
13
+ replySupportTicket: { url: '/support/tickets/{feedback_id}/replies', method: HTTP_METHODS.POST },
14
+ adminListFeedback: { url: '/admin/support/feedback', method: HTTP_METHODS.GET },
15
+ adminViewFeedback: { url: '/admin/support/feedback/{feedback_id}', method: HTTP_METHODS.GET },
16
+ adminUpdateFeedback: { url: '/admin/support/feedback/{feedback_id}', method: HTTP_METHODS.PUT },
17
+ adminReplyFeedback: { url: '/admin/support/feedback/{feedback_id}/reply', method: HTTP_METHODS.POST },
18
+ adminRewardFeedback: { url: '/admin/support/feedback/{feedback_id}/reward', method: HTTP_METHODS.POST },
10
19
  };
11
20
 
12
21
  }
13
22
 
14
- export default FeedbackRoute;
23
+ export default FeedbackRoute;
@@ -14,6 +14,7 @@ class SubscriptionsRoute {
14
14
  cancelCommunityInfluencerSubscription: { url: '/subscriptions/communities/influencers/{community_id}/{stripe_subscription_id}', method: HTTP_METHODS.DELETE },
15
15
  listCommunityInfluencerSubscriptions: { url: '/subscriptions/communities/influencers/{community_id}', method: HTTP_METHODS.GET },
16
16
  changeCommunityInfluencerSubscription: { url: '/subscriptions/communities/influencers/change/{community_id}', method: HTTP_METHODS.POST },
17
+ getDeveloperToolAccess: { url: '/subscriptions/developer-tools/access', method: HTTP_METHODS.GET },
17
18
 
18
19
  createCustomCommunitySubscription: {
19
20
  url: '/subscriptions/communities/custom/{community_id}',
@@ -34,4 +35,4 @@ class SubscriptionsRoute {
34
35
 
35
36
  }
36
37
 
37
- export default SubscriptionsRoute;
38
+ export default SubscriptionsRoute;