@herd-labs/sdk 0.3.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +17 -17
- package/dist/index.js +17 -17
- package/dist/src/config.d.ts +11 -11
- package/dist/src/config.js +9 -12
- package/dist/src/errors.d.ts +35 -44
- package/dist/src/errors.js +19 -16
- package/dist/src/live/ActionsServiceLive.d.ts +3 -3
- package/dist/src/live/ActionsServiceLive.js +14 -14
- package/dist/src/live/AdaptersServiceLive.d.ts +3 -3
- package/dist/src/live/AdaptersServiceLive.js +8 -8
- package/dist/src/live/AgentSafesServiceLive.d.ts +3 -3
- package/dist/src/live/AgentSafesServiceLive.js +5 -5
- package/dist/src/live/AgentWalletsServiceLive.d.ts +3 -3
- package/dist/src/live/AgentWalletsServiceLive.js +4 -4
- package/dist/src/live/AgentWorkflowsServiceLive.d.ts +3 -3
- package/dist/src/live/AgentWorkflowsServiceLive.js +14 -14
- package/dist/src/live/AuthServiceLive.d.ts +3 -3
- package/dist/src/live/AuthServiceLive.js +7 -7
- package/dist/src/live/BookmarksServiceLive.d.ts +3 -3
- package/dist/src/live/BookmarksServiceLive.js +20 -20
- package/dist/src/live/CodeBlocksServiceLive.d.ts +3 -3
- package/dist/src/live/CodeBlocksServiceLive.js +11 -11
- package/dist/src/live/CollectionsServiceLive.d.ts +3 -3
- package/dist/src/live/CollectionsServiceLive.js +6 -6
- package/dist/src/live/ContractsServiceLive.d.ts +3 -3
- package/dist/src/live/ContractsServiceLive.js +10 -10
- package/dist/src/live/DocsServiceLive.d.ts +3 -3
- package/dist/src/live/DocsServiceLive.js +4 -4
- package/dist/src/live/GroupsServiceLive.d.ts +3 -3
- package/dist/src/live/GroupsServiceLive.js +9 -9
- package/dist/src/live/HalServiceLive.d.ts +3 -3
- package/dist/src/live/HalServiceLive.js +12 -12
- package/dist/src/live/TransactionsServiceLive.d.ts +3 -3
- package/dist/src/live/TransactionsServiceLive.js +18 -18
- package/dist/src/live/WalletsServiceLive.d.ts +3 -3
- package/dist/src/live/WalletsServiceLive.js +18 -18
- package/dist/src/live/http.d.ts +6 -6
- package/dist/src/live/http.js +15 -15
- package/dist/src/schemas/actions.d.ts +179 -339
- package/dist/src/schemas/actions.js +80 -76
- package/dist/src/schemas/adapters.d.ts +7 -17
- package/dist/src/schemas/adapters.js +5 -5
- package/dist/src/schemas/agent-wallets.d.ts +98 -222
- package/dist/src/schemas/agent-wallets.js +52 -52
- package/dist/src/schemas/agent-workflows.d.ts +104 -104
- package/dist/src/schemas/agent-workflows.js +53 -49
- package/dist/src/schemas/auth.d.ts +35 -64
- package/dist/src/schemas/auth.js +16 -16
- package/dist/src/schemas/bookmarks.d.ts +98 -216
- package/dist/src/schemas/bookmarks.js +55 -51
- package/dist/src/schemas/codeblocks.d.ts +149 -308
- package/dist/src/schemas/codeblocks.js +72 -67
- package/dist/src/schemas/collections.d.ts +120 -232
- package/dist/src/schemas/collections.js +48 -44
- package/dist/src/schemas/common.d.ts +13 -29
- package/dist/src/schemas/common.js +8 -8
- package/dist/src/schemas/contracts.d.ts +256 -447
- package/dist/src/schemas/contracts.js +92 -103
- package/dist/src/schemas/docs.d.ts +12 -29
- package/dist/src/schemas/docs.js +9 -9
- package/dist/src/schemas/groups.d.ts +74 -74
- package/dist/src/schemas/groups.js +32 -32
- package/dist/src/schemas/hal.d.ts +109 -217
- package/dist/src/schemas/hal.js +44 -42
- package/dist/src/schemas/transactions.d.ts +648 -926
- package/dist/src/schemas/transactions.js +158 -162
- package/dist/src/schemas/wallets.d.ts +577 -731
- package/dist/src/schemas/wallets.js +206 -145
- package/dist/src/services/ActionsService.d.ts +3 -3
- package/dist/src/services/ActionsService.js +2 -2
- package/dist/src/services/AdaptersService.d.ts +1 -1
- package/dist/src/services/AdaptersService.js +2 -2
- package/dist/src/services/AgentSafesService.d.ts +5 -5
- package/dist/src/services/AgentSafesService.js +2 -2
- package/dist/src/services/AgentWalletsService.d.ts +3 -3
- package/dist/src/services/AgentWalletsService.js +2 -2
- package/dist/src/services/AgentWorkflowsService.d.ts +11 -11
- package/dist/src/services/AgentWorkflowsService.js +6 -2
- package/dist/src/services/AuthService.d.ts +5 -5
- package/dist/src/services/AuthService.js +2 -2
- package/dist/src/services/BookmarksService.d.ts +3 -3
- package/dist/src/services/BookmarksService.js +2 -2
- package/dist/src/services/CodeBlocksService.d.ts +1 -1
- package/dist/src/services/CodeBlocksService.js +2 -2
- package/dist/src/services/CollectionsService.d.ts +1 -1
- package/dist/src/services/CollectionsService.js +2 -2
- package/dist/src/services/ContractsService.d.ts +6 -6
- package/dist/src/services/ContractsService.js +2 -2
- package/dist/src/services/DocsService.d.ts +2 -2
- package/dist/src/services/DocsService.js +2 -2
- package/dist/src/services/GroupsService.d.ts +13 -13
- package/dist/src/services/GroupsService.js +4 -2
- package/dist/src/services/HalService.d.ts +1 -1
- package/dist/src/services/HalService.js +2 -2
- package/dist/src/services/TransactionsService.d.ts +5 -5
- package/dist/src/services/TransactionsService.js +2 -2
- package/dist/src/services/WalletsService.d.ts +5 -5
- package/dist/src/services/WalletsService.js +2 -2
- package/package.json +13 -18
|
@@ -1,317 +1,158 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
|
|
3
3
|
//#region src/schemas/codeblocks.d.ts
|
|
4
|
-
declare const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
readonly
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
readonly
|
|
30
|
-
|
|
31
|
-
readonly
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
intent: typeof Schema.String;
|
|
40
|
-
publishedAt: Schema.NullOr<typeof Schema.String>;
|
|
41
|
-
}, Schema.Struct.Encoded<{
|
|
42
|
-
id: typeof Schema.String;
|
|
43
|
-
name: typeof Schema.String;
|
|
44
|
-
intent: typeof Schema.String;
|
|
45
|
-
publishedAt: Schema.NullOr<typeof Schema.String>;
|
|
46
|
-
}>, never, {
|
|
47
|
-
readonly id: string;
|
|
48
|
-
} & {
|
|
49
|
-
readonly name: string;
|
|
50
|
-
} & {
|
|
51
|
-
readonly intent: string;
|
|
52
|
-
} & {
|
|
53
|
-
readonly publishedAt: string | null;
|
|
54
|
-
}, {}, {}>;
|
|
55
|
-
declare class CodeBlockVersion extends CodeBlockVersion_base {}
|
|
56
|
-
declare const CodeBlockDefinition_base: Schema.Class<CodeBlockDefinition, {
|
|
57
|
-
id: typeof Schema.String;
|
|
58
|
-
name: typeof Schema.String;
|
|
59
|
-
intent: typeof Schema.String;
|
|
60
|
-
latestCode: Schema.NullOr<typeof CodeBlockCode>;
|
|
61
|
-
allVersions: Schema.optional<Schema.Array$<typeof CodeBlockVersion>>;
|
|
62
|
-
actionId: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
63
|
-
}, Schema.Struct.Encoded<{
|
|
64
|
-
id: typeof Schema.String;
|
|
65
|
-
name: typeof Schema.String;
|
|
66
|
-
intent: typeof Schema.String;
|
|
67
|
-
latestCode: Schema.NullOr<typeof CodeBlockCode>;
|
|
68
|
-
allVersions: Schema.optional<Schema.Array$<typeof CodeBlockVersion>>;
|
|
69
|
-
actionId: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
70
|
-
}>, never, {
|
|
71
|
-
readonly id: string;
|
|
72
|
-
} & {
|
|
73
|
-
readonly name: string;
|
|
74
|
-
} & {
|
|
75
|
-
readonly intent: string;
|
|
76
|
-
} & {
|
|
77
|
-
readonly actionId?: string | null | undefined;
|
|
78
|
-
} & {
|
|
79
|
-
readonly latestCode: CodeBlockCode | null;
|
|
80
|
-
} & {
|
|
81
|
-
readonly allVersions?: readonly CodeBlockVersion[] | undefined;
|
|
82
|
-
}, {}, {}>;
|
|
83
|
-
declare class CodeBlockDefinition extends CodeBlockDefinition_base {}
|
|
84
|
-
declare const CodeBlocksSearchParams_base: Schema.Class<CodeBlocksSearchParams, {
|
|
85
|
-
scope: Schema.Literal<["user", "public"]>;
|
|
86
|
-
limit: typeof Schema.Number;
|
|
87
|
-
cursor: Schema.optional<typeof Schema.String>;
|
|
88
|
-
filters: Schema.optional<Schema.Struct<{
|
|
89
|
-
name: Schema.optional<typeof Schema.String>;
|
|
4
|
+
declare const CodeBlockCodeSchema: Schema.Struct<{
|
|
5
|
+
readonly arguments: Schema.optional<Schema.Unknown>;
|
|
6
|
+
readonly code: Schema.String;
|
|
7
|
+
readonly id: Schema.String;
|
|
8
|
+
readonly intent: Schema.String;
|
|
9
|
+
readonly name: Schema.String;
|
|
10
|
+
readonly publishedAt: Schema.NullOr<Schema.String>;
|
|
11
|
+
readonly valTownFileUrl: Schema.String;
|
|
12
|
+
}>;
|
|
13
|
+
type CodeBlockCode = typeof CodeBlockCodeSchema.Type;
|
|
14
|
+
declare const CodeBlockVersionSchema: Schema.Struct<{
|
|
15
|
+
readonly id: Schema.String;
|
|
16
|
+
readonly intent: Schema.String;
|
|
17
|
+
readonly name: Schema.String;
|
|
18
|
+
readonly publishedAt: Schema.NullOr<Schema.String>;
|
|
19
|
+
}>;
|
|
20
|
+
type CodeBlockVersion = typeof CodeBlockVersionSchema.Type;
|
|
21
|
+
declare const CodeBlockDefinitionSchema: Schema.Struct<{
|
|
22
|
+
readonly actionId: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
23
|
+
readonly allVersions: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
24
|
+
readonly id: Schema.String;
|
|
25
|
+
readonly intent: Schema.String;
|
|
26
|
+
readonly name: Schema.String;
|
|
27
|
+
readonly publishedAt: Schema.NullOr<Schema.String>;
|
|
28
|
+
}>>>;
|
|
29
|
+
readonly id: Schema.String;
|
|
30
|
+
readonly intent: Schema.String;
|
|
31
|
+
readonly latestCode: Schema.NullOr<Schema.Struct<{
|
|
32
|
+
readonly arguments: Schema.optional<Schema.Unknown>;
|
|
33
|
+
readonly code: Schema.String;
|
|
34
|
+
readonly id: Schema.String;
|
|
35
|
+
readonly intent: Schema.String;
|
|
36
|
+
readonly name: Schema.String;
|
|
37
|
+
readonly publishedAt: Schema.NullOr<Schema.String>;
|
|
38
|
+
readonly valTownFileUrl: Schema.String;
|
|
90
39
|
}>>;
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
40
|
+
readonly name: Schema.String;
|
|
41
|
+
}>;
|
|
42
|
+
type CodeBlockDefinition = typeof CodeBlockDefinitionSchema.Type;
|
|
43
|
+
declare const CodeBlocksSearchParamsSchema: Schema.Struct<{
|
|
44
|
+
readonly cursor: Schema.optional<Schema.String>;
|
|
45
|
+
readonly filters: Schema.optional<Schema.Struct<{
|
|
46
|
+
readonly name: Schema.optional<Schema.String>;
|
|
97
47
|
}>>;
|
|
98
|
-
|
|
99
|
-
readonly scope: "user"
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
readonly
|
|
104
|
-
readonly
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
id: typeof Schema.String;
|
|
124
|
-
name: typeof Schema.String;
|
|
125
|
-
intent: typeof Schema.String;
|
|
126
|
-
code: Schema.Struct<{
|
|
127
|
-
id: typeof Schema.String;
|
|
128
|
-
name: typeof Schema.String;
|
|
129
|
-
valTownFileUrl: typeof Schema.String;
|
|
130
|
-
}>;
|
|
131
|
-
}, Schema.Struct.Encoded<{
|
|
132
|
-
id: typeof Schema.String;
|
|
133
|
-
name: typeof Schema.String;
|
|
134
|
-
intent: typeof Schema.String;
|
|
135
|
-
code: Schema.Struct<{
|
|
136
|
-
id: typeof Schema.String;
|
|
137
|
-
name: typeof Schema.String;
|
|
138
|
-
valTownFileUrl: typeof Schema.String;
|
|
139
|
-
}>;
|
|
140
|
-
}>, never, {
|
|
141
|
-
readonly id: string;
|
|
142
|
-
} & {
|
|
143
|
-
readonly name: string;
|
|
144
|
-
} & {
|
|
145
|
-
readonly intent: string;
|
|
146
|
-
} & {
|
|
147
|
-
readonly code: {
|
|
148
|
-
readonly id: string;
|
|
149
|
-
readonly name: string;
|
|
150
|
-
readonly valTownFileUrl: string;
|
|
151
|
-
};
|
|
152
|
-
}, {}, {}>;
|
|
153
|
-
declare class CreateCodeBlockResponse extends CreateCodeBlockResponse_base {}
|
|
154
|
-
declare const PublishCodeBlockResponse_base: Schema.Class<PublishCodeBlockResponse, {
|
|
155
|
-
id: typeof Schema.String;
|
|
156
|
-
publishedAt: typeof Schema.String;
|
|
157
|
-
}, Schema.Struct.Encoded<{
|
|
158
|
-
id: typeof Schema.String;
|
|
159
|
-
publishedAt: typeof Schema.String;
|
|
160
|
-
}>, never, {
|
|
161
|
-
readonly id: string;
|
|
162
|
-
} & {
|
|
163
|
-
readonly publishedAt: string;
|
|
164
|
-
}, {}, {}>;
|
|
165
|
-
declare class PublishCodeBlockResponse extends PublishCodeBlockResponse_base {}
|
|
166
|
-
declare const CodeBlockLogEntry_base: Schema.Class<CodeBlockLogEntry, {
|
|
167
|
-
level: typeof Schema.String;
|
|
168
|
-
message: typeof Schema.String;
|
|
169
|
-
time: typeof Schema.String;
|
|
170
|
-
}, Schema.Struct.Encoded<{
|
|
171
|
-
level: typeof Schema.String;
|
|
172
|
-
message: typeof Schema.String;
|
|
173
|
-
time: typeof Schema.String;
|
|
174
|
-
}>, never, {
|
|
175
|
-
readonly message: string;
|
|
176
|
-
} & {
|
|
177
|
-
readonly level: string;
|
|
178
|
-
} & {
|
|
179
|
-
readonly time: string;
|
|
180
|
-
}, {}, {}>;
|
|
181
|
-
declare class CodeBlockLogEntry extends CodeBlockLogEntry_base {}
|
|
182
|
-
declare const CodeBlockExecuteResponse_base: Schema.Class<CodeBlockExecuteResponse, {
|
|
183
|
-
response: typeof Schema.Unknown;
|
|
184
|
-
error: Schema.optional<Schema.Struct<{
|
|
185
|
-
status: Schema.optional<typeof Schema.Number>;
|
|
186
|
-
message: typeof Schema.String;
|
|
187
|
-
body: Schema.optional<typeof Schema.Unknown>;
|
|
48
|
+
readonly limit: Schema.Number;
|
|
49
|
+
readonly scope: Schema.Literals<readonly ["user", "public"]>;
|
|
50
|
+
}>;
|
|
51
|
+
type CodeBlocksSearchParams = typeof CodeBlocksSearchParamsSchema.Type;
|
|
52
|
+
declare const CodeBlocksSearchResponseSchema: Schema.Struct<{
|
|
53
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
54
|
+
readonly actionId: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
55
|
+
readonly allVersions: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
56
|
+
readonly id: Schema.String;
|
|
57
|
+
readonly intent: Schema.String;
|
|
58
|
+
readonly name: Schema.String;
|
|
59
|
+
readonly publishedAt: Schema.NullOr<Schema.String>;
|
|
60
|
+
}>>>;
|
|
61
|
+
readonly id: Schema.String;
|
|
62
|
+
readonly intent: Schema.String;
|
|
63
|
+
readonly latestCode: Schema.NullOr<Schema.Struct<{
|
|
64
|
+
readonly arguments: Schema.optional<Schema.Unknown>;
|
|
65
|
+
readonly code: Schema.String;
|
|
66
|
+
readonly id: Schema.String;
|
|
67
|
+
readonly intent: Schema.String;
|
|
68
|
+
readonly name: Schema.String;
|
|
69
|
+
readonly publishedAt: Schema.NullOr<Schema.String>;
|
|
70
|
+
readonly valTownFileUrl: Schema.String;
|
|
71
|
+
}>>;
|
|
72
|
+
readonly name: Schema.String;
|
|
188
73
|
}>>;
|
|
189
|
-
|
|
190
|
-
|
|
74
|
+
readonly nextCursor: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
75
|
+
}>;
|
|
76
|
+
type CodeBlocksSearchResponse = typeof CodeBlocksSearchResponseSchema.Type;
|
|
77
|
+
declare const CreateCodeBlockResponseSchema: Schema.Struct<{
|
|
78
|
+
readonly code: Schema.Struct<{
|
|
79
|
+
readonly id: Schema.String;
|
|
80
|
+
readonly name: Schema.String;
|
|
81
|
+
readonly valTownFileUrl: Schema.String;
|
|
191
82
|
}>;
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
83
|
+
readonly id: Schema.String;
|
|
84
|
+
readonly intent: Schema.String;
|
|
85
|
+
readonly name: Schema.String;
|
|
86
|
+
}>;
|
|
87
|
+
type CreateCodeBlockResponse = typeof CreateCodeBlockResponseSchema.Type;
|
|
88
|
+
declare const PublishCodeBlockResponseSchema: Schema.Struct<{
|
|
89
|
+
readonly id: Schema.String;
|
|
90
|
+
readonly publishedAt: Schema.String;
|
|
91
|
+
}>;
|
|
92
|
+
type PublishCodeBlockResponse = typeof PublishCodeBlockResponseSchema.Type;
|
|
93
|
+
declare const CodeBlockLogEntrySchema: Schema.Struct<{
|
|
94
|
+
readonly level: Schema.String;
|
|
95
|
+
readonly message: Schema.String;
|
|
96
|
+
readonly time: Schema.String;
|
|
97
|
+
}>;
|
|
98
|
+
type CodeBlockLogEntry = typeof CodeBlockLogEntrySchema.Type;
|
|
99
|
+
declare const CodeBlockExecuteResponseSchema: Schema.Struct<{
|
|
100
|
+
readonly error: Schema.optional<Schema.Struct<{
|
|
101
|
+
readonly status: Schema.optional<Schema.Number>;
|
|
102
|
+
readonly message: Schema.String;
|
|
103
|
+
readonly body: Schema.optional<Schema.Unknown>;
|
|
198
104
|
}>>;
|
|
199
|
-
logs: Schema.
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
declare
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
code:
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
readonly name:
|
|
224
|
-
|
|
225
|
-
readonly
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
readonly
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
valTownFileUrl: typeof Schema.String;
|
|
252
|
-
publishedAt: Schema.NullOr<typeof Schema.String>;
|
|
253
|
-
}, Schema.Struct.Encoded<{
|
|
254
|
-
id: typeof Schema.String;
|
|
255
|
-
name: typeof Schema.String;
|
|
256
|
-
intent: typeof Schema.String;
|
|
257
|
-
code: typeof Schema.String;
|
|
258
|
-
valTownFileUrl: typeof Schema.String;
|
|
259
|
-
publishedAt: Schema.NullOr<typeof Schema.String>;
|
|
260
|
-
}>, never, {
|
|
261
|
-
readonly id: string;
|
|
262
|
-
} & {
|
|
263
|
-
readonly name: string;
|
|
264
|
-
} & {
|
|
265
|
-
readonly intent: string;
|
|
266
|
-
} & {
|
|
267
|
-
readonly publishedAt: string | null;
|
|
268
|
-
} & {
|
|
269
|
-
readonly code: string;
|
|
270
|
-
} & {
|
|
271
|
-
readonly valTownFileUrl: string;
|
|
272
|
-
}, {}, {}>;
|
|
273
|
-
declare class CreateCodeVersionResponse extends CreateCodeVersionResponse_base {}
|
|
274
|
-
declare const UpdateCodeBlockMetadataParams_base: Schema.Class<UpdateCodeBlockMetadataParams, {
|
|
275
|
-
name: Schema.optional<typeof Schema.String>;
|
|
276
|
-
intent: Schema.optional<typeof Schema.String>;
|
|
277
|
-
}, Schema.Struct.Encoded<{
|
|
278
|
-
name: Schema.optional<typeof Schema.String>;
|
|
279
|
-
intent: Schema.optional<typeof Schema.String>;
|
|
280
|
-
}>, never, {
|
|
281
|
-
readonly name?: string | undefined;
|
|
282
|
-
} & {
|
|
283
|
-
readonly intent?: string | undefined;
|
|
284
|
-
}, {}, {}>;
|
|
285
|
-
declare class UpdateCodeBlockMetadataParams extends UpdateCodeBlockMetadataParams_base {}
|
|
286
|
-
declare const UpdateCodeParams_base: Schema.Class<UpdateCodeParams, {
|
|
287
|
-
code: typeof Schema.String;
|
|
288
|
-
}, Schema.Struct.Encoded<{
|
|
289
|
-
code: typeof Schema.String;
|
|
290
|
-
}>, never, {
|
|
291
|
-
readonly code: string;
|
|
292
|
-
}, {}, {}>;
|
|
293
|
-
declare class UpdateCodeParams extends UpdateCodeParams_base {}
|
|
294
|
-
declare const PublishCodeParams_base: Schema.Class<PublishCodeParams, {
|
|
295
|
-
intent: Schema.optional<typeof Schema.String>;
|
|
296
|
-
}, Schema.Struct.Encoded<{
|
|
297
|
-
intent: Schema.optional<typeof Schema.String>;
|
|
298
|
-
}>, never, {
|
|
299
|
-
readonly intent?: string | undefined;
|
|
300
|
-
}, {}, {}>;
|
|
301
|
-
declare class PublishCodeParams extends PublishCodeParams_base {}
|
|
302
|
-
declare const ExecuteCodeBlockParams_base: Schema.Class<ExecuteCodeBlockParams, {
|
|
303
|
-
arguments: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
|
|
304
|
-
test: Schema.optional<typeof Schema.Boolean>;
|
|
305
|
-
}, Schema.Struct.Encoded<{
|
|
306
|
-
arguments: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
|
|
307
|
-
test: Schema.optional<typeof Schema.Boolean>;
|
|
308
|
-
}>, never, {
|
|
309
|
-
readonly arguments: {
|
|
310
|
-
readonly [x: string]: unknown;
|
|
311
|
-
};
|
|
312
|
-
} & {
|
|
313
|
-
readonly test?: boolean | undefined;
|
|
314
|
-
}, {}, {}>;
|
|
315
|
-
declare class ExecuteCodeBlockParams extends ExecuteCodeBlockParams_base {}
|
|
105
|
+
readonly logs: Schema.withDecodingDefaultType<Schema.$Array<Schema.Struct<{
|
|
106
|
+
readonly level: Schema.String;
|
|
107
|
+
readonly message: Schema.String;
|
|
108
|
+
readonly time: Schema.String;
|
|
109
|
+
}>>, never>;
|
|
110
|
+
readonly response: Schema.Unknown;
|
|
111
|
+
}>;
|
|
112
|
+
type CodeBlockExecuteResponse = typeof CodeBlockExecuteResponseSchema.Type;
|
|
113
|
+
declare const CreateCodeBlockParamsSchema: Schema.Struct<{
|
|
114
|
+
readonly code: Schema.String;
|
|
115
|
+
readonly intent: Schema.optional<Schema.String>;
|
|
116
|
+
readonly name: Schema.String;
|
|
117
|
+
}>;
|
|
118
|
+
type CreateCodeBlockParams = typeof CreateCodeBlockParamsSchema.Type;
|
|
119
|
+
declare const CreateCodeVersionParamsSchema: Schema.Struct<{
|
|
120
|
+
readonly code: Schema.String;
|
|
121
|
+
readonly intent: Schema.optional<Schema.String>;
|
|
122
|
+
readonly name: Schema.String;
|
|
123
|
+
}>;
|
|
124
|
+
type CreateCodeVersionParams = typeof CreateCodeVersionParamsSchema.Type;
|
|
125
|
+
declare const CreateCodeVersionResponseSchema: Schema.Struct<{
|
|
126
|
+
readonly code: Schema.String;
|
|
127
|
+
readonly id: Schema.String;
|
|
128
|
+
readonly intent: Schema.String;
|
|
129
|
+
readonly name: Schema.String;
|
|
130
|
+
readonly publishedAt: Schema.NullOr<Schema.String>;
|
|
131
|
+
readonly valTownFileUrl: Schema.String;
|
|
132
|
+
}>;
|
|
133
|
+
type CreateCodeVersionResponse = typeof CreateCodeVersionResponseSchema.Type;
|
|
134
|
+
declare const UpdateCodeBlockMetadataParamsSchema: Schema.Struct<{
|
|
135
|
+
readonly intent: Schema.optional<Schema.String>;
|
|
136
|
+
readonly name: Schema.optional<Schema.String>;
|
|
137
|
+
}>;
|
|
138
|
+
type UpdateCodeBlockMetadataParams = typeof UpdateCodeBlockMetadataParamsSchema.Type;
|
|
139
|
+
declare const UpdateCodeParamsSchema: Schema.Struct<{
|
|
140
|
+
readonly code: Schema.String;
|
|
141
|
+
}>;
|
|
142
|
+
type UpdateCodeParams = typeof UpdateCodeParamsSchema.Type;
|
|
143
|
+
declare const PublishCodeParamsSchema: Schema.Struct<{
|
|
144
|
+
readonly intent: Schema.optional<Schema.String>;
|
|
145
|
+
}>;
|
|
146
|
+
type PublishCodeParams = typeof PublishCodeParamsSchema.Type;
|
|
147
|
+
declare const ExecuteCodeBlockParamsSchema: Schema.Union<readonly [Schema.Struct<{
|
|
148
|
+
readonly test: Schema.withDecodingDefaultType<Schema.Literal<true>, never>;
|
|
149
|
+
readonly includeLogs: Schema.optional<Schema.Boolean>;
|
|
150
|
+
readonly arguments: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
151
|
+
}>, Schema.Struct<{
|
|
152
|
+
readonly test: Schema.Literal<false>;
|
|
153
|
+
readonly includeLogs: Schema.optional<Schema.Literal<false>>;
|
|
154
|
+
readonly arguments: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
155
|
+
}>]>;
|
|
156
|
+
type ExecuteCodeBlockParams = typeof ExecuteCodeBlockParamsSchema.Type;
|
|
316
157
|
//#endregion
|
|
317
|
-
export { CodeBlockCode, CodeBlockDefinition, CodeBlockExecuteResponse, CodeBlockLogEntry, CodeBlockVersion, CodeBlocksSearchParams, CodeBlocksSearchResponse, CreateCodeBlockParams, CreateCodeBlockResponse, CreateCodeVersionParams, CreateCodeVersionResponse, ExecuteCodeBlockParams, PublishCodeBlockResponse, PublishCodeParams, UpdateCodeBlockMetadataParams, UpdateCodeParams };
|
|
158
|
+
export { CodeBlockCode, CodeBlockCodeSchema, CodeBlockDefinition, CodeBlockDefinitionSchema, CodeBlockExecuteResponse, CodeBlockExecuteResponseSchema, CodeBlockLogEntry, CodeBlockLogEntrySchema, CodeBlockVersion, CodeBlockVersionSchema, CodeBlocksSearchParams, CodeBlocksSearchParamsSchema, CodeBlocksSearchResponse, CodeBlocksSearchResponseSchema, CreateCodeBlockParams, CreateCodeBlockParamsSchema, CreateCodeBlockResponse, CreateCodeBlockResponseSchema, CreateCodeVersionParams, CreateCodeVersionParamsSchema, CreateCodeVersionResponse, CreateCodeVersionResponseSchema, ExecuteCodeBlockParams, ExecuteCodeBlockParamsSchema, PublishCodeBlockResponse, PublishCodeBlockResponseSchema, PublishCodeParams, PublishCodeParamsSchema, UpdateCodeBlockMetadataParams, UpdateCodeBlockMetadataParamsSchema, UpdateCodeParams, UpdateCodeParamsSchema };
|
|
@@ -1,98 +1,103 @@
|
|
|
1
|
-
import { Schema } from "effect";
|
|
1
|
+
import { Effect, Schema } from "effect";
|
|
2
2
|
|
|
3
3
|
//#region src/schemas/codeblocks.ts
|
|
4
|
-
|
|
5
|
-
id: Schema.String,
|
|
6
|
-
name: Schema.String,
|
|
7
|
-
intent: Schema.String,
|
|
8
|
-
code: Schema.String,
|
|
4
|
+
const CodeBlockCodeSchema = Schema.Struct({
|
|
9
5
|
arguments: Schema.optional(Schema.Unknown),
|
|
10
|
-
|
|
11
|
-
publishedAt: Schema.NullOr(Schema.String)
|
|
12
|
-
}) {};
|
|
13
|
-
var CodeBlockVersion = class extends Schema.Class("CodeBlockVersion")({
|
|
6
|
+
code: Schema.String,
|
|
14
7
|
id: Schema.String,
|
|
8
|
+
intent: Schema.String,
|
|
15
9
|
name: Schema.String,
|
|
10
|
+
publishedAt: Schema.NullOr(Schema.String),
|
|
11
|
+
valTownFileUrl: Schema.String
|
|
12
|
+
});
|
|
13
|
+
const CodeBlockVersionSchema = Schema.Struct({
|
|
14
|
+
id: Schema.String,
|
|
16
15
|
intent: Schema.String,
|
|
16
|
+
name: Schema.String,
|
|
17
17
|
publishedAt: Schema.NullOr(Schema.String)
|
|
18
|
-
})
|
|
19
|
-
|
|
18
|
+
});
|
|
19
|
+
const CodeBlockDefinitionSchema = Schema.Struct({
|
|
20
|
+
actionId: Schema.optional(Schema.NullOr(Schema.String)),
|
|
21
|
+
allVersions: Schema.optional(Schema.Array(CodeBlockVersionSchema)),
|
|
20
22
|
id: Schema.String,
|
|
21
|
-
name: Schema.String,
|
|
22
23
|
intent: Schema.String,
|
|
23
|
-
latestCode: Schema.NullOr(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
var CodeBlocksSearchParams = class extends Schema.Class("CodeBlocksSearchParams")({
|
|
28
|
-
scope: Schema.Literal("user", "public"),
|
|
29
|
-
limit: Schema.Number,
|
|
24
|
+
latestCode: Schema.NullOr(CodeBlockCodeSchema),
|
|
25
|
+
name: Schema.String
|
|
26
|
+
});
|
|
27
|
+
const CodeBlocksSearchParamsSchema = Schema.Struct({
|
|
30
28
|
cursor: Schema.optional(Schema.String),
|
|
31
|
-
filters: Schema.optional(Schema.Struct({ name: Schema.optional(Schema.String) }))
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
filters: Schema.optional(Schema.Struct({ name: Schema.optional(Schema.String) })),
|
|
30
|
+
limit: Schema.Number,
|
|
31
|
+
scope: Schema.Literals(["user", "public"])
|
|
32
|
+
});
|
|
33
|
+
const CodeBlocksSearchResponseSchema = Schema.Struct({
|
|
34
|
+
items: Schema.Array(CodeBlockDefinitionSchema),
|
|
35
35
|
nextCursor: Schema.optional(Schema.NullOr(Schema.String))
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
id: Schema.String,
|
|
39
|
-
name: Schema.String,
|
|
40
|
-
intent: Schema.String,
|
|
36
|
+
});
|
|
37
|
+
const CreateCodeBlockResponseSchema = Schema.Struct({
|
|
41
38
|
code: Schema.Struct({
|
|
42
39
|
id: Schema.String,
|
|
43
40
|
name: Schema.String,
|
|
44
41
|
valTownFileUrl: Schema.String
|
|
45
|
-
})
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
}),
|
|
43
|
+
id: Schema.String,
|
|
44
|
+
intent: Schema.String,
|
|
45
|
+
name: Schema.String
|
|
46
|
+
});
|
|
47
|
+
const PublishCodeBlockResponseSchema = Schema.Struct({
|
|
48
48
|
id: Schema.String,
|
|
49
49
|
publishedAt: Schema.String
|
|
50
|
-
})
|
|
51
|
-
|
|
50
|
+
});
|
|
51
|
+
const CodeBlockLogEntrySchema = Schema.Struct({
|
|
52
52
|
level: Schema.String,
|
|
53
53
|
message: Schema.String,
|
|
54
54
|
time: Schema.String
|
|
55
|
-
})
|
|
56
|
-
|
|
57
|
-
response: Schema.Unknown,
|
|
55
|
+
});
|
|
56
|
+
const CodeBlockExecuteResponseSchema = Schema.Struct({
|
|
58
57
|
error: Schema.optional(Schema.Struct({
|
|
59
58
|
status: Schema.optional(Schema.Number),
|
|
60
59
|
message: Schema.String,
|
|
61
60
|
body: Schema.optional(Schema.Unknown)
|
|
62
61
|
})),
|
|
63
|
-
logs: Schema.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
62
|
+
logs: Schema.Array(CodeBlockLogEntrySchema).pipe(Schema.withDecodingDefaultType(Effect.succeed([]))),
|
|
63
|
+
response: Schema.Unknown
|
|
64
|
+
});
|
|
65
|
+
const CreateCodeBlockParamsSchema = Schema.Struct({
|
|
67
66
|
code: Schema.String,
|
|
68
|
-
intent: Schema.optional(Schema.String)
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
intent: Schema.optional(Schema.String),
|
|
68
|
+
name: Schema.String
|
|
69
|
+
});
|
|
70
|
+
const CreateCodeVersionParamsSchema = Schema.Struct({
|
|
71
|
+
code: Schema.String,
|
|
72
|
+
intent: Schema.optional(Schema.String),
|
|
73
|
+
name: Schema.String
|
|
74
|
+
});
|
|
75
|
+
const CreateCodeVersionResponseSchema = Schema.Struct({
|
|
72
76
|
code: Schema.String,
|
|
73
|
-
intent: Schema.optional(Schema.String)
|
|
74
|
-
}) {};
|
|
75
|
-
var CreateCodeVersionResponse = class extends Schema.Class("CreateCodeVersionResponse")({
|
|
76
77
|
id: Schema.String,
|
|
77
|
-
name: Schema.String,
|
|
78
78
|
intent: Schema.String,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
})
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
})
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
79
|
+
name: Schema.String,
|
|
80
|
+
publishedAt: Schema.NullOr(Schema.String),
|
|
81
|
+
valTownFileUrl: Schema.String
|
|
82
|
+
});
|
|
83
|
+
const UpdateCodeBlockMetadataParamsSchema = Schema.Struct({
|
|
84
|
+
intent: Schema.optional(Schema.String),
|
|
85
|
+
name: Schema.optional(Schema.String)
|
|
86
|
+
});
|
|
87
|
+
const UpdateCodeParamsSchema = Schema.Struct({ code: Schema.String });
|
|
88
|
+
const PublishCodeParamsSchema = Schema.Struct({ intent: Schema.optional(Schema.String) });
|
|
89
|
+
const executionArgumentsFields = { arguments: Schema.Record(Schema.String, Schema.Unknown) };
|
|
90
|
+
const TestExecution = Schema.Struct({
|
|
91
|
+
...executionArgumentsFields,
|
|
92
|
+
test: Schema.Literal(true).pipe(Schema.withDecodingDefaultType(Effect.succeed(true))),
|
|
93
|
+
includeLogs: Schema.optional(Schema.Boolean)
|
|
94
|
+
});
|
|
95
|
+
const ProductionExecution = Schema.Struct({
|
|
96
|
+
...executionArgumentsFields,
|
|
97
|
+
test: Schema.Literal(false),
|
|
98
|
+
includeLogs: Schema.optional(Schema.Literal(false))
|
|
99
|
+
});
|
|
100
|
+
const ExecuteCodeBlockParamsSchema = Schema.Union([TestExecution, ProductionExecution]);
|
|
96
101
|
|
|
97
102
|
//#endregion
|
|
98
|
-
export {
|
|
103
|
+
export { CodeBlockCodeSchema, CodeBlockDefinitionSchema, CodeBlockExecuteResponseSchema, CodeBlockLogEntrySchema, CodeBlockVersionSchema, CodeBlocksSearchParamsSchema, CodeBlocksSearchResponseSchema, CreateCodeBlockParamsSchema, CreateCodeBlockResponseSchema, CreateCodeVersionParamsSchema, CreateCodeVersionResponseSchema, ExecuteCodeBlockParamsSchema, PublishCodeBlockResponseSchema, PublishCodeParamsSchema, UpdateCodeBlockMetadataParamsSchema, UpdateCodeParamsSchema };
|