@turtleclub/hooks 0.5.0-beta.70 → 0.5.0-beta.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -106,6 +106,7 @@ __export(index_exports, {
106
106
  getOpportunitiesPaginatedInputSchema: () => getOpportunitiesPaginatedInputSchema,
107
107
  getOpportunitiesPaginatedSchema: () => getOpportunitiesPaginatedSchema,
108
108
  getOpportunityById: () => getOpportunityById,
109
+ getOpportunityByIdInputSchema: () => getOpportunityByIdInputSchema,
109
110
  getPortfolioBalance: () => getPortfolioBalance,
110
111
  getProduct: () => getProduct,
111
112
  getProducts: () => getProducts,
@@ -1420,6 +1421,9 @@ var getOpportunitiesFilterOptionsSchema = import_zod8.z.object({
1420
1421
  lendingProtocols: import_zod8.z.array(filterOrganizationSchema),
1421
1422
  depositTokenSymbols: import_zod8.z.array(depositTokenSymbolSchema).optional().nullable()
1422
1423
  });
1424
+ var getOpportunityByIdInputSchema = import_zod8.z.object({
1425
+ withMainStream: import_zod8.z.boolean().optional()
1426
+ });
1423
1427
 
1424
1428
  // src/v2/opportunities/api.ts
1425
1429
  async function getOpportunities(filters, options) {
@@ -1440,8 +1444,14 @@ async function getOpportunities(filters, options) {
1440
1444
  }
1441
1445
  return result.data;
1442
1446
  }
1443
- async function getOpportunityById(id, options) {
1444
- const data = await apiClient.fetch(`/turtle/opportunities/${id}`, {
1447
+ async function getOpportunityById(id, queryParams, options) {
1448
+ const params = new URLSearchParams();
1449
+ if (queryParams?.withMainStream !== void 0) {
1450
+ params.append("withMainStream", String(queryParams.withMainStream));
1451
+ }
1452
+ const queryString = params.toString();
1453
+ const endpoint = `/turtle/opportunities/${id}${queryString ? `?${queryString}` : ""}`;
1454
+ const data = await apiClient.fetch(endpoint, {
1445
1455
  method: "GET",
1446
1456
  debug: options?.debug
1447
1457
  });
@@ -4670,6 +4680,7 @@ var queries = (0, import_query_key_factory21.mergeQueryKeys)(
4670
4680
  getOpportunitiesPaginatedInputSchema,
4671
4681
  getOpportunitiesPaginatedSchema,
4672
4682
  getOpportunityById,
4683
+ getOpportunityByIdInputSchema,
4673
4684
  getPortfolioBalance,
4674
4685
  getProduct,
4675
4686
  getProducts,