@atomist/automation-client
Version:
Atomist API for software low-level client
72 lines • 2.58 kB
TypeScript
import { BaseParameter, BaseValue } from "./internal/metadata/decoratorSupport";
/**
* Decorator for parameters. Adds to object properties
*/
export declare function Parameter(details?: BaseParameter): (target: any, propertyKey: string) => void;
/**
* Map a local field to some other configuration item in a different system
*/
export declare function MappedParameter(uri: string, required?: boolean): (target: any, name: string) => void;
/**
* Declare a secret an automation wants to use
*/
export declare function Secret(uri: string): (target: any, name: string) => void;
/**
* Inject a config value from the automation-client configuration
*/
export declare function Value(pathOrValue: string | BaseValue): (target: any, name: string) => void;
/**
* Decorator for a command handler class. Implements HandleCommand
* @param {string} description
* @param {string[] | string} intent
* @return {(obj: any) => any}
* @constructor
*/
export declare function CommandHandler(description: string, ...intent: string[]): (obj: any) => void;
/**
* Decorator for a configurable command handler class. Implements HandleCommand
* @param {string} description
* @param {string[] | string} intent
* @return {(obj: any) => any}
* @constructor
*/
export declare function ConfigurableCommandHandler(description: string, options: {
intent?: string | string[];
autoSubmit?: boolean;
}): (obj: any) => void;
/**
* Decorator for a parameter class that doesn't contain handler logic
* @return {(obj: any) => any}
* @constructor
*/
export declare function Parameters(): (obj: any) => void;
export declare function EventHandler(description: string, subscription?: string): (obj: object) => void;
/**
* Decorator for tags. Sets tags on the class
*/
export declare function Tags(...tags: string[]): (target: any) => void;
export declare const MappedParameters: {
GitHubOwner: string;
GitHubOwnerWithUser: string;
GitHubRepository: string;
GitHubAllRepositories: string;
GitHubRepositoryProvider: string;
GitHubWebHookUrl: string;
GitHubUrl: string;
GitHubApiUrl: string;
GitHubUserLogin: string;
/** @deprecated no alternative available */
GitHubDefaultRepositoryVisibility: string;
SlackChannel: string;
SlackChannelName: string;
SlackTeam: string;
SlackUser: string;
SlackUserName: string;
AtomistWebhookUrlBase: string;
};
export declare const Secrets: {
OrgToken: string;
UserToken: string;
userToken: (scopeOrScopes: string | string[]) => string;
};
//# sourceMappingURL=decorators.d.ts.map