@bosonprotocol/core-sdk 1.46.1 → 1.47.0-alpha.1

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 (52) hide show
  1. package/dist/cjs/core-sdk.d.ts +2 -1
  2. package/dist/cjs/core-sdk.d.ts.map +1 -1
  3. package/dist/cjs/core-sdk.js +3 -1
  4. package/dist/cjs/core-sdk.js.map +1 -1
  5. package/dist/cjs/search/index.d.ts +2 -0
  6. package/dist/cjs/search/index.d.ts.map +1 -0
  7. package/dist/cjs/search/index.js +38 -0
  8. package/dist/cjs/search/index.js.map +1 -0
  9. package/dist/cjs/search/mixin.d.ts +21 -0
  10. package/dist/cjs/search/mixin.d.ts.map +1 -0
  11. package/dist/cjs/search/mixin.js +68 -0
  12. package/dist/cjs/search/mixin.js.map +1 -0
  13. package/dist/cjs/search/subgraph.d.ts +3 -0
  14. package/dist/cjs/search/subgraph.d.ts.map +1 -0
  15. package/dist/cjs/search/subgraph.js +21 -0
  16. package/dist/cjs/search/subgraph.js.map +1 -0
  17. package/dist/cjs/subgraph.d.ts +145 -0
  18. package/dist/cjs/subgraph.d.ts.map +1 -1
  19. package/dist/cjs/subgraph.js +80 -2
  20. package/dist/cjs/subgraph.js.map +1 -1
  21. package/dist/cjs/utils/graphql.d.ts +1 -0
  22. package/dist/cjs/utils/graphql.d.ts.map +1 -1
  23. package/dist/esm/core-sdk.d.ts +2 -1
  24. package/dist/esm/core-sdk.d.ts.map +1 -1
  25. package/dist/esm/core-sdk.js +3 -1
  26. package/dist/esm/core-sdk.js.map +1 -1
  27. package/dist/esm/search/index.d.ts +2 -0
  28. package/dist/esm/search/index.d.ts.map +1 -0
  29. package/dist/esm/search/index.js +2 -0
  30. package/dist/esm/search/index.js.map +1 -0
  31. package/dist/esm/search/mixin.d.ts +21 -0
  32. package/dist/esm/search/mixin.d.ts.map +1 -0
  33. package/dist/esm/search/mixin.js +61 -0
  34. package/dist/esm/search/mixin.js.map +1 -0
  35. package/dist/esm/search/subgraph.d.ts +3 -0
  36. package/dist/esm/search/subgraph.d.ts.map +1 -0
  37. package/dist/esm/search/subgraph.js +9 -0
  38. package/dist/esm/search/subgraph.js.map +1 -0
  39. package/dist/esm/subgraph.d.ts +145 -0
  40. package/dist/esm/subgraph.d.ts.map +1 -1
  41. package/dist/esm/subgraph.js +78 -0
  42. package/dist/esm/subgraph.js.map +1 -1
  43. package/dist/esm/utils/graphql.d.ts +1 -0
  44. package/dist/esm/utils/graphql.d.ts.map +1 -1
  45. package/dist/tsconfig.cjs.tsbuildinfo +1 -1
  46. package/package.json +2 -2
  47. package/src/core-sdk.ts +5 -2
  48. package/src/search/index.ts +1 -0
  49. package/src/search/mixin.ts +69 -0
  50. package/src/search/queries.graphql +64 -0
  51. package/src/search/subgraph.ts +17 -0
  52. package/src/subgraph.ts +225 -0
package/src/subgraph.ts CHANGED
@@ -75443,6 +75443,143 @@ export type BaseRangeFieldsFragment = {
75443
75443
  minted: string;
75444
75444
  };
75445
75445
 
75446
+ export type ProductSearchResultFieldsFragment = {
75447
+ __typename?: "ProductV1Product";
75448
+ id: string;
75449
+ uuid: string;
75450
+ version: number;
75451
+ title: string;
75452
+ description: string;
75453
+ productionInformation_brandName: string;
75454
+ details_category?: string | null;
75455
+ details_subCategory?: string | null;
75456
+ details_subCategory2?: string | null;
75457
+ details_offerCategory: string;
75458
+ details_tags?: Array<string> | null;
75459
+ brand: { __typename?: "ProductV1Brand"; id: string; name: string };
75460
+ visuals_images: Array<{
75461
+ __typename?: "ProductV1Media";
75462
+ id: string;
75463
+ url: string;
75464
+ tag?: string | null;
75465
+ type: ProductV1MediaType;
75466
+ width?: number | null;
75467
+ height?: number | null;
75468
+ }>;
75469
+ visuals_videos?: Array<{
75470
+ __typename?: "ProductV1Media";
75471
+ id: string;
75472
+ url: string;
75473
+ tag?: string | null;
75474
+ type: ProductV1MediaType;
75475
+ width?: number | null;
75476
+ height?: number | null;
75477
+ }> | null;
75478
+ productV1Seller?: {
75479
+ __typename?: "ProductV1Seller";
75480
+ sellerId?: string | null;
75481
+ name?: string | null;
75482
+ description?: string | null;
75483
+ } | null;
75484
+ notVoidedVariants?: Array<{
75485
+ __typename?: "ProductV1Variant";
75486
+ offer: {
75487
+ __typename?: "Offer";
75488
+ id: string;
75489
+ price: string;
75490
+ priceType: number;
75491
+ quantityAvailable: string;
75492
+ validUntilDate: string;
75493
+ protocolFee: string;
75494
+ exchangeToken: {
75495
+ __typename?: "ExchangeToken";
75496
+ name: string;
75497
+ address: string;
75498
+ decimals: string;
75499
+ };
75500
+ };
75501
+ variations?: Array<{
75502
+ __typename?: "ProductV1Variation";
75503
+ type: string;
75504
+ option: string;
75505
+ }> | null;
75506
+ }> | null;
75507
+ };
75508
+
75509
+ export type SearchProductsQueryQueryVariables = Exact<{
75510
+ productsSkip?: InputMaybe<Scalars["Int"]["input"]>;
75511
+ productsFirst?: InputMaybe<Scalars["Int"]["input"]>;
75512
+ productsOrderBy?: InputMaybe<ProductV1Product_OrderBy>;
75513
+ productsOrderDirection?: InputMaybe<OrderDirection>;
75514
+ productsFilter?: InputMaybe<ProductV1Product_Filter>;
75515
+ }>;
75516
+
75517
+ export type SearchProductsQueryQuery = {
75518
+ __typename?: "Query";
75519
+ productV1Products: Array<{
75520
+ __typename?: "ProductV1Product";
75521
+ id: string;
75522
+ uuid: string;
75523
+ version: number;
75524
+ title: string;
75525
+ description: string;
75526
+ productionInformation_brandName: string;
75527
+ details_category?: string | null;
75528
+ details_subCategory?: string | null;
75529
+ details_subCategory2?: string | null;
75530
+ details_offerCategory: string;
75531
+ details_tags?: Array<string> | null;
75532
+ brand: { __typename?: "ProductV1Brand"; id: string; name: string };
75533
+ visuals_images: Array<{
75534
+ __typename?: "ProductV1Media";
75535
+ id: string;
75536
+ url: string;
75537
+ tag?: string | null;
75538
+ type: ProductV1MediaType;
75539
+ width?: number | null;
75540
+ height?: number | null;
75541
+ }>;
75542
+ visuals_videos?: Array<{
75543
+ __typename?: "ProductV1Media";
75544
+ id: string;
75545
+ url: string;
75546
+ tag?: string | null;
75547
+ type: ProductV1MediaType;
75548
+ width?: number | null;
75549
+ height?: number | null;
75550
+ }> | null;
75551
+ productV1Seller?: {
75552
+ __typename?: "ProductV1Seller";
75553
+ sellerId?: string | null;
75554
+ name?: string | null;
75555
+ description?: string | null;
75556
+ } | null;
75557
+ notVoidedVariants?: Array<{
75558
+ __typename?: "ProductV1Variant";
75559
+ offer: {
75560
+ __typename?: "Offer";
75561
+ id: string;
75562
+ price: string;
75563
+ priceType: number;
75564
+ quantityAvailable: string;
75565
+ validUntilDate: string;
75566
+ protocolFee: string;
75567
+ exchangeToken: {
75568
+ __typename?: "ExchangeToken";
75569
+ name: string;
75570
+ address: string;
75571
+ decimals: string;
75572
+ };
75573
+ };
75574
+ variations?: Array<{
75575
+ __typename?: "ProductV1Variation";
75576
+ type: string;
75577
+ option: string;
75578
+ }> | null;
75579
+ }> | null;
75580
+ }>;
75581
+ };
75582
+
75446
75583
  export const BaseOfferCollectionFieldsFragmentDoc = gql`
75447
75584
  fragment BaseOfferCollectionFields on OfferCollection {
75448
75585
  id
@@ -76735,6 +76872,56 @@ export const OfferFieldsFragmentDoc = gql`
76735
76872
  ${BaseOfferFieldsFragmentDoc}
76736
76873
  ${BaseExchangeFieldsFragmentDoc}
76737
76874
  `;
76875
+ export const ProductSearchResultFieldsFragmentDoc = gql`
76876
+ fragment ProductSearchResultFields on ProductV1Product {
76877
+ id
76878
+ uuid
76879
+ version
76880
+ title
76881
+ description
76882
+ productionInformation_brandName
76883
+ brand {
76884
+ ...BaseProductV1BrandFields
76885
+ }
76886
+ details_category
76887
+ details_subCategory
76888
+ details_subCategory2
76889
+ details_offerCategory
76890
+ details_tags
76891
+ visuals_images {
76892
+ ...BaseProductV1MediaFields
76893
+ }
76894
+ visuals_videos {
76895
+ ...BaseProductV1MediaFields
76896
+ }
76897
+ productV1Seller {
76898
+ sellerId
76899
+ name
76900
+ description
76901
+ }
76902
+ notVoidedVariants {
76903
+ offer {
76904
+ id
76905
+ price
76906
+ priceType
76907
+ quantityAvailable
76908
+ validUntilDate
76909
+ protocolFee
76910
+ exchangeToken {
76911
+ name
76912
+ address
76913
+ decimals
76914
+ }
76915
+ }
76916
+ variations {
76917
+ type
76918
+ option
76919
+ }
76920
+ }
76921
+ }
76922
+ ${BaseProductV1BrandFieldsFragmentDoc}
76923
+ ${BaseProductV1MediaFieldsFragmentDoc}
76924
+ `;
76738
76925
  export const GetSellerByIdQueryDocument = gql`
76739
76926
  query getSellerByIdQuery(
76740
76927
  $sellerId: ID!
@@ -77520,6 +77707,26 @@ export const GetOffersMediaQueryDocument = gql`
77520
77707
  }
77521
77708
  }
77522
77709
  `;
77710
+ export const SearchProductsQueryDocument = gql`
77711
+ query searchProductsQuery(
77712
+ $productsSkip: Int
77713
+ $productsFirst: Int
77714
+ $productsOrderBy: ProductV1Product_orderBy
77715
+ $productsOrderDirection: OrderDirection
77716
+ $productsFilter: ProductV1Product_filter
77717
+ ) {
77718
+ productV1Products(
77719
+ skip: $productsSkip
77720
+ first: $productsFirst
77721
+ orderBy: $productsOrderBy
77722
+ orderDirection: $productsOrderDirection
77723
+ where: $productsFilter
77724
+ ) {
77725
+ ...ProductSearchResultFields
77726
+ }
77727
+ }
77728
+ ${ProductSearchResultFieldsFragmentDoc}
77729
+ `;
77523
77730
 
77524
77731
  export type SdkFunctionWrapper = <T>(
77525
77732
  action: (requestHeaders?: Record<string, string>) => Promise<T>,
@@ -78133,6 +78340,24 @@ export function getSdk(
78133
78340
  "query",
78134
78341
  variables
78135
78342
  );
78343
+ },
78344
+ searchProductsQuery(
78345
+ variables?: SearchProductsQueryQueryVariables,
78346
+ requestHeaders?: GraphQLClientRequestHeaders,
78347
+ signal?: RequestInit["signal"]
78348
+ ): Promise<SearchProductsQueryQuery> {
78349
+ return withWrapper(
78350
+ (wrappedRequestHeaders) =>
78351
+ client.request<SearchProductsQueryQuery>({
78352
+ document: SearchProductsQueryDocument,
78353
+ variables,
78354
+ requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders },
78355
+ signal
78356
+ }),
78357
+ "searchProductsQuery",
78358
+ "query",
78359
+ variables
78360
+ );
78136
78361
  }
78137
78362
  };
78138
78363
  }