@every-app/sdk 0.3.0-rc.14 → 0.3.0-rc.15
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/README.md +8 -6
- package/dist/cloudflare/catalogSettings.generated.d.ts +17 -7
- package/dist/cloudflare/catalogSettings.generated.d.ts.map +1 -1
- package/dist/cloudflare/catalogSettings.generated.js +40 -12
- package/dist/cloudflare/worker.d.ts +18 -7
- package/dist/cloudflare/worker.d.ts.map +1 -1
- package/dist/internal/appSettings.d.ts.map +1 -1
- package/dist/internal/appSettings.js +4 -1
- package/dist/internal/capabilities.d.ts +5 -29
- package/dist/internal/capabilities.d.ts.map +1 -1
- package/dist/internal/capabilities.js +4 -24
- package/dist/internal/devProviders.d.ts +1 -19
- package/dist/internal/devProviders.d.ts.map +1 -1
- package/dist/internal/devProviders.js +7 -1
- package/dist/internal/oauthPresets.d.ts +351 -14
- package/dist/internal/oauthPresets.d.ts.map +1 -1
- package/dist/internal/oauthPresets.js +155 -22
- package/dist/internal/oauthSpec.d.ts +2 -46
- package/dist/internal/oauthSpec.d.ts.map +1 -1
- package/dist/internal/oauthSpec.js +0 -57
- package/dist/internal/remoteMcp.d.ts.map +1 -1
- package/dist/internal/remoteMcp.js +4 -3
- package/dist/internal/tools.d.ts +3 -1
- package/dist/internal/tools.d.ts.map +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/integrationFetch.d.ts +7 -7
- package/dist/server/integrationFetch.d.ts.map +1 -1
- package/dist/server/integrationFetch.js +4 -2
- package/dist/server/tools.d.ts +1 -1
- package/dist/server/tools.js +1 -1
- package/package.json +1 -1
- package/dist/internal/oauthBuiltIns.d.ts +0 -101
- package/dist/internal/oauthBuiltIns.d.ts.map +0 -1
- package/dist/internal/oauthBuiltIns.js +0 -122
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauthSpec.d.ts","sourceRoot":"","sources":["../../src/internal/oau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vB,QAAQ,EAAE,WAAW,EAAE,GACtB,eAAe,GAAG,SAAS,CA6K7B;AAwBD;;;GAGG;AACH,wBAAgB,WAAW,CACzB,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,qBAAqB,GAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA2DzB"}
|
|
@@ -448,63 +448,6 @@ function oauthCapabilityOf(common, secrets, flow) {
|
|
|
448
448
|
...(common.tags === undefined ? {} : { tags: common.tags }),
|
|
449
449
|
};
|
|
450
450
|
}
|
|
451
|
-
/**
|
|
452
|
-
* A spec already known to be good (a built-in, checked by its test) as
|
|
453
|
-
* its capability, without the parse: what the catalog runs at load, where
|
|
454
|
-
* calling the full parser would be an import cycle.
|
|
455
|
-
*/
|
|
456
|
-
export function oauthCapabilityFromSpec(spec) {
|
|
457
|
-
const { auth } = spec;
|
|
458
|
-
const flow = {
|
|
459
|
-
authorizeUrl: auth.authorizeUrl,
|
|
460
|
-
tokenUrl: auth.tokenUrl,
|
|
461
|
-
...(auth.revokeUrl === undefined ? {} : { revokeUrl: auth.revokeUrl }),
|
|
462
|
-
...(auth.revokeMethod === undefined
|
|
463
|
-
? {}
|
|
464
|
-
: { revokeMethod: auth.revokeMethod }),
|
|
465
|
-
inject: auth.inject ?? "form",
|
|
466
|
-
pkce: auth.pkce ?? true,
|
|
467
|
-
scopeSeparator: auth.scopeSeparator ?? "space",
|
|
468
|
-
...(auth.scopePrefix === undefined
|
|
469
|
-
? {}
|
|
470
|
-
: { scopePrefix: auth.scopePrefix }),
|
|
471
|
-
...(auth.authorizeParams === undefined
|
|
472
|
-
? {}
|
|
473
|
-
: { authorizeParams: { ...auth.authorizeParams } }),
|
|
474
|
-
...(auth.tokenHeaders === undefined
|
|
475
|
-
? {}
|
|
476
|
-
: { tokenHeaders: { ...auth.tokenHeaders } }),
|
|
477
|
-
...(auth.identity === undefined
|
|
478
|
-
? {}
|
|
479
|
-
: {
|
|
480
|
-
identity: {
|
|
481
|
-
url: auth.identity.url,
|
|
482
|
-
label: auth.identity.label,
|
|
483
|
-
...(auth.identity.id === undefined ? {} : { id: auth.identity.id }),
|
|
484
|
-
},
|
|
485
|
-
}),
|
|
486
|
-
identityScopes: [...(auth.identity?.scopes ?? [])],
|
|
487
|
-
tolerated: [...(auth.tolerated ?? [])],
|
|
488
|
-
};
|
|
489
|
-
return oauthCapabilityOf({
|
|
490
|
-
id: spec.id,
|
|
491
|
-
name: spec.name,
|
|
492
|
-
docs: spec.docs,
|
|
493
|
-
hosts: spec.hosts,
|
|
494
|
-
...(spec.description === undefined
|
|
495
|
-
? {}
|
|
496
|
-
: { description: spec.description }),
|
|
497
|
-
...(spec.api === undefined ? {} : { reference: spec.api }),
|
|
498
|
-
...(spec.hint === undefined ? {} : { hint: spec.hint }),
|
|
499
|
-
...(spec.example === undefined ? {} : { example: spec.example }),
|
|
500
|
-
...(spec.tags === undefined ? {} : { tags: spec.tags }),
|
|
501
|
-
}, {
|
|
502
|
-
clientId: auth.clientId,
|
|
503
|
-
...(auth.clientSecret === undefined
|
|
504
|
-
? {}
|
|
505
|
-
: { clientSecret: auth.clientSecret }),
|
|
506
|
-
}, flow);
|
|
507
|
-
}
|
|
508
451
|
/**
|
|
509
452
|
* The JSON spec of an OAuth capability (`provider show`, a preset's round
|
|
510
453
|
* trip): `parseProviderSpec` of it gives the capability back.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remoteMcp.d.ts","sourceRoot":"","sources":["../../src/internal/remoteMcp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,EAGL,KAAK,UAAU,EACf,KAAK,kBAAkB,EACxB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAiC,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE1E,uDAAuD;AACvD,eAAO,MAAM,qBAAqB,+BAAgC,CAAC;AACnE,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,qBAAqB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
|
"api.cloudflare.com",
|
|
250
|
+
// The token endpoints of the Google, Microsoft and Slack presets.
|
|
251
|
+
"oauth2.googleapis.com",
|
|
252
|
+
"login.microsoftonline.com",
|
|
253
|
+
"slack.com",
|
|
250
254
|
]);
|
|
251
255
|
for (const capability of Object.values(CAPABILITIES)) {
|
|
252
256
|
if (capability.mode === "api_key") {
|
|
253
257
|
for (const host of capability.hosts)
|
|
254
258
|
hosts.add(host);
|
|
255
259
|
}
|
|
256
|
-
else if (capability.mode === "oauth_client") {
|
|
257
|
-
hosts.add(new URL(capability.flow.tokenUrl).hostname);
|
|
258
|
-
}
|
|
259
260
|
}
|
|
260
261
|
return [...hosts].sort();
|
|
261
262
|
}
|
package/dist/internal/tools.d.ts
CHANGED
|
@@ -81,7 +81,9 @@ export interface ToolCallResultV1 {
|
|
|
81
81
|
structuredContent?: Record<string, unknown>;
|
|
82
82
|
isError?: boolean;
|
|
83
83
|
}
|
|
84
|
-
export type ToolsErrorCodeV1 = "unknown_tool" | "invalid_arguments" | "invalid_request" | "forbidden" | "unauthenticated" | "method_not_allowed" | "misconfigured"
|
|
84
|
+
export type ToolsErrorCodeV1 = "unknown_tool" | "invalid_arguments" | "invalid_request" | "forbidden" | "unauthenticated" | "method_not_allowed" | "misconfigured"
|
|
85
|
+
/** A proxied server failed (unreachable, timed out, refused): not a setup problem. */
|
|
86
|
+
| "upstream_failed";
|
|
85
87
|
export interface ToolIssueV1 {
|
|
86
88
|
message: string;
|
|
87
89
|
path?: (string | number)[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/internal/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AACrD,eAAO,MAAM,eAAe,2BAA8B,CAAC;AAC3D,eAAO,MAAM,eAAe,2BAA8B,CAAC;AAE3D;;;GAGG;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AC,OAAO,EAAE;IACzC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,SAAS,gBAAgB,EAAE,CAAC;CACpC,GAAG,OAAO,CAAC,MAAM,CAAC,CAUlB"}
|
package/dist/server/index.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export { listMembers, type ListMembersOptions } from "./listMembers.js";
|
|
|
20
20
|
export { emit, type EmitOptions } from "./emit.js";
|
|
21
21
|
export { WEBHOOK_MAX_BYTES_DEFAULT, verifyWebhook, type VerifyWebhookOptions, type WebhookProvider, type WebhookRefusalReason, type WebhookVerification, } from "./webhooks.js";
|
|
22
22
|
export type { AppEvent, AppEventHandler, AppEventsOptions, } from "./eventsEndpoint.js";
|
|
23
|
-
export type { ApiKeyCapabilityId, CapabilityId,
|
|
23
|
+
export type { ApiKeyCapabilityId, CapabilityId, OAuthPresetId, EmailAddressInput, EmailAttachmentInput, SendEmailMessage, SendEmailResult, ListMembersResult, OrganizationMember, OrganizationMemberRole, EmitEventResult, } from "../internal/index.js";
|
|
24
24
|
export { ToolError, defineTools, toolResult, type DefineToolsOptions, type PlainToolSchema, type StandardSchemaWithJSON, type ToolContext, type ToolDefinition, type ToolResult, type ToolSchema, type ToolSet, } from "./tools.js";
|
|
25
25
|
export type { ToolRisk } from "../internal/index.js";
|
|
26
26
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,kBAAkB,EAClB,QAAQ,EACR,eAAe,EACf,QAAQ,EACR,OAAO,EACP,mBAAmB,EACnB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,OAAO,GACb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,gBAAgB,EAAE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACzE,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,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EACL,yBAAyB,EACzB,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,GACzB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,QAAQ,EACR,eAAe,EACf,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,SAAS,EACT,WAAW,EACX,UAAU,EACV,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,OAAO,GACb,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ApiKeyCapabilityId, type CapabilityId, type EmailCapabilityStatus, type
|
|
1
|
+
import { type ApiKeyCapabilityId, type CapabilityId, type EmailCapabilityStatus, type OAuthPresetId } from "../internal/index.js";
|
|
2
2
|
import { type GatewayCallFor } from "./attribution.js";
|
|
3
3
|
import type { SetupInfo } from "./refusal.js";
|
|
4
4
|
export interface IntegrationFetchOptions {
|
|
@@ -12,12 +12,12 @@ export interface IntegrationFetchOptions {
|
|
|
12
12
|
/**
|
|
13
13
|
* A provider the app lists in its manifest's `capabilities`: one whose
|
|
14
14
|
* key the gateway holds, or an OAuth provider whose connections it
|
|
15
|
-
* holds. The
|
|
16
|
-
* the gateway (
|
|
17
|
-
* through the binding, which checks it. The `email` capability
|
|
18
|
-
* with `sendEmail()` instead.
|
|
15
|
+
* holds. The catalog's ids and the OAuth presets' complete; a provider
|
|
16
|
+
* registered on the gateway (an OAuth preset's row among them) is
|
|
17
|
+
* reached through the binding, which checks it. The `email` capability
|
|
18
|
+
* is sent with `sendEmail()` instead.
|
|
19
19
|
*/
|
|
20
|
-
provider: ApiKeyCapabilityId |
|
|
20
|
+
provider: ApiKeyCapabilityId | OAuthPresetId | (string & {});
|
|
21
21
|
/**
|
|
22
22
|
* Whom the call is for. Left out, the request `everyApp()` is serving
|
|
23
23
|
* (its person, while the identity is good) or the organization
|
|
@@ -127,7 +127,7 @@ export type OAuthClientIntegrationStatus = IntegrationStatus & {
|
|
|
127
127
|
} | null;
|
|
128
128
|
};
|
|
129
129
|
/** The status of a capability: email's carries its senders, an OAuth provider's the connection. */
|
|
130
|
-
export type IntegrationStatusOf<P extends string> = P extends "email" ? EmailIntegrationStatus : P extends
|
|
130
|
+
export type IntegrationStatusOf<P extends string> = P extends "email" ? EmailIntegrationStatus : P extends OAuthPresetId ? OAuthClientIntegrationStatus : IntegrationStatus;
|
|
131
131
|
/**
|
|
132
132
|
* Whether the app can use an integration right now, without calling the
|
|
133
133
|
* provider: show "an admin needs to set up DataForSEO" (or "sending isn't
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrationFetch.d.ts","sourceRoot":"","sources":["../../src/server/integrationFetch.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"integrationFetch.d.ts","sourceRoot":"","sources":["../../src/server/integrationFetch.ts"],"names":[],"mappings":"AAAA,OAAO,EAeL,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,qBAAqB,EAE1B,KAAK,aAAa,EAKnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,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CAAC;QACrB,sCAAsC;QACtC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;QAC1B,KAAK,EAAE,OAAO,CAAC;QACf,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;QAClC,SAAS,CAAC,EAAE,IAAI,CAAC;KAClB,GAAG,IAAI,CAAC;CACV,CAAC;AAEF,mGAAmG;AACnG,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,SAAS,OAAO,GACjE,sBAAsB,GACtB,CAAC,SAAS,aAAa,GACrB,4BAA4B,GAC5B,iBAAiB,CAAC;AAExB;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,CAAC,SAAS,YAAY,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,EACtC,EACA,GAAG,EACH,QAAQ,EACR,GAAG,EAAE,cAAc,GACpB,EAAE;IACD,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,CAAC,CAAC;IACZ;;;;;;OAMG;IACH,GAAG,CAAC,EAAE,cAAc,CAAC;CACtB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAWlC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { APP_ID_ENV, CATALOG, ConfigurationError, GATEWAY_ERROR_HEADER, INTEGRATION_PROXY_PREFIX, apiKeyHosts, authorizationFor, capabilitySettings, devProviderFile, integrationProxyPath, providerSettingPrefix, resolveDevProvider, EMAIL_SENDERS_ENV, chooseEmailProvider, parseEmailList, parseEmailSender, } from "../internal/index.js";
|
|
1
|
+
import { APP_ID_ENV, CATALOG, ConfigurationError, GATEWAY_ERROR_HEADER, INTEGRATION_PROXY_PREFIX, oauthPreset, apiKeyHosts, authorizationFor, capabilitySettings, devProviderFile, integrationProxyPath, providerSettingPrefix, resolveDevProvider, EMAIL_SENDERS_ENV, chooseEmailProvider, parseEmailList, parseEmailSender, } from "../internal/index.js";
|
|
2
2
|
import { applyAttribution, attributionFor, } from "./attribution.js";
|
|
3
3
|
import { connectPath } from "./connectUrl.js";
|
|
4
4
|
import { BINDING_ORIGIN, gatewayBinding, streamingRequest, } from "./gatewayFetch.js";
|
|
@@ -278,7 +278,9 @@ async function readIntegrationStatus({ env, provider, for: explicitTarget, }) {
|
|
|
278
278
|
// without one, the catalog, or in local dev the row's spec from
|
|
279
279
|
// `.everyapp/providers/<id>.json`.
|
|
280
280
|
const integration = binding && typeof binding.fetch === "function"
|
|
281
|
-
? CATALOG.get(String(provider))
|
|
281
|
+
? (CATALOG.get(String(provider)) ??
|
|
282
|
+
oauthPreset(String(provider)) ??
|
|
283
|
+
undefined)
|
|
282
284
|
: (CATALOG.get(String(provider)) ??
|
|
283
285
|
devRegisteredProvider(String(provider), values));
|
|
284
286
|
if (integration?.mode === "ai") {
|
package/dist/server/tools.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ import type { ExecutionContextLike } from "./everyApp.js";
|
|
|
30
30
|
* Reported with every catalog; must match package.json (a test checks).
|
|
31
31
|
* scripts/publish-rc.mjs sets both for the build it publishes.
|
|
32
32
|
*/
|
|
33
|
-
export declare const SDK_VERSION = "0.3.0-rc.
|
|
33
|
+
export declare const SDK_VERSION = "0.3.0-rc.15";
|
|
34
34
|
/**
|
|
35
35
|
* Throw from a tool handler to return an error the model can read and act on
|
|
36
36
|
* ("No todo with that id"). Any other error is logged here and reaches the
|
package/dist/server/tools.js
CHANGED
|
@@ -29,7 +29,7 @@ import { TOOL_NAME_PATTERN, catalogHash, isToolRisk, } from "../internal/index.j
|
|
|
29
29
|
* Reported with every catalog; must match package.json (a test checks).
|
|
30
30
|
* scripts/publish-rc.mjs sets both for the build it publishes.
|
|
31
31
|
*/
|
|
32
|
-
export const SDK_VERSION = "0.3.0-rc.
|
|
32
|
+
export const SDK_VERSION = "0.3.0-rc.15";
|
|
33
33
|
const JSON_SCHEMA_TARGET = "draft-2020-12";
|
|
34
34
|
const DRAFT_2020_12 = "https://json-schema.org/draft/2020-12/schema";
|
|
35
35
|
// The 2026-07-28 MCP revision lets a schema property ask clients to mirror an
|
package/package.json
CHANGED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The OAuth providers every Gateway has built in, as `oauth2-user` specs:
|
|
3
|
-
* the same JSON shape as the presets (./oauthPresets.ts) and a registered
|
|
4
|
-
* row (`everyapp provider add`). What differs between Google, Microsoft
|
|
5
|
-
* and Slack is here as data: the endpoints, the API hosts, how scopes are
|
|
6
|
-
* separated and prefixed, the extra authorize parameters, how the account
|
|
7
|
-
* is named, and the scopes a token may carry beyond what the app asked.
|
|
8
|
-
* No code anywhere reads a provider id to decide anything.
|
|
9
|
-
*
|
|
10
|
-
* Pure data with no imports, so the catalog (./capabilities.ts) can build
|
|
11
|
-
* its entries from it without an import cycle. Each spec parses with
|
|
12
|
-
* `parseProviderSpec` and round-trips through `oauthSpecOf`
|
|
13
|
-
* (oauthBuiltIns.test.ts).
|
|
14
|
-
*/
|
|
15
|
-
export declare const BUILT_IN_OAUTH_SPECS: {
|
|
16
|
-
readonly "google-workspace": {
|
|
17
|
-
readonly id: "google-workspace";
|
|
18
|
-
readonly name: "Google";
|
|
19
|
-
readonly description: "Gmail, Calendar, Drive, Search Console, Analytics and the other Google APIs, as the person who connects.";
|
|
20
|
-
readonly docs: "https://console.cloud.google.com/apis/credentials";
|
|
21
|
-
readonly api: "https://developers.google.com/identity/protocols/oauth2/scopes";
|
|
22
|
-
readonly hosts: readonly ["gmail.googleapis.com", "www.googleapis.com", "searchconsole.googleapis.com", "analyticsdata.googleapis.com", "analyticsadmin.googleapis.com", "openidconnect.googleapis.com"];
|
|
23
|
-
readonly auth: {
|
|
24
|
-
readonly kind: "oauth2-user";
|
|
25
|
-
readonly authorizeUrl: "https://accounts.google.com/o/oauth2/v2/auth";
|
|
26
|
-
readonly tokenUrl: "https://oauth2.googleapis.com/token";
|
|
27
|
-
readonly clientId: "GOOGLE_WORKSPACE_CLIENT_ID";
|
|
28
|
-
readonly clientSecret: "GOOGLE_WORKSPACE_CLIENT_SECRET";
|
|
29
|
-
readonly inject: "form";
|
|
30
|
-
readonly pkce: true;
|
|
31
|
-
readonly scopeSeparator: "space";
|
|
32
|
-
readonly scopePrefix: "https://www.googleapis.com/auth/";
|
|
33
|
-
readonly authorizeParams: {
|
|
34
|
-
readonly access_type: "offline";
|
|
35
|
-
readonly prompt: "consent";
|
|
36
|
-
};
|
|
37
|
-
readonly identity: {
|
|
38
|
-
readonly url: "https://openidconnect.googleapis.com/v1/userinfo";
|
|
39
|
-
readonly label: "email";
|
|
40
|
-
readonly id: "sub";
|
|
41
|
-
readonly scopes: readonly ["openid", "email"];
|
|
42
|
-
};
|
|
43
|
-
readonly tolerated: readonly ["profile", "https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/userinfo.profile"];
|
|
44
|
-
};
|
|
45
|
-
readonly hint: "A Web application OAuth client in Google Cloud, with the Gateway's callback as its redirect URI and the scopes your apps list on its consent screen.";
|
|
46
|
-
};
|
|
47
|
-
readonly "microsoft-365": {
|
|
48
|
-
readonly id: "microsoft-365";
|
|
49
|
-
readonly name: "Microsoft 365";
|
|
50
|
-
readonly description: "Outlook mail and calendar, OneDrive and the rest of Microsoft Graph, as the person who connects.";
|
|
51
|
-
readonly docs: "https://entra.microsoft.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade";
|
|
52
|
-
readonly api: "https://learn.microsoft.com/graph/permissions-reference";
|
|
53
|
-
readonly hosts: readonly ["graph.microsoft.com"];
|
|
54
|
-
readonly auth: {
|
|
55
|
-
readonly kind: "oauth2-user";
|
|
56
|
-
readonly authorizeUrl: "https://login.microsoftonline.com/common/oauth2/v2.0/authorize";
|
|
57
|
-
readonly tokenUrl: "https://login.microsoftonline.com/common/oauth2/v2.0/token";
|
|
58
|
-
readonly clientId: "MICROSOFT_365_CLIENT_ID";
|
|
59
|
-
readonly clientSecret: "MICROSOFT_365_CLIENT_SECRET";
|
|
60
|
-
readonly inject: "form";
|
|
61
|
-
readonly pkce: true;
|
|
62
|
-
readonly scopeSeparator: "space";
|
|
63
|
-
readonly scopePrefix: "https://graph.microsoft.com/";
|
|
64
|
-
readonly identity: {
|
|
65
|
-
readonly url: "https://graph.microsoft.com/v1.0/me";
|
|
66
|
-
readonly label: "userPrincipalName";
|
|
67
|
-
readonly id: "id";
|
|
68
|
-
readonly scopes: readonly ["User.Read", "offline_access"];
|
|
69
|
-
};
|
|
70
|
-
readonly tolerated: readonly ["openid", "profile", "email"];
|
|
71
|
-
};
|
|
72
|
-
readonly hint: "An app registration in Entra for accounts in any organization and personal accounts, with the Gateway's callback as a Web redirect URI. If two apps share this client with different scopes, Microsoft may hand back both apps' scopes and the Gateway refuses the token: give each app its own client.";
|
|
73
|
-
};
|
|
74
|
-
readonly slack: {
|
|
75
|
-
readonly id: "slack";
|
|
76
|
-
readonly name: "Slack";
|
|
77
|
-
readonly description: "Channels, members and messages, as the Slack app.";
|
|
78
|
-
readonly docs: "https://api.slack.com/apps";
|
|
79
|
-
readonly api: "https://api.slack.com/scopes";
|
|
80
|
-
readonly hosts: readonly ["slack.com"];
|
|
81
|
-
readonly auth: {
|
|
82
|
-
readonly kind: "oauth2-user";
|
|
83
|
-
readonly authorizeUrl: "https://slack.com/oauth/v2/authorize";
|
|
84
|
-
readonly tokenUrl: "https://slack.com/api/oauth.v2.access";
|
|
85
|
-
readonly revokeUrl: "https://slack.com/api/auth.revoke";
|
|
86
|
-
readonly clientId: "SLACK_CLIENT_ID";
|
|
87
|
-
readonly clientSecret: "SLACK_CLIENT_SECRET";
|
|
88
|
-
readonly inject: "form";
|
|
89
|
-
readonly pkce: false;
|
|
90
|
-
readonly scopeSeparator: "comma";
|
|
91
|
-
readonly identity: {
|
|
92
|
-
readonly url: "https://slack.com/api/auth.test";
|
|
93
|
-
readonly label: "team";
|
|
94
|
-
readonly id: "team_id";
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
readonly hint: "A Slack app with the Gateway's callback as its redirect URL and the bot scopes your apps list. The Gateway takes its Client ID and Client Secret, not a bot token (xoxb-).";
|
|
98
|
-
};
|
|
99
|
-
};
|
|
100
|
-
export type BuiltInOAuthId = keyof typeof BUILT_IN_OAUTH_SPECS;
|
|
101
|
-
//# sourceMappingURL=oauthBuiltIns.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"oauthBuiltIns.d.ts","sourceRoot":"","sources":["../../src/internal/oauthBuiltIns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8GvB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,oBAAoB,CAAC"}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The OAuth providers every Gateway has built in, as `oauth2-user` specs:
|
|
3
|
-
* the same JSON shape as the presets (./oauthPresets.ts) and a registered
|
|
4
|
-
* row (`everyapp provider add`). What differs between Google, Microsoft
|
|
5
|
-
* and Slack is here as data: the endpoints, the API hosts, how scopes are
|
|
6
|
-
* separated and prefixed, the extra authorize parameters, how the account
|
|
7
|
-
* is named, and the scopes a token may carry beyond what the app asked.
|
|
8
|
-
* No code anywhere reads a provider id to decide anything.
|
|
9
|
-
*
|
|
10
|
-
* Pure data with no imports, so the catalog (./capabilities.ts) can build
|
|
11
|
-
* its entries from it without an import cycle. Each spec parses with
|
|
12
|
-
* `parseProviderSpec` and round-trips through `oauthSpecOf`
|
|
13
|
-
* (oauthBuiltIns.test.ts).
|
|
14
|
-
*/
|
|
15
|
-
export const BUILT_IN_OAUTH_SPECS = {
|
|
16
|
-
// One Google Cloud project's OAuth client: Gmail, Calendar, Search
|
|
17
|
-
// Console, Analytics and any other Google API an app names a scope for.
|
|
18
|
-
"google-workspace": {
|
|
19
|
-
id: "google-workspace",
|
|
20
|
-
name: "Google",
|
|
21
|
-
description: "Gmail, Calendar, Drive, Search Console, Analytics and the other Google APIs, as the person who connects.",
|
|
22
|
-
docs: "https://console.cloud.google.com/apis/credentials",
|
|
23
|
-
api: "https://developers.google.com/identity/protocols/oauth2/scopes",
|
|
24
|
-
hosts: [
|
|
25
|
-
"gmail.googleapis.com",
|
|
26
|
-
"www.googleapis.com",
|
|
27
|
-
"searchconsole.googleapis.com",
|
|
28
|
-
"analyticsdata.googleapis.com",
|
|
29
|
-
"analyticsadmin.googleapis.com",
|
|
30
|
-
"openidconnect.googleapis.com",
|
|
31
|
-
],
|
|
32
|
-
auth: {
|
|
33
|
-
kind: "oauth2-user",
|
|
34
|
-
authorizeUrl: "https://accounts.google.com/o/oauth2/v2/auth",
|
|
35
|
-
tokenUrl: "https://oauth2.googleapis.com/token",
|
|
36
|
-
clientId: "GOOGLE_WORKSPACE_CLIENT_ID",
|
|
37
|
-
clientSecret: "GOOGLE_WORKSPACE_CLIENT_SECRET",
|
|
38
|
-
inject: "form",
|
|
39
|
-
pkce: true,
|
|
40
|
-
scopeSeparator: "space",
|
|
41
|
-
// An app writes `gmail.modify`; the authorize URL carries the full
|
|
42
|
-
// `https://www.googleapis.com/auth/gmail.modify`.
|
|
43
|
-
scopePrefix: "https://www.googleapis.com/auth/",
|
|
44
|
-
// A refresh token needs `access_type=offline`; `prompt=consent`
|
|
45
|
-
// makes Google issue one on every connect.
|
|
46
|
-
authorizeParams: { access_type: "offline", prompt: "consent" },
|
|
47
|
-
identity: {
|
|
48
|
-
url: "https://openidconnect.googleapis.com/v1/userinfo",
|
|
49
|
-
label: "email",
|
|
50
|
-
id: "sub",
|
|
51
|
-
scopes: ["openid", "email"],
|
|
52
|
-
},
|
|
53
|
-
// Google answers `email` and `profile` as the userinfo URLs, and may
|
|
54
|
-
// add `profile` beside `openid`.
|
|
55
|
-
tolerated: [
|
|
56
|
-
"profile",
|
|
57
|
-
"https://www.googleapis.com/auth/userinfo.email",
|
|
58
|
-
"https://www.googleapis.com/auth/userinfo.profile",
|
|
59
|
-
],
|
|
60
|
-
},
|
|
61
|
-
hint: "A Web application OAuth client in Google Cloud, with the Gateway's callback as its redirect URI and the scopes your apps list on its consent screen.",
|
|
62
|
-
},
|
|
63
|
-
// The multi-tenant Entra endpoints: register the client for accounts in
|
|
64
|
-
// any organization and personal accounts.
|
|
65
|
-
"microsoft-365": {
|
|
66
|
-
id: "microsoft-365",
|
|
67
|
-
name: "Microsoft 365",
|
|
68
|
-
description: "Outlook mail and calendar, OneDrive and the rest of Microsoft Graph, as the person who connects.",
|
|
69
|
-
docs: "https://entra.microsoft.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade",
|
|
70
|
-
api: "https://learn.microsoft.com/graph/permissions-reference",
|
|
71
|
-
hosts: ["graph.microsoft.com"],
|
|
72
|
-
auth: {
|
|
73
|
-
kind: "oauth2-user",
|
|
74
|
-
authorizeUrl: "https://login.microsoftonline.com/common/oauth2/v2.0/authorize",
|
|
75
|
-
tokenUrl: "https://login.microsoftonline.com/common/oauth2/v2.0/token",
|
|
76
|
-
clientId: "MICROSOFT_365_CLIENT_ID",
|
|
77
|
-
clientSecret: "MICROSOFT_365_CLIENT_SECRET",
|
|
78
|
-
inject: "form",
|
|
79
|
-
pkce: true,
|
|
80
|
-
scopeSeparator: "space",
|
|
81
|
-
// An app writes `Mail.Read`; Graph's scopes are fully qualified on
|
|
82
|
-
// the wire and may come back either way.
|
|
83
|
-
scopePrefix: "https://graph.microsoft.com/",
|
|
84
|
-
identity: {
|
|
85
|
-
url: "https://graph.microsoft.com/v1.0/me",
|
|
86
|
-
label: "userPrincipalName",
|
|
87
|
-
id: "id",
|
|
88
|
-
// `offline_access` is what makes Entra issue a refresh token.
|
|
89
|
-
scopes: ["User.Read", "offline_access"],
|
|
90
|
-
},
|
|
91
|
-
tolerated: ["openid", "profile", "email"],
|
|
92
|
-
},
|
|
93
|
-
hint: "An app registration in Entra for accounts in any organization and personal accounts, with the Gateway's callback as a Web redirect URI. If two apps share this client with different scopes, Microsoft may hand back both apps' scopes and the Gateway refuses the token: give each app its own client.",
|
|
94
|
-
},
|
|
95
|
-
// A Slack app's bot token: the top-level token of `oauth.v2.access`.
|
|
96
|
-
slack: {
|
|
97
|
-
id: "slack",
|
|
98
|
-
name: "Slack",
|
|
99
|
-
description: "Channels, members and messages, as the Slack app.",
|
|
100
|
-
docs: "https://api.slack.com/apps",
|
|
101
|
-
api: "https://api.slack.com/scopes",
|
|
102
|
-
hosts: ["slack.com"],
|
|
103
|
-
auth: {
|
|
104
|
-
kind: "oauth2-user",
|
|
105
|
-
authorizeUrl: "https://slack.com/oauth/v2/authorize",
|
|
106
|
-
tokenUrl: "https://slack.com/api/oauth.v2.access",
|
|
107
|
-
revokeUrl: "https://slack.com/api/auth.revoke",
|
|
108
|
-
clientId: "SLACK_CLIENT_ID",
|
|
109
|
-
clientSecret: "SLACK_CLIENT_SECRET",
|
|
110
|
-
inject: "form",
|
|
111
|
-
// Slack refuses `code_challenge`.
|
|
112
|
-
pkce: false,
|
|
113
|
-
scopeSeparator: "comma",
|
|
114
|
-
identity: {
|
|
115
|
-
url: "https://slack.com/api/auth.test",
|
|
116
|
-
label: "team",
|
|
117
|
-
id: "team_id",
|
|
118
|
-
},
|
|
119
|
-
},
|
|
120
|
-
hint: "A Slack app with the Gateway's callback as its redirect URL and the bot scopes your apps list. The Gateway takes its Client ID and Client Secret, not a bot token (xoxb-).",
|
|
121
|
-
},
|
|
122
|
-
};
|