@herd-labs/sdk 0.3.0 → 0.4.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.
Files changed (97) hide show
  1. package/dist/src/config.d.ts +8 -8
  2. package/dist/src/config.js +8 -11
  3. package/dist/src/errors.d.ts +29 -44
  4. package/dist/src/errors.js +13 -16
  5. package/dist/src/live/ActionsServiceLive.d.ts +2 -2
  6. package/dist/src/live/ActionsServiceLive.js +9 -9
  7. package/dist/src/live/AdaptersServiceLive.d.ts +2 -2
  8. package/dist/src/live/AdaptersServiceLive.js +6 -6
  9. package/dist/src/live/AgentSafesServiceLive.d.ts +2 -2
  10. package/dist/src/live/AgentSafesServiceLive.js +3 -3
  11. package/dist/src/live/AgentWalletsServiceLive.d.ts +2 -2
  12. package/dist/src/live/AgentWalletsServiceLive.js +3 -3
  13. package/dist/src/live/AgentWorkflowsServiceLive.d.ts +2 -2
  14. package/dist/src/live/AgentWorkflowsServiceLive.js +10 -10
  15. package/dist/src/live/AuthServiceLive.d.ts +2 -2
  16. package/dist/src/live/AuthServiceLive.js +7 -7
  17. package/dist/src/live/BookmarksServiceLive.d.ts +2 -2
  18. package/dist/src/live/BookmarksServiceLive.js +16 -16
  19. package/dist/src/live/CodeBlocksServiceLive.d.ts +2 -2
  20. package/dist/src/live/CodeBlocksServiceLive.js +8 -8
  21. package/dist/src/live/CollectionsServiceLive.d.ts +2 -2
  22. package/dist/src/live/CollectionsServiceLive.js +3 -3
  23. package/dist/src/live/ContractsServiceLive.d.ts +2 -2
  24. package/dist/src/live/ContractsServiceLive.js +6 -6
  25. package/dist/src/live/DocsServiceLive.d.ts +2 -2
  26. package/dist/src/live/DocsServiceLive.js +2 -2
  27. package/dist/src/live/GroupsServiceLive.d.ts +2 -2
  28. package/dist/src/live/GroupsServiceLive.js +5 -5
  29. package/dist/src/live/HalServiceLive.d.ts +2 -2
  30. package/dist/src/live/HalServiceLive.js +9 -9
  31. package/dist/src/live/TransactionsServiceLive.d.ts +2 -2
  32. package/dist/src/live/TransactionsServiceLive.js +17 -17
  33. package/dist/src/live/WalletsServiceLive.d.ts +2 -2
  34. package/dist/src/live/WalletsServiceLive.js +14 -14
  35. package/dist/src/live/http.d.ts +6 -5
  36. package/dist/src/live/http.js +16 -18
  37. package/dist/src/schemas/actions.d.ts +95 -323
  38. package/dist/src/schemas/actions.js +41 -37
  39. package/dist/src/schemas/adapters.d.ts +5 -15
  40. package/dist/src/schemas/adapters.js +2 -2
  41. package/dist/src/schemas/agent-wallets.d.ts +66 -210
  42. package/dist/src/schemas/agent-wallets.js +25 -25
  43. package/dist/src/schemas/agent-workflows.d.ts +62 -62
  44. package/dist/src/schemas/agent-workflows.js +35 -31
  45. package/dist/src/schemas/auth.d.ts +22 -47
  46. package/dist/src/schemas/auth.js +10 -7
  47. package/dist/src/schemas/bookmarks.d.ts +64 -204
  48. package/dist/src/schemas/bookmarks.js +27 -23
  49. package/dist/src/schemas/codeblocks.d.ts +98 -294
  50. package/dist/src/schemas/codeblocks.js +41 -36
  51. package/dist/src/schemas/collections.d.ts +68 -224
  52. package/dist/src/schemas/collections.js +28 -24
  53. package/dist/src/schemas/common.d.ts +9 -25
  54. package/dist/src/schemas/common.js +5 -5
  55. package/dist/src/schemas/contracts.d.ts +125 -431
  56. package/dist/src/schemas/contracts.js +52 -63
  57. package/dist/src/schemas/docs.d.ts +9 -26
  58. package/dist/src/schemas/docs.js +4 -4
  59. package/dist/src/schemas/groups.d.ts +47 -47
  60. package/dist/src/schemas/groups.js +18 -18
  61. package/dist/src/schemas/hal.d.ts +57 -211
  62. package/dist/src/schemas/hal.js +32 -30
  63. package/dist/src/schemas/transactions.d.ts +404 -890
  64. package/dist/src/schemas/transactions.js +128 -132
  65. package/dist/src/schemas/wallets.d.ts +205 -709
  66. package/dist/src/schemas/wallets.js +112 -96
  67. package/dist/src/services/ActionsService.d.ts +1 -1
  68. package/dist/src/services/ActionsService.js +2 -2
  69. package/dist/src/services/AdaptersService.d.ts +1 -1
  70. package/dist/src/services/AdaptersService.js +2 -2
  71. package/dist/src/services/AgentSafesService.d.ts +1 -1
  72. package/dist/src/services/AgentSafesService.js +2 -2
  73. package/dist/src/services/AgentWalletsService.d.ts +1 -1
  74. package/dist/src/services/AgentWalletsService.js +2 -2
  75. package/dist/src/services/AgentWorkflowsService.d.ts +3 -3
  76. package/dist/src/services/AgentWorkflowsService.js +6 -2
  77. package/dist/src/services/AuthService.d.ts +3 -3
  78. package/dist/src/services/AuthService.js +2 -2
  79. package/dist/src/services/BookmarksService.d.ts +2 -2
  80. package/dist/src/services/BookmarksService.js +2 -2
  81. package/dist/src/services/CodeBlocksService.d.ts +1 -1
  82. package/dist/src/services/CodeBlocksService.js +2 -2
  83. package/dist/src/services/CollectionsService.d.ts +1 -1
  84. package/dist/src/services/CollectionsService.js +2 -2
  85. package/dist/src/services/ContractsService.d.ts +1 -1
  86. package/dist/src/services/ContractsService.js +2 -2
  87. package/dist/src/services/DocsService.d.ts +2 -2
  88. package/dist/src/services/DocsService.js +2 -2
  89. package/dist/src/services/GroupsService.d.ts +3 -3
  90. package/dist/src/services/GroupsService.js +4 -2
  91. package/dist/src/services/HalService.d.ts +1 -1
  92. package/dist/src/services/HalService.js +2 -2
  93. package/dist/src/services/TransactionsService.d.ts +1 -1
  94. package/dist/src/services/TransactionsService.js +2 -2
  95. package/dist/src/services/WalletsService.d.ts +1 -1
  96. package/dist/src/services/WalletsService.js +2 -2
  97. package/package.json +14 -19
@@ -1,245 +1,89 @@
1
1
  import { Schema } from "effect";
2
2
 
3
3
  //#region src/schemas/collections.d.ts
4
- declare const CollectionSpecItem_base: Schema.Class<CollectionSpecItem, {
5
- id: typeof Schema.String;
6
- type: Schema.Literal<["action", "adapter"]>;
7
- expressionRef: typeof Schema.String;
8
- }, Schema.Struct.Encoded<{
9
- id: typeof Schema.String;
10
- type: Schema.Literal<["action", "adapter"]>;
11
- expressionRef: typeof Schema.String;
12
- }>, never, {
13
- readonly id: string;
14
- } & {
15
- readonly expressionRef: string;
16
- } & {
17
- readonly type: "action" | "adapter";
18
- }, {}, {}>;
4
+ declare const CollectionSpecItem_base: Schema.Class<CollectionSpecItem, Schema.Struct<{
5
+ readonly expressionRef: Schema.String;
6
+ readonly id: Schema.String;
7
+ readonly type: Schema.Literals<readonly ["action", "adapter"]>;
8
+ }>, {}>;
19
9
  declare class CollectionSpecItem extends CollectionSpecItem_base {}
20
- declare const CollectionSpec_base: Schema.Class<CollectionSpec, {
21
- version: typeof Schema.String;
22
- items: Schema.Array$<typeof CollectionSpecItem>;
23
- }, Schema.Struct.Encoded<{
24
- version: typeof Schema.String;
25
- items: Schema.Array$<typeof CollectionSpecItem>;
26
- }>, never, {
27
- readonly items: readonly CollectionSpecItem[];
28
- } & {
29
- readonly version: string;
30
- }, {}, {}>;
10
+ declare const CollectionSpec_base: Schema.Class<CollectionSpec, Schema.Struct<{
11
+ readonly items: Schema.$Array<typeof CollectionSpecItem>;
12
+ readonly version: Schema.String;
13
+ }>, {}>;
31
14
  declare class CollectionSpec extends CollectionSpec_base {}
32
- declare const CollectionVersion_base: Schema.Class<CollectionVersion, {
33
- id: typeof Schema.String;
34
- name: typeof Schema.String;
35
- spec: typeof CollectionSpec;
36
- expressionImports: Schema.Array$<typeof Schema.String>;
37
- protocols: Schema.Array$<typeof Schema.String>;
38
- herdVerifiedAt: Schema.NullOr<typeof Schema.String>;
39
- }, Schema.Struct.Encoded<{
40
- id: typeof Schema.String;
41
- name: typeof Schema.String;
42
- spec: typeof CollectionSpec;
43
- expressionImports: Schema.Array$<typeof Schema.String>;
44
- protocols: Schema.Array$<typeof Schema.String>;
45
- herdVerifiedAt: Schema.NullOr<typeof Schema.String>;
46
- }>, never, {
47
- readonly id: string;
48
- } & {
49
- readonly name: string;
50
- } & {
51
- readonly spec: CollectionSpec;
52
- } & {
53
- readonly expressionImports: readonly string[];
54
- } & {
55
- readonly protocols: readonly string[];
56
- } & {
57
- readonly herdVerifiedAt: string | null;
58
- }, {}, {}>;
15
+ declare const CollectionVersion_base: Schema.Class<CollectionVersion, Schema.Struct<{
16
+ readonly expressionImports: Schema.$Array<Schema.String>;
17
+ readonly herdVerifiedAt: Schema.NullOr<Schema.String>;
18
+ readonly id: Schema.String;
19
+ readonly name: Schema.String;
20
+ readonly protocols: Schema.$Array<Schema.String>;
21
+ readonly spec: typeof CollectionSpec;
22
+ }>, {}>;
59
23
  declare class CollectionVersion extends CollectionVersion_base {}
60
- declare const Collection_base: Schema.Class<Collection, {
61
- id: typeof Schema.String;
62
- name: typeof Schema.String;
63
- description: typeof Schema.String;
64
- latestVersion: Schema.NullOr<typeof CollectionVersion>;
65
- }, Schema.Struct.Encoded<{
66
- id: typeof Schema.String;
67
- name: typeof Schema.String;
68
- description: typeof Schema.String;
69
- latestVersion: Schema.NullOr<typeof CollectionVersion>;
70
- }>, never, {
71
- readonly id: string;
72
- } & {
73
- readonly name: string;
74
- } & {
75
- readonly description: string;
76
- } & {
77
- readonly latestVersion: CollectionVersion | null;
78
- }, {}, {}>;
24
+ declare const Collection_base: Schema.Class<Collection, Schema.Struct<{
25
+ readonly description: Schema.String;
26
+ readonly id: Schema.String;
27
+ readonly latestVersion: Schema.NullOr<typeof CollectionVersion>;
28
+ readonly name: Schema.String;
29
+ }>, {}>;
79
30
  declare class Collection extends Collection_base {}
80
- declare const CollectionsSearchParams_base: Schema.Class<CollectionsSearchParams, {
81
- limit: typeof Schema.Number;
82
- offset: typeof Schema.Number;
83
- scope: Schema.optional<Schema.Array$<Schema.Literal<["yours", "all", "verified"]>>>;
84
- filters: Schema.optional<Schema.Struct<{
85
- name: Schema.optional<typeof Schema.String>;
31
+ declare const CollectionsSearchParams_base: Schema.Class<CollectionsSearchParams, Schema.Struct<{
32
+ readonly filters: Schema.optional<Schema.Struct<{
33
+ readonly name: Schema.optional<Schema.String>;
86
34
  }>>;
87
- }, Schema.Struct.Encoded<{
88
- limit: typeof Schema.Number;
89
- offset: typeof Schema.Number;
90
- scope: Schema.optional<Schema.Array$<Schema.Literal<["yours", "all", "verified"]>>>;
91
- filters: Schema.optional<Schema.Struct<{
92
- name: Schema.optional<typeof Schema.String>;
93
- }>>;
94
- }>, never, {
95
- readonly limit: number;
96
- } & {
97
- readonly scope?: readonly ("yours" | "all" | "verified")[] | undefined;
98
- } & {
99
- readonly filters?: {
100
- readonly name?: string | undefined;
101
- } | undefined;
102
- } & {
103
- readonly offset: number;
104
- }, {}, {}>;
35
+ readonly limit: Schema.Number;
36
+ readonly offset: Schema.Number;
37
+ readonly scope: Schema.optional<Schema.$Array<Schema.Literals<readonly ["yours", "all", "verified"]>>>;
38
+ }>, {}>;
105
39
  declare class CollectionsSearchParams extends CollectionsSearchParams_base {}
106
- declare const CollectionsSearchResponse_base: Schema.Class<CollectionsSearchResponse, {
107
- items: Schema.Array$<typeof Collection>;
108
- total: typeof Schema.Number;
109
- }, Schema.Struct.Encoded<{
110
- items: Schema.Array$<typeof Collection>;
111
- total: typeof Schema.Number;
112
- }>, never, {
113
- readonly items: readonly Collection[];
114
- } & {
115
- readonly total: number;
116
- }, {}, {}>;
40
+ declare const CollectionsSearchResponse_base: Schema.Class<CollectionsSearchResponse, Schema.Struct<{
41
+ readonly items: Schema.$Array<typeof Collection>;
42
+ readonly total: Schema.Number;
43
+ }>, {}>;
117
44
  declare class CollectionsSearchResponse extends CollectionsSearchResponse_base {}
118
- declare const CreateCollectionParams_base: Schema.Class<CreateCollectionParams, {
119
- name: typeof Schema.String;
120
- description: Schema.optional<typeof Schema.String>;
121
- spec: Schema.Struct<{
122
- version: Schema.Literal<["1.0"]>;
123
- items: Schema.Array$<Schema.Struct<{
124
- id: typeof Schema.String;
125
- type: Schema.Literal<["action", "adapter"]>;
126
- expressionRef: typeof Schema.String;
127
- }>>;
128
- }>;
129
- expressionImports: Schema.Array$<typeof Schema.String>;
130
- protocols: Schema.optional<Schema.Array$<typeof Schema.String>>;
131
- }, Schema.Struct.Encoded<{
132
- name: typeof Schema.String;
133
- description: Schema.optional<typeof Schema.String>;
134
- spec: Schema.Struct<{
135
- version: Schema.Literal<["1.0"]>;
136
- items: Schema.Array$<Schema.Struct<{
137
- id: typeof Schema.String;
138
- type: Schema.Literal<["action", "adapter"]>;
139
- expressionRef: typeof Schema.String;
45
+ declare const CreateCollectionParams_base: Schema.Class<CreateCollectionParams, Schema.Struct<{
46
+ readonly description: Schema.optional<Schema.String>;
47
+ readonly expressionImports: Schema.$Array<Schema.String>;
48
+ readonly name: Schema.String;
49
+ readonly protocols: Schema.optional<Schema.$Array<Schema.String>>;
50
+ readonly spec: Schema.Struct<{
51
+ readonly version: Schema.Literal<"1.0">;
52
+ readonly items: Schema.$Array<Schema.Struct<{
53
+ readonly id: Schema.String;
54
+ readonly type: Schema.Literals<readonly ["action", "adapter"]>;
55
+ readonly expressionRef: Schema.String;
140
56
  }>>;
141
57
  }>;
142
- expressionImports: Schema.Array$<typeof Schema.String>;
143
- protocols: Schema.optional<Schema.Array$<typeof Schema.String>>;
144
- }>, never, {
145
- readonly name: string;
146
- } & {
147
- readonly description?: string | undefined;
148
- } & {
149
- readonly spec: {
150
- readonly items: readonly {
151
- readonly id: string;
152
- readonly expressionRef: string;
153
- readonly type: "action" | "adapter";
154
- }[];
155
- readonly version: "1.0";
156
- };
157
- } & {
158
- readonly expressionImports: readonly string[];
159
- } & {
160
- readonly protocols?: readonly string[] | undefined;
161
- }, {}, {}>;
58
+ }>, {}>;
162
59
  declare class CreateCollectionParams extends CreateCollectionParams_base {}
163
- declare const CreateCollectionResponse_base: Schema.Class<CreateCollectionResponse, {
164
- collection: Schema.Struct<{
165
- id: typeof Schema.String;
166
- name: typeof Schema.String;
167
- description: typeof Schema.String;
168
- }>;
169
- version: Schema.Struct<{
170
- id: typeof Schema.String;
171
- name: typeof Schema.String;
172
- protocols: Schema.optional<Schema.Array$<typeof Schema.String>>;
60
+ declare const CreateCollectionResponse_base: Schema.Class<CreateCollectionResponse, Schema.Struct<{
61
+ readonly collection: Schema.Struct<{
62
+ readonly description: Schema.String;
63
+ readonly id: Schema.String;
64
+ readonly name: Schema.String;
173
65
  }>;
174
- }, Schema.Struct.Encoded<{
175
- collection: Schema.Struct<{
176
- id: typeof Schema.String;
177
- name: typeof Schema.String;
178
- description: typeof Schema.String;
66
+ readonly version: Schema.Struct<{
67
+ readonly id: Schema.String;
68
+ readonly name: Schema.String;
69
+ readonly protocols: Schema.optional<Schema.$Array<Schema.String>>;
179
70
  }>;
180
- version: Schema.Struct<{
181
- id: typeof Schema.String;
182
- name: typeof Schema.String;
183
- protocols: Schema.optional<Schema.Array$<typeof Schema.String>>;
184
- }>;
185
- }>, never, {
186
- readonly version: {
187
- readonly id: string;
188
- readonly name: string;
189
- readonly protocols?: readonly string[] | undefined;
190
- };
191
- } & {
192
- readonly collection: {
193
- readonly id: string;
194
- readonly name: string;
195
- readonly description: string;
196
- };
197
- }, {}, {}>;
71
+ }>, {}>;
198
72
  declare class CreateCollectionResponse extends CreateCollectionResponse_base {}
199
- declare const UpdateCollectionParams_base: Schema.Class<UpdateCollectionParams, {
200
- name: Schema.optional<typeof Schema.String>;
201
- description: Schema.optional<typeof Schema.String>;
202
- spec: Schema.optional<Schema.Struct<{
203
- version: Schema.Literal<["1.0"]>;
204
- items: Schema.Array$<Schema.Struct<{
205
- id: typeof Schema.String;
206
- type: Schema.Literal<["action", "adapter"]>;
207
- expressionRef: typeof Schema.String;
208
- }>>;
209
- }>>;
210
- expressionImports: Schema.optional<Schema.Array$<typeof Schema.String>>;
211
- protocols: Schema.optional<Schema.Array$<typeof Schema.String>>;
212
- }, Schema.Struct.Encoded<{
213
- name: Schema.optional<typeof Schema.String>;
214
- description: Schema.optional<typeof Schema.String>;
215
- spec: Schema.optional<Schema.Struct<{
216
- version: Schema.Literal<["1.0"]>;
217
- items: Schema.Array$<Schema.Struct<{
218
- id: typeof Schema.String;
219
- type: Schema.Literal<["action", "adapter"]>;
220
- expressionRef: typeof Schema.String;
73
+ declare const UpdateCollectionParams_base: Schema.Class<UpdateCollectionParams, Schema.Struct<{
74
+ readonly description: Schema.optional<Schema.String>;
75
+ readonly expressionImports: Schema.optional<Schema.$Array<Schema.String>>;
76
+ readonly name: Schema.optional<Schema.String>;
77
+ readonly protocols: Schema.optional<Schema.$Array<Schema.String>>;
78
+ readonly spec: Schema.optional<Schema.Struct<{
79
+ readonly version: Schema.Literal<"1.0">;
80
+ readonly items: Schema.$Array<Schema.Struct<{
81
+ readonly id: Schema.String;
82
+ readonly type: Schema.Literals<readonly ["action", "adapter"]>;
83
+ readonly expressionRef: Schema.String;
221
84
  }>>;
222
85
  }>>;
223
- expressionImports: Schema.optional<Schema.Array$<typeof Schema.String>>;
224
- protocols: Schema.optional<Schema.Array$<typeof Schema.String>>;
225
- }>, never, {
226
- readonly name?: string | undefined;
227
- } & {
228
- readonly description?: string | undefined;
229
- } & {
230
- readonly spec?: {
231
- readonly items: readonly {
232
- readonly id: string;
233
- readonly expressionRef: string;
234
- readonly type: "action" | "adapter";
235
- }[];
236
- readonly version: "1.0";
237
- } | undefined;
238
- } & {
239
- readonly expressionImports?: readonly string[] | undefined;
240
- } & {
241
- readonly protocols?: readonly string[] | undefined;
242
- }, {}, {}>;
86
+ }>, {}>;
243
87
  declare class UpdateCollectionParams extends UpdateCollectionParams_base {}
244
88
  //#endregion
245
89
  export { Collection, CollectionSpec, CollectionSpecItem, CollectionVersion, CollectionsSearchParams, CollectionsSearchResponse, CreateCollectionParams, CreateCollectionResponse, UpdateCollectionParams };
@@ -2,57 +2,61 @@ import { Schema } from "effect";
2
2
 
3
3
  //#region src/schemas/collections.ts
4
4
  var CollectionSpecItem = class extends Schema.Class("CollectionSpecItem")({
5
+ expressionRef: Schema.String,
5
6
  id: Schema.String,
6
- type: Schema.Literal("action", "adapter"),
7
- expressionRef: Schema.String
7
+ type: Schema.Literals(["action", "adapter"])
8
8
  }) {};
9
9
  var CollectionSpec = class extends Schema.Class("CollectionSpec")({
10
- version: Schema.String,
11
- items: Schema.Array(CollectionSpecItem)
10
+ items: Schema.Array(CollectionSpecItem),
11
+ version: Schema.String
12
12
  }) {};
13
13
  var CollectionVersion = class extends Schema.Class("CollectionVersion")({
14
+ expressionImports: Schema.Array(Schema.String),
15
+ herdVerifiedAt: Schema.NullOr(Schema.String),
14
16
  id: Schema.String,
15
17
  name: Schema.String,
16
- spec: CollectionSpec,
17
- expressionImports: Schema.Array(Schema.String),
18
18
  protocols: Schema.Array(Schema.String),
19
- herdVerifiedAt: Schema.NullOr(Schema.String)
19
+ spec: CollectionSpec
20
20
  }) {};
21
21
  var Collection = class extends Schema.Class("Collection")({
22
- id: Schema.String,
23
- name: Schema.String,
24
22
  description: Schema.String,
25
- latestVersion: Schema.NullOr(CollectionVersion)
23
+ id: Schema.String,
24
+ latestVersion: Schema.NullOr(CollectionVersion),
25
+ name: Schema.String
26
26
  }) {};
27
27
  var CollectionsSearchParams = class extends Schema.Class("CollectionsSearchParams")({
28
+ filters: Schema.optional(Schema.Struct({ name: Schema.optional(Schema.String) })),
28
29
  limit: Schema.Number,
29
30
  offset: Schema.Number,
30
- scope: Schema.optional(Schema.Array(Schema.Literal("yours", "all", "verified"))),
31
- filters: Schema.optional(Schema.Struct({ name: Schema.optional(Schema.String) }))
31
+ scope: Schema.optional(Schema.Array(Schema.Literals([
32
+ "yours",
33
+ "all",
34
+ "verified"
35
+ ])))
32
36
  }) {};
33
37
  var CollectionsSearchResponse = class extends Schema.Class("CollectionsSearchResponse")({
34
38
  items: Schema.Array(Collection),
35
39
  total: Schema.Number
36
40
  }) {};
37
41
  var CreateCollectionParams = class extends Schema.Class("CreateCollectionParams")({
38
- name: Schema.String,
39
42
  description: Schema.optional(Schema.String),
43
+ expressionImports: Schema.Array(Schema.String),
44
+ name: Schema.String,
45
+ protocols: Schema.optional(Schema.Array(Schema.String)),
40
46
  spec: Schema.Struct({
41
47
  version: Schema.Literal("1.0"),
42
48
  items: Schema.Array(Schema.Struct({
43
49
  id: Schema.String,
44
- type: Schema.Literal("action", "adapter"),
50
+ type: Schema.Literals(["action", "adapter"]),
45
51
  expressionRef: Schema.String
46
52
  }))
47
- }),
48
- expressionImports: Schema.Array(Schema.String),
49
- protocols: Schema.optional(Schema.Array(Schema.String))
53
+ })
50
54
  }) {};
51
55
  var CreateCollectionResponse = class extends Schema.Class("CreateCollectionResponse")({
52
56
  collection: Schema.Struct({
57
+ description: Schema.String,
53
58
  id: Schema.String,
54
- name: Schema.String,
55
- description: Schema.String
59
+ name: Schema.String
56
60
  }),
57
61
  version: Schema.Struct({
58
62
  id: Schema.String,
@@ -61,18 +65,18 @@ var CreateCollectionResponse = class extends Schema.Class("CreateCollectionRespo
61
65
  })
62
66
  }) {};
63
67
  var UpdateCollectionParams = class extends Schema.Class("UpdateCollectionParams")({
64
- name: Schema.optional(Schema.String),
65
68
  description: Schema.optional(Schema.String),
69
+ expressionImports: Schema.optional(Schema.Array(Schema.String)),
70
+ name: Schema.optional(Schema.String),
71
+ protocols: Schema.optional(Schema.Array(Schema.String)),
66
72
  spec: Schema.optional(Schema.Struct({
67
73
  version: Schema.Literal("1.0"),
68
74
  items: Schema.Array(Schema.Struct({
69
75
  id: Schema.String,
70
- type: Schema.Literal("action", "adapter"),
76
+ type: Schema.Literals(["action", "adapter"]),
71
77
  expressionRef: Schema.String
72
78
  }))
73
- })),
74
- expressionImports: Schema.optional(Schema.Array(Schema.String)),
75
- protocols: Schema.optional(Schema.Array(Schema.String))
79
+ }))
76
80
  }) {};
77
81
 
78
82
  //#endregion
@@ -1,33 +1,17 @@
1
1
  import { Schema } from "effect";
2
2
 
3
3
  //#region src/schemas/common.d.ts
4
- declare const Blockchain: Schema.Literal<["ethereum", "base"]>;
4
+ declare const Blockchain: Schema.Literals<readonly ["ethereum", "base"]>;
5
5
  type BlockchainType = typeof Blockchain.Type;
6
- declare const EvmAddress: Schema.brand<Schema.filter<typeof Schema.String>, "EvmAddress">;
6
+ declare const EvmAddress: Schema.brand<Schema.String, "EvmAddress">;
7
7
  type EvmAddressType = typeof EvmAddress.Type;
8
- declare const PaginationParams_base: Schema.Class<PaginationParams, {
9
- page: Schema.optional<typeof Schema.Number>;
10
- beforeTimestamp: Schema.optional<typeof Schema.Number>;
11
- afterTimestamp: Schema.optional<typeof Schema.Number>;
12
- beforeBlocknumber: Schema.optional<typeof Schema.Number>;
13
- afterBlocknumber: Schema.optional<typeof Schema.Number>;
14
- }, Schema.Struct.Encoded<{
15
- page: Schema.optional<typeof Schema.Number>;
16
- beforeTimestamp: Schema.optional<typeof Schema.Number>;
17
- afterTimestamp: Schema.optional<typeof Schema.Number>;
18
- beforeBlocknumber: Schema.optional<typeof Schema.Number>;
19
- afterBlocknumber: Schema.optional<typeof Schema.Number>;
20
- }>, never, {
21
- readonly page?: number | undefined;
22
- } & {
23
- readonly beforeTimestamp?: number | undefined;
24
- } & {
25
- readonly afterTimestamp?: number | undefined;
26
- } & {
27
- readonly beforeBlocknumber?: number | undefined;
28
- } & {
29
- readonly afterBlocknumber?: number | undefined;
30
- }, {}, {}>;
8
+ declare const PaginationParams_base: Schema.Class<PaginationParams, Schema.Struct<{
9
+ readonly afterBlocknumber: Schema.optional<Schema.Number>;
10
+ readonly afterTimestamp: Schema.optional<Schema.Number>;
11
+ readonly beforeBlocknumber: Schema.optional<Schema.Number>;
12
+ readonly beforeTimestamp: Schema.optional<Schema.Number>;
13
+ readonly page: Schema.optional<Schema.Number>;
14
+ }>, {}>;
31
15
  declare class PaginationParams extends PaginationParams_base {}
32
16
  //#endregion
33
17
  export { Blockchain, BlockchainType, EvmAddress, EvmAddressType, PaginationParams };
@@ -1,14 +1,14 @@
1
1
  import { Schema } from "effect";
2
2
 
3
3
  //#region src/schemas/common.ts
4
- const Blockchain = Schema.Literal("ethereum", "base");
5
- const EvmAddress = Schema.String.pipe(Schema.pattern(/^0x[0-9a-fA-F]{40}$/), Schema.brand("EvmAddress"));
4
+ const Blockchain = Schema.Literals(["ethereum", "base"]);
5
+ const EvmAddress = Schema.String.check(Schema.isPattern(/^0x[0-9a-fA-F]{40}$/u)).pipe(Schema.brand("EvmAddress"));
6
6
  var PaginationParams = class extends Schema.Class("PaginationParams")({
7
- page: Schema.optional(Schema.Number),
8
- beforeTimestamp: Schema.optional(Schema.Number),
7
+ afterBlocknumber: Schema.optional(Schema.Number),
9
8
  afterTimestamp: Schema.optional(Schema.Number),
10
9
  beforeBlocknumber: Schema.optional(Schema.Number),
11
- afterBlocknumber: Schema.optional(Schema.Number)
10
+ beforeTimestamp: Schema.optional(Schema.Number),
11
+ page: Schema.optional(Schema.Number)
12
12
  }) {};
13
13
 
14
14
  //#endregion