UNPKG

@sap_oss/odata-library

Version:

OData client for testing Netweawer OData services.

116 lines 3.48 kB
export = Metadata; /** * Implements helpers to get metadata informations * * <h3>Overview</h3> * * <h3>Properties</h3> * * <ul> * <li>raw - metadata in JSON format passed as parameter to constructor * <li>model - metadata model constructed from raw metadata * </ul> * * @class Metadata */ declare class Metadata { /** * Creates an instance of <code>lib/Metadata</code> class. * @param {Object[]} [rawMetadata] list of metadata content fetched from the service in JSON format from xml2js * @param {Object} [settings] settings for the metadata * @memberof Metadata */ constructor(rawMetadata?: any[], settings?: any); listEntitySetNames(namespace: any): any; /** * Create list of FunctionImport names * * @param {String} [namespace] is used to specify service namespace which contains EntitySets * * @returns {[String]} returns list of FunctionImport names * * @memberof Metadata */ listFunctionImportNames(namespace?: string): [string]; /** * Create structure for EntitySet definition. All keys has to be defined * and has to be generated by by engine. * * @param {String} [namespace] namespace or name, if name not set * @param {String} [name] name or undefined * * @returns {Object} returns structure which define entity set posibilities * * @example * { * "Name": "C_AllocationCycleTP", * "EntityType": "FCO_MANAGE_ALLOCATION_SRV.C_AllocationCycleTPType", * "Creatable": true, * "Updatable": true, * "Deletable": true, * "Pageable": true, * "Addressable": true, * "Countable": true, * "Searchable": false * } * * @memberof Metadata */ getEntitySet(namespace?: string, name?: string): any; /** * Get definition of the FunctionImport based on the metadata * * @param {String} [namespace] namespace or name, if name not set * @param {String} [name] name or undefined * * @returns {Object} returns structure which define FunctionImport properties and posibilities * @example * //Structure created by the getFunctionImport *{ * "Name": "CopyAllocationSegment", * "ReturnType" : "Edm.Boolean", * "HttpMethod": "POST", * "Parameter": [{ * "Name": "DraftUUID", * "Type": "Edm.Guid", * "Mode": "In" * }, * { * "Name": "AllocationSegment", * "Type": "Edm.String", * "Mode": "In" * }, * { * "Name": "AllocationStartDate", * "Type": "Edm.DateTime", * "Mode": "In", * "Precision": "0" * }, * { * "Name": "AllocationCycle", * "Type": "Edm.String", * "Mode": "In" * }, * { * "Name": "AllocationType", * "Type": "Edm.String", * "Mode": "In" * } * ] *} * @memberof Metadata */ getFunctionImport(namespace?: string, name?: string): any; /** * Collect information about EntityType from metadata * * @param {String} [namespace] namespace or name, if name not set * @param {String} [name] name or undefined * * @returns {Object} returns structure which define EntityType structure * * @memberof Metadata */ getEntityType(namespace?: string, name?: string): any; } //# sourceMappingURL=Metadata.d.ts.map