@every-app/sdk 0.3.0-rc.5 → 0.3.0-rc.7

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.
Files changed (76) hide show
  1. package/dist/cloudflare/catalogSettings.generated.d.ts +1 -16
  2. package/dist/cloudflare/catalogSettings.generated.d.ts.map +1 -1
  3. package/dist/cloudflare/catalogSettings.generated.js +0 -49
  4. package/dist/cloudflare/worker.d.ts +14 -0
  5. package/dist/cloudflare/worker.d.ts.map +1 -1
  6. package/dist/cloudflare/worker.js +19 -6
  7. package/dist/index.d.ts +1 -1
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/internal/aiDefault.d.ts +70 -7
  10. package/dist/internal/aiDefault.d.ts.map +1 -1
  11. package/dist/internal/aiDefault.js +145 -15
  12. package/dist/internal/aiProviders.d.ts +3 -1
  13. package/dist/internal/aiProviders.d.ts.map +1 -1
  14. package/dist/internal/aiProviders.js +12 -3
  15. package/dist/internal/appSettings.d.ts +65 -5
  16. package/dist/internal/appSettings.d.ts.map +1 -1
  17. package/dist/internal/appSettings.js +141 -23
  18. package/dist/internal/capabilities.d.ts +52 -433
  19. package/dist/internal/capabilities.d.ts.map +1 -1
  20. package/dist/internal/capabilities.js +25 -558
  21. package/dist/internal/catalog/index.d.ts +6 -6
  22. package/dist/internal/catalog/inference.d.ts +6 -6
  23. package/dist/internal/catalog/inference.d.ts.map +1 -1
  24. package/dist/internal/catalog/inference.js +9 -6
  25. package/dist/internal/events.d.ts.map +1 -1
  26. package/dist/internal/events.js +1 -0
  27. package/dist/internal/gatewaySettings.d.ts +0 -6
  28. package/dist/internal/gatewaySettings.d.ts.map +1 -1
  29. package/dist/internal/gatewaySettings.js +1 -14
  30. package/dist/internal/identity.d.ts +12 -1
  31. package/dist/internal/identity.d.ts.map +1 -1
  32. package/dist/internal/identity.js +11 -1
  33. package/dist/internal/oauthClient.d.ts +10 -12
  34. package/dist/internal/oauthClient.d.ts.map +1 -1
  35. package/dist/internal/oauthClient.js +20 -81
  36. package/dist/internal/oauthPresets.d.ts +7 -3
  37. package/dist/internal/oauthPresets.d.ts.map +1 -1
  38. package/dist/internal/oauthPresets.js +533 -3
  39. package/dist/internal/oauthSpec.d.ts +44 -1
  40. package/dist/internal/oauthSpec.d.ts.map +1 -1
  41. package/dist/internal/oauthSpec.js +147 -34
  42. package/dist/internal/protocol.d.ts +14 -0
  43. package/dist/internal/protocol.d.ts.map +1 -1
  44. package/dist/internal/protocol.js +7 -0
  45. package/dist/internal/providerRegistry.d.ts +61 -1
  46. package/dist/internal/providerRegistry.d.ts.map +1 -1
  47. package/dist/internal/providerRegistry.js +127 -6
  48. package/dist/internal/providerSpec.d.ts +14 -7
  49. package/dist/internal/providerSpec.d.ts.map +1 -1
  50. package/dist/internal/providerSpec.js +306 -7
  51. package/dist/manifest.d.ts +25 -4
  52. package/dist/manifest.d.ts.map +1 -1
  53. package/dist/server/ai.d.ts +45 -0
  54. package/dist/server/ai.d.ts.map +1 -1
  55. package/dist/server/ai.js +77 -1
  56. package/dist/server/aiBinding.d.ts.map +1 -1
  57. package/dist/server/aiBinding.js +3 -3
  58. package/dist/server/authorizeUrl.d.ts +1 -1
  59. package/dist/server/authorizeUrl.d.ts.map +1 -1
  60. package/dist/server/authorizeUrl.js +2 -6
  61. package/dist/server/emailBinding.js +1 -1
  62. package/dist/server/emit.js +1 -1
  63. package/dist/server/gatewayFetch.d.ts.map +1 -1
  64. package/dist/server/gatewayFetch.js +20 -7
  65. package/dist/server/index.d.ts +3 -2
  66. package/dist/server/index.d.ts.map +1 -1
  67. package/dist/server/index.js +3 -2
  68. package/dist/server/integrationFetch.d.ts +4 -31
  69. package/dist/server/integrationFetch.d.ts.map +1 -1
  70. package/dist/server/integrationFetch.js +44 -42
  71. package/dist/server/listMembers.js +1 -1
  72. package/dist/server/refusal.d.ts +55 -0
  73. package/dist/server/refusal.d.ts.map +1 -0
  74. package/dist/server/refusal.js +193 -0
  75. package/dist/server/sendEmail.js +1 -1
  76. package/package.json +1 -1
