@compass-labs/api-sdk 0.5.9 → 0.5.10

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 (30) hide show
  1. package/bin/mcp-server.js +22 -10
  2. package/bin/mcp-server.js.map +6 -6
  3. package/dist/commonjs/lib/config.d.ts +2 -2
  4. package/dist/commonjs/lib/config.js +2 -2
  5. package/dist/commonjs/lib/config.js.map +1 -1
  6. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  7. package/dist/commonjs/mcp-server/mcp-server.js.map +1 -1
  8. package/dist/commonjs/mcp-server/server.js +1 -1
  9. package/dist/commonjs/mcp-server/server.js.map +1 -1
  10. package/dist/commonjs/models/components/aavelooprequest.d.ts +52 -4
  11. package/dist/commonjs/models/components/aavelooprequest.d.ts.map +1 -1
  12. package/dist/commonjs/models/components/aavelooprequest.js +51 -5
  13. package/dist/commonjs/models/components/aavelooprequest.js.map +1 -1
  14. package/dist/esm/lib/config.d.ts +2 -2
  15. package/dist/esm/lib/config.js +2 -2
  16. package/dist/esm/lib/config.js.map +1 -1
  17. package/dist/esm/mcp-server/mcp-server.js +1 -1
  18. package/dist/esm/mcp-server/mcp-server.js.map +1 -1
  19. package/dist/esm/mcp-server/server.js +1 -1
  20. package/dist/esm/mcp-server/server.js.map +1 -1
  21. package/dist/esm/models/components/aavelooprequest.d.ts +52 -4
  22. package/dist/esm/models/components/aavelooprequest.d.ts.map +1 -1
  23. package/dist/esm/models/components/aavelooprequest.js +46 -4
  24. package/dist/esm/models/components/aavelooprequest.js.map +1 -1
  25. package/jsr.json +1 -1
  26. package/package.json +1 -1
  27. package/src/lib/config.ts +2 -2
  28. package/src/mcp-server/mcp-server.ts +1 -1
  29. package/src/mcp-server/server.ts +1 -1
  30. package/src/models/components/aavelooprequest.ts +110 -8
package/src/lib/config.ts CHANGED
@@ -61,8 +61,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
61
61
  export const SDK_METADATA = {
62
62
  language: "typescript",
63
63
  openapiDocVersion: "0.0.1",
64
- sdkVersion: "0.5.9",
64
+ sdkVersion: "0.5.10",
65
65
  genVersion: "2.623.0",
66
66
  userAgent:
67
- "speakeasy-sdk/typescript 0.5.9 2.623.0 0.0.1 @compass-labs/api-sdk",
67
+ "speakeasy-sdk/typescript 0.5.10 2.623.0 0.0.1 @compass-labs/api-sdk",
68
68
  } as const;
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "0.5.9",
22
+ currentVersion: "0.5.10",
23
23
  },
24
24
  });
25
25
 
@@ -100,7 +100,7 @@ export function createMCPServer(deps: {
100
100
  }) {
101
101
  const server = new McpServer({
102
102
  name: "CompassApiSDK",
103
- version: "0.5.9",
103
+ version: "0.5.10",
104
104
  });
105
105
 
106
106
  const client = new CompassApiSDKCore({
@@ -30,6 +30,16 @@ export type InitialCollateralAmount = number | string;
30
30
  */
31
31
  export type Multiplier = number | string;
32
32
 
33
+ /**
34
+ * Maximum allowed slippage for token swaps in percentage
35
+ */
36
+ export type MaxSlippagePercent = number | string;
37
+
38
+ /**
39
+ * Loan To Value percentage of the loop
40
+ */
41
+ export type LoanToValue = number | string;
42
+
33
43
  /**
34
44
  * Request model for executing an Aave loop strategy.
35
45
  */
@@ -72,11 +82,11 @@ export type AaveLoopRequest = {
72
82
  /**
73
83
  * Maximum allowed slippage for token swaps in percentage
74
84
  */
75
- maxSlippagePercent: number;
85
+ maxSlippagePercent: number | string;
76
86
  /**
77
87
  * Loan To Value percentage of the loop
78
88
  */
79
- loanToValue: number;
89
+ loanToValue: number | string;
80
90
  };
81
91
 
82
92
  /** @internal */
@@ -171,6 +181,98 @@ export function multiplierFromJSON(
171
181
  );
172
182
  }
173
183
 
184
+ /** @internal */
185
+ export const MaxSlippagePercent$inboundSchema: z.ZodType<
186
+ MaxSlippagePercent,
187
+ z.ZodTypeDef,
188
+ unknown
189
+ > = z.union([z.number(), z.string()]);
190
+
191
+ /** @internal */
192
+ export type MaxSlippagePercent$Outbound = number | string;
193
+
194
+ /** @internal */
195
+ export const MaxSlippagePercent$outboundSchema: z.ZodType<
196
+ MaxSlippagePercent$Outbound,
197
+ z.ZodTypeDef,
198
+ MaxSlippagePercent
199
+ > = z.union([z.number(), z.string()]);
200
+
201
+ /**
202
+ * @internal
203
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
204
+ */
205
+ export namespace MaxSlippagePercent$ {
206
+ /** @deprecated use `MaxSlippagePercent$inboundSchema` instead. */
207
+ export const inboundSchema = MaxSlippagePercent$inboundSchema;
208
+ /** @deprecated use `MaxSlippagePercent$outboundSchema` instead. */
209
+ export const outboundSchema = MaxSlippagePercent$outboundSchema;
210
+ /** @deprecated use `MaxSlippagePercent$Outbound` instead. */
211
+ export type Outbound = MaxSlippagePercent$Outbound;
212
+ }
213
+
214
+ export function maxSlippagePercentToJSON(
215
+ maxSlippagePercent: MaxSlippagePercent,
216
+ ): string {
217
+ return JSON.stringify(
218
+ MaxSlippagePercent$outboundSchema.parse(maxSlippagePercent),
219
+ );
220
+ }
221
+
222
+ export function maxSlippagePercentFromJSON(
223
+ jsonString: string,
224
+ ): SafeParseResult<MaxSlippagePercent, SDKValidationError> {
225
+ return safeParse(
226
+ jsonString,
227
+ (x) => MaxSlippagePercent$inboundSchema.parse(JSON.parse(x)),
228
+ `Failed to parse 'MaxSlippagePercent' from JSON`,
229
+ );
230
+ }
231
+
232
+ /** @internal */
233
+ export const LoanToValue$inboundSchema: z.ZodType<
234
+ LoanToValue,
235
+ z.ZodTypeDef,
236
+ unknown
237
+ > = z.union([z.number(), z.string()]);
238
+
239
+ /** @internal */
240
+ export type LoanToValue$Outbound = number | string;
241
+
242
+ /** @internal */
243
+ export const LoanToValue$outboundSchema: z.ZodType<
244
+ LoanToValue$Outbound,
245
+ z.ZodTypeDef,
246
+ LoanToValue
247
+ > = z.union([z.number(), z.string()]);
248
+
249
+ /**
250
+ * @internal
251
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
252
+ */
253
+ export namespace LoanToValue$ {
254
+ /** @deprecated use `LoanToValue$inboundSchema` instead. */
255
+ export const inboundSchema = LoanToValue$inboundSchema;
256
+ /** @deprecated use `LoanToValue$outboundSchema` instead. */
257
+ export const outboundSchema = LoanToValue$outboundSchema;
258
+ /** @deprecated use `LoanToValue$Outbound` instead. */
259
+ export type Outbound = LoanToValue$Outbound;
260
+ }
261
+
262
+ export function loanToValueToJSON(loanToValue: LoanToValue): string {
263
+ return JSON.stringify(LoanToValue$outboundSchema.parse(loanToValue));
264
+ }
265
+
266
+ export function loanToValueFromJSON(
267
+ jsonString: string,
268
+ ): SafeParseResult<LoanToValue, SDKValidationError> {
269
+ return safeParse(
270
+ jsonString,
271
+ (x) => LoanToValue$inboundSchema.parse(JSON.parse(x)),
272
+ `Failed to parse 'LoanToValue' from JSON`,
273
+ );
274
+ }
275
+
174
276
  /** @internal */
175
277
  export const AaveLoopRequest$inboundSchema: z.ZodType<
176
278
  AaveLoopRequest,
@@ -184,8 +286,8 @@ export const AaveLoopRequest$inboundSchema: z.ZodType<
184
286
  borrow_token: TokenEnum$inboundSchema,
185
287
  initial_collateral_amount: z.union([z.number(), z.string()]),
186
288
  multiplier: z.union([z.number(), z.string()]),
187
- max_slippage_percent: z.number(),
188
- loan_to_value: z.number(),
289
+ max_slippage_percent: z.union([z.number(), z.string()]),
290
+ loan_to_value: z.union([z.number(), z.string()]),
189
291
  }).transform((v) => {
190
292
  return remap$(v, {
191
293
  "signed_authorization": "signedAuthorization",
@@ -206,8 +308,8 @@ export type AaveLoopRequest$Outbound = {
206
308
  borrow_token: string;
207
309
  initial_collateral_amount: number | string;
208
310
  multiplier: number | string;
209
- max_slippage_percent: number;
210
- loan_to_value: number;
311
+ max_slippage_percent: number | string;
312
+ loan_to_value: number | string;
211
313
  };
212
314
 
213
315
  /** @internal */
@@ -223,8 +325,8 @@ export const AaveLoopRequest$outboundSchema: z.ZodType<
223
325
  borrowToken: TokenEnum$outboundSchema,
224
326
  initialCollateralAmount: z.union([z.number(), z.string()]),
225
327
  multiplier: z.union([z.number(), z.string()]),
226
- maxSlippagePercent: z.number(),
227
- loanToValue: z.number(),
328
+ maxSlippagePercent: z.union([z.number(), z.string()]),
329
+ loanToValue: z.union([z.number(), z.string()]),
228
330
  }).transform((v) => {
229
331
  return remap$(v, {
230
332
  signedAuthorization: "signed_authorization",