import { Expandable } from '../expandable' ; import { EntityBase , EntityApi } from '../entity-base' ; import { EdmTypeShared } from '../edm-types' ; import { Selectable } from '../selectable' ; import { Orderable } from '../order' ; import { Filterable } from '../filter' ; import { createUriConverter , DeSerializers } from '../de-serializers' ; import { getEntityKeys } from './get-keys' ; import { getOrderBy } from './get-orderby' ; import { createGetFilter } from './get-filter' ; import { createGetResourcePathForKeys } from './get-resource-path' ; internal export interface ODataUri < DeSerializersT extends DeSerializers > { getExpand < EntityT extends EntityBase > ( selects , expands , entityApi ) : Partial < { expand : string ; } > ; getFilter < EntityT extends EntityBase > ( filter , entityApi ) : Partial < { filter : string ; } > ; getEntityKeys < EntityT extends EntityBase > ( entity , entityApi ) : Record < string , any > ; getOrderBy < EntityT extends EntityBase > ( orderBy ) : Partial < { orderby : string ; } > ; getResourcePathForKeys < EntityT extends EntityBase > ( keys , _entityApi ) : string ; getSelect < EntityT extends EntityBase > ( selects ) : Partial < { select : string ; } > ; convertToUriFormat ( value , edmType ) : string ; } internal param param returns export function prependDollar ( param ) { return `$${ param }` ; } internal param deSerializers param getExpand param getSelect returns export function createODataUri < DeSerializersT extends DeSerializers > ( deSerializers , getExpand , getSelect ) { const uriConverter = createUriConverter ( deSerializers ) ; const { getFilter } = createGetFilter ( uriConverter ) ; const { getResourcePathForKeys } = createGetResourcePathForKeys ( uriConverter ) ; const convertToUriFormat = uriConverter ; return { getExpand , getFilter , getEntityKeys , getOrderBy , getResourcePathForKeys , getSelect , convertToUriFormat } ; }