@@ -16,11 +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`: a provider's OAuth client (a social network's), held
20
- * the same way. The gateway completes the token endpoint calls only,
21
- * putting the client on them; the app builds the authorize URL from the
22
- * public client id (`integrationStatus()`), keeps the user tokens and
23
- * calls the provider's API with them itself. A client shared by apps
19
+ * - `oauth_client`: a provider's OAuth client (Google's, Microsoft's,
20
+ * Slack's), held the same way. The gateway completes the token endpoint
21
+ * calls only, putting the client on them; the app builds the authorize
22
+ * URL from the public client id (`integrationStatus()`), sends people
23
+ * back to a callback its manifest entry lists (`redirectPaths`), keeps
24
+ * the user tokens and calls the provider's API with them itself. Other
25
+ * providers' clients (GitHub, the social networks) are presets
26
+ * (./oauthPresets.ts): rows only once an operator adds one. A client shared by apps
24
27
  * with different needs carries a `scopePolicy`: named scope sets an app
25
28
  * lists in its manifest entry's `scopes`, which ./oauthScopes.ts turns
26
29
  * into what the app may ask the provider for and what a token it is
@@ -272,13 +275,26 @@ export interface AiProviderCapability extends ProviderDetails {
272
275
  * `providers`, never the default, reached through the entries it fronts.
273
276
  */
274
277
  kind?: "proxy";
278
+ /**
279
+ * The models the provider serves, when the entry says (a registered
280
+ * `ai` row's `models`): the proxy refuses an inference call naming
281
+ * another (`model_not_allowed`), and `provider show` lists them. Absent
282
+ * on the catalog's entries, whose model lists change weekly.
283
+ */
284
+ models?: readonly string[];
275
285
  }
276
286
  /** A route of an AI provider the default route maps onto, with the model used when the app names none. */
277
287
  export interface AiRoute {
278
288
  /** One of the entry's `inferenceRoutes`: `/api/v1/chat/completions`. */
279
289
  path: string;
280
- /** The model the Gateway fills in: a cheap, capable one of the provider's. */
281
- model: string;
290
+ /**
291
+ * The seed: the model the Gateway fills in when its operator set none
292
+ * for this provider (`everyapp ai model`, `org_settings.ai_models`), a
293
+ * cheap, capable one of the provider's. Data, never the only answer:
294
+ * read it through `resolveAiDefault` (./aiDefault.ts), which puts the
295
+ * operator's setting first.
296
+ */
297
+ seedModel: string;
282
298
  }
283
299
  /** What `access: "write"` adds to a provider's read methods when its entry doesn't say. */
284
300
  export declare const DEFAULT_WRITE_METHODS: readonly string[];
@@ -302,27 +318,19 @@ export interface GatewayServiceCapability {
302
318
  setup?: string;
303
319
  }
304
320
  /** Where the gateway puts an OAuth client on a token request. */
305
- export type OAuthClientInjection = "form" | "basic" | "query" | "json";
321
+ export type OAuthClientInjection = "form" | "basic";
306
322
  /** A token endpoint an `oauth_client` capability completes, with its rule. */
307
323
  export interface OAuthTokenEndpoint {
308
- /**
309
- * The endpoint's host, always over https. Absent: the host the
310
- * capability's `hostSetting` names (an instance the operator chose).
311
- */
312
- host?: string;
313
- /** The exact pathname, or a RegExp for versioned ones (Meta's `/v25.0/oauth/access_token`). */
314
- path: string | RegExp;
324
+ /** The endpoint's host, always over https. */
325
+ host: string;
326
+ /** The exact pathname. */
327
+ path: string;
315
328
  methods: readonly ("GET" | "POST")[];
316
329
  /**
317
- * Where the client goes: the form body, HTTP Basic, the query string, or
318
- * the JSON body (injectClientCredentials() in ./oauthClient.ts).
330
+ * Where the client goes: the form body or HTTP Basic
331
+ * (injectClientCredentials() in ./oauthClient.ts).
319
332
  */
320
333
  inject: OAuthClientInjection;
321
- /** The fields' names when not `client_id` / `client_secret` (TikTok's `client_key`). */
322
- params?: {
323
- clientId?: string;
324
- clientSecret?: string;
325
- };
326
334
  }
327
335
  /**
328
336
  * One host's allowlist a scope set unlocks. Matched against the raw
@@ -458,14 +466,6 @@ export interface OAuthClientCapability {
458
466
  };
459
467
  /** The only calls the gateway completes; anything else is refused. */
460
468
  token: readonly OAuthTokenEndpoint[];
461
- /**
462
- * A gateway setting naming the provider's origin, for a provider with no
463
- * fixed one (Mastodon's instance): the host of `token` entries without
464
- * their own, and of the authorize URL.
465
- */
466
- hostSetting?: string;
467
- /** The origin when `hostSetting` is unset. */
468
- defaultOrigin?: string;
469
469
  /**
470
470
  * Obtaining and refreshing user tokens with the operator's client
471
471
  * writes, so a catalog client is `["write"]`. A registered OAuth
@@ -478,9 +478,8 @@ export interface OAuthClientCapability {
478
478
  /** The everyapp skill's setup guide for the client, when one exists. */
479
479
  setup?: string;
480
480
  /**
481
- * The authorize endpoint the app sends people to (a path on the
482
- * `hostSetting` origin when the provider has none fixed) and the scopes
483
- * the client must be allowed: the operator's checklist and the docs. With
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
484
483
  * a `scopePolicy`, the union of its sets' scopes and `alwaysRequested`.
485
484
  */
486
485
  authorize: {
@@ -490,7 +489,7 @@ export interface OAuthClientCapability {
490
489
  /**
491
490
  * Named scope sets an app lists in its manifest entry's `scopes`, for a
492
491
  * client several apps share with different needs. Absent: the whole
493
- * client is the grant, as for Postiz's social networks.
492
+ * client is the grant.
494
493
  */
495
494
  scopePolicy?: OAuthScopePolicy;
496
495
  /**
@@ -515,12 +514,6 @@ export interface OAuthClientCapability {
515
514
  */
516
515
  readMethods?: readonly string[];
517
516
  writeMethods?: readonly string[];
518
- /**
519
- * The redirect paths the operator registers, on the app's host
520
- * (`https://<app>.<APP_BASE_DOMAIN><path>`): Postiz's callback pages, the
521
- * first app to use these clients.
522
- */
523
- redirectPaths: readonly string[];
524
517
  }
