import { IGetLayerOptions , parseServiceUrl } from "./helpers" ; import { request } from '@esri/arcgis-rest-request' ; import { ILayerDefinition } from "@esri/arcgis-rest-types" ; export interface IAllLayersAndTablesResponse { layers : ILayerDefinition [ ] ; tables : ILayerDefinition [ ] ; } param options returns export function getAllLayersAndTables ( options ) { const { url , ... requestOptions } = options ; const layersUrl = `${ parseServiceUrl ( url ) }/layers` ; return request ( layersUrl , requestOptions ) ; }