@azuro-org/toolkit 5.0.0-beta.11 → 5.0.0-beta.12

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.
@@ -1,6 +1,5 @@
1
1
  import * as Types from './types';
2
2
  export type NavigationQueryVariables = Types.Exact<{
3
- first?: Types.InputMaybe<Types.Scalars['Int']['input']>;
4
3
  sportFilter?: Types.InputMaybe<Types.Sport_Filter>;
5
4
  countryFilter?: Types.InputMaybe<Types.Country_Filter>;
6
5
  leagueFilter?: Types.InputMaybe<Types.League_Filter>;
@@ -1,6 +1,5 @@
1
1
  import * as Types from './types';
2
2
  export type SportsNavigationQueryVariables = Types.Exact<{
3
- first?: Types.InputMaybe<Types.Scalars['Int']['input']>;
4
3
  sportFilter?: Types.InputMaybe<Types.Sport_Filter>;
5
4
  }>;
6
5
  export type SportsNavigationQuery = {
package/dist/global.d.ts CHANGED
@@ -41,6 +41,7 @@ export type CreateBetResponse = {
41
41
  id: string;
42
42
  state: BetState;
43
43
  errorMessage?: string;
44
+ error?: string;
44
45
  };
45
46
  export type BetClientData = {
46
47
  attention: string;
package/dist/index.js CHANGED
@@ -5550,7 +5550,7 @@ ${LegacyLiveBetFragmentDoc}`;const GameBetsDocument = gql `
5550
5550
  }
5551
5551
  }
5552
5552
  ${GameInfoFragmentDoc}`;const NavigationDocument = gql `
5553
- query Navigation($first: Int, $sportFilter: Sport_filter, $countryFilter: Country_filter, $leagueFilter: League_filter) {
5553
+ query Navigation($sportFilter: Sport_filter, $countryFilter: Country_filter, $leagueFilter: League_filter) {
5554
5554
  sports(where: $sportFilter, subgraphError: allow) {
5555
5555
  id
5556
5556
  slug
@@ -5617,7 +5617,7 @@ ${LegacyLiveBetFragmentDoc}`;const GameBetsDocument = gql `
5617
5617
  }
5618
5618
  }
5619
5619
  ${GameInfoFragmentDoc}`;const SportsNavigationDocument = gql `
5620
- query SportsNavigation($first: Int, $sportFilter: Sport_filter) {
5620
+ query SportsNavigation($sportFilter: Sport_filter) {
5621
5621
  sports(where: $sportFilter, subgraphError: allow) {
5622
5622
  id
5623
5623
  slug
@@ -6960,10 +6960,14 @@ const getFreeBets = async ({ chainId, account, affiliate }) => {
6960
6960
  if (response.status === 404) {
6961
6961
  return null;
6962
6962
  }
6963
+ const data = await response.json();
6963
6964
  if (!response.ok) {
6964
- throw new Error(`Status ${response.status}: ${response.statusText}`);
6965
+ const error = new Error(data?.errorMessage || `Status: ${response.status}`);
6966
+ if (data?.error) {
6967
+ error.cause = new Error(data.error);
6968
+ }
6969
+ throw error;
6965
6970
  }
6966
- const data = await response.json();
6967
6971
  return data;
6968
6972
  };const createComboBet = async (props) => {
6969
6973
  const { account, amount, minOdds, nonce, clientData, bets, signature } = props;
@@ -6996,10 +7000,14 @@ const getFreeBets = async ({ chainId, account, affiliate }) => {
6996
7000
  if (response.status === 404) {
6997
7001
  return null;
6998
7002
  }
7003
+ const data = await response.json();
6999
7004
  if (!response.ok) {
7000
- throw new Error(`Status ${response.status}: ${response.statusText}`);
7005
+ const error = new Error(data?.errorMessage || `Status: ${response.status}`);
7006
+ if (data?.error) {
7007
+ error.cause = new Error(data.error);
7008
+ }
7009
+ throw error;
7001
7010
  }
7002
- const data = await response.json();
7003
7011
  return data;
7004
7012
  };const getBet = async ({ chainId, orderId }) => {
7005
7013
  const { api } = chainsData[chainId];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azuro-org/toolkit",
3
- "version": "5.0.0-beta.11",
3
+ "version": "5.0.0-beta.12",
4
4
  "description": "Set of helpers to work with Azuro protocol",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",