@dodopayments/tanstack 0.1.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/README.md +336 -0
- package/dist/checkout/checkout.d.ts +7 -0
- package/dist/checkout/checkout.d.ts.map +1 -0
- package/dist/customer-portal/customer-portal.d.ts +8 -0
- package/dist/customer-portal/customer-portal.d.ts.map +1 -0
- package/dist/index.cjs +3640 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3636 -0
- package/dist/index.js.map +1 -0
- package/dist/webhooks/webhooks.d.ts +3 -0
- package/dist/webhooks/webhooks.d.ts.map +1 -0
- package/package.json +56 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as undici_types from 'undici-types';
|
|
2
|
+
import { CheckoutHandlerConfig } from '@dodopayments/core/checkout';
|
|
3
|
+
import { WebhookHandlerConfig } from '@dodopayments/core/webhook';
|
|
4
|
+
import { ClientOptions } from 'dodopayments';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* TanStack React Start Checkout handler
|
|
8
|
+
* Usage: export const GET = Checkout(config); export const POST = Checkout(config);
|
|
9
|
+
*/
|
|
10
|
+
declare function Checkout(config: CheckoutHandlerConfig): (request: Request) => Promise<undici_types.Response>;
|
|
11
|
+
|
|
12
|
+
declare const Webhooks: ({ webhookKey, ...eventHandlers }: WebhookHandlerConfig) => (request: Request) => Promise<undici_types.Response>;
|
|
13
|
+
|
|
14
|
+
type CustomerPortalConfig = Pick<ClientOptions, "environment" | "bearerToken">;
|
|
15
|
+
/**
|
|
16
|
+
* TanStack React Start Customer Portal handler
|
|
17
|
+
* Usage: export const GET = CustomerPortal(config);
|
|
18
|
+
*/
|
|
19
|
+
declare function CustomerPortal({ bearerToken, environment, }: CustomerPortalConfig): (request: Request) => Promise<undici_types.Response>;
|
|
20
|
+
|
|
21
|
+
export { Checkout, CustomerPortal, Webhooks };
|
|
22
|
+
export type { CustomerPortalConfig };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mCAAmC,CAAC"}
|