@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.
Files changed (99) hide show
  1. package/dist/index.d.ts +17 -17
  2. package/dist/index.js +17 -17
  3. package/dist/src/config.d.ts +11 -11
  4. package/dist/src/config.js +9 -12
  5. package/dist/src/errors.d.ts +35 -44
  6. package/dist/src/errors.js +19 -16
  7. package/dist/src/live/ActionsServiceLive.d.ts +3 -3
  8. package/dist/src/live/ActionsServiceLive.js +14 -14
  9. package/dist/src/live/AdaptersServiceLive.d.ts +3 -3
  10. package/dist/src/live/AdaptersServiceLive.js +8 -8
  11. package/dist/src/live/AgentSafesServiceLive.d.ts +3 -3
  12. package/dist/src/live/AgentSafesServiceLive.js +5 -5
  13. package/dist/src/live/AgentWalletsServiceLive.d.ts +3 -3
  14. package/dist/src/live/AgentWalletsServiceLive.js +4 -4
  15. package/dist/src/live/AgentWorkflowsServiceLive.d.ts +3 -3
  16. package/dist/src/live/AgentWorkflowsServiceLive.js +14 -14
  17. package/dist/src/live/AuthServiceLive.d.ts +3 -3
  18. package/dist/src/live/AuthServiceLive.js +7 -7
  19. package/dist/src/live/BookmarksServiceLive.d.ts +3 -3
  20. package/dist/src/live/BookmarksServiceLive.js +20 -20
  21. package/dist/src/live/CodeBlocksServiceLive.d.ts +3 -3
  22. package/dist/src/live/CodeBlocksServiceLive.js +11 -11
  23. package/dist/src/live/CollectionsServiceLive.d.ts +3 -3
  24. package/dist/src/live/CollectionsServiceLive.js +6 -6
  25. package/dist/src/live/ContractsServiceLive.d.ts +3 -3
  26. package/dist/src/live/ContractsServiceLive.js +10 -10
  27. package/dist/src/live/DocsServiceLive.d.ts +3 -3
  28. package/dist/src/live/DocsServiceLive.js +4 -4
  29. package/dist/src/live/GroupsServiceLive.d.ts +3 -3
  30. package/dist/src/live/GroupsServiceLive.js +9 -9
  31. package/dist/src/live/HalServiceLive.d.ts +3 -3
  32. package/dist/src/live/HalServiceLive.js +12 -12
  33. package/dist/src/live/TransactionsServiceLive.d.ts +3 -3
  34. package/dist/src/live/TransactionsServiceLive.js +18 -18
  35. package/dist/src/live/WalletsServiceLive.d.ts +3 -3
  36. package/dist/src/live/WalletsServiceLive.js +18 -18
  37. package/dist/src/live/http.d.ts +6 -6
  38. package/dist/src/live/http.js +15 -15
  39. package/dist/src/schemas/actions.d.ts +179 -339
  40. package/dist/src/schemas/actions.js +80 -76
  41. package/dist/src/schemas/adapters.d.ts +7 -17
  42. package/dist/src/schemas/adapters.js +5 -5
  43. package/dist/src/schemas/agent-wallets.d.ts +98 -222
  44. package/dist/src/schemas/agent-wallets.js +52 -52
  45. package/dist/src/schemas/agent-workflows.d.ts +104 -104
  46. package/dist/src/schemas/agent-workflows.js +53 -49
  47. package/dist/src/schemas/auth.d.ts +35 -64
  48. package/dist/src/schemas/auth.js +16 -16
  49. package/dist/src/schemas/bookmarks.d.ts +98 -216
  50. package/dist/src/schemas/bookmarks.js +55 -51
  51. package/dist/src/schemas/codeblocks.d.ts +149 -308
  52. package/dist/src/schemas/codeblocks.js +72 -67
  53. package/dist/src/schemas/collections.d.ts +120 -232
  54. package/dist/src/schemas/collections.js +48 -44
  55. package/dist/src/schemas/common.d.ts +13 -29
  56. package/dist/src/schemas/common.js +8 -8
  57. package/dist/src/schemas/contracts.d.ts +256 -447
  58. package/dist/src/schemas/contracts.js +92 -103
  59. package/dist/src/schemas/docs.d.ts +12 -29
  60. package/dist/src/schemas/docs.js +9 -9
  61. package/dist/src/schemas/groups.d.ts +74 -74
  62. package/dist/src/schemas/groups.js +32 -32
  63. package/dist/src/schemas/hal.d.ts +109 -217
  64. package/dist/src/schemas/hal.js +44 -42
  65. package/dist/src/schemas/transactions.d.ts +648 -926
  66. package/dist/src/schemas/transactions.js +158 -162
  67. package/dist/src/schemas/wallets.d.ts +577 -731
  68. package/dist/src/schemas/wallets.js +206 -145
  69. package/dist/src/services/ActionsService.d.ts +3 -3
  70. package/dist/src/services/ActionsService.js +2 -2
  71. package/dist/src/services/AdaptersService.d.ts +1 -1
  72. package/dist/src/services/AdaptersService.js +2 -2
  73. package/dist/src/services/AgentSafesService.d.ts +5 -5
  74. package/dist/src/services/AgentSafesService.js +2 -2
  75. package/dist/src/services/AgentWalletsService.d.ts +3 -3
  76. package/dist/src/services/AgentWalletsService.js +2 -2
  77. package/dist/src/services/AgentWorkflowsService.d.ts +11 -11
  78. package/dist/src/services/AgentWorkflowsService.js +6 -2
  79. package/dist/src/services/AuthService.d.ts +5 -5
  80. package/dist/src/services/AuthService.js +2 -2
  81. package/dist/src/services/BookmarksService.d.ts +3 -3
  82. package/dist/src/services/BookmarksService.js +2 -2
  83. package/dist/src/services/CodeBlocksService.d.ts +1 -1
  84. package/dist/src/services/CodeBlocksService.js +2 -2
  85. package/dist/src/services/CollectionsService.d.ts +1 -1
  86. package/dist/src/services/CollectionsService.js +2 -2
  87. package/dist/src/services/ContractsService.d.ts +6 -6
  88. package/dist/src/services/ContractsService.js +2 -2
  89. package/dist/src/services/DocsService.d.ts +2 -2
  90. package/dist/src/services/DocsService.js +2 -2
  91. package/dist/src/services/GroupsService.d.ts +13 -13
  92. package/dist/src/services/GroupsService.js +4 -2
  93. package/dist/src/services/HalService.d.ts +1 -1
  94. package/dist/src/services/HalService.js +2 -2
  95. package/dist/src/services/TransactionsService.d.ts +5 -5
  96. package/dist/src/services/TransactionsService.js +2 -2
  97. package/dist/src/services/WalletsService.d.ts +5 -5
  98. package/dist/src/services/WalletsService.js +2 -2
  99. package/package.json +13 -18
