@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,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
|
-
|
|
8
|
-
groupId: Schema.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
blockchain:
|
|
15
|
-
safeAddress: EvmAddress,
|
|
16
|
-
name: Schema.NullOr(Schema.String),
|
|
6
|
+
const AgentWalletSchema = Schema.Struct({
|
|
7
|
+
address: EvmAddressSchema,
|
|
8
|
+
groupId: Schema.String.check(Schema.isUUID()),
|
|
9
|
+
id: Schema.String.check(Schema.isUUID()),
|
|
10
|
+
intent: Schema.NullOr(Schema.String),
|
|
11
|
+
name: Schema.NullOr(Schema.String)
|
|
12
|
+
});
|
|
13
|
+
const AgentWalletSafeSchema = Schema.Struct({
|
|
14
|
+
blockchain: BlockchainSchema,
|
|
17
15
|
intent: Schema.NullOr(Schema.String),
|
|
18
16
|
isProposer: Schema.Boolean,
|
|
19
|
-
isSigner: Schema.Boolean
|
|
20
|
-
}) {};
|
|
21
|
-
var LinkedAgentWallet = class extends Schema.Class("LinkedAgentWallet")({
|
|
22
|
-
agentWalletId: Schema.UUID,
|
|
23
|
-
address: EvmAddress,
|
|
17
|
+
isSigner: Schema.Boolean,
|
|
24
18
|
name: Schema.NullOr(Schema.String),
|
|
19
|
+
safeAddress: EvmAddressSchema
|
|
20
|
+
});
|
|
21
|
+
const LinkedAgentWalletSchema = Schema.Struct({
|
|
22
|
+
address: EvmAddressSchema,
|
|
23
|
+
agentWalletId: Schema.String.check(Schema.isUUID()),
|
|
25
24
|
intent: Schema.NullOr(Schema.String),
|
|
26
25
|
isProposer: Schema.Boolean,
|
|
27
|
-
isSigner: Schema.Boolean
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
intent: Schema.NullOr(Schema.String)
|
|
34
|
-
}) {};
|
|
35
|
-
var AgentWalletsListParams = class extends Schema.Class("AgentWalletsListParams")({ groupId: Schema.optional(Schema.UUID) }) {};
|
|
36
|
-
var AgentWalletsList = class extends Schema.Class("AgentWalletsList")({ agentWallets: Schema.Array(AgentWallet) }) {};
|
|
37
|
-
var AgentWalletSafesList = class extends Schema.Class("AgentWalletSafesList")({ safes: Schema.Array(AgentWalletSafe) }) {};
|
|
38
|
-
var AgentSafe = class extends Schema.Class("AgentSafe")({
|
|
39
|
-
blockchain: Blockchain,
|
|
40
|
-
safeAddress: EvmAddress,
|
|
26
|
+
isSigner: Schema.Boolean,
|
|
27
|
+
name: Schema.NullOr(Schema.String)
|
|
28
|
+
});
|
|
29
|
+
const AgentSafeMetadataSchema = Schema.Struct({
|
|
30
|
+
blockchain: BlockchainSchema,
|
|
31
|
+
intent: Schema.NullOr(Schema.String),
|
|
41
32
|
name: Schema.NullOr(Schema.String),
|
|
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,
|
|
42
40
|
intent: Schema.NullOr(Schema.String),
|
|
43
|
-
linkedAgentWallets: Schema.Array(
|
|
44
|
-
owners: Schema.Array(EvmAddress),
|
|
45
|
-
threshold: Schema.Number,
|
|
46
|
-
safeUrl: Schema.String
|
|
47
|
-
}) {};
|
|
48
|
-
var SetSafeProposerParams = class extends Schema.Class("SetSafeProposerParams")({
|
|
49
|
-
agentWalletAddress: EvmAddress,
|
|
50
|
-
name: OptionalString,
|
|
51
|
-
intent: OptionalString
|
|
52
|
-
}) {};
|
|
53
|
-
var SetSafeProposerResponse = class extends Schema.Class("SetSafeProposerResponse")({
|
|
54
|
-
blockchain: Blockchain,
|
|
55
|
-
safeAddress: EvmAddress,
|
|
41
|
+
linkedAgentWallets: Schema.Array(LinkedAgentWalletSchema),
|
|
56
42
|
name: Schema.NullOr(Schema.String),
|
|
43
|
+
owners: Schema.Array(EvmAddressSchema),
|
|
44
|
+
safeAddress: EvmAddressSchema,
|
|
45
|
+
safeUrl: Schema.String,
|
|
46
|
+
threshold: Schema.Number
|
|
47
|
+
});
|
|
48
|
+
const SetSafeProposerParamsSchema = Schema.Struct({
|
|
49
|
+
agentWalletAddress: EvmAddressSchema,
|
|
50
|
+
intent: OptionalString,
|
|
51
|
+
name: OptionalString
|
|
52
|
+
});
|
|
53
|
+
const SetSafeProposerResponseSchema = Schema.Struct({
|
|
54
|
+
agentWalletAddress: EvmAddressSchema,
|
|
55
|
+
blockchain: BlockchainSchema,
|
|
57
56
|
intent: Schema.NullOr(Schema.String),
|
|
58
|
-
agentWalletAddress: EvmAddress,
|
|
59
57
|
isProposer: Schema.Boolean,
|
|
60
|
-
isSigner: Schema.Boolean
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
58
|
+
isSigner: Schema.Boolean,
|
|
59
|
+
name: Schema.NullOr(Schema.String),
|
|
60
|
+
safeAddress: EvmAddressSchema
|
|
61
|
+
});
|
|
62
|
+
const EditAgentSafeMetadataParamsSchema = Schema.Struct({
|
|
63
|
+
intent: OptionalString,
|
|
64
|
+
name: OptionalString
|
|
65
|
+
});
|
|
66
66
|
|
|
67
67
|
//#endregion
|
|
68
|
-
export {
|
|
68
|
+
export { AgentSafeMetadataSchema, AgentSafeSchema, AgentWalletSafeSchema, AgentWalletSafesListSchema, AgentWalletSchema, AgentWalletsListParamsSchema, AgentWalletsListSchema, EditAgentSafeMetadataParamsSchema, LinkedAgentWalletSchema, SetSafeProposerParamsSchema, SetSafeProposerResponseSchema };
|
|
@@ -1,120 +1,120 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
|
|
3
3
|
//#region src/schemas/agent-workflows.d.ts
|
|
4
|
-
declare const
|
|
5
|
-
|
|
6
|
-
groupId:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
updatedAt:
|
|
12
|
-
}>;
|
|
13
|
-
type
|
|
14
|
-
declare const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
updatedAt:
|
|
21
|
-
}>;
|
|
22
|
-
type
|
|
23
|
-
declare const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}>;
|
|
32
|
-
type
|
|
33
|
-
declare const
|
|
34
|
-
|
|
35
|
-
groupId:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
outputs: Schema
|
|
45
|
-
|
|
46
|
-
createdAt: typeof Schema.String;
|
|
47
|
-
updatedAt: typeof Schema.String;
|
|
4
|
+
declare const AgentWorkflowSchema: Schema.Struct<{
|
|
5
|
+
readonly createdAt: Schema.String;
|
|
6
|
+
readonly groupId: Schema.String;
|
|
7
|
+
readonly id: Schema.String;
|
|
8
|
+
readonly intent: Schema.NullOr<Schema.String>;
|
|
9
|
+
readonly name: Schema.NullOr<Schema.String>;
|
|
10
|
+
readonly type: Schema.String;
|
|
11
|
+
readonly updatedAt: Schema.String;
|
|
12
|
+
}>;
|
|
13
|
+
type AgentWorkflow = typeof AgentWorkflowSchema.Type;
|
|
14
|
+
declare const AgentWorkflowRunSchema: Schema.Struct<{
|
|
15
|
+
readonly agentWorkflowId: Schema.String;
|
|
16
|
+
readonly changelog: Schema.String;
|
|
17
|
+
readonly createdAt: Schema.String;
|
|
18
|
+
readonly id: Schema.String;
|
|
19
|
+
readonly outputs: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
20
|
+
readonly updatedAt: Schema.String;
|
|
21
|
+
}>;
|
|
22
|
+
type AgentWorkflowRun = typeof AgentWorkflowRunSchema.Type;
|
|
23
|
+
declare const AgentWorkflowDecisionSchema: Schema.Struct<{
|
|
24
|
+
readonly agentWorkflowRunId: Schema.String;
|
|
25
|
+
readonly createdAt: Schema.String;
|
|
26
|
+
readonly decision: Schema.Literals<readonly ["approve", "reject"]>;
|
|
27
|
+
readonly groupId: Schema.String;
|
|
28
|
+
readonly id: Schema.String;
|
|
29
|
+
readonly updatedAt: Schema.String;
|
|
30
|
+
readonly userId: Schema.String;
|
|
31
|
+
}>;
|
|
32
|
+
type AgentWorkflowDecision = typeof AgentWorkflowDecisionSchema.Type;
|
|
33
|
+
declare const AgentWorkflowWithRunsSchema: Schema.Struct<{
|
|
34
|
+
readonly createdAt: Schema.String;
|
|
35
|
+
readonly groupId: Schema.String;
|
|
36
|
+
readonly id: Schema.String;
|
|
37
|
+
readonly intent: Schema.NullOr<Schema.String>;
|
|
38
|
+
readonly name: Schema.NullOr<Schema.String>;
|
|
39
|
+
readonly runs: Schema.$Array<Schema.Struct<{
|
|
40
|
+
readonly agentWorkflowId: Schema.String;
|
|
41
|
+
readonly changelog: Schema.String;
|
|
42
|
+
readonly createdAt: Schema.String;
|
|
43
|
+
readonly id: Schema.String;
|
|
44
|
+
readonly outputs: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
45
|
+
readonly updatedAt: Schema.String;
|
|
48
46
|
}>>;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
intent: Schema.optional<
|
|
56
|
-
|
|
57
|
-
type
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
type
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
47
|
+
readonly type: Schema.String;
|
|
48
|
+
readonly updatedAt: Schema.String;
|
|
49
|
+
}>;
|
|
50
|
+
type AgentWorkflowWithRuns = typeof AgentWorkflowWithRunsSchema.Type;
|
|
51
|
+
declare const CreateAgentWorkflowParamsSchema: Schema.Struct<{
|
|
52
|
+
readonly groupId: Schema.String;
|
|
53
|
+
readonly intent: Schema.optional<Schema.String>;
|
|
54
|
+
readonly name: Schema.String;
|
|
55
|
+
readonly type: Schema.Literals<readonly ["safe_transaction", "wallet_transaction", "group_membership_change", "group_quorum_change"]>;
|
|
56
|
+
}>;
|
|
57
|
+
type CreateAgentWorkflowParams = typeof CreateAgentWorkflowParamsSchema.Type;
|
|
58
|
+
declare const CreateAgentWorkflowResponseSchema: Schema.Struct<{
|
|
59
|
+
readonly workflowId: Schema.String;
|
|
60
|
+
}>;
|
|
61
|
+
type CreateAgentWorkflowResponse = typeof CreateAgentWorkflowResponseSchema.Type;
|
|
62
|
+
declare const ListAgentWorkflowsParamsSchema: Schema.Struct<{
|
|
63
|
+
readonly groupId: Schema.String;
|
|
64
|
+
readonly type: Schema.optional<Schema.Literals<readonly ["safe_transaction", "wallet_transaction", "group_membership_change", "group_quorum_change"]>>;
|
|
65
|
+
}>;
|
|
66
|
+
type ListAgentWorkflowsParams = typeof ListAgentWorkflowsParamsSchema.Type;
|
|
67
|
+
declare const ListAgentWorkflowsResponseSchema: Schema.Struct<{
|
|
68
|
+
readonly workflows: Schema.$Array<Schema.Struct<{
|
|
69
|
+
readonly createdAt: Schema.String;
|
|
70
|
+
readonly groupId: Schema.String;
|
|
71
|
+
readonly id: Schema.String;
|
|
72
|
+
readonly intent: Schema.NullOr<Schema.String>;
|
|
73
|
+
readonly name: Schema.NullOr<Schema.String>;
|
|
74
|
+
readonly type: Schema.String;
|
|
75
|
+
readonly updatedAt: Schema.String;
|
|
76
76
|
}>>;
|
|
77
77
|
}>;
|
|
78
|
-
type
|
|
79
|
-
declare const
|
|
80
|
-
agentWorkflowId:
|
|
78
|
+
type ListAgentWorkflowsResponse = typeof ListAgentWorkflowsResponseSchema.Type;
|
|
79
|
+
declare const GetAgentWorkflowParamsSchema: Schema.Struct<{
|
|
80
|
+
readonly agentWorkflowId: Schema.String;
|
|
81
81
|
}>;
|
|
82
|
-
type
|
|
83
|
-
declare const
|
|
84
|
-
agentWorkflowId:
|
|
85
|
-
|
|
86
|
-
|
|
82
|
+
type GetAgentWorkflowParams = typeof GetAgentWorkflowParamsSchema.Type;
|
|
83
|
+
declare const CreateAgentWorkflowRunParamsSchema: Schema.Struct<{
|
|
84
|
+
readonly agentWorkflowId: Schema.String;
|
|
85
|
+
readonly changelog: Schema.optional<Schema.String>;
|
|
86
|
+
readonly outputs: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
87
87
|
}>;
|
|
88
|
-
type
|
|
89
|
-
declare const
|
|
90
|
-
workflowRunId:
|
|
88
|
+
type CreateAgentWorkflowRunParams = typeof CreateAgentWorkflowRunParamsSchema.Type;
|
|
89
|
+
declare const CreateAgentWorkflowRunResponseSchema: Schema.Struct<{
|
|
90
|
+
readonly workflowRunId: Schema.String;
|
|
91
91
|
}>;
|
|
92
|
-
type
|
|
93
|
-
declare const
|
|
94
|
-
agentWorkflowRunId:
|
|
95
|
-
decision: Schema.
|
|
92
|
+
type CreateAgentWorkflowRunResponse = typeof CreateAgentWorkflowRunResponseSchema.Type;
|
|
93
|
+
declare const SubmitAgentWorkflowDecisionParamsSchema: Schema.Struct<{
|
|
94
|
+
readonly agentWorkflowRunId: Schema.String;
|
|
95
|
+
readonly decision: Schema.Literals<readonly ["approve", "reject"]>;
|
|
96
96
|
}>;
|
|
97
|
-
type
|
|
98
|
-
declare const
|
|
99
|
-
decisionId:
|
|
97
|
+
type SubmitAgentWorkflowDecisionParams = typeof SubmitAgentWorkflowDecisionParamsSchema.Type;
|
|
98
|
+
declare const SubmitAgentWorkflowDecisionResponseSchema: Schema.Struct<{
|
|
99
|
+
readonly decisionId: Schema.String;
|
|
100
100
|
}>;
|
|
101
|
-
type
|
|
102
|
-
declare const
|
|
103
|
-
agentWorkflowRunId:
|
|
101
|
+
type SubmitAgentWorkflowDecisionResponse = typeof SubmitAgentWorkflowDecisionResponseSchema.Type;
|
|
102
|
+
declare const PushAgentWorkflowParamsSchema: Schema.Struct<{
|
|
103
|
+
readonly agentWorkflowRunId: Schema.String;
|
|
104
104
|
}>;
|
|
105
|
-
type
|
|
106
|
-
declare const
|
|
107
|
-
pushId:
|
|
105
|
+
type PushAgentWorkflowParams = typeof PushAgentWorkflowParamsSchema.Type;
|
|
106
|
+
declare const PushAgentWorkflowResponseSchema: Schema.Struct<{
|
|
107
|
+
readonly pushId: Schema.String;
|
|
108
108
|
}>;
|
|
109
|
-
type
|
|
110
|
-
declare const
|
|
111
|
-
agentWorkflowRunId:
|
|
109
|
+
type PushAgentWorkflowResponse = typeof PushAgentWorkflowResponseSchema.Type;
|
|
110
|
+
declare const ExecuteSafeTxParamsSchema: Schema.Struct<{
|
|
111
|
+
readonly agentWorkflowRunId: Schema.String;
|
|
112
112
|
}>;
|
|
113
|
-
type
|
|
114
|
-
declare const
|
|
115
|
-
|
|
116
|
-
|
|
113
|
+
type ExecuteSafeTxParams = typeof ExecuteSafeTxParamsSchema.Type;
|
|
114
|
+
declare const ExecuteSafeTxResponseSchema: Schema.Struct<{
|
|
115
|
+
readonly blockchain: Schema.Literals<readonly ["ethereum", "base"]>;
|
|
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,79 +1,83 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
|
|
3
3
|
//#region src/schemas/agent-workflows.ts
|
|
4
|
-
const
|
|
5
|
-
|
|
4
|
+
const AgentWorkflowSchema = Schema.Struct({
|
|
5
|
+
createdAt: Schema.String,
|
|
6
6
|
groupId: Schema.String,
|
|
7
|
-
|
|
8
|
-
name: Schema.NullOr(Schema.String),
|
|
7
|
+
id: Schema.String,
|
|
9
8
|
intent: Schema.NullOr(Schema.String),
|
|
10
|
-
|
|
9
|
+
name: Schema.NullOr(Schema.String),
|
|
10
|
+
type: Schema.String,
|
|
11
11
|
updatedAt: Schema.String
|
|
12
12
|
});
|
|
13
|
-
const
|
|
14
|
-
id: Schema.String,
|
|
13
|
+
const AgentWorkflowRunSchema = Schema.Struct({
|
|
15
14
|
agentWorkflowId: Schema.String,
|
|
16
|
-
outputs: Schema.Record({
|
|
17
|
-
key: Schema.String,
|
|
18
|
-
value: Schema.Unknown
|
|
19
|
-
}),
|
|
20
15
|
changelog: Schema.String,
|
|
21
16
|
createdAt: Schema.String,
|
|
17
|
+
id: Schema.String,
|
|
18
|
+
outputs: Schema.Record(Schema.String, Schema.Unknown),
|
|
22
19
|
updatedAt: Schema.String
|
|
23
20
|
});
|
|
24
|
-
const
|
|
25
|
-
id: Schema.String,
|
|
21
|
+
const AgentWorkflowDecisionSchema = Schema.Struct({
|
|
26
22
|
agentWorkflowRunId: Schema.String,
|
|
27
|
-
groupId: Schema.String,
|
|
28
|
-
userId: Schema.String,
|
|
29
|
-
decision: Schema.Literal("approve", "reject"),
|
|
30
23
|
createdAt: Schema.String,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const AgentWorkflowWithRuns = Schema.Struct({
|
|
24
|
+
decision: Schema.Literals(["approve", "reject"]),
|
|
25
|
+
groupId: Schema.String,
|
|
34
26
|
id: Schema.String,
|
|
27
|
+
updatedAt: Schema.String,
|
|
28
|
+
userId: Schema.String
|
|
29
|
+
});
|
|
30
|
+
const AgentWorkflowWithRunsSchema = Schema.Struct({
|
|
31
|
+
createdAt: Schema.String,
|
|
35
32
|
groupId: Schema.String,
|
|
36
|
-
|
|
37
|
-
name: Schema.NullOr(Schema.String),
|
|
33
|
+
id: Schema.String,
|
|
38
34
|
intent: Schema.NullOr(Schema.String),
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
name: Schema.NullOr(Schema.String),
|
|
36
|
+
runs: Schema.Array(AgentWorkflowRunSchema),
|
|
37
|
+
type: Schema.String,
|
|
38
|
+
updatedAt: Schema.String
|
|
42
39
|
});
|
|
43
|
-
const
|
|
40
|
+
const CreateAgentWorkflowParamsSchema = Schema.Struct({
|
|
44
41
|
groupId: Schema.String,
|
|
45
|
-
|
|
42
|
+
intent: Schema.optional(Schema.String),
|
|
46
43
|
name: Schema.String,
|
|
47
|
-
|
|
44
|
+
type: Schema.Literals([
|
|
45
|
+
"safe_transaction",
|
|
46
|
+
"wallet_transaction",
|
|
47
|
+
"group_membership_change",
|
|
48
|
+
"group_quorum_change"
|
|
49
|
+
])
|
|
48
50
|
});
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
+
const CreateAgentWorkflowResponseSchema = Schema.Struct({ workflowId: Schema.String });
|
|
52
|
+
const ListAgentWorkflowsParamsSchema = Schema.Struct({
|
|
51
53
|
groupId: Schema.String,
|
|
52
|
-
type: Schema.optional(Schema.
|
|
54
|
+
type: Schema.optional(Schema.Literals([
|
|
55
|
+
"safe_transaction",
|
|
56
|
+
"wallet_transaction",
|
|
57
|
+
"group_membership_change",
|
|
58
|
+
"group_quorum_change"
|
|
59
|
+
]))
|
|
53
60
|
});
|
|
54
|
-
const
|
|
55
|
-
const
|
|
56
|
-
const
|
|
61
|
+
const ListAgentWorkflowsResponseSchema = Schema.Struct({ workflows: Schema.Array(AgentWorkflowSchema) });
|
|
62
|
+
const GetAgentWorkflowParamsSchema = Schema.Struct({ agentWorkflowId: Schema.String });
|
|
63
|
+
const CreateAgentWorkflowRunParamsSchema = Schema.Struct({
|
|
57
64
|
agentWorkflowId: Schema.String,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
value: Schema.Unknown
|
|
61
|
-
}),
|
|
62
|
-
changelog: Schema.optional(Schema.String)
|
|
65
|
+
changelog: Schema.optional(Schema.String),
|
|
66
|
+
outputs: Schema.Record(Schema.String, Schema.Unknown)
|
|
63
67
|
});
|
|
64
|
-
const
|
|
65
|
-
const
|
|
68
|
+
const CreateAgentWorkflowRunResponseSchema = Schema.Struct({ workflowRunId: Schema.String });
|
|
69
|
+
const SubmitAgentWorkflowDecisionParamsSchema = Schema.Struct({
|
|
66
70
|
agentWorkflowRunId: Schema.String,
|
|
67
|
-
decision: Schema.
|
|
71
|
+
decision: Schema.Literals(["approve", "reject"])
|
|
68
72
|
});
|
|
69
|
-
const
|
|
70
|
-
const
|
|
71
|
-
const
|
|
72
|
-
const
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
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
|
+
blockchain: Schema.Literals(["ethereum", "base"]),
|
|
79
|
+
transactionHash: Schema.String
|
|
76
80
|
});
|
|
77
81
|
|
|
78
82
|
//#endregion
|
|
79
|
-
export {
|
|
83
|
+
export { AgentWorkflowDecisionSchema, AgentWorkflowRunSchema, AgentWorkflowSchema, AgentWorkflowWithRunsSchema, CreateAgentWorkflowParamsSchema, CreateAgentWorkflowResponseSchema, CreateAgentWorkflowRunParamsSchema, CreateAgentWorkflowRunResponseSchema, ExecuteSafeTxParamsSchema, ExecuteSafeTxResponseSchema, GetAgentWorkflowParamsSchema, ListAgentWorkflowsParamsSchema, ListAgentWorkflowsResponseSchema, PushAgentWorkflowParamsSchema, PushAgentWorkflowResponseSchema, SubmitAgentWorkflowDecisionParamsSchema, SubmitAgentWorkflowDecisionResponseSchema };
|
|
@@ -3,75 +3,46 @@ import { ApiKey as ApiKey$1 } from "@better-auth/api-key/types";
|
|
|
3
3
|
|
|
4
4
|
//#region src/schemas/auth.d.ts
|
|
5
5
|
declare const FeatureFlagsSchema: Schema.Struct<{
|
|
6
|
-
agentWalletApi:
|
|
7
|
-
apiKeys:
|
|
6
|
+
readonly agentWalletApi: Schema.Boolean;
|
|
7
|
+
readonly apiKeys: Schema.Boolean;
|
|
8
8
|
}>;
|
|
9
9
|
type FeatureFlags = typeof FeatureFlagsSchema.Type;
|
|
10
|
-
declare const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
apiKeys: typeof Schema.Boolean;
|
|
10
|
+
declare const WhoamiResponseSchema: Schema.Struct<{
|
|
11
|
+
readonly email: Schema.String;
|
|
12
|
+
readonly featureFlags: Schema.Struct<{
|
|
13
|
+
readonly agentWalletApi: Schema.Boolean;
|
|
14
|
+
readonly apiKeys: Schema.Boolean;
|
|
16
15
|
}>;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
declare class WhoamiResponse extends WhoamiResponse_base {}
|
|
35
|
-
declare const TokenResponse_base: Schema.Class<TokenResponse, {
|
|
36
|
-
accessToken: typeof Schema.String;
|
|
37
|
-
refreshToken: typeof Schema.String;
|
|
38
|
-
expiresIn: typeof Schema.Number;
|
|
39
|
-
tokenType: typeof Schema.String;
|
|
40
|
-
}, Schema.Struct.Encoded<{
|
|
41
|
-
accessToken: typeof Schema.String;
|
|
42
|
-
refreshToken: typeof Schema.String;
|
|
43
|
-
expiresIn: typeof Schema.Number;
|
|
44
|
-
tokenType: typeof Schema.String;
|
|
45
|
-
}>, never, {
|
|
46
|
-
readonly accessToken: string;
|
|
47
|
-
} & {
|
|
48
|
-
readonly refreshToken: string;
|
|
49
|
-
} & {
|
|
50
|
-
readonly expiresIn: number;
|
|
51
|
-
} & {
|
|
52
|
-
readonly tokenType: string;
|
|
53
|
-
}, {}, {}>;
|
|
54
|
-
declare class TokenResponse extends TokenResponse_base {}
|
|
55
|
-
type ApiKeyType = Pick<ApiKey$1, "id" | "name" | "start" | "createdAt" | "lastRequest">;
|
|
56
|
-
type ApiKeyEncoded = { [K in keyof ApiKeyType]: ApiKeyType[K] extends Date ? string : ApiKeyType[K] extends Date | null ? string | null : ApiKeyType[K] };
|
|
57
|
-
declare const ApiKey: Schema.Schema<ApiKeyType, ApiKeyEncoded>;
|
|
58
|
-
declare const CreatedApiKey: Schema.Struct<{
|
|
59
|
-
id: typeof Schema.String;
|
|
60
|
-
key: typeof Schema.String;
|
|
61
|
-
name: Schema.NullOr<typeof Schema.String>;
|
|
16
|
+
readonly id: Schema.String;
|
|
17
|
+
}>;
|
|
18
|
+
type WhoamiResponse = typeof WhoamiResponseSchema.Type;
|
|
19
|
+
declare const TokenResponseSchema: Schema.Struct<{
|
|
20
|
+
readonly accessToken: Schema.String;
|
|
21
|
+
readonly expiresIn: Schema.Number;
|
|
22
|
+
readonly refreshToken: Schema.String;
|
|
23
|
+
readonly tokenType: Schema.String;
|
|
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
|
+
readonly id: Schema.String;
|
|
31
|
+
readonly key: Schema.String;
|
|
32
|
+
readonly name: Schema.NullOr<Schema.String>;
|
|
62
33
|
}>;
|
|
63
|
-
type
|
|
64
|
-
declare const
|
|
65
|
-
apiKeys: Schema
|
|
34
|
+
type CreatedApiKey = typeof CreatedApiKeySchema.Type;
|
|
35
|
+
declare const ApiKeyListResponseSchema: Schema.Struct<{
|
|
36
|
+
readonly apiKeys: Schema.$Array<Schema.Codec<ApiKey, ApiKeyEncoded, never, never>>;
|
|
66
37
|
}>;
|
|
67
|
-
type
|
|
68
|
-
declare const
|
|
69
|
-
name: Schema.optional<
|
|
38
|
+
type ApiKeyListResponse = typeof ApiKeyListResponseSchema.Type;
|
|
39
|
+
declare const CreateApiKeyParamsSchema: Schema.Struct<{
|
|
40
|
+
readonly name: Schema.optional<Schema.String>;
|
|
70
41
|
}>;
|
|
71
|
-
type
|
|
72
|
-
declare const
|
|
73
|
-
keyId:
|
|
42
|
+
type CreateApiKeyParams = typeof CreateApiKeyParamsSchema.Type;
|
|
43
|
+
declare const DeleteApiKeyParamsSchema: Schema.Struct<{
|
|
44
|
+
readonly keyId: Schema.String;
|
|
74
45
|
}>;
|
|
75
|
-
type
|
|
46
|
+
type DeleteApiKeyParams = typeof DeleteApiKeyParamsSchema.Type;
|
|
76
47
|
//#endregion
|
|
77
|
-
export { ApiKey, ApiKeyListResponse,
|
|
48
|
+
export { ApiKey, ApiKeyListResponse, ApiKeyListResponseSchema, ApiKeySchema, CreateApiKeyParams, CreateApiKeyParamsSchema, CreatedApiKey, CreatedApiKeySchema, DeleteApiKeyParams, DeleteApiKeyParamsSchema, FeatureFlags, FeatureFlagsSchema, TokenResponse, TokenResponseSchema, WhoamiResponse, WhoamiResponseSchema };
|