@every-app/sdk 0.3.0-rc.10 → 0.3.0-rc.12
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 +67 -67
- package/dist/cloudflare/catalogSettings.generated.d.ts +7 -4
- package/dist/cloudflare/catalogSettings.generated.d.ts.map +1 -1
- package/dist/cloudflare/catalogSettings.generated.js +7 -6
- package/dist/cloudflare/index.d.ts +1 -1
- package/dist/cloudflare/index.d.ts.map +1 -1
- package/dist/cloudflare/worker.d.ts +36 -2
- package/dist/cloudflare/worker.d.ts.map +1 -1
- package/dist/cloudflare/worker.js +32 -6
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/internal/aiDefault.d.ts +36 -79
- package/dist/internal/aiDefault.d.ts.map +1 -1
- package/dist/internal/aiDefault.js +47 -149
- package/dist/internal/aiProviders.d.ts.map +1 -1
- package/dist/internal/aiProviders.js +2 -2
- package/dist/internal/appSettings.d.ts +14 -17
- package/dist/internal/appSettings.d.ts.map +1 -1
- package/dist/internal/appSettings.js +2 -16
- package/dist/internal/capabilities.d.ts +106 -489
- package/dist/internal/capabilities.d.ts.map +1 -1
- package/dist/internal/capabilities.js +49 -550
- package/dist/internal/catalog/commerce.js +1 -1
- package/dist/internal/catalog/index.d.ts +35 -0
- package/dist/internal/catalog/index.d.ts.map +1 -1
- package/dist/internal/catalog/infra.d.ts +35 -0
- package/dist/internal/catalog/infra.d.ts.map +1 -1
- package/dist/internal/catalog/infra.js +65 -0
- package/dist/internal/events.d.ts +52 -1
- package/dist/internal/events.d.ts.map +1 -1
- package/dist/internal/events.js +65 -3
- package/dist/internal/gatewaySettings.d.ts +2 -2
- package/dist/internal/gatewaySettings.d.ts.map +1 -1
- package/dist/internal/gatewaySettings.js +0 -6
- package/dist/internal/oauthBuiltIns.d.ts +101 -0
- package/dist/internal/oauthBuiltIns.d.ts.map +1 -0
- package/dist/internal/oauthBuiltIns.js +122 -0
- package/dist/internal/oauthClient.d.ts +7 -47
- package/dist/internal/oauthClient.d.ts.map +1 -1
- package/dist/internal/oauthClient.js +1 -115
- package/dist/internal/oauthPresets.d.ts +14 -15
- package/dist/internal/oauthPresets.d.ts.map +1 -1
- package/dist/internal/oauthPresets.js +42 -853
- package/dist/internal/oauthScopes.d.ts +43 -155
- package/dist/internal/oauthScopes.d.ts.map +1 -1
- package/dist/internal/oauthScopes.js +82 -475
- package/dist/internal/oauthSpec.d.ts +72 -71
- package/dist/internal/oauthSpec.d.ts.map +1 -1
- package/dist/internal/oauthSpec.js +178 -447
- package/dist/internal/protocol.d.ts +24 -14
- package/dist/internal/protocol.d.ts.map +1 -1
- package/dist/internal/protocol.js +26 -7
- package/dist/internal/providerRegistry.d.ts +1 -61
- package/dist/internal/providerRegistry.d.ts.map +1 -1
- package/dist/internal/providerRegistry.js +8 -115
- package/dist/internal/providerSpec.d.ts.map +1 -1
- package/dist/internal/providerSpec.js +14 -36
- package/dist/internal/remoteMcp.d.ts +4 -6
- package/dist/internal/remoteMcp.d.ts.map +1 -1
- package/dist/internal/remoteMcp.js +8 -15
- package/dist/internal/tools.d.ts +12 -7
- package/dist/internal/tools.d.ts.map +1 -1
- package/dist/internal/tools.js +9 -8
- package/dist/manifest.d.ts +41 -28
- package/dist/manifest.d.ts.map +1 -1
- package/dist/manifest.js +1 -1
- package/dist/server/ai.d.ts +1 -93
- package/dist/server/ai.d.ts.map +1 -1
- package/dist/server/ai.js +17 -111
- package/dist/server/attribution.d.ts +10 -1
- package/dist/server/attribution.d.ts.map +1 -1
- package/dist/server/attribution.js +7 -1
- package/dist/server/connectUrl.d.ts +4 -9
- package/dist/server/connectUrl.d.ts.map +1 -1
- package/dist/server/connectUrl.js +17 -14
- package/dist/server/context.d.ts +12 -14
- package/dist/server/context.d.ts.map +1 -1
- package/dist/server/context.js +23 -25
- package/dist/server/eventsEndpoint.d.ts +48 -0
- package/dist/server/eventsEndpoint.d.ts.map +1 -0
- package/dist/server/eventsEndpoint.js +145 -0
- package/dist/server/everyApp.d.ts +16 -26
- package/dist/server/everyApp.d.ts.map +1 -1
- package/dist/server/everyApp.js +22 -46
- package/dist/server/gatewayFetch.d.ts +1 -1
- package/dist/server/gatewayFetch.js +1 -1
- package/dist/server/index.d.ts +6 -9
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +4 -8
- package/dist/server/integrationFetch.d.ts +60 -72
- package/dist/server/integrationFetch.d.ts.map +1 -1
- package/dist/server/integrationFetch.js +117 -392
- package/dist/server/refusal.d.ts +0 -9
- package/dist/server/refusal.d.ts.map +1 -1
- package/dist/server/refusal.js +0 -22
- package/dist/server/tools.d.ts +13 -5
- package/dist/server/tools.d.ts.map +1 -1
- package/dist/server/tools.js +10 -3
- package/dist/server/toolsEndpoint.d.ts +2 -1
- package/dist/server/toolsEndpoint.d.ts.map +1 -1
- package/dist/server/toolsEndpoint.js +4 -3
- package/dist/server/webhooks.d.ts +56 -0
- package/dist/server/webhooks.d.ts.map +1 -0
- package/dist/server/webhooks.js +205 -0
- package/dist/testing/index.d.ts +2 -3
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +2 -6
- package/package.json +1 -1
- package/dist/server/aiBinding.d.ts +0 -68
- package/dist/server/aiBinding.d.ts.map +0 -1
- package/dist/server/aiBinding.js +0 -294
- package/dist/server/authorizeUrl.d.ts +0 -43
- package/dist/server/authorizeUrl.d.ts.map +0 -1
- package/dist/server/authorizeUrl.js +0 -106
- package/dist/server/emailBinding.d.ts +0 -72
- package/dist/server/emailBinding.d.ts.map +0 -1
- package/dist/server/emailBinding.js +0 -124
- package/dist/server/fromMcpTools.d.ts +0 -89
- package/dist/server/fromMcpTools.d.ts.map +0 -1
- package/dist/server/fromMcpTools.js +0 -192
|
@@ -16,18 +16,14 @@
|
|
|
16
16
|
* proxy's rules: inference routes only, the model allowlist, the usage
|
|
17
17
|
* tap. Never a capability: its key would reach the account's credits
|
|
18
18
|
* and keys on the same host.
|
|
19
|
-
* - `oauth_client`:
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* the
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* with different needs carries a `scopePolicy`: named scope sets an app
|
|
28
|
-
* lists in its manifest entry's `scopes`, which ./oauthScopes.ts turns
|
|
29
|
-
* into what the app may ask the provider for and what a token it is
|
|
30
|
-
* handed may carry.
|
|
19
|
+
* - `oauth_client`: an OAuth provider (Google, Microsoft, Slack built
|
|
20
|
+
* in; GitHub and others as presets, ./oauthPresets.ts) whose client the
|
|
21
|
+
* gateway holds and whose flow it runs. A person connects in an app,
|
|
22
|
+
* for exactly the provider scopes the app's manifest entry lists
|
|
23
|
+
* (`scopes`); the gateway keeps the tokens and puts the person's token
|
|
24
|
+
* on the app's calls to the provider's `api` hosts. Each provider is a
|
|
25
|
+
* spec (./oauthSpec.ts), its differences data; ./oauthScopes.ts holds
|
|
26
|
+
* the one set of scope rules.
|
|
31
27
|
* - `service`: something the gateway does itself, with no upstream host
|
|
32
28
|
* an app names (sending email, listing the organization's members). An
|
|
33
29
|
* app lists it the same way and calls its routes,
|
|
@@ -205,9 +201,9 @@ export interface ApiKeyCapability extends ProviderDetails {
|
|
|
205
201
|
* An AI provider (OpenAI, OpenRouter, Workers AI): the AI proxy's table as
|
|
206
202
|
* a catalog entry. The app's path is joined onto `origin` and `basePath`
|
|
207
203
|
* (with `{SETTING}` placeholders filled from the Gateway's settings, each
|
|
208
|
-
* URL-encoded) and must be one of `inferenceRoutes` (a POST), unless
|
|
209
|
-
*
|
|
210
|
-
*
|
|
204
|
+
* URL-encoded) and must be one of `inferenceRoutes` (a POST), unless the
|
|
205
|
+
* app's manifest (`ai.routes`) allows more on an entry that takes more
|
|
206
|
+
* (`extraRoutes`). `unstoredRoutes` get `store: false`.
|
|
211
207
|
* `normalize` names the one response rewrite the gateway has.
|
|
212
208
|
*/
|
|
213
209
|
export interface AiProviderCapability extends ProviderDetails {
|
|
@@ -231,6 +227,7 @@ export interface AiProviderCapability extends ProviderDetails {
|
|
|
231
227
|
basePath?: string;
|
|
232
228
|
inferenceRoutes: readonly string[];
|
|
233
229
|
unstoredRoutes?: readonly string[];
|
|
230
|
+
/** Paths beyond inference an app may name in its manifest's `ai.routes`: OpenAI only. */
|
|
234
231
|
extraRoutes?: boolean;
|
|
235
232
|
normalize?: "workers-ai";
|
|
236
233
|
/**
|
|
@@ -288,11 +285,11 @@ export interface AiRoute {
|
|
|
288
285
|
/** One of the entry's `inferenceRoutes`: `/api/v1/chat/completions`. */
|
|
289
286
|
path: string;
|
|
290
287
|
/**
|
|
291
|
-
* The seed: the model the Gateway fills in when
|
|
292
|
-
*
|
|
293
|
-
* cheap, capable one of the provider's.
|
|
294
|
-
*
|
|
295
|
-
*
|
|
288
|
+
* The seed: the model the Gateway fills in when the workspace's default
|
|
289
|
+
* names this provider without a model (or the order picked it), a
|
|
290
|
+
* cheap, capable one of the provider's. Read it through
|
|
291
|
+
* `resolveAiDefault` (./aiDefault.ts), which puts the setting's model
|
|
292
|
+
* first.
|
|
296
293
|
*/
|
|
297
294
|
seedModel: string;
|
|
298
295
|
}
|
|
@@ -317,105 +314,10 @@ export interface GatewayServiceCapability {
|
|
|
317
314
|
/** The everyapp skill's setup guide, when there is anything to set up. */
|
|
318
315
|
setup?: string;
|
|
319
316
|
}
|
|
320
|
-
/** Where the
|
|
317
|
+
/** Where the Gateway puts its OAuth client on a token request: the form body or HTTP Basic. */
|
|
321
318
|
export type OAuthClientInjection = "form" | "basic";
|
|
322
|
-
/**
|
|
323
|
-
export
|
|
324
|
-
/** The endpoint's host, always over https. */
|
|
325
|
-
host: string;
|
|
326
|
-
/** The exact pathname. */
|
|
327
|
-
path: string;
|
|
328
|
-
methods: readonly ("GET" | "POST")[];
|
|
329
|
-
/**
|
|
330
|
-
* Where the client goes: the form body or HTTP Basic
|
|
331
|
-
* (injectClientCredentials() in ./oauthClient.ts).
|
|
332
|
-
*/
|
|
333
|
-
inject: OAuthClientInjection;
|
|
334
|
-
}
|
|
335
|
-
/**
|
|
336
|
-
* One host's allowlist a scope set unlocks. Matched against the raw
|
|
337
|
-
* pathname, case preserved, by `scopeRouteAllows()` in ./oauthScopes.ts:
|
|
338
|
-
* the proxy boundary once the gateway holds tokens, tested data until then.
|
|
339
|
-
*/
|
|
340
|
-
export interface OAuthScopeRoute {
|
|
341
|
-
/** A bare https host, one of the capability's `api` hosts. */
|
|
342
|
-
host: string;
|
|
343
|
-
/**
|
|
344
|
-
* Raw-path entries: exact, or a prefix when the entry ends in `/`. GET
|
|
345
|
-
* and HEAD go through when one matches.
|
|
346
|
-
*/
|
|
347
|
-
paths: readonly string[];
|
|
348
|
-
/**
|
|
349
|
-
* The read-shaped POSTs a read set allows (queries, watches): anchored,
|
|
350
|
-
* flagless RegExps over the raw pathname. Every other POST is refused.
|
|
351
|
-
*/
|
|
352
|
-
posts?: readonly RegExp[];
|
|
353
|
-
}
|
|
354
|
-
/**
|
|
355
|
-
* A named bundle an app lists under `scopes`: what it asks the provider for
|
|
356
|
-
* and what that unlocks.
|
|
357
|
-
*/
|
|
358
|
-
export interface OAuthScopeSet {
|
|
359
|
-
/** What Admin → Apps and a consent page call it: "Gmail (read-only)". */
|
|
360
|
-
label: string;
|
|
361
|
-
/**
|
|
362
|
-
* A read set unlocks GET, HEAD and its `posts` only. No write set exists
|
|
363
|
-
* on the shared clients yet; adding one is a reviewed registry change.
|
|
364
|
-
*/
|
|
365
|
-
access: CapabilityAccess;
|
|
366
|
-
/** The provider's scope strings, requested verbatim (Slack: bot scopes). */
|
|
367
|
-
scopes: readonly string[];
|
|
368
|
-
/** Slack's `user_scope` strings, issued to the installing person's own token; absent elsewhere. */
|
|
369
|
-
userScopes?: readonly string[];
|
|
370
|
-
routes: readonly OAuthScopeRoute[];
|
|
371
|
-
}
|
|
372
|
-
/**
|
|
373
|
-
* How a provider spells granted scopes in its token response; each has a
|
|
374
|
-
* parser in ./oauthScopes.ts. `space` and `comma` are the plain spellings
|
|
375
|
-
* a registered provider names (`scopeDialect`): a token response without
|
|
376
|
-
* a `scope` field is taken as granted-as-requested (RFC 6749 §5.1).
|
|
377
|
-
*/
|
|
378
|
-
export type OAuthScopeDialect = "google" | "microsoft" | "slack" | "space" | "comma";
|
|
379
|
-
/**
|
|
380
|
-
* Everything the gateway needs to hold an app to its scope sets at the
|
|
381
|
-
* token endpoint. Present means an app's entry must list `scopes` and the
|
|
382
|
-
* gateway refuses tokens outside them. Data only: the dialect selects the
|
|
383
|
-
* parser, so the registry stays a table.
|
|
384
|
-
*/
|
|
385
|
-
export interface OAuthScopePolicy {
|
|
386
|
-
sets: Readonly<Record<string, OAuthScopeSet>>;
|
|
387
|
-
/**
|
|
388
|
-
* Scopes a token may carry beyond the declared sets without refusal:
|
|
389
|
-
* identity and refresh scopes, in every spelling the provider uses.
|
|
390
|
-
* Never a data scope.
|
|
391
|
-
*/
|
|
392
|
-
tolerated: readonly string[];
|
|
393
|
-
/**
|
|
394
|
-
* Scopes every declaring app asks for whatever its sets, on the authorize
|
|
395
|
-
* URL and Microsoft's token leg (`offline_access`). Always tolerated.
|
|
396
|
-
*/
|
|
397
|
-
alwaysRequested: readonly string[];
|
|
398
|
-
dialect: OAuthScopeDialect;
|
|
399
|
-
/**
|
|
400
|
-
* The `tokenGrantType()` values the gateway completes through this
|
|
401
|
-
* client. `null` is a code exchange that carries no `grant_type` (Slack's
|
|
402
|
-
* oauth.v2.access).
|
|
403
|
-
*/
|
|
404
|
-
grantTypes: readonly (string | null)[];
|
|
405
|
-
/**
|
|
406
|
-
* What becomes of the token request's `scope` once it passes the check:
|
|
407
|
-
* `replace` it with the app's requested list (Microsoft's token-leg
|
|
408
|
-
* extension, which keeps a token to one resource), `drop` it (Google
|
|
409
|
-
* documents no `scope` on either token leg), or `keep` it (Slack).
|
|
410
|
-
*/
|
|
411
|
-
requestScope: "replace" | "drop" | "keep";
|
|
412
|
-
/**
|
|
413
|
-
* Decoded path segments no set unlocks on any host, compared
|
|
414
|
-
* case-insensitively: batch tunnels that carry other requests inside, and
|
|
415
|
-
* resources that reveal secrets under a read scope.
|
|
416
|
-
*/
|
|
417
|
-
deniedSegments: readonly string[];
|
|
418
|
-
}
|
|
319
|
+
/** How a provider separates scopes in its `scope` parameter and its token answer. */
|
|
320
|
+
export type OAuthScopeSeparator = "space" | "comma";
|
|
419
321
|
/** How a provider names the account a new connection is for, read once after the exchange. */
|
|
420
322
|
export interface OAuthIdentity {
|
|
421
323
|
/** An https URL on one of the provider's `api` hosts, GET with the new token. */
|
|
@@ -426,94 +328,74 @@ export interface OAuthIdentity {
|
|
|
426
328
|
id?: string;
|
|
427
329
|
}
|
|
428
330
|
/**
|
|
429
|
-
*
|
|
430
|
-
*
|
|
431
|
-
*
|
|
432
|
-
* registered row's `auth` (`kind: "oauth2-user"`). Absent: the entry
|
|
433
|
-
* keeps the app-driven flow only (the social networks).
|
|
331
|
+
* The provider's authorization-code flow as data, from its spec
|
|
332
|
+
* (./oauthSpec.ts): everything that differs between providers. The
|
|
333
|
+
* Gateway runs it; an app never sees a token or the client.
|
|
434
334
|
*/
|
|
435
335
|
export interface OAuthFlow {
|
|
336
|
+
/** Where the browser goes to consent (https). */
|
|
337
|
+
authorizeUrl: string;
|
|
436
338
|
/** The token endpoint the Gateway posts the code and refresh token to (https). */
|
|
437
339
|
tokenUrl: string;
|
|
438
340
|
/** Where a disconnect revokes the token; absent means the tokens die at their expiry. */
|
|
439
341
|
revokeUrl?: string;
|
|
440
342
|
/** The revoke call's method (default POST). */
|
|
441
343
|
revokeMethod?: "POST" | "DELETE";
|
|
442
|
-
/**
|
|
344
|
+
/** Where the client goes on the token request. */
|
|
345
|
+
inject: OAuthClientInjection;
|
|
346
|
+
/** Whether the authorize request carries a PKCE S256 challenge. */
|
|
443
347
|
pkce: boolean;
|
|
444
|
-
|
|
445
|
-
|
|
348
|
+
scopeSeparator: OAuthScopeSeparator;
|
|
349
|
+
/**
|
|
350
|
+
* Joined onto an app's short scope (`gmail.modify`) for the authorize
|
|
351
|
+
* URL, and taken off a granted one for comparison: Google's
|
|
352
|
+
* `https://www.googleapis.com/auth/`. Absent: scopes as written.
|
|
353
|
+
*/
|
|
354
|
+
scopePrefix?: string;
|
|
446
355
|
/** Extra query on the authorize URL (Google's `access_type=offline`). */
|
|
447
356
|
authorizeParams?: Readonly<Record<string, string>>;
|
|
448
357
|
/** Extra headers on the token request (GitHub's `Accept: application/json`). */
|
|
449
358
|
tokenHeaders?: Readonly<Record<string, string>>;
|
|
450
359
|
identity?: OAuthIdentity;
|
|
360
|
+
/**
|
|
361
|
+
* Scopes the Gateway adds to every connect, whatever the app lists: what
|
|
362
|
+
* the identity URL needs, and a refresh token's (Microsoft's
|
|
363
|
+
* `offline_access`). Tolerated at mint; apps never list them.
|
|
364
|
+
*/
|
|
365
|
+
identityScopes: readonly string[];
|
|
366
|
+
/** Scopes a token may carry beyond what was asked without refusal (another spelling of an identity scope). Never a data scope. */
|
|
367
|
+
tolerated: readonly string[];
|
|
451
368
|
}
|
|
452
369
|
/**
|
|
453
|
-
*
|
|
454
|
-
*
|
|
455
|
-
*
|
|
456
|
-
*
|
|
370
|
+
* An OAuth provider the Gateway holds a client for and runs the flow for
|
|
371
|
+
* (docs/design/2026-11-oauth-simplify.md). A person connects in an app;
|
|
372
|
+
* the connection is theirs and that app's, for exactly the scopes the
|
|
373
|
+
* app's `everyapp.config.ts` lists, and the app calls the provider's
|
|
374
|
+
* `api` hosts through the Gateway, which puts the token on.
|
|
457
375
|
*/
|
|
458
376
|
export interface OAuthClientCapability {
|
|
459
377
|
mode: "oauth_client";
|
|
460
|
-
/** The provider's name in errors and logs. */
|
|
378
|
+
/** The provider's name in errors, pages and logs. */
|
|
461
379
|
label: string;
|
|
462
|
-
/** Gateway
|
|
380
|
+
/** Gateway setting names. No `clientSecret`: a public client, the id alone. */
|
|
463
381
|
secrets: {
|
|
464
382
|
clientId: string;
|
|
465
383
|
clientSecret?: string;
|
|
466
384
|
};
|
|
467
|
-
/**
|
|
468
|
-
token: readonly OAuthTokenEndpoint[];
|
|
469
|
-
/**
|
|
470
|
-
* Obtaining and refreshing user tokens with the operator's client
|
|
471
|
-
* writes, so a catalog client is `["write"]`. A registered OAuth
|
|
472
|
-
* provider says what the proxy may do with the held token: read, write
|
|
473
|
-
* or both (docs/design/2026-10-oauth-providers.md section 7).
|
|
474
|
-
*/
|
|
475
|
-
access: readonly CapabilityAccess[];
|
|
476
|
-
/** Where the operator registers the client. */
|
|
385
|
+
/** Where the operator registers the client (the spec's `docs`). */
|
|
477
386
|
console: string;
|
|
478
387
|
/** The everyapp skill's setup guide for the client, when one exists. */
|
|
479
388
|
setup?: string;
|
|
480
|
-
/**
|
|
481
|
-
* The authorize endpoint the app sends people to and the scopes the
|
|
482
|
-
* client must be allowed: the operator's checklist and the docs. With
|
|
483
|
-
* a `scopePolicy`, the union of its sets' scopes and `alwaysRequested`.
|
|
484
|
-
*/
|
|
485
|
-
authorize: {
|
|
486
|
-
url: string;
|
|
487
|
-
scopes: readonly string[];
|
|
488
|
-
};
|
|
489
|
-
/**
|
|
490
|
-
* Named scope sets an app lists in its manifest entry's `scopes`, for a
|
|
491
|
-
* client several apps share with different needs. Absent: the whole
|
|
492
|
-
* client is the grant.
|
|
493
|
-
*/
|
|
494
|
-
scopePolicy?: OAuthScopePolicy;
|
|
495
|
-
/**
|
|
496
|
-
* Hosts the app calls afterwards with the user's token; the Gateway's
|
|
497
|
-
* held-token branch forwards to these alone, and a scope policy's
|
|
498
|
-
* routes are on them.
|
|
499
|
-
*/
|
|
389
|
+
/** The only hosts the held token is ever sent to, over https. */
|
|
500
390
|
api: readonly string[];
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
/** A registered OAuth provider's spec fields (a catalog client has `setup` instead). */
|
|
391
|
+
flow: OAuthFlow;
|
|
392
|
+
/** What it is for, in one line. */
|
|
504
393
|
description?: string;
|
|
505
394
|
/** The API reference (a spec's `api`), optional. */
|
|
506
395
|
reference?: string;
|
|
507
396
|
hint?: string;
|
|
508
397
|
example?: string;
|
|
509
398
|
tags?: readonly string[];
|
|
510
|
-
/**
|
|
511
|
-
* A registered OAuth provider's methods: what a read grant may use
|
|
512
|
-
* (default GET and HEAD) and what a write grant adds (default the
|
|
513
|
-
* API-key default). A catalog client leaves both unset.
|
|
514
|
-
*/
|
|
515
|
-
readMethods?: readonly string[];
|
|
516
|
-
writeMethods?: readonly string[];
|
|
517
399
|
}
|
|
518
400
|
export type Capability = ApiKeyCapability | AiProviderCapability | OAuthClientCapability | GatewayServiceCapability;
|
|
519
401
|
export declare const CAPABILITIES: {
|
|
@@ -1724,6 +1606,41 @@ export declare const CAPABILITIES: {
|
|
|
1724
1606
|
};
|
|
1725
1607
|
readonly tags: readonly ["weather", "forecast"];
|
|
1726
1608
|
};
|
|
1609
|
+
readonly daytona: {
|
|
1610
|
+
readonly mode: "api_key";
|
|
1611
|
+
readonly label: "Daytona";
|
|
1612
|
+
readonly description: "Sandboxes for running code: create, start, stop, archive and delete sandboxes, and manage their snapshots and volumes.";
|
|
1613
|
+
readonly auth: {
|
|
1614
|
+
readonly kind: "bearer";
|
|
1615
|
+
readonly secret: "DAYTONA_API_KEY";
|
|
1616
|
+
};
|
|
1617
|
+
readonly docs: "https://www.daytona.io/docs/en/api-keys/";
|
|
1618
|
+
readonly api: "https://www.daytona.io/docs/en/tools/api/";
|
|
1619
|
+
readonly hosts: readonly ["app.daytona.io"];
|
|
1620
|
+
readonly data: "account";
|
|
1621
|
+
readonly access: readonly ["read", "write"];
|
|
1622
|
+
readonly readMethods: readonly ["GET", "HEAD"];
|
|
1623
|
+
readonly writeMethods: readonly ["POST", "PUT", "PATCH", "DELETE"];
|
|
1624
|
+
readonly accountWidePaths: readonly [readonly ["organizations"], readonly ["organization"], readonly ["billing"], readonly ["api-keys"], readonly ["users"], readonly ["audit"], readonly ["webhooks"], readonly ["secret"], readonly ["docker-registry"], readonly ["object-storage"], readonly ["regions"], readonly ["runners"], readonly ["for-runner"], readonly ["jobs"], readonly ["warm-pools"], readonly ["preview"], readonly ["ssh-access", "validate"]];
|
|
1625
|
+
readonly hint: "An API key from the Daytona dashboard's Keys page, with only the permissions the apps need; the Gateway sends it as a bearer token to app.daytona.io. Any key of an organization reaches every running sandbox in it, so give the Gateway a Daytona organization of its own.";
|
|
1626
|
+
readonly secrets: readonly [{
|
|
1627
|
+
readonly name: "DAYTONA_API_KEY";
|
|
1628
|
+
readonly hint: "An API key from the Daytona dashboard's Keys page: write:sandboxes and delete:sandboxes (and the snapshot or volume ones) only if an app needs them, and never manage:api_keys, manage:secrets, manage:billing or the region and runner permissions.";
|
|
1629
|
+
}];
|
|
1630
|
+
readonly smoke: {
|
|
1631
|
+
readonly method: "GET";
|
|
1632
|
+
readonly path: "/api/sandbox";
|
|
1633
|
+
readonly expect: readonly [200];
|
|
1634
|
+
readonly free: true;
|
|
1635
|
+
readonly note: "Lists the organization's sandboxes; any key may read them.";
|
|
1636
|
+
};
|
|
1637
|
+
readonly example: "start a sandbox from my snapshot and stop it when the run is done";
|
|
1638
|
+
readonly verified: {
|
|
1639
|
+
readonly on: "2026-11-01";
|
|
1640
|
+
readonly how: "docs";
|
|
1641
|
+
};
|
|
1642
|
+
readonly tags: readonly ["sandbox", "compute", "hosting"];
|
|
1643
|
+
};
|
|
1727
1644
|
readonly postmark: {
|
|
1728
1645
|
readonly mode: "api_key";
|
|
1729
1646
|
readonly label: "Postmark";
|
|
@@ -2702,303 +2619,22 @@ export declare const CAPABILITIES: {
|
|
|
2702
2619
|
readonly settings: readonly [];
|
|
2703
2620
|
readonly optionalSettings: readonly [];
|
|
2704
2621
|
};
|
|
2705
|
-
readonly slack: {
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
readonly clientId: "SLACK_CLIENT_ID";
|
|
2710
|
-
readonly clientSecret: "SLACK_CLIENT_SECRET";
|
|
2711
|
-
};
|
|
2712
|
-
readonly token: readonly [{
|
|
2713
|
-
readonly host: "slack.com";
|
|
2714
|
-
readonly path: "/api/oauth.v2.access";
|
|
2715
|
-
readonly methods: readonly ["POST"];
|
|
2716
|
-
readonly inject: "form";
|
|
2717
|
-
}];
|
|
2718
|
-
readonly access: readonly ["write"];
|
|
2719
|
-
readonly console: "https://api.slack.com/apps";
|
|
2720
|
-
readonly setup: "setup/slack.md";
|
|
2721
|
-
readonly authorize: {
|
|
2722
|
-
readonly url: "https://slack.com/oauth/v2/authorize";
|
|
2723
|
-
readonly scopes: readonly ["channels:read", "groups:read", "users:read", "users:read.email", "chat:write", "chat:write.public", "chat:write.customize", "channels:join", "channels:manage", "groups:write", "channels:write.invites", "groups:write.invites", "im:write", "files:write", "channels:write"];
|
|
2724
|
-
};
|
|
2725
|
-
readonly scopePolicy: {
|
|
2726
|
-
readonly dialect: "slack";
|
|
2727
|
-
readonly grantTypes: readonly [null, "refresh_token"];
|
|
2728
|
-
readonly requestScope: "keep";
|
|
2729
|
-
readonly alwaysRequested: readonly [];
|
|
2730
|
-
readonly tolerated: readonly [];
|
|
2731
|
-
readonly deniedSegments: readonly [];
|
|
2732
|
-
readonly sets: {
|
|
2733
|
-
readonly "channels.read": {
|
|
2734
|
-
readonly label: "Channels (read-only)";
|
|
2735
|
-
readonly access: "read";
|
|
2736
|
-
readonly scopes: readonly ["channels:read", "groups:read"];
|
|
2737
|
-
readonly routes: readonly [{
|
|
2738
|
-
readonly host: "slack.com";
|
|
2739
|
-
readonly paths: readonly ["/api/conversations.list", "/api/conversations.info", "/api/conversations.members", "/api/users.conversations"];
|
|
2740
|
-
readonly posts: readonly [RegExp, RegExp];
|
|
2741
|
-
}];
|
|
2742
|
-
};
|
|
2743
|
-
readonly "users.read": {
|
|
2744
|
-
readonly label: "Members (read-only)";
|
|
2745
|
-
readonly access: "read";
|
|
2746
|
-
readonly scopes: readonly ["users:read"];
|
|
2747
|
-
readonly routes: readonly [{
|
|
2748
|
-
readonly host: "slack.com";
|
|
2749
|
-
readonly paths: readonly ["/api/users.list", "/api/users.info", "/api/users.getPresence", "/api/bots.info"];
|
|
2750
|
-
readonly posts: readonly [RegExp, RegExp];
|
|
2751
|
-
}];
|
|
2752
|
-
};
|
|
2753
|
-
readonly "users.email": {
|
|
2754
|
-
readonly label: "Members' email addresses (read-only)";
|
|
2755
|
-
readonly access: "read";
|
|
2756
|
-
readonly scopes: readonly ["users:read.email"];
|
|
2757
|
-
readonly routes: readonly [{
|
|
2758
|
-
readonly host: "slack.com";
|
|
2759
|
-
readonly paths: readonly ["/api/users.lookupByEmail"];
|
|
2760
|
-
readonly posts: readonly [RegExp];
|
|
2761
|
-
}];
|
|
2762
|
-
};
|
|
2763
|
-
readonly "messages.write": {
|
|
2764
|
-
readonly label: "Messages (post as the app)";
|
|
2765
|
-
readonly access: "write";
|
|
2766
|
-
readonly scopes: readonly ["chat:write", "chat:write.public", "chat:write.customize"];
|
|
2767
|
-
readonly routes: readonly [{
|
|
2768
|
-
readonly host: "slack.com";
|
|
2769
|
-
readonly paths: readonly ["/api/chat.scheduledMessages.list"];
|
|
2770
|
-
readonly posts: readonly [RegExp];
|
|
2771
|
-
}];
|
|
2772
|
-
};
|
|
2773
|
-
readonly "channels.join": {
|
|
2774
|
-
readonly label: "Channels (join public ones)";
|
|
2775
|
-
readonly access: "write";
|
|
2776
|
-
readonly scopes: readonly ["channels:join"];
|
|
2777
|
-
readonly routes: readonly [{
|
|
2778
|
-
readonly host: "slack.com";
|
|
2779
|
-
readonly paths: readonly [];
|
|
2780
|
-
readonly posts: readonly [RegExp];
|
|
2781
|
-
}];
|
|
2782
|
-
};
|
|
2783
|
-
readonly "channels.manage": {
|
|
2784
|
-
readonly label: "Channels (create, manage and invite to; open DMs)";
|
|
2785
|
-
readonly access: "write";
|
|
2786
|
-
readonly scopes: readonly ["channels:manage", "groups:write", "channels:write.invites", "groups:write.invites", "im:write"];
|
|
2787
|
-
readonly routes: readonly [{
|
|
2788
|
-
readonly host: "slack.com";
|
|
2789
|
-
readonly paths: readonly [];
|
|
2790
|
-
readonly posts: readonly [RegExp];
|
|
2791
|
-
}];
|
|
2792
|
-
};
|
|
2793
|
-
readonly "files.write": {
|
|
2794
|
-
readonly label: "Files (upload)";
|
|
2795
|
-
readonly access: "write";
|
|
2796
|
-
readonly scopes: readonly ["files:write"];
|
|
2797
|
-
readonly routes: readonly [{
|
|
2798
|
-
readonly host: "slack.com";
|
|
2799
|
-
readonly paths: readonly [];
|
|
2800
|
-
readonly posts: readonly [RegExp];
|
|
2801
|
-
}];
|
|
2802
|
-
};
|
|
2803
|
-
readonly "user-channels.manage": {
|
|
2804
|
-
readonly label: "Channels (as the installing person: read, manage, invite to)";
|
|
2805
|
-
readonly access: "write";
|
|
2806
|
-
readonly scopes: readonly [];
|
|
2807
|
-
readonly userScopes: readonly ["channels:read", "channels:write", "groups:read", "groups:write"];
|
|
2808
|
-
readonly routes: readonly [{
|
|
2809
|
-
readonly host: "slack.com";
|
|
2810
|
-
readonly paths: readonly ["/api/conversations.list", "/api/conversations.info", "/api/conversations.members", "/api/users.conversations"];
|
|
2811
|
-
readonly posts: readonly [RegExp, RegExp];
|
|
2812
|
-
}];
|
|
2813
|
-
};
|
|
2814
|
-
};
|
|
2815
|
-
};
|
|
2816
|
-
readonly api: readonly ["slack.com"];
|
|
2817
|
-
readonly flow: {
|
|
2818
|
-
readonly tokenUrl: "https://slack.com/api/oauth.v2.access";
|
|
2819
|
-
readonly revokeUrl: "https://slack.com/api/auth.revoke";
|
|
2820
|
-
readonly pkce: false;
|
|
2821
|
-
readonly scopeDialect: "slack";
|
|
2822
|
-
readonly identity: {
|
|
2823
|
-
readonly url: "https://slack.com/api/auth.test";
|
|
2824
|
-
readonly label: "team";
|
|
2825
|
-
readonly id: "user_id";
|
|
2826
|
-
};
|
|
2622
|
+
readonly slack: OAuthClientCapability & {
|
|
2623
|
+
secrets: {
|
|
2624
|
+
clientId: "SLACK_CLIENT_ID";
|
|
2625
|
+
clientSecret: "SLACK_CLIENT_SECRET";
|
|
2827
2626
|
};
|
|
2828
2627
|
};
|
|
2829
|
-
readonly "google-workspace": {
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
readonly clientId: "GOOGLE_WORKSPACE_CLIENT_ID";
|
|
2834
|
-
readonly clientSecret: "GOOGLE_WORKSPACE_CLIENT_SECRET";
|
|
2835
|
-
};
|
|
2836
|
-
readonly token: readonly [{
|
|
2837
|
-
readonly host: "oauth2.googleapis.com";
|
|
2838
|
-
readonly path: "/token";
|
|
2839
|
-
readonly methods: readonly ["POST"];
|
|
2840
|
-
readonly inject: "form";
|
|
2841
|
-
}];
|
|
2842
|
-
readonly access: readonly ["write"];
|
|
2843
|
-
readonly console: "https://console.cloud.google.com/apis/credentials";
|
|
2844
|
-
readonly setup: "setup/google.md";
|
|
2845
|
-
readonly authorize: {
|
|
2846
|
-
readonly url: "https://accounts.google.com/o/oauth2/v2/auth";
|
|
2847
|
-
readonly scopes: readonly ["openid", "email", "profile", "https://www.googleapis.com/auth/gmail.readonly", "https://www.googleapis.com/auth/calendar.readonly", "https://www.googleapis.com/auth/webmasters.readonly", "https://www.googleapis.com/auth/analytics.readonly"];
|
|
2848
|
-
};
|
|
2849
|
-
readonly scopePolicy: {
|
|
2850
|
-
readonly dialect: "google";
|
|
2851
|
-
readonly grantTypes: readonly ["authorization_code", "refresh_token"];
|
|
2852
|
-
readonly requestScope: "drop";
|
|
2853
|
-
readonly alwaysRequested: readonly [];
|
|
2854
|
-
readonly tolerated: readonly ["openid", "email", "profile", "https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/userinfo.profile"];
|
|
2855
|
-
readonly deniedSegments: readonly ["batch", "measurementProtocolSecrets"];
|
|
2856
|
-
readonly sets: {
|
|
2857
|
-
readonly identity: {
|
|
2858
|
-
readonly label: "Google account (who you are)";
|
|
2859
|
-
readonly access: "read";
|
|
2860
|
-
readonly scopes: readonly ["openid", "email", "profile"];
|
|
2861
|
-
readonly routes: readonly [{
|
|
2862
|
-
readonly host: "openidconnect.googleapis.com";
|
|
2863
|
-
readonly paths: readonly ["/v1/userinfo"];
|
|
2864
|
-
}, {
|
|
2865
|
-
readonly host: "www.googleapis.com";
|
|
2866
|
-
readonly paths: readonly ["/oauth2/v2/userinfo", "/oauth2/v3/userinfo", "/userinfo/v2/me"];
|
|
2867
|
-
}];
|
|
2868
|
-
};
|
|
2869
|
-
readonly "gmail.read": {
|
|
2870
|
-
readonly label: "Gmail (read-only)";
|
|
2871
|
-
readonly access: "read";
|
|
2872
|
-
readonly scopes: readonly ["https://www.googleapis.com/auth/gmail.readonly"];
|
|
2873
|
-
readonly routes: readonly [{
|
|
2874
|
-
readonly host: "gmail.googleapis.com";
|
|
2875
|
-
readonly paths: readonly ["/gmail/v1/users/"];
|
|
2876
|
-
readonly posts: readonly [RegExp];
|
|
2877
|
-
}];
|
|
2878
|
-
};
|
|
2879
|
-
readonly "calendar.read": {
|
|
2880
|
-
readonly label: "Google Calendar (read-only)";
|
|
2881
|
-
readonly access: "read";
|
|
2882
|
-
readonly scopes: readonly ["https://www.googleapis.com/auth/calendar.readonly"];
|
|
2883
|
-
readonly routes: readonly [{
|
|
2884
|
-
readonly host: "www.googleapis.com";
|
|
2885
|
-
readonly paths: readonly ["/calendar/v3/"];
|
|
2886
|
-
readonly posts: readonly [RegExp, RegExp, RegExp, RegExp];
|
|
2887
|
-
}];
|
|
2888
|
-
};
|
|
2889
|
-
readonly "search-console.read": {
|
|
2890
|
-
readonly label: "Search Console (read-only)";
|
|
2891
|
-
readonly access: "read";
|
|
2892
|
-
readonly scopes: readonly ["https://www.googleapis.com/auth/webmasters.readonly"];
|
|
2893
|
-
readonly routes: readonly [{
|
|
2894
|
-
readonly host: "www.googleapis.com";
|
|
2895
|
-
readonly paths: readonly ["/webmasters/v3/"];
|
|
2896
|
-
readonly posts: readonly [RegExp];
|
|
2897
|
-
}, {
|
|
2898
|
-
readonly host: "searchconsole.googleapis.com";
|
|
2899
|
-
readonly paths: readonly ["/webmasters/v3/"];
|
|
2900
|
-
readonly posts: readonly [RegExp, RegExp];
|
|
2901
|
-
}];
|
|
2902
|
-
};
|
|
2903
|
-
readonly "analytics.read": {
|
|
2904
|
-
readonly label: "Google Analytics (read-only)";
|
|
2905
|
-
readonly access: "read";
|
|
2906
|
-
readonly scopes: readonly ["https://www.googleapis.com/auth/analytics.readonly"];
|
|
2907
|
-
readonly routes: readonly [{
|
|
2908
|
-
readonly host: "analyticsdata.googleapis.com";
|
|
2909
|
-
readonly paths: readonly ["/v1beta/properties/"];
|
|
2910
|
-
readonly posts: readonly [RegExp];
|
|
2911
|
-
}, {
|
|
2912
|
-
readonly host: "analyticsadmin.googleapis.com";
|
|
2913
|
-
readonly paths: readonly ["/v1beta/accountSummaries", "/v1beta/accounts", "/v1beta/accounts/", "/v1beta/properties", "/v1beta/properties/", "/v1alpha/properties/"];
|
|
2914
|
-
}];
|
|
2915
|
-
};
|
|
2916
|
-
};
|
|
2917
|
-
};
|
|
2918
|
-
readonly api: readonly ["gmail.googleapis.com", "www.googleapis.com", "searchconsole.googleapis.com", "analyticsdata.googleapis.com", "analyticsadmin.googleapis.com", "openidconnect.googleapis.com"];
|
|
2919
|
-
readonly flow: {
|
|
2920
|
-
readonly tokenUrl: "https://oauth2.googleapis.com/token";
|
|
2921
|
-
readonly pkce: true;
|
|
2922
|
-
readonly scopeDialect: "google";
|
|
2923
|
-
readonly authorizeParams: {
|
|
2924
|
-
readonly access_type: "offline";
|
|
2925
|
-
readonly prompt: "consent";
|
|
2926
|
-
};
|
|
2927
|
-
readonly identity: {
|
|
2928
|
-
readonly url: "https://openidconnect.googleapis.com/v1/userinfo";
|
|
2929
|
-
readonly label: "email";
|
|
2930
|
-
readonly id: "sub";
|
|
2931
|
-
};
|
|
2628
|
+
readonly "google-workspace": OAuthClientCapability & {
|
|
2629
|
+
secrets: {
|
|
2630
|
+
clientId: "GOOGLE_WORKSPACE_CLIENT_ID";
|
|
2631
|
+
clientSecret: "GOOGLE_WORKSPACE_CLIENT_SECRET";
|
|
2932
2632
|
};
|
|
2933
2633
|
};
|
|
2934
|
-
readonly "microsoft-365": {
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
readonly clientId: "MICROSOFT_365_CLIENT_ID";
|
|
2939
|
-
readonly clientSecret: "MICROSOFT_365_CLIENT_SECRET";
|
|
2940
|
-
};
|
|
2941
|
-
readonly token: readonly [{
|
|
2942
|
-
readonly host: "login.microsoftonline.com";
|
|
2943
|
-
readonly path: "/common/oauth2/v2.0/token";
|
|
2944
|
-
readonly methods: readonly ["POST"];
|
|
2945
|
-
readonly inject: "form";
|
|
2946
|
-
}];
|
|
2947
|
-
readonly access: readonly ["write"];
|
|
2948
|
-
readonly console: "https://entra.microsoft.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade";
|
|
2949
|
-
readonly setup: "setup/microsoft-365.md";
|
|
2950
|
-
readonly authorize: {
|
|
2951
|
-
readonly url: "https://login.microsoftonline.com/common/oauth2/v2.0/authorize";
|
|
2952
|
-
readonly scopes: readonly ["offline_access", "User.Read", "Mail.Read", "Calendars.Read"];
|
|
2953
|
-
};
|
|
2954
|
-
readonly scopePolicy: {
|
|
2955
|
-
readonly dialect: "microsoft";
|
|
2956
|
-
readonly grantTypes: readonly ["authorization_code", "refresh_token"];
|
|
2957
|
-
readonly requestScope: "replace";
|
|
2958
|
-
readonly alwaysRequested: readonly ["offline_access"];
|
|
2959
|
-
readonly tolerated: readonly ["openid", "profile", "email", "offline_access", "User.Read"];
|
|
2960
|
-
readonly deniedSegments: readonly ["$batch", "beta"];
|
|
2961
|
-
readonly sets: {
|
|
2962
|
-
readonly identity: {
|
|
2963
|
-
readonly label: "Microsoft account (who you are)";
|
|
2964
|
-
readonly access: "read";
|
|
2965
|
-
readonly scopes: readonly ["User.Read"];
|
|
2966
|
-
readonly routes: readonly [{
|
|
2967
|
-
readonly host: "graph.microsoft.com";
|
|
2968
|
-
readonly paths: readonly ["/v1.0/me", "/oidc/userinfo"];
|
|
2969
|
-
}];
|
|
2970
|
-
};
|
|
2971
|
-
readonly "mail.read": {
|
|
2972
|
-
readonly label: "Outlook mail (read-only)";
|
|
2973
|
-
readonly access: "read";
|
|
2974
|
-
readonly scopes: readonly ["Mail.Read"];
|
|
2975
|
-
readonly routes: readonly [{
|
|
2976
|
-
readonly host: "graph.microsoft.com";
|
|
2977
|
-
readonly paths: readonly ["/v1.0/me/messages", "/v1.0/me/messages/", "/v1.0/me/mailFolders", "/v1.0/me/mailFolders/"];
|
|
2978
|
-
}];
|
|
2979
|
-
};
|
|
2980
|
-
readonly "calendar.read": {
|
|
2981
|
-
readonly label: "Outlook calendar (read-only)";
|
|
2982
|
-
readonly access: "read";
|
|
2983
|
-
readonly scopes: readonly ["Calendars.Read"];
|
|
2984
|
-
readonly routes: readonly [{
|
|
2985
|
-
readonly host: "graph.microsoft.com";
|
|
2986
|
-
readonly paths: readonly ["/v1.0/me/calendar", "/v1.0/me/calendar/", "/v1.0/me/calendars", "/v1.0/me/calendars/", "/v1.0/me/events", "/v1.0/me/events/", "/v1.0/me/calendarView", "/v1.0/me/calendarView/"];
|
|
2987
|
-
readonly posts: readonly [RegExp];
|
|
2988
|
-
}];
|
|
2989
|
-
};
|
|
2990
|
-
};
|
|
2991
|
-
};
|
|
2992
|
-
readonly api: readonly ["graph.microsoft.com"];
|
|
2993
|
-
readonly flow: {
|
|
2994
|
-
readonly tokenUrl: "https://login.microsoftonline.com/common/oauth2/v2.0/token";
|
|
2995
|
-
readonly pkce: true;
|
|
2996
|
-
readonly scopeDialect: "microsoft";
|
|
2997
|
-
readonly identity: {
|
|
2998
|
-
readonly url: "https://graph.microsoft.com/v1.0/me";
|
|
2999
|
-
readonly label: "userPrincipalName";
|
|
3000
|
-
readonly id: "id";
|
|
3001
|
-
};
|
|
2634
|
+
readonly "microsoft-365": OAuthClientCapability & {
|
|
2635
|
+
secrets: {
|
|
2636
|
+
clientId: "MICROSOFT_365_CLIENT_ID";
|
|
2637
|
+
clientSecret: "MICROSOFT_365_CLIENT_SECRET";
|
|
3002
2638
|
};
|
|
3003
2639
|
};
|
|
3004
2640
|
};
|
|
@@ -3012,18 +2648,8 @@ export type ApiKeyCapabilityId = CapabilityIdOf<"api_key">;
|
|
|
3012
2648
|
export type AiProviderId = CapabilityIdOf<"ai">;
|
|
3013
2649
|
/** Capabilities the gateway performs itself, each with its SDK helper. */
|
|
3014
2650
|
export type ServiceCapabilityId = CapabilityIdOf<"service">;
|
|
3015
|
-
/** OAuth
|
|
2651
|
+
/** The built-in OAuth providers whose APIs apps reach with `integrationFetch()`. */
|
|
3016
2652
|
export type OAuthClientCapabilityId = CapabilityIdOf<"oauth_client">;
|
|
3017
|
-
/**
|
|
3018
|
-
* The scope set names an OAuth client offers; `never` for a client without
|
|
3019
|
-
* a scope policy. Distributes over a union of ids, so a generic over two
|
|
3020
|
-
* clients gets every name either offers rather than the names they share.
|
|
3021
|
-
*/
|
|
3022
|
-
export type OAuthScopeSetName<Id extends OAuthClientCapabilityId> = Id extends unknown ? (typeof CAPABILITIES)[Id] extends {
|
|
3023
|
-
scopePolicy: {
|
|
3024
|
-
sets: infer S;
|
|
3025
|
-
};
|
|
3026
|
-
} ? keyof S & string : never : never;
|
|
3027
2653
|
/** The Gateway settings an `auth` block names: the key, and a Basic username held as a setting. */
|
|
3028
2654
|
type AuthSettingsOf<A> = (A extends {
|
|
3029
2655
|
secret: infer S extends string;
|
|
@@ -3037,7 +2663,7 @@ type SettingsOf<C> = C extends {
|
|
|
3037
2663
|
optionalSettings: readonly (infer O extends string)[];
|
|
3038
2664
|
} ? S | O : C extends {
|
|
3039
2665
|
secrets: infer S;
|
|
3040
|
-
|
|
2666
|
+
flow: unknown;
|
|
3041
2667
|
} ? S[keyof S] & string : C extends {
|
|
3042
2668
|
auth: infer A;
|
|
3043
2669
|
} ? AuthSettingsOf<A> | (C extends {
|
|
@@ -3119,13 +2745,12 @@ export type IntegrationProxyRoute =
|
|
|
3119
2745
|
capability: ApiKeyCapability;
|
|
3120
2746
|
upstream: URL;
|
|
3121
2747
|
}
|
|
3122
|
-
/** A call to one of an OAuth
|
|
2748
|
+
/** A call to one of an OAuth provider's API hosts, which goes with the person's held token. */
|
|
3123
2749
|
| {
|
|
3124
2750
|
kind: "oauth_client";
|
|
3125
2751
|
id: string;
|
|
3126
2752
|
capability: OAuthClientCapability;
|
|
3127
2753
|
upstream: URL;
|
|
3128
|
-
endpoint: OAuthTokenEndpoint;
|
|
3129
2754
|
}
|
|
3130
2755
|
/** A call to one of the routes a service capability declares. */
|
|
3131
2756
|
| {
|
|
@@ -3139,20 +2764,12 @@ export type CapabilitySettings = Readonly<Record<string, unknown>>;
|
|
|
3139
2764
|
/**
|
|
3140
2765
|
* The capability call an AppGateway path names, or null when the path names
|
|
3141
2766
|
* an unknown capability (or an AI provider, which has its own route), a
|
|
3142
|
-
* host outside the provider's, a path that could leave that host, a
|
|
3143
|
-
*
|
|
3144
|
-
* capability doesn't declare. `settings` resolves an API-key provider's
|
|
2767
|
+
* host outside the provider's, a path that could leave that host, or a
|
|
2768
|
+
* route a service capability doesn't declare. `settings` resolves an API-key provider's
|
|
3145
2769
|
* `hostSetting` (a Shopify store's host); `lookup` is where the id is found,
|
|
3146
2770
|
* the catalog alone by default.
|
|
3147
2771
|
*/
|
|
3148
2772
|
export declare function parseIntegrationProxyPath(pathname: string, search: string, settings?: CapabilitySettings, lookup?: CapabilityLookup): IntegrationProxyRoute | null;
|
|
3149
|
-
/**
|
|
3150
|
-
* The token endpoint `upstream` is, by its exact host and path, or null.
|
|
3151
|
-
* Its method is the caller's to check.
|
|
3152
|
-
*/
|
|
3153
|
-
export declare function tokenEndpointFor(capability: OAuthClientCapability, upstream: URL): OAuthTokenEndpoint | null;
|
|
3154
|
-
/** An OAuth client's token endpoints, as `POST https://host/path` lines for messages. */
|
|
3155
|
-
export declare function describeTokenEndpoints(capability: OAuthClientCapability): string;
|
|
3156
2773
|
/**
|
|
3157
2774
|
* The command that gives the gateway `capability`'s client:
|
|
3158
2775
|
* `pnpm everyapp secret set <ID> <SECRET>`.
|