@herd-labs/sdk 0.1.0 → 0.2.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 (48) hide show
  1. package/dist/index.d.ts +3 -3
  2. package/dist/index.js +3 -3
  3. package/dist/src/config.d.ts +17 -5
  4. package/dist/src/config.js +12 -2
  5. package/dist/src/live/ActionsServiceLive.js +10 -10
  6. package/dist/src/live/AdaptersServiceLive.d.ts +2 -2
  7. package/dist/src/live/AdaptersServiceLive.js +7 -7
  8. package/dist/src/live/AgentSafesServiceLive.d.ts +2 -2
  9. package/dist/src/live/AgentSafesServiceLive.js +4 -4
  10. package/dist/src/live/AgentWalletsServiceLive.d.ts +2 -2
  11. package/dist/src/live/AgentWalletsServiceLive.js +3 -3
  12. package/dist/src/live/AgentWorkflowsServiceLive.d.ts +2 -2
  13. package/dist/src/live/AgentWorkflowsServiceLive.js +8 -8
  14. package/dist/src/live/AuthServiceLive.d.ts +2 -2
  15. package/dist/src/live/AuthServiceLive.js +8 -7
  16. package/dist/src/live/BookmarksServiceLive.d.ts +2 -2
  17. package/dist/src/live/BookmarksServiceLive.js +7 -7
  18. package/dist/src/live/CodeBlocksServiceLive.d.ts +2 -2
  19. package/dist/src/live/CodeBlocksServiceLive.js +1 -2
  20. package/dist/src/live/CollectionsServiceLive.d.ts +2 -2
  21. package/dist/src/live/CollectionsServiceLive.js +5 -5
  22. package/dist/src/live/ContractsServiceLive.d.ts +2 -2
  23. package/dist/src/live/ContractsServiceLive.js +5 -5
  24. package/dist/src/live/DocsServiceLive.d.ts +2 -2
  25. package/dist/src/live/DocsServiceLive.js +3 -3
  26. package/dist/src/live/GroupsServiceLive.d.ts +2 -2
  27. package/dist/src/live/GroupsServiceLive.js +7 -7
  28. package/dist/src/live/HalServiceLive.d.ts +2 -2
  29. package/dist/src/live/HalServiceLive.js +3 -3
  30. package/dist/src/live/TransactionsServiceLive.js +4 -4
  31. package/dist/src/live/WalletsServiceLive.d.ts +2 -2
  32. package/dist/src/live/WalletsServiceLive.js +5 -5
  33. package/dist/src/live/http.d.ts +1 -4
  34. package/dist/src/live/http.js +15 -4
  35. package/dist/src/schemas/actions.d.ts +12 -12
  36. package/dist/src/schemas/adapters.d.ts +2 -2
  37. package/dist/src/schemas/agent-wallets.d.ts +20 -20
  38. package/dist/src/schemas/auth.d.ts +22 -12
  39. package/dist/src/schemas/auth.js +16 -5
  40. package/dist/src/schemas/bookmarks.d.ts +14 -14
  41. package/dist/src/schemas/codeblocks.d.ts +2 -2
  42. package/dist/src/schemas/collections.d.ts +2 -2
  43. package/dist/src/schemas/contracts.d.ts +15 -15
  44. package/dist/src/schemas/hal.d.ts +23 -23
  45. package/dist/src/schemas/transactions.d.ts +35 -35
  46. package/dist/src/schemas/wallets.d.ts +37 -37
  47. package/dist/src/services/AuthService.d.ts +3 -2
  48. package/package.json +2 -1
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { HerdConfig } from "./src/config.js";
1
+ import { HerdConfig, HerdConfigSchema, HerdConfigType } from "./src/config.js";
2
2
  import { ActionNotFoundError, AuthError, CodeBlockNotFoundError, CollectionNotFoundError, DocNotFoundError, ServiceError, SimulationError, TransactionNotFoundError } from "./src/errors.js";
3
3
  import { Blockchain, BlockchainType, EvmAddress, EvmAddressType, PaginationParams } from "./src/schemas/common.js";
4
4
  import { Action, ActionExpression, ActionVersion, ActionVersionsResponse, ActionsSearchParams, ActionsSearchResponse, CreateActionParams, CreateActionResponse, GetActionVersionsParams, PublishExpressionParams, PublishExpressionResponse, RelatedAdapterItem, RelatedAdaptersContract, RelatedAdaptersFunctionSignature, RelatedAdaptersResponse, RelatedAdaptersSearchParams, UpdateActionMetadataParams, UpdateExpressionParams } from "./src/schemas/actions.js";
5
5
  import { CreateAdapterParams } from "./src/schemas/adapters.js";
6
6
  import { AgentSafe, AgentSafeMetadata, AgentWallet, AgentWalletSafe, AgentWalletSafesList, AgentWalletsList, AgentWalletsListParams, EditAgentSafeMetadataParams, LinkedAgentWallet, SetSafeProposerParams, SetSafeProposerResponse } from "./src/schemas/agent-wallets.js";
7
- import { ApiKeyResponse, FeatureFlags, FeatureFlagsSchema, TokenResponse, WhoamiResponse } from "./src/schemas/auth.js";
7
+ import { ApiKey, ApiKeyListResponse, ApiKeyListResponseType, ApiKeyType, CreateApiKeyParams, CreateApiKeyParamsType, CreatedApiKey, CreatedApiKeyType, DeleteApiKeyParams, DeleteApiKeyParamsType, FeatureFlags, FeatureFlagsSchema, TokenResponse, WhoamiResponse } from "./src/schemas/auth.js";
8
8
  import { AddContractBookmarkParams, AddTransactionBookmarkParams, AddWalletBookmarkParams, BookmarkObjectType, BookmarkObjectTypeValue, BookmarkResponse, BookmarksList, ContractBookmark, DeleteBookmarkParams, TransactionBookmark, UpdateBookmarkLabelParams, WalletBookmark } from "./src/schemas/bookmarks.js";
9
9
  import { CodeBlockCode, CodeBlockDefinition, CodeBlockExecuteResponse, CodeBlockLogEntry, CodeBlockVersion, CodeBlocksSearchParams, CodeBlocksSearchResponse, CreateCodeBlockParams, CreateCodeBlockResponse, CreateCodeVersionParams, CreateCodeVersionResponse, ExecuteCodeBlockParams, PublishCodeBlockResponse, PublishCodeParams, UpdateCodeBlockMetadataParams, UpdateCodeParams } from "./src/schemas/codeblocks.js";
10
10
  import { Collection, CollectionSpec, CollectionSpecItem, CollectionVersion, CollectionsSearchParams, CollectionsSearchResponse, CreateCollectionParams, CreateCollectionResponse, UpdateCollectionParams } from "./src/schemas/collections.js";
@@ -45,4 +45,4 @@ import { GroupsServiceLive } from "./src/live/GroupsServiceLive.js";
45
45
  import { HalServiceLive } from "./src/live/HalServiceLive.js";
46
46
  import { TransactionsServiceLive } from "./src/live/TransactionsServiceLive.js";
47
47
  import { WalletsServiceLive } from "./src/live/WalletsServiceLive.js";
