autumn-js 1.2.9 → 1.2.10
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/backend/adapters/express.js +15 -36
- package/dist/backend/adapters/express.mjs +7 -7
- package/dist/backend/adapters/fetch.js +15 -36
- package/dist/backend/adapters/fetch.mjs +7 -7
- package/dist/backend/adapters/hono.js +15 -36
- package/dist/backend/adapters/hono.mjs +7 -7
- package/dist/backend/adapters/index.js +15 -36
- package/dist/backend/adapters/index.mjs +10 -10
- package/dist/backend/adapters/next.js +15 -36
- package/dist/backend/adapters/next.mjs +7 -7
- package/dist/backend/{chunk-RTMXCNBJ.mjs → chunk-67LO3DQD.mjs} +1 -1
- package/dist/backend/{chunk-BKTIDIRX.mjs → chunk-747OIE4V.mjs} +1 -1
- package/dist/backend/{chunk-2R56EQ4S.mjs → chunk-GEUMIITE.mjs} +1 -1
- package/dist/backend/{chunk-MBRTABXT.mjs → chunk-HGGHOITQ.mjs} +15 -36
- package/dist/backend/{chunk-INMDP2EE.mjs → chunk-IH7B2HKV.mjs} +4 -4
- package/dist/backend/{chunk-6Y2MEAWW.mjs → chunk-OMSCIF6B.mjs} +6 -6
- package/dist/backend/{chunk-KEFLOTH7.mjs → chunk-SFSDLM6X.mjs} +1 -1
- package/dist/backend/core/handlers/coreHandler.d.mts +1 -1
- package/dist/backend/core/handlers/coreHandler.d.ts +1 -1
- package/dist/backend/core/handlers/coreHandler.js +15 -36
- package/dist/backend/core/handlers/coreHandler.mjs +5 -5
- package/dist/backend/core/handlers/executeRoute.d.mts +1 -1
- package/dist/backend/core/handlers/executeRoute.d.ts +1 -1
- package/dist/backend/core/handlers/executeRoute.mjs +3 -3
- package/dist/backend/core/handlers/handleRouteByName.js +15 -36
- package/dist/backend/core/handlers/handleRouteByName.mjs +5 -5
- package/dist/backend/core/handlers/index.d.mts +1 -1
- package/dist/backend/core/handlers/index.d.ts +1 -1
- package/dist/backend/core/handlers/index.js +15 -36
- package/dist/backend/core/handlers/index.mjs +10 -10
- package/dist/backend/core/index.d.mts +1 -1
- package/dist/backend/core/index.d.ts +1 -1
- package/dist/backend/core/index.js +15 -36
- package/dist/backend/core/index.mjs +6 -6
- package/dist/backend/core/routes/index.d.mts +1 -1
- package/dist/backend/core/routes/index.d.ts +1 -1
- package/dist/backend/core/routes/routeBuilder.d.mts +1 -1
- package/dist/backend/core/routes/routeBuilder.d.ts +1 -1
- package/dist/backend/core/routes/routeConfigs.d.mts +1 -1
- package/dist/backend/core/routes/routeConfigs.d.ts +1 -1
- package/dist/backend/core/types/handlerTypes.d.mts +1 -1
- package/dist/backend/core/types/handlerTypes.d.ts +1 -1
- package/dist/backend/core/types/index.d.mts +1 -1
- package/dist/backend/core/types/index.d.ts +1 -1
- package/dist/backend/core/types/routeTypes.d.mts +1 -1
- package/dist/backend/core/types/routeTypes.d.ts +1 -1
- package/dist/backend/index.d.mts +2 -2
- package/dist/backend/index.d.ts +2 -2
- package/dist/backend/index.js +15 -36
- package/dist/backend/index.mjs +6 -6
- package/dist/backend/{routeTypes-FYNUgD55.d.ts → routeTypes-DuQ0sP_P.d.ts} +0 -10
- package/dist/backend/{routeTypes-C_13ls9L.d.mts → routeTypes-al_xVRsi.d.mts} +0 -10
- package/dist/better-auth/{chunk-LRULDM7S.mjs → chunk-7ACCRQYY.mjs} +1 -1
- package/dist/better-auth/{chunk-G6UW7SLU.mjs → chunk-XNZJ7YIW.mjs} +15 -36
- package/dist/better-auth/client.d.mts +8 -2
- package/dist/better-auth/client.d.ts +8 -2
- package/dist/better-auth/createAutumnEndpoint-D9Plymvy.d.mts +309 -0
- package/dist/better-auth/createAutumnEndpoint-D9Plymvy.d.ts +309 -0
- package/dist/better-auth/index.d.mts +8 -2
- package/dist/better-auth/index.d.ts +8 -2
- package/dist/better-auth/index.js +19 -40
- package/dist/better-auth/index.mjs +2 -2
- package/dist/better-auth/utils/createAutumnEndpoint.d.mts +8 -2
- package/dist/better-auth/utils/createAutumnEndpoint.d.ts +8 -2
- package/dist/better-auth/utils/createAutumnEndpoint.js +2 -2
- package/dist/better-auth/utils/createAutumnEndpoint.mjs +1 -1
- package/dist/better-auth/utils/handleBetterAuthRoute.d.mts +8 -2
- package/dist/better-auth/utils/handleBetterAuthRoute.d.ts +8 -2
- package/dist/better-auth/utils/handleBetterAuthRoute.js +15 -36
- package/dist/better-auth/utils/handleBetterAuthRoute.mjs +1 -1
- package/dist/better-auth/utils/index.d.mts +8 -2
- package/dist/better-auth/utils/index.d.ts +8 -2
- package/dist/better-auth/utils/index.js +19 -40
- package/dist/better-auth/utils/index.mjs +2 -2
- package/dist/react/AutumnProvider.js +15 -15
- package/dist/react/AutumnProvider.mjs +2 -2
- package/dist/react/{chunk-7IDH4OMG.mjs → chunk-26CKSAPZ.mjs} +1 -1
- package/dist/react/{chunk-NSFHAUTD.mjs → chunk-CHU7CIWP.mjs} +1 -1
- package/dist/react/{chunk-YQFYWH7J.mjs → chunk-G7FTQLT7.mjs} +1 -1
- package/dist/react/{chunk-BDG6JHEW.mjs → chunk-HSQUB3BZ.mjs} +1 -1
- package/dist/react/{chunk-DEZBJQEG.mjs → chunk-KB72KQKN.mjs} +1 -1
- package/dist/react/{chunk-J6SLKTKE.mjs → chunk-MC2YYATT.mjs} +1 -1
- package/dist/react/{chunk-FWWIAOPU.mjs → chunk-OXQG65ZT.mjs} +1 -1
- package/dist/react/{chunk-E5ZHOMZ4.mjs → chunk-XJZH5NMZ.mjs} +23 -23
- package/dist/react/{chunk-HVBDZARN.mjs → chunk-ZGPE4R6H.mjs} +2 -2
- package/dist/react/hooks/index.js +16 -16
- package/dist/react/hooks/index.mjs +8 -8
- package/dist/react/hooks/internal/useCustomerActions.js +1 -1
- package/dist/react/hooks/internal/useCustomerActions.mjs +2 -2
- package/dist/react/hooks/useAggregateEvents.js +16 -16
- package/dist/react/hooks/useAggregateEvents.mjs +2 -2
- package/dist/react/hooks/useCustomer.js +16 -16
- package/dist/react/hooks/useCustomer.mjs +3 -3
- package/dist/react/hooks/useEntity.js +16 -16
- package/dist/react/hooks/useEntity.mjs +2 -2
- package/dist/react/hooks/useListEvents.js +16 -16
- package/dist/react/hooks/useListEvents.mjs +2 -2
- package/dist/react/hooks/useListPlans.js +16 -16
- package/dist/react/hooks/useListPlans.mjs +2 -2
- package/dist/react/hooks/useReferrals.js +16 -16
- package/dist/react/hooks/useReferrals.mjs +2 -2
- package/dist/react/index.js +22 -22
- package/dist/react/index.mjs +9 -9
- package/dist/sdk/index.d.mts +4 -31
- package/dist/sdk/index.d.ts +4 -31
- package/dist/sdk/index.js +13 -37
- package/dist/sdk/index.mjs +14 -36
- package/package.json +142 -142
- package/dist/better-auth/createAutumnEndpoint-QlOJ33tY.d.mts +0 -41
- package/dist/better-auth/createAutumnEndpoint-QlOJ33tY.d.ts +0 -41
- package/dist/backend/{chunk-S5HPMJ4U.mjs → chunk-55C2WWXQ.mjs} +3 -3
|
@@ -50,7 +50,7 @@ function pathToFunc(pathPattern, options) {
|
|
|
50
50
|
);
|
|
51
51
|
}
|
|
52
52
|
return options?.charEncoding === "percent" ? encodeURIComponent(`${value}`) : `${value}`;
|
|
53
|
-
})
|
|
53
|
+
});
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
|
|
@@ -78,8 +78,8 @@ var SDK_METADATA = {
|
|
|
78
78
|
language: "typescript",
|
|
79
79
|
openapiDocVersion: "2.2.0",
|
|
80
80
|
sdkVersion: "0.10.17",
|
|
81
|
-
genVersion: "2.
|
|
82
|
-
userAgent: "speakeasy-sdk/typescript 0.10.17 2.
|
|
81
|
+
genVersion: "2.824.1",
|
|
82
|
+
userAgent: "speakeasy-sdk/typescript 0.10.17 2.824.1 2.2.0 @useautumn/sdk"
|
|
83
83
|
};
|
|
84
84
|
|
|
85
85
|
// ../sdk/src/lib/http.ts
|
|
@@ -713,9 +713,8 @@ function match(...matchers) {
|
|
|
713
713
|
raw = body;
|
|
714
714
|
break;
|
|
715
715
|
default:
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
);
|
|
716
|
+
encoding;
|
|
717
|
+
throw new Error(`Unsupported response type: ${encoding}`);
|
|
719
718
|
}
|
|
720
719
|
if (matcher.enc === "fail") {
|
|
721
720
|
return [{
|
|
@@ -978,7 +977,8 @@ function resolveSecurity(...options) {
|
|
|
978
977
|
applyBearer(state, spec);
|
|
979
978
|
break;
|
|
980
979
|
default:
|
|
981
|
-
|
|
980
|
+
spec;
|
|
981
|
+
throw SecurityError.unrecognizedType(type);
|
|
982
982
|
}
|
|
983
983
|
});
|
|
984
984
|
return state;
|
|
@@ -1001,8 +1001,8 @@ function applyBearer(state, spec) {
|
|
|
1001
1001
|
state.headers[spec.fieldName] = value;
|
|
1002
1002
|
}
|
|
1003
1003
|
}
|
|
1004
|
-
function resolveGlobalSecurity(security
|
|
1005
|
-
|
|
1004
|
+
function resolveGlobalSecurity(security) {
|
|
1005
|
+
return resolveSecurity(
|
|
1006
1006
|
[
|
|
1007
1007
|
{
|
|
1008
1008
|
fieldName: "Authorization",
|
|
@@ -1010,16 +1010,7 @@ function resolveGlobalSecurity(security, allowedFields) {
|
|
|
1010
1010
|
value: security?.secretKey ?? env().AUTUMN_SECRET_KEY
|
|
1011
1011
|
}
|
|
1012
1012
|
]
|
|
1013
|
-
|
|
1014
|
-
if (allowedFields) {
|
|
1015
|
-
inputs = allowedFields.map((i) => {
|
|
1016
|
-
if (i < 0 || i >= inputs.length) {
|
|
1017
|
-
throw new RangeError(`invalid allowedFields index ${i}`);
|
|
1018
|
-
}
|
|
1019
|
-
return inputs[i];
|
|
1020
|
-
});
|
|
1021
|
-
}
|
|
1022
|
-
return resolveSecurity(...inputs);
|
|
1013
|
+
);
|
|
1023
1014
|
}
|
|
1024
1015
|
async function extractSecurity(sec) {
|
|
1025
1016
|
if (sec == null) {
|
|
@@ -5281,11 +5272,6 @@ var SubscriptionStatus = {
|
|
|
5281
5272
|
Active: "active",
|
|
5282
5273
|
Scheduled: "scheduled"
|
|
5283
5274
|
};
|
|
5284
|
-
var Processor = {
|
|
5285
|
-
Stripe: "stripe",
|
|
5286
|
-
Revenuecat: "revenuecat",
|
|
5287
|
-
Vercel: "vercel"
|
|
5288
|
-
};
|
|
5289
5275
|
var ListCustomersEnv = {
|
|
5290
5276
|
Sandbox: "sandbox",
|
|
5291
5277
|
Live: "live"
|
|
@@ -5316,17 +5302,13 @@ var ListCustomersPlan$outboundSchema = z32.object({
|
|
|
5316
5302
|
versions: z32.optional(z32.array(z32.number()))
|
|
5317
5303
|
});
|
|
5318
5304
|
var SubscriptionStatus$outboundSchema = z32.enum(SubscriptionStatus);
|
|
5319
|
-
var Processor$outboundSchema = z32.enum(
|
|
5320
|
-
Processor
|
|
5321
|
-
);
|
|
5322
5305
|
var ListCustomersParams$outboundSchema = z32.pipe(
|
|
5323
5306
|
z32.object({
|
|
5324
5307
|
offset: z32._default(z32.int(), 0),
|
|
5325
5308
|
limit: z32._default(z32.int(), 10),
|
|
5326
5309
|
plans: z32.optional(z32.array(z32.lazy(() => ListCustomersPlan$outboundSchema))),
|
|
5327
5310
|
subscriptionStatus: z32.optional(SubscriptionStatus$outboundSchema),
|
|
5328
|
-
search: z32.optional(z32.string())
|
|
5329
|
-
processors: z32.optional(z32.array(Processor$outboundSchema))
|
|
5311
|
+
search: z32.optional(z32.string())
|
|
5330
5312
|
}),
|
|
5331
5313
|
z32.transform((v) => {
|
|
5332
5314
|
return remap(v, {
|
|
@@ -10413,15 +10395,12 @@ var ClientSDK = class {
|
|
|
10413
10395
|
if (!base) {
|
|
10414
10396
|
return ERR(new InvalidRequestError("No base URL provided for operation"));
|
|
10415
10397
|
}
|
|
10416
|
-
const
|
|
10417
|
-
|
|
10398
|
+
const reqURL = new URL(base);
|
|
10399
|
+
const inputURL = new URL(path, reqURL);
|
|
10418
10400
|
if (path) {
|
|
10419
|
-
|
|
10420
|
-
reqURL
|
|
10421
|
-
} else {
|
|
10422
|
-
reqURL = baseURL;
|
|
10401
|
+
reqURL.pathname += reqURL.pathname.endsWith("/") ? "" : "/";
|
|
10402
|
+
reqURL.pathname += inputURL.pathname.replace(/^\/+/, "");
|
|
10423
10403
|
}
|
|
10424
|
-
reqURL.hash = "";
|
|
10425
10404
|
let finalQuery = query || "";
|
|
10426
10405
|
const secQuery = [];
|
|
10427
10406
|
for (const [k, v] of Object.entries(security?.queryParams || {})) {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
autumnHandler
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-747OIE4V.mjs";
|
|
4
4
|
import "../chunk-WYDGEDEU.mjs";
|
|
5
5
|
import "../chunk-VXND2UDT.mjs";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-IH7B2HKV.mjs";
|
|
7
|
+
import "../chunk-OMSCIF6B.mjs";
|
|
8
|
+
import "../chunk-HGGHOITQ.mjs";
|
|
9
|
+
import "../chunk-55C2WWXQ.mjs";
|
|
10
|
+
import "../chunk-TBQ27LIK.mjs";
|
|
11
|
+
import "../chunk-J44WR3QZ.mjs";
|
|
8
12
|
import "../chunk-TSF4YCUO.mjs";
|
|
9
13
|
import "../chunk-UAR3TMWI.mjs";
|
|
10
|
-
import "../chunk-MBRTABXT.mjs";
|
|
11
14
|
import "../chunk-2NIBKIZV.mjs";
|
|
12
|
-
import "../chunk-S5HPMJ4U.mjs";
|
|
13
15
|
import "../chunk-OTXV5FY7.mjs";
|
|
14
16
|
import "../chunk-Z6QP3YEA.mjs";
|
|
15
17
|
import "../chunk-VZIMT7AO.mjs";
|
|
16
|
-
import "../chunk-TBQ27LIK.mjs";
|
|
17
|
-
import "../chunk-J44WR3QZ.mjs";
|
|
18
18
|
import "../chunk-N7NFYY54.mjs";
|
|
19
19
|
export {
|
|
20
20
|
autumnHandler
|
|
@@ -50,7 +50,7 @@ function pathToFunc(pathPattern, options) {
|
|
|
50
50
|
);
|
|
51
51
|
}
|
|
52
52
|
return options?.charEncoding === "percent" ? encodeURIComponent(`${value}`) : `${value}`;
|
|
53
|
-
})
|
|
53
|
+
});
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
|
|
@@ -78,8 +78,8 @@ var SDK_METADATA = {
|
|
|
78
78
|
language: "typescript",
|
|
79
79
|
openapiDocVersion: "2.2.0",
|
|
80
80
|
sdkVersion: "0.10.17",
|
|
81
|
-
genVersion: "2.
|
|
82
|
-
userAgent: "speakeasy-sdk/typescript 0.10.17 2.
|
|
81
|
+
genVersion: "2.824.1",
|
|
82
|
+
userAgent: "speakeasy-sdk/typescript 0.10.17 2.824.1 2.2.0 @useautumn/sdk"
|
|
83
83
|
};
|
|
84
84
|
|
|
85
85
|
// ../sdk/src/lib/http.ts
|
|
@@ -713,9 +713,8 @@ function match(...matchers) {
|
|
|
713
713
|
raw = body;
|
|
714
714
|
break;
|
|
715
715
|
default:
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
);
|
|
716
|
+
encoding;
|
|
717
|
+
throw new Error(`Unsupported response type: ${encoding}`);
|
|
719
718
|
}
|
|
720
719
|
if (matcher.enc === "fail") {
|
|
721
720
|
return [{
|
|
@@ -978,7 +977,8 @@ function resolveSecurity(...options) {
|
|
|
978
977
|
applyBearer(state, spec);
|
|
979
978
|
break;
|
|
980
979
|
default:
|
|
981
|
-
|
|
980
|
+
spec;
|
|
981
|
+
throw SecurityError.unrecognizedType(type);
|
|
982
982
|
}
|
|
983
983
|
});
|
|
984
984
|
return state;
|
|
@@ -1001,8 +1001,8 @@ function applyBearer(state, spec) {
|
|
|
1001
1001
|
state.headers[spec.fieldName] = value;
|
|
1002
1002
|
}
|
|
1003
1003
|
}
|
|
1004
|
-
function resolveGlobalSecurity(security
|
|
1005
|
-
|
|
1004
|
+
function resolveGlobalSecurity(security) {
|
|
1005
|
+
return resolveSecurity(
|
|
1006
1006
|
[
|
|
1007
1007
|
{
|
|
1008
1008
|
fieldName: "Authorization",
|
|
@@ -1010,16 +1010,7 @@ function resolveGlobalSecurity(security, allowedFields) {
|
|
|
1010
1010
|
value: security?.secretKey ?? env().AUTUMN_SECRET_KEY
|
|
1011
1011
|
}
|
|
1012
1012
|
]
|
|
1013
|
-
|
|
1014
|
-
if (allowedFields) {
|
|
1015
|
-
inputs = allowedFields.map((i) => {
|
|
1016
|
-
if (i < 0 || i >= inputs.length) {
|
|
1017
|
-
throw new RangeError(`invalid allowedFields index ${i}`);
|
|
1018
|
-
}
|
|
1019
|
-
return inputs[i];
|
|
1020
|
-
});
|
|
1021
|
-
}
|
|
1022
|
-
return resolveSecurity(...inputs);
|
|
1013
|
+
);
|
|
1023
1014
|
}
|
|
1024
1015
|
async function extractSecurity(sec) {
|
|
1025
1016
|
if (sec == null) {
|
|
@@ -5281,11 +5272,6 @@ var SubscriptionStatus = {
|
|
|
5281
5272
|
Active: "active",
|
|
5282
5273
|
Scheduled: "scheduled"
|
|
5283
5274
|
};
|
|
5284
|
-
var Processor = {
|
|
5285
|
-
Stripe: "stripe",
|
|
5286
|
-
Revenuecat: "revenuecat",
|
|
5287
|
-
Vercel: "vercel"
|
|
5288
|
-
};
|
|
5289
5275
|
var ListCustomersEnv = {
|
|
5290
5276
|
Sandbox: "sandbox",
|
|
5291
5277
|
Live: "live"
|
|
@@ -5316,17 +5302,13 @@ var ListCustomersPlan$outboundSchema = z32.object({
|
|
|
5316
5302
|
versions: z32.optional(z32.array(z32.number()))
|
|
5317
5303
|
});
|
|
5318
5304
|
var SubscriptionStatus$outboundSchema = z32.enum(SubscriptionStatus);
|
|
5319
|
-
var Processor$outboundSchema = z32.enum(
|
|
5320
|
-
Processor
|
|
5321
|
-
);
|
|
5322
5305
|
var ListCustomersParams$outboundSchema = z32.pipe(
|
|
5323
5306
|
z32.object({
|
|
5324
5307
|
offset: z32._default(z32.int(), 0),
|
|
5325
5308
|
limit: z32._default(z32.int(), 10),
|
|
5326
5309
|
plans: z32.optional(z32.array(z32.lazy(() => ListCustomersPlan$outboundSchema))),
|
|
5327
5310
|
subscriptionStatus: z32.optional(SubscriptionStatus$outboundSchema),
|
|
5328
|
-
search: z32.optional(z32.string())
|
|
5329
|
-
processors: z32.optional(z32.array(Processor$outboundSchema))
|
|
5311
|
+
search: z32.optional(z32.string())
|
|
5330
5312
|
}),
|
|
5331
5313
|
z32.transform((v) => {
|
|
5332
5314
|
return remap(v, {
|
|
@@ -10413,15 +10395,12 @@ var ClientSDK = class {
|
|
|
10413
10395
|
if (!base) {
|
|
10414
10396
|
return ERR(new InvalidRequestError("No base URL provided for operation"));
|
|
10415
10397
|
}
|
|
10416
|
-
const
|
|
10417
|
-
|
|
10398
|
+
const reqURL = new URL(base);
|
|
10399
|
+
const inputURL = new URL(path, reqURL);
|
|
10418
10400
|
if (path) {
|
|
10419
|
-
|
|
10420
|
-
reqURL
|
|
10421
|
-
} else {
|
|
10422
|
-
reqURL = baseURL;
|
|
10401
|
+
reqURL.pathname += reqURL.pathname.endsWith("/") ? "" : "/";
|
|
10402
|
+
reqURL.pathname += inputURL.pathname.replace(/^\/+/, "");
|
|
10423
10403
|
}
|
|
10424
|
-
reqURL.hash = "";
|
|
10425
10404
|
let finalQuery = query || "";
|
|
10426
10405
|
const secQuery = [];
|
|
10427
10406
|
for (const [k, v] of Object.entries(security?.queryParams || {})) {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
autumnHandler
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-SFSDLM6X.mjs";
|
|
4
4
|
import "../chunk-WYDGEDEU.mjs";
|
|
5
5
|
import "../chunk-VXND2UDT.mjs";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-IH7B2HKV.mjs";
|
|
7
|
+
import "../chunk-OMSCIF6B.mjs";
|
|
8
|
+
import "../chunk-HGGHOITQ.mjs";
|
|
9
|
+
import "../chunk-55C2WWXQ.mjs";
|
|
10
|
+
import "../chunk-TBQ27LIK.mjs";
|
|
11
|
+
import "../chunk-J44WR3QZ.mjs";
|
|
8
12
|
import "../chunk-TSF4YCUO.mjs";
|
|
9
13
|
import "../chunk-UAR3TMWI.mjs";
|
|
10
|
-
import "../chunk-MBRTABXT.mjs";
|
|
11
14
|
import "../chunk-2NIBKIZV.mjs";
|
|
12
|
-
import "../chunk-S5HPMJ4U.mjs";
|
|
13
15
|
import "../chunk-OTXV5FY7.mjs";
|
|
14
16
|
import "../chunk-Z6QP3YEA.mjs";
|
|
15
17
|
import "../chunk-VZIMT7AO.mjs";
|
|
16
|
-
import "../chunk-TBQ27LIK.mjs";
|
|
17
|
-
import "../chunk-J44WR3QZ.mjs";
|
|
18
18
|
import "../chunk-N7NFYY54.mjs";
|
|
19
19
|
export {
|
|
20
20
|
autumnHandler
|
|
@@ -50,7 +50,7 @@ function pathToFunc(pathPattern, options) {
|
|
|
50
50
|
);
|
|
51
51
|
}
|
|
52
52
|
return options?.charEncoding === "percent" ? encodeURIComponent(`${value}`) : `${value}`;
|
|
53
|
-
})
|
|
53
|
+
});
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
|
|
@@ -78,8 +78,8 @@ var SDK_METADATA = {
|
|
|
78
78
|
language: "typescript",
|
|
79
79
|
openapiDocVersion: "2.2.0",
|
|
80
80
|
sdkVersion: "0.10.17",
|
|
81
|
-
genVersion: "2.
|
|
82
|
-
userAgent: "speakeasy-sdk/typescript 0.10.17 2.
|
|
81
|
+
genVersion: "2.824.1",
|
|
82
|
+
userAgent: "speakeasy-sdk/typescript 0.10.17 2.824.1 2.2.0 @useautumn/sdk"
|
|
83
83
|
};
|
|
84
84
|
|
|
85
85
|
// ../sdk/src/lib/http.ts
|
|
@@ -713,9 +713,8 @@ function match(...matchers) {
|
|
|
713
713
|
raw = body;
|
|
714
714
|
break;
|
|
715
715
|
default:
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
);
|
|
716
|
+
encoding;
|
|
717
|
+
throw new Error(`Unsupported response type: ${encoding}`);
|
|
719
718
|
}
|
|
720
719
|
if (matcher.enc === "fail") {
|
|
721
720
|
return [{
|
|
@@ -978,7 +977,8 @@ function resolveSecurity(...options) {
|
|
|
978
977
|
applyBearer(state, spec);
|
|
979
978
|
break;
|
|
980
979
|
default:
|
|
981
|
-
|
|
980
|
+
spec;
|
|
981
|
+
throw SecurityError.unrecognizedType(type);
|
|
982
982
|
}
|
|
983
983
|
});
|
|
984
984
|
return state;
|
|
@@ -1001,8 +1001,8 @@ function applyBearer(state, spec) {
|
|
|
1001
1001
|
state.headers[spec.fieldName] = value;
|
|
1002
1002
|
}
|
|
1003
1003
|
}
|
|
1004
|
-
function resolveGlobalSecurity(security
|
|
1005
|
-
|
|
1004
|
+
function resolveGlobalSecurity(security) {
|
|
1005
|
+
return resolveSecurity(
|
|
1006
1006
|
[
|
|
1007
1007
|
{
|
|
1008
1008
|
fieldName: "Authorization",
|
|
@@ -1010,16 +1010,7 @@ function resolveGlobalSecurity(security, allowedFields) {
|
|
|
1010
1010
|
value: security?.secretKey ?? env().AUTUMN_SECRET_KEY
|
|
1011
1011
|
}
|
|
1012
1012
|
]
|
|
1013
|
-
|
|
1014
|
-
if (allowedFields) {
|
|
1015
|
-
inputs = allowedFields.map((i) => {
|
|
1016
|
-
if (i < 0 || i >= inputs.length) {
|
|
1017
|
-
throw new RangeError(`invalid allowedFields index ${i}`);
|
|
1018
|
-
}
|
|
1019
|
-
return inputs[i];
|
|
1020
|
-
});
|
|
1021
|
-
}
|
|
1022
|
-
return resolveSecurity(...inputs);
|
|
1013
|
+
);
|
|
1023
1014
|
}
|
|
1024
1015
|
async function extractSecurity(sec) {
|
|
1025
1016
|
if (sec == null) {
|
|
@@ -5281,11 +5272,6 @@ var SubscriptionStatus = {
|
|
|
5281
5272
|
Active: "active",
|
|
5282
5273
|
Scheduled: "scheduled"
|
|
5283
5274
|
};
|
|
5284
|
-
var Processor = {
|
|
5285
|
-
Stripe: "stripe",
|
|
5286
|
-
Revenuecat: "revenuecat",
|
|
5287
|
-
Vercel: "vercel"
|
|
5288
|
-
};
|
|
5289
5275
|
var ListCustomersEnv = {
|
|
5290
5276
|
Sandbox: "sandbox",
|
|
5291
5277
|
Live: "live"
|
|
@@ -5316,17 +5302,13 @@ var ListCustomersPlan$outboundSchema = z32.object({
|
|
|
5316
5302
|
versions: z32.optional(z32.array(z32.number()))
|
|
5317
5303
|
});
|
|
5318
5304
|
var SubscriptionStatus$outboundSchema = z32.enum(SubscriptionStatus);
|
|
5319
|
-
var Processor$outboundSchema = z32.enum(
|
|
5320
|
-
Processor
|
|
5321
|
-
);
|
|
5322
5305
|
var ListCustomersParams$outboundSchema = z32.pipe(
|
|
5323
5306
|
z32.object({
|
|
5324
5307
|
offset: z32._default(z32.int(), 0),
|
|
5325
5308
|
limit: z32._default(z32.int(), 10),
|
|
5326
5309
|
plans: z32.optional(z32.array(z32.lazy(() => ListCustomersPlan$outboundSchema))),
|
|
5327
5310
|
subscriptionStatus: z32.optional(SubscriptionStatus$outboundSchema),
|
|
5328
|
-
search: z32.optional(z32.string())
|
|
5329
|
-
processors: z32.optional(z32.array(Processor$outboundSchema))
|
|
5311
|
+
search: z32.optional(z32.string())
|
|
5330
5312
|
}),
|
|
5331
5313
|
z32.transform((v) => {
|
|
5332
5314
|
return remap(v, {
|
|
@@ -10413,15 +10395,12 @@ var ClientSDK = class {
|
|
|
10413
10395
|
if (!base) {
|
|
10414
10396
|
return ERR(new InvalidRequestError("No base URL provided for operation"));
|
|
10415
10397
|
}
|
|
10416
|
-
const
|
|
10417
|
-
|
|
10398
|
+
const reqURL = new URL(base);
|
|
10399
|
+
const inputURL = new URL(path, reqURL);
|
|
10418
10400
|
if (path) {
|
|
10419
|
-
|
|
10420
|
-
reqURL
|
|
10421
|
-
} else {
|
|
10422
|
-
reqURL = baseURL;
|
|
10401
|
+
reqURL.pathname += reqURL.pathname.endsWith("/") ? "" : "/";
|
|
10402
|
+
reqURL.pathname += inputURL.pathname.replace(/^\/+/, "");
|
|
10423
10403
|
}
|
|
10424
|
-
reqURL.hash = "";
|
|
10425
10404
|
let finalQuery = query || "";
|
|
10426
10405
|
const secQuery = [];
|
|
10427
10406
|
for (const [k, v] of Object.entries(security?.queryParams || {})) {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
autumnHandler
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-GEUMIITE.mjs";
|
|
4
4
|
import "../chunk-WYDGEDEU.mjs";
|
|
5
5
|
import "../chunk-VXND2UDT.mjs";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-IH7B2HKV.mjs";
|
|
7
|
+
import "../chunk-OMSCIF6B.mjs";
|
|
8
|
+
import "../chunk-HGGHOITQ.mjs";
|
|
9
|
+
import "../chunk-55C2WWXQ.mjs";
|
|
10
|
+
import "../chunk-TBQ27LIK.mjs";
|
|
11
|
+
import "../chunk-J44WR3QZ.mjs";
|
|
8
12
|
import "../chunk-TSF4YCUO.mjs";
|
|
9
13
|
import "../chunk-UAR3TMWI.mjs";
|
|
10
|
-
import "../chunk-MBRTABXT.mjs";
|
|
11
14
|
import "../chunk-2NIBKIZV.mjs";
|
|
12
|
-
import "../chunk-S5HPMJ4U.mjs";
|
|
13
15
|
import "../chunk-OTXV5FY7.mjs";
|
|
14
16
|
import "../chunk-Z6QP3YEA.mjs";
|
|
15
17
|
import "../chunk-VZIMT7AO.mjs";
|
|
16
|
-
import "../chunk-TBQ27LIK.mjs";
|
|
17
|
-
import "../chunk-J44WR3QZ.mjs";
|
|
18
18
|
import "../chunk-N7NFYY54.mjs";
|
|
19
19
|
export {
|
|
20
20
|
autumnHandler
|
|
@@ -53,7 +53,7 @@ function pathToFunc(pathPattern, options) {
|
|
|
53
53
|
);
|
|
54
54
|
}
|
|
55
55
|
return options?.charEncoding === "percent" ? encodeURIComponent(`${value}`) : `${value}`;
|
|
56
|
-
})
|
|
56
|
+
});
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
|
|
@@ -81,8 +81,8 @@ var SDK_METADATA = {
|
|
|
81
81
|
language: "typescript",
|
|
82
82
|
openapiDocVersion: "2.2.0",
|
|
83
83
|
sdkVersion: "0.10.17",
|
|
84
|
-
genVersion: "2.
|
|
85
|
-
userAgent: "speakeasy-sdk/typescript 0.10.17 2.
|
|
84
|
+
genVersion: "2.824.1",
|
|
85
|
+
userAgent: "speakeasy-sdk/typescript 0.10.17 2.824.1 2.2.0 @useautumn/sdk"
|
|
86
86
|
};
|
|
87
87
|
|
|
88
88
|
// ../sdk/src/lib/http.ts
|
|
@@ -716,9 +716,8 @@ function match(...matchers) {
|
|
|
716
716
|
raw = body;
|
|
717
717
|
break;
|
|
718
718
|
default:
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
);
|
|
719
|
+
encoding;
|
|
720
|
+
throw new Error(`Unsupported response type: ${encoding}`);
|
|
722
721
|
}
|
|
723
722
|
if (matcher.enc === "fail") {
|
|
724
723
|
return [{
|
|
@@ -981,7 +980,8 @@ function resolveSecurity(...options) {
|
|
|
981
980
|
applyBearer(state, spec);
|
|
982
981
|
break;
|
|
983
982
|
default:
|
|
984
|
-
|
|
983
|
+
spec;
|
|
984
|
+
throw SecurityError.unrecognizedType(type);
|
|
985
985
|
}
|
|
986
986
|
});
|
|
987
987
|
return state;
|
|
@@ -1004,8 +1004,8 @@ function applyBearer(state, spec) {
|
|
|
1004
1004
|
state.headers[spec.fieldName] = value;
|
|
1005
1005
|
}
|
|
1006
1006
|
}
|
|
1007
|
-
function resolveGlobalSecurity(security
|
|
1008
|
-
|
|
1007
|
+
function resolveGlobalSecurity(security) {
|
|
1008
|
+
return resolveSecurity(
|
|
1009
1009
|
[
|
|
1010
1010
|
{
|
|
1011
1011
|
fieldName: "Authorization",
|
|
@@ -1013,16 +1013,7 @@ function resolveGlobalSecurity(security, allowedFields) {
|
|
|
1013
1013
|
value: security?.secretKey ?? env().AUTUMN_SECRET_KEY
|
|
1014
1014
|
}
|
|
1015
1015
|
]
|
|
1016
|
-
|
|
1017
|
-
if (allowedFields) {
|
|
1018
|
-
inputs = allowedFields.map((i) => {
|
|
1019
|
-
if (i < 0 || i >= inputs.length) {
|
|
1020
|
-
throw new RangeError(`invalid allowedFields index ${i}`);
|
|
1021
|
-
}
|
|
1022
|
-
return inputs[i];
|
|
1023
|
-
});
|
|
1024
|
-
}
|
|
1025
|
-
return resolveSecurity(...inputs);
|
|
1016
|
+
);
|
|
1026
1017
|
}
|
|
1027
1018
|
async function extractSecurity(sec) {
|
|
1028
1019
|
if (sec == null) {
|
|
@@ -5284,11 +5275,6 @@ var SubscriptionStatus = {
|
|
|
5284
5275
|
Active: "active",
|
|
5285
5276
|
Scheduled: "scheduled"
|
|
5286
5277
|
};
|
|
5287
|
-
var Processor = {
|
|
5288
|
-
Stripe: "stripe",
|
|
5289
|
-
Revenuecat: "revenuecat",
|
|
5290
|
-
Vercel: "vercel"
|
|
5291
|
-
};
|
|
5292
5278
|
var ListCustomersEnv = {
|
|
5293
5279
|
Sandbox: "sandbox",
|
|
5294
5280
|
Live: "live"
|
|
@@ -5319,17 +5305,13 @@ var ListCustomersPlan$outboundSchema = z32.object({
|
|
|
5319
5305
|
versions: z32.optional(z32.array(z32.number()))
|
|
5320
5306
|
});
|
|
5321
5307
|
var SubscriptionStatus$outboundSchema = z32.enum(SubscriptionStatus);
|
|
5322
|
-
var Processor$outboundSchema = z32.enum(
|
|
5323
|
-
Processor
|
|
5324
|
-
);
|
|
5325
5308
|
var ListCustomersParams$outboundSchema = z32.pipe(
|
|
5326
5309
|
z32.object({
|
|
5327
5310
|
offset: z32._default(z32.int(), 0),
|
|
5328
5311
|
limit: z32._default(z32.int(), 10),
|
|
5329
5312
|
plans: z32.optional(z32.array(z32.lazy(() => ListCustomersPlan$outboundSchema))),
|
|
5330
5313
|
subscriptionStatus: z32.optional(SubscriptionStatus$outboundSchema),
|
|
5331
|
-
search: z32.optional(z32.string())
|
|
5332
|
-
processors: z32.optional(z32.array(Processor$outboundSchema))
|
|
5314
|
+
search: z32.optional(z32.string())
|
|
5333
5315
|
}),
|
|
5334
5316
|
z32.transform((v) => {
|
|
5335
5317
|
return remap(v, {
|
|
@@ -10416,15 +10398,12 @@ var ClientSDK = class {
|
|
|
10416
10398
|
if (!base) {
|
|
10417
10399
|
return ERR(new InvalidRequestError("No base URL provided for operation"));
|
|
10418
10400
|
}
|
|
10419
|
-
const
|
|
10420
|
-
|
|
10401
|
+
const reqURL = new URL(base);
|
|
10402
|
+
const inputURL = new URL(path, reqURL);
|
|
10421
10403
|
if (path) {
|
|
10422
|
-
|
|
10423
|
-
reqURL
|
|
10424
|
-
} else {
|
|
10425
|
-
reqURL = baseURL;
|
|
10404
|
+
reqURL.pathname += reqURL.pathname.endsWith("/") ? "" : "/";
|
|
10405
|
+
reqURL.pathname += inputURL.pathname.replace(/^\/+/, "");
|
|
10426
10406
|
}
|
|
10427
|
-
reqURL.hash = "";
|
|
10428
10407
|
let finalQuery = query || "";
|
|
10429
10408
|
const secQuery = [];
|
|
10430
10409
|
for (const [k, v] of Object.entries(security?.queryParams || {})) {
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import {
|
|
2
2
|
autumnHandler
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-747OIE4V.mjs";
|
|
4
4
|
import {
|
|
5
5
|
autumnHandler as autumnHandler2
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-SFSDLM6X.mjs";
|
|
7
7
|
import {
|
|
8
8
|
autumnHandler as autumnHandler3
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-GEUMIITE.mjs";
|
|
10
10
|
import {
|
|
11
11
|
autumnHandler as autumnHandler4
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-67LO3DQD.mjs";
|
|
13
13
|
import "../chunk-WYDGEDEU.mjs";
|
|
14
14
|
import "../chunk-VXND2UDT.mjs";
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-IH7B2HKV.mjs";
|
|
16
|
+
import "../chunk-OMSCIF6B.mjs";
|
|
17
|
+
import "../chunk-HGGHOITQ.mjs";
|
|
18
|
+
import "../chunk-55C2WWXQ.mjs";
|
|
19
|
+
import "../chunk-TBQ27LIK.mjs";
|
|
20
|
+
import "../chunk-J44WR3QZ.mjs";
|
|
17
21
|
import "../chunk-TSF4YCUO.mjs";
|
|
18
22
|
import "../chunk-UAR3TMWI.mjs";
|
|
19
|
-
import "../chunk-MBRTABXT.mjs";
|
|
20
23
|
import "../chunk-2NIBKIZV.mjs";
|
|
21
|
-
import "../chunk-S5HPMJ4U.mjs";
|
|
22
24
|
import "../chunk-OTXV5FY7.mjs";
|
|
23
25
|
import "../chunk-Z6QP3YEA.mjs";
|
|
24
26
|
import "../chunk-VZIMT7AO.mjs";
|
|
25
|
-
import "../chunk-TBQ27LIK.mjs";
|
|
26
|
-
import "../chunk-J44WR3QZ.mjs";
|
|
27
27
|
import "../chunk-N7NFYY54.mjs";
|
|
28
28
|
export {
|
|
29
29
|
autumnHandler as expressAutumnHandler,
|