@compass-labs/api-sdk 0.5.64 → 0.5.65

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 (51) hide show
  1. package/bin/mcp-server.js +106 -6
  2. package/bin/mcp-server.js.map +10 -8
  3. package/dist/commonjs/lib/config.d.ts +3 -3
  4. package/dist/commonjs/lib/config.js +3 -3
  5. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  6. package/dist/commonjs/mcp-server/server.js +1 -1
  7. package/dist/commonjs/models/components/index.d.ts +2 -0
  8. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  9. package/dist/commonjs/models/components/index.js +2 -0
  10. package/dist/commonjs/models/components/index.js.map +1 -1
  11. package/dist/commonjs/models/components/useroperation.d.ts +18 -0
  12. package/dist/commonjs/models/components/useroperation.d.ts.map +1 -1
  13. package/dist/commonjs/models/components/useroperation.js +26 -0
  14. package/dist/commonjs/models/components/useroperation.js.map +1 -1
  15. package/dist/commonjs/models/components/vaultdepositparams.d.ts +68 -0
  16. package/dist/commonjs/models/components/vaultdepositparams.d.ts.map +1 -0
  17. package/dist/commonjs/models/components/vaultdepositparams.js +109 -0
  18. package/dist/commonjs/models/components/vaultdepositparams.js.map +1 -0
  19. package/dist/commonjs/models/components/vaultwithdrawparams.d.ts +44 -0
  20. package/dist/commonjs/models/components/vaultwithdrawparams.d.ts.map +1 -0
  21. package/dist/commonjs/models/components/vaultwithdrawparams.js +86 -0
  22. package/dist/commonjs/models/components/vaultwithdrawparams.js.map +1 -0
  23. package/dist/esm/lib/config.d.ts +3 -3
  24. package/dist/esm/lib/config.js +3 -3
  25. package/dist/esm/mcp-server/mcp-server.js +1 -1
  26. package/dist/esm/mcp-server/server.js +1 -1
  27. package/dist/esm/models/components/index.d.ts +2 -0
  28. package/dist/esm/models/components/index.d.ts.map +1 -1
  29. package/dist/esm/models/components/index.js +2 -0
  30. package/dist/esm/models/components/index.js.map +1 -1
  31. package/dist/esm/models/components/useroperation.d.ts +18 -0
  32. package/dist/esm/models/components/useroperation.d.ts.map +1 -1
  33. package/dist/esm/models/components/useroperation.js +26 -0
  34. package/dist/esm/models/components/useroperation.js.map +1 -1
  35. package/dist/esm/models/components/vaultdepositparams.d.ts +68 -0
  36. package/dist/esm/models/components/vaultdepositparams.d.ts.map +1 -0
  37. package/dist/esm/models/components/vaultdepositparams.js +69 -0
  38. package/dist/esm/models/components/vaultdepositparams.js.map +1 -0
  39. package/dist/esm/models/components/vaultwithdrawparams.d.ts +44 -0
  40. package/dist/esm/models/components/vaultwithdrawparams.d.ts.map +1 -0
  41. package/dist/esm/models/components/vaultwithdrawparams.js +48 -0
  42. package/dist/esm/models/components/vaultwithdrawparams.js.map +1 -0
  43. package/jsr.json +1 -1
  44. package/package.json +6 -6
  45. package/src/lib/config.ts +3 -3
  46. package/src/mcp-server/mcp-server.ts +1 -1
  47. package/src/mcp-server/server.ts +1 -1
  48. package/src/models/components/index.ts +2 -0
  49. package/src/models/components/useroperation.ts +60 -0
  50. package/src/models/components/vaultdepositparams.ts +151 -0
  51. package/src/models/components/vaultwithdrawparams.ts +98 -0
@@ -0,0 +1,151 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ /**
12
+ * The amount of tokens to deposit into the vault.
13
+ */
14
+ export type VaultDepositParamsAmount = number | string;
15
+
16
+ export type VaultDepositParams = {
17
+ actionType?: "VAULT_DEPOSIT" | undefined;
18
+ /**
19
+ * The vault address you are depositing to.
20
+ */
21
+ vaultAddress: string;
22
+ /**
23
+ * The amount of tokens to deposit into the vault.
24
+ */
25
+ amount: number | string;
26
+ /**
27
+ * The address which will receive the shares from the vault representing their proportional ownership of the vault's assets. Defaults to the sender.
28
+ */
29
+ receiver?: string | null | undefined;
30
+ };
31
+
32
+ /** @internal */
33
+ export const VaultDepositParamsAmount$inboundSchema: z.ZodType<
34
+ VaultDepositParamsAmount,
35
+ z.ZodTypeDef,
36
+ unknown
37
+ > = z.union([z.number(), z.string()]);
38
+
39
+ /** @internal */
40
+ export type VaultDepositParamsAmount$Outbound = number | string;
41
+
42
+ /** @internal */
43
+ export const VaultDepositParamsAmount$outboundSchema: z.ZodType<
44
+ VaultDepositParamsAmount$Outbound,
45
+ z.ZodTypeDef,
46
+ VaultDepositParamsAmount
47
+ > = z.union([z.number(), z.string()]);
48
+
49
+ /**
50
+ * @internal
51
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
52
+ */
53
+ export namespace VaultDepositParamsAmount$ {
54
+ /** @deprecated use `VaultDepositParamsAmount$inboundSchema` instead. */
55
+ export const inboundSchema = VaultDepositParamsAmount$inboundSchema;
56
+ /** @deprecated use `VaultDepositParamsAmount$outboundSchema` instead. */
57
+ export const outboundSchema = VaultDepositParamsAmount$outboundSchema;
58
+ /** @deprecated use `VaultDepositParamsAmount$Outbound` instead. */
59
+ export type Outbound = VaultDepositParamsAmount$Outbound;
60
+ }
61
+
62
+ export function vaultDepositParamsAmountToJSON(
63
+ vaultDepositParamsAmount: VaultDepositParamsAmount,
64
+ ): string {
65
+ return JSON.stringify(
66
+ VaultDepositParamsAmount$outboundSchema.parse(vaultDepositParamsAmount),
67
+ );
68
+ }
69
+
70
+ export function vaultDepositParamsAmountFromJSON(
71
+ jsonString: string,
72
+ ): SafeParseResult<VaultDepositParamsAmount, SDKValidationError> {
73
+ return safeParse(
74
+ jsonString,
75
+ (x) => VaultDepositParamsAmount$inboundSchema.parse(JSON.parse(x)),
76
+ `Failed to parse 'VaultDepositParamsAmount' from JSON`,
77
+ );
78
+ }
79
+
80
+ /** @internal */
81
+ export const VaultDepositParams$inboundSchema: z.ZodType<
82
+ VaultDepositParams,
83
+ z.ZodTypeDef,
84
+ unknown
85
+ > = z.object({
86
+ action_type: z.literal("VAULT_DEPOSIT").default("VAULT_DEPOSIT"),
87
+ vault_address: z.string(),
88
+ amount: z.union([z.number(), z.string()]),
89
+ receiver: z.nullable(z.string()).optional(),
90
+ }).transform((v) => {
91
+ return remap$(v, {
92
+ "action_type": "actionType",
93
+ "vault_address": "vaultAddress",
94
+ });
95
+ });
96
+
97
+ /** @internal */
98
+ export type VaultDepositParams$Outbound = {
99
+ action_type: "VAULT_DEPOSIT";
100
+ vault_address: string;
101
+ amount: number | string;
102
+ receiver?: string | null | undefined;
103
+ };
104
+
105
+ /** @internal */
106
+ export const VaultDepositParams$outboundSchema: z.ZodType<
107
+ VaultDepositParams$Outbound,
108
+ z.ZodTypeDef,
109
+ VaultDepositParams
110
+ > = z.object({
111
+ actionType: z.literal("VAULT_DEPOSIT").default("VAULT_DEPOSIT" as const),
112
+ vaultAddress: z.string(),
113
+ amount: z.union([z.number(), z.string()]),
114
+ receiver: z.nullable(z.string()).optional(),
115
+ }).transform((v) => {
116
+ return remap$(v, {
117
+ actionType: "action_type",
118
+ vaultAddress: "vault_address",
119
+ });
120
+ });
121
+
122
+ /**
123
+ * @internal
124
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
125
+ */
126
+ export namespace VaultDepositParams$ {
127
+ /** @deprecated use `VaultDepositParams$inboundSchema` instead. */
128
+ export const inboundSchema = VaultDepositParams$inboundSchema;
129
+ /** @deprecated use `VaultDepositParams$outboundSchema` instead. */
130
+ export const outboundSchema = VaultDepositParams$outboundSchema;
131
+ /** @deprecated use `VaultDepositParams$Outbound` instead. */
132
+ export type Outbound = VaultDepositParams$Outbound;
133
+ }
134
+
135
+ export function vaultDepositParamsToJSON(
136
+ vaultDepositParams: VaultDepositParams,
137
+ ): string {
138
+ return JSON.stringify(
139
+ VaultDepositParams$outboundSchema.parse(vaultDepositParams),
140
+ );
141
+ }
142
+
143
+ export function vaultDepositParamsFromJSON(
144
+ jsonString: string,
145
+ ): SafeParseResult<VaultDepositParams, SDKValidationError> {
146
+ return safeParse(
147
+ jsonString,
148
+ (x) => VaultDepositParams$inboundSchema.parse(JSON.parse(x)),
149
+ `Failed to parse 'VaultDepositParams' from JSON`,
150
+ );
151
+ }
@@ -0,0 +1,98 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type VaultWithdrawParams = {
12
+ actionType?: "VAULT_WITHDRAW" | undefined;
13
+ /**
14
+ * The vault address you are withdrawing from.
15
+ */
16
+ vaultAddress: string;
17
+ /**
18
+ * The amount of tokens to withdraw from the vault. If set to 'ALL', your total deposited token amount will be withdrawn.
19
+ */
20
+ amount?: any | undefined;
21
+ /**
22
+ * The address which will receive the tokens withdrawn. Defaults to the sender.
23
+ */
24
+ receiver?: string | null | undefined;
25
+ };
26
+
27
+ /** @internal */
28
+ export const VaultWithdrawParams$inboundSchema: z.ZodType<
29
+ VaultWithdrawParams,
30
+ z.ZodTypeDef,
31
+ unknown
32
+ > = z.object({
33
+ action_type: z.literal("VAULT_WITHDRAW").default("VAULT_WITHDRAW"),
34
+ vault_address: z.string(),
35
+ amount: z.any().optional(),
36
+ receiver: z.nullable(z.string()).optional(),
37
+ }).transform((v) => {
38
+ return remap$(v, {
39
+ "action_type": "actionType",
40
+ "vault_address": "vaultAddress",
41
+ });
42
+ });
43
+
44
+ /** @internal */
45
+ export type VaultWithdrawParams$Outbound = {
46
+ action_type: "VAULT_WITHDRAW";
47
+ vault_address: string;
48
+ amount?: any | undefined;
49
+ receiver?: string | null | undefined;
50
+ };
51
+
52
+ /** @internal */
53
+ export const VaultWithdrawParams$outboundSchema: z.ZodType<
54
+ VaultWithdrawParams$Outbound,
55
+ z.ZodTypeDef,
56
+ VaultWithdrawParams
57
+ > = z.object({
58
+ actionType: z.literal("VAULT_WITHDRAW").default("VAULT_WITHDRAW" as const),
59
+ vaultAddress: z.string(),
60
+ amount: z.any().optional(),
61
+ receiver: z.nullable(z.string()).optional(),
62
+ }).transform((v) => {
63
+ return remap$(v, {
64
+ actionType: "action_type",
65
+ vaultAddress: "vault_address",
66
+ });
67
+ });
68
+
69
+ /**
70
+ * @internal
71
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
72
+ */
73
+ export namespace VaultWithdrawParams$ {
74
+ /** @deprecated use `VaultWithdrawParams$inboundSchema` instead. */
75
+ export const inboundSchema = VaultWithdrawParams$inboundSchema;
76
+ /** @deprecated use `VaultWithdrawParams$outboundSchema` instead. */
77
+ export const outboundSchema = VaultWithdrawParams$outboundSchema;
78
+ /** @deprecated use `VaultWithdrawParams$Outbound` instead. */
79
+ export type Outbound = VaultWithdrawParams$Outbound;
80
+ }
81
+
82
+ export function vaultWithdrawParamsToJSON(
83
+ vaultWithdrawParams: VaultWithdrawParams,
84
+ ): string {
85
+ return JSON.stringify(
86
+ VaultWithdrawParams$outboundSchema.parse(vaultWithdrawParams),
87
+ );
88
+ }
89
+
90
+ export function vaultWithdrawParamsFromJSON(
91
+ jsonString: string,
92
+ ): SafeParseResult<VaultWithdrawParams, SDKValidationError> {
93
+ return safeParse(
94
+ jsonString,
95
+ (x) => VaultWithdrawParams$inboundSchema.parse(JSON.parse(x)),
96
+ `Failed to parse 'VaultWithdrawParams' from JSON`,
97
+ );
98
+ }