@noldova/git.azure-devops.protocol 0.0.0-stage → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Noldova
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,7 @@
1
- # Temporary Holding Version
1
+ # @noldova/git.azure-devops.protocol
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ What the Azure DevOps module's parts share: `AzureDevOpsNames`, the module's id, the token sign-in's and the reads' method names, the sign-in's event and the capabilities the module offers, as `HostCapabilities` from [`@noldova/git.hosting.protocol`](https://github.com/noldova-com/git/tree/main/src/noldova.git.hosting.protocol).
4
+
5
+ Both parts of [`@noldova/git.azure-devops`](https://github.com/noldova-com/git/tree/main/src/noldova.git.azure-devops) import it by its name, and the module pins it at its own version.
6
+ [documents/ARCHITECTURE.md](https://github.com/noldova-com/git/blob/main/documents/ARCHITECTURE.md) says how the parts talk, and the [README](https://github.com/noldova-com/git#readme) how to build and test it.
7
+ It is licensed under the [MIT License](https://github.com/noldova-com/git/blob/main/LICENSE).
package/package.json CHANGED
@@ -1,6 +1,36 @@
1
1
  {
2
2
  "name": "@noldova/git.azure-devops.protocol",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.0.8",
4
+ "description": "What the Azure DevOps module's parts share: AzureDevOpsNames, the module's id, its sign-in's and reads' method names, its sign-in's event and the capabilities it offers.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/noldova-com/git.git",
10
+ "directory": "src/noldova.git.azure-devops.protocol"
11
+ },
12
+ "homepage": "https://github.com/noldova-com/git#readme",
13
+ "bugs": {
14
+ "url": "https://github.com/noldova-com/git/issues"
15
+ },
16
+ "exports": {
17
+ ".": {
18
+ "types": "./src/api/index.d.ts",
19
+ "default": "./src/api/index.js"
20
+ },
21
+ "./package.json": "./package.json"
22
+ },
23
+ "files": [
24
+ "src/**/*.js",
25
+ "src/**/*.js.map",
26
+ "src/**/*.d.ts"
27
+ ],
28
+ "publishConfig": {
29
+ "access": "public",
30
+ "registry": "https://registry.npmjs.org/"
31
+ },
32
+ "dependencies": {
33
+ "@noldova/git.hosting.protocol": "0.0.8"
34
+ },
35
+ "gitHead": "9915474fda79eb6cadb9d336d7ca47f8c28ad4dd"
36
+ }
@@ -0,0 +1,321 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
9
+ import type { HostCapabilities } from "@noldova/git.hosting.protocol";
10
+
11
+ /**
12
+ * The names the Azure DevOps module's parts share.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * import { AzureDevOpsNames } from "@noldova/git.azure-devops.protocol";
17
+ *
18
+ * console.log(AzureDevOpsNames.moduleId);
19
+ * ```
20
+ */
21
+ export declare class AzureDevOpsNames {
22
+ /**
23
+ * The module's id, as its module.json declares it.
24
+ */
25
+ public static readonly moduleId: string;
26
+
27
+ /**
28
+ * The method that answers the sign-in as `HostSignIn` JSON from `@noldova/git.hosting.protocol`.
29
+ *
30
+ * @example
31
+ * ```ts
32
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
33
+ * import { AzureDevOpsNames } from "@noldova/git.azure-devops.protocol";
34
+ * import { HostSignIn } from "@noldova/git.hosting.protocol";
35
+ *
36
+ * export async function readSignInAsync(context: IWindowPartContext): Promise<HostSignIn> {
37
+ * return HostSignIn.fromJson(await context.requestAsync(AzureDevOpsNames.readSignInMethod, null));
38
+ * }
39
+ * ```
40
+ */
41
+ public static readonly readSignInMethod: string;
42
+
43
+ /**
44
+ * The method that takes `{ "organization": string }`, starts a sign-in with Microsoft for that organization and answers the sign-in waiting with
45
+ * the https address the window opens in the person's browser; the browser comes back to a listener on this computer, which then asks the
46
+ * organization who signed in, keeps the sign-in on this computer and publishes it signed in.
47
+ * It fails with `Unauthorized` for any caller but the app's main process acting for a window; the sign-in ends signed out with `Denied` when the
48
+ * person refuses consent, `Refused` when Microsoft or the organization refuses the sign-in, `Expired` after five minutes, or `Unreachable` when
49
+ * Microsoft or the organization can't be reached.
50
+ * The sign-in renews itself before it expires, and when Microsoft refuses the renewal it signs out with `Expired`, so the person signs in again.
51
+ *
52
+ * @example
53
+ * ```ts
54
+ * import { LinkPlace, type IWindowPartContext } from "@noldova/desktop.window";
55
+ * import { AzureDevOpsNames } from "@noldova/git.azure-devops.protocol";
56
+ * import { HostSignIn } from "@noldova/git.hosting.protocol";
57
+ *
58
+ * export async function startSignInAsync(context: IWindowPartContext, organization: string): Promise<void> {
59
+ * const signIn = HostSignIn.fromJson(await context.requestAsync(AzureDevOpsNames.startSignInMethod, { organization }));
60
+ * if (signIn.address !== null)
61
+ * await context.openLinkAsync(signIn.address, { place: LinkPlace.System });
62
+ * }
63
+ * ```
64
+ */
65
+ public static readonly startSignInMethod: string;
66
+
67
+ /**
68
+ * The method that stops a waiting sign-in with Microsoft and answers the sign-in, signed out; it answers the sign-in as it is when none waits.
69
+ */
70
+ public static readonly cancelSignInMethod: string;
71
+
72
+ /**
73
+ * The method that takes `{ "token": string, "organization": string }`, a personal access token the person made in Azure DevOps and the
74
+ * organization it is for, asks the organization who the token is, keeps the token with the organization on this computer and answers the sign-in,
75
+ * signed in; it fails with `Unauthorized` for any caller but the app's main process acting for a window, and answers the sign-in signed out with
76
+ * `Refused` when the organization refuses the token or `Unreachable` when it can't be reached.
77
+ *
78
+ * @example
79
+ * ```ts
80
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
81
+ * import { AzureDevOpsNames } from "@noldova/git.azure-devops.protocol";
82
+ * import { HostSignIn } from "@noldova/git.hosting.protocol";
83
+ *
84
+ * export async function signInAsync(context: IWindowPartContext, token: string, organization: string): Promise<HostSignIn> {
85
+ * return HostSignIn.fromJson(await context.requestAsync(AzureDevOpsNames.signInWithTokenMethod, { token, organization }));
86
+ * }
87
+ * ```
88
+ */
89
+ public static readonly signInWithTokenMethod: string;
90
+
91
+ /**
92
+ * The method that stops a waiting sign-in, forgets the kept sign-in on this computer and answers the sign-in, signed out.
93
+ */
94
+ public static readonly signOutMethod: string;
95
+
96
+ /**
97
+ * The method that takes a `HostReference` as JSON, with the organization as its owner and the repository's id as its repository, and answers
98
+ * the pull request as `HostItem` JSON, or null when signed out, when the reference's host isn't this module or when Azure DevOps can't show
99
+ * it (404); a 401 signs out with `Revoked` and fails with `Unauthorized`.
100
+ */
101
+ public static readonly readReferenceMethod: string;
102
+
103
+ /**
104
+ * The method that takes a `BranchQuery` as JSON, with a `dev.azure.com` or `*.visualstudio.com` remote's host and path, and answers
105
+ * `BranchPullRequest` JSON: the branch's newest pull request in any state, with its builds and policies as checks, its reviewers' votes as the
106
+ * review decision and the votes above zero as its approvals; it answers no pull request when signed out or when the branch has none.
107
+ */
108
+ public static readonly readBranchPullRequestMethod: string;
109
+
110
+ /**
111
+ * The method that takes a `CommitQuery` as JSON, with a `dev.azure.com` or `*.visualstudio.com` remote's host and path, and answers
112
+ * `BranchPullRequest` JSON as the branch read does: the pull request holding the commit, or else the one whose merge made it, found with one
113
+ * pull request query; it answers no pull request when signed out or when none brought the commit in.
114
+ */
115
+ public static readonly readCommitPullRequestMethod: string;
116
+
117
+ /**
118
+ * The method that takes a `HostReference` as JSON, as the reference read does, and answers the pull request with its reviewers and their
119
+ * votes, its policies, its builds and whether it completes by itself, as `HostPullRequest` JSON, or null as the reference read does.
120
+ */
121
+ public static readonly readPullRequestMethod: string;
122
+
123
+ /**
124
+ * The method that takes a `WorkItemQuery` as JSON and answers the work item with its type's name, colour and icon, its state and the state's
125
+ * category, its assignee, iteration, area and parent, as `HostWorkItem` JSON; null when signed out, when the query is another host's, or when the
126
+ * item doesn't exist or the account can't see it.
127
+ */
128
+ public static readonly readWorkItemMethod: string;
129
+
130
+ /**
131
+ * The method that takes a `WorkItemsQuery` as JSON and answers the work items in its scope, the signed-in person's open ones or the ones with its ids,
132
+ * each with its links, as a JSON array of `HostWorkItemDetail`, parents before their children; empty signed out or for another host or organization.
133
+ */
134
+ public static readonly readWorkItemsMethod: string;
135
+
136
+ /**
137
+ * The method that takes a `WorkItemUpdate` as JSON, moves the work item to the new state, assigns it to the signed-in person or both, and answers
138
+ * the work item as `HostWorkItemDetail` JSON. It writes to the person's account, so it fails with `Unauthorized` for any caller but the app's
139
+ * main process acting for a window, where the person asked for the change; it fails with `Unauthorized` too when the token can't write work
140
+ * items, and with `NotFound` when Azure DevOps doesn't show the work item.
141
+ */
142
+ public static readonly updateWorkItemMethod: string;
143
+
144
+ /**
145
+ * `git-azure-devops.readAuthorAvatar`: takes an `AuthorQuery` as JSON, with `dev.azure.com` as its host and the organization as its path, and
146
+ * answers the author's Azure DevOps picture as `HostAvatar` JSON: signed in to that organization, the picture of its user whose email is the
147
+ * author's, unless Azure DevOps made that picture itself; else none.
148
+ */
149
+ public static readonly readAuthorAvatarMethod: string;
150
+
151
+ /**
152
+ * `git-azure-devops.readPersonAvatar`: takes a `PersonQuery` as JSON, with `dev.azure.com` as its host, the organization as its path and the
153
+ * person's sign-in email as its login, and answers their Azure DevOps picture as `HostAvatar` JSON: signed in to that organization, the picture
154
+ * of its user with that email, unless Azure DevOps made that picture itself; else, and for a login that isn't an email, none.
155
+ */
156
+ public static readonly readPersonAvatarMethod: string;
157
+
158
+ /**
159
+ * `git-azure-devops.readPullRequests`: takes a `RepositoryQuery` as JSON for a remote on Azure DevOps and answers the repository's active pull
160
+ * requests as `HostPullRequestList` JSON, the newest first, each with its approving votes, its builds and blocking policies as checks and its
161
+ * source branch, without `refs/heads/`, as its head branch; signed
162
+ * out, the signed-out list, and for another organization or host, none.
163
+ */
164
+ public static readonly readPullRequestsMethod: string;
165
+
166
+ /**
167
+ * `git-azure-devops.readPullRequestHeads`: takes a `RepositoryQuery` as JSON like `readPullRequests` and answers the repository's active pull
168
+ * requests as `HostPullRequestHeads` JSON, the newest first, at most 100 and whether there are more, each with its title, page, and head and base
169
+ * branch but no approvals or checks, from one read of the list, for finding stacks; signed out, the signed-out list, and for another organization
170
+ * or host, none.
171
+ */
172
+ public static readonly readPullRequestHeadsMethod: string;
173
+
174
+ /**
175
+ * `git-azure-devops.readPullRequestCommits`: takes a pull request's `HostReference` as JSON and answers the commits it brings as
176
+ * `HostPullRequestCommits` JSON, the newest first, at most 250 and whether there are more; signed out, or for another host, organization or
177
+ * repository id, none.
178
+ */
179
+ public static readonly readPullRequestCommitsMethod: string;
180
+
181
+ /**
182
+ * `git-azure-devops.readPullRequestUpdates`: takes a pull request's `HostReference` as JSON and answers its pushes as `HostPullRequestUpdates` JSON,
183
+ * the newest first, at most 100 and whether there are more, each with who pushed it and when, its head and common commits and the commits it
184
+ * added; signed out, or for another host, organization or repository id, none.
185
+ */
186
+ public static readonly readPullRequestUpdatesMethod: string;
187
+
188
+ /**
189
+ * `git-azure-devops.readPullRequestChanges`: takes a pull request's `HostReference` as JSON and answers the files it changes at its latest push as
190
+ * `HostPullRequestFiles` JSON: each file's path and what the pull request did to it, never its contents, at most 5000 and whether there are more,
191
+ * with that push's head commit and the commit its changes count from; signed out, or for another host, organization or repository id, none.
192
+ */
193
+ public static readonly readPullRequestChangesMethod: string;
194
+
195
+ /**
196
+ * `git-azure-devops.readPullRequestConflicts`: takes a pull request's `HostReference` as JSON and answers the paths of the files that keep it from
197
+ * merging as `HostPullRequestConflicts` JSON, at most 100 and whether there are more; signed out, or for another host, organization or repository
198
+ * id, none.
199
+ */
200
+ public static readonly readPullRequestConflictsMethod: string;
201
+
202
+ /**
203
+ * `git-azure-devops.readReviewRequests`: takes a `RepositoryQuery` as JSON for a remote on Azure DevOps and answers the repository's active pull
204
+ * requests that list the signed-in person as a reviewer who hasn't voted, as `HostReviewRequestList` JSON, the newest first; a review asked of a
205
+ * group the person is in isn't among them. Signed out, the signed-out list, and for another organization or host, none.
206
+ */
207
+ public static readonly readReviewRequestsMethod: string;
208
+
209
+ /**
210
+ * `git-azure-devops.readCommitComments`: takes a `CommitQuery` as JSON for a remote on Azure DevOps and answers the comments on that commit as
211
+ * `HostCommitComments` JSON: in the pull request that brought it in, the people's comments in the threads made on the iteration whose source
212
+ * commit it is, and the page that shows them, kept only when it is an https page of the query's organization. Signed out, for another
213
+ * organization or host, or with no pull request, none.
214
+ */
215
+ public static readonly readCommitCommentsMethod: string;
216
+
217
+ /**
218
+ * `git-azure-devops.readPullRequestThreads`: takes a pull request's `HostReference` as JSON and answers its comment threads as `HostPullRequestThreads`
219
+ * JSON, every thread with `hasMore` false, keeping only people's text comments that aren't deleted, so the threads Azure DevOps writes for votes, pushes
220
+ * and policies are left out; signed out, or for another organization or host, no threads.
221
+ */
222
+ public static readonly readPullRequestThreadsMethod: string;
223
+
224
+ /**
225
+ * The method that takes `{ "host": string, "path": string, "id": number, "branch": string }`, an Azure DevOps remote's host and path, a work
226
+ * item's id in the remote's organization and a branch's name, and links the branch to the work item in Azure DevOps, answering null. It writes
227
+ * to the person's account, so it fails with `Unauthorized` for any caller but the app's main process acting for a window, where the person
228
+ * confirmed the link; it fails with `Unauthorized` too when the token can't write work items, and with `NotFound` when Azure DevOps doesn't
229
+ * show the repository or the work item.
230
+ */
231
+ public static readonly linkBranchMethod: string;
232
+
233
+ /**
234
+ * The method that takes `{ "reference": HostReference, "thread": number, "parent": number, "body": string }`, a pull request's reference, one
235
+ * of its threads, the comment the reply answers and the reply's Markdown, at most 150,000 characters, and posts the reply to the thread,
236
+ * answering the new `HostComment`. It writes to the person's account, so it fails with `Unauthorized` for any caller but the app's main process
237
+ * acting for a window, where the person pressed Reply; it fails with `Unauthorized` too when the token can't write code, and with `NotFound`
238
+ * when Azure DevOps doesn't show the thread.
239
+ */
240
+ public static readonly replyToThreadMethod: string;
241
+
242
+ /**
243
+ * The method that takes `{ "reference": HostReference, "thread": number, "state": "Active" | "Resolved" }` and sets the thread's state in
244
+ * Azure DevOps, Resolved as fixed, answering null. It fails as `replyToThreadMethod` does.
245
+ */
246
+ public static readonly changeThreadMethod: string;
247
+
248
+ /**
249
+ * The method that takes `{ "reference": HostReference, "vote": 10 | 5 | 0 | -5 | -10 }` and sets the signed-in person's vote on the pull request
250
+ * in Azure DevOps, adding them as a reviewer when they aren't one: 10 approves, 5 approves with suggestions, 0 resets the vote, -5 waits for the
251
+ * author and -10 rejects. It answers the person as `HostReviewer` JSON. It fails as `replyToThreadMethod` does, and with `NotFound` when Azure
252
+ * DevOps doesn't show the pull request.
253
+ */
254
+ public static readonly voteMethod: string;
255
+
256
+ /**
257
+ * The method that takes a `HostReference` as JSON and answers the merge types the pull request's target branch allows, as a string array in the
258
+ * order `noFastForward`, `squash`, `rebase`, `rebaseMerge`: those every "Limit merge types" policy on it allows, or all four when none applies; or
259
+ * null as the reference read does.
260
+ */
261
+ public static readonly readMergeTypesMethod: string;
262
+
263
+ /**
264
+ * The method that takes `{ "reference": HostReference, "sourceCommit": string, "targetBranch": string, "mergeType": string, "message": string | null,
265
+ * "completeWorkItems": boolean, "deleteSourceBranch": boolean }` and completes the pull request in Azure DevOps as the signed-in person: the last merge
266
+ * source commit's 40-character id and the target branch the page showed, one of the merge types {@link readMergeTypesMethod} lists, the merge commit's
267
+ * message, at most 4,000 characters, or null for `rebase` alone, whether to complete its linked work items and whether to delete its source branch.
268
+ * It reads the pull request first and fails with `Conflict` and why when it isn't active, is a draft, has no clean merge, has another commit or target
269
+ * than the page showed, or when the policy doesn't allow the merge type; it never bypasses a policy. It answers null. It fails as
270
+ * `replyToThreadMethod` does, and with `NotFound` when Azure DevOps doesn't show the pull request.
271
+ */
272
+ public static readonly completePullRequestMethod: string;
273
+
274
+ /**
275
+ * The method that takes what {@link completePullRequestMethod} takes and sets the pull request to complete by itself, as the signed-in person, once
276
+ * its required policies pass, with those choices. It reads the pull request first and fails with `Conflict` and why when it isn't active, is a draft,
277
+ * has another commit or target than the page showed, or when the policy doesn't allow the merge type; unlike completing, it needs no clean merge
278
+ * yet, and it never bypasses a policy. It answers null and fails as {@link completePullRequestMethod} does.
279
+ */
280
+ public static readonly setAutoCompleteMethod: string;
281
+
282
+ /**
283
+ * The method that takes a `HostReference` as JSON and stops the pull request from completing by itself. It reads the pull request first and fails
284
+ * with `Conflict` when it isn't active. It answers null, and fails as `replyToThreadMethod` does, and with `NotFound` when Azure DevOps doesn't show
285
+ * the pull request.
286
+ */
287
+ public static readonly cancelAutoCompleteMethod: string;
288
+
289
+ /**
290
+ * The method that takes `{ "reference": HostReference, "sourceCommit": string }` and abandons the pull request in Azure DevOps as the signed-in person,
291
+ * with the last merge source commit's 40-character id the page showed. It reads the pull request first and fails with `Conflict` and why when it
292
+ * isn't active or has another commit. It answers null and fails as {@link cancelAutoCompleteMethod} does.
293
+ */
294
+ public static readonly abandonPullRequestMethod: string;
295
+
296
+ /**
297
+ * The method that takes `{ "reference": HostReference, "query": string }`, a pull request's reference and 3 to 100 characters, and answers up to
298
+ * 10 people and groups of the pull request's organization whose name or email Azure DevOps matches, each as
299
+ * `{ "descriptor": string, "name": string, "login": string, "isGroup": boolean }`, or none when the token belongs to another organization or none is kept. It lists
300
+ * the organization's people, so it fails with `Unauthorized` for any caller but the app's main process acting for a window.
301
+ */
302
+ public static readonly searchPeopleMethod: string;
303
+
304
+ /**
305
+ * The method that takes `{ "reference": HostReference, "descriptor": string }`, a pull request's reference and a descriptor `searchPeopleMethod`
306
+ * answered, and adds that person or group to the pull request's reviewers as optional, without a vote, answering the reviewer as `HostReviewer`
307
+ * JSON. It fails as `replyToThreadMethod` does, and with `NotFound` when Azure DevOps doesn't find the person or the pull request.
308
+ */
309
+ public static readonly addReviewerMethod: string;
310
+
311
+ /**
312
+ * The event that carries the sign-in as `HostSignIn` JSON each time it changes.
313
+ */
314
+ public static readonly signInChangedEvent: string;
315
+
316
+ /**
317
+ * What the module offers today: a sign-in, reading a pull request and a branch's pull request, checks, votes, policies, builds, a pull
318
+ * request that completes by itself, work items, authors' pictures and a repository's open pull requests.
319
+ */
320
+ public static readonly capabilities: HostCapabilities;
321
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export { AzureDevOpsNames } from "../models/azure-devops-names.js";
@@ -0,0 +1,49 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { HostCapabilities, HostCapability, HostingNames } from "@noldova/git.hosting.protocol";
9
+ export class AzureDevOpsNames {
10
+ static moduleId = "git-azure-devops";
11
+ static readSignInMethod = HostingNames.nameOf(AzureDevOpsNames.moduleId, HostingNames.readSignInMethod);
12
+ static startSignInMethod = HostingNames.nameOf(AzureDevOpsNames.moduleId, HostingNames.startSignInMethod);
13
+ static cancelSignInMethod = HostingNames.nameOf(AzureDevOpsNames.moduleId, HostingNames.cancelSignInMethod);
14
+ static signInWithTokenMethod = HostingNames.nameOf(AzureDevOpsNames.moduleId, HostingNames.signInWithTokenMethod);
15
+ static signOutMethod = HostingNames.nameOf(AzureDevOpsNames.moduleId, HostingNames.signOutMethod);
16
+ static readReferenceMethod = HostingNames.nameOf(AzureDevOpsNames.moduleId, HostingNames.readReferenceMethod);
17
+ static readBranchPullRequestMethod = HostingNames.nameOf(AzureDevOpsNames.moduleId, HostingNames.readBranchPullRequestMethod);
18
+ static readCommitPullRequestMethod = HostingNames.nameOf(AzureDevOpsNames.moduleId, HostingNames.readCommitPullRequestMethod);
19
+ static readPullRequestMethod = HostingNames.nameOf(AzureDevOpsNames.moduleId, HostingNames.readPullRequestMethod);
20
+ static readWorkItemMethod = HostingNames.nameOf(AzureDevOpsNames.moduleId, HostingNames.readWorkItemMethod);
21
+ static readWorkItemsMethod = HostingNames.nameOf(AzureDevOpsNames.moduleId, HostingNames.readWorkItemsMethod);
22
+ static updateWorkItemMethod = HostingNames.nameOf(AzureDevOpsNames.moduleId, HostingNames.updateWorkItemMethod);
23
+ static readAuthorAvatarMethod = HostingNames.nameOf(AzureDevOpsNames.moduleId, HostingNames.readAuthorAvatarMethod);
24
+ static readPersonAvatarMethod = HostingNames.nameOf(AzureDevOpsNames.moduleId, HostingNames.readPersonAvatarMethod);
25
+ static readPullRequestsMethod = HostingNames.nameOf(AzureDevOpsNames.moduleId, HostingNames.readPullRequestsMethod);
26
+ static readPullRequestHeadsMethod = "git-azure-devops.readPullRequestHeads";
27
+ static readPullRequestCommitsMethod = "git-azure-devops.readPullRequestCommits";
28
+ static readPullRequestUpdatesMethod = "git-azure-devops.readPullRequestUpdates";
29
+ static readPullRequestChangesMethod = "git-azure-devops.readPullRequestChanges";
30
+ static readPullRequestConflictsMethod = "git-azure-devops.readPullRequestConflicts";
31
+ static readReviewRequestsMethod = HostingNames.nameOf(AzureDevOpsNames.moduleId, HostingNames.readReviewRequestsMethod);
32
+ static readCommitCommentsMethod = HostingNames.nameOf(AzureDevOpsNames.moduleId, HostingNames.readCommitCommentsMethod);
33
+ static readPullRequestThreadsMethod = HostingNames.nameOf(AzureDevOpsNames.moduleId, HostingNames.readPullRequestThreadsMethod);
34
+ static linkBranchMethod = "git-azure-devops.linkBranch";
35
+ static replyToThreadMethod = "git-azure-devops.replyToThread";
36
+ static changeThreadMethod = "git-azure-devops.changeThread";
37
+ static voteMethod = "git-azure-devops.vote";
38
+ static readMergeTypesMethod = "git-azure-devops.readMergeTypes";
39
+ static completePullRequestMethod = "git-azure-devops.completePullRequest";
40
+ static setAutoCompleteMethod = "git-azure-devops.setAutoComplete";
41
+ static cancelAutoCompleteMethod = "git-azure-devops.cancelAutoComplete";
42
+ static abandonPullRequestMethod = "git-azure-devops.abandonPullRequest";
43
+ static searchPeopleMethod = "git-azure-devops.searchPeople";
44
+ static addReviewerMethod = "git-azure-devops.addReviewer";
45
+ static signInChangedEvent = HostingNames.nameOf(AzureDevOpsNames.moduleId, HostingNames.signInChangedEvent);
46
+ static capabilities = new HostCapabilities([HostCapability.SignIn, HostCapability.ReadItem,
47
+ HostCapability.BranchPullRequest, HostCapability.Checks, HostCapability.Votes, HostCapability.Policies, HostCapability.Builds,
48
+ HostCapability.AutoComplete, HostCapability.WorkItems, HostCapability.AuthorAvatars, HostCapability.PullRequests]);
49
+ }