48
- export { Action, ActionExpression, ActionNotFoundError, ActionVersion, ActionVersionsResponse, ActionsSearchParams, ActionsSearchResponse, ActionsService, ActionsServiceLive, AdaptersService, AdaptersServiceLive, AddContractBookmarkParams, AddTransactionBookmarkParams, AddWalletBookmarkParams, AddressDetails, AgentSafe, AgentSafeMetadata, AgentSafesService, AgentSafesServiceLive, AgentWallet, AgentWalletSafe, AgentWalletSafesList, AgentWalletsList, AgentWalletsListParams, AgentWalletsService, AgentWalletsServiceLive, AgentWorkflow, AgentWorkflowDecision, AgentWorkflowNotFoundError, AgentWorkflowRun, AgentWorkflowRunNotFoundError, AgentWorkflowWithRuns, AgentWorkflowsService, AgentWorkflowsServiceLive, ApiKeyResponse, AuthError, AuthService, AuthServiceLive, Blockchain, type BlockchainType, BookmarkObjectType, type BookmarkObjectTypeValue, BookmarkResponse, BookmarksList, BookmarksService, BookmarksServiceLive, CodeBlockCode, CodeBlockDefinition, CodeBlockExecuteResponse, CodeBlockLogEntry, CodeBlockNotFoundError, CodeBlockVersion, CodeBlocksSearchParams, CodeBlocksSearchResponse, CodeBlocksService, CodeBlocksServiceLive, Collection, CollectionNotFoundError, CollectionSpec, CollectionSpecItem, CollectionVersion, CollectionsSearchParams, CollectionsSearchResponse, CollectionsService, CollectionsServiceLive, ContractBookmark, ContractCodeMatchBlock, ContractCodeSearchResult, ContractDiff, ContractMetadata, ContractsService, ContractsServiceLive, CreateActionParams, CreateActionResponse, CreateAdapterParams, CreateAgentWorkflowParams, CreateAgentWorkflowResponse, CreateAgentWorkflowRunParams, CreateAgentWorkflowRunResponse, CreateCodeBlockParams, CreateCodeBlockResponse, CreateCodeVersionParams, CreateCodeVersionResponse, CreateCollectionParams, CreateCollectionResponse, CreateGroupParams, CreateGroupResponse, type DecodedTrace, DeleteBookmarkParams, DeployedContract, DeployedContracts, DeployedContractsPagination, DiffEntry, DiffVersionInfo, DiffVersionsParams, DocContent, DocEntry, DocNotFoundError, DocsService, DocsServiceLive, EditAgentSafeMetadataParams, EditGroupMetadataParams, EditGroupMetadataResponse, Erc7702Delegation, EvaluateExistingParams, EvaluateExistingResponse, EvaluateParams, EvaluateResponse, EventSummary, EvmAddress, type EvmAddressType, ExecuteCodeBlockParams, ExecuteSafeTxParams, ExecuteSafeTxResponse, type FeatureFlags, FeatureFlagsSchema, FunctionSummary, GetActionVersionsParams, GetAgentWorkflowParams, GetContractCodeParams, GetContractCodeResponse, GroupDetails, GroupIdParams, GroupMember, GroupNotFoundError, GroupSummary, GroupWallet, GroupsService, GroupsServiceLive, HalService, HalServiceLive, HerdConfig, HistoricalImplementation, LatestEventTransactions, LatestFunctionTransactions, LatestTxParams, LinkedAgentWallet, ListAgentWorkflowsParams, ListAgentWorkflowsResponse, ListGroupsResponse, MultisigDetails, MultisigSigner, PaginationParams, PendingTransaction, ProposalResponse, ProposeMemberChangeParams, ProposeQuorumChangeParams, PublishCodeBlockResponse, PublishCodeParams, PublishExpressionParams, PublishExpressionResponse, PushAgentWorkflowParams, PushAgentWorkflowResponse, RelatedAdapterItem, RelatedAdaptersContract, RelatedAdaptersFunctionSignature, RelatedAdaptersResponse, RelatedAdaptersSearchParams, ServiceError, SetSafeProposerParams, SetSafeProposerResponse, SimulationError, SubmitAgentWorkflowDecisionParams, SubmitAgentWorkflowDecisionResponse, TokenActivity, TokenActivityPagination, TokenActivityParams, TokenBalanceInfo, TokenDetails, TokenImage, TokenResponse, TokenTransfer, TopHolder, Transaction, TransactionActivity, TransactionActivityPagination, TransactionActivityQuery, TransactionBookmark, TransactionNotFoundError, TransactionQueryResponse, TransactionStatus, TransactionsService, TransactionsServiceLive, UpdateActionMetadataParams, UpdateBookmarkLabelParams, UpdateCodeBlockMetadataParams, UpdateCodeParams, UpdateCollectionParams, UpdateExpressionParams, WalletBalance, WalletBookmark, WalletOverview, WalletTransaction, WalletTxActionExecution, WalletTxBalanceChange, WalletTxCall, WalletTxTransfer, WalletsService, WalletsServiceLive, WhoamiResponse };
48
+ export { Action, ActionExpression, ActionNotFoundError, ActionVersion, ActionVersionsResponse, ActionsSearchParams, ActionsSearchResponse, ActionsService, ActionsServiceLive, AdaptersService, AdaptersServiceLive, AddContractBookmarkParams, AddTransactionBookmarkParams, AddWalletBookmarkParams, AddressDetails, AgentSafe, AgentSafeMetadata, AgentSafesService, AgentSafesServiceLive, AgentWallet, AgentWalletSafe, AgentWalletSafesList, AgentWalletsList, AgentWalletsListParams, AgentWalletsService, AgentWalletsServiceLive, AgentWorkflow, AgentWorkflowDecision, AgentWorkflowNotFoundError, AgentWorkflowRun, AgentWorkflowRunNotFoundError, AgentWorkflowWithRuns, AgentWorkflowsService, AgentWorkflowsServiceLive, ApiKey, ApiKeyListResponse, type ApiKeyListResponseType, type ApiKeyType, AuthError, AuthService, AuthServiceLive, Blockchain, type BlockchainType, BookmarkObjectType, type BookmarkObjectTypeValue, BookmarkResponse, BookmarksList, BookmarksService, BookmarksServiceLive, CodeBlockCode, CodeBlockDefinition, CodeBlockExecuteResponse, CodeBlockLogEntry, CodeBlockNotFoundError, CodeBlockVersion, CodeBlocksSearchParams, CodeBlocksSearchResponse, CodeBlocksService, CodeBlocksServiceLive, Collection, CollectionNotFoundError, CollectionSpec, CollectionSpecItem, CollectionVersion, CollectionsSearchParams, CollectionsSearchResponse, CollectionsService, CollectionsServiceLive, ContractBookmark, ContractCodeMatchBlock, ContractCodeSearchResult, ContractDiff, ContractMetadata, ContractsService, ContractsServiceLive, CreateActionParams, CreateActionResponse, CreateAdapterParams, CreateAgentWorkflowParams, CreateAgentWorkflowResponse, CreateAgentWorkflowRunParams, CreateAgentWorkflowRunResponse, CreateApiKeyParams, type CreateApiKeyParamsType, CreateCodeBlockParams, CreateCodeBlockResponse, CreateCodeVersionParams, CreateCodeVersionResponse, CreateCollectionParams, CreateCollectionResponse, CreateGroupParams, CreateGroupResponse, CreatedApiKey, type CreatedApiKeyType, type DecodedTrace, DeleteApiKeyParams, type DeleteApiKeyParamsType, DeleteBookmarkParams, DeployedContract, DeployedContracts, DeployedContractsPagination, DiffEntry, DiffVersionInfo, DiffVersionsParams, DocContent, DocEntry, DocNotFoundError, DocsService, DocsServiceLive, EditAgentSafeMetadataParams, EditGroupMetadataParams, EditGroupMetadataResponse, Erc7702Delegation, EvaluateExistingParams, EvaluateExistingResponse, EvaluateParams, EvaluateResponse, EventSummary, EvmAddress, type EvmAddressType, ExecuteCodeBlockParams, ExecuteSafeTxParams, ExecuteSafeTxResponse, type FeatureFlags, FeatureFlagsSchema, FunctionSummary, GetActionVersionsParams, GetAgentWorkflowParams, GetContractCodeParams, GetContractCodeResponse, GroupDetails, GroupIdParams, GroupMember, GroupNotFoundError, GroupSummary, GroupWallet, GroupsService, GroupsServiceLive, HalService, HalServiceLive, HerdConfig, HerdConfigSchema, type HerdConfigType, HistoricalImplementation, LatestEventTransactions, LatestFunctionTransactions, LatestTxParams, LinkedAgentWallet, ListAgentWorkflowsParams, ListAgentWorkflowsResponse, ListGroupsResponse, MultisigDetails, MultisigSigner, PaginationParams, PendingTransaction, ProposalResponse, ProposeMemberChangeParams, ProposeQuorumChangeParams, PublishCodeBlockResponse, PublishCodeParams, PublishExpressionParams, PublishExpressionResponse, PushAgentWorkflowParams, PushAgentWorkflowResponse, RelatedAdapterItem, RelatedAdaptersContract, RelatedAdaptersFunctionSignature, RelatedAdaptersResponse, RelatedAdaptersSearchParams, ServiceError, SetSafeProposerParams, SetSafeProposerResponse, SimulationError, SubmitAgentWorkflowDecisionParams, SubmitAgentWorkflowDecisionResponse, TokenActivity, TokenActivityPagination, TokenActivityParams, TokenBalanceInfo, TokenDetails, TokenImage, TokenResponse, TokenTransfer, TopHolder, Transaction, TransactionActivity, TransactionActivityPagination, TransactionActivityQuery, TransactionBookmark, TransactionNotFoundError, TransactionQueryResponse, TransactionStatus, TransactionsService, TransactionsServiceLive, UpdateActionMetadataParams, UpdateBookmarkLabelParams, UpdateCodeBlockMetadataParams, UpdateCodeParams, UpdateCollectionParams, UpdateExpressionParams, WalletBalance, WalletBookmark, WalletOverview, WalletTransaction, WalletTxActionExecution, WalletTxBalanceChange, WalletTxCall, WalletTxTransfer, WalletsService, WalletsServiceLive, WhoamiResponse };
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import { HerdConfig } from "./src/config.js";
1
+ import { HerdConfig, HerdConfigSchema } from "./src/config.js";
2
2
  import { ActionNotFoundError, AuthError, CodeBlockNotFoundError, CollectionNotFoundError, DocNotFoundError, ServiceError, SimulationError, TransactionNotFoundError } from "./src/errors.js";
3
3
  import { Blockchain, EvmAddress, PaginationParams } from "./src/schemas/common.js";
4
4
  import { Action, ActionExpression, ActionVersion, ActionVersionsResponse, ActionsSearchParams, ActionsSearchResponse, CreateActionParams, CreateActionResponse, GetActionVersionsParams, PublishExpressionParams, PublishExpressionResponse, RelatedAdapterItem, RelatedAdaptersContract, RelatedAdaptersFunctionSignature, RelatedAdaptersResponse, RelatedAdaptersSearchParams, UpdateActionMetadataParams, UpdateExpressionParams } from "./src/schemas/actions.js";
5
5
  import { CreateAdapterParams } from "./src/schemas/adapters.js";
