glitch-javascript-sdk 0.5.0 → 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
@@ -1797,7 +1797,15 @@ declare class TipPackagePurchases {
1797
1797
  *
1798
1798
  * @returns A promise
1799
1799
  */
1800
- static stripePaymentIntent<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
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>>;
1801
1809
  }
1802
1810
 
1803
1811
  interface Route {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "0.5.0",
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",
@@ -24,8 +24,19 @@ class TipPackagePurchases {
24
24
  *
25
25
  * @returns A promise
26
26
  */
27
- public static stripePaymentIntent<T>(data? : object, params?: Record<string, any>) : AxiosPromise<Response<T>> {
28
- return Requests.processRoute(TipPackagePurchaseRoute.routes.stripePaymentIntent, data, {}, params);
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);
29
40
  }
30
41
 
31
42
  }
@@ -5,7 +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
- stripePaymentIntent: { url: '/tipspackagepurchases/stripepaymentintent', method: HTTP_METHODS.POST },
8
+ getStripePaymentIntent: { url: '/tipspackagepurchases/getstripepaymentintent', method: HTTP_METHODS.POST },
9
+ processStripePaymentIntent: { url: '/tipspackagepurchases/processstripepaymentintent', method: HTTP_METHODS.POST },
9
10
 
10
11
  };
11
12