@wildo-ai/external-connectors-models 1.1.2 → 1.1.3
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/dist/esm/.native.tsbuildinfo +1 -0
- package/dist/esm/core/commons.external-connectors-models.schemas.d.ts +45 -7
- package/dist/esm/core/commons.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/core/commons.external-connectors-models.schemas.js +42 -5
- package/dist/esm/core/commons.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/core/operation-classification.external-connectors-models.schemas.d.ts +13 -0
- package/dist/esm/core/operation-classification.external-connectors-models.schemas.d.ts.map +1 -0
- package/dist/esm/core/operation-classification.external-connectors-models.schemas.js +14 -0
- package/dist/esm/core/operation-classification.external-connectors-models.schemas.js.map +1 -0
- package/dist/esm/core/protocols.external-connectors-models.schemas.d.ts +0 -25
- package/dist/esm/core/protocols.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/core/protocols.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/core/security.external-connectors-models.schemas.d.ts +132 -2
- package/dist/esm/core/security.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/core/security.external-connectors-models.schemas.js +164 -0
- package/dist/esm/core/security.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/features/core.external-connectors-models.schemas.d.ts +0 -63
- package/dist/esm/features/core.external-connectors-models.schemas.d.ts.map +0 -1
- package/dist/esm/features/core.external-connectors-models.schemas.js +0 -101
- package/dist/esm/features/core.external-connectors-models.schemas.js.map +0 -1
- package/dist/esm/features/email.external-connectors-models.schemas.d.ts +0 -181
- package/dist/esm/features/email.external-connectors-models.schemas.d.ts.map +0 -1
- package/dist/esm/features/email.external-connectors-models.schemas.js +0 -34
- package/dist/esm/features/email.external-connectors-models.schemas.js.map +0 -1
- package/dist/esm/features/hooks.external-connectors-models.schemas.d.ts +0 -101
- package/dist/esm/features/hooks.external-connectors-models.schemas.d.ts.map +0 -1
- package/dist/esm/features/hooks.external-connectors-models.schemas.js +0 -11
- package/dist/esm/features/hooks.external-connectors-models.schemas.js.map +0 -1
- package/dist/esm/features/sms.external-connectors-models.schemas.d.ts +0 -21
- package/dist/esm/features/sms.external-connectors-models.schemas.d.ts.map +0 -1
- package/dist/esm/features/sms.external-connectors-models.schemas.js +0 -8
- package/dist/esm/features/sms.external-connectors-models.schemas.js.map +0 -1
- package/dist/esm/index.d.ts +3 -9
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +6 -10
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/protocols/a2a.external-connectors-models.schemas.d.ts +0 -57
- package/dist/esm/protocols/a2a.external-connectors-models.schemas.d.ts.map +0 -1
- package/dist/esm/protocols/a2a.external-connectors-models.schemas.js +0 -73
- package/dist/esm/protocols/a2a.external-connectors-models.schemas.js.map +0 -1
- package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.d.ts +110 -3
- package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.js +140 -1
- package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/billing.standard-interface.schemas.d.ts +154 -0
- package/dist/esm/protocols/billing.standard-interface.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/billing.standard-interface.schemas.js +50 -1
- package/dist/esm/protocols/billing.standard-interface.schemas.js.map +1 -1
- package/dist/esm/protocols/email.external-connectors-models.schemas.d.ts +1 -1
- package/dist/esm/protocols/email.standard-interface.schemas.d.ts +5 -5
- package/dist/esm/protocols/git.external-connectors-models.schemas.d.ts +0 -14
- package/dist/esm/protocols/git.external-connectors-models.schemas.d.ts.map +0 -1
- package/dist/esm/protocols/git.external-connectors-models.schemas.js +0 -9
- package/dist/esm/protocols/git.external-connectors-models.schemas.js.map +0 -1
- package/dist/esm/protocols/grpc.external-connectors-models.schemas.d.ts +0 -14
- package/dist/esm/protocols/grpc.external-connectors-models.schemas.d.ts.map +0 -1
- package/dist/esm/protocols/grpc.external-connectors-models.schemas.js +0 -9
- package/dist/esm/protocols/grpc.external-connectors-models.schemas.js.map +0 -1
- package/dist/esm/protocols/hooks-capability.external-connectors-models.schemas.d.ts +101 -0
- package/dist/esm/protocols/hooks-capability.external-connectors-models.schemas.d.ts.map +1 -0
- package/dist/esm/protocols/hooks-capability.external-connectors-models.schemas.js +11 -0
- package/dist/esm/protocols/hooks-capability.external-connectors-models.schemas.js.map +1 -0
- package/dist/esm/protocols/llm.external-connectors-models.schemas.d.ts +36 -19
- package/dist/esm/protocols/llm.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/llm.external-connectors-models.schemas.js +90 -28
- package/dist/esm/protocols/llm.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/mcp.external-connectors-models.schemas.d.ts +0 -60
- package/dist/esm/protocols/mcp.external-connectors-models.schemas.d.ts.map +0 -1
- package/dist/esm/protocols/mcp.external-connectors-models.schemas.js +0 -35
- package/dist/esm/protocols/mcp.external-connectors-models.schemas.js.map +0 -1
- package/dist/esm/protocols/oauth2.external-connectors-models.schemas.d.ts +2 -2
- package/dist/esm/protocols/rest-api.external-connectors-models.schemas.d.ts +1 -89
- package/dist/esm/protocols/rest-api.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/rest-api.external-connectors-models.schemas.js +1 -83
- package/dist/esm/protocols/rest-api.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.d.ts +370 -0
- package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.d.ts.map +1 -0
- package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.js +89 -0
- package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.js.map +1 -0
- package/dist/esm/protocols/saml.external-connectors-models.schemas.d.ts +0 -135
- package/dist/esm/protocols/saml.external-connectors-models.schemas.d.ts.map +0 -1
- package/dist/esm/protocols/saml.external-connectors-models.schemas.js +0 -9
- package/dist/esm/protocols/saml.external-connectors-models.schemas.js.map +0 -1
- package/dist/esm/protocols/sms.standard-interface.schemas.d.ts +2 -2
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1,75 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
3
|
-
import { ExternalProvider_OperationDefinition_Base } from "../core/operations.external-connectors-models.schemas";
|
|
4
|
-
export declare enum API_ParameterIn {
|
|
5
|
-
QUERY = "query",
|
|
6
|
-
HEADER = "header",
|
|
7
|
-
PATH = "path",
|
|
8
|
-
COOKIE = "cookie"
|
|
9
|
-
}
|
|
10
|
-
export declare enum API_ContentType {
|
|
11
|
-
JSON = "application/json",
|
|
12
|
-
XML = "application/xml",
|
|
13
|
-
FORM_URLENCODED = "application/x-www-form-urlencoded",
|
|
14
|
-
MULTIPART_FORM = "multipart/form-data",
|
|
15
|
-
TEXT_PLAIN = "text/plain",
|
|
16
|
-
OCTET_STREAM = "application/octet-stream"
|
|
17
|
-
}
|
|
18
|
-
export declare const API_ParameterSchema: z.ZodObject<{
|
|
19
|
-
name: z.ZodString;
|
|
20
|
-
in: z.ZodEnum<typeof API_ParameterIn>;
|
|
21
|
-
description: z.ZodOptional<z.ZodString>;
|
|
22
|
-
required: z.ZodDefault<z.ZodBoolean>;
|
|
23
|
-
deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
24
|
-
schemaRef: z.ZodOptional<z.ZodString>;
|
|
25
|
-
type: z.ZodOptional<z.ZodEnum<{
|
|
26
|
-
string: "string";
|
|
27
|
-
number: "number";
|
|
28
|
-
boolean: "boolean";
|
|
29
|
-
array: "array";
|
|
30
|
-
integer: "integer";
|
|
31
|
-
}>>;
|
|
32
|
-
format: z.ZodOptional<z.ZodString>;
|
|
33
|
-
enumValues: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
34
|
-
defaultValue: z.ZodOptional<z.ZodUnknown>;
|
|
35
|
-
}, z.core.$strip>;
|
|
36
|
-
export type API_Parameter = z.infer<typeof API_ParameterSchema>;
|
|
37
|
-
export declare const REST_API_OperationSpecSchema: z.ZodObject<{
|
|
38
|
-
method: z.ZodEnum<typeof API_HttpMethod>;
|
|
39
|
-
path: z.ZodString;
|
|
40
|
-
parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
41
|
-
name: z.ZodString;
|
|
42
|
-
in: z.ZodEnum<typeof API_ParameterIn>;
|
|
43
|
-
description: z.ZodOptional<z.ZodString>;
|
|
44
|
-
required: z.ZodDefault<z.ZodBoolean>;
|
|
45
|
-
deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
46
|
-
schemaRef: z.ZodOptional<z.ZodString>;
|
|
47
|
-
type: z.ZodOptional<z.ZodEnum<{
|
|
48
|
-
string: "string";
|
|
49
|
-
number: "number";
|
|
50
|
-
boolean: "boolean";
|
|
51
|
-
array: "array";
|
|
52
|
-
integer: "integer";
|
|
53
|
-
}>>;
|
|
54
|
-
format: z.ZodOptional<z.ZodString>;
|
|
55
|
-
enumValues: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
56
|
-
defaultValue: z.ZodOptional<z.ZodUnknown>;
|
|
57
|
-
}, z.core.$strip>>>;
|
|
58
|
-
requestContentType: z.ZodOptional<z.ZodEnum<typeof API_ContentType>>;
|
|
59
|
-
responseContentType: z.ZodOptional<z.ZodEnum<typeof API_ContentType>>;
|
|
60
|
-
rateLimit: z.ZodOptional<z.ZodObject<{
|
|
61
|
-
requests: z.ZodNumber;
|
|
62
|
-
period: z.ZodEnum<{
|
|
63
|
-
second: "second";
|
|
64
|
-
minute: "minute";
|
|
65
|
-
hour: "hour";
|
|
66
|
-
day: "day";
|
|
67
|
-
}>;
|
|
68
|
-
}, z.core.$strip>>;
|
|
69
|
-
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
70
|
-
deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
71
|
-
}, z.core.$strip>;
|
|
72
|
-
export type REST_API_OperationSpec = z.infer<typeof REST_API_OperationSpecSchema>;
|
|
2
|
+
import { ExternalProvider_ExchangeProtocol_Kind, ExternalProvider_ExchangeProtocol_Profile_Base, ExternalProvider_ExchangeProtocol_Configuration_Base } from "../core/commons.external-connectors-models.schemas";
|
|
73
3
|
export type REST_API_Provider_Profile = ExternalProvider_ExchangeProtocol_Profile_Base & {
|
|
74
4
|
baseURL: string;
|
|
75
5
|
version?: string;
|
|
@@ -96,24 +26,6 @@ export type REST_API_Provider_Configuration = ExternalProvider_ExchangeProtocol_
|
|
|
96
26
|
defaultLimit?: number;
|
|
97
27
|
};
|
|
98
28
|
};
|
|
99
|
-
export declare const REST_API_OperationContextSchema: z.ZodObject<{
|
|
100
|
-
callTimestamp: z.ZodISODateTime;
|
|
101
|
-
callDuration: z.ZodOptional<z.ZodNumber>;
|
|
102
|
-
errorReason: z.ZodOptional<z.ZodString>;
|
|
103
|
-
requestMethod: z.ZodEnum<typeof API_HttpMethod>;
|
|
104
|
-
requestPath: z.ZodString;
|
|
105
|
-
requestUrl: z.ZodString;
|
|
106
|
-
responseStatus: z.ZodNumber;
|
|
107
|
-
responseStatusText: z.ZodOptional<z.ZodString>;
|
|
108
|
-
rateLimitRemaining: z.ZodOptional<z.ZodNumber>;
|
|
109
|
-
rateLimitReset: z.ZodOptional<z.ZodString>;
|
|
110
|
-
retryCount: z.ZodOptional<z.ZodNumber>;
|
|
111
|
-
}, z.core.$strip>;
|
|
112
|
-
export type REST_API_OperationContext = z.infer<typeof REST_API_OperationContextSchema>;
|
|
113
|
-
export type REST_API_OperationDefinition = ExternalProvider_OperationDefinition_Base & {
|
|
114
|
-
spec: REST_API_OperationSpec;
|
|
115
|
-
operationContextSchema: typeof REST_API_OperationContextSchema;
|
|
116
|
-
};
|
|
117
29
|
export declare const REST_APIProvider_StatusSchema: z.ZodObject<{
|
|
118
30
|
status: z.ZodEnum<typeof import("..").ExternalProvider_Status>;
|
|
119
31
|
lastCheckedAt: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rest-api.external-connectors-models.schemas.d.ts","sourceRoot":"","sources":["../../../../src/protocols/rest-api.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"rest-api.external-connectors-models.schemas.d.ts","sourceRoot":"","sources":["../../../../src/protocols/rest-api.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,sCAAsC,EAEtC,8CAA8C,EAC9C,oDAAoD,EACrD,MAAM,oDAAoD,CAAC;AAoC5D,MAAM,MAAM,yBAAyB,GAAG,8CAA8C,GAAG;IACvF,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAGxC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAC/B,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;QAChB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC,CAAC;IAEH;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;CAChC,CAAC;AAMF,MAAM,MAAM,+BAA+B,GAAG,oDAAoD,GAAG;IACnG,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IAGxB,UAAU,CAAC,EAAE;QACX,KAAK,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;QAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;CACH,CAAC;AAMF,eAAO,MAAM,6BAA6B;;;;;;iBAGxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
|
|
@@ -1,87 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
3
|
-
import { ExternalProvider_OperationContextSchema } from "../core/operations.external-connectors-models.schemas.js";
|
|
4
|
-
//===============================================================
|
|
5
|
-
// REST API Provider
|
|
6
|
-
// --------
|
|
7
|
-
// Integration with REST APIs. Uses Zod schemas for request/response
|
|
8
|
-
// definitions. OpenAPI-compatible concepts mapped to Zod types.
|
|
9
|
-
//===============================================================
|
|
10
|
-
// ===============================================================
|
|
11
|
-
// Parameter Location & Content Types
|
|
12
|
-
// ===============================================================
|
|
13
|
-
export var API_ParameterIn;
|
|
14
|
-
(function (API_ParameterIn) {
|
|
15
|
-
API_ParameterIn["QUERY"] = "query";
|
|
16
|
-
API_ParameterIn["HEADER"] = "header";
|
|
17
|
-
API_ParameterIn["PATH"] = "path";
|
|
18
|
-
API_ParameterIn["COOKIE"] = "cookie";
|
|
19
|
-
})(API_ParameterIn || (API_ParameterIn = {}));
|
|
20
|
-
export var API_ContentType;
|
|
21
|
-
(function (API_ContentType) {
|
|
22
|
-
API_ContentType["JSON"] = "application/json";
|
|
23
|
-
API_ContentType["XML"] = "application/xml";
|
|
24
|
-
API_ContentType["FORM_URLENCODED"] = "application/x-www-form-urlencoded";
|
|
25
|
-
API_ContentType["MULTIPART_FORM"] = "multipart/form-data";
|
|
26
|
-
API_ContentType["TEXT_PLAIN"] = "text/plain";
|
|
27
|
-
API_ContentType["OCTET_STREAM"] = "application/octet-stream";
|
|
28
|
-
})(API_ContentType || (API_ContentType = {}));
|
|
29
|
-
// ===============================================================
|
|
30
|
-
// API Parameter (for path, query, header params)
|
|
31
|
-
// ===============================================================
|
|
32
|
-
export const API_ParameterSchema = z.object({
|
|
33
|
-
name: z.string(),
|
|
34
|
-
in: z.enum(API_ParameterIn),
|
|
35
|
-
description: z.string().optional(),
|
|
36
|
-
required: z.boolean().default(false),
|
|
37
|
-
deprecated: z.boolean().optional(),
|
|
38
|
-
// Schema is a Zod schema reference (stored as string for serialization)
|
|
39
|
-
schemaRef: z.string().optional(), // Reference to a named schema
|
|
40
|
-
// Or inline type info
|
|
41
|
-
type: z.enum(["string", "number", "integer", "boolean", "array"]).optional(),
|
|
42
|
-
format: z.string().optional(), // e.g., "date-time", "email", "uuid"
|
|
43
|
-
enumValues: z.array(z.string()).optional(),
|
|
44
|
-
defaultValue: z.unknown().optional(),
|
|
45
|
-
});
|
|
46
|
-
// ===============================================================
|
|
47
|
-
// REST API Operation Spec
|
|
48
|
-
// ===============================================================
|
|
49
|
-
export const REST_API_OperationSpecSchema = z.object({
|
|
50
|
-
// HTTP specifics
|
|
51
|
-
method: z.enum(API_HttpMethod),
|
|
52
|
-
path: z.string(), // e.g., "/users/{userId}/posts"
|
|
53
|
-
// Parameters
|
|
54
|
-
parameters: z.array(API_ParameterSchema).optional(),
|
|
55
|
-
// Request/Response content types
|
|
56
|
-
requestContentType: z.enum(API_ContentType).optional(),
|
|
57
|
-
responseContentType: z.enum(API_ContentType).optional(),
|
|
58
|
-
// Rate limiting hints
|
|
59
|
-
rateLimit: z.object({
|
|
60
|
-
requests: z.number(),
|
|
61
|
-
period: z.enum(["second", "minute", "hour", "day"]),
|
|
62
|
-
}).optional(),
|
|
63
|
-
// Tags for grouping
|
|
64
|
-
tags: z.array(z.string()).optional(),
|
|
65
|
-
// Deprecation
|
|
66
|
-
deprecated: z.boolean().optional(),
|
|
67
|
-
});
|
|
68
|
-
// ===============================================================
|
|
69
|
-
// REST API Operation Context (for tracking)
|
|
70
|
-
// ===============================================================
|
|
71
|
-
export const REST_API_OperationContextSchema = ExternalProvider_OperationContextSchema.extend({
|
|
72
|
-
// Request details
|
|
73
|
-
requestMethod: z.enum(API_HttpMethod),
|
|
74
|
-
requestPath: z.string(),
|
|
75
|
-
requestUrl: z.string(),
|
|
76
|
-
// Response details
|
|
77
|
-
responseStatus: z.number(),
|
|
78
|
-
responseStatusText: z.string().optional(),
|
|
79
|
-
// Rate limit info
|
|
80
|
-
rateLimitRemaining: z.number().optional(),
|
|
81
|
-
rateLimitReset: z.string().optional(),
|
|
82
|
-
// Retry info
|
|
83
|
-
retryCount: z.number().optional(),
|
|
84
|
-
});
|
|
2
|
+
import { ExternalProvider_ExchangeProtocol_Kind, ExternalProvider_ExchangeProtocol_Status_BaseSchema } from "../core/commons.external-connectors-models.schemas.js";
|
|
85
3
|
// ===============================================================
|
|
86
4
|
// STATUS
|
|
87
5
|
// ===============================================================
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rest-api.external-connectors-models.schemas.js","sourceRoot":"","sources":["../../../../src/protocols/rest-api.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"rest-api.external-connectors-models.schemas.js","sourceRoot":"","sources":["../../../../src/protocols/rest-api.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,sCAAsC,EACtC,mDAAmD,EAGpD,MAAM,oDAAoD,CAAC;AA2E5D,kEAAkE;AAClE,SAAS;AACT,kEAAkE;AAElE,MAAM,CAAC,MAAM,6BAA6B,GAAG,mDAAmD,CAAC,MAAM,CAAC;IACtG,YAAY,EAAE,CAAC,CAAC,OAAO,CAAC,sCAAsC,CAAC,QAAQ,CAAC;IACxE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAClC,CAAC,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { \n ExternalProvider_ExchangeProtocol_Kind, \n ExternalProvider_ExchangeProtocol_Status_BaseSchema, \n ExternalProvider_ExchangeProtocol_Profile_Base, \n ExternalProvider_ExchangeProtocol_Configuration_Base \n} from \"../core/commons.external-connectors-models.schemas\";\n\n//===============================================================\n// REST API Provider\n// --------\n// WHERE a REST API lives and how this application is configured against it:\n// base URL, version, default headers, server variables, timeouts, retries and\n// pagination defaults, plus the protocol's status shape.\n//\n// WHAT can be called against it is NOT here. A provider's callable operations\n// live on the `rest` arm of `BackendProviderRuntimeContract`\n// (`@wildo-ai/external-connectors-private/backend-runtime`) as\n// `ProviderRestOperation`, and `ProviderOperationExecutorBackendService`\n// executes them — one door, whether the catalogue was hand-authored or emitted\n// by the build-time mapper that scrapes an external source (plan D4/D8).\n//\n// This module DESCRIBED operations too, until 2026-09-06 (#331): an\n// OpenAPI-shaped `REST_API_OperationSpecSchema` / `REST_API_OperationContextSchema`\n// / `REST_API_OperationDefinition` with `API_Parameter`, `API_ParameterIn` and\n// `API_ContentType` beneath them. Ten exported symbols, and a repo-wide sweep\n// (`command grep -r`, hidden and gitignored trees included) found ZERO code\n// readers anywhere: nothing built one, nothing executed one, and a provider that\n// authored one would have compiled, shipped, and been invisible to every runtime.\n//\n// They are deleted rather than wired up, and that is the decision worth keeping:\n// a second description of \"what a provider can do\" is not a missing feature, it\n// is the drift that makes an authoring surface untrustworthy — an author cannot\n// tell which of two shapes is the one that runs. If an OpenAPI document is ever\n// read (D11 keeps it as a second MAPPER INPUT, deferred per vendor), it feeds\n// `ProviderRestOperation` like every other source. It does not come back here.\n//===============================================================\n\n// ===============================================================\n// REST API Provider Profile\n// ===============================================================\n\nexport type REST_API_Provider_Profile = ExternalProvider_ExchangeProtocol_Profile_Base & {\n baseURL: string;\n version?: string; // API version (e.g., \"v1\", \"2024-01-01\")\n \n // Default headers for all requests\n defaultHeaders?: Record<string, string>;\n \n // Server variables for templated URLs\n serverVariables?: Record<string, {\n default: string;\n enum?: string[];\n description?: string;\n }>;\n \n /** \n * Common error schema for this API\n * Used for standardized error handling across all operations\n * Individual operations can override with their own error schema if needed\n */\n errorSchema?: z.ZodSchema<any>;\n};\n\n// ===============================================================\n// REST API Provider Configuration\n// ===============================================================\n\nexport type REST_API_Provider_Configuration = ExternalProvider_ExchangeProtocol_Configuration_Base & {\n defaultTimeout?: number; // ms\n defaultRetries?: number;\n \n // Pagination settings\n pagination?: {\n style: \"offset\" | \"cursor\" | \"page\" | \"link\";\n pageParam?: string;\n limitParam?: string;\n defaultLimit?: number;\n };\n};\n\n// ===============================================================\n// STATUS\n// ===============================================================\n\nexport const REST_APIProvider_StatusSchema = ExternalProvider_ExchangeProtocol_Status_BaseSchema.extend({\n protocolKind: z.literal(ExternalProvider_ExchangeProtocol_Kind.REST_API),\n apiVersion: z.string().optional(),\n});\nexport type REST_APIProvider_Status = z.infer<typeof REST_APIProvider_StatusSchema>;\n"]}
|
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The REST OPERATION vocabulary — what an operation IS, independent of who executes one.
|
|
3
|
+
*
|
|
4
|
+
* Moved here from `@wildo-ai/external-connectors-private/backend` on 2026-09-06 (#378), and the
|
|
5
|
+
* reason is a measurement rather than tidiness. A generated provider's operation catalogue is loaded
|
|
6
|
+
* LAZILY on purpose: the loader contract forbids evaluating it at boot, because a provider whose
|
|
7
|
+
* operations are eager puts every vendor's operations into every process's boot graph. But the
|
|
8
|
+
* catalogue module needs `ProviderRestParameterLocation` and `ProviderRestRequestBodyEncoding` as
|
|
9
|
+
* VALUES, and their only public door was the backend barrel — so reading two string enums pulled the
|
|
10
|
+
* entire backend provider surface in behind them:
|
|
11
|
+
*
|
|
12
|
+
* | import | heap | time |
|
|
13
|
+
* |---|---|---|
|
|
14
|
+
* | `@wildo-ai/external-connectors-models` | 20.8 MB | 39 ms |
|
|
15
|
+
* | `@wildo-ai/external-connectors-private/backend` | 160.7 MB | 251 ms |
|
|
16
|
+
*
|
|
17
|
+
* 161 MB to answer "is this parameter in the path or the query". The vocabulary belongs here for a
|
|
18
|
+
* reason that survives the measurement, too: it describes what an operation IS — its method, its
|
|
19
|
+
* path template, where its parameters ride — and none of that is backend runtime. The arrow already
|
|
20
|
+
* pointed this way, since this package has no dependency on the private backend and the private
|
|
21
|
+
* backend depends on it.
|
|
22
|
+
*/
|
|
23
|
+
import { z } from 'zod';
|
|
24
|
+
import { API_HttpMethod } from '../core/commons.external-connectors-models.schemas';
|
|
25
|
+
import { ExternalOperation_Classification } from '../core/operation-classification.external-connectors-models.schemas';
|
|
26
|
+
import type { ExternalProvider_ConnectionTarget } from '../core/security.external-connectors-models.schemas';
|
|
27
|
+
/** Where a declared parameter rides on the wire. */
|
|
28
|
+
export declare enum ProviderRestParameterLocation {
|
|
29
|
+
/** Substituted into a `{token}` of the path template. Always required — a path cannot have a hole. */
|
|
30
|
+
PATH = "path",
|
|
31
|
+
QUERY = "query",
|
|
32
|
+
HEADER = "header"
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* How the request body is encoded. The ETL read surface only ever needed JSON; a hand-authored
|
|
36
|
+
* write reaches vendors that take form bodies (OAuth-adjacent endpoints, older CRMs) and file
|
|
37
|
+
* uploads, so the encoding is DECLARED per operation rather than inferred from the method.
|
|
38
|
+
*/
|
|
39
|
+
export declare enum ProviderRestRequestBodyEncoding {
|
|
40
|
+
JSON = "json",
|
|
41
|
+
FORM_URLENCODED = "form-urlencoded",
|
|
42
|
+
MULTIPART = "multipart",
|
|
43
|
+
/** A raw text body; `contentType` on the declaration says which media type is sent. */
|
|
44
|
+
TEXT = "text"
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* How a listing operation continues. A HINT the caller reads, never something the executor acts
|
|
48
|
+
* on: an executor that paged on its own would decide a caller's memory budget for it, and the
|
|
49
|
+
* ETL lane already owns paging as a discipline (drift-safe continuation only).
|
|
50
|
+
*/
|
|
51
|
+
export declare enum ProviderRestPaginationStyle {
|
|
52
|
+
OFFSET = "offset",
|
|
53
|
+
PAGE = "page",
|
|
54
|
+
CURSOR = "cursor",
|
|
55
|
+
/** The vendor returns its own continuation URL (`@odata.nextLink`, `links.next`). */
|
|
56
|
+
LINK = "link"
|
|
57
|
+
}
|
|
58
|
+
/** One declared parameter: a wire name, where it rides, and which input field feeds it. */
|
|
59
|
+
export interface ProviderRestOperationParameter {
|
|
60
|
+
/** The name ON THE WIRE (`page_size`, `X-Vendor-Version`, or the `{token}` in the path). */
|
|
61
|
+
readonly name: string;
|
|
62
|
+
readonly in: ProviderRestParameterLocation;
|
|
63
|
+
/**
|
|
64
|
+
* The INPUT field that feeds it, when the two differ (`pageSize` → `page_size`). Absent means
|
|
65
|
+
* the input field is spelled exactly like the wire name. Declared, never camel/snake-guessed:
|
|
66
|
+
* a guess that is wrong drops a parameter silently and the vendor answers a valid-looking
|
|
67
|
+
* default page.
|
|
68
|
+
*/
|
|
69
|
+
readonly from?: string;
|
|
70
|
+
/** PATH parameters are required whatever this says; for QUERY/HEADER, absent means optional. */
|
|
71
|
+
readonly required?: boolean;
|
|
72
|
+
/** A literal value sent on every call — for a version pin or a fixed format selector. */
|
|
73
|
+
readonly constantValue?: string;
|
|
74
|
+
readonly description?: string;
|
|
75
|
+
}
|
|
76
|
+
/** How the request body is built from the operation's input. */
|
|
77
|
+
export interface ProviderRestOperationRequestBody {
|
|
78
|
+
readonly encoding: ProviderRestRequestBodyEncoding;
|
|
79
|
+
/**
|
|
80
|
+
* The input field carrying the whole body. Absent = the body is every input field NOT consumed
|
|
81
|
+
* by a declared parameter — the ordinary shape, and the reason parameters declare `from`.
|
|
82
|
+
*/
|
|
83
|
+
readonly from?: string;
|
|
84
|
+
/** For `TEXT`: the media type actually sent (`text/csv`, `application/xml`). */
|
|
85
|
+
readonly contentType?: string;
|
|
86
|
+
}
|
|
87
|
+
/** Where the payload sits inside a response, and how a listing continues. */
|
|
88
|
+
export interface ProviderRestOperationPagination {
|
|
89
|
+
readonly style: ProviderRestPaginationStyle;
|
|
90
|
+
/** OFFSET/PAGE/CURSOR: the request parameter names the caller advances. */
|
|
91
|
+
readonly limitParam?: string;
|
|
92
|
+
readonly offsetParam?: string;
|
|
93
|
+
readonly pageParam?: string;
|
|
94
|
+
readonly cursorParam?: string;
|
|
95
|
+
/** CURSOR/LINK: dot-path in the RESPONSE carrying the next cursor or the next URL. */
|
|
96
|
+
readonly nextPath?: string;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* A provider operation, hand-authored. The unit an application addresses:
|
|
100
|
+
* `executeProviderOperation({ providerRef: 'slack', operationId: 'conversations.list', input })`.
|
|
101
|
+
*/
|
|
102
|
+
export interface ProviderRestOperation {
|
|
103
|
+
/** Unique within the provider, and the address an ETL binding reference uses. */
|
|
104
|
+
readonly operationId: string;
|
|
105
|
+
/**
|
|
106
|
+
* The lazy-load unit. `operations('conversations')` answers only this domain's operations, so a
|
|
107
|
+
* vendor with hundreds need not evaluate them all to run one.
|
|
108
|
+
*/
|
|
109
|
+
readonly domain: string;
|
|
110
|
+
readonly method: API_HttpMethod;
|
|
111
|
+
/** Relative to the provider's base URL. `{token}` interpolates a PATH parameter of that name. */
|
|
112
|
+
readonly pathTemplate: string;
|
|
113
|
+
readonly summary?: string;
|
|
114
|
+
/**
|
|
115
|
+
* Whether the operation MUTATES the vendor.
|
|
116
|
+
*
|
|
117
|
+
* ONE vocabulary for every operation catalogue, whatever produced it: a hand-authored operation
|
|
118
|
+
* and a generated one are the same concept, and two enums over the same two values is precisely
|
|
119
|
+
* the drift D1 exists to remove. Read by an ETL binding reference (which refuses to serve a read
|
|
120
|
+
* surface from a WRITE), by the audit trail as the axis a reviewer filters on first, and by a UI
|
|
121
|
+
* deciding whether to confirm.
|
|
122
|
+
*
|
|
123
|
+
* The name carried a source catalogue's spelling until 2026-09-06 and no longer does — an
|
|
124
|
+
* operation's EFFECT is not a property of where its definition came from.
|
|
125
|
+
*/
|
|
126
|
+
readonly classification: ExternalOperation_Classification;
|
|
127
|
+
readonly parameters?: readonly ProviderRestOperationParameter[];
|
|
128
|
+
readonly requestBody?: ProviderRestOperationRequestBody;
|
|
129
|
+
/**
|
|
130
|
+
* Zod schema the caller's input is parsed through BEFORE anything is compiled. A typed client
|
|
131
|
+
* (S3b) derives its argument type from it. Absent = the input is passed through unvalidated,
|
|
132
|
+
* which is legal for a thin wrapper and honest about carrying no contract.
|
|
133
|
+
*/
|
|
134
|
+
readonly inputSchema?: z.ZodType;
|
|
135
|
+
/**
|
|
136
|
+
* Zod schema the RESPONSE is parsed through. Absent = the parsed body is returned as `unknown`.
|
|
137
|
+
* A vendor adding a field must never break a call, so authors should keep these permissive; the
|
|
138
|
+
* value is in naming the fields a caller may rely on, not in policing the vendor.
|
|
139
|
+
*/
|
|
140
|
+
readonly outputSchema?: z.ZodType;
|
|
141
|
+
/** Dot-path to the payload inside the response body. Absent = the body IS the payload. */
|
|
142
|
+
readonly resultPath?: string;
|
|
143
|
+
readonly pagination?: ProviderRestOperationPagination;
|
|
144
|
+
/**
|
|
145
|
+
* OAuth scopes (or vendor permission names) the credential must carry. DECLARED in S3a and not
|
|
146
|
+
* yet CHECKED: checking it needs the composed registry's view of the secrets contract, which is
|
|
147
|
+
* #329's. Recorded as owed rather than half-enforced — a check that silently passes is worse
|
|
148
|
+
* than no check.
|
|
149
|
+
*/
|
|
150
|
+
readonly requiredScopes?: readonly string[];
|
|
151
|
+
/**
|
|
152
|
+
* Whether re-sending this request is safe. Absent = derived from the method: GET, HEAD, OPTIONS,
|
|
153
|
+
* PUT and DELETE are idempotent, POST and PATCH are not.
|
|
154
|
+
* spec-cite: RFC 9110 §9.2.2 (PUT, DELETE and the safe methods are idempotent) and §9.2.1
|
|
155
|
+
* (GET, HEAD, OPTIONS, TRACE are safe).
|
|
156
|
+
* Declare it TRUE on a POST the vendor documents as idempotent (an idempotency-key endpoint);
|
|
157
|
+
* declaring it wrongly is how a retried timeout charges a customer twice.
|
|
158
|
+
*/
|
|
159
|
+
readonly idempotent?: boolean;
|
|
160
|
+
/** Narrows the provider's semantics for this one operation (a slow export, a tight endpoint). */
|
|
161
|
+
readonly remoteCallSemantics?: Partial<ProviderRestCallSemantics>;
|
|
162
|
+
/** Set when the vendor has deprecated it; the executor logs once per operation, never refuses. */
|
|
163
|
+
readonly deprecated?: {
|
|
164
|
+
readonly reason: string;
|
|
165
|
+
readonly since?: string;
|
|
166
|
+
readonly replacedByOperationId?: string;
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
/** What one `operations(domain?)` call answers. */
|
|
170
|
+
export interface ProviderRestOperationCatalogue {
|
|
171
|
+
/** The domains this load carries — the whole set when called with no argument. */
|
|
172
|
+
readonly domains: readonly string[];
|
|
173
|
+
/** Keyed by `operationId`. */
|
|
174
|
+
readonly operations: Readonly<Record<string, ProviderRestOperation>>;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* The lazy catalogue loader — the seam #330's host loader consumes (interface note on #331).
|
|
178
|
+
*
|
|
179
|
+
* MUST NOT be called during composition, discovery or boot: it exists so a provider package can
|
|
180
|
+
* `import()` its own operation module only when a run needs it, and calling it at boot puts every
|
|
181
|
+
* provider's operations back into every process's boot graph, which is the thing on-demand
|
|
182
|
+
* loading exists to remove. Async, idempotent, and memoized by the executor per
|
|
183
|
+
* `(providerRef, domain)` — a loader may assume one call per pair and must stay correct on two.
|
|
184
|
+
*
|
|
185
|
+
* The values it returns carry live Zod schemas, so a catalogue is an IN-PROCESS value and is
|
|
186
|
+
* never serializable into a runtime artifact or any JSON the CLI emits.
|
|
187
|
+
*/
|
|
188
|
+
export type ProviderRestOperationCatalogueLoader = (domain?: string) => Promise<ProviderRestOperationCatalogue>;
|
|
189
|
+
/**
|
|
190
|
+
* Provider-level call semantics: the defaults every operation of this provider runs under.
|
|
191
|
+
*
|
|
192
|
+
* Structurally the executable subset of the ETL's `HttpApiRemoteCallSemantics`, and deliberately
|
|
193
|
+
* NOT that type: the ETL's lives in `@wildo-ai/saas-models/external-data` and carries
|
|
194
|
+
* `maxIdSetSize`, an ETL query-translation bound that means nothing to a provider operation.
|
|
195
|
+
* Importing it here would point the PROVIDER contract at the ETL read surface — backwards, since
|
|
196
|
+
* the ETL references provider operations and not the reverse. Three fields is the price of
|
|
197
|
+
* keeping that arrow pointing the right way.
|
|
198
|
+
*/
|
|
199
|
+
export interface ProviderRestCallSemantics {
|
|
200
|
+
/** Per-attempt timeout. */
|
|
201
|
+
readonly timeoutMs: number;
|
|
202
|
+
readonly retry: {
|
|
203
|
+
/** Total attempts including the first; 1 disables retry. */
|
|
204
|
+
readonly maxAttempts: number;
|
|
205
|
+
/** Linear backoff base — attempt N waits `backoffMs * (N - 1)`. */
|
|
206
|
+
readonly backoffMs: number;
|
|
207
|
+
};
|
|
208
|
+
/** A local sliding-window ceiling; the call REFUSES when exhausted rather than queueing. */
|
|
209
|
+
readonly maxRequestsPerMinute?: number;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* A provider whose credential is MINTED by an authorization-code exchange rather than pasted.
|
|
213
|
+
*
|
|
214
|
+
* Recorded because the source catalogues state it and nothing else does. 131 of the 699 transposed
|
|
215
|
+
* vendors declare OAuth2, and their authorize URL, token URL and scopes exist nowhere in this
|
|
216
|
+
* repository except the catalogue that was read — so extracting them and keeping them only in a
|
|
217
|
+
* comment (which is what the transposer did until 2026-09-07) means the delegated-authorization lane
|
|
218
|
+
* re-derives 131 vendors' endpoints by hand.
|
|
219
|
+
*
|
|
220
|
+
* ## What it does NOT change
|
|
221
|
+
*
|
|
222
|
+
* The wire placement. An OAuth2 access token rides in the same header as an API key —
|
|
223
|
+
* `Authorization: Bearer …` — so `apiKey.headerName` and `apiKey.prefix` still describe the request,
|
|
224
|
+
* and `apiKey.secretRef` still names the slot the credential is read from. What this block adds is
|
|
225
|
+
* where that value COMES FROM: an exchange, per organization or per user, refreshable — rather than
|
|
226
|
+
* an operator pasting a long-lived token into an environment variable.
|
|
227
|
+
*
|
|
228
|
+
* That distinction is the whole point. Without it a provider declares a static bearer key and, if an
|
|
229
|
+
* operator happens to paste a long-lived token, WORKS — while advertising a credential model the
|
|
230
|
+
* vendor does not offer, with no authorize step, no refresh and no per-tenant token. A wrong
|
|
231
|
+
* configuration that works is worse than one that fails, because nothing surfaces it.
|
|
232
|
+
*
|
|
233
|
+
* The FLOW is not here and is not implied: connected accounts, the authorization round trip, refresh
|
|
234
|
+
* and revocation are their own lane. This is the declaration that lane consumes.
|
|
235
|
+
*/
|
|
236
|
+
export interface ProviderRestOAuth2 {
|
|
237
|
+
/** Where the user is sent to grant access. Carries the vendor's own default scopes when it states them. */
|
|
238
|
+
readonly authorizeUrl: string;
|
|
239
|
+
/** Where an authorization code (or a refresh token) is exchanged for an access token. */
|
|
240
|
+
readonly tokenUrl: string;
|
|
241
|
+
/**
|
|
242
|
+
* Scopes the vendor's own catalogue entry asked for. Advisory rather than enforced: an application
|
|
243
|
+
* may need fewer, and an operation's `requiredScopes` is the finer statement. Kept because it is
|
|
244
|
+
* the only record of what the vendor expects for the operations transposed beside it.
|
|
245
|
+
*/
|
|
246
|
+
readonly scopes?: readonly string[];
|
|
247
|
+
/**
|
|
248
|
+
* Env-var names resolving the APPLICATION's registration with the vendor. These are the two values
|
|
249
|
+
* an operator genuinely does paste — they identify the integration, not the end user — and they
|
|
250
|
+
* are separate from `apiKey.secretRef`, which names the minted access token.
|
|
251
|
+
*/
|
|
252
|
+
readonly clientIdSecretRef?: string;
|
|
253
|
+
readonly clientSecretSecretRef?: string;
|
|
254
|
+
/**
|
|
255
|
+
* Placeholders the endpoints above carry, which a CONNECTION must supply before either URL is a
|
|
256
|
+
* URL at all — `{cloud}`, `{tenantId}`, `{region}`, `{domain}`.
|
|
257
|
+
*
|
|
258
|
+
* Measured over the transposed catalogue on 2026-09-08: of the 96 vendors that recovered both
|
|
259
|
+
* endpoints, **21 carry at least one placeholder**, led by `{cloud}` (18), `{location}` (10) and
|
|
260
|
+
* `{tenantId}` (6). Microsoft's authorize URL is
|
|
261
|
+
* `https://{cloud}/{tenantId}/oauth2/v2.0/authorize`, and no amount of application configuration
|
|
262
|
+
* supplies those: which Azure cloud and which directory are facts about the ACCOUNT BEING
|
|
263
|
+
* CONNECTED, known only to the person connecting it.
|
|
264
|
+
*
|
|
265
|
+
* So this is not decoration on the endpoint strings — it is the difference between a vendor that
|
|
266
|
+
* can be connected and one that cannot. Without it the flow would build
|
|
267
|
+
* `https://{cloud}/…/authorize`, send somebody to a hostname containing a brace, and fail in the
|
|
268
|
+
* browser rather than at the point where the missing input could have been asked for.
|
|
269
|
+
*
|
|
270
|
+
* DERIVED from the endpoint strings rather than authored, so a vendor whose URL gains a
|
|
271
|
+
* placeholder declares one the next time the batch runs. Absent — not empty — when the endpoints
|
|
272
|
+
* are plain, which is the common case and must stay distinguishable from "nobody has looked".
|
|
273
|
+
*
|
|
274
|
+
* Deliberately NOT a judgement about which connections a provider admits. That is a recorded
|
|
275
|
+
* decision in the catalogue record and is never read from a vendor's API surface; this is a
|
|
276
|
+
* mechanical fact about a string.
|
|
277
|
+
*/
|
|
278
|
+
readonly connectionParameters?: readonly string[];
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Vendors whose credential is COMPUTED per request rather than sent as a fixed header.
|
|
282
|
+
*
|
|
283
|
+
* A static header covers bearer tokens and API keys, which is most of the world. It cannot express a
|
|
284
|
+
* signature: AWS Signature Version 4 signs the method, the canonical path, the sorted query, a
|
|
285
|
+
* subset of headers, a SHA-256 of the payload and a timestamp, with a key derived from the secret,
|
|
286
|
+
* the date, the region and the service — so the header's VALUE differs for every request and none of
|
|
287
|
+
* its inputs exist when a provider module is authored.
|
|
288
|
+
*
|
|
289
|
+
* Until this existed, such a vendor could not be expressed at all — not badly, not partially. There
|
|
290
|
+
* was no `if` to write, because the field where the answer goes did not exist. 45 transposed actions
|
|
291
|
+
* across `amazon-s3`, `amazon-ses`, `amazon-textract`, `amazon-secrets-manager`, `amazon-sqs`,
|
|
292
|
+
* `amazon-bedrock`, `azure-blob-storage`, `azure-communication-services` and `azure-openai` are
|
|
293
|
+
* blocked on it (#373).
|
|
294
|
+
*/
|
|
295
|
+
export declare enum ProviderRestSigningScheme {
|
|
296
|
+
/**
|
|
297
|
+
* AWS Signature Version 4 — the `Authorization: AWS4-HMAC-SHA256 …` scheme used by every current
|
|
298
|
+
* AWS service API.
|
|
299
|
+
* spec-cite: AWS General Reference, "Signature Version 4 signing process"
|
|
300
|
+
* (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv4-signing-process.html)
|
|
301
|
+
*/
|
|
302
|
+
AWS_SIGV4 = "AWS_SIGV4",
|
|
303
|
+
/**
|
|
304
|
+
* Azure Storage shared-key — `Authorization: SharedKey <account>:<signature>` over a canonicalized
|
|
305
|
+
* request and resource.
|
|
306
|
+
* spec-cite: Azure Storage REST, "Authorize with Shared Key"
|
|
307
|
+
* (https://learn.microsoft.com/en-us/rest/api/storageservices/authorize-with-shared-key)
|
|
308
|
+
*/
|
|
309
|
+
AZURE_SHARED_KEY = "AZURE_SHARED_KEY"
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* How a provider signs each request.
|
|
313
|
+
*
|
|
314
|
+
* Declared by the provider module and executed by the engine, with NO vendor branch in the executor:
|
|
315
|
+
* the scheme is data, and the signer dispatches on it exhaustively. That is the same discipline the
|
|
316
|
+
* rest of the provider contract keeps — a consumer branches on a contract field, never on a
|
|
317
|
+
* provider ref.
|
|
318
|
+
*
|
|
319
|
+
* The credential is TWO values for both schemes (an identity and a secret), and optionally a third
|
|
320
|
+
* for temporary credentials, which is why it cannot ride in the single `apiKey.secretRef` slot.
|
|
321
|
+
*/
|
|
322
|
+
export interface ProviderRestRequestSigning {
|
|
323
|
+
readonly scheme: ProviderRestSigningScheme;
|
|
324
|
+
/** Env-var naming the identity half — an AWS access-key id, an Azure storage account name. */
|
|
325
|
+
readonly keyIdSecretRef: string;
|
|
326
|
+
/** Env-var naming the secret half. */
|
|
327
|
+
readonly secretKeySecretRef: string;
|
|
328
|
+
/**
|
|
329
|
+
* Env-var naming a session token, for temporary credentials (STS, a role assumption). Absent means
|
|
330
|
+
* long-lived credentials; present-but-unset is treated as long-lived rather than as an error,
|
|
331
|
+
* because the same provider serves both.
|
|
332
|
+
*/
|
|
333
|
+
readonly sessionTokenSecretRef?: string;
|
|
334
|
+
/**
|
|
335
|
+
* AWS_SIGV4: the region and service that scope the derived key. Both are part of the SIGNATURE,
|
|
336
|
+
* not merely of the URL, so a wrong value fails authentication rather than routing — which is why
|
|
337
|
+
* they are declared rather than parsed out of the host.
|
|
338
|
+
*/
|
|
339
|
+
readonly region?: string;
|
|
340
|
+
readonly service?: string;
|
|
341
|
+
/**
|
|
342
|
+
* Env-var overriding {@link region} per deployment, for an application that runs in more than one.
|
|
343
|
+
* The declared value is the default.
|
|
344
|
+
*/
|
|
345
|
+
readonly regionEnvVarName?: string;
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* The one function a generated typed client needs, as a TYPE.
|
|
349
|
+
*
|
|
350
|
+
* A generated provider package must not import the engine's runtime to be callable: that would put
|
|
351
|
+
* the whole backend into the module graph of anything that touches a vendor, which is precisely the
|
|
352
|
+
* weight #378 removed (models 20.8 MB against the backend barrel's 160.7 MB). So a client is a
|
|
353
|
+
* FACTORY that takes the executor as an argument — the application wires its own, the package
|
|
354
|
+
* declares only this signature, and nothing crosses at runtime.
|
|
355
|
+
*
|
|
356
|
+
* R3's ergonomics bought with a type rather than a dependency.
|
|
357
|
+
*
|
|
358
|
+
* ## The connection is a parameter, and OPTIONAL for a reason that is not convenience
|
|
359
|
+
*
|
|
360
|
+
* Omitted means the application's own account, acting as itself — the floor, and the only connection
|
|
361
|
+
* that needs no store and no authorization. That default is what keeps the ordinary single-account
|
|
362
|
+
* call as short as it should be.
|
|
363
|
+
*
|
|
364
|
+
* It could not be anything BUT a parameter. One execution may legitimately spend several tenants'
|
|
365
|
+
* accounts — a user action pushing a message to every organization that user belongs to — so a client
|
|
366
|
+
* that read the owner from ambient state could not vary it per call, and the fan-out would be
|
|
367
|
+
* inexpressible through the generated surface even though the engine beneath it supports one.
|
|
368
|
+
*/
|
|
369
|
+
export type ProviderOperationExecute = (providerRef: string, operationId: string, input: Readonly<Record<string, unknown>>, connection?: ExternalProvider_ConnectionTarget) => Promise<unknown>;
|
|
370
|
+
//# sourceMappingURL=rest-operations.external-connectors-models.schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rest-operations.external-connectors-models.schemas.d.ts","sourceRoot":"","sources":["../../../../src/protocols/rest-operations.external-connectors-models.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,oDAAoD,CAAC;AACpF,OAAO,EAAE,gCAAgC,EAAE,MAAM,qEAAqE,CAAC;AACvH,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,qDAAqD,CAAC;AAE7G,oDAAoD;AACpD,oBAAY,6BAA6B;IACvC,sGAAsG;IACtG,IAAI,SAAS;IACb,KAAK,UAAU;IACf,MAAM,WAAW;CAClB;AAED;;;;GAIG;AACH,oBAAY,+BAA+B;IACzC,IAAI,SAAS;IACb,eAAe,oBAAoB;IACnC,SAAS,cAAc;IACvB,uFAAuF;IACvF,IAAI,SAAS;CACd;AAED;;;;GAIG;AACH,oBAAY,2BAA2B;IACrC,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,qFAAqF;IACrF,IAAI,SAAS;CACd;AAED,2FAA2F;AAC3F,MAAM,WAAW,8BAA8B;IAC7C,4FAA4F;IAC5F,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,EAAE,6BAA6B,CAAC;IAC3C;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,gGAAgG;IAChG,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,yFAAyF;IACzF,QAAQ,CAAC,aAAa,CAA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