@stackone/connect-sdk 2.111.0 → 2.113.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/dist/index.cjs +3 -3
- package/dist/index.d.cts +75 -7
- package/dist/index.d.mts +75 -7
- package/dist/index.mjs +3 -3
- package/package.json +2 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Account, Action, ActionAnnotations, AuthType, AuthenticationConfig, AuthenticationField, AuthenticationNotice, Block, BlockContext, Category, Checkpoint, Connector, ConnectorDocumentation, Cursor, CursorPaginationConfig, DataSyncConfig, DeltaTokenIncrementalConfig, Effect, EventToEmit, FlowType, IncrementalConfig, Input, InputLocation, OffsetPaginationConfig, PagePaginationConfig, PaginationConfig, ReleaseStage, Settings, Source, SourceType, Step, StepFunctionName, StepFunctionParams, StepFunctionsFactory, StreamType, SupportConfig, TestActionConfig, TimeFilterIncrementalConfig, TransportType, WebhookSetupPhase, WebhookSetupPhaseKind } from "@stackone/core";
|
|
2
2
|
import { ILogger } from "@stackone/logger";
|
|
3
3
|
import { IOlapClient } from "@stackone/olap";
|
|
4
|
-
import { HttpMethod, IHttpClient } from "@stackone/transport";
|
|
4
|
+
import { HttpMethod, IHttpClient, IMcpClient, McpClientConfig, McpServerProber, McpToolDefinition } from "@stackone/transport";
|
|
5
5
|
import { z } from "@stackone/utils";
|
|
6
|
+
import { ArgumentValue, CedarEvaluator, LevelPolicies, PolicyLevel, PrincipalRef } from "@stackone/policy";
|
|
6
7
|
|
|
7
8
|
//#region \0rolldown/runtime.js
|
|
8
9
|
//#endregion
|
|
@@ -49,6 +50,38 @@ declare const computeCredentialsVerifiedByAuth: (authConfig: AuthenticationConfi
|
|
|
49
50
|
//#region src/connectors/fileReader.d.ts
|
|
50
51
|
declare const loadConnector: (filePath: string) => string;
|
|
51
52
|
//#endregion
|
|
53
|
+
//#region src/connectors/generateMcpConnector.d.ts
|
|
54
|
+
type GenerateMcpConnectorInput = {
|
|
55
|
+
serverUrl: string;
|
|
56
|
+
title: string;
|
|
57
|
+
};
|
|
58
|
+
type GeneratedMcpConnector = {
|
|
59
|
+
yaml: string;
|
|
60
|
+
connector: Connector;
|
|
61
|
+
};
|
|
62
|
+
declare const generateMcpConnector: ({
|
|
63
|
+
serverUrl,
|
|
64
|
+
title
|
|
65
|
+
}: GenerateMcpConnectorInput, probe?: McpServerProber) => Promise<GeneratedMcpConnector>;
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region src/connectors/isMcpConnector.d.ts
|
|
68
|
+
declare const isMcpConnector: (connector: Connector) => boolean;
|
|
69
|
+
//#endregion
|
|
70
|
+
//#region src/connectors/mcpToolActions.d.ts
|
|
71
|
+
type CompletedMcpConnector = {
|
|
72
|
+
yaml: string;
|
|
73
|
+
connector: Connector;
|
|
74
|
+
};
|
|
75
|
+
type CompleteMcpConnectorOptions = {
|
|
76
|
+
headers?: Record<string, string>;
|
|
77
|
+
timeout?: number;
|
|
78
|
+
};
|
|
79
|
+
declare const addMcpToolActions: (yaml: string, tools: McpToolDefinition[]) => CompletedMcpConnector;
|
|
80
|
+
declare const completeMcpConnector: (yaml: string, {
|
|
81
|
+
headers,
|
|
82
|
+
timeout
|
|
83
|
+
}?: CompleteMcpConnectorOptions, createMcpClient?: (config: McpClientConfig) => IMcpClient) => Promise<CompletedMcpConnector>;
|
|
84
|
+
//#endregion
|
|
52
85
|
//#region src/connectors/parsers.d.ts
|
|
53
86
|
declare function parseYamlConnector(yamlFileContents: string): Connector;
|
|
54
87
|
declare const parseActionInputs: (action: Action, inputs: unknown) => Record<string, unknown>;
|
|
@@ -70,7 +103,7 @@ declare const isConnectorReleased: (connector: Connector, allowedStages?: string
|
|
|
70
103
|
declare const applyReleaseStageToConnector: (connector: Connector, allowedStages?: string[]) => Connector | undefined;
|
|
71
104
|
//#endregion
|
|
72
105
|
//#region src/errors/types.d.ts
|
|
73
|
-
type ErrorType = 'CONNECTOR_PARSE_ERROR' | 'MISSING_ACTION_ERROR' | 'INCOMPATIBLE_AUTH_TYPE_ERROR' | 'INVALID_ACTION_INPUTS_ERROR' | 'INVALID_CURSOR_ERROR' | 'INVALID_EVENT_OUTPUT_ERROR';
|
|
106
|
+
type ErrorType = 'CONNECTOR_PARSE_ERROR' | 'MISSING_ACTION_ERROR' | 'INCOMPATIBLE_AUTH_TYPE_ERROR' | 'INVALID_ACTION_INPUTS_ERROR' | 'INVALID_CURSOR_ERROR' | 'INVALID_EVENT_OUTPUT_ERROR' | 'POLICY_DENIED_ERROR';
|
|
74
107
|
//#endregion
|
|
75
108
|
//#region src/errors/connectSDKErrors.d.ts
|
|
76
109
|
type InputValidationError = {
|
|
@@ -96,6 +129,14 @@ declare class IncompatibleAuthTypeError extends ConnectSDKError {
|
|
|
96
129
|
declare class InvalidEventOutputError extends ConnectSDKError {
|
|
97
130
|
constructor(context: BlockContext, message?: string);
|
|
98
131
|
}
|
|
132
|
+
declare class PolicyDeniedError extends ConnectSDKError {
|
|
133
|
+
readonly level: string;
|
|
134
|
+
readonly policyIds: string[];
|
|
135
|
+
constructor(context: BlockContext, details: {
|
|
136
|
+
level: string;
|
|
137
|
+
policyIds: string[];
|
|
138
|
+
}, message?: string);
|
|
139
|
+
}
|
|
99
140
|
//#endregion
|
|
100
141
|
//#region src/connectors/responses.d.ts
|
|
101
142
|
type ValidationErrorResponse = {
|
|
@@ -207,9 +248,9 @@ declare const DELTA_TOKEN_INCREMENTAL_SCHEMA: z.ZodObject<{
|
|
|
207
248
|
iterator: z.ZodObject<{
|
|
208
249
|
key: z.ZodString;
|
|
209
250
|
in: z.ZodEnum<{
|
|
251
|
+
headers: "headers";
|
|
210
252
|
query: "query";
|
|
211
253
|
body: "body";
|
|
212
|
-
headers: "headers";
|
|
213
254
|
}>;
|
|
214
255
|
}, z.core.$strict>;
|
|
215
256
|
response: z.ZodObject<{
|
|
@@ -224,9 +265,9 @@ declare const TIME_FILTER_INCREMENTAL_SCHEMA: z.ZodObject<{
|
|
|
224
265
|
iterator: z.ZodObject<{
|
|
225
266
|
key: z.ZodString;
|
|
226
267
|
in: z.ZodEnum<{
|
|
268
|
+
headers: "headers";
|
|
227
269
|
query: "query";
|
|
228
270
|
body: "body";
|
|
229
|
-
headers: "headers";
|
|
230
271
|
}>;
|
|
231
272
|
}, z.core.$strict>;
|
|
232
273
|
format: z.ZodEnum<{
|
|
@@ -246,9 +287,9 @@ declare const INCREMENTAL_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
246
287
|
iterator: z.ZodObject<{
|
|
247
288
|
key: z.ZodString;
|
|
248
289
|
in: z.ZodEnum<{
|
|
290
|
+
headers: "headers";
|
|
249
291
|
query: "query";
|
|
250
292
|
body: "body";
|
|
251
|
-
headers: "headers";
|
|
252
293
|
}>;
|
|
253
294
|
}, z.core.$strict>;
|
|
254
295
|
format: z.ZodEnum<{
|
|
@@ -265,9 +306,9 @@ declare const INCREMENTAL_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
265
306
|
iterator: z.ZodObject<{
|
|
266
307
|
key: z.ZodString;
|
|
267
308
|
in: z.ZodEnum<{
|
|
309
|
+
headers: "headers";
|
|
268
310
|
query: "query";
|
|
269
311
|
body: "body";
|
|
270
|
-
headers: "headers";
|
|
271
312
|
}>;
|
|
272
313
|
}, z.core.$strict>;
|
|
273
314
|
response: z.ZodObject<{
|
|
@@ -377,6 +418,31 @@ declare const getActionMeta: (connector: Connector, actionId: string, include?:
|
|
|
377
418
|
declare const getActionsMetaSummary: (connector: Connector, include?: string[]) => ConnectorMetaSummary;
|
|
378
419
|
declare const getActionsMetaSummaryFromConnectors: (connectors: Connector[], include?: string[]) => ConnectorMetaSummary[];
|
|
379
420
|
//#endregion
|
|
421
|
+
//#region src/runners/actionPolicy.d.ts
|
|
422
|
+
type ActionPolicy = {
|
|
423
|
+
levels: LevelPolicies[];
|
|
424
|
+
principal?: PrincipalRef;
|
|
425
|
+
client?: string;
|
|
426
|
+
toolName?: string;
|
|
427
|
+
};
|
|
428
|
+
type PolicyOutcome = {
|
|
429
|
+
decision: 'allow';
|
|
430
|
+
} | {
|
|
431
|
+
decision: 'deny';
|
|
432
|
+
level: PolicyLevel;
|
|
433
|
+
policyIds: string[];
|
|
434
|
+
};
|
|
435
|
+
declare const decideInvokeTool: (input: {
|
|
436
|
+
policy: ActionPolicy;
|
|
437
|
+
account: Account;
|
|
438
|
+
action: Pick<Action, "id" | "categories">;
|
|
439
|
+
authType?: AuthType;
|
|
440
|
+
sessionId?: string;
|
|
441
|
+
args?: Record<string, ArgumentValue>;
|
|
442
|
+
logger?: ILogger;
|
|
443
|
+
evaluator?: CedarEvaluator;
|
|
444
|
+
}) => Promise<PolicyOutcome>;
|
|
445
|
+
//#endregion
|
|
380
446
|
//#region src/runners/evaluateEventExtractionAction.d.ts
|
|
381
447
|
declare const evaluateExternalAccountIdExtractorByConnector: (connector: Connector, context: {
|
|
382
448
|
body: unknown;
|
|
@@ -499,7 +565,9 @@ type BaseRunActionParams = {
|
|
|
499
565
|
headers?: Record<string, string>;
|
|
500
566
|
settings?: Settings;
|
|
501
567
|
source?: Source;
|
|
568
|
+
policy?: ActionPolicy;
|
|
502
569
|
logger?: ILogger;
|
|
570
|
+
decideInvokeToolFn?: typeof decideInvokeTool;
|
|
503
571
|
parseConnector?: typeof parseYamlConnector;
|
|
504
572
|
parseActionInputsFn?: typeof parseActionInputs;
|
|
505
573
|
createBlockContextFn?: typeof createBlockContext;
|
|
@@ -760,4 +828,4 @@ declare const runWebhookSetupPhase: ({
|
|
|
760
828
|
runStepActionFn?: typeof runStepAction;
|
|
761
829
|
}) => Promise<WebhookSetupPhaseResult>;
|
|
762
830
|
//#endregion
|
|
763
|
-
export { type CallAction, ConnectSDKError, type ConnectorMeta, type ConnectorMetaEvent, type ConnectorMetaSummary, type CreatePaginatorOptions, DEFAULT_TIME_FILTER_SAFETY_BUFFER_SECONDS, DELTA_TOKEN_INCREMENTAL_SCHEMA, type EnabledActionsConfig, type ErrorType, INCREMENTAL_SCHEMA, IncompatibleAuthTypeError, type IncrementalStrategy, type InputValidationError, InvalidActionInputsError, InvalidEventOutputError, type PaginateOptions, type PaginateResult, type PaginationProgress, type Paginator, TIME_FILTER_INCREMENTAL_SCHEMA, type ValidationError, type ValidationErrorResponse, type WebhookSetupPhaseResult, applyReleaseStageToConnector, computeCredentialsVerifiedByAuth, createBlock, createCursorPaginator, createDeltaTokenStrategy, createIncrementalStrategy, createOffsetPaginator, createPagePaginator, createPaginator, createTimeFilterStrategy, evaluateExternalAccountIdExtractorByConnector, executeStepFunction, extractItems, filterActionsByAuthType, formatValidationErrorResponse, getActionFromUrl, getActionMeta, getActionsMeta, getActionsMetaFromConnectors, getActionsMetaSummary, getActionsMetaSummaryFromConnectors, getRefreshTokenExpiresIn, getTokenExpiresIn, hasCatastrophicBacktrackingRisk, isConnectorReleased, loadConnector, paginate, parseActionInputs, parseYamlConnector, runAction, runConnectorActionById, runConnectorActionByPath, runEventActionById, runStepAction, runTestActions, runWebhookSetupPhase, supportsRefreshAuthentication, validateYamlConnector };
|
|
831
|
+
export { type ActionPolicy, type CallAction, type CompleteMcpConnectorOptions, type CompletedMcpConnector, ConnectSDKError, type ConnectorMeta, type ConnectorMetaEvent, type ConnectorMetaSummary, type CreatePaginatorOptions, DEFAULT_TIME_FILTER_SAFETY_BUFFER_SECONDS, DELTA_TOKEN_INCREMENTAL_SCHEMA, type EnabledActionsConfig, type ErrorType, type GenerateMcpConnectorInput, type GeneratedMcpConnector, INCREMENTAL_SCHEMA, IncompatibleAuthTypeError, type IncrementalStrategy, type InputValidationError, InvalidActionInputsError, InvalidEventOutputError, type PaginateOptions, type PaginateResult, type PaginationProgress, type Paginator, PolicyDeniedError, type PolicyOutcome, TIME_FILTER_INCREMENTAL_SCHEMA, type ValidationError, type ValidationErrorResponse, type WebhookSetupPhaseResult, addMcpToolActions, applyReleaseStageToConnector, completeMcpConnector, computeCredentialsVerifiedByAuth, createBlock, createCursorPaginator, createDeltaTokenStrategy, createIncrementalStrategy, createOffsetPaginator, createPagePaginator, createPaginator, createTimeFilterStrategy, decideInvokeTool, evaluateExternalAccountIdExtractorByConnector, executeStepFunction, extractItems, filterActionsByAuthType, formatValidationErrorResponse, generateMcpConnector, getActionFromUrl, getActionMeta, getActionsMeta, getActionsMetaFromConnectors, getActionsMetaSummary, getActionsMetaSummaryFromConnectors, getRefreshTokenExpiresIn, getTokenExpiresIn, hasCatastrophicBacktrackingRisk, isConnectorReleased, isMcpConnector, loadConnector, paginate, parseActionInputs, parseYamlConnector, runAction, runConnectorActionById, runConnectorActionByPath, runEventActionById, runStepAction, runTestActions, runWebhookSetupPhase, supportsRefreshAuthentication, validateYamlConnector };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { t as __name } from "./chunk-BhWHdk3m.mjs";
|
|
2
2
|
import { z } from "@stackone/utils";
|
|
3
|
+
import { HttpMethod, IHttpClient, IMcpClient, McpClientConfig, McpServerProber, McpToolDefinition } from "@stackone/transport";
|
|
3
4
|
import { Account, Action, ActionAnnotations, AuthType, AuthenticationConfig, AuthenticationField, AuthenticationNotice, Block, BlockContext, Category, Checkpoint, Connector, ConnectorDocumentation, Cursor, CursorPaginationConfig, DataSyncConfig, DeltaTokenIncrementalConfig, Effect, EventToEmit, FlowType, IncrementalConfig, Input, InputLocation, OffsetPaginationConfig, PagePaginationConfig, PaginationConfig, ReleaseStage, Settings, Source, SourceType, Step, StepFunctionName, StepFunctionParams, StepFunctionsFactory, StreamType, SupportConfig, TestActionConfig, TimeFilterIncrementalConfig, TransportType, WebhookSetupPhase, WebhookSetupPhaseKind } from "@stackone/core";
|
|
4
|
-
import {
|
|
5
|
+
import { ArgumentValue, CedarEvaluator, LevelPolicies, PolicyLevel, PrincipalRef } from "@stackone/policy";
|
|
5
6
|
import { IOlapClient } from "@stackone/olap";
|
|
6
7
|
import { ILogger } from "@stackone/logger";
|
|
7
8
|
|
|
@@ -48,6 +49,38 @@ declare const computeCredentialsVerifiedByAuth: (authConfig: AuthenticationConfi
|
|
|
48
49
|
//#region src/connectors/fileReader.d.ts
|
|
49
50
|
declare const loadConnector: (filePath: string) => string;
|
|
50
51
|
//#endregion
|
|
52
|
+
//#region src/connectors/generateMcpConnector.d.ts
|
|
53
|
+
type GenerateMcpConnectorInput = {
|
|
54
|
+
serverUrl: string;
|
|
55
|
+
title: string;
|
|
56
|
+
};
|
|
57
|
+
type GeneratedMcpConnector = {
|
|
58
|
+
yaml: string;
|
|
59
|
+
connector: Connector;
|
|
60
|
+
};
|
|
61
|
+
declare const generateMcpConnector: ({
|
|
62
|
+
serverUrl,
|
|
63
|
+
title
|
|
64
|
+
}: GenerateMcpConnectorInput, probe?: McpServerProber) => Promise<GeneratedMcpConnector>;
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region src/connectors/isMcpConnector.d.ts
|
|
67
|
+
declare const isMcpConnector: (connector: Connector) => boolean;
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region src/connectors/mcpToolActions.d.ts
|
|
70
|
+
type CompletedMcpConnector = {
|
|
71
|
+
yaml: string;
|
|
72
|
+
connector: Connector;
|
|
73
|
+
};
|
|
74
|
+
type CompleteMcpConnectorOptions = {
|
|
75
|
+
headers?: Record<string, string>;
|
|
76
|
+
timeout?: number;
|
|
77
|
+
};
|
|
78
|
+
declare const addMcpToolActions: (yaml: string, tools: McpToolDefinition[]) => CompletedMcpConnector;
|
|
79
|
+
declare const completeMcpConnector: (yaml: string, {
|
|
80
|
+
headers,
|
|
81
|
+
timeout
|
|
82
|
+
}?: CompleteMcpConnectorOptions, createMcpClient?: (config: McpClientConfig) => IMcpClient) => Promise<CompletedMcpConnector>;
|
|
83
|
+
//#endregion
|
|
51
84
|
//#region src/connectors/parsers.d.ts
|
|
52
85
|
declare function parseYamlConnector(yamlFileContents: string): Connector;
|
|
53
86
|
declare const parseActionInputs: (action: Action, inputs: unknown) => Record<string, unknown>;
|
|
@@ -69,7 +102,7 @@ declare const isConnectorReleased: (connector: Connector, allowedStages?: string
|
|
|
69
102
|
declare const applyReleaseStageToConnector: (connector: Connector, allowedStages?: string[]) => Connector | undefined;
|
|
70
103
|
//#endregion
|
|
71
104
|
//#region src/errors/types.d.ts
|
|
72
|
-
type ErrorType = 'CONNECTOR_PARSE_ERROR' | 'MISSING_ACTION_ERROR' | 'INCOMPATIBLE_AUTH_TYPE_ERROR' | 'INVALID_ACTION_INPUTS_ERROR' | 'INVALID_CURSOR_ERROR' | 'INVALID_EVENT_OUTPUT_ERROR';
|
|
105
|
+
type ErrorType = 'CONNECTOR_PARSE_ERROR' | 'MISSING_ACTION_ERROR' | 'INCOMPATIBLE_AUTH_TYPE_ERROR' | 'INVALID_ACTION_INPUTS_ERROR' | 'INVALID_CURSOR_ERROR' | 'INVALID_EVENT_OUTPUT_ERROR' | 'POLICY_DENIED_ERROR';
|
|
73
106
|
//#endregion
|
|
74
107
|
//#region src/errors/connectSDKErrors.d.ts
|
|
75
108
|
type InputValidationError = {
|
|
@@ -95,6 +128,14 @@ declare class IncompatibleAuthTypeError extends ConnectSDKError {
|
|
|
95
128
|
declare class InvalidEventOutputError extends ConnectSDKError {
|
|
96
129
|
constructor(context: BlockContext, message?: string);
|
|
97
130
|
}
|
|
131
|
+
declare class PolicyDeniedError extends ConnectSDKError {
|
|
132
|
+
readonly level: string;
|
|
133
|
+
readonly policyIds: string[];
|
|
134
|
+
constructor(context: BlockContext, details: {
|
|
135
|
+
level: string;
|
|
136
|
+
policyIds: string[];
|
|
137
|
+
}, message?: string);
|
|
138
|
+
}
|
|
98
139
|
//#endregion
|
|
99
140
|
//#region src/connectors/responses.d.ts
|
|
100
141
|
type ValidationErrorResponse = {
|
|
@@ -206,9 +247,9 @@ declare const DELTA_TOKEN_INCREMENTAL_SCHEMA: z.ZodObject<{
|
|
|
206
247
|
iterator: z.ZodObject<{
|
|
207
248
|
key: z.ZodString;
|
|
208
249
|
in: z.ZodEnum<{
|
|
250
|
+
headers: "headers";
|
|
209
251
|
query: "query";
|
|
210
252
|
body: "body";
|
|
211
|
-
headers: "headers";
|
|
212
253
|
}>;
|
|
213
254
|
}, z.core.$strict>;
|
|
214
255
|
response: z.ZodObject<{
|
|
@@ -223,9 +264,9 @@ declare const TIME_FILTER_INCREMENTAL_SCHEMA: z.ZodObject<{
|
|
|
223
264
|
iterator: z.ZodObject<{
|
|
224
265
|
key: z.ZodString;
|
|
225
266
|
in: z.ZodEnum<{
|
|
267
|
+
headers: "headers";
|
|
226
268
|
query: "query";
|
|
227
269
|
body: "body";
|
|
228
|
-
headers: "headers";
|
|
229
270
|
}>;
|
|
230
271
|
}, z.core.$strict>;
|
|
231
272
|
format: z.ZodEnum<{
|
|
@@ -245,9 +286,9 @@ declare const INCREMENTAL_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
245
286
|
iterator: z.ZodObject<{
|
|
246
287
|
key: z.ZodString;
|
|
247
288
|
in: z.ZodEnum<{
|
|
289
|
+
headers: "headers";
|
|
248
290
|
query: "query";
|
|
249
291
|
body: "body";
|
|
250
|
-
headers: "headers";
|
|
251
292
|
}>;
|
|
252
293
|
}, z.core.$strict>;
|
|
253
294
|
format: z.ZodEnum<{
|
|
@@ -264,9 +305,9 @@ declare const INCREMENTAL_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
264
305
|
iterator: z.ZodObject<{
|
|
265
306
|
key: z.ZodString;
|
|
266
307
|
in: z.ZodEnum<{
|
|
308
|
+
headers: "headers";
|
|
267
309
|
query: "query";
|
|
268
310
|
body: "body";
|
|
269
|
-
headers: "headers";
|
|
270
311
|
}>;
|
|
271
312
|
}, z.core.$strict>;
|
|
272
313
|
response: z.ZodObject<{
|
|
@@ -376,6 +417,31 @@ declare const getActionMeta: (connector: Connector, actionId: string, include?:
|
|
|
376
417
|
declare const getActionsMetaSummary: (connector: Connector, include?: string[]) => ConnectorMetaSummary;
|
|
377
418
|
declare const getActionsMetaSummaryFromConnectors: (connectors: Connector[], include?: string[]) => ConnectorMetaSummary[];
|
|
378
419
|
//#endregion
|
|
420
|
+
//#region src/runners/actionPolicy.d.ts
|
|
421
|
+
type ActionPolicy = {
|
|
422
|
+
levels: LevelPolicies[];
|
|
423
|
+
principal?: PrincipalRef;
|
|
424
|
+
client?: string;
|
|
425
|
+
toolName?: string;
|
|
426
|
+
};
|
|
427
|
+
type PolicyOutcome = {
|
|
428
|
+
decision: 'allow';
|
|
429
|
+
} | {
|
|
430
|
+
decision: 'deny';
|
|
431
|
+
level: PolicyLevel;
|
|
432
|
+
policyIds: string[];
|
|
433
|
+
};
|
|
434
|
+
declare const decideInvokeTool: (input: {
|
|
435
|
+
policy: ActionPolicy;
|
|
436
|
+
account: Account;
|
|
437
|
+
action: Pick<Action, "id" | "categories">;
|
|
438
|
+
authType?: AuthType;
|
|
439
|
+
sessionId?: string;
|
|
440
|
+
args?: Record<string, ArgumentValue>;
|
|
441
|
+
logger?: ILogger;
|
|
442
|
+
evaluator?: CedarEvaluator;
|
|
443
|
+
}) => Promise<PolicyOutcome>;
|
|
444
|
+
//#endregion
|
|
379
445
|
//#region src/runners/evaluateEventExtractionAction.d.ts
|
|
380
446
|
declare const evaluateExternalAccountIdExtractorByConnector: (connector: Connector, context: {
|
|
381
447
|
body: unknown;
|
|
@@ -498,7 +564,9 @@ type BaseRunActionParams = {
|
|
|
498
564
|
headers?: Record<string, string>;
|
|
499
565
|
settings?: Settings;
|
|
500
566
|
source?: Source;
|
|
567
|
+
policy?: ActionPolicy;
|
|
501
568
|
logger?: ILogger;
|
|
569
|
+
decideInvokeToolFn?: typeof decideInvokeTool;
|
|
502
570
|
parseConnector?: typeof parseYamlConnector;
|
|
503
571
|
parseActionInputsFn?: typeof parseActionInputs;
|
|
504
572
|
createBlockContextFn?: typeof createBlockContext;
|
|
@@ -759,4 +827,4 @@ declare const runWebhookSetupPhase: ({
|
|
|
759
827
|
runStepActionFn?: typeof runStepAction;
|
|
760
828
|
}) => Promise<WebhookSetupPhaseResult>;
|
|
761
829
|
//#endregion
|
|
762
|
-
export { type CallAction, ConnectSDKError, type ConnectorMeta, type ConnectorMetaEvent, type ConnectorMetaSummary, type CreatePaginatorOptions, DEFAULT_TIME_FILTER_SAFETY_BUFFER_SECONDS, DELTA_TOKEN_INCREMENTAL_SCHEMA, type EnabledActionsConfig, type ErrorType, INCREMENTAL_SCHEMA, IncompatibleAuthTypeError, type IncrementalStrategy, type InputValidationError, InvalidActionInputsError, InvalidEventOutputError, type PaginateOptions, type PaginateResult, type PaginationProgress, type Paginator, TIME_FILTER_INCREMENTAL_SCHEMA, type ValidationError, type ValidationErrorResponse, type WebhookSetupPhaseResult, applyReleaseStageToConnector, computeCredentialsVerifiedByAuth, createBlock, createCursorPaginator, createDeltaTokenStrategy, createIncrementalStrategy, createOffsetPaginator, createPagePaginator, createPaginator, createTimeFilterStrategy, evaluateExternalAccountIdExtractorByConnector, executeStepFunction, extractItems, filterActionsByAuthType, formatValidationErrorResponse, getActionFromUrl, getActionMeta, getActionsMeta, getActionsMetaFromConnectors, getActionsMetaSummary, getActionsMetaSummaryFromConnectors, getRefreshTokenExpiresIn, getTokenExpiresIn, hasCatastrophicBacktrackingRisk, isConnectorReleased, loadConnector, paginate, parseActionInputs, parseYamlConnector, runAction, runConnectorActionById, runConnectorActionByPath, runEventActionById, runStepAction, runTestActions, runWebhookSetupPhase, supportsRefreshAuthentication, validateYamlConnector };
|
|
830
|
+
export { type ActionPolicy, type CallAction, type CompleteMcpConnectorOptions, type CompletedMcpConnector, ConnectSDKError, type ConnectorMeta, type ConnectorMetaEvent, type ConnectorMetaSummary, type CreatePaginatorOptions, DEFAULT_TIME_FILTER_SAFETY_BUFFER_SECONDS, DELTA_TOKEN_INCREMENTAL_SCHEMA, type EnabledActionsConfig, type ErrorType, type GenerateMcpConnectorInput, type GeneratedMcpConnector, INCREMENTAL_SCHEMA, IncompatibleAuthTypeError, type IncrementalStrategy, type InputValidationError, InvalidActionInputsError, InvalidEventOutputError, type PaginateOptions, type PaginateResult, type PaginationProgress, type Paginator, PolicyDeniedError, type PolicyOutcome, TIME_FILTER_INCREMENTAL_SCHEMA, type ValidationError, type ValidationErrorResponse, type WebhookSetupPhaseResult, addMcpToolActions, applyReleaseStageToConnector, completeMcpConnector, computeCredentialsVerifiedByAuth, createBlock, createCursorPaginator, createDeltaTokenStrategy, createIncrementalStrategy, createOffsetPaginator, createPagePaginator, createPaginator, createTimeFilterStrategy, decideInvokeTool, evaluateExternalAccountIdExtractorByConnector, executeStepFunction, extractItems, filterActionsByAuthType, formatValidationErrorResponse, generateMcpConnector, getActionFromUrl, getActionMeta, getActionsMeta, getActionsMetaFromConnectors, getActionsMetaSummary, getActionsMetaSummaryFromConnectors, getRefreshTokenExpiresIn, getTokenExpiresIn, hasCatastrophicBacktrackingRisk, isConnectorReleased, isMcpConnector, loadConnector, paginate, parseActionInputs, parseYamlConnector, runAction, runConnectorActionById, runConnectorActionByPath, runEventActionById, runStepAction, runTestActions, runWebhookSetupPhase, supportsRefreshAuthentication, validateYamlConnector };
|