@stackone/connect-sdk 3.10.0 → 3.11.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.d.cts CHANGED
@@ -1,4 +1,4 @@
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";
1
+ import { Account, ActingUser, 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, PolicyContext } from "@stackone/olap";
4
4
  import { HttpMethod, IHttpClient, IMcpClient, McpClientConfig, McpServerProber, McpToolDefinition } from "@stackone/transport";
@@ -12,6 +12,7 @@ declare const createBlock: ({
12
12
  connector,
13
13
  inputs,
14
14
  context,
15
+ user,
15
16
  action,
16
17
  credentials,
17
18
  nextCursor,
@@ -24,6 +25,7 @@ declare const createBlock: ({
24
25
  connector: Connector;
25
26
  inputs?: Record<string, unknown>;
26
27
  context: BlockContext;
28
+ user?: ActingUser;
27
29
  action?: Action;
28
30
  credentials?: Record<string, unknown>;
29
31
  nextCursor?: Cursor;
@@ -142,7 +144,7 @@ declare const resolveReleaseStageCounts: (counts: ReleaseStageCounts, owner: str
142
144
  declare const applyReleaseStageToConnector: (connector: Connector, allowedStages?: string[]) => Connector | undefined;
143
145
  //#endregion
144
146
  //#region src/errors/types.d.ts
145
- 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' | 'POLICY_EVALUATION_ERROR' | 'POLICY_PREPARSE_ERROR';
147
+ 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' | 'POLICY_EVALUATION_ERROR' | 'POLICY_PREPARSE_ERROR' | 'ACTING_USER_REQUIRED_ERROR';
146
148
  //#endregion
147
149
  //#region src/errors/connectSDKErrors.d.ts
148
150
  type InputValidationError = {
@@ -165,6 +167,9 @@ declare class InvalidActionInputsError extends ConnectSDKError {
165
167
  declare class IncompatibleAuthTypeError extends ConnectSDKError {
166
168
  constructor(context: BlockContext, message?: string);
167
169
  }
170
+ declare class ActingUserRequiredError extends ConnectSDKError {
171
+ constructor(context: BlockContext, message?: string);
172
+ }
168
173
  declare class InvalidEventOutputError extends ConnectSDKError {
169
174
  constructor(context: BlockContext, message?: string);
170
175
  }
@@ -511,6 +516,7 @@ declare const ACTION_SCHEMA: z.ZodObject<{
511
516
  }, z.core.$strict>>;
512
517
  providerEvents: z.ZodOptional<z.ZodArray<z.ZodString>>;
513
518
  prerequisiteActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
519
+ userScoped: z.ZodOptional<z.ZodBoolean>;
514
520
  }, z.core.$strict>;
515
521
  declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
516
522
  StackOne: z.ZodString;
@@ -1097,6 +1103,7 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
1097
1103
  }, z.core.$strict>>;
1098
1104
  providerEvents: z.ZodOptional<z.ZodArray<z.ZodString>>;
1099
1105
  prerequisiteActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
1106
+ userScoped: z.ZodOptional<z.ZodBoolean>;
1100
1107
  actionType: z.ZodLiteral<"refresh_token">;
1101
1108
  }, z.core.$strict>;
1102
1109
  }, z.core.$strict>>;
@@ -1411,6 +1418,7 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
1411
1418
  }, z.core.$strict>>;
1412
1419
  providerEvents: z.ZodOptional<z.ZodArray<z.ZodString>>;
1413
1420
  prerequisiteActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
1421
+ userScoped: z.ZodOptional<z.ZodBoolean>;
1414
1422
  }, z.core.$strict>]>;
1415
1423
  condition: z.ZodOptional<z.ZodString>;
1416
1424
  required: z.ZodDefault<z.ZodBoolean>;
@@ -1976,6 +1984,7 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
1976
1984
  }, z.core.$strict>>;
1977
1985
  providerEvents: z.ZodOptional<z.ZodArray<z.ZodString>>;
1978
1986
  prerequisiteActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
1987
+ userScoped: z.ZodOptional<z.ZodBoolean>;
1979
1988
  actionType: z.ZodLiteral<"refresh_token">;
