@dual-os/sdk 0.0.0-stage → 0.8.0-next.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/LICENSE +4 -0
- package/README.md +19 -2
- package/dist/Action.d.ts +201 -0
- package/dist/Action.d.ts.map +1 -0
- package/dist/Action.js +172 -0
- package/dist/Action.js.map +1 -0
- package/dist/AgentChannel.d.ts +1717 -0
- package/dist/AgentChannel.d.ts.map +1 -0
- package/dist/AgentChannel.js +708 -0
- package/dist/AgentChannel.js.map +1 -0
- package/dist/AgentChannelConformance.d.ts +1543 -0
- package/dist/AgentChannelConformance.d.ts.map +1 -0
- package/dist/AgentChannelConformance.js +163 -0
- package/dist/AgentChannelConformance.js.map +1 -0
- package/dist/AgentChannelRuntime.d.ts +78 -0
- package/dist/AgentChannelRuntime.d.ts.map +1 -0
- package/dist/AgentChannelRuntime.js +270 -0
- package/dist/AgentChannelRuntime.js.map +1 -0
- package/dist/AiProvider.d.ts +132 -0
- package/dist/AiProvider.d.ts.map +1 -0
- package/dist/AiProvider.js +100 -0
- package/dist/AiProvider.js.map +1 -0
- package/dist/AuthMethod.d.ts +381 -0
- package/dist/AuthMethod.d.ts.map +1 -0
- package/dist/AuthMethod.js +225 -0
- package/dist/AuthMethod.js.map +1 -0
- package/dist/AuthMethodBinding.d.ts +77 -0
- package/dist/AuthMethodBinding.d.ts.map +1 -0
- package/dist/AuthMethodBinding.js +31 -0
- package/dist/AuthMethodBinding.js.map +1 -0
- package/dist/AuthMethodExecution.d.ts +223 -0
- package/dist/AuthMethodExecution.d.ts.map +1 -0
- package/dist/AuthMethodExecution.js +277 -0
- package/dist/AuthMethodExecution.js.map +1 -0
- package/dist/ConnectionResolver.d.ts +219 -0
- package/dist/ConnectionResolver.d.ts.map +1 -0
- package/dist/ConnectionResolver.js +153 -0
- package/dist/ConnectionResolver.js.map +1 -0
- package/dist/DefinitionError.d.ts +67 -0
- package/dist/DefinitionError.d.ts.map +1 -0
- package/dist/DefinitionError.js +82 -0
- package/dist/DefinitionError.js.map +1 -0
- package/dist/DualRegistry.d.ts +71 -0
- package/dist/DualRegistry.d.ts.map +1 -0
- package/dist/DualRegistry.js +96 -0
- package/dist/DualRegistry.js.map +1 -0
- package/dist/DualRuntime.d.ts +279 -0
- package/dist/DualRuntime.d.ts.map +1 -0
- package/dist/DualRuntime.js +311 -0
- package/dist/DualRuntime.js.map +1 -0
- package/dist/Files.d.ts +80 -0
- package/dist/Files.d.ts.map +1 -0
- package/dist/Files.js +66 -0
- package/dist/Files.js.map +1 -0
- package/dist/Group.d.ts +106 -0
- package/dist/Group.d.ts.map +1 -0
- package/dist/Group.js +86 -0
- package/dist/Group.js.map +1 -0
- package/dist/Http.d.ts +342 -0
- package/dist/Http.d.ts.map +1 -0
- package/dist/Http.js +677 -0
- package/dist/Http.js.map +1 -0
- package/dist/Mcp.d.ts +109 -0
- package/dist/Mcp.d.ts.map +1 -0
- package/dist/Mcp.js +176 -0
- package/dist/Mcp.js.map +1 -0
- package/dist/OAuth2TokenRefresher.d.ts +18 -0
- package/dist/OAuth2TokenRefresher.d.ts.map +1 -0
- package/dist/OAuth2TokenRefresher.js +19 -0
- package/dist/OAuth2TokenRefresher.js.map +1 -0
- package/dist/OAuthFlow.d.ts +71 -0
- package/dist/OAuthFlow.d.ts.map +1 -0
- package/dist/OAuthFlow.js +488 -0
- package/dist/OAuthFlow.js.map +1 -0
- package/dist/Plugin.d.ts +383 -0
- package/dist/Plugin.d.ts.map +1 -0
- package/dist/Plugin.js +249 -0
- package/dist/Plugin.js.map +1 -0
- package/dist/PluginRuntime.d.ts +3186 -0
- package/dist/PluginRuntime.d.ts.map +1 -0
- package/dist/PluginRuntime.js +331 -0
- package/dist/PluginRuntime.js.map +1 -0
- package/dist/Runner.d.ts +1 -0
- package/dist/Runner.js +124 -0
- package/dist/Runner.js.map +1 -0
- package/dist/ToolFile.d.ts +23 -0
- package/dist/ToolFile.d.ts.map +1 -0
- package/dist/ToolFile.js +33 -0
- package/dist/ToolFile.js.map +1 -0
- package/dist/Trigger.d.ts +358 -0
- package/dist/Trigger.d.ts.map +1 -0
- package/dist/Trigger.js +287 -0
- package/dist/Trigger.js.map +1 -0
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +24 -0
- package/dist/internal/auth-context.d.ts +23 -0
- package/dist/internal/auth-context.d.ts.map +1 -0
- package/dist/internal/auth-context.js +1 -0
- package/dist/internal/auth-execution.d.ts +27 -0
- package/dist/internal/auth-execution.d.ts.map +1 -0
- package/dist/internal/auth-execution.js +66 -0
- package/dist/internal/auth-execution.js.map +1 -0
- package/dist/internal/auth-runtime.d.ts +5 -0
- package/dist/internal/auth-runtime.d.ts.map +1 -0
- package/dist/internal/auth-runtime.js +16 -0
- package/dist/internal/auth-runtime.js.map +1 -0
- package/dist/internal/capabilities.d.ts +24 -0
- package/dist/internal/capabilities.d.ts.map +1 -0
- package/dist/internal/capabilities.js +22 -0
- package/dist/internal/capabilities.js.map +1 -0
- package/dist/internal/children.d.ts +34 -0
- package/dist/internal/children.d.ts.map +1 -0
- package/dist/internal/children.js +53 -0
- package/dist/internal/children.js.map +1 -0
- package/dist/internal/collection-utils.d.ts +4 -0
- package/dist/internal/collection-utils.d.ts.map +1 -0
- package/dist/internal/collection-utils.js +6 -0
- package/dist/internal/collection-utils.js.map +1 -0
- package/dist/internal/dual/actions.d.ts +33 -0
- package/dist/internal/dual/actions.d.ts.map +1 -0
- package/dist/internal/dual/actions.js +26 -0
- package/dist/internal/dual/actions.js.map +1 -0
- package/dist/internal/dual/invoke.d.ts +63 -0
- package/dist/internal/dual/invoke.d.ts.map +1 -0
- package/dist/internal/dual/invoke.js +75 -0
- package/dist/internal/dual/invoke.js.map +1 -0
- package/dist/internal/dual/registry.d.ts +125 -0
- package/dist/internal/dual/registry.d.ts.map +1 -0
- package/dist/internal/dual/registry.js +172 -0
- package/dist/internal/dual/registry.js.map +1 -0
- package/dist/internal/dual/triggers.d.ts +29 -0
- package/dist/internal/dual/triggers.d.ts.map +1 -0
- package/dist/internal/dual/triggers.js +26 -0
- package/dist/internal/dual/triggers.js.map +1 -0
- package/dist/internal/handler-context.d.ts +9 -0
- package/dist/internal/handler-context.d.ts.map +1 -0
- package/dist/internal/handler-context.js +31 -0
- package/dist/internal/handler-context.js.map +1 -0
- package/dist/internal/identifier.d.ts +6 -0
- package/dist/internal/identifier.d.ts.map +1 -0
- package/dist/internal/identifier.js +28 -0
- package/dist/internal/identifier.js.map +1 -0
- package/dist/internal/plugin-handlers.d.ts +38 -0
- package/dist/internal/plugin-handlers.d.ts.map +1 -0
- package/dist/internal/plugin-handlers.js +52 -0
- package/dist/internal/plugin-handlers.js.map +1 -0
- package/dist/internal/proto.d.ts +7 -0
- package/dist/internal/proto.d.ts.map +1 -0
- package/dist/internal/proto.js +10 -0
- package/dist/internal/proto.js.map +1 -0
- package/dist/internal/schema-runtime.d.ts +6 -0
- package/dist/internal/schema-runtime.d.ts.map +1 -0
- package/dist/internal/schema-runtime.js +10 -0
- package/dist/internal/schema-runtime.js.map +1 -0
- package/dist/internal/trigger-runtime-shared.d.ts +41 -0
- package/dist/internal/trigger-runtime-shared.d.ts.map +1 -0
- package/dist/internal/trigger-runtime-shared.js +132 -0
- package/dist/internal/trigger-runtime-shared.js.map +1 -0
- package/dist/internal/trigger-runtime.d.ts +12 -0
- package/dist/internal/trigger-runtime.d.ts.map +1 -0
- package/dist/internal/trigger-runtime.js +95 -0
- package/dist/internal/trigger-runtime.js.map +1 -0
- package/dist/internal/types.d.ts +7 -0
- package/dist/internal/types.d.ts.map +1 -0
- package/dist/internal/types.js +1 -0
- package/dist/remote-runtime.d.ts +585 -0
- package/dist/remote-runtime.d.ts.map +1 -0
- package/dist/remote-runtime.js +367 -0
- package/dist/remote-runtime.js.map +1 -0
- package/package.json +55 -4
- package/src/Action.ts +370 -0
- package/src/AgentChannel.ts +860 -0
- package/src/AgentChannelConformance.ts +124 -0
- package/src/AgentChannelRuntime.ts +616 -0
- package/src/AiProvider.ts +255 -0
- package/src/AuthMethod.ts +954 -0
- package/src/AuthMethodBinding.ts +112 -0
- package/src/AuthMethodExecution.ts +542 -0
- package/src/ConnectionResolver.ts +265 -0
- package/src/DefinitionError.ts +115 -0
- package/src/DualRegistry.ts +152 -0
- package/src/DualRuntime.ts +1081 -0
- package/src/Files.ts +89 -0
- package/src/Group.ts +292 -0
- package/src/Http.ts +1205 -0
- package/src/Mcp.ts +299 -0
- package/src/OAuth2TokenRefresher.ts +22 -0
- package/src/OAuthFlow.ts +874 -0
- package/src/Plugin.ts +912 -0
- package/src/PluginRuntime.ts +414 -0
- package/src/Runner.ts +248 -0
- package/src/ToolFile.ts +28 -0
- package/src/Trigger.ts +722 -0
- package/src/index.ts +158 -0
- package/src/internal/auth-context.ts +27 -0
- package/src/internal/auth-execution.ts +241 -0
- package/src/internal/auth-runtime.ts +20 -0
- package/src/internal/capabilities.ts +55 -0
- package/src/internal/children.ts +126 -0
- package/src/internal/collection-utils.ts +8 -0
- package/src/internal/dual/actions.ts +116 -0
- package/src/internal/dual/invoke.ts +307 -0
- package/src/internal/dual/registry.ts +340 -0
- package/src/internal/dual/triggers.ts +128 -0
- package/src/internal/handler-context.ts +57 -0
- package/src/internal/identifier.ts +27 -0
- package/src/internal/plugin-handlers.ts +146 -0
- package/src/internal/proto.ts +8 -0
- package/src/internal/schema-runtime.ts +15 -0
- package/src/internal/trigger-runtime-shared.ts +449 -0
- package/src/internal/trigger-runtime.ts +223 -0
- package/src/internal/types.ts +12 -0
- package/src/remote-runtime.ts +469 -0
|
@@ -0,0 +1,3186 @@
|
|
|
1
|
+
import { ChannelError } from "./AgentChannel.js";
|
|
2
|
+
import { InvokeError } from "./internal/dual/invoke.js";
|
|
3
|
+
import { AuthMethodExecutionError, Service } from "./DualRuntime.js";
|
|
4
|
+
import { Service as Service$1 } from "./OAuthFlow.js";
|
|
5
|
+
import "./PluginRuntime.js";
|
|
6
|
+
import { Cause, Effect, Schema, Stream } from "effect";
|
|
7
|
+
declare namespace PluginRuntime_d_exports {
|
|
8
|
+
export { AuthRequest, ChannelSettingsRequest, ExecutionRequest, Input, Invocation, IpcEvents, IpcSender, OAuthContinuation, OAuthStarted, Output, PluginExecutionError, PluginRuntime_d_exports as PluginRuntime, Request, SandboxAccessResult, cancellationTimeout, checkMessageSize, decodeInput, decodeOutput, encodeInput, encodeOutput, encodeRequest, execute, ipcMessages, maxChannelResultBytes, maxMetadataBytes, maxPayloadBytes, readBounded, responseLimit, sendIpc, verifyResponse };
|
|
9
|
+
}
|
|
10
|
+
declare const PluginExecutionError_base: Schema.Class<PluginExecutionError, Schema.TaggedStruct<"PluginExecutionError", {
|
|
11
|
+
readonly category: Schema.Literals<readonly ["transport", "runner", "protocol", "cleanup", "artifact-expired"]>;
|
|
12
|
+
readonly cause: Schema.optionalKey<Schema.Redacted<Schema.Defect>>;
|
|
13
|
+
readonly message: Schema.String;
|
|
14
|
+
}>, Cause.YieldableError>;
|
|
15
|
+
export declare class PluginExecutionError extends PluginExecutionError_base {}
|
|
16
|
+
export declare const maxPayloadBytes: number;
|
|
17
|
+
export declare const maxMetadataBytes: number;
|
|
18
|
+
/** An Agent Channel result carries a read asset of up to 14 MiB. */
|
|
19
|
+
export declare const maxChannelResultBytes: number;
|
|
20
|
+
export declare const cancellationTimeout = "5 seconds";
|
|
21
|
+
/** The listener half of a Node or Bun IPC channel: a process or a child process. */
|
|
22
|
+
export interface IpcEvents {
|
|
23
|
+
readonly on: (event: string, listener: (value: unknown) => void) => unknown;
|
|
24
|
+
readonly removeListener: (event: string, listener: (value: unknown) => void) => unknown;
|
|
25
|
+
}
|
|
26
|
+
/** The sending half of a Node or Bun IPC channel: a process or a child process. */
|
|
27
|
+
export interface IpcSender {
|
|
28
|
+
readonly connected: boolean;
|
|
29
|
+
readonly send?: ((message: object) => unknown) | undefined;
|
|
30
|
+
}
|
|
31
|
+
/** Receive native Node and Bun IPC messages without interpreting plugin logs. */
|
|
32
|
+
export declare function ipcMessages(channel: IpcEvents): Stream.Stream<unknown, PluginExecutionError, never>;
|
|
33
|
+
/** Queue a JSON message; the runtime reports asynchronous send failures through its error event. */
|
|
34
|
+
export declare function sendIpc(channel: IpcSender, value: object): Effect.Effect<void, PluginExecutionError, never>;
|
|
35
|
+
export type OAuthContinuation = typeof OAuthContinuation.Type;
|
|
36
|
+
export declare const OAuthContinuation: Schema.Struct<{
|
|
37
|
+
readonly expiresAt: Schema.DateFromString;
|
|
38
|
+
readonly pkceVerifier: Schema.NullOr<Schema.String>;
|
|
39
|
+
readonly redirectUri: Schema.String;
|
|
40
|
+
readonly state: Schema.String;
|
|
41
|
+
}>;
|
|
42
|
+
export type OAuthStarted = typeof OAuthStarted.Type;
|
|
43
|
+
export declare const OAuthStarted: Schema.Struct<{
|
|
44
|
+
readonly authorizationUrl: Schema.String;
|
|
45
|
+
readonly continuation: Schema.Struct<{
|
|
46
|
+
readonly expiresAt: Schema.DateFromString;
|
|
47
|
+
readonly pkceVerifier: Schema.NullOr<Schema.String>;
|
|
48
|
+
readonly redirectUri: Schema.String;
|
|
49
|
+
readonly state: Schema.String;
|
|
50
|
+
}>;
|
|
51
|
+
}>;
|
|
52
|
+
/** The origins a Connection's credential may reach from a run sandbox, and the headers one request gets. */
|
|
53
|
+
export type SandboxAccessResult = typeof SandboxAccessResult.Type;
|
|
54
|
+
export declare const SandboxAccessResult: Schema.Struct<{
|
|
55
|
+
readonly headers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
56
|
+
readonly origins: Schema.$Array<Schema.String>;
|
|
57
|
+
}>;
|
|
58
|
+
export type AuthRequest = typeof AuthRequest.Type;
|
|
59
|
+
export declare const AuthRequest: Schema.TaggedStruct<"auth", {
|
|
60
|
+
readonly identity: Schema.Struct<{
|
|
61
|
+
readonly artifactDigest: Schema.String;
|
|
62
|
+
readonly invocationId: Schema.NonEmptyString;
|
|
63
|
+
readonly organizationId: Schema.NonEmptyString;
|
|
64
|
+
readonly pluginKey: Schema.NonEmptyString;
|
|
65
|
+
readonly pluginVersion: Schema.NonEmptyString;
|
|
66
|
+
}>;
|
|
67
|
+
readonly operation: Schema.Union<readonly [Schema.Union<readonly [Schema.TaggedStruct<"decodeSetup", {
|
|
68
|
+
authMethodId: Schema.NonEmptyString;
|
|
69
|
+
providerId: Schema.NonEmptyString;
|
|
70
|
+
setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
71
|
+
}>, Schema.TaggedStruct<"prepare", {
|
|
72
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
73
|
+
readonly providerId: Schema.NonEmptyString;
|
|
74
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
75
|
+
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
76
|
+
}>, Schema.TaggedStruct<"prepareOAuth2Tokens", {
|
|
77
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
78
|
+
readonly providerId: Schema.NonEmptyString;
|
|
79
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
80
|
+
readonly tokens: Schema.Struct<{
|
|
81
|
+
readonly accessToken: Schema.String;
|
|
82
|
+
readonly expiresAt: Schema.optionalKey<Schema.Number>;
|
|
83
|
+
readonly expiresIn: Schema.optionalKey<Schema.Number>;
|
|
84
|
+
readonly raw: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
85
|
+
readonly refreshToken: Schema.optionalKey<Schema.String>;
|
|
86
|
+
readonly scope: Schema.optionalKey<Schema.String>;
|
|
87
|
+
readonly tokenType: Schema.optionalKey<Schema.String>;
|
|
88
|
+
}>;
|
|
89
|
+
}>, Schema.TaggedStruct<"refresh", {
|
|
90
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
91
|
+
readonly providerId: Schema.NonEmptyString;
|
|
92
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
93
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
94
|
+
readonly minValidityMs: Schema.Finite;
|
|
95
|
+
readonly now: Schema.Finite;
|
|
96
|
+
readonly reason: Schema.Literals<readonly ["before-use", "forced"]>;
|
|
97
|
+
}>, Schema.TaggedStruct<"resolve", {
|
|
98
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
99
|
+
readonly providerId: Schema.NonEmptyString;
|
|
100
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
101
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
102
|
+
}>, Schema.TaggedStruct<"display", {
|
|
103
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
104
|
+
readonly providerId: Schema.NonEmptyString;
|
|
105
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
106
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
107
|
+
}>, Schema.TaggedStruct<"test", {
|
|
108
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
109
|
+
readonly providerId: Schema.NonEmptyString;
|
|
110
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
111
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
112
|
+
}>]>, Schema.TaggedStruct<"oauthStart", {
|
|
113
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
114
|
+
readonly providerId: Schema.NonEmptyString;
|
|
115
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
116
|
+
readonly redirectUri: Schema.String;
|
|
117
|
+
}>, Schema.TaggedStruct<"oauthComplete", {
|
|
118
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
119
|
+
readonly providerId: Schema.NonEmptyString;
|
|
120
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
121
|
+
readonly continuation: Schema.Struct<{
|
|
122
|
+
readonly expiresAt: Schema.DateFromString;
|
|
123
|
+
readonly pkceVerifier: Schema.NullOr<Schema.String>;
|
|
124
|
+
readonly redirectUri: Schema.String;
|
|
125
|
+
readonly state: Schema.String;
|
|
126
|
+
}>;
|
|
127
|
+
readonly query: Schema.$Record<Schema.String, Schema.String>;
|
|
128
|
+
}>, Schema.TaggedStruct<"sandboxAccess", {
|
|
129
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
130
|
+
readonly providerId: Schema.NonEmptyString;
|
|
131
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
132
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
133
|
+
readonly request: Schema.optionalKey<Schema.Struct<{
|
|
134
|
+
readonly headers: Schema.$Record<Schema.String, Schema.String>;
|
|
135
|
+
readonly method: Schema.Literals<readonly ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE", "QUERY"]>;
|
|
136
|
+
readonly url: Schema.String;
|
|
137
|
+
}>>;
|
|
138
|
+
}>]>;
|
|
139
|
+
}>;
|
|
140
|
+
/** Decode an Agent Channel's settings outside any tenant, as publication validates them. */
|
|
141
|
+
export type ChannelSettingsRequest = typeof ChannelSettingsRequest.Type;
|
|
142
|
+
export declare const ChannelSettingsRequest: Schema.TaggedStruct<"channelSettings", {
|
|
143
|
+
readonly identity: Schema.Struct<{
|
|
144
|
+
readonly artifactDigest: Schema.String;
|
|
145
|
+
readonly invocationId: Schema.NonEmptyString;
|
|
146
|
+
readonly organizationId: Schema.NonEmptyString;
|
|
147
|
+
readonly pluginKey: Schema.NonEmptyString;
|
|
148
|
+
readonly pluginVersion: Schema.NonEmptyString;
|
|
149
|
+
}>;
|
|
150
|
+
readonly operation: Schema.TaggedStruct<"decodeChannelSettings", {
|
|
151
|
+
readonly channelId: Schema.NonEmptyString;
|
|
152
|
+
readonly field: Schema.Literals<readonly ["definitionSettings", "deploymentSettings"]>;
|
|
153
|
+
readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
154
|
+
}>;
|
|
155
|
+
}>;
|
|
156
|
+
export type ExecutionRequest = typeof ExecutionRequest.Type;
|
|
157
|
+
export declare const ExecutionRequest: Schema.Union<readonly [Schema.Struct<{
|
|
158
|
+
readonly connection: Schema.optionalKey<Schema.Struct<{
|
|
159
|
+
readonly connectionId: Schema.NonEmptyString;
|
|
160
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
161
|
+
readonly methodId: Schema.NonEmptyString;
|
|
162
|
+
readonly providerId: Schema.NonEmptyString;
|
|
163
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
164
|
+
}>>;
|
|
165
|
+
readonly context: Schema.Struct<{
|
|
166
|
+
readonly actor: Schema.Union<readonly [Schema.Struct<{
|
|
167
|
+
readonly kind: Schema.Literal<"user">;
|
|
168
|
+
readonly userId: Schema.NonEmptyString;
|
|
169
|
+
}>, Schema.Struct<{
|
|
170
|
+
readonly kind: Schema.Literal<"system">;
|
|
171
|
+
readonly reason: Schema.optionalKey<Schema.String>;
|
|
172
|
+
}>]>;
|
|
173
|
+
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
174
|
+
readonly source: Schema.Struct<{
|
|
175
|
+
readonly kind: Schema.NonEmptyString;
|
|
176
|
+
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
177
|
+
readonly subjectId: Schema.optionalKey<Schema.String>;
|
|
178
|
+
}>;
|
|
179
|
+
readonly tenant: Schema.Struct<{
|
|
180
|
+
readonly organizationId: Schema.NonEmptyString;
|
|
181
|
+
readonly teamId: Schema.NonEmptyString;
|
|
182
|
+
}>;
|
|
183
|
+
}>;
|
|
184
|
+
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
185
|
+
readonly token: Schema.NonEmptyString;
|
|
186
|
+
readonly url: Schema.String;
|
|
187
|
+
}>>;
|
|
188
|
+
readonly identity: Schema.Struct<{
|
|
189
|
+
readonly artifactDigest: Schema.String;
|
|
190
|
+
readonly invocationId: Schema.NonEmptyString;
|
|
191
|
+
readonly organizationId: Schema.NonEmptyString;
|
|
192
|
+
readonly pluginKey: Schema.NonEmptyString;
|
|
193
|
+
readonly pluginVersion: Schema.NonEmptyString;
|
|
194
|
+
}>;
|
|
195
|
+
readonly operation: Schema.Union<readonly [Schema.TaggedStruct<"invoke", {
|
|
196
|
+
readonly actionId: Schema.NonEmptyString;
|
|
197
|
+
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
198
|
+
}>, Schema.TaggedStruct<"activate", {
|
|
199
|
+
config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
200
|
+
state: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
201
|
+
triggerId: Schema.NonEmptyString;
|
|
202
|
+
webhookUrl: Schema.String;
|
|
203
|
+
}>, Schema.TaggedStruct<"deactivate", {
|
|
204
|
+
config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
205
|
+
state: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
206
|
+
triggerId: Schema.NonEmptyString;
|
|
207
|
+
webhookUrl: Schema.String;
|
|
208
|
+
}>, Schema.TaggedStruct<"verify", {
|
|
209
|
+
config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
210
|
+
state: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
211
|
+
triggerId: Schema.NonEmptyString;
|
|
212
|
+
webhookUrl: Schema.String;
|
|
213
|
+
request: Schema.Struct<{
|
|
214
|
+
readonly body: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
215
|
+
readonly headers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
216
|
+
readonly method: Schema.optionalKey<Schema.String>;
|
|
217
|
+
readonly query: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.String>]>>>;
|
|
218
|
+
readonly rawBody: Schema.Uint8ArrayFromBase64;
|
|
219
|
+
readonly url: Schema.optionalKey<Schema.String>;
|
|
220
|
+
}>;
|
|
221
|
+
}>, Schema.TaggedStruct<"parse", {
|
|
222
|
+
config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
223
|
+
state: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
224
|
+
triggerId: Schema.NonEmptyString;
|
|
225
|
+
webhookUrl: Schema.String;
|
|
226
|
+
request: Schema.Struct<{
|
|
227
|
+
readonly body: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
228
|
+
readonly headers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
229
|
+
readonly method: Schema.optionalKey<Schema.String>;
|
|
230
|
+
readonly query: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.String>]>>>;
|
|
231
|
+
readonly rawBody: Schema.Uint8ArrayFromBase64;
|
|
232
|
+
readonly url: Schema.optionalKey<Schema.String>;
|
|
233
|
+
}>;
|
|
234
|
+
}>, Schema.TaggedStruct<"poll", {
|
|
235
|
+
config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
236
|
+
state: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
237
|
+
triggerId: Schema.NonEmptyString;
|
|
238
|
+
}>, Schema.TaggedStruct<"channelCheckAccess", {
|
|
239
|
+
readonly channelId: Schema.NonEmptyString;
|
|
240
|
+
readonly definitionSettings: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
241
|
+
readonly deploymentSettings: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
242
|
+
readonly identity: Schema.Struct<{
|
|
243
|
+
readonly conversation: Schema.Struct<{
|
|
244
|
+
readonly conversationKey: Schema.NonEmptyString;
|
|
245
|
+
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
246
|
+
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
247
|
+
}>;
|
|
248
|
+
readonly senderKey: Schema.NonEmptyString;
|
|
249
|
+
}>;
|
|
250
|
+
}>, Schema.TaggedStruct<"channelExecute", {
|
|
251
|
+
readonly channelId: Schema.NonEmptyString;
|
|
252
|
+
readonly definitionSettings: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
253
|
+
readonly deploymentSettings: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
254
|
+
readonly command: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
255
|
+
}>, Schema.Union<readonly [Schema.TaggedStruct<"decodeSetup", {
|
|
256
|
+
authMethodId: Schema.NonEmptyString;
|
|
257
|
+
providerId: Schema.NonEmptyString;
|
|
258
|
+
setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
259
|
+
}>, Schema.TaggedStruct<"prepare", {
|
|
260
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
261
|
+
readonly providerId: Schema.NonEmptyString;
|
|
262
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
263
|
+
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
264
|
+
}>, Schema.TaggedStruct<"prepareOAuth2Tokens", {
|
|
265
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
266
|
+
readonly providerId: Schema.NonEmptyString;
|
|
267
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
268
|
+
readonly tokens: Schema.Struct<{
|
|
269
|
+
readonly accessToken: Schema.String;
|
|
270
|
+
readonly expiresAt: Schema.optionalKey<Schema.Number>;
|
|
271
|
+
readonly expiresIn: Schema.optionalKey<Schema.Number>;
|
|
272
|
+
readonly raw: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
273
|
+
readonly refreshToken: Schema.optionalKey<Schema.String>;
|
|
274
|
+
readonly scope: Schema.optionalKey<Schema.String>;
|
|
275
|
+
readonly tokenType: Schema.optionalKey<Schema.String>;
|
|
276
|
+
}>;
|
|
277
|
+
}>, Schema.TaggedStruct<"refresh", {
|
|
278
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
279
|
+
readonly providerId: Schema.NonEmptyString;
|
|
280
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
281
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
282
|
+
readonly minValidityMs: Schema.Finite;
|
|
283
|
+
readonly now: Schema.Finite;
|
|
284
|
+
readonly reason: Schema.Literals<readonly ["before-use", "forced"]>;
|
|
285
|
+
}>, Schema.TaggedStruct<"resolve", {
|
|
286
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
287
|
+
readonly providerId: Schema.NonEmptyString;
|
|
288
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
289
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
290
|
+
}>, Schema.TaggedStruct<"display", {
|
|
291
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
292
|
+
readonly providerId: Schema.NonEmptyString;
|
|
293
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
294
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
295
|
+
}>, Schema.TaggedStruct<"test", {
|
|
296
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
297
|
+
readonly providerId: Schema.NonEmptyString;
|
|
298
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
299
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
300
|
+
}>]>]>;
|
|
301
|
+
}>, Schema.TaggedStruct<"auth", {
|
|
302
|
+
readonly identity: Schema.Struct<{
|
|
303
|
+
readonly artifactDigest: Schema.String;
|
|
304
|
+
readonly invocationId: Schema.NonEmptyString;
|
|
305
|
+
readonly organizationId: Schema.NonEmptyString;
|
|
306
|
+
readonly pluginKey: Schema.NonEmptyString;
|
|
307
|
+
readonly pluginVersion: Schema.NonEmptyString;
|
|
308
|
+
}>;
|
|
309
|
+
readonly operation: Schema.Union<readonly [Schema.Union<readonly [Schema.TaggedStruct<"decodeSetup", {
|
|
310
|
+
authMethodId: Schema.NonEmptyString;
|
|
311
|
+
providerId: Schema.NonEmptyString;
|
|
312
|
+
setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
313
|
+
}>, Schema.TaggedStruct<"prepare", {
|
|
314
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
315
|
+
readonly providerId: Schema.NonEmptyString;
|
|
316
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
317
|
+
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
318
|
+
}>, Schema.TaggedStruct<"prepareOAuth2Tokens", {
|
|
319
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
320
|
+
readonly providerId: Schema.NonEmptyString;
|
|
321
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
322
|
+
readonly tokens: Schema.Struct<{
|
|
323
|
+
readonly accessToken: Schema.String;
|
|
324
|
+
readonly expiresAt: Schema.optionalKey<Schema.Number>;
|
|
325
|
+
readonly expiresIn: Schema.optionalKey<Schema.Number>;
|
|
326
|
+
readonly raw: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
327
|
+
readonly refreshToken: Schema.optionalKey<Schema.String>;
|
|
328
|
+
readonly scope: Schema.optionalKey<Schema.String>;
|
|
329
|
+
readonly tokenType: Schema.optionalKey<Schema.String>;
|
|
330
|
+
}>;
|
|
331
|
+
}>, Schema.TaggedStruct<"refresh", {
|
|
332
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
333
|
+
readonly providerId: Schema.NonEmptyString;
|
|
334
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
335
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
336
|
+
readonly minValidityMs: Schema.Finite;
|
|
337
|
+
readonly now: Schema.Finite;
|
|
338
|
+
readonly reason: Schema.Literals<readonly ["before-use", "forced"]>;
|
|
339
|
+
}>, Schema.TaggedStruct<"resolve", {
|
|
340
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
341
|
+
readonly providerId: Schema.NonEmptyString;
|
|
342
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
343
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
344
|
+
}>, Schema.TaggedStruct<"display", {
|
|
345
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
346
|
+
readonly providerId: Schema.NonEmptyString;
|
|
347
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
348
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
349
|
+
}>, Schema.TaggedStruct<"test", {
|
|
350
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
351
|
+
readonly providerId: Schema.NonEmptyString;
|
|
352
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
353
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
354
|
+
}>]>, Schema.TaggedStruct<"oauthStart", {
|
|
355
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
356
|
+
readonly providerId: Schema.NonEmptyString;
|
|
357
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
358
|
+
readonly redirectUri: Schema.String;
|
|
359
|
+
}>, Schema.TaggedStruct<"oauthComplete", {
|
|
360
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
361
|
+
readonly providerId: Schema.NonEmptyString;
|
|
362
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
363
|
+
readonly continuation: Schema.Struct<{
|
|
364
|
+
readonly expiresAt: Schema.DateFromString;
|
|
365
|
+
readonly pkceVerifier: Schema.NullOr<Schema.String>;
|
|
366
|
+
readonly redirectUri: Schema.String;
|
|
367
|
+
readonly state: Schema.String;
|
|
368
|
+
}>;
|
|
369
|
+
readonly query: Schema.$Record<Schema.String, Schema.String>;
|
|
370
|
+
}>, Schema.TaggedStruct<"sandboxAccess", {
|
|
371
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
372
|
+
readonly providerId: Schema.NonEmptyString;
|
|
373
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
374
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
375
|
+
readonly request: Schema.optionalKey<Schema.Struct<{
|
|
376
|
+
readonly headers: Schema.$Record<Schema.String, Schema.String>;
|
|
377
|
+
readonly method: Schema.Literals<readonly ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE", "QUERY"]>;
|
|
378
|
+
readonly url: Schema.String;
|
|
379
|
+
}>>;
|
|
380
|
+
}>]>;
|
|
381
|
+
}>, Schema.TaggedStruct<"channelSettings", {
|
|
382
|
+
readonly identity: Schema.Struct<{
|
|
383
|
+
readonly artifactDigest: Schema.String;
|
|
384
|
+
readonly invocationId: Schema.NonEmptyString;
|
|
385
|
+
readonly organizationId: Schema.NonEmptyString;
|
|
386
|
+
readonly pluginKey: Schema.NonEmptyString;
|
|
387
|
+
readonly pluginVersion: Schema.NonEmptyString;
|
|
388
|
+
}>;
|
|
389
|
+
readonly operation: Schema.TaggedStruct<"decodeChannelSettings", {
|
|
390
|
+
readonly channelId: Schema.NonEmptyString;
|
|
391
|
+
readonly field: Schema.Literals<readonly ["definitionSettings", "deploymentSettings"]>;
|
|
392
|
+
readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
393
|
+
}>;
|
|
394
|
+
}>]>;
|
|
395
|
+
export type Request = typeof Request.Type;
|
|
396
|
+
export declare const Request: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
|
|
397
|
+
readonly connection: Schema.optionalKey<Schema.Struct<{
|
|
398
|
+
readonly connectionId: Schema.NonEmptyString;
|
|
399
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
400
|
+
readonly methodId: Schema.NonEmptyString;
|
|
401
|
+
readonly providerId: Schema.NonEmptyString;
|
|
402
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
403
|
+
}>>;
|
|
404
|
+
readonly context: Schema.Struct<{
|
|
405
|
+
readonly actor: Schema.Union<readonly [Schema.Struct<{
|
|
406
|
+
readonly kind: Schema.Literal<"user">;
|
|
407
|
+
readonly userId: Schema.NonEmptyString;
|
|
408
|
+
}>, Schema.Struct<{
|
|
409
|
+
readonly kind: Schema.Literal<"system">;
|
|
410
|
+
readonly reason: Schema.optionalKey<Schema.String>;
|
|
411
|
+
}>]>;
|
|
412
|
+
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
413
|
+
readonly source: Schema.Struct<{
|
|
414
|
+
readonly kind: Schema.NonEmptyString;
|
|
415
|
+
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
416
|
+
readonly subjectId: Schema.optionalKey<Schema.String>;
|
|
417
|
+
}>;
|
|
418
|
+
readonly tenant: Schema.Struct<{
|
|
419
|
+
readonly organizationId: Schema.NonEmptyString;
|
|
420
|
+
readonly teamId: Schema.NonEmptyString;
|
|
421
|
+
}>;
|
|
422
|
+
}>;
|
|
423
|
+
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
424
|
+
readonly token: Schema.NonEmptyString;
|
|
425
|
+
readonly url: Schema.String;
|
|
426
|
+
}>>;
|
|
427
|
+
readonly identity: Schema.Struct<{
|
|
428
|
+
readonly artifactDigest: Schema.String;
|
|
429
|
+
readonly invocationId: Schema.NonEmptyString;
|
|
430
|
+
readonly organizationId: Schema.NonEmptyString;
|
|
431
|
+
readonly pluginKey: Schema.NonEmptyString;
|
|
432
|
+
readonly pluginVersion: Schema.NonEmptyString;
|
|
433
|
+
}>;
|
|
434
|
+
readonly operation: Schema.Union<readonly [Schema.TaggedStruct<"invoke", {
|
|
435
|
+
readonly actionId: Schema.NonEmptyString;
|
|
436
|
+
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
437
|
+
}>, Schema.TaggedStruct<"activate", {
|
|
438
|
+
config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
439
|
+
state: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
440
|
+
triggerId: Schema.NonEmptyString;
|
|
441
|
+
webhookUrl: Schema.String;
|
|
442
|
+
}>, Schema.TaggedStruct<"deactivate", {
|
|
443
|
+
config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
444
|
+
state: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
445
|
+
triggerId: Schema.NonEmptyString;
|
|
446
|
+
webhookUrl: Schema.String;
|
|
447
|
+
}>, Schema.TaggedStruct<"verify", {
|
|
448
|
+
config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
449
|
+
state: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
450
|
+
triggerId: Schema.NonEmptyString;
|
|
451
|
+
webhookUrl: Schema.String;
|
|
452
|
+
request: Schema.Struct<{
|
|
453
|
+
readonly body: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
454
|
+
readonly headers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
455
|
+
readonly method: Schema.optionalKey<Schema.String>;
|
|
456
|
+
readonly query: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.String>]>>>;
|
|
457
|
+
readonly rawBody: Schema.Uint8ArrayFromBase64;
|
|
458
|
+
readonly url: Schema.optionalKey<Schema.String>;
|
|
459
|
+
}>;
|
|
460
|
+
}>, Schema.TaggedStruct<"parse", {
|
|
461
|
+
config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
462
|
+
state: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
463
|
+
triggerId: Schema.NonEmptyString;
|
|
464
|
+
webhookUrl: Schema.String;
|
|
465
|
+
request: Schema.Struct<{
|
|
466
|
+
readonly body: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
467
|
+
readonly headers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
468
|
+
readonly method: Schema.optionalKey<Schema.String>;
|
|
469
|
+
readonly query: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.String>]>>>;
|
|
470
|
+
readonly rawBody: Schema.Uint8ArrayFromBase64;
|
|
471
|
+
readonly url: Schema.optionalKey<Schema.String>;
|
|
472
|
+
}>;
|
|
473
|
+
}>, Schema.TaggedStruct<"poll", {
|
|
474
|
+
config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
475
|
+
state: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
476
|
+
triggerId: Schema.NonEmptyString;
|
|
477
|
+
}>, Schema.TaggedStruct<"channelCheckAccess", {
|
|
478
|
+
readonly channelId: Schema.NonEmptyString;
|
|
479
|
+
readonly definitionSettings: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
480
|
+
readonly deploymentSettings: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
481
|
+
readonly identity: Schema.Struct<{
|
|
482
|
+
readonly conversation: Schema.Struct<{
|
|
483
|
+
readonly conversationKey: Schema.NonEmptyString;
|
|
484
|
+
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
485
|
+
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
486
|
+
}>;
|
|
487
|
+
readonly senderKey: Schema.NonEmptyString;
|
|
488
|
+
}>;
|
|
489
|
+
}>, Schema.TaggedStruct<"channelExecute", {
|
|
490
|
+
readonly channelId: Schema.NonEmptyString;
|
|
491
|
+
readonly definitionSettings: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
492
|
+
readonly deploymentSettings: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
493
|
+
readonly command: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
494
|
+
}>, Schema.Union<readonly [Schema.TaggedStruct<"decodeSetup", {
|
|
495
|
+
authMethodId: Schema.NonEmptyString;
|
|
496
|
+
providerId: Schema.NonEmptyString;
|
|
497
|
+
setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
498
|
+
}>, Schema.TaggedStruct<"prepare", {
|
|
499
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
500
|
+
readonly providerId: Schema.NonEmptyString;
|
|
501
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
502
|
+
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
503
|
+
}>, Schema.TaggedStruct<"prepareOAuth2Tokens", {
|
|
504
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
505
|
+
readonly providerId: Schema.NonEmptyString;
|
|
506
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
507
|
+
readonly tokens: Schema.Struct<{
|
|
508
|
+
readonly accessToken: Schema.String;
|
|
509
|
+
readonly expiresAt: Schema.optionalKey<Schema.Number>;
|
|
510
|
+
readonly expiresIn: Schema.optionalKey<Schema.Number>;
|
|
511
|
+
readonly raw: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
512
|
+
readonly refreshToken: Schema.optionalKey<Schema.String>;
|
|
513
|
+
readonly scope: Schema.optionalKey<Schema.String>;
|
|
514
|
+
readonly tokenType: Schema.optionalKey<Schema.String>;
|
|
515
|
+
}>;
|
|
516
|
+
}>, Schema.TaggedStruct<"refresh", {
|
|
517
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
518
|
+
readonly providerId: Schema.NonEmptyString;
|
|
519
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
520
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
521
|
+
readonly minValidityMs: Schema.Finite;
|
|
522
|
+
readonly now: Schema.Finite;
|
|
523
|
+
readonly reason: Schema.Literals<readonly ["before-use", "forced"]>;
|
|
524
|
+
}>, Schema.TaggedStruct<"resolve", {
|
|
525
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
526
|
+
readonly providerId: Schema.NonEmptyString;
|
|
527
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
528
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
529
|
+
}>, Schema.TaggedStruct<"display", {
|
|
530
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
531
|
+
readonly providerId: Schema.NonEmptyString;
|
|
532
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
533
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
534
|
+
}>, Schema.TaggedStruct<"test", {
|
|
535
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
536
|
+
readonly providerId: Schema.NonEmptyString;
|
|
537
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
538
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
539
|
+
}>]>]>;
|
|
540
|
+
}>, Schema.TaggedStruct<"auth", {
|
|
541
|
+
readonly identity: Schema.Struct<{
|
|
542
|
+
readonly artifactDigest: Schema.String;
|
|
543
|
+
readonly invocationId: Schema.NonEmptyString;
|
|
544
|
+
readonly organizationId: Schema.NonEmptyString;
|
|
545
|
+
readonly pluginKey: Schema.NonEmptyString;
|
|
546
|
+
readonly pluginVersion: Schema.NonEmptyString;
|
|
547
|
+
}>;
|
|
548
|
+
readonly operation: Schema.Union<readonly [Schema.Union<readonly [Schema.TaggedStruct<"decodeSetup", {
|
|
549
|
+
authMethodId: Schema.NonEmptyString;
|
|
550
|
+
providerId: Schema.NonEmptyString;
|
|
551
|
+
setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
552
|
+
}>, Schema.TaggedStruct<"prepare", {
|
|
553
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
554
|
+
readonly providerId: Schema.NonEmptyString;
|
|
555
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
556
|
+
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
557
|
+
}>, Schema.TaggedStruct<"prepareOAuth2Tokens", {
|
|
558
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
559
|
+
readonly providerId: Schema.NonEmptyString;
|
|
560
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
561
|
+
readonly tokens: Schema.Struct<{
|
|
562
|
+
readonly accessToken: Schema.String;
|
|
563
|
+
readonly expiresAt: Schema.optionalKey<Schema.Number>;
|
|
564
|
+
readonly expiresIn: Schema.optionalKey<Schema.Number>;
|
|
565
|
+
readonly raw: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
566
|
+
readonly refreshToken: Schema.optionalKey<Schema.String>;
|
|
567
|
+
readonly scope: Schema.optionalKey<Schema.String>;
|
|
568
|
+
readonly tokenType: Schema.optionalKey<Schema.String>;
|
|
569
|
+
}>;
|
|
570
|
+
}>, Schema.TaggedStruct<"refresh", {
|
|
571
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
572
|
+
readonly providerId: Schema.NonEmptyString;
|
|
573
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
574
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
575
|
+
readonly minValidityMs: Schema.Finite;
|
|
576
|
+
readonly now: Schema.Finite;
|
|
577
|
+
readonly reason: Schema.Literals<readonly ["before-use", "forced"]>;
|
|
578
|
+
}>, Schema.TaggedStruct<"resolve", {
|
|
579
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
580
|
+
readonly providerId: Schema.NonEmptyString;
|
|
581
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
582
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
583
|
+
}>, Schema.TaggedStruct<"display", {
|
|
584
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
585
|
+
readonly providerId: Schema.NonEmptyString;
|
|
586
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
587
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
588
|
+
}>, Schema.TaggedStruct<"test", {
|
|
589
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
590
|
+
readonly providerId: Schema.NonEmptyString;
|
|
591
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
592
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
593
|
+
}>]>, Schema.TaggedStruct<"oauthStart", {
|
|
594
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
595
|
+
readonly providerId: Schema.NonEmptyString;
|
|
596
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
597
|
+
readonly redirectUri: Schema.String;
|
|
598
|
+
}>, Schema.TaggedStruct<"oauthComplete", {
|
|
599
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
600
|
+
readonly providerId: Schema.NonEmptyString;
|
|
601
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
602
|
+
readonly continuation: Schema.Struct<{
|
|
603
|
+
readonly expiresAt: Schema.DateFromString;
|
|
604
|
+
readonly pkceVerifier: Schema.NullOr<Schema.String>;
|
|
605
|
+
readonly redirectUri: Schema.String;
|
|
606
|
+
readonly state: Schema.String;
|
|
607
|
+
}>;
|
|
608
|
+
readonly query: Schema.$Record<Schema.String, Schema.String>;
|
|
609
|
+
}>, Schema.TaggedStruct<"sandboxAccess", {
|
|
610
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
611
|
+
readonly providerId: Schema.NonEmptyString;
|
|
612
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
613
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
614
|
+
readonly request: Schema.optionalKey<Schema.Struct<{
|
|
615
|
+
readonly headers: Schema.$Record<Schema.String, Schema.String>;
|
|
616
|
+
readonly method: Schema.Literals<readonly ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE", "QUERY"]>;
|
|
617
|
+
readonly url: Schema.String;
|
|
618
|
+
}>>;
|
|
619
|
+
}>]>;
|
|
620
|
+
}>, Schema.TaggedStruct<"channelSettings", {
|
|
621
|
+
readonly identity: Schema.Struct<{
|
|
622
|
+
readonly artifactDigest: Schema.String;
|
|
623
|
+
readonly invocationId: Schema.NonEmptyString;
|
|
624
|
+
readonly organizationId: Schema.NonEmptyString;
|
|
625
|
+
readonly pluginKey: Schema.NonEmptyString;
|
|
626
|
+
readonly pluginVersion: Schema.NonEmptyString;
|
|
627
|
+
}>;
|
|
628
|
+
readonly operation: Schema.TaggedStruct<"decodeChannelSettings", {
|
|
629
|
+
readonly channelId: Schema.NonEmptyString;
|
|
630
|
+
readonly field: Schema.Literals<readonly ["definitionSettings", "deploymentSettings"]>;
|
|
631
|
+
readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
632
|
+
}>;
|
|
633
|
+
}>]>, Schema.TaggedStruct<"extract", {
|
|
634
|
+
readonly identity: Schema.Struct<{
|
|
635
|
+
readonly artifactDigest: Schema.String;
|
|
636
|
+
readonly invocationId: Schema.NonEmptyString;
|
|
637
|
+
readonly organizationId: Schema.NonEmptyString;
|
|
638
|
+
readonly pluginKey: Schema.NonEmptyString;
|
|
639
|
+
readonly pluginVersion: Schema.NonEmptyString;
|
|
640
|
+
}>;
|
|
641
|
+
}>]>;
|
|
642
|
+
export type Input = typeof Input.Type;
|
|
643
|
+
export declare const Input: Schema.Union<readonly [Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
|
|
644
|
+
readonly connection: Schema.optionalKey<Schema.Struct<{
|
|
645
|
+
readonly connectionId: Schema.NonEmptyString;
|
|
646
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
647
|
+
readonly methodId: Schema.NonEmptyString;
|
|
648
|
+
readonly providerId: Schema.NonEmptyString;
|
|
649
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
650
|
+
}>>;
|
|
651
|
+
readonly context: Schema.Struct<{
|
|
652
|
+
readonly actor: Schema.Union<readonly [Schema.Struct<{
|
|
653
|
+
readonly kind: Schema.Literal<"user">;
|
|
654
|
+
readonly userId: Schema.NonEmptyString;
|
|
655
|
+
}>, Schema.Struct<{
|
|
656
|
+
readonly kind: Schema.Literal<"system">;
|
|
657
|
+
readonly reason: Schema.optionalKey<Schema.String>;
|
|
658
|
+
}>]>;
|
|
659
|
+
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
660
|
+
readonly source: Schema.Struct<{
|
|
661
|
+
readonly kind: Schema.NonEmptyString;
|
|
662
|
+
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
663
|
+
readonly subjectId: Schema.optionalKey<Schema.String>;
|
|
664
|
+
}>;
|
|
665
|
+
readonly tenant: Schema.Struct<{
|
|
666
|
+
readonly organizationId: Schema.NonEmptyString;
|
|
667
|
+
readonly teamId: Schema.NonEmptyString;
|
|
668
|
+
}>;
|
|
669
|
+
}>;
|
|
670
|
+
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
671
|
+
readonly token: Schema.NonEmptyString;
|
|
672
|
+
readonly url: Schema.String;
|
|
673
|
+
}>>;
|
|
674
|
+
readonly identity: Schema.Struct<{
|
|
675
|
+
readonly artifactDigest: Schema.String;
|
|
676
|
+
readonly invocationId: Schema.NonEmptyString;
|
|
677
|
+
readonly organizationId: Schema.NonEmptyString;
|
|
678
|
+
readonly pluginKey: Schema.NonEmptyString;
|
|
679
|
+
readonly pluginVersion: Schema.NonEmptyString;
|
|
680
|
+
}>;
|
|
681
|
+
readonly operation: Schema.Union<readonly [Schema.TaggedStruct<"invoke", {
|
|
682
|
+
readonly actionId: Schema.NonEmptyString;
|
|
683
|
+
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
684
|
+
}>, Schema.TaggedStruct<"activate", {
|
|
685
|
+
config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
686
|
+
state: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
687
|
+
triggerId: Schema.NonEmptyString;
|
|
688
|
+
webhookUrl: Schema.String;
|
|
689
|
+
}>, Schema.TaggedStruct<"deactivate", {
|
|
690
|
+
config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
691
|
+
state: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
692
|
+
triggerId: Schema.NonEmptyString;
|
|
693
|
+
webhookUrl: Schema.String;
|
|
694
|
+
}>, Schema.TaggedStruct<"verify", {
|
|
695
|
+
config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
696
|
+
state: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
697
|
+
triggerId: Schema.NonEmptyString;
|
|
698
|
+
webhookUrl: Schema.String;
|
|
699
|
+
request: Schema.Struct<{
|
|
700
|
+
readonly body: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
701
|
+
readonly headers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
702
|
+
readonly method: Schema.optionalKey<Schema.String>;
|
|
703
|
+
readonly query: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.String>]>>>;
|
|
704
|
+
readonly rawBody: Schema.Uint8ArrayFromBase64;
|
|
705
|
+
readonly url: Schema.optionalKey<Schema.String>;
|
|
706
|
+
}>;
|
|
707
|
+
}>, Schema.TaggedStruct<"parse", {
|
|
708
|
+
config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
709
|
+
state: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
710
|
+
triggerId: Schema.NonEmptyString;
|
|
711
|
+
webhookUrl: Schema.String;
|
|
712
|
+
request: Schema.Struct<{
|
|
713
|
+
readonly body: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
714
|
+
readonly headers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
715
|
+
readonly method: Schema.optionalKey<Schema.String>;
|
|
716
|
+
readonly query: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.String>]>>>;
|
|
717
|
+
readonly rawBody: Schema.Uint8ArrayFromBase64;
|
|
718
|
+
readonly url: Schema.optionalKey<Schema.String>;
|
|
719
|
+
}>;
|
|
720
|
+
}>, Schema.TaggedStruct<"poll", {
|
|
721
|
+
config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
722
|
+
state: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
723
|
+
triggerId: Schema.NonEmptyString;
|
|
724
|
+
}>, Schema.TaggedStruct<"channelCheckAccess", {
|
|
725
|
+
readonly channelId: Schema.NonEmptyString;
|
|
726
|
+
readonly definitionSettings: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
727
|
+
readonly deploymentSettings: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
728
|
+
readonly identity: Schema.Struct<{
|
|
729
|
+
readonly conversation: Schema.Struct<{
|
|
730
|
+
readonly conversationKey: Schema.NonEmptyString;
|
|
731
|
+
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
732
|
+
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
733
|
+
}>;
|
|
734
|
+
readonly senderKey: Schema.NonEmptyString;
|
|
735
|
+
}>;
|
|
736
|
+
}>, Schema.TaggedStruct<"channelExecute", {
|
|
737
|
+
readonly channelId: Schema.NonEmptyString;
|
|
738
|
+
readonly definitionSettings: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
739
|
+
readonly deploymentSettings: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
740
|
+
readonly command: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
741
|
+
}>, Schema.Union<readonly [Schema.TaggedStruct<"decodeSetup", {
|
|
742
|
+
authMethodId: Schema.NonEmptyString;
|
|
743
|
+
providerId: Schema.NonEmptyString;
|
|
744
|
+
setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
745
|
+
}>, Schema.TaggedStruct<"prepare", {
|
|
746
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
747
|
+
readonly providerId: Schema.NonEmptyString;
|
|
748
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
749
|
+
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
750
|
+
}>, Schema.TaggedStruct<"prepareOAuth2Tokens", {
|
|
751
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
752
|
+
readonly providerId: Schema.NonEmptyString;
|
|
753
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
754
|
+
readonly tokens: Schema.Struct<{
|
|
755
|
+
readonly accessToken: Schema.String;
|
|
756
|
+
readonly expiresAt: Schema.optionalKey<Schema.Number>;
|
|
757
|
+
readonly expiresIn: Schema.optionalKey<Schema.Number>;
|
|
758
|
+
readonly raw: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
759
|
+
readonly refreshToken: Schema.optionalKey<Schema.String>;
|
|
760
|
+
readonly scope: Schema.optionalKey<Schema.String>;
|
|
761
|
+
readonly tokenType: Schema.optionalKey<Schema.String>;
|
|
762
|
+
}>;
|
|
763
|
+
}>, Schema.TaggedStruct<"refresh", {
|
|
764
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
765
|
+
readonly providerId: Schema.NonEmptyString;
|
|
766
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
767
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
768
|
+
readonly minValidityMs: Schema.Finite;
|
|
769
|
+
readonly now: Schema.Finite;
|
|
770
|
+
readonly reason: Schema.Literals<readonly ["before-use", "forced"]>;
|
|
771
|
+
}>, Schema.TaggedStruct<"resolve", {
|
|
772
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
773
|
+
readonly providerId: Schema.NonEmptyString;
|
|
774
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
775
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
776
|
+
}>, Schema.TaggedStruct<"display", {
|
|
777
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
778
|
+
readonly providerId: Schema.NonEmptyString;
|
|
779
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
780
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
781
|
+
}>, Schema.TaggedStruct<"test", {
|
|
782
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
783
|
+
readonly providerId: Schema.NonEmptyString;
|
|
784
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
785
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
786
|
+
}>]>]>;
|
|
787
|
+
}>, Schema.TaggedStruct<"auth", {
|
|
788
|
+
readonly identity: Schema.Struct<{
|
|
789
|
+
readonly artifactDigest: Schema.String;
|
|
790
|
+
readonly invocationId: Schema.NonEmptyString;
|
|
791
|
+
readonly organizationId: Schema.NonEmptyString;
|
|
792
|
+
readonly pluginKey: Schema.NonEmptyString;
|
|
793
|
+
readonly pluginVersion: Schema.NonEmptyString;
|
|
794
|
+
}>;
|
|
795
|
+
readonly operation: Schema.Union<readonly [Schema.Union<readonly [Schema.TaggedStruct<"decodeSetup", {
|
|
796
|
+
authMethodId: Schema.NonEmptyString;
|
|
797
|
+
providerId: Schema.NonEmptyString;
|
|
798
|
+
setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
799
|
+
}>, Schema.TaggedStruct<"prepare", {
|
|
800
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
801
|
+
readonly providerId: Schema.NonEmptyString;
|
|
802
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
803
|
+
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
804
|
+
}>, Schema.TaggedStruct<"prepareOAuth2Tokens", {
|
|
805
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
806
|
+
readonly providerId: Schema.NonEmptyString;
|
|
807
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
808
|
+
readonly tokens: Schema.Struct<{
|
|
809
|
+
readonly accessToken: Schema.String;
|
|
810
|
+
readonly expiresAt: Schema.optionalKey<Schema.Number>;
|
|
811
|
+
readonly expiresIn: Schema.optionalKey<Schema.Number>;
|
|
812
|
+
readonly raw: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
813
|
+
readonly refreshToken: Schema.optionalKey<Schema.String>;
|
|
814
|
+
readonly scope: Schema.optionalKey<Schema.String>;
|
|
815
|
+
readonly tokenType: Schema.optionalKey<Schema.String>;
|
|
816
|
+
}>;
|
|
817
|
+
}>, Schema.TaggedStruct<"refresh", {
|
|
818
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
819
|
+
readonly providerId: Schema.NonEmptyString;
|
|
820
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
821
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
822
|
+
readonly minValidityMs: Schema.Finite;
|
|
823
|
+
readonly now: Schema.Finite;
|
|
824
|
+
readonly reason: Schema.Literals<readonly ["before-use", "forced"]>;
|
|
825
|
+
}>, Schema.TaggedStruct<"resolve", {
|
|
826
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
827
|
+
readonly providerId: Schema.NonEmptyString;
|
|
828
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
829
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
830
|
+
}>, Schema.TaggedStruct<"display", {
|
|
831
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
832
|
+
readonly providerId: Schema.NonEmptyString;
|
|
833
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
834
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
835
|
+
}>, Schema.TaggedStruct<"test", {
|
|
836
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
837
|
+
readonly providerId: Schema.NonEmptyString;
|
|
838
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
839
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
840
|
+
}>]>, Schema.TaggedStruct<"oauthStart", {
|
|
841
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
842
|
+
readonly providerId: Schema.NonEmptyString;
|
|
843
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
844
|
+
readonly redirectUri: Schema.String;
|
|
845
|
+
}>, Schema.TaggedStruct<"oauthComplete", {
|
|
846
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
847
|
+
readonly providerId: Schema.NonEmptyString;
|
|
848
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
849
|
+
readonly continuation: Schema.Struct<{
|
|
850
|
+
readonly expiresAt: Schema.DateFromString;
|
|
851
|
+
readonly pkceVerifier: Schema.NullOr<Schema.String>;
|
|
852
|
+
readonly redirectUri: Schema.String;
|
|
853
|
+
readonly state: Schema.String;
|
|
854
|
+
}>;
|
|
855
|
+
readonly query: Schema.$Record<Schema.String, Schema.String>;
|
|
856
|
+
}>, Schema.TaggedStruct<"sandboxAccess", {
|
|
857
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
858
|
+
readonly providerId: Schema.NonEmptyString;
|
|
859
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
860
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
861
|
+
readonly request: Schema.optionalKey<Schema.Struct<{
|
|
862
|
+
readonly headers: Schema.$Record<Schema.String, Schema.String>;
|
|
863
|
+
readonly method: Schema.Literals<readonly ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE", "QUERY"]>;
|
|
864
|
+
readonly url: Schema.String;
|
|
865
|
+
}>>;
|
|
866
|
+
}>]>;
|
|
867
|
+
}>, Schema.TaggedStruct<"channelSettings", {
|
|
868
|
+
readonly identity: Schema.Struct<{
|
|
869
|
+
readonly artifactDigest: Schema.String;
|
|
870
|
+
readonly invocationId: Schema.NonEmptyString;
|
|
871
|
+
readonly organizationId: Schema.NonEmptyString;
|
|
872
|
+
readonly pluginKey: Schema.NonEmptyString;
|
|
873
|
+
readonly pluginVersion: Schema.NonEmptyString;
|
|
874
|
+
}>;
|
|
875
|
+
readonly operation: Schema.TaggedStruct<"decodeChannelSettings", {
|
|
876
|
+
readonly channelId: Schema.NonEmptyString;
|
|
877
|
+
readonly field: Schema.Literals<readonly ["definitionSettings", "deploymentSettings"]>;
|
|
878
|
+
readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
879
|
+
}>;
|
|
880
|
+
}>]>, Schema.TaggedStruct<"extract", {
|
|
881
|
+
readonly identity: Schema.Struct<{
|
|
882
|
+
readonly artifactDigest: Schema.String;
|
|
883
|
+
readonly invocationId: Schema.NonEmptyString;
|
|
884
|
+
readonly organizationId: Schema.NonEmptyString;
|
|
885
|
+
readonly pluginKey: Schema.NonEmptyString;
|
|
886
|
+
readonly pluginVersion: Schema.NonEmptyString;
|
|
887
|
+
}>;
|
|
888
|
+
}>]>, Schema.TaggedStruct<"cancel", {
|
|
889
|
+
readonly identity: Schema.Struct<{
|
|
890
|
+
readonly artifactDigest: Schema.String;
|
|
891
|
+
readonly invocationId: Schema.NonEmptyString;
|
|
892
|
+
readonly organizationId: Schema.NonEmptyString;
|
|
893
|
+
readonly pluginKey: Schema.NonEmptyString;
|
|
894
|
+
readonly pluginVersion: Schema.NonEmptyString;
|
|
895
|
+
}>;
|
|
896
|
+
}>]>;
|
|
897
|
+
export type Output = typeof Output.Type;
|
|
898
|
+
export declare const Output: Schema.Union<readonly [Schema.Union<readonly [Schema.TaggedStruct<"success", {
|
|
899
|
+
readonly identity: Schema.Struct<{
|
|
900
|
+
readonly artifactDigest: Schema.String;
|
|
901
|
+
readonly invocationId: Schema.NonEmptyString;
|
|
902
|
+
readonly organizationId: Schema.NonEmptyString;
|
|
903
|
+
readonly pluginKey: Schema.NonEmptyString;
|
|
904
|
+
readonly pluginVersion: Schema.NonEmptyString;
|
|
905
|
+
}>;
|
|
906
|
+
readonly value: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
907
|
+
}>, Schema.TaggedStruct<"failure", {
|
|
908
|
+
readonly error: Schema.Struct<{
|
|
909
|
+
readonly category: Schema.Literals<readonly ["validation", "connection", "handler", "initialization", "protocol"]>;
|
|
910
|
+
readonly channel: Schema.optionalKey<Schema.Struct<{
|
|
911
|
+
readonly code: Schema.Literals<readonly ["invalid_definition", "not_found", "invalid_input", "invalid_auth", "unsupported_feature", "invalid_result", "handler_unavailable", "provider_failure"]>;
|
|
912
|
+
readonly providerCode: Schema.optionalKey<Schema.Literals<readonly ["rejected", "unauthorized", "rate_limited", "unavailable", "unknown_completion", "window_closed"]>>;
|
|
913
|
+
}>>;
|
|
914
|
+
readonly code: Schema.String;
|
|
915
|
+
readonly fields: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
916
|
+
readonly path: Schema.String;
|
|
917
|
+
}>>>;
|
|
918
|
+
readonly message: Schema.String;
|
|
919
|
+
readonly retryAfterSeconds: Schema.optionalKey<Schema.Finite>;
|
|
920
|
+
readonly retryable: Schema.Boolean;
|
|
921
|
+
readonly status: Schema.optionalKey<Schema.Int>;
|
|
922
|
+
}>;
|
|
923
|
+
readonly identity: Schema.Struct<{
|
|
924
|
+
readonly artifactDigest: Schema.String;
|
|
925
|
+
readonly invocationId: Schema.NonEmptyString;
|
|
926
|
+
readonly organizationId: Schema.NonEmptyString;
|
|
927
|
+
readonly pluginKey: Schema.NonEmptyString;
|
|
928
|
+
readonly pluginVersion: Schema.NonEmptyString;
|
|
929
|
+
}>;
|
|
930
|
+
}>]>, Schema.TaggedStruct<"interrupted", {
|
|
931
|
+
readonly identity: Schema.Struct<{
|
|
932
|
+
readonly artifactDigest: Schema.String;
|
|
933
|
+
readonly invocationId: Schema.NonEmptyString;
|
|
934
|
+
readonly organizationId: Schema.NonEmptyString;
|
|
935
|
+
readonly pluginKey: Schema.NonEmptyString;
|
|
936
|
+
readonly pluginVersion: Schema.NonEmptyString;
|
|
937
|
+
}>;
|
|
938
|
+
}>]>;
|
|
939
|
+
export declare function checkMessageSize(value: unknown, maximum: number): Effect.Effect<void, never, never> | Effect.Effect<never, PluginExecutionError, never>;
|
|
940
|
+
export declare const encodeInput: (input: {
|
|
941
|
+
readonly _tag: "auth";
|
|
942
|
+
readonly identity: {
|
|
943
|
+
readonly artifactDigest: string;
|
|
944
|
+
readonly invocationId: string;
|
|
945
|
+
readonly organizationId: string;
|
|
946
|
+
readonly pluginKey: string;
|
|
947
|
+
readonly pluginVersion: string;
|
|
948
|
+
};
|
|
949
|
+
readonly operation: {
|
|
950
|
+
readonly _tag: "decodeSetup";
|
|
951
|
+
readonly authMethodId: string;
|
|
952
|
+
readonly providerId: string;
|
|
953
|
+
readonly setup?: Schema.Json;
|
|
954
|
+
} | {
|
|
955
|
+
readonly _tag: "display";
|
|
956
|
+
readonly authMethodId: string;
|
|
957
|
+
readonly providerId: string;
|
|
958
|
+
readonly setup?: Schema.Json;
|
|
959
|
+
readonly material: Schema.Json;
|
|
960
|
+
} | {
|
|
961
|
+
readonly _tag: "oauthComplete";
|
|
962
|
+
readonly authMethodId: string;
|
|
963
|
+
readonly providerId: string;
|
|
964
|
+
readonly setup?: Schema.Json;
|
|
965
|
+
readonly continuation: {
|
|
966
|
+
readonly expiresAt: Date;
|
|
967
|
+
readonly pkceVerifier: string | null;
|
|
968
|
+
readonly redirectUri: string;
|
|
969
|
+
readonly state: string;
|
|
970
|
+
};
|
|
971
|
+
readonly query: {
|
|
972
|
+
readonly [x: string]: string;
|
|
973
|
+
};
|
|
974
|
+
} | {
|
|
975
|
+
readonly _tag: "oauthStart";
|
|
976
|
+
readonly authMethodId: string;
|
|
977
|
+
readonly providerId: string;
|
|
978
|
+
readonly setup?: Schema.Json;
|
|
979
|
+
readonly redirectUri: string;
|
|
980
|
+
} | {
|
|
981
|
+
readonly _tag: "prepare";
|
|
982
|
+
readonly authMethodId: string;
|
|
983
|
+
readonly providerId: string;
|
|
984
|
+
readonly setup?: Schema.Json;
|
|
985
|
+
readonly input: Schema.Json;
|
|
986
|
+
} | {
|
|
987
|
+
readonly _tag: "prepareOAuth2Tokens";
|
|
988
|
+
readonly authMethodId: string;
|
|
989
|
+
readonly providerId: string;
|
|
990
|
+
readonly setup?: Schema.Json;
|
|
991
|
+
readonly tokens: {
|
|
992
|
+
readonly accessToken: string;
|
|
993
|
+
readonly expiresAt?: number;
|
|
994
|
+
readonly expiresIn?: number;
|
|
995
|
+
readonly raw: {
|
|
996
|
+
readonly [x: string]: Schema.Json;
|
|
997
|
+
};
|
|
998
|
+
readonly refreshToken?: string;
|
|
999
|
+
readonly scope?: string;
|
|
1000
|
+
readonly tokenType?: string;
|
|
1001
|
+
};
|
|
1002
|
+
} | {
|
|
1003
|
+
readonly _tag: "refresh";
|
|
1004
|
+
readonly authMethodId: string;
|
|
1005
|
+
readonly providerId: string;
|
|
1006
|
+
readonly setup?: Schema.Json;
|
|
1007
|
+
readonly material: Schema.Json;
|
|
1008
|
+
readonly minValidityMs: number;
|
|
1009
|
+
readonly now: number;
|
|
1010
|
+
readonly reason: "before-use" | "forced";
|
|
1011
|
+
} | {
|
|
1012
|
+
readonly _tag: "resolve";
|
|
1013
|
+
readonly authMethodId: string;
|
|
1014
|
+
readonly providerId: string;
|
|
1015
|
+
readonly setup?: Schema.Json;
|
|
1016
|
+
readonly material: Schema.Json;
|
|
1017
|
+
} | {
|
|
1018
|
+
readonly _tag: "sandboxAccess";
|
|
1019
|
+
readonly authMethodId: string;
|
|
1020
|
+
readonly providerId: string;
|
|
1021
|
+
readonly setup?: Schema.Json;
|
|
1022
|
+
readonly material: Schema.Json;
|
|
1023
|
+
readonly request?: {
|
|
1024
|
+
readonly headers: {
|
|
1025
|
+
readonly [x: string]: string;
|
|
1026
|
+
};
|
|
1027
|
+
readonly method: "DELETE" | "GET" | "HEAD" | "OPTIONS" | "PATCH" | "POST" | "PUT" | "QUERY" | "TRACE";
|
|
1028
|
+
readonly url: string;
|
|
1029
|
+
};
|
|
1030
|
+
} | {
|
|
1031
|
+
readonly _tag: "test";
|
|
1032
|
+
readonly authMethodId: string;
|
|
1033
|
+
readonly providerId: string;
|
|
1034
|
+
readonly setup?: Schema.Json;
|
|
1035
|
+
readonly material: Schema.Json;
|
|
1036
|
+
};
|
|
1037
|
+
} | {
|
|
1038
|
+
readonly _tag: "cancel";
|
|
1039
|
+
readonly identity: {
|
|
1040
|
+
readonly artifactDigest: string;
|
|
1041
|
+
readonly invocationId: string;
|
|
1042
|
+
readonly organizationId: string;
|
|
1043
|
+
readonly pluginKey: string;
|
|
1044
|
+
readonly pluginVersion: string;
|
|
1045
|
+
};
|
|
1046
|
+
} | {
|
|
1047
|
+
readonly _tag: "channelSettings";
|
|
1048
|
+
readonly identity: {
|
|
1049
|
+
readonly artifactDigest: string;
|
|
1050
|
+
readonly invocationId: string;
|
|
1051
|
+
readonly organizationId: string;
|
|
1052
|
+
readonly pluginKey: string;
|
|
1053
|
+
readonly pluginVersion: string;
|
|
1054
|
+
};
|
|
1055
|
+
readonly operation: {
|
|
1056
|
+
readonly _tag: "decodeChannelSettings";
|
|
1057
|
+
readonly channelId: string;
|
|
1058
|
+
readonly field: "definitionSettings" | "deploymentSettings";
|
|
1059
|
+
readonly value: Schema.Json;
|
|
1060
|
+
};
|
|
1061
|
+
} | {
|
|
1062
|
+
readonly _tag: "extract";
|
|
1063
|
+
readonly identity: {
|
|
1064
|
+
readonly artifactDigest: string;
|
|
1065
|
+
readonly invocationId: string;
|
|
1066
|
+
readonly organizationId: string;
|
|
1067
|
+
readonly pluginKey: string;
|
|
1068
|
+
readonly pluginVersion: string;
|
|
1069
|
+
};
|
|
1070
|
+
} | {
|
|
1071
|
+
readonly connection?: {
|
|
1072
|
+
readonly connectionId: string;
|
|
1073
|
+
readonly material: Schema.Json;
|
|
1074
|
+
readonly methodId: string;
|
|
1075
|
+
readonly providerId: string;
|
|
1076
|
+
readonly setup?: Schema.Json;
|
|
1077
|
+
};
|
|
1078
|
+
readonly context: {
|
|
1079
|
+
readonly actor: {
|
|
1080
|
+
readonly kind: "user";
|
|
1081
|
+
readonly userId: string;
|
|
1082
|
+
} | {
|
|
1083
|
+
readonly kind: "system";
|
|
1084
|
+
readonly reason?: string;
|
|
1085
|
+
};
|
|
1086
|
+
readonly metadata?: {
|
|
1087
|
+
readonly [x: string]: Schema.Json;
|
|
1088
|
+
};
|
|
1089
|
+
readonly source: {
|
|
1090
|
+
readonly kind: string;
|
|
1091
|
+
readonly metadata?: {
|
|
1092
|
+
readonly [x: string]: Schema.Json;
|
|
1093
|
+
};
|
|
1094
|
+
readonly subjectId?: string;
|
|
1095
|
+
};
|
|
1096
|
+
readonly tenant: {
|
|
1097
|
+
readonly organizationId: string;
|
|
1098
|
+
readonly teamId: string;
|
|
1099
|
+
};
|
|
1100
|
+
};
|
|
1101
|
+
readonly files?: {
|
|
1102
|
+
readonly token: string;
|
|
1103
|
+
readonly url: string;
|
|
1104
|
+
};
|
|
1105
|
+
readonly identity: {
|
|
1106
|
+
readonly artifactDigest: string;
|
|
1107
|
+
readonly invocationId: string;
|
|
1108
|
+
readonly organizationId: string;
|
|
1109
|
+
readonly pluginKey: string;
|
|
1110
|
+
readonly pluginVersion: string;
|
|
1111
|
+
};
|
|
1112
|
+
readonly operation: {
|
|
1113
|
+
readonly _tag: "channelCheckAccess";
|
|
1114
|
+
readonly channelId: string;
|
|
1115
|
+
readonly definitionSettings: Schema.Json;
|
|
1116
|
+
readonly deploymentSettings: Schema.Json;
|
|
1117
|
+
readonly identity: {
|
|
1118
|
+
readonly conversation: {
|
|
1119
|
+
readonly conversationKey: string;
|
|
1120
|
+
readonly kind: "direct" | "group";
|
|
1121
|
+
readonly threadKey?: string;
|
|
1122
|
+
};
|
|
1123
|
+
readonly senderKey: string;
|
|
1124
|
+
};
|
|
1125
|
+
} | {
|
|
1126
|
+
readonly _tag: "channelExecute";
|
|
1127
|
+
readonly channelId: string;
|
|
1128
|
+
readonly definitionSettings: Schema.Json;
|
|
1129
|
+
readonly deploymentSettings: Schema.Json;
|
|
1130
|
+
readonly command: Schema.Json;
|
|
1131
|
+
} | {
|
|
1132
|
+
readonly _tag: "invoke";
|
|
1133
|
+
readonly actionId: string;
|
|
1134
|
+
readonly input: Schema.Json;
|
|
1135
|
+
} | {
|
|
1136
|
+
readonly _tag: "activate";
|
|
1137
|
+
readonly config: Schema.Json;
|
|
1138
|
+
readonly state?: Schema.Json;
|
|
1139
|
+
readonly triggerId: string;
|
|
1140
|
+
readonly webhookUrl: string;
|
|
1141
|
+
} | {
|
|
1142
|
+
readonly _tag: "deactivate";
|
|
1143
|
+
readonly config: Schema.Json;
|
|
1144
|
+
readonly state?: Schema.Json;
|
|
1145
|
+
readonly triggerId: string;
|
|
1146
|
+
readonly webhookUrl: string;
|
|
1147
|
+
} | {
|
|
1148
|
+
readonly _tag: "decodeSetup";
|
|
1149
|
+
readonly authMethodId: string;
|
|
1150
|
+
readonly providerId: string;
|
|
1151
|
+
readonly setup?: Schema.Json;
|
|
1152
|
+
} | {
|
|
1153
|
+
readonly _tag: "display";
|
|
1154
|
+
readonly authMethodId: string;
|
|
1155
|
+
readonly providerId: string;
|
|
1156
|
+
readonly setup?: Schema.Json;
|
|
1157
|
+
readonly material: Schema.Json;
|
|
1158
|
+
} | {
|
|
1159
|
+
readonly _tag: "parse";
|
|
1160
|
+
readonly config: Schema.Json;
|
|
1161
|
+
readonly state?: Schema.Json;
|
|
1162
|
+
readonly triggerId: string;
|
|
1163
|
+
readonly webhookUrl: string;
|
|
1164
|
+
readonly request: {
|
|
1165
|
+
readonly body: Schema.Json;
|
|
1166
|
+
readonly headers?: {
|
|
1167
|
+
readonly [x: string]: string;
|
|
1168
|
+
};
|
|
1169
|
+
readonly method?: string;
|
|
1170
|
+
readonly query?: {
|
|
1171
|
+
readonly [x: string]: string | readonly string[];
|
|
1172
|
+
};
|
|
1173
|
+
readonly rawBody: Uint8Array<ArrayBufferLike>;
|
|
1174
|
+
readonly url?: string;
|
|
1175
|
+
};
|
|
1176
|
+
} | {
|
|
1177
|
+
readonly _tag: "poll";
|
|
1178
|
+
readonly config: Schema.Json;
|
|
1179
|
+
readonly state?: Schema.Json;
|
|
1180
|
+
readonly triggerId: string;
|
|
1181
|
+
} | {
|
|
1182
|
+
readonly _tag: "prepare";
|
|
1183
|
+
readonly authMethodId: string;
|
|
1184
|
+
readonly providerId: string;
|
|
1185
|
+
readonly setup?: Schema.Json;
|
|
1186
|
+
readonly input: Schema.Json;
|
|
1187
|
+
} | {
|
|
1188
|
+
readonly _tag: "prepareOAuth2Tokens";
|
|
1189
|
+
readonly authMethodId: string;
|
|
1190
|
+
readonly providerId: string;
|
|
1191
|
+
readonly setup?: Schema.Json;
|
|
1192
|
+
readonly tokens: {
|
|
1193
|
+
readonly accessToken: string;
|
|
1194
|
+
readonly expiresAt?: number;
|
|
1195
|
+
readonly expiresIn?: number;
|
|
1196
|
+
readonly raw: {
|
|
1197
|
+
readonly [x: string]: Schema.Json;
|
|
1198
|
+
};
|
|
1199
|
+
readonly refreshToken?: string;
|
|
1200
|
+
readonly scope?: string;
|
|
1201
|
+
readonly tokenType?: string;
|
|
1202
|
+
};
|
|
1203
|
+
} | {
|
|
1204
|
+
readonly _tag: "refresh";
|
|
1205
|
+
readonly authMethodId: string;
|
|
1206
|
+
readonly providerId: string;
|
|
1207
|
+
readonly setup?: Schema.Json;
|
|
1208
|
+
readonly material: Schema.Json;
|
|
1209
|
+
readonly minValidityMs: number;
|
|
1210
|
+
readonly now: number;
|
|
1211
|
+
readonly reason: "before-use" | "forced";
|
|
1212
|
+
} | {
|
|
1213
|
+
readonly _tag: "resolve";
|
|
1214
|
+
readonly authMethodId: string;
|
|
1215
|
+
readonly providerId: string;
|
|
1216
|
+
readonly setup?: Schema.Json;
|
|
1217
|
+
readonly material: Schema.Json;
|
|
1218
|
+
} | {
|
|
1219
|
+
readonly _tag: "test";
|
|
1220
|
+
readonly authMethodId: string;
|
|
1221
|
+
readonly providerId: string;
|
|
1222
|
+
readonly setup?: Schema.Json;
|
|
1223
|
+
readonly material: Schema.Json;
|
|
1224
|
+
} | {
|
|
1225
|
+
readonly _tag: "verify";
|
|
1226
|
+
readonly config: Schema.Json;
|
|
1227
|
+
readonly state?: Schema.Json;
|
|
1228
|
+
readonly triggerId: string;
|
|
1229
|
+
readonly webhookUrl: string;
|
|
1230
|
+
readonly request: {
|
|
1231
|
+
readonly body: Schema.Json;
|
|
1232
|
+
readonly headers?: {
|
|
1233
|
+
readonly [x: string]: string;
|
|
1234
|
+
};
|
|
1235
|
+
readonly method?: string;
|
|
1236
|
+
readonly query?: {
|
|
1237
|
+
readonly [x: string]: string | readonly string[];
|
|
1238
|
+
};
|
|
1239
|
+
readonly rawBody: Uint8Array<ArrayBufferLike>;
|
|
1240
|
+
readonly url?: string;
|
|
1241
|
+
};
|
|
1242
|
+
};
|
|
1243
|
+
}) => Effect.Effect<{
|
|
1244
|
+
readonly _tag: "auth";
|
|
1245
|
+
readonly identity: {
|
|
1246
|
+
readonly artifactDigest: string;
|
|
1247
|
+
readonly invocationId: string;
|
|
1248
|
+
readonly organizationId: string;
|
|
1249
|
+
readonly pluginKey: string;
|
|
1250
|
+
readonly pluginVersion: string;
|
|
1251
|
+
};
|
|
1252
|
+
readonly operation: {
|
|
1253
|
+
readonly _tag: "decodeSetup";
|
|
1254
|
+
readonly authMethodId: string;
|
|
1255
|
+
readonly providerId: string;
|
|
1256
|
+
readonly setup?: Schema.Json;
|
|
1257
|
+
} | {
|
|
1258
|
+
readonly _tag: "display";
|
|
1259
|
+
readonly authMethodId: string;
|
|
1260
|
+
readonly providerId: string;
|
|
1261
|
+
readonly setup?: Schema.Json;
|
|
1262
|
+
readonly material: Schema.Json;
|
|
1263
|
+
} | {
|
|
1264
|
+
readonly _tag: "oauthComplete";
|
|
1265
|
+
readonly authMethodId: string;
|
|
1266
|
+
readonly providerId: string;
|
|
1267
|
+
readonly setup?: Schema.Json;
|
|
1268
|
+
readonly continuation: {
|
|
1269
|
+
readonly expiresAt: string;
|
|
1270
|
+
readonly pkceVerifier: string | null;
|
|
1271
|
+
readonly redirectUri: string;
|
|
1272
|
+
readonly state: string;
|
|
1273
|
+
};
|
|
1274
|
+
readonly query: {
|
|
1275
|
+
readonly [x: string]: string;
|
|
1276
|
+
};
|
|
1277
|
+
} | {
|
|
1278
|
+
readonly _tag: "oauthStart";
|
|
1279
|
+
readonly authMethodId: string;
|
|
1280
|
+
readonly providerId: string;
|
|
1281
|
+
readonly setup?: Schema.Json;
|
|
1282
|
+
readonly redirectUri: string;
|
|
1283
|
+
} | {
|
|
1284
|
+
readonly _tag: "prepare";
|
|
1285
|
+
readonly authMethodId: string;
|
|
1286
|
+
readonly providerId: string;
|
|
1287
|
+
readonly setup?: Schema.Json;
|
|
1288
|
+
readonly input: Schema.Json;
|
|
1289
|
+
} | {
|
|
1290
|
+
readonly _tag: "prepareOAuth2Tokens";
|
|
1291
|
+
readonly authMethodId: string;
|
|
1292
|
+
readonly providerId: string;
|
|
1293
|
+
readonly setup?: Schema.Json;
|
|
1294
|
+
readonly tokens: {
|
|
1295
|
+
readonly accessToken: string;
|
|
1296
|
+
readonly expiresAt?: number;
|
|
1297
|
+
readonly expiresIn?: number;
|
|
1298
|
+
readonly raw: {
|
|
1299
|
+
readonly [x: string]: Schema.Json;
|
|
1300
|
+
};
|
|
1301
|
+
readonly refreshToken?: string;
|
|
1302
|
+
readonly scope?: string;
|
|
1303
|
+
readonly tokenType?: string;
|
|
1304
|
+
};
|
|
1305
|
+
} | {
|
|
1306
|
+
readonly _tag: "refresh";
|
|
1307
|
+
readonly authMethodId: string;
|
|
1308
|
+
readonly providerId: string;
|
|
1309
|
+
readonly setup?: Schema.Json;
|
|
1310
|
+
readonly material: Schema.Json;
|
|
1311
|
+
readonly minValidityMs: number;
|
|
1312
|
+
readonly now: number;
|
|
1313
|
+
readonly reason: "before-use" | "forced";
|
|
1314
|
+
} | {
|
|
1315
|
+
readonly _tag: "resolve";
|
|
1316
|
+
readonly authMethodId: string;
|
|
1317
|
+
readonly providerId: string;
|
|
1318
|
+
readonly setup?: Schema.Json;
|
|
1319
|
+
readonly material: Schema.Json;
|
|
1320
|
+
} | {
|
|
1321
|
+
readonly _tag: "sandboxAccess";
|
|
1322
|
+
readonly authMethodId: string;
|
|
1323
|
+
readonly providerId: string;
|
|
1324
|
+
readonly setup?: Schema.Json;
|
|
1325
|
+
readonly material: Schema.Json;
|
|
1326
|
+
readonly request?: {
|
|
1327
|
+
readonly headers: {
|
|
1328
|
+
readonly [x: string]: string;
|
|
1329
|
+
};
|
|
1330
|
+
readonly method: "DELETE" | "GET" | "HEAD" | "OPTIONS" | "PATCH" | "POST" | "PUT" | "QUERY" | "TRACE";
|
|
1331
|
+
readonly url: string;
|
|
1332
|
+
};
|
|
1333
|
+
} | {
|
|
1334
|
+
readonly _tag: "test";
|
|
1335
|
+
readonly authMethodId: string;
|
|
1336
|
+
readonly providerId: string;
|
|
1337
|
+
readonly setup?: Schema.Json;
|
|
1338
|
+
readonly material: Schema.Json;
|
|
1339
|
+
};
|
|
1340
|
+
} | {
|
|
1341
|
+
readonly _tag: "cancel";
|
|
1342
|
+
readonly identity: {
|
|
1343
|
+
readonly artifactDigest: string;
|
|
1344
|
+
readonly invocationId: string;
|
|
1345
|
+
readonly organizationId: string;
|
|
1346
|
+
readonly pluginKey: string;
|
|
1347
|
+
readonly pluginVersion: string;
|
|
1348
|
+
};
|
|
1349
|
+
} | {
|
|
1350
|
+
readonly _tag: "channelSettings";
|
|
1351
|
+
readonly identity: {
|
|
1352
|
+
readonly artifactDigest: string;
|
|
1353
|
+
readonly invocationId: string;
|
|
1354
|
+
readonly organizationId: string;
|
|
1355
|
+
readonly pluginKey: string;
|
|
1356
|
+
readonly pluginVersion: string;
|
|
1357
|
+
};
|
|
1358
|
+
readonly operation: {
|
|
1359
|
+
readonly _tag: "decodeChannelSettings";
|
|
1360
|
+
readonly channelId: string;
|
|
1361
|
+
readonly field: "definitionSettings" | "deploymentSettings";
|
|
1362
|
+
readonly value: Schema.Json;
|
|
1363
|
+
};
|
|
1364
|
+
} | {
|
|
1365
|
+
readonly _tag: "extract";
|
|
1366
|
+
readonly identity: {
|
|
1367
|
+
readonly artifactDigest: string;
|
|
1368
|
+
readonly invocationId: string;
|
|
1369
|
+
readonly organizationId: string;
|
|
1370
|
+
readonly pluginKey: string;
|
|
1371
|
+
readonly pluginVersion: string;
|
|
1372
|
+
};
|
|
1373
|
+
} | {
|
|
1374
|
+
readonly connection?: {
|
|
1375
|
+
readonly connectionId: string;
|
|
1376
|
+
readonly material: Schema.Json;
|
|
1377
|
+
readonly methodId: string;
|
|
1378
|
+
readonly providerId: string;
|
|
1379
|
+
readonly setup?: Schema.Json;
|
|
1380
|
+
};
|
|
1381
|
+
readonly context: {
|
|
1382
|
+
readonly actor: {
|
|
1383
|
+
readonly kind: "user";
|
|
1384
|
+
readonly userId: string;
|
|
1385
|
+
} | {
|
|
1386
|
+
readonly kind: "system";
|
|
1387
|
+
readonly reason?: string;
|
|
1388
|
+
};
|
|
1389
|
+
readonly metadata?: {
|
|
1390
|
+
readonly [x: string]: Schema.Json;
|
|
1391
|
+
};
|
|
1392
|
+
readonly source: {
|
|
1393
|
+
readonly kind: string;
|
|
1394
|
+
readonly metadata?: {
|
|
1395
|
+
readonly [x: string]: Schema.Json;
|
|
1396
|
+
};
|
|
1397
|
+
readonly subjectId?: string;
|
|
1398
|
+
};
|
|
1399
|
+
readonly tenant: {
|
|
1400
|
+
readonly organizationId: string;
|
|
1401
|
+
readonly teamId: string;
|
|
1402
|
+
};
|
|
1403
|
+
};
|
|
1404
|
+
readonly files?: {
|
|
1405
|
+
readonly token: string;
|
|
1406
|
+
readonly url: string;
|
|
1407
|
+
};
|
|
1408
|
+
readonly identity: {
|
|
1409
|
+
readonly artifactDigest: string;
|
|
1410
|
+
readonly invocationId: string;
|
|
1411
|
+
readonly organizationId: string;
|
|
1412
|
+
readonly pluginKey: string;
|
|
1413
|
+
readonly pluginVersion: string;
|
|
1414
|
+
};
|
|
1415
|
+
readonly operation: {
|
|
1416
|
+
readonly _tag: "channelCheckAccess";
|
|
1417
|
+
readonly channelId: string;
|
|
1418
|
+
readonly definitionSettings: Schema.Json;
|
|
1419
|
+
readonly deploymentSettings: Schema.Json;
|
|
1420
|
+
readonly identity: {
|
|
1421
|
+
readonly conversation: {
|
|
1422
|
+
readonly conversationKey: string;
|
|
1423
|
+
readonly kind: "direct" | "group";
|
|
1424
|
+
readonly threadKey?: string;
|
|
1425
|
+
};
|
|
1426
|
+
readonly senderKey: string;
|
|
1427
|
+
};
|
|
1428
|
+
} | {
|
|
1429
|
+
readonly _tag: "channelExecute";
|
|
1430
|
+
readonly channelId: string;
|
|
1431
|
+
readonly definitionSettings: Schema.Json;
|
|
1432
|
+
readonly deploymentSettings: Schema.Json;
|
|
1433
|
+
readonly command: Schema.Json;
|
|
1434
|
+
} | {
|
|
1435
|
+
readonly _tag: "invoke";
|
|
1436
|
+
readonly actionId: string;
|
|
1437
|
+
readonly input: Schema.Json;
|
|
1438
|
+
} | {
|
|
1439
|
+
readonly _tag: "activate";
|
|
1440
|
+
readonly config: Schema.Json;
|
|
1441
|
+
readonly state?: Schema.Json;
|
|
1442
|
+
readonly triggerId: string;
|
|
1443
|
+
readonly webhookUrl: string;
|
|
1444
|
+
} | {
|
|
1445
|
+
readonly _tag: "deactivate";
|
|
1446
|
+
readonly config: Schema.Json;
|
|
1447
|
+
readonly state?: Schema.Json;
|
|
1448
|
+
readonly triggerId: string;
|
|
1449
|
+
readonly webhookUrl: string;
|
|
1450
|
+
} | {
|
|
1451
|
+
readonly _tag: "decodeSetup";
|
|
1452
|
+
readonly authMethodId: string;
|
|
1453
|
+
readonly providerId: string;
|
|
1454
|
+
readonly setup?: Schema.Json;
|
|
1455
|
+
} | {
|
|
1456
|
+
readonly _tag: "display";
|
|
1457
|
+
readonly authMethodId: string;
|
|
1458
|
+
readonly providerId: string;
|
|
1459
|
+
readonly setup?: Schema.Json;
|
|
1460
|
+
readonly material: Schema.Json;
|
|
1461
|
+
} | {
|
|
1462
|
+
readonly _tag: "parse";
|
|
1463
|
+
readonly config: Schema.Json;
|
|
1464
|
+
readonly state?: Schema.Json;
|
|
1465
|
+
readonly triggerId: string;
|
|
1466
|
+
readonly webhookUrl: string;
|
|
1467
|
+
readonly request: {
|
|
1468
|
+
readonly body: Schema.Json;
|
|
1469
|
+
readonly headers?: {
|
|
1470
|
+
readonly [x: string]: string;
|
|
1471
|
+
};
|
|
1472
|
+
readonly method?: string;
|
|
1473
|
+
readonly query?: {
|
|
1474
|
+
readonly [x: string]: string | readonly string[];
|
|
1475
|
+
};
|
|
1476
|
+
readonly rawBody: string;
|
|
1477
|
+
readonly url?: string;
|
|
1478
|
+
};
|
|
1479
|
+
} | {
|
|
1480
|
+
readonly _tag: "poll";
|
|
1481
|
+
readonly config: Schema.Json;
|
|
1482
|
+
readonly state?: Schema.Json;
|
|
1483
|
+
readonly triggerId: string;
|
|
1484
|
+
} | {
|
|
1485
|
+
readonly _tag: "prepare";
|
|
1486
|
+
readonly authMethodId: string;
|
|
1487
|
+
readonly providerId: string;
|
|
1488
|
+
readonly setup?: Schema.Json;
|
|
1489
|
+
readonly input: Schema.Json;
|
|
1490
|
+
} | {
|
|
1491
|
+
readonly _tag: "prepareOAuth2Tokens";
|
|
1492
|
+
readonly authMethodId: string;
|
|
1493
|
+
readonly providerId: string;
|
|
1494
|
+
readonly setup?: Schema.Json;
|
|
1495
|
+
readonly tokens: {
|
|
1496
|
+
readonly accessToken: string;
|
|
1497
|
+
readonly expiresAt?: number;
|
|
1498
|
+
readonly expiresIn?: number;
|
|
1499
|
+
readonly raw: {
|
|
1500
|
+
readonly [x: string]: Schema.Json;
|
|
1501
|
+
};
|
|
1502
|
+
readonly refreshToken?: string;
|
|
1503
|
+
readonly scope?: string;
|
|
1504
|
+
readonly tokenType?: string;
|
|
1505
|
+
};
|
|
1506
|
+
} | {
|
|
1507
|
+
readonly _tag: "refresh";
|
|
1508
|
+
readonly authMethodId: string;
|
|
1509
|
+
readonly providerId: string;
|
|
1510
|
+
readonly setup?: Schema.Json;
|
|
1511
|
+
readonly material: Schema.Json;
|
|
1512
|
+
readonly minValidityMs: number;
|
|
1513
|
+
readonly now: number;
|
|
1514
|
+
readonly reason: "before-use" | "forced";
|
|
1515
|
+
} | {
|
|
1516
|
+
readonly _tag: "resolve";
|
|
1517
|
+
readonly authMethodId: string;
|
|
1518
|
+
readonly providerId: string;
|
|
1519
|
+
readonly setup?: Schema.Json;
|
|
1520
|
+
readonly material: Schema.Json;
|
|
1521
|
+
} | {
|
|
1522
|
+
readonly _tag: "test";
|
|
1523
|
+
readonly authMethodId: string;
|
|
1524
|
+
readonly providerId: string;
|
|
1525
|
+
readonly setup?: Schema.Json;
|
|
1526
|
+
readonly material: Schema.Json;
|
|
1527
|
+
} | {
|
|
1528
|
+
readonly _tag: "verify";
|
|
1529
|
+
readonly config: Schema.Json;
|
|
1530
|
+
readonly state?: Schema.Json;
|
|
1531
|
+
readonly triggerId: string;
|
|
1532
|
+
readonly webhookUrl: string;
|
|
1533
|
+
readonly request: {
|
|
1534
|
+
readonly body: Schema.Json;
|
|
1535
|
+
readonly headers?: {
|
|
1536
|
+
readonly [x: string]: string;
|
|
1537
|
+
};
|
|
1538
|
+
readonly method?: string;
|
|
1539
|
+
readonly query?: {
|
|
1540
|
+
readonly [x: string]: string | readonly string[];
|
|
1541
|
+
};
|
|
1542
|
+
readonly rawBody: string;
|
|
1543
|
+
readonly url?: string;
|
|
1544
|
+
};
|
|
1545
|
+
};
|
|
1546
|
+
}, PluginExecutionError | Schema.SchemaError, never>;
|
|
1547
|
+
export declare const decodeInput: (input: unknown) => Effect.Effect<{
|
|
1548
|
+
readonly _tag: "auth";
|
|
1549
|
+
readonly identity: {
|
|
1550
|
+
readonly artifactDigest: string;
|
|
1551
|
+
readonly invocationId: string;
|
|
1552
|
+
readonly organizationId: string;
|
|
1553
|
+
readonly pluginKey: string;
|
|
1554
|
+
readonly pluginVersion: string;
|
|
1555
|
+
};
|
|
1556
|
+
readonly operation: {
|
|
1557
|
+
readonly _tag: "decodeSetup";
|
|
1558
|
+
readonly authMethodId: string;
|
|
1559
|
+
readonly providerId: string;
|
|
1560
|
+
readonly setup?: Schema.Json;
|
|
1561
|
+
} | {
|
|
1562
|
+
readonly _tag: "display";
|
|
1563
|
+
readonly authMethodId: string;
|
|
1564
|
+
readonly providerId: string;
|
|
1565
|
+
readonly setup?: Schema.Json;
|
|
1566
|
+
readonly material: Schema.Json;
|
|
1567
|
+
} | {
|
|
1568
|
+
readonly _tag: "oauthComplete";
|
|
1569
|
+
readonly authMethodId: string;
|
|
1570
|
+
readonly providerId: string;
|
|
1571
|
+
readonly setup?: Schema.Json;
|
|
1572
|
+
readonly continuation: {
|
|
1573
|
+
readonly expiresAt: Date;
|
|
1574
|
+
readonly pkceVerifier: string | null;
|
|
1575
|
+
readonly redirectUri: string;
|
|
1576
|
+
readonly state: string;
|
|
1577
|
+
};
|
|
1578
|
+
readonly query: {
|
|
1579
|
+
readonly [x: string]: string;
|
|
1580
|
+
};
|
|
1581
|
+
} | {
|
|
1582
|
+
readonly _tag: "oauthStart";
|
|
1583
|
+
readonly authMethodId: string;
|
|
1584
|
+
readonly providerId: string;
|
|
1585
|
+
readonly setup?: Schema.Json;
|
|
1586
|
+
readonly redirectUri: string;
|
|
1587
|
+
} | {
|
|
1588
|
+
readonly _tag: "prepare";
|
|
1589
|
+
readonly authMethodId: string;
|
|
1590
|
+
readonly providerId: string;
|
|
1591
|
+
readonly setup?: Schema.Json;
|
|
1592
|
+
readonly input: Schema.Json;
|
|
1593
|
+
} | {
|
|
1594
|
+
readonly _tag: "prepareOAuth2Tokens";
|
|
1595
|
+
readonly authMethodId: string;
|
|
1596
|
+
readonly providerId: string;
|
|
1597
|
+
readonly setup?: Schema.Json;
|
|
1598
|
+
readonly tokens: {
|
|
1599
|
+
readonly accessToken: string;
|
|
1600
|
+
readonly expiresAt?: number;
|
|
1601
|
+
readonly expiresIn?: number;
|
|
1602
|
+
readonly raw: {
|
|
1603
|
+
readonly [x: string]: Schema.Json;
|
|
1604
|
+
};
|
|
1605
|
+
readonly refreshToken?: string;
|
|
1606
|
+
readonly scope?: string;
|
|
1607
|
+
readonly tokenType?: string;
|
|
1608
|
+
};
|
|
1609
|
+
} | {
|
|
1610
|
+
readonly _tag: "refresh";
|
|
1611
|
+
readonly authMethodId: string;
|
|
1612
|
+
readonly providerId: string;
|
|
1613
|
+
readonly setup?: Schema.Json;
|
|
1614
|
+
readonly material: Schema.Json;
|
|
1615
|
+
readonly minValidityMs: number;
|
|
1616
|
+
readonly now: number;
|
|
1617
|
+
readonly reason: "before-use" | "forced";
|
|
1618
|
+
} | {
|
|
1619
|
+
readonly _tag: "resolve";
|
|
1620
|
+
readonly authMethodId: string;
|
|
1621
|
+
readonly providerId: string;
|
|
1622
|
+
readonly setup?: Schema.Json;
|
|
1623
|
+
readonly material: Schema.Json;
|
|
1624
|
+
} | {
|
|
1625
|
+
readonly _tag: "sandboxAccess";
|
|
1626
|
+
readonly authMethodId: string;
|
|
1627
|
+
readonly providerId: string;
|
|
1628
|
+
readonly setup?: Schema.Json;
|
|
1629
|
+
readonly material: Schema.Json;
|
|
1630
|
+
readonly request?: {
|
|
1631
|
+
readonly headers: {
|
|
1632
|
+
readonly [x: string]: string;
|
|
1633
|
+
};
|
|
1634
|
+
readonly method: "DELETE" | "GET" | "HEAD" | "OPTIONS" | "PATCH" | "POST" | "PUT" | "QUERY" | "TRACE";
|
|
1635
|
+
readonly url: string;
|
|
1636
|
+
};
|
|
1637
|
+
} | {
|
|
1638
|
+
readonly _tag: "test";
|
|
1639
|
+
readonly authMethodId: string;
|
|
1640
|
+
readonly providerId: string;
|
|
1641
|
+
readonly setup?: Schema.Json;
|
|
1642
|
+
readonly material: Schema.Json;
|
|
1643
|
+
};
|
|
1644
|
+
} | {
|
|
1645
|
+
readonly _tag: "cancel";
|
|
1646
|
+
readonly identity: {
|
|
1647
|
+
readonly artifactDigest: string;
|
|
1648
|
+
readonly invocationId: string;
|
|
1649
|
+
readonly organizationId: string;
|
|
1650
|
+
readonly pluginKey: string;
|
|
1651
|
+
readonly pluginVersion: string;
|
|
1652
|
+
};
|
|
1653
|
+
} | {
|
|
1654
|
+
readonly _tag: "channelSettings";
|
|
1655
|
+
readonly identity: {
|
|
1656
|
+
readonly artifactDigest: string;
|
|
1657
|
+
readonly invocationId: string;
|
|
1658
|
+
readonly organizationId: string;
|
|
1659
|
+
readonly pluginKey: string;
|
|
1660
|
+
readonly pluginVersion: string;
|
|
1661
|
+
};
|
|
1662
|
+
readonly operation: {
|
|
1663
|
+
readonly _tag: "decodeChannelSettings";
|
|
1664
|
+
readonly channelId: string;
|
|
1665
|
+
readonly field: "definitionSettings" | "deploymentSettings";
|
|
1666
|
+
readonly value: Schema.Json;
|
|
1667
|
+
};
|
|
1668
|
+
} | {
|
|
1669
|
+
readonly _tag: "extract";
|
|
1670
|
+
readonly identity: {
|
|
1671
|
+
readonly artifactDigest: string;
|
|
1672
|
+
readonly invocationId: string;
|
|
1673
|
+
readonly organizationId: string;
|
|
1674
|
+
readonly pluginKey: string;
|
|
1675
|
+
readonly pluginVersion: string;
|
|
1676
|
+
};
|
|
1677
|
+
} | {
|
|
1678
|
+
readonly connection?: {
|
|
1679
|
+
readonly connectionId: string;
|
|
1680
|
+
readonly material: Schema.Json;
|
|
1681
|
+
readonly methodId: string;
|
|
1682
|
+
readonly providerId: string;
|
|
1683
|
+
readonly setup?: Schema.Json;
|
|
1684
|
+
};
|
|
1685
|
+
readonly context: {
|
|
1686
|
+
readonly actor: {
|
|
1687
|
+
readonly kind: "user";
|
|
1688
|
+
readonly userId: string;
|
|
1689
|
+
} | {
|
|
1690
|
+
readonly kind: "system";
|
|
1691
|
+
readonly reason?: string;
|
|
1692
|
+
};
|
|
1693
|
+
readonly metadata?: {
|
|
1694
|
+
readonly [x: string]: Schema.Json;
|
|
1695
|
+
};
|
|
1696
|
+
readonly source: {
|
|
1697
|
+
readonly kind: string;
|
|
1698
|
+
readonly metadata?: {
|
|
1699
|
+
readonly [x: string]: Schema.Json;
|
|
1700
|
+
};
|
|
1701
|
+
readonly subjectId?: string;
|
|
1702
|
+
};
|
|
1703
|
+
readonly tenant: {
|
|
1704
|
+
readonly organizationId: string;
|
|
1705
|
+
readonly teamId: string;
|
|
1706
|
+
};
|
|
1707
|
+
};
|
|
1708
|
+
readonly files?: {
|
|
1709
|
+
readonly token: string;
|
|
1710
|
+
readonly url: string;
|
|
1711
|
+
};
|
|
1712
|
+
readonly identity: {
|
|
1713
|
+
readonly artifactDigest: string;
|
|
1714
|
+
readonly invocationId: string;
|
|
1715
|
+
readonly organizationId: string;
|
|
1716
|
+
readonly pluginKey: string;
|
|
1717
|
+
readonly pluginVersion: string;
|
|
1718
|
+
};
|
|
1719
|
+
readonly operation: {
|
|
1720
|
+
readonly _tag: "channelCheckAccess";
|
|
1721
|
+
readonly channelId: string;
|
|
1722
|
+
readonly definitionSettings: Schema.Json;
|
|
1723
|
+
readonly deploymentSettings: Schema.Json;
|
|
1724
|
+
readonly identity: {
|
|
1725
|
+
readonly conversation: {
|
|
1726
|
+
readonly conversationKey: string;
|
|
1727
|
+
readonly kind: "direct" | "group";
|
|
1728
|
+
readonly threadKey?: string;
|
|
1729
|
+
};
|
|
1730
|
+
readonly senderKey: string;
|
|
1731
|
+
};
|
|
1732
|
+
} | {
|
|
1733
|
+
readonly _tag: "channelExecute";
|
|
1734
|
+
readonly channelId: string;
|
|
1735
|
+
readonly definitionSettings: Schema.Json;
|
|
1736
|
+
readonly deploymentSettings: Schema.Json;
|
|
1737
|
+
readonly command: Schema.Json;
|
|
1738
|
+
} | {
|
|
1739
|
+
readonly _tag: "invoke";
|
|
1740
|
+
readonly actionId: string;
|
|
1741
|
+
readonly input: Schema.Json;
|
|
1742
|
+
} | {
|
|
1743
|
+
readonly _tag: "activate";
|
|
1744
|
+
readonly config: Schema.Json;
|
|
1745
|
+
readonly state?: Schema.Json;
|
|
1746
|
+
readonly triggerId: string;
|
|
1747
|
+
readonly webhookUrl: string;
|
|
1748
|
+
} | {
|
|
1749
|
+
readonly _tag: "deactivate";
|
|
1750
|
+
readonly config: Schema.Json;
|
|
1751
|
+
readonly state?: Schema.Json;
|
|
1752
|
+
readonly triggerId: string;
|
|
1753
|
+
readonly webhookUrl: string;
|
|
1754
|
+
} | {
|
|
1755
|
+
readonly _tag: "decodeSetup";
|
|
1756
|
+
readonly authMethodId: string;
|
|
1757
|
+
readonly providerId: string;
|
|
1758
|
+
readonly setup?: Schema.Json;
|
|
1759
|
+
} | {
|
|
1760
|
+
readonly _tag: "display";
|
|
1761
|
+
readonly authMethodId: string;
|
|
1762
|
+
readonly providerId: string;
|
|
1763
|
+
readonly setup?: Schema.Json;
|
|
1764
|
+
readonly material: Schema.Json;
|
|
1765
|
+
} | {
|
|
1766
|
+
readonly _tag: "parse";
|
|
1767
|
+
readonly config: Schema.Json;
|
|
1768
|
+
readonly state?: Schema.Json;
|
|
1769
|
+
readonly triggerId: string;
|
|
1770
|
+
readonly webhookUrl: string;
|
|
1771
|
+
readonly request: {
|
|
1772
|
+
readonly body: Schema.Json;
|
|
1773
|
+
readonly headers?: {
|
|
1774
|
+
readonly [x: string]: string;
|
|
1775
|
+
};
|
|
1776
|
+
readonly method?: string;
|
|
1777
|
+
readonly query?: {
|
|
1778
|
+
readonly [x: string]: string | readonly string[];
|
|
1779
|
+
};
|
|
1780
|
+
readonly rawBody: Uint8Array<ArrayBufferLike>;
|
|
1781
|
+
readonly url?: string;
|
|
1782
|
+
};
|
|
1783
|
+
} | {
|
|
1784
|
+
readonly _tag: "poll";
|
|
1785
|
+
readonly config: Schema.Json;
|
|
1786
|
+
readonly state?: Schema.Json;
|
|
1787
|
+
readonly triggerId: string;
|
|
1788
|
+
} | {
|
|
1789
|
+
readonly _tag: "prepare";
|
|
1790
|
+
readonly authMethodId: string;
|
|
1791
|
+
readonly providerId: string;
|
|
1792
|
+
readonly setup?: Schema.Json;
|
|
1793
|
+
readonly input: Schema.Json;
|
|
1794
|
+
} | {
|
|
1795
|
+
readonly _tag: "prepareOAuth2Tokens";
|
|
1796
|
+
readonly authMethodId: string;
|
|
1797
|
+
readonly providerId: string;
|
|
1798
|
+
readonly setup?: Schema.Json;
|
|
1799
|
+
readonly tokens: {
|
|
1800
|
+
readonly accessToken: string;
|
|
1801
|
+
readonly expiresAt?: number;
|
|
1802
|
+
readonly expiresIn?: number;
|
|
1803
|
+
readonly raw: {
|
|
1804
|
+
readonly [x: string]: Schema.Json;
|
|
1805
|
+
};
|
|
1806
|
+
readonly refreshToken?: string;
|
|
1807
|
+
readonly scope?: string;
|
|
1808
|
+
readonly tokenType?: string;
|
|
1809
|
+
};
|
|
1810
|
+
} | {
|
|
1811
|
+
readonly _tag: "refresh";
|
|
1812
|
+
readonly authMethodId: string;
|
|
1813
|
+
readonly providerId: string;
|
|
1814
|
+
readonly setup?: Schema.Json;
|
|
1815
|
+
readonly material: Schema.Json;
|
|
1816
|
+
readonly minValidityMs: number;
|
|
1817
|
+
readonly now: number;
|
|
1818
|
+
readonly reason: "before-use" | "forced";
|
|
1819
|
+
} | {
|
|
1820
|
+
readonly _tag: "resolve";
|
|
1821
|
+
readonly authMethodId: string;
|
|
1822
|
+
readonly providerId: string;
|
|
1823
|
+
readonly setup?: Schema.Json;
|
|
1824
|
+
readonly material: Schema.Json;
|
|
1825
|
+
} | {
|
|
1826
|
+
readonly _tag: "test";
|
|
1827
|
+
readonly authMethodId: string;
|
|
1828
|
+
readonly providerId: string;
|
|
1829
|
+
readonly setup?: Schema.Json;
|
|
1830
|
+
readonly material: Schema.Json;
|
|
1831
|
+
} | {
|
|
1832
|
+
readonly _tag: "verify";
|
|
1833
|
+
readonly config: Schema.Json;
|
|
1834
|
+
readonly state?: Schema.Json;
|
|
1835
|
+
readonly triggerId: string;
|
|
1836
|
+
readonly webhookUrl: string;
|
|
1837
|
+
readonly request: {
|
|
1838
|
+
readonly body: Schema.Json;
|
|
1839
|
+
readonly headers?: {
|
|
1840
|
+
readonly [x: string]: string;
|
|
1841
|
+
};
|
|
1842
|
+
readonly method?: string;
|
|
1843
|
+
readonly query?: {
|
|
1844
|
+
readonly [x: string]: string | readonly string[];
|
|
1845
|
+
};
|
|
1846
|
+
readonly rawBody: Uint8Array<ArrayBufferLike>;
|
|
1847
|
+
readonly url?: string;
|
|
1848
|
+
};
|
|
1849
|
+
};
|
|
1850
|
+
}, PluginExecutionError | Schema.SchemaError, never>;
|
|
1851
|
+
export declare const encodeOutput: (output: {
|
|
1852
|
+
readonly _tag: "failure";
|
|
1853
|
+
readonly error: {
|
|
1854
|
+
readonly category: "connection" | "handler" | "initialization" | "protocol" | "validation";
|
|
1855
|
+
readonly channel?: {
|
|
1856
|
+
readonly code: "handler_unavailable" | "invalid_auth" | "invalid_definition" | "invalid_input" | "invalid_result" | "not_found" | "provider_failure" | "unsupported_feature";
|
|
1857
|
+
readonly providerCode?: "rate_limited" | "rejected" | "unauthorized" | "unavailable" | "unknown_completion" | "window_closed";
|
|
1858
|
+
};
|
|
1859
|
+
readonly code: string;
|
|
1860
|
+
readonly fields?: readonly {
|
|
1861
|
+
readonly path: string;
|
|
1862
|
+
}[];
|
|
1863
|
+
readonly message: string;
|
|
1864
|
+
readonly retryAfterSeconds?: number;
|
|
1865
|
+
readonly retryable: boolean;
|
|
1866
|
+
readonly status?: number;
|
|
1867
|
+
};
|
|
1868
|
+
readonly identity: {
|
|
1869
|
+
readonly artifactDigest: string;
|
|
1870
|
+
readonly invocationId: string;
|
|
1871
|
+
readonly organizationId: string;
|
|
1872
|
+
readonly pluginKey: string;
|
|
1873
|
+
readonly pluginVersion: string;
|
|
1874
|
+
};
|
|
1875
|
+
} | {
|
|
1876
|
+
readonly _tag: "interrupted";
|
|
1877
|
+
readonly identity: {
|
|
1878
|
+
readonly artifactDigest: string;
|
|
1879
|
+
readonly invocationId: string;
|
|
1880
|
+
readonly organizationId: string;
|
|
1881
|
+
readonly pluginKey: string;
|
|
1882
|
+
readonly pluginVersion: string;
|
|
1883
|
+
};
|
|
1884
|
+
} | {
|
|
1885
|
+
readonly _tag: "success";
|
|
1886
|
+
readonly identity: {
|
|
1887
|
+
readonly artifactDigest: string;
|
|
1888
|
+
readonly invocationId: string;
|
|
1889
|
+
readonly organizationId: string;
|
|
1890
|
+
readonly pluginKey: string;
|
|
1891
|
+
readonly pluginVersion: string;
|
|
1892
|
+
};
|
|
1893
|
+
readonly value?: Schema.Json;
|
|
1894
|
+
}, maximum: number) => Effect.Effect<{
|
|
1895
|
+
readonly _tag: "failure";
|
|
1896
|
+
readonly error: {
|
|
1897
|
+
readonly category: "connection" | "handler" | "initialization" | "protocol" | "validation";
|
|
1898
|
+
readonly channel?: {
|
|
1899
|
+
readonly code: "handler_unavailable" | "invalid_auth" | "invalid_definition" | "invalid_input" | "invalid_result" | "not_found" | "provider_failure" | "unsupported_feature";
|
|
1900
|
+
readonly providerCode?: "rate_limited" | "rejected" | "unauthorized" | "unavailable" | "unknown_completion" | "window_closed";
|
|
1901
|
+
};
|
|
1902
|
+
readonly code: string;
|
|
1903
|
+
readonly fields?: readonly {
|
|
1904
|
+
readonly path: string;
|
|
1905
|
+
}[];
|
|
1906
|
+
readonly message: string;
|
|
1907
|
+
readonly retryAfterSeconds?: number;
|
|
1908
|
+
readonly retryable: boolean;
|
|
1909
|
+
readonly status?: number;
|
|
1910
|
+
};
|
|
1911
|
+
readonly identity: {
|
|
1912
|
+
readonly artifactDigest: string;
|
|
1913
|
+
readonly invocationId: string;
|
|
1914
|
+
readonly organizationId: string;
|
|
1915
|
+
readonly pluginKey: string;
|
|
1916
|
+
readonly pluginVersion: string;
|
|
1917
|
+
};
|
|
1918
|
+
} | {
|
|
1919
|
+
readonly _tag: "interrupted";
|
|
1920
|
+
readonly identity: {
|
|
1921
|
+
readonly artifactDigest: string;
|
|
1922
|
+
readonly invocationId: string;
|
|
1923
|
+
readonly organizationId: string;
|
|
1924
|
+
readonly pluginKey: string;
|
|
1925
|
+
readonly pluginVersion: string;
|
|
1926
|
+
};
|
|
1927
|
+
} | {
|
|
1928
|
+
readonly _tag: "success";
|
|
1929
|
+
readonly identity: {
|
|
1930
|
+
readonly artifactDigest: string;
|
|
1931
|
+
readonly invocationId: string;
|
|
1932
|
+
readonly organizationId: string;
|
|
1933
|
+
readonly pluginKey: string;
|
|
1934
|
+
readonly pluginVersion: string;
|
|
1935
|
+
};
|
|
1936
|
+
readonly value?: Schema.Json;
|
|
1937
|
+
}, PluginExecutionError | Schema.SchemaError, never>;
|
|
1938
|
+
export declare const decodeOutput: (output: unknown) => Effect.Effect<{
|
|
1939
|
+
readonly _tag: "failure";
|
|
1940
|
+
readonly error: {
|
|
1941
|
+
readonly category: "connection" | "handler" | "initialization" | "protocol" | "validation";
|
|
1942
|
+
readonly channel?: {
|
|
1943
|
+
readonly code: "handler_unavailable" | "invalid_auth" | "invalid_definition" | "invalid_input" | "invalid_result" | "not_found" | "provider_failure" | "unsupported_feature";
|
|
1944
|
+
readonly providerCode?: "rate_limited" | "rejected" | "unauthorized" | "unavailable" | "unknown_completion" | "window_closed";
|
|
1945
|
+
};
|
|
1946
|
+
readonly code: string;
|
|
1947
|
+
readonly fields?: readonly {
|
|
1948
|
+
readonly path: string;
|
|
1949
|
+
}[];
|
|
1950
|
+
readonly message: string;
|
|
1951
|
+
readonly retryAfterSeconds?: number;
|
|
1952
|
+
readonly retryable: boolean;
|
|
1953
|
+
readonly status?: number;
|
|
1954
|
+
};
|
|
1955
|
+
readonly identity: {
|
|
1956
|
+
readonly artifactDigest: string;
|
|
1957
|
+
readonly invocationId: string;
|
|
1958
|
+
readonly organizationId: string;
|
|
1959
|
+
readonly pluginKey: string;
|
|
1960
|
+
readonly pluginVersion: string;
|
|
1961
|
+
};
|
|
1962
|
+
} | {
|
|
1963
|
+
readonly _tag: "interrupted";
|
|
1964
|
+
readonly identity: {
|
|
1965
|
+
readonly artifactDigest: string;
|
|
1966
|
+
readonly invocationId: string;
|
|
1967
|
+
readonly organizationId: string;
|
|
1968
|
+
readonly pluginKey: string;
|
|
1969
|
+
readonly pluginVersion: string;
|
|
1970
|
+
};
|
|
1971
|
+
} | {
|
|
1972
|
+
readonly _tag: "success";
|
|
1973
|
+
readonly identity: {
|
|
1974
|
+
readonly artifactDigest: string;
|
|
1975
|
+
readonly invocationId: string;
|
|
1976
|
+
readonly organizationId: string;
|
|
1977
|
+
readonly pluginKey: string;
|
|
1978
|
+
readonly pluginVersion: string;
|
|
1979
|
+
};
|
|
1980
|
+
readonly value?: Schema.Json;
|
|
1981
|
+
}, PluginExecutionError | Schema.SchemaError, never>;
|
|
1982
|
+
export declare function responseLimit(request: Request): number;
|
|
1983
|
+
export type Invocation = typeof Invocation.Type;
|
|
1984
|
+
export declare const Invocation: Schema.Struct<{
|
|
1985
|
+
readonly entrypoint: Schema.String;
|
|
1986
|
+
readonly exportName: Schema.String;
|
|
1987
|
+
readonly request: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
|
|
1988
|
+
readonly connection: Schema.optionalKey<Schema.Struct<{
|
|
1989
|
+
readonly connectionId: Schema.NonEmptyString;
|
|
1990
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
1991
|
+
readonly methodId: Schema.NonEmptyString;
|
|
1992
|
+
readonly providerId: Schema.NonEmptyString;
|
|
1993
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
1994
|
+
}>>;
|
|
1995
|
+
readonly context: Schema.Struct<{
|
|
1996
|
+
readonly actor: Schema.Union<readonly [Schema.Struct<{
|
|
1997
|
+
readonly kind: Schema.Literal<"user">;
|
|
1998
|
+
readonly userId: Schema.NonEmptyString;
|
|
1999
|
+
}>, Schema.Struct<{
|
|
2000
|
+
readonly kind: Schema.Literal<"system">;
|
|
2001
|
+
readonly reason: Schema.optionalKey<Schema.String>;
|
|
2002
|
+
}>]>;
|
|
2003
|
+
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
2004
|
+
readonly source: Schema.Struct<{
|
|
2005
|
+
readonly kind: Schema.NonEmptyString;
|
|
2006
|
+
readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
2007
|
+
readonly subjectId: Schema.optionalKey<Schema.String>;
|
|
2008
|
+
}>;
|
|
2009
|
+
readonly tenant: Schema.Struct<{
|
|
2010
|
+
readonly organizationId: Schema.NonEmptyString;
|
|
2011
|
+
readonly teamId: Schema.NonEmptyString;
|
|
2012
|
+
}>;
|
|
2013
|
+
}>;
|
|
2014
|
+
readonly files: Schema.optionalKey<Schema.Struct<{
|
|
2015
|
+
readonly token: Schema.NonEmptyString;
|
|
2016
|
+
readonly url: Schema.String;
|
|
2017
|
+
}>>;
|
|
2018
|
+
readonly identity: Schema.Struct<{
|
|
2019
|
+
readonly artifactDigest: Schema.String;
|
|
2020
|
+
readonly invocationId: Schema.NonEmptyString;
|
|
2021
|
+
readonly organizationId: Schema.NonEmptyString;
|
|
2022
|
+
readonly pluginKey: Schema.NonEmptyString;
|
|
2023
|
+
readonly pluginVersion: Schema.NonEmptyString;
|
|
2024
|
+
}>;
|
|
2025
|
+
readonly operation: Schema.Union<readonly [Schema.TaggedStruct<"invoke", {
|
|
2026
|
+
readonly actionId: Schema.NonEmptyString;
|
|
2027
|
+
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
2028
|
+
}>, Schema.TaggedStruct<"activate", {
|
|
2029
|
+
config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
2030
|
+
state: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
2031
|
+
triggerId: Schema.NonEmptyString;
|
|
2032
|
+
webhookUrl: Schema.String;
|
|
2033
|
+
}>, Schema.TaggedStruct<"deactivate", {
|
|
2034
|
+
config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
2035
|
+
state: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
2036
|
+
triggerId: Schema.NonEmptyString;
|
|
2037
|
+
webhookUrl: Schema.String;
|
|
2038
|
+
}>, Schema.TaggedStruct<"verify", {
|
|
2039
|
+
config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
2040
|
+
state: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
2041
|
+
triggerId: Schema.NonEmptyString;
|
|
2042
|
+
webhookUrl: Schema.String;
|
|
2043
|
+
request: Schema.Struct<{
|
|
2044
|
+
readonly body: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
2045
|
+
readonly headers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
2046
|
+
readonly method: Schema.optionalKey<Schema.String>;
|
|
2047
|
+
readonly query: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.String>]>>>;
|
|
2048
|
+
readonly rawBody: Schema.Uint8ArrayFromBase64;
|
|
2049
|
+
readonly url: Schema.optionalKey<Schema.String>;
|
|
2050
|
+
}>;
|
|
2051
|
+
}>, Schema.TaggedStruct<"parse", {
|
|
2052
|
+
config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
2053
|
+
state: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
2054
|
+
triggerId: Schema.NonEmptyString;
|
|
2055
|
+
webhookUrl: Schema.String;
|
|
2056
|
+
request: Schema.Struct<{
|
|
2057
|
+
readonly body: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
2058
|
+
readonly headers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
2059
|
+
readonly method: Schema.optionalKey<Schema.String>;
|
|
2060
|
+
readonly query: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.$Array<Schema.String>]>>>;
|
|
2061
|
+
readonly rawBody: Schema.Uint8ArrayFromBase64;
|
|
2062
|
+
readonly url: Schema.optionalKey<Schema.String>;
|
|
2063
|
+
}>;
|
|
2064
|
+
}>, Schema.TaggedStruct<"poll", {
|
|
2065
|
+
config: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
2066
|
+
state: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
2067
|
+
triggerId: Schema.NonEmptyString;
|
|
2068
|
+
}>, Schema.TaggedStruct<"channelCheckAccess", {
|
|
2069
|
+
readonly channelId: Schema.NonEmptyString;
|
|
2070
|
+
readonly definitionSettings: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
2071
|
+
readonly deploymentSettings: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
2072
|
+
readonly identity: Schema.Struct<{
|
|
2073
|
+
readonly conversation: Schema.Struct<{
|
|
2074
|
+
readonly conversationKey: Schema.NonEmptyString;
|
|
2075
|
+
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
2076
|
+
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
2077
|
+
}>;
|
|
2078
|
+
readonly senderKey: Schema.NonEmptyString;
|
|
2079
|
+
}>;
|
|
2080
|
+
}>, Schema.TaggedStruct<"channelExecute", {
|
|
2081
|
+
readonly channelId: Schema.NonEmptyString;
|
|
2082
|
+
readonly definitionSettings: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
2083
|
+
readonly deploymentSettings: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
2084
|
+
readonly command: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
2085
|
+
}>, Schema.Union<readonly [Schema.TaggedStruct<"decodeSetup", {
|
|
2086
|
+
authMethodId: Schema.NonEmptyString;
|
|
2087
|
+
providerId: Schema.NonEmptyString;
|
|
2088
|
+
setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
2089
|
+
}>, Schema.TaggedStruct<"prepare", {
|
|
2090
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
2091
|
+
readonly providerId: Schema.NonEmptyString;
|
|
2092
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
2093
|
+
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
2094
|
+
}>, Schema.TaggedStruct<"prepareOAuth2Tokens", {
|
|
2095
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
2096
|
+
readonly providerId: Schema.NonEmptyString;
|
|
2097
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
2098
|
+
readonly tokens: Schema.Struct<{
|
|
2099
|
+
readonly accessToken: Schema.String;
|
|
2100
|
+
readonly expiresAt: Schema.optionalKey<Schema.Number>;
|
|
2101
|
+
readonly expiresIn: Schema.optionalKey<Schema.Number>;
|
|
2102
|
+
readonly raw: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
2103
|
+
readonly refreshToken: Schema.optionalKey<Schema.String>;
|
|
2104
|
+
readonly scope: Schema.optionalKey<Schema.String>;
|
|
2105
|
+
readonly tokenType: Schema.optionalKey<Schema.String>;
|
|
2106
|
+
}>;
|
|
2107
|
+
}>, Schema.TaggedStruct<"refresh", {
|
|
2108
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
2109
|
+
readonly providerId: Schema.NonEmptyString;
|
|
2110
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
2111
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
2112
|
+
readonly minValidityMs: Schema.Finite;
|
|
2113
|
+
readonly now: Schema.Finite;
|
|
2114
|
+
readonly reason: Schema.Literals<readonly ["before-use", "forced"]>;
|
|
2115
|
+
}>, Schema.TaggedStruct<"resolve", {
|
|
2116
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
2117
|
+
readonly providerId: Schema.NonEmptyString;
|
|
2118
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
2119
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
2120
|
+
}>, Schema.TaggedStruct<"display", {
|
|
2121
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
2122
|
+
readonly providerId: Schema.NonEmptyString;
|
|
2123
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
2124
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
2125
|
+
}>, Schema.TaggedStruct<"test", {
|
|
2126
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
2127
|
+
readonly providerId: Schema.NonEmptyString;
|
|
2128
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
2129
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
2130
|
+
}>]>]>;
|
|
2131
|
+
}>, Schema.TaggedStruct<"auth", {
|
|
2132
|
+
readonly identity: Schema.Struct<{
|
|
2133
|
+
readonly artifactDigest: Schema.String;
|
|
2134
|
+
readonly invocationId: Schema.NonEmptyString;
|
|
2135
|
+
readonly organizationId: Schema.NonEmptyString;
|
|
2136
|
+
readonly pluginKey: Schema.NonEmptyString;
|
|
2137
|
+
readonly pluginVersion: Schema.NonEmptyString;
|
|
2138
|
+
}>;
|
|
2139
|
+
readonly operation: Schema.Union<readonly [Schema.Union<readonly [Schema.TaggedStruct<"decodeSetup", {
|
|
2140
|
+
authMethodId: Schema.NonEmptyString;
|
|
2141
|
+
providerId: Schema.NonEmptyString;
|
|
2142
|
+
setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
2143
|
+
}>, Schema.TaggedStruct<"prepare", {
|
|
2144
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
2145
|
+
readonly providerId: Schema.NonEmptyString;
|
|
2146
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
2147
|
+
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
2148
|
+
}>, Schema.TaggedStruct<"prepareOAuth2Tokens", {
|
|
2149
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
2150
|
+
readonly providerId: Schema.NonEmptyString;
|
|
2151
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
2152
|
+
readonly tokens: Schema.Struct<{
|
|
2153
|
+
readonly accessToken: Schema.String;
|
|
2154
|
+
readonly expiresAt: Schema.optionalKey<Schema.Number>;
|
|
2155
|
+
readonly expiresIn: Schema.optionalKey<Schema.Number>;
|
|
2156
|
+
readonly raw: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
2157
|
+
readonly refreshToken: Schema.optionalKey<Schema.String>;
|
|
2158
|
+
readonly scope: Schema.optionalKey<Schema.String>;
|
|
2159
|
+
readonly tokenType: Schema.optionalKey<Schema.String>;
|
|
2160
|
+
}>;
|
|
2161
|
+
}>, Schema.TaggedStruct<"refresh", {
|
|
2162
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
2163
|
+
readonly providerId: Schema.NonEmptyString;
|
|
2164
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
2165
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
2166
|
+
readonly minValidityMs: Schema.Finite;
|
|
2167
|
+
readonly now: Schema.Finite;
|
|
2168
|
+
readonly reason: Schema.Literals<readonly ["before-use", "forced"]>;
|
|
2169
|
+
}>, Schema.TaggedStruct<"resolve", {
|
|
2170
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
2171
|
+
readonly providerId: Schema.NonEmptyString;
|
|
2172
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
2173
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
2174
|
+
}>, Schema.TaggedStruct<"display", {
|
|
2175
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
2176
|
+
readonly providerId: Schema.NonEmptyString;
|
|
2177
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
2178
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
2179
|
+
}>, Schema.TaggedStruct<"test", {
|
|
2180
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
2181
|
+
readonly providerId: Schema.NonEmptyString;
|
|
2182
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
2183
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
2184
|
+
}>]>, Schema.TaggedStruct<"oauthStart", {
|
|
2185
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
2186
|
+
readonly providerId: Schema.NonEmptyString;
|
|
2187
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
2188
|
+
readonly redirectUri: Schema.String;
|
|
2189
|
+
}>, Schema.TaggedStruct<"oauthComplete", {
|
|
2190
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
2191
|
+
readonly providerId: Schema.NonEmptyString;
|
|
2192
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
2193
|
+
readonly continuation: Schema.Struct<{
|
|
2194
|
+
readonly expiresAt: Schema.DateFromString;
|
|
2195
|
+
readonly pkceVerifier: Schema.NullOr<Schema.String>;
|
|
2196
|
+
readonly redirectUri: Schema.String;
|
|
2197
|
+
readonly state: Schema.String;
|
|
2198
|
+
}>;
|
|
2199
|
+
readonly query: Schema.$Record<Schema.String, Schema.String>;
|
|
2200
|
+
}>, Schema.TaggedStruct<"sandboxAccess", {
|
|
2201
|
+
readonly authMethodId: Schema.NonEmptyString;
|
|
2202
|
+
readonly providerId: Schema.NonEmptyString;
|
|
2203
|
+
readonly setup: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
2204
|
+
readonly material: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
2205
|
+
readonly request: Schema.optionalKey<Schema.Struct<{
|
|
2206
|
+
readonly headers: Schema.$Record<Schema.String, Schema.String>;
|
|
2207
|
+
readonly method: Schema.Literals<readonly ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE", "QUERY"]>;
|
|
2208
|
+
readonly url: Schema.String;
|
|
2209
|
+
}>>;
|
|
2210
|
+
}>]>;
|
|
2211
|
+
}>, Schema.TaggedStruct<"channelSettings", {
|
|
2212
|
+
readonly identity: Schema.Struct<{
|
|
2213
|
+
readonly artifactDigest: Schema.String;
|
|
2214
|
+
readonly invocationId: Schema.NonEmptyString;
|
|
2215
|
+
readonly organizationId: Schema.NonEmptyString;
|
|
2216
|
+
readonly pluginKey: Schema.NonEmptyString;
|
|
2217
|
+
readonly pluginVersion: Schema.NonEmptyString;
|
|
2218
|
+
}>;
|
|
2219
|
+
readonly operation: Schema.TaggedStruct<"decodeChannelSettings", {
|
|
2220
|
+
readonly channelId: Schema.NonEmptyString;
|
|
2221
|
+
readonly field: Schema.Literals<readonly ["definitionSettings", "deploymentSettings"]>;
|
|
2222
|
+
readonly value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
2223
|
+
}>;
|
|
2224
|
+
}>]>, Schema.TaggedStruct<"extract", {
|
|
2225
|
+
readonly identity: Schema.Struct<{
|
|
2226
|
+
readonly artifactDigest: Schema.String;
|
|
2227
|
+
readonly invocationId: Schema.NonEmptyString;
|
|
2228
|
+
readonly organizationId: Schema.NonEmptyString;
|
|
2229
|
+
readonly pluginKey: Schema.NonEmptyString;
|
|
2230
|
+
readonly pluginVersion: Schema.NonEmptyString;
|
|
2231
|
+
}>;
|
|
2232
|
+
}>]>;
|
|
2233
|
+
}>;
|
|
2234
|
+
export declare const encodeRequest: (request: {
|
|
2235
|
+
readonly _tag: "auth";
|
|
2236
|
+
readonly identity: {
|
|
2237
|
+
readonly artifactDigest: string;
|
|
2238
|
+
readonly invocationId: string;
|
|
2239
|
+
readonly organizationId: string;
|
|
2240
|
+
readonly pluginKey: string;
|
|
2241
|
+
readonly pluginVersion: string;
|
|
2242
|
+
};
|
|
2243
|
+
readonly operation: {
|
|
2244
|
+
readonly _tag: "decodeSetup";
|
|
2245
|
+
readonly authMethodId: string;
|
|
2246
|
+
readonly providerId: string;
|
|
2247
|
+
readonly setup?: Schema.Json;
|
|
2248
|
+
} | {
|
|
2249
|
+
readonly _tag: "display";
|
|
2250
|
+
readonly authMethodId: string;
|
|
2251
|
+
readonly providerId: string;
|
|
2252
|
+
readonly setup?: Schema.Json;
|
|
2253
|
+
readonly material: Schema.Json;
|
|
2254
|
+
} | {
|
|
2255
|
+
readonly _tag: "oauthComplete";
|
|
2256
|
+
readonly authMethodId: string;
|
|
2257
|
+
readonly providerId: string;
|
|
2258
|
+
readonly setup?: Schema.Json;
|
|
2259
|
+
readonly continuation: {
|
|
2260
|
+
readonly expiresAt: Date;
|
|
2261
|
+
readonly pkceVerifier: string | null;
|
|
2262
|
+
readonly redirectUri: string;
|
|
2263
|
+
readonly state: string;
|
|
2264
|
+
};
|
|
2265
|
+
readonly query: {
|
|
2266
|
+
readonly [x: string]: string;
|
|
2267
|
+
};
|
|
2268
|
+
} | {
|
|
2269
|
+
readonly _tag: "oauthStart";
|
|
2270
|
+
readonly authMethodId: string;
|
|
2271
|
+
readonly providerId: string;
|
|
2272
|
+
readonly setup?: Schema.Json;
|
|
2273
|
+
readonly redirectUri: string;
|
|
2274
|
+
} | {
|
|
2275
|
+
readonly _tag: "prepare";
|
|
2276
|
+
readonly authMethodId: string;
|
|
2277
|
+
readonly providerId: string;
|
|
2278
|
+
readonly setup?: Schema.Json;
|
|
2279
|
+
readonly input: Schema.Json;
|
|
2280
|
+
} | {
|
|
2281
|
+
readonly _tag: "prepareOAuth2Tokens";
|
|
2282
|
+
readonly authMethodId: string;
|
|
2283
|
+
readonly providerId: string;
|
|
2284
|
+
readonly setup?: Schema.Json;
|
|
2285
|
+
readonly tokens: {
|
|
2286
|
+
readonly accessToken: string;
|
|
2287
|
+
readonly expiresAt?: number;
|
|
2288
|
+
readonly expiresIn?: number;
|
|
2289
|
+
readonly raw: {
|
|
2290
|
+
readonly [x: string]: Schema.Json;
|
|
2291
|
+
};
|
|
2292
|
+
readonly refreshToken?: string;
|
|
2293
|
+
readonly scope?: string;
|
|
2294
|
+
readonly tokenType?: string;
|
|
2295
|
+
};
|
|
2296
|
+
} | {
|
|
2297
|
+
readonly _tag: "refresh";
|
|
2298
|
+
readonly authMethodId: string;
|
|
2299
|
+
readonly providerId: string;
|
|
2300
|
+
readonly setup?: Schema.Json;
|
|
2301
|
+
readonly material: Schema.Json;
|
|
2302
|
+
readonly minValidityMs: number;
|
|
2303
|
+
readonly now: number;
|
|
2304
|
+
readonly reason: "before-use" | "forced";
|
|
2305
|
+
} | {
|
|
2306
|
+
readonly _tag: "resolve";
|
|
2307
|
+
readonly authMethodId: string;
|
|
2308
|
+
readonly providerId: string;
|
|
2309
|
+
readonly setup?: Schema.Json;
|
|
2310
|
+
readonly material: Schema.Json;
|
|
2311
|
+
} | {
|
|
2312
|
+
readonly _tag: "sandboxAccess";
|
|
2313
|
+
readonly authMethodId: string;
|
|
2314
|
+
readonly providerId: string;
|
|
2315
|
+
readonly setup?: Schema.Json;
|
|
2316
|
+
readonly material: Schema.Json;
|
|
2317
|
+
readonly request?: {
|
|
2318
|
+
readonly headers: {
|
|
2319
|
+
readonly [x: string]: string;
|
|
2320
|
+
};
|
|
2321
|
+
readonly method: "DELETE" | "GET" | "HEAD" | "OPTIONS" | "PATCH" | "POST" | "PUT" | "QUERY" | "TRACE";
|
|
2322
|
+
readonly url: string;
|
|
2323
|
+
};
|
|
2324
|
+
} | {
|
|
2325
|
+
readonly _tag: "test";
|
|
2326
|
+
readonly authMethodId: string;
|
|
2327
|
+
readonly providerId: string;
|
|
2328
|
+
readonly setup?: Schema.Json;
|
|
2329
|
+
readonly material: Schema.Json;
|
|
2330
|
+
};
|
|
2331
|
+
} | {
|
|
2332
|
+
readonly _tag: "channelSettings";
|
|
2333
|
+
readonly identity: {
|
|
2334
|
+
readonly artifactDigest: string;
|
|
2335
|
+
readonly invocationId: string;
|
|
2336
|
+
readonly organizationId: string;
|
|
2337
|
+
readonly pluginKey: string;
|
|
2338
|
+
readonly pluginVersion: string;
|
|
2339
|
+
};
|
|
2340
|
+
readonly operation: {
|
|
2341
|
+
readonly _tag: "decodeChannelSettings";
|
|
2342
|
+
readonly channelId: string;
|
|
2343
|
+
readonly field: "definitionSettings" | "deploymentSettings";
|
|
2344
|
+
readonly value: Schema.Json;
|
|
2345
|
+
};
|
|
2346
|
+
} | {
|
|
2347
|
+
readonly _tag: "extract";
|
|
2348
|
+
readonly identity: {
|
|
2349
|
+
readonly artifactDigest: string;
|
|
2350
|
+
readonly invocationId: string;
|
|
2351
|
+
readonly organizationId: string;
|
|
2352
|
+
readonly pluginKey: string;
|
|
2353
|
+
readonly pluginVersion: string;
|
|
2354
|
+
};
|
|
2355
|
+
} | {
|
|
2356
|
+
readonly connection?: {
|
|
2357
|
+
readonly connectionId: string;
|
|
2358
|
+
readonly material: Schema.Json;
|
|
2359
|
+
readonly methodId: string;
|
|
2360
|
+
readonly providerId: string;
|
|
2361
|
+
readonly setup?: Schema.Json;
|
|
2362
|
+
};
|
|
2363
|
+
readonly context: {
|
|
2364
|
+
readonly actor: {
|
|
2365
|
+
readonly kind: "user";
|
|
2366
|
+
readonly userId: string;
|
|
2367
|
+
} | {
|
|
2368
|
+
readonly kind: "system";
|
|
2369
|
+
readonly reason?: string;
|
|
2370
|
+
};
|
|
2371
|
+
readonly metadata?: {
|
|
2372
|
+
readonly [x: string]: Schema.Json;
|
|
2373
|
+
};
|
|
2374
|
+
readonly source: {
|
|
2375
|
+
readonly kind: string;
|
|
2376
|
+
readonly metadata?: {
|
|
2377
|
+
readonly [x: string]: Schema.Json;
|
|
2378
|
+
};
|
|
2379
|
+
readonly subjectId?: string;
|
|
2380
|
+
};
|
|
2381
|
+
readonly tenant: {
|
|
2382
|
+
readonly organizationId: string;
|
|
2383
|
+
readonly teamId: string;
|
|
2384
|
+
};
|
|
2385
|
+
};
|
|
2386
|
+
readonly files?: {
|
|
2387
|
+
readonly token: string;
|
|
2388
|
+
readonly url: string;
|
|
2389
|
+
};
|
|
2390
|
+
readonly identity: {
|
|
2391
|
+
readonly artifactDigest: string;
|
|
2392
|
+
readonly invocationId: string;
|
|
2393
|
+
readonly organizationId: string;
|
|
2394
|
+
readonly pluginKey: string;
|
|
2395
|
+
readonly pluginVersion: string;
|
|
2396
|
+
};
|
|
2397
|
+
readonly operation: {
|
|
2398
|
+
readonly _tag: "channelCheckAccess";
|
|
2399
|
+
readonly channelId: string;
|
|
2400
|
+
readonly definitionSettings: Schema.Json;
|
|
2401
|
+
readonly deploymentSettings: Schema.Json;
|
|
2402
|
+
readonly identity: {
|
|
2403
|
+
readonly conversation: {
|
|
2404
|
+
readonly conversationKey: string;
|
|
2405
|
+
readonly kind: "direct" | "group";
|
|
2406
|
+
readonly threadKey?: string;
|
|
2407
|
+
};
|
|
2408
|
+
readonly senderKey: string;
|
|
2409
|
+
};
|
|
2410
|
+
} | {
|
|
2411
|
+
readonly _tag: "channelExecute";
|
|
2412
|
+
readonly channelId: string;
|
|
2413
|
+
readonly definitionSettings: Schema.Json;
|
|
2414
|
+
readonly deploymentSettings: Schema.Json;
|
|
2415
|
+
readonly command: Schema.Json;
|
|
2416
|
+
} | {
|
|
2417
|
+
readonly _tag: "invoke";
|
|
2418
|
+
readonly actionId: string;
|
|
2419
|
+
readonly input: Schema.Json;
|
|
2420
|
+
} | {
|
|
2421
|
+
readonly _tag: "activate";
|
|
2422
|
+
readonly config: Schema.Json;
|
|
2423
|
+
readonly state?: Schema.Json;
|
|
2424
|
+
readonly triggerId: string;
|
|
2425
|
+
readonly webhookUrl: string;
|
|
2426
|
+
} | {
|
|
2427
|
+
readonly _tag: "deactivate";
|
|
2428
|
+
readonly config: Schema.Json;
|
|
2429
|
+
readonly state?: Schema.Json;
|
|
2430
|
+
readonly triggerId: string;
|
|
2431
|
+
readonly webhookUrl: string;
|
|
2432
|
+
} | {
|
|
2433
|
+
readonly _tag: "decodeSetup";
|
|
2434
|
+
readonly authMethodId: string;
|
|
2435
|
+
readonly providerId: string;
|
|
2436
|
+
readonly setup?: Schema.Json;
|
|
2437
|
+
} | {
|
|
2438
|
+
readonly _tag: "display";
|
|
2439
|
+
readonly authMethodId: string;
|
|
2440
|
+
readonly providerId: string;
|
|
2441
|
+
readonly setup?: Schema.Json;
|
|
2442
|
+
readonly material: Schema.Json;
|
|
2443
|
+
} | {
|
|
2444
|
+
readonly _tag: "parse";
|
|
2445
|
+
readonly config: Schema.Json;
|
|
2446
|
+
readonly state?: Schema.Json;
|
|
2447
|
+
readonly triggerId: string;
|
|
2448
|
+
readonly webhookUrl: string;
|
|
2449
|
+
readonly request: {
|
|
2450
|
+
readonly body: Schema.Json;
|
|
2451
|
+
readonly headers?: {
|
|
2452
|
+
readonly [x: string]: string;
|
|
2453
|
+
};
|
|
2454
|
+
readonly method?: string;
|
|
2455
|
+
readonly query?: {
|
|
2456
|
+
readonly [x: string]: string | readonly string[];
|
|
2457
|
+
};
|
|
2458
|
+
readonly rawBody: Uint8Array<ArrayBufferLike>;
|
|
2459
|
+
readonly url?: string;
|
|
2460
|
+
};
|
|
2461
|
+
} | {
|
|
2462
|
+
readonly _tag: "poll";
|
|
2463
|
+
readonly config: Schema.Json;
|
|
2464
|
+
readonly state?: Schema.Json;
|
|
2465
|
+
readonly triggerId: string;
|
|
2466
|
+
} | {
|
|
2467
|
+
readonly _tag: "prepare";
|
|
2468
|
+
readonly authMethodId: string;
|
|
2469
|
+
readonly providerId: string;
|
|
2470
|
+
readonly setup?: Schema.Json;
|
|
2471
|
+
readonly input: Schema.Json;
|
|
2472
|
+
} | {
|
|
2473
|
+
readonly _tag: "prepareOAuth2Tokens";
|
|
2474
|
+
readonly authMethodId: string;
|
|
2475
|
+
readonly providerId: string;
|
|
2476
|
+
readonly setup?: Schema.Json;
|
|
2477
|
+
readonly tokens: {
|
|
2478
|
+
readonly accessToken: string;
|
|
2479
|
+
readonly expiresAt?: number;
|
|
2480
|
+
readonly expiresIn?: number;
|
|
2481
|
+
readonly raw: {
|
|
2482
|
+
readonly [x: string]: Schema.Json;
|
|
2483
|
+
};
|
|
2484
|
+
readonly refreshToken?: string;
|
|
2485
|
+
readonly scope?: string;
|
|
2486
|
+
readonly tokenType?: string;
|
|
2487
|
+
};
|
|
2488
|
+
} | {
|
|
2489
|
+
readonly _tag: "refresh";
|
|
2490
|
+
readonly authMethodId: string;
|
|
2491
|
+
readonly providerId: string;
|
|
2492
|
+
readonly setup?: Schema.Json;
|
|
2493
|
+
readonly material: Schema.Json;
|
|
2494
|
+
readonly minValidityMs: number;
|
|
2495
|
+
readonly now: number;
|
|
2496
|
+
readonly reason: "before-use" | "forced";
|
|
2497
|
+
} | {
|
|
2498
|
+
readonly _tag: "resolve";
|
|
2499
|
+
readonly authMethodId: string;
|
|
2500
|
+
readonly providerId: string;
|
|
2501
|
+
readonly setup?: Schema.Json;
|
|
2502
|
+
readonly material: Schema.Json;
|
|
2503
|
+
} | {
|
|
2504
|
+
readonly _tag: "test";
|
|
2505
|
+
readonly authMethodId: string;
|
|
2506
|
+
readonly providerId: string;
|
|
2507
|
+
readonly setup?: Schema.Json;
|
|
2508
|
+
readonly material: Schema.Json;
|
|
2509
|
+
} | {
|
|
2510
|
+
readonly _tag: "verify";
|
|
2511
|
+
readonly config: Schema.Json;
|
|
2512
|
+
readonly state?: Schema.Json;
|
|
2513
|
+
readonly triggerId: string;
|
|
2514
|
+
readonly webhookUrl: string;
|
|
2515
|
+
readonly request: {
|
|
2516
|
+
readonly body: Schema.Json;
|
|
2517
|
+
readonly headers?: {
|
|
2518
|
+
readonly [x: string]: string;
|
|
2519
|
+
};
|
|
2520
|
+
readonly method?: string;
|
|
2521
|
+
readonly query?: {
|
|
2522
|
+
readonly [x: string]: string | readonly string[];
|
|
2523
|
+
};
|
|
2524
|
+
readonly rawBody: Uint8Array<ArrayBufferLike>;
|
|
2525
|
+
readonly url?: string;
|
|
2526
|
+
};
|
|
2527
|
+
};
|
|
2528
|
+
}) => Effect.Effect<string, PluginExecutionError, never>;
|
|
2529
|
+
export declare const readBounded: <E, R>(input: Stream.Stream<Uint8Array<ArrayBufferLike>, E, R>, maximum?: number | undefined) => Effect.Effect<string, PluginExecutionError, R>;
|
|
2530
|
+
export declare const verifyResponse: <Response extends Output>(request: {
|
|
2531
|
+
readonly _tag: "auth";
|
|
2532
|
+
readonly identity: {
|
|
2533
|
+
readonly artifactDigest: string;
|
|
2534
|
+
readonly invocationId: string;
|
|
2535
|
+
readonly organizationId: string;
|
|
2536
|
+
readonly pluginKey: string;
|
|
2537
|
+
readonly pluginVersion: string;
|
|
2538
|
+
};
|
|
2539
|
+
readonly operation: {
|
|
2540
|
+
readonly _tag: "decodeSetup";
|
|
2541
|
+
readonly authMethodId: string;
|
|
2542
|
+
readonly providerId: string;
|
|
2543
|
+
readonly setup?: Schema.Json;
|
|
2544
|
+
} | {
|
|
2545
|
+
readonly _tag: "display";
|
|
2546
|
+
readonly authMethodId: string;
|
|
2547
|
+
readonly providerId: string;
|
|
2548
|
+
readonly setup?: Schema.Json;
|
|
2549
|
+
readonly material: Schema.Json;
|
|
2550
|
+
} | {
|
|
2551
|
+
readonly _tag: "oauthComplete";
|
|
2552
|
+
readonly authMethodId: string;
|
|
2553
|
+
readonly providerId: string;
|
|
2554
|
+
readonly setup?: Schema.Json;
|
|
2555
|
+
readonly continuation: {
|
|
2556
|
+
readonly expiresAt: Date;
|
|
2557
|
+
readonly pkceVerifier: string | null;
|
|
2558
|
+
readonly redirectUri: string;
|
|
2559
|
+
readonly state: string;
|
|
2560
|
+
};
|
|
2561
|
+
readonly query: {
|
|
2562
|
+
readonly [x: string]: string;
|
|
2563
|
+
};
|
|
2564
|
+
} | {
|
|
2565
|
+
readonly _tag: "oauthStart";
|
|
2566
|
+
readonly authMethodId: string;
|
|
2567
|
+
readonly providerId: string;
|
|
2568
|
+
readonly setup?: Schema.Json;
|
|
2569
|
+
readonly redirectUri: string;
|
|
2570
|
+
} | {
|
|
2571
|
+
readonly _tag: "prepare";
|
|
2572
|
+
readonly authMethodId: string;
|
|
2573
|
+
readonly providerId: string;
|
|
2574
|
+
readonly setup?: Schema.Json;
|
|
2575
|
+
readonly input: Schema.Json;
|
|
2576
|
+
} | {
|
|
2577
|
+
readonly _tag: "prepareOAuth2Tokens";
|
|
2578
|
+
readonly authMethodId: string;
|
|
2579
|
+
readonly providerId: string;
|
|
2580
|
+
readonly setup?: Schema.Json;
|
|
2581
|
+
readonly tokens: {
|
|
2582
|
+
readonly accessToken: string;
|
|
2583
|
+
readonly expiresAt?: number;
|
|
2584
|
+
readonly expiresIn?: number;
|
|
2585
|
+
readonly raw: {
|
|
2586
|
+
readonly [x: string]: Schema.Json;
|
|
2587
|
+
};
|
|
2588
|
+
readonly refreshToken?: string;
|
|
2589
|
+
readonly scope?: string;
|
|
2590
|
+
readonly tokenType?: string;
|
|
2591
|
+
};
|
|
2592
|
+
} | {
|
|
2593
|
+
readonly _tag: "refresh";
|
|
2594
|
+
readonly authMethodId: string;
|
|
2595
|
+
readonly providerId: string;
|
|
2596
|
+
readonly setup?: Schema.Json;
|
|
2597
|
+
readonly material: Schema.Json;
|
|
2598
|
+
readonly minValidityMs: number;
|
|
2599
|
+
readonly now: number;
|
|
2600
|
+
readonly reason: "before-use" | "forced";
|
|
2601
|
+
} | {
|
|
2602
|
+
readonly _tag: "resolve";
|
|
2603
|
+
readonly authMethodId: string;
|
|
2604
|
+
readonly providerId: string;
|
|
2605
|
+
readonly setup?: Schema.Json;
|
|
2606
|
+
readonly material: Schema.Json;
|
|
2607
|
+
} | {
|
|
2608
|
+
readonly _tag: "sandboxAccess";
|
|
2609
|
+
readonly authMethodId: string;
|
|
2610
|
+
readonly providerId: string;
|
|
2611
|
+
readonly setup?: Schema.Json;
|
|
2612
|
+
readonly material: Schema.Json;
|
|
2613
|
+
readonly request?: {
|
|
2614
|
+
readonly headers: {
|
|
2615
|
+
readonly [x: string]: string;
|
|
2616
|
+
};
|
|
2617
|
+
readonly method: "DELETE" | "GET" | "HEAD" | "OPTIONS" | "PATCH" | "POST" | "PUT" | "QUERY" | "TRACE";
|
|
2618
|
+
readonly url: string;
|
|
2619
|
+
};
|
|
2620
|
+
} | {
|
|
2621
|
+
readonly _tag: "test";
|
|
2622
|
+
readonly authMethodId: string;
|
|
2623
|
+
readonly providerId: string;
|
|
2624
|
+
readonly setup?: Schema.Json;
|
|
2625
|
+
readonly material: Schema.Json;
|
|
2626
|
+
};
|
|
2627
|
+
} | {
|
|
2628
|
+
readonly _tag: "channelSettings";
|
|
2629
|
+
readonly identity: {
|
|
2630
|
+
readonly artifactDigest: string;
|
|
2631
|
+
readonly invocationId: string;
|
|
2632
|
+
readonly organizationId: string;
|
|
2633
|
+
readonly pluginKey: string;
|
|
2634
|
+
readonly pluginVersion: string;
|
|
2635
|
+
};
|
|
2636
|
+
readonly operation: {
|
|
2637
|
+
readonly _tag: "decodeChannelSettings";
|
|
2638
|
+
readonly channelId: string;
|
|
2639
|
+
readonly field: "definitionSettings" | "deploymentSettings";
|
|
2640
|
+
readonly value: Schema.Json;
|
|
2641
|
+
};
|
|
2642
|
+
} | {
|
|
2643
|
+
readonly _tag: "extract";
|
|
2644
|
+
readonly identity: {
|
|
2645
|
+
readonly artifactDigest: string;
|
|
2646
|
+
readonly invocationId: string;
|
|
2647
|
+
readonly organizationId: string;
|
|
2648
|
+
readonly pluginKey: string;
|
|
2649
|
+
readonly pluginVersion: string;
|
|
2650
|
+
};
|
|
2651
|
+
} | {
|
|
2652
|
+
readonly connection?: {
|
|
2653
|
+
readonly connectionId: string;
|
|
2654
|
+
readonly material: Schema.Json;
|
|
2655
|
+
readonly methodId: string;
|
|
2656
|
+
readonly providerId: string;
|
|
2657
|
+
readonly setup?: Schema.Json;
|
|
2658
|
+
};
|
|
2659
|
+
readonly context: {
|
|
2660
|
+
readonly actor: {
|
|
2661
|
+
readonly kind: "user";
|
|
2662
|
+
readonly userId: string;
|
|
2663
|
+
} | {
|
|
2664
|
+
readonly kind: "system";
|
|
2665
|
+
readonly reason?: string;
|
|
2666
|
+
};
|
|
2667
|
+
readonly metadata?: {
|
|
2668
|
+
readonly [x: string]: Schema.Json;
|
|
2669
|
+
};
|
|
2670
|
+
readonly source: {
|
|
2671
|
+
readonly kind: string;
|
|
2672
|
+
readonly metadata?: {
|
|
2673
|
+
readonly [x: string]: Schema.Json;
|
|
2674
|
+
};
|
|
2675
|
+
readonly subjectId?: string;
|
|
2676
|
+
};
|
|
2677
|
+
readonly tenant: {
|
|
2678
|
+
readonly organizationId: string;
|
|
2679
|
+
readonly teamId: string;
|
|
2680
|
+
};
|
|
2681
|
+
};
|
|
2682
|
+
readonly files?: {
|
|
2683
|
+
readonly token: string;
|
|
2684
|
+
readonly url: string;
|
|
2685
|
+
};
|
|
2686
|
+
readonly identity: {
|
|
2687
|
+
readonly artifactDigest: string;
|
|
2688
|
+
readonly invocationId: string;
|
|
2689
|
+
readonly organizationId: string;
|
|
2690
|
+
readonly pluginKey: string;
|
|
2691
|
+
readonly pluginVersion: string;
|
|
2692
|
+
};
|
|
2693
|
+
readonly operation: {
|
|
2694
|
+
readonly _tag: "channelCheckAccess";
|
|
2695
|
+
readonly channelId: string;
|
|
2696
|
+
readonly definitionSettings: Schema.Json;
|
|
2697
|
+
readonly deploymentSettings: Schema.Json;
|
|
2698
|
+
readonly identity: {
|
|
2699
|
+
readonly conversation: {
|
|
2700
|
+
readonly conversationKey: string;
|
|
2701
|
+
readonly kind: "direct" | "group";
|
|
2702
|
+
readonly threadKey?: string;
|
|
2703
|
+
};
|
|
2704
|
+
readonly senderKey: string;
|
|
2705
|
+
};
|
|
2706
|
+
} | {
|
|
2707
|
+
readonly _tag: "channelExecute";
|
|
2708
|
+
readonly channelId: string;
|
|
2709
|
+
readonly definitionSettings: Schema.Json;
|
|
2710
|
+
readonly deploymentSettings: Schema.Json;
|
|
2711
|
+
readonly command: Schema.Json;
|
|
2712
|
+
} | {
|
|
2713
|
+
readonly _tag: "invoke";
|
|
2714
|
+
readonly actionId: string;
|
|
2715
|
+
readonly input: Schema.Json;
|
|
2716
|
+
} | {
|
|
2717
|
+
readonly _tag: "activate";
|
|
2718
|
+
readonly config: Schema.Json;
|
|
2719
|
+
readonly state?: Schema.Json;
|
|
2720
|
+
readonly triggerId: string;
|
|
2721
|
+
readonly webhookUrl: string;
|
|
2722
|
+
} | {
|
|
2723
|
+
readonly _tag: "deactivate";
|
|
2724
|
+
readonly config: Schema.Json;
|
|
2725
|
+
readonly state?: Schema.Json;
|
|
2726
|
+
readonly triggerId: string;
|
|
2727
|
+
readonly webhookUrl: string;
|
|
2728
|
+
} | {
|
|
2729
|
+
readonly _tag: "decodeSetup";
|
|
2730
|
+
readonly authMethodId: string;
|
|
2731
|
+
readonly providerId: string;
|
|
2732
|
+
readonly setup?: Schema.Json;
|
|
2733
|
+
} | {
|
|
2734
|
+
readonly _tag: "display";
|
|
2735
|
+
readonly authMethodId: string;
|
|
2736
|
+
readonly providerId: string;
|
|
2737
|
+
readonly setup?: Schema.Json;
|
|
2738
|
+
readonly material: Schema.Json;
|
|
2739
|
+
} | {
|
|
2740
|
+
readonly _tag: "parse";
|
|
2741
|
+
readonly config: Schema.Json;
|
|
2742
|
+
readonly state?: Schema.Json;
|
|
2743
|
+
readonly triggerId: string;
|
|
2744
|
+
readonly webhookUrl: string;
|
|
2745
|
+
readonly request: {
|
|
2746
|
+
readonly body: Schema.Json;
|
|
2747
|
+
readonly headers?: {
|
|
2748
|
+
readonly [x: string]: string;
|
|
2749
|
+
};
|
|
2750
|
+
readonly method?: string;
|
|
2751
|
+
readonly query?: {
|
|
2752
|
+
readonly [x: string]: string | readonly string[];
|
|
2753
|
+
};
|
|
2754
|
+
readonly rawBody: Uint8Array<ArrayBufferLike>;
|
|
2755
|
+
readonly url?: string;
|
|
2756
|
+
};
|
|
2757
|
+
} | {
|
|
2758
|
+
readonly _tag: "poll";
|
|
2759
|
+
readonly config: Schema.Json;
|
|
2760
|
+
readonly state?: Schema.Json;
|
|
2761
|
+
readonly triggerId: string;
|
|
2762
|
+
} | {
|
|
2763
|
+
readonly _tag: "prepare";
|
|
2764
|
+
readonly authMethodId: string;
|
|
2765
|
+
readonly providerId: string;
|
|
2766
|
+
readonly setup?: Schema.Json;
|
|
2767
|
+
readonly input: Schema.Json;
|
|
2768
|
+
} | {
|
|
2769
|
+
readonly _tag: "prepareOAuth2Tokens";
|
|
2770
|
+
readonly authMethodId: string;
|
|
2771
|
+
readonly providerId: string;
|
|
2772
|
+
readonly setup?: Schema.Json;
|
|
2773
|
+
readonly tokens: {
|
|
2774
|
+
readonly accessToken: string;
|
|
2775
|
+
readonly expiresAt?: number;
|
|
2776
|
+
readonly expiresIn?: number;
|
|
2777
|
+
readonly raw: {
|
|
2778
|
+
readonly [x: string]: Schema.Json;
|
|
2779
|
+
};
|
|
2780
|
+
readonly refreshToken?: string;
|
|
2781
|
+
readonly scope?: string;
|
|
2782
|
+
readonly tokenType?: string;
|
|
2783
|
+
};
|
|
2784
|
+
} | {
|
|
2785
|
+
readonly _tag: "refresh";
|
|
2786
|
+
readonly authMethodId: string;
|
|
2787
|
+
readonly providerId: string;
|
|
2788
|
+
readonly setup?: Schema.Json;
|
|
2789
|
+
readonly material: Schema.Json;
|
|
2790
|
+
readonly minValidityMs: number;
|
|
2791
|
+
readonly now: number;
|
|
2792
|
+
readonly reason: "before-use" | "forced";
|
|
2793
|
+
} | {
|
|
2794
|
+
readonly _tag: "resolve";
|
|
2795
|
+
readonly authMethodId: string;
|
|
2796
|
+
readonly providerId: string;
|
|
2797
|
+
readonly setup?: Schema.Json;
|
|
2798
|
+
readonly material: Schema.Json;
|
|
2799
|
+
} | {
|
|
2800
|
+
readonly _tag: "test";
|
|
2801
|
+
readonly authMethodId: string;
|
|
2802
|
+
readonly providerId: string;
|
|
2803
|
+
readonly setup?: Schema.Json;
|
|
2804
|
+
readonly material: Schema.Json;
|
|
2805
|
+
} | {
|
|
2806
|
+
readonly _tag: "verify";
|
|
2807
|
+
readonly config: Schema.Json;
|
|
2808
|
+
readonly state?: Schema.Json;
|
|
2809
|
+
readonly triggerId: string;
|
|
2810
|
+
readonly webhookUrl: string;
|
|
2811
|
+
readonly request: {
|
|
2812
|
+
readonly body: Schema.Json;
|
|
2813
|
+
readonly headers?: {
|
|
2814
|
+
readonly [x: string]: string;
|
|
2815
|
+
};
|
|
2816
|
+
readonly method?: string;
|
|
2817
|
+
readonly query?: {
|
|
2818
|
+
readonly [x: string]: string | readonly string[];
|
|
2819
|
+
};
|
|
2820
|
+
readonly rawBody: Uint8Array<ArrayBufferLike>;
|
|
2821
|
+
readonly url?: string;
|
|
2822
|
+
};
|
|
2823
|
+
};
|
|
2824
|
+
}, response: Response) => Effect.Effect<Response, PluginExecutionError, never>;
|
|
2825
|
+
/** Execute one request against the plugin built in this process; only the guest runner calls it in production. */
|
|
2826
|
+
export declare const execute: (request: {
|
|
2827
|
+
readonly _tag: "auth";
|
|
2828
|
+
readonly identity: {
|
|
2829
|
+
readonly artifactDigest: string;
|
|
2830
|
+
readonly invocationId: string;
|
|
2831
|
+
readonly organizationId: string;
|
|
2832
|
+
readonly pluginKey: string;
|
|
2833
|
+
readonly pluginVersion: string;
|
|
2834
|
+
};
|
|
2835
|
+
readonly operation: {
|
|
2836
|
+
readonly _tag: "decodeSetup";
|
|
2837
|
+
readonly authMethodId: string;
|
|
2838
|
+
readonly providerId: string;
|
|
2839
|
+
readonly setup?: Schema.Json;
|
|
2840
|
+
} | {
|
|
2841
|
+
readonly _tag: "display";
|
|
2842
|
+
readonly authMethodId: string;
|
|
2843
|
+
readonly providerId: string;
|
|
2844
|
+
readonly setup?: Schema.Json;
|
|
2845
|
+
readonly material: Schema.Json;
|
|
2846
|
+
} | {
|
|
2847
|
+
readonly _tag: "oauthComplete";
|
|
2848
|
+
readonly authMethodId: string;
|
|
2849
|
+
readonly providerId: string;
|
|
2850
|
+
readonly setup?: Schema.Json;
|
|
2851
|
+
readonly continuation: {
|
|
2852
|
+
readonly expiresAt: Date;
|
|
2853
|
+
readonly pkceVerifier: string | null;
|
|
2854
|
+
readonly redirectUri: string;
|
|
2855
|
+
readonly state: string;
|
|
2856
|
+
};
|
|
2857
|
+
readonly query: {
|
|
2858
|
+
readonly [x: string]: string;
|
|
2859
|
+
};
|
|
2860
|
+
} | {
|
|
2861
|
+
readonly _tag: "oauthStart";
|
|
2862
|
+
readonly authMethodId: string;
|
|
2863
|
+
readonly providerId: string;
|
|
2864
|
+
readonly setup?: Schema.Json;
|
|
2865
|
+
readonly redirectUri: string;
|
|
2866
|
+
} | {
|
|
2867
|
+
readonly _tag: "prepare";
|
|
2868
|
+
readonly authMethodId: string;
|
|
2869
|
+
readonly providerId: string;
|
|
2870
|
+
readonly setup?: Schema.Json;
|
|
2871
|
+
readonly input: Schema.Json;
|
|
2872
|
+
} | {
|
|
2873
|
+
readonly _tag: "prepareOAuth2Tokens";
|
|
2874
|
+
readonly authMethodId: string;
|
|
2875
|
+
readonly providerId: string;
|
|
2876
|
+
readonly setup?: Schema.Json;
|
|
2877
|
+
readonly tokens: {
|
|
2878
|
+
readonly accessToken: string;
|
|
2879
|
+
readonly expiresAt?: number;
|
|
2880
|
+
readonly expiresIn?: number;
|
|
2881
|
+
readonly raw: {
|
|
2882
|
+
readonly [x: string]: Schema.Json;
|
|
2883
|
+
};
|
|
2884
|
+
readonly refreshToken?: string;
|
|
2885
|
+
readonly scope?: string;
|
|
2886
|
+
readonly tokenType?: string;
|
|
2887
|
+
};
|
|
2888
|
+
} | {
|
|
2889
|
+
readonly _tag: "refresh";
|
|
2890
|
+
readonly authMethodId: string;
|
|
2891
|
+
readonly providerId: string;
|
|
2892
|
+
readonly setup?: Schema.Json;
|
|
2893
|
+
readonly material: Schema.Json;
|
|
2894
|
+
readonly minValidityMs: number;
|
|
2895
|
+
readonly now: number;
|
|
2896
|
+
readonly reason: "before-use" | "forced";
|
|
2897
|
+
} | {
|
|
2898
|
+
readonly _tag: "resolve";
|
|
2899
|
+
readonly authMethodId: string;
|
|
2900
|
+
readonly providerId: string;
|
|
2901
|
+
readonly setup?: Schema.Json;
|
|
2902
|
+
readonly material: Schema.Json;
|
|
2903
|
+
} | {
|
|
2904
|
+
readonly _tag: "sandboxAccess";
|
|
2905
|
+
readonly authMethodId: string;
|
|
2906
|
+
readonly providerId: string;
|
|
2907
|
+
readonly setup?: Schema.Json;
|
|
2908
|
+
readonly material: Schema.Json;
|
|
2909
|
+
readonly request?: {
|
|
2910
|
+
readonly headers: {
|
|
2911
|
+
readonly [x: string]: string;
|
|
2912
|
+
};
|
|
2913
|
+
readonly method: "DELETE" | "GET" | "HEAD" | "OPTIONS" | "PATCH" | "POST" | "PUT" | "QUERY" | "TRACE";
|
|
2914
|
+
readonly url: string;
|
|
2915
|
+
};
|
|
2916
|
+
} | {
|
|
2917
|
+
readonly _tag: "test";
|
|
2918
|
+
readonly authMethodId: string;
|
|
2919
|
+
readonly providerId: string;
|
|
2920
|
+
readonly setup?: Schema.Json;
|
|
2921
|
+
readonly material: Schema.Json;
|
|
2922
|
+
};
|
|
2923
|
+
} | {
|
|
2924
|
+
readonly _tag: "channelSettings";
|
|
2925
|
+
readonly identity: {
|
|
2926
|
+
readonly artifactDigest: string;
|
|
2927
|
+
readonly invocationId: string;
|
|
2928
|
+
readonly organizationId: string;
|
|
2929
|
+
readonly pluginKey: string;
|
|
2930
|
+
readonly pluginVersion: string;
|
|
2931
|
+
};
|
|
2932
|
+
readonly operation: {
|
|
2933
|
+
readonly _tag: "decodeChannelSettings";
|
|
2934
|
+
readonly channelId: string;
|
|
2935
|
+
readonly field: "definitionSettings" | "deploymentSettings";
|
|
2936
|
+
readonly value: Schema.Json;
|
|
2937
|
+
};
|
|
2938
|
+
} | {
|
|
2939
|
+
readonly connection?: {
|
|
2940
|
+
readonly connectionId: string;
|
|
2941
|
+
readonly material: Schema.Json;
|
|
2942
|
+
readonly methodId: string;
|
|
2943
|
+
readonly providerId: string;
|
|
2944
|
+
readonly setup?: Schema.Json;
|
|
2945
|
+
};
|
|
2946
|
+
readonly context: {
|
|
2947
|
+
readonly actor: {
|
|
2948
|
+
readonly kind: "user";
|
|
2949
|
+
readonly userId: string;
|
|
2950
|
+
} | {
|
|
2951
|
+
readonly kind: "system";
|
|
2952
|
+
readonly reason?: string;
|
|
2953
|
+
};
|
|
2954
|
+
readonly metadata?: {
|
|
2955
|
+
readonly [x: string]: Schema.Json;
|
|
2956
|
+
};
|
|
2957
|
+
readonly source: {
|
|
2958
|
+
readonly kind: string;
|
|
2959
|
+
readonly metadata?: {
|
|
2960
|
+
readonly [x: string]: Schema.Json;
|
|
2961
|
+
};
|
|
2962
|
+
readonly subjectId?: string;
|
|
2963
|
+
};
|
|
2964
|
+
readonly tenant: {
|
|
2965
|
+
readonly organizationId: string;
|
|
2966
|
+
readonly teamId: string;
|
|
2967
|
+
};
|
|
2968
|
+
};
|
|
2969
|
+
readonly files?: {
|
|
2970
|
+
readonly token: string;
|
|
2971
|
+
readonly url: string;
|
|
2972
|
+
};
|
|
2973
|
+
readonly identity: {
|
|
2974
|
+
readonly artifactDigest: string;
|
|
2975
|
+
readonly invocationId: string;
|
|
2976
|
+
readonly organizationId: string;
|
|
2977
|
+
readonly pluginKey: string;
|
|
2978
|
+
readonly pluginVersion: string;
|
|
2979
|
+
};
|
|
2980
|
+
readonly operation: {
|
|
2981
|
+
readonly _tag: "channelCheckAccess";
|
|
2982
|
+
readonly channelId: string;
|
|
2983
|
+
readonly definitionSettings: Schema.Json;
|
|
2984
|
+
readonly deploymentSettings: Schema.Json;
|
|
2985
|
+
readonly identity: {
|
|
2986
|
+
readonly conversation: {
|
|
2987
|
+
readonly conversationKey: string;
|
|
2988
|
+
readonly kind: "direct" | "group";
|
|
2989
|
+
readonly threadKey?: string;
|
|
2990
|
+
};
|
|
2991
|
+
readonly senderKey: string;
|
|
2992
|
+
};
|
|
2993
|
+
} | {
|
|
2994
|
+
readonly _tag: "channelExecute";
|
|
2995
|
+
readonly channelId: string;
|
|
2996
|
+
readonly definitionSettings: Schema.Json;
|
|
2997
|
+
readonly deploymentSettings: Schema.Json;
|
|
2998
|
+
readonly command: Schema.Json;
|
|
2999
|
+
} | {
|
|
3000
|
+
readonly _tag: "invoke";
|
|
3001
|
+
readonly actionId: string;
|
|
3002
|
+
readonly input: Schema.Json;
|
|
3003
|
+
} | {
|
|
3004
|
+
readonly _tag: "activate";
|
|
3005
|
+
readonly config: Schema.Json;
|
|
3006
|
+
readonly state?: Schema.Json;
|
|
3007
|
+
readonly triggerId: string;
|
|
3008
|
+
readonly webhookUrl: string;
|
|
3009
|
+
} | {
|
|
3010
|
+
readonly _tag: "deactivate";
|
|
3011
|
+
readonly config: Schema.Json;
|
|
3012
|
+
readonly state?: Schema.Json;
|
|
3013
|
+
readonly triggerId: string;
|
|
3014
|
+
readonly webhookUrl: string;
|
|
3015
|
+
} | {
|
|
3016
|
+
readonly _tag: "decodeSetup";
|
|
3017
|
+
readonly authMethodId: string;
|
|
3018
|
+
readonly providerId: string;
|
|
3019
|
+
readonly setup?: Schema.Json;
|
|
3020
|
+
} | {
|
|
3021
|
+
readonly _tag: "display";
|
|
3022
|
+
readonly authMethodId: string;
|
|
3023
|
+
readonly providerId: string;
|
|
3024
|
+
readonly setup?: Schema.Json;
|
|
3025
|
+
readonly material: Schema.Json;
|
|
3026
|
+
} | {
|
|
3027
|
+
readonly _tag: "parse";
|
|
3028
|
+
readonly config: Schema.Json;
|
|
3029
|
+
readonly state?: Schema.Json;
|
|
3030
|
+
readonly triggerId: string;
|
|
3031
|
+
readonly webhookUrl: string;
|
|
3032
|
+
readonly request: {
|
|
3033
|
+
readonly body: Schema.Json;
|
|
3034
|
+
readonly headers?: {
|
|
3035
|
+
readonly [x: string]: string;
|
|
3036
|
+
};
|
|
3037
|
+
readonly method?: string;
|
|
3038
|
+
readonly query?: {
|
|
3039
|
+
readonly [x: string]: string | readonly string[];
|
|
3040
|
+
};
|
|
3041
|
+
readonly rawBody: Uint8Array<ArrayBufferLike>;
|
|
3042
|
+
readonly url?: string;
|
|
3043
|
+
};
|
|
3044
|
+
} | {
|
|
3045
|
+
readonly _tag: "poll";
|
|
3046
|
+
readonly config: Schema.Json;
|
|
3047
|
+
readonly state?: Schema.Json;
|
|
3048
|
+
readonly triggerId: string;
|
|
3049
|
+
} | {
|
|
3050
|
+
readonly _tag: "prepare";
|
|
3051
|
+
readonly authMethodId: string;
|
|
3052
|
+
readonly providerId: string;
|
|
3053
|
+
readonly setup?: Schema.Json;
|
|
3054
|
+
readonly input: Schema.Json;
|
|
3055
|
+
} | {
|
|
3056
|
+
readonly _tag: "prepareOAuth2Tokens";
|
|
3057
|
+
readonly authMethodId: string;
|
|
3058
|
+
readonly providerId: string;
|
|
3059
|
+
readonly setup?: Schema.Json;
|
|
3060
|
+
readonly tokens: {
|
|
3061
|
+
readonly accessToken: string;
|
|
3062
|
+
readonly expiresAt?: number;
|
|
3063
|
+
readonly expiresIn?: number;
|
|
3064
|
+
readonly raw: {
|
|
3065
|
+
readonly [x: string]: Schema.Json;
|
|
3066
|
+
};
|
|
3067
|
+
readonly refreshToken?: string;
|
|
3068
|
+
readonly scope?: string;
|
|
3069
|
+
readonly tokenType?: string;
|
|
3070
|
+
};
|
|
3071
|
+
} | {
|
|
3072
|
+
readonly _tag: "refresh";
|
|
3073
|
+
readonly authMethodId: string;
|
|
3074
|
+
readonly providerId: string;
|
|
3075
|
+
readonly setup?: Schema.Json;
|
|
3076
|
+
readonly material: Schema.Json;
|
|
3077
|
+
readonly minValidityMs: number;
|
|
3078
|
+
readonly now: number;
|
|
3079
|
+
readonly reason: "before-use" | "forced";
|
|
3080
|
+
} | {
|
|
3081
|
+
readonly _tag: "resolve";
|
|
3082
|
+
readonly authMethodId: string;
|
|
3083
|
+
readonly providerId: string;
|
|
3084
|
+
readonly setup?: Schema.Json;
|
|
3085
|
+
readonly material: Schema.Json;
|
|
3086
|
+
} | {
|
|
3087
|
+
readonly _tag: "test";
|
|
3088
|
+
readonly authMethodId: string;
|
|
3089
|
+
readonly providerId: string;
|
|
3090
|
+
readonly setup?: Schema.Json;
|
|
3091
|
+
readonly material: Schema.Json;
|
|
3092
|
+
} | {
|
|
3093
|
+
readonly _tag: "verify";
|
|
3094
|
+
readonly config: Schema.Json;
|
|
3095
|
+
readonly state?: Schema.Json;
|
|
3096
|
+
readonly triggerId: string;
|
|
3097
|
+
readonly webhookUrl: string;
|
|
3098
|
+
readonly request: {
|
|
3099
|
+
readonly body: Schema.Json;
|
|
3100
|
+
readonly headers?: {
|
|
3101
|
+
readonly [x: string]: string;
|
|
3102
|
+
};
|
|
3103
|
+
readonly method?: string;
|
|
3104
|
+
readonly query?: {
|
|
3105
|
+
readonly [x: string]: string | readonly string[];
|
|
3106
|
+
};
|
|
3107
|
+
readonly rawBody: Uint8Array<ArrayBufferLike>;
|
|
3108
|
+
readonly url?: string;
|
|
3109
|
+
};
|
|
3110
|
+
};
|
|
3111
|
+
}) => Effect.Effect<{
|
|
3112
|
+
_tag: "failure";
|
|
3113
|
+
error: (ChannelError | {
|
|
3114
|
+
readonly category: "connection" | "handler" | "initialization" | "protocol" | "validation";
|
|
3115
|
+
readonly channel?: {
|
|
3116
|
+
readonly code: "handler_unavailable" | "invalid_auth" | "invalid_definition" | "invalid_input" | "invalid_result" | "not_found" | "provider_failure" | "unsupported_feature";
|
|
3117
|
+
readonly providerCode?: "rate_limited" | "rejected" | "unauthorized" | "unavailable" | "unknown_completion" | "window_closed";
|
|
3118
|
+
};
|
|
3119
|
+
readonly code: string;
|
|
3120
|
+
readonly fields?: readonly {
|
|
3121
|
+
readonly path: string;
|
|
3122
|
+
}[];
|
|
3123
|
+
readonly message: string;
|
|
3124
|
+
readonly retryAfterSeconds?: number;
|
|
3125
|
+
readonly retryable: boolean;
|
|
3126
|
+
readonly status?: number;
|
|
3127
|
+
} | AuthMethodExecutionError | InvokeError) & {
|
|
3128
|
+
readonly category: "connection" | "handler" | "initialization" | "protocol" | "validation";
|
|
3129
|
+
readonly channel?: {
|
|
3130
|
+
readonly code: "handler_unavailable" | "invalid_auth" | "invalid_definition" | "invalid_input" | "invalid_result" | "not_found" | "provider_failure" | "unsupported_feature";
|
|
3131
|
+
readonly providerCode?: "rate_limited" | "rejected" | "unauthorized" | "unavailable" | "unknown_completion" | "window_closed";
|
|
3132
|
+
};
|
|
3133
|
+
readonly code: string;
|
|
3134
|
+
readonly fields?: readonly {
|
|
3135
|
+
readonly path: string;
|
|
3136
|
+
}[];
|
|
3137
|
+
readonly message: string;
|
|
3138
|
+
readonly retryAfterSeconds?: number;
|
|
3139
|
+
readonly retryable: boolean;
|
|
3140
|
+
readonly status?: number;
|
|
3141
|
+
};
|
|
3142
|
+
identity: {
|
|
3143
|
+
readonly artifactDigest: string;
|
|
3144
|
+
readonly invocationId: string;
|
|
3145
|
+
readonly organizationId: string;
|
|
3146
|
+
readonly pluginKey: string;
|
|
3147
|
+
readonly pluginVersion: string;
|
|
3148
|
+
};
|
|
3149
|
+
} | {
|
|
3150
|
+
_tag: "failure";
|
|
3151
|
+
error: {
|
|
3152
|
+
category: "handler";
|
|
3153
|
+
code: string;
|
|
3154
|
+
message: string;
|
|
3155
|
+
retryable: false;
|
|
3156
|
+
};
|
|
3157
|
+
identity: {
|
|
3158
|
+
readonly artifactDigest: string;
|
|
3159
|
+
readonly invocationId: string;
|
|
3160
|
+
readonly organizationId: string;
|
|
3161
|
+
readonly pluginKey: string;
|
|
3162
|
+
readonly pluginVersion: string;
|
|
3163
|
+
};
|
|
3164
|
+
} | {
|
|
3165
|
+
_tag: "success";
|
|
3166
|
+
identity: {
|
|
3167
|
+
readonly artifactDigest: string;
|
|
3168
|
+
readonly invocationId: string;
|
|
3169
|
+
readonly organizationId: string;
|
|
3170
|
+
readonly pluginKey: string;
|
|
3171
|
+
readonly pluginVersion: string;
|
|
3172
|
+
};
|
|
3173
|
+
} | {
|
|
3174
|
+
readonly _tag: "success";
|
|
3175
|
+
readonly identity: {
|
|
3176
|
+
readonly artifactDigest: string;
|
|
3177
|
+
readonly invocationId: string;
|
|
3178
|
+
readonly organizationId: string;
|
|
3179
|
+
readonly pluginKey: string;
|
|
3180
|
+
readonly pluginVersion: string;
|
|
3181
|
+
};
|
|
3182
|
+
readonly value: Schema.Json;
|
|
3183
|
+
}, never, Service | Service$1>;
|
|
3184
|
+
//#endregion
|
|
3185
|
+
export { PluginRuntime_d_exports as PluginRuntime, PluginRuntime_d_exports };
|
|
3186
|
+
//# sourceMappingURL=PluginRuntime.d.ts.map
|