@stacksjs/payments 0.75.80 → 0.75.81

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.
@@ -1,30 +1,35 @@
1
+ import { manageConnectedAccount } from './account';
2
+ import { manageConnectWebhook } from './webhook';
3
+ import { manageDestinationCharge } from './charge';
4
+ import { managePayout } from './payout';
5
+ import { manageTransfer } from './transfer';
1
6
  /**
2
7
  * Grouped Connect surface, reached as `Payment.connect.*`.
3
8
  */
4
9
  export declare const connect: {
5
- createAccount: unknown;
6
- createTestAccount: unknown;
7
- onboardingLink: unknown;
8
- accountStatus: unknown;
9
- retrieveAccount: unknown;
10
- destinationCharge: unknown;
11
- applicationFeeFor: unknown;
12
- createTransfer: unknown;
13
- reverseTransfer: unknown;
14
- listTransfers: unknown;
15
- retrieveTransfer: unknown;
16
- listPayouts: unknown;
17
- retrievePayout: unknown;
18
- accountBalance: unknown;
19
- onAccount: unknown;
20
- onPayout: unknown;
21
- getAccount: unknown;
22
- getPayout: unknown;
23
- getConnectedAccountId: unknown;
24
- account: unknown;
25
- charge: unknown;
26
- transfer: unknown;
27
- payout: unknown
10
+ createAccount: typeof manageConnectedAccount.createConnectedAccount;
11
+ createTestAccount: typeof manageConnectedAccount.createTestConnectedAccount;
12
+ onboardingLink: typeof manageConnectedAccount.accountOnboardingLink;
13
+ accountStatus: typeof manageConnectedAccount.accountStatus;
14
+ retrieveAccount: typeof manageConnectedAccount.retrieveConnectedAccount;
15
+ destinationCharge: typeof manageDestinationCharge.destinationCharge;
16
+ applicationFeeFor: typeof manageDestinationCharge.applicationFeeFor;
17
+ createTransfer: typeof manageTransfer.createTransfer;
18
+ reverseTransfer: typeof manageTransfer.reverseTransfer;
19
+ listTransfers: typeof manageTransfer.listTransfers;
20
+ retrieveTransfer: typeof manageTransfer.retrieveTransfer;
21
+ listPayouts: typeof managePayout.listPayouts;
22
+ retrievePayout: typeof managePayout.retrievePayout;
23
+ accountBalance: typeof managePayout.accountBalance;
24
+ onAccount: typeof manageConnectWebhook.onAccount;
25
+ onPayout: typeof manageConnectWebhook.onPayout;
26
+ getAccount: typeof manageConnectWebhook.getAccount;
27
+ getPayout: typeof manageConnectWebhook.getPayout;
28
+ getConnectedAccountId: typeof manageConnectWebhook.getConnectedAccountId;
29
+ account: typeof manageConnectedAccount;
30
+ charge: typeof manageDestinationCharge;
31
+ transfer: typeof manageTransfer;
32
+ payout: typeof managePayout
28
33
  };
29
34
  /**
30
35
  * Stripe Connect
package/dist/payment.d.ts CHANGED
@@ -1,3 +1,12 @@
1
+ import { connect } from './connect/index';
2
+ import { manageCoupon, managePriceExtended, manageProduct } from './billable/product';
3
+ import { manageCustomer } from './billable/customer';
4
+ import { manageInvoice } from './billable/invoice';
5
+ import { managePaymentMethod } from './billable/payment-method';
6
+ import { manageSubscription } from './billable/subscription';
7
+ import { manageWebhook, onCharge, onCheckout, onInvoice, onPaymentIntent, onSubscription, processWebhook } from './billable/webhook';
8
+ import { paymentDriver } from './driver/index';
9
+ import { stripe } from './drivers/stripe';
1
10
  import type { UserModel } from '@stacksjs/orm';
2
11
  import type Stripe from 'stripe';
3
12
  /**
@@ -140,5 +149,57 @@ export declare function billingPortal(customer: string | UserModel, options?: {
140
149
  // =============================================================================
141
150
  // Payment Facade Object
142
151
  // =============================================================================
143
- export declare const Payment: {};
152
+ export declare const Payment: {
153
+ /**
154
+ * The provider-neutral driver `config.payment.driver` selects - Stripe or
155
+ * Adyen - with money in minor units and statuses of our own. The functions
156
+ * below are Stripe's and return Stripe objects.
157
+ */
158
+ driver: typeof paymentDriver;
159
+ charge: typeof charge;
160
+ createPayment: typeof createPayment;
161
+ refund: typeof refund;
162
+ checkout: typeof checkout;
163
+ subscriptionCheckout: typeof subscriptionCheckout;
164
+ subscribe: typeof subscribe;
165
+ cancelSubscription: typeof cancelSubscription;
166
+ hasActiveSubscription: typeof hasActiveSubscription;
167
+ changeSubscription: typeof changeSubscription;
168
+ getOrCreateCustomer: typeof getOrCreateCustomer;
169
+ updateCustomer: typeof updateCustomer;
170
+ deleteCustomer: typeof deleteCustomer;
171
+ addPaymentMethod: typeof addPaymentMethod;
172
+ setDefaultPaymentMethod: typeof setDefaultPaymentMethod;
173
+ removePaymentMethod: typeof removePaymentMethod;
174
+ createSetupIntent: typeof createSetupIntent;
175
+ getInvoices: typeof getInvoices;
176
+ createInvoice: typeof createInvoice;
177
+ payInvoice: typeof payInvoice;
178
+ createProduct: typeof createProduct;
179
+ getPrice: typeof getPrice;
180
+ listProducts: typeof listProducts;
181
+ billingPortal: typeof billingPortal;
182
+ createCoupon: typeof createCoupon;
183
+ createPromoCode: typeof createPromoCode;
184
+ validatePromoCode: typeof validatePromoCode;
185
+ formatAmount: typeof formatAmount;
186
+ toCents: typeof toCents;
187
+ toDollars: typeof toDollars;
188
+ webhook: typeof manageWebhook;
189
+ onPaymentIntent: typeof onPaymentIntent;
190
+ onSubscription: typeof onSubscription;
191
+ onInvoice: typeof onInvoice;
192
+ onCheckout: typeof onCheckout;
193
+ onCharge: typeof onCharge;
194
+ processWebhook: typeof processWebhook;
195
+ connect: typeof connect;
196
+ stripe: typeof stripe;
197
+ customer: typeof manageCustomer;
198
+ subscription: typeof manageSubscription;
199
+ invoice: typeof manageInvoice;
200
+ paymentMethod: typeof managePaymentMethod;
201
+ product: typeof manageProduct;
202
+ price: typeof managePriceExtended;
203
+ coupon: typeof manageCoupon
204
+ };
144
205
  export default Payment;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/payments",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.75.80",
5
+ "version": "0.75.81",
6
6
  "description": "The Stacks payments package. Currently supporting Stripe.",
7
7
  "author": "Chris Breuer",
8
8
  "contributors": [
@@ -60,12 +60,12 @@
60
60
  "prepublishOnly": "bun run build"
61
61
  },
62
62
  "dependencies": {
63
- "@stacksjs/config": "0.75.80",
64
- "@stacksjs/database": "0.75.80",
65
- "@stacksjs/error-handling": "0.75.80",
66
- "@stacksjs/logging": "0.75.80",
67
- "@stacksjs/orm": "0.75.80",
68
- "@stacksjs/types": "0.75.80"
63
+ "@stacksjs/config": "0.75.81",
64
+ "@stacksjs/database": "0.75.81",
65
+ "@stacksjs/error-handling": "0.75.81",
66
+ "@stacksjs/logging": "0.75.81",
67
+ "@stacksjs/orm": "0.75.81",
68
+ "@stacksjs/types": "0.75.81"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "@stripe/stripe-js": "^10.0.0",
@@ -80,7 +80,7 @@
80
80
  }
81
81
  },
82
82
  "devDependencies": {
83
- "@stacksjs/utils": "0.75.80",
83
+ "@stacksjs/utils": "0.75.81",
84
84
  "@stripe/stripe-js": "^10.0.0",
85
85
  "better-dx": "^0.2.24",
86
86
  "stripe": "23.0.0"