@stackone/connect-sdk 2.112.0 → 2.113.1
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 +38 -6
- package/dist/index.d.mts +38 -6
- package/dist/index.mjs +3 -3
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
6
|
import { ArgumentValue, CedarEvaluator, LevelPolicies, PolicyLevel, PrincipalRef } from "@stackone/policy";
|
|
7
7
|
|
|
@@ -50,6 +50,38 @@ declare const computeCredentialsVerifiedByAuth: (authConfig: AuthenticationConfi
|
|
|
50
50
|
//#region src/connectors/fileReader.d.ts
|
|
51
51
|
declare const loadConnector: (filePath: string) => string;
|
|
52
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
|
|
53
85
|
//#region src/connectors/parsers.d.ts
|
|
54
86
|
declare function parseYamlConnector(yamlFileContents: string): Connector;
|
|
55
87
|
declare const parseActionInputs: (action: Action, inputs: unknown) => Record<string, unknown>;
|
|
@@ -216,9 +248,9 @@ declare const DELTA_TOKEN_INCREMENTAL_SCHEMA: z.ZodObject<{
|
|
|
216
248
|
iterator: z.ZodObject<{
|
|
217
249
|
key: z.ZodString;
|
|
218
250
|
in: z.ZodEnum<{
|
|
251
|
+
headers: "headers";
|
|
219
252
|
query: "query";
|
|
220
253
|
body: "body";
|
|
221
|
-
headers: "headers";
|
|
222
254
|
}>;
|
|
223
255
|
}, z.core.$strict>;
|
|
224
256
|
response: z.ZodObject<{
|
|
@@ -233,9 +265,9 @@ declare const TIME_FILTER_INCREMENTAL_SCHEMA: z.ZodObject<{
|
|
|
233
265
|
iterator: z.ZodObject<{
|
|
234
266
|
key: z.ZodString;
|
|
235
267
|
in: z.ZodEnum<{
|
|
268
|
+
headers: "headers";
|
|
236
269
|
query: "query";
|
|
237
270
|
body: "body";
|
|
238
|
-
headers: "headers";
|
|
239
271
|
}>;
|
|
240
272
|
}, z.core.$strict>;
|
|
241
273
|
format: z.ZodEnum<{
|
|
@@ -255,9 +287,9 @@ declare const INCREMENTAL_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
255
287
|
iterator: z.ZodObject<{
|
|
256
288
|
key: z.ZodString;
|
|
257
289
|
in: z.ZodEnum<{
|
|
290
|
+
headers: "headers";
|
|
258
291
|
query: "query";
|
|
259
292
|
body: "body";
|
|
260
|
-
headers: "headers";
|
|
261
293
|
}>;
|
|
262
294
|
}, z.core.$strict>;
|
|
263
295
|
format: z.ZodEnum<{
|
|
@@ -274,9 +306,9 @@ declare const INCREMENTAL_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
274
306
|
iterator: z.ZodObject<{
|
|
275
307
|
key: z.ZodString;
|
|
276
308
|
in: z.ZodEnum<{
|
|
309
|
+
headers: "headers";
|
|
277
310
|
query: "query";
|
|
278
311
|
body: "body";
|
|
279
|
-
headers: "headers";
|
|
280
312
|
}>;
|
|
281
313
|
}, z.core.$strict>;
|
|
282
314
|
response: z.ZodObject<{
|
|
@@ -796,4 +828,4 @@ declare const runWebhookSetupPhase: ({
|
|
|
796
828
|
runStepActionFn?: typeof runStepAction;
|
|
797
829
|
}) => Promise<WebhookSetupPhaseResult>;
|
|
798
830
|
//#endregion
|
|
799
|
-
export { type ActionPolicy, 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, PolicyDeniedError, type PolicyOutcome, TIME_FILTER_INCREMENTAL_SCHEMA, type ValidationError, type ValidationErrorResponse, type WebhookSetupPhaseResult, applyReleaseStageToConnector, computeCredentialsVerifiedByAuth, createBlock, createCursorPaginator, createDeltaTokenStrategy, createIncrementalStrategy, createOffsetPaginator, createPagePaginator, createPaginator, createTimeFilterStrategy, decideInvokeTool, 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,7 @@
|
|
|
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 { HttpMethod, IHttpClient } from "@stackone/transport";
|
|
5
5
|
import { ArgumentValue, CedarEvaluator, LevelPolicies, PolicyLevel, PrincipalRef } from "@stackone/policy";
|
|
6
6
|
import { IOlapClient } from "@stackone/olap";
|
|
7
7
|
import { ILogger } from "@stackone/logger";
|
|
@@ -49,6 +49,38 @@ declare const computeCredentialsVerifiedByAuth: (authConfig: AuthenticationConfi
|
|
|
49
49
|
//#region src/connectors/fileReader.d.ts
|
|
50
50
|
declare const loadConnector: (filePath: string) => string;
|
|
51
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
|
|
52
84
|
//#region src/connectors/parsers.d.ts
|
|
53
85
|
declare function parseYamlConnector(yamlFileContents: string): Connector;
|
|
54
86
|
declare const parseActionInputs: (action: Action, inputs: unknown) => Record<string, unknown>;
|
|
@@ -215,9 +247,9 @@ declare const DELTA_TOKEN_INCREMENTAL_SCHEMA: z.ZodObject<{
|
|
|
215
247
|
iterator: z.ZodObject<{
|
|
216
248
|
key: z.ZodString;
|
|
217
249
|
in: z.ZodEnum<{
|
|
250
|
+
headers: "headers";
|
|
218
251
|
query: "query";
|
|
219
252
|
body: "body";
|
|
220
|
-
headers: "headers";
|
|
221
253
|
}>;
|
|
222
254
|
}, z.core.$strict>;
|
|
223
255
|
response: z.ZodObject<{
|
|
@@ -232,9 +264,9 @@ declare const TIME_FILTER_INCREMENTAL_SCHEMA: z.ZodObject<{
|
|
|
232
264
|
iterator: z.ZodObject<{
|
|
233
265
|
key: z.ZodString;
|
|
234
266
|
in: z.ZodEnum<{
|
|
267
|
+
headers: "headers";
|
|
235
268
|
query: "query";
|
|
236
269
|
body: "body";
|
|
237
|
-
headers: "headers";
|
|
238
270
|
}>;
|
|
239
271
|
}, z.core.$strict>;
|
|
240
272
|
format: z.ZodEnum<{
|
|
@@ -254,9 +286,9 @@ declare const INCREMENTAL_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
254
286
|
iterator: z.ZodObject<{
|
|
255
287
|
key: z.ZodString;
|
|
256
288
|
in: z.ZodEnum<{
|
|
289
|
+
headers: "headers";
|
|
257
290
|
query: "query";
|
|
258
291
|
body: "body";
|
|
259
|
-
headers: "headers";
|
|
260
292
|
}>;
|
|
261
293
|
}, z.core.$strict>;
|
|
262
294
|
format: z.ZodEnum<{
|
|
@@ -273,9 +305,9 @@ declare const INCREMENTAL_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
273
305
|
iterator: z.ZodObject<{
|
|
274
306
|
key: z.ZodString;
|
|
275
307
|
in: z.ZodEnum<{
|
|
308
|
+
headers: "headers";
|
|
276
309
|
query: "query";
|
|
277
310
|
body: "body";
|
|
278
|
-
headers: "headers";
|
|
279
311
|
}>;
|
|
280
312
|
}, z.core.$strict>;
|
|
281
313
|
response: z.ZodObject<{
|
|
@@ -795,4 +827,4 @@ declare const runWebhookSetupPhase: ({
|
|
|
795
827
|
runStepActionFn?: typeof runStepAction;
|
|
796
828
|
}) => Promise<WebhookSetupPhaseResult>;
|
|
797
829
|
//#endregion
|
|
798
|
-
export { type ActionPolicy, 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, PolicyDeniedError, type PolicyOutcome, TIME_FILTER_INCREMENTAL_SCHEMA, type ValidationError, type ValidationErrorResponse, type WebhookSetupPhaseResult, applyReleaseStageToConnector, computeCredentialsVerifiedByAuth, createBlock, createCursorPaginator, createDeltaTokenStrategy, createIncrementalStrategy, createOffsetPaginator, createPagePaginator, createPaginator, createTimeFilterStrategy, decideInvokeTool, 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 };
|