6
6
  import { AgentSafe, AgentSafeMetadata, AgentWallet, AgentWalletSafe, AgentWalletSafesList, AgentWalletsList, AgentWalletsListParams, EditAgentSafeMetadataParams, LinkedAgentWallet, SetSafeProposerParams, SetSafeProposerResponse } from "./src/schemas/agent-wallets.js";
7
- import { ApiKeyResponse, FeatureFlagsSchema, TokenResponse, WhoamiResponse } from "./src/schemas/auth.js";
7
+ import { ApiKey, ApiKeyListResponse, CreateApiKeyParams, CreatedApiKey, DeleteApiKeyParams, FeatureFlagsSchema, TokenResponse, WhoamiResponse } from "./src/schemas/auth.js";
8
8
  import { AddContractBookmarkParams, AddTransactionBookmarkParams, AddWalletBookmarkParams, BookmarkObjectType, BookmarkResponse, BookmarksList, ContractBookmark, DeleteBookmarkParams, TransactionBookmark, UpdateBookmarkLabelParams, WalletBookmark } from "./src/schemas/bookmarks.js";
9
9
  import { CodeBlockCode, CodeBlockDefinition, CodeBlockExecuteResponse, CodeBlockLogEntry, CodeBlockVersion, CodeBlocksSearchParams, CodeBlocksSearchResponse, CreateCodeBlockParams, CreateCodeBlockResponse, CreateCodeVersionParams, CreateCodeVersionResponse, ExecuteCodeBlockParams, PublishCodeBlockResponse, PublishCodeParams, UpdateCodeBlockMetadataParams, UpdateCodeParams } from "./src/schemas/codeblocks.js";
10
10
  import { Collection, CollectionSpec, CollectionSpecItem, CollectionVersion, CollectionsSearchParams, CollectionsSearchResponse, CreateCollectionParams, CreateCollectionResponse, UpdateCollectionParams } from "./src/schemas/collections.js";
@@ -46,4 +46,4 @@ import { HalServiceLive } from "./src/live/HalServiceLive.js";
46
46
  import { TransactionsServiceLive } from "./src/live/TransactionsServiceLive.js";
47
47
  import { WalletsServiceLive } from "./src/live/WalletsServiceLive.js";
48
48
 
49
- export { Action, ActionExpression, ActionNotFoundError, ActionVersion, ActionVersionsResponse, ActionsSearchParams, ActionsSearchResponse, ActionsService, ActionsServiceLive, AdaptersService, AdaptersServiceLive, AddContractBookmarkParams, AddTransactionBookmarkParams, AddWalletBookmarkParams, AddressDetails, AgentSafe, AgentSafeMetadata, AgentSafesService, AgentSafesServiceLive, AgentWallet, AgentWalletSafe, AgentWalletSafesList, AgentWalletsList, AgentWalletsListParams, AgentWalletsService, AgentWalletsServiceLive, AgentWorkflow, AgentWorkflowDecision, AgentWorkflowNotFoundError, AgentWorkflowRun, AgentWorkflowRunNotFoundError, AgentWorkflowWithRuns, AgentWorkflowsService, AgentWorkflowsServiceLive, ApiKeyResponse, AuthError, AuthService, AuthServiceLive, Blockchain, BookmarkObjectType, BookmarkResponse, BookmarksList, BookmarksService, BookmarksServiceLive, CodeBlockCode, CodeBlockDefinition, CodeBlockExecuteResponse, CodeBlockLogEntry, CodeBlockNotFoundError, CodeBlockVersion, CodeBlocksSearchParams, CodeBlocksSearchResponse, CodeBlocksService, CodeBlocksServiceLive, Collection, CollectionNotFoundError, CollectionSpec, CollectionSpecItem, CollectionVersion, CollectionsSearchParams, CollectionsSearchResponse, CollectionsService, CollectionsServiceLive, ContractBookmark, ContractCodeMatchBlock, ContractCodeSearchResult, ContractDiff, ContractMetadata, ContractsService, ContractsServiceLive, CreateActionParams, CreateActionResponse, CreateAdapterParams, CreateAgentWorkflowParams, CreateAgentWorkflowResponse, CreateAgentWorkflowRunParams, CreateAgentWorkflowRunResponse, CreateCodeBlockParams, CreateCodeBlockResponse, CreateCodeVersionParams, CreateCodeVersionResponse, CreateCollectionParams, CreateCollectionResponse, CreateGroupParams, CreateGroupResponse, DeleteBookmarkParams, DeployedContract, DeployedContracts, DeployedContractsPagination, DiffEntry, DiffVersionInfo, DiffVersionsParams, DocContent, DocEntry, DocNotFoundError, DocsService, DocsServiceLive, EditAgentSafeMetadataParams, EditGroupMetadataParams, EditGroupMetadataResponse, Erc7702Delegation, EvaluateExistingParams, EvaluateExistingResponse, EvaluateParams, EvaluateResponse, EventSummary, EvmAddress, ExecuteCodeBlockParams, ExecuteSafeTxParams, ExecuteSafeTxResponse, FeatureFlagsSchema, FunctionSummary, GetActionVersionsParams, GetAgentWorkflowParams, GetContractCodeParams, GetContractCodeResponse, GroupDetails, GroupIdParams, GroupMember, GroupNotFoundError, GroupSummary, GroupWallet, GroupsService, GroupsServiceLive, HalService, HalServiceLive, HerdConfig, HistoricalImplementation, LatestEventTransactions, LatestFunctionTransactions, LatestTxParams, LinkedAgentWallet, ListAgentWorkflowsParams, ListAgentWorkflowsResponse, ListGroupsResponse, MultisigDetails, MultisigSigner, PaginationParams, PendingTransaction, ProposalResponse, ProposeMemberChangeParams, ProposeQuorumChangeParams, PublishCodeBlockResponse, PublishCodeParams, PublishExpressionParams, PublishExpressionResponse, PushAgentWorkflowParams, PushAgentWorkflowResponse, RelatedAdapterItem, RelatedAdaptersContract, RelatedAdaptersFunctionSignature, RelatedAdaptersResponse, RelatedAdaptersSearchParams, ServiceError, SetSafeProposerParams, SetSafeProposerResponse, SimulationError, SubmitAgentWorkflowDecisionParams, SubmitAgentWorkflowDecisionResponse, TokenActivity, TokenActivityPagination, TokenActivityParams, TokenBalanceInfo, TokenDetails, TokenImage, TokenResponse, TokenTransfer, TopHolder, Transaction, TransactionActivity, TransactionActivityPagination, TransactionActivityQuery, TransactionBookmark, TransactionNotFoundError, TransactionQueryResponse, TransactionStatus, TransactionsService, TransactionsServiceLive, UpdateActionMetadataParams, UpdateBookmarkLabelParams, UpdateCodeBlockMetadataParams, UpdateCodeParams, UpdateCollectionParams, UpdateExpressionParams, WalletBalance, WalletBookmark, WalletOverview, WalletTransaction, WalletTxActionExecution, WalletTxBalanceChange, WalletTxCall, WalletTxTransfer, WalletsService, WalletsServiceLive, WhoamiResponse };
49
+ export { Action, ActionExpression, ActionNotFoundError, ActionVersion, ActionVersionsResponse, ActionsSearchParams, ActionsSearchResponse, ActionsService, ActionsServiceLive, AdaptersService, AdaptersServiceLive, AddContractBookmarkParams, AddTransactionBookmarkParams, AddWalletBookmarkParams, AddressDetails, AgentSafe, AgentSafeMetadata, AgentSafesService, AgentSafesServiceLive, AgentWallet, AgentWalletSafe, AgentWalletSafesList, AgentWalletsList, AgentWalletsListParams, AgentWalletsService, AgentWalletsServiceLive, AgentWorkflow, AgentWorkflowDecision, AgentWorkflowNotFoundError, AgentWorkflowRun, AgentWorkflowRunNotFoundError, AgentWorkflowWithRuns, AgentWorkflowsService, AgentWorkflowsServiceLive, ApiKey, ApiKeyListResponse, AuthError, AuthService, AuthServiceLive, Blockchain, BookmarkObjectType, BookmarkResponse, BookmarksList, BookmarksService, BookmarksServiceLive, CodeBlockCode, CodeBlockDefinition, CodeBlockExecuteResponse, CodeBlockLogEntry, CodeBlockNotFoundError, CodeBlockVersion, CodeBlocksSearchParams, CodeBlocksSearchResponse, CodeBlocksService, CodeBlocksServiceLive, Collection, CollectionNotFoundError, CollectionSpec, CollectionSpecItem, CollectionVersion, CollectionsSearchParams, CollectionsSearchResponse, CollectionsService, CollectionsServiceLive, ContractBookmark, ContractCodeMatchBlock, ContractCodeSearchResult, ContractDiff, ContractMetadata, ContractsService, ContractsServiceLive, CreateActionParams, CreateActionResponse, CreateAdapterParams, CreateAgentWorkflowParams, CreateAgentWorkflowResponse, CreateAgentWorkflowRunParams, CreateAgentWorkflowRunResponse, CreateApiKeyParams, CreateCodeBlockParams, CreateCodeBlockResponse, CreateCodeVersionParams, CreateCodeVersionResponse, CreateCollectionParams, CreateCollectionResponse, CreateGroupParams, CreateGroupResponse, CreatedApiKey, DeleteApiKeyParams, DeleteBookmarkParams, DeployedContract, DeployedContracts, DeployedContractsPagination, DiffEntry, DiffVersionInfo, DiffVersionsParams, DocContent, DocEntry, DocNotFoundError, DocsService, DocsServiceLive, EditAgentSafeMetadataParams, EditGroupMetadataParams, EditGroupMetadataResponse, Erc7702Delegation, EvaluateExistingParams, EvaluateExistingResponse, EvaluateParams, EvaluateResponse, EventSummary, EvmAddress, ExecuteCodeBlockParams, ExecuteSafeTxParams, ExecuteSafeTxResponse, FeatureFlagsSchema, FunctionSummary, GetActionVersionsParams, GetAgentWorkflowParams, GetContractCodeParams, GetContractCodeResponse, GroupDetails, GroupIdParams, GroupMember, GroupNotFoundError, GroupSummary, GroupWallet, GroupsService, GroupsServiceLive, HalService, HalServiceLive, HerdConfig, HerdConfigSchema, HistoricalImplementation, LatestEventTransactions, LatestFunctionTransactions, LatestTxParams, LinkedAgentWallet, ListAgentWorkflowsParams, ListAgentWorkflowsResponse, ListGroupsResponse, MultisigDetails, MultisigSigner, PaginationParams, PendingTransaction, ProposalResponse, ProposeMemberChangeParams, ProposeQuorumChangeParams, PublishCodeBlockResponse, PublishCodeParams, PublishExpressionParams, PublishExpressionResponse, PushAgentWorkflowParams, PushAgentWorkflowResponse, RelatedAdapterItem, RelatedAdaptersContract, RelatedAdaptersFunctionSignature, RelatedAdaptersResponse, RelatedAdaptersSearchParams, ServiceError, SetSafeProposerParams, SetSafeProposerResponse, SimulationError, SubmitAgentWorkflowDecisionParams, SubmitAgentWorkflowDecisionResponse, TokenActivity, TokenActivityPagination, TokenActivityParams, TokenBalanceInfo, TokenDetails, TokenImage, TokenResponse, TokenTransfer, TopHolder, Transaction, TransactionActivity, TransactionActivityPagination, TransactionActivityQuery, TransactionBookmark, TransactionNotFoundError, TransactionQueryResponse, TransactionStatus, TransactionsService, TransactionsServiceLive, UpdateActionMetadataParams, UpdateBookmarkLabelParams, UpdateCodeBlockMetadataParams, UpdateCodeParams, UpdateCollectionParams, UpdateExpressionParams, WalletBalance, WalletBookmark, WalletOverview, WalletTransaction, WalletTxActionExecution, WalletTxBalanceChange, WalletTxCall, WalletTxTransfer, WalletsService, WalletsServiceLive, WhoamiResponse };
@@ -1,10 +1,22 @@
1
- import { Context } from "effect";
1
+ import { Context, Schema } from "effect";
2
+ import * as effect_Either0 from "effect/Either";
2
3
 
