@mcp-s/connectors 0.0.20260928085734

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.
@@ -0,0 +1,182 @@
1
+ import { z } from "zod";
2
+ import { jsonata, method, obj } from "./common.js";
3
+ import { connectorAuthType, connectorCategory } from "./enums.js";
4
+ import { authSettings, wizardStep } from "./auth.js";
5
+ import { endpointSchema, tool } from "./tool.js";
6
+ import { connectorCondition, connectorConfiguration, toolLabel, webhookSettings, } from "./parts.js";
7
+ /**
8
+ * Version of the catalog format itself. A consumer declares the highest version
9
+ * it understands; a connector that needs more (via `min_schema`) is skipped by
10
+ * that consumer, which keeps serving its bundled copy instead.
11
+ */
12
+ export const CATALOG_SCHEMA_VERSION = 1;
13
+ /**
14
+ * "api" connectors own their tools: each is an HTTP call against
15
+ * `api.base_url`. "mcp" connectors proxy a third-party MCP server, so their
16
+ * tools are discovered from the server rather than authored by hand.
17
+ */
18
+ export const catalogConnectorKind = z.enum(["api", "mcp"]);
19
+ /** "draft" is catalog-invisible and served only on request. */
20
+ export const catalogConnectorStatus = z.enum([
21
+ "draft",
22
+ "soon",
23
+ "beta",
24
+ "active",
25
+ "super-admin",
26
+ "hidden",
27
+ ]);
28
+ export const INTEGRATION_TEMPLATE_FIELDS = [
29
+ "name",
30
+ "description",
31
+ "logo_url",
32
+ "tools",
33
+ "auth_settings",
34
+ "conditions",
35
+ "webhook_settings",
36
+ "mcp_proxy",
37
+ "base_url",
38
+ "headers",
39
+ "settings",
40
+ "proxy_settings",
41
+ "metadata",
42
+ "tags",
43
+ ];
44
+ export const integrationTemplateField = z.enum(INTEGRATION_TEMPLATE_FIELDS);
45
+ const display = obj({
46
+ name: z.string(),
47
+ description: z.string().optional(),
48
+ /** Icon slug or absolute URL. Falls back to the connector slug. */
49
+ icon: z.string().optional(),
50
+ website: z.string().optional(),
51
+ category: connectorCategory,
52
+ docs_url: z.string().optional(),
53
+ /** Published by the vendor itself, e.g. Datadog's own MCP server. */
54
+ official: z.boolean().optional(),
55
+ /** Source repository, for open-source MCP servers. */
56
+ repo: z.string().optional(),
57
+ });
58
+ const api = obj({
59
+ base_url: z.string(),
60
+ headers: z.record(z.string(), z.string()).optional(),
61
+ });
62
+ const mcpUrlOption = obj({
63
+ label: z.string(),
64
+ url: z.string(),
65
+ description: z.string().optional(),
66
+ /** The installing admin types their own URL; `url` is a placeholder. */
67
+ custom: z.boolean().optional(),
68
+ });
69
+ const mcp = obj({
70
+ url: z.string(),
71
+ transport: z.enum(["auto", "streamable-http", "sse"]).optional(),
72
+ headers: z.record(z.string(), z.string()).optional(),
73
+ /** Selectable endpoints, e.g. regional sites. The first is the default. */
74
+ url_options: z.array(mcpUrlOption).optional(),
75
+ /** Label for the endpoint picker. Defaults to "Region". */
76
+ url_options_label: z.string().optional(),
77
+ });
78
+ const auth = obj({
79
+ methods: authSettings,
80
+ default: connectorAuthType.optional(),
81
+ default_scopes: z.array(z.string()).optional(),
82
+ });
83
+ const verification = z.union([
84
+ obj({
85
+ type: z.literal("http"),
86
+ path: z.string(),
87
+ method: method.optional(),
88
+ headers: z.record(z.string(), z.string()).optional(),
89
+ body: z.record(z.string(), z.unknown()).optional(),
90
+ success: jsonata.optional(),
91
+ identity: jsonata.optional(),
92
+ timeout_ms: z.number().optional(),
93
+ }),
94
+ obj({ type: z.literal("mcp"), timeout_ms: z.number().optional() }),
95
+ obj({ type: z.literal("none") }),
96
+ ]);
97
+ const toolsSync = obj({
98
+ source: z.enum(["manual", "discovered"]),
99
+ synced_at: z.string(),
100
+ tool_count: z.number(),
101
+ endpoint: z.string().optional(),
102
+ });
103
+ const generalSetting = obj({
104
+ label: z.string(),
105
+ key: z.string(),
106
+ description: z.string().optional(),
107
+ default_value: z.string().optional(),
108
+ });
109
+ const setupStep = obj({
110
+ title: z.string(),
111
+ markdown: z.string(),
112
+ field: integrationTemplateField.optional(),
113
+ });
114
+ const template = obj({
115
+ request_settings: z.record(z.string(), z.unknown()).optional(),
116
+ metadata: z.record(z.string(), z.unknown()).optional(),
117
+ tags: z.array(z.string()).optional(),
118
+ locked_fields: z.array(integrationTemplateField).optional(),
119
+ setup: z.array(setupStep).optional(),
120
+ });
121
+ export const catalogConnectorDefinition = obj({
122
+ display,
123
+ api: api.optional(),
124
+ mcp: mcp.optional(),
125
+ auth: auth.optional(),
126
+ verification: verification.optional(),
127
+ tools: z.array(tool).optional(),
128
+ tools_sync: toolsSync.optional(),
129
+ /** Provider request/response schemas per endpoint, for the tool builder. */
130
+ schemas: z.array(endpointSchema).optional(),
131
+ webhook: webhookSettings.optional(),
132
+ conditions: z.array(connectorCondition).optional(),
133
+ labels: z.array(toolLabel).optional(),
134
+ general_settings: z.array(generalSetting).optional(),
135
+ configuration: connectorConfiguration.optional(),
136
+ template: template.optional(),
137
+ /** Internal notes. Stripped from everything this package publishes. */
138
+ notes: z.string().optional(),
139
+ });
140
+ export const catalogConnector = obj({
141
+ /** Stable catalog identity. Never changes, not even when the slug moves. */
142
+ id: z.string(),
143
+ /** Load-bearing at runtime: `integrations.connector_id` resolves through it. */
144
+ slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
145
+ kind: catalogConnectorKind,
146
+ status: catalogConnectorStatus,
147
+ /** Products this connector covers, e.g. ["jira", "confluence"]. */
148
+ applications: z.array(z.string()),
149
+ /** Catalog entries this connector replaces when it is available. */
150
+ supersedes: obj({
151
+ connectors: z.array(z.string()).optional(),
152
+ registry: z.array(z.string()).optional(),
153
+ }).optional(),
154
+ /**
155
+ * Lowest {@link CATALOG_SCHEMA_VERSION} a consumer must understand to use
156
+ * this connector. Absent means any version.
157
+ */
158
+ min_schema: z.number().int().positive().optional(),
159
+ definition: catalogConnectorDefinition,
160
+ });
161
+ /** One row of `index.json`: enough to list and search without the definition. */
162
+ export const catalogIndexEntry = obj({
163
+ id: z.string(),
164
+ slug: z.string(),
165
+ kind: catalogConnectorKind,
166
+ status: catalogConnectorStatus,
167
+ name: z.string(),
168
+ description: z.string().optional(),
169
+ icon: z.string().optional(),
170
+ category: connectorCategory,
171
+ applications: z.array(z.string()),
172
+ supersedes: catalogConnector.shape.supersedes,
173
+ min_schema: z.number().int().positive().optional(),
174
+ /** Content hash of the published definition file. */
175
+ hash: z.string(),
176
+ });
177
+ export const catalogIndex = obj({
178
+ schema_version: z.number().int().positive(),
179
+ generated_at: z.string(),
180
+ connectors: z.array(catalogIndexEntry),
181
+ });
182
+ export { wizardStep };
@@ -0,0 +1,31 @@
1
+ import { z } from "zod";
2
+ import type { JSONSchema7 } from "json-schema";
3
+ /**
4
+ * Every object schema in this package is loose: unknown keys are kept, not
5
+ * stripped. A consumer running an older copy of the schema must never drop a
6
+ * field a newer catalog added.
7
+ */
8
+ export declare const obj: <T extends z.ZodRawShape>(shape: T) => z.ZodObject<{ -readonly [P in keyof T]: T[P]; }, z.core.$loose>;
9
+ /** A JSONata expression. Evaluated by the platform, opaque here. */
10
+ export declare const jsonata: z.ZodString;
11
+ export declare const jsonSchema7: z.ZodCustom<JSONSchema7, JSONSchema7>;
12
+ export declare const requiredScope: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
13
+ oneOf: z.ZodArray<z.ZodString>;
14
+ }, z.core.$loose>]>;
15
+ export declare const method: z.ZodEnum<{
16
+ GET: "GET";
17
+ POST: "POST";
18
+ PUT: "PUT";
19
+ PATCH: "PATCH";
20
+ DELETE: "DELETE";
21
+ }>;
22
+ export type Method = z.infer<typeof method>;
23
+ export declare const encryptedPayload: z.ZodObject<{
24
+ encryptedData: z.ZodString;
25
+ encryptedDek: z.ZodString;
26
+ iv: z.ZodString;
27
+ tag: z.ZodString;
28
+ gateway_id: z.ZodOptional<z.ZodString>;
29
+ kid: z.ZodOptional<z.ZodString>;
30
+ }, z.core.$loose>;
31
+ export type EncryptedPayload = z.infer<typeof encryptedPayload>;
@@ -0,0 +1,23 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Every object schema in this package is loose: unknown keys are kept, not
4
+ * stripped. A consumer running an older copy of the schema must never drop a
5
+ * field a newer catalog added.
6
+ */
7
+ export const obj = (shape) => z.looseObject(shape);
8
+ /** A JSONata expression. Evaluated by the platform, opaque here. */
9
+ export const jsonata = z.string();
10
+ export const jsonSchema7 = z.custom((value) => typeof value === "object" && value !== null, "Expected a JSON Schema object");
11
+ export const requiredScope = z.union([
12
+ z.string(),
13
+ obj({ oneOf: z.array(z.string()) }),
14
+ ]);
15
+ export const method = z.enum(["GET", "POST", "PUT", "PATCH", "DELETE"]);
16
+ export const encryptedPayload = obj({
17
+ encryptedData: z.string(),
18
+ encryptedDek: z.string(),
19
+ iv: z.string(),
20
+ tag: z.string(),
21
+ gateway_id: z.string().optional(),
22
+ kid: z.string().optional(),
23
+ });
@@ -0,0 +1,42 @@
1
+ import { z } from "zod";
2
+ export declare enum ConnectorCategory {
3
+ COMMUNICATION_MESSAGING = "communication-messaging",
4
+ PROJECT_MANAGEMENT_ISSUE_TRACKING = "project-management-issue-tracking",
5
+ DOCUMENTATION_KNOWLEDGE_BASE = "documentation-knowledge-base",
6
+ CRM_SALES = "crm-sales",
7
+ CUSTOMER_SUPPORT_HELPDESK = "customer-support-helpdesk",
8
+ CODE_VERSION_CONTROL = "code-version-control",
9
+ CI_CD_DEVOPS = "ci-cd-devops",
10
+ CLOUD_INFRASTRUCTURE = "cloud-infrastructure",
11
+ DATABASES_DATA_WAREHOUSES = "databases-data-warehouses",
12
+ OBSERVABILITY_MONITORING = "observability-monitoring",
13
+ ANALYTICS_PRODUCT_INTELLIGENCE = "analytics-product-intelligence",
14
+ FILE_STORAGE_DOCUMENT_MANAGEMENT = "file-storage-document-management",
15
+ DESIGN_CREATIVE = "design-creative",
16
+ PAYMENTS_FINANCE = "payments-finance",
17
+ HR_PEOPLE_OPS = "hr-people-ops",
18
+ MARKETING_GROWTH = "marketing-growth",
19
+ IDENTITY_SECURITY = "identity-security",
20
+ SCHEDULING_CALENDAR = "scheduling-calendar",
21
+ SPREADSHEETS_NO_CODE_DATA = "spreadsheets-no-code-data",
22
+ WEB_SCRAPING_AUTOMATION = "web-scraping-automation",
23
+ OTHER = "other"
24
+ }
25
+ export declare enum ConnectorAuthType {
26
+ API_KEY = "apiKey",
27
+ OAUTH = "oauth",
28
+ WILLOW_OAUTH = "webrix-oauth",
29
+ SERVER_APP = "server-app",
30
+ SERVER_APP_PER_USER = "server-app-per-user",
31
+ PROXY_OAUTH = "proxy-oauth",
32
+ PROXY_CONNECTOR_OAUTH = "proxy-connector-oauth",
33
+ PROXY_API_KEY = "proxy-api-key",
34
+ PROXY_CLIENT_CREDENTIALS = "proxy-client-credentials",
35
+ PROXY_PASSTHROUGH = "proxy-passthrough",
36
+ API_KEY_PER_USER = "api-key-per-user",
37
+ CLIENT_CREDENTIALS = "client-credentials",
38
+ CLIENT_CREDENTIALS_PER_USER = "client-credentials-per-user",
39
+ NONE = "none"
40
+ }
41
+ export declare const connectorCategory: z.ZodEnum<typeof ConnectorCategory>;
42
+ export declare const connectorAuthType: z.ZodEnum<typeof ConnectorAuthType>;
@@ -0,0 +1,44 @@
1
+ import { z } from "zod";
2
+ export var ConnectorCategory;
3
+ (function (ConnectorCategory) {
4
+ ConnectorCategory["COMMUNICATION_MESSAGING"] = "communication-messaging";
5
+ ConnectorCategory["PROJECT_MANAGEMENT_ISSUE_TRACKING"] = "project-management-issue-tracking";
6
+ ConnectorCategory["DOCUMENTATION_KNOWLEDGE_BASE"] = "documentation-knowledge-base";
7
+ ConnectorCategory["CRM_SALES"] = "crm-sales";
8
+ ConnectorCategory["CUSTOMER_SUPPORT_HELPDESK"] = "customer-support-helpdesk";
9
+ ConnectorCategory["CODE_VERSION_CONTROL"] = "code-version-control";
10
+ ConnectorCategory["CI_CD_DEVOPS"] = "ci-cd-devops";
11
+ ConnectorCategory["CLOUD_INFRASTRUCTURE"] = "cloud-infrastructure";
12
+ ConnectorCategory["DATABASES_DATA_WAREHOUSES"] = "databases-data-warehouses";
13
+ ConnectorCategory["OBSERVABILITY_MONITORING"] = "observability-monitoring";
14
+ ConnectorCategory["ANALYTICS_PRODUCT_INTELLIGENCE"] = "analytics-product-intelligence";
15
+ ConnectorCategory["FILE_STORAGE_DOCUMENT_MANAGEMENT"] = "file-storage-document-management";
16
+ ConnectorCategory["DESIGN_CREATIVE"] = "design-creative";
17
+ ConnectorCategory["PAYMENTS_FINANCE"] = "payments-finance";
18
+ ConnectorCategory["HR_PEOPLE_OPS"] = "hr-people-ops";
19
+ ConnectorCategory["MARKETING_GROWTH"] = "marketing-growth";
20
+ ConnectorCategory["IDENTITY_SECURITY"] = "identity-security";
21
+ ConnectorCategory["SCHEDULING_CALENDAR"] = "scheduling-calendar";
22
+ ConnectorCategory["SPREADSHEETS_NO_CODE_DATA"] = "spreadsheets-no-code-data";
23
+ ConnectorCategory["WEB_SCRAPING_AUTOMATION"] = "web-scraping-automation";
24
+ ConnectorCategory["OTHER"] = "other";
25
+ })(ConnectorCategory || (ConnectorCategory = {}));
26
+ export var ConnectorAuthType;
27
+ (function (ConnectorAuthType) {
28
+ ConnectorAuthType["API_KEY"] = "apiKey";
29
+ ConnectorAuthType["OAUTH"] = "oauth";
30
+ ConnectorAuthType["WILLOW_OAUTH"] = "webrix-oauth";
31
+ ConnectorAuthType["SERVER_APP"] = "server-app";
32
+ ConnectorAuthType["SERVER_APP_PER_USER"] = "server-app-per-user";
33
+ ConnectorAuthType["PROXY_OAUTH"] = "proxy-oauth";
34
+ ConnectorAuthType["PROXY_CONNECTOR_OAUTH"] = "proxy-connector-oauth";
35
+ ConnectorAuthType["PROXY_API_KEY"] = "proxy-api-key";
36
+ ConnectorAuthType["PROXY_CLIENT_CREDENTIALS"] = "proxy-client-credentials";
37
+ ConnectorAuthType["PROXY_PASSTHROUGH"] = "proxy-passthrough";
38
+ ConnectorAuthType["API_KEY_PER_USER"] = "api-key-per-user";
39
+ ConnectorAuthType["CLIENT_CREDENTIALS"] = "client-credentials";
40
+ ConnectorAuthType["CLIENT_CREDENTIALS_PER_USER"] = "client-credentials-per-user";
41
+ ConnectorAuthType["NONE"] = "none";
42
+ })(ConnectorAuthType || (ConnectorAuthType = {}));
43
+ export const connectorCategory = z.enum(ConnectorCategory);
44
+ export const connectorAuthType = z.enum(ConnectorAuthType);
@@ -0,0 +1,123 @@
1
+ import { z } from "zod";
2
+ export declare const toolLabel: z.ZodObject<{
3
+ id: z.ZodString;
4
+ displayName: z.ZodString;
5
+ description: z.ZodOptional<z.ZodString>;
6
+ }, z.core.$loose>;
7
+ export declare const conditionAction: z.ZodObject<{
8
+ path: z.ZodString;
9
+ method: z.ZodEnum<{
10
+ GET: "GET";
11
+ POST: "POST";
12
+ PUT: "PUT";
13
+ PATCH: "PATCH";
14
+ DELETE: "DELETE";
15
+ }>;
16
+ mapping: z.ZodObject<{
17
+ params: z.ZodOptional<z.ZodString>;
18
+ query: z.ZodOptional<z.ZodString>;
19
+ body: z.ZodOptional<z.ZodString>;
20
+ }, z.core.$loose>;
21
+ }, z.core.$loose>;
22
+ export declare const connectorCondition: z.ZodObject<{
23
+ id: z.ZodString;
24
+ name: z.ZodString;
25
+ description: z.ZodOptional<z.ZodString>;
26
+ action: z.ZodOptional<z.ZodObject<{
27
+ path: z.ZodString;
28
+ method: z.ZodEnum<{
29
+ GET: "GET";
30
+ POST: "POST";
31
+ PUT: "PUT";
32
+ PATCH: "PATCH";
33
+ DELETE: "DELETE";
34
+ }>;
35
+ mapping: z.ZodObject<{
36
+ params: z.ZodOptional<z.ZodString>;
37
+ query: z.ZodOptional<z.ZodString>;
38
+ body: z.ZodOptional<z.ZodString>;
39
+ }, z.core.$loose>;
40
+ }, z.core.$loose>>;
41
+ mapping: z.ZodString;
42
+ message: z.ZodOptional<z.ZodString>;
43
+ effect: z.ZodOptional<z.ZodEnum<{
44
+ block: "block";
45
+ warn: "warn";
46
+ require_approval: "require_approval";
47
+ }>>;
48
+ surface: z.ZodOptional<z.ZodEnum<{
49
+ tool: "tool";
50
+ webhook: "webhook";
51
+ }>>;
52
+ variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
53
+ key: z.ZodString;
54
+ label: z.ZodString;
55
+ description: z.ZodOptional<z.ZodString>;
56
+ type: z.ZodEnum<{
57
+ string: "string";
58
+ number: "number";
59
+ boolean: "boolean";
60
+ "string[]": "string[]";
61
+ "number[]": "number[]";
62
+ }>;
63
+ required: z.ZodOptional<z.ZodBoolean>;
64
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>]>>;
65
+ placeholder: z.ZodOptional<z.ZodString>;
66
+ options: z.ZodOptional<z.ZodObject<{
67
+ action: z.ZodObject<{
68
+ path: z.ZodString;
69
+ method: z.ZodEnum<{
70
+ GET: "GET";
71
+ POST: "POST";
72
+ PUT: "PUT";
73
+ PATCH: "PATCH";
74
+ DELETE: "DELETE";
75
+ }>;
76
+ mapping: z.ZodObject<{
77
+ params: z.ZodOptional<z.ZodString>;
78
+ query: z.ZodOptional<z.ZodString>;
79
+ body: z.ZodOptional<z.ZodString>;
80
+ }, z.core.$loose>;
81
+ }, z.core.$loose>;
82
+ mapping: z.ZodString;
83
+ searchable: z.ZodOptional<z.ZodBoolean>;
84
+ searchParam: z.ZodOptional<z.ZodString>;
85
+ }, z.core.$loose>>;
86
+ }, z.core.$loose>>>;
87
+ appliesTo: z.ZodOptional<z.ZodArray<z.ZodString>>;
88
+ }, z.core.$loose>;
89
+ export type ConnectorCondition = z.infer<typeof connectorCondition>;
90
+ export declare const webhookSettings: z.ZodObject<{
91
+ verification: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
92
+ type: z.ZodLiteral<"hmac-sha256">;
93
+ signatureHeader: z.ZodString;
94
+ signaturePrefix: z.ZodOptional<z.ZodString>;
95
+ timestampHeader: z.ZodOptional<z.ZodString>;
96
+ payloadTemplate: z.ZodOptional<z.ZodString>;
97
+ encoding: z.ZodOptional<z.ZodEnum<{
98
+ hex: "hex";
99
+ base64: "base64";
100
+ }>>;
101
+ }, z.core.$loose>, z.ZodObject<{
102
+ type: z.ZodLiteral<"none">;
103
+ }, z.core.$loose>]>>;
104
+ challengeMapping: z.ZodOptional<z.ZodString>;
105
+ eventMapping: z.ZodOptional<z.ZodString>;
106
+ setupMarkdown: z.ZodOptional<z.ZodString>;
107
+ secretLabel: z.ZodOptional<z.ZodString>;
108
+ ignoreSelf: z.ZodOptional<z.ZodString>;
109
+ triggers: z.ZodArray<z.ZodObject<{
110
+ id: z.ZodString;
111
+ name: z.ZodString;
112
+ description: z.ZodOptional<z.ZodString>;
113
+ match: z.ZodString;
114
+ sessionKey: z.ZodOptional<z.ZodString>;
115
+ exampleMapping: z.ZodOptional<z.ZodString>;
116
+ }, z.core.$loose>>;
117
+ }, z.core.$loose>;
118
+ /** JSON-Schema-like description of connector-level configuration. */
119
+ export declare const connectorConfiguration: z.ZodObject<{
120
+ type: z.ZodLiteral<"object">;
121
+ properties: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>;
122
+ required: z.ZodOptional<z.ZodArray<z.ZodString>>;
123
+ }, z.core.$loose>;
@@ -0,0 +1,85 @@
1
+ import { z } from "zod";
2
+ import { jsonata, method, obj } from "./common.js";
3
+ export const toolLabel = obj({
4
+ id: z.string(),
5
+ displayName: z.string(),
6
+ description: z.string().optional(),
7
+ });
8
+ const conditionVariableValue = z.union([
9
+ z.string(),
10
+ z.number(),
11
+ z.boolean(),
12
+ z.array(z.string()),
13
+ z.array(z.number()),
14
+ ]);
15
+ export const conditionAction = obj({
16
+ path: z.string(),
17
+ method,
18
+ mapping: obj({
19
+ params: jsonata.optional(),
20
+ query: jsonata.optional(),
21
+ body: jsonata.optional(),
22
+ }),
23
+ });
24
+ export const connectorCondition = obj({
25
+ id: z.string(),
26
+ name: z.string(),
27
+ description: z.string().optional(),
28
+ action: conditionAction.optional(),
29
+ mapping: jsonata,
30
+ message: z.string().optional(),
31
+ effect: z.enum(["block", "warn", "require_approval"]).optional(),
32
+ surface: z.enum(["tool", "webhook"]).optional(),
33
+ variables: z
34
+ .array(obj({
35
+ key: z.string(),
36
+ label: z.string(),
37
+ description: z.string().optional(),
38
+ type: z.enum(["string", "number", "boolean", "string[]", "number[]"]),
39
+ required: z.boolean().optional(),
40
+ default: conditionVariableValue.optional(),
41
+ placeholder: z.string().optional(),
42
+ options: obj({
43
+ action: conditionAction,
44
+ mapping: jsonata,
45
+ searchable: z.boolean().optional(),
46
+ searchParam: z.string().optional(),
47
+ }).optional(),
48
+ }))
49
+ .optional(),
50
+ appliesTo: z.array(z.string()).optional(),
51
+ });
52
+ export const webhookSettings = obj({
53
+ verification: z
54
+ .union([
55
+ obj({
56
+ type: z.literal("hmac-sha256"),
57
+ signatureHeader: z.string(),
58
+ signaturePrefix: z.string().optional(),
59
+ timestampHeader: z.string().optional(),
60
+ payloadTemplate: z.string().optional(),
61
+ encoding: z.enum(["hex", "base64"]).optional(),
62
+ }),
63
+ obj({ type: z.literal("none") }),
64
+ ])
65
+ .optional(),
66
+ challengeMapping: jsonata.optional(),
67
+ eventMapping: jsonata.optional(),
68
+ setupMarkdown: z.string().optional(),
69
+ secretLabel: z.string().optional(),
70
+ ignoreSelf: jsonata.optional(),
71
+ triggers: z.array(obj({
72
+ id: z.string(),
73
+ name: z.string(),
74
+ description: z.string().optional(),
75
+ match: jsonata,
76
+ sessionKey: jsonata.optional(),
77
+ exampleMapping: jsonata.optional(),
78
+ })),
79
+ });
80
+ /** JSON-Schema-like description of connector-level configuration. */
81
+ export const connectorConfiguration = obj({
82
+ type: z.literal("object"),
83
+ properties: z.record(z.string(), z.record(z.string(), z.unknown())),
84
+ required: z.array(z.string()).optional(),
85
+ });
@@ -0,0 +1,107 @@
1
+ import { z } from "zod";
2
+ export declare const toolSchemas: z.ZodObject<{
3
+ params: z.ZodOptional<z.ZodCustom<import("json-schema").JSONSchema7, import("json-schema").JSONSchema7>>;
4
+ query: z.ZodOptional<z.ZodCustom<import("json-schema").JSONSchema7, import("json-schema").JSONSchema7>>;
5
+ body: z.ZodOptional<z.ZodCustom<import("json-schema").JSONSchema7, import("json-schema").JSONSchema7>>;
6
+ response: z.ZodOptional<z.ZodCustom<import("json-schema").JSONSchema7, import("json-schema").JSONSchema7>>;
7
+ }, z.core.$loose>;
8
+ export declare const toolMapping: z.ZodObject<{
9
+ params: z.ZodOptional<z.ZodString>;
10
+ query: z.ZodOptional<z.ZodString>;
11
+ body: z.ZodOptional<z.ZodString>;
12
+ response: z.ZodOptional<z.ZodString>;
13
+ headers: z.ZodOptional<z.ZodString>;
14
+ arguments: z.ZodOptional<z.ZodString>;
15
+ externalId: z.ZodOptional<z.ZodString>;
16
+ }, z.core.$loose>;
17
+ export declare const toolRiskLevel: z.ZodEnum<{
18
+ low: "low";
19
+ mid: "mid";
20
+ high: "high";
21
+ }>;
22
+ export declare const tool: z.ZodObject<{
23
+ name: z.ZodString;
24
+ description: z.ZodString;
25
+ slug: z.ZodString;
26
+ inputSchema: z.ZodCustom<import("json-schema").JSONSchema7, import("json-schema").JSONSchema7>;
27
+ enabled: z.ZodBoolean;
28
+ action: z.ZodObject<{
29
+ path: z.ZodString;
30
+ method: z.ZodEnum<{
31
+ GET: "GET";
32
+ POST: "POST";
33
+ PUT: "PUT";
34
+ PATCH: "PATCH";
35
+ DELETE: "DELETE";
36
+ }>;
37
+ mapping: z.ZodObject<{
38
+ params: z.ZodOptional<z.ZodString>;
39
+ query: z.ZodOptional<z.ZodString>;
40
+ body: z.ZodOptional<z.ZodString>;
41
+ response: z.ZodOptional<z.ZodString>;
42
+ headers: z.ZodOptional<z.ZodString>;
43
+ arguments: z.ZodOptional<z.ZodString>;
44
+ externalId: z.ZodOptional<z.ZodString>;
45
+ }, z.core.$loose>;
46
+ responseType: z.ZodOptional<z.ZodEnum<{
47
+ json: "json";
48
+ text: "text";
49
+ arraybuffer: "arraybuffer";
50
+ }>>;
51
+ schemas: z.ZodOptional<z.ZodObject<{
52
+ params: z.ZodOptional<z.ZodCustom<import("json-schema").JSONSchema7, import("json-schema").JSONSchema7>>;
53
+ query: z.ZodOptional<z.ZodCustom<import("json-schema").JSONSchema7, import("json-schema").JSONSchema7>>;
54
+ body: z.ZodOptional<z.ZodCustom<import("json-schema").JSONSchema7, import("json-schema").JSONSchema7>>;
55
+ response: z.ZodOptional<z.ZodCustom<import("json-schema").JSONSchema7, import("json-schema").JSONSchema7>>;
56
+ }, z.core.$loose>>;
57
+ }, z.core.$loose>;
58
+ annotations: z.ZodOptional<z.ZodObject<{
59
+ readOnlyHint: z.ZodOptional<z.ZodBoolean>;
60
+ destructiveHint: z.ZodOptional<z.ZodBoolean>;
61
+ idempotentHint: z.ZodOptional<z.ZodBoolean>;
62
+ openWorldHint: z.ZodOptional<z.ZodBoolean>;
63
+ }, z.core.$loose>>;
64
+ risk: z.ZodOptional<z.ZodEnum<{
65
+ low: "low";
66
+ mid: "mid";
67
+ high: "high";
68
+ }>>;
69
+ forceApproval: z.ZodOptional<z.ZodEnum<{
70
+ user: "user";
71
+ admin: "admin";
72
+ }>>;
73
+ requiredScopes: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
74
+ oneOf: z.ZodArray<z.ZodString>;
75
+ }, z.core.$loose>]>>>;
76
+ labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
77
+ }, z.core.$loose>;
78
+ export type Tool = z.infer<typeof tool>;
79
+ /**
80
+ * Per-endpoint request/response schemas, keyed by path and method. Used by the
81
+ * tool builder to offer the provider's real shapes.
82
+ */
83
+ export declare const endpointSchema: z.ZodObject<{
84
+ connectorSlug: z.ZodString;
85
+ path: z.ZodString;
86
+ method: z.ZodEnum<{
87
+ GET: "GET";
88
+ POST: "POST";
89
+ PUT: "PUT";
90
+ PATCH: "PATCH";
91
+ DELETE: "DELETE";
92
+ HEAD: "HEAD";
93
+ OPTIONS: "OPTIONS";
94
+ }>;
95
+ name: z.ZodString;
96
+ description: z.ZodString;
97
+ schemas: z.ZodObject<{
98
+ query: z.ZodOptional<z.ZodCustom<import("json-schema").JSONSchema7, import("json-schema").JSONSchema7>>;
99
+ path: z.ZodOptional<z.ZodCustom<import("json-schema").JSONSchema7, import("json-schema").JSONSchema7>>;
100
+ body: z.ZodOptional<z.ZodCustom<import("json-schema").JSONSchema7, import("json-schema").JSONSchema7>>;
101
+ responses: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodCustom<import("json-schema").JSONSchema7, import("json-schema").JSONSchema7>>>;
102
+ }, z.core.$loose>;
103
+ requiredScopes: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
104
+ oneOf: z.ZodArray<z.ZodString>;
105
+ }, z.core.$loose>]>>>;
106
+ }, z.core.$loose>;
107
+ export type EndpointSchema = z.infer<typeof endpointSchema>;