@every-app/sdk 0.3.0-rc.1 → 0.3.0-rc.3
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/LICENSE +21 -0
- package/dist/cloudflare/index.d.ts +2 -2
- package/dist/cloudflare/index.d.ts.map +1 -1
- package/dist/cloudflare/index.js +1 -1
- package/dist/cloudflare/sentinel.d.ts +39 -1
- package/dist/cloudflare/sentinel.d.ts.map +1 -1
- package/dist/cloudflare/sentinel.js +22 -1
- package/dist/cloudflare/worker.d.ts +205 -7
- package/dist/cloudflare/worker.d.ts.map +1 -1
- package/dist/cloudflare/worker.js +174 -11
- package/dist/internal/aiDefault.d.ts +141 -0
- package/dist/internal/aiDefault.d.ts.map +1 -0
- package/dist/internal/aiDefault.js +204 -0
- package/dist/internal/aiProviders.d.ts +4 -1
- package/dist/internal/aiProviders.d.ts.map +1 -1
- package/dist/internal/aiProviders.js +5 -1
- package/dist/internal/appSettings.d.ts +20 -2
- package/dist/internal/appSettings.d.ts.map +1 -1
- package/dist/internal/appSettings.js +53 -7
- package/dist/internal/audit.d.ts +108 -0
- package/dist/internal/audit.d.ts.map +1 -0
- package/dist/internal/audit.js +235 -0
- package/dist/internal/capabilities.d.ts +2315 -141
- package/dist/internal/capabilities.d.ts.map +1 -1
- package/dist/internal/capabilities.js +122 -0
- package/dist/internal/catalog/commerce.d.ts +394 -0
- package/dist/internal/catalog/commerce.d.ts.map +1 -0
- package/dist/internal/catalog/commerce.js +477 -0
- package/dist/internal/catalog/comms.d.ts +338 -0
- package/dist/internal/catalog/comms.d.ts.map +1 -0
- package/dist/internal/catalog/comms.js +477 -0
- package/dist/internal/catalog/index.d.ts +1936 -0
- package/dist/internal/catalog/index.d.ts.map +1 -0
- package/dist/internal/catalog/index.js +19 -0
- package/dist/internal/catalog/inference.d.ts +393 -0
- package/dist/internal/catalog/inference.d.ts.map +1 -0
- package/dist/internal/catalog/inference.js +457 -0
- package/dist/internal/catalog/infra.d.ts +423 -0
- package/dist/internal/catalog/infra.d.ts.map +1 -0
- package/dist/internal/catalog/infra.js +543 -0
- package/dist/internal/catalog/search.d.ts +400 -0
- package/dist/internal/catalog/search.d.ts.map +1 -0
- package/dist/internal/catalog/search.js +463 -0
- package/dist/internal/devProviders.d.ts +2 -2
- package/dist/internal/devProviders.d.ts.map +1 -1
- package/dist/internal/devProviders.js +19 -1
- package/dist/internal/events.d.ts +13 -2
- package/dist/internal/events.d.ts.map +1 -1
- package/dist/internal/events.js +21 -3
- package/dist/internal/gatewaySettings.d.ts +2 -1
- package/dist/internal/gatewaySettings.d.ts.map +1 -1
- package/dist/internal/gatewaySettings.js +10 -2
- package/dist/internal/index.d.ts +5 -0
- package/dist/internal/index.d.ts.map +1 -1
- package/dist/internal/index.js +5 -0
- package/dist/internal/oauthPresets.d.ts +29 -0
- package/dist/internal/oauthPresets.d.ts.map +1 -0
- package/dist/internal/oauthPresets.js +534 -0
- package/dist/internal/oauthScopes.d.ts +56 -1
- package/dist/internal/oauthScopes.d.ts.map +1 -1
- package/dist/internal/oauthScopes.js +98 -4
- package/dist/internal/oauthSpec.d.ts +59 -0
- package/dist/internal/oauthSpec.d.ts.map +1 -0
- package/dist/internal/oauthSpec.js +676 -0
- package/dist/internal/protocol.d.ts +11 -0
- package/dist/internal/protocol.d.ts.map +1 -1
- package/dist/internal/protocol.js +9 -0
- package/dist/internal/providerRegistry.d.ts +17 -6
- package/dist/internal/providerRegistry.d.ts.map +1 -1
- package/dist/internal/providerRegistry.js +51 -2
- package/dist/internal/providerSpec.d.ts +11 -7
- package/dist/internal/providerSpec.d.ts.map +1 -1
- package/dist/internal/providerSpec.js +142 -33
- package/dist/internal/signInProviders.d.ts +104 -0
- package/dist/internal/signInProviders.d.ts.map +1 -0
- package/dist/internal/signInProviders.js +245 -0
- package/dist/server/ai.d.ts +45 -0
- package/dist/server/ai.d.ts.map +1 -0
- package/dist/server/ai.js +40 -0
- package/dist/server/connectUrl.d.ts +21 -0
- package/dist/server/connectUrl.d.ts.map +1 -0
- package/dist/server/connectUrl.js +37 -0
- package/dist/server/gatewayFetch.d.ts.map +1 -1
- package/dist/server/gatewayFetch.js +72 -8
- package/dist/server/index.d.ts +4 -2
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +3 -1
- package/dist/server/integrationFetch.d.ts +39 -2
- package/dist/server/integrationFetch.d.ts.map +1 -1
- package/dist/server/integrationFetch.js +177 -13
- package/package.json +12 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../src/internal/protocol.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAwB,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,eAAO,MAAM,YAAY,UAAU,CAAC;AACpC,eAAO,MAAM,eAAe,sBAAsB,CAAC;AACnD,eAAO,MAAM,mBAAmB,0BAA0B,CAAC;AAC3D;;;;GAIG;AACH,eAAO,MAAM,UAAU,kCAAkC,CAAC;AAC1D,eAAO,MAAM,eAAe,wBAAwB,CAAC;AACrD,eAAO,MAAM,aAAa,sBAAsB,CAAC;AACjD;;;;GAIG;AACH,eAAO,MAAM,aAAa,sBAAsB,CAAC;AACjD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,qBAAqB,CAAC;AACvD;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,mBAAmB,CAAC;AAC3C,kFAAkF;AAClF,eAAO,MAAM,oBAAoB,MAAM,CAAC;AACxC,mEAAmE;AACnE,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAC3C,8CAA8C;AAC9C,eAAO,MAAM,UAAU,oBAAoB,CAAC;AAC5C;;;;;GAKG;AACH,eAAO,MAAM,YAAY,sBAAsB,CAAC;AAChD,qEAAqE;AACrE,eAAO,MAAM,eAAe,kCAAkC,CAAC;AAC/D,mFAAmF;AACnF,eAAO,MAAM,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Aa,EAAE,MAAM,EACrB,IAAI,EAAE,mBAAmB,GACxB,OAAO,CAAC,MAAM,CAAC,CAyBjB;AAED,MAAM,WAAW,uBAAuB;IACtC,qEAAqE;IACrE,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,uBAAuB,GAC5B,OAAO,CAAC,MAAM,CAAC,CAgBjB;AAED,MAAM,WAAW,sBAAsB;IACrC,6DAA6D;IAC7D,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,kBAAkB,CAAC;IAC5B,gDAAgD;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CACjC,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,sBAAsB,GAC3B,OAAO,CAAC,MAAM,CAAC,CA0BjB"}
|
|
@@ -38,6 +38,15 @@ export const GATEWAY_ERROR_HEADER = "x-everyapp-error";
|
|
|
38
38
|
* from what browsers send.
|
|
39
39
|
*/
|
|
40
40
|
export const ORG_HEADER = "x-everyapp-org";
|
|
41
|
+
/**
|
|
42
|
+
* Which connection an app's call to an OAuth provider uses: the person's
|
|
43
|
+
* (`user`, the default when a person is behind the call) or the
|
|
44
|
+
* organization's (`organization`, the default for background work),
|
|
45
|
+
* docs/design/2026-10-oauth-providers.md section 7. Set by
|
|
46
|
+
* `integrationFetch({ account })`; the gateway reads it on the held-token
|
|
47
|
+
* branch and ignores it elsewhere.
|
|
48
|
+
*/
|
|
49
|
+
export const ACCOUNT_HEADER = "x-everyapp-account";
|
|
41
50
|
/** 120-second lifetime — caps revocation staleness while surviving clock skew. */
|
|
42
51
|
export const IDENTITY_TTL_SECONDS = 120;
|
|
43
52
|
/** System tokens are minted per call and live at most a minute. */
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
* and not one the gateway serves itself (`refuseHost`, which knows the
|
|
21
21
|
* gateway's own host and `APP_BASE_DOMAIN`).
|
|
22
22
|
*/
|
|
23
|
-
import { type
|
|
23
|
+
import { type Capability, type CapabilityLookup } from "./capabilities.js";
|
|
24
|
+
import { type RegistrableCapability } from "./providerSpec.js";
|
|
24
25
|
/** A `providers` row as the gateway or the CLI read it. */
|
|
25
26
|
export interface ProviderRow {
|
|
26
27
|
id: string;
|
|
@@ -42,13 +43,17 @@ export interface ProviderRow {
|
|
|
42
43
|
* The part of a row a key is set for: its hosts, its host setting and its
|
|
43
44
|
* auth, as one canonical string (sorted keys, sorted hosts), so that
|
|
44
45
|
* replacing a row's hosts or auth changes the key and the value it held
|
|
45
|
-
* is no longer read until the operator sets it again.
|
|
46
|
+
* is no longer read until the operator sets it again. For an OAuth
|
|
47
|
+
* provider the client is bound to its authorize, token and revoke URLs,
|
|
48
|
+
* its API hosts, where the client goes on the token request and its
|
|
49
|
+
* client setting names (`oauth.client-bound-to-endpoints`): an admin who
|
|
50
|
+
* re-points `tokenUrl` has to paste the secret again.
|
|
46
51
|
*/
|
|
47
|
-
export declare function providerBindingKey(capability:
|
|
52
|
+
export declare function providerBindingKey(capability: RegistrableCapability): string;
|
|
48
53
|
/** One registered row as `provider list` and `provider show` report it. */
|
|
49
54
|
export interface RegisteredProvider {
|
|
50
55
|
id: string;
|
|
51
|
-
capability:
|
|
56
|
+
capability: RegistrableCapability;
|
|
52
57
|
/** Whether the row's key was set for the hosts and auth it has now. */
|
|
53
58
|
bound: boolean;
|
|
54
59
|
addedBy: string | null;
|
|
@@ -121,18 +126,24 @@ export declare function rowSecretProblem(id: string, name: string, taken: (name:
|
|
|
121
126
|
* CLI runs it before writing D1, the MCP tool before writing, and the
|
|
122
127
|
* gateway again on every read.
|
|
123
128
|
*/
|
|
124
|
-
export declare function checkProviderRow(id: string, capability:
|
|
129
|
+
export declare function checkProviderRow(id: string, capability: RegistrableCapability, context: {
|
|
125
130
|
/** Settings the other rows hold. */
|
|
126
131
|
rowSettings: ReadonlySet<string>;
|
|
127
132
|
refuseHost?: (host: string) => string | null;
|
|
128
133
|
}): RowRefusal | null;
|
|
134
|
+
/**
|
|
135
|
+
* Every host a row sends a secret to: an API-key provider's `hosts`; an
|
|
136
|
+
* OAuth provider's API hosts (the token), and its authorize, token and
|
|
137
|
+
* revoke hosts (the client). Each passes the row host rules.
|
|
138
|
+
*/
|
|
139
|
+
export declare function registrableHosts(capability: RegistrableCapability): string[];
|
|
129
140
|
/** A row's spec parsed and checked: the capability, or the refusal. */
|
|
130
141
|
export declare function resolveProviderRow(row: ProviderRow, context: {
|
|
131
142
|
rowSettings: ReadonlySet<string>;
|
|
132
143
|
refuseHost?: (host: string) => string | null;
|
|
133
144
|
}): {
|
|
134
145
|
ok: true;
|
|
135
|
-
capability:
|
|
146
|
+
capability: RegistrableCapability;
|
|
136
147
|
} | {
|
|
137
148
|
ok: false;
|
|
138
149
|
refusal: RowRefusal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providerRegistry.d.ts","sourceRoot":"","sources":["../../src/internal/providerRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"providerRegistry.d.ts","sourceRoot":"","sources":["../../src/internal/providerRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAKL,KAAK,UAAU,EACf,KAAK,gBAAgB,EACtB,MAAM,mBAAmB,CAAC;AAQ3B,OAAO,EAIL,KAAK,qBAAqB,EAC3B,MAAM,mBAAmB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E,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;CAC9C,GACA,UAAU,GAAG,IAAI,CAuBnB;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,qBAAqB,GAAG,MAAM,EAAE,CAmB5E;AAED,uEAAuE;AACvE,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,WAAW,EAChB,OAAO,EAAE;IACP,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACjC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;CAC9C,GAEC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,UAAU,EAAE,qBAAqB,CAAA;CAAE,GAC/C;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,UAAU,CAAA;CAAE,CAyCrC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,GAAE,SAAS,WAAW,EAAO,EACjC,OAAO,GAAE,uBAA4B,GACpC,gBAAgB,CAqElB;AAED,2FAA2F;AAC3F,eAAO,MAAM,iBAAiB,EAAE,gBAAqC,CAAC"}
|
|
@@ -22,14 +22,31 @@
|
|
|
22
22
|
*/
|
|
23
23
|
import { CAPABILITIES, CAPABILITY_IDS, capabilitySettings, } from "./capabilities.js";
|
|
24
24
|
import { isDevOnlyGatewaySetting, isInstallOwnedGatewaySetting, isReservedAppSecretName, isSettableGatewaySetting, } from "./gatewaySettings.js";
|
|
25
|
+
import { isSignInSettingName } from "./signInProviders.js";
|
|
25
26
|
import { describeSpecProblems, parseProviderSpec, PROVIDER_ID, } from "./providerSpec.js";
|
|
26
27
|
/**
|
|
27
28
|
* The part of a row a key is set for: its hosts, its host setting and its
|
|
28
29
|
* auth, as one canonical string (sorted keys, sorted hosts), so that
|
|
29
30
|
* replacing a row's hosts or auth changes the key and the value it held
|
|
30
|
-
* is no longer read until the operator sets it again.
|
|
31
|
+
* is no longer read until the operator sets it again. For an OAuth
|
|
32
|
+
* provider the client is bound to its authorize, token and revoke URLs,
|
|
33
|
+
* its API hosts, where the client goes on the token request and its
|
|
34
|
+
* client setting names (`oauth.client-bound-to-endpoints`): an admin who
|
|
35
|
+
* re-points `tokenUrl` has to paste the secret again.
|
|
31
36
|
*/
|
|
32
37
|
export function providerBindingKey(capability) {
|
|
38
|
+
if (capability.mode === "oauth_client") {
|
|
39
|
+
return JSON.stringify({
|
|
40
|
+
kind: "oauth2-user",
|
|
41
|
+
authorizeUrl: capability.authorize.url,
|
|
42
|
+
tokenUrl: capability.flow?.tokenUrl ?? null,
|
|
43
|
+
revokeUrl: capability.flow?.revokeUrl ?? null,
|
|
44
|
+
inject: capability.token[0]?.inject ?? "form",
|
|
45
|
+
clientId: capability.secrets.clientId,
|
|
46
|
+
clientSecret: capability.secrets.clientSecret ?? null,
|
|
47
|
+
hosts: [...capability.api].sort(),
|
|
48
|
+
});
|
|
49
|
+
}
|
|
33
50
|
const auth = Object.fromEntries(Object.entries(capability.auth)
|
|
34
51
|
.sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0))
|
|
35
52
|
.map(([field, value]) => [
|
|
@@ -116,6 +133,9 @@ export function rowSecretProblem(id, name, taken) {
|
|
|
116
133
|
if (isReservedAppSecretName(name)) {
|
|
117
134
|
return `${name} is a name everyapp sets itself`;
|
|
118
135
|
}
|
|
136
|
+
if (isSignInSettingName(name)) {
|
|
137
|
+
return `${name} is a sign-in provider's setting name (every <ID>_SIGNIN_<FIELD> name is the Gateway's, set with \`everyapp signin add\`)`;
|
|
138
|
+
}
|
|
119
139
|
if (isSettableGatewaySetting(name)) {
|
|
120
140
|
return `${name} is a Gateway setting another provider or the Gateway reads`;
|
|
121
141
|
}
|
|
@@ -143,7 +163,7 @@ export function checkProviderRow(id, capability, context) {
|
|
|
143
163
|
return { id, code: "PROVIDER_SECRET_TAKEN", message: problem };
|
|
144
164
|
}
|
|
145
165
|
}
|
|
146
|
-
for (const host of capability
|
|
166
|
+
for (const host of registrableHosts(capability)) {
|
|
147
167
|
const problem = publicHostProblem(host) ?? context.refuseHost?.(host);
|
|
148
168
|
if (problem) {
|
|
149
169
|
return { id, code: "PROVIDER_HOST_REFUSED", message: problem };
|
|
@@ -151,6 +171,35 @@ export function checkProviderRow(id, capability, context) {
|
|
|
151
171
|
}
|
|
152
172
|
return null;
|
|
153
173
|
}
|
|
174
|
+
/**
|
|
175
|
+
* Every host a row sends a secret to: an API-key provider's `hosts`; an
|
|
176
|
+
* OAuth provider's API hosts (the token), and its authorize, token and
|
|
177
|
+
* revoke hosts (the client). Each passes the row host rules.
|
|
178
|
+
*/
|
|
179
|
+
export function registrableHosts(capability) {
|
|
180
|
+
if (capability.mode === "api_key")
|
|
181
|
+
return [...capability.hosts];
|
|
182
|
+
const hosts = [...capability.api];
|
|
183
|
+
const urls = [
|
|
184
|
+
capability.authorize.url,
|
|
185
|
+
capability.flow?.tokenUrl,
|
|
186
|
+
capability.flow?.revokeUrl,
|
|
187
|
+
capability.flow?.identity?.url,
|
|
188
|
+
];
|
|
189
|
+
for (const url of urls) {
|
|
190
|
+
if (!url)
|
|
191
|
+
continue;
|
|
192
|
+
try {
|
|
193
|
+
const host = new URL(url).hostname.toLowerCase();
|
|
194
|
+
if (!hosts.includes(host))
|
|
195
|
+
hosts.push(host);
|
|
196
|
+
}
|
|
197
|
+
catch {
|
|
198
|
+
// The parser refused it already.
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return hosts;
|
|
202
|
+
}
|
|
154
203
|
/** A row's spec parsed and checked: the capability, or the refusal. */
|
|
155
204
|
export function resolveProviderRow(row, context) {
|
|
156
205
|
let spec = row.spec;
|
|
@@ -6,15 +6,17 @@
|
|
|
6
6
|
* JSON into an {@link ApiKeyCapability} or names every problem; nothing
|
|
7
7
|
* here reads a value: a spec names Gateway settings, never holds one.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
* or basic)
|
|
11
|
-
* the
|
|
9
|
+
* Two kinds parse: API-key providers (`auth.kind` bearer, header, query
|
|
10
|
+
* or basic) and OAuth providers (`auth.kind` oauth2-user, the half in
|
|
11
|
+
* ./oauthSpec.ts: the Gateway runs the flow and holds the tokens,
|
|
12
|
+
* docs/design/2026-10-oauth-providers.md). An AI provider is a catalog
|
|
13
|
+
* entry only; the parser says so rather than guessing.
|
|
12
14
|
*
|
|
13
15
|
* The rules that make a row safe on a particular gateway (its secret names
|
|
14
16
|
* are its own, its hosts are public, it shadows no catalog entry) are the
|
|
15
17
|
* registry's (./providerRegistry.ts), run after this parse.
|
|
16
18
|
*/
|
|
17
|
-
import { type ApiKeyCapability } from "./capabilities.js";
|
|
19
|
+
import { type ApiKeyCapability, type OAuthClientCapability } from "./capabilities.js";
|
|
18
20
|
/** A provider id: lowercase, a letter first, 2 to 40 characters. */
|
|
19
21
|
export declare const PROVIDER_ID: RegExp;
|
|
20
22
|
/** A Gateway setting name a provider may hold: upper case, 3 to 64 characters. */
|
|
@@ -26,10 +28,12 @@ export interface ProviderSpecProblem {
|
|
|
26
28
|
path: string;
|
|
27
29
|
message: string;
|
|
28
30
|
}
|
|
31
|
+
/** What a row or a preset may be: an API key, or an OAuth provider with a `flow`. */
|
|
32
|
+
export type RegistrableCapability = ApiKeyCapability | OAuthClientCapability;
|
|
29
33
|
export type ParsedProviderSpec = {
|
|
30
34
|
ok: true;
|
|
31
35
|
id: string;
|
|
32
|
-
capability:
|
|
36
|
+
capability: RegistrableCapability;
|
|
33
37
|
} | {
|
|
34
38
|
ok: false;
|
|
35
39
|
problems: ProviderSpecProblem[];
|
|
@@ -49,7 +53,7 @@ export declare function describeSpecProblems(problems: readonly ProviderSpecProb
|
|
|
49
53
|
* defaults the parser fills in spelled out, so `parseProviderSpec` of it
|
|
50
54
|
* gives the entry back.
|
|
51
55
|
*/
|
|
52
|
-
export declare function providerSpecOf(id: string, capability:
|
|
56
|
+
export declare function providerSpecOf(id: string, capability: RegistrableCapability): Record<string, unknown>;
|
|
53
57
|
/** The methods an app with `access: "write"` may use on `capability` besides its read methods. */
|
|
54
|
-
export declare function writeMethodsOf(capability:
|
|
58
|
+
export declare function writeMethodsOf(capability: RegistrableCapability): readonly string[];
|
|
55
59
|
//# sourceMappingURL=providerSpec.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providerSpec.d.ts","sourceRoot":"","sources":["../../src/internal/providerSpec.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"providerSpec.d.ts","sourceRoot":"","sources":["../../src/internal/providerSpec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAIL,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAM3B,MAAM,mBAAmB,CAAC;AAG3B,oEAAoE;AACpE,eAAO,MAAM,WAAW,QAA2B,CAAC;AACpD,kFAAkF;AAClF,eAAO,MAAM,oBAAoB,QAA2B,CAAC;AAC7D,0FAA0F;AAC1F,eAAO,MAAM,aAAa,QACoD,CAAC;AAoF/E,MAAM,WAAW,mBAAmB;IAClC,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,qFAAqF;AACrF,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,GAAG,qBAAqB,CAAC;AAE7E,MAAM,MAAM,kBAAkB,GAC1B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,qBAAqB,CAAA;CAAE,GAC3D;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,EAAE,mBAAmB,EAAE,CAAA;CAAE,CAAC;AA+iBnD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,CAgNpE;AAED,wFAAwF;AACxF,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,SAAS,mBAAmB,EAAE,GACvC,MAAM,CAIR;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,qBAAqB,GAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAiDzB;AAED,kGAAkG;AAClG,wBAAgB,cAAc,CAC5B,UAAU,EAAE,qBAAqB,GAChC,SAAS,MAAM,EAAE,CAEnB"}
|
|
@@ -6,15 +6,18 @@
|
|
|
6
6
|
* JSON into an {@link ApiKeyCapability} or names every problem; nothing
|
|
7
7
|
* here reads a value: a spec names Gateway settings, never holds one.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
* or basic)
|
|
11
|
-
* the
|
|
9
|
+
* Two kinds parse: API-key providers (`auth.kind` bearer, header, query
|
|
10
|
+
* or basic) and OAuth providers (`auth.kind` oauth2-user, the half in
|
|
11
|
+
* ./oauthSpec.ts: the Gateway runs the flow and holds the tokens,
|
|
12
|
+
* docs/design/2026-10-oauth-providers.md). An AI provider is a catalog
|
|
13
|
+
* entry only; the parser says so rather than guessing.
|
|
12
14
|
*
|
|
13
15
|
* The rules that make a row safe on a particular gateway (its secret names
|
|
14
16
|
* are its own, its hosts are public, it shadows no catalog entry) are the
|
|
15
17
|
* registry's (./providerRegistry.ts), run after this parse.
|
|
16
18
|
*/
|
|
17
19
|
import { DEFAULT_WRITE_METHODS, authSettingNames, } from "./capabilities.js";
|
|
20
|
+
import { oauthSpecOf, parseOAuthUserSpec } from "./oauthSpec.js";
|
|
18
21
|
/** A provider id: lowercase, a letter first, 2 to 40 characters. */
|
|
19
22
|
export const PROVIDER_ID = /^[a-z][a-z0-9-]{1,39}$/;
|
|
20
23
|
/** A Gateway setting name a provider may hold: upper case, 3 to 64 characters. */
|
|
@@ -26,7 +29,12 @@ const SEGMENT = /^[a-z0-9_-]{1,64}$/;
|
|
|
26
29
|
const HEADER_NAME = /^[A-Za-z0-9-]{1,64}$/;
|
|
27
30
|
const QUERY_PARAM = /^[A-Za-z0-9_.-]{1,64}$/;
|
|
28
31
|
const SCHEME = /^[A-Za-z][A-Za-z0-9-]{0,31}$/;
|
|
29
|
-
|
|
32
|
+
/**
|
|
33
|
+
* A JSON field name, or a dotted path to a nested one (`usage.cost`, at
|
|
34
|
+
* most four segments): the capability proxy reads a top-level name off the
|
|
35
|
+
* answer's head, the AI proxy a path into the usage object off its tail.
|
|
36
|
+
*/
|
|
37
|
+
const RESPONSE_FIELD = /^[A-Za-z_][A-Za-z0-9_]{0,63}(?:\.[A-Za-z_][A-Za-z0-9_]{0,63}){0,3}$/;
|
|
30
38
|
const DATE = /^\d{4}-\d{2}-\d{2}$/;
|
|
31
39
|
const TAG = /^[a-z][a-z0-9-]{0,31}$/;
|
|
32
40
|
/** Control and format characters: in no text a spec carries. */
|
|
@@ -75,7 +83,27 @@ const KNOWN_FIELDS = new Set([
|
|
|
75
83
|
"example",
|
|
76
84
|
"verified",
|
|
77
85
|
"tags",
|
|
86
|
+
// An `oauth2-user` spec's own (./oauthSpec.ts).
|
|
87
|
+
"scopeSets",
|
|
88
|
+
"alwaysRequested",
|
|
89
|
+
"tolerated",
|
|
78
90
|
]);
|
|
91
|
+
/** Fields an API-key spec has that an `oauth2-user` spec does not. */
|
|
92
|
+
const API_KEY_ONLY_FIELDS = [
|
|
93
|
+
"hostSetting",
|
|
94
|
+
"data",
|
|
95
|
+
"secrets",
|
|
96
|
+
"accountWidePaths",
|
|
97
|
+
"smoke",
|
|
98
|
+
"cost",
|
|
99
|
+
"rate",
|
|
100
|
+
"verified",
|
|
101
|
+
];
|
|
102
|
+
const OAUTH_ONLY_FIELDS = [
|
|
103
|
+
"scopeSets",
|
|
104
|
+
"alwaysRequested",
|
|
105
|
+
"tolerated",
|
|
106
|
+
];
|
|
79
107
|
function isRecord(value) {
|
|
80
108
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
81
109
|
}
|
|
@@ -300,7 +328,7 @@ function auth(value, problems) {
|
|
|
300
328
|
default:
|
|
301
329
|
problems.push({
|
|
302
330
|
path: "auth.kind",
|
|
303
|
-
message: "must be bearer, header, query or
|
|
331
|
+
message: "must be bearer, header, query, basic or oauth2-user (an AI provider is a catalog entry, not a spec this gateway takes)",
|
|
304
332
|
});
|
|
305
333
|
return undefined;
|
|
306
334
|
}
|
|
@@ -475,11 +503,11 @@ function cost(value, problems) {
|
|
|
475
503
|
}
|
|
476
504
|
const usd = nonNegative(value["usd"], "cost.usd", problems);
|
|
477
505
|
const note = text(value["note"], "cost.note", problems, { max: 200 });
|
|
478
|
-
const responseField = text(value["responseField"], "cost.responseField", problems, { max:
|
|
506
|
+
const responseField = text(value["responseField"], "cost.responseField", problems, { max: 128 });
|
|
479
507
|
if (responseField !== undefined && !RESPONSE_FIELD.test(responseField)) {
|
|
480
508
|
problems.push({
|
|
481
509
|
path: "cost.responseField",
|
|
482
|
-
message: "must be a JSON field name",
|
|
510
|
+
message: "must be a JSON field name, or a dotted path to a nested one",
|
|
483
511
|
});
|
|
484
512
|
}
|
|
485
513
|
if (unit !== "call" && unit !== "result" && unit !== "token")
|
|
@@ -532,6 +560,43 @@ function verified(value, problems) {
|
|
|
532
560
|
});
|
|
533
561
|
return undefined;
|
|
534
562
|
}
|
|
563
|
+
/** `access`, `readMethods` and `writeMethods`, shared by both kinds. */
|
|
564
|
+
function grants(input, problems) {
|
|
565
|
+
const access = stringList(input["access"], "access", problems, {
|
|
566
|
+
max: 2,
|
|
567
|
+
each: (level, at) => {
|
|
568
|
+
if (level !== "read" && level !== "write") {
|
|
569
|
+
problems.push({ path: at, message: "must be read or write" });
|
|
570
|
+
}
|
|
571
|
+
},
|
|
572
|
+
});
|
|
573
|
+
if (access && access.length === 0) {
|
|
574
|
+
problems.push({ path: "access", message: "must list read, write or both" });
|
|
575
|
+
}
|
|
576
|
+
const readMethods = methods(input["readMethods"], "readMethods", problems);
|
|
577
|
+
// A write-only provider (a sender, a GraphQL API) reads with nothing:
|
|
578
|
+
// every call needs the write grant. Anything that offers read lists how.
|
|
579
|
+
if (readMethods &&
|
|
580
|
+
readMethods.length === 0 &&
|
|
581
|
+
(!Array.isArray(access) || access.includes("read"))) {
|
|
582
|
+
problems.push({
|
|
583
|
+
path: "readMethods",
|
|
584
|
+
message: "must list a method unless access is write alone",
|
|
585
|
+
});
|
|
586
|
+
}
|
|
587
|
+
const writeMethods = methods(input["writeMethods"], "writeMethods", problems);
|
|
588
|
+
return { access, readMethods, writeMethods };
|
|
589
|
+
}
|
|
590
|
+
function tagList(value, problems) {
|
|
591
|
+
return stringList(value, "tags", problems, {
|
|
592
|
+
max: 10,
|
|
593
|
+
each: (tag, at) => {
|
|
594
|
+
if (!TAG.test(tag)) {
|
|
595
|
+
problems.push({ path: at, message: "must be a lowercase word" });
|
|
596
|
+
}
|
|
597
|
+
},
|
|
598
|
+
});
|
|
599
|
+
}
|
|
535
600
|
/**
|
|
536
601
|
* Parse a provider spec. Every problem is reported, with its path, so a
|
|
537
602
|
* person fixes the file once. On success the id and the catalog-shaped
|
|
@@ -558,10 +623,14 @@ export function parseProviderSpec(input) {
|
|
|
558
623
|
message: "must be lowercase letters, digits and hyphens, a letter first, 2 to 40 characters (stripe)",
|
|
559
624
|
});
|
|
560
625
|
}
|
|
561
|
-
|
|
626
|
+
const isOAuth = isRecord(input["auth"]) && input["auth"]["kind"] === "oauth2-user";
|
|
627
|
+
const expectedMode = isOAuth ? "oauth_client" : "api_key";
|
|
628
|
+
if (input["mode"] !== undefined && input["mode"] !== expectedMode) {
|
|
562
629
|
problems.push({
|
|
563
630
|
path: "mode",
|
|
564
|
-
message:
|
|
631
|
+
message: isOAuth
|
|
632
|
+
? "an oauth2-user spec's mode is oauth_client (or left out)"
|
|
633
|
+
: "this gateway registers api_key and oauth_client (auth.kind oauth2-user) providers; an AI provider is a catalog entry",
|
|
565
634
|
});
|
|
566
635
|
}
|
|
567
636
|
const name = text(input["name"], "name", problems, { max: 64 });
|
|
@@ -590,6 +659,61 @@ export function parseProviderSpec(input) {
|
|
|
590
659
|
}
|
|
591
660
|
},
|
|
592
661
|
});
|
|
662
|
+
if (isOAuth) {
|
|
663
|
+
const { access, readMethods, writeMethods } = grants(input, problems);
|
|
664
|
+
const hint = text(input["hint"], "hint", problems, { max: 500 });
|
|
665
|
+
const example = text(input["example"], "example", problems, { max: 200 });
|
|
666
|
+
const tags = tagList(input["tags"], problems);
|
|
667
|
+
// An OAuth provider: its token goes to `hosts` alone, so the API-key
|
|
668
|
+
// fields that shape a key's placement have no meaning here.
|
|
669
|
+
for (const field of API_KEY_ONLY_FIELDS) {
|
|
670
|
+
if (input[field] !== undefined) {
|
|
671
|
+
problems.push({
|
|
672
|
+
path: field,
|
|
673
|
+
message: "not a field of an oauth2-user spec",
|
|
674
|
+
});
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
if (input["hosts"] === undefined || (hosts && hosts.length === 0)) {
|
|
678
|
+
problems.push({
|
|
679
|
+
path: "hosts",
|
|
680
|
+
message: "required: at least one API host the token is sent to",
|
|
681
|
+
});
|
|
682
|
+
}
|
|
683
|
+
const parsed = typeof id === "string" &&
|
|
684
|
+
name !== undefined &&
|
|
685
|
+
docs !== undefined &&
|
|
686
|
+
hosts !== undefined
|
|
687
|
+
? parseOAuthUserSpec(input, {
|
|
688
|
+
id,
|
|
689
|
+
name,
|
|
690
|
+
docs,
|
|
691
|
+
hosts,
|
|
692
|
+
...(description === undefined ? {} : { description }),
|
|
693
|
+
...(api === undefined ? {} : { reference: api }),
|
|
694
|
+
...(access === undefined
|
|
695
|
+
? {}
|
|
696
|
+
: { access: access }),
|
|
697
|
+
...(readMethods === undefined ? {} : { readMethods }),
|
|
698
|
+
...(writeMethods === undefined ? {} : { writeMethods }),
|
|
699
|
+
...(hint === undefined ? {} : { hint }),
|
|
700
|
+
...(example === undefined ? {} : { example }),
|
|
701
|
+
...(tags === undefined ? {} : { tags }),
|
|
702
|
+
}, problems)
|
|
703
|
+
: undefined;
|
|
704
|
+
if (problems.length > 0 || !parsed || typeof id !== "string") {
|
|
705
|
+
return { ok: false, problems };
|
|
706
|
+
}
|
|
707
|
+
return { ok: true, id, capability: parsed.capability };
|
|
708
|
+
}
|
|
709
|
+
for (const field of OAUTH_ONLY_FIELDS) {
|
|
710
|
+
if (input[field] !== undefined) {
|
|
711
|
+
problems.push({
|
|
712
|
+
path: field,
|
|
713
|
+
message: "only an oauth2-user spec has it",
|
|
714
|
+
});
|
|
715
|
+
}
|
|
716
|
+
}
|
|
593
717
|
const hostSetting = input["hostSetting"] === undefined
|
|
594
718
|
? undefined
|
|
595
719
|
: secretName(input["hostSetting"], "hostSetting", problems);
|
|
@@ -623,22 +747,7 @@ export function parseProviderSpec(input) {
|
|
|
623
747
|
...(parsedAuth ? authSettingNames(parsedAuth) : []),
|
|
624
748
|
...(hostSetting === undefined ? [] : [hostSetting]),
|
|
625
749
|
], problems);
|
|
626
|
-
const access =
|
|
627
|
-
max: 2,
|
|
628
|
-
each: (level, at) => {
|
|
629
|
-
if (level !== "read" && level !== "write") {
|
|
630
|
-
problems.push({ path: at, message: "must be read or write" });
|
|
631
|
-
}
|
|
632
|
-
},
|
|
633
|
-
});
|
|
634
|
-
if (access && access.length === 0) {
|
|
635
|
-
problems.push({ path: "access", message: "must list read, write or both" });
|
|
636
|
-
}
|
|
637
|
-
const readMethods = methods(input["readMethods"], "readMethods", problems);
|
|
638
|
-
if (readMethods && readMethods.length === 0) {
|
|
639
|
-
problems.push({ path: "readMethods", message: "must list a method" });
|
|
640
|
-
}
|
|
641
|
-
const writeMethods = methods(input["writeMethods"], "writeMethods", problems);
|
|
750
|
+
const { access, readMethods, writeMethods } = grants(input, problems);
|
|
642
751
|
const paths = accountWidePaths(input["accountWidePaths"], problems);
|
|
643
752
|
const hint = text(input["hint"], "hint", problems, { max: 500 });
|
|
644
753
|
const smokeRequest = smoke(input["smoke"], hosts ?? [], problems);
|
|
@@ -646,14 +755,7 @@ export function parseProviderSpec(input) {
|
|
|
646
755
|
const parsedRate = rate(input["rate"], problems);
|
|
647
756
|
const example = text(input["example"], "example", problems, { max: 200 });
|
|
648
757
|
const parsedVerified = verified(input["verified"], problems);
|
|
649
|
-
const tags =
|
|
650
|
-
max: 10,
|
|
651
|
-
each: (tag, at) => {
|
|
652
|
-
if (!TAG.test(tag)) {
|
|
653
|
-
problems.push({ path: at, message: "must be a lowercase word" });
|
|
654
|
-
}
|
|
655
|
-
},
|
|
656
|
-
});
|
|
758
|
+
const tags = tagList(input["tags"], problems);
|
|
657
759
|
if (problems.length > 0 ||
|
|
658
760
|
typeof id !== "string" ||
|
|
659
761
|
name === undefined ||
|
|
@@ -700,6 +802,13 @@ export function describeSpecProblems(problems) {
|
|
|
700
802
|
* gives the entry back.
|
|
701
803
|
*/
|
|
702
804
|
export function providerSpecOf(id, capability) {
|
|
805
|
+
if (capability.mode === "oauth_client") {
|
|
806
|
+
const spec = oauthSpecOf(id, capability);
|
|
807
|
+
if (!spec) {
|
|
808
|
+
throw new Error(`${id} is a catalog OAuth client without a Gateway-owned flow: it has no spec`);
|
|
809
|
+
}
|
|
810
|
+
return spec;
|
|
811
|
+
}
|
|
703
812
|
return {
|
|
704
813
|
id,
|
|
705
814
|
name: capability.label,
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sign-in providers a Gateway can offer beside passwords ("Continue
|
|
3
|
+
* with Google"), as data: what each one is called, the Worker secrets it
|
|
4
|
+
* reads, where the OAuth app is made, the scopes asked for and which claim
|
|
5
|
+
* becomes the email. One catalog serves the Gateway (which providers are
|
|
6
|
+
* on, the sign-in page's buttons, Manage workspace → Sign-in), the CLI
|
|
7
|
+
* (`everyapp signin add|list|show|remove`, `secret set`), the manifest
|
|
8
|
+
* validator (an app's own secret can never take one of these names) and
|
|
9
|
+
* the docs' drift tests.
|
|
10
|
+
*
|
|
11
|
+
* Naming rule, agreed with the provider registry's conventions
|
|
12
|
+
* (docs/design/2026-10-provider-registry.md, section 6): a sign-in
|
|
13
|
+
* provider's settings are `<ID>_SIGNIN_<FIELD>`, with FIELD one of
|
|
14
|
+
* CLIENT_ID, CLIENT_SECRET, ISSUER, LABEL or TENANT. The `_SIGNIN_` infix is
|
|
15
|
+
* what keeps the family apart from the API providers' `<ID>_API_KEY`,
|
|
16
|
+
* `<ID>_CLIENT_ID` (the OAuth clients the Gateway holds for apps) and the
|
|
17
|
+
* MCP apps' `<ID>_MCP_TOKEN`: `GOOGLE_SIGNIN_CLIENT_ID` is the sign-in
|
|
18
|
+
* provider's, `GOOGLE_WORKSPACE_CLIENT_ID` the OAuth client apps use, and
|
|
19
|
+
* a registered provider row or an app manifest can never claim a name in
|
|
20
|
+
* the family (isSignInSettingName).
|
|
21
|
+
*
|
|
22
|
+
* The settings are Worker secrets, set under the Cloudflare login (`everyapp
|
|
23
|
+
* signin add`, or `secret set`), never from the admin UI or an agent
|
|
24
|
+
* connection: a stolen session can't add a way in.
|
|
25
|
+
*/
|
|
26
|
+
export declare const SIGN_IN_PROVIDER_IDS: readonly ["google", "microsoft", "github", "apple", "cloudflare", "oidc"];
|
|
27
|
+
export type SignInProviderId = (typeof SIGN_IN_PROVIDER_IDS)[number];
|
|
28
|
+
/** What a setting of a sign-in provider holds. */
|
|
29
|
+
export type SignInSettingRole = "clientId" | "clientSecret" | "issuer" | "label" | "tenant";
|
|
30
|
+
export interface SignInSetting {
|
|
31
|
+
/** `GOOGLE_SIGNIN_CLIENT_ID`. */
|
|
32
|
+
readonly name: string;
|
|
33
|
+
readonly role: SignInSettingRole;
|
|
34
|
+
/** Without it the provider is off (an incomplete set is reported). */
|
|
35
|
+
readonly required: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* A plain value (an id, a URL, a word) `everyapp secret set` may show as
|
|
38
|
+
* typed; a credential stays hidden.
|
|
39
|
+
*/
|
|
40
|
+
readonly plain: boolean;
|
|
41
|
+
/** One line: what to paste here. */
|
|
42
|
+
readonly what: string;
|
|
43
|
+
}
|
|
44
|
+
export interface SignInProvider {
|
|
45
|
+
readonly id: SignInProviderId;
|
|
46
|
+
/** The button: "Continue with <label>". The `oidc` entry's label is a setting. */
|
|
47
|
+
readonly label: string;
|
|
48
|
+
/** Where the OAuth app is created. */
|
|
49
|
+
readonly console: string;
|
|
50
|
+
/** What the OAuth app is called there ("OAuth client ID", "App registration"). */
|
|
51
|
+
readonly appNoun: string;
|
|
52
|
+
readonly settings: readonly SignInSetting[];
|
|
53
|
+
/** The scopes requested: identity only, nothing an app could act with. */
|
|
54
|
+
readonly scopes: readonly string[];
|
|
55
|
+
/** Which claim becomes the email, and what makes it count as verified. */
|
|
56
|
+
readonly emailClaim: string;
|
|
57
|
+
/** The everyapp skill's setup guide, relative to the skill. */
|
|
58
|
+
readonly setup: `setup/signin-${SignInProviderId}.md`;
|
|
59
|
+
/** Caveats worth a line in every listing. */
|
|
60
|
+
readonly notes: readonly string[];
|
|
61
|
+
}
|
|
62
|
+
/** The path Better Auth serves the provider's callback on, under the Gateway's URL. */
|
|
63
|
+
export declare function signInCallbackPath(id: SignInProviderId): string;
|
|
64
|
+
/** The redirect URL to register with the provider, for a Gateway at `gatewayUrl`. */
|
|
65
|
+
export declare function signInCallbackUrl(gatewayUrl: string, id: SignInProviderId): string;
|
|
66
|
+
export declare const SIGN_IN_PROVIDERS: Readonly<Record<SignInProviderId, SignInProvider>>;
|
|
67
|
+
/** The catalog in listing order. */
|
|
68
|
+
export declare const SIGN_IN_PROVIDER_LIST: readonly SignInProvider[];
|
|
69
|
+
export declare function isSignInProviderId(value: string): value is SignInProviderId;
|
|
70
|
+
/**
|
|
71
|
+
* Every setting a sign-in provider reads, in catalog order: what `everyapp
|
|
72
|
+
* secret set` accepts for the Gateway, and what the Gateway's dev config
|
|
73
|
+
* declares.
|
|
74
|
+
*/
|
|
75
|
+
export declare const SIGN_IN_GATEWAY_SETTINGS: readonly string[];
|
|
76
|
+
/** The plain (non-credential) ones among them: ids, the issuer, the label, the tenant. */
|
|
77
|
+
export declare const PLAIN_SIGN_IN_SETTINGS: readonly string[];
|
|
78
|
+
/**
|
|
79
|
+
* The family: any name of the shape `<ID>_SIGNIN_<FIELD>`. Reserved for the
|
|
80
|
+
* catalog above, whether or not an entry reads the name today, so no
|
|
81
|
+
* registered provider row and no app manifest can ever take one.
|
|
82
|
+
*/
|
|
83
|
+
export declare const SIGN_IN_SETTING_PATTERN: RegExp;
|
|
84
|
+
export declare function isSignInSettingName(name: string): boolean;
|
|
85
|
+
/** The provider a setting belongs to, if one reads it. */
|
|
86
|
+
export declare function signInProviderOfSetting(name: string): SignInProvider | null;
|
|
87
|
+
/** Whether a provider is on, off, or half set up, from which names are set. */
|
|
88
|
+
export type SignInProviderStatus = "on" | "off" | "incomplete";
|
|
89
|
+
export interface SignInProviderState {
|
|
90
|
+
readonly id: SignInProviderId;
|
|
91
|
+
readonly status: SignInProviderStatus;
|
|
92
|
+
/** The required settings not set (empty when on or off). */
|
|
93
|
+
readonly missing: readonly string[];
|
|
94
|
+
/** The settings set, required or not. */
|
|
95
|
+
readonly set: readonly string[];
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* A provider's state from which of its settings exist: on when every
|
|
99
|
+
* required one is set, off when none at all is, incomplete in between (the
|
|
100
|
+
* Gateway refuses to half-configure a sign-in: the provider is off and the
|
|
101
|
+
* problem is reported).
|
|
102
|
+
*/
|
|
103
|
+
export declare function signInProviderState(provider: SignInProvider, isSet: (name: string) => boolean): SignInProviderState;
|
|
104
|
+
//# sourceMappingURL=signInProviders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signInProviders.d.ts","sourceRoot":"","sources":["../../src/internal/signInProviders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,eAAO,MAAM,oBAAoB,2EAOvB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAErE,kDAAkD;AAClD,MAAM,MAAM,iBAAiB,GACzB,UAAU,GACV,cAAc,GACd,QAAQ,GACR,OAAO,GACP,QAAQ,CAAC;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