UNPKG

@aurahelper/xml-definitions

Version:

Powerfull Libraries to get the XML Definitions of ALL XML Salesforce Metadata Files. Support All API Versions up to API 53.0. You can get the definition of one or more XML files for a specific version of Salesforce. For Example: You can get the XML Defini

61 lines (60 loc) 3.36 kB
/** * Class with static methods to get the XML Definitions for one Metadata Type * or get all XML Definitions for all types and specific Salesforce API Version. * Also you can get a XML Raw definitions and Resolve Recursive definitions on some files. * * The difference between the XML definition and the raw XML definition is that the raw definition is not processed, it returns the entire XML information. * The XML definitions return the XML definition processed for a specific API version, omitting everything that does not correspond to the indicated version */ export declare class XMLDefinitions { /** * Method to get the Metadata Type's XML definition for an API Version. * @param {string} type Metadata Type API Name to get the XML definition * @param {string | number} apiVersion API Version number to get the version definition * @returns {{ [key: string]: any } | undefined} Return the XML definition for the selected type and API version. If the type exists, but is not available in the selected API, return an empty object. If type not exists, return undefined. */ static getDefinition(type: string, apiVersion: string | number): { [key: string]: any; } | undefined; /** * Method to get the Metadata Type's XML RAW definition * @param {string} type Metadata Type API Name to get the XML RAW definition * @returns {{ [key: string]: any } | undefined} Return the XML raw definition for the selected type. If type not exists, return undefined. */ static getRawDefinition(type: string): { [key: string]: any; } | undefined; /** * Method to get all XML Definitions for all Metadata Types for an specific API Version * @param {string | number} apiVersion API Version number to get the XML Definitions * @returns {{ [key: string]: { [key: string]: any } }} Return an Object with all XML definitions for the selected API version. The object has the Type as key and the XML definition as value. If not exists any definition for the selected API return an empty object */ static getAllDefinitions(apiVersion: string | number): { [key: string]: { [key: string]: any; }; }; /** * Method to get all XML RAW Definitions for all Metadata Types * @returns {{ [key: string]: { [key: string]: any } }} Return an Object with all XML raw definitions. The object has the Type as key and the XML definition as value */ static getAllRawDefinitions(): { [key: string]: { [key: string]: any; }; }; /** * Method to resolve the recursive reference from some XML Definition files * @param {any} typeDefinition XML file Definition * @param {any} subFieldDefinition XML Field definition to resolve * @returns {any} Returns the XML Definition to the selected XML field */ static resolveDefinitionReference(typeDefinition: any, subFieldDefinition: any): any; /** * Method to get all Metadata Types referenced into a XML Definition * @param {{ [key: string]: any }} XMLDefinition XML Definition to get all Metadata Types * * @returns {string[]} Return a List with all Metadata Object Names */ static getMetadataTypes(XMLDefinition: any): string[]; }