@stacksjs/payments 0.70.23 → 0.70.25
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/README.md +1 -1
- package/dist/index.js +8 -4891
- package/dist/{charge.d.ts → src/billable/charge.d.ts} +3 -3
- package/dist/{checkout.d.ts → src/billable/checkout.d.ts} +3 -3
- package/dist/{customer.d.ts → src/billable/customer.d.ts} +3 -3
- package/dist/src/billable/index.d.ts +13 -0
- package/dist/{intent.d.ts → src/billable/intent.d.ts} +3 -3
- package/dist/src/billable/invoice.d.ts +6 -0
- package/dist/{payment-method.d.ts → src/billable/payment-method.d.ts} +12 -9
- package/dist/{price.d.ts → src/billable/price.d.ts} +2 -1
- package/dist/src/billable/product.d.ts +37 -0
- package/dist/src/billable/setup-products.d.ts +2 -0
- package/dist/{subscription.d.ts → src/billable/subscription.d.ts} +4 -3
- package/dist/src/billable/transaction.d.ts +14 -0
- package/dist/src/billable/webhook.d.ts +130 -0
- package/dist/src/drivers/stripe.d.ts +8 -0
- package/dist/src/index.d.ts +13 -0
- package/dist/src/payment.d.ts +147 -0
- package/package.json +16 -9
- package/dist/index.d.ts +0 -3
- package/dist/invoice.d.ts +0 -6
- package/dist/setup-products.d.ts +0 -12
- package/dist/stripe.d.ts +0 -146
- package/dist/transaction.d.ts +0 -8
package/dist/stripe.d.ts
DELETED
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
declare const apiKey: unknown;
|
|
2
|
-
export declare interface 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 paymentIntent: PaymentIntent;
|
|
9
|
-
export declare interface Balance {
|
|
10
|
-
retrieve: () => Promise<Stripe.Response<Stripe.Balance>>
|
|
11
|
-
}
|
|
12
|
-
export declare const balance: Balance;
|
|
13
|
-
export declare interface Customer {
|
|
14
|
-
create: (params: Stripe.CustomerCreateParams) => Promise<Stripe.Response<Stripe.Customer>>
|
|
15
|
-
update: (stripeId: string, params: Stripe.CustomerCreateParams) => Promise<Stripe.Response<Stripe.Customer>>
|
|
16
|
-
del: (stripeId: string) => Promise<Stripe.Response<Stripe.DeletedCustomer>>
|
|
17
|
-
retrieve: (stripeId: string) => Promise<Stripe.Response<Stripe.Customer | Stripe.DeletedCustomer>>
|
|
18
|
-
}
|
|
19
|
-
export declare const customer: Customer;
|
|
20
|
-
export declare interface Charge {
|
|
21
|
-
create: (params: Stripe.ChargeCreateParams) => Promise<Stripe.Response<Stripe.Charge>>
|
|
22
|
-
update: (stripeId: string, params: Stripe.ChargeCreateParams) => Promise<Stripe.Response<Stripe.Charge>>
|
|
23
|
-
capture: (stripeId: string) => Promise<Stripe.Response<Stripe.Charge>>
|
|
24
|
-
retrieve: (stripeId: string) => Promise<Stripe.Response<Stripe.Charge>>
|
|
25
|
-
}
|
|
26
|
-
export declare const charge: Charge;
|
|
27
|
-
export declare interface Subscription {
|
|
28
|
-
create: (params: Stripe.SubscriptionCreateParams) => Promise<Stripe.Response<Stripe.Subscription>>
|
|
29
|
-
update: (id: string, params: Stripe.SubscriptionUpdateParams) => Promise<Stripe.Response<Stripe.Subscription>>
|
|
30
|
-
list: (params: Stripe.SubscriptionListParams) => Promise<Stripe.ApiListPromise<Stripe.Subscription>>
|
|
31
|
-
retrieve: (id: string, params?: Stripe.SubscriptionRetrieveParams) => Promise<Stripe.Response<Stripe.Subscription>>
|
|
32
|
-
cancel: (id: string, params?: Stripe.SubscriptionCancelParams) => Promise<Stripe.Response<Stripe.Subscription>>
|
|
33
|
-
}
|
|
34
|
-
export declare const subscription: Subscription;
|
|
35
|
-
export declare interface SubscriptionItems {
|
|
36
|
-
create: (params: Stripe.SubscriptionItemCreateParams) => Promise<Stripe.Response<Stripe.SubscriptionItem>>
|
|
37
|
-
update: (id: string, params: Stripe.SubscriptionItemUpdateParams) => Promise<Stripe.Response<Stripe.SubscriptionItem>>
|
|
38
|
-
retrieve: (id: string) => Promise<Stripe.Response<Stripe.SubscriptionItem>>
|
|
39
|
-
delete: (id: string) => Promise<Stripe.Response<Stripe.DeletedSubscriptionItem>>
|
|
40
|
-
}
|
|
41
|
-
export declare const subscriptionItems: SubscriptionItems;
|
|
42
|
-
export declare interface Price {
|
|
43
|
-
retrieve: (priceId: string, params: Stripe.PriceRetrieveParams) => Promise<Stripe.Response<Stripe.Price>>
|
|
44
|
-
list: (params: Stripe.PriceListParams) => Promise<Stripe.ApiListPromise<Stripe.Price>>
|
|
45
|
-
create: (params: Stripe.PriceCreateParams) => Promise<Stripe.Response<Stripe.Price>>
|
|
46
|
-
update: (priceId: string, params: Stripe.PriceUpdateParams) => Promise<Stripe.Response<Stripe.Price>>
|
|
47
|
-
}
|
|
48
|
-
export declare const price: Price;
|
|
49
|
-
export declare interface Product {
|
|
50
|
-
create: (params: Stripe.ProductCreateParams) => Promise<Stripe.Response<Stripe.Product>>
|
|
51
|
-
retrieve: (productId: string, params?: Stripe.ProductRetrieveParams) => Promise<Stripe.Response<Stripe.Product>>
|
|
52
|
-
update: (productId: string, params: Stripe.ProductUpdateParams) => Promise<Stripe.Response<Stripe.Product>>
|
|
53
|
-
delete: (productId: string) => Promise<Stripe.Response<Stripe.DeletedProduct>>
|
|
54
|
-
list: (params?: Stripe.ProductListParams) => Promise<Stripe.ApiListPromise<Stripe.Product>>
|
|
55
|
-
getOrCreate: (productName: string, createParams: Stripe.ProductCreateParams) => Promise<Stripe.Product>
|
|
56
|
-
}
|
|
57
|
-
export declare const product: Product;
|
|
58
|
-
export declare interface Refund {
|
|
59
|
-
create: (params: Stripe.RefundCreateParams) => Promise<Stripe.Response<Stripe.Refund>>
|
|
60
|
-
retrieve: (refundId: string) => Promise<Stripe.Response<Stripe.Refund>>
|
|
61
|
-
update: (refundId: string, params: Stripe.RefundUpdateParams) => Promise<Stripe.Response<Stripe.Refund>>
|
|
62
|
-
list: (params: Stripe.RefundListParams) => Promise<Stripe.Response<Stripe.ApiList<Stripe.Refund>>>
|
|
63
|
-
}
|
|
64
|
-
export declare const refund: Refund;
|
|
65
|
-
export declare interface PaymentMethod {
|
|
66
|
-
create: (params: Stripe.PaymentMethodCreateParams) => Promise<Stripe.Response<Stripe.PaymentMethod>>
|
|
67
|
-
retrieve: (paymentMethodId: string) => Promise<Stripe.Response<Stripe.PaymentMethod>>
|
|
68
|
-
update: (paymentMethodId: string, params?: Stripe.PaymentMethodUpdateParams) => Promise<Stripe.Response<Stripe.PaymentMethod>>
|
|
69
|
-
list: (params: Stripe.PaymentMethodListParams) => Promise<Stripe.Response<Stripe.ApiList<Stripe.PaymentMethod>>>
|
|
70
|
-
attach: (paymentMethodId: string, params: Stripe.PaymentMethodAttachParams) => Promise<Stripe.Response<Stripe.PaymentMethod>>
|
|
71
|
-
detach: (paymentMethodId: string) => Promise<Stripe.Response<Stripe.PaymentMethod>>
|
|
72
|
-
}
|
|
73
|
-
export declare const paymentMethod: PaymentMethod;
|
|
74
|
-
export declare interface BalanceTransactions {
|
|
75
|
-
retrieve: (stripeId: string) => Promise<Stripe.Response<Stripe.BalanceTransaction>>
|
|
76
|
-
list: (limit: number) => Promise<Stripe.Response<Stripe.ApiList<Stripe.BalanceTransaction>>>
|
|
77
|
-
}
|
|
78
|
-
export declare const balanceTransactions: BalanceTransactions;
|
|
79
|
-
export declare interface Checkout {
|
|
80
|
-
create: (params: Stripe.Checkout.SessionCreateParams) => Promise<Stripe.Response<Stripe.Checkout.Session>>
|
|
81
|
-
retrieve: (sessionId: string) => Promise<Stripe.Response<Stripe.Checkout.Session>>
|
|
82
|
-
expire: (sessionId: string) => Promise<Stripe.Response<Stripe.Checkout.Session>>
|
|
83
|
-
list: (params: Stripe.Checkout.SessionListParams) => Promise<Stripe.Response<Stripe.ApiList<Stripe.Checkout.Session>>>
|
|
84
|
-
listLineItems: (sessionId: string, params?: Stripe.Checkout.SessionListLineItemsParams) => Promise<Stripe.Response<Stripe.ApiList<Stripe.LineItem>>>
|
|
85
|
-
}
|
|
86
|
-
export declare const checkout: Checkout;
|
|
87
|
-
export declare interface Dispute {
|
|
88
|
-
retrieve: (stripeId: string) => Promise<Stripe.Response<Stripe.Dispute>>
|
|
89
|
-
update: (stripeId: string, params: Stripe.DisputeUpdateParams) => Promise<Stripe.Response<Stripe.Dispute>>
|
|
90
|
-
close: (stripeId: string) => Promise<Stripe.Response<Stripe.Dispute>>
|
|
91
|
-
list: (limit: number) => Promise<Stripe.Response<Stripe.ApiList<Stripe.Dispute>>>
|
|
92
|
-
}
|
|
93
|
-
export declare const dispute: Dispute;
|
|
94
|
-
export declare interface Tax {
|
|
95
|
-
retrieve: (taxId: string) => Promise<Stripe.Response<Stripe.Tax.Calculation>>
|
|
96
|
-
create: (params: Stripe.Tax.CalculationCreateParams) => Promise<Stripe.Response<Stripe.Tax.Calculation>>
|
|
97
|
-
listTaxCodes: (params?: Stripe.TaxCodeListParams) => Promise<Stripe.Response<Stripe.ApiList<Stripe.TaxCode>>>
|
|
98
|
-
retrieveTaxCode: (taxCodeId: string) => Promise<Stripe.Response<Stripe.TaxCode>>
|
|
99
|
-
}
|
|
100
|
-
export declare const tax: Tax;
|
|
101
|
-
export declare interface Promotion {
|
|
102
|
-
createCoupon: (params: Stripe.CouponCreateParams) => Promise<Stripe.Response<Stripe.Coupon>>
|
|
103
|
-
retrieveCoupon: (couponId: string) => Promise<Stripe.Response<Stripe.Coupon>>
|
|
104
|
-
updateCoupon: (couponId: string, params: Stripe.CouponUpdateParams) => Promise<Stripe.Response<Stripe.Coupon>>
|
|
105
|
-
deleteCoupon: (couponId: string) => Promise<Stripe.Response<Stripe.DeletedCoupon>>
|
|
106
|
-
listCoupons: (params?: Stripe.CouponListParams) => Promise<Stripe.Response<Stripe.ApiList<Stripe.Coupon>>>
|
|
107
|
-
createPromoCode: (params: Stripe.PromotionCodeCreateParams) => Promise<Stripe.Response<Stripe.PromotionCode>>
|
|
108
|
-
retrievePromoCode: (promoCodeId: string) => Promise<Stripe.Response<Stripe.PromotionCode>>
|
|
109
|
-
updatePromoCode: (promoCodeId: string, params: Stripe.PromotionCodeUpdateParams) => Promise<Stripe.Response<Stripe.PromotionCode>>
|
|
110
|
-
listPromoCodes: (params?: Stripe.PromotionCodeListParams) => Promise<Stripe.Response<Stripe.ApiList<Stripe.PromotionCode>>>
|
|
111
|
-
}
|
|
112
|
-
export declare const promotion: Promotion;
|
|
113
|
-
export declare interface PaymentEvents {
|
|
114
|
-
retrieve: (stripeId: string) => Promise<Stripe.Response<Stripe.Event>>
|
|
115
|
-
list: (limit: number) => Promise<Stripe.Response<Stripe.ApiList<Stripe.Event>>>
|
|
116
|
-
}
|
|
117
|
-
export declare const events: PaymentEvents;
|
|
118
|
-
export declare interface PaymentCoupons {
|
|
119
|
-
retrieve: (couponId: string) => Promise<Stripe.Response<Stripe.Coupon>>
|
|
120
|
-
list: (limit: number) => Promise<Stripe.Response<Stripe.ApiList<Stripe.Coupon>>>
|
|
121
|
-
create: (params: Stripe.CouponCreateParams) => Promise<Stripe.Response<Stripe.Coupon>>
|
|
122
|
-
delete: (couponId: string) => Promise<Stripe.Response<Stripe.DeletedCoupon>>
|
|
123
|
-
}
|
|
124
|
-
export declare const coupons: PaymentCoupons;
|
|
125
|
-
export declare interface PaymentPromotionCodes {
|
|
126
|
-
retrieve: (promotionCodeId: string) => Promise<Stripe.Response<Stripe.PromotionCode>>
|
|
127
|
-
list: (params: Stripe.PromotionCodeListParams) => Promise<Stripe.Response<Stripe.ApiList<Stripe.PromotionCode>>>
|
|
128
|
-
create: (params: Stripe.PromotionCodeCreateParams) => Promise<Stripe.Response<Stripe.PromotionCode>>
|
|
129
|
-
}
|
|
130
|
-
export declare const promotionCodes: PaymentPromotionCodes;
|
|
131
|
-
export declare interface SetupIntents {
|
|
132
|
-
retrieve: (setupIntentId: string) => Promise<Stripe.Response<Stripe.SetupIntent>>
|
|
133
|
-
list: (params: Stripe.SetupIntentListParams) => Promise<Stripe.Response<Stripe.ApiList<Stripe.SetupIntent>>>
|
|
134
|
-
create: (params: Stripe.SetupIntentCreateParams) => Promise<Stripe.Response<Stripe.SetupIntent>>
|
|
135
|
-
update: (setupIntentId: string, params: Stripe.SetupIntentUpdateParams) => Promise<Stripe.Response<Stripe.SetupIntent>>
|
|
136
|
-
delete: (setupIntentId: string) => Promise<Stripe.Response<Stripe.SetupIntent>>
|
|
137
|
-
}
|
|
138
|
-
export declare const setupIntents: SetupIntents;
|
|
139
|
-
export declare interface PaymentInvoices {
|
|
140
|
-
retrieve: (invoiceId: string) => Promise<Stripe.Response<Stripe.Invoice>>
|
|
141
|
-
list: (params: Stripe.InvoiceListParams) => Promise<Stripe.Response<Stripe.ApiList<Stripe.Invoice>>>
|
|
142
|
-
create: (params: Stripe.InvoiceCreateParams) => Promise<Stripe.Response<Stripe.Invoice>>
|
|
143
|
-
delete: (invoiceId: string) => Promise<Stripe.Response<Stripe.DeletedInvoice>>
|
|
144
|
-
pay: (invoiceId: string, params?: Stripe.InvoicePayParams) => Promise<Stripe.Response<Stripe.Invoice>>
|
|
145
|
-
}
|
|
146
|
-
export declare const invoices: PaymentInvoices;
|
package/dist/transaction.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { PaymentTransactionsTable } from '../../../../orm/src/models/PaymentTransaction';
|
|
2
|
-
import type { UserModel } from '../../../../orm/src/models/User';
|
|
3
|
-
|
|
4
|
-
export declare interface ManageTransaction {
|
|
5
|
-
store: (user: UserModel, productId: number) => Promise<PaymentTransactionsTable | undefined>
|
|
6
|
-
list: (user: UserModel) => Promise<PaymentTransactionsTable[]>
|
|
7
|
-
}
|
|
8
|
-
export declare const manageTransaction: ManageTransaction;
|