import { BindingData } from '@farris/devkit'; /** * Bef数据中各种Path的转换 */ declare class BefDataPathUtil { /** * 转换成路径数组 * 返回结果: * 主表(/):[ parentId ] * 从表(/childCodes):[ parentId, childCodes, childId ] * 从从表(/childCodes/grandCodes): [ parentId, childCode, childId, grandCode, grandId ] */ static convertToPathArray(bindingPath: string | string[], bindingData: BindingData): string[]; /** * 转换为RestUrl里的路径 * * 返回结果: * 主表(/):/ * 从表(/jiwtEdus):/xxx/jiwtEdu * 从从表(/jiwtEdus/jiwtGrades): /xxx/jiwtEdu/xxx/jiwtGrade */ static convertToPathUrl(bindingPath: string | string[], bindingData: BindingData): string; /** * 转换为表名数组 * 返回结果: * 主表(/):[] * 从表(/childCodes):[ childCodes ] * 从从表(/childCodes/grandCodes [childCode ,grandCode] */ static convertToObjectCodes(bindingPath: string | string[], bindingData: BindingData): any[]; /** * 转换为id数组,包含最后一级的主键 * 主表(/):[ parentId ] * 从表(/childCodes):[ parentId, childId ] * 从从表(/childCodes/grandCodes): [ parentId, childId, grandId] */ static convertToDataIdsForUpdate(bindingPath: string | string[], bindingData: BindingData): any[]; /** * 转换为id数组,不包含最后一级的主键 * 主表(/):[ ] * 从表(/childCodes):[ parentId ] * 从从表(/childCodes/grandCodes): [ parentId, childId] */ static convertToDataIdsForAdd(bindingPath: string | string[], bindingData: BindingData): any[]; /** * 将EntityPathString转换为Url * @deprecated */ static convertPathToUrl(path: string): string; /** * 去除最后的s */ private static trimTrailingS; /** * 转换通用路径为仅有表名的数组 * * 1.['id:xxx','child1s','id:xx','prop'] => ['child1s','prop'] * 2.['prop1','prop2','prop3'] => ['prop1','prop2','prop3'] * 3.['prop1','id:xxx','prop2'] => ['prop1','prop2'] * @param paths 内置路径,格式:['id:xxx','child1s','id:xx','prop'] */ static convertPathsToNodeCodes(paths: string[]): any[]; /** * 转换通用路径为仅有实体主键值的数组 * @param paths 通用路径,格式:['id:xxx','child1s','id:xx','prop'] => ['xxx','xx'] */ static convertPathsToIds(paths: string[]): any[]; } export { BefDataPathUtil };