1980
1989
  }, z.core.$strict>;
1981
1990
  }, z.core.$strict>>;
@@ -2290,6 +2299,7 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
2290
2299
  }, z.core.$strict>>;
2291
2300
  providerEvents: z.ZodOptional<z.ZodArray<z.ZodString>>;
2292
2301
  prerequisiteActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
2302
+ userScoped: z.ZodOptional<z.ZodBoolean>;
2293
2303
  }, z.core.$strict>]>;
2294
2304
  condition: z.ZodOptional<z.ZodString>;
2295
2305
  required: z.ZodDefault<z.ZodBoolean>;
@@ -2851,6 +2861,7 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
2851
2861
  }, z.core.$strict>>;
2852
2862
  providerEvents: z.ZodOptional<z.ZodArray<z.ZodString>>;
2853
2863
  prerequisiteActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
2864
+ userScoped: z.ZodOptional<z.ZodBoolean>;
2854
2865
  actionType: z.ZodLiteral<"refresh_token">;
2855
2866
  }, z.core.$strict>;
2856
2867
  }, z.core.$strict>>;
@@ -3165,6 +3176,7 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
3165
3176
  }, z.core.$strict>>;
3166
3177
  providerEvents: z.ZodOptional<z.ZodArray<z.ZodString>>;
3167
3178
  prerequisiteActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
3179
+ userScoped: z.ZodOptional<z.ZodBoolean>;
3168
3180
  }, z.core.$strict>]>;
3169
3181
  condition: z.ZodOptional<z.ZodString>;
3170
3182
  required: z.ZodDefault<z.ZodBoolean>;
@@ -3726,6 +3738,7 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
3726
3738
  }, z.core.$strict>>;
3727
3739
  providerEvents: z.ZodOptional<z.ZodArray<z.ZodString>>;
3728
3740
  prerequisiteActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
3741
+ userScoped: z.ZodOptional<z.ZodBoolean>;
3729
3742
  actionType: z.ZodLiteral<"refresh_token">;
3730
3743
  }, z.core.$strict>;
3731
3744
  }, z.core.$strict>>;
@@ -4040,6 +4053,7 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
4040
4053
  }, z.core.$strict>>;
4041
4054
  providerEvents: z.ZodOptional<z.ZodArray<z.ZodString>>;
4042
4055
  prerequisiteActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
4056
+ userScoped: z.ZodOptional<z.ZodBoolean>;
4043
4057
  }, z.core.$strict>]>;
4044
4058
  condition: z.ZodOptional<z.ZodString>;
4045
4059
  required: z.ZodDefault<z.ZodBoolean>;
@@ -4365,6 +4379,7 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
4365
4379
  }, z.core.$strict>>;
4366
4380
  providerEvents: z.ZodOptional<z.ZodArray<z.ZodString>>;
4367
4381
  prerequisiteActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
4382
+ userScoped: z.ZodOptional<z.ZodBoolean>;
4368
4383
  }, z.core.$strict>>>;
4369
4384
  events: z.ZodOptional<z.ZodObject<{
4370
4385
  setup: z.ZodOptional<z.ZodObject<{
@@ -4791,6 +4806,7 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
4791
4806
  }, z.core.$strict>>;
4792
4807
  providerEvents: z.ZodOptional<z.ZodArray<z.ZodString>>;
4793
4808
  prerequisiteActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
4809
+ userScoped: z.ZodOptional<z.ZodBoolean>;
4794
4810
  actionType: z.ZodLiteral<"event">;
4795
4811
  requiresManualSetup: z.ZodOptional<z.ZodBoolean>;
4796
4812
  }, z.core.$strict>>>;
@@ -5109,6 +5125,7 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
5109
5125
  }, z.core.$strict>>;
5110
5126
  providerEvents: z.ZodOptional<z.ZodArray<z.ZodString>>;
5111
5127
  prerequisiteActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
5128
+ userScoped: z.ZodOptional<z.ZodBoolean>;
5112
5129
  actionType: z.ZodLiteral<"custom">;
5113
5130
  result: z.ZodString;
5114
5131
  }, z.core.$strict>>;
