UNPKG

2.89 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 abstract class MappedParameters {
49 static readonly GitHubOwner: string;
50 static readonly GitHubOwnerWithUser: string;
51 static readonly GitHubRepository: string;
52 static readonly GitHubAllRepositories: string;
53 static readonly GitHubRepositoryProvider: string;
54 static readonly GitHubWebHookUrl: string;
55 static readonly GitHubUrl: string;
56 static readonly GitHubApiUrl: string;
57 static readonly GitHubUserLogin: string;
58 /**
59 * @deprecated no alternative available
60 */
61 static readonly GitHubDefaultRepositoryVisibility: string;
62 static readonly SlackChannel: string;
63 static readonly SlackChannelName: string;
64 static readonly SlackTeam: string;
65 static readonly SlackUser: string;
66 static readonly SlackUserName: string;
67 static readonly AtomistWebhookUrlBase: string;
68}
69export declare abstract class Secrets {
70 static readonly OrgToken: string;
71 static readonly UserToken: string;
72 static userToken(scopes: string | string[]): string;
73}
74//# sourceMappingURL=decorators.d.ts.map
\No newline at end of file