@oomol-lab/open-connector 1.7.0 → 1.8.0
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 +4 -0
- package/assets/open-connector/catalog/apps/airtable.json +134 -0
- package/assets/open-connector/catalog/apps/aisa.json +916 -76
- package/assets/open-connector/catalog/apps/cal.json +24 -6
- package/assets/open-connector/catalog/apps/discordbot.json +2 -2
- package/assets/open-connector/catalog/apps/enormail.json +411 -0
- package/assets/open-connector/catalog/apps/feishu_app_bot.json +158 -0
- package/assets/open-connector/catalog/apps/github.json +275 -0
- package/assets/open-connector/catalog/apps/gitlab.json +125 -0
- package/assets/open-connector/catalog/apps/gmail.json +151 -0
- package/assets/open-connector/catalog/apps/googlecalendar.json +206 -0
- package/assets/open-connector/catalog/apps/googledrive.json +479 -0
- package/assets/open-connector/catalog/apps/googlesheets.json +144 -0
- package/assets/open-connector/catalog/apps/hithink_finance.json +6 -3
- package/assets/open-connector/catalog/apps/indexed.json +1115 -0
- package/assets/open-connector/catalog/apps/linear.json +116 -0
- package/assets/open-connector/catalog/apps/notion.json +142 -0
- package/assets/open-connector/catalog/apps/one_drive.json +185 -0
- package/assets/open-connector/catalog/apps/outlook.json +182 -0
- package/assets/open-connector/catalog/apps/shopify.json +282 -0
- package/assets/open-connector/catalog/apps/slack.json +182 -0
- package/assets/open-connector/catalog/apps/spotify.json +46 -43
- package/assets/open-connector/catalog/apps/stripe.json +96 -0
- package/assets/open-connector/catalog/apps/telegram.json +138 -0
- package/assets/open-connector/catalog/apps/weixin_store.json +543 -2
- package/assets/open-connector/catalog/apps/woocommerce.json +127 -0
- package/assets/open-connector/catalog/apps/zendesk.json +152 -0
- package/assets/open-connector/catalog/apps/zerotier.json +9 -9
- package/assets/open-connector/catalog/apps-index.json +1 -1
- package/assets/open-connector/migrations/0014_saas_project.sql +55 -0
- package/assets/open-connector/migrations/0015_saas_cleanup_runtime.sql +8 -0
- package/assets/open-connector/migrations/0016_trigger_policy.sql +1 -0
- package/assets/open-connector/migrations/0017_trigger_subscriptions.sql +17 -0
- package/assets/open-connector/migrations/postgresql/0014_saas_project.sql +55 -0
- package/assets/open-connector/migrations/postgresql/0015_saas_cleanup_runtime.sql +8 -0
- package/assets/open-connector/migrations/postgresql/0016_trigger_policy.sql +1 -0
- package/assets/open-connector/migrations/postgresql/0017_trigger_subscriptions.sql +17 -0
- package/package.json +2 -2
- package/src/connection-service.d.ts +40 -7
- package/src/connection-service.js +60 -18
- package/src/core/action-policy.d.ts +8 -1
- package/src/core/action-policy.js +51 -0
- package/src/core/cast.d.ts +3 -0
- package/src/core/cast.js +4 -1
- package/src/core/guarded-fetch.d.ts +5 -0
- package/src/core/guarded-fetch.js +13 -4
- package/src/core/remote-http.d.ts +33 -0
- package/src/core/remote-http.js +104 -0
- package/src/core/request.d.ts +1 -0
- package/src/core/request.js +7 -0
- package/src/core/types.d.ts +4 -0
- package/src/marketplace/marketplace-service.d.ts +0 -1
- package/src/marketplace/marketplace-service.js +80 -92
- package/src/mcp.js +19 -5
- package/src/oauth/oauth-flow-service.d.ts +8 -1
- package/src/oauth/oauth-flow-service.js +10 -4
- package/src/providers/action-contracts.generated.d.ts +4 -2
- package/src/providers/airtable/executors.d.ts +3 -0
- package/src/providers/airtable/executors.js +2 -0
- package/src/providers/airtable/trigger-on-record-changed.d.ts +2 -0
- package/src/providers/airtable/trigger-on-record-changed.definition.d.ts +4 -0
- package/src/providers/airtable/trigger-on-record-changed.definition.js +54 -0
- package/src/providers/airtable/trigger-on-record-changed.js +235 -0
- package/src/providers/aisa/executors.js +196 -22
- package/src/providers/cal/actions.js +5 -1
- package/src/providers/enormail/executors.d.ts +4 -0
- package/src/providers/enormail/executors.js +97 -0
- package/src/providers/feishu_app_bot/executors.d.ts +3 -0
- package/src/providers/feishu_app_bot/executors.js +2 -0
- package/src/providers/feishu_app_bot/trigger-config.d.ts +1 -0
- package/src/providers/feishu_app_bot/trigger-config.js +10 -0
- package/src/providers/feishu_app_bot/trigger-on-event.d.ts +2 -0
- package/src/providers/feishu_app_bot/trigger-on-event.definition.d.ts +4 -0
- package/src/providers/feishu_app_bot/trigger-on-event.definition.js +63 -0
- package/src/providers/feishu_app_bot/trigger-on-event.js +29 -0
- package/src/providers/feishu_app_bot/trigger-subscriptions.d.ts +5 -0
- package/src/providers/feishu_app_bot/trigger-subscriptions.js +70 -0
- package/src/providers/github/executors.d.ts +3 -0
- package/src/providers/github/executors.js +6 -0
- package/src/providers/github/trigger-on-repo-event.d.ts +2 -0
- package/src/providers/github/trigger-on-repo-event.definition.d.ts +4 -0
- package/src/providers/github/trigger-on-repo-event.definition.js +94 -0
- package/src/providers/github/trigger-on-repo-event.js +168 -0
- package/src/providers/github/trigger-watch-pull-request.d.ts +2 -0
- package/src/providers/github/trigger-watch-pull-request.definition.d.ts +4 -0
- package/src/providers/github/trigger-watch-pull-request.definition.js +49 -0
- package/src/providers/github/trigger-watch-pull-request.js +106 -0
- package/src/providers/gitlab/executors.d.ts +3 -0
- package/src/providers/gitlab/executors.js +2 -0
- package/src/providers/gitlab/trigger-on-project-event.d.ts +2 -0
- package/src/providers/gitlab/trigger-on-project-event.definition.d.ts +5 -0
- package/src/providers/gitlab/trigger-on-project-event.definition.js +63 -0
- package/src/providers/gitlab/trigger-on-project-event.js +186 -0
- package/src/providers/gmail/executors.d.ts +3 -0
- package/src/providers/gmail/executors.js +2 -0
- package/src/providers/gmail/trigger-on-message-received.d.ts +2 -0
- package/src/providers/gmail/trigger-on-message-received.definition.d.ts +4 -0
- package/src/providers/gmail/trigger-on-message-received.definition.js +74 -0
- package/src/providers/gmail/trigger-on-message-received.js +232 -0
- package/src/providers/googlecalendar/executors.d.ts +3 -0
- package/src/providers/googlecalendar/executors.js +2 -0
- package/src/providers/googlecalendar/trigger-on-event-changed.d.ts +2 -0
- package/src/providers/googlecalendar/trigger-on-event-changed.definition.d.ts +4 -0
- package/src/providers/googlecalendar/trigger-on-event-changed.definition.js +74 -0
- package/src/providers/googlecalendar/trigger-on-event-changed.js +233 -0
- package/src/providers/googledrive/executors.d.ts +3 -0
- package/src/providers/googledrive/executors.js +7 -0
- package/src/providers/googledrive/trigger-changes.d.ts +12 -0
- package/src/providers/googledrive/trigger-changes.definition.d.ts +7 -0
- package/src/providers/googledrive/trigger-changes.definition.js +101 -0
- package/src/providers/googledrive/trigger-changes.js +452 -0
- package/src/providers/googledrive/trigger-on-file-change.d.ts +2 -0
- package/src/providers/googledrive/trigger-on-file-change.definition.d.ts +4 -0
- package/src/providers/googledrive/trigger-on-file-change.definition.js +77 -0
- package/src/providers/googledrive/trigger-on-file-change.js +258 -0
- package/src/providers/googlesheets/executors.d.ts +3 -0
- package/src/providers/googlesheets/executors.js +2 -0
- package/src/providers/googlesheets/trigger-on-row-added.d.ts +2 -0
- package/src/providers/googlesheets/trigger-on-row-added.definition.d.ts +4 -0
- package/src/providers/googlesheets/trigger-on-row-added.definition.js +54 -0
- package/src/providers/googlesheets/trigger-on-row-added.js +234 -0
- package/src/providers/hithink_finance/runtime.js +1 -1
- package/src/providers/indexed/executors.d.ts +4 -0
- package/src/providers/indexed/executors.js +16 -0
- package/src/providers/indexed/runtime.d.ts +26 -0
- package/src/providers/indexed/runtime.js +129 -0
- package/src/providers/linear/executors.d.ts +3 -0
- package/src/providers/linear/executors.js +2 -0
- package/src/providers/linear/trigger-on-issue-changed.d.ts +2 -0
- package/src/providers/linear/trigger-on-issue-changed.definition.d.ts +5 -0
- package/src/providers/linear/trigger-on-issue-changed.definition.js +43 -0
- package/src/providers/linear/trigger-on-issue-changed.js +215 -0
- package/src/providers/notion/executors.d.ts +3 -0
- package/src/providers/notion/executors.js +2 -0
- package/src/providers/notion/trigger-on-database-page-event.d.ts +2 -0
- package/src/providers/notion/trigger-on-database-page-event.definition.d.ts +4 -0
- package/src/providers/notion/trigger-on-database-page-event.definition.js +63 -0
- package/src/providers/notion/trigger-on-database-page-event.js +293 -0
- package/src/providers/one_drive/executors.d.ts +3 -0
- package/src/providers/one_drive/executors.js +2 -0
- package/src/providers/one_drive/trigger-on-item-changed.d.ts +2 -0
- package/src/providers/one_drive/trigger-on-item-changed.definition.d.ts +4 -0
- package/src/providers/one_drive/trigger-on-item-changed.definition.js +63 -0
- package/src/providers/one_drive/trigger-on-item-changed.js +214 -0
- package/src/providers/outlook/executors.d.ts +3 -0
- package/src/providers/outlook/executors.js +2 -0
- package/src/providers/outlook/trigger-on-message-received.d.ts +2 -0
- package/src/providers/outlook/trigger-on-message-received.definition.d.ts +4 -0
- package/src/providers/outlook/trigger-on-message-received.definition.js +93 -0
- package/src/providers/outlook/trigger-on-message-received.js +226 -0
- package/src/providers/outlook_calendar/executors.js +6 -0
- package/src/providers/provider-loader.d.ts +5 -0
- package/src/providers/provider-loader.js +4 -0
- package/src/providers/registry.generated.js +2 -0
- package/src/providers/shopify/executors.d.ts +3 -0
- package/src/providers/shopify/executors.js +2 -0
- package/src/providers/shopify/trigger-on-shop-event.d.ts +2 -0
- package/src/providers/shopify/trigger-on-shop-event.definition.d.ts +4 -0
- package/src/providers/shopify/trigger-on-shop-event.definition.js +214 -0
- package/src/providers/shopify/trigger-on-shop-event.js +165 -0
- package/src/providers/slack/executors.d.ts +3 -0
- package/src/providers/slack/executors.js +2 -0
- package/src/providers/slack/trigger-on-message-posted.d.ts +2 -0
- package/src/providers/slack/trigger-on-message-posted.definition.d.ts +4 -0
- package/src/providers/slack/trigger-on-message-posted.definition.js +80 -0
- package/src/providers/slack/trigger-on-message-posted.js +176 -0
- package/src/providers/spotify/runtime.js +15 -4
- package/src/providers/stripe/executors.d.ts +3 -0
- package/src/providers/stripe/executors.js +2 -0
- package/src/providers/stripe/trigger-on-event.d.ts +2 -0
- package/src/providers/stripe/trigger-on-event.definition.d.ts +4 -0
- package/src/providers/stripe/trigger-on-event.definition.js +43 -0
- package/src/providers/stripe/trigger-on-event.js +212 -0
- package/src/providers/telegram/executors.d.ts +3 -0
- package/src/providers/telegram/executors.js +2 -0
- package/src/providers/telegram/trigger-on-update.d.ts +2 -0
- package/src/providers/telegram/trigger-on-update.definition.d.ts +5 -0
- package/src/providers/telegram/trigger-on-update.definition.js +78 -0
- package/src/providers/telegram/trigger-on-update.js +141 -0
- package/src/providers/weixin_store/access-token.d.ts +2 -1
- package/src/providers/weixin_store/access-token.js +15 -4
- package/src/providers/weixin_store/executors.js +97 -12
- package/src/providers/woocommerce/executors.d.ts +3 -0
- package/src/providers/woocommerce/executors.js +2 -0
- package/src/providers/woocommerce/trigger-on-store-event.d.ts +2 -0
- package/src/providers/woocommerce/trigger-on-store-event.definition.d.ts +4 -0
- package/src/providers/woocommerce/trigger-on-store-event.definition.js +55 -0
- package/src/providers/woocommerce/trigger-on-store-event.js +179 -0
- package/src/providers/zendesk/executors.d.ts +3 -0
- package/src/providers/zendesk/executors.js +2 -0
- package/src/providers/zendesk/trigger-on-event.d.ts +2 -0
- package/src/providers/zendesk/trigger-on-event.definition.d.ts +5 -0
- package/src/providers/zendesk/trigger-on-event.definition.js +101 -0
- package/src/providers/zendesk/trigger-on-event.js +188 -0
- package/src/saas/saas-cleanup-service.d.ts +26 -0
- package/src/saas/saas-cleanup-service.js +124 -0
- package/src/saas/saas-client.d.ts +86 -0
- package/src/saas/saas-client.js +369 -0
- package/src/saas/saas-execution-service.d.ts +15 -0
- package/src/saas/saas-execution-service.js +21 -0
- package/src/saas/saas-oauth-service.d.ts +25 -0
- package/src/saas/saas-oauth-service.js +197 -0
- package/src/saas/saas-project-service.d.ts +61 -0
- package/src/saas/saas-project-service.js +211 -0
- package/src/server/actions/action-idempotency.d.ts +1 -0
- package/src/server/actions/action-idempotency.js +1 -0
- package/src/server/actions/action-runner.d.ts +7 -0
- package/src/server/actions/action-runner.js +43 -7
- package/src/server/actions/run-log-summary.js +9 -0
- package/src/server/api/auth.d.ts +1 -0
- package/src/server/api/auth.js +13 -2
- package/src/server/api/cache-policy.js +4 -1
- package/src/server/api/connection-input.d.ts +7 -1
- package/src/server/api/connection-input.js +7 -1
- package/src/server/api/connection-routes.d.ts +3 -1
- package/src/server/api/connection-routes.js +21 -3
- package/src/server/api/http-utils.d.ts +4 -3
- package/src/server/api/oauth-completion-page.d.ts +124 -0
- package/src/server/api/oauth-completion-page.js +113 -18
- package/src/server/api/openapi.js +112 -14
- package/src/server/api/policy-input.js +6 -0
- package/src/server/api/runtime-api.d.ts +10 -2
- package/src/server/api/runtime-api.js +17 -4
- package/src/server/api/saas-completion-page.d.ts +2 -0
- package/src/server/api/saas-completion-page.js +103 -0
- package/src/server/connect-app.d.ts +5 -0
- package/src/server/connect-app.js +50 -0
- package/src/server/connect-server.d.ts +12 -0
- package/src/server/connect-server.js +147 -13
- package/src/server/connector-runtime.d.ts +3 -1
- package/src/server/connector-runtime.js +5 -2
- package/src/server/files/transit-files.js +16 -7
- package/src/server/proxy/proxy-runner.d.ts +5 -1
- package/src/server/proxy/proxy-runner.js +72 -26
- package/src/server/storage/connection-request-store.d.ts +41 -1
- package/src/server/storage/connection-request-store.js +245 -20
- package/src/server/storage/connection-store.d.ts +16 -0
- package/src/server/storage/connection-store.js +119 -0
- package/src/server/storage/node-runtime-database.js +3 -3
- package/src/server/storage/{postgres-migrations.d.ts → postgres/migrations.d.ts} +2 -2
- package/src/server/storage/{postgres-migrations.js → postgres/migrations.js} +1 -1
- package/src/server/storage/postgres/runtime-store.d.ts +43 -0
- package/src/server/storage/{postgres-runtime-store.js → postgres/runtime-store.js} +59 -94
- package/src/server/storage/runtime-database.d.ts +4 -0
- package/src/server/storage/runtime-sql.d.ts +1 -1
- package/src/server/storage/runtime-sql.js +2 -1
- package/src/server/storage/runtime-store.d.ts +1 -0
- package/src/server/storage/runtime-token-service.d.ts +2 -0
- package/src/server/storage/runtime-token-service.js +3 -0
- package/src/server/storage/saas-project-store.d.ts +77 -0
- package/src/server/storage/saas-project-store.js +273 -0
- package/src/server/storage/{sqlite-runtime-store.d.ts → sqlite/runtime-store.d.ts} +21 -25
- package/src/server/storage/{sqlite-runtime-store.js → sqlite/runtime-store.js} +100 -115
- package/src/server/storage/trigger-store.d.ts +16 -0
- package/src/server/storage/trigger-store.js +96 -0
- package/src/triggers/common/config.d.ts +2 -0
- package/src/triggers/common/config.js +17 -0
- package/src/triggers/common/configOptions.d.ts +13 -0
- package/src/triggers/common/configOptions.js +1 -0
- package/src/triggers/common/encoding.d.ts +3 -0
- package/src/triggers/common/encoding.js +19 -0
- package/src/triggers/common/integration.d.ts +115 -0
- package/src/triggers/common/integration.js +31 -0
- package/src/triggers/common/json.d.ts +6 -0
- package/src/triggers/common/json.js +91 -0
- package/src/triggers/common/poll.d.ts +41 -0
- package/src/triggers/common/poll.js +15 -0
- package/src/triggers/common/proxy.d.ts +14 -0
- package/src/triggers/common/proxy.js +1 -0
- package/src/triggers/common/types.d.ts +42 -0
- package/src/triggers/common/types.js +1 -0
- package/src/triggers/maintenance.d.ts +40 -0
- package/src/triggers/maintenance.js +120 -0
- package/src/triggers/metadata.d.ts +8 -0
- package/src/triggers/metadata.js +1 -0
- package/src/triggers/request.d.ts +33 -0
- package/src/triggers/request.js +52 -0
- package/src/triggers/resources.d.ts +12 -0
- package/src/triggers/resources.js +121 -0
- package/src/triggers/signature.d.ts +4 -0
- package/src/triggers/signature.js +48 -0
- package/src/triggers/store.d.ts +29 -0
- package/src/triggers/store.js +1 -0
- package/src/triggers/subscriptions.d.ts +22 -0
- package/src/triggers/subscriptions.js +220 -0
- package/src/triggers/trigger-runner.d.ts +34 -0
- package/src/triggers/trigger-runner.js +169 -0
- package/src/server/storage/postgres-runtime-store.d.ts +0 -39
|
@@ -1 +1,125 @@
|
|
|
1
|
+
export declare const oauthCompletionStrings: {
|
|
2
|
+
en: {
|
|
3
|
+
badge: string;
|
|
4
|
+
title: string;
|
|
5
|
+
body: string;
|
|
6
|
+
closeButton: string;
|
|
7
|
+
autoClose: string;
|
|
8
|
+
manualClose: string;
|
|
9
|
+
checkingTitle: string;
|
|
10
|
+
checking: string;
|
|
11
|
+
signIn: string;
|
|
12
|
+
login: string;
|
|
13
|
+
retry: string;
|
|
14
|
+
missing: string;
|
|
15
|
+
retrying: string;
|
|
16
|
+
waiting: string;
|
|
17
|
+
failed: string;
|
|
18
|
+
network: string;
|
|
19
|
+
notFound: string;
|
|
20
|
+
forbidden: string;
|
|
21
|
+
};
|
|
22
|
+
"zh-CN": {
|
|
23
|
+
badge: string;
|
|
24
|
+
title: string;
|
|
25
|
+
body: string;
|
|
26
|
+
closeButton: string;
|
|
27
|
+
autoClose: string;
|
|
28
|
+
manualClose: string;
|
|
29
|
+
checkingTitle: string;
|
|
30
|
+
checking: string;
|
|
31
|
+
signIn: string;
|
|
32
|
+
login: string;
|
|
33
|
+
retry: string;
|
|
34
|
+
missing: string;
|
|
35
|
+
retrying: string;
|
|
36
|
+
waiting: string;
|
|
37
|
+
failed: string;
|
|
38
|
+
network: string;
|
|
39
|
+
notFound: string;
|
|
40
|
+
forbidden: string;
|
|
41
|
+
};
|
|
42
|
+
"zh-TW": {
|
|
43
|
+
badge: string;
|
|
44
|
+
title: string;
|
|
45
|
+
body: string;
|
|
46
|
+
closeButton: string;
|
|
47
|
+
autoClose: string;
|
|
48
|
+
manualClose: string;
|
|
49
|
+
checkingTitle: string;
|
|
50
|
+
checking: string;
|
|
51
|
+
signIn: string;
|
|
52
|
+
login: string;
|
|
53
|
+
retry: string;
|
|
54
|
+
missing: string;
|
|
55
|
+
retrying: string;
|
|
56
|
+
waiting: string;
|
|
57
|
+
failed: string;
|
|
58
|
+
network: string;
|
|
59
|
+
notFound: string;
|
|
60
|
+
forbidden: string;
|
|
61
|
+
};
|
|
62
|
+
ja: {
|
|
63
|
+
badge: string;
|
|
64
|
+
title: string;
|
|
65
|
+
body: string;
|
|
66
|
+
closeButton: string;
|
|
67
|
+
autoClose: string;
|
|
68
|
+
manualClose: string;
|
|
69
|
+
checkingTitle: string;
|
|
70
|
+
checking: string;
|
|
71
|
+
signIn: string;
|
|
72
|
+
login: string;
|
|
73
|
+
retry: string;
|
|
74
|
+
missing: string;
|
|
75
|
+
retrying: string;
|
|
76
|
+
waiting: string;
|
|
77
|
+
failed: string;
|
|
78
|
+
network: string;
|
|
79
|
+
notFound: string;
|
|
80
|
+
forbidden: string;
|
|
81
|
+
};
|
|
82
|
+
fr: {
|
|
83
|
+
badge: string;
|
|
84
|
+
title: string;
|
|
85
|
+
body: string;
|
|
86
|
+
closeButton: string;
|
|
87
|
+
autoClose: string;
|
|
88
|
+
manualClose: string;
|
|
89
|
+
checkingTitle: string;
|
|
90
|
+
checking: string;
|
|
91
|
+
signIn: string;
|
|
92
|
+
login: string;
|
|
93
|
+
retry: string;
|
|
94
|
+
missing: string;
|
|
95
|
+
retrying: string;
|
|
96
|
+
waiting: string;
|
|
97
|
+
failed: string;
|
|
98
|
+
network: string;
|
|
99
|
+
notFound: string;
|
|
100
|
+
forbidden: string;
|
|
101
|
+
};
|
|
102
|
+
ru: {
|
|
103
|
+
badge: string;
|
|
104
|
+
title: string;
|
|
105
|
+
body: string;
|
|
106
|
+
closeButton: string;
|
|
107
|
+
autoClose: string;
|
|
108
|
+
manualClose: string;
|
|
109
|
+
checkingTitle: string;
|
|
110
|
+
checking: string;
|
|
111
|
+
signIn: string;
|
|
112
|
+
login: string;
|
|
113
|
+
retry: string;
|
|
114
|
+
missing: string;
|
|
115
|
+
retrying: string;
|
|
116
|
+
waiting: string;
|
|
117
|
+
failed: string;
|
|
118
|
+
network: string;
|
|
119
|
+
notFound: string;
|
|
120
|
+
forbidden: string;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
export declare const oauthCompletionStyles = "\n:root {\n --background: hsl(0 0% 100%);\n --foreground: hsl(222.2 84% 4.9%);\n --card: hsl(0 0% 100%);\n --card-foreground: hsl(222.2 84% 4.9%);\n --muted: hsl(210 40% 96.1%);\n --muted-foreground: hsl(215.4 16.3% 46.9%);\n --border: hsl(214.3 31.8% 91.4%);\n --primary: hsl(222.2 47.4% 11.2%);\n --primary-foreground: hsl(210 40% 98%);\n --ring: hsl(222.2 84% 4.9%);\n}\n* {\n box-sizing: border-box;\n}\nbody {\n min-height: 100vh;\n margin: 0;\n display: grid;\n place-items: center;\n padding: 24px;\n background: var(--background);\n color: var(--foreground);\n font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n}\n.card {\n width: min(100%, 420px);\n padding: 24px;\n border: 1px solid var(--border);\n border-radius: 12px;\n background: var(--card);\n color: var(--card-foreground);\n box-shadow: 0 1px 2px hsl(222.2 84% 4.9% / 0.04), 0 12px 32px hsl(222.2 84% 4.9% / 0.08);\n}\n.header {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.badge {\n width: fit-content;\n display: inline-flex;\n align-items: center;\n border: 1px solid transparent;\n border-radius: 999px;\n padding: 2px 10px;\n background: var(--primary);\n color: var(--primary-foreground);\n font-size: 12px;\n font-weight: 600;\n line-height: 20px;\n}\nh1 {\n margin: 0;\n font-size: 20px;\n line-height: 28px;\n font-weight: 600;\n}\np {\n margin: 0;\n color: var(--muted-foreground);\n font-size: 14px;\n line-height: 22px;\n}\ncode {\n border-radius: 6px;\n background: var(--muted);\n padding: 2px 6px;\n color: var(--foreground);\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", monospace;\n font-size: 13px;\n}\n.actions {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n flex-wrap: wrap;\n margin-top: 24px;\n}\n.button {\n appearance: none;\n border: 1px solid var(--border);\n border-radius: 8px;\n background: var(--card);\n color: var(--foreground);\n padding: 8px 14px;\n font: inherit;\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n cursor: pointer;\n}\n.button:focus-visible {\n outline: 2px solid var(--ring);\n outline-offset: 2px;\n}\n.button:hover {\n background: var(--muted);\n}\n.close-note {\n font-size: 12px;\n line-height: 18px;\n}\n\n[hidden]{display:none!important}\n.button:disabled{opacity:.5;cursor:wait}\na.button{text-decoration:none}\n.actions{justify-content:flex-start}\n";
|
|
124
|
+
export declare const oauthCompletionLocaleScript = "const pick=()=>{try{const stored=localStorage.getItem(\"oomol-connect.lang\");if(Object.hasOwn(STR,stored))return stored;}catch{}const langs=navigator.languages&&navigator.languages.length?navigator.languages:[navigator.language||\"en\"];for(const raw of langs){const l=String(raw).toLowerCase();if(l.startsWith(\"zh\"))return (!l.includes(\"hans\")&&(l.includes(\"tw\")||l.includes(\"hk\")||l.includes(\"mo\")||l.includes(\"hant\")))?\"zh-TW\":\"zh-CN\";const primary=l.split(\"-\")[0];if(STR[raw])return raw;if(STR[primary])return primary;}return \"en\";};";
|
|
1
125
|
export declare function renderOAuthCompletionPage(service: string): string;
|
|
@@ -3,7 +3,7 @@ const oauthCompletedType = "oauth.completed";
|
|
|
3
3
|
// Client-side translations. English is also the server-rendered default in the
|
|
4
4
|
// markup below, so the page stays meaningful without JavaScript. The copy stays
|
|
5
5
|
// host-neutral because this runtime can be embedded by more than one product.
|
|
6
|
-
const oauthCompletionStrings = {
|
|
6
|
+
export const oauthCompletionStrings = {
|
|
7
7
|
en: {
|
|
8
8
|
badge: "Connected",
|
|
9
9
|
title: "Connection complete",
|
|
@@ -11,44 +11,121 @@ const oauthCompletionStrings = {
|
|
|
11
11
|
closeButton: "Close window",
|
|
12
12
|
autoClose: "Automatically closing in %N% seconds.",
|
|
13
13
|
manualClose: "You can now close this window.",
|
|
14
|
+
checkingTitle: "Completing connection",
|
|
15
|
+
checking: "Checking your Console session…",
|
|
16
|
+
signIn: "Open Console to sign in",
|
|
17
|
+
login: "Sign in to Console, then check again. Use the same browser and Console address where you started authorization.",
|
|
18
|
+
retry: "Check again",
|
|
19
|
+
missing: "The authorization request is missing. Return to the initiating client.",
|
|
20
|
+
retrying: "The connection could not be checked yet. Retrying…",
|
|
21
|
+
waiting: "Waiting for authorization to be confirmed…",
|
|
22
|
+
failed: "Authorization could not be completed. Return to the initiating client.",
|
|
23
|
+
network: "Could not reach Connect. Check your connection and try again.",
|
|
24
|
+
notFound: "This request was not found or has expired. Return to the initiating client.",
|
|
25
|
+
forbidden: "Synchronization was rejected. Check that OOMOL_CONNECT_ORIGIN matches your Console address.",
|
|
14
26
|
},
|
|
15
27
|
"zh-CN": {
|
|
16
28
|
badge: "已连接",
|
|
17
29
|
title: "连接完成",
|
|
18
|
-
body: "
|
|
30
|
+
body: "连接已就绪,可以返回刚才的应用继续使用。",
|
|
19
31
|
closeButton: "关闭窗口",
|
|
20
32
|
autoClose: "%N% 秒后自动关闭。",
|
|
21
33
|
manualClose: "现在可以手动关闭此窗口。",
|
|
34
|
+
checkingTitle: "正在完成连接",
|
|
35
|
+
checking: "正在检查控制台登录状态…",
|
|
36
|
+
signIn: "打开控制台登录",
|
|
37
|
+
login: "请登录控制台后重新检查,使用发起授权时的浏览器和控制台地址。",
|
|
38
|
+
retry: "重新检查",
|
|
39
|
+
missing: "缺少授权请求信息,请返回发起授权的应用。",
|
|
40
|
+
retrying: "暂时无法确认连接,正在重试…",
|
|
41
|
+
waiting: "正在等待授权结果确认…",
|
|
42
|
+
failed: "授权未能完成,请返回发起授权的应用查看。",
|
|
43
|
+
network: "无法连接到 Connect,请检查网络后重试。",
|
|
44
|
+
notFound: "授权请求不存在或已过期,请返回发起授权的应用。",
|
|
45
|
+
forbidden: "同步请求被拒绝,请检查 OOMOL_CONNECT_ORIGIN 是否与控制台地址一致。",
|
|
22
46
|
},
|
|
23
47
|
"zh-TW": {
|
|
24
48
|
badge: "已連線",
|
|
25
49
|
title: "連線完成",
|
|
26
|
-
body: "
|
|
50
|
+
body: "連線已就緒,可以返回剛才的應用繼續使用。",
|
|
27
51
|
closeButton: "關閉視窗",
|
|
28
52
|
autoClose: "%N% 秒後自動關閉。",
|
|
29
53
|
manualClose: "現在可以手動關閉此視窗。",
|
|
54
|
+
checkingTitle: "正在完成連線",
|
|
55
|
+
checking: "正在檢查控制台登入狀態…",
|
|
56
|
+
signIn: "開啟控制台登入",
|
|
57
|
+
login: "請登入控制台後重新檢查,使用發起授權時的瀏覽器和控制台位址。",
|
|
58
|
+
retry: "重新檢查",
|
|
59
|
+
missing: "缺少授權請求資訊,請返回發起授權的應用。",
|
|
60
|
+
retrying: "暫時無法確認連線,正在重試…",
|
|
61
|
+
waiting: "正在等待授權結果確認…",
|
|
62
|
+
failed: "授權未能完成,請返回發起授權的應用查看。",
|
|
63
|
+
network: "無法連線至 Connect,請檢查網路後重試。",
|
|
64
|
+
notFound: "授權請求不存在或已過期,請返回發起授權的應用。",
|
|
65
|
+
forbidden: "同步請求遭拒,請檢查 OOMOL_CONNECT_ORIGIN 是否與控制台位址一致。",
|
|
30
66
|
},
|
|
31
67
|
ja: {
|
|
32
68
|
badge: "接続済み",
|
|
33
69
|
title: "接続が完了しました",
|
|
34
|
-
body: "
|
|
70
|
+
body: "元のアプリに戻って続行できます。",
|
|
35
71
|
closeButton: "ウィンドウを閉じる",
|
|
36
72
|
autoClose: "%N% 秒後に自動的に閉じます。",
|
|
37
73
|
manualClose: "このウィンドウを閉じても問題ありません。",
|
|
74
|
+
checkingTitle: "接続を完了しています",
|
|
75
|
+
checking: "コンソールのログイン状態を確認しています…",
|
|
76
|
+
signIn: "コンソールにログイン",
|
|
77
|
+
login: "認可を開始したブラウザーとコンソールのアドレスでログインし、再確認してください。",
|
|
78
|
+
retry: "再確認",
|
|
79
|
+
missing: "認可リクエストがありません。元のアプリに戻ってください。",
|
|
80
|
+
retrying: "接続を確認できません。再試行しています…",
|
|
81
|
+
waiting: "認可結果を確認しています…",
|
|
82
|
+
failed: "認可を完了できませんでした。元のアプリで確認してください。",
|
|
83
|
+
network: "Connect に接続できません。ネットワークを確認して再試行してください。",
|
|
84
|
+
notFound: "リクエストが見つからないか期限切れです。元のアプリに戻ってください。",
|
|
85
|
+
forbidden: "同期が拒否されました。OOMOL_CONNECT_ORIGIN とコンソールのアドレスを確認してください。",
|
|
86
|
+
},
|
|
87
|
+
fr: {
|
|
88
|
+
badge: "Connecté",
|
|
89
|
+
title: "Connexion terminée",
|
|
90
|
+
body: "Vous pouvez revenir à l’application de départ.",
|
|
91
|
+
closeButton: "Fermer la fenêtre",
|
|
92
|
+
autoClose: "Fermeture automatique dans %N% secondes.",
|
|
93
|
+
manualClose: "Vous pouvez fermer cette fenêtre.",
|
|
94
|
+
checkingTitle: "Finalisation de la connexion",
|
|
95
|
+
checking: "Vérification de la session Console…",
|
|
96
|
+
signIn: "Se connecter à la Console",
|
|
97
|
+
login: "Connectez-vous à la Console avec le navigateur et l’adresse utilisés au départ, puis réessayez.",
|
|
98
|
+
retry: "Vérifier à nouveau",
|
|
99
|
+
missing: "La demande d’autorisation est absente. Revenez à l’application de départ.",
|
|
100
|
+
retrying: "Vérification impossible pour le moment. Nouvelle tentative…",
|
|
101
|
+
waiting: "En attente de confirmation de l’autorisation…",
|
|
102
|
+
failed: "L’autorisation a échoué. Consultez l’application de départ.",
|
|
103
|
+
network: "Connect est inaccessible. Vérifiez votre connexion et réessayez.",
|
|
104
|
+
notFound: "Cette demande est introuvable ou expirée. Revenez à l’application de départ.",
|
|
105
|
+
forbidden: "Synchronisation refusée. Vérifiez que OOMOL_CONNECT_ORIGIN correspond à l’adresse de la Console.",
|
|
106
|
+
},
|
|
107
|
+
ru: {
|
|
108
|
+
badge: "Подключено",
|
|
109
|
+
title: "Подключение завершено",
|
|
110
|
+
body: "Можно вернуться в исходное приложение.",
|
|
111
|
+
closeButton: "Закрыть окно",
|
|
112
|
+
autoClose: "Автоматическое закрытие через %N% сек.",
|
|
113
|
+
manualClose: "Теперь можно закрыть это окно.",
|
|
114
|
+
checkingTitle: "Завершение подключения",
|
|
115
|
+
checking: "Проверка сеанса консоли…",
|
|
116
|
+
signIn: "Войти в консоль",
|
|
117
|
+
login: "Войдите в консоль в том же браузере и по тому же адресу, где началась авторизация, затем повторите проверку.",
|
|
118
|
+
retry: "Проверить снова",
|
|
119
|
+
missing: "Запрос авторизации отсутствует. Вернитесь в исходное приложение.",
|
|
120
|
+
retrying: "Пока не удалось проверить подключение. Повторяем…",
|
|
121
|
+
waiting: "Ожидание подтверждения авторизации…",
|
|
122
|
+
failed: "Не удалось завершить авторизацию. Проверьте исходное приложение.",
|
|
123
|
+
network: "Нет связи с Connect. Проверьте сеть и повторите попытку.",
|
|
124
|
+
notFound: "Запрос не найден или истёк. Вернитесь в исходное приложение.",
|
|
125
|
+
forbidden: "Синхронизация отклонена. Проверьте соответствие OOMOL_CONNECT_ORIGIN адресу консоли.",
|
|
38
126
|
},
|
|
39
127
|
};
|
|
40
|
-
export
|
|
41
|
-
const payload = scriptJson({
|
|
42
|
-
type: oauthCompletedType,
|
|
43
|
-
service,
|
|
44
|
-
});
|
|
45
|
-
return `<!doctype html>
|
|
46
|
-
<html lang="en">
|
|
47
|
-
<head>
|
|
48
|
-
<meta charset="utf-8">
|
|
49
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
50
|
-
<title>Connection complete</title>
|
|
51
|
-
<style>
|
|
128
|
+
export const oauthCompletionStyles = `
|
|
52
129
|
:root {
|
|
53
130
|
--background: hsl(0 0% 100%);
|
|
54
131
|
--foreground: hsl(222.2 84% 4.9%);
|
|
@@ -153,7 +230,25 @@ code {
|
|
|
153
230
|
font-size: 12px;
|
|
154
231
|
line-height: 18px;
|
|
155
232
|
}
|
|
156
|
-
|
|
233
|
+
|
|
234
|
+
[hidden]{display:none!important}
|
|
235
|
+
.button:disabled{opacity:.5;cursor:wait}
|
|
236
|
+
a.button{text-decoration:none}
|
|
237
|
+
.actions{justify-content:flex-start}
|
|
238
|
+
`;
|
|
239
|
+
export const oauthCompletionLocaleScript = `const pick=()=>{try{const stored=localStorage.getItem("oomol-connect.lang");if(Object.hasOwn(STR,stored))return stored;}catch{}const langs=navigator.languages&&navigator.languages.length?navigator.languages:[navigator.language||"en"];for(const raw of langs){const l=String(raw).toLowerCase();if(l.startsWith("zh"))return (!l.includes("hans")&&(l.includes("tw")||l.includes("hk")||l.includes("mo")||l.includes("hant")))?"zh-TW":"zh-CN";const primary=l.split("-")[0];if(STR[raw])return raw;if(STR[primary])return primary;}return "en";};`;
|
|
240
|
+
export function renderOAuthCompletionPage(service) {
|
|
241
|
+
const payload = scriptJson({
|
|
242
|
+
type: oauthCompletedType,
|
|
243
|
+
service,
|
|
244
|
+
});
|
|
245
|
+
return `<!doctype html>
|
|
246
|
+
<html lang="en">
|
|
247
|
+
<head>
|
|
248
|
+
<meta charset="utf-8">
|
|
249
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
250
|
+
<title>Connection complete</title>
|
|
251
|
+
<style>${oauthCompletionStyles}</style>
|
|
157
252
|
</head>
|
|
158
253
|
<body>
|
|
159
254
|
<main class="card" role="status" aria-live="polite">
|
|
@@ -170,7 +265,7 @@ code {
|
|
|
170
265
|
<script>(()=>{
|
|
171
266
|
const STR=${scriptJson(oauthCompletionStrings)};
|
|
172
267
|
if("BroadcastChannel" in window){const channel=new BroadcastChannel(${scriptJson(oauthCompletionChannelName)});channel.postMessage(${payload});channel.close();}
|
|
173
|
-
|
|
268
|
+
${oauthCompletionLocaleScript}
|
|
174
269
|
const t=STR[pick()]||STR.en;
|
|
175
270
|
document.documentElement.lang=pick();
|
|
176
271
|
for(const el of document.querySelectorAll("[data-t]")){const key=el.getAttribute("data-t");if(t[key]!=null)el.textContent=t[key];}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { jsonSchema } from "../../core/json-schema.js";
|
|
3
|
+
import { triggerOperationSchema } from "../../triggers/request.js";
|
|
3
4
|
import { actionInputMaxDepth, idempotencyKeyMaxBytes, idempotencyRetentionHours, } from "../actions/action-idempotency.js";
|
|
4
5
|
import { oauthConnectionInput, apiKeyConnectionInput, customConnectionInput } from "./connection-input.js";
|
|
5
6
|
import { policyRequestMaxBytes, policyRuleListMaxItems, policyRuleMaxBytes } from "./policy-input.js";
|
|
@@ -18,7 +19,10 @@ const errorResponseSchema = jsonSchema.object({
|
|
|
18
19
|
description: "Standard error response.",
|
|
19
20
|
});
|
|
20
21
|
const actionResultMetaSchema = jsonSchema.object({
|
|
21
|
-
executionId: jsonSchema.string({ description: "
|
|
22
|
+
executionId: jsonSchema.string({ description: "Local action execution identifier." }),
|
|
23
|
+
remoteExecutionId: jsonSchema.string({
|
|
24
|
+
description: "SaaS execution identifier when available; distinct from the local executionId.",
|
|
25
|
+
}),
|
|
22
26
|
actionId: jsonSchema.string({ description: "Executed action identifier." }),
|
|
23
27
|
auditPersisted: jsonSchema.boolean({ description: "Whether the run audit record was stored." }),
|
|
24
28
|
}, {
|
|
@@ -27,6 +31,9 @@ const actionResultMetaSchema = jsonSchema.object({
|
|
|
27
31
|
});
|
|
28
32
|
const actionFailureMetaSchema = jsonSchema.object({
|
|
29
33
|
executionId: jsonSchema.string({ description: "Execution identifier when action execution began." }),
|
|
34
|
+
remoteExecutionId: jsonSchema.string({
|
|
35
|
+
description: "SaaS execution identifier when the remote failure supplies one.",
|
|
36
|
+
}),
|
|
30
37
|
actionId: jsonSchema.string({ description: "Requested action identifier." }),
|
|
31
38
|
auditPersisted: jsonSchema.boolean({ description: "Whether the run audit record was stored." }),
|
|
32
39
|
}, {
|
|
@@ -59,6 +66,7 @@ const oauthClientConfigRequestSchema = jsonSchema.object({
|
|
|
59
66
|
required: ["clientId"],
|
|
60
67
|
description: "User-provided OAuth app client configuration.",
|
|
61
68
|
});
|
|
69
|
+
const saasExecutionDescription = "SaaS connections execute remotely after local policy and input validation, using the selected account without local credentials or fallback. SaaS execution POSTs have a 300-second budget and a 64 MiB decoded JSON envelope limit. Responses retain the local executionId and add remoteExecutionId when available. Cancellation or a failed response does not guarantee that remote side effects were undone. ";
|
|
62
70
|
const actionIdempotencyDescription = `Requests with the same Idempotency-Key, action, input, effective connection, and stored runtime token identity replay the original HTTP status and body of completed successes and failures during the ${idempotencyRetentionHours}-hour replay window. ` +
|
|
63
71
|
"Requests that are still in progress, or whose outcome is uncertain, are not automatically dispatched again. " +
|
|
64
72
|
"Duplicate suppression does not guarantee exactly-once execution by the provider.";
|
|
@@ -70,6 +78,13 @@ const actionIdParameter = {
|
|
|
70
78
|
};
|
|
71
79
|
const namedConnectionDescription = "Named connection. Same fact as MCP connectionName; HTTP alias, connectionName, and x-oo-connector-alias are equivalent. Defaults to default.";
|
|
72
80
|
const namedConnectionParameters = [
|
|
81
|
+
{
|
|
82
|
+
name: "x-oo-connector-app-id",
|
|
83
|
+
in: "header",
|
|
84
|
+
required: false,
|
|
85
|
+
schema: jsonSchema.string(),
|
|
86
|
+
description: "Stable connection ID. If an alias is also supplied it must identify the same connection. Unknown IDs never select the default account.",
|
|
87
|
+
},
|
|
73
88
|
{
|
|
74
89
|
name: "x-oo-connector-alias",
|
|
75
90
|
in: "header",
|
|
@@ -106,6 +121,9 @@ const idempotencyKeyParameter = {
|
|
|
106
121
|
const idempotencyConflictDescription = "For idempotency, idempotency_request_in_progress means the original request is still running or its outcome is uncertain, while idempotency_key_conflict means the key was reused for a different action, input, effective connection, or stored runtime token. Other runtime conflicts may return their own error code with the same status.";
|
|
107
122
|
const runtimeConnectionProperties = {
|
|
108
123
|
id: jsonSchema.string({ description: "Stable local connection identifier." }),
|
|
124
|
+
providerAccountId: jsonSchema.string({
|
|
125
|
+
description: "Provider account identity from the stored credential profile.",
|
|
126
|
+
}),
|
|
109
127
|
service: jsonSchema.string({ description: "Provider service identifier." }),
|
|
110
128
|
status: { type: "string", enum: ["active", "disconnected"] },
|
|
111
129
|
alias: jsonSchema.string({ description: namedConnectionDescription }),
|
|
@@ -262,6 +280,61 @@ export function createOpenApiDocument(providers, options = {}) {
|
|
|
262
280
|
"/api/files/{fileId}": createTransitFilePath(),
|
|
263
281
|
"/v1/actions/{actionId}": runPath,
|
|
264
282
|
"/v1/proxy/{service}": createProxyPath(),
|
|
283
|
+
"/v1/providers/{service}/trigger-permissions": runtimeGetOperation("Triggers", "Read provider-native Trigger permission guidance.", {
|
|
284
|
+
data: { type: "array", items: { type: "object", additionalProperties: true } },
|
|
285
|
+
parameters: [{ name: "service", in: "path", required: true, schema: jsonSchema.string() }],
|
|
286
|
+
errorStatuses: [401, 404],
|
|
287
|
+
}),
|
|
288
|
+
"/v1/providers/{service}/triggers/{triggerId}/execute": {
|
|
289
|
+
post: {
|
|
290
|
+
tags: ["Triggers"],
|
|
291
|
+
summary: "Execute a registered Provider Trigger operation.",
|
|
292
|
+
description: "Requires independent Trigger grants. Stateful operations require a persistent runtime token and native local connection; remote state and credentials stay server-owned.",
|
|
293
|
+
parameters: [
|
|
294
|
+
{ name: "service", in: "path", required: true, schema: jsonSchema.string() },
|
|
295
|
+
{ name: "triggerId", in: "path", required: true, schema: jsonSchema.string() },
|
|
296
|
+
...namedConnectionParameters,
|
|
297
|
+
],
|
|
298
|
+
requestBody: { required: true, content: { "application/json": { schema: triggerOperationSchema() } } },
|
|
299
|
+
responses: {
|
|
300
|
+
200: jsonResponse(runtimeSuccessSchema({})),
|
|
301
|
+
400: jsonResponse(runtimeFailureSchema()),
|
|
302
|
+
401: jsonResponse(runtimeFailureSchema()),
|
|
303
|
+
403: jsonResponse(runtimeFailureSchema()),
|
|
304
|
+
404: jsonResponse(runtimeFailureSchema()),
|
|
305
|
+
409: jsonResponse(runtimeFailureSchema()),
|
|
306
|
+
413: jsonResponse(runtimeFailureSchema()),
|
|
307
|
+
501: jsonResponse(runtimeFailureSchema()),
|
|
308
|
+
503: jsonResponse(runtimeFailureSchema()),
|
|
309
|
+
},
|
|
310
|
+
},
|
|
311
|
+
},
|
|
312
|
+
"/api/trigger-subscriptions": getOperation("Triggers", "List owned subscriptions and cleanup status without secrets.", { type: "array", items: { type: "object", additionalProperties: true } }),
|
|
313
|
+
"/api/trigger-subscriptions/{id}/cancel": {
|
|
314
|
+
post: {
|
|
315
|
+
tags: ["Triggers"],
|
|
316
|
+
summary: "Cancel a subscription with retained original credentials.",
|
|
317
|
+
parameters: [{ name: "id", in: "path", required: true, schema: jsonSchema.string() }],
|
|
318
|
+
responses: {
|
|
319
|
+
200: jsonResponse(jsonSchema.object({ ok: jsonSchema.boolean() })),
|
|
320
|
+
404: jsonResponse(errorResponseSchema),
|
|
321
|
+
409: jsonResponse(errorResponseSchema),
|
|
322
|
+
503: jsonResponse(errorResponseSchema),
|
|
323
|
+
},
|
|
324
|
+
},
|
|
325
|
+
},
|
|
326
|
+
"/api/trigger-subscriptions/{id}/abandon": {
|
|
327
|
+
post: {
|
|
328
|
+
tags: ["Triggers"],
|
|
329
|
+
summary: "Explicitly abandon automatic cleanup; retain the uncleaned remote-resource record.",
|
|
330
|
+
parameters: [{ name: "id", in: "path", required: true, schema: jsonSchema.string() }],
|
|
331
|
+
responses: {
|
|
332
|
+
200: jsonResponse(jsonSchema.object({ ok: jsonSchema.boolean() })),
|
|
333
|
+
404: jsonResponse(errorResponseSchema),
|
|
334
|
+
409: jsonResponse(errorResponseSchema),
|
|
335
|
+
},
|
|
336
|
+
},
|
|
337
|
+
},
|
|
265
338
|
"/api/runs": createRunsPath(),
|
|
266
339
|
"/api/runs/{id}": createRunDetailPath(),
|
|
267
340
|
"/mcp": createMcpPath(),
|
|
@@ -287,7 +360,11 @@ export function createOpenApiDocument(providers, options = {}) {
|
|
|
287
360
|
{ name: "Access", description: "Runtime execution policy and bearer tokens for /v1 and MCP clients." },
|
|
288
361
|
{ name: "Files", description: "Local temporary file transit for provider actions." },
|
|
289
362
|
{ name: "Runs", description: "Local action execution and recent run history." },
|
|
290
|
-
{
|
|
363
|
+
{
|
|
364
|
+
name: "Triggers",
|
|
365
|
+
description: "Registered provider Trigger operations and owned remote subscription cleanup.",
|
|
366
|
+
},
|
|
367
|
+
{ name: "Proxy", description: "Provider API proxy requests using the selected local or SaaS connection." },
|
|
291
368
|
{ name: "MCP", description: "Stateless MCP POST endpoint and tool metadata." },
|
|
292
369
|
],
|
|
293
370
|
paths,
|
|
@@ -419,6 +496,9 @@ export function createOpenApiDocument(providers, options = {}) {
|
|
|
419
496
|
}),
|
|
420
497
|
ConnectionSummary: jsonSchema.object({
|
|
421
498
|
id: jsonSchema.string({ description: "Stable local connection identifier." }),
|
|
499
|
+
providerAccountId: jsonSchema.string({
|
|
500
|
+
description: "Provider account identity from the stored credential profile.",
|
|
501
|
+
}),
|
|
422
502
|
service: jsonSchema.string({ description: "Provider service identifier." }),
|
|
423
503
|
authType: jsonSchema.string({ description: "Connection authentication type." }),
|
|
424
504
|
configured: jsonSchema.boolean({ description: "Whether the provider is connected." }),
|
|
@@ -493,6 +573,7 @@ export function createOpenApiDocument(providers, options = {}) {
|
|
|
493
573
|
allowedActions: policyRuleArraySchema("Action allow rules applied to this stored runtime token."),
|
|
494
574
|
blockedActions: policyRuleArraySchema("Action block rules applied to this stored runtime token."),
|
|
495
575
|
allowedProxies: policyRuleArraySchema("Provider proxies explicitly granted to this token. An empty list grants no proxy access."),
|
|
576
|
+
allowedTriggers: policyRuleArraySchema("Trigger IDs explicitly granted to this token. Omit or leave empty to deny all Trigger operations."),
|
|
496
577
|
allowedConnections: connectionIdArraySchema("Stable connection IDs granted to this stored runtime token. An empty list is unrestricted connection access. IDs are opaque values returned by the connection APIs. Virtual no_auth connections do not require grants."),
|
|
497
578
|
createdAt: jsonSchema.string({ description: "Creation timestamp." }),
|
|
498
579
|
lastUsedAt: jsonSchema.string({ description: "Last successful use timestamp." }),
|
|
@@ -504,6 +585,7 @@ export function createOpenApiDocument(providers, options = {}) {
|
|
|
504
585
|
"blockedActions",
|
|
505
586
|
"allowedProxies",
|
|
506
587
|
"allowedConnections",
|
|
588
|
+
"allowedTriggers",
|
|
507
589
|
"createdAt",
|
|
508
590
|
],
|
|
509
591
|
description: "Runtime API token summary. Plaintext tokens and token hashes are not returned.",
|
|
@@ -513,6 +595,7 @@ export function createOpenApiDocument(providers, options = {}) {
|
|
|
513
595
|
allowedActions: policyRuleArraySchema("Optional action allow rules for the new token."),
|
|
514
596
|
blockedActions: policyRuleArraySchema("Optional action block rules for the new token."),
|
|
515
597
|
allowedProxies: policyRuleArraySchema("Optional provider proxy grants for the new token. Omit or leave empty to deny proxy access."),
|
|
598
|
+
allowedTriggers: policyRuleArraySchema("Trigger IDs explicitly granted to this token. Omit or leave empty to deny all Trigger operations."),
|
|
516
599
|
allowedConnections: connectionIdArraySchema("Optional stable connection IDs granted to the new token. Omit or leave empty for unrestricted connection access. A non-empty list matches exact opaque IDs returned by the connection APIs. Virtual no_auth connections do not require grants."),
|
|
517
600
|
}, {
|
|
518
601
|
required: ["name"],
|
|
@@ -522,10 +605,11 @@ export function createOpenApiDocument(providers, options = {}) {
|
|
|
522
605
|
allowedActions: policyRuleArraySchema("Action allow rules for this token."),
|
|
523
606
|
blockedActions: policyRuleArraySchema("Action block rules for this token."),
|
|
524
607
|
allowedProxies: policyRuleArraySchema("Provider proxies explicitly granted to this token. An empty list grants no proxy access."),
|
|
608
|
+
allowedTriggers: policyRuleArraySchema("Trigger IDs explicitly granted to this token. Omit or leave empty to deny all Trigger operations."),
|
|
525
609
|
allowedConnections: connectionIdArraySchema("Stable connection IDs granted to this stored token. An empty list is unrestricted connection access. A non-empty list matches exact opaque IDs returned by the connection APIs. Virtual no_auth connections do not require grants."),
|
|
526
610
|
}, {
|
|
527
611
|
required: ["allowedActions", "blockedActions", "allowedProxies", "allowedConnections"],
|
|
528
|
-
description: "Complete replacement of one stored runtime token's
|
|
612
|
+
description: "Complete replacement of one stored runtime token's Action, Trigger, proxy, and connection permissions.",
|
|
529
613
|
}),
|
|
530
614
|
PolicyRules: policyRulesSchema(),
|
|
531
615
|
RuntimePolicyState: jsonSchema.object({
|
|
@@ -782,7 +866,7 @@ function createRuntimePolicyPath() {
|
|
|
782
866
|
},
|
|
783
867
|
put: {
|
|
784
868
|
tags: ["Access"],
|
|
785
|
-
summary: "Replace the persisted Runtime
|
|
869
|
+
summary: "Replace the persisted Runtime Action, Trigger, and proxy policy.",
|
|
786
870
|
description: `Deployment policy remains read-only. Block rules take precedence and non-empty allowlists intersect. Policy request bodies must not exceed ${policyRequestMaxBytes} bytes.`,
|
|
787
871
|
requestBody: {
|
|
788
872
|
required: true,
|
|
@@ -806,6 +890,8 @@ function policyRulesSchema() {
|
|
|
806
890
|
allowedActions: policyRuleArraySchema("Action allow rules."),
|
|
807
891
|
blockedActions: policyRuleArraySchema("Action block rules."),
|
|
808
892
|
allowedProxies: policyRuleArraySchema("Proxy service allow rules."),
|
|
893
|
+
allowedTriggers: policyRuleArraySchema("Trigger allow rules. Non-empty allowlists intersect across policy layers."),
|
|
894
|
+
blockedTriggers: policyRuleArraySchema("Trigger block rules override all grants."),
|
|
809
895
|
blockedProxies: policyRuleArraySchema("Proxy service block rules."),
|
|
810
896
|
}, {
|
|
811
897
|
required: ["allowedActions", "blockedActions", "allowedProxies", "blockedProxies"],
|
|
@@ -946,6 +1032,7 @@ function createRunPath() {
|
|
|
946
1032
|
tags: ["Runs"],
|
|
947
1033
|
summary: "Execute a runtime action.",
|
|
948
1034
|
description: "Use the action catalog to discover provider-specific input and output schemas. For a compact strongly typed OpenAPI document for one action, request /openapi.json?actionId=<actionId>. " +
|
|
1035
|
+
saasExecutionDescription +
|
|
949
1036
|
actionIdempotencyDescription,
|
|
950
1037
|
parameters: [actionIdParameter, idempotencyKeyParameter, ...namedConnectionParameters],
|
|
951
1038
|
requestBody: actionRunBody(jsonSchema.unknownObject("Action input matching the catalog schema. Omitted input is treated as {}."), "Generic action run creation request."),
|
|
@@ -958,7 +1045,7 @@ function createProxyPath() {
|
|
|
958
1045
|
post: {
|
|
959
1046
|
tags: ["Proxy"],
|
|
960
1047
|
summary: "Proxy one provider API request.",
|
|
961
|
-
description: "
|
|
1048
|
+
description: "Executes through the selected connection. Local connections use the local provider proxy; SaaS connections use the project proxy without loading local credentials. SaaS accepts GET/POST/PUT/PATCH/DELETE, primitive query values, string non-authentication headers and JSON/text bodies only; accessGrant and unknown fields are rejected. SaaS execution has a 300-second POST budget and a 64 MiB decoded JSON envelope limit, preserves the upstream status inside data.status, and supplies distinct local executionId and remoteExecutionId in meta. Failed or cancelled calls are never automatically replayed; remote side effects may have completed.",
|
|
962
1049
|
parameters: [
|
|
963
1050
|
{
|
|
964
1051
|
name: "service",
|
|
@@ -975,7 +1062,7 @@ function createProxyPath() {
|
|
|
975
1062
|
schema: jsonSchema.object({
|
|
976
1063
|
endpoint: jsonSchema.string({ description: "Provider-relative path beginning with /." }),
|
|
977
1064
|
method: jsonSchema.string({
|
|
978
|
-
description: "HTTP method: DELETE, GET, HEAD, PATCH, POST, or PUT.",
|
|
1065
|
+
description: "HTTP method: DELETE, GET, HEAD, PATCH, POST, or PUT. SaaS connections reject HEAD.",
|
|
979
1066
|
}),
|
|
980
1067
|
query: {
|
|
981
1068
|
type: "object",
|
|
@@ -1005,7 +1092,7 @@ function createProxyPath() {
|
|
|
1005
1092
|
description: "Provider response headers.",
|
|
1006
1093
|
},
|
|
1007
1094
|
bodyEncoding: jsonSchema.string({
|
|
1008
|
-
description: "Present as base64 when
|
|
1095
|
+
description: "Present as base64 when a local provider response is binary. SaaS proxy supports JSON/text responses and omits this field.",
|
|
1009
1096
|
}),
|
|
1010
1097
|
data: jsonSchema.unknown("Provider response payload."),
|
|
1011
1098
|
}, {
|
|
@@ -1021,6 +1108,9 @@ function createProxyPath() {
|
|
|
1021
1108
|
429: jsonResponse(runtimeFailureSchema()),
|
|
1022
1109
|
500: jsonResponse(runtimeFailureSchema()),
|
|
1023
1110
|
501: jsonResponse(runtimeFailureSchema()),
|
|
1111
|
+
502: jsonResponse(runtimeFailureSchema()),
|
|
1112
|
+
503: jsonResponse(runtimeFailureSchema()),
|
|
1113
|
+
504: jsonResponse(runtimeFailureSchema()),
|
|
1024
1114
|
},
|
|
1025
1115
|
},
|
|
1026
1116
|
};
|
|
@@ -1226,6 +1316,10 @@ function actionRunResponses(output) {
|
|
|
1226
1316
|
413: jsonResponse(failure, "The provider response exceeded the runtime size limit, or the upstream answered 413."),
|
|
1227
1317
|
429: jsonResponse(failure),
|
|
1228
1318
|
500: jsonResponse(failure),
|
|
1319
|
+
501: jsonResponse(failure),
|
|
1320
|
+
502: jsonResponse(failure, "SaaS upstream, protocol or response size failure; execution may have completed."),
|
|
1321
|
+
503: jsonResponse(failure, "SaaS project credentials or execution are unavailable."),
|
|
1322
|
+
504: jsonResponse(failure, "SaaS execution timed out; execution may have completed."),
|
|
1229
1323
|
};
|
|
1230
1324
|
}
|
|
1231
1325
|
function createConnectionUpsertRequestSchema() {
|
|
@@ -1250,7 +1344,7 @@ function createConcreteRunOperation(action) {
|
|
|
1250
1344
|
return {
|
|
1251
1345
|
tags: ["Runs"],
|
|
1252
1346
|
summary: `Execute ${action.id}.`,
|
|
1253
|
-
description: `${action.description} ${actionIdempotencyDescription}`,
|
|
1347
|
+
description: `${action.description} ${saasExecutionDescription}${actionIdempotencyDescription}`,
|
|
1254
1348
|
parameters: [actionIdParameter, idempotencyKeyParameter, ...namedConnectionParameters],
|
|
1255
1349
|
requestBody: actionRunBody(action.inputSchema, `Run creation request for ${action.id}. Omitted input is treated as {}.`),
|
|
1256
1350
|
responses: actionRunResponses(action.outputSchema),
|
|
@@ -1349,11 +1443,11 @@ function connectionManagementPaths() {
|
|
|
1349
1443
|
scopes: jsonSchema.optional(jsonSchema.stringArray("Provider scopes the connector requests.")),
|
|
1350
1444
|
authorizationOptions: jsonSchema.optional(jsonSchema.array(authorizationOption)),
|
|
1351
1445
|
})),
|
|
1352
|
-
oauthClient: jsonSchema.optional(jsonSchema.object("OAuth
|
|
1446
|
+
oauthClient: jsonSchema.optional(jsonSchema.object("Default OAuth source configuration; present when the provider supports OAuth.", {
|
|
1353
1447
|
configured: jsonSchema.boolean(),
|
|
1354
|
-
customClientAvailable: jsonSchema.boolean("Whether connections may carry their own OAuth client."),
|
|
1355
|
-
expectedRedirectUri: jsonSchema.string("Callback URL
|
|
1356
|
-
missingFields: jsonSchema.stringArray("Required client inputs absent from
|
|
1448
|
+
customClientAvailable: jsonSchema.boolean("Whether connections may carry their own OAuth client; false for a SaaS default source."),
|
|
1449
|
+
expectedRedirectUri: jsonSchema.string("Callback URL: the SaaS provider config callback for a SaaS source; otherwise the local override or runtime callback."),
|
|
1450
|
+
missingFields: jsonSchema.stringArray("Required local client inputs absent from storage; empty for a SaaS source."),
|
|
1357
1451
|
})),
|
|
1358
1452
|
});
|
|
1359
1453
|
const parameter = (name) => ({ name, in: "path", required: true, schema: { type: "string" } });
|
|
@@ -1379,8 +1473,8 @@ function connectionManagementPaths() {
|
|
|
1379
1473
|
"/v1/connection-requests/{connectionRequestId}": runtimeGetOperation("Connections", "Get an OAuth authorization result.", {
|
|
1380
1474
|
data: request,
|
|
1381
1475
|
parameters: [parameter("connectionRequestId")],
|
|
1382
|
-
errorStatuses: [401, 403, 404],
|
|
1383
|
-
description: "Requires the initiating management principal. A consumed callback does not remove the result. Responses use Cache-Control: private, no-store.",
|
|
1476
|
+
errorStatuses: [401, 403, 404, 409, 429, 502, 503, 504],
|
|
1477
|
+
description: "Requires the initiating management principal. An explicit valid administrator Bearer token advances SaaS authorization; cookie-only and unauthenticated local GET requests only read stored results. Console uses same-origin POST /api/oauth/connection-requests/{id}/sync with X-OpenConnector-Request: sync. A consumed callback does not remove the result. Responses use Cache-Control: private, no-store.",
|
|
1384
1478
|
}),
|
|
1385
1479
|
};
|
|
1386
1480
|
for (const reconnect of [false, true]) {
|
|
@@ -1407,6 +1501,10 @@ function connectionManagementPaths() {
|
|
|
1407
1501
|
403: jsonResponse(runtimeFailureSchema()),
|
|
1408
1502
|
404: jsonResponse(runtimeFailureSchema()),
|
|
1409
1503
|
409: jsonResponse(runtimeFailureSchema()),
|
|
1504
|
+
429: jsonResponse(runtimeFailureSchema()),
|
|
1505
|
+
502: jsonResponse(runtimeFailureSchema()),
|
|
1506
|
+
503: jsonResponse(runtimeFailureSchema()),
|
|
1507
|
+
504: jsonResponse(runtimeFailureSchema()),
|
|
1410
1508
|
},
|
|
1411
1509
|
},
|
|
1412
1510
|
};
|
|
@@ -10,9 +10,14 @@ export function readRuntimePolicyRules(body) {
|
|
|
10
10
|
blockedActions: readRules(body.blockedActions, "blockedActions", "action"),
|
|
11
11
|
allowedProxies: readRules(body.allowedProxies, "allowedProxies", "proxy"),
|
|
12
12
|
blockedProxies: readRules(body.blockedProxies, "blockedProxies", "proxy"),
|
|
13
|
+
allowedTriggers: readRules(body.allowedTriggers, "allowedTriggers", "action", true),
|
|
14
|
+
blockedTriggers: readRules(body.blockedTriggers, "blockedTriggers", "action", true),
|
|
13
15
|
};
|
|
14
16
|
}
|
|
15
17
|
export function readTokenPolicy(body, allowOmitted = false) {
|
|
18
|
+
if (body.blockedTriggers !== undefined) {
|
|
19
|
+
throw invalidInput("Token policy does not support Trigger block rules.");
|
|
20
|
+
}
|
|
16
21
|
if (body.blockedProxies !== undefined) {
|
|
17
22
|
throw invalidInput("Token policy does not support proxy block rules.");
|
|
18
23
|
}
|
|
@@ -20,6 +25,7 @@ export function readTokenPolicy(body, allowOmitted = false) {
|
|
|
20
25
|
allowedActions: readRules(body.allowedActions, "allowedActions", "action", allowOmitted),
|
|
21
26
|
blockedActions: readRules(body.blockedActions, "blockedActions", "action", allowOmitted),
|
|
22
27
|
allowedProxies: readRules(body.allowedProxies, "allowedProxies", "proxy", allowOmitted),
|
|
28
|
+
allowedTriggers: readRules(body.allowedTriggers, "allowedTriggers", "action", true),
|
|
23
29
|
allowedConnections: readConnectionIds(body.allowedConnections, "allowedConnections", allowOmitted),
|
|
24
30
|
};
|
|
25
31
|
}
|