@stackone/connect-sdk 3.8.1 → 3.10.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 +2 -2
- package/dist/index.d.cts +54 -1
- package/dist/index.d.mts +54 -1
- package/dist/index.mjs +2 -2
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -103,6 +103,42 @@ declare const hasCatastrophicBacktrackingRisk: (source: string) => boolean;
|
|
|
103
103
|
//#endregion
|
|
104
104
|
//#region src/connectors/releaseStage.d.ts
|
|
105
105
|
declare const isConnectorReleased: (connector: Connector, allowedStages?: string[]) => boolean;
|
|
106
|
+
type ReleaseStageProfileItem = {
|
|
107
|
+
id: string;
|
|
108
|
+
releaseStage: ReleaseStage;
|
|
109
|
+
authTypes?: string[];
|
|
110
|
+
};
|
|
111
|
+
type ReleaseStageProfile = {
|
|
112
|
+
releaseStage: ReleaseStage;
|
|
113
|
+
authTypes: Record<string, ReleaseStage>;
|
|
114
|
+
actions: ReleaseStageProfileItem[];
|
|
115
|
+
eventActions: ReleaseStageProfileItem[];
|
|
116
|
+
};
|
|
117
|
+
type ReleaseStageResolution = {
|
|
118
|
+
actionIds: Set<string>;
|
|
119
|
+
eventActionIds: Set<string>;
|
|
120
|
+
authenticationKeys: Set<string>;
|
|
121
|
+
};
|
|
122
|
+
type ReleaseStageCountGroup = {
|
|
123
|
+
releaseStage: ReleaseStage;
|
|
124
|
+
authTypes?: string[];
|
|
125
|
+
count: number;
|
|
126
|
+
};
|
|
127
|
+
type ReleaseStageCounts = {
|
|
128
|
+
releaseStage: ReleaseStage;
|
|
129
|
+
authTypes: Record<string, ReleaseStage>;
|
|
130
|
+
actions: ReleaseStageCountGroup[];
|
|
131
|
+
eventActions: ReleaseStageCountGroup[];
|
|
132
|
+
};
|
|
133
|
+
type ReleaseStageCountsResolution = {
|
|
134
|
+
actionCount: number;
|
|
135
|
+
eventActionCount: number;
|
|
136
|
+
authenticationKeys: Set<string>;
|
|
137
|
+
};
|
|
138
|
+
declare const buildReleaseStageProfile: (connector: Connector) => ReleaseStageProfile;
|
|
139
|
+
declare const resolveReleaseStageProfile: (profile: ReleaseStageProfile, owner: string | undefined, allowedStages?: string[]) => ReleaseStageResolution | undefined;
|
|
140
|
+
declare const countReleaseStageProfile: (profile: ReleaseStageProfile) => ReleaseStageCounts;
|
|
141
|
+
declare const resolveReleaseStageCounts: (counts: ReleaseStageCounts, owner: string | undefined, allowedStages?: string[]) => ReleaseStageCountsResolution | undefined;
|
|
106
142
|
declare const applyReleaseStageToConnector: (connector: Connector, allowedStages?: string[]) => Connector | undefined;
|
|
107
143
|
//#endregion
|
|
108
144
|
//#region src/errors/types.d.ts
|
|
@@ -5390,6 +5426,9 @@ declare const getActionMeta: (connector: Connector, actionId: string, include?:
|
|
|
5390
5426
|
declare const getActionsMetaSummary: (connector: Connector, include?: string[]) => ConnectorMetaSummary;
|
|
5391
5427
|
declare const getActionsMetaSummaryFromConnectors: (connectors: Connector[], include?: string[]) => ConnectorMetaSummary[];
|
|
5392
5428
|
//#endregion
|
|
5429
|
+
//#region src/meta/releaseStage.d.ts
|
|
5430
|
+
declare const applyReleaseStageResolutionToMeta: (meta: ConnectorMeta, resolution: ReleaseStageResolution | undefined) => ConnectorMeta | undefined;
|
|
5431
|
+
//#endregion
|
|
5393
5432
|
//#region src/runners/actionPolicy.d.ts
|
|
5394
5433
|
type ActionPolicy = {
|
|
5395
5434
|
levels: LevelPolicies[];
|
|
@@ -5446,6 +5485,20 @@ declare const executeStepFunction: ({
|
|
|
5446
5485
|
buildStepFunction?: typeof StepFunctionsFactory.build;
|
|
5447
5486
|
}) => Promise<Block>;
|
|
5448
5487
|
//#endregion
|
|
5488
|
+
//#region src/runners/fieldPaths.d.ts
|
|
5489
|
+
declare const fieldPathsOf: (payload: unknown, options?: {
|
|
5490
|
+
maxPaths?: number;
|
|
5491
|
+
}) => {
|
|
5492
|
+
paths: string[];
|
|
5493
|
+
truncated: boolean;
|
|
5494
|
+
};
|
|
5495
|
+
//#endregion
|
|
5496
|
+
//#region src/runners/maskFields.d.ts
|
|
5497
|
+
declare const maskFields: (payload: unknown, refused: readonly string[], cleared?: ReadonlySet<string>) => {
|
|
5498
|
+
payload: unknown;
|
|
5499
|
+
masked: string[];
|
|
5500
|
+
};
|
|
5501
|
+
//#endregion
|
|
5449
5502
|
//#region src/blocks/createBlockContext.d.ts
|
|
5450
5503
|
declare const createBlockContext: ({
|
|
5451
5504
|
category,
|
|
@@ -5840,4 +5893,4 @@ declare const runWebhookSetupPhase: ({
|
|
|
5840
5893
|
runStepActionFn?: typeof runStepAction;
|
|
5841
5894
|
}) => Promise<WebhookSetupPhaseResult>;
|
|
5842
5895
|
//#endregion
|
|
5843
|
-
export { ACTION_SCHEMA, type ActionMetaAuthenticationConfig, type ActionPolicy, CATEGORY_ACRONYMS, CONNECTOR_YAML_SCHEMA, 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, POLICY_ERROR_STATUS, type PaginateOptions, type PaginateResult, type PaginationProgress, type Paginator, PolicyDeniedError, type PolicyErrorType, PolicyEvaluationError, PolicyPreparseError, TIME_FILTER_INCREMENTAL_SCHEMA, type ValidationError, type ValidationErrorResponse, type WebhookSetupPhaseResult, addMcpToolActions, applyDefender, applyReleaseStageToConnector, completeMcpConnector, computeCredentialsVerifiedByAuth, createBlock, createCursorPaginator, createDeltaTokenStrategy, createIncrementalStrategy, createOffsetPaginator, createPagePaginator, createPaginator, createTimeFilterStrategy, decideInvokeTool, evaluateExternalAccountIdExtractorByConnector, executeStepFunction, extractItems, filterActionsByAuthType, formatValidationErrorResponse, generateMcpConnector, getActionAuthenticationMethods, getActionFromUrl, getActionMeta, getActionsMeta, getActionsMetaFromConnectors, getActionsMetaSummary, getActionsMetaSummaryFromConnectors, getRefreshTokenExpiresIn, getTokenExpiresIn, hasCatastrophicBacktrackingRisk, isConnectorReleased, isMcpConnector, isPolicyErrorType, loadConnector, paginate, parseActionInputs, parseYamlConnector, runAction, runConnectorActionById, runConnectorActionByPath, runEventActionById, runStepAction, runTestActions, runWebhookSetupPhase, supportsRefreshAuthentication, validateYamlConnector };
|
|
5896
|
+
export { ACTION_SCHEMA, type ActionMetaAuthenticationConfig, type ActionPolicy, CATEGORY_ACRONYMS, CONNECTOR_YAML_SCHEMA, 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, POLICY_ERROR_STATUS, type PaginateOptions, type PaginateResult, type PaginationProgress, type Paginator, PolicyDeniedError, type PolicyErrorType, PolicyEvaluationError, PolicyPreparseError, type ReleaseStageCountGroup, type ReleaseStageCounts, type ReleaseStageCountsResolution, type ReleaseStageProfile, type ReleaseStageProfileItem, type ReleaseStageResolution, TIME_FILTER_INCREMENTAL_SCHEMA, type ValidationError, type ValidationErrorResponse, type WebhookSetupPhaseResult, addMcpToolActions, applyDefender, applyReleaseStageResolutionToMeta, applyReleaseStageToConnector, buildReleaseStageProfile, completeMcpConnector, computeCredentialsVerifiedByAuth, countReleaseStageProfile, createBlock, createCursorPaginator, createDeltaTokenStrategy, createIncrementalStrategy, createOffsetPaginator, createPagePaginator, createPaginator, createTimeFilterStrategy, decideInvokeTool, decideReadFields, evaluateExternalAccountIdExtractorByConnector, executeStepFunction, extractItems, fieldPathsOf, filterActionsByAuthType, formatValidationErrorResponse, generateMcpConnector, getActionAuthenticationMethods, getActionFromUrl, getActionMeta, getActionsMeta, getActionsMetaFromConnectors, getActionsMetaSummary, getActionsMetaSummaryFromConnectors, getRefreshTokenExpiresIn, getTokenExpiresIn, hasCatastrophicBacktrackingRisk, isConnectorReleased, isMcpConnector, isPolicyErrorType, loadConnector, maskFields, paginate, parseActionInputs, parseYamlConnector, resolveReleaseStageCounts, resolveReleaseStageProfile, runAction, runConnectorActionById, runConnectorActionByPath, runEventActionById, runStepAction, runTestActions, runWebhookSetupPhase, supportsRefreshAuthentication, validateYamlConnector };
|
package/dist/index.d.mts
CHANGED
|
@@ -102,6 +102,42 @@ declare const hasCatastrophicBacktrackingRisk: (source: string) => boolean;
|
|
|
102
102
|
//#endregion
|
|
103
103
|
//#region src/connectors/releaseStage.d.ts
|
|
104
104
|
declare const isConnectorReleased: (connector: Connector, allowedStages?: string[]) => boolean;
|
|
105
|
+
type ReleaseStageProfileItem = {
|
|
106
|
+
id: string;
|
|
107
|
+
releaseStage: ReleaseStage;
|
|
108
|
+
authTypes?: string[];
|
|
109
|
+
};
|
|
110
|
+
type ReleaseStageProfile = {
|
|
111
|
+
releaseStage: ReleaseStage;
|
|
112
|
+
authTypes: Record<string, ReleaseStage>;
|
|
113
|
+
actions: ReleaseStageProfileItem[];
|
|
114
|
+
eventActions: ReleaseStageProfileItem[];
|
|
115
|
+
};
|
|
116
|
+
type ReleaseStageResolution = {
|
|
117
|
+
actionIds: Set<string>;
|
|
118
|
+
eventActionIds: Set<string>;
|
|
119
|
+
authenticationKeys: Set<string>;
|
|
120
|
+
};
|
|
121
|
+
type ReleaseStageCountGroup = {
|
|
122
|
+
releaseStage: ReleaseStage;
|
|
123
|
+
authTypes?: string[];
|
|
124
|
+
count: number;
|
|
125
|
+
};
|
|
126
|
+
type ReleaseStageCounts = {
|
|
127
|
+
releaseStage: ReleaseStage;
|
|
128
|
+
authTypes: Record<string, ReleaseStage>;
|
|
129
|
+
actions: ReleaseStageCountGroup[];
|
|
130
|
+
eventActions: ReleaseStageCountGroup[];
|
|
131
|
+
};
|
|
132
|
+
type ReleaseStageCountsResolution = {
|
|
133
|
+
actionCount: number;
|
|
134
|
+
eventActionCount: number;
|
|
135
|
+
authenticationKeys: Set<string>;
|
|
136
|
+
};
|
|
137
|
+
declare const buildReleaseStageProfile: (connector: Connector) => ReleaseStageProfile;
|
|
138
|
+
declare const resolveReleaseStageProfile: (profile: ReleaseStageProfile, owner: string | undefined, allowedStages?: string[]) => ReleaseStageResolution | undefined;
|
|
139
|
+
declare const countReleaseStageProfile: (profile: ReleaseStageProfile) => ReleaseStageCounts;
|
|
140
|
+
declare const resolveReleaseStageCounts: (counts: ReleaseStageCounts, owner: string | undefined, allowedStages?: string[]) => ReleaseStageCountsResolution | undefined;
|
|
105
141
|
declare const applyReleaseStageToConnector: (connector: Connector, allowedStages?: string[]) => Connector | undefined;
|
|
106
142
|
//#endregion
|
|
107
143
|
//#region src/errors/types.d.ts
|
|
@@ -5389,6 +5425,9 @@ declare const getActionMeta: (connector: Connector, actionId: string, include?:
|
|
|
5389
5425
|
declare const getActionsMetaSummary: (connector: Connector, include?: string[]) => ConnectorMetaSummary;
|
|
5390
5426
|
declare const getActionsMetaSummaryFromConnectors: (connectors: Connector[], include?: string[]) => ConnectorMetaSummary[];
|
|
5391
5427
|
//#endregion
|
|
5428
|
+
//#region src/meta/releaseStage.d.ts
|
|
5429
|
+
declare const applyReleaseStageResolutionToMeta: (meta: ConnectorMeta, resolution: ReleaseStageResolution | undefined) => ConnectorMeta | undefined;
|
|
5430
|
+
//#endregion
|
|
5392
5431
|
//#region src/runners/actionPolicy.d.ts
|
|
5393
5432
|
type ActionPolicy = {
|
|
5394
5433
|
levels: LevelPolicies[];
|
|
@@ -5445,6 +5484,20 @@ declare const executeStepFunction: ({
|
|
|
5445
5484
|
buildStepFunction?: typeof StepFunctionsFactory.build;
|
|
5446
5485
|
}) => Promise<Block>;
|
|
5447
5486
|
//#endregion
|
|
5487
|
+
//#region src/runners/fieldPaths.d.ts
|
|
5488
|
+
declare const fieldPathsOf: (payload: unknown, options?: {
|
|
5489
|
+
maxPaths?: number;
|
|
5490
|
+
}) => {
|
|
5491
|
+
paths: string[];
|
|
5492
|
+
truncated: boolean;
|
|
5493
|
+
};
|
|
5494
|
+
//#endregion
|
|
5495
|
+
//#region src/runners/maskFields.d.ts
|
|
5496
|
+
declare const maskFields: (payload: unknown, refused: readonly string[], cleared?: ReadonlySet<string>) => {
|
|
5497
|
+
payload: unknown;
|
|
5498
|
+
masked: string[];
|
|
5499
|
+
};
|
|
5500
|
+
//#endregion
|
|
5448
5501
|
//#region src/blocks/createBlockContext.d.ts
|
|
5449
5502
|
declare const createBlockContext: ({
|
|
5450
5503
|
category,
|
|
@@ -5839,4 +5892,4 @@ declare const runWebhookSetupPhase: ({
|
|
|
5839
5892
|
runStepActionFn?: typeof runStepAction;
|
|
5840
5893
|
}) => Promise<WebhookSetupPhaseResult>;
|
|
5841
5894
|
//#endregion
|
|
5842
|
-
export { ACTION_SCHEMA, type ActionMetaAuthenticationConfig, type ActionPolicy, CATEGORY_ACRONYMS, CONNECTOR_YAML_SCHEMA, 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, POLICY_ERROR_STATUS, type PaginateOptions, type PaginateResult, type PaginationProgress, type Paginator, PolicyDeniedError, type PolicyErrorType, PolicyEvaluationError, PolicyPreparseError, TIME_FILTER_INCREMENTAL_SCHEMA, type ValidationError, type ValidationErrorResponse, type WebhookSetupPhaseResult, addMcpToolActions, applyDefender, applyReleaseStageToConnector, completeMcpConnector, computeCredentialsVerifiedByAuth, createBlock, createCursorPaginator, createDeltaTokenStrategy, createIncrementalStrategy, createOffsetPaginator, createPagePaginator, createPaginator, createTimeFilterStrategy, decideInvokeTool, evaluateExternalAccountIdExtractorByConnector, executeStepFunction, extractItems, filterActionsByAuthType, formatValidationErrorResponse, generateMcpConnector, getActionAuthenticationMethods, getActionFromUrl, getActionMeta, getActionsMeta, getActionsMetaFromConnectors, getActionsMetaSummary, getActionsMetaSummaryFromConnectors, getRefreshTokenExpiresIn, getTokenExpiresIn, hasCatastrophicBacktrackingRisk, isConnectorReleased, isMcpConnector, isPolicyErrorType, loadConnector, paginate, parseActionInputs, parseYamlConnector, runAction, runConnectorActionById, runConnectorActionByPath, runEventActionById, runStepAction, runTestActions, runWebhookSetupPhase, supportsRefreshAuthentication, validateYamlConnector };
|
|
5895
|
+
export { ACTION_SCHEMA, type ActionMetaAuthenticationConfig, type ActionPolicy, CATEGORY_ACRONYMS, CONNECTOR_YAML_SCHEMA, 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, POLICY_ERROR_STATUS, type PaginateOptions, type PaginateResult, type PaginationProgress, type Paginator, PolicyDeniedError, type PolicyErrorType, PolicyEvaluationError, PolicyPreparseError, type ReleaseStageCountGroup, type ReleaseStageCounts, type ReleaseStageCountsResolution, type ReleaseStageProfile, type ReleaseStageProfileItem, type ReleaseStageResolution, TIME_FILTER_INCREMENTAL_SCHEMA, type ValidationError, type ValidationErrorResponse, type WebhookSetupPhaseResult, addMcpToolActions, applyDefender, applyReleaseStageResolutionToMeta, applyReleaseStageToConnector, buildReleaseStageProfile, completeMcpConnector, computeCredentialsVerifiedByAuth, countReleaseStageProfile, createBlock, createCursorPaginator, createDeltaTokenStrategy, createIncrementalStrategy, createOffsetPaginator, createPagePaginator, createPaginator, createTimeFilterStrategy, decideInvokeTool, decideReadFields, evaluateExternalAccountIdExtractorByConnector, executeStepFunction, extractItems, fieldPathsOf, filterActionsByAuthType, formatValidationErrorResponse, generateMcpConnector, getActionAuthenticationMethods, getActionFromUrl, getActionMeta, getActionsMeta, getActionsMetaFromConnectors, getActionsMetaSummary, getActionsMetaSummaryFromConnectors, getRefreshTokenExpiresIn, getTokenExpiresIn, hasCatastrophicBacktrackingRisk, isConnectorReleased, isMcpConnector, isPolicyErrorType, loadConnector, maskFields, paginate, parseActionInputs, parseYamlConnector, resolveReleaseStageCounts, resolveReleaseStageProfile, runAction, runConnectorActionById, runConnectorActionByPath, runEventActionById, runStepAction, runTestActions, runWebhookSetupPhase, supportsRefreshAuthentication, validateYamlConnector };
|