@herd-labs/sdk 0.4.0 → 0.5.1

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.
Files changed (85) hide show
  1. package/dist/index.d.ts +20 -17
  2. package/dist/index.js +20 -17
  3. package/dist/src/config.d.ts +4 -4
  4. package/dist/src/config.js +2 -2
  5. package/dist/src/errors.d.ts +6 -0
  6. package/dist/src/errors.js +7 -1
  7. package/dist/src/live/ActionsServiceLive.d.ts +2 -2
  8. package/dist/src/live/ActionsServiceLive.js +7 -7
  9. package/dist/src/live/AdaptersServiceLive.d.ts +3 -3
  10. package/dist/src/live/AdaptersServiceLive.js +4 -4
  11. package/dist/src/live/AgentSafesServiceLive.d.ts +3 -3
  12. package/dist/src/live/AgentSafesServiceLive.js +4 -4
  13. package/dist/src/live/AgentWalletsServiceLive.d.ts +3 -3
  14. package/dist/src/live/AgentWalletsServiceLive.js +3 -3
  15. package/dist/src/live/AgentWorkflowsServiceLive.d.ts +3 -3
  16. package/dist/src/live/AgentWorkflowsServiceLive.js +8 -8
  17. package/dist/src/live/AuthServiceLive.d.ts +3 -3
  18. package/dist/src/live/AuthServiceLive.js +5 -5
  19. package/dist/src/live/BookmarksServiceLive.d.ts +2 -2
  20. package/dist/src/live/BookmarksServiceLive.js +6 -6
  21. package/dist/src/live/CodeBlocksServiceLive.d.ts +3 -3
  22. package/dist/src/live/CodeBlocksServiceLive.js +7 -7
  23. package/dist/src/live/CollectionsServiceLive.d.ts +3 -3
  24. package/dist/src/live/CollectionsServiceLive.js +4 -4
  25. package/dist/src/live/ContractsServiceLive.d.ts +3 -3
  26. package/dist/src/live/ContractsServiceLive.js +6 -6
  27. package/dist/src/live/DocsServiceLive.d.ts +3 -3
  28. package/dist/src/live/DocsServiceLive.js +3 -3
  29. package/dist/src/live/DoubleClickServiceLive.d.ts +9 -0
  30. package/dist/src/live/DoubleClickServiceLive.js +113 -0
  31. package/dist/src/live/GroupsServiceLive.d.ts +3 -3
  32. package/dist/src/live/GroupsServiceLive.js +7 -7
  33. package/dist/src/live/HalServiceLive.d.ts +3 -3
  34. package/dist/src/live/HalServiceLive.js +3 -3
  35. package/dist/src/live/TransactionsServiceLive.d.ts +3 -3
  36. package/dist/src/live/TransactionsServiceLive.js +4 -4
  37. package/dist/src/live/WalletsServiceLive.d.ts +3 -3
  38. package/dist/src/live/WalletsServiceLive.js +5 -5
  39. package/dist/src/live/http.d.ts +2 -2
  40. package/dist/src/live/http.js +2 -2
  41. package/dist/src/schemas/actions.d.ts +127 -59
  42. package/dist/src/schemas/actions.js +42 -42
  43. package/dist/src/schemas/adapters.d.ts +4 -4
  44. package/dist/src/schemas/adapters.js +3 -3
  45. package/dist/src/schemas/agent-wallets.d.ts +57 -37
  46. package/dist/src/schemas/agent-wallets.js +35 -35
  47. package/dist/src/schemas/agent-workflows.d.ts +35 -35
  48. package/dist/src/schemas/agent-workflows.js +19 -19
  49. package/dist/src/schemas/auth.d.ts +19 -19
  50. package/dist/src/schemas/auth.js +10 -10
  51. package/dist/src/schemas/bookmarks.d.ts +58 -36
  52. package/dist/src/schemas/bookmarks.js +34 -34
  53. package/dist/src/schemas/codeblocks.d.ts +89 -52
  54. package/dist/src/schemas/codeblocks.js +34 -34
  55. package/dist/src/schemas/collections.d.ts +76 -32
  56. package/dist/src/schemas/collections.js +23 -23
  57. package/dist/src/schemas/common.d.ts +8 -8
  58. package/dist/src/schemas/common.js +5 -5
  59. package/dist/src/schemas/contracts.d.ts +176 -61
  60. package/dist/src/schemas/contracts.js +47 -47
  61. package/dist/src/schemas/docs.d.ts +7 -7
  62. package/dist/src/schemas/docs.js +5 -5
  63. package/dist/src/schemas/doubleclick.d.ts +186 -0
  64. package/dist/src/schemas/doubleclick.js +22 -0
  65. package/dist/src/schemas/groups.d.ts +27 -27
  66. package/dist/src/schemas/groups.js +16 -16
  67. package/dist/src/schemas/hal.d.ts +64 -18
  68. package/dist/src/schemas/hal.js +18 -18
  69. package/dist/src/schemas/transactions.d.ts +264 -56
  70. package/dist/src/schemas/transactions.js +50 -50
  71. package/dist/src/schemas/wallets.d.ts +434 -84
  72. package/dist/src/schemas/wallets.js +114 -69
  73. package/dist/src/services/ActionsService.d.ts +2 -2
  74. package/dist/src/services/AgentSafesService.d.ts +4 -4
  75. package/dist/src/services/AgentWalletsService.d.ts +2 -2
  76. package/dist/src/services/AgentWorkflowsService.d.ts +8 -8
  77. package/dist/src/services/AuthService.d.ts +3 -3
  78. package/dist/src/services/BookmarksService.d.ts +2 -2
  79. package/dist/src/services/ContractsService.d.ts +5 -5
  80. package/dist/src/services/DoubleClickService.d.ts +63 -0
  81. package/dist/src/services/DoubleClickService.js +7 -0
  82. package/dist/src/services/GroupsService.d.ts +11 -11
  83. package/dist/src/services/TransactionsService.d.ts +4 -4
  84. package/dist/src/services/WalletsService.d.ts +4 -4
  85. package/package.json +3 -3
@@ -1,13 +1,13 @@
1
- import { Blockchain, EvmAddress } from "./common.js";
1
+ import { BlockchainSchema, EvmAddressSchema } from "./common.js";
2
2
  import { Schema } from "effect";
3
3
 
4
4
  //#region src/schemas/bookmarks.ts
5
- const BookmarkObjectType = Schema.Literals([
5
+ const BookmarkObjectTypeSchema = Schema.Literals([
6
6
  "contract",
7
7
  "transaction",
8
8
  "wallet"
9
9
  ]);
10
- var ContractBookmark = class extends Schema.Class("ContractBookmark")({
10
+ const ContractBookmarkSchema = Schema.Struct({
11
11
  blockchain: Schema.String,
12
12
  contractAddress: Schema.String,
13
13
  contractName: Schema.NullOr(Schema.String),
@@ -16,61 +16,61 @@ var ContractBookmark = class extends Schema.Class("ContractBookmark")({
16
16
  label: Schema.NullOr(Schema.String),
17
17
  updatedAt: Schema.String,
18
18
  userLabel: Schema.NullOr(Schema.String)
19
- }) {};
20
- var TransactionBookmark = class extends Schema.Class("TransactionBookmark")({
19
+ });
20
+ const TransactionBookmarkSchema = Schema.Struct({
21
21
  blockchain: Schema.String,
22
22
  createdAt: Schema.String,
23
23
  id: Schema.String,
24
24
  transactionHash: Schema.String,
25
25
  updatedAt: Schema.String,
26
26
  userLabel: Schema.NullOr(Schema.String)
27
- }) {};
28
- var WalletBookmark = class extends Schema.Class("WalletBookmark")({
27
+ });
28
+ const WalletBookmarkSchema = Schema.Struct({
29
29
  createdAt: Schema.String,
30
30
  id: Schema.String,
31
31
  updatedAt: Schema.String,
32
32
  userLabel: Schema.NullOr(Schema.String),
33
33
  walletAddress: Schema.String
34
- }) {};
35
- var BookmarksList = class extends Schema.Class("BookmarksList")({
36
- contracts: Schema.Array(ContractBookmark),
37
- transactions: Schema.Array(TransactionBookmark),
38
- wallets: Schema.Array(WalletBookmark)
39
- }) {};
40
- var BookmarkResponse = class extends Schema.Class("BookmarkResponse")({
34
+ });
35
+ const BookmarksListSchema = Schema.Struct({
36
+ contracts: Schema.Array(ContractBookmarkSchema),
37
+ transactions: Schema.Array(TransactionBookmarkSchema),
38
+ wallets: Schema.Array(WalletBookmarkSchema)
39
+ });
40
+ const BookmarkResponseSchema = Schema.Struct({
41
41
  bookmark: Schema.Struct({
42
42
  id: Schema.optional(Schema.String),
43
43
  userLabel: Schema.optional(Schema.NullOr(Schema.String))
44
44
  }),
45
45
  objectType: Schema.String
46
- }) {};
47
- var AddContractBookmarkParams = class extends Schema.Class("AddContractBookmarkParams")({
48
- address: EvmAddress,
49
- blockchain: Blockchain,
46
+ });
47
+ const AddContractBookmarkParamsSchema = Schema.Struct({
48
+ address: EvmAddressSchema,
49
+ blockchain: BlockchainSchema,
50
50
  label: Schema.optional(Schema.String)
51
- }) {};
52
- var AddTransactionBookmarkParams = class extends Schema.Class("AddTransactionBookmarkParams")({
53
- blockchain: Blockchain,
51
+ });
52
+ const AddTransactionBookmarkParamsSchema = Schema.Struct({
53
+ blockchain: BlockchainSchema,
54
54
  label: Schema.optional(Schema.String),
55
55
  txHash: Schema.String
56
- }) {};
57
- var AddWalletBookmarkParams = class extends Schema.Class("AddWalletBookmarkParams")({
58
- address: EvmAddress,
56
+ });
57
+ const AddWalletBookmarkParamsSchema = Schema.Struct({
58
+ address: EvmAddressSchema,
59
59
  label: Schema.optional(Schema.String)
60
- }) {};
61
- var UpdateBookmarkLabelParams = class extends Schema.Class("UpdateBookmarkLabelParams")({
60
+ });
61
+ const UpdateBookmarkLabelParamsSchema = Schema.Struct({
62
62
  address: Schema.optional(Schema.String),
63
- blockchain: Schema.optional(Blockchain),
63
+ blockchain: Schema.optional(BlockchainSchema),
64
64
  label: Schema.NullOr(Schema.String),
65
- objectType: BookmarkObjectType,
65
+ objectType: BookmarkObjectTypeSchema,
66
66
  txHash: Schema.optional(Schema.String)
67
- }) {};
68
- var DeleteBookmarkParams = class extends Schema.Class("DeleteBookmarkParams")({
67
+ });
68
+ const DeleteBookmarkParamsSchema = Schema.Struct({
69
69
  address: Schema.optional(Schema.String),
70
- blockchain: Schema.optional(Blockchain),
71
- objectType: BookmarkObjectType,
70
+ blockchain: Schema.optional(BlockchainSchema),
71
+ objectType: BookmarkObjectTypeSchema,
72
72
  txHash: Schema.optional(Schema.String)
73
- }) {};
73
+ });
74
74
 
75
75
  //#endregion
76
- export { AddContractBookmarkParams, AddTransactionBookmarkParams, AddWalletBookmarkParams, BookmarkObjectType, BookmarkResponse, BookmarksList, ContractBookmark, DeleteBookmarkParams, TransactionBookmark, UpdateBookmarkLabelParams, WalletBookmark };
76
+ export { AddContractBookmarkParamsSchema, AddTransactionBookmarkParamsSchema, AddWalletBookmarkParamsSchema, BookmarkObjectTypeSchema, BookmarkResponseSchema, BookmarksListSchema, ContractBookmarkSchema, DeleteBookmarkParamsSchema, TransactionBookmarkSchema, UpdateBookmarkLabelParamsSchema, WalletBookmarkSchema };
@@ -1,7 +1,7 @@
1
1
  import { Schema } from "effect";
2
2
 
3
3
  //#region src/schemas/codeblocks.d.ts
4
- declare const CodeBlockCode_base: Schema.Class<CodeBlockCode, Schema.Struct<{
4
+ declare const CodeBlockCodeSchema: Schema.Struct<{
5
5
  readonly arguments: Schema.optional<Schema.Unknown>;
6
6
  readonly code: Schema.String;
7
7
  readonly id: Schema.String;
@@ -9,39 +9,72 @@ declare const CodeBlockCode_base: Schema.Class<CodeBlockCode, Schema.Struct<{
9
9
  readonly name: Schema.String;
10
10
  readonly publishedAt: Schema.NullOr<Schema.String>;
11
11
  readonly valTownFileUrl: Schema.String;
12
- }>, {}>;
13
- declare class CodeBlockCode extends CodeBlockCode_base {}
14
- declare const CodeBlockVersion_base: Schema.Class<CodeBlockVersion, Schema.Struct<{
12
+ }>;
13
+ type CodeBlockCode = typeof CodeBlockCodeSchema.Type;
14
+ declare const CodeBlockVersionSchema: Schema.Struct<{
15
15
  readonly id: Schema.String;
16
16
  readonly intent: Schema.String;
17
17
  readonly name: Schema.String;
18
18
  readonly publishedAt: Schema.NullOr<Schema.String>;
19
- }>, {}>;
20
- declare class CodeBlockVersion extends CodeBlockVersion_base {}
21
- declare const CodeBlockDefinition_base: Schema.Class<CodeBlockDefinition, Schema.Struct<{
19
+ }>;
20
+ type CodeBlockVersion = typeof CodeBlockVersionSchema.Type;
21
+ declare const CodeBlockDefinitionSchema: Schema.Struct<{
22
22
  readonly actionId: Schema.optional<Schema.NullOr<Schema.String>>;
23
- readonly allVersions: Schema.optional<Schema.$Array<typeof CodeBlockVersion>>;
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
+ }>>>;
24
29
  readonly id: Schema.String;
25
30
  readonly intent: Schema.String;
26
- readonly latestCode: Schema.NullOr<typeof CodeBlockCode>;
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;
39
+ }>>;
27
40
  readonly name: Schema.String;
28
- }>, {}>;
29
- declare class CodeBlockDefinition extends CodeBlockDefinition_base {}
30
- declare const CodeBlocksSearchParams_base: Schema.Class<CodeBlocksSearchParams, Schema.Struct<{
41
+ }>;
42
+ type CodeBlockDefinition = typeof CodeBlockDefinitionSchema.Type;
43
+ declare const CodeBlocksSearchParamsSchema: Schema.Struct<{
31
44
  readonly cursor: Schema.optional<Schema.String>;
32
45
  readonly filters: Schema.optional<Schema.Struct<{
33
46
  readonly name: Schema.optional<Schema.String>;
34
47
  }>>;
35
48
  readonly limit: Schema.Number;
36
49
  readonly scope: Schema.Literals<readonly ["user", "public"]>;
37
- }>, {}>;
38
- declare class CodeBlocksSearchParams extends CodeBlocksSearchParams_base {}
39
- declare const CodeBlocksSearchResponse_base: Schema.Class<CodeBlocksSearchResponse, Schema.Struct<{
40
- readonly items: Schema.$Array<typeof CodeBlockDefinition>;
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;
73
+ }>>;
41
74
  readonly nextCursor: Schema.optional<Schema.NullOr<Schema.String>>;
42
- }>, {}>;
43
- declare class CodeBlocksSearchResponse extends CodeBlocksSearchResponse_base {}
44
- declare const CreateCodeBlockResponse_base: Schema.Class<CreateCodeBlockResponse, Schema.Struct<{
75
+ }>;
76
+ type CodeBlocksSearchResponse = typeof CodeBlocksSearchResponseSchema.Type;
77
+ declare const CreateCodeBlockResponseSchema: Schema.Struct<{
45
78
  readonly code: Schema.Struct<{
46
79
  readonly id: Schema.String;
47
80
  readonly name: Schema.String;
@@ -50,64 +83,68 @@ declare const CreateCodeBlockResponse_base: Schema.Class<CreateCodeBlockResponse
50
83
  readonly id: Schema.String;
51
84
  readonly intent: Schema.String;
52
85
  readonly name: Schema.String;
53
- }>, {}>;
54
- declare class CreateCodeBlockResponse extends CreateCodeBlockResponse_base {}
55
- declare const PublishCodeBlockResponse_base: Schema.Class<PublishCodeBlockResponse, Schema.Struct<{
86
+ }>;
87
+ type CreateCodeBlockResponse = typeof CreateCodeBlockResponseSchema.Type;
88
+ declare const PublishCodeBlockResponseSchema: Schema.Struct<{
56
89
  readonly id: Schema.String;
57
90
  readonly publishedAt: Schema.String;
58
- }>, {}>;
59
- declare class PublishCodeBlockResponse extends PublishCodeBlockResponse_base {}
60
- declare const CodeBlockLogEntry_base: Schema.Class<CodeBlockLogEntry, Schema.Struct<{
91
+ }>;
92
+ type PublishCodeBlockResponse = typeof PublishCodeBlockResponseSchema.Type;
93
+ declare const CodeBlockLogEntrySchema: Schema.Struct<{
61
94
  readonly level: Schema.String;
62
95
  readonly message: Schema.String;
63
96
  readonly time: Schema.String;
64
- }>, {}>;
65
- declare class CodeBlockLogEntry extends CodeBlockLogEntry_base {}
66
- declare const CodeBlockExecuteResponse_base: Schema.Class<CodeBlockExecuteResponse, Schema.Struct<{
97
+ }>;
98
+ type CodeBlockLogEntry = typeof CodeBlockLogEntrySchema.Type;
99
+ declare const CodeBlockExecuteResponseSchema: Schema.Struct<{
67
100
  readonly error: Schema.optional<Schema.Struct<{
68
101
  readonly status: Schema.optional<Schema.Number>;
69
102
  readonly message: Schema.String;
70
103
  readonly body: Schema.optional<Schema.Unknown>;
71
104
  }>>;
72
- readonly logs: Schema.withDecodingDefaultType<Schema.$Array<typeof CodeBlockLogEntry>, never>;
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>;
73
110
  readonly response: Schema.Unknown;
74
- }>, {}>;
75
- declare class CodeBlockExecuteResponse extends CodeBlockExecuteResponse_base {}
76
- declare const CreateCodeBlockParams_base: Schema.Class<CreateCodeBlockParams, Schema.Struct<{
111
+ }>;
112
+ type CodeBlockExecuteResponse = typeof CodeBlockExecuteResponseSchema.Type;
113
+ declare const CreateCodeBlockParamsSchema: Schema.Struct<{
77
114
  readonly code: Schema.String;
78
115
  readonly intent: Schema.optional<Schema.String>;
79
116
  readonly name: Schema.String;
80
- }>, {}>;
81
- declare class CreateCodeBlockParams extends CreateCodeBlockParams_base {}
82
- declare const CreateCodeVersionParams_base: Schema.Class<CreateCodeVersionParams, Schema.Struct<{
117
+ }>;
118
+ type CreateCodeBlockParams = typeof CreateCodeBlockParamsSchema.Type;
119
+ declare const CreateCodeVersionParamsSchema: Schema.Struct<{
83
120
  readonly code: Schema.String;
84
121
  readonly intent: Schema.optional<Schema.String>;
85
122
  readonly name: Schema.String;
86
- }>, {}>;
87
- declare class CreateCodeVersionParams extends CreateCodeVersionParams_base {}
88
- declare const CreateCodeVersionResponse_base: Schema.Class<CreateCodeVersionResponse, Schema.Struct<{
123
+ }>;
124
+ type CreateCodeVersionParams = typeof CreateCodeVersionParamsSchema.Type;
125
+ declare const CreateCodeVersionResponseSchema: Schema.Struct<{
89
126
  readonly code: Schema.String;
90
127
  readonly id: Schema.String;
91
128
  readonly intent: Schema.String;
92
129
  readonly name: Schema.String;
93
130
  readonly publishedAt: Schema.NullOr<Schema.String>;
94
131
  readonly valTownFileUrl: Schema.String;
95
- }>, {}>;
96
- declare class CreateCodeVersionResponse extends CreateCodeVersionResponse_base {}
97
- declare const UpdateCodeBlockMetadataParams_base: Schema.Class<UpdateCodeBlockMetadataParams, Schema.Struct<{
132
+ }>;
133
+ type CreateCodeVersionResponse = typeof CreateCodeVersionResponseSchema.Type;
134
+ declare const UpdateCodeBlockMetadataParamsSchema: Schema.Struct<{
98
135
  readonly intent: Schema.optional<Schema.String>;
99
136
  readonly name: Schema.optional<Schema.String>;
100
- }>, {}>;
101
- declare class UpdateCodeBlockMetadataParams extends UpdateCodeBlockMetadataParams_base {}
102
- declare const UpdateCodeParams_base: Schema.Class<UpdateCodeParams, Schema.Struct<{
137
+ }>;
138
+ type UpdateCodeBlockMetadataParams = typeof UpdateCodeBlockMetadataParamsSchema.Type;
139
+ declare const UpdateCodeParamsSchema: Schema.Struct<{
103
140
  readonly code: Schema.String;
104
- }>, {}>;
105
- declare class UpdateCodeParams extends UpdateCodeParams_base {}
106
- declare const PublishCodeParams_base: Schema.Class<PublishCodeParams, Schema.Struct<{
141
+ }>;
142
+ type UpdateCodeParams = typeof UpdateCodeParamsSchema.Type;
143
+ declare const PublishCodeParamsSchema: Schema.Struct<{
107
144
  readonly intent: Schema.optional<Schema.String>;
108
- }>, {}>;
109
- declare class PublishCodeParams extends PublishCodeParams_base {}
110
- declare const ExecuteCodeBlockParams: Schema.Union<readonly [Schema.Struct<{
145
+ }>;
146
+ type PublishCodeParams = typeof PublishCodeParamsSchema.Type;
147
+ declare const ExecuteCodeBlockParamsSchema: Schema.Union<readonly [Schema.Struct<{
111
148
  readonly test: Schema.withDecodingDefaultType<Schema.Literal<true>, never>;
112
149
  readonly includeLogs: Schema.optional<Schema.Boolean>;
113
150
  readonly arguments: Schema.$Record<Schema.String, Schema.Unknown>;
@@ -116,6 +153,6 @@ declare const ExecuteCodeBlockParams: Schema.Union<readonly [Schema.Struct<{
116
153
  readonly includeLogs: Schema.optional<Schema.Literal<false>>;
117
154
  readonly arguments: Schema.$Record<Schema.String, Schema.Unknown>;
118
155
  }>]>;
119
- type ExecuteCodeBlockParams = typeof ExecuteCodeBlockParams.Type;
156
+ type ExecuteCodeBlockParams = typeof ExecuteCodeBlockParamsSchema.Type;
120
157
  //#endregion
121
- 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,7 +1,7 @@
1
1
  import { Effect, Schema } from "effect";
2
2
 
3
3
  //#region src/schemas/codeblocks.ts
4
- var CodeBlockCode = class extends Schema.Class("CodeBlockCode")({
4
+ const CodeBlockCodeSchema = Schema.Struct({
5
5
  arguments: Schema.optional(Schema.Unknown),
6
6
  code: Schema.String,
7
7
  id: Schema.String,
@@ -9,32 +9,32 @@ var CodeBlockCode = class extends Schema.Class("CodeBlockCode")({
9
9
  name: Schema.String,
10
10
  publishedAt: Schema.NullOr(Schema.String),
11
11
  valTownFileUrl: Schema.String
12
- }) {};
13
- var CodeBlockVersion = class extends Schema.Class("CodeBlockVersion")({
12
+ });
13
+ const CodeBlockVersionSchema = Schema.Struct({
14
14
  id: Schema.String,
15
15
  intent: Schema.String,
16
16
  name: Schema.String,
17
17
  publishedAt: Schema.NullOr(Schema.String)
18
- }) {};
19
- var CodeBlockDefinition = class extends Schema.Class("CodeBlockDefinition")({
18
+ });
19
+ const CodeBlockDefinitionSchema = Schema.Struct({
20
20
  actionId: Schema.optional(Schema.NullOr(Schema.String)),
21
- allVersions: Schema.optional(Schema.Array(CodeBlockVersion)),
21
+ allVersions: Schema.optional(Schema.Array(CodeBlockVersionSchema)),
22
22
  id: Schema.String,
23
23
  intent: Schema.String,
24
- latestCode: Schema.NullOr(CodeBlockCode),
24
+ latestCode: Schema.NullOr(CodeBlockCodeSchema),
25
25
  name: Schema.String
26
- }) {};
27
- var CodeBlocksSearchParams = class extends Schema.Class("CodeBlocksSearchParams")({
26
+ });
27
+ const CodeBlocksSearchParamsSchema = Schema.Struct({
28
28
  cursor: Schema.optional(Schema.String),
29
29
  filters: Schema.optional(Schema.Struct({ name: Schema.optional(Schema.String) })),
30
30
  limit: Schema.Number,
31
31
  scope: Schema.Literals(["user", "public"])
32
- }) {};
33
- var CodeBlocksSearchResponse = class extends Schema.Class("CodeBlocksSearchResponse")({
34
- items: Schema.Array(CodeBlockDefinition),
32
+ });
33
+ const CodeBlocksSearchResponseSchema = Schema.Struct({
34
+ items: Schema.Array(CodeBlockDefinitionSchema),
35
35
  nextCursor: Schema.optional(Schema.NullOr(Schema.String))
36
- }) {};
37
- var CreateCodeBlockResponse = class extends Schema.Class("CreateCodeBlockResponse")({
36
+ });
37
+ const CreateCodeBlockResponseSchema = Schema.Struct({
38
38
  code: Schema.Struct({
39
39
  id: Schema.String,
40
40
  name: Schema.String,
@@ -43,49 +43,49 @@ var CreateCodeBlockResponse = class extends Schema.Class("CreateCodeBlockRespons
43
43
  id: Schema.String,
44
44
  intent: Schema.String,
45
45
  name: Schema.String
46
- }) {};
47
- var PublishCodeBlockResponse = class extends Schema.Class("PublishCodeBlockResponse")({
46
+ });
47
+ const PublishCodeBlockResponseSchema = Schema.Struct({
48
48
  id: Schema.String,
49
49
  publishedAt: Schema.String
50
- }) {};
51
- var CodeBlockLogEntry = class extends Schema.Class("CodeBlockLogEntry")({
50
+ });
51
+ const CodeBlockLogEntrySchema = Schema.Struct({
52
52
  level: Schema.String,
53
53
  message: Schema.String,
54
54
  time: Schema.String
55
- }) {};
56
- var CodeBlockExecuteResponse = class extends Schema.Class("CodeBlockExecuteResponse")({
55
+ });
56
+ const CodeBlockExecuteResponseSchema = Schema.Struct({
57
57
  error: Schema.optional(Schema.Struct({
58
58
  status: Schema.optional(Schema.Number),
59
59
  message: Schema.String,
60
60
  body: Schema.optional(Schema.Unknown)
61
61
  })),
62
- logs: Schema.Array(CodeBlockLogEntry).pipe(Schema.withDecodingDefaultType(Effect.succeed([]))),
62
+ logs: Schema.Array(CodeBlockLogEntrySchema).pipe(Schema.withDecodingDefaultType(Effect.succeed([]))),
63
63
  response: Schema.Unknown
64
- }) {};
65
- var CreateCodeBlockParams = class extends Schema.Class("CreateCodeBlockParams")({
64
+ });
65
+ const CreateCodeBlockParamsSchema = Schema.Struct({
66
66
  code: Schema.String,
67
67
  intent: Schema.optional(Schema.String),
68
68
  name: Schema.String
69
- }) {};
70
- var CreateCodeVersionParams = class extends Schema.Class("CreateCodeVersionParams")({
69
+ });
70
+ const CreateCodeVersionParamsSchema = Schema.Struct({
71
71
  code: Schema.String,
72
72
  intent: Schema.optional(Schema.String),
73
73
  name: Schema.String
74
- }) {};
75
- var CreateCodeVersionResponse = class extends Schema.Class("CreateCodeVersionResponse")({
74
+ });
75
+ const CreateCodeVersionResponseSchema = Schema.Struct({
76
76
  code: Schema.String,
77
77
  id: Schema.String,
78
78
  intent: Schema.String,
79
79
  name: Schema.String,
80
80
  publishedAt: Schema.NullOr(Schema.String),
81
81
  valTownFileUrl: Schema.String
82
- }) {};
83
- var UpdateCodeBlockMetadataParams = class extends Schema.Class("UpdateCodeBlockMetadataParams")({
82
+ });
83
+ const UpdateCodeBlockMetadataParamsSchema = Schema.Struct({
84
84
  intent: Schema.optional(Schema.String),
85
85
  name: Schema.optional(Schema.String)
86
- }) {};
87
- var UpdateCodeParams = class extends Schema.Class("UpdateCodeParams")({ code: Schema.String }) {};
88
- var PublishCodeParams = class extends Schema.Class("PublishCodeParams")({ intent: Schema.optional(Schema.String) }) {};
86
+ });
87
+ const UpdateCodeParamsSchema = Schema.Struct({ code: Schema.String });
88
+ const PublishCodeParamsSchema = Schema.Struct({ intent: Schema.optional(Schema.String) });
89
89
  const executionArgumentsFields = { arguments: Schema.Record(Schema.String, Schema.Unknown) };
90
90
  const TestExecution = Schema.Struct({
91
91
  ...executionArgumentsFields,
@@ -97,7 +97,7 @@ const ProductionExecution = Schema.Struct({
97
97
  test: Schema.Literal(false),
98
98
  includeLogs: Schema.optional(Schema.Literal(false))
99
99
  });
100
- const ExecuteCodeBlockParams = Schema.Union([TestExecution, ProductionExecution]);
100
+ const ExecuteCodeBlockParamsSchema = Schema.Union([TestExecution, ProductionExecution]);
101
101
 
102
102
  //#endregion
103
- export { CodeBlockCode, CodeBlockDefinition, CodeBlockExecuteResponse, CodeBlockLogEntry, CodeBlockVersion, CodeBlocksSearchParams, CodeBlocksSearchResponse, CreateCodeBlockParams, CreateCodeBlockResponse, CreateCodeVersionParams, CreateCodeVersionResponse, ExecuteCodeBlockParams, PublishCodeBlockResponse, PublishCodeParams, UpdateCodeBlockMetadataParams, UpdateCodeParams };
103
+ export { CodeBlockCodeSchema, CodeBlockDefinitionSchema, CodeBlockExecuteResponseSchema, CodeBlockLogEntrySchema, CodeBlockVersionSchema, CodeBlocksSearchParamsSchema, CodeBlocksSearchResponseSchema, CreateCodeBlockParamsSchema, CreateCodeBlockResponseSchema, CreateCodeVersionParamsSchema, CreateCodeVersionResponseSchema, ExecuteCodeBlockParamsSchema, PublishCodeBlockResponseSchema, PublishCodeParamsSchema, UpdateCodeBlockMetadataParamsSchema, UpdateCodeParamsSchema };
@@ -1,48 +1,92 @@
1
1
  import { Schema } from "effect";
2
2
 
3
3
  //#region src/schemas/collections.d.ts
4
- declare const CollectionSpecItem_base: Schema.Class<CollectionSpecItem, Schema.Struct<{
4
+ declare const CollectionSpecItemSchema: Schema.Struct<{
5
5
  readonly expressionRef: Schema.String;
6
6
  readonly id: Schema.String;
7
7
  readonly type: Schema.Literals<readonly ["action", "adapter"]>;
8
- }>, {}>;
9
- declare class CollectionSpecItem extends CollectionSpecItem_base {}
10
- declare const CollectionSpec_base: Schema.Class<CollectionSpec, Schema.Struct<{
11
- readonly items: Schema.$Array<typeof CollectionSpecItem>;
8
+ }>;
9
+ type CollectionSpecItem = typeof CollectionSpecItemSchema.Type;
10
+ declare const CollectionSpecSchema: Schema.Struct<{
11
+ readonly items: Schema.$Array<Schema.Struct<{
12
+ readonly expressionRef: Schema.String;
13
+ readonly id: Schema.String;
14
+ readonly type: Schema.Literals<readonly ["action", "adapter"]>;
15
+ }>>;
12
16
  readonly version: Schema.String;
13
- }>, {}>;
14
- declare class CollectionSpec extends CollectionSpec_base {}
15
- declare const CollectionVersion_base: Schema.Class<CollectionVersion, Schema.Struct<{
17
+ }>;
18
+ type CollectionSpec = typeof CollectionSpecSchema.Type;
19
+ declare const CollectionVersionSchema: Schema.Struct<{
16
20
  readonly expressionImports: Schema.$Array<Schema.String>;
17
21
  readonly herdVerifiedAt: Schema.NullOr<Schema.String>;
18
22
  readonly id: Schema.String;
19
23
  readonly name: Schema.String;
20
24
  readonly protocols: Schema.$Array<Schema.String>;
21
- readonly spec: typeof CollectionSpec;
22
- }>, {}>;
23
- declare class CollectionVersion extends CollectionVersion_base {}
24
- declare const Collection_base: Schema.Class<Collection, Schema.Struct<{
25
+ readonly spec: Schema.Struct<{
26
+ readonly items: Schema.$Array<Schema.Struct<{
27
+ readonly expressionRef: Schema.String;
28
+ readonly id: Schema.String;
29
+ readonly type: Schema.Literals<readonly ["action", "adapter"]>;
30
+ }>>;
31
+ readonly version: Schema.String;
32
+ }>;
33
+ }>;
34
+ type CollectionVersion = typeof CollectionVersionSchema.Type;
35
+ declare const CollectionSchema: Schema.Struct<{
25
36
  readonly description: Schema.String;
26
37
  readonly id: Schema.String;
27
- readonly latestVersion: Schema.NullOr<typeof CollectionVersion>;
38
+ readonly latestVersion: Schema.NullOr<Schema.Struct<{
39
+ readonly expressionImports: Schema.$Array<Schema.String>;
40
+ readonly herdVerifiedAt: Schema.NullOr<Schema.String>;
41
+ readonly id: Schema.String;
42
+ readonly name: Schema.String;
43
+ readonly protocols: Schema.$Array<Schema.String>;
44
+ readonly spec: Schema.Struct<{
45
+ readonly items: Schema.$Array<Schema.Struct<{
46
+ readonly expressionRef: Schema.String;
47
+ readonly id: Schema.String;
48
+ readonly type: Schema.Literals<readonly ["action", "adapter"]>;
49
+ }>>;
50
+ readonly version: Schema.String;
51
+ }>;
52
+ }>>;
28
53
  readonly name: Schema.String;
29
- }>, {}>;
30
- declare class Collection extends Collection_base {}
31
- declare const CollectionsSearchParams_base: Schema.Class<CollectionsSearchParams, Schema.Struct<{
54
+ }>;
55
+ type Collection = typeof CollectionSchema.Type;
56
+ declare const CollectionsSearchParamsSchema: Schema.Struct<{
32
57
  readonly filters: Schema.optional<Schema.Struct<{
33
58
  readonly name: Schema.optional<Schema.String>;
34
59
  }>>;
35
60
  readonly limit: Schema.Number;
36
61
  readonly offset: Schema.Number;
37
62
  readonly scope: Schema.optional<Schema.$Array<Schema.Literals<readonly ["yours", "all", "verified"]>>>;
38
- }>, {}>;
39
- declare class CollectionsSearchParams extends CollectionsSearchParams_base {}
40
- declare const CollectionsSearchResponse_base: Schema.Class<CollectionsSearchResponse, Schema.Struct<{
41
- readonly items: Schema.$Array<typeof Collection>;
63
+ }>;
64
+ type CollectionsSearchParams = typeof CollectionsSearchParamsSchema.Type;
65
+ declare const CollectionsSearchResponseSchema: Schema.Struct<{
66
+ readonly items: Schema.$Array<Schema.Struct<{
67
+ readonly description: Schema.String;
68
+ readonly id: Schema.String;
69
+ readonly latestVersion: Schema.NullOr<Schema.Struct<{
70
+ readonly expressionImports: Schema.$Array<Schema.String>;
71
+ readonly herdVerifiedAt: Schema.NullOr<Schema.String>;
72
+ readonly id: Schema.String;
73
+ readonly name: Schema.String;
74
+ readonly protocols: Schema.$Array<Schema.String>;
75
+ readonly spec: Schema.Struct<{
76
+ readonly items: Schema.$Array<Schema.Struct<{
77
+ readonly expressionRef: Schema.String;
78
+ readonly id: Schema.String;
79
+ readonly type: Schema.Literals<readonly ["action", "adapter"]>;
80
+ }>>;
81
+ readonly version: Schema.String;
82
+ }>;
83
+ }>>;
84
+ readonly name: Schema.String;
85
+ }>>;
42
86
  readonly total: Schema.Number;
43
- }>, {}>;
44
- declare class CollectionsSearchResponse extends CollectionsSearchResponse_base {}
45
- declare const CreateCollectionParams_base: Schema.Class<CreateCollectionParams, Schema.Struct<{
87
+ }>;
88
+ type CollectionsSearchResponse = typeof CollectionsSearchResponseSchema.Type;
89
+ declare const CreateCollectionParamsSchema: Schema.Struct<{
46
90
  readonly description: Schema.optional<Schema.String>;
47
91
  readonly expressionImports: Schema.$Array<Schema.String>;
48
92
  readonly name: Schema.String;
@@ -55,9 +99,9 @@ declare const CreateCollectionParams_base: Schema.Class<CreateCollectionParams,
55
99
  readonly expressionRef: Schema.String;
56
100
  }>>;
57
101
  }>;
58
- }>, {}>;
59
- declare class CreateCollectionParams extends CreateCollectionParams_base {}
60
- declare const CreateCollectionResponse_base: Schema.Class<CreateCollectionResponse, Schema.Struct<{
102
+ }>;
103
+ type CreateCollectionParams = typeof CreateCollectionParamsSchema.Type;
104
+ declare const CreateCollectionResponseSchema: Schema.Struct<{
61
105
  readonly collection: Schema.Struct<{
62
106
  readonly description: Schema.String;
63
107
  readonly id: Schema.String;
@@ -68,9 +112,9 @@ declare const CreateCollectionResponse_base: Schema.Class<CreateCollectionRespon
68
112
  readonly name: Schema.String;
69
113
  readonly protocols: Schema.optional<Schema.$Array<Schema.String>>;
70
114
  }>;
71
- }>, {}>;
72
- declare class CreateCollectionResponse extends CreateCollectionResponse_base {}
73
- declare const UpdateCollectionParams_base: Schema.Class<UpdateCollectionParams, Schema.Struct<{
115
+ }>;
116
+ type CreateCollectionResponse = typeof CreateCollectionResponseSchema.Type;
117
+ declare const UpdateCollectionParamsSchema: Schema.Struct<{
74
118
  readonly description: Schema.optional<Schema.String>;
75
119
  readonly expressionImports: Schema.optional<Schema.$Array<Schema.String>>;
76
120
  readonly name: Schema.optional<Schema.String>;
@@ -83,7 +127,7 @@ declare const UpdateCollectionParams_base: Schema.Class<UpdateCollectionParams,
83
127
  readonly expressionRef: Schema.String;
84
128
  }>>;
85
129
  }>>;
86
- }>, {}>;
87
- declare class UpdateCollectionParams extends UpdateCollectionParams_base {}
130
+ }>;
131
+ type UpdateCollectionParams = typeof UpdateCollectionParamsSchema.Type;
88
132
  //#endregion
89
- export { Collection, CollectionSpec, CollectionSpecItem, CollectionVersion, CollectionsSearchParams, CollectionsSearchResponse, CreateCollectionParams, CreateCollectionResponse, UpdateCollectionParams };
133
+ export { Collection, CollectionSchema, CollectionSpec, CollectionSpecItem, CollectionSpecItemSchema, CollectionSpecSchema, CollectionVersion, CollectionVersionSchema, CollectionsSearchParams, CollectionsSearchParamsSchema, CollectionsSearchResponse, CollectionsSearchResponseSchema, CreateCollectionParams, CreateCollectionParamsSchema, CreateCollectionResponse, CreateCollectionResponseSchema, UpdateCollectionParams, UpdateCollectionParamsSchema };