@clerk/types 4.95.1 → 4.96.0-canary.v20251028231233
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/dist/index.d.mts +14 -9
- package/dist/index.d.ts +14 -9
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -257,15 +257,15 @@ interface BillingPayerMethods {
|
|
|
257
257
|
/**
|
|
258
258
|
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
|
|
259
259
|
*/
|
|
260
|
-
initializePaymentMethod: (params:
|
|
260
|
+
initializePaymentMethod: (params: InitializePaymentMethodParams) => Promise<BillingInitializedPaymentMethodResource>;
|
|
261
261
|
/**
|
|
262
262
|
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
|
|
263
263
|
*/
|
|
264
|
-
addPaymentMethod: (params:
|
|
264
|
+
addPaymentMethod: (params: AddPaymentMethodParams) => Promise<BillingPaymentMethodResource>;
|
|
265
265
|
/**
|
|
266
266
|
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
|
|
267
267
|
*/
|
|
268
|
-
getPaymentMethods: (params
|
|
268
|
+
getPaymentMethods: (params?: GetPaymentMethodsParams) => Promise<ClerkPaginatedResponse<BillingPaymentMethodResource>>;
|
|
269
269
|
}
|
|
270
270
|
/**
|
|
271
271
|
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
|
|
@@ -384,26 +384,26 @@ type BillingPaymentMethodStatus = 'active' | 'expired' | 'disconnected';
|
|
|
384
384
|
/**
|
|
385
385
|
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
|
|
386
386
|
*/
|
|
387
|
-
type GetPaymentMethodsParams =
|
|
387
|
+
type GetPaymentMethodsParams = ClerkPaginationParams;
|
|
388
388
|
/**
|
|
389
389
|
* @inline
|
|
390
390
|
*
|
|
391
391
|
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
|
|
392
392
|
*/
|
|
393
|
-
type PaymentGateway = 'stripe'
|
|
393
|
+
type PaymentGateway = 'stripe';
|
|
394
394
|
/**
|
|
395
395
|
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
|
|
396
396
|
*/
|
|
397
|
-
type InitializePaymentMethodParams =
|
|
397
|
+
type InitializePaymentMethodParams = {
|
|
398
398
|
/**
|
|
399
399
|
* The payment gateway to use.
|
|
400
400
|
*/
|
|
401
401
|
gateway: PaymentGateway;
|
|
402
|
-
}
|
|
402
|
+
};
|
|
403
403
|
/**
|
|
404
404
|
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
|
|
405
405
|
*/
|
|
406
|
-
type AddPaymentMethodParams =
|
|
406
|
+
type AddPaymentMethodParams = {
|
|
407
407
|
/**
|
|
408
408
|
* The payment gateway to use.
|
|
409
409
|
*/
|
|
@@ -412,7 +412,7 @@ type AddPaymentMethodParams = WithOptionalOrgType<{
|
|
|
412
412
|
* A token representing payment details, usually from a payment form.
|
|
413
413
|
*/
|
|
414
414
|
paymentToken: string;
|
|
415
|
-
}
|
|
415
|
+
};
|
|
416
416
|
/**
|
|
417
417
|
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
|
|
418
418
|
*/
|
|
@@ -906,6 +906,10 @@ interface BillingCheckoutResource extends ClerkResource {
|
|
|
906
906
|
* The payer associated with the checkout.
|
|
907
907
|
*/
|
|
908
908
|
payer: BillingPayerResource;
|
|
909
|
+
/**
|
|
910
|
+
* Whether a payment method is required for this checkout.
|
|
911
|
+
*/
|
|
912
|
+
needsPaymentMethod: boolean;
|
|
909
913
|
}
|
|
910
914
|
/**
|
|
911
915
|
* The `BillingPayerResource` type represents a payer associated with a billing subscription.
|
|
@@ -4360,6 +4364,7 @@ interface BillingCheckoutJSON extends ClerkResourceJSON {
|
|
|
4360
4364
|
is_immediate_plan_change: boolean;
|
|
4361
4365
|
free_trial_ends_at: number | null;
|
|
4362
4366
|
payer: BillingPayerJSON;
|
|
4367
|
+
needs_payment_method: boolean;
|
|
4363
4368
|
}
|
|
4364
4369
|
/**
|
|
4365
4370
|
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
|
package/dist/index.d.ts
CHANGED
|
@@ -257,15 +257,15 @@ interface BillingPayerMethods {
|
|
|
257
257
|
/**
|
|
258
258
|
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
|
|
259
259
|
*/
|
|
260
|
-
initializePaymentMethod: (params:
|
|
260
|
+
initializePaymentMethod: (params: InitializePaymentMethodParams) => Promise<BillingInitializedPaymentMethodResource>;
|
|
261
261
|
/**
|
|
262
262
|
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
|
|
263
263
|
*/
|
|
264
|
-
addPaymentMethod: (params:
|
|
264
|
+
addPaymentMethod: (params: AddPaymentMethodParams) => Promise<BillingPaymentMethodResource>;
|
|
265
265
|
/**
|
|
266
266
|
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
|
|
267
267
|
*/
|
|
268
|
-
getPaymentMethods: (params
|
|
268
|
+
getPaymentMethods: (params?: GetPaymentMethodsParams) => Promise<ClerkPaginatedResponse<BillingPaymentMethodResource>>;
|
|
269
269
|
}
|
|
270
270
|
/**
|
|
271
271
|
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
|
|
@@ -384,26 +384,26 @@ type BillingPaymentMethodStatus = 'active' | 'expired' | 'disconnected';
|
|
|
384
384
|
/**
|
|
385
385
|
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
|
|
386
386
|
*/
|
|
387
|
-
type GetPaymentMethodsParams =
|
|
387
|
+
type GetPaymentMethodsParams = ClerkPaginationParams;
|
|
388
388
|
/**
|
|
389
389
|
* @inline
|
|
390
390
|
*
|
|
391
391
|
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
|
|
392
392
|
*/
|
|
393
|
-
type PaymentGateway = 'stripe'
|
|
393
|
+
type PaymentGateway = 'stripe';
|
|
394
394
|
/**
|
|
395
395
|
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
|
|
396
396
|
*/
|
|
397
|
-
type InitializePaymentMethodParams =
|
|
397
|
+
type InitializePaymentMethodParams = {
|
|
398
398
|
/**
|
|
399
399
|
* The payment gateway to use.
|
|
400
400
|
*/
|
|
401
401
|
gateway: PaymentGateway;
|
|
402
|
-
}
|
|
402
|
+
};
|
|
403
403
|
/**
|
|
404
404
|
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
|
|
405
405
|
*/
|
|
406
|
-
type AddPaymentMethodParams =
|
|
406
|
+
type AddPaymentMethodParams = {
|
|
407
407
|
/**
|
|
408
408
|
* The payment gateway to use.
|
|
409
409
|
*/
|
|
@@ -412,7 +412,7 @@ type AddPaymentMethodParams = WithOptionalOrgType<{
|
|
|
412
412
|
* A token representing payment details, usually from a payment form.
|
|
413
413
|
*/
|
|
414
414
|
paymentToken: string;
|
|
415
|
-
}
|
|
415
|
+
};
|
|
416
416
|
/**
|
|
417
417
|
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
|
|
418
418
|
*/
|
|
@@ -906,6 +906,10 @@ interface BillingCheckoutResource extends ClerkResource {
|
|
|
906
906
|
* The payer associated with the checkout.
|
|
907
907
|
*/
|
|
908
908
|
payer: BillingPayerResource;
|
|
909
|
+
/**
|
|
910
|
+
* Whether a payment method is required for this checkout.
|
|
911
|
+
*/
|
|
912
|
+
needsPaymentMethod: boolean;
|
|
909
913
|
}
|
|
910
914
|
/**
|
|
911
915
|
* The `BillingPayerResource` type represents a payer associated with a billing subscription.
|
|
@@ -4360,6 +4364,7 @@ interface BillingCheckoutJSON extends ClerkResourceJSON {
|
|
|
4360
4364
|
is_immediate_plan_change: boolean;
|
|
4361
4365
|
free_trial_ends_at: number | null;
|
|
4362
4366
|
payer: BillingPayerJSON;
|
|
4367
|
+
needs_payment_method: boolean;
|
|
4363
4368
|
}
|
|
4364
4369
|
/**
|
|
4365
4370
|
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
|