autumn-js 1.2.8 → 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 +14 -26
- package/dist/backend/adapters/express.mjs +5 -5
- package/dist/backend/adapters/fetch.js +14 -26
- package/dist/backend/adapters/fetch.mjs +5 -5
- package/dist/backend/adapters/hono.js +14 -26
- package/dist/backend/adapters/hono.mjs +5 -5
- package/dist/backend/adapters/index.js +14 -26
- package/dist/backend/adapters/index.mjs +8 -8
- package/dist/backend/adapters/next.js +14 -26
- package/dist/backend/adapters/next.mjs +5 -5
- package/dist/backend/{chunk-EHOQ52YN.mjs → chunk-67LO3DQD.mjs} +1 -1
- package/dist/backend/{chunk-2SJN2D5K.mjs → chunk-747OIE4V.mjs} +1 -1
- package/dist/backend/{chunk-3KJVXSBT.mjs → chunk-GEUMIITE.mjs} +1 -1
- package/dist/backend/{chunk-5J2AJ3AR.mjs → chunk-HGGHOITQ.mjs} +14 -26
- package/dist/backend/{chunk-OI6KS2W5.mjs → chunk-IH7B2HKV.mjs} +1 -1
- package/dist/backend/{chunk-EJFVGOSH.mjs → chunk-OMSCIF6B.mjs} +1 -1
- package/dist/backend/{chunk-RVNL4DSW.mjs → chunk-SFSDLM6X.mjs} +1 -1
- package/dist/backend/core/handlers/coreHandler.js +14 -26
- package/dist/backend/core/handlers/coreHandler.mjs +3 -3
- package/dist/backend/core/handlers/executeRoute.mjs +1 -1
- package/dist/backend/core/handlers/handleRouteByName.js +14 -26
- package/dist/backend/core/handlers/handleRouteByName.mjs +3 -3
- package/dist/backend/core/handlers/index.js +14 -26
- package/dist/backend/core/handlers/index.mjs +4 -4
- package/dist/backend/core/index.js +14 -26
- package/dist/backend/core/index.mjs +6 -6
- package/dist/backend/core/routes/index.mjs +1 -1
- package/dist/backend/core/routes/routeConfigs.mjs +1 -1
- package/dist/backend/core/utils/index.mjs +3 -3
- package/dist/backend/index.js +14 -26
- package/dist/backend/index.mjs +6 -6
- package/dist/better-auth/{chunk-LRULDM7S.mjs → chunk-7ACCRQYY.mjs} +1 -1
- package/dist/better-auth/{chunk-JV57X7GG.mjs → chunk-XNZJ7YIW.mjs} +14 -26
- package/dist/better-auth/client.d.mts +7 -2
- package/dist/better-auth/client.d.ts +7 -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 +7 -2
- package/dist/better-auth/index.d.ts +7 -2
- package/dist/better-auth/index.js +18 -30
- package/dist/better-auth/index.mjs +2 -2
- package/dist/better-auth/utils/createAutumnEndpoint.d.mts +7 -2
- package/dist/better-auth/utils/createAutumnEndpoint.d.ts +7 -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 +7 -2
- package/dist/better-auth/utils/handleBetterAuthRoute.d.ts +7 -2
- package/dist/better-auth/utils/handleBetterAuthRoute.js +14 -26
- package/dist/better-auth/utils/handleBetterAuthRoute.mjs +1 -1
- package/dist/better-auth/utils/index.d.mts +7 -2
- package/dist/better-auth/utils/index.d.ts +7 -2
- package/dist/better-auth/utils/index.js +18 -30
- package/dist/better-auth/utils/index.mjs +2 -2
- package/dist/sdk/index.d.mts +3 -17
- package/dist/sdk/index.d.ts +3 -17
- package/dist/sdk/index.js +12 -25
- package/dist/sdk/index.mjs +12 -25
- package/package.json +142 -142
- package/dist/better-auth/createAutumnEndpoint-p1QlSPE4.d.mts +0 -42
- package/dist/better-auth/createAutumnEndpoint-p1QlSPE4.d.ts +0 -42
|
@@ -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) {
|
|
@@ -10404,15 +10395,12 @@ var ClientSDK = class {
|
|
|
10404
10395
|
if (!base) {
|
|
10405
10396
|
return ERR(new InvalidRequestError("No base URL provided for operation"));
|
|
10406
10397
|
}
|
|
10407
|
-
const
|
|
10408
|
-
|
|
10398
|
+
const reqURL = new URL(base);
|
|
10399
|
+
const inputURL = new URL(path, reqURL);
|
|
10409
10400
|
if (path) {
|
|
10410
|
-
|
|
10411
|
-
reqURL
|
|
10412
|
-
} else {
|
|
10413
|
-
reqURL = baseURL;
|
|
10401
|
+
reqURL.pathname += reqURL.pathname.endsWith("/") ? "" : "/";
|
|
10402
|
+
reqURL.pathname += inputURL.pathname.replace(/^\/+/, "");
|
|
10414
10403
|
}
|
|
10415
|
-
reqURL.hash = "";
|
|
10416
10404
|
let finalQuery = query || "";
|
|
10417
10405
|
const secQuery = [];
|
|
10418
10406
|
for (const [k, v] of Object.entries(security?.queryParams || {})) {
|
|
@@ -1,11 +1,11 @@
|
|
|
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-
|
|
8
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-IH7B2HKV.mjs";
|
|
7
|
+
import "../chunk-OMSCIF6B.mjs";
|
|
8
|
+
import "../chunk-HGGHOITQ.mjs";
|
|
9
9
|
import "../chunk-55C2WWXQ.mjs";
|
|
10
10
|
import "../chunk-TBQ27LIK.mjs";
|
|
11
11
|
import "../chunk-J44WR3QZ.mjs";
|
|
@@ -13,8 +13,8 @@ import "../chunk-TSF4YCUO.mjs";
|
|
|
13
13
|
import "../chunk-UAR3TMWI.mjs";
|
|
14
14
|
import "../chunk-2NIBKIZV.mjs";
|
|
15
15
|
import "../chunk-OTXV5FY7.mjs";
|
|
16
|
-
import "../chunk-VZIMT7AO.mjs";
|
|
17
16
|
import "../chunk-Z6QP3YEA.mjs";
|
|
17
|
+
import "../chunk-VZIMT7AO.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) {
|
|
@@ -10404,15 +10395,12 @@ var ClientSDK = class {
|
|
|
10404
10395
|
if (!base) {
|
|
10405
10396
|
return ERR(new InvalidRequestError("No base URL provided for operation"));
|
|
10406
10397
|
}
|
|
10407
|
-
const
|
|
10408
|
-
|
|
10398
|
+
const reqURL = new URL(base);
|
|
10399
|
+
const inputURL = new URL(path, reqURL);
|
|
10409
10400
|
if (path) {
|
|
10410
|
-
|
|
10411
|
-
reqURL
|
|
10412
|
-
} else {
|
|
10413
|
-
reqURL = baseURL;
|
|
10401
|
+
reqURL.pathname += reqURL.pathname.endsWith("/") ? "" : "/";
|
|
10402
|
+
reqURL.pathname += inputURL.pathname.replace(/^\/+/, "");
|
|
10414
10403
|
}
|
|
10415
|
-
reqURL.hash = "";
|
|
10416
10404
|
let finalQuery = query || "";
|
|
10417
10405
|
const secQuery = [];
|
|
10418
10406
|
for (const [k, v] of Object.entries(security?.queryParams || {})) {
|
|
@@ -1,11 +1,11 @@
|
|
|
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-
|
|
8
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-IH7B2HKV.mjs";
|
|
7
|
+
import "../chunk-OMSCIF6B.mjs";
|
|
8
|
+
import "../chunk-HGGHOITQ.mjs";
|
|
9
9
|
import "../chunk-55C2WWXQ.mjs";
|
|
10
10
|
import "../chunk-TBQ27LIK.mjs";
|
|
11
11
|
import "../chunk-J44WR3QZ.mjs";
|
|
@@ -13,8 +13,8 @@ import "../chunk-TSF4YCUO.mjs";
|
|
|
13
13
|
import "../chunk-UAR3TMWI.mjs";
|
|
14
14
|
import "../chunk-2NIBKIZV.mjs";
|
|
15
15
|
import "../chunk-OTXV5FY7.mjs";
|
|
16
|
-
import "../chunk-VZIMT7AO.mjs";
|
|
17
16
|
import "../chunk-Z6QP3YEA.mjs";
|
|
17
|
+
import "../chunk-VZIMT7AO.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) {
|
|
@@ -10404,15 +10395,12 @@ var ClientSDK = class {
|
|
|
10404
10395
|
if (!base) {
|
|
10405
10396
|
return ERR(new InvalidRequestError("No base URL provided for operation"));
|
|
10406
10397
|
}
|
|
10407
|
-
const
|
|
10408
|
-
|
|
10398
|
+
const reqURL = new URL(base);
|
|
10399
|
+
const inputURL = new URL(path, reqURL);
|
|
10409
10400
|
if (path) {
|
|
10410
|
-
|
|
10411
|
-
reqURL
|
|
10412
|
-
} else {
|
|
10413
|
-
reqURL = baseURL;
|
|
10401
|
+
reqURL.pathname += reqURL.pathname.endsWith("/") ? "" : "/";
|
|
10402
|
+
reqURL.pathname += inputURL.pathname.replace(/^\/+/, "");
|
|
10414
10403
|
}
|
|
10415
|
-
reqURL.hash = "";
|
|
10416
10404
|
let finalQuery = query || "";
|
|
10417
10405
|
const secQuery = [];
|
|
10418
10406
|
for (const [k, v] of Object.entries(security?.queryParams || {})) {
|
|
@@ -1,11 +1,11 @@
|
|
|
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-
|
|
8
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-IH7B2HKV.mjs";
|
|
7
|
+
import "../chunk-OMSCIF6B.mjs";
|
|
8
|
+
import "../chunk-HGGHOITQ.mjs";
|
|
9
9
|
import "../chunk-55C2WWXQ.mjs";
|
|
10
10
|
import "../chunk-TBQ27LIK.mjs";
|
|
11
11
|
import "../chunk-J44WR3QZ.mjs";
|
|
@@ -13,8 +13,8 @@ import "../chunk-TSF4YCUO.mjs";
|
|
|
13
13
|
import "../chunk-UAR3TMWI.mjs";
|
|
14
14
|
import "../chunk-2NIBKIZV.mjs";
|
|
15
15
|
import "../chunk-OTXV5FY7.mjs";
|
|
16
|
-
import "../chunk-VZIMT7AO.mjs";
|
|
17
16
|
import "../chunk-Z6QP3YEA.mjs";
|
|
17
|
+
import "../chunk-VZIMT7AO.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) {
|
|
@@ -10407,15 +10398,12 @@ var ClientSDK = class {
|
|
|
10407
10398
|
if (!base) {
|
|
10408
10399
|
return ERR(new InvalidRequestError("No base URL provided for operation"));
|
|
10409
10400
|
}
|
|
10410
|
-
const
|
|
10411
|
-
|
|
10401
|
+
const reqURL = new URL(base);
|
|
10402
|
+
const inputURL = new URL(path, reqURL);
|
|
10412
10403
|
if (path) {
|
|
10413
|
-
|
|
10414
|
-
reqURL
|
|
10415
|
-
} else {
|
|
10416
|
-
reqURL = baseURL;
|
|
10404
|
+
reqURL.pathname += reqURL.pathname.endsWith("/") ? "" : "/";
|
|
10405
|
+
reqURL.pathname += inputURL.pathname.replace(/^\/+/, "");
|
|
10417
10406
|
}
|
|
10418
|
-
reqURL.hash = "";
|
|
10419
10407
|
let finalQuery = query || "";
|
|
10420
10408
|
const secQuery = [];
|
|
10421
10409
|
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 {
|
|
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-
|
|
17
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-IH7B2HKV.mjs";
|
|
16
|
+
import "../chunk-OMSCIF6B.mjs";
|
|
17
|
+
import "../chunk-HGGHOITQ.mjs";
|
|
18
18
|
import "../chunk-55C2WWXQ.mjs";
|
|
19
19
|
import "../chunk-TBQ27LIK.mjs";
|
|
20
20
|
import "../chunk-J44WR3QZ.mjs";
|
|
@@ -22,8 +22,8 @@ import "../chunk-TSF4YCUO.mjs";
|
|
|
22
22
|
import "../chunk-UAR3TMWI.mjs";
|
|
23
23
|
import "../chunk-2NIBKIZV.mjs";
|
|
24
24
|
import "../chunk-OTXV5FY7.mjs";
|
|
25
|
-
import "../chunk-VZIMT7AO.mjs";
|
|
26
25
|
import "../chunk-Z6QP3YEA.mjs";
|
|
26
|
+
import "../chunk-VZIMT7AO.mjs";
|
|
27
27
|
import "../chunk-N7NFYY54.mjs";
|
|
28
28
|
export {
|
|
29
29
|
autumnHandler as expressAutumnHandler,
|
|
@@ -51,7 +51,7 @@ function pathToFunc(pathPattern, options) {
|
|
|
51
51
|
);
|
|
52
52
|
}
|
|
53
53
|
return options?.charEncoding === "percent" ? encodeURIComponent(`${value}`) : `${value}`;
|
|
54
|
-
})
|
|
54
|
+
});
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -79,8 +79,8 @@ var SDK_METADATA = {
|
|
|
79
79
|
language: "typescript",
|
|
80
80
|
openapiDocVersion: "2.2.0",
|
|
81
81
|
sdkVersion: "0.10.17",
|
|
82
|
-
genVersion: "2.
|
|
83
|
-
userAgent: "speakeasy-sdk/typescript 0.10.17 2.
|
|
82
|
+
genVersion: "2.824.1",
|
|
83
|
+
userAgent: "speakeasy-sdk/typescript 0.10.17 2.824.1 2.2.0 @useautumn/sdk"
|
|
84
84
|
};
|
|
85
85
|
|
|
86
86
|
// ../sdk/src/lib/http.ts
|
|
@@ -714,9 +714,8 @@ function match(...matchers) {
|
|
|
714
714
|
raw = body;
|
|
715
715
|
break;
|
|
716
716
|
default:
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
);
|
|
717
|
+
encoding;
|
|
718
|
+
throw new Error(`Unsupported response type: ${encoding}`);
|
|
720
719
|
}
|
|
721
720
|
if (matcher.enc === "fail") {
|
|
722
721
|
return [{
|
|
@@ -979,7 +978,8 @@ function resolveSecurity(...options) {
|
|
|
979
978
|
applyBearer(state, spec);
|
|
980
979
|
break;
|
|
981
980
|
default:
|
|
982
|
-
|
|
981
|
+
spec;
|
|
982
|
+
throw SecurityError.unrecognizedType(type);
|
|
983
983
|
}
|
|
984
984
|
});
|
|
985
985
|
return state;
|
|
@@ -1002,8 +1002,8 @@ function applyBearer(state, spec) {
|
|
|
1002
1002
|
state.headers[spec.fieldName] = value;
|
|
1003
1003
|
}
|
|
1004
1004
|
}
|
|
1005
|
-
function resolveGlobalSecurity(security
|
|
1006
|
-
|
|
1005
|
+
function resolveGlobalSecurity(security) {
|
|
1006
|
+
return resolveSecurity(
|
|
1007
1007
|
[
|
|
1008
1008
|
{
|
|
1009
1009
|
fieldName: "Authorization",
|
|
@@ -1011,16 +1011,7 @@ function resolveGlobalSecurity(security, allowedFields) {
|
|
|
1011
1011
|
value: security?.secretKey ?? env().AUTUMN_SECRET_KEY
|
|
1012
1012
|
}
|
|
1013
1013
|
]
|
|
1014
|
-
|
|
1015
|
-
if (allowedFields) {
|
|
1016
|
-
inputs = allowedFields.map((i) => {
|
|
1017
|
-
if (i < 0 || i >= inputs.length) {
|
|
1018
|
-
throw new RangeError(`invalid allowedFields index ${i}`);
|
|
1019
|
-
}
|
|
1020
|
-
return inputs[i];
|
|
1021
|
-
});
|
|
1022
|
-
}
|
|
1023
|
-
return resolveSecurity(...inputs);
|
|
1014
|
+
);
|
|
1024
1015
|
}
|
|
1025
1016
|
async function extractSecurity(sec) {
|
|
1026
1017
|
if (sec == null) {
|
|
@@ -10405,15 +10396,12 @@ var ClientSDK = class {
|
|
|
10405
10396
|
if (!base) {
|
|
10406
10397
|
return ERR(new InvalidRequestError("No base URL provided for operation"));
|
|
10407
10398
|
}
|
|
10408
|
-
const
|
|
10409
|
-
|
|
10399
|
+
const reqURL = new URL(base);
|
|
10400
|
+
const inputURL = new URL(path, reqURL);
|
|
10410
10401
|
if (path) {
|
|
10411
|
-
|
|
10412
|
-
reqURL
|
|
10413
|
-
} else {
|
|
10414
|
-
reqURL = baseURL;
|
|
10402
|
+
reqURL.pathname += reqURL.pathname.endsWith("/") ? "" : "/";
|
|
10403
|
+
reqURL.pathname += inputURL.pathname.replace(/^\/+/, "");
|
|
10415
10404
|
}
|
|
10416
|
-
reqURL.hash = "";
|
|
10417
10405
|
let finalQuery = query || "";
|
|
10418
10406
|
const secQuery = [];
|
|
10419
10407
|
for (const [k, v] of Object.entries(security?.queryParams || {})) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
autumnHandler
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-67LO3DQD.mjs";
|
|
4
4
|
import "../chunk-WYDGEDEU.mjs";
|
|
5
5
|
import "../chunk-VXND2UDT.mjs";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-IH7B2HKV.mjs";
|
|
7
|
+
import "../chunk-OMSCIF6B.mjs";
|
|
8
|
+
import "../chunk-HGGHOITQ.mjs";
|
|
9
9
|
import "../chunk-55C2WWXQ.mjs";
|
|
10
10
|
import "../chunk-TBQ27LIK.mjs";
|
|
11
11
|
import "../chunk-J44WR3QZ.mjs";
|
|
@@ -13,8 +13,8 @@ import "../chunk-TSF4YCUO.mjs";
|
|
|
13
13
|
import "../chunk-UAR3TMWI.mjs";
|
|
14
14
|
import "../chunk-2NIBKIZV.mjs";
|
|
15
15
|
import "../chunk-OTXV5FY7.mjs";
|
|
16
|
-
import "../chunk-VZIMT7AO.mjs";
|
|
17
16
|
import "../chunk-Z6QP3YEA.mjs";
|
|
17
|
+
import "../chunk-VZIMT7AO.mjs";
|
|
18
18
|
import "../chunk-N7NFYY54.mjs";
|
|
19
19
|
export {
|
|
20
20
|
autumnHandler
|