{
  "version": 3,
  "sources": ["../../../src/apiCalls/transactions/getTransactions.ts"],
  "sourcesContent": ["import axios from 'axios';\nimport { TRANSACTIONS_ENDPOINT } from 'apiCalls/endpoints';\nimport { TransactionServerStatusesEnum } from 'types/enums.types';\nimport { ServerTransactionType } from 'types/serverTransactions.types';\n\nexport interface GetTransactionsType {\n  apiAddress: string;\n  apiTimeout?: string | number;\n  sender?: string;\n  receiver?: string;\n  page?: number;\n  transactionSize?: number;\n  after?: number;\n  condition?: 'should' | 'must';\n  before?: number;\n  withScResults?: boolean;\n  withUsername?: boolean;\n  status?: TransactionServerStatusesEnum;\n  /**\n   * Search in data object\n   */\n  search?: string;\n}\n\nexport const getTransactions = ({\n  apiAddress,\n  apiTimeout,\n  sender,\n  receiver,\n  page = 1,\n  transactionSize = 15,\n  condition = 'should',\n  withScResults = true,\n  after,\n  before,\n  search,\n  status,\n  withUsername\n}: GetTransactionsType) => {\n  const params = {\n    sender,\n    receiver,\n    condition,\n    after,\n    before,\n    search,\n    from: (page - 1) * transactionSize,\n    ...(transactionSize > 0 ? { size: transactionSize } : {}),\n    withScResults,\n    withUsername,\n    status\n  };\n\n  const timeout = apiTimeout ? { timeout: parseInt(String(apiTimeout)) } : {};\n\n  return axios.get<ServerTransactionType[]>(\n    `${apiAddress}/${TRANSACTIONS_ENDPOINT}`,\n    {\n      params,\n      ...timeout\n    }\n  );\n};\n"],
  "mappings": "wDAAA,OAAOA,MAAW,QAwBX,IAAMC,EAAkB,CAAC,CAC9B,WAAAC,EACA,WAAAC,EACA,OAAAC,EACA,SAAAC,EACA,KAAAC,EAAO,EACP,gBAAAC,EAAkB,GAClB,UAAAC,EAAY,SACZ,cAAAC,EAAgB,GAChB,MAAAC,EACA,OAAAC,EACA,OAAAC,EACA,OAAAC,EACA,aAAAC,CACF,IAA2B,CACzB,IAAMC,EAAS,CACb,OAAAX,EACA,SAAAC,EACA,UAAAG,EACA,MAAAE,EACA,OAAAC,EACA,OAAAC,EACA,MAAON,EAAO,GAAKC,EACnB,GAAIA,EAAkB,EAAI,CAAE,KAAMA,CAAgB,EAAI,CAAC,EACvD,cAAAE,EACA,aAAAK,EACA,OAAAD,CACF,EAEMG,EAAUb,EAAa,CAAE,QAAS,SAAS,OAAOA,CAAU,CAAC,CAAE,EAAI,CAAC,EAE1E,OAAOc,EAAM,IACX,GAAGf,CAAU,IAAIgB,CAAqB,GACtC,CACE,OAAAH,EACA,GAAGC,CACL,CACF,CACF",
  "names": ["axios", "getTransactions", "apiAddress", "apiTimeout", "sender", "receiver", "page", "transactionSize", "condition", "withScResults", "after", "before", "search", "status", "withUsername", "params", "timeout", "axios", "TRANSACTIONS_ENDPOINT"]
}
