@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 +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +14 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -8767,9 +8767,14 @@ var GET_VENUES = gql`
|
|
|
8767
8767
|
}
|
|
8768
8768
|
`;
|
|
8769
8769
|
var GET_MARKETS = gql`
|
|
8770
|
-
query GetMarkets(
|
|
8770
|
+
query GetMarkets(
|
|
8771
|
+
$venueId: BigInt
|
|
8772
|
+
$search: String = ""
|
|
8773
|
+
$first: Int = 100
|
|
8774
|
+
$skip: Int = 0
|
|
8775
|
+
) {
|
|
8771
8776
|
markets(
|
|
8772
|
-
where: { venue_: { venueId: $venueId } }
|
|
8777
|
+
where: { venue_: { venueId: $venueId }, question_contains_nocase: $search }
|
|
8773
8778
|
first: $first
|
|
8774
8779
|
skip: $skip
|
|
8775
8780
|
orderBy: createdAt
|
|
@@ -8801,11 +8806,12 @@ var GET_MARKETS = gql`
|
|
|
8801
8806
|
var GET_MARKETS_WITH_PRICING = gql`
|
|
8802
8807
|
query GetMarketsWithPricing(
|
|
8803
8808
|
$venueId: BigInt
|
|
8809
|
+
$search: String = ""
|
|
8804
8810
|
$first: Int = 100
|
|
8805
8811
|
$skip: Int = 0
|
|
8806
8812
|
) {
|
|
8807
8813
|
markets(
|
|
8808
|
-
where: { venue_: { venueId: $venueId } }
|
|
8814
|
+
where: { venue_: { venueId: $venueId }, question_contains_nocase: $search }
|
|
8809
8815
|
first: $first
|
|
8810
8816
|
skip: $skip
|
|
8811
8817
|
orderBy: createdAt
|
|
@@ -9871,16 +9877,21 @@ var PublicModule = class extends BaseModule {
|
|
|
9871
9877
|
async getMarkets(params) {
|
|
9872
9878
|
return this.subgraph.request(GET_MARKETS, {
|
|
9873
9879
|
venueId: params.venueId?.toString(),
|
|
9880
|
+
search: params.search ?? "",
|
|
9874
9881
|
first: params.first || 100,
|
|
9875
9882
|
skip: params.skip || 0
|
|
9876
9883
|
});
|
|
9877
9884
|
}
|
|
9878
9885
|
/**
|
|
9879
9886
|
* Get markets with pricing data (last trade prices + statistics)
|
|
9887
|
+
*
|
|
9888
|
+
* @param params.search Optional case-insensitive substring match against the
|
|
9889
|
+
* market `question` field. Empty string matches all markets.
|
|
9880
9890
|
*/
|
|
9881
9891
|
async getMarketsWithPricing(params) {
|
|
9882
9892
|
return this.subgraph.request(GET_MARKETS_WITH_PRICING, {
|
|
9883
9893
|
venueId: params.venueId?.toString(),
|
|
9894
|
+
search: params.search ?? "",
|
|
9884
9895
|
first: params.first || 100,
|
|
9885
9896
|
skip: params.skip || 0
|
|
9886
9897
|
});
|