@bosonprotocol/core-sdk 1.9.1-alpha.4 → 1.10.0-alpha.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/src/subgraph.ts CHANGED
@@ -63,6 +63,10 @@ export enum Account_OrderBy {
63
63
 
64
64
  export type BaseMetadataEntity = MetadataInterface & {
65
65
  __typename?: "BaseMetadataEntity";
66
+ /**
67
+ * Enriched fields from offer entity to allow nested query workaround
68
+ *
69
+ */
66
70
  createdAt: Scalars["BigInt"];
67
71
  description?: Maybe<Scalars["String"]>;
68
72
  exchangeToken: ExchangeToken;
@@ -70,6 +74,7 @@ export type BaseMetadataEntity = MetadataInterface & {
70
74
  id: Scalars["ID"];
71
75
  name?: Maybe<Scalars["String"]>;
72
76
  offer: Offer;
77
+ quantityAvailable: Scalars["BigInt"];
73
78
  schemaUrl?: Maybe<Scalars["String"]>;
74
79
  seller: Seller;
75
80
  type: MetadataType;
@@ -195,6 +200,14 @@ export type BaseMetadataEntity_Filter = {
195
200
  offer_not_starts_with_nocase?: InputMaybe<Scalars["String"]>;
196
201
  offer_starts_with?: InputMaybe<Scalars["String"]>;
197
202
  offer_starts_with_nocase?: InputMaybe<Scalars["String"]>;
203
+ quantityAvailable?: InputMaybe<Scalars["BigInt"]>;
204
+ quantityAvailable_gt?: InputMaybe<Scalars["BigInt"]>;
205
+ quantityAvailable_gte?: InputMaybe<Scalars["BigInt"]>;
206
+ quantityAvailable_in?: InputMaybe<Array<Scalars["BigInt"]>>;
207
+ quantityAvailable_lt?: InputMaybe<Scalars["BigInt"]>;
208
+ quantityAvailable_lte?: InputMaybe<Scalars["BigInt"]>;
209
+ quantityAvailable_not?: InputMaybe<Scalars["BigInt"]>;
210
+ quantityAvailable_not_in?: InputMaybe<Array<Scalars["BigInt"]>>;
198
211
  schemaUrl?: InputMaybe<Scalars["String"]>;
199
212
  schemaUrl_contains?: InputMaybe<Scalars["String"]>;
200
213
  schemaUrl_contains_nocase?: InputMaybe<Scalars["String"]>;
@@ -269,6 +282,7 @@ export enum BaseMetadataEntity_OrderBy {
269
282
  Id = "id",
270
283
  Name = "name",
271
284
  Offer = "offer",
285
+ QuantityAvailable = "quantityAvailable",
272
286
  SchemaUrl = "schemaUrl",
273
287
  Seller = "seller",
274
288
  Type = "type",
@@ -803,6 +817,7 @@ export type MetadataInterface = {
803
817
  name?: Maybe<Scalars["String"]>;
804
818
  /** Reference to related Offer entity */
805
819
  offer: Offer;
820
+ quantityAvailable: Scalars["BigInt"];
806
821
  /** JSON schema URL */
807
822
  schemaUrl?: Maybe<Scalars["String"]>;
808
823
  /** Reference to related Seller entity */
@@ -931,6 +946,14 @@ export type MetadataInterface_Filter = {
931
946
  offer_not_starts_with_nocase?: InputMaybe<Scalars["String"]>;
932
947
  offer_starts_with?: InputMaybe<Scalars["String"]>;
933
948
  offer_starts_with_nocase?: InputMaybe<Scalars["String"]>;
949
+ quantityAvailable?: InputMaybe<Scalars["BigInt"]>;
950
+ quantityAvailable_gt?: InputMaybe<Scalars["BigInt"]>;
951
+ quantityAvailable_gte?: InputMaybe<Scalars["BigInt"]>;
952
+ quantityAvailable_in?: InputMaybe<Array<Scalars["BigInt"]>>;
953
+ quantityAvailable_lt?: InputMaybe<Scalars["BigInt"]>;
954
+ quantityAvailable_lte?: InputMaybe<Scalars["BigInt"]>;
955
+ quantityAvailable_not?: InputMaybe<Scalars["BigInt"]>;
956
+ quantityAvailable_not_in?: InputMaybe<Array<Scalars["BigInt"]>>;
934
957
  schemaUrl?: InputMaybe<Scalars["String"]>;
935
958
  schemaUrl_contains?: InputMaybe<Scalars["String"]>;
936
959
  schemaUrl_contains_nocase?: InputMaybe<Scalars["String"]>;
@@ -1005,6 +1028,7 @@ export enum MetadataInterface_OrderBy {
1005
1028
  Id = "id",
1006
1029
  Name = "name",
1007
1030
  Offer = "offer",
1031
+ QuantityAvailable = "quantityAvailable",
1008
1032
  SchemaUrl = "schemaUrl",
1009
1033
  Seller = "seller",
1010
1034
  Type = "type",
@@ -1428,6 +1452,10 @@ export type ProductV1MetadataEntity = MetadataInterface & {
1428
1452
  __typename?: "ProductV1MetadataEntity";
1429
1453
  brand: ProductV1Brand;
1430
1454
  brandName?: Maybe<Scalars["String"]>;
1455
+ /**
1456
+ * Enriched fields from offer entity to allow nested query workaround
1457
+ *
1458
+ */
1431
1459
  createdAt: Scalars["BigInt"];
1432
1460
  description?: Maybe<Scalars["String"]>;
1433
1461
  exchangeToken: ExchangeToken;
@@ -1440,6 +1468,7 @@ export type ProductV1MetadataEntity = MetadataInterface & {
1440
1468
  images?: Maybe<Array<Scalars["String"]>>;
1441
1469
  name?: Maybe<Scalars["String"]>;
1442
1470
  offer: Offer;
1471
+ quantityAvailable: Scalars["BigInt"];
1443
1472
  schemaUrl?: Maybe<Scalars["String"]>;
1444
1473
  seller: Seller;
1445
1474
  tags?: Maybe<Array<Scalars["String"]>>;
@@ -1612,6 +1641,14 @@ export type ProductV1MetadataEntity_Filter = {
1612
1641
  offer_not_starts_with_nocase?: InputMaybe<Scalars["String"]>;
1613
1642
  offer_starts_with?: InputMaybe<Scalars["String"]>;
1614
1643
  offer_starts_with_nocase?: InputMaybe<Scalars["String"]>;
1644
+ quantityAvailable?: InputMaybe<Scalars["BigInt"]>;
1645
+ quantityAvailable_gt?: InputMaybe<Scalars["BigInt"]>;
1646
+ quantityAvailable_gte?: InputMaybe<Scalars["BigInt"]>;
1647
+ quantityAvailable_in?: InputMaybe<Array<Scalars["BigInt"]>>;
1648
+ quantityAvailable_lt?: InputMaybe<Scalars["BigInt"]>;
1649
+ quantityAvailable_lte?: InputMaybe<Scalars["BigInt"]>;
1650
+ quantityAvailable_not?: InputMaybe<Scalars["BigInt"]>;
1651
+ quantityAvailable_not_in?: InputMaybe<Array<Scalars["BigInt"]>>;
1615
1652
  schemaUrl?: InputMaybe<Scalars["String"]>;
1616
1653
  schemaUrl_contains?: InputMaybe<Scalars["String"]>;
1617
1654
  schemaUrl_contains_nocase?: InputMaybe<Scalars["String"]>;
@@ -1695,6 +1732,7 @@ export enum ProductV1MetadataEntity_OrderBy {
1695
1732
  Images = "images",
1696
1733
  Name = "name",
1697
1734
  Offer = "offer",
1735
+ QuantityAvailable = "quantityAvailable",
1698
1736
  SchemaUrl = "schemaUrl",
1699
1737
  Seller = "seller",
1700
1738
  Tags = "tags",
@@ -2526,6 +2564,122 @@ export type GetSellersQueryQuery = {
2526
2564
  }>;
2527
2565
  };
2528
2566
 
2567
+ export type GetBuyerByIdQueryQueryVariables = Exact<{
2568
+ buyerId: Scalars["ID"];
2569
+ fundsSkip?: InputMaybe<Scalars["Int"]>;
2570
+ fundsFirst?: InputMaybe<Scalars["Int"]>;
2571
+ fundsOrderBy?: InputMaybe<FundsEntity_OrderBy>;
2572
+ fundsOrderDirection?: InputMaybe<OrderDirection>;
2573
+ fundsFilter?: InputMaybe<FundsEntity_Filter>;
2574
+ exchangesSkip?: InputMaybe<Scalars["Int"]>;
2575
+ exchangesFirst?: InputMaybe<Scalars["Int"]>;
2576
+ exchangesOrderBy?: InputMaybe<Exchange_OrderBy>;
2577
+ exchangesOrderDirection?: InputMaybe<OrderDirection>;
2578
+ exchangesFilter?: InputMaybe<Exchange_Filter>;
2579
+ includeExchanges?: InputMaybe<Scalars["Boolean"]>;
2580
+ includeFunds?: InputMaybe<Scalars["Boolean"]>;
2581
+ }>;
2582
+
2583
+ export type GetBuyerByIdQueryQuery = {
2584
+ __typename?: "Query";
2585
+ buyer?: {
2586
+ __typename?: "Buyer";
2587
+ id: string;
2588
+ wallet: string;
2589
+ active: boolean;
2590
+ funds?: Array<{
2591
+ __typename?: "FundsEntity";
2592
+ id: string;
2593
+ availableAmount: string;
2594
+ accountId: string;
2595
+ token: {
2596
+ __typename?: "ExchangeToken";
2597
+ address: string;
2598
+ name: string;
2599
+ symbol: string;
2600
+ decimals: string;
2601
+ };
2602
+ }>;
2603
+ exchanges?: Array<{
2604
+ __typename?: "Exchange";
2605
+ id: string;
2606
+ disputed: boolean;
2607
+ state: ExchangeState;
2608
+ committedDate: string;
2609
+ finalizedDate?: string | null;
2610
+ validUntilDate: string;
2611
+ redeemedDate?: string | null;
2612
+ revokedDate?: string | null;
2613
+ cancelledDate?: string | null;
2614
+ completedDate?: string | null;
2615
+ expired: boolean;
2616
+ }>;
2617
+ } | null;
2618
+ };
2619
+
2620
+ export type GetBuyersQueryQueryVariables = Exact<{
2621
+ BuyersSkip?: InputMaybe<Scalars["Int"]>;
2622
+ BuyersFirst?: InputMaybe<Scalars["Int"]>;
2623
+ BuyersOrderBy?: InputMaybe<Buyer_OrderBy>;
2624
+ BuyersOrderDirection?: InputMaybe<OrderDirection>;
2625
+ BuyersFilter?: InputMaybe<Buyer_Filter>;
2626
+ fundsSkip?: InputMaybe<Scalars["Int"]>;
2627
+ fundsFirst?: InputMaybe<Scalars["Int"]>;
2628
+ fundsOrderBy?: InputMaybe<FundsEntity_OrderBy>;
2629
+ fundsOrderDirection?: InputMaybe<OrderDirection>;
2630
+ fundsFilter?: InputMaybe<FundsEntity_Filter>;
2631
+ offersSkip?: InputMaybe<Scalars["Int"]>;
2632
+ offersFirst?: InputMaybe<Scalars["Int"]>;
2633
+ offersOrderBy?: InputMaybe<Offer_OrderBy>;
2634
+ offersOrderDirection?: InputMaybe<OrderDirection>;
2635
+ offersFilter?: InputMaybe<Offer_Filter>;
2636
+ exchangesSkip?: InputMaybe<Scalars["Int"]>;
2637
+ exchangesFirst?: InputMaybe<Scalars["Int"]>;
2638
+ exchangesOrderBy?: InputMaybe<Exchange_OrderBy>;
2639
+ exchangesOrderDirection?: InputMaybe<OrderDirection>;
2640
+ exchangesFilter?: InputMaybe<Exchange_Filter>;
2641
+ includeExchanges?: InputMaybe<Scalars["Boolean"]>;
2642
+ includeOffers?: InputMaybe<Scalars["Boolean"]>;
2643
+ includeFunds?: InputMaybe<Scalars["Boolean"]>;
2644
+ }>;
2645
+
2646
+ export type GetBuyersQueryQuery = {
2647
+ __typename?: "Query";
2648
+ buyers: Array<{
2649
+ __typename?: "Buyer";
2650
+ id: string;
2651
+ wallet: string;
2652
+ active: boolean;
2653
+ funds?: Array<{
2654
+ __typename?: "FundsEntity";
2655
+ id: string;
2656
+ availableAmount: string;
2657
+ accountId: string;
2658
+ token: {
2659
+ __typename?: "ExchangeToken";
2660
+ address: string;
2661
+ name: string;
2662
+ symbol: string;
2663
+ decimals: string;
2664
+ };
2665
+ }>;
2666
+ exchanges?: Array<{
2667
+ __typename?: "Exchange";
2668
+ id: string;
2669
+ disputed: boolean;
2670
+ state: ExchangeState;
2671
+ committedDate: string;
2672
+ finalizedDate?: string | null;
2673
+ validUntilDate: string;
2674
+ redeemedDate?: string | null;
2675
+ revokedDate?: string | null;
2676
+ cancelledDate?: string | null;
2677
+ completedDate?: string | null;
2678
+ expired: boolean;
2679
+ }>;
2680
+ }>;
2681
+ };
2682
+
2529
2683
  export type SellerFieldsFragment = {
2530
2684
  __typename?: "Seller";
2531
2685
  id: string;
@@ -2629,6 +2783,40 @@ export type BaseSellerFieldsFragment = {
2629
2783
  active: boolean;
2630
2784
  };
2631
2785
 
2786
+ export type BuyerFieldsFragment = {
2787
+ __typename?: "Buyer";
2788
+ id: string;
2789
+ wallet: string;
2790
+ active: boolean;
2791
+ funds?: Array<{
2792
+ __typename?: "FundsEntity";
2793
+ id: string;
2794
+ availableAmount: string;
2795
+ accountId: string;
2796
+ token: {
2797
+ __typename?: "ExchangeToken";
2798
+ address: string;
2799
+ name: string;
2800
+ symbol: string;
2801
+ decimals: string;
2802
+ };
2803
+ }>;
2804
+ exchanges?: Array<{
2805
+ __typename?: "Exchange";
2806
+ id: string;
2807
+ disputed: boolean;
2808
+ state: ExchangeState;
2809
+ committedDate: string;
2810
+ finalizedDate?: string | null;
2811
+ validUntilDate: string;
2812
+ redeemedDate?: string | null;
2813
+ revokedDate?: string | null;
2814
+ cancelledDate?: string | null;
2815
+ completedDate?: string | null;
2816
+ expired: boolean;
2817
+ }>;
2818
+ };
2819
+
2632
2820
  export type BaseBuyerFieldsFragment = {
2633
2821
  __typename?: "Buyer";
2634
2822
  id: string;
@@ -3403,6 +3591,32 @@ export const BaseBuyerFieldsFragmentDoc = gql`
3403
3591
  active
3404
3592
  }
3405
3593
  `;
3594
+ export const BuyerFieldsFragmentDoc = gql`
3595
+ fragment BuyerFields on Buyer {
3596
+ ...BaseBuyerFields
3597
+ funds(
3598
+ skip: $fundsSkip
3599
+ first: $fundsFirst
3600
+ orderBy: $fundsOrderBy
3601
+ orderDirection: $fundsOrderDirection
3602
+ where: $fundsFilter
3603
+ ) @include(if: $includeFunds) {
3604
+ ...FundsEntityFields
3605
+ }
3606
+ exchanges(
3607
+ skip: $exchangesSkip
3608
+ first: $exchangesFirst
3609
+ orderBy: $exchangesOrderBy
3610
+ orderDirection: $exchangesOrderDirection
3611
+ where: $exchangesFilter
3612
+ ) @include(if: $includeExchanges) {
3613
+ ...BaseExchangeFields
3614
+ }
3615
+ }
3616
+ ${BaseBuyerFieldsFragmentDoc}
3617
+ ${FundsEntityFieldsFragmentDoc}
3618
+ ${BaseExchangeFieldsFragmentDoc}
3619
+ `;
3406
3620
  export const ExchangeFieldsFragmentDoc = gql`
3407
3621
  fragment ExchangeFields on Exchange {
3408
3622
  ...BaseExchangeFields
@@ -3503,6 +3717,66 @@ export const GetSellersQueryDocument = gql`
3503
3717
  }
3504
3718
  ${SellerFieldsFragmentDoc}
3505
3719
  `;
3720
+ export const GetBuyerByIdQueryDocument = gql`
3721
+ query getBuyerByIdQuery(
3722
+ $buyerId: ID!
3723
+ $fundsSkip: Int
3724
+ $fundsFirst: Int
3725
+ $fundsOrderBy: FundsEntity_orderBy
3726
+ $fundsOrderDirection: OrderDirection
3727
+ $fundsFilter: FundsEntity_filter
3728
+ $exchangesSkip: Int
3729
+ $exchangesFirst: Int
3730
+ $exchangesOrderBy: Exchange_orderBy
3731
+ $exchangesOrderDirection: OrderDirection
3732
+ $exchangesFilter: Exchange_filter
3733
+ $includeExchanges: Boolean = false
3734
+ $includeFunds: Boolean = false
3735
+ ) {
3736
+ buyer(id: $buyerId) {
3737
+ ...BuyerFields
3738
+ }
3739
+ }
3740
+ ${BuyerFieldsFragmentDoc}
3741
+ `;
3742
+ export const GetBuyersQueryDocument = gql`
3743
+ query getBuyersQuery(
3744
+ $BuyersSkip: Int
3745
+ $BuyersFirst: Int
3746
+ $BuyersOrderBy: Buyer_orderBy
3747
+ $BuyersOrderDirection: OrderDirection
3748
+ $BuyersFilter: Buyer_filter
3749
+ $fundsSkip: Int
3750
+ $fundsFirst: Int
3751
+ $fundsOrderBy: FundsEntity_orderBy
3752
+ $fundsOrderDirection: OrderDirection
3753
+ $fundsFilter: FundsEntity_filter
3754
+ $offersSkip: Int
3755
+ $offersFirst: Int
3756
+ $offersOrderBy: Offer_orderBy
3757
+ $offersOrderDirection: OrderDirection
3758
+ $offersFilter: Offer_filter
3759
+ $exchangesSkip: Int
3760
+ $exchangesFirst: Int
3761
+ $exchangesOrderBy: Exchange_orderBy
3762
+ $exchangesOrderDirection: OrderDirection
3763
+ $exchangesFilter: Exchange_filter
3764
+ $includeExchanges: Boolean = false
3765
+ $includeOffers: Boolean = false
3766
+ $includeFunds: Boolean = false
3767
+ ) {
3768
+ buyers(
3769
+ skip: $BuyersSkip
3770
+ first: $BuyersFirst
3771
+ orderBy: $BuyersOrderBy
3772
+ orderDirection: $BuyersOrderDirection
3773
+ where: $BuyersFilter
3774
+ ) {
3775
+ ...BuyerFields
3776
+ }
3777
+ }
3778
+ ${BuyerFieldsFragmentDoc}
3779
+ `;
3506
3780
  export const GetExchangeByIdQueryDocument = gql`
3507
3781
  query getExchangeByIdQuery($exchangeId: ID!) {
3508
3782
  exchange(id: $exchangeId) {
@@ -3649,6 +3923,36 @@ export function getSdk(
3649
3923
  "query"
3650
3924
  );
3651
3925
  },
3926
+ getBuyerByIdQuery(
3927
+ variables: GetBuyerByIdQueryQueryVariables,
3928
+ requestHeaders?: Dom.RequestInit["headers"]
3929
+ ): Promise<GetBuyerByIdQueryQuery> {
3930
+ return withWrapper(
3931
+ (wrappedRequestHeaders) =>
3932
+ client.request<GetBuyerByIdQueryQuery>(
3933
+ GetBuyerByIdQueryDocument,
3934
+ variables,
3935
+ { ...requestHeaders, ...wrappedRequestHeaders }
3936
+ ),
3937
+ "getBuyerByIdQuery",
3938
+ "query"
3939
+ );
3940
+ },
3941
+ getBuyersQuery(
3942
+ variables?: GetBuyersQueryQueryVariables,
3943
+ requestHeaders?: Dom.RequestInit["headers"]
3944
+ ): Promise<GetBuyersQueryQuery> {
3945
+ return withWrapper(
3946
+ (wrappedRequestHeaders) =>
3947
+ client.request<GetBuyersQueryQuery>(
3948
+ GetBuyersQueryDocument,
3949
+ variables,
3950
+ { ...requestHeaders, ...wrappedRequestHeaders }
3951
+ ),
3952
+ "getBuyersQuery",
3953
+ "query"
3954
+ );
3955
+ },
3652
3956
  getExchangeByIdQuery(
3653
3957
  variables: GetExchangeByIdQueryQueryVariables,
3654
3958
  requestHeaders?: Dom.RequestInit["headers"]