525
518
  export type Capability = ApiKeyCapability | AiProviderCapability | OAuthClientCapability | GatewayServiceCapability;
526
519
  export declare const CAPABILITIES: {
@@ -937,7 +930,7 @@ export declare const CAPABILITIES: {
937
930
  readonly shape: "anthropic";
938
931
  readonly chat: {
939
932
  readonly path: "/v1/chat/completions";
940
- readonly model: "claude-haiku-5-5";
933
+ readonly seedModel: "claude-haiku-5-5";
941
934
  };
942
935
  readonly aig: {
943
936
  readonly slug: "anthropic";
@@ -978,11 +971,11 @@ export declare const CAPABILITIES: {
978
971
  readonly inferenceRoutes: readonly ["/v1beta/openai/chat/completions", "/v1beta/openai/embeddings", "/v1beta/openai/images/generations"];
979
972
  readonly chat: {
980
973
  readonly path: "/v1beta/openai/chat/completions";
981
- readonly model: "gemini-3.1-flash-lite";
974
+ readonly seedModel: "gemini-3.1-flash-lite";
982
975
  };
983
976
  readonly embeddings: {
984
977
  readonly path: "/v1beta/openai/embeddings";
985
- readonly model: "gemini-embedding-001";
978
+ readonly seedModel: "gemini-embedding-001";
986
979
  };
987
980
  readonly hint: "An API key from Google AI Studio; the Gateway sends it as a bearer token. Apps call Gemini's OpenAI-shaped paths under /v1beta/openai.";
988
981
  readonly secrets: readonly [{
@@ -1019,11 +1012,11 @@ export declare const CAPABILITIES: {
1019
1012
  readonly inferenceRoutes: readonly ["/v1/chat/completions", "/v1/fim/completions", "/v1/embeddings", "/v1/moderations", "/v1/chat/moderations", "/v1/classifications", "/v1/chat/classifications", "/v1/ocr", "/v1/audio/transcriptions", "/v1/audio/speech"];
1020
1013
  readonly chat: {
1021
1014
  readonly path: "/v1/chat/completions";
1022
- readonly model: "mistral-small-latest";
1015
+ readonly seedModel: "mistral-small-latest";
1023
1016
  };
1024
1017
  readonly embeddings: {
1025
1018
  readonly path: "/v1/embeddings";
1026
- readonly model: "mistral-embed";
1019
+ readonly seedModel: "mistral-embed";
1027
1020
  };
1028
1021
  readonly aig: {
1029
1022
  readonly slug: "mistral";
@@ -1060,7 +1053,7 @@ export declare const CAPABILITIES: {
1060
1053
  readonly inferenceRoutes: readonly ["/openai/v1/chat/completions", "/openai/v1/responses", "/openai/v1/audio/transcriptions", "/openai/v1/audio/translations", "/openai/v1/audio/speech"];
1061
1054
  readonly chat: {
1062
1055
  readonly path: "/openai/v1/chat/completions";
1063
- readonly model: "openai/gpt-oss-20b";
1056
+ readonly seedModel: "openai/gpt-oss-20b";
1064
1057
  };
1065
1058
  readonly aig: {
1066
1059
  readonly slug: "groq";
@@ -2474,11 +2467,11 @@ export declare const CAPABILITIES: {
2474
2467
  readonly extraRoutes: true;
2475
2468
  readonly chat: {
2476
2469
  readonly path: "/v1/chat/completions";
2477
- readonly model: "gpt-6-luna";
2470
+ readonly seedModel: "gpt-6-luna";
2478
2471
  };
2479
2472
  readonly embeddings: {
2480
2473
  readonly path: "/v1/embeddings";
2481
- readonly model: "text-embedding-3-small";
2474
+ readonly seedModel: "text-embedding-3-small";
2482
2475
  };
2483
2476
  readonly aig: {
2484
2477
  readonly slug: "openai";
@@ -2505,11 +2498,11 @@ export declare const CAPABILITIES: {
2505
2498
  readonly inferenceRoutes: readonly ["/api/v1/chat/completions", "/api/v1/completions", "/api/v1/responses", "/api/v1/embeddings"];
2506
2499
  readonly chat: {
2507
2500
  readonly path: "/api/v1/chat/completions";
2508
- readonly model: "anthropic/claude-haiku-5.5";
2501
+ readonly seedModel: "anthropic/claude-haiku-5.5";
2509
2502
  };
2510
2503
  readonly embeddings: {
2511
2504
  readonly path: "/api/v1/embeddings";
2512
- readonly model: "openai/text-embedding-3-small";
2505
+ readonly seedModel: "openai/text-embedding-3-small";
2513
2506
  };
2514
2507
  readonly aig: {
2515
2508
  readonly slug: "openrouter";
@@ -2544,11 +2537,11 @@ export declare const CAPABILITIES: {
2544
2537
  readonly normalize: "workers-ai";
2545
2538
  readonly chat: {
2546
2539
  readonly path: "/v1/chat/completions";
2547
- readonly model: "@cf/meta/llama-4-scout-17b-16e-instruct";
2540
+ readonly seedModel: "@cf/meta/llama-4-scout-17b-16e-instruct";
2548
2541
  };
2549
2542
  readonly embeddings: {
2550
2543
  readonly path: "/v1/embeddings";
2551
- readonly model: "@cf/baai/bge-m3";
2544
+ readonly seedModel: "@cf/baai/bge-m3";
2552
2545
  };
2553
2546
  readonly aig: {
2554
2547
  readonly slug: "workers-ai";
@@ -2672,256 +2665,6 @@ export declare const CAPABILITIES: {
2672
2665
  readonly settings: readonly [];
2673
2666
  readonly optionalSettings: readonly [];
2674
2667
  };
2675
- readonly linkedin: {
2676
- readonly mode: "oauth_client";
2677
- readonly label: "LinkedIn";
2678
- readonly secrets: {
2679
- readonly clientId: "LINKEDIN_CLIENT_ID";
2680
- readonly clientSecret: "LINKEDIN_CLIENT_SECRET";
2681
- };
2682
- readonly token: readonly [{
2683
- readonly host: "www.linkedin.com";
2684
- readonly path: "/oauth/v2/accessToken";
2685
- readonly methods: readonly ["POST"];
2686
- readonly inject: "form";
2687
- }];
2688
- readonly access: readonly ["write"];
2689
- readonly console: "https://www.linkedin.com/developers/apps";
2690
- readonly authorize: {
2691
- readonly url: "https://www.linkedin.com/oauth/v2/authorization";
2692
- readonly scopes: readonly ["openid", "profile", "w_member_social", "r_basicprofile", "rw_organization_admin", "w_organization_social", "r_organization_social"];
2693
- };
2694
- readonly api: readonly ["api.linkedin.com"];
2695
- readonly redirectPaths: readonly ["/integrations/social/linkedin", "/integrations/social/linkedin-page"];
2696
- };
2697
- readonly facebook: {
2698
- readonly mode: "oauth_client";
2699
- readonly label: "Facebook";
2700
- readonly secrets: {
2701
- readonly clientId: "FACEBOOK_APP_ID";
2702
- readonly clientSecret: "FACEBOOK_APP_SECRET";
2703
- };
2704
- readonly token: readonly [{
2705
- readonly host: "graph.facebook.com";
2706
- readonly path: RegExp;
2707
- readonly methods: readonly ["GET", "POST"];
2708
- readonly inject: "query";
2709
- }];
2710
- readonly access: readonly ["write"];
2711
- readonly console: "https://developers.facebook.com/apps";
2712
- readonly authorize: {
2713
- readonly url: "https://www.facebook.com/v25.0/dialog/oauth";
2714
- readonly scopes: readonly ["pages_show_list", "business_management", "pages_manage_posts", "pages_manage_engagement", "pages_read_engagement", "read_insights", "instagram_basic", "instagram_content_publish", "instagram_manage_comments", "instagram_manage_insights"];
2715
- };
2716
- readonly api: readonly ["graph.facebook.com", "graph.instagram.com"];
2717
- readonly redirectPaths: readonly ["/integrations/social/facebook", "/integrations/social/instagram"];
2718
- };
2719
- readonly instagram: {
2720
- readonly mode: "oauth_client";
2721
- readonly label: "Instagram";
2722
- readonly secrets: {
2723
- readonly clientId: "INSTAGRAM_APP_ID";
2724
- readonly clientSecret: "INSTAGRAM_APP_SECRET";
2725
- };
2726
- readonly token: readonly [{
2727
- readonly host: "api.instagram.com";
2728
- readonly path: "/oauth/access_token";
2729
- readonly methods: readonly ["POST"];
2730
- readonly inject: "form";
2731
- }, {
2732
- readonly host: "graph.instagram.com";
2733
- readonly path: "/access_token";
2734
- readonly methods: readonly ["GET"];
2735
- readonly inject: "query";
2736
- }];
2737
- readonly access: readonly ["write"];
2738
- readonly console: "https://developers.facebook.com/apps";
2739
- readonly authorize: {
2740
- readonly url: "https://www.instagram.com/oauth/authorize";
2741
- readonly scopes: readonly ["instagram_business_basic", "instagram_business_content_publish", "instagram_business_manage_comments", "instagram_business_manage_insights"];
2742
- };
2743
- readonly api: readonly ["graph.instagram.com"];
2744
- readonly redirectPaths: readonly ["/integrations/social/instagram-standalone"];
2745
- };
2746
- readonly threads: {
2747
- readonly mode: "oauth_client";
2748
- readonly label: "Threads";
2749
- readonly secrets: {
2750
- readonly clientId: "THREADS_APP_ID";
2751
- readonly clientSecret: "THREADS_APP_SECRET";
2752
- };
2753
- readonly token: readonly [{
2754
- readonly host: "graph.threads.net";
2755
- readonly path: "/oauth/access_token";
2756
- readonly methods: readonly ["GET", "POST"];
2757
- readonly inject: "query";
2758
- }, {
2759
- readonly host: "graph.threads.net";
2760
- readonly path: "/access_token";
2761
- readonly methods: readonly ["GET"];
2762
- readonly inject: "query";
2763
- }];
2764
- readonly access: readonly ["write"];
2765
- readonly console: "https://developers.facebook.com/apps";
2766
- readonly authorize: {
2767
- readonly url: "https://threads.net/oauth/authorize";
2768
- readonly scopes: readonly ["threads_basic", "threads_content_publish", "threads_manage_replies", "threads_manage_insights"];
2769
- };
2770
- readonly api: readonly ["graph.threads.net"];
2771
- readonly redirectPaths: readonly ["/integrations/social/threads"];
2772
- };
2773
- readonly youtube: {
2774
- readonly mode: "oauth_client";
2775
- readonly label: "YouTube";
2776
- readonly secrets: {
2777
- readonly clientId: "YOUTUBE_CLIENT_ID";
2778
- readonly clientSecret: "YOUTUBE_CLIENT_SECRET";
2779
- };
2780
- readonly token: readonly [{
2781
- readonly host: "oauth2.googleapis.com";
2782
- readonly path: "/token";
2783
- readonly methods: readonly ["POST"];
2784
- readonly inject: "form";
2785
- }];
2786
- readonly access: readonly ["write"];
2787
- readonly console: "https://console.cloud.google.com/apis/credentials";
2788
- readonly setup: "setup/google.md";
2789
- readonly authorize: {
2790
- readonly url: "https://accounts.google.com/o/oauth2/v2/auth";
2791
- readonly scopes: readonly ["https://www.googleapis.com/auth/userinfo.profile", "https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/youtube", "https://www.googleapis.com/auth/youtube.force-ssl", "https://www.googleapis.com/auth/youtube.readonly", "https://www.googleapis.com/auth/youtube.upload", "https://www.googleapis.com/auth/youtubepartner", "https://www.googleapis.com/auth/yt-analytics.readonly", "https://www.googleapis.com/auth/business.manage"];
2792
- };
2793
- readonly api: readonly ["www.googleapis.com", "youtubeanalytics.googleapis.com", "mybusinessaccountmanagement.googleapis.com", "mybusinessbusinessinformation.googleapis.com", "mybusiness.googleapis.com", "businessprofileperformance.googleapis.com"];
2794
- readonly redirectPaths: readonly ["/integrations/social/youtube", "/integrations/social/gmb"];
2795
- };
2796
- readonly tiktok: {
2797
- readonly mode: "oauth_client";
2798
- readonly label: "TikTok";
2799
- readonly secrets: {
2800
- readonly clientId: "TIKTOK_CLIENT_ID";
2801
- readonly clientSecret: "TIKTOK_CLIENT_SECRET";
2802
- };
2803
- readonly token: readonly [{
2804
- readonly host: "open.tiktokapis.com";
2805
- readonly path: "/v2/oauth/token/";
2806
- readonly methods: readonly ["POST"];
2807
- readonly inject: "form";
2808
- readonly params: {
2809
- readonly clientId: "client_key";
2810
- };
2811
- }];
2812
- readonly access: readonly ["write"];
2813
- readonly console: "https://developers.tiktok.com/apps";
2814
- readonly authorize: {
2815
- readonly url: "https://www.tiktok.com/v2/auth/authorize/";
2816
- readonly scopes: readonly ["video.list", "user.info.basic", "video.publish", "video.upload", "user.info.profile", "user.info.stats"];
2817
- };
2818
- readonly api: readonly ["open.tiktokapis.com"];
2819
- readonly redirectPaths: readonly ["/integrations/social/tiktok"];
2820
- };
2821
- readonly "tiktok-business": {
2822
- readonly mode: "oauth_client";
2823
- readonly label: "TikTok Business";
2824
- readonly secrets: {
2825
- readonly clientId: "TIKTOK_BUSINESS_CLIENT_ID";
2826
- readonly clientSecret: "TIKTOK_BUSINESS_CLIENT_SECRET";
2827
- };
2828
- readonly token: readonly [{
2829
- readonly host: "business-api.tiktok.com";
2830
- readonly path: "/open_api/v1.3/tt_user/oauth2/token/";
2831
- readonly methods: readonly ["POST"];
2832
- readonly inject: "json";
2833
- }, {
2834
- readonly host: "business-api.tiktok.com";
2835
- readonly path: "/open_api/v1.3/tt_user/oauth2/refresh_token/";
2836
- readonly methods: readonly ["POST"];
2837
- readonly inject: "json";
2838
- }];
2839
- readonly access: readonly ["write"];
2840
- readonly console: "https://business-api.tiktok.com/portal/apps";
2841
- readonly authorize: {
2842
- readonly url: "https://www.tiktok.com/v2/auth/authorize/";
2843
- readonly scopes: readonly ["user.info.basic", "user.info.username", "user.info.stats", "video.list", "video.upload", "video.publish"];
2844
- };
2845
- readonly api: readonly ["business-api.tiktok.com"];
2846
- readonly redirectPaths: readonly ["/integrations/social/tiktok-business/"];
2847
- };
2848
- readonly reddit: {
2849
- readonly mode: "oauth_client";
2850
- readonly label: "Reddit";
2851
- readonly secrets: {
2852
- readonly clientId: "REDDIT_CLIENT_ID";
2853
- readonly clientSecret: "REDDIT_CLIENT_SECRET";
2854
- };
2855
- readonly token: readonly [{
2856
- readonly host: "www.reddit.com";
2857
- readonly path: "/api/v1/access_token";
2858
- readonly methods: readonly ["POST"];
2859
- readonly inject: "basic";
2860
- }];
2861
- readonly access: readonly ["write"];
2862
- readonly console: "https://www.reddit.com/prefs/apps";
2863
- readonly authorize: {
2864
- readonly url: "https://www.reddit.com/api/v1/authorize";
2865
- readonly scopes: readonly ["read", "identity", "submit", "flair"];
2866
- };
2867
- readonly api: readonly ["oauth.reddit.com"];
2868
- readonly redirectPaths: readonly ["/integrations/social/reddit"];
2869
- };
2870
- readonly pinterest: {
2871
- readonly mode: "oauth_client";
2872
- readonly label: "Pinterest";
2873
- readonly secrets: {
2874
- readonly clientId: "PINTEREST_CLIENT_ID";
2875
- readonly clientSecret: "PINTEREST_CLIENT_SECRET";
2876
- };
2877
- readonly token: readonly [{
2878
- readonly host: "api.pinterest.com";
2879
- readonly path: "/v5/oauth/token";
2880
- readonly methods: readonly ["POST"];
2881
- readonly inject: "basic";
2882
- }];
2883
- readonly access: readonly ["write"];
2884
- readonly console: "https://developers.pinterest.com/apps/";
2885
- readonly authorize: {
2886
- readonly url: "https://www.pinterest.com/oauth/";
2887
- readonly scopes: readonly ["boards:read", "boards:write", "pins:read", "pins:write", "user_accounts:read"];
2888
- };
2889
- readonly api: readonly ["api.pinterest.com"];
2890
- readonly redirectPaths: readonly ["/integrations/social/pinterest"];
2891
- };
2892
- readonly discord: {
2893
- readonly mode: "oauth_client";
2894
- readonly label: "Discord";
2895
- readonly secrets: {
2896
- readonly clientId: "DISCORD_CLIENT_ID";
2897
- readonly clientSecret: "DISCORD_CLIENT_SECRET";
2898
- };
2899
- readonly token: readonly [{
2900
- readonly host: "discord.com";
2901
- readonly path: "/api/oauth2/token";
2902
- readonly methods: readonly ["POST"];
2903
- readonly inject: "basic";
2904
- }];
2905
- readonly access: readonly ["write"];
2906
- readonly console: "https://discord.com/developers/applications";
2907
- readonly authorize: {
2908
- readonly url: "https://discord.com/oauth2/authorize";
2909
- readonly scopes: readonly ["bot", "identify", "guilds"];
2910
- };
2911
- readonly api: readonly ["discord.com"];
2912
- readonly redirectPaths: readonly ["/integrations/social/discord"];
2913
- readonly flow: {
2914
- readonly tokenUrl: "https://discord.com/api/oauth2/token";
2915
- readonly revokeUrl: "https://discord.com/api/oauth2/token/revoke";
2916
- readonly pkce: true;
2917
- readonly scopeDialect: "space";
2918
- readonly identity: {
2919
- readonly url: "https://discord.com/api/users/@me";
2920
- readonly label: "username";
2921
- readonly id: "id";
2922
- };
2923
- };
2924
- };
2925
2668
  readonly slack: {
2926
2669
  readonly mode: "oauth_client";
2927
2670
  readonly label: "Slack";
@@ -3034,7 +2777,6 @@ export declare const CAPABILITIES: {
3034
2777
  };
3035
2778
  };
3036
2779
  readonly api: readonly ["slack.com"];
3037
- readonly redirectPaths: readonly ["/integrations/social/slack", "/integrations/slack/callback"];
3038
2780
  readonly flow: {
3039
2781
  readonly tokenUrl: "https://slack.com/api/oauth.v2.access";
3040
2782
  readonly revokeUrl: "https://slack.com/api/auth.revoke";
@@ -3047,117 +2789,6 @@ export declare const CAPABILITIES: {
3047
2789
  };
3048
2790
  };
3049
2791
  };
3050
- readonly mastodon: {
3051
- readonly mode: "oauth_client";
3052
- readonly label: "Mastodon";
3053
- readonly secrets: {
3054
- readonly clientId: "MASTODON_CLIENT_ID";
3055
- readonly clientSecret: "MASTODON_CLIENT_SECRET";
3056
- };
3057
- readonly token: readonly [{
3058
- readonly path: "/oauth/token";
3059
- readonly methods: readonly ["POST"];
3060
- readonly inject: "form";
3061
- }];
3062
- readonly hostSetting: "MASTODON_URL";
3063
- readonly defaultOrigin: "https://mastodon.social";
3064
- readonly access: readonly ["write"];
3065
- readonly console: "/settings/applications";
3066
- readonly authorize: {
3067
- readonly url: "/oauth/authorize";
3068
- readonly scopes: readonly ["write:statuses", "profile", "write:media"];
3069
- };
3070
- readonly api: readonly [];
3071
- readonly redirectPaths: readonly ["/integrations/social/mastodon"];
3072
- };
3073
- readonly kick: {
3074
- readonly mode: "oauth_client";
3075
- readonly label: "Kick";
3076
- readonly secrets: {
3077
- readonly clientId: "KICK_CLIENT_ID";
3078
- readonly clientSecret: "KICK_CLIENT_SECRET";
3079
- };
3080
- readonly token: readonly [{
3081
- readonly host: "id.kick.com";
3082
- readonly path: "/oauth/token";
3083
- readonly methods: readonly ["POST"];
3084
- readonly inject: "form";
3085
- }];
3086
- readonly access: readonly ["write"];
3087
- readonly console: "https://kick.com/settings/developer";
3088
- readonly authorize: {
3089
- readonly url: "https://id.kick.com/oauth/authorize";
3090
- readonly scopes: readonly ["chat:write", "user:read", "channel:read"];
3091
- };
3092
- readonly api: readonly ["api.kick.com"];
3093
- readonly redirectPaths: readonly ["/integrations/social/kick"];
3094
- };
3095
- readonly twitch: {
3096
- readonly mode: "oauth_client";
3097
- readonly label: "Twitch";
3098
- readonly secrets: {
3099
- readonly clientId: "TWITCH_CLIENT_ID";
3100
- readonly clientSecret: "TWITCH_CLIENT_SECRET";
3101
- };
3102
- readonly token: readonly [{
3103
- readonly host: "id.twitch.tv";
3104
- readonly path: "/oauth2/token";
3105
- readonly methods: readonly ["POST"];
3106
- readonly inject: "form";
3107
- }];
3108
- readonly access: readonly ["write"];
3109
- readonly console: "https://dev.twitch.tv/console/apps";
3110
- readonly authorize: {
3111
- readonly url: "https://id.twitch.tv/oauth2/authorize";
3112
- readonly scopes: readonly ["user:write:chat", "user:read:chat", "moderator:manage:announcements"];
3113
- };
3114
- readonly api: readonly ["api.twitch.tv"];
3115
- readonly redirectPaths: readonly ["/integrations/social/twitch"];
3116
- };
3117
- readonly tumblr: {
3118
- readonly mode: "oauth_client";
3119
- readonly label: "Tumblr";
3120
- readonly secrets: {
3121
- readonly clientId: "TUMBLR_CLIENT_ID";
3122
- readonly clientSecret: "TUMBLR_CLIENT_SECRET";
3123
- };
3124
- readonly token: readonly [{
3125
- readonly host: "api.tumblr.com";
3126
- readonly path: "/v2/oauth2/token";
3127
- readonly methods: readonly ["POST"];
3128
- readonly inject: "form";
3129
- }];
3130
- readonly access: readonly ["write"];
3131
- readonly console: "https://www.tumblr.com/oauth/apps";
3132
- readonly authorize: {
3133
- readonly url: "https://www.tumblr.com/oauth2/authorize";
3134
- readonly scopes: readonly ["write", "offline_access"];
3135
- };
3136
- readonly api: readonly ["api.tumblr.com"];
3137
- readonly redirectPaths: readonly ["/integrations/social/tumblr"];
3138
- };
3139
- readonly dribbble: {
3140
- readonly mode: "oauth_client";
3141
- readonly label: "Dribbble";
3142
- readonly secrets: {
3143
- readonly clientId: "DRIBBBLE_CLIENT_ID";
3144
- readonly clientSecret: "DRIBBBLE_CLIENT_SECRET";
3145
- };
3146
- readonly token: readonly [{
3147
- readonly host: "dribbble.com";
3148
- readonly path: "/oauth/token";
3149
- readonly methods: readonly ["POST"];
3150
- readonly inject: "query";
3151
- }];
3152
- readonly access: readonly ["write"];
3153
- readonly console: "https://dribbble.com/account/applications";
3154
- readonly authorize: {
3155
- readonly url: "https://dribbble.com/oauth/authorize";
3156
- readonly scopes: readonly ["public", "upload"];
3157
- };
3158
- readonly api: readonly ["api.dribbble.com"];
3159
- readonly redirectPaths: readonly ["/integrations/social/dribbble"];
3160
- };
3161
2792
  readonly "google-workspace": {
3162
2793
  readonly mode: "oauth_client";
3163
2794
  readonly label: "Google (Gmail, Calendar, Search Console and Analytics)";
@@ -3248,7 +2879,6 @@ export declare const CAPABILITIES: {
3248
2879
  };
3249
2880
  };
3250
2881
  readonly api: readonly ["gmail.googleapis.com", "www.googleapis.com", "searchconsole.googleapis.com", "analyticsdata.googleapis.com", "analyticsadmin.googleapis.com", "openidconnect.googleapis.com"];
3251
- readonly redirectPaths: readonly ["/integrations/google/callback"];
3252
2882
  readonly flow: {
3253
2883
  readonly tokenUrl: "https://oauth2.googleapis.com/token";
3254
2884
  readonly pkce: true;
@@ -3323,7 +2953,6 @@ export declare const CAPABILITIES: {
3323
2953
  };
3324
2954
  };
3325
2955
  readonly api: readonly ["graph.microsoft.com"];
3326
- readonly redirectPaths: readonly ["/integrations/microsoft/callback"];
3327
2956
  readonly flow: {
3328
2957
  readonly tokenUrl: "https://login.microsoftonline.com/common/oauth2/v2.0/token";
3329
2958
  readonly pkce: true;
@@ -3372,9 +3001,7 @@ type SettingsOf<C> = C extends {
3372
3001
  } ? S | O : C extends {
3373
3002
  secrets: infer S;
3374
3003
  token: unknown;
3375
- } ? (S[keyof S] & string) | (C extends {
3376
- hostSetting: infer H extends string;
3377
- } ? H : never) : C extends {
3004
+ } ? S[keyof S] & string : C extends {
3378
3005
  auth: infer A;
3379
3006
  } ? AuthSettingsOf<A> | (C extends {
3380
3007
  alsoNeeds: readonly (infer N extends string)[];
@@ -3477,29 +3104,21 @@ export type CapabilitySettings = Readonly<Record<string, unknown>>;
3477
3104
  * an unknown capability (or an AI provider, which has its own route), a
3478
3105
  * host outside the provider's, a path that could leave that host, a path
3479
3106
  * that isn't one of an OAuth client's token endpoints, or a route a service
3480
- * capability doesn't declare. `settings` resolves an OAuth client's
3481
- * `hostSetting` (Mastodon's instance); `lookup` is where the id is found,
3107
+ * capability doesn't declare. `settings` resolves an API-key provider's
3108
+ * `hostSetting` (a Shopify store's host); `lookup` is where the id is found,
3482
3109
  * the catalog alone by default.
3483
3110
  */
3484
3111
  export declare function parseIntegrationProxyPath(pathname: string, search: string, settings?: CapabilitySettings, lookup?: CapabilityLookup): IntegrationProxyRoute | null;
3485
3112
  /**
3486
- * The origin an OAuth client's `hostSetting` names (its default when the
3487
- * setting is unset), or null for a client with a fixed host or a setting
3488
- * that isn't an https origin. A bare host is taken as https.
3489
- */
3490
- export declare function oauthClientOrigin(capability: OAuthClientCapability, settings: CapabilitySettings | undefined): string | null;
3491
- /**
3492
- * The token endpoint `upstream` is, by its exact host and path (a RegExp
3493
- * for a versioned one), or null. Its method is the caller's to check.
3113
+ * The token endpoint `upstream` is, by its exact host and path, or null.
3114
+ * Its method is the caller's to check.
3494
3115
  */
3495
- export declare function tokenEndpointFor(capability: OAuthClientCapability, upstream: URL, settings: CapabilitySettings | undefined): OAuthTokenEndpoint | null;
3116
+ export declare function tokenEndpointFor(capability: OAuthClientCapability, upstream: URL): OAuthTokenEndpoint | null;
3496
3117
  /** An OAuth client's token endpoints, as `POST https://host/path` lines for messages. */
3497
3118
  export declare function describeTokenEndpoints(capability: OAuthClientCapability): string;
3498
- /** A token endpoint's path as people read it: a versioned one as `/v<version>/oauth/access_token`. */
3499
- export declare function tokenPathText(path: string | RegExp): string;
3500
3119
  /**
3501
3120
  * The command that gives the gateway `capability`'s client:
3502
- * `pnpm everyapp secret set <ID> <SECRET> [<HOST SETTING>]`.
3121
+ * `pnpm everyapp secret set <ID> <SECRET>`.
3503
3122
  */
3504
3123
  export declare function oauthClientSecretSetCommand(capability: OAuthClientCapability): string;
3505
3124
  /**