@modelrelay/sdk 0.18.0 → 0.19.0
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.cjs +6 -8
- package/dist/index.d.cts +6 -5
- package/dist/index.d.ts +6 -5
- package/dist/index.js +6 -8
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -347,7 +347,7 @@ function isTokenReusable(token) {
|
|
|
347
347
|
// package.json
|
|
348
348
|
var package_default = {
|
|
349
349
|
name: "@modelrelay/sdk",
|
|
350
|
-
version: "0.
|
|
350
|
+
version: "0.19.0",
|
|
351
351
|
description: "TypeScript SDK for the ModelRelay API",
|
|
352
352
|
type: "module",
|
|
353
353
|
main: "dist/index.cjs",
|
|
@@ -2061,14 +2061,15 @@ var TiersClient = class {
|
|
|
2061
2061
|
/**
|
|
2062
2062
|
* Create a Stripe checkout session for a tier (Stripe-first flow).
|
|
2063
2063
|
*
|
|
2064
|
-
* This enables users to subscribe before authenticating.
|
|
2065
|
-
*
|
|
2066
|
-
* customer
|
|
2064
|
+
* This enables users to subscribe before authenticating. Stripe collects
|
|
2065
|
+
* the customer's email during checkout. After checkout completes, a
|
|
2066
|
+
* customer record is created with the email from Stripe. The customer
|
|
2067
|
+
* can later be linked to an identity via POST /customers/claim.
|
|
2067
2068
|
*
|
|
2068
2069
|
* Requires a secret key (mr_sk_*).
|
|
2069
2070
|
*
|
|
2070
2071
|
* @param tierId - The tier ID to create a checkout session for
|
|
2071
|
-
* @param request - Checkout session request with
|
|
2072
|
+
* @param request - Checkout session request with redirect URLs
|
|
2072
2073
|
* @returns Checkout session with Stripe URL
|
|
2073
2074
|
*/
|
|
2074
2075
|
async checkout(tierId, request) {
|
|
@@ -2076,9 +2077,6 @@ var TiersClient = class {
|
|
|
2076
2077
|
if (!tierId?.trim()) {
|
|
2077
2078
|
throw new ConfigError("tierId is required");
|
|
2078
2079
|
}
|
|
2079
|
-
if (!request.email?.trim()) {
|
|
2080
|
-
throw new ConfigError("email is required");
|
|
2081
|
-
}
|
|
2082
2080
|
if (!request.success_url?.trim()) {
|
|
2083
2081
|
throw new ConfigError("success_url is required");
|
|
2084
2082
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -910,9 +910,9 @@ interface Tier {
|
|
|
910
910
|
}
|
|
911
911
|
/**
|
|
912
912
|
* Request to create a tier checkout session (Stripe-first flow).
|
|
913
|
+
* Stripe collects the customer's email during checkout.
|
|
913
914
|
*/
|
|
914
915
|
interface TierCheckoutRequest {
|
|
915
|
-
email: string;
|
|
916
916
|
success_url: string;
|
|
917
917
|
cancel_url: string;
|
|
918
918
|
}
|
|
@@ -947,14 +947,15 @@ declare class TiersClient {
|
|
|
947
947
|
/**
|
|
948
948
|
* Create a Stripe checkout session for a tier (Stripe-first flow).
|
|
949
949
|
*
|
|
950
|
-
* This enables users to subscribe before authenticating.
|
|
951
|
-
*
|
|
952
|
-
* customer
|
|
950
|
+
* This enables users to subscribe before authenticating. Stripe collects
|
|
951
|
+
* the customer's email during checkout. After checkout completes, a
|
|
952
|
+
* customer record is created with the email from Stripe. The customer
|
|
953
|
+
* can later be linked to an identity via POST /customers/claim.
|
|
953
954
|
*
|
|
954
955
|
* Requires a secret key (mr_sk_*).
|
|
955
956
|
*
|
|
956
957
|
* @param tierId - The tier ID to create a checkout session for
|
|
957
|
-
* @param request - Checkout session request with
|
|
958
|
+
* @param request - Checkout session request with redirect URLs
|
|
958
959
|
* @returns Checkout session with Stripe URL
|
|
959
960
|
*/
|
|
960
961
|
checkout(tierId: string, request: TierCheckoutRequest): Promise<TierCheckoutSession>;
|
package/dist/index.d.ts
CHANGED
|
@@ -910,9 +910,9 @@ interface Tier {
|
|
|
910
910
|
}
|
|
911
911
|
/**
|
|
912
912
|
* Request to create a tier checkout session (Stripe-first flow).
|
|
913
|
+
* Stripe collects the customer's email during checkout.
|
|
913
914
|
*/
|
|
914
915
|
interface TierCheckoutRequest {
|
|
915
|
-
email: string;
|
|
916
916
|
success_url: string;
|
|
917
917
|
cancel_url: string;
|
|
918
918
|
}
|
|
@@ -947,14 +947,15 @@ declare class TiersClient {
|
|
|
947
947
|
/**
|
|
948
948
|
* Create a Stripe checkout session for a tier (Stripe-first flow).
|
|
949
949
|
*
|
|
950
|
-
* This enables users to subscribe before authenticating.
|
|
951
|
-
*
|
|
952
|
-
* customer
|
|
950
|
+
* This enables users to subscribe before authenticating. Stripe collects
|
|
951
|
+
* the customer's email during checkout. After checkout completes, a
|
|
952
|
+
* customer record is created with the email from Stripe. The customer
|
|
953
|
+
* can later be linked to an identity via POST /customers/claim.
|
|
953
954
|
*
|
|
954
955
|
* Requires a secret key (mr_sk_*).
|
|
955
956
|
*
|
|
956
957
|
* @param tierId - The tier ID to create a checkout session for
|
|
957
|
-
* @param request - Checkout session request with
|
|
958
|
+
* @param request - Checkout session request with redirect URLs
|
|
958
959
|
* @returns Checkout session with Stripe URL
|
|
959
960
|
*/
|
|
960
961
|
checkout(tierId: string, request: TierCheckoutRequest): Promise<TierCheckoutSession>;
|
package/dist/index.js
CHANGED
|
@@ -261,7 +261,7 @@ function isTokenReusable(token) {
|
|
|
261
261
|
// package.json
|
|
262
262
|
var package_default = {
|
|
263
263
|
name: "@modelrelay/sdk",
|
|
264
|
-
version: "0.
|
|
264
|
+
version: "0.19.0",
|
|
265
265
|
description: "TypeScript SDK for the ModelRelay API",
|
|
266
266
|
type: "module",
|
|
267
267
|
main: "dist/index.cjs",
|
|
@@ -1975,14 +1975,15 @@ var TiersClient = class {
|
|
|
1975
1975
|
/**
|
|
1976
1976
|
* Create a Stripe checkout session for a tier (Stripe-first flow).
|
|
1977
1977
|
*
|
|
1978
|
-
* This enables users to subscribe before authenticating.
|
|
1979
|
-
*
|
|
1980
|
-
* customer
|
|
1978
|
+
* This enables users to subscribe before authenticating. Stripe collects
|
|
1979
|
+
* the customer's email during checkout. After checkout completes, a
|
|
1980
|
+
* customer record is created with the email from Stripe. The customer
|
|
1981
|
+
* can later be linked to an identity via POST /customers/claim.
|
|
1981
1982
|
*
|
|
1982
1983
|
* Requires a secret key (mr_sk_*).
|
|
1983
1984
|
*
|
|
1984
1985
|
* @param tierId - The tier ID to create a checkout session for
|
|
1985
|
-
* @param request - Checkout session request with
|
|
1986
|
+
* @param request - Checkout session request with redirect URLs
|
|
1986
1987
|
* @returns Checkout session with Stripe URL
|
|
1987
1988
|
*/
|
|
1988
1989
|
async checkout(tierId, request) {
|
|
@@ -1990,9 +1991,6 @@ var TiersClient = class {
|
|
|
1990
1991
|
if (!tierId?.trim()) {
|
|
1991
1992
|
throw new ConfigError("tierId is required");
|
|
1992
1993
|
}
|
|
1993
|
-
if (!request.email?.trim()) {
|
|
1994
|
-
throw new ConfigError("email is required");
|
|
1995
|
-
}
|
|
1996
1994
|
if (!request.success_url?.trim()) {
|
|
1997
1995
|
throw new ConfigError("success_url is required");
|
|
1998
1996
|
}
|