3
4
  //#region src/config.d.ts
4
- declare const HerdConfig_base: Context.TagClass<HerdConfig, "HerdConfig", {
5
+ declare const HerdConfigSchema: Schema.EitherFromUnion<Schema.Struct<{
6
+ baseUrl: typeof Schema.String;
7
+ apiKey: typeof Schema.String;
8
+ }>, Schema.Struct<{
9
+ baseUrl: typeof Schema.String;
10
+ oauthAccessToken: typeof Schema.String;
11
+ }>>;
12
+ type HerdConfigType = typeof HerdConfigSchema.Type;
13
+ declare const HerdConfig_base: Context.TagClass<HerdConfig, "HerdConfig", effect_Either0.Either<{
5
14
  readonly baseUrl: string;
6
- readonly accessToken: string;
7
- }>;
15
+ readonly apiKey: string;
16
+ }, {
17
+ readonly baseUrl: string;
18
+ readonly oauthAccessToken: string;
19
+ }>>;
8
20
  declare class HerdConfig extends HerdConfig_base {}
9
21
  //#endregion
10
- export { HerdConfig };
22
+ export { HerdConfig, HerdConfigSchema, HerdConfigType };
@@ -1,7 +1,17 @@
1
- import { Context } from "effect";
1
+ import { Context, Schema } from "effect";
2
2
 
3
3
  //#region src/config.ts
4
+ const HerdConfigSchema = Schema.EitherFromUnion({
5
+ left: Schema.Struct({
6
+ baseUrl: Schema.String,
7
+ oauthAccessToken: Schema.String
8
+ }),
9
+ right: Schema.Struct({
10
+ baseUrl: Schema.String,
11
+ apiKey: Schema.String
12
+ })
13
+ });
4
14
  var HerdConfig = class extends Context.Tag("HerdConfig")() {};
5
15
 
6
16
  //#endregion
7
- export { HerdConfig };
17
+ export { HerdConfig, HerdConfigSchema };
@@ -11,23 +11,23 @@ const mapNotFound = (id) => Effect.catchAll((error) => {
11
11
  return Effect.fail(error);
12
12
  });
