@oddmaki-protocol/sdk 1.1.1 → 1.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.
package/dist/index.d.mts CHANGED
@@ -8962,14 +8962,19 @@ declare class PublicModule extends BaseModule {
8962
8962
  */
8963
8963
  getMarkets(params: {
8964
8964
  venueId?: bigint;
8965
+ search?: string;
8965
8966
  first?: number;
8966
8967
  skip?: number;
8967
8968
  }): Promise<unknown>;
8968
8969
  /**
8969
8970
  * Get markets with pricing data (last trade prices + statistics)
8971
+ *
8972
+ * @param params.search Optional case-insensitive substring match against the
8973
+ * market `question` field. Empty string matches all markets.
8970
8974
  */
8971
8975
  getMarketsWithPricing(params: {
8972
8976
  venueId?: bigint;
8977
+ search?: string;
8973
8978
  first?: number;
8974
8979
  skip?: number;
8975
8980
  }): Promise<unknown>;
package/dist/index.d.ts CHANGED
@@ -8962,14 +8962,19 @@ declare class PublicModule extends BaseModule {
8962
8962
  */
8963
8963
  getMarkets(params: {
8964
8964
  venueId?: bigint;
8965
+ search?: string;
8965
8966
  first?: number;
8966
8967
  skip?: number;
8967
8968
  }): Promise<unknown>;
8968
8969
  /**
8969
8970
  * Get markets with pricing data (last trade prices + statistics)
8971
+ *
8972
+ * @param params.search Optional case-insensitive substring match against the
8973
+ * market `question` field. Empty string matches all markets.
8970
8974
  */
8971
8975
  getMarketsWithPricing(params: {
8972
8976
  venueId?: bigint;
8977
+ search?: string;
8973
8978
  first?: number;
8974
8979
  skip?: number;
8975
8980
  }): Promise<unknown>;
package/dist/index.js CHANGED
@@ -8769,9 +8769,14 @@ var GET_VENUES = graphqlRequest.gql`
8769
8769
  }
8770
8770
  `;
8771
8771
  var GET_MARKETS = graphqlRequest.gql`
8772
- query GetMarkets($venueId: BigInt, $first: Int = 100, $skip: Int = 0) {
8772
+ query GetMarkets(
8773
+ $venueId: BigInt
8774
+ $search: String = ""
8775
+ $first: Int = 100
8776
+ $skip: Int = 0
8777
+ ) {
8773
8778
  markets(
8774
- where: { venue_: { venueId: $venueId } }
8779
+ where: { venue_: { venueId: $venueId }, question_contains_nocase: $search }
8775
8780
  first: $first
8776
8781
  skip: $skip
8777
8782
  orderBy: createdAt
@@ -8803,11 +8808,12 @@ var GET_MARKETS = graphqlRequest.gql`
8803
8808
  var GET_MARKETS_WITH_PRICING = graphqlRequest.gql`
8804
8809
  query GetMarketsWithPricing(
8805
8810
  $venueId: BigInt
8811
+ $search: String = ""
8806
8812
  $first: Int = 100
8807
8813
  $skip: Int = 0
8808
8814
  ) {
8809
8815
  markets(
8810
- where: { venue_: { venueId: $venueId } }
8816
+ where: { venue_: { venueId: $venueId }, question_contains_nocase: $search }
8811
8817
  first: $first
8812
8818
  skip: $skip
8813
8819
  orderBy: createdAt
@@ -9873,16 +9879,21 @@ var PublicModule = class extends BaseModule {
9873
9879
  async getMarkets(params) {
9874
9880
  return this.subgraph.request(GET_MARKETS, {
9875
9881
  venueId: params.venueId?.toString(),
9882
+ search: params.search ?? "",
9876
9883
  first: params.first || 100,
9877
9884
  skip: params.skip || 0
9878
9885
  });
9879
9886
  }
9880
9887
  /**
9881
9888
  * Get markets with pricing data (last trade prices + statistics)
9889
+ *
9890
+ * @param params.search Optional case-insensitive substring match against the
9891
+ * market `question` field. Empty string matches all markets.
9882
9892
  */
9883
9893
  async getMarketsWithPricing(params) {
9884
9894
  return this.subgraph.request(GET_MARKETS_WITH_PRICING, {
9885
9895
  venueId: params.venueId?.toString(),
9896
+ search: params.search ?? "",
9886
9897
  first: params.first || 100,
9887
9898
  skip: params.skip || 0
9888
9899
  });