@herd-labs/sdk 0.4.0 → 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 +4 -4
- package/dist/src/config.js +2 -2
- package/dist/src/errors.d.ts +6 -0
- package/dist/src/errors.js +7 -1
- package/dist/src/live/ActionsServiceLive.d.ts +3 -3
- package/dist/src/live/ActionsServiceLive.js +7 -7
- package/dist/src/live/AdaptersServiceLive.d.ts +3 -3
- package/dist/src/live/AdaptersServiceLive.js +4 -4
- package/dist/src/live/AgentSafesServiceLive.d.ts +3 -3
- package/dist/src/live/AgentSafesServiceLive.js +4 -4
- package/dist/src/live/AgentWalletsServiceLive.d.ts +2 -2
- package/dist/src/live/AgentWalletsServiceLive.js +3 -3
- package/dist/src/live/AgentWorkflowsServiceLive.d.ts +3 -3
- package/dist/src/live/AgentWorkflowsServiceLive.js +8 -8
- package/dist/src/live/AuthServiceLive.d.ts +3 -3
- package/dist/src/live/AuthServiceLive.js +5 -5
- package/dist/src/live/BookmarksServiceLive.d.ts +3 -3
- package/dist/src/live/BookmarksServiceLive.js +6 -6
- package/dist/src/live/CodeBlocksServiceLive.d.ts +3 -3
- package/dist/src/live/CodeBlocksServiceLive.js +7 -7
- package/dist/src/live/CollectionsServiceLive.d.ts +3 -3
- package/dist/src/live/CollectionsServiceLive.js +4 -4
- package/dist/src/live/ContractsServiceLive.d.ts +3 -3
- package/dist/src/live/ContractsServiceLive.js +6 -6
- package/dist/src/live/DocsServiceLive.d.ts +3 -3
- package/dist/src/live/DocsServiceLive.js +3 -3
- package/dist/src/live/GroupsServiceLive.d.ts +3 -3
- package/dist/src/live/GroupsServiceLive.js +7 -7
- package/dist/src/live/HalServiceLive.d.ts +3 -3
- package/dist/src/live/HalServiceLive.js +3 -3
- package/dist/src/live/TransactionsServiceLive.d.ts +3 -3
- package/dist/src/live/TransactionsServiceLive.js +4 -4
- package/dist/src/live/WalletsServiceLive.d.ts +3 -3
- package/dist/src/live/WalletsServiceLive.js +5 -5
- package/dist/src/live/http.d.ts +2 -2
- package/dist/src/live/http.js +2 -2
- package/dist/src/schemas/actions.d.ts +127 -59
- package/dist/src/schemas/actions.js +42 -42
- package/dist/src/schemas/adapters.d.ts +4 -4
- package/dist/src/schemas/adapters.js +3 -3
- package/dist/src/schemas/agent-wallets.d.ts +57 -37
- package/dist/src/schemas/agent-wallets.js +35 -35
- package/dist/src/schemas/agent-workflows.d.ts +35 -35
- package/dist/src/schemas/agent-workflows.js +19 -19
- package/dist/src/schemas/auth.d.ts +19 -19
- package/dist/src/schemas/auth.js +10 -10
- package/dist/src/schemas/bookmarks.d.ts +58 -36
- package/dist/src/schemas/bookmarks.js +34 -34
- package/dist/src/schemas/codeblocks.d.ts +89 -52
- package/dist/src/schemas/codeblocks.js +34 -34
- package/dist/src/schemas/collections.d.ts +76 -32
- package/dist/src/schemas/collections.js +23 -23
- package/dist/src/schemas/common.d.ts +8 -8
- package/dist/src/schemas/common.js +5 -5
- package/dist/src/schemas/contracts.d.ts +176 -61
- package/dist/src/schemas/contracts.js +47 -47
- package/dist/src/schemas/docs.d.ts +7 -7
- package/dist/src/schemas/docs.js +5 -5
- package/dist/src/schemas/groups.d.ts +27 -27
- package/dist/src/schemas/groups.js +16 -16
- package/dist/src/schemas/hal.d.ts +64 -18
- package/dist/src/schemas/hal.js +18 -18
- package/dist/src/schemas/transactions.d.ts +264 -56
- package/dist/src/schemas/transactions.js +50 -50
- package/dist/src/schemas/wallets.d.ts +434 -84
- package/dist/src/schemas/wallets.js +114 -69
- package/dist/src/services/ActionsService.d.ts +2 -2
- package/dist/src/services/AgentSafesService.d.ts +4 -4
- package/dist/src/services/AgentWalletsService.d.ts +2 -2
- package/dist/src/services/AgentWorkflowsService.d.ts +8 -8
- package/dist/src/services/AuthService.d.ts +3 -3
- package/dist/src/services/BookmarksService.d.ts +2 -2
- package/dist/src/services/ContractsService.d.ts +5 -5
- package/dist/src/services/GroupsService.d.ts +11 -11
- package/dist/src/services/TransactionsService.d.ts +4 -4
- package/dist/src/services/WalletsService.d.ts +4 -4
- package/package.json +2 -2
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BlockchainSchema, EvmAddressSchema } from "./common.js";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
|
|
4
4
|
//#region src/schemas/agent-wallets.ts
|
|
5
5
|
const OptionalString = Schema.optional(Schema.String);
|
|
6
|
-
|
|
7
|
-
address:
|
|
6
|
+
const AgentWalletSchema = Schema.Struct({
|
|
7
|
+
address: EvmAddressSchema,
|
|
8
8
|
groupId: Schema.String.check(Schema.isUUID()),
|
|
9
9
|
id: Schema.String.check(Schema.isUUID()),
|
|
10
10
|
intent: Schema.NullOr(Schema.String),
|
|
11
11
|
name: Schema.NullOr(Schema.String)
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
blockchain:
|
|
12
|
+
});
|
|
13
|
+
const AgentWalletSafeSchema = Schema.Struct({
|
|
14
|
+
blockchain: BlockchainSchema,
|
|
15
15
|
intent: Schema.NullOr(Schema.String),
|
|
16
16
|
isProposer: Schema.Boolean,
|
|
17
17
|
isSigner: Schema.Boolean,
|
|
18
18
|
name: Schema.NullOr(Schema.String),
|
|
19
|
-
safeAddress:
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
address:
|
|
19
|
+
safeAddress: EvmAddressSchema
|
|
20
|
+
});
|
|
21
|
+
const LinkedAgentWalletSchema = Schema.Struct({
|
|
22
|
+
address: EvmAddressSchema,
|
|
23
23
|
agentWalletId: Schema.String.check(Schema.isUUID()),
|
|
24
24
|
intent: Schema.NullOr(Schema.String),
|
|
25
25
|
isProposer: Schema.Boolean,
|
|
26
26
|
isSigner: Schema.Boolean,
|
|
27
27
|
name: Schema.NullOr(Schema.String)
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
blockchain:
|
|
28
|
+
});
|
|
29
|
+
const AgentSafeMetadataSchema = Schema.Struct({
|
|
30
|
+
blockchain: BlockchainSchema,
|
|
31
31
|
intent: Schema.NullOr(Schema.String),
|
|
32
32
|
name: Schema.NullOr(Schema.String),
|
|
33
|
-
safeAddress:
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
blockchain:
|
|
33
|
+
safeAddress: EvmAddressSchema
|
|
34
|
+
});
|
|
35
|
+
const AgentWalletsListParamsSchema = Schema.Struct({ groupId: Schema.optional(Schema.String.check(Schema.isUUID())) });
|
|
36
|
+
const AgentWalletsListSchema = Schema.Struct({ agentWallets: Schema.Array(AgentWalletSchema) });
|
|
37
|
+
const AgentWalletSafesListSchema = Schema.Struct({ safes: Schema.Array(AgentWalletSafeSchema) });
|
|
38
|
+
const AgentSafeSchema = Schema.Struct({
|
|
39
|
+
blockchain: BlockchainSchema,
|
|
40
40
|
intent: Schema.NullOr(Schema.String),
|
|
41
|
-
linkedAgentWallets: Schema.Array(
|
|
41
|
+
linkedAgentWallets: Schema.Array(LinkedAgentWalletSchema),
|
|
42
42
|
name: Schema.NullOr(Schema.String),
|
|
43
|
-
owners: Schema.Array(
|
|
44
|
-
safeAddress:
|
|
43
|
+
owners: Schema.Array(EvmAddressSchema),
|
|
44
|
+
safeAddress: EvmAddressSchema,
|
|
45
45
|
safeUrl: Schema.String,
|
|
46
46
|
threshold: Schema.Number
|
|
47
|
-
})
|
|
48
|
-
|
|
49
|
-
agentWalletAddress:
|
|
47
|
+
});
|
|
48
|
+
const SetSafeProposerParamsSchema = Schema.Struct({
|
|
49
|
+
agentWalletAddress: EvmAddressSchema,
|
|
50
50
|
intent: OptionalString,
|
|
51
51
|
name: OptionalString
|
|
52
|
-
})
|
|
53
|
-
|
|
54
|
-
agentWalletAddress:
|
|
55
|
-
blockchain:
|
|
52
|
+
});
|
|
53
|
+
const SetSafeProposerResponseSchema = Schema.Struct({
|
|
54
|
+
agentWalletAddress: EvmAddressSchema,
|
|
55
|
+
blockchain: BlockchainSchema,
|
|
56
56
|
intent: Schema.NullOr(Schema.String),
|
|
57
57
|
isProposer: Schema.Boolean,
|
|
58
58
|
isSigner: Schema.Boolean,
|
|
59
59
|
name: Schema.NullOr(Schema.String),
|
|
60
|
-
safeAddress:
|
|
61
|
-
})
|
|
62
|
-
|
|
60
|
+
safeAddress: EvmAddressSchema
|
|
61
|
+
});
|
|
62
|
+
const EditAgentSafeMetadataParamsSchema = Schema.Struct({
|
|
63
63
|
intent: OptionalString,
|
|
64
64
|
name: OptionalString
|
|
65
|
-
})
|
|
65
|
+
});
|
|
66
66
|
|
|
67
67
|
//#endregion
|
|
68
|
-
export {
|
|
68
|
+
export { AgentSafeMetadataSchema, AgentSafeSchema, AgentWalletSafeSchema, AgentWalletSafesListSchema, AgentWalletSchema, AgentWalletsListParamsSchema, AgentWalletsListSchema, EditAgentSafeMetadataParamsSchema, LinkedAgentWalletSchema, SetSafeProposerParamsSchema, SetSafeProposerResponseSchema };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
|
|
3
3
|
//#region src/schemas/agent-workflows.d.ts
|
|
4
|
-
declare const
|
|
4
|
+
declare const AgentWorkflowSchema: Schema.Struct<{
|
|
5
5
|
readonly createdAt: Schema.String;
|
|
6
6
|
readonly groupId: Schema.String;
|
|
7
7
|
readonly id: Schema.String;
|
|
@@ -10,8 +10,8 @@ declare const AgentWorkflow: Schema.Struct<{
|
|
|
10
10
|
readonly type: Schema.String;
|
|
11
11
|
readonly updatedAt: Schema.String;
|
|
12
12
|
}>;
|
|
13
|
-
type
|
|
14
|
-
declare const
|
|
13
|
+
type AgentWorkflow = typeof AgentWorkflowSchema.Type;
|
|
14
|
+
declare const AgentWorkflowRunSchema: Schema.Struct<{
|
|
15
15
|
readonly agentWorkflowId: Schema.String;
|
|
16
16
|
readonly changelog: Schema.String;
|
|
17
17
|
readonly createdAt: Schema.String;
|
|
@@ -19,8 +19,8 @@ declare const AgentWorkflowRun: Schema.Struct<{
|
|
|
19
19
|
readonly outputs: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
20
20
|
readonly updatedAt: Schema.String;
|
|
21
21
|
}>;
|
|
22
|
-
type
|
|
23
|
-
declare const
|
|
22
|
+
type AgentWorkflowRun = typeof AgentWorkflowRunSchema.Type;
|
|
23
|
+
declare const AgentWorkflowDecisionSchema: Schema.Struct<{
|
|
24
24
|
readonly agentWorkflowRunId: Schema.String;
|
|
25
25
|
readonly createdAt: Schema.String;
|
|
26
26
|
readonly decision: Schema.Literals<readonly ["approve", "reject"]>;
|
|
@@ -29,8 +29,8 @@ declare const AgentWorkflowDecision: Schema.Struct<{
|
|
|
29
29
|
readonly updatedAt: Schema.String;
|
|
30
30
|
readonly userId: Schema.String;
|
|
31
31
|
}>;
|
|
32
|
-
type
|
|
33
|
-
declare const
|
|
32
|
+
type AgentWorkflowDecision = typeof AgentWorkflowDecisionSchema.Type;
|
|
33
|
+
declare const AgentWorkflowWithRunsSchema: Schema.Struct<{
|
|
34
34
|
readonly createdAt: Schema.String;
|
|
35
35
|
readonly groupId: Schema.String;
|
|
36
36
|
readonly id: Schema.String;
|
|
@@ -47,24 +47,24 @@ declare const AgentWorkflowWithRuns: Schema.Struct<{
|
|
|
47
47
|
readonly type: Schema.String;
|
|
48
48
|
readonly updatedAt: Schema.String;
|
|
49
49
|
}>;
|
|
50
|
-
type
|
|
51
|
-
declare const
|
|
50
|
+
type AgentWorkflowWithRuns = typeof AgentWorkflowWithRunsSchema.Type;
|
|
51
|
+
declare const CreateAgentWorkflowParamsSchema: Schema.Struct<{
|
|
52
52
|
readonly groupId: Schema.String;
|
|
53
53
|
readonly intent: Schema.optional<Schema.String>;
|
|
54
54
|
readonly name: Schema.String;
|
|
55
55
|
readonly type: Schema.Literals<readonly ["safe_transaction", "wallet_transaction", "group_membership_change", "group_quorum_change"]>;
|
|
56
56
|
}>;
|
|
57
|
-
type
|
|
58
|
-
declare const
|
|
57
|
+
type CreateAgentWorkflowParams = typeof CreateAgentWorkflowParamsSchema.Type;
|
|
58
|
+
declare const CreateAgentWorkflowResponseSchema: Schema.Struct<{
|
|
59
59
|
readonly workflowId: Schema.String;
|
|
60
60
|
}>;
|
|
61
|
-
type
|
|
62
|
-
declare const
|
|
61
|
+
type CreateAgentWorkflowResponse = typeof CreateAgentWorkflowResponseSchema.Type;
|
|
62
|
+
declare const ListAgentWorkflowsParamsSchema: Schema.Struct<{
|
|
63
63
|
readonly groupId: Schema.String;
|
|
64
64
|
readonly type: Schema.optional<Schema.Literals<readonly ["safe_transaction", "wallet_transaction", "group_membership_change", "group_quorum_change"]>>;
|
|
65
65
|
}>;
|
|
66
|
-
type
|
|
67
|
-
declare const
|
|
66
|
+
type ListAgentWorkflowsParams = typeof ListAgentWorkflowsParamsSchema.Type;
|
|
67
|
+
declare const ListAgentWorkflowsResponseSchema: Schema.Struct<{
|
|
68
68
|
readonly workflows: Schema.$Array<Schema.Struct<{
|
|
69
69
|
readonly createdAt: Schema.String;
|
|
70
70
|
readonly groupId: Schema.String;
|
|
@@ -75,46 +75,46 @@ declare const ListAgentWorkflowsResponse: Schema.Struct<{
|
|
|
75
75
|
readonly updatedAt: Schema.String;
|
|
76
76
|
}>>;
|
|
77
77
|
}>;
|
|
78
|
-
type
|
|
79
|
-
declare const
|
|
78
|
+
type ListAgentWorkflowsResponse = typeof ListAgentWorkflowsResponseSchema.Type;
|
|
79
|
+
declare const GetAgentWorkflowParamsSchema: Schema.Struct<{
|
|
80
80
|
readonly agentWorkflowId: Schema.String;
|
|
81
81
|
}>;
|
|
82
|
-
type
|
|
83
|
-
declare const
|
|
82
|
+
type GetAgentWorkflowParams = typeof GetAgentWorkflowParamsSchema.Type;
|
|
83
|
+
declare const CreateAgentWorkflowRunParamsSchema: Schema.Struct<{
|
|
84
84
|
readonly agentWorkflowId: Schema.String;
|
|
85
85
|
readonly changelog: Schema.optional<Schema.String>;
|
|
86
86
|
readonly outputs: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
87
87
|
}>;
|
|
88
|
-
type
|
|
89
|
-
declare const
|
|
88
|
+
type CreateAgentWorkflowRunParams = typeof CreateAgentWorkflowRunParamsSchema.Type;
|
|
89
|
+
declare const CreateAgentWorkflowRunResponseSchema: Schema.Struct<{
|
|
90
90
|
readonly workflowRunId: Schema.String;
|
|
91
91
|
}>;
|
|
92
|
-
type
|
|
93
|
-
declare const
|
|
92
|
+
type CreateAgentWorkflowRunResponse = typeof CreateAgentWorkflowRunResponseSchema.Type;
|
|
93
|
+
declare const SubmitAgentWorkflowDecisionParamsSchema: Schema.Struct<{
|
|
94
94
|
readonly agentWorkflowRunId: Schema.String;
|
|
95
95
|
readonly decision: Schema.Literals<readonly ["approve", "reject"]>;
|
|
96
96
|
}>;
|
|
97
|
-
type
|
|
98
|
-
declare const
|
|
97
|
+
type SubmitAgentWorkflowDecisionParams = typeof SubmitAgentWorkflowDecisionParamsSchema.Type;
|
|
98
|
+
declare const SubmitAgentWorkflowDecisionResponseSchema: Schema.Struct<{
|
|
99
99
|
readonly decisionId: Schema.String;
|
|
100
100
|
}>;
|
|
101
|
-
type
|
|
102
|
-
declare const
|
|
101
|
+
type SubmitAgentWorkflowDecisionResponse = typeof SubmitAgentWorkflowDecisionResponseSchema.Type;
|
|
102
|
+
declare const PushAgentWorkflowParamsSchema: Schema.Struct<{
|
|
103
103
|
readonly agentWorkflowRunId: Schema.String;
|
|
104
104
|
}>;
|
|
105
|
-
type
|
|
106
|
-
declare const
|
|
105
|
+
type PushAgentWorkflowParams = typeof PushAgentWorkflowParamsSchema.Type;
|
|
106
|
+
declare const PushAgentWorkflowResponseSchema: Schema.Struct<{
|
|
107
107
|
readonly pushId: Schema.String;
|
|
108
108
|
}>;
|
|
109
|
-
type
|
|
110
|
-
declare const
|
|
109
|
+
type PushAgentWorkflowResponse = typeof PushAgentWorkflowResponseSchema.Type;
|
|
110
|
+
declare const ExecuteSafeTxParamsSchema: Schema.Struct<{
|
|
111
111
|
readonly agentWorkflowRunId: Schema.String;
|
|
112
112
|
}>;
|
|
113
|
-
type
|
|
114
|
-
declare const
|
|
113
|
+
type ExecuteSafeTxParams = typeof ExecuteSafeTxParamsSchema.Type;
|
|
114
|
+
declare const ExecuteSafeTxResponseSchema: Schema.Struct<{
|
|
115
115
|
readonly blockchain: Schema.Literals<readonly ["ethereum", "base"]>;
|
|
116
116
|
readonly transactionHash: Schema.String;
|
|
117
117
|
}>;
|
|
118
|
-
type
|
|
118
|
+
type ExecuteSafeTxResponse = typeof ExecuteSafeTxResponseSchema.Type;
|
|
119
119
|
//#endregion
|
|
120
|
-
export { AgentWorkflow, AgentWorkflowDecision,
|
|
120
|
+
export { AgentWorkflow, AgentWorkflowDecision, AgentWorkflowDecisionSchema, AgentWorkflowRun, AgentWorkflowRunSchema, AgentWorkflowSchema, AgentWorkflowWithRuns, AgentWorkflowWithRunsSchema, CreateAgentWorkflowParams, CreateAgentWorkflowParamsSchema, CreateAgentWorkflowResponse, CreateAgentWorkflowResponseSchema, CreateAgentWorkflowRunParams, CreateAgentWorkflowRunParamsSchema, CreateAgentWorkflowRunResponse, CreateAgentWorkflowRunResponseSchema, ExecuteSafeTxParams, ExecuteSafeTxParamsSchema, ExecuteSafeTxResponse, ExecuteSafeTxResponseSchema, GetAgentWorkflowParams, GetAgentWorkflowParamsSchema, ListAgentWorkflowsParams, ListAgentWorkflowsParamsSchema, ListAgentWorkflowsResponse, ListAgentWorkflowsResponseSchema, PushAgentWorkflowParams, PushAgentWorkflowParamsSchema, PushAgentWorkflowResponse, PushAgentWorkflowResponseSchema, SubmitAgentWorkflowDecisionParams, SubmitAgentWorkflowDecisionParamsSchema, SubmitAgentWorkflowDecisionResponse, SubmitAgentWorkflowDecisionResponseSchema };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
|
|
3
3
|
//#region src/schemas/agent-workflows.ts
|
|
4
|
-
const
|
|
4
|
+
const AgentWorkflowSchema = Schema.Struct({
|
|
5
5
|
createdAt: Schema.String,
|
|
6
6
|
groupId: Schema.String,
|
|
7
7
|
id: Schema.String,
|
|
@@ -10,7 +10,7 @@ const AgentWorkflow = Schema.Struct({
|
|
|
10
10
|
type: Schema.String,
|
|
11
11
|
updatedAt: Schema.String
|
|
12
12
|
});
|
|
13
|
-
const
|
|
13
|
+
const AgentWorkflowRunSchema = Schema.Struct({
|
|
14
14
|
agentWorkflowId: Schema.String,
|
|
15
15
|
changelog: Schema.String,
|
|
16
16
|
createdAt: Schema.String,
|
|
@@ -18,7 +18,7 @@ const AgentWorkflowRun = Schema.Struct({
|
|
|
18
18
|
outputs: Schema.Record(Schema.String, Schema.Unknown),
|
|
19
19
|
updatedAt: Schema.String
|
|
20
20
|
});
|
|
21
|
-
const
|
|
21
|
+
const AgentWorkflowDecisionSchema = Schema.Struct({
|
|
22
22
|
agentWorkflowRunId: Schema.String,
|
|
23
23
|
createdAt: Schema.String,
|
|
24
24
|
decision: Schema.Literals(["approve", "reject"]),
|
|
@@ -27,17 +27,17 @@ const AgentWorkflowDecision = Schema.Struct({
|
|
|
27
27
|
updatedAt: Schema.String,
|
|
28
28
|
userId: Schema.String
|
|
29
29
|
});
|
|
30
|
-
const
|
|
30
|
+
const AgentWorkflowWithRunsSchema = Schema.Struct({
|
|
31
31
|
createdAt: Schema.String,
|
|
32
32
|
groupId: Schema.String,
|
|
33
33
|
id: Schema.String,
|
|
34
34
|
intent: Schema.NullOr(Schema.String),
|
|
35
35
|
name: Schema.NullOr(Schema.String),
|
|
36
|
-
runs: Schema.Array(
|
|
36
|
+
runs: Schema.Array(AgentWorkflowRunSchema),
|
|
37
37
|
type: Schema.String,
|
|
38
38
|
updatedAt: Schema.String
|
|
39
39
|
});
|
|
40
|
-
const
|
|
40
|
+
const CreateAgentWorkflowParamsSchema = Schema.Struct({
|
|
41
41
|
groupId: Schema.String,
|
|
42
42
|
intent: Schema.optional(Schema.String),
|
|
43
43
|
name: Schema.String,
|
|
@@ -48,8 +48,8 @@ const CreateAgentWorkflowParams = Schema.Struct({
|
|
|
48
48
|
"group_quorum_change"
|
|
49
49
|
])
|
|
50
50
|
});
|
|
51
|
-
const
|
|
52
|
-
const
|
|
51
|
+
const CreateAgentWorkflowResponseSchema = Schema.Struct({ workflowId: Schema.String });
|
|
52
|
+
const ListAgentWorkflowsParamsSchema = Schema.Struct({
|
|
53
53
|
groupId: Schema.String,
|
|
54
54
|
type: Schema.optional(Schema.Literals([
|
|
55
55
|
"safe_transaction",
|
|
@@ -58,26 +58,26 @@ const ListAgentWorkflowsParams = Schema.Struct({
|
|
|
58
58
|
"group_quorum_change"
|
|
59
59
|
]))
|
|
60
60
|
});
|
|
61
|
-
const
|
|
62
|
-
const
|
|
63
|
-
const
|
|
61
|
+
const ListAgentWorkflowsResponseSchema = Schema.Struct({ workflows: Schema.Array(AgentWorkflowSchema) });
|
|
62
|
+
const GetAgentWorkflowParamsSchema = Schema.Struct({ agentWorkflowId: Schema.String });
|
|
63
|
+
const CreateAgentWorkflowRunParamsSchema = Schema.Struct({
|
|
64
64
|
agentWorkflowId: Schema.String,
|
|
65
65
|
changelog: Schema.optional(Schema.String),
|
|
66
66
|
outputs: Schema.Record(Schema.String, Schema.Unknown)
|
|
67
67
|
});
|
|
68
|
-
const
|
|
69
|
-
const
|
|
68
|
+
const CreateAgentWorkflowRunResponseSchema = Schema.Struct({ workflowRunId: Schema.String });
|
|
69
|
+
const SubmitAgentWorkflowDecisionParamsSchema = Schema.Struct({
|
|
70
70
|
agentWorkflowRunId: Schema.String,
|
|
71
71
|
decision: Schema.Literals(["approve", "reject"])
|
|
72
72
|
});
|
|
73
|
-
const
|
|
74
|
-
const
|
|
75
|
-
const
|
|
76
|
-
const
|
|
77
|
-
const
|
|
73
|
+
const SubmitAgentWorkflowDecisionResponseSchema = Schema.Struct({ decisionId: Schema.String });
|
|
74
|
+
const PushAgentWorkflowParamsSchema = Schema.Struct({ agentWorkflowRunId: Schema.String });
|
|
75
|
+
const PushAgentWorkflowResponseSchema = Schema.Struct({ pushId: Schema.String });
|
|
76
|
+
const ExecuteSafeTxParamsSchema = Schema.Struct({ agentWorkflowRunId: Schema.String });
|
|
77
|
+
const ExecuteSafeTxResponseSchema = Schema.Struct({
|
|
78
78
|
blockchain: Schema.Literals(["ethereum", "base"]),
|
|
79
79
|
transactionHash: Schema.String
|
|
80
80
|
});
|
|
81
81
|
|
|
82
82
|
//#endregion
|
|
83
|
-
export {
|
|
83
|
+
export { AgentWorkflowDecisionSchema, AgentWorkflowRunSchema, AgentWorkflowSchema, AgentWorkflowWithRunsSchema, CreateAgentWorkflowParamsSchema, CreateAgentWorkflowResponseSchema, CreateAgentWorkflowRunParamsSchema, CreateAgentWorkflowRunResponseSchema, ExecuteSafeTxParamsSchema, ExecuteSafeTxResponseSchema, GetAgentWorkflowParamsSchema, ListAgentWorkflowsParamsSchema, ListAgentWorkflowsResponseSchema, PushAgentWorkflowParamsSchema, PushAgentWorkflowResponseSchema, SubmitAgentWorkflowDecisionParamsSchema, SubmitAgentWorkflowDecisionResponseSchema };
|
|
@@ -7,42 +7,42 @@ declare const FeatureFlagsSchema: Schema.Struct<{
|
|
|
7
7
|
readonly apiKeys: Schema.Boolean;
|
|
8
8
|
}>;
|
|
9
9
|
type FeatureFlags = typeof FeatureFlagsSchema.Type;
|
|
10
|
-
declare const
|
|
10
|
+
declare const WhoamiResponseSchema: Schema.Struct<{
|
|
11
11
|
readonly email: Schema.String;
|
|
12
12
|
readonly featureFlags: Schema.Struct<{
|
|
13
13
|
readonly agentWalletApi: Schema.Boolean;
|
|
14
14
|
readonly apiKeys: Schema.Boolean;
|
|
15
15
|
}>;
|
|
16
16
|
readonly id: Schema.String;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
declare const
|
|
17
|
+
}>;
|
|
18
|
+
type WhoamiResponse = typeof WhoamiResponseSchema.Type;
|
|
19
|
+
declare const TokenResponseSchema: Schema.Struct<{
|
|
20
20
|
readonly accessToken: Schema.String;
|
|
21
21
|
readonly expiresIn: Schema.Number;
|
|
22
22
|
readonly refreshToken: Schema.String;
|
|
23
23
|
readonly tokenType: Schema.String;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
type
|
|
27
|
-
type ApiKeyEncoded = { [K in keyof
|
|
28
|
-
declare const
|
|
29
|
-
declare const
|
|
24
|
+
}>;
|
|
25
|
+
type TokenResponse = typeof TokenResponseSchema.Type;
|
|
26
|
+
type ApiKey = Pick<ApiKey$1, "id" | "name" | "start" | "createdAt" | "lastRequest">;
|
|
27
|
+
type ApiKeyEncoded = { [K in keyof ApiKey]: ApiKey[K] extends Date ? string : ApiKey[K] extends Date | null ? string | null : ApiKey[K] };
|
|
28
|
+
declare const ApiKeySchema: Schema.Codec<ApiKey, ApiKeyEncoded>;
|
|
29
|
+
declare const CreatedApiKeySchema: Schema.Struct<{
|
|
30
30
|
readonly id: Schema.String;
|
|
31
31
|
readonly key: Schema.String;
|
|
32
32
|
readonly name: Schema.NullOr<Schema.String>;
|
|
33
33
|
}>;
|
|
34
|
-
type
|
|
35
|
-
declare const
|
|
36
|
-
readonly apiKeys: Schema.$Array<Schema.Codec<
|
|
34
|
+
type CreatedApiKey = typeof CreatedApiKeySchema.Type;
|
|
35
|
+
declare const ApiKeyListResponseSchema: Schema.Struct<{
|
|
36
|
+
readonly apiKeys: Schema.$Array<Schema.Codec<ApiKey, ApiKeyEncoded, never, never>>;
|
|
37
37
|
}>;
|
|
38
|
-
type
|
|
39
|
-
declare const
|
|
38
|
+
type ApiKeyListResponse = typeof ApiKeyListResponseSchema.Type;
|
|
39
|
+
declare const CreateApiKeyParamsSchema: Schema.Struct<{
|
|
40
40
|
readonly name: Schema.optional<Schema.String>;
|
|
41
41
|
}>;
|
|
42
|
-
type
|
|
43
|
-
declare const
|
|
42
|
+
type CreateApiKeyParams = typeof CreateApiKeyParamsSchema.Type;
|
|
43
|
+
declare const DeleteApiKeyParamsSchema: Schema.Struct<{
|
|
44
44
|
readonly keyId: Schema.String;
|
|
45
45
|
}>;
|
|
46
|
-
type
|
|
46
|
+
type DeleteApiKeyParams = typeof DeleteApiKeyParamsSchema.Type;
|
|
47
47
|
//#endregion
|
|
48
|
-
export { ApiKey, ApiKeyListResponse,
|
|
48
|
+
export { ApiKey, ApiKeyListResponse, ApiKeyListResponseSchema, ApiKeySchema, CreateApiKeyParams, CreateApiKeyParamsSchema, CreatedApiKey, CreatedApiKeySchema, DeleteApiKeyParams, DeleteApiKeyParamsSchema, FeatureFlags, FeatureFlagsSchema, TokenResponse, TokenResponseSchema, WhoamiResponse, WhoamiResponseSchema };
|
package/dist/src/schemas/auth.js
CHANGED
|
@@ -5,32 +5,32 @@ const FeatureFlagsSchema = Schema.Struct({
|
|
|
5
5
|
agentWalletApi: Schema.Boolean,
|
|
6
6
|
apiKeys: Schema.Boolean
|
|
7
7
|
});
|
|
8
|
-
|
|
8
|
+
const WhoamiResponseSchema = Schema.Struct({
|
|
9
9
|
email: Schema.String,
|
|
10
10
|
featureFlags: FeatureFlagsSchema,
|
|
11
11
|
id: Schema.String
|
|
12
|
-
})
|
|
13
|
-
|
|
12
|
+
});
|
|
13
|
+
const TokenResponseSchema = Schema.Struct({
|
|
14
14
|
accessToken: Schema.String,
|
|
15
15
|
expiresIn: Schema.Number,
|
|
16
16
|
refreshToken: Schema.String,
|
|
17
17
|
tokenType: Schema.String
|
|
18
|
-
})
|
|
19
|
-
const
|
|
18
|
+
});
|
|
19
|
+
const ApiKeySchema = Schema.Struct({
|
|
20
20
|
createdAt: Schema.DateFromString,
|
|
21
21
|
id: Schema.String,
|
|
22
22
|
lastRequest: Schema.NullOr(Schema.DateFromString),
|
|
23
23
|
name: Schema.NullOr(Schema.String),
|
|
24
24
|
start: Schema.NullOr(Schema.String)
|
|
25
25
|
});
|
|
26
|
-
const
|
|
26
|
+
const CreatedApiKeySchema = Schema.Struct({
|
|
27
27
|
id: Schema.String,
|
|
28
28
|
key: Schema.String,
|
|
29
29
|
name: Schema.NullOr(Schema.String)
|
|
30
30
|
});
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const
|
|
31
|
+
const ApiKeyListResponseSchema = Schema.Struct({ apiKeys: Schema.Array(ApiKeySchema) });
|
|
32
|
+
const CreateApiKeyParamsSchema = Schema.Struct({ name: Schema.optional(Schema.String) });
|
|
33
|
+
const DeleteApiKeyParamsSchema = Schema.Struct({ keyId: Schema.String });
|
|
34
34
|
|
|
35
35
|
//#endregion
|
|
36
|
-
export {
|
|
36
|
+
export { ApiKeyListResponseSchema, ApiKeySchema, CreateApiKeyParamsSchema, CreatedApiKeySchema, DeleteApiKeyParamsSchema, FeatureFlagsSchema, TokenResponseSchema, WhoamiResponseSchema };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
|
|
3
3
|
//#region src/schemas/bookmarks.d.ts
|
|
4
|
-
declare const
|
|
5
|
-
type
|
|
6
|
-
declare const
|
|
4
|
+
declare const BookmarkObjectTypeSchema: Schema.Literals<readonly ["contract", "transaction", "wallet"]>;
|
|
5
|
+
type BookmarkObjectType = typeof BookmarkObjectTypeSchema.Type;
|
|
6
|
+
declare const ContractBookmarkSchema: Schema.Struct<{
|
|
7
7
|
readonly blockchain: Schema.String;
|
|
8
8
|
readonly contractAddress: Schema.String;
|
|
9
9
|
readonly contractName: Schema.NullOr<Schema.String>;
|
|
@@ -12,70 +12,92 @@ declare const ContractBookmark_base: Schema.Class<ContractBookmark, Schema.Struc
|
|
|
12
12
|
readonly label: Schema.NullOr<Schema.String>;
|
|
13
13
|
readonly updatedAt: Schema.String;
|
|
14
14
|
readonly userLabel: Schema.NullOr<Schema.String>;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
declare const
|
|
15
|
+
}>;
|
|
16
|
+
type ContractBookmark = typeof ContractBookmarkSchema.Type;
|
|
17
|
+
declare const TransactionBookmarkSchema: Schema.Struct<{
|
|
18
18
|
readonly blockchain: Schema.String;
|
|
19
19
|
readonly createdAt: Schema.String;
|
|
20
20
|
readonly id: Schema.String;
|
|
21
21
|
readonly transactionHash: Schema.String;
|
|
22
22
|
readonly updatedAt: Schema.String;
|
|
23
23
|
readonly userLabel: Schema.NullOr<Schema.String>;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
declare const
|
|
24
|
+
}>;
|
|
25
|
+
type TransactionBookmark = typeof TransactionBookmarkSchema.Type;
|
|
26
|
+
declare const WalletBookmarkSchema: Schema.Struct<{
|
|
27
27
|
readonly createdAt: Schema.String;
|
|
28
28
|
readonly id: Schema.String;
|
|
29
29
|
readonly updatedAt: Schema.String;
|
|
30
30
|
readonly userLabel: Schema.NullOr<Schema.String>;
|
|
31
31
|
readonly walletAddress: Schema.String;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
declare const
|
|
35
|
-
readonly contracts: Schema.$Array<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
32
|
+
}>;
|
|
33
|
+
type WalletBookmark = typeof WalletBookmarkSchema.Type;
|
|
34
|
+
declare const BookmarksListSchema: Schema.Struct<{
|
|
35
|
+
readonly contracts: Schema.$Array<Schema.Struct<{
|
|
36
|
+
readonly blockchain: Schema.String;
|
|
37
|
+
readonly contractAddress: Schema.String;
|
|
38
|
+
readonly contractName: Schema.NullOr<Schema.String>;
|
|
39
|
+
readonly createdAt: Schema.String;
|
|
40
|
+
readonly id: Schema.String;
|
|
41
|
+
readonly label: Schema.NullOr<Schema.String>;
|
|
42
|
+
readonly updatedAt: Schema.String;
|
|
43
|
+
readonly userLabel: Schema.NullOr<Schema.String>;
|
|
44
|
+
}>>;
|
|
45
|
+
readonly transactions: Schema.$Array<Schema.Struct<{
|
|
46
|
+
readonly blockchain: Schema.String;
|
|
47
|
+
readonly createdAt: Schema.String;
|
|
48
|
+
readonly id: Schema.String;
|
|
49
|
+
readonly transactionHash: Schema.String;
|
|
50
|
+
readonly updatedAt: Schema.String;
|
|
51
|
+
readonly userLabel: Schema.NullOr<Schema.String>;
|
|
52
|
+
}>>;
|
|
53
|
+
readonly wallets: Schema.$Array<Schema.Struct<{
|
|
54
|
+
readonly createdAt: Schema.String;
|
|
55
|
+
readonly id: Schema.String;
|
|
56
|
+
readonly updatedAt: Schema.String;
|
|
57
|
+
readonly userLabel: Schema.NullOr<Schema.String>;
|
|
58
|
+
readonly walletAddress: Schema.String;
|
|
59
|
+
}>>;
|
|
60
|
+
}>;
|
|
61
|
+
type BookmarksList = typeof BookmarksListSchema.Type;
|
|
62
|
+
declare const BookmarkResponseSchema: Schema.Struct<{
|
|
41
63
|
readonly bookmark: Schema.Struct<{
|
|
42
64
|
readonly id: Schema.optional<Schema.String>;
|
|
43
65
|
readonly userLabel: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
44
66
|
}>;
|
|
45
67
|
readonly objectType: Schema.String;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
declare const
|
|
68
|
+
}>;
|
|
69
|
+
type BookmarkResponse = typeof BookmarkResponseSchema.Type;
|
|
70
|
+
declare const AddContractBookmarkParamsSchema: Schema.Struct<{
|
|
49
71
|
readonly address: Schema.brand<Schema.String, "EvmAddress">;
|
|
50
72
|
readonly blockchain: Schema.Literals<readonly ["ethereum", "base"]>;
|
|
51
73
|
readonly label: Schema.optional<Schema.String>;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
declare const
|
|
74
|
+
}>;
|
|
75
|
+
type AddContractBookmarkParams = typeof AddContractBookmarkParamsSchema.Type;
|
|
76
|
+
declare const AddTransactionBookmarkParamsSchema: Schema.Struct<{
|
|
55
77
|
readonly blockchain: Schema.Literals<readonly ["ethereum", "base"]>;
|
|
56
78
|
readonly label: Schema.optional<Schema.String>;
|
|
57
79
|
readonly txHash: Schema.String;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
declare const
|
|
80
|
+
}>;
|
|
81
|
+
type AddTransactionBookmarkParams = typeof AddTransactionBookmarkParamsSchema.Type;
|
|
82
|
+
declare const AddWalletBookmarkParamsSchema: Schema.Struct<{
|
|
61
83
|
readonly address: Schema.brand<Schema.String, "EvmAddress">;
|
|
62
84
|
readonly label: Schema.optional<Schema.String>;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
declare const
|
|
85
|
+
}>;
|
|
86
|
+
type AddWalletBookmarkParams = typeof AddWalletBookmarkParamsSchema.Type;
|
|
87
|
+
declare const UpdateBookmarkLabelParamsSchema: Schema.Struct<{
|
|
66
88
|
readonly address: Schema.optional<Schema.String>;
|
|
67
89
|
readonly blockchain: Schema.optional<Schema.Literals<readonly ["ethereum", "base"]>>;
|
|
68
90
|
readonly label: Schema.NullOr<Schema.String>;
|
|
69
91
|
readonly objectType: Schema.Literals<readonly ["contract", "transaction", "wallet"]>;
|
|
70
92
|
readonly txHash: Schema.optional<Schema.String>;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
declare const
|
|
93
|
+
}>;
|
|
94
|
+
type UpdateBookmarkLabelParams = typeof UpdateBookmarkLabelParamsSchema.Type;
|
|
95
|
+
declare const DeleteBookmarkParamsSchema: Schema.Struct<{
|
|
74
96
|
readonly address: Schema.optional<Schema.String>;
|
|
75
97
|
readonly blockchain: Schema.optional<Schema.Literals<readonly ["ethereum", "base"]>>;
|
|
76
98
|
readonly objectType: Schema.Literals<readonly ["contract", "transaction", "wallet"]>;
|
|
77
99
|
readonly txHash: Schema.optional<Schema.String>;
|
|
78
|
-
}
|
|
79
|
-
|
|
100
|
+
}>;
|
|
101
|
+
type DeleteBookmarkParams = typeof DeleteBookmarkParamsSchema.Type;
|
|
80
102
|
//#endregion
|
|
81
|
-
export { AddContractBookmarkParams, AddTransactionBookmarkParams, AddWalletBookmarkParams, BookmarkObjectType,
|
|
103
|
+
export { AddContractBookmarkParams, AddContractBookmarkParamsSchema, AddTransactionBookmarkParams, AddTransactionBookmarkParamsSchema, AddWalletBookmarkParams, AddWalletBookmarkParamsSchema, BookmarkObjectType, BookmarkObjectTypeSchema, BookmarkResponse, BookmarkResponseSchema, BookmarksList, BookmarksListSchema, ContractBookmark, ContractBookmarkSchema, DeleteBookmarkParams, DeleteBookmarkParamsSchema, TransactionBookmark, TransactionBookmarkSchema, UpdateBookmarkLabelParams, UpdateBookmarkLabelParamsSchema, WalletBookmark, WalletBookmarkSchema };
|