@typeship-ax/cli 0.6.0 → 0.9.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/AGENTS.md +31 -0
- package/README.md +26 -9
- package/api.json +6861 -3083
- package/api.md +508 -277
- package/dist/api-identity.d.ts +40 -0
- package/dist/api-identity.d.ts.map +1 -0
- package/dist/api-identity.js +128 -0
- package/dist/auth-profiles.d.ts +30 -0
- package/dist/auth-profiles.d.ts.map +1 -0
- package/dist/auth-profiles.js +138 -0
- package/dist/cli-agent.d.ts +9 -1
- package/dist/cli-agent.d.ts.map +1 -1
- package/dist/cli-agent.js +26 -9
- package/dist/cli.js +600 -582
- package/dist/console-login-check.d.ts +21 -0
- package/dist/console-login-check.d.ts.map +1 -0
- package/dist/console-login-check.js +107 -0
- package/dist/console-login-contract.d.ts +45 -0
- package/dist/console-login-contract.d.ts.map +1 -0
- package/dist/console-login-contract.js +40 -0
- package/dist/core/http.d.ts +21 -92
- package/dist/core/http.d.ts.map +1 -1
- package/dist/core/http.js +143 -221
- package/dist/core/pagination.d.ts.map +1 -1
- package/dist/core/pagination.js +6 -34
- package/dist/credential-storage.d.ts +24 -0
- package/dist/credential-storage.d.ts.map +1 -0
- package/dist/credential-storage.js +207 -0
- package/dist/dates.d.ts +0 -2
- package/dist/dates.d.ts.map +1 -1
- package/dist/dates.js +0 -1
- package/dist/docs.d.ts +36 -0
- package/dist/docs.d.ts.map +1 -0
- package/dist/docs.js +258 -0
- package/dist/errors.d.ts +42 -34
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +30 -20
- package/dist/index.d.ts +27 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +40 -14
- package/dist/named-credentials.d.ts +21 -0
- package/dist/named-credentials.d.ts.map +1 -0
- package/dist/named-credentials.js +86 -0
- package/dist/oauth-login.d.ts +39 -0
- package/dist/oauth-login.d.ts.map +1 -0
- package/dist/oauth-login.js +171 -0
- package/dist/oauth-request.d.ts +21 -0
- package/dist/oauth-request.d.ts.map +1 -0
- package/dist/oauth-request.js +119 -0
- package/dist/oauth-session.d.ts +106 -0
- package/dist/oauth-session.d.ts.map +1 -0
- package/dist/oauth-session.js +244 -0
- package/dist/ops.d.ts +18 -0
- package/dist/ops.d.ts.map +1 -1
- package/dist/ops.js +31 -17
- package/dist/polling-login.d.ts +57 -0
- package/dist/polling-login.d.ts.map +1 -0
- package/dist/polling-login.js +204 -0
- package/dist/resources/account.d.ts +4 -4
- package/dist/resources/account.d.ts.map +1 -1
- package/dist/resources/account.js +1 -0
- package/dist/resources/api-keys.d.ts +13 -8
- package/dist/resources/api-keys.d.ts.map +1 -1
- package/dist/resources/api-keys.js +5 -1
- package/dist/resources/definition-revisions.d.ts +58 -0
- package/dist/resources/definition-revisions.d.ts.map +1 -0
- package/dist/resources/definition-revisions.js +114 -0
- package/dist/resources/definitions.d.ts +35 -0
- package/dist/resources/definitions.d.ts.map +1 -0
- package/dist/resources/definitions.js +60 -0
- package/dist/resources/generate.d.ts +18 -7
- package/dist/resources/generate.d.ts.map +1 -1
- package/dist/resources/generate.js +13 -5
- package/dist/resources/generations.d.ts +6 -6
- package/dist/resources/generations.d.ts.map +1 -1
- package/dist/resources/generations.js +3 -1
- package/dist/resources/projects.d.ts +111 -35
- package/dist/resources/projects.d.ts.map +1 -1
- package/dist/resources/projects.js +125 -15
- package/dist/resources/targets.d.ts +97 -0
- package/dist/resources/targets.d.ts.map +1 -0
- package/dist/resources/targets.js +197 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +135 -62
- package/dist/types.d.ts +2072 -267
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +20 -3
- package/package.json +2 -1
- package/src/api-identity.ts +98 -0
- package/src/auth-profiles.ts +114 -0
- package/src/cli-agent.ts +28 -11
- package/src/cli.ts +528 -560
- package/src/console-login-check.ts +88 -0
- package/src/console-login-contract.ts +65 -0
- package/src/core/http.ts +156 -305
- package/src/core/pagination.ts +6 -30
- package/src/credential-storage.ts +183 -0
- package/src/dates.ts +0 -1
- package/src/docs.ts +239 -0
- package/src/errors.ts +52 -41
- package/src/index.ts +49 -14
- package/src/named-credentials.ts +74 -0
- package/src/oauth-login.ts +184 -0
- package/src/oauth-request.ts +90 -0
- package/src/oauth-session.ts +258 -0
- package/src/ops.ts +56 -17
- package/src/polling-login.ts +165 -0
- package/src/resources/account.ts +6 -3
- package/src/resources/api-keys.ts +27 -7
- package/src/resources/definition-revisions.ts +207 -0
- package/src/resources/definitions.ts +122 -0
- package/src/resources/generate.ts +29 -6
- package/src/resources/generations.ts +9 -4
- package/src/resources/projects.ts +274 -41
- package/src/resources/targets.ts +378 -0
- package/src/schemas.ts +135 -62
- package/src/types.ts +2273 -322
- package/dist/resources/spec-revisions.d.ts +0 -47
- package/dist/resources/spec-revisions.d.ts.map +0 -1
- package/dist/resources/spec-revisions.js +0 -90
- package/src/resources/spec-revisions.ts +0 -150
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ConsoleLoginCheck, type ConsoleLoginConfiguration } from "./console-login-contract.js";
|
|
2
|
+
import { type OAuthLoginSession } from "./oauth-login.js";
|
|
3
|
+
import { type CredentialSchemes, type NamedCredentials } from "./named-credentials.js";
|
|
4
|
+
/** No traffic to Typeship occurs without the explicit --console-check action.
|
|
5
|
+
* Only the credentials selected for the identity read leave this process;
|
|
6
|
+
* refresh tokens and other stored logins are never sent to the Console. */
|
|
7
|
+
export declare function checkConsoleBrowserLogin(input: {
|
|
8
|
+
file: string;
|
|
9
|
+
configuration: ConsoleLoginConfiguration;
|
|
10
|
+
schemes: CredentialSchemes;
|
|
11
|
+
credentials: NamedCredentials;
|
|
12
|
+
login(timeoutMs: number): Promise<OAuthLoginSession>;
|
|
13
|
+
verify(credentials: NamedCredentials, expectations: ConsoleLoginCheck["expectations"]): Promise<void>;
|
|
14
|
+
progress(message: string): void;
|
|
15
|
+
}): Promise<{
|
|
16
|
+
ok: true;
|
|
17
|
+
method: "oauth_browser";
|
|
18
|
+
console_verified: true;
|
|
19
|
+
revoked: boolean | null;
|
|
20
|
+
}>;
|
|
21
|
+
//# sourceMappingURL=console-login-check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console-login-check.d.ts","sourceRoot":"","sources":["../src/console-login-check.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgE,KAAK,iBAAiB,EAAE,KAAK,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACnK,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAyB,KAAK,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAuB9G;;2EAE2E;AAC3E,wBAAsB,wBAAwB,CAAC,KAAK,EAAE;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,yBAAyB,CAAC;IACzC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,WAAW,EAAE,gBAAgB,CAAC;IAC9B,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACrD,MAAM,CAAC,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,iBAAiB,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtG,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC,GAAG,OAAO,CAAC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,eAAe,CAAC;IAAC,gBAAgB,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;CAAE,CAAC,CAiDlG"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { openSync, readSync, closeSync, fstatSync, constants } from "node:fs";
|
|
2
|
+
import { oauthJsonRequest } from "./oauth-request.js";
|
|
3
|
+
import { sameConsoleLoginConfiguration, matchesConsoleBrowserEvidence } from "./console-login-contract.js";
|
|
4
|
+
import { parseNamedCredentials } from "./named-credentials.js";
|
|
5
|
+
function readCheck(path) {
|
|
6
|
+
let fd;
|
|
7
|
+
try {
|
|
8
|
+
fd = openSync(path, constants.O_RDONLY | constants.O_NONBLOCK);
|
|
9
|
+
if (!fstatSync(fd).isFile())
|
|
10
|
+
throw new Error();
|
|
11
|
+
const buffer = Buffer.alloc(65_537);
|
|
12
|
+
let size = 0;
|
|
13
|
+
while (size < buffer.length) {
|
|
14
|
+
const n = readSync(fd, buffer, size, buffer.length - size, null);
|
|
15
|
+
if (!n)
|
|
16
|
+
break;
|
|
17
|
+
size += n;
|
|
18
|
+
}
|
|
19
|
+
if (size > 65_536)
|
|
20
|
+
throw new Error();
|
|
21
|
+
const value = JSON.parse(buffer.subarray(0, size).toString("utf8"));
|
|
22
|
+
if (value.version !== 1 || typeof value.ticket !== "string" || !/^[A-Za-z0-9_-]{43}$/.test(value.ticket) || !value.configuration || !Array.isArray(value.expectations) || !value.expectations.length || value.expectations.length > 3)
|
|
23
|
+
throw new Error();
|
|
24
|
+
const endpoint = new URL(value.endpoint);
|
|
25
|
+
const development = endpoint.protocol === "http:" && ["127.0.0.1", "[::1]"].includes(endpoint.hostname);
|
|
26
|
+
if (!(endpoint.origin === "https://typeship.dev" || development) || endpoint.pathname !== "/api/authentication/browser" || endpoint.username || endpoint.password || endpoint.search || endpoint.hash)
|
|
27
|
+
throw new Error();
|
|
28
|
+
const remaining = Date.parse(value.expiresAt) - Date.now();
|
|
29
|
+
if (!Number.isFinite(remaining) || remaining <= 0 || remaining > 600_000)
|
|
30
|
+
throw new Error();
|
|
31
|
+
return value;
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
throw new Error("Download a new login check from your Typeship Console and pass its JSON file to --console-check. Checks expire after ten minutes.");
|
|
35
|
+
}
|
|
36
|
+
finally {
|
|
37
|
+
if (fd !== undefined)
|
|
38
|
+
closeSync(fd);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/** No traffic to Typeship occurs without the explicit --console-check action.
|
|
42
|
+
* Only the credentials selected for the identity read leave this process;
|
|
43
|
+
* refresh tokens and other stored logins are never sent to the Console. */
|
|
44
|
+
export async function checkConsoleBrowserLogin(input) {
|
|
45
|
+
const check = readCheck(input.file);
|
|
46
|
+
if (!sameConsoleLoginConfiguration(input.configuration, check.configuration))
|
|
47
|
+
throw new Error("This CLI's authentication settings do not match the saved Target. Regenerate the CLI, select the matching environment, and download a new check.");
|
|
48
|
+
const send = async (body, timeoutMs = 30_000) => {
|
|
49
|
+
const response = await oauthJsonRequest(check.endpoint, { method: "POST", headers: { "Content-Type": "application/json", Accept: "application/json" }, body: JSON.stringify({ ticket: check.ticket, ...body }) }, timeoutMs);
|
|
50
|
+
if (response.status === 422)
|
|
51
|
+
throw new Error("Typeship could not verify this login. Check the expected identity, API permissions and saved Target settings, then download a new check.");
|
|
52
|
+
if (response.status !== 200 || response.data?.ok !== true)
|
|
53
|
+
throw new Error("The Console check expired, was already used, changed, or could not be completed. Download a new check and try again.");
|
|
54
|
+
return response.data;
|
|
55
|
+
};
|
|
56
|
+
await send({ action: "inspect" });
|
|
57
|
+
let revoked = null;
|
|
58
|
+
try {
|
|
59
|
+
const supplied = parseNamedCredentials(input.credentials, input.schemes);
|
|
60
|
+
// Only a complete alternative that uses the fresh browser token proves
|
|
61
|
+
// browser access. An unrelated key-only alternative is not sufficient.
|
|
62
|
+
const requirement = input.configuration.requirements.find((entry) => {
|
|
63
|
+
const names = Object.keys(entry);
|
|
64
|
+
if (!names.some((name) => input.schemes[name]?.kind === "bearer") || !names.every((name) => input.schemes[name]?.kind === "bearer" || supplied[name] !== undefined))
|
|
65
|
+
return false;
|
|
66
|
+
const selected = input.configuration.requirements.find((candidate) => Object.keys(candidate).every((name) => names.includes(name)));
|
|
67
|
+
return selected && Object.keys(selected).some((name) => input.schemes[name]?.kind === "bearer");
|
|
68
|
+
});
|
|
69
|
+
if (!requirement)
|
|
70
|
+
throw new Error("Supply the additional named credentials required by the identity read with --credentials @file or environment variables.");
|
|
71
|
+
input.progress("This check runs a temporary browser login. Typeship will receive only the access token and any additional credentials required for the identity read; refresh tokens stay on this computer.");
|
|
72
|
+
const session = await input.login(Math.max(1, Date.parse(check.expiresAt) - Date.now()));
|
|
73
|
+
try {
|
|
74
|
+
const evidence = { method: "oauth_browser", issuer: session.issuer, clientId: session.clientId, redirectUri: session.redirectUri };
|
|
75
|
+
if (!matchesConsoleBrowserEvidence(input.configuration, evidence))
|
|
76
|
+
throw new Error("The browser login did not use the Target's client registration and native callback.");
|
|
77
|
+
const credentials = Object.fromEntries(Object.keys(requirement).map((name) => [name, input.schemes[name].kind === "bearer" ? session.accessToken : supplied[name]]));
|
|
78
|
+
await input.verify(credentials, check.expectations);
|
|
79
|
+
await send({ action: "complete", configuration: input.configuration, evidence, credentials, expectations: check.expectations });
|
|
80
|
+
}
|
|
81
|
+
finally {
|
|
82
|
+
// Verification sessions never replace the customer's saved login.
|
|
83
|
+
// Revoke the temporary grant when the provider advertises an endpoint.
|
|
84
|
+
if (session.revocationUrl) {
|
|
85
|
+
try {
|
|
86
|
+
const response = await fetch(session.revocationUrl, { method: "POST", redirect: "error", credentials: "omit", signal: AbortSignal.timeout(10_000), headers: { "Content-Type": "application/x-www-form-urlencoded" }, body: new URLSearchParams({ token: session.refreshToken ?? session.accessToken, token_type_hint: session.refreshToken ? "refresh_token" : "access_token", client_id: session.clientId }) });
|
|
87
|
+
void response.body?.cancel().catch(() => { });
|
|
88
|
+
revoked = response.status === 200;
|
|
89
|
+
}
|
|
90
|
+
catch {
|
|
91
|
+
revoked = false;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
catch (error) {
|
|
97
|
+
// Report only that the attempt ended. Never send provider errors, identity
|
|
98
|
+
// values or credentials, and never replace the original local error. A
|
|
99
|
+
// consumed check rejects this report, preserving any completed API proof.
|
|
100
|
+
try {
|
|
101
|
+
await send({ action: "fail" }, 5_000);
|
|
102
|
+
}
|
|
103
|
+
catch { /* Best effort; the Console can still expire the check. */ }
|
|
104
|
+
throw error;
|
|
105
|
+
}
|
|
106
|
+
return { ok: true, method: "oauth_browser", console_verified: true, revoked };
|
|
107
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export interface ConsoleLoginConfiguration {
|
|
2
|
+
baseUrl: string;
|
|
3
|
+
environment: string | null;
|
|
4
|
+
operation: string;
|
|
5
|
+
request: {
|
|
6
|
+
method: string;
|
|
7
|
+
path: string;
|
|
8
|
+
graphqlField: string | null;
|
|
9
|
+
graphqlQuery: string | null;
|
|
10
|
+
};
|
|
11
|
+
requirements: Record<string, string[]>[];
|
|
12
|
+
issuer: string;
|
|
13
|
+
clientId: string;
|
|
14
|
+
discoveryUrl: string | null;
|
|
15
|
+
authorizationUrl: string | null;
|
|
16
|
+
tokenUrl: string | null;
|
|
17
|
+
redirectUri: string;
|
|
18
|
+
scopes: string[];
|
|
19
|
+
audience: string | null;
|
|
20
|
+
resource: string | null;
|
|
21
|
+
}
|
|
22
|
+
export interface ConsoleIdentityExpectation {
|
|
23
|
+
kind: "account" | "organization" | "user";
|
|
24
|
+
pointer: string;
|
|
25
|
+
expected: string | number;
|
|
26
|
+
}
|
|
27
|
+
export interface ConsoleLoginCheck {
|
|
28
|
+
version: 1;
|
|
29
|
+
endpoint: string;
|
|
30
|
+
ticket: string;
|
|
31
|
+
expiresAt: string;
|
|
32
|
+
configuration: ConsoleLoginConfiguration;
|
|
33
|
+
expectations: ConsoleIdentityExpectation[];
|
|
34
|
+
}
|
|
35
|
+
export interface ConsoleBrowserEvidence {
|
|
36
|
+
method: "oauth_browser";
|
|
37
|
+
issuer: string;
|
|
38
|
+
clientId: string;
|
|
39
|
+
redirectUri: string;
|
|
40
|
+
}
|
|
41
|
+
/** Compare the generated product's own settings with the reviewed check.
|
|
42
|
+
* The downloaded file never supplies the CLI's OAuth or API destination. */
|
|
43
|
+
export declare function sameConsoleLoginConfiguration(left: ConsoleLoginConfiguration, right: ConsoleLoginConfiguration): boolean;
|
|
44
|
+
export declare function matchesConsoleBrowserEvidence(config: ConsoleLoginConfiguration, evidence: ConsoleBrowserEvidence): boolean;
|
|
45
|
+
//# sourceMappingURL=console-login-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console-login-contract.d.ts","sourceRoot":"","sources":["../src/console-login-contract.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IACpG,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AACD,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,SAAS,GAAG,cAAc,GAAG,MAAM,CAAC;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3B;AACD,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,CAAC,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,yBAAyB,CAAC;IACzC,YAAY,EAAE,0BAA0B,EAAE,CAAC;CAC5C;AACD,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,eAAe,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB;AAQD;4EAC4E;AAC5E,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,yBAAyB,EAAE,KAAK,EAAE,yBAAyB,GAAG,OAAO,CAOxH;AAED,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,yBAAyB,EAAE,QAAQ,EAAE,sBAAsB,GAAG,OAAO,CAU1H"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
function canonical(value) {
|
|
2
|
+
if (Array.isArray(value))
|
|
3
|
+
return "[" + value.map(canonical).join(",") + "]";
|
|
4
|
+
if (value && typeof value === "object")
|
|
5
|
+
return "{" + Object.entries(value).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(([key, item]) => JSON.stringify(key) + ":" + canonical(item)).join(",") + "}";
|
|
6
|
+
return JSON.stringify(value) ?? "null";
|
|
7
|
+
}
|
|
8
|
+
/** Compare the generated product's own settings with the reviewed check.
|
|
9
|
+
* The downloaded file never supplies the CLI's OAuth or API destination. */
|
|
10
|
+
export function sameConsoleLoginConfiguration(left, right) {
|
|
11
|
+
const normalize = (value) => ({ ...value,
|
|
12
|
+
baseUrl: new URL(value.baseUrl).href,
|
|
13
|
+
scopes: [...new Set(value.scopes)].sort(),
|
|
14
|
+
requirements: value.requirements.map((entry) => Object.fromEntries(Object.entries(entry).map(([key, scopes]) => [key, [...new Set(scopes)].sort()]))),
|
|
15
|
+
});
|
|
16
|
+
try {
|
|
17
|
+
return canonical(normalize(left)) === canonical(normalize(right));
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export function matchesConsoleBrowserEvidence(config, evidence) {
|
|
24
|
+
try {
|
|
25
|
+
if (evidence.method !== "oauth_browser" || evidence.issuer !== config.issuer || evidence.clientId !== config.clientId)
|
|
26
|
+
return false;
|
|
27
|
+
const configured = new URL(config.redirectUri), actual = new URL(evidence.redirectUri);
|
|
28
|
+
if (configured.protocol !== "http:" || !["127.0.0.1", "[::1]"].includes(configured.hostname) || configured.username || configured.password || configured.search || configured.hash)
|
|
29
|
+
return false;
|
|
30
|
+
if (configured.port && configured.port !== actual.port)
|
|
31
|
+
return false;
|
|
32
|
+
if (!actual.port)
|
|
33
|
+
return false;
|
|
34
|
+
configured.port = actual.port;
|
|
35
|
+
return configured.href === actual.href;
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
}
|
package/dist/core/http.d.ts
CHANGED
|
@@ -15,7 +15,12 @@ export interface RequestOptions {
|
|
|
15
15
|
export interface ResponseMeta {
|
|
16
16
|
status: number;
|
|
17
17
|
headers: Headers;
|
|
18
|
-
/**
|
|
18
|
+
/** Parsed wire body before it is narrowed to the generated response type.
|
|
19
|
+
* Use this escape hatch for additive fields or variants introduced after
|
|
20
|
+
* this generator edition. */
|
|
21
|
+
rawBody?: unknown;
|
|
22
|
+
/** Request identifier from the JSON response body, or from headers for
|
|
23
|
+
* raw and bodyless responses. */
|
|
19
24
|
requestId?: string;
|
|
20
25
|
}
|
|
21
26
|
/**
|
|
@@ -32,15 +37,6 @@ export interface RequestContext {
|
|
|
32
37
|
/** 0 on the first try, increments per retry. */
|
|
33
38
|
attempt: number;
|
|
34
39
|
}
|
|
35
|
-
/** One server-sent event from a text/event-stream response. */
|
|
36
|
-
export interface SseEvent {
|
|
37
|
-
/** The `event:` field; undefined for unnamed events. */
|
|
38
|
-
event?: string;
|
|
39
|
-
/** The `id:` field, when the server sends one. */
|
|
40
|
-
id?: string;
|
|
41
|
-
/** Concatenated `data:` lines. Parse as JSON if your API sends JSON. */
|
|
42
|
-
data: string;
|
|
43
|
-
}
|
|
44
40
|
/**
|
|
45
41
|
* Every SDK call returns a discriminated result instead of throwing.
|
|
46
42
|
* Narrow on `ok` and the error side is a typed union of the documented
|
|
@@ -68,62 +64,14 @@ export declare class ApiError<S extends number = number, B = unknown> extends Er
|
|
|
68
64
|
export declare class UnexpectedApiError extends ApiError<number, unknown> {
|
|
69
65
|
constructor(status: number, body: unknown, response: ResponseMeta);
|
|
70
66
|
}
|
|
71
|
-
/** A
|
|
72
|
-
export declare class
|
|
73
|
-
|
|
74
|
-
readonly
|
|
75
|
-
message?: string;
|
|
76
|
-
path?: unknown[];
|
|
77
|
-
extensions?: unknown;
|
|
78
|
-
}[];
|
|
67
|
+
/** A successful response declared JSON but carried a body that could not be parsed. */
|
|
68
|
+
export declare class ResponseParseError extends Error {
|
|
69
|
+
readonly status: number;
|
|
70
|
+
readonly body: string;
|
|
79
71
|
readonly response: ResponseMeta;
|
|
80
|
-
|
|
72
|
+
readonly cause?: unknown;
|
|
73
|
+
constructor(body: string, response: ResponseMeta, cause?: unknown);
|
|
81
74
|
}
|
|
82
|
-
type Primitive = string | number | boolean | bigint | symbol | null | undefined;
|
|
83
|
-
type Unwrap<T> = NonNullable<T> extends readonly (infer U)[] ? Unwrap<U> : NonNullable<T>;
|
|
84
|
-
type IsUnion<T, U = T> = T extends unknown ? ([U] extends [T] ? false : true) : never;
|
|
85
|
-
type TypeNameOf<T> = T extends {
|
|
86
|
-
__typename?: infer N;
|
|
87
|
-
} ? Extract<N, string> : never;
|
|
88
|
-
type Prettify<T> = {
|
|
89
|
-
[K in keyof T]: T[K];
|
|
90
|
-
} & {};
|
|
91
|
-
/**
|
|
92
|
-
* A selection over a GraphQL result type `T`: `true` picks a leaf field, a
|
|
93
|
-
* nested object picks inside an object field, and `on` picks per concrete
|
|
94
|
-
* type when `T` is a union or interface (`{ on: { Transaction: { amount: true } } }`).
|
|
95
|
-
* Keys are checked against the schema, so a typo is a compile error.
|
|
96
|
-
*/
|
|
97
|
-
export type Selection<T> = Unwrap<T> extends Primitive ? never : SelectionObject<Unwrap<T>>;
|
|
98
|
-
type FieldSelection<V> = Unwrap<V> extends Primitive ? true : SelectionObject<Unwrap<V>>;
|
|
99
|
-
type SelectionObject<T> = {
|
|
100
|
-
[K in Extract<keyof T, string> as K extends "__typename" ? never : K]?: FieldSelection<T[K]>;
|
|
101
|
-
} & {
|
|
102
|
-
__typename?: true;
|
|
103
|
-
} & (IsUnion<T> extends true ? {
|
|
104
|
-
on?: {
|
|
105
|
-
[N in TypeNameOf<T>]?: SelectionObject<Extract<T, {
|
|
106
|
-
__typename?: N;
|
|
107
|
-
}>>;
|
|
108
|
-
};
|
|
109
|
-
} : {
|
|
110
|
-
on?: never;
|
|
111
|
-
});
|
|
112
|
-
/** The result type a {@link Selection} `S` produces from result type `T`:
|
|
113
|
-
* exactly the fields picked, nullability and lists preserved, union members
|
|
114
|
-
* narrowed by `__typename`. */
|
|
115
|
-
export type Selected<T, S> = T extends readonly (infer U)[] ? Selected<U, S>[] : T extends Primitive ? T : S extends object ? Prettify<SelectedMember<T, S>> : never;
|
|
116
|
-
type SelectedMember<T, S> = (S extends {
|
|
117
|
-
on?: infer O;
|
|
118
|
-
} ? O extends object ? TypeNameOf<T> extends keyof O ? PickSelected<T, NonNullable<O[TypeNameOf<T>]>> : {} : {} : {}) & PickSelected<T, S>;
|
|
119
|
-
type PickSelected<T, S> = {
|
|
120
|
-
-readonly [K in keyof S as K extends "on" ? never : K extends keyof T ? (S[K] extends true | object ? K : never) : never]-?: K extends "__typename" ? NonNullable<T[K & keyof T]> : S[K] extends true ? Exclude<T[K & keyof T], undefined> : Selected<Exclude<T[K & keyof T], undefined>, S[K]>;
|
|
121
|
-
};
|
|
122
|
-
/** A selection object or a raw selection set (`"{ id name }"`). */
|
|
123
|
-
export type SelectionInput = string | Record<string, unknown>;
|
|
124
|
-
/** Serialize a selection object to a GraphQL selection set. Strings pass
|
|
125
|
-
* through untouched. */
|
|
126
|
-
export declare function selectionToString(selection: SelectionInput): string;
|
|
127
75
|
export interface Violation {
|
|
128
76
|
path: string;
|
|
129
77
|
message: string;
|
|
@@ -142,13 +90,14 @@ export declare class ValidationError extends Error {
|
|
|
142
90
|
* are ignored: validation can miss drift but never false-alarms.
|
|
143
91
|
*/
|
|
144
92
|
export declare function validateAgainstSchema(value: unknown, schema: unknown, path: string, out: Violation[], defs?: Record<string, unknown>): void;
|
|
145
|
-
/** The request
|
|
93
|
+
/** The request failed before a complete HTTP response arrived (network failure, timeout, abort, or truncated body). */
|
|
146
94
|
export declare class TransportError extends Error {
|
|
147
95
|
readonly cause?: unknown;
|
|
148
96
|
constructor(message: string, cause?: unknown);
|
|
149
97
|
}
|
|
150
98
|
type ErrorCtor = new (body: any, response: ResponseMeta) => ApiError<number, unknown>;
|
|
151
99
|
export interface CoreRequest {
|
|
100
|
+
security?: Record<string, string[]>[];
|
|
152
101
|
method: string;
|
|
153
102
|
path: string;
|
|
154
103
|
query?: Record<string, unknown>;
|
|
@@ -159,14 +108,9 @@ export interface CoreRequest {
|
|
|
159
108
|
errors?: Record<string, ErrorCtor>;
|
|
160
109
|
/** Idempotent requests are retried automatically. */
|
|
161
110
|
idempotent?: boolean;
|
|
162
|
-
/** Success body is text/event-stream: yield SseEvents instead of parsing. */
|
|
163
|
-
stream?: boolean;
|
|
164
111
|
/** Header name auto-filled with one UUID per call (stable across retries)
|
|
165
112
|
* when the caller doesn't supply a value. */
|
|
166
113
|
idempotencyKey?: string;
|
|
167
|
-
/** GraphQL: unwrap body.data[field] and turn body.errors into a
|
|
168
|
-
* GraphQLRequestError. */
|
|
169
|
-
graphqlField?: string;
|
|
170
114
|
/** Key into the schemas table for optional runtime validation. */
|
|
171
115
|
schemaKey?: string;
|
|
172
116
|
/** Operation-level retry policy (x-typeship-retries), merged over the
|
|
@@ -184,7 +128,13 @@ export interface RetryPolicy {
|
|
|
184
128
|
/** Also retry non-idempotent methods (POST/PATCH). */
|
|
185
129
|
retryNonIdempotent?: boolean;
|
|
186
130
|
}
|
|
131
|
+
export interface SecurityCredential {
|
|
132
|
+
headers?: Record<string, AuthValue>;
|
|
133
|
+
query?: Record<string, AuthValue>;
|
|
134
|
+
}
|
|
187
135
|
export interface CoreConfig {
|
|
136
|
+
/** Named credentials are selected using each operation's requirements. */
|
|
137
|
+
credentials?: Record<string, SecurityCredential>;
|
|
188
138
|
baseUrl: string;
|
|
189
139
|
headers: Record<string, AuthValue>;
|
|
190
140
|
/** Auth carried as query parameters (apiKey-in-query schemes). */
|
|
@@ -242,7 +192,7 @@ export interface DebugEvent {
|
|
|
242
192
|
/** 1-based; >1 means this was a retry */
|
|
243
193
|
attempt: number;
|
|
244
194
|
requestId?: string;
|
|
245
|
-
/** transport failure message, when
|
|
195
|
+
/** transport failure message, when the request failed before a complete response */
|
|
246
196
|
error?: string;
|
|
247
197
|
}
|
|
248
198
|
export declare class HttpCore {
|
|
@@ -277,27 +227,6 @@ export declare class HttpCore {
|
|
|
277
227
|
export declare function formatDebugEvent(name: string, event: DebugEvent): string;
|
|
278
228
|
/** Wrap a bearer credential (static or callback) as an Authorization value. */
|
|
279
229
|
export declare function bearerAuth(token: AuthValue): AuthValue;
|
|
280
|
-
export interface ClientCredentialsConfig {
|
|
281
|
-
clientId: string;
|
|
282
|
-
clientSecret: string;
|
|
283
|
-
tokenUrl: string;
|
|
284
|
-
scopes?: string[];
|
|
285
|
-
/** Extra token-request parameters, e.g. the "audience" some
|
|
286
|
-
* authorization servers require for API-valid access tokens. */
|
|
287
|
-
tokenParams?: Record<string, string>;
|
|
288
|
-
/** How credentials reach the token endpoint. Default "post"
|
|
289
|
-
* (client_secret_post, form fields); "basic" sends an Authorization
|
|
290
|
-
* header (client_secret_basic). */
|
|
291
|
-
authMethod?: "post" | "basic";
|
|
292
|
-
fetchImpl?: typeof fetch;
|
|
293
|
-
}
|
|
294
|
-
/**
|
|
295
|
-
* OAuth2 client-credentials token source: fetches from the token URL,
|
|
296
|
-
* caches until expiry (60s early refresh), and shares one in-flight
|
|
297
|
-
* request across concurrent callers. Returned function plugs in as an
|
|
298
|
-
* Authorization AuthValue, resolved before every attempt.
|
|
299
|
-
*/
|
|
300
|
-
export declare function oauthClientCredentials(config: ClientCredentialsConfig): () => Promise<string>;
|
|
301
230
|
export declare function toBase64(input: string): string;
|
|
302
231
|
export {};
|
|
303
232
|
//# sourceMappingURL=http.d.ts.map
|
package/dist/core/http.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/core/http.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,cAAc;IAC7B,iEAAiE;IACjE,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,mCAAmC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IAC7C,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/core/http.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,cAAc;IAC7B,iEAAiE;IACjE,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,mCAAmC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IAC7C,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,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