@@ -1,68 +1,68 @@
1
- import { Blockchain, EvmAddress } from "./common.js";
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
- var AgentWallet = class extends Schema.Class("AgentWallet")({
7
- id: Schema.UUID,
8
- groupId: Schema.UUID,
9
- address: EvmAddress,
10
- name: Schema.NullOr(Schema.String),
11
- intent: Schema.NullOr(Schema.String)
12
- }) {};
13
- var AgentWalletSafe = class extends Schema.Class("AgentWalletSafe")({
14
- blockchain: 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
- var AgentSafeMetadata = class extends Schema.Class("AgentSafeMetadata")({
30
- blockchain: Blockchain,
31
- safeAddress: EvmAddress,
32
- name: Schema.NullOr(Schema.String),
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(LinkedAgentWallet),
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
- var EditAgentSafeMetadataParams = class extends Schema.Class("EditAgentSafeMetadataParams")({
63
- name: OptionalString,
64
- intent: OptionalString
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 { AgentSafe, AgentSafeMetadata, AgentWallet, AgentWalletSafe, AgentWalletSafesList, AgentWalletsList, AgentWalletsListParams, EditAgentSafeMetadataParams, LinkedAgentWallet, SetSafeProposerParams, SetSafeProposerResponse };
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 AgentWorkflow: Schema.Struct<{
5
- id: typeof Schema.String;
6
- groupId: typeof Schema.String;
7
- type: typeof Schema.String;
8
- name: Schema.NullOr<typeof Schema.String>;
9
- intent: Schema.NullOr<typeof Schema.String>;
10
- createdAt: typeof Schema.String;
11
- updatedAt: typeof Schema.String;
12
- }>;
13
- type AgentWorkflowType = typeof AgentWorkflow.Type;
14
- declare const AgentWorkflowRun: Schema.Struct<{
15
- id: typeof Schema.String;
16
- agentWorkflowId: typeof Schema.String;
17
- outputs: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
18
- changelog: typeof Schema.String;
19
- createdAt: typeof Schema.String;
20
- updatedAt: typeof Schema.String;
21
- }>;
22
- type AgentWorkflowRunType = typeof AgentWorkflowRun.Type;
23
- declare const AgentWorkflowDecision: Schema.Struct<{
24
- id: typeof Schema.String;
25
- agentWorkflowRunId: typeof Schema.String;
26
- groupId: typeof Schema.String;
27
- userId: typeof Schema.String;
28
- decision: Schema.Literal<["approve", "reject"]>;
29
- createdAt: typeof Schema.String;
30
- updatedAt: typeof Schema.String;
31
- }>;
32
- type AgentWorkflowDecisionType = typeof AgentWorkflowDecision.Type;
33
- declare const AgentWorkflowWithRuns: Schema.Struct<{
34
- id: typeof Schema.String;
35
- groupId: typeof Schema.String;
36
- type: typeof Schema.String;
37
- name: Schema.NullOr<typeof Schema.String>;
38
- intent: Schema.NullOr<typeof Schema.String>;
39
- createdAt: typeof Schema.String;
40
- updatedAt: typeof Schema.String;
41
- runs: Schema.Array$<Schema.Struct<{
42
- id: typeof Schema.String;
43
- agentWorkflowId: typeof Schema.String;
44
- outputs: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
45
- changelog: typeof Schema.String;
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
- type AgentWorkflowWithRunsType = typeof AgentWorkflowWithRuns.Type;
51
- declare const CreateAgentWorkflowParams: Schema.Struct<{
52
- groupId: typeof Schema.String;
53
- type: Schema.Literal<["safe_transaction", "wallet_transaction", "group_membership_change", "group_quorum_change"]>;
54
- name: typeof Schema.String;
55
- intent: Schema.optional<typeof Schema.String>;
56
- }>;
57
- type CreateAgentWorkflowParamsType = typeof CreateAgentWorkflowParams.Type;
58
- declare const CreateAgentWorkflowResponse: Schema.Struct<{
59
- workflowId: typeof Schema.String;
60
- }>;
61
- type CreateAgentWorkflowResponseType = typeof CreateAgentWorkflowResponse.Type;
62
- declare const ListAgentWorkflowsParams: Schema.Struct<{
63
- groupId: typeof Schema.String;
64
- type: Schema.optional<Schema.Literal<["safe_transaction", "wallet_transaction", "group_membership_change", "group_quorum_change"]>>;
65
- }>;
66
- type ListAgentWorkflowsParamsType = typeof ListAgentWorkflowsParams.Type;
67
- declare const ListAgentWorkflowsResponse: Schema.Struct<{
68
- workflows: Schema.Array$<Schema.Struct<{
69
- id: typeof Schema.String;
70
- groupId: typeof Schema.String;
71
- type: typeof Schema.String;
72
- name: Schema.NullOr<typeof Schema.String>;
73
- intent: Schema.NullOr<typeof Schema.String>;
74
- createdAt: typeof Schema.String;
75
- updatedAt: typeof Schema.String;
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 ListAgentWorkflowsResponseType = typeof ListAgentWorkflowsResponse.Type;
79
- declare const GetAgentWorkflowParams: Schema.Struct<{
80
- agentWorkflowId: typeof Schema.String;
78
+ type ListAgentWorkflowsResponse = typeof ListAgentWorkflowsResponseSchema.Type;
79
+ declare const GetAgentWorkflowParamsSchema: Schema.Struct<{
80
+ readonly agentWorkflowId: Schema.String;
81
81
  }>;
82
- type GetAgentWorkflowParamsType = typeof GetAgentWorkflowParams.Type;
83
- declare const CreateAgentWorkflowRunParams: Schema.Struct<{
84
- agentWorkflowId: typeof Schema.String;
85
- outputs: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
86
- changelog: Schema.optional<typeof Schema.String>;
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 CreateAgentWorkflowRunParamsType = typeof CreateAgentWorkflowRunParams.Type;
89
- declare const CreateAgentWorkflowRunResponse: Schema.Struct<{
90
- workflowRunId: typeof Schema.String;
88
+ type CreateAgentWorkflowRunParams = typeof CreateAgentWorkflowRunParamsSchema.Type;
89
+ declare const CreateAgentWorkflowRunResponseSchema: Schema.Struct<{
90
+ readonly workflowRunId: Schema.String;
91
91
  }>;
92
- type CreateAgentWorkflowRunResponseType = typeof CreateAgentWorkflowRunResponse.Type;
93
- declare const SubmitAgentWorkflowDecisionParams: Schema.Struct<{
94
- agentWorkflowRunId: typeof Schema.String;
95
- decision: Schema.Literal<["approve", "reject"]>;
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 SubmitAgentWorkflowDecisionParamsType = typeof SubmitAgentWorkflowDecisionParams.Type;
98
- declare const SubmitAgentWorkflowDecisionResponse: Schema.Struct<{
99
- decisionId: typeof Schema.String;
97
+ type SubmitAgentWorkflowDecisionParams = typeof SubmitAgentWorkflowDecisionParamsSchema.Type;
98
+ declare const SubmitAgentWorkflowDecisionResponseSchema: Schema.Struct<{
99
+ readonly decisionId: Schema.String;
100
100
  }>;
101
- type SubmitAgentWorkflowDecisionResponseType = typeof SubmitAgentWorkflowDecisionResponse.Type;
102
- declare const PushAgentWorkflowParams: Schema.Struct<{
103
- agentWorkflowRunId: typeof Schema.String;
101
+ type SubmitAgentWorkflowDecisionResponse = typeof SubmitAgentWorkflowDecisionResponseSchema.Type;
102
+ declare const PushAgentWorkflowParamsSchema: Schema.Struct<{
103
+ readonly agentWorkflowRunId: Schema.String;
104
104
  }>;
105
- type PushAgentWorkflowParamsType = typeof PushAgentWorkflowParams.Type;
106
- declare const PushAgentWorkflowResponse: Schema.Struct<{
107
- pushId: typeof Schema.String;
105
+ type PushAgentWorkflowParams = typeof PushAgentWorkflowParamsSchema.Type;
106
+ declare const PushAgentWorkflowResponseSchema: Schema.Struct<{
107
+ readonly pushId: Schema.String;
108
108
  }>;
109
- type PushAgentWorkflowResponseType = typeof PushAgentWorkflowResponse.Type;
110
- declare const ExecuteSafeTxParams: Schema.Struct<{
111
- agentWorkflowRunId: typeof Schema.String;
109
+ type PushAgentWorkflowResponse = typeof PushAgentWorkflowResponseSchema.Type;
110
+ declare const ExecuteSafeTxParamsSchema: Schema.Struct<{
111
+ readonly agentWorkflowRunId: Schema.String;
112
112
  }>;
113
- type ExecuteSafeTxParamsType = typeof ExecuteSafeTxParams.Type;
114
- declare const ExecuteSafeTxResponse: Schema.Struct<{
115
- transactionHash: typeof Schema.String;
116
- blockchain: Schema.Literal<["ethereum", "base"]>;
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 ExecuteSafeTxResponseType = typeof ExecuteSafeTxResponse.Type;
118
+ type ExecuteSafeTxResponse = typeof ExecuteSafeTxResponseSchema.Type;
119
119
  //#endregion
120
- export { AgentWorkflow, AgentWorkflowDecision, AgentWorkflowDecisionType, AgentWorkflowRun, AgentWorkflowRunType, AgentWorkflowType, AgentWorkflowWithRuns, AgentWorkflowWithRunsType, CreateAgentWorkflowParams, CreateAgentWorkflowParamsType, CreateAgentWorkflowResponse, CreateAgentWorkflowResponseType, CreateAgentWorkflowRunParams, CreateAgentWorkflowRunParamsType, CreateAgentWorkflowRunResponse, CreateAgentWorkflowRunResponseType, ExecuteSafeTxParams, ExecuteSafeTxParamsType, ExecuteSafeTxResponse, ExecuteSafeTxResponseType, GetAgentWorkflowParams, GetAgentWorkflowParamsType, ListAgentWorkflowsParams, ListAgentWorkflowsParamsType, ListAgentWorkflowsResponse, ListAgentWorkflowsResponseType, PushAgentWorkflowParams, PushAgentWorkflowParamsType, PushAgentWorkflowResponse, PushAgentWorkflowResponseType, SubmitAgentWorkflowDecisionParams, SubmitAgentWorkflowDecisionParamsType, SubmitAgentWorkflowDecisionResponse, SubmitAgentWorkflowDecisionResponseType };
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 AgentWorkflow = Schema.Struct({
5
- id: Schema.String,
4
+ const AgentWorkflowSchema = Schema.Struct({
5
+ createdAt: Schema.String,
6
6
  groupId: Schema.String,
7
- type: Schema.String,
8
- name: Schema.NullOr(Schema.String),
7
+ id: Schema.String,
9
8
  intent: Schema.NullOr(Schema.String),
10
- createdAt: Schema.String,
9
+ name: Schema.NullOr(Schema.String),
10
+ type: Schema.String,
11
11
  updatedAt: Schema.String
12
12
  });
13
- const AgentWorkflowRun = Schema.Struct({
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 AgentWorkflowDecision = Schema.Struct({
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
- updatedAt: Schema.String
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
- type: Schema.String,
37
- name: Schema.NullOr(Schema.String),
33
+ id: Schema.String,
38
34
  intent: Schema.NullOr(Schema.String),
39
- createdAt: Schema.String,
40
- updatedAt: Schema.String,
41
- runs: Schema.Array(AgentWorkflowRun)
35
+ name: Schema.NullOr(Schema.String),
36
+ runs: Schema.Array(AgentWorkflowRunSchema),
37
+ type: Schema.String,
38
+ updatedAt: Schema.String
42
39
  });
43
- const CreateAgentWorkflowParams = Schema.Struct({
40
+ const CreateAgentWorkflowParamsSchema = Schema.Struct({
44
41
  groupId: Schema.String,
45
- type: Schema.Literal("safe_transaction", "wallet_transaction", "group_membership_change", "group_quorum_change"),
42
+ intent: Schema.optional(Schema.String),
46
43
  name: Schema.String,
47
- intent: Schema.optional(Schema.String)
44
+ type: Schema.Literals([
45
+ "safe_transaction",
46
+ "wallet_transaction",
47
+ "group_membership_change",
48
+ "group_quorum_change"
49
+ ])
48
50
  });
49
- const CreateAgentWorkflowResponse = Schema.Struct({ workflowId: Schema.String });
50
- const ListAgentWorkflowsParams = Schema.Struct({
51
+ const CreateAgentWorkflowResponseSchema = Schema.Struct({ workflowId: Schema.String });
52
+ const ListAgentWorkflowsParamsSchema = Schema.Struct({
51
53
  groupId: Schema.String,
52
- type: Schema.optional(Schema.Literal("safe_transaction", "wallet_transaction", "group_membership_change", "group_quorum_change"))
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 ListAgentWorkflowsResponse = Schema.Struct({ workflows: Schema.Array(AgentWorkflow) });
55
- const GetAgentWorkflowParams = Schema.Struct({ agentWorkflowId: Schema.String });
56
- const CreateAgentWorkflowRunParams = Schema.Struct({
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
- outputs: Schema.Record({
59
- key: Schema.String,
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 CreateAgentWorkflowRunResponse = Schema.Struct({ workflowRunId: Schema.String });
65
- const SubmitAgentWorkflowDecisionParams = Schema.Struct({
68
+ const CreateAgentWorkflowRunResponseSchema = Schema.Struct({ workflowRunId: Schema.String });
69
+ const SubmitAgentWorkflowDecisionParamsSchema = Schema.Struct({
66
70
  agentWorkflowRunId: Schema.String,
67
- decision: Schema.Literal("approve", "reject")
71
+ decision: Schema.Literals(["approve", "reject"])
68
72
  });
69
- const SubmitAgentWorkflowDecisionResponse = Schema.Struct({ decisionId: Schema.String });
70
- const PushAgentWorkflowParams = Schema.Struct({ agentWorkflowRunId: Schema.String });
71
- const PushAgentWorkflowResponse = Schema.Struct({ pushId: Schema.String });
72
- const ExecuteSafeTxParams = Schema.Struct({ agentWorkflowRunId: Schema.String });
73
- const ExecuteSafeTxResponse = Schema.Struct({
74
- transactionHash: Schema.String,
75
- blockchain: Schema.Literal("ethereum", "base")
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 { AgentWorkflow, AgentWorkflowDecision, AgentWorkflowRun, AgentWorkflowWithRuns, CreateAgentWorkflowParams, CreateAgentWorkflowResponse, CreateAgentWorkflowRunParams, CreateAgentWorkflowRunResponse, ExecuteSafeTxParams, ExecuteSafeTxResponse, GetAgentWorkflowParams, ListAgentWorkflowsParams, ListAgentWorkflowsResponse, PushAgentWorkflowParams, PushAgentWorkflowResponse, SubmitAgentWorkflowDecisionParams, SubmitAgentWorkflowDecisionResponse };
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: typeof Schema.Boolean;
7
- apiKeys: typeof Schema.Boolean;
6
+ readonly agentWalletApi: Schema.Boolean;
7
+ readonly apiKeys: Schema.Boolean;
8
8
  }>;
9
9
  type FeatureFlags = typeof FeatureFlagsSchema.Type;
10
- declare const WhoamiResponse_base: Schema.Class<WhoamiResponse, {
11
- id: typeof Schema.String;
12
- email: typeof Schema.String;
13
- featureFlags: Schema.Struct<{
14
- agentWalletApi: typeof Schema.Boolean;
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
- }, Schema.Struct.Encoded<{
18
- id: typeof Schema.String;
19
- email: typeof Schema.String;
20
- featureFlags: Schema.Struct<{
21
- agentWalletApi: typeof Schema.Boolean;
22
- apiKeys: typeof Schema.Boolean;
23
- }>;
24
- }>, never, {
25
- readonly id: string;
26
- } & {
27
- readonly email: string;
28
- } & {
29
- readonly featureFlags: {
30
- readonly agentWalletApi: boolean;
31
- readonly apiKeys: boolean;
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 CreatedApiKeyType = typeof CreatedApiKey.Type;
64
- declare const ApiKeyListResponse: Schema.Struct<{
65
- apiKeys: Schema.Array$<Schema.Schema<ApiKeyType, ApiKeyEncoded, never>>;
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 ApiKeyListResponseType = typeof ApiKeyListResponse.Type;
68
- declare const CreateApiKeyParams: Schema.Struct<{
69
- name: Schema.optional<typeof Schema.String>;
38
+ type ApiKeyListResponse = typeof ApiKeyListResponseSchema.Type;
39
+ declare const CreateApiKeyParamsSchema: Schema.Struct<{
40
+ readonly name: Schema.optional<Schema.String>;
70
41
  }>;
71
- type CreateApiKeyParamsType = typeof CreateApiKeyParams.Type;
72
- declare const DeleteApiKeyParams: Schema.Struct<{
73
- keyId: typeof Schema.String;
42
+ type CreateApiKeyParams = typeof CreateApiKeyParamsSchema.Type;
43
+ declare const DeleteApiKeyParamsSchema: Schema.Struct<{
44
+ readonly keyId: Schema.String;
74
45
  }>;
75
- type DeleteApiKeyParamsType = typeof DeleteApiKeyParams.Type;
46
+ type DeleteApiKeyParams = typeof DeleteApiKeyParamsSchema.Type;
76
47
  //#endregion
77
- export { ApiKey, ApiKeyListResponse, ApiKeyListResponseType, ApiKeyType, CreateApiKeyParams, CreateApiKeyParamsType, CreatedApiKey, CreatedApiKeyType, DeleteApiKeyParams, DeleteApiKeyParamsType, FeatureFlags, FeatureFlagsSchema, TokenResponse, WhoamiResponse };
48
+ export { ApiKey, ApiKeyListResponse, ApiKeyListResponseSchema, ApiKeySchema, CreateApiKeyParams, CreateApiKeyParamsSchema, CreatedApiKey, CreatedApiKeySchema, DeleteApiKeyParams, DeleteApiKeyParamsSchema, FeatureFlags, FeatureFlagsSchema, TokenResponse, TokenResponseSchema, WhoamiResponse, WhoamiResponseSchema };