@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,50 +1,55 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EvmAddressSchema } from "./common.js";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
|
|
4
4
|
//#region src/schemas/contracts.ts
|
|
5
|
-
|
|
5
|
+
const FunctionSummarySchema = Schema.Struct({
|
|
6
6
|
name: Schema.String,
|
|
7
7
|
signature: Schema.String,
|
|
8
8
|
summary: Schema.String
|
|
9
|
-
})
|
|
10
|
-
|
|
9
|
+
});
|
|
10
|
+
const EventSummarySchema = Schema.Struct({
|
|
11
11
|
name: Schema.String,
|
|
12
12
|
summary: Schema.String
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
});
|
|
14
|
+
const TokenImageSchema = Schema.Struct({
|
|
15
|
+
large: Schema.optional(Schema.String),
|
|
16
16
|
small: Schema.optional(Schema.String),
|
|
17
|
-
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
rank: Schema.Number,
|
|
17
|
+
thumb: Schema.optional(Schema.String)
|
|
18
|
+
});
|
|
19
|
+
const TopHolderSchema = Schema.Struct({
|
|
21
20
|
address: Schema.String,
|
|
22
21
|
balance: Schema.Number,
|
|
23
|
-
|
|
24
|
-
sharePercentage: Schema.Number,
|
|
25
|
-
type: Schema.Literal("contract", "wallet"),
|
|
26
|
-
name: Schema.optional(Schema.String),
|
|
22
|
+
coingeckoLabel: Schema.optional(Schema.String),
|
|
27
23
|
entityLabel: Schema.optional(Schema.String),
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
name: Schema.optional(Schema.String),
|
|
25
|
+
rank: Schema.Number,
|
|
26
|
+
sharePercentage: Schema.Number,
|
|
27
|
+
type: Schema.Literals(["contract", "wallet"]),
|
|
28
|
+
valueUsd: Schema.Number
|
|
29
|
+
});
|
|
30
|
+
const TokenDetailsSchema = Schema.Struct({
|
|
31
|
+
athUsd: Schema.optional(Schema.Number),
|
|
32
|
+
currentPriceUsd: Schema.optional(Schema.Number),
|
|
34
33
|
decimals: Schema.optional(Schema.Number),
|
|
35
34
|
description: Schema.optional(Schema.String),
|
|
36
|
-
currentPriceUsd: Schema.optional(Schema.Number),
|
|
37
|
-
marketCapUsd: Schema.optional(Schema.Number),
|
|
38
35
|
fullyDilutedValuationUsd: Schema.optional(Schema.Number),
|
|
39
|
-
|
|
40
|
-
totalVolumeUsd: Schema.optional(Schema.Number),
|
|
41
|
-
athUsd: Schema.optional(Schema.Number),
|
|
36
|
+
image: Schema.optional(TokenImageSchema),
|
|
42
37
|
marketCapRank: Schema.optional(Schema.Number),
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
38
|
+
marketCapUsd: Schema.optional(Schema.Number),
|
|
39
|
+
name: Schema.String,
|
|
40
|
+
symbol: Schema.String,
|
|
41
|
+
tokenType: Schema.Literals([
|
|
42
|
+
"ERC20",
|
|
43
|
+
"ERC721",
|
|
44
|
+
"ERC1155"
|
|
45
|
+
]),
|
|
46
|
+
topHolders: Schema.optional(Schema.Array(TopHolderSchema)),
|
|
47
|
+
totalSupply: Schema.optional(Schema.Number),
|
|
48
|
+
totalVolumeUsd: Schema.optional(Schema.Number)
|
|
49
|
+
});
|
|
50
|
+
const AddressDetailsSchema = Schema.Struct({
|
|
47
51
|
address: Schema.String,
|
|
52
|
+
constructorArgs: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
|
|
48
53
|
deploymentBlockNumber: Schema.optional(Schema.Number),
|
|
49
54
|
deploymentTimestamp: Schema.optional(Schema.String),
|
|
50
55
|
deploymentTimestampUtc: Schema.optional(Schema.String),
|
|
@@ -52,95 +57,79 @@ var AddressDetails = class extends Schema.Class("AddressDetails")({
|
|
|
52
57
|
factory: Schema.optional(Schema.Struct({
|
|
53
58
|
name: Schema.String,
|
|
54
59
|
address: Schema.String
|
|
55
|
-
})),
|
|
56
|
-
constructorArgs: Schema.optional(Schema.Record({
|
|
57
|
-
key: Schema.String,
|
|
58
|
-
value: Schema.Unknown
|
|
59
60
|
}))
|
|
60
|
-
})
|
|
61
|
-
|
|
62
|
-
versionNumber: Schema.Number,
|
|
61
|
+
});
|
|
62
|
+
const HistoricalImplementationSchema = Schema.Struct({
|
|
63
63
|
address: Schema.String,
|
|
64
64
|
deploymentBlockNumber: Schema.optional(Schema.Number),
|
|
65
65
|
deploymentBlockTimestamp: Schema.optional(Schema.Number),
|
|
66
66
|
deploymentBlockTimestampUtc: Schema.optional(Schema.String),
|
|
67
67
|
deploymentTxHash: Schema.optional(Schema.String),
|
|
68
|
+
newEvents: Schema.optional(Schema.Array(Schema.String)),
|
|
68
69
|
newFunctions: Schema.optional(Schema.Array(Schema.String)),
|
|
69
|
-
|
|
70
|
-
})
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
addressDetails: Schema.optional(
|
|
70
|
+
versionNumber: Schema.Number
|
|
71
|
+
});
|
|
72
|
+
const ContractMetadataSchema = Schema.Struct({
|
|
73
|
+
abi: Schema.optional(Schema.Array(Schema.Record(Schema.String, Schema.Unknown))),
|
|
74
|
+
addressDetails: Schema.optional(AddressDetailsSchema),
|
|
74
75
|
contractName: Schema.optional(Schema.String),
|
|
75
|
-
abi: Schema.optional(Schema.Array(Schema.Record({
|
|
76
|
-
key: Schema.String,
|
|
77
|
-
value: Schema.Unknown
|
|
78
|
-
}))),
|
|
79
76
|
contractSummary: Schema.optional(Schema.String),
|
|
80
|
-
|
|
81
|
-
eventSummaries: Schema.optional(Schema.Array(
|
|
82
|
-
|
|
83
|
-
historicalImplementations: Schema.optional(Schema.Array(
|
|
84
|
-
proxyAbi: Schema.optional(Schema.Array(Schema.Record(
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
value: Schema.String
|
|
91
|
-
})),
|
|
92
|
-
signatureImplementationNames: Schema.optional(Schema.Record({
|
|
93
|
-
key: Schema.String,
|
|
94
|
-
value: Schema.String
|
|
95
|
-
}))
|
|
96
|
-
}) {};
|
|
97
|
-
var ContractCodeMatchBlock = class extends Schema.Class("ContractCodeMatchBlock")({
|
|
98
|
-
fileName: Schema.String,
|
|
99
|
-
startLine: Schema.Number,
|
|
100
|
-
endLine: Schema.Number,
|
|
77
|
+
errorMessage: Schema.optional(Schema.String),
|
|
78
|
+
eventSummaries: Schema.optional(Schema.Array(EventSummarySchema)),
|
|
79
|
+
functionSummaries: Schema.optional(Schema.Array(FunctionSummarySchema)),
|
|
80
|
+
historicalImplementations: Schema.optional(Schema.Array(HistoricalImplementationSchema)),
|
|
81
|
+
proxyAbi: Schema.optional(Schema.Array(Schema.Record(Schema.String, Schema.Unknown))),
|
|
82
|
+
signatureImplementationNames: Schema.optional(Schema.Record(Schema.String, Schema.String)),
|
|
83
|
+
signatureImplementations: Schema.optional(Schema.Record(Schema.String, Schema.String)),
|
|
84
|
+
tokenDetails: Schema.optional(TokenDetailsSchema)
|
|
85
|
+
});
|
|
86
|
+
const ContractCodeMatchBlockSchema = Schema.Struct({
|
|
101
87
|
code: Schema.String,
|
|
88
|
+
endLine: Schema.Number,
|
|
89
|
+
fileName: Schema.String,
|
|
102
90
|
numberOfMatches: Schema.Number,
|
|
103
|
-
patterns: Schema.Array(Schema.String)
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
blockchain: Schema.Literal("ethereum", "base"),
|
|
91
|
+
patterns: Schema.Array(Schema.String),
|
|
92
|
+
startLine: Schema.Number
|
|
93
|
+
});
|
|
94
|
+
const ContractCodeSearchResultSchema = Schema.Struct({
|
|
95
|
+
blockchain: Schema.Literals(["ethereum", "base"]),
|
|
109
96
|
code: Schema.optional(Schema.String),
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
97
|
+
contractAddress: EvmAddressSchema,
|
|
98
|
+
contractName: Schema.String,
|
|
99
|
+
matches: Schema.optional(Schema.Array(ContractCodeMatchBlockSchema)),
|
|
100
|
+
proxyCode: Schema.optional(Schema.String)
|
|
101
|
+
});
|
|
102
|
+
const GetContractCodeParamsSchema = Schema.Struct({
|
|
103
|
+
contractAddresses: Schema.Array(EvmAddressSchema),
|
|
116
104
|
includeProxies: Schema.optional(Schema.Boolean),
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
query: Schema.optional(Schema.String),
|
|
105
|
+
patterns: Schema.optional(Schema.Array(Schema.String)),
|
|
106
|
+
query: Schema.String,
|
|
107
|
+
returnAllCode: Schema.optional(Schema.Boolean)
|
|
108
|
+
});
|
|
109
|
+
const GetContractCodeResponseSchema = Schema.Struct({
|
|
123
110
|
allSearchPatterns: Schema.optional(Schema.Array(Schema.String)),
|
|
124
|
-
codeSearchResults: Schema.optional(Schema.Array(
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
111
|
+
codeSearchResults: Schema.optional(Schema.Array(ContractCodeSearchResultSchema)),
|
|
112
|
+
errorMessage: Schema.optional(Schema.String),
|
|
113
|
+
query: Schema.optional(Schema.String)
|
|
114
|
+
});
|
|
115
|
+
const DiffVersionInfoSchema = Schema.Struct({
|
|
129
116
|
blockNumber: Schema.Number,
|
|
130
|
-
contractName: Schema.String
|
|
131
|
-
|
|
132
|
-
|
|
117
|
+
contractName: Schema.String,
|
|
118
|
+
implementationAddress: Schema.String,
|
|
119
|
+
versionNumber: Schema.Number
|
|
120
|
+
});
|
|
121
|
+
const DiffEntrySchema = Schema.Struct({
|
|
133
122
|
diff: Schema.String,
|
|
134
|
-
version1Info:
|
|
135
|
-
version2Info:
|
|
136
|
-
})
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
diffs: Schema.optional(Schema.Array(DiffEntry)),
|
|
123
|
+
version1Info: DiffVersionInfoSchema,
|
|
124
|
+
version2Info: DiffVersionInfoSchema
|
|
125
|
+
});
|
|
126
|
+
const ContractDiffSchema = Schema.Struct({
|
|
127
|
+
blockchain: Schema.optional(Schema.String),
|
|
140
128
|
contractAddress: Schema.optional(Schema.String),
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
129
|
+
diffs: Schema.optional(Schema.Array(DiffEntrySchema)),
|
|
130
|
+
errorMessage: Schema.optional(Schema.String)
|
|
131
|
+
});
|
|
132
|
+
const DiffVersionsParamsSchema = Schema.Struct({ compareAllVersions: Schema.optional(Schema.Boolean) });
|
|
144
133
|
|
|
145
134
|
//#endregion
|
|
146
|
-
export {
|
|
135
|
+
export { AddressDetailsSchema, ContractCodeMatchBlockSchema, ContractCodeSearchResultSchema, ContractDiffSchema, ContractMetadataSchema, DiffEntrySchema, DiffVersionInfoSchema, DiffVersionsParamsSchema, EventSummarySchema, FunctionSummarySchema, GetContractCodeParamsSchema, GetContractCodeResponseSchema, HistoricalImplementationSchema, TokenDetailsSchema, TokenImageSchema, TopHolderSchema };
|
|
@@ -1,33 +1,16 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
|
|
3
3
|
//#region src/schemas/docs.d.ts
|
|
4
|
-
declare const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
readonly name: string;
|
|
16
|
-
} & {
|
|
17
|
-
readonly description?: string | undefined;
|
|
18
|
-
}, {}, {}>;
|
|
19
|
-
declare class DocEntry extends DocEntry_base {}
|
|
20
|
-
declare const DocContent_base: Schema.Class<DocContent, {
|
|
21
|
-
documentId: typeof Schema.String;
|
|
22
|
-
content: typeof Schema.String;
|
|
23
|
-
}, Schema.Struct.Encoded<{
|
|
24
|
-
documentId: typeof Schema.String;
|
|
25
|
-
content: typeof Schema.String;
|
|
26
|
-
}>, never, {
|
|
27
|
-
readonly documentId: string;
|
|
28
|
-
} & {
|
|
29
|
-
readonly content: string;
|
|
30
|
-
}, {}, {}>;
|
|
31
|
-
declare class DocContent extends DocContent_base {}
|
|
4
|
+
declare const DocEntrySchema: Schema.Struct<{
|
|
5
|
+
readonly description: Schema.optional<Schema.String>;
|
|
6
|
+
readonly id: Schema.String;
|
|
7
|
+
readonly name: Schema.String;
|
|
8
|
+
}>;
|
|
9
|
+
type DocEntry = typeof DocEntrySchema.Type;
|
|
10
|
+
declare const DocContentSchema: Schema.Struct<{
|
|
11
|
+
readonly content: Schema.String;
|
|
12
|
+
readonly documentId: Schema.String;
|
|
13
|
+
}>;
|
|
14
|
+
type DocContent = typeof DocContentSchema.Type;
|
|
32
15
|
//#endregion
|
|
33
|
-
export { DocContent, DocEntry };
|
|
16
|
+
export { DocContent, DocContentSchema, DocEntry, DocEntrySchema };
|
package/dist/src/schemas/docs.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
|
|
3
3
|
//#region src/schemas/docs.ts
|
|
4
|
-
|
|
4
|
+
const DocEntrySchema = Schema.Struct({
|
|
5
|
+
description: Schema.optional(Schema.String),
|
|
5
6
|
id: Schema.String,
|
|
6
|
-
name: Schema.String
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
documentId: Schema.String
|
|
11
|
-
|
|
12
|
-
}) {};
|
|
7
|
+
name: Schema.String
|
|
8
|
+
});
|
|
9
|
+
const DocContentSchema = Schema.Struct({
|
|
10
|
+
content: Schema.String,
|
|
11
|
+
documentId: Schema.String
|
|
12
|
+
});
|
|
13
13
|
|
|
14
14
|
//#endregion
|
|
15
|
-
export {
|
|
15
|
+
export { DocContentSchema, DocEntrySchema };
|
|
@@ -1,94 +1,94 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
|
|
3
3
|
//#region src/schemas/groups.d.ts
|
|
4
|
-
declare const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
intent: Schema.NullOr<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
declare const GroupSummarySchema: Schema.Struct<{
|
|
5
|
+
readonly createdAt: Schema.String;
|
|
6
|
+
readonly id: Schema.String;
|
|
7
|
+
readonly intent: Schema.NullOr<Schema.String>;
|
|
8
|
+
readonly memberCount: Schema.Number;
|
|
9
|
+
readonly name: Schema.NullOr<Schema.String>;
|
|
10
|
+
readonly quorum: Schema.Number;
|
|
11
11
|
}>;
|
|
12
|
-
type
|
|
13
|
-
declare const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
type GroupSummary = typeof GroupSummarySchema.Type;
|
|
13
|
+
declare const GroupMemberSchema: Schema.Struct<{
|
|
14
|
+
readonly email: Schema.NullOr<Schema.String>;
|
|
15
|
+
readonly joinedAt: Schema.String;
|
|
16
|
+
readonly userId: Schema.String;
|
|
17
17
|
}>;
|
|
18
|
-
type
|
|
19
|
-
declare const
|
|
20
|
-
address:
|
|
21
|
-
name: Schema.NullOr<
|
|
18
|
+
type GroupMember = typeof GroupMemberSchema.Type;
|
|
19
|
+
declare const GroupWalletSchema: Schema.Struct<{
|
|
20
|
+
readonly address: Schema.String;
|
|
21
|
+
readonly name: Schema.NullOr<Schema.String>;
|
|
22
22
|
}>;
|
|
23
|
-
type
|
|
24
|
-
declare const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
intent: Schema.NullOr<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
joinedAt: typeof Schema.String;
|
|
23
|
+
type GroupWallet = typeof GroupWalletSchema.Type;
|
|
24
|
+
declare const GroupDetailsSchema: Schema.Struct<{
|
|
25
|
+
readonly createdAt: Schema.String;
|
|
26
|
+
readonly id: Schema.String;
|
|
27
|
+
readonly intent: Schema.NullOr<Schema.String>;
|
|
28
|
+
readonly members: Schema.$Array<Schema.Struct<{
|
|
29
|
+
readonly email: Schema.NullOr<Schema.String>;
|
|
30
|
+
readonly joinedAt: Schema.String;
|
|
31
|
+
readonly userId: Schema.String;
|
|
33
32
|
}>>;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
readonly name: Schema.NullOr<Schema.String>;
|
|
34
|
+
readonly quorum: Schema.Number;
|
|
35
|
+
readonly wallet: Schema.NullOr<Schema.Struct<{
|
|
36
|
+
readonly address: Schema.String;
|
|
37
|
+
readonly name: Schema.NullOr<Schema.String>;
|
|
37
38
|
}>>;
|
|
38
|
-
createdAt: typeof Schema.String;
|
|
39
39
|
}>;
|
|
40
|
-
type
|
|
41
|
-
declare const
|
|
42
|
-
|
|
43
|
-
members: Schema
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
type GroupDetails = typeof GroupDetailsSchema.Type;
|
|
41
|
+
declare const CreateGroupParamsSchema: Schema.Struct<{
|
|
42
|
+
readonly intent: Schema.optional<Schema.String>;
|
|
43
|
+
readonly members: Schema.$Array<Schema.String>;
|
|
44
|
+
readonly name: Schema.String;
|
|
45
|
+
readonly quorum: Schema.Number;
|
|
46
46
|
}>;
|
|
47
|
-
type
|
|
48
|
-
declare const
|
|
49
|
-
groupId:
|
|
50
|
-
walletAddress:
|
|
47
|
+
type CreateGroupParams = typeof CreateGroupParamsSchema.Type;
|
|
48
|
+
declare const CreateGroupResponseSchema: Schema.Struct<{
|
|
49
|
+
readonly groupId: Schema.String;
|
|
50
|
+
readonly walletAddress: Schema.String;
|
|
51
51
|
}>;
|
|
52
|
-
type
|
|
53
|
-
declare const
|
|
54
|
-
groups: Schema
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
intent: Schema.NullOr<
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
52
|
+
type CreateGroupResponse = typeof CreateGroupResponseSchema.Type;
|
|
53
|
+
declare const ListGroupsResponseSchema: Schema.Struct<{
|
|
54
|
+
readonly groups: Schema.$Array<Schema.Struct<{
|
|
55
|
+
readonly createdAt: Schema.String;
|
|
56
|
+
readonly id: Schema.String;
|
|
57
|
+
readonly intent: Schema.NullOr<Schema.String>;
|
|
58
|
+
readonly memberCount: Schema.Number;
|
|
59
|
+
readonly name: Schema.NullOr<Schema.String>;
|
|
60
|
+
readonly quorum: Schema.Number;
|
|
61
61
|
}>>;
|
|
62
62
|
}>;
|
|
63
|
-
type
|
|
64
|
-
declare const
|
|
65
|
-
groupId:
|
|
63
|
+
type ListGroupsResponse = typeof ListGroupsResponseSchema.Type;
|
|
64
|
+
declare const GroupIdParamsSchema: Schema.Struct<{
|
|
65
|
+
readonly groupId: Schema.String;
|
|
66
66
|
}>;
|
|
67
|
-
type
|
|
68
|
-
declare const
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
type GroupIdParams = typeof GroupIdParamsSchema.Type;
|
|
68
|
+
declare const ProposeMemberChangeParamsSchema: Schema.Struct<{
|
|
69
|
+
readonly email: Schema.String;
|
|
70
|
+
readonly type: Schema.Literals<readonly ["add", "remove"]>;
|
|
71
71
|
}>;
|
|
72
|
-
type
|
|
73
|
-
declare const
|
|
74
|
-
quorum:
|
|
72
|
+
type ProposeMemberChangeParams = typeof ProposeMemberChangeParamsSchema.Type;
|
|
73
|
+
declare const ProposeQuorumChangeParamsSchema: Schema.Struct<{
|
|
74
|
+
readonly quorum: Schema.Number;
|
|
75
75
|
}>;
|
|
76
|
-
type
|
|
77
|
-
declare const
|
|
78
|
-
workflowId:
|
|
79
|
-
workflowRunId:
|
|
76
|
+
type ProposeQuorumChangeParams = typeof ProposeQuorumChangeParamsSchema.Type;
|
|
77
|
+
declare const ProposalResponseSchema: Schema.Struct<{
|
|
78
|
+
readonly workflowId: Schema.String;
|
|
79
|
+
readonly workflowRunId: Schema.String;
|
|
80
80
|
}>;
|
|
81
|
-
type
|
|
82
|
-
declare const
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
type ProposalResponse = typeof ProposalResponseSchema.Type;
|
|
82
|
+
declare const EditGroupMetadataParamsSchema: Schema.Struct<{
|
|
83
|
+
readonly description: Schema.optional<Schema.String>;
|
|
84
|
+
readonly name: Schema.optional<Schema.String>;
|
|
85
85
|
}>;
|
|
86
|
-
type
|
|
87
|
-
declare const
|
|
88
|
-
id:
|
|
89
|
-
|
|
90
|
-
|
|
86
|
+
type EditGroupMetadataParams = typeof EditGroupMetadataParamsSchema.Type;
|
|
87
|
+
declare const EditGroupMetadataResponseSchema: Schema.Struct<{
|
|
88
|
+
readonly id: Schema.String;
|
|
89
|
+
readonly intent: Schema.NullOr<Schema.String>;
|
|
90
|
+
readonly name: Schema.NullOr<Schema.String>;
|
|
91
91
|
}>;
|
|
92
|
-
type
|
|
92
|
+
type EditGroupMetadataResponse = typeof EditGroupMetadataResponseSchema.Type;
|
|
93
93
|
//#endregion
|
|
94
|
-
export { CreateGroupParams,
|
|
94
|
+
export { CreateGroupParams, CreateGroupParamsSchema, CreateGroupResponse, CreateGroupResponseSchema, EditGroupMetadataParams, EditGroupMetadataParamsSchema, EditGroupMetadataResponse, EditGroupMetadataResponseSchema, GroupDetails, GroupDetailsSchema, GroupIdParams, GroupIdParamsSchema, GroupMember, GroupMemberSchema, GroupSummary, GroupSummarySchema, GroupWallet, GroupWalletSchema, ListGroupsResponse, ListGroupsResponseSchema, ProposalResponse, ProposalResponseSchema, ProposeMemberChangeParams, ProposeMemberChangeParamsSchema, ProposeQuorumChangeParams, ProposeQuorumChangeParamsSchema };
|
|
@@ -1,62 +1,62 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
|
|
3
3
|
//#region src/schemas/groups.ts
|
|
4
|
-
const
|
|
4
|
+
const GroupSummarySchema = Schema.Struct({
|
|
5
|
+
createdAt: Schema.String,
|
|
5
6
|
id: Schema.String,
|
|
6
|
-
name: Schema.NullOr(Schema.String),
|
|
7
7
|
intent: Schema.NullOr(Schema.String),
|
|
8
|
-
quorum: Schema.Number,
|
|
9
8
|
memberCount: Schema.Number,
|
|
10
|
-
|
|
9
|
+
name: Schema.NullOr(Schema.String),
|
|
10
|
+
quorum: Schema.Number
|
|
11
11
|
});
|
|
12
|
-
const
|
|
13
|
-
userId: Schema.String,
|
|
12
|
+
const GroupMemberSchema = Schema.Struct({
|
|
14
13
|
email: Schema.NullOr(Schema.String),
|
|
15
|
-
joinedAt: Schema.String
|
|
14
|
+
joinedAt: Schema.String,
|
|
15
|
+
userId: Schema.String
|
|
16
16
|
});
|
|
17
|
-
const
|
|
17
|
+
const GroupWalletSchema = Schema.Struct({
|
|
18
18
|
address: Schema.String,
|
|
19
19
|
name: Schema.NullOr(Schema.String)
|
|
20
20
|
});
|
|
21
|
-
const
|
|
21
|
+
const GroupDetailsSchema = Schema.Struct({
|
|
22
|
+
createdAt: Schema.String,
|
|
22
23
|
id: Schema.String,
|
|
23
|
-
name: Schema.NullOr(Schema.String),
|
|
24
24
|
intent: Schema.NullOr(Schema.String),
|
|
25
|
+
members: Schema.Array(GroupMemberSchema),
|
|
26
|
+
name: Schema.NullOr(Schema.String),
|
|
25
27
|
quorum: Schema.Number,
|
|
26
|
-
|
|
27
|
-
wallet: Schema.NullOr(GroupWallet),
|
|
28
|
-
createdAt: Schema.String
|
|
28
|
+
wallet: Schema.NullOr(GroupWalletSchema)
|
|
29
29
|
});
|
|
30
|
-
const
|
|
31
|
-
|
|
30
|
+
const CreateGroupParamsSchema = Schema.Struct({
|
|
31
|
+
intent: Schema.optional(Schema.String),
|
|
32
32
|
members: Schema.Array(Schema.String),
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
name: Schema.String,
|
|
34
|
+
quorum: Schema.Number
|
|
35
35
|
});
|
|
36
|
-
const
|
|
36
|
+
const CreateGroupResponseSchema = Schema.Struct({
|
|
37
37
|
groupId: Schema.String,
|
|
38
38
|
walletAddress: Schema.String
|
|
39
39
|
});
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
const ListGroupsResponseSchema = Schema.Struct({ groups: Schema.Array(GroupSummarySchema) });
|
|
41
|
+
const GroupIdParamsSchema = Schema.Struct({ groupId: Schema.String });
|
|
42
|
+
const ProposeMemberChangeParamsSchema = Schema.Struct({
|
|
43
|
+
email: Schema.String,
|
|
44
|
+
type: Schema.Literals(["add", "remove"])
|
|
45
45
|
});
|
|
46
|
-
const
|
|
47
|
-
const
|
|
46
|
+
const ProposeQuorumChangeParamsSchema = Schema.Struct({ quorum: Schema.Number });
|
|
47
|
+
const ProposalResponseSchema = Schema.Struct({
|
|
48
48
|
workflowId: Schema.String,
|
|
49
49
|
workflowRunId: Schema.String
|
|
50
50
|
});
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
const EditGroupMetadataParamsSchema = Schema.Struct({
|
|
52
|
+
description: Schema.optional(Schema.String),
|
|
53
|
+
name: Schema.optional(Schema.String)
|
|
54
54
|
});
|
|
55
|
-
const
|
|
55
|
+
const EditGroupMetadataResponseSchema = Schema.Struct({
|
|
56
56
|
id: Schema.String,
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
intent: Schema.NullOr(Schema.String),
|
|
58
|
+
name: Schema.NullOr(Schema.String)
|
|
59
59
|
});
|
|
60
60
|
|
|
61
61
|
//#endregion
|
|
62
|
-
export {
|
|
62
|
+
export { CreateGroupParamsSchema, CreateGroupResponseSchema, EditGroupMetadataParamsSchema, EditGroupMetadataResponseSchema, GroupDetailsSchema, GroupIdParamsSchema, GroupMemberSchema, GroupSummarySchema, GroupWalletSchema, ListGroupsResponseSchema, ProposalResponseSchema, ProposeMemberChangeParamsSchema, ProposeQuorumChangeParamsSchema };
|