13
13
  const ActionsServiceLive = Layer.effect(ActionsService, Effect.gen(function* () {
14
- const { config, client } = yield* authorizedClient;
14
+ const { baseUrl, client } = yield* authorizedClient;
15
15
  return {
16
- get: (id, options) => pipe(client.get(makeUrl(config.baseUrl, `/v1/actions/${id}`, options?.includeReferences === true ? { includeReferences: "true" } : void 0)), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(Action)), Effect.mapError(ensureServiceError("Failed to get action")), mapNotFound(id)),
17
- getVersions: (params) => pipe(client.post(makeUrl(config.baseUrl, "/v1/actions/versions"), { body: jsonBody({
16
+ get: (id, options) => pipe(client.get(makeUrl(baseUrl, `/v1/actions/${id}`, options?.includeReferences === true ? { includeReferences: "true" } : void 0)), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(Action)), Effect.mapError(ensureServiceError("Failed to get action")), mapNotFound(id)),
17
+ getVersions: (params) => pipe(client.post(makeUrl(baseUrl, "/v1/actions/versions"), { body: jsonBody({
18
18
  actionIds: params.actionIds,
19
19
  latest: params.latest
20
20
  }) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(ActionVersionsResponse)), Effect.mapError(ensureServiceError("Failed to get action versions"))),
21
- search: (params) => pipe(client.post(makeUrl(config.baseUrl, "/v1/actions/query"), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(ActionsSearchResponse)), Effect.mapError(ensureServiceError("Failed to search actions"))),
22
- searchRelatedAdapters: (params) => pipe(client.post(makeUrl(config.baseUrl, "/v1/actions/related-adapters/query"), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(RelatedAdaptersResponse)), Effect.mapError(ensureServiceError("Failed to search related adapters"))),
23
- create: (params) => pipe(client.post(makeUrl(config.baseUrl, "/v1/actions"), { body: jsonBody({
21
+ search: (params) => pipe(client.post(makeUrl(baseUrl, "/v1/actions/query"), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(ActionsSearchResponse)), Effect.mapError(ensureServiceError("Failed to search actions"))),
22
+ searchRelatedAdapters: (params) => pipe(client.post(makeUrl(baseUrl, "/v1/actions/related-adapters/query"), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(RelatedAdaptersResponse)), Effect.mapError(ensureServiceError("Failed to search related adapters"))),
23
+ create: (params) => pipe(client.post(makeUrl(baseUrl, "/v1/actions"), { body: jsonBody({
24
24
  ...params,
25
25
  expressionType: "action"
26
26
  }) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(CreateActionResponse)), Effect.mapError(ensureServiceError("Failed to create action"))),
27
- updateMetadata: (id, params) => pipe(client.patch(makeUrl(config.baseUrl, `/v1/actions/${id}`), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.asVoid, Effect.mapError(ensureServiceError("Failed to update action metadata")), mapNotFound(id)),
28
- updateExpression: (id, expressionId, params) => pipe(client.put(makeUrl(config.baseUrl, `/v1/actions/${id}/expressions/${expressionId}`), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.asVoid, Effect.mapError(ensureServiceError("Failed to update expression")), mapNotFound(id)),
29
- publishExpression: (id, expressionId, params) => pipe(client.post(makeUrl(config.baseUrl, `/v1/actions/${id}/expressions/${expressionId}/publish`), { body: jsonBody(params ?? {}) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(PublishExpressionResponse)), Effect.mapError(ensureServiceError("Failed to publish expression")), mapNotFound(id)),
30
- delete: (id) => pipe(client.del(makeUrl(config.baseUrl, `/v1/actions/${id}`)), Effect.flatMap(checkStatus), Effect.asVoid, Effect.mapError(ensureServiceError("Failed to delete action")), mapNotFound(id))
27
+ updateMetadata: (id, params) => pipe(client.patch(makeUrl(baseUrl, `/v1/actions/${id}`), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.asVoid, Effect.mapError(ensureServiceError("Failed to update action metadata")), mapNotFound(id)),
28
+ updateExpression: (id, expressionId, params) => pipe(client.put(makeUrl(baseUrl, `/v1/actions/${id}/expressions/${expressionId}`), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.asVoid, Effect.mapError(ensureServiceError("Failed to update expression")), mapNotFound(id)),
29
+ publishExpression: (id, expressionId, params) => pipe(client.post(makeUrl(baseUrl, `/v1/actions/${id}/expressions/${expressionId}/publish`), { body: jsonBody(params ?? {}) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(PublishExpressionResponse)), Effect.mapError(ensureServiceError("Failed to publish expression")), mapNotFound(id)),
30
+ delete: (id) => pipe(client.del(makeUrl(baseUrl, `/v1/actions/${id}`)), Effect.flatMap(checkStatus), Effect.asVoid, Effect.mapError(ensureServiceError("Failed to delete action")), mapNotFound(id))
31
31
  };
32
32
  }));
33
33
 
@@ -1,9 +1,9 @@
1
1
  import { HerdConfig } from "../config.js";
2
2
  import { AdaptersService } from "../services/AdaptersService.js";
3
3
  import { Layer } from "effect";
4
- import * as _effect_platform_HttpClient3 from "@effect/platform/HttpClient";
4
+ import * as _effect_platform_HttpClient0 from "@effect/platform/HttpClient";
5
5
 
6
6
  //#region src/live/AdaptersServiceLive.d.ts
7
- declare const AdaptersServiceLive: Layer.Layer<AdaptersService, never, HerdConfig | _effect_platform_HttpClient3.HttpClient>;
7
+ declare const AdaptersServiceLive: Layer.Layer<AdaptersService, never, HerdConfig | _effect_platform_HttpClient0.HttpClient>;
8
8
  //#endregion
9
9
  export { AdaptersServiceLive };
@@ -11,17 +11,17 @@ const mapNotFound = (id) => Effect.catchAll((error) => {
11
11
  return Effect.fail(error);
12
12
  });
13
13
  const AdaptersServiceLive = Layer.effect(AdaptersService, Effect.gen(function* () {
14
- const { config, client } = yield* authorizedClient;
14
+ const { baseUrl, client } = yield* authorizedClient;
15
15
  return {
16
- get: (id) => pipe(client.get(makeUrl(config.baseUrl, `/v1/actions/${id}`)), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(Action)), Effect.mapError(ensureServiceError("Failed to get adapter")), mapNotFound(id)),
17
- create: (params) => pipe(client.post(makeUrl(config.baseUrl, "/v1/actions"), { body: jsonBody({
16
+ get: (id) => pipe(client.get(makeUrl(baseUrl, `/v1/actions/${id}`)), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(Action)), Effect.mapError(ensureServiceError("Failed to get adapter")), mapNotFound(id)),
17
+ create: (params) => pipe(client.post(makeUrl(baseUrl, "/v1/actions"), { body: jsonBody({
18
18
  ...params,
19
19
  expressionType: "adapter"
20
20
  }) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(CreateActionResponse)), Effect.mapError(ensureServiceError("Failed to create adapter"))),
21
- updateMetadata: (id, params) => pipe(client.patch(makeUrl(config.baseUrl, `/v1/actions/${id}`), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.asVoid, Effect.mapError(ensureServiceError("Failed to update adapter metadata")), mapNotFound(id)),
22
- updateExpression: (id, expressionId, params) => pipe(client.put(makeUrl(config.baseUrl, `/v1/actions/${id}/expressions/${expressionId}`), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.asVoid, Effect.mapError(ensureServiceError("Failed to update adapter expression")), mapNotFound(id)),
23
- publishExpression: (id, expressionId, params) => pipe(client.post(makeUrl(config.baseUrl, `/v1/actions/${id}/expressions/${expressionId}/publish`), { body: jsonBody(params ?? {}) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(PublishExpressionResponse)), Effect.mapError(ensureServiceError("Failed to publish adapter expression")), mapNotFound(id)),
24
- delete: (id) => pipe(client.del(makeUrl(config.baseUrl, `/v1/actions/${id}`)), Effect.flatMap(checkStatus), Effect.asVoid, Effect.mapError(ensureServiceError("Failed to delete adapter")), mapNotFound(id))
21
+ updateMetadata: (id, params) => pipe(client.patch(makeUrl(baseUrl, `/v1/actions/${id}`), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.asVoid, Effect.mapError(ensureServiceError("Failed to update adapter metadata")), mapNotFound(id)),
22
+ updateExpression: (id, expressionId, params) => pipe(client.put(makeUrl(baseUrl, `/v1/actions/${id}/expressions/${expressionId}`), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.asVoid, Effect.mapError(ensureServiceError("Failed to update adapter expression")), mapNotFound(id)),
23
+ publishExpression: (id, expressionId, params) => pipe(client.post(makeUrl(baseUrl, `/v1/actions/${id}/expressions/${expressionId}/publish`), { body: jsonBody(params ?? {}) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(PublishExpressionResponse)), Effect.mapError(ensureServiceError("Failed to publish adapter expression")), mapNotFound(id)),
24
+ delete: (id) => pipe(client.del(makeUrl(baseUrl, `/v1/actions/${id}`)), Effect.flatMap(checkStatus), Effect.asVoid, Effect.mapError(ensureServiceError("Failed to delete adapter")), mapNotFound(id))
25
25
  };
26
26
  }));
27
27
 
@@ -1,9 +1,9 @@
1
1
  import { HerdConfig } from "../config.js";
2
2
  import { AgentSafesService } from "../services/AgentSafesService.js";
3
3
  import { Layer } from "effect";
4
- import * as _effect_platform_HttpClient7 from "@effect/platform/HttpClient";
4
+ import * as _effect_platform_HttpClient2 from "@effect/platform/HttpClient";
5
5
 
6
6
  //#region src/live/AgentSafesServiceLive.d.ts
7
- declare const AgentSafesServiceLive: Layer.Layer<AgentSafesService, never, HerdConfig | _effect_platform_HttpClient7.HttpClient>;
7
+ declare const AgentSafesServiceLive: Layer.Layer<AgentSafesService, never, HerdConfig | _effect_platform_HttpClient2.HttpClient>;
8
8
  //#endregion
9
9
  export { AgentSafesServiceLive };
@@ -7,11 +7,11 @@ import { HttpClientResponse } from "@effect/platform";
7
7
 
8
8
  //#region src/live/AgentSafesServiceLive.ts
9
9
  const AgentSafesServiceLive = Layer.effect(AgentSafesService, Effect.gen(function* () {
10
- const { config, client } = yield* authorizedClient;
10
+ const { baseUrl, client } = yield* authorizedClient;
11
11
  return {
12
- getAgentSafe: (blockchain, safeAddress) => pipe(client.get(makeUrl(config.baseUrl, `/v1/agent-safes/${blockchain}/${safeAddress}`)), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(AgentSafe)), Effect.mapError(ensureServiceError("Failed to get agent Safe"))),
13
- setSafeProposer: (blockchain, safeAddress, params) => pipe(client.post(makeUrl(config.baseUrl, `/v1/agent-safes/${blockchain}/${safeAddress}/proposers`), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(SetSafeProposerResponse)), Effect.mapError(ensureServiceError("Failed to set agent Safe proposer"))),
14
- editAgentSafeMetadata: (blockchain, safeAddress, params) => pipe(client.patch(makeUrl(config.baseUrl, `/v1/agent-safes/${blockchain}/${safeAddress}`), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(AgentSafeMetadata)), Effect.mapError(ensureServiceError("Failed to edit agent Safe metadata")))
12
+ getAgentSafe: (blockchain, safeAddress) => pipe(client.get(makeUrl(baseUrl, `/v1/agent-safes/${blockchain}/${safeAddress}`)), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(AgentSafe)), Effect.mapError(ensureServiceError("Failed to get agent Safe"))),
13
+ setSafeProposer: (blockchain, safeAddress, params) => pipe(client.post(makeUrl(baseUrl, `/v1/agent-safes/${blockchain}/${safeAddress}/proposers`), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(SetSafeProposerResponse)), Effect.mapError(ensureServiceError("Failed to set agent Safe proposer"))),
14
+ editAgentSafeMetadata: (blockchain, safeAddress, params) => pipe(client.patch(makeUrl(baseUrl, `/v1/agent-safes/${blockchain}/${safeAddress}`), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(AgentSafeMetadata)), Effect.mapError(ensureServiceError("Failed to edit agent Safe metadata")))
15
15
  };
16
16
  }));
17
17
 
@@ -1,9 +1,9 @@
1
1
  import { HerdConfig } from "../config.js";
2
2
  import { AgentWalletsService } from "../services/AgentWalletsService.js";
3
3
  import { Layer } from "effect";
4
- import * as _effect_platform_HttpClient4 from "@effect/platform/HttpClient";
4
+ import * as _effect_platform_HttpClient3 from "@effect/platform/HttpClient";
5
5
 
6
6
  //#region src/live/AgentWalletsServiceLive.d.ts
7
- declare const AgentWalletsServiceLive: Layer.Layer<AgentWalletsService, never, HerdConfig | _effect_platform_HttpClient4.HttpClient>;
7
+ declare const AgentWalletsServiceLive: Layer.Layer<AgentWalletsService, never, HerdConfig | _effect_platform_HttpClient3.HttpClient>;
8
8
  //#endregion
9
9
  export { AgentWalletsServiceLive };
@@ -7,10 +7,10 @@ import { HttpClientResponse } from "@effect/platform";
7
7
 
8
8
  //#region src/live/AgentWalletsServiceLive.ts
9
9
  const AgentWalletsServiceLive = Layer.effect(AgentWalletsService, Effect.gen(function* () {
10
- const { config, client } = yield* authorizedClient;
10
+ const { baseUrl, client } = yield* authorizedClient;
11
11
  return {
12
- listAgentWallets: (params) => pipe(client.get(makeUrl(config.baseUrl, "/v1/agent-wallets", { groupId: params?.groupId })), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(AgentWalletsList)), Effect.mapError(ensureServiceError("Failed to list agent wallets"))),
13
- listAgentWalletSafes: (agentWalletAddress) => pipe(client.get(makeUrl(config.baseUrl, `/v1/agent-wallets/${agentWalletAddress}/safes`)), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(AgentWalletSafesList)), Effect.mapError(ensureServiceError("Failed to list agent wallet Safes")))
12
+ listAgentWallets: (params) => pipe(client.get(makeUrl(baseUrl, "/v1/agent-wallets", { groupId: params?.groupId })), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(AgentWalletsList)), Effect.mapError(ensureServiceError("Failed to list agent wallets"))),
13
+ listAgentWalletSafes: (agentWalletAddress) => pipe(client.get(makeUrl(baseUrl, `/v1/agent-wallets/${agentWalletAddress}/safes`)), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(AgentWalletSafesList)), Effect.mapError(ensureServiceError("Failed to list agent wallet Safes")))
14
14
  };
15
15
  }));
16
16
 
@@ -1,9 +1,9 @@
1
1
  import { HerdConfig } from "../config.js";
2
2
  import { AgentWorkflowsService } from "../services/AgentWorkflowsService.js";
3
3
  import { Layer } from "effect";
4
- import * as _effect_platform_HttpClient8 from "@effect/platform/HttpClient";
4
+ import * as _effect_platform_HttpClient6 from "@effect/platform/HttpClient";
5
5
 
6
6
  //#region src/live/AgentWorkflowsServiceLive.d.ts
7
- declare const AgentWorkflowsServiceLive: Layer.Layer<AgentWorkflowsService, never, HerdConfig | _effect_platform_HttpClient8.HttpClient>;
7
+ declare const AgentWorkflowsServiceLive: Layer.Layer<AgentWorkflowsService, never, HerdConfig | _effect_platform_HttpClient6.HttpClient>;
8
8
  //#endregion
9
9
  export { AgentWorkflowsServiceLive };
@@ -15,21 +15,21 @@ const mapRunNotFound = (runId) => Effect.catchAll((error) => {
15
15
  return Effect.fail(error);
16
16
  });
17
17
  const AgentWorkflowsServiceLive = Layer.effect(AgentWorkflowsService, Effect.gen(function* () {
18
- const { config, client } = yield* authorizedClient;
18
+ const { baseUrl, client } = yield* authorizedClient;
19
19
  return {
20
- create: (params) => pipe(client.post(makeUrl(config.baseUrl, "/v1/agent-workflows"), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(CreateAgentWorkflowResponse)), Effect.mapError(ensureServiceError("Failed to create agent workflow"))),
21
- list: (params) => pipe(client.get(makeUrl(config.baseUrl, "/v1/agent-workflows", {
20
+ create: (params) => pipe(client.post(makeUrl(baseUrl, "/v1/agent-workflows"), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(CreateAgentWorkflowResponse)), Effect.mapError(ensureServiceError("Failed to create agent workflow"))),
21
+ list: (params) => pipe(client.get(makeUrl(baseUrl, "/v1/agent-workflows", {
22
22
  groupId: params.groupId,
23
23
  type: params.type
24
24
  })), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(ListAgentWorkflowsResponse)), Effect.mapError(ensureServiceError("Failed to list agent workflows"))),
25
- get: (agentWorkflowId) => pipe(client.get(makeUrl(config.baseUrl, `/v1/agent-workflows/${agentWorkflowId}`)), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(AgentWorkflowWithRuns)), Effect.mapError(ensureServiceError("Failed to get agent workflow")), mapWorkflowNotFound(agentWorkflowId)),
26
- createRun: (params) => pipe(client.post(makeUrl(config.baseUrl, `/v1/agent-workflows/${params.agentWorkflowId}/runs`), { body: jsonBody({
25
+ get: (agentWorkflowId) => pipe(client.get(makeUrl(baseUrl, `/v1/agent-workflows/${agentWorkflowId}`)), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(AgentWorkflowWithRuns)), Effect.mapError(ensureServiceError("Failed to get agent workflow")), mapWorkflowNotFound(agentWorkflowId)),
26
+ createRun: (params) => pipe(client.post(makeUrl(baseUrl, `/v1/agent-workflows/${params.agentWorkflowId}/runs`), { body: jsonBody({
27
27
  outputs: params.outputs,
28
28
  changelog: params.changelog
29
29
  }) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(CreateAgentWorkflowRunResponse)), Effect.mapError(ensureServiceError("Failed to create agent workflow run")), mapWorkflowNotFound(params.agentWorkflowId)),
30
- submitDecision: (params) => pipe(client.post(makeUrl(config.baseUrl, `/v1/agent-workflows/runs/${params.agentWorkflowRunId}/decisions`), { body: jsonBody({ decision: params.decision }) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(SubmitAgentWorkflowDecisionResponse)), Effect.mapError(ensureServiceError("Failed to submit agent workflow decision")), mapRunNotFound(params.agentWorkflowRunId)),
31
- push: (params) => pipe(client.post(makeUrl(config.baseUrl, `/v1/agent-workflows/runs/${params.agentWorkflowRunId}/push`)), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(PushAgentWorkflowResponse)), Effect.mapError(ensureServiceError("Failed to push agent workflow")), mapRunNotFound(params.agentWorkflowRunId)),
32
- executeSafeTx: (params) => pipe(client.post(makeUrl(config.baseUrl, `/v1/agent-workflows/runs/${params.agentWorkflowRunId}/push/execute`)), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(ExecuteSafeTxResponse)), Effect.mapError(ensureServiceError("Failed to execute safe transaction")), mapRunNotFound(params.agentWorkflowRunId))
30
+ submitDecision: (params) => pipe(client.post(makeUrl(baseUrl, `/v1/agent-workflows/runs/${params.agentWorkflowRunId}/decisions`), { body: jsonBody({ decision: params.decision }) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(SubmitAgentWorkflowDecisionResponse)), Effect.mapError(ensureServiceError("Failed to submit agent workflow decision")), mapRunNotFound(params.agentWorkflowRunId)),
31
+ push: (params) => pipe(client.post(makeUrl(baseUrl, `/v1/agent-workflows/runs/${params.agentWorkflowRunId}/push`)), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(PushAgentWorkflowResponse)), Effect.mapError(ensureServiceError("Failed to push agent workflow")), mapRunNotFound(params.agentWorkflowRunId)),
32
+ executeSafeTx: (params) => pipe(client.post(makeUrl(baseUrl, `/v1/agent-workflows/runs/${params.agentWorkflowRunId}/push/execute`)), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(ExecuteSafeTxResponse)), Effect.mapError(ensureServiceError("Failed to execute safe transaction")), mapRunNotFound(params.agentWorkflowRunId))
33
33
  };
34
34
  }));
35
35
 
@@ -1,9 +1,9 @@
1
1
  import { HerdConfig } from "../config.js";
2
2
  import { AuthService } from "../services/AuthService.js";
3
3
  import { Layer } from "effect";
4
- import * as _effect_platform_HttpClient9 from "@effect/platform/HttpClient";
4
+ import * as _effect_platform_HttpClient5 from "@effect/platform/HttpClient";
5
5
 
6
6
  //#region src/live/AuthServiceLive.d.ts
7
- declare const AuthServiceLive: Layer.Layer<AuthService, never, HerdConfig | _effect_platform_HttpClient9.HttpClient>;
7
+ declare const AuthServiceLive: Layer.Layer<AuthService, never, HerdConfig | _effect_platform_HttpClient5.HttpClient>;
8
8
  //#endregion
9
9
  export { AuthServiceLive };
@@ -1,5 +1,5 @@
1
1
  import { AuthError } from "../errors.js";
2
- import { ApiKeyResponse, TokenResponse, WhoamiResponse } from "../schemas/auth.js";
2
+ import { ApiKeyListResponse, CreatedApiKey, TokenResponse, WhoamiResponse } from "../schemas/auth.js";
3
3
  import { AuthService } from "../services/AuthService.js";
4
4
  import { authorizedClient, checkStatus, jsonBody, makeUrl } from "./http.js";
5
5
  import { Effect, Layer, pipe } from "effect";
@@ -7,17 +7,18 @@ import { HttpClientResponse } from "@effect/platform";
7
7
 
8
8
  //#region src/live/AuthServiceLive.ts
9
9
  const AuthServiceLive = Layer.effect(AuthService, Effect.gen(function* () {
10
- const { config, client } = yield* authorizedClient;
10
+ const { baseUrl, client } = yield* authorizedClient;
11
11
  return {
12
- whoami: () => pipe(client.get(makeUrl(config.baseUrl, "/v1/users/me")), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(WhoamiResponse)), Effect.mapError((error) => new AuthError({ message: String(error) }))),
13
- refreshToken: (refreshToken, clientId) => pipe(client.post(makeUrl(config.baseUrl, "/api/auth/oauth2/token"), { body: jsonBody({
12
+ whoami: () => pipe(client.get(makeUrl(baseUrl, "/v1/users/me")), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(WhoamiResponse)), Effect.mapError((error) => new AuthError({ message: String(error) }))),
13
+ refreshToken: (refreshToken, clientId) => pipe(client.post(makeUrl(baseUrl, "/api/auth/oauth2/token"), { body: jsonBody({
14
14
  grant_type: "refresh_token",
15
15
  refresh_token: refreshToken,
16
16
  client_id: clientId,
17
- resource: config.baseUrl
17
+ resource: baseUrl
18
18
  }) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(TokenResponse)), Effect.mapError((error) => new AuthError({ message: String(error) }))),
19
- provisionApiKey: () => pipe(client.post(makeUrl(config.baseUrl, "/v1/cli/keys")), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(ApiKeyResponse)), Effect.mapError((error) => new AuthError({ message: String(error) }))),
20
- revokeApiKey: (keyId) => pipe(client.del(makeUrl(config.baseUrl, `/v1/cli/keys/${keyId}`)), Effect.flatMap(checkStatus), Effect.asVoid, Effect.mapError((error) => new AuthError({ message: String(error) })))
19
+ provisionApiKey: (name) => pipe(client.post(makeUrl(baseUrl, "/v1/api-keys"), { body: jsonBody({ name }) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(CreatedApiKey)), Effect.mapError((error) => new AuthError({ message: String(error) }))),
20
+ listApiKeys: () => pipe(client.get(makeUrl(baseUrl, "/v1/api-keys")), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(ApiKeyListResponse)), Effect.mapError((error) => new AuthError({ message: String(error) }))),
21
+ revokeApiKey: (keyId) => pipe(client.del(makeUrl(baseUrl, `/v1/api-keys/${keyId}`)), Effect.flatMap(checkStatus), Effect.asVoid, Effect.mapError((error) => new AuthError({ message: String(error) })))
21
22
  };
22
23
  }));
23
24
 
@@ -1,9 +1,9 @@
1
1
  import { HerdConfig } from "../config.js";
2
2
  import { BookmarksService } from "../services/BookmarksService.js";
3
3
  import { Layer } from "effect";
4
- import * as _effect_platform_HttpClient5 from "@effect/platform/HttpClient";
4
+ import * as _effect_platform_HttpClient7 from "@effect/platform/HttpClient";
5
5
 
6
6
  //#region src/live/BookmarksServiceLive.d.ts
7
- declare const BookmarksServiceLive: Layer.Layer<BookmarksService, never, HerdConfig | _effect_platform_HttpClient5.HttpClient>;
7
+ declare const BookmarksServiceLive: Layer.Layer<BookmarksService, never, HerdConfig | _effect_platform_HttpClient7.HttpClient>;
8
8
  //#endregion
9
9
  export { BookmarksServiceLive };
@@ -7,10 +7,10 @@ import { HttpClientResponse } from "@effect/platform";
7
7
 
8
8
  //#region src/live/BookmarksServiceLive.ts
9
9
  const BookmarksServiceLive = Layer.effect(BookmarksService, Effect.gen(function* () {
10
- const { config, client } = yield* authorizedClient;
10
+ const { baseUrl, client } = yield* authorizedClient;
11
11
  return {
12
- list: (params) => pipe(client.get(makeUrl(config.baseUrl, "/v1/bookmarks", { objectTypes: params?.objectTypes?.join(",") })), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(BookmarksList)), Effect.mapError(ensureServiceError("Failed to list bookmarks"))),
13
- addContract: (params) => pipe(client.post(makeUrl(config.baseUrl, "/v1/bookmarks"), { body: jsonBody({
12
+ list: (params) => pipe(client.get(makeUrl(baseUrl, "/v1/bookmarks", { objectTypes: params?.objectTypes?.join(",") })), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(BookmarksList)), Effect.mapError(ensureServiceError("Failed to list bookmarks"))),
13
+ addContract: (params) => pipe(client.post(makeUrl(baseUrl, "/v1/bookmarks"), { body: jsonBody({
14
14
  objectType: "contract",
15
15
  contractAddress: params.address,
16
16
  blockchain: params.blockchain,
@@ -20,7 +20,7 @@ const BookmarksServiceLive = Layer.effect(BookmarksService, Effect.gen(function*
20
20
  },
21
21
  ...params.label !== void 0 ? { userLabel: params.label } : {}
22
22
  }) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(BookmarkResponse)), Effect.mapError(ensureServiceError("Failed to add contract bookmark"))),
23
- addTransaction: (params) => pipe(client.post(makeUrl(config.baseUrl, "/v1/bookmarks"), { body: jsonBody({
23
+ addTransaction: (params) => pipe(client.post(makeUrl(baseUrl, "/v1/bookmarks"), { body: jsonBody({
24
24
  objectType: "transaction",
25
25
  transactionHash: params.txHash,
26
26
  blockchain: params.blockchain,
@@ -30,13 +30,13 @@ const BookmarksServiceLive = Layer.effect(BookmarksService, Effect.gen(function*
30
30
  },
31
31
  ...params.label !== void 0 ? { userLabel: params.label } : {}
32
32
  }) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(BookmarkResponse)), Effect.mapError(ensureServiceError("Failed to add transaction bookmark"))),
33
- addWallet: (params) => pipe(client.post(makeUrl(config.baseUrl, "/v1/bookmarks"), { body: jsonBody({
33
+ addWallet: (params) => pipe(client.post(makeUrl(baseUrl, "/v1/bookmarks"), { body: jsonBody({
34
34
  objectType: "wallet",
35
35
  walletAddress: params.address,
36
36
  details: {},
37
37
  ...params.label !== void 0 ? { userLabel: params.label } : {}
38
38
  }) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(BookmarkResponse)), Effect.mapError(ensureServiceError("Failed to add wallet bookmark"))),
39
- updateLabel: (params) => pipe(client.patch(makeUrl(config.baseUrl, "/v1/bookmarks/label"), { body: jsonBody({
39
+ updateLabel: (params) => pipe(client.patch(makeUrl(baseUrl, "/v1/bookmarks/label"), { body: jsonBody({
40
40
  objectType: params.objectType,
41
41
  ...params.address !== void 0 ? { contractAddress: params.address } : {},
42
42
  ...params.address !== void 0 && params.objectType === "wallet" ? { walletAddress: params.address } : {},
@@ -44,7 +44,7 @@ const BookmarksServiceLive = Layer.effect(BookmarksService, Effect.gen(function*
44
44
  ...params.blockchain !== void 0 ? { blockchain: params.blockchain } : {},
45
45
  userLabel: params.label
46
46
  }) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(BookmarkResponse)), Effect.mapError(ensureServiceError("Failed to update bookmark label"))),
47
- delete: (params) => pipe(client.del(makeUrl(config.baseUrl, "/v1/bookmarks"), { body: jsonBody({
47
+ delete: (params) => pipe(client.del(makeUrl(baseUrl, "/v1/bookmarks"), { body: jsonBody({
48
48
  objectType: params.objectType,
49
49
  ...params.address !== void 0 ? { contractAddress: params.address } : {},
50
50
  ...params.address !== void 0 && params.objectType === "wallet" ? { walletAddress: params.address } : {},
@@ -1,9 +1,9 @@
1
1
  import { HerdConfig } from "../config.js";
2
2
  import { CodeBlocksService } from "../services/CodeBlocksService.js";
3
3
  import { Layer } from "effect";
4
- import * as _effect_platform_HttpClient0 from "@effect/platform/HttpClient";
4
+ import * as _effect_platform_HttpClient8 from "@effect/platform/HttpClient";
5
5
 
6
6
  //#region src/live/CodeBlocksServiceLive.d.ts
7
- declare const CodeBlocksServiceLive: Layer.Layer<CodeBlocksService, never, HerdConfig | _effect_platform_HttpClient0.HttpClient>;
7
+ declare const CodeBlocksServiceLive: Layer.Layer<CodeBlocksService, never, HerdConfig | _effect_platform_HttpClient8.HttpClient>;
8
8
  //#endregion
9
9
  export { CodeBlocksServiceLive };
@@ -11,8 +11,7 @@ const mapNotFound = (id) => Effect.catchAll((error) => {
11
11
  return Effect.fail(error);
12
12
  });
13
13
  const CodeBlocksServiceLive = Layer.effect(CodeBlocksService, Effect.gen(function* () {
14
- const { config, client } = yield* authorizedClient;
15
- const baseUrl = config.baseUrl;
14
+ const { baseUrl, client } = yield* authorizedClient;
16
15
  return {
17
16
  get: (id) => pipe(client.post(makeUrl(baseUrl, "/v1/actions/code/definitions/query"), { body: jsonBody({
18
17
  scope: "user",
@@ -1,9 +1,9 @@
1
1
  import { HerdConfig } from "../config.js";
2
2
  import { CollectionsService } from "../services/CollectionsService.js";
3
3
  import { Layer } from "effect";
4
- import * as _effect_platform_HttpClient2 from "@effect/platform/HttpClient";
4
+ import * as _effect_platform_HttpClient9 from "@effect/platform/HttpClient";
5
5
 
6
6
  //#region src/live/CollectionsServiceLive.d.ts
7
- declare const CollectionsServiceLive: Layer.Layer<CollectionsService, never, HerdConfig | _effect_platform_HttpClient2.HttpClient>;
7
+ declare const CollectionsServiceLive: Layer.Layer<CollectionsService, never, HerdConfig | _effect_platform_HttpClient9.HttpClient>;
8
8
  //#endregion
9
9
  export { CollectionsServiceLive };
@@ -11,12 +11,12 @@ const mapNotFound = (id) => Effect.catchAll((error) => {
11
11
  return Effect.fail(error);
12
12
  });
13
13
  const CollectionsServiceLive = Layer.effect(CollectionsService, Effect.gen(function* () {
14
- const { config, client } = yield* authorizedClient;
14
+ const { baseUrl, client } = yield* authorizedClient;
15
15
  return {
16
- get: (collectionId) => pipe(client.get(makeUrl(config.baseUrl, `/v1/collections/${collectionId}`)), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(Collection)), Effect.mapError(ensureServiceError("Failed to get collection")), mapNotFound(collectionId)),
17
- search: (params) => pipe(client.post(makeUrl(config.baseUrl, "/v1/collections/query"), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(CollectionsSearchResponse)), Effect.mapError(ensureServiceError("Failed to search collections"))),
18
- create: (params) => pipe(client.post(makeUrl(config.baseUrl, "/v1/collections"), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(CreateCollectionResponse)), Effect.mapError(ensureServiceError("Failed to create collection"))),
19
- update: (collectionId, params) => pipe(client.patch(makeUrl(config.baseUrl, `/v1/collections/${collectionId}`), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.asVoid, Effect.mapError(ensureServiceError("Failed to update collection")), mapNotFound(collectionId))
16
+ get: (collectionId) => pipe(client.get(makeUrl(baseUrl, `/v1/collections/${collectionId}`)), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(Collection)), Effect.mapError(ensureServiceError("Failed to get collection")), mapNotFound(collectionId)),
17
+ search: (params) => pipe(client.post(makeUrl(baseUrl, "/v1/collections/query"), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(CollectionsSearchResponse)), Effect.mapError(ensureServiceError("Failed to search collections"))),
18
+ create: (params) => pipe(client.post(makeUrl(baseUrl, "/v1/collections"), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(CreateCollectionResponse)), Effect.mapError(ensureServiceError("Failed to create collection"))),
19
+ update: (collectionId, params) => pipe(client.patch(makeUrl(baseUrl, `/v1/collections/${collectionId}`), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.asVoid, Effect.mapError(ensureServiceError("Failed to update collection")), mapNotFound(collectionId))
20
20
  };
21
21
  }));
22
22
 
@@ -1,9 +1,9 @@
1
1
  import { HerdConfig } from "../config.js";
2
2
  import { ContractsService } from "../services/ContractsService.js";
3
3
  import { Layer } from "effect";
4
- import * as _effect_platform_HttpClient1 from "@effect/platform/HttpClient";
4
+ import * as _effect_platform_HttpClient10 from "@effect/platform/HttpClient";
5
5
 
6
6
  //#region src/live/ContractsServiceLive.d.ts
7
- declare const ContractsServiceLive: Layer.Layer<ContractsService, never, HerdConfig | _effect_platform_HttpClient1.HttpClient>;
7
+ declare const ContractsServiceLive: Layer.Layer<ContractsService, never, HerdConfig | _effect_platform_HttpClient10.HttpClient>;
8
8
  //#endregion
9
9
  export { ContractsServiceLive };
@@ -8,22 +8,22 @@ import { HttpClientResponse } from "@effect/platform";
8
8
 
9
9
  //#region src/live/ContractsServiceLive.ts
10
10
  const ContractsServiceLive = Layer.effect(ContractsService, Effect.gen(function* () {
11
- const { config, client } = yield* authorizedClient;
11
+ const { baseUrl, client } = yield* authorizedClient;
12
12
  return {
13
- getMetadata: (address, blockchain) => pipe(client.post(makeUrl(config.baseUrl, "/v1/contracts/metadata_enriched"), { body: jsonBody({
13
+ getMetadata: (address, blockchain) => pipe(client.post(makeUrl(baseUrl, "/v1/contracts/metadata_enriched"), { body: jsonBody({
14
14
  contractAddress: address,
15
15
  blockchain
16
16
  }) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(ContractMetadata)), Effect.mapError(ensureServiceError("Failed to get contract metadata"))),
17
- diffVersions: (address, blockchain, params) => pipe(client.post(makeUrl(config.baseUrl, "/v1/contracts/diff_versions"), { body: jsonBody({
17
+ diffVersions: (address, blockchain, params) => pipe(client.post(makeUrl(baseUrl, "/v1/contracts/diff_versions"), { body: jsonBody({
18
18
  contractAddress: address,
19
19
  blockchain,
20
20
  ...params
21
21
  }) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(ContractDiff)), Effect.mapError(ensureServiceError("Failed to diff contract versions"))),
22
- getContractCode: (blockchain, params) => pipe(client.post(makeUrl(config.baseUrl, "/v1/contracts/code/query"), { body: jsonBody({
22
+ getContractCode: (blockchain, params) => pipe(client.post(makeUrl(baseUrl, "/v1/contracts/code/query"), { body: jsonBody({
23
23
  blockchain,
24
24
  ...params
25
25
  }) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(GetContractCodeResponse)), Effect.mapError(ensureServiceError("Failed to get contract code"))),
26
- getDeployedContracts: (blockchain, address, params) => pipe(client.get(makeUrl(config.baseUrl, `/v1/wallets/${blockchain}/${address}/created_contracts`, params)), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(DeployedContracts)), Effect.mapError(ensureServiceError("Failed to get deployed contracts")))
26
+ getDeployedContracts: (blockchain, address, params) => pipe(client.get(makeUrl(baseUrl, `/v1/wallets/${blockchain}/${address}/created_contracts`, params)), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(DeployedContracts)), Effect.mapError(ensureServiceError("Failed to get deployed contracts")))
27
27
  };
28
28
  }));
29
29
 
@@ -1,9 +1,9 @@
1
1
  import { HerdConfig } from "../config.js";
2
2
  import { DocsService } from "../services/DocsService.js";
3
3
  import { Layer } from "effect";
4
- import * as _effect_platform_HttpClient6 from "@effect/platform/HttpClient";
4
+ import * as _effect_platform_HttpClient11 from "@effect/platform/HttpClient";
5
5
 
6
6
  //#region src/live/DocsServiceLive.d.ts
7
- declare const DocsServiceLive: Layer.Layer<DocsService, never, HerdConfig | _effect_platform_HttpClient6.HttpClient>;
7
+ declare const DocsServiceLive: Layer.Layer<DocsService, never, HerdConfig | _effect_platform_HttpClient11.HttpClient>;
8
8
  //#endregion
9
9
  export { DocsServiceLive };
@@ -7,11 +7,11 @@ import { HttpClientResponse } from "@effect/platform";
7
7
 
8
8
  //#region src/live/DocsServiceLive.ts
9
9
  const DocsServiceLive = Layer.effect(DocsService, Effect.gen(function* () {
10
- const { config, client } = yield* authorizedClient;
10
+ const { baseUrl, client } = yield* authorizedClient;
11
11
  return {
12
- list: () => pipe(client.get(makeUrl(config.baseUrl, "/v1/docs")), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(Schema.Array(DocEntry))), Effect.mapError(ensureServiceError("Failed to list docs"))),
12
+ list: () => pipe(client.get(makeUrl(baseUrl, "/v1/docs")), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(Schema.Array(DocEntry))), Effect.mapError(ensureServiceError("Failed to list docs"))),
13
13
  read: (docId) => Effect.gen(function* () {
14
- const response = yield* pipe(client.get(makeUrl(config.baseUrl, `/v1/docs/${encodeURIComponent(docId)}`)), Effect.flatMap(checkStatus), Effect.mapError((error) => {
14
+ const response = yield* pipe(client.get(makeUrl(baseUrl, `/v1/docs/${encodeURIComponent(docId)}`)), Effect.flatMap(checkStatus), Effect.mapError((error) => {
15
15
  const wrapped = ensureServiceError("Failed to read doc")(error);
16
16
  return wrapped.metadata["status"] === 404 ? new DocNotFoundError({ docId }) : wrapped;
17
17
  }));
@@ -1,9 +1,9 @@
1
1
  import { HerdConfig } from "../config.js";
2
2
  import { GroupsService } from "../services/GroupsService.js";
3
3
  import { Layer } from "effect";
4
- import * as _effect_platform_HttpClient10 from "@effect/platform/HttpClient";
4
+ import * as _effect_platform_HttpClient1 from "@effect/platform/HttpClient";
5
5
 
6
6
  //#region src/live/GroupsServiceLive.d.ts
7
- declare const GroupsServiceLive: Layer.Layer<GroupsService, never, HerdConfig | _effect_platform_HttpClient10.HttpClient>;
7
+ declare const GroupsServiceLive: Layer.Layer<GroupsService, never, HerdConfig | _effect_platform_HttpClient1.HttpClient>;
8
8
  //#endregion
9
9
  export { GroupsServiceLive };