@paykit-sdk/stripe 1.1.7 → 1.1.92

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.
@@ -0,0 +1,53 @@
1
+ import { PaykitProviderOptions, AbstractPayKitProvider, PayKitProvider, CreateCheckoutSchema, Checkout, UpdateCheckoutSchema, CreateCustomerParams, Customer, UpdateCustomerParams, CreateSubscriptionSchema, Subscription, UpdateSubscriptionSchema, CreatePaymentSchema, Payment, UpdatePaymentSchema, CapturePaymentSchema, CreateRefundSchema, Refund, HandleWebhookParams, WebhookEventPayload } from '@paykit-sdk/core';
2
+ import Stripe from 'stripe';
3
+
4
+ interface StripeOptions extends PaykitProviderOptions<Stripe.StripeConfig> {
5
+ apiKey: string;
6
+ }
7
+ declare class StripeProvider extends AbstractPayKitProvider implements PayKitProvider {
8
+ private stripe;
9
+ private opts;
10
+ constructor(opts: StripeOptions);
11
+ readonly providerName = "stripe";
12
+ /**
13
+ * Checkout management
14
+ */
15
+ createCheckout: (params: CreateCheckoutSchema) => Promise<Checkout>;
16
+ retrieveCheckout: (id: string) => Promise<Checkout>;
17
+ updateCheckout: (id: string, params: UpdateCheckoutSchema) => Promise<Checkout>;
18
+ deleteCheckout: (id: string) => Promise<null>;
19
+ /**
20
+ * Customer management
21
+ */
22
+ createCustomer: (params: CreateCustomerParams) => Promise<Customer>;
23
+ updateCustomer: (id: string, params: UpdateCustomerParams) => Promise<Customer>;
24
+ deleteCustomer: (id: string) => Promise<null>;
25
+ retrieveCustomer: (id: string) => Promise<Customer | null>;
26
+ /**
27
+ * Subscription management
28
+ */
29
+ createSubscription: (params: CreateSubscriptionSchema) => Promise<Subscription>;
30
+ cancelSubscription: (id: string) => Promise<Subscription>;
31
+ updateSubscription: (id: string, params: UpdateSubscriptionSchema) => Promise<Subscription>;
32
+ retrieveSubscription: (id: string) => Promise<Subscription>;
33
+ deleteSubscription: (id: string) => Promise<null>;
34
+ /**
35
+ * Payment management
36
+ */
37
+ createPayment: (params: CreatePaymentSchema) => Promise<Payment>;
38
+ updatePayment: (id: string, params: UpdatePaymentSchema) => Promise<Payment>;
39
+ retrievePayment: (id: string) => Promise<Payment | null>;
40
+ deletePayment: (id: string) => Promise<null>;
41
+ capturePayment: (id: string, params: CapturePaymentSchema) => Promise<Payment>;
42
+ cancelPayment: (id: string) => Promise<Payment>;
43
+ /**
44
+ * Refund management
45
+ */
46
+ createRefund: (params: CreateRefundSchema) => Promise<Refund>;
47
+ /**
48
+ * Webhook management
49
+ */
50
+ handleWebhook: (params: HandleWebhookParams) => Promise<Array<WebhookEventPayload>>;
51
+ }
52
+
53
+ export { type StripeOptions, StripeProvider };
@@ -0,0 +1,53 @@
1
+ import { PaykitProviderOptions, AbstractPayKitProvider, PayKitProvider, CreateCheckoutSchema, Checkout, UpdateCheckoutSchema, CreateCustomerParams, Customer, UpdateCustomerParams, CreateSubscriptionSchema, Subscription, UpdateSubscriptionSchema, CreatePaymentSchema, Payment, UpdatePaymentSchema, CapturePaymentSchema, CreateRefundSchema, Refund, HandleWebhookParams, WebhookEventPayload } from '@paykit-sdk/core';
2
+ import Stripe from 'stripe';
3
+
4
+ interface StripeOptions extends PaykitProviderOptions<Stripe.StripeConfig> {
5
+ apiKey: string;
6
+ }
7
+ declare class StripeProvider extends AbstractPayKitProvider implements PayKitProvider {
8
+ private stripe;
9
+ private opts;
10
+ constructor(opts: StripeOptions);
11
+ readonly providerName = "stripe";
12
+ /**
13
+ * Checkout management
14
+ */
15
+ createCheckout: (params: CreateCheckoutSchema) => Promise<Checkout>;
16
+ retrieveCheckout: (id: string) => Promise<Checkout>;
17
+ updateCheckout: (id: string, params: UpdateCheckoutSchema) => Promise<Checkout>;
18
+ deleteCheckout: (id: string) => Promise<null>;
19
+ /**
20
+ * Customer management
21
+ */
22
+ createCustomer: (params: CreateCustomerParams) => Promise<Customer>;
23
+ updateCustomer: (id: string, params: UpdateCustomerParams) => Promise<Customer>;
24
+ deleteCustomer: (id: string) => Promise<null>;
25
+ retrieveCustomer: (id: string) => Promise<Customer | null>;
26
+ /**
27
+ * Subscription management
28
+ */
29
+ createSubscription: (params: CreateSubscriptionSchema) => Promise<Subscription>;
30
+ cancelSubscription: (id: string) => Promise<Subscription>;
31
+ updateSubscription: (id: string, params: UpdateSubscriptionSchema) => Promise<Subscription>;
32
+ retrieveSubscription: (id: string) => Promise<Subscription>;
33
+ deleteSubscription: (id: string) => Promise<null>;
34
+ /**
35
+ * Payment management
36
+ */
37
+ createPayment: (params: CreatePaymentSchema) => Promise<Payment>;
38
+ updatePayment: (id: string, params: UpdatePaymentSchema) => Promise<Payment>;
39
+ retrievePayment: (id: string) => Promise<Payment | null>;
40
+ deletePayment: (id: string) => Promise<null>;
41
+ capturePayment: (id: string, params: CapturePaymentSchema) => Promise<Payment>;
42
+ cancelPayment: (id: string) => Promise<Payment>;
43
+ /**
44
+ * Refund management
45
+ */
46
+ createRefund: (params: CreateRefundSchema) => Promise<Refund>;
47
+ /**
48
+ * Webhook management
49
+ */
50
+ handleWebhook: (params: HandleWebhookParams) => Promise<Array<WebhookEventPayload>>;
51
+ }
52
+
53
+ export { type StripeOptions, StripeProvider };