1 | import basem = require('./ClientApiBases');
|
2 | import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
|
3 | import PolicyInterfaces = require("./interfaces/PolicyInterfaces");
|
4 | import VSSInterfaces = require("./interfaces/common/VSSInterfaces");
|
5 | export interface IPolicyApi extends basem.ClientApiBase {
|
6 | createPolicyConfiguration(configuration: PolicyInterfaces.PolicyConfiguration, project: string): Promise<PolicyInterfaces.PolicyConfiguration>;
|
7 | deletePolicyConfiguration(project: string, configurationId: number): Promise<void>;
|
8 | getPolicyConfiguration(project: string, configurationId: number): Promise<PolicyInterfaces.PolicyConfiguration>;
|
9 | getPolicyConfigurations(project: string, scope?: string, policyType?: string): Promise<VSSInterfaces.PagedList<PolicyInterfaces.PolicyConfiguration>>;
|
10 | updatePolicyConfiguration(configuration: PolicyInterfaces.PolicyConfiguration, project: string, configurationId: number): Promise<PolicyInterfaces.PolicyConfiguration>;
|
11 | getPolicyEvaluation(project: string, evaluationId: string): Promise<PolicyInterfaces.PolicyEvaluationRecord>;
|
12 | requeuePolicyEvaluation(project: string, evaluationId: string): Promise<PolicyInterfaces.PolicyEvaluationRecord>;
|
13 | getPolicyEvaluations(project: string, artifactId: string, includeNotApplicable?: boolean, top?: number, skip?: number): Promise<PolicyInterfaces.PolicyEvaluationRecord[]>;
|
14 | getPolicyConfigurationRevision(project: string, configurationId: number, revisionId: number): Promise<PolicyInterfaces.PolicyConfiguration>;
|
15 | getPolicyConfigurationRevisions(project: string, configurationId: number, top?: number, skip?: number): Promise<PolicyInterfaces.PolicyConfiguration[]>;
|
16 | getPolicyType(project: string, typeId: string): Promise<PolicyInterfaces.PolicyType>;
|
17 | getPolicyTypes(project: string): Promise<PolicyInterfaces.PolicyType[]>;
|
18 | }
|
19 | export declare class PolicyApi extends basem.ClientApiBase implements IPolicyApi {
|
20 | constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
|
21 | static readonly RESOURCE_AREA_ID = "fb13a388-40dd-4a04-b530-013a739c72ef";
|
22 | /**
|
23 | * Create a policy configuration of a given policy type.
|
24 | *
|
25 | * @param {PolicyInterfaces.PolicyConfiguration} configuration - The policy configuration to create.
|
26 | * @param {string} project - Project ID or project name
|
27 | */
|
28 | createPolicyConfiguration(configuration: PolicyInterfaces.PolicyConfiguration, project: string): Promise<PolicyInterfaces.PolicyConfiguration>;
|
29 | |
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 | deletePolicyConfiguration(project: string, configurationId: number): Promise<void>;
|
36 | |
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 | getPolicyConfiguration(project: string, configurationId: number): Promise<PolicyInterfaces.PolicyConfiguration>;
|
43 | |
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 | getPolicyConfigurations(project: string, scope?: string, policyType?: string): Promise<VSSInterfaces.PagedList<PolicyInterfaces.PolicyConfiguration>>;
|
51 | |
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 | updatePolicyConfiguration(configuration: PolicyInterfaces.PolicyConfiguration, project: string, configurationId: number): Promise<PolicyInterfaces.PolicyConfiguration>;
|
59 | |
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 | getPolicyEvaluation(project: string, evaluationId: string): Promise<PolicyInterfaces.PolicyEvaluationRecord>;
|
66 | |
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 | requeuePolicyEvaluation(project: string, evaluationId: string): Promise<PolicyInterfaces.PolicyEvaluationRecord>;
|
73 | |
74 |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 |
|
81 |
|
82 | getPolicyEvaluations(project: string, artifactId: string, includeNotApplicable?: boolean, top?: number, skip?: number): Promise<PolicyInterfaces.PolicyEvaluationRecord[]>;
|
83 | |
84 |
|
85 |
|
86 |
|
87 |
|
88 |
|
89 |
|
90 | getPolicyConfigurationRevision(project: string, configurationId: number, revisionId: number): Promise<PolicyInterfaces.PolicyConfiguration>;
|
91 | |
92 |
|
93 |
|
94 |
|
95 |
|
96 |
|
97 |
|
98 |
|
99 | getPolicyConfigurationRevisions(project: string, configurationId: number, top?: number, skip?: number): Promise<PolicyInterfaces.PolicyConfiguration[]>;
|
100 | |
101 |
|
102 |
|
103 |
|
104 |
|
105 |
|
106 | getPolicyType(project: string, typeId: string): Promise<PolicyInterfaces.PolicyType>;
|
107 | |
108 |
|
109 |
|
110 |
|
111 |
|
112 | getPolicyTypes(project: string): Promise<PolicyInterfaces.PolicyType[]>;
|
113 | }
|