UNPKG

2.58 kBTypeScriptView Raw
1import { BaseParameter, BaseValue } from "./internal/metadata/decoratorSupport";
2/**
3 * Decorator for parameters. Adds to object properties
4 */
5export declare function Parameter(details?: BaseParameter): (target: any, propertyKey: string) => void;
6/**
7 * Map a local field to some other configuration item in a different system
8 */
9export declare function MappedParameter(uri: string, required?: boolean): (target: any, name: string) => void;
10/**
11 * Declare a secret an automation wants to use
12 */
13export declare function Secret(uri: string): (target: any, name: string) => void;
14/**
15 * Inject a config value from the automation-client configuration
16 */
17export declare function Value(pathOrValue: string | BaseValue): (target: any, name: string) => void;
18/**
19 * Decorator for a command handler class. Implements HandleCommand
20 * @param {string} description
21 * @param {string[] | string} intent
22 * @return {(obj: any) => any}
23 * @constructor
24 */
25export declare function CommandHandler(description: string, ...intent: string[]): (obj: any) => void;
26/**
27 * Decorator for a configurable command handler class. Implements HandleCommand
28 * @param {string} description
29 * @param {string[] | string} intent
30 * @return {(obj: any) => any}
31 * @constructor
32 */
33export declare function ConfigurableCommandHandler(description: string, options: {
34 intent?: string | string[];
35 autoSubmit?: boolean;
36}): (obj: any) => void;
37/**
38 * Decorator for a parameter class that doesn't contain handler logic
39 * @return {(obj: any) => any}
40 * @constructor
41 */
42export declare function Parameters(): (obj: any) => void;
43export declare function EventHandler(description: string, subscription?: string): (obj: object) => void;
44/**
45 * Decorator for tags. Sets tags on the class
46 */
47export declare function Tags(...tags: string[]): (target: any) => void;
48export declare const MappedParameters: {
49 GitHubOwner: string;
50 GitHubOwnerWithUser: string;
51 GitHubRepository: string;
52 GitHubAllRepositories: string;
53 GitHubRepositoryProvider: string;
54 GitHubWebHookUrl: string;
55 GitHubUrl: string;
56 GitHubApiUrl: string;
57 GitHubUserLogin: string;
58 /** @deprecated no alternative available */
59 GitHubDefaultRepositoryVisibility: string;
60 SlackChannel: string;
61 SlackChannelName: string;
62 SlackTeam: string;
63 SlackUser: string;
64 SlackUserName: string;
65 AtomistWebhookUrlBase: string;
66};
67export declare const Secrets: {
68 OrgToken: string;
69 UserToken: string;
70 userToken: (scopeOrScopes: string | string[]) => string;
71};
72//# sourceMappingURL=decorators.d.ts.map
\No newline at end of file