glitch-javascript-sdk 0.4.9 → 0.5.1

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
@@ -1790,6 +1790,22 @@ declare class TipPackagePurchases {
1790
1790
  * @returns A promise
1791
1791
  */
1792
1792
  static stripe<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
1793
+ /**
1794
+ * Get a stripe payment intent token.
1795
+ *
1796
+ * @see https://api.glitch.fun/api/documentation#/Authentication%20Route/authLogin
1797
+ *
1798
+ * @returns A promise
1799
+ */
1800
+ static getStripePaymentIntent<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
1801
+ /**
1802
+ * Process the stripe payment intent after payment is complete.
1803
+ *
1804
+ * @see https://api.glitch.fun/api/documentation#/Authentication%20Route/authLogin
1805
+ *
1806
+ * @returns A promise
1807
+ */
1808
+ static processStripePaymentIntent<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
1793
1809
  }
1794
1810
 
1795
1811
  interface Route {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "0.4.9",
3
+ "version": "0.5.1",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -17,6 +17,28 @@ class TipPackagePurchases {
17
17
  return Requests.processRoute(TipPackagePurchaseRoute.routes.stripe, data, {}, params);
18
18
  }
19
19
 
20
+ /**
21
+ * Get a stripe payment intent token.
22
+ *
23
+ * @see https://api.glitch.fun/api/documentation#/Authentication%20Route/authLogin
24
+ *
25
+ * @returns A promise
26
+ */
27
+ public static getStripePaymentIntent<T>(data? : object, params?: Record<string, any>) : AxiosPromise<Response<T>> {
28
+ return Requests.processRoute(TipPackagePurchaseRoute.routes.getStripePaymentIntent, data, {}, params);
29
+ }
30
+
31
+ /**
32
+ * Process the stripe payment intent after payment is complete.
33
+ *
34
+ * @see https://api.glitch.fun/api/documentation#/Authentication%20Route/authLogin
35
+ *
36
+ * @returns A promise
37
+ */
38
+ public static processStripePaymentIntent<T>(data? : object, params?: Record<string, any>) : AxiosPromise<Response<T>> {
39
+ return Requests.processRoute(TipPackagePurchaseRoute.routes.processStripePaymentIntent, data, {}, params);
40
+ }
41
+
20
42
  }
21
43
 
22
44
  export default TipPackagePurchases;
@@ -5,6 +5,8 @@ class TipPackagePurchaseRoute {
5
5
 
6
6
  public static routes: { [key: string]: Route } = {
7
7
  stripe: { url: '/tipspackagepurchases/stripe', method: HTTP_METHODS.POST },
8
+ getStripePaymentIntent: { url: '/tipspackagepurchases/getstripepaymentintent', method: HTTP_METHODS.POST },
9
+ processStripePaymentIntent: { url: '/tipspackagepurchases/processstripepaymentintent', method: HTTP_METHODS.POST },
8
10
 
9
11
  };
10
12