@stacksjs/payments 0.59.11 → 0.61.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/payments",
3
3
  "type": "module",
4
- "version": "0.59.11",
4
+ "version": "0.61.1",
5
5
  "description": "The Stacks payments package. Currently supporting Stripe.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -51,8 +51,8 @@
51
51
  },
52
52
  "dependencies": {
53
53
  "@stacksjs/utils": "latest",
54
- "@stripe/stripe-js": "^3.0.7",
55
- "stripe": "^14.19.0"
54
+ "@stripe/stripe-js": "^3.4.1",
55
+ "stripe": "^15.7.0"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@stacksjs/config": "latest",
@@ -3,11 +3,11 @@ import Stripe from 'stripe'
3
3
  const apiKey = ''
4
4
 
5
5
  const stripe = new Stripe(apiKey, {
6
- apiVersion: '2023-08-16',
6
+ apiVersion: '2023-10-16',
7
7
  })
8
8
 
9
9
  // TODO: learn about subscriptions
10
- export const paymentIntent = (function () {
10
+ export const paymentIntent = (() => {
11
11
  async function create(params: Stripe.PaymentIntentCreateParams) {
12
12
  return await stripe.paymentIntents.create(params)
13
13
  }
@@ -25,33 +25,33 @@ export const paymentIntent = (function () {
25
25
  }
26
26
 
27
27
  return { create, retrieve, update, cancel }
28
- }())
28
+ })()
29
29
 
30
- export const balance = (function () {
30
+ export const balance = (() => {
31
31
  async function retrieve() {
32
32
  return await stripe.balance.retrieve()
33
33
  }
34
34
 
35
35
  return { retrieve }
36
- }())
36
+ })()
37
37
 
38
- export const customer = (function () {
38
+ export const customer = (() => {
39
39
  async function create(params: Stripe.CustomerCreateParams) {
40
40
  return await stripe.customers.create(params)
41
- };
41
+ }
42
42
 
43
43
  async function update(stripeId: string, params: Stripe.CustomerCreateParams) {
44
44
  return await stripe.customers.update(stripeId, params)
45
- };
45
+ }
46
46
 
47
47
  async function retrieve(stripeId: string) {
48
48
  return await stripe.customers.retrieve(stripeId)
49
- };
49
+ }
50
50
 
51
51
  return { create, update, retrieve }
52
- }())
52
+ })()
53
53
 
54
- export const charge = (function () {
54
+ export const charge = (() => {
55
55
  async function create(params: Stripe.ChargeCreateParams) {
56
56
  return await stripe.charges.create(params)
57
57
  }
@@ -69,9 +69,9 @@ export const charge = (function () {
69
69
  }
70
70
 
71
71
  return { create, update, retrieve, capture }
72
- }())
72
+ })()
73
73
 
74
- export const balanceTransactions = (function () {
74
+ export const balanceTransactions = (() => {
75
75
  async function retrieve(stripeId: string) {
76
76
  await stripe.balanceTransactions.retrieve(stripeId)
77
77
  }
@@ -81,9 +81,9 @@ export const balanceTransactions = (function () {
81
81
  }
82
82
 
83
83
  return { retrieve, list }
84
- }())
84
+ })()
85
85
 
86
- export const dispute = (function () {
86
+ export const dispute = (() => {
87
87
  async function retrieve(stripeId: string) {
88
88
  return await stripe.disputes.retrieve(stripeId)
89
89
  }
@@ -101,9 +101,9 @@ export const dispute = (function () {
101
101
  }
102
102
 
103
103
  return { retrieve, update, close, list }
104
- }())
104
+ })()
105
105
 
106
- export const events = (function () {
106
+ export const events = (() => {
107
107
  async function retrieve(stripeId: string) {
108
108
  await stripe.events.retrieve(stripeId)
109
109
  }
@@ -113,4 +113,4 @@ export const events = (function () {
113
113
  }
114
114
 
115
115
  return { retrieve, list }
116
- }())
116
+ })()
@@ -1,35 +0,0 @@
1
- import Stripe from 'stripe';
2
- export declare const paymentIntent: {
3
- create: (params: Stripe.PaymentIntentCreateParams) => Promise<Stripe.Response<Stripe.PaymentIntent>>;
4
- retrieve: (stripeId: string) => Promise<Stripe.Response<Stripe.PaymentIntent>>;
5
- update: (stripeId: string, params: Stripe.PaymentIntentCreateParams) => Promise<Stripe.Response<Stripe.PaymentIntent>>;
6
- cancel: (stripeId: string) => Promise<Stripe.Response<Stripe.PaymentIntent>>;
7
- };
8
- export declare const balance: {
9
- retrieve: () => Promise<Stripe.Response<Stripe.Balance>>;
10
- };
11
- export declare const customer: {
12
- create: (params: Stripe.CustomerCreateParams) => Promise<Stripe.Response<Stripe.Customer>>;
13
- update: (stripeId: string, params: Stripe.CustomerCreateParams) => Promise<Stripe.Response<Stripe.Customer>>;
14
- retrieve: (stripeId: string) => Promise<Stripe.Response<Stripe.Customer | Stripe.DeletedCustomer>>;
15
- };
16
- export declare const charge: {
17
- create: (params: Stripe.ChargeCreateParams) => Promise<Stripe.Response<Stripe.Charge>>;
18
- update: (stripeId: string, params: Stripe.ChargeCreateParams) => Promise<Stripe.Response<Stripe.Charge>>;
19
- retrieve: (stripeId: string) => Promise<Stripe.Response<Stripe.Charge>>;
20
- capture: (stripeId: string) => Promise<Stripe.Response<Stripe.Charge>>;
21
- };
22
- export declare const balanceTransactions: {
23
- retrieve: (stripeId: string) => Promise<void>;
24
- list: (limit: number) => Promise<void>;
25
- };
26
- export declare const dispute: {
27
- retrieve: (stripeId: string) => Promise<Stripe.Response<Stripe.Dispute>>;
28
- update: (stripeId: string, params: Stripe.DisputeUpdateParams) => Promise<Stripe.Response<Stripe.Dispute>>;
29
- close: (stripeId: string) => Promise<Stripe.Response<Stripe.Dispute>>;
30
- list: (limit: number) => Promise<Stripe.Response<Stripe.ApiList<Stripe.Dispute>>>;
31
- };
32
- export declare const events: {
33
- retrieve: (stripeId: string) => Promise<void>;
34
- list: (limit: number) => Promise<void>;
35
- };
package/dist/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * as stripe from './drivers/stripe';