@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,245 +1,133 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
|
|
3
3
|
//#region src/schemas/collections.d.ts
|
|
4
|
-
declare const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
readonly type: "action" | "adapter";
|
|
16
|
-
} & {
|
|
17
|
-
readonly expressionRef: string;
|
|
18
|
-
}, {}, {}>;
|
|
19
|
-
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
|
-
}, {}, {}>;
|
|
31
|
-
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
|
-
}, {}, {}>;
|
|
59
|
-
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
|
-
}, {}, {}>;
|
|
79
|
-
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>;
|
|
4
|
+
declare const CollectionSpecItemSchema: Schema.Struct<{
|
|
5
|
+
readonly expressionRef: Schema.String;
|
|
6
|
+
readonly id: Schema.String;
|
|
7
|
+
readonly type: Schema.Literals<readonly ["action", "adapter"]>;
|
|
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"]>;
|
|
86
15
|
}>>;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
readonly
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
readonly filters?: {
|
|
102
|
-
readonly name?: string | undefined;
|
|
103
|
-
} | undefined;
|
|
104
|
-
}, {}, {}>;
|
|
105
|
-
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
|
-
}, {}, {}>;
|
|
117
|
-
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;
|
|
16
|
+
readonly version: Schema.String;
|
|
17
|
+
}>;
|
|
18
|
+
type CollectionSpec = typeof CollectionSpecSchema.Type;
|
|
19
|
+
declare const CollectionVersionSchema: Schema.Struct<{
|
|
20
|
+
readonly expressionImports: Schema.$Array<Schema.String>;
|
|
21
|
+
readonly herdVerifiedAt: Schema.NullOr<Schema.String>;
|
|
22
|
+
readonly id: Schema.String;
|
|
23
|
+
readonly name: Schema.String;
|
|
24
|
+
readonly protocols: Schema.$Array<Schema.String>;
|
|
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"]>;
|
|
127
30
|
}>>;
|
|
31
|
+
readonly version: Schema.String;
|
|
128
32
|
}>;
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
33
|
+
}>;
|
|
34
|
+
type CollectionVersion = typeof CollectionVersionSchema.Type;
|
|
35
|
+
declare const CollectionSchema: Schema.Struct<{
|
|
36
|
+
readonly description: Schema.String;
|
|
37
|
+
readonly id: Schema.String;
|
|
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
|
+
}>>;
|
|
53
|
+
readonly name: Schema.String;
|
|
54
|
+
}>;
|
|
55
|
+
type Collection = typeof CollectionSchema.Type;
|
|
56
|
+
declare const CollectionsSearchParamsSchema: Schema.Struct<{
|
|
57
|
+
readonly filters: Schema.optional<Schema.Struct<{
|
|
58
|
+
readonly name: Schema.optional<Schema.String>;
|
|
59
|
+
}>>;
|
|
60
|
+
readonly limit: Schema.Number;
|
|
61
|
+
readonly offset: Schema.Number;
|
|
62
|
+
readonly scope: Schema.optional<Schema.$Array<Schema.Literals<readonly ["yours", "all", "verified"]>>>;
|
|
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
|
+
}>>;
|
|
86
|
+
readonly total: Schema.Number;
|
|
87
|
+
}>;
|
|
88
|
+
type CollectionsSearchResponse = typeof CollectionsSearchResponseSchema.Type;
|
|
89
|
+
declare const CreateCollectionParamsSchema: Schema.Struct<{
|
|
90
|
+
readonly description: Schema.optional<Schema.String>;
|
|
91
|
+
readonly expressionImports: Schema.$Array<Schema.String>;
|
|
92
|
+
readonly name: Schema.String;
|
|
93
|
+
readonly protocols: Schema.optional<Schema.$Array<Schema.String>>;
|
|
94
|
+
readonly spec: Schema.Struct<{
|
|
95
|
+
readonly version: Schema.Literal<"1.0">;
|
|
96
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
97
|
+
readonly id: Schema.String;
|
|
98
|
+
readonly type: Schema.Literals<readonly ["action", "adapter"]>;
|
|
99
|
+
readonly expressionRef: Schema.String;
|
|
140
100
|
}>>;
|
|
141
101
|
}>;
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
readonly
|
|
146
|
-
|
|
147
|
-
|
|
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
|
-
}, {}, {}>;
|
|
162
|
-
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>>;
|
|
173
|
-
}>;
|
|
174
|
-
}, Schema.Struct.Encoded<{
|
|
175
|
-
collection: Schema.Struct<{
|
|
176
|
-
id: typeof Schema.String;
|
|
177
|
-
name: typeof Schema.String;
|
|
178
|
-
description: typeof Schema.String;
|
|
102
|
+
}>;
|
|
103
|
+
type CreateCollectionParams = typeof CreateCollectionParamsSchema.Type;
|
|
104
|
+
declare const CreateCollectionResponseSchema: Schema.Struct<{
|
|
105
|
+
readonly collection: Schema.Struct<{
|
|
106
|
+
readonly description: Schema.String;
|
|
107
|
+
readonly id: Schema.String;
|
|
108
|
+
readonly name: Schema.String;
|
|
179
109
|
}>;
|
|
180
|
-
version: Schema.Struct<{
|
|
181
|
-
id:
|
|
182
|
-
name:
|
|
183
|
-
protocols: Schema.optional<Schema
|
|
110
|
+
readonly version: Schema.Struct<{
|
|
111
|
+
readonly id: Schema.String;
|
|
112
|
+
readonly name: Schema.String;
|
|
113
|
+
readonly protocols: Schema.optional<Schema.$Array<Schema.String>>;
|
|
184
114
|
}>;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
readonly
|
|
193
|
-
readonly
|
|
194
|
-
readonly
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
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;
|
|
115
|
+
}>;
|
|
116
|
+
type CreateCollectionResponse = typeof CreateCollectionResponseSchema.Type;
|
|
117
|
+
declare const UpdateCollectionParamsSchema: Schema.Struct<{
|
|
118
|
+
readonly description: Schema.optional<Schema.String>;
|
|
119
|
+
readonly expressionImports: Schema.optional<Schema.$Array<Schema.String>>;
|
|
120
|
+
readonly name: Schema.optional<Schema.String>;
|
|
121
|
+
readonly protocols: Schema.optional<Schema.$Array<Schema.String>>;
|
|
122
|
+
readonly spec: Schema.optional<Schema.Struct<{
|
|
123
|
+
readonly version: Schema.Literal<"1.0">;
|
|
124
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
125
|
+
readonly id: Schema.String;
|
|
126
|
+
readonly type: Schema.Literals<readonly ["action", "adapter"]>;
|
|
127
|
+
readonly expressionRef: Schema.String;
|
|
221
128
|
}>>;
|
|
222
129
|
}>>;
|
|
223
|
-
|
|
224
|
-
|
|
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
|
-
}, {}, {}>;
|
|
243
|
-
declare class UpdateCollectionParams extends UpdateCollectionParams_base {}
|
|
130
|
+
}>;
|
|
131
|
+
type UpdateCollectionParams = typeof UpdateCollectionParamsSchema.Type;
|
|
244
132
|
//#endregion
|
|
245
|
-
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 };
|
|
@@ -1,79 +1,83 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
|
|
3
3
|
//#region src/schemas/collections.ts
|
|
4
|
-
|
|
4
|
+
const CollectionSpecItemSchema = Schema.Struct({
|
|
5
|
+
expressionRef: Schema.String,
|
|
5
6
|
id: Schema.String,
|
|
6
|
-
type: Schema.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
version: Schema.String
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var CollectionVersion = class extends Schema.Class("CollectionVersion")({
|
|
14
|
-
id: Schema.String,
|
|
15
|
-
name: Schema.String,
|
|
16
|
-
spec: CollectionSpec,
|
|
7
|
+
type: Schema.Literals(["action", "adapter"])
|
|
8
|
+
});
|
|
9
|
+
const CollectionSpecSchema = Schema.Struct({
|
|
10
|
+
items: Schema.Array(CollectionSpecItemSchema),
|
|
11
|
+
version: Schema.String
|
|
12
|
+
});
|
|
13
|
+
const CollectionVersionSchema = Schema.Struct({
|
|
17
14
|
expressionImports: Schema.Array(Schema.String),
|
|
18
|
-
|
|
19
|
-
herdVerifiedAt: Schema.NullOr(Schema.String)
|
|
20
|
-
}) {};
|
|
21
|
-
var Collection = class extends Schema.Class("Collection")({
|
|
15
|
+
herdVerifiedAt: Schema.NullOr(Schema.String),
|
|
22
16
|
id: Schema.String,
|
|
23
17
|
name: Schema.String,
|
|
18
|
+
protocols: Schema.Array(Schema.String),
|
|
19
|
+
spec: CollectionSpecSchema
|
|
20
|
+
});
|
|
21
|
+
const CollectionSchema = Schema.Struct({
|
|
24
22
|
description: Schema.String,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
id: Schema.String,
|
|
24
|
+
latestVersion: Schema.NullOr(CollectionVersionSchema),
|
|
25
|
+
name: Schema.String
|
|
26
|
+
});
|
|
27
|
+
const CollectionsSearchParamsSchema = Schema.Struct({
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
scope: Schema.optional(Schema.Array(Schema.Literals([
|
|
32
|
+
"yours",
|
|
33
|
+
"all",
|
|
34
|
+
"verified"
|
|
35
|
+
])))
|
|
36
|
+
});
|
|
37
|
+
const CollectionsSearchResponseSchema = Schema.Struct({
|
|
38
|
+
items: Schema.Array(CollectionSchema),
|
|
35
39
|
total: Schema.Number
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
name: Schema.String,
|
|
40
|
+
});
|
|
41
|
+
const CreateCollectionParamsSchema = Schema.Struct({
|
|
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
|
-
|
|
49
|
-
|
|
50
|
-
}) {};
|
|
51
|
-
var CreateCollectionResponse = class extends Schema.Class("CreateCollectionResponse")({
|
|
53
|
+
})
|
|
54
|
+
});
|
|
55
|
+
const CreateCollectionResponseSchema = Schema.Struct({
|
|
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,
|
|
59
63
|
name: Schema.String,
|
|
60
64
|
protocols: Schema.optional(Schema.Array(Schema.String))
|
|
61
65
|
})
|
|
62
|
-
})
|
|
63
|
-
|
|
64
|
-
name: Schema.optional(Schema.String),
|
|
66
|
+
});
|
|
67
|
+
const UpdateCollectionParamsSchema = Schema.Struct({
|
|
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
|
-
|
|
75
|
-
protocols: Schema.optional(Schema.Array(Schema.String))
|
|
76
|
-
}) {};
|
|
79
|
+
}))
|
|
80
|
+
});
|
|
77
81
|
|
|
78
82
|
//#endregion
|
|
79
|
-
export {
|
|
83
|
+
export { CollectionSchema, CollectionSpecItemSchema, CollectionSpecSchema, CollectionVersionSchema, CollectionsSearchParamsSchema, CollectionsSearchResponseSchema, CreateCollectionParamsSchema, CreateCollectionResponseSchema, UpdateCollectionParamsSchema };
|
|
@@ -1,33 +1,17 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
|
|
3
3
|
//#region src/schemas/common.d.ts
|
|
4
|
-
declare const
|
|
5
|
-
type
|
|
6
|
-
declare const
|
|
7
|
-
type
|
|
8
|
-
declare const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
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
|
-
}, {}, {}>;
|
|
31
|
-
declare class PaginationParams extends PaginationParams_base {}
|
|
4
|
+
declare const BlockchainSchema: Schema.Literals<readonly ["ethereum", "base"]>;
|
|
5
|
+
type Blockchain = typeof BlockchainSchema.Type;
|
|
6
|
+
declare const EvmAddressSchema: Schema.brand<Schema.String, "EvmAddress">;
|
|
7
|
+
type EvmAddress = typeof EvmAddressSchema.Type;
|
|
8
|
+
declare const PaginationParamsSchema: 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
|
+
}>;
|
|
15
|
+
type PaginationParams = typeof PaginationParamsSchema.Type;
|
|
32
16
|
//#endregion
|
|
33
|
-
export { Blockchain,
|
|
17
|
+
export { Blockchain, BlockchainSchema, EvmAddress, EvmAddressSchema, PaginationParams, PaginationParamsSchema };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
|
|
3
3
|
//#region src/schemas/common.ts
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
beforeTimestamp: Schema.optional(Schema.Number),
|
|
4
|
+
const BlockchainSchema = Schema.Literals(["ethereum", "base"]);
|
|
5
|
+
const EvmAddressSchema = Schema.String.check(Schema.isPattern(/^0x[0-9a-fA-F]{40}$/u)).pipe(Schema.brand("EvmAddress"));
|
|
6
|
+
const PaginationParamsSchema = Schema.Struct({
|
|
7
|
+
afterBlocknumber: Schema.optional(Schema.Number),
|
|
9
8
|
afterTimestamp: Schema.optional(Schema.Number),
|
|
10
9
|
beforeBlocknumber: Schema.optional(Schema.Number),
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
beforeTimestamp: Schema.optional(Schema.Number),
|
|
11
|
+
page: Schema.optional(Schema.Number)
|
|
12
|
+
});
|
|
13
13
|
|
|
14
14
|
//#endregion
|
|
15
|
-
export {
|
|
15
|
+
export { BlockchainSchema, EvmAddressSchema, PaginationParamsSchema };
|