@stackone/connect-sdk 3.6.0 → 3.8.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 +77 -14
- package/dist/index.d.mts +77 -14
- package/dist/index.mjs +3 -3
- package/package.json +4 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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
|
-
import { IOlapClient } from "@stackone/olap";
|
|
3
|
+
import { IOlapClient, PolicyContext } from "@stackone/olap";
|
|
4
4
|
import { HttpMethod, IHttpClient, IMcpClient, McpClientConfig, McpServerProber, McpToolDefinition } from "@stackone/transport";
|
|
5
5
|
import { z } from "@stackone/utils";
|
|
6
6
|
import { ArgumentValue, CedarEvaluator, FieldDecisions, LevelPolicies, PrincipalRef, ToolDecision } from "@stackone/policy";
|
|
@@ -212,10 +212,10 @@ declare const ACTION_SCHEMA: z.ZodObject<{
|
|
|
212
212
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
213
213
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
214
214
|
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
215
|
-
deprecated: "deprecated";
|
|
216
215
|
preview: "preview";
|
|
217
216
|
beta: "beta";
|
|
218
217
|
ga: "ga";
|
|
218
|
+
deprecated: "deprecated";
|
|
219
219
|
internal: "internal";
|
|
220
220
|
}>>;
|
|
221
221
|
resources: z.ZodOptional<z.ZodString>;
|
|
@@ -507,6 +507,13 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
507
507
|
}, z.core.$strict>>>;
|
|
508
508
|
authentication: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
509
509
|
label: z.ZodString;
|
|
510
|
+
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
511
|
+
preview: "preview";
|
|
512
|
+
beta: "beta";
|
|
513
|
+
ga: "ga";
|
|
514
|
+
deprecated: "deprecated";
|
|
515
|
+
internal: "internal";
|
|
516
|
+
}>>;
|
|
510
517
|
authorization: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
511
518
|
type: z.ZodLiteral<"none">;
|
|
512
519
|
signing: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -791,10 +798,10 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
791
798
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
792
799
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
793
800
|
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
794
|
-
deprecated: "deprecated";
|
|
795
801
|
preview: "preview";
|
|
796
802
|
beta: "beta";
|
|
797
803
|
ga: "ga";
|
|
804
|
+
deprecated: "deprecated";
|
|
798
805
|
internal: "internal";
|
|
799
806
|
}>>;
|
|
800
807
|
resources: z.ZodOptional<z.ZodString>;
|
|
@@ -1105,10 +1112,10 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
1105
1112
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
1106
1113
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1107
1114
|
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
1108
|
-
deprecated: "deprecated";
|
|
1109
1115
|
preview: "preview";
|
|
1110
1116
|
beta: "beta";
|
|
1111
1117
|
ga: "ga";
|
|
1118
|
+
deprecated: "deprecated";
|
|
1112
1119
|
internal: "internal";
|
|
1113
1120
|
}>>;
|
|
1114
1121
|
resources: z.ZodOptional<z.ZodString>;
|
|
@@ -1379,6 +1386,13 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
1379
1386
|
}>>;
|
|
1380
1387
|
}, z.core.$strict>, z.ZodObject<{
|
|
1381
1388
|
label: z.ZodString;
|
|
1389
|
+
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
1390
|
+
preview: "preview";
|
|
1391
|
+
beta: "beta";
|
|
1392
|
+
ga: "ga";
|
|
1393
|
+
deprecated: "deprecated";
|
|
1394
|
+
internal: "internal";
|
|
1395
|
+
}>>;
|
|
1382
1396
|
authorization: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1383
1397
|
type: z.ZodLiteral<"none">;
|
|
1384
1398
|
signing: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -1663,10 +1677,10 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
1663
1677
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
1664
1678
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1665
1679
|
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
1666
|
-
deprecated: "deprecated";
|
|
1667
1680
|
preview: "preview";
|
|
1668
1681
|
beta: "beta";
|
|
1669
1682
|
ga: "ga";
|
|
1683
|
+
deprecated: "deprecated";
|
|
1670
1684
|
internal: "internal";
|
|
1671
1685
|
}>>;
|
|
1672
1686
|
resources: z.ZodOptional<z.ZodString>;
|
|
@@ -1977,10 +1991,10 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
1977
1991
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
1978
1992
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1979
1993
|
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
1980
|
-
deprecated: "deprecated";
|
|
1981
1994
|
preview: "preview";
|
|
1982
1995
|
beta: "beta";
|
|
1983
1996
|
ga: "ga";
|
|
1997
|
+
deprecated: "deprecated";
|
|
1984
1998
|
internal: "internal";
|
|
1985
1999
|
}>>;
|
|
1986
2000
|
resources: z.ZodOptional<z.ZodString>;
|
|
@@ -2247,6 +2261,13 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
2247
2261
|
type: z.ZodLiteral<"custom">;
|
|
2248
2262
|
}, z.core.$strict>, z.ZodObject<{
|
|
2249
2263
|
label: z.ZodString;
|
|
2264
|
+
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
2265
|
+
preview: "preview";
|
|
2266
|
+
beta: "beta";
|
|
2267
|
+
ga: "ga";
|
|
2268
|
+
deprecated: "deprecated";
|
|
2269
|
+
internal: "internal";
|
|
2270
|
+
}>>;
|
|
2250
2271
|
authorization: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2251
2272
|
type: z.ZodLiteral<"none">;
|
|
2252
2273
|
signing: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -2531,10 +2552,10 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
2531
2552
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
2532
2553
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2533
2554
|
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
2534
|
-
deprecated: "deprecated";
|
|
2535
2555
|
preview: "preview";
|
|
2536
2556
|
beta: "beta";
|
|
2537
2557
|
ga: "ga";
|
|
2558
|
+
deprecated: "deprecated";
|
|
2538
2559
|
internal: "internal";
|
|
2539
2560
|
}>>;
|
|
2540
2561
|
resources: z.ZodOptional<z.ZodString>;
|
|
@@ -2845,10 +2866,10 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
2845
2866
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
2846
2867
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2847
2868
|
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
2848
|
-
deprecated: "deprecated";
|
|
2849
2869
|
preview: "preview";
|
|
2850
2870
|
beta: "beta";
|
|
2851
2871
|
ga: "ga";
|
|
2872
|
+
deprecated: "deprecated";
|
|
2852
2873
|
internal: "internal";
|
|
2853
2874
|
}>>;
|
|
2854
2875
|
resources: z.ZodOptional<z.ZodString>;
|
|
@@ -3115,6 +3136,13 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
3115
3136
|
type: z.ZodLiteral<"oidc">;
|
|
3116
3137
|
}, z.core.$strict>, z.ZodObject<{
|
|
3117
3138
|
label: z.ZodString;
|
|
3139
|
+
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
3140
|
+
preview: "preview";
|
|
3141
|
+
beta: "beta";
|
|
3142
|
+
ga: "ga";
|
|
3143
|
+
deprecated: "deprecated";
|
|
3144
|
+
internal: "internal";
|
|
3145
|
+
}>>;
|
|
3118
3146
|
authorization: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3119
3147
|
type: z.ZodLiteral<"none">;
|
|
3120
3148
|
signing: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -3399,10 +3427,10 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
3399
3427
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
3400
3428
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3401
3429
|
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
3402
|
-
deprecated: "deprecated";
|
|
3403
3430
|
preview: "preview";
|
|
3404
3431
|
beta: "beta";
|
|
3405
3432
|
ga: "ga";
|
|
3433
|
+
deprecated: "deprecated";
|
|
3406
3434
|
internal: "internal";
|
|
3407
3435
|
}>>;
|
|
3408
3436
|
resources: z.ZodOptional<z.ZodString>;
|
|
@@ -3713,10 +3741,10 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
3713
3741
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
3714
3742
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3715
3743
|
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
3716
|
-
deprecated: "deprecated";
|
|
3717
3744
|
preview: "preview";
|
|
3718
3745
|
beta: "beta";
|
|
3719
3746
|
ga: "ga";
|
|
3747
|
+
deprecated: "deprecated";
|
|
3720
3748
|
internal: "internal";
|
|
3721
3749
|
}>>;
|
|
3722
3750
|
resources: z.ZodOptional<z.ZodString>;
|
|
@@ -4038,10 +4066,10 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
4038
4066
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
4039
4067
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4040
4068
|
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
4041
|
-
deprecated: "deprecated";
|
|
4042
4069
|
preview: "preview";
|
|
4043
4070
|
beta: "beta";
|
|
4044
4071
|
ga: "ga";
|
|
4072
|
+
deprecated: "deprecated";
|
|
4045
4073
|
internal: "internal";
|
|
4046
4074
|
}>>;
|
|
4047
4075
|
resources: z.ZodOptional<z.ZodString>;
|
|
@@ -4464,10 +4492,10 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
4464
4492
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
4465
4493
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4466
4494
|
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
4467
|
-
deprecated: "deprecated";
|
|
4468
4495
|
preview: "preview";
|
|
4469
4496
|
beta: "beta";
|
|
4470
4497
|
ga: "ga";
|
|
4498
|
+
deprecated: "deprecated";
|
|
4471
4499
|
internal: "internal";
|
|
4472
4500
|
}>>;
|
|
4473
4501
|
resources: z.ZodOptional<z.ZodString>;
|
|
@@ -4783,10 +4811,10 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
4783
4811
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
4784
4812
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4785
4813
|
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
4786
|
-
deprecated: "deprecated";
|
|
4787
4814
|
preview: "preview";
|
|
4788
4815
|
beta: "beta";
|
|
4789
4816
|
ga: "ga";
|
|
4817
|
+
deprecated: "deprecated";
|
|
4790
4818
|
internal: "internal";
|
|
4791
4819
|
}>>;
|
|
4792
4820
|
resources: z.ZodOptional<z.ZodString>;
|
|
@@ -5074,10 +5102,10 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
5074
5102
|
}, z.core.$strict>>>;
|
|
5075
5103
|
}, z.core.$strict>>;
|
|
5076
5104
|
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
5077
|
-
deprecated: "deprecated";
|
|
5078
5105
|
preview: "preview";
|
|
5079
5106
|
beta: "beta";
|
|
5080
5107
|
ga: "ga";
|
|
5108
|
+
deprecated: "deprecated";
|
|
5081
5109
|
internal: "internal";
|
|
5082
5110
|
}>>;
|
|
5083
5111
|
forkedFrom: z.ZodOptional<z.ZodString>;
|
|
@@ -5369,6 +5397,13 @@ type ActionPolicy = {
|
|
|
5369
5397
|
client?: string;
|
|
5370
5398
|
toolName?: string;
|
|
5371
5399
|
};
|
|
5400
|
+
type PolicyCall = {
|
|
5401
|
+
actionRunId: string;
|
|
5402
|
+
actionId: string;
|
|
5403
|
+
accountSecureId: string;
|
|
5404
|
+
principal?: PrincipalRef;
|
|
5405
|
+
levels?: LevelPolicies[];
|
|
5406
|
+
};
|
|
5372
5407
|
declare const decideReadFields: (input: {
|
|
5373
5408
|
policy: ActionPolicy;
|
|
5374
5409
|
account: Account;
|
|
@@ -5525,6 +5560,7 @@ type BaseRunActionParams = {
|
|
|
5525
5560
|
getActionForRefreshAuthenticationFn?: typeof getActionForRefreshAuthentication;
|
|
5526
5561
|
getTestActionsFn?: typeof getTestActions;
|
|
5527
5562
|
applyDefenderFn?: typeof applyDefender;
|
|
5563
|
+
applyRedactionFn?: typeof applyRedactionToBlock;
|
|
5528
5564
|
getHttpClient: () => Promise<IHttpClient>;
|
|
5529
5565
|
getOlapClient?: () => Promise<IOlapClient>;
|
|
5530
5566
|
};
|
|
@@ -5559,17 +5595,44 @@ type RefreshAuthenticationMode = BaseRunActionParams & {
|
|
|
5559
5595
|
redirectUri?: string;
|
|
5560
5596
|
};
|
|
5561
5597
|
type RunActionParams = ActionIdMode | PathMode | TestActionsMode | RefreshAuthenticationMode;
|
|
5598
|
+
declare const applyRedactionToBlock: (block: Block, ask: Extract<ExecutedAction, {
|
|
5599
|
+
outcome: "ran";
|
|
5600
|
+
}>["readFields"], logger: ILogger | undefined) => Promise<{
|
|
5601
|
+
block: Block;
|
|
5602
|
+
redactedClasses: NonNullable<NonNullable<Block["policyMetadata"]>["redactedClasses"]>;
|
|
5603
|
+
}>;
|
|
5562
5604
|
declare const runAction: (params: RunActionParams) => Promise<Block>;
|
|
5605
|
+
type ExecutedAction = {
|
|
5606
|
+
outcome: 'ran';
|
|
5607
|
+
block: Block;
|
|
5608
|
+
policy?: PolicyContext;
|
|
5609
|
+
readFields?: {
|
|
5610
|
+
decision: ToolDecision;
|
|
5611
|
+
call: PolicyCall;
|
|
5612
|
+
policy: ActionPolicy;
|
|
5613
|
+
account: Account;
|
|
5614
|
+
action: Pick<Action, 'id' | 'categories'>;
|
|
5615
|
+
authType?: AuthType;
|
|
5616
|
+
sessionId?: string;
|
|
5617
|
+
decideReadFieldsFn?: typeof decideReadFields;
|
|
5618
|
+
};
|
|
5619
|
+
} | {
|
|
5620
|
+
outcome: 'refused';
|
|
5621
|
+
policy: PolicyContext;
|
|
5622
|
+
error: ConnectSDKError;
|
|
5623
|
+
};
|
|
5563
5624
|
declare const applyDefender: ({
|
|
5564
5625
|
outputs,
|
|
5565
5626
|
streamOutput,
|
|
5566
5627
|
toolName,
|
|
5628
|
+
sourceType,
|
|
5567
5629
|
settings,
|
|
5568
5630
|
logger
|
|
5569
5631
|
}: {
|
|
5570
5632
|
outputs: unknown;
|
|
5571
5633
|
streamOutput?: Block["streamOutput"];
|
|
5572
5634
|
toolName: string;
|
|
5635
|
+
sourceType?: SourceType;
|
|
5573
5636
|
settings?: Settings;
|
|
5574
5637
|
logger?: ILogger;
|
|
5575
5638
|
}) => Promise<{
|
package/dist/index.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ import { z } from "@stackone/utils";
|
|
|
3
3
|
import { HttpMethod, IHttpClient, IMcpClient, McpClientConfig, McpServerProber, McpToolDefinition } from "@stackone/transport";
|
|
4
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";
|
|
5
5
|
import { ArgumentValue, CedarEvaluator, FieldDecisions, LevelPolicies, PrincipalRef, ToolDecision } from "@stackone/policy";
|
|
6
|
-
import { IOlapClient } from "@stackone/olap";
|
|
6
|
+
import { IOlapClient, PolicyContext } from "@stackone/olap";
|
|
7
7
|
import { ILogger } from "@stackone/logger";
|
|
8
8
|
|
|
9
9
|
//#region src/blocks/createBlock.d.ts
|
|
@@ -211,10 +211,10 @@ declare const ACTION_SCHEMA: z.ZodObject<{
|
|
|
211
211
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
212
212
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
213
213
|
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
214
|
-
deprecated: "deprecated";
|
|
215
214
|
preview: "preview";
|
|
216
215
|
beta: "beta";
|
|
217
216
|
ga: "ga";
|
|
217
|
+
deprecated: "deprecated";
|
|
218
218
|
internal: "internal";
|
|
219
219
|
}>>;
|
|
220
220
|
resources: z.ZodOptional<z.ZodString>;
|
|
@@ -506,6 +506,13 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
506
506
|
}, z.core.$strict>>>;
|
|
507
507
|
authentication: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
508
508
|
label: z.ZodString;
|
|
509
|
+
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
510
|
+
preview: "preview";
|
|
511
|
+
beta: "beta";
|
|
512
|
+
ga: "ga";
|
|
513
|
+
deprecated: "deprecated";
|
|
514
|
+
internal: "internal";
|
|
515
|
+
}>>;
|
|
509
516
|
authorization: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
510
517
|
type: z.ZodLiteral<"none">;
|
|
511
518
|
signing: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -790,10 +797,10 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
790
797
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
791
798
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
792
799
|
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
793
|
-
deprecated: "deprecated";
|
|
794
800
|
preview: "preview";
|
|
795
801
|
beta: "beta";
|
|
796
802
|
ga: "ga";
|
|
803
|
+
deprecated: "deprecated";
|
|
797
804
|
internal: "internal";
|
|
798
805
|
}>>;
|
|
799
806
|
resources: z.ZodOptional<z.ZodString>;
|
|
@@ -1104,10 +1111,10 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
1104
1111
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
1105
1112
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1106
1113
|
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
1107
|
-
deprecated: "deprecated";
|
|
1108
1114
|
preview: "preview";
|
|
1109
1115
|
beta: "beta";
|
|
1110
1116
|
ga: "ga";
|
|
1117
|
+
deprecated: "deprecated";
|
|
1111
1118
|
internal: "internal";
|
|
1112
1119
|
}>>;
|
|
1113
1120
|
resources: z.ZodOptional<z.ZodString>;
|
|
@@ -1378,6 +1385,13 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
1378
1385
|
}>>;
|
|
1379
1386
|
}, z.core.$strict>, z.ZodObject<{
|
|
1380
1387
|
label: z.ZodString;
|
|
1388
|
+
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
1389
|
+
preview: "preview";
|
|
1390
|
+
beta: "beta";
|
|
1391
|
+
ga: "ga";
|
|
1392
|
+
deprecated: "deprecated";
|
|
1393
|
+
internal: "internal";
|
|
1394
|
+
}>>;
|
|
1381
1395
|
authorization: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1382
1396
|
type: z.ZodLiteral<"none">;
|
|
1383
1397
|
signing: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -1662,10 +1676,10 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
1662
1676
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
1663
1677
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1664
1678
|
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
1665
|
-
deprecated: "deprecated";
|
|
1666
1679
|
preview: "preview";
|
|
1667
1680
|
beta: "beta";
|
|
1668
1681
|
ga: "ga";
|
|
1682
|
+
deprecated: "deprecated";
|
|
1669
1683
|
internal: "internal";
|
|
1670
1684
|
}>>;
|
|
1671
1685
|
resources: z.ZodOptional<z.ZodString>;
|
|
@@ -1976,10 +1990,10 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
1976
1990
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
1977
1991
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1978
1992
|
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
1979
|
-
deprecated: "deprecated";
|
|
1980
1993
|
preview: "preview";
|
|
1981
1994
|
beta: "beta";
|
|
1982
1995
|
ga: "ga";
|
|
1996
|
+
deprecated: "deprecated";
|
|
1983
1997
|
internal: "internal";
|
|
1984
1998
|
}>>;
|
|
1985
1999
|
resources: z.ZodOptional<z.ZodString>;
|
|
@@ -2246,6 +2260,13 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
2246
2260
|
type: z.ZodLiteral<"custom">;
|
|
2247
2261
|
}, z.core.$strict>, z.ZodObject<{
|
|
2248
2262
|
label: z.ZodString;
|
|
2263
|
+
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
2264
|
+
preview: "preview";
|
|
2265
|
+
beta: "beta";
|
|
2266
|
+
ga: "ga";
|
|
2267
|
+
deprecated: "deprecated";
|
|
2268
|
+
internal: "internal";
|
|
2269
|
+
}>>;
|
|
2249
2270
|
authorization: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2250
2271
|
type: z.ZodLiteral<"none">;
|
|
2251
2272
|
signing: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -2530,10 +2551,10 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
2530
2551
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
2531
2552
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2532
2553
|
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
2533
|
-
deprecated: "deprecated";
|
|
2534
2554
|
preview: "preview";
|
|
2535
2555
|
beta: "beta";
|
|
2536
2556
|
ga: "ga";
|
|
2557
|
+
deprecated: "deprecated";
|
|
2537
2558
|
internal: "internal";
|
|
2538
2559
|
}>>;
|
|
2539
2560
|
resources: z.ZodOptional<z.ZodString>;
|
|
@@ -2844,10 +2865,10 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
2844
2865
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
2845
2866
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2846
2867
|
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
2847
|
-
deprecated: "deprecated";
|
|
2848
2868
|
preview: "preview";
|
|
2849
2869
|
beta: "beta";
|
|
2850
2870
|
ga: "ga";
|
|
2871
|
+
deprecated: "deprecated";
|
|
2851
2872
|
internal: "internal";
|
|
2852
2873
|
}>>;
|
|
2853
2874
|
resources: z.ZodOptional<z.ZodString>;
|
|
@@ -3114,6 +3135,13 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
3114
3135
|
type: z.ZodLiteral<"oidc">;
|
|
3115
3136
|
}, z.core.$strict>, z.ZodObject<{
|
|
3116
3137
|
label: z.ZodString;
|
|
3138
|
+
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
3139
|
+
preview: "preview";
|
|
3140
|
+
beta: "beta";
|
|
3141
|
+
ga: "ga";
|
|
3142
|
+
deprecated: "deprecated";
|
|
3143
|
+
internal: "internal";
|
|
3144
|
+
}>>;
|
|
3117
3145
|
authorization: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3118
3146
|
type: z.ZodLiteral<"none">;
|
|
3119
3147
|
signing: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -3398,10 +3426,10 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
3398
3426
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
3399
3427
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3400
3428
|
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
3401
|
-
deprecated: "deprecated";
|
|
3402
3429
|
preview: "preview";
|
|
3403
3430
|
beta: "beta";
|
|
3404
3431
|
ga: "ga";
|
|
3432
|
+
deprecated: "deprecated";
|
|
3405
3433
|
internal: "internal";
|
|
3406
3434
|
}>>;
|
|
3407
3435
|
resources: z.ZodOptional<z.ZodString>;
|
|
@@ -3712,10 +3740,10 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
3712
3740
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
3713
3741
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3714
3742
|
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
3715
|
-
deprecated: "deprecated";
|
|
3716
3743
|
preview: "preview";
|
|
3717
3744
|
beta: "beta";
|
|
3718
3745
|
ga: "ga";
|
|
3746
|
+
deprecated: "deprecated";
|
|
3719
3747
|
internal: "internal";
|
|
3720
3748
|
}>>;
|
|
3721
3749
|
resources: z.ZodOptional<z.ZodString>;
|
|
@@ -4037,10 +4065,10 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
4037
4065
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
4038
4066
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4039
4067
|
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
4040
|
-
deprecated: "deprecated";
|
|
4041
4068
|
preview: "preview";
|
|
4042
4069
|
beta: "beta";
|
|
4043
4070
|
ga: "ga";
|
|
4071
|
+
deprecated: "deprecated";
|
|
4044
4072
|
internal: "internal";
|
|
4045
4073
|
}>>;
|
|
4046
4074
|
resources: z.ZodOptional<z.ZodString>;
|
|
@@ -4463,10 +4491,10 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
4463
4491
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
4464
4492
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4465
4493
|
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
4466
|
-
deprecated: "deprecated";
|
|
4467
4494
|
preview: "preview";
|
|
4468
4495
|
beta: "beta";
|
|
4469
4496
|
ga: "ga";
|
|
4497
|
+
deprecated: "deprecated";
|
|
4470
4498
|
internal: "internal";
|
|
4471
4499
|
}>>;
|
|
4472
4500
|
resources: z.ZodOptional<z.ZodString>;
|
|
@@ -4782,10 +4810,10 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
4782
4810
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
4783
4811
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4784
4812
|
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
4785
|
-
deprecated: "deprecated";
|
|
4786
4813
|
preview: "preview";
|
|
4787
4814
|
beta: "beta";
|
|
4788
4815
|
ga: "ga";
|
|
4816
|
+
deprecated: "deprecated";
|
|
4789
4817
|
internal: "internal";
|
|
4790
4818
|
}>>;
|
|
4791
4819
|
resources: z.ZodOptional<z.ZodString>;
|
|
@@ -5073,10 +5101,10 @@ declare const CONNECTOR_YAML_SCHEMA: z.ZodObject<{
|
|
|
5073
5101
|
}, z.core.$strict>>>;
|
|
5074
5102
|
}, z.core.$strict>>;
|
|
5075
5103
|
releaseStage: z.ZodOptional<z.ZodEnum<{
|
|
5076
|
-
deprecated: "deprecated";
|
|
5077
5104
|
preview: "preview";
|
|
5078
5105
|
beta: "beta";
|
|
5079
5106
|
ga: "ga";
|
|
5107
|
+
deprecated: "deprecated";
|
|
5080
5108
|
internal: "internal";
|
|
5081
5109
|
}>>;
|
|
5082
5110
|
forkedFrom: z.ZodOptional<z.ZodString>;
|
|
@@ -5368,6 +5396,13 @@ type ActionPolicy = {
|
|
|
5368
5396
|
client?: string;
|
|
5369
5397
|
toolName?: string;
|
|
5370
5398
|
};
|
|
5399
|
+
type PolicyCall = {
|
|
5400
|
+
actionRunId: string;
|
|
5401
|
+
actionId: string;
|
|
5402
|
+
accountSecureId: string;
|
|
5403
|
+
principal?: PrincipalRef;
|
|
5404
|
+
levels?: LevelPolicies[];
|
|
5405
|
+
};
|
|
5371
5406
|
declare const decideReadFields: (input: {
|
|
5372
5407
|
policy: ActionPolicy;
|
|
5373
5408
|
account: Account;
|
|
@@ -5524,6 +5559,7 @@ type BaseRunActionParams = {
|
|
|
5524
5559
|
getActionForRefreshAuthenticationFn?: typeof getActionForRefreshAuthentication;
|
|
5525
5560
|
getTestActionsFn?: typeof getTestActions;
|
|
5526
5561
|
applyDefenderFn?: typeof applyDefender;
|
|
5562
|
+
applyRedactionFn?: typeof applyRedactionToBlock;
|
|
5527
5563
|
getHttpClient: () => Promise<IHttpClient>;
|
|
5528
5564
|
getOlapClient?: () => Promise<IOlapClient>;
|
|
5529
5565
|
};
|
|
@@ -5558,17 +5594,44 @@ type RefreshAuthenticationMode = BaseRunActionParams & {
|
|
|
5558
5594
|
redirectUri?: string;
|
|
5559
5595
|
};
|
|
5560
5596
|
type RunActionParams = ActionIdMode | PathMode | TestActionsMode | RefreshAuthenticationMode;
|
|
5597
|
+
declare const applyRedactionToBlock: (block: Block, ask: Extract<ExecutedAction, {
|
|
5598
|
+
outcome: "ran";
|
|
5599
|
+
}>["readFields"], logger: ILogger | undefined) => Promise<{
|
|
5600
|
+
block: Block;
|
|
5601
|
+
redactedClasses: NonNullable<NonNullable<Block["policyMetadata"]>["redactedClasses"]>;
|
|
5602
|
+
}>;
|
|
5561
5603
|
declare const runAction: (params: RunActionParams) => Promise<Block>;
|
|
5604
|
+
type ExecutedAction = {
|
|
5605
|
+
outcome: 'ran';
|
|
5606
|
+
block: Block;
|
|
5607
|
+
policy?: PolicyContext;
|
|
5608
|
+
readFields?: {
|
|
5609
|
+
decision: ToolDecision;
|
|
5610
|
+
call: PolicyCall;
|
|
5611
|
+
policy: ActionPolicy;
|
|
5612
|
+
account: Account;
|
|
5613
|
+
action: Pick<Action, 'id' | 'categories'>;
|
|
5614
|
+
authType?: AuthType;
|
|
5615
|
+
sessionId?: string;
|
|
5616
|
+
decideReadFieldsFn?: typeof decideReadFields;
|
|
5617
|
+
};
|
|
5618
|
+
} | {
|
|
5619
|
+
outcome: 'refused';
|
|
5620
|
+
policy: PolicyContext;
|
|
5621
|
+
error: ConnectSDKError;
|
|
5622
|
+
};
|
|
5562
5623
|
declare const applyDefender: ({
|
|
5563
5624
|
outputs,
|
|
5564
5625
|
streamOutput,
|
|
5565
5626
|
toolName,
|
|
5627
|
+
sourceType,
|
|
5566
5628
|
settings,
|
|
5567
5629
|
logger
|
|
5568
5630
|
}: {
|
|
5569
5631
|
outputs: unknown;
|
|
5570
5632
|
streamOutput?: Block["streamOutput"];
|
|
5571
5633
|
toolName: string;
|
|
5634
|
+
sourceType?: SourceType;
|
|
5572
5635
|
settings?: Settings;
|
|
5573
5636
|
logger?: ILogger;
|
|
5574
5637
|
}) => Promise<{
|