abap-adt-api
Version:
Interface to Abap Developer Tools webservice
103 lines • 4.15 kB
TypeScript
import { AdtHTTP } from "../AdtHTTP";
export type PackageTypeId = "DEVC/K";
export type GroupTypeIds = "FUGR/FF" | "FUGR/I";
export type BindingTypeId = "SRVB/SVB";
export type NonGroupTypeIds = "CLAS/OC" | "FUGR/F" | "INTF/OI" | "PROG/I" | "PROG/P" | "DCLS/DL" | "DDLS/DF" | "DDLX/EX" | "DDLA/ADF" | "TABL/DT" | "SRVD/SRV" | "AUTH" | "DTEL/DE" | "SUSO/B" | "MSAG/N";
export type ParentTypeIds = "DEVC/K" | "FUGR/F";
export type CreatableTypeIds = GroupTypeIds | NonGroupTypeIds | PackageTypeId | BindingTypeId;
export interface CreatableType {
validationPath: string;
creationPath: string;
rootName: string;
nameSpace: string;
label: string;
typeId: CreatableTypeIds;
extra?: string;
maxLen: number;
}
interface BaseValidateOptions {
objname: string;
description: string;
}
export interface ObjectValidateOptions extends BaseValidateOptions {
objtype: NonGroupTypeIds;
packagename: string;
}
export interface GroupValidateOptions extends BaseValidateOptions {
objtype: GroupTypeIds;
fugrname: string;
}
export type PackageTypes = "development" | "structure" | "main";
export interface PackageSpecificData {
swcomp: string;
transportLayer: string;
packagetype: PackageTypes;
}
export interface PackageValidateOptions extends PackageSpecificData, BaseValidateOptions {
objtype: PackageTypeId;
packagename: string;
}
export interface BindingValidationOptions extends BaseValidateOptions {
objtype: BindingTypeId;
serviceBindingVersion: "ODATA\\V2";
serviceDefinition: string;
package: string;
}
export interface NewObjectOptions {
objtype: CreatableTypeIds;
name: string;
parentName: string;
description: string;
parentPath: string;
responsible?: string;
transport?: string;
}
export interface NewPackageOptions extends NewObjectOptions, PackageSpecificData {
objtype: PackageTypeId;
}
export type BindingCategory = "0" | "1";
export declare const BindinTypes: {
description: string;
bindingtype: string;
category: string;
}[];
export interface NewBindingOptions extends NewObjectOptions {
objtype: BindingTypeId;
service: string;
bindingtype: "ODATA";
category: BindingCategory;
}
export declare const hasPackageOptions: (o: any) => o is PackageSpecificData;
export declare const isPackageOptions: (o: NewObjectOptions) => o is NewPackageOptions;
export declare const isBindingOptions: (o: NewObjectOptions) => o is NewBindingOptions;
export interface ObjectType {
CAPABILITIES: string[];
CATEGORY: string;
CATEGORY_LABEL: string;
OBJECT_TYPE: string;
OBJECT_TYPE_LABEL: string;
OBJNAME_MAXLENGTH: number;
PARENT_OBJECT_TYPE: string;
URI_TEMPLATE: string;
}
export interface ValidationResult {
success: boolean;
SEVERITY?: string;
SHORT_TEXT?: string;
}
export type ValidateOptions = ObjectValidateOptions | GroupValidateOptions | PackageValidateOptions | BindingValidationOptions;
export declare function loadTypes(h: AdtHTTP): Promise<ObjectType[]>;
export declare function objectPath(objOptions: NewObjectOptions): string;
export declare function objectPath(typeId: "DEVC/K", name: string): string;
export declare function objectPath(typeId: CreatableTypeIds, name: string, parentName: string): string;
export declare function validateNewObject(h: AdtHTTP, options: ValidateOptions): Promise<ValidationResult>;
export declare function createObject(h: AdtHTTP, options: NewObjectOptions | NewPackageOptions): Promise<void>;
export declare function createTestInclude(h: AdtHTTP, clas: string, lockHandle: string, corrNr: string): Promise<void>;
export declare function isGroupType(type: any): type is GroupTypeIds;
export declare function isPackageType(type: any): type is PackageTypeId;
export declare const CreatableTypes: Map<CreatableTypeIds, CreatableType>;
export declare function isNonGroupType(type: any): type is NonGroupTypeIds;
export declare function isCreatableTypeId(type: any): type is CreatableTypeIds;
export declare function parentTypeId(type: CreatableTypeIds): ParentTypeIds;
export {};
//# sourceMappingURL=objectcreator.d.ts.map