@@ -5343,6 +5360,7 @@ interface MetaAction {
5343
5360
  releaseStage?: ReleaseStage;
5344
5361
  effects?: Effect[];
5345
5362
  annotations?: ActionAnnotations;
5363
+ userScoped?: boolean;
5346
5364
  [key: string]: unknown;
5347
5365
  }
5348
5366
  type ConnectorMetaAuthenticationConfig = {
@@ -5379,6 +5397,7 @@ type ConnectorMetaAction = {
5379
5397
  release_stage?: ReleaseStage;
5380
5398
  effects?: Effect[];
5381
5399
  annotations?: ActionAnnotations;
5400
+ user_scoped?: boolean;
5382
5401
  action_details?: MetaAction;
5383
5402
  authentication: ActionMetaAuthenticationConfig[];
5384
5403
  };
@@ -5600,6 +5619,7 @@ type BaseRunActionParams = {
5600
5619
  headers?: Record<string, string>;
5601
5620
  settings?: Settings;
5602
5621
  source?: Source;
5622
+ user?: ActingUser;
5603
5623
  policy?: ActionPolicy;
5604
5624
  logger?: ILogger;
5605
5625
  decideInvokeToolFn?: typeof decideInvokeTool;
@@ -5672,7 +5692,7 @@ type ExecutedAction = {
5672
5692
  };
5673
5693
  } | {
5674
5694
  outcome: 'refused';
5675
- policy: PolicyContext;
5695
+ policy?: PolicyContext;
5676
5696
  error: ConnectSDKError;
5677
5697
  };
5678
5698
  declare const applyDefender: ({
@@ -5893,4 +5913,4 @@ declare const runWebhookSetupPhase: ({
5893
5913
  runStepActionFn?: typeof runStepAction;
5894
5914
  }) => Promise<WebhookSetupPhaseResult>;
5895
5915
  //#endregion
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 };
5916
+ export { ACTION_SCHEMA, ActingUserRequiredError, 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
@@ -1,7 +1,7 @@
1
1
  import { t as __name } from "./chunk-BhWHdk3m.mjs";
2
2
  import { z } from "@stackone/utils";
3
3
  import { HttpMethod, IHttpClient, IMcpClient, McpClientConfig, McpServerProber, McpToolDefinition } from "@stackone/transport";
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 { Account, ActingUser, 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";
5
5
  import { ArgumentValue, CedarEvaluator, FieldDecisions, LevelPolicies, PrincipalRef, ToolDecision } from "@stackone/policy";
6
6
  import { IOlapClient, PolicyContext } from "@stackone/olap";
7
7
  import { ILogger } from "@stackone/logger";
@@ -11,6 +11,7 @@ declare const createBlock: ({
11
11
  connector,
12
12
  inputs,
13
13
  context,
14
+ user,
14
15
  action,
15
16
  credentials,
16
17
  nextCursor,
@@ -23,6 +24,7 @@ declare const createBlock: ({
23
24
  connector: Connector;
24
25
  inputs?: Record<string, unknown>;
25
26
  context: BlockContext;
27
+ user?: ActingUser;
26
28
  action?: Action;
27
29
  credentials?: Record<string, unknown>;
28
30
  nextCursor?: Cursor;
@@ -141,7 +143,7 @@ declare const resolveReleaseStageCounts: (counts: ReleaseStageCounts, owner: str
141
143
  declare const applyReleaseStageToConnector: (connector: Connector, allowedStages?: string[]) => Connector | undefined;
142
144
  //#endregion
143
145
  //#region src/errors/types.d.ts
144
- 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' | 'POLICY_EVALUATION_ERROR' | 'POLICY_PREPARSE_ERROR';
146
+ 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' | 'POLICY_EVALUATION_ERROR' | 'POLICY_PREPARSE_ERROR' | 'ACTING_USER_REQUIRED_ERROR';
145
147
  //#endregion
146
148
  //#region src/errors/connectSDKErrors.d.ts
147
149
  type InputValidationError = {
@@ -164,6 +166,9 @@ declare class InvalidActionInputsError extends ConnectSDKError {
164
166
  declare class IncompatibleAuthTypeError extends ConnectSDKError {
165
167
  constructor(context: BlockContext, message?: string);
166
168
  }
169
+ declare class ActingUserRequiredError extends ConnectSDKError {
170
+ constructor(context: BlockContext, message?: string);
171
+ }
167
172
  declare class InvalidEventOutputError extends ConnectSDKError {
168
173
  constructor(context: BlockContext, message?: string);
169
174
  }
@@ -510,6 +515,7 @@ declare const ACTION_SCHEMA: z.ZodObject<{
510
515
  }, z.core.$strict>>;
511
516
  providerEvents: z.ZodOptional<z.ZodArray<z.ZodString>>;
512
517
  prerequisiteActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
518
+ userScoped: z.ZodOptional<z.ZodBoolean>;
513
519
  }, z.core.$strict>;
514
520
  declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
515
521
  StackOne: z.ZodString;
@@ -1096,6 +1102,7 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
1096
1102
  }, z.core.$strict>>;
1097
1103
  providerEvents: z.ZodOptional<z.ZodArray<z.ZodString>>;
1098
1104
  prerequisiteActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
1105
+ userScoped: z.ZodOptional<z.ZodBoolean>;
1099
1106
  actionType: z.ZodLiteral<"refresh_token">;
1100
1107
  }, z.core.$strict>;
1101
1108
  }, z.core.$strict>>;
@@ -1410,6 +1417,7 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
1410
1417
  }, z.core.$strict>>;
1411
1418
  providerEvents: z.ZodOptional<z.ZodArray<z.ZodString>>;
1412
1419
  prerequisiteActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
1420
+ userScoped: z.ZodOptional<z.ZodBoolean>;
1413
1421
  }, z.core.$strict>]>;
1414
1422
  condition: z.ZodOptional<z.ZodString>;
1415
1423
  required: z.ZodDefault<z.ZodBoolean>;
@@ -1975,6 +1983,7 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
1975
1983
  }, z.core.$strict>>;
1976
1984
  providerEvents: z.ZodOptional<z.ZodArray<z.ZodString>>;
1977
1985
  prerequisiteActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
1986
+ userScoped: z.ZodOptional<z.ZodBoolean>;
1978
1987
  actionType: z.ZodLiteral<"refresh_token">;
1979
1988
  }, z.core.$strict>;
1980
1989
  }, z.core.$strict>>;
@@ -2289,6 +2298,7 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
2289
2298
  }, z.core.$strict>>;
2290
2299
  providerEvents: z.ZodOptional<z.ZodArray<z.ZodString>>;
2291
2300
  prerequisiteActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
2301
+ userScoped: z.ZodOptional<z.ZodBoolean>;
2292
2302
  }, z.core.$strict>]>;
2293
2303
  condition: z.ZodOptional<z.ZodString>;
2294
2304
  required: z.ZodDefault<z.ZodBoolean>;
@@ -2850,6 +2860,7 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
2850
2860
  }, z.core.$strict>>;
2851
2861
  providerEvents: z.ZodOptional<z.ZodArray<z.ZodString>>;
2852
2862
  prerequisiteActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
2863
+ userScoped: z.ZodOptional<z.ZodBoolean>;
2853
2864
  actionType: z.ZodLiteral<"refresh_token">;
2854
2865
  }, z.core.$strict>;
2855
2866
  }, z.core.$strict>>;
@@ -3164,6 +3175,7 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
3164
3175
  }, z.core.$strict>>;
3165
3176
  providerEvents: z.ZodOptional<z.ZodArray<z.ZodString>>;
3166
3177
  prerequisiteActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
3178
+ userScoped: z.ZodOptional<z.ZodBoolean>;
3167
3179
  }, z.core.$strict>]>;
3168
3180
  condition: z.ZodOptional<z.ZodString>;
3169
3181
  required: z.ZodDefault<z.ZodBoolean>;
@@ -3725,6 +3737,7 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
3725
3737
  }, z.core.$strict>>;
3726
3738
  providerEvents: z.ZodOptional<z.ZodArray<z.ZodString>>;
3727
3739
  prerequisiteActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
3740
+ userScoped: z.ZodOptional<z.ZodBoolean>;
3728
3741
  actionType: z.ZodLiteral<"refresh_token">;
3729
3742
  }, z.core.$strict>;
3730
3743
  }, z.core.$strict>>;
@@ -4039,6 +4052,7 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
4039
4052
  }, z.core.$strict>>;
4040
4053
  providerEvents: z.ZodOptional<z.ZodArray<z.ZodString>>;
4041
4054
  prerequisiteActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
4055
+ userScoped: z.ZodOptional<z.ZodBoolean>;
4042
4056
  }, z.core.$strict>]>;
4043
4057
  condition: z.ZodOptional<z.ZodString>;
4044
4058
  required: z.ZodDefault<z.ZodBoolean>;
@@ -4364,6 +4378,7 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
4364
4378
  }, z.core.$strict>>;
4365
4379
  providerEvents: z.ZodOptional<z.ZodArray<z.ZodString>>;
4366
4380
  prerequisiteActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
4381
+ userScoped: z.ZodOptional<z.ZodBoolean>;
4367
4382
  }, z.core.$strict>>>;
4368
4383
  events: z.ZodOptional<z.ZodObject<{
4369
4384
  setup: z.ZodOptional<z.ZodObject<{
@@ -4790,6 +4805,7 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
4790
4805
  }, z.core.$strict>>;
4791
4806
  providerEvents: z.ZodOptional<z.ZodArray<z.ZodString>>;
4792
4807
  prerequisiteActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
4808
+ userScoped: z.ZodOptional<z.ZodBoolean>;
4793
4809
  actionType: z.ZodLiteral<"event">;
4794
4810
  requiresManualSetup: z.ZodOptional<z.ZodBoolean>;
4795
4811
  }, z.core.$strict>>>;
@@ -5108,6 +5124,7 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
5108
5124
  }, z.core.$strict>>;
5109
5125
  providerEvents: z.ZodOptional<z.ZodArray<z.ZodString>>;
5110
5126
  prerequisiteActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
5127
+ userScoped: z.ZodOptional<z.ZodBoolean>;
5111
5128
  actionType: z.ZodLiteral<"custom">;
5112
5129
  result: z.ZodString;
5113
5130
  }, z.core.$strict>>;
@@ -5342,6 +5359,7 @@ interface MetaAction {
5342
5359
  releaseStage?: ReleaseStage;
5343
5360
  effects?: Effect[];
5344
5361
  annotations?: ActionAnnotations;
5362
+ userScoped?: boolean;
5345
5363
  [key: string]: unknown;
5346
5364
  }
5347
5365
  type ConnectorMetaAuthenticationConfig = {
@@ -5378,6 +5396,7 @@ type ConnectorMetaAction = {
5378
5396
  release_stage?: ReleaseStage;
5379
5397
  effects?: Effect[];
5380
5398
  annotations?: ActionAnnotations;
5399
+ user_scoped?: boolean;
5381
5400
  action_details?: MetaAction;
5382
5401
  authentication: ActionMetaAuthenticationConfig[];
5383
5402
  };
@@ -5599,6 +5618,7 @@ type BaseRunActionParams = {
5599
5618
  headers?: Record<string, string>;
5600
5619
  settings?: Settings;
5601
5620
  source?: Source;
5621
+ user?: ActingUser;
5602
5622
  policy?: ActionPolicy;
5603
5623
  logger?: ILogger;
5604
5624
  decideInvokeToolFn?: typeof decideInvokeTool;
@@ -5671,7 +5691,7 @@ type ExecutedAction = {
5671
5691
  };
5672
5692
  } | {
5673
5693
  outcome: 'refused';
5674
- policy: PolicyContext;
5694
+ policy?: PolicyContext;
5675
5695
  error: ConnectSDKError;
5676
5696
  };
5677
5697
  declare const applyDefender: ({
@@ -5892,4 +5912,4 @@ declare const runWebhookSetupPhase: ({
5892
5912
  runStepActionFn?: typeof runStepAction;
5893
5913
  }) => Promise<WebhookSetupPhaseResult>;
5894
5914
  //#endregion
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 };
5915
+ export { ACTION_SCHEMA, ActingUserRequiredError, 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 };