@herd-labs/sdk 0.3.1 → 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.
- package/dist/src/config.d.ts +8 -8
- package/dist/src/config.js +8 -11
- package/dist/src/errors.d.ts +29 -44
- package/dist/src/errors.js +13 -16
- package/dist/src/live/ActionsServiceLive.d.ts +2 -2
- package/dist/src/live/ActionsServiceLive.js +9 -9
- package/dist/src/live/AdaptersServiceLive.d.ts +2 -2
- package/dist/src/live/AdaptersServiceLive.js +6 -6
- package/dist/src/live/AgentSafesServiceLive.d.ts +2 -2
- package/dist/src/live/AgentSafesServiceLive.js +3 -3
- package/dist/src/live/AgentWalletsServiceLive.d.ts +2 -2
- package/dist/src/live/AgentWalletsServiceLive.js +3 -3
- package/dist/src/live/AgentWorkflowsServiceLive.d.ts +2 -2
- package/dist/src/live/AgentWorkflowsServiceLive.js +10 -10
- package/dist/src/live/AuthServiceLive.d.ts +2 -2
- package/dist/src/live/AuthServiceLive.js +5 -5
- package/dist/src/live/BookmarksServiceLive.d.ts +2 -2
- package/dist/src/live/BookmarksServiceLive.js +16 -16
- package/dist/src/live/CodeBlocksServiceLive.d.ts +2 -2
- package/dist/src/live/CodeBlocksServiceLive.js +8 -8
- package/dist/src/live/CollectionsServiceLive.d.ts +2 -2
- package/dist/src/live/CollectionsServiceLive.js +3 -3
- package/dist/src/live/ContractsServiceLive.d.ts +2 -2
- package/dist/src/live/ContractsServiceLive.js +6 -6
- package/dist/src/live/DocsServiceLive.d.ts +2 -2
- package/dist/src/live/DocsServiceLive.js +2 -2
- package/dist/src/live/GroupsServiceLive.d.ts +2 -2
- package/dist/src/live/GroupsServiceLive.js +5 -5
- package/dist/src/live/HalServiceLive.d.ts +2 -2
- package/dist/src/live/HalServiceLive.js +9 -9
- package/dist/src/live/TransactionsServiceLive.d.ts +2 -2
- package/dist/src/live/TransactionsServiceLive.js +17 -17
- package/dist/src/live/WalletsServiceLive.d.ts +2 -2
- package/dist/src/live/WalletsServiceLive.js +14 -14
- package/dist/src/live/http.d.ts +4 -4
- package/dist/src/live/http.js +13 -13
- package/dist/src/schemas/actions.d.ts +95 -323
- package/dist/src/schemas/actions.js +41 -37
- package/dist/src/schemas/adapters.d.ts +5 -15
- package/dist/src/schemas/adapters.js +2 -2
- package/dist/src/schemas/agent-wallets.d.ts +66 -210
- package/dist/src/schemas/agent-wallets.js +25 -25
- package/dist/src/schemas/agent-workflows.d.ts +62 -62
- package/dist/src/schemas/agent-workflows.js +35 -31
- package/dist/src/schemas/auth.d.ts +22 -51
- package/dist/src/schemas/auth.js +6 -6
- package/dist/src/schemas/bookmarks.d.ts +64 -204
- package/dist/src/schemas/bookmarks.js +27 -23
- package/dist/src/schemas/codeblocks.d.ts +98 -294
- package/dist/src/schemas/codeblocks.js +41 -36
- package/dist/src/schemas/collections.d.ts +68 -224
- package/dist/src/schemas/collections.js +28 -24
- package/dist/src/schemas/common.d.ts +9 -25
- package/dist/src/schemas/common.js +5 -5
- package/dist/src/schemas/contracts.d.ts +125 -431
- package/dist/src/schemas/contracts.js +52 -63
- package/dist/src/schemas/docs.d.ts +9 -26
- package/dist/src/schemas/docs.js +4 -4
- package/dist/src/schemas/groups.d.ts +47 -47
- package/dist/src/schemas/groups.js +18 -18
- package/dist/src/schemas/hal.d.ts +57 -211
- package/dist/src/schemas/hal.js +32 -30
- package/dist/src/schemas/transactions.d.ts +404 -890
- package/dist/src/schemas/transactions.js +128 -132
- package/dist/src/schemas/wallets.d.ts +205 -709
- package/dist/src/schemas/wallets.js +112 -96
- package/dist/src/services/ActionsService.d.ts +1 -1
- 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 +1 -1
- package/dist/src/services/AgentSafesService.js +2 -2
- package/dist/src/services/AgentWalletsService.d.ts +1 -1
- package/dist/src/services/AgentWalletsService.js +2 -2
- package/dist/src/services/AgentWorkflowsService.d.ts +3 -3
- package/dist/src/services/AgentWorkflowsService.js +6 -2
- package/dist/src/services/AuthService.d.ts +3 -3
- package/dist/src/services/AuthService.js +2 -2
- package/dist/src/services/BookmarksService.d.ts +2 -2
- 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 +1 -1
- 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 +3 -3
- 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 +1 -1
- package/dist/src/services/TransactionsService.js +2 -2
- package/dist/src/services/WalletsService.d.ts +1 -1
- package/dist/src/services/WalletsService.js +2 -2
- package/package.json +13 -18
|
@@ -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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
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 type: "action" | "adapter";
|
|
16
|
-
} & {
|
|
17
|
-
readonly expressionRef: string;
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
protocols: Schema
|
|
38
|
-
|
|
39
|
-
}
|
|
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
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
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
|
-
|
|
82
|
-
|
|
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
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
filters: Schema.optional<Schema.Struct<{
|
|
92
|
-
name: Schema.optional<typeof Schema.String>;
|
|
93
|
-
}>>;
|
|
94
|
-
}>, never, {
|
|
95
|
-
readonly offset: number;
|
|
96
|
-
} & {
|
|
97
|
-
readonly scope?: readonly ("yours" | "verified" | "all")[] | undefined;
|
|
98
|
-
} & {
|
|
99
|
-
readonly limit: number;
|
|
100
|
-
} & {
|
|
101
|
-
readonly filters?: {
|
|
102
|
-
readonly name?: string | undefined;
|
|
103
|
-
} | undefined;
|
|
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
|
|
108
|
-
total:
|
|
109
|
-
}
|
|
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
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
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
|
-
|
|
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 type: "action" | "adapter";
|
|
153
|
-
readonly expressionRef: string;
|
|
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
|
-
|
|
166
|
-
|
|
167
|
-
|
|
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
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
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
|
-
|
|
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
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
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
|
-
|
|
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 type: "action" | "adapter";
|
|
234
|
-
readonly expressionRef: string;
|
|
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.
|
|
7
|
-
expressionRef: Schema.String
|
|
7
|
+
type: Schema.Literals(["action", "adapter"])
|
|
8
8
|
}) {};
|
|
9
9
|
var CollectionSpec = class extends Schema.Class("CollectionSpec")({
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
31
|
-
|
|
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.
|
|
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.
|
|
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.
|
|
4
|
+
declare const Blockchain: Schema.Literals<readonly ["ethereum", "base"]>;
|
|
5
5
|
type BlockchainType = typeof Blockchain.Type;
|
|
6
|
-
declare const EvmAddress: Schema.brand<Schema.
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
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.
|
|
5
|
-
const EvmAddress = Schema.String.
|
|
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
|
-
|
|
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
|
-
|
|
10
|
+
beforeTimestamp: Schema.optional(Schema.Number),
|
|
11
|
+
page: Schema.optional(Schema.Number)
|
|
12
12
|
}) {};
|
|
13
13
|
|
|
14
14
|
//#endregion
|