@gitkraken/core-gitlens 0.17.0 → 0.19.0
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/CHANGELOG.md +15 -1
- package/dist/git/cache.d.ts +7 -0
- package/dist/git/cache.js +21 -3
- package/dist/git/cache.js.map +1 -1
- package/dist/git/models/issue.d.ts +13 -3
- package/dist/git/models/issue.js +3 -1
- package/dist/git/models/issue.js.map +1 -1
- package/dist/git/models/pullRequest.d.ts +13 -2
- package/dist/git/models/pullRequest.js +3 -1
- package/dist/git/models/pullRequest.js.map +1 -1
- package/dist/git/utils/issue.utils.js +2 -1
- package/dist/git/utils/issue.utils.js.map +1 -1
- package/dist/git/utils/pullRequest.utils.js +1 -0
- package/dist/git/utils/pullRequest.utils.js.map +1 -1
- package/dist/git/watching/gitIgnoreFilter.d.ts +21 -3
- package/dist/git/watching/gitIgnoreFilter.js +74 -14
- package/dist/git/watching/gitIgnoreFilter.js.map +1 -1
- package/dist/git/watching/provider.d.ts +9 -1
- package/dist/git/watching/watchService.d.ts +14 -1
- package/dist/git/watching/watchService.js +57 -16
- package/dist/git/watching/watchService.js.map +1 -1
- package/dist/git/watching/worktreeSummary.d.ts +38 -10
- package/dist/git/watching/worktreeSummary.js +164 -50
- package/dist/git/watching/worktreeSummary.js.map +1 -1
- package/dist/git-cli/cliGitProvider.js +4 -4
- package/dist/git-cli/cliGitProvider.js.map +1 -1
- package/dist/git-cli/providers/branches.js +1 -32
- package/dist/git-cli/providers/branches.js.map +1 -1
- package/dist/git-cli/providers/config.d.ts +21 -0
- package/dist/git-cli/providers/config.js +72 -1
- package/dist/git-cli/providers/config.js.map +1 -1
- package/dist/plus/integrations/models/gitHostIntegration.d.ts +7 -6
- package/dist/plus/integrations/models/gitHostIntegration.js +4 -3
- package/dist/plus/integrations/models/gitHostIntegration.js.map +1 -1
- package/dist/plus/integrations/models/integration.d.ts +5 -0
- package/dist/plus/integrations/models/integration.js.map +1 -1
- package/dist/plus/integrations/providers/azure/azure.d.ts +8 -6
- package/dist/plus/integrations/providers/azure/azure.js +3 -2
- package/dist/plus/integrations/providers/azure/azure.js.map +1 -1
- package/dist/plus/integrations/providers/azure/models.d.ts +4 -2
- package/dist/plus/integrations/providers/azure/models.js +6 -5
- package/dist/plus/integrations/providers/azure/models.js.map +1 -1
- package/dist/plus/integrations/providers/azureDevOps.d.ts +15 -13
- package/dist/plus/integrations/providers/azureDevOps.js +26 -22
- package/dist/plus/integrations/providers/azureDevOps.js.map +1 -1
- package/dist/plus/integrations/providers/azureDevOpsServer.js +6 -3
- package/dist/plus/integrations/providers/azureDevOpsServer.js.map +1 -1
- package/dist/plus/integrations/providers/models.d.ts +26 -4
- package/dist/plus/integrations/providers/models.js +27 -5
- package/dist/plus/integrations/providers/models.js.map +1 -1
- package/dist/plus/integrations/reads/drains.d.ts +1 -1
- package/dist/plus/integrations/reads/drains.js.map +1 -1
- package/dist/plus/integrations/reads/etag.js +3 -1
- package/dist/plus/integrations/reads/etag.js.map +1 -1
- package/docs/integrations.md +21 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.js","names":[],"sources":["../../../../../plus/integrations/src/providers/models.ts"],"sourcesContent":["import type {\n\tAccount,\n\tActionablePullRequest,\n\tAnyEntityIdentifierInput,\n\tAzureDevOps,\n\tAzureOrganization,\n\tAzureProject,\n\tAzureSetPullRequestInput,\n\tBitbucket,\n\tBitbucketServer,\n\tBitbucketWorkspaceStub,\n\tCollectionMetadata,\n\tCursorPageInput,\n\tEnterpriseOptions,\n\tGetRepoInput,\n\tGitBuildStatus,\n\tGitBuildStatusState as GitBuildStatusStateType,\n\tGitHub,\n\tGitHubPullRequestFieldMap,\n\tGitIssueState as GitIssueStateType,\n\tGitLab,\n\tGitLabGroup,\n\tGitMergeStrategy,\n\tGitPullRequest,\n\tGitPullRequestMergeableState as GitPullRequestMergeableStateType,\n\tGitPullRequestReviewState as GitPullRequestReviewStateType,\n\tGitPullRequestState as GitPullRequestStateType,\n\tGitRepository,\n\tGitRepositoryRemoteInfo,\n\tJira,\n\tJiraProject,\n\tJiraResource,\n\tJiraServer,\n\tJiraServerProject,\n\tLinear,\n\tLinearOrganization,\n\tLinearTeam,\n\tNumberedPageInput,\n\tOrganization,\n\tIssue as ProviderApiIssue,\n\tPullRequestWithUniqueID,\n\tRequestFunction,\n\tRequestOptions,\n\tResponse,\n\tSetPullRequestInput,\n\tTrello,\n} from '@gitkraken/provider-apis';\nimport { EntityIdentifierUtils } from '@gitkraken/provider-apis/entity-identifiers';\nimport { GitProviderUtils } from '@gitkraken/provider-apis/provider-utils';\nimport { githubSearchResultLimit } from '@gitlens/git-github/api/config.js';\nimport type { Account as UserAccount } from '@gitlens/git/models/author.js';\nimport type {\n\tIssueBodyField,\n\tIssueIteration,\n\tIssueProject,\n\tIssueProjection,\n\tIssueProviderState,\n\tIssueShape,\n\tIssueStateFilter,\n} from '@gitlens/git/models/issue.js';\nimport { Issue, RepositoryAccessLevel } from '@gitlens/git/models/issue.js';\nimport type {\n\tPullRequestProjection,\n\tPullRequestRef,\n\tPullRequestRefs,\n\tPullRequestRepositoryIdentityDescriptor,\n\tPullRequestState,\n\tPullRequestStateFilter,\n} from '@gitlens/git/models/pullRequest.js';\nimport {\n\tPullRequest,\n\tPullRequestMergeableState,\n\tPullRequestStatusCheckRollupState,\n} from '@gitlens/git/models/pullRequest.js';\nimport type { Provider, ProviderReference } from '@gitlens/git/models/remoteProvider.js';\nimport type { ProviderScope } from '@gitlens/git/models/resourceDescriptor.js';\nimport { isTerminalIssueStateCategory } from '@gitlens/git/utils/issue.utils.js';\nimport { gitSuffixRegex } from '@gitlens/git/utils/remote.utils.js';\nimport type { PagedResult } from '@gitlens/utils/paging.js';\nimport { equalsIgnoreCase } from '@gitlens/utils/string.js';\nimport type { IntegrationIds } from '../constants.js';\nimport {\n\tGitCloudHostIntegrationId,\n\tGitSelfManagedHostIntegrationId,\n\tIssuesCloudHostIntegrationId,\n\tIssuesSelfManagedHostIntegrationId,\n} from '../constants.js';\nimport type { Integration, IntegrationType } from '../models/integration.js';\nimport type {\n\tIssueSearchCapabilities,\n\tIssueSorting,\n\tPullRequestSearchCapabilities,\n\tPullRequestSorting,\n} from '../providerFilters.js';\nimport { IssueFilter, PullRequestFilter } from '../providerFilters.js';\n\nexport { IssueFilter, PullRequestFilter } from '../providerFilters.js';\nexport type {\n\tIssueSearchCapabilities,\n\tIssueSearchCriteria,\n\tIssueSearchRelationship,\n\tIssueSortField,\n\tIssueSorting,\n\tPullRequestSearchCapabilities,\n\tPullRequestSearchCriteria,\n\tPullRequestSortField,\n\tPullRequestSorting,\n} from '../providerFilters.js';\nimport type { ProviderRepositoryShape } from '../results.js';\nimport { isJiraIntegrationId } from '../utils/integration.utils.js';\n\nexport type { ProviderOrganization, ProviderRepositoryShape } from '../results.js';\nimport { fromProviderAccount, toProviderAccount } from './accounts.js';\nimport {\n\tazurePullRequestSearchSorts,\n\tazureWorkItemSearchRelationships,\n\tazureWorkItemSearchResultLimit,\n\tazureWorkItemSearchSorts,\n} from './azure/search.js';\nimport {\n\tazureAccountWideIssueSorts,\n\tazureIssueSorts,\n\tgithubAccountWideIssueSorts,\n\tgithubIssueSorts,\n\tgitlabAccountWideIssueSorts,\n\tgitlabIssueSorts,\n\tjiraIssueSorts,\n\tlinearIssueSorts,\n\ttrelloIssueSorts,\n} from './issueSorts.js';\nimport type { ProviderPullRequestReview, ProviderPullRequestReviews } from './pullRequestReviews.js';\nimport {\n\tfromPullRequestReviewDecision,\n\tproviderPullRequestReviewStateDismissed,\n\ttoCompletedReviews,\n\ttoProviderReviewDecision,\n\ttoProviderReviews,\n\ttoReviewRequests,\n} from './pullRequestReviews.js';\nimport { getEntityIdentifierInput } from './utils.js';\n\ntype GitBuildStatusState = GitBuildStatusStateType;\ntype GitIssueState = GitIssueStateType;\ntype GitPullRequestMergeableState = GitPullRequestMergeableStateType;\ntype GitPullRequestReviewState = GitPullRequestReviewStateType;\ntype GitPullRequestState = GitPullRequestStateType;\n\n// Local runtime copies of the `@gitkraken/provider-apis` string enums. Duplicated (not imported as\n// values) because the SDK ships as CJS whose named enum exports can't be statically imported as ESM\n// values from the bundled `dist`. Exported so the enum-parity test can deep-equal them against the\n// real SDK enums and turn any upstream drift into a test failure instead of a silent mismatch.\nexport const GitBuildStatusState = {\n\tActionRequired: 'ACTION_REQUIRED' as GitBuildStatusState,\n\tCancelled: 'CANCELLED' as GitBuildStatusState,\n\tError: 'ERROR' as GitBuildStatusState,\n\tFailed: 'FAILED' as GitBuildStatusState,\n\tPending: 'PENDING' as GitBuildStatusState,\n\tRunning: 'RUNNING' as GitBuildStatusState,\n\tSkipped: 'SKIPPED' as GitBuildStatusState,\n\tSuccess: 'SUCCESS' as GitBuildStatusState,\n\tWarning: 'WARNING' as GitBuildStatusState,\n\tOptionalActionRequired: 'OPTIONAL_ACTION_REQUIRED' as GitBuildStatusState,\n} as const;\n\nexport const GitIssueState = {\n\tOpen: 'OPEN' as GitIssueState,\n\tClosed: 'CLOSED' as GitIssueState,\n} as const;\n\nexport const GitPullRequestState = {\n\tOpen: 'OPEN' as GitPullRequestState,\n\tClosed: 'CLOSED' as GitPullRequestState,\n\tMerged: 'MERGED' as GitPullRequestState,\n} as const;\n\nexport const GitPullRequestReviewState = {\n\tApproved: 'APPROVED' as GitPullRequestReviewState,\n\tChangesRequested: 'CHANGES_REQUESTED' as GitPullRequestReviewState,\n\tCommented: 'COMMENTED' as GitPullRequestReviewState,\n\tReviewRequested: 'REVIEW_REQUESTED' as GitPullRequestReviewState,\n} as const;\n\nexport const GitPullRequestMergeableState = {\n\tBehind: 'BEHIND' as GitPullRequestMergeableState,\n\tBlocked: 'BLOCKED' as GitPullRequestMergeableState,\n\tConflicts: 'CONFLICTS' as GitPullRequestMergeableState,\n\tFailingChecks: 'FAILING_CHECKS' as GitPullRequestMergeableState,\n\tMergeable: 'MERGEABLE' as GitPullRequestMergeableState,\n\tUnknown: 'UNKNOWN' as GitPullRequestMergeableState,\n\tUnknownAndBlocked: 'UNKNOWN_AND_BLOCKED' as GitPullRequestMergeableState,\n\tUnstable: 'UNSTABLE' as GitPullRequestMergeableState,\n} as const;\n\n/**\n * Forward-only host type — the package only sets `EnrichablePullRequest.enrichable`\n * for the host to consume. Typed as `any` to avoid duplicating the host's\n * `EnrichableItem` shape.\n */\ntype EnrichableItem = any;\n\nexport type ProviderAccount = Account;\nexport type ProviderReposInput = (string | number)[] | GetRepoInput[];\nexport type ProviderRepoInput = GetRepoInput;\n\n/**\n * Which half of {@link ProviderReposInput} a caller supplied: repository IDS rather than descriptors.\n *\n * The union has no discriminant, so the answer is the element shape — and several layers need it for different\n * reasons (`ProvidersApi` to pick `repoIds` vs `repos` in the SDK input, `GitHostIntegration` to refuse an\n * id-based read a provider can't serve, `listIssuesPage` to know GitLab's id form takes the SDK's own merging\n * aggregate). One predicate rather than one per layer, because each copy is free to disagree about the shape,\n * and the symptom of disagreement is a read routed to the wrong provider query.\n *\n * Takes `unknown` rather than {@link ProviderReposInput} because `ProvidersApi.isRepoIdsInput` forwards here and\n * is public with an unvalidated parameter, so the array check has to stay part of the rule rather than be assumed\n * from the parameter type.\n */\nexport function isRepoIdsInput(input: unknown): input is (string | number)[] {\n\treturn (\n\t\tinput != null &&\n\t\tArray.isArray(input) &&\n\t\tinput.every(repo => typeof repo === 'string' || typeof repo === 'number')\n\t);\n}\n\n/**\n * provider-apis' pull request. `mergeableState` is optional because {@link toProviderPullRequest} also converts\n * GitLens' own rows, and a read that didn't select it has none to give.\n */\nexport type ProviderPullRequest = Omit<GitPullRequest, 'reviews' | 'mergeableState'> & {\n\treviews: ProviderPullRequestReviews;\n\tmergeableState?: GitPullRequestMergeableState;\n};\nexport type ProviderRepository = GitRepository;\nexport type ProviderIssue = ProviderApiIssue;\nexport type ProviderEnterpriseOptions = EnterpriseOptions;\nexport type ProviderJiraProject = JiraProject;\nexport type ProviderJiraResource = JiraResource;\n// Jira Server's project shape is its own: `/rest/api/2/project` returns only an id and a name, with no `key`\n// and no enclosing resource (the instance itself is the resource).\nexport type ProviderJiraServerProject = JiraServerProject;\nexport type ProviderLinearTeam = LinearTeam;\nexport type ProviderLinearOrganization = LinearOrganization;\nexport type ProviderAzureProject = AzureProject;\nexport type ProviderAzureResource = AzureOrganization;\nexport type ProviderBitbucketResource = BitbucketWorkspaceStub;\nexport type ProviderGitHubOrganization = Organization;\nexport type ProviderGitLabGroup = GitLabGroup;\n\n/**\n * Returns an account-wide PR identity. Provider PR ids are commonly scoped to a repository or organization,\n * so an id alone is never safe for deduplication across a multi-repository fan-out. Repository identity wins\n * when available so the same row still deduplicates when a later facet adds or removes its URL.\n */\nexport function getProviderPullRequestIdentity(\n\tpr: Pick<ProviderPullRequest, 'id' | 'repository' | 'url'> | Pick<PullRequest, 'id' | 'repository' | 'url'>,\n): string | undefined {\n\tconst repository = pr.repository as\n\t\t| {\n\t\t\t\tid?: string | number;\n\t\t\t\tname?: string;\n\t\t\t\t/** A `PullRequest`'s name for `name`, so its key matches its provider-apis form's. */\n\t\t\t\trepo?: string;\n\t\t\t\tnamespace?: string;\n\t\t\t\towner?: { login?: string } | string;\n\t\t\t\tproject?: string;\n\t\t }\n\t\t| undefined;\n\tconst urlIdentity = pr.url != null && pr.url.trim() !== '' ? `url:${pr.url}` : undefined;\n\tif (repository == null) return urlIdentity;\n\n\tconst owner = typeof repository.owner === 'string' ? repository.owner : repository.owner?.login;\n\tconst repositoryId = repository.id != null ? String(repository.id).trim() : '';\n\tif (repositoryId !== '') return `repository:${repositoryId}:pull-request:${pr.id}`;\n\n\tconst name = (repository.name ?? repository.repo)?.trim() ?? '';\n\tconst namespace = (repository.namespace ?? owner)?.trim() ?? '';\n\tconst project = repository.project?.trim() ?? '';\n\tif (name !== '' && (namespace !== '' || project !== '')) {\n\t\treturn `repository:${namespace}/${project}/${name}:pull-request:${pr.id}`;\n\t}\n\treturn urlIdentity;\n}\n\nexport type ProviderHierarchyResult<T> = PagedResult<T> & {\n\treadonly truncated?: boolean;\n\t/**\n\t * SDK collection metadata merged across the drained pages. Independent from the local `truncated` backstop:\n\t * a page-drain backstop stays visible even if every fetched page reported `complete`, and SDK\n\t * incompleteness is preserved even when the drain finished within its page budget.\n\t */\n\treadonly metadata?: CollectionMetadata;\n};\n\n/**\n * A normalized {@link PagedResult} that additionally carries the SDK's collection {@link CollectionMetadata}\n * (completeness + per-scope failures). Named to avoid colliding with the public ProviderBackend\n * `ProviderPagedResult` in `results.ts`: this is the integration-local carrier between the `ProvidersApi`\n * boundary and the code that maps metadata into warnings/truncation. `metadata` is optional so providers and\n * test doubles that predate the SDK metadata contract keep behaving exactly as before.\n */\nexport type ProviderApiPagedResult<T> = PagedResult<T> & {\n\treadonly metadata?: CollectionMetadata;\n};\n\n/**\n * A non-paged collection result carrying SDK {@link CollectionMetadata}. Used for fan-out reads that return a\n * flat set of values with completeness/failure metadata but no provider-native pagination (e.g. Jira project\n * discovery across resources, Trello board search).\n */\nexport type ProviderApiCollectionResult<T> = {\n\treadonly values: NonNullable<T>[];\n\treadonly metadata?: CollectionMetadata;\n};\n\nexport const ProviderPullRequestReviewState = GitPullRequestReviewState;\nexport const ProviderBuildStatusState = GitBuildStatusState;\nexport type ProviderRequestFunction = RequestFunction;\nexport type ProviderRequestResponse<T> = Response<T>;\nexport type ProviderRequestOptions = RequestOptions;\n\nexport enum PagingMode {\n\tProject = 'project',\n\tRepo = 'repo',\n\tRepos = 'repos',\n}\n\nexport interface PagingInput {\n\tcursor?: string | null;\n\tpage?: number;\n}\n\nexport interface PagedRepoInput {\n\trepo: GetRepoInput;\n\tcursor?: string;\n}\n\nexport interface PagedProjectInput {\n\tnamespace: string;\n\tproject: string;\n\tcursor?: string;\n}\n\nexport interface GetPullRequestsOptions {\n\tauthorLogin?: string;\n\tassigneeLogins?: string[];\n\treviewRequestedLogin?: string;\n\t// Reviewer filters keyed differently per provider: GitHub/GitLab use reviewRequestedLogin (login),\n\t// Bitbucket/Azure DevOps use reviewerId (account id), Bitbucket Server uses reviewerLogin (login).\n\treviewerId?: string;\n\treviewerLogin?: string;\n\tmentionLogin?: string;\n\t// PR states to include; when omitted the provider returns its default (open only).\n\tstates?: GitPullRequestState[];\n\tquery?: string;\n\tcursor?: string; // stringified JSON object of type { type: 'cursor' | 'page'; value: string | number } | {}\n\tbaseUrl?: string;\n\t// 1-based page to request from numbered-page providers; takes precedence over a page-typed cursor.\n\tpage?: number;\n\t// Items to request per page (numbered-page providers, plus GitHub's maxPageSize).\n\tpageSize?: number;\n\t// Opt in to repository remote metadata (clone URLs) when the PR payload lacks it. Only Azure DevOps\n\t// acts on this today (extra API call); it is a no-op for the other providers.\n\tincludeRemoteInfo?: boolean;\n\t// Field selection for the row shape. GitHub-shaped because it is the only provider whose PR read gates\n\t// anything on it; the others ignore it. Declared here rather than passed through a spread so a typo or a\n\t// wrong-shaped map is a compile error instead of a silently ignored key. An ABSENT map means \"select\n\t// everything\", so only summary reads pass one.\n\tfields?: GitHubPullRequestFieldMap;\n}\n\nexport interface GetPullRequestsForUserOptions {\n\tincludeFromArchivedRepos?: boolean;\n\tcursor?: string; // stringified JSON object of type { type: 'cursor' | 'page'; value: string | number } | {}\n\tbaseUrl?: string;\n\t// PR states to include; when omitted the provider returns its default (open only).\n\tstates?: GitPullRequestState[];\n\t/**\n\t * Items to request per page. Worth setting explicitly on an account-wide read that gets DRAINED: each\n\t * provider falls back to its own historical page size when this is omitted, and GitHub's is 15\n\t * (`MAX_PR_PAGE_SIZE`), so a drain pays ~7x the round trips of the 100 its search actually allows.\n\t */\n\tpageSize?: number;\n}\n\nexport interface GetPullRequestsForUserInput extends GetPullRequestsForUserOptions {\n\tuserId: string;\n}\n\nexport interface GetPullRequestsAssociatedWithUserInput extends GetPullRequestsForUserOptions {\n\tusername: string;\n}\n\nexport interface GetPullRequestsForRepoInput extends GetPullRequestsOptions {\n\trepo: GetRepoInput;\n}\n\nexport interface GetPullRequestsForReposInput extends GetPullRequestsOptions {\n\trepos: GetRepoInput[];\n}\n\nexport interface GetPullRequestsForRepoIdsInput extends GetPullRequestsOptions {\n\trepoIds: (string | number)[];\n}\n\nexport interface GetIssuesOptions {\n\tauthorLogin?: string;\n\tassigneeLogins?: string[];\n\tmentionLogin?: string;\n\t// Issue states to include; when omitted the provider returns its default (open only).\n\tstates?: GitIssueState[];\n\tcursor?: string; // stringified JSON object of type { type: 'cursor' | 'page'; value: string | number } | {}\n\tbaseUrl?: string;\n\t// 1-based page to request from numbered-page providers; takes precedence over a page-typed cursor.\n\tpage?: number;\n\t// Items to request per page (numbered-page providers, plus GitHub's maxPageSize).\n\tpageSize?: number;\n\t/**\n\t * How the provider should order the result, as `field:direction`.\n\t *\n\t * Passed through to the SDK verbatim — the translation to each provider's own vocabulary lives THERE, next to\n\t * the capability map it validates against, so that the table this facade publishes and the table that does the\n\t * translating can't drift apart across two repositories. A key the provider can't express raises the SDK's\n\t * `UnsupportedSortError`, which is why the facade validates against `supportedIssueSorts` first: reaching that\n\t * error means this table has outrun the SDK's.\n\t *\n\t * Always supplied by the facade's reads, never omitted. Omitting it would delegate the order to each provider's\n\t * own default, which is the incoherence across providers the SDK deliberately preserves and this layer\n\t * deliberately does not.\n\t */\n\tsort?: IssueSorting;\n}\n\nexport interface GetIssuesForRepoInput extends GetIssuesOptions {\n\trepo: GetRepoInput;\n}\n\nexport interface GetIssuesForReposInput extends GetIssuesOptions {\n\trepos: GetRepoInput[];\n}\n\nexport interface GetIssuesForRepoIdsInput extends GetIssuesOptions {\n\trepoIds: (string | number)[];\n}\n\nexport interface GetIssuesForProjectInput extends GetIssuesOptions {\n\tproject: string;\n\tresourceId: string;\n}\n\nexport interface GetIssuesForAzureProjectInput extends GetIssuesOptions {\n\tnamespace: string;\n\tproject: string;\n}\n\nexport interface GetReposOptions {\n\tcursor?: string; // stringified JSON object of type { type: 'cursor' | 'page'; value: string | number } | {}\n}\n\nexport interface GetReposForAzureProjectInput {\n\tnamespace: string;\n\tproject: string;\n}\n\nexport interface PageInfo {\n\thasNextPage: boolean;\n\tendCursor?: string | null;\n\tnextPage?: number | null;\n\t// Numbered-page providers (Bitbucket, Bitbucket Server, Azure DevOps) additionally report these.\n\tcurrentPage?: number | null;\n\ttotalPages?: number | null;\n\ttotalCount?: number | null;\n}\n\nexport type GetRepoFn = (\n\tinput: ProviderRepoInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderRepository }>;\nexport type GetRepoOfProjectFn = (\n\tinput: ProviderRepoInput & { project: string },\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderRepository }>;\n\nexport type GetPullRequestsForReposFn = (\n\tinput: (GetPullRequestsForReposInput | GetPullRequestsForRepoIdsInput) & PagingInput,\n\toptions?: EnterpriseOptions,\n\t// `metadata` carries SDK collection completeness/failures for multi-repo fan-outs (Bitbucket, Azure DevOps,\n\t// Bitbucket Server); `pageInfo` is present for the cursor-based aggregate (GitHub). Both are optional so\n\t// each provider only sets what it actually reports.\n) => Promise<{ data: ProviderPullRequest[]; pageInfo?: PageInfo; metadata?: CollectionMetadata }>;\n\nexport type GetPullRequestsForRepoFn = (\n\tinput: GetPullRequestsForRepoInput & PagingInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderPullRequest[]; pageInfo?: PageInfo }>;\n\nexport type GetPullRequestForRepoFn = (\n\tinput: { repo: ProviderRepoInput; number: number; includeRemoteInfo?: boolean },\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderPullRequest | null }>;\n\nexport type GetPullRequestsForUserFn = (\n\tinput: GetPullRequestsForUserInput | GetPullRequestsAssociatedWithUserInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderPullRequest[]; pageInfo?: PageInfo }>;\n\nexport type GetPullRequestsForAzureProjectsFn = (\n\tinput: {\n\t\tprojects: { namespace: string; project: string }[];\n\t\tauthorLogin?: string;\n\t\tassigneeLogins?: string[];\n\t\treviewerId?: string;\n\t\tstates?: GitPullRequestState[];\n\t\trepo?: ProviderRepoInput;\n\t},\n\toptions?: EnterpriseOptions,\n\t// Aggregate multi-project fan-out: no `pageInfo` (call getPullRequestsForAzureProject for that), but SDK\n\t// collection metadata reports per-project completeness/failures.\n) => Promise<{ data: ProviderPullRequest[]; metadata?: CollectionMetadata }>;\n\n/** Single Azure project PR read, paginated by number (unlike the aggregate {@link GetPullRequestsForAzureProjectsFn}). */\nexport type GetPullRequestsForAzureProjectFn = (\n\tinput: {\n\t\tnamespace: string;\n\t\tproject: string;\n\t\tauthorLogin?: string;\n\t\tassigneeLogins?: string[];\n\t\treviewerId?: string;\n\t\tstates?: GitPullRequestState[];\n\t\trepo?: ProviderRepoInput;\n\t} & PagingInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderPullRequest[]; pageInfo: { hasNextPage: boolean; nextPage: number | null } }>;\n\nexport type MergePullRequestFn =\n\t| ((\n\t\t\tinput: {\n\t\t\t\tpullRequest: {\n\t\t\t\t\theadRef: {\n\t\t\t\t\t\toid: string | null;\n\t\t\t\t\t} | null;\n\t\t\t\t\tversion?: number; // Used by BitbucketServer\n\t\t\t\t} & SetPullRequestInput;\n\t\t\t\tmergeStrategy?: GitMergeStrategy;\n\t\t\t},\n\t\t\toptions?: EnterpriseOptions,\n\t ) => Promise<void>)\n\t| ((\n\t\t\tinput: {\n\t\t\t\tpullRequest: {\n\t\t\t\t\theadRef: {\n\t\t\t\t\t\toid: string | null;\n\t\t\t\t\t} | null;\n\t\t\t\t} & SetPullRequestInput;\n\t\t\t\tmergeStrategy?: GitMergeStrategy.Squash;\n\t\t\t},\n\t\t\toptions?: EnterpriseOptions,\n\t ) => Promise<void>)\n\t| ((\n\t\t\tinput: {\n\t\t\t\tpullRequest: {\n\t\t\t\t\theadRef: {\n\t\t\t\t\t\toid: string;\n\t\t\t\t\t};\n\t\t\t\t} & AzureSetPullRequestInput;\n\t\t\t\tmergeStrategy?:\n\t\t\t\t\t| GitMergeStrategy.MergeCommit\n\t\t\t\t\t| GitMergeStrategy.Rebase\n\t\t\t\t\t| GitMergeStrategy.RebaseThenMergeCommit\n\t\t\t\t\t| GitMergeStrategy.Squash;\n\t\t\t},\n\t\t\toptions?: EnterpriseOptions,\n\t ) => Promise<void>);\n\nexport type GetIssueFn = (\n\tinput:\n\t\t| { resourceId: string; number: string } // jira\n\t\t| { namespace: string; name: string; number: string }, // gitlab\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderIssue }>;\n\nexport type GetIssuesForReposFn = (\n\tinput: (GetIssuesForReposInput | GetIssuesForRepoIdsInput) & PagingInput,\n\toptions?: EnterpriseOptions,\n\t// GitHub's multi-repo issue search reports its 1,000-result cap — and, when it recovers past it by\n\t// partitioning, what that recovery could not reach — through `metadata`. Documented on the contract for\n\t// the reader; `getPagedResult` accepts and forwards `metadata` from any provider fn regardless.\n) => Promise<{ data: ProviderIssue[]; pageInfo?: PageInfo; metadata?: CollectionMetadata }>;\n\nexport type GetIssuesForCurrentUserInput = PagingInput & {\n\t// GitLab's account-wide REST read (`GET /issues`): `scope` controls breadth ('assigned_to_me' vs 'all') and\n\t// the username fields independently narrow a broad read to a specific assignee or author. Other providers\n\t// (Linear) ignore these and page purely off the cursor.\n\tscope?: 'assigned_to_me' | 'all';\n\tassigneeUsername?: string;\n\tauthorUsername?: string;\n\tpageSize?: number;\n\t/** Linear only (GitLab's REST read has its own `state`, not threaded here). Omitted reads open issues. */\n\tstates?: GitIssueState[];\n\t/** See {@link GetIssuesOptions.sort}. */\n\tsort?: IssueSorting;\n};\n\nexport type GetIssuesForCurrentUserFn = (\n\tinput: GetIssuesForCurrentUserInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderIssue[]; pageInfo?: PageInfo }>;\n\nexport type GetIssuesForRepoFn = (\n\tinput: GetIssuesForRepoInput & PagingInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderIssue[]; pageInfo?: PageInfo }>;\n\nexport type GetIssuesForAzureProjectFn = (\n\tinput: GetIssuesForAzureProjectInput & PagingInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderIssue[]; pageInfo?: PageInfo }>;\n\nexport type GetReposForAzureProjectFn = (\n\tinput: GetReposForAzureProjectInput & PagingInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderRepository[]; pageInfo?: PageInfo }>;\n\nexport type GetOrgsForCurrentUserFn = (\n\tinput?: CursorPageInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderGitHubOrganization[]; pageInfo?: PageInfo }>;\nexport type GetReposForOrgFn = (\n\tinput: { orgName: string } & PagingInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderRepository[]; pageInfo?: PageInfo }>;\nexport type GetReposForWorkspaceFn = (\n\tinput: { workspace: string } & PagingInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderRepository[]; pageInfo?: PageInfo }>;\nexport type GetReposForCurrentUserFn = (\n\t// `affiliations` narrows GitHub's `/user/repos` read (owner/collaborator/organization_member);\n\t// GitLab's equivalent read ignores it.\n\tinput: PagingInput & { affiliations?: ('owner' | 'collaborator' | 'organization_member')[] },\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderRepository[]; pageInfo?: PageInfo }>;\nexport type GetGroupsForCurrentUserFn = (\n\tinput?: { topLevelOnly?: boolean } & PagingInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderGitLabGroup[]; pageInfo?: PageInfo }>;\n\nexport type GetCurrentUserFn = (\n\tinput: Record<string, never>,\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderAccount }>;\nexport type GetCurrentUserForInstanceFn = (\n\tinput: { namespace: string },\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderAccount }>;\nexport type GetCurrentUserForResourceFn = (\n\tinput: { resourceId: string },\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderAccount }>;\n\nexport type GetJiraResourcesForCurrentUserFn = (options?: EnterpriseOptions) => Promise<{ data: JiraResource[] }>;\nexport type GetLinearOrganizationFn = (options?: EnterpriseOptions) => Promise<{ data: LinearOrganization }>;\nexport type GetLinearTeamsForCurrentUserFn = (options?: EnterpriseOptions) => Promise<{ data: LinearTeam[] }>;\n// Derived from the client method, like the Jira reads below, so a filter the SDK adds (`assignees`, `states`)\n// reaches the type system instead of being smuggled through `getPagedResult`'s `any`.\nexport type GetLinearIssuesFn = Linear['getIssues'];\n/**\n * Linear's current-user (viewer) query. Its raw `@linear/sdk` User isn't a `ProviderAccount` (no\n * username/avatar/url), so it's typed with the minimal fields the viewer query actually returns rather than\n * importing `@linear/sdk` (which is bundled in the SDK dist and not a resolvable top-level dependency).\n */\nexport type GetLinearCurrentUserFn = (\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: { id: string; name?: string | null; email?: string | null; displayName?: string | null } }>;\nexport type GetJiraProjectsForResourcesFn = (\n\tinput: { resourceIds: string[] },\n\toptions?: EnterpriseOptions,\n\t// Fan-out across resources: preserves successful resources' projects and reports per-resource failures in\n\t// SDK collection metadata instead of throwing when a single resource fails.\n) => Promise<{ data: JiraProject[]; metadata?: CollectionMetadata }>;\nexport type GetJiraProjectsForResourceFn = (\n\tinput: { resourceId: string } & CursorPageInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: JiraProject[]; pageInfo?: PageInfo; metadata?: CollectionMetadata }>;\nexport type GetGitLabPullRequestsForUserAssociationFn = (\n\tinput: {\n\t\tusername: string;\n\t\tassociation: 'assigned' | 'authored' | 'reviewRequested';\n\t\tincludeFromArchivedRepos?: boolean;\n\t\tlabelNames?: string[];\n\t\trepo?: ProviderRepoInput;\n\t\tstates?: GitPullRequestState[];\n\t\tpageSize?: number;\n\t} & CursorPageInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderPullRequest[]; pageInfo?: PageInfo }>;\nexport type GetAzureResourcesForUserFn = (\n\tinput: { userId: string },\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: AzureOrganization[] }>;\nexport type GetAzureProjectsForResourceFn = (\n\tinput: { namespace: string; cursor?: string },\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: AzureProject[]; pageInfo?: PageInfo }>;\nexport type GetBitbucketResourcesForCurrentUserFn = (\n\tinput: { page?: number },\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: BitbucketWorkspaceStub[]; pageInfo?: PageInfo }>;\nexport type GetBitbucketPullRequestsAuthoredByUserForWorkspaceFn = (\n\tinput: {\n\t\tuserId: string;\n\t\tworkspaceSlug: string;\n\t\tstates?: GitPullRequestState[];\n\t} & NumberedPageInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{\n\tpageInfo: {\n\t\thasNextPage: boolean;\n\t\tnextPage: number | null;\n\t};\n\tdata: GitPullRequest[];\n}>;\nexport type GetBitbucketServerPullRequestsForCurrentUserFn = (\n\tinput: { states?: GitPullRequestState[] } & NumberedPageInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{\n\tpageInfo: {\n\t\thasNextPage: boolean;\n\t\tnextPage: number | null;\n\t};\n\tdata: GitPullRequest[];\n}>;\n/**\n * One page of a Jira issue search; `nextCursor` is the raw provider cursor, fed back verbatim. `metadata` is the\n * SDK's: a page that dropped an issue it could not read reports it there as `partial` with a `provider` failure\n * (GKDEV-3652).\n */\nexport type JiraIssuePage =\n\t| { data: ProviderIssue[]; hasMore: boolean; nextCursor: string | undefined; metadata?: CollectionMetadata }\n\t| undefined;\n\nexport type GetIssuesForProjectFn = Jira['getIssuesForProject'];\n// Jira Server's own reads, derived from its client rather than shared with Cloud's: every one of them is\n// addressed by the instance's `baseUrl`/`resourceUrl` instead of Cloud's `resourceId`, and its project read is\n// a single unpaged call, so the shapes genuinely differ.\nexport type GetJiraServerCurrentUserFn = JiraServer['getCurrentUser'];\nexport type GetJiraServerProjectsFn = (options?: EnterpriseOptions) => Promise<{ data: JiraServerProject[] }>;\nexport type GetJiraServerIssuesForProjectFn = JiraServer['getIssuesForProject'];\nexport type GetJiraServerIssuesForProjectsFn = JiraServer['getIssuesForProjects'];\nexport type GetJiraServerIssueFn = JiraServer['getIssue'];\nexport type GetJiraServerIssuesForCurrentUserFn = JiraServer['getIssuesForResourceForCurrentUser'];\nexport type GetIssuesForProjectsFn = Jira['getIssuesForProjects'];\n// Derived from the client method rather than hand-declared, as its project-scoped sibling above already is: the\n// hand-written shape named only `resourceId`, so every other field the SDK accepts (the cursor, the sort, the\n// transitions switch) was invisible to the type system and had to be smuggled through `getPagedResult`'s `any`.\nexport type GetIssuesForResourceForCurrentUserFn = Jira['getIssuesForResourceForCurrentUser'];\n\n// Trello reads (issues-capable provider). The Trello client is keyed by an `appKey` (the Trello app key from\n// the cloud token exchange) alongside the OAuth token, so these mirror the client method shapes directly.\nexport type GetTrelloCurrentUserFn = Trello['getCurrentUser'];\nexport type GetTrelloBoardsForCurrentUserFn = Trello['getBoardsForCurrentUser'];\nexport type GetTrelloListsForBoardFn = Trello['getListsForTrelloBoard'];\nexport type GetTrelloAccountForIdFn = Trello['getAccountForId'];\nexport type GetTrelloIssuesForBoardFn = Trello['getIssuesForBoard'];\nexport type GetTrelloLabelsForBoardFn = Trello['getLabelsForBoard'];\n\nexport interface ProviderInfo extends ProviderMetadata {\n\tprovider: GitHub | GitLab | Bitbucket | BitbucketServer | Jira | JiraServer | Linear | Trello | AzureDevOps;\n\tgetRepoFn?: GetRepoFn;\n\tgetRepoOfProjectFn?: GetRepoOfProjectFn;\n\tgetPullRequestsForReposFn?: GetPullRequestsForReposFn;\n\tgetPullRequestsForRepoFn?: GetPullRequestsForRepoFn;\n\tgetPullRequestForRepoFn?: GetPullRequestForRepoFn;\n\tgetPullRequestsForUserFn?: GetPullRequestsForUserFn;\n\tgetGitLabPullRequestsForUserAssociationFn?: GetGitLabPullRequestsForUserAssociationFn;\n\tgetPullRequestsForAzureProjectsFn?: GetPullRequestsForAzureProjectsFn;\n\tgetPullRequestsForAzureProjectFn?: GetPullRequestsForAzureProjectFn;\n\tgetIssueFn?: GetIssueFn;\n\tgetIssuesForReposFn?: GetIssuesForReposFn;\n\tgetIssuesForCurrentUserFn?: GetIssuesForCurrentUserFn;\n\tgetIssuesForRepoFn?: GetIssuesForRepoFn;\n\tgetIssuesForAzureProjectFn?: GetIssuesForAzureProjectFn;\n\tgetCurrentUserFn?: GetCurrentUserFn;\n\tgetCurrentUserForInstanceFn?: GetCurrentUserForInstanceFn;\n\tgetCurrentUserForResourceFn?: GetCurrentUserForResourceFn;\n\tgetJiraResourcesForCurrentUserFn?: GetJiraResourcesForCurrentUserFn;\n\tgetLinearOrganizationFn?: GetLinearOrganizationFn;\n\tgetLinearTeamsForCurrentUserFn?: GetLinearTeamsForCurrentUserFn;\n\tgetLinearIssuesFn?: GetLinearIssuesFn;\n\tgetLinearCurrentUserFn?: GetLinearCurrentUserFn;\n\tgetAzureResourcesForUserFn?: GetAzureResourcesForUserFn;\n\tgetBitbucketResourcesForCurrentUserFn?: GetBitbucketResourcesForCurrentUserFn;\n\tgetBitbucketPullRequestsAuthoredByUserForWorkspaceFn?: GetBitbucketPullRequestsAuthoredByUserForWorkspaceFn;\n\tgetBitbucketServerPullRequestsForCurrentUserFn?: GetBitbucketServerPullRequestsForCurrentUserFn;\n\tgetJiraProjectsForResourcesFn?: GetJiraProjectsForResourcesFn;\n\tgetJiraServerCurrentUserFn?: GetJiraServerCurrentUserFn;\n\tgetJiraServerProjectsFn?: GetJiraServerProjectsFn;\n\tgetJiraServerIssuesForProjectFn?: GetJiraServerIssuesForProjectFn;\n\tgetJiraServerIssuesForProjectsFn?: GetJiraServerIssuesForProjectsFn;\n\tgetJiraServerIssueFn?: GetJiraServerIssueFn;\n\tgetJiraServerIssuesForCurrentUserFn?: GetJiraServerIssuesForCurrentUserFn;\n\tgetJiraProjectsForResourceFn?: GetJiraProjectsForResourceFn;\n\tgetAzureProjectsForResourceFn?: GetAzureProjectsForResourceFn;\n\tgetIssuesForProjectFn?: GetIssuesForProjectFn;\n\tgetIssuesForProjectsFn?: GetIssuesForProjectsFn;\n\tgetReposForAzureProjectFn?: GetReposForAzureProjectFn;\n\tgetIssuesForResourceForCurrentUserFn?: GetIssuesForResourceForCurrentUserFn;\n\tmergePullRequestFn?: MergePullRequestFn;\n\tgetOrgsForCurrentUserFn?: GetOrgsForCurrentUserFn;\n\tgetReposForOrgFn?: GetReposForOrgFn;\n\tgetReposForWorkspaceFn?: GetReposForWorkspaceFn;\n\tgetReposForCurrentUserFn?: GetReposForCurrentUserFn;\n\tgetGroupsForCurrentUserFn?: GetGroupsForCurrentUserFn;\n\tgetTrelloCurrentUserFn?: GetTrelloCurrentUserFn;\n\tgetTrelloBoardsForCurrentUserFn?: GetTrelloBoardsForCurrentUserFn;\n\tgetTrelloListsForBoardFn?: GetTrelloListsForBoardFn;\n\tgetTrelloAccountForIdFn?: GetTrelloAccountForIdFn;\n\tgetTrelloIssuesForBoardFn?: GetTrelloIssuesForBoardFn;\n\tgetTrelloLabelsForBoardFn?: GetTrelloLabelsForBoardFn;\n}\n\nexport interface ProviderMetadata {\n\tdomain: string;\n\tid: IntegrationIds;\n\tname: string;\n\ttype: IntegrationType;\n\t/** Key for the `gl-provider-<iconKey>` glicon. Cloud self-managed variants reuse the base\n\t * `'github-enterprise'`/`'gitlab-self-hosted'` icon (no enum member exists for those anymore). */\n\ticonKey: string;\n\tissuesPagingMode?: PagingMode;\n\tpullRequestsPagingMode?: PagingMode;\n\tscopes: string[];\n\tsupportedPullRequestFilters?: PullRequestFilter[];\n\t/**\n\t * Relationship filters the ACCOUNT-WIDE pull-request read can express as an exact OR union.\n\t * This is independent from `supportedPullRequestFilters`, which describes repo-scoped reads.\n\t */\n\tsupportedAccountWidePullRequestFilters?: PullRequestFilter[];\n\t/**\n\t * What the filtered pull-request search can express server-side. Absent means the provider has\n\t * no such search and the facade refuses it rather than returning an unfiltered page.\n\t */\n\tsupportedPullRequestSearch?: PullRequestSearchCapabilities;\n\t/**\n\t * Maximum results the provider will serve for one pull-request search facet. Matches beyond it are unreachable\n\t * and are reported as a succeeded omission carrying this limit plus the provider's pre-ceiling facet count.\n\t */\n\tpullRequestSearchResultLimit?: number;\n\t/** Filters the REPO-scoped issue read can express. */\n\tsupportedIssueFilters?: IssueFilter[];\n\t/**\n\t * Filters the ACCOUNT-WIDE issue read can express, which is NOT the same set as\n\t * {@link ProviderMetadata.supportedIssueFilters}: the two reads are different provider queries.\n\t *\n\t * Unfiltered, each provider's account-wide read is that provider's own definition of \"my issues\" — GitHub/GHE\n\t * union authored + assigned + mentioned, Azure drains assigned + authored, and GitLab reads assigned-to-me.\n\t * A consumer replacing a narrower tool (`gk`'s `assignee:@me`) must select the `Assignee` filter wherever the\n\t * provider's default is wider.\n\t *\n\t * A filter listed here narrows that read server-side. Absent/empty means the read can't be narrowed at all,\n\t * so the facade refuses a filtered request rather than serving the unnarrowed union as if it had been\n\t * filtered. GitLab lists `Assignee` and `Author` because the SDK's account-wide input exposes both username\n\t * axes; it omits `Mention` because that REST read has no first-class mention filter.\n\t */\n\tsupportedAccountWideIssueFilters?: IssueFilter[];\n\t/**\n\t * Sort keys the REPO-scoped issue read can express server-side — and, for an issue tracker (Jira/Linear/Trello),\n\t * its project-scoped read, which is the only issue surface a tracker has.\n\t *\n\t * Absent/empty means the read can't be ordered at all, so a request carrying `sort` is refused rather than\n\t * served in whatever order the provider felt like. Present, it is a promise: every key here reaches the\n\t * provider query.\n\t *\n\t * A key listed here is expressible on ONE provider query, which is what this read is when it is given ONE\n\t * scope. Given several (GitLab across repositories, Azure across projects, a tracker across projects) it merges\n\t * their results here and can only honor a key a normalized issue carries, so it additionally refuses\n\t * `priority`/`dueDate`/`resolved` — see `getIssueComparator`. That depends on the caller's scope count rather\n\t * than on the provider, which is why it is a runtime refusal and not a fourth table: encoding it here would\n\t * under-report the single-scope read, which really does support those keys.\n\t */\n\tsupportedIssueSorts?: IssueSorting[];\n\t/**\n\t * Sort keys the ACCOUNT-WIDE issue read can express server-side, which is NOT the same set as\n\t * {@link ProviderMetadata.supportedIssueSorts} — for GitLab the two reads are different APIs (GraphQL vs REST)\n\t * with genuinely different vocabularies, not one narrowed twice.\n\t *\n\t * Absent means the account-wide read can't be ordered (or doesn't exist). An issue tracker leaves this empty\n\t * and reports under `supportedIssueSorts`, so reading a tracker's capability from here under-reports it.\n\t *\n\t * Unlike {@link ProviderMetadata.supportedIssueSorts} this needs no companion runtime refusal, because every\n\t * provider's account-wide read is a union of several queries with no scope count for a caller to reduce: it\n\t * ALWAYS merges. So the keys a merge can't order by are simply absent here — the table states what the read can\n\t * honor, which is what makes intersecting against it sufficient.\n\t */\n\tsupportedAccountWideIssueSorts?: IssueSorting[];\n\t/**\n\t * Whether issue list reads (including Azure project/repository and account-wide reads) can be asked for a `state` other than open, and honor it server-side.\n\t *\n\t * A tracker read is open-only unless asked otherwise, so absent does not mean the read returns every state: it\n\t * means only `'open'` is expressible, and `'closed'`/`'all'` are refused rather than served as the open list.\n\t * Server-side, because each read drains to a page backstop: dropping states afterwards would let a project full\n\t * of done work spend that budget before reaching the open issues.\n\t */\n\tsupportsIssueStates?: boolean;\n\t/**\n\t * What the provider's FILTERED issue search (`searchIssuesPage`, and the `countIssues` probe over the same\n\t * criteria) can express server-side. A third, wider surface than either filter set above: it is not bound to\n\t * the user at all, so it takes relationships those reads have no way to name (`any-assignee`, `unassigned`),\n\t * plus free text and issue attributes.\n\t *\n\t * Absent means the provider has NO filtered issue search and the read is refused. Present, it is a promise:\n\t * every field declared here reaches the provider query, so a consumer that intersects against it never has a\n\t * read refused, and a criterion is never silently ignored.\n\t */\n\tsupportedIssueSearch?: IssueSearchCapabilities;\n\t/**\n\t * The maximum number of results the provider's filtered issue search will serve for ONE query, however it is\n\t * paged. Matches past it are UNREACHABLE, not merely unfetched, which is why a read that hits this reports an\n\t * omission with `recovery: 'none'` and the total match count rather than offering a \"load more\".\n\t *\n\t * Absent means the provider declares no ceiling, in which case a truncated read falls back to generic wording\n\t * instead of quoting a limit that was never published.\n\t */\n\tissueSearchResultLimit?: number;\n\t/**\n\t * Whether the filtered searches reach the provider with scope names verbatim — as encoded URL segments, or\n\t * matched against the names discovery reported — rather than inside a query string the provider sanitizes.\n\t *\n\t * Relaxes the scope-name rule (`isUsableSearchScopeName`) for that provider to refuse only blank names and\n\t * control characters: a space or a quote can't split or alter a scope that is never parsed as a query, and\n\t * refusing them would refuse real names. Absent for a query-string search (GitHub's), where both do.\n\t */\n\texactSearchScopeNames?: boolean;\n}\n\nexport type Providers = Record<IntegrationIds, ProviderInfo>;\nexport type ProvidersMetadata = Record<IntegrationIds, ProviderMetadata>;\n\n/**\n * GitHub and GitHub Enterprise express every criterion as a search qualifier on the same GraphQL `search` field,\n * so the two share one declaration — a GHE instance running the same search syntax has the same capability, and\n * two copies of this table would be free to drift.\n *\n * Every entry is a claim the implementation must keep: `searchIssuesPage` emits a qualifier for each of these,\n * and a test asserts that (see the `issueSearch` capability tests) so the table can't quietly outrun the code.\n */\nconst githubIssueSearchCapabilities: IssueSearchCapabilities = {\n\t// `author:@me` / `assignee:@me` / `mentions:@me` / `assignee:*` / `no:assignee`, each its own aliased search.\n\trelationships: ['authored', 'assigned', 'mentioned', 'any-assignee', 'unassigned'],\n\ttext: true,\n\tlabels: true,\n\tmilestone: true,\n\tupdatedAfter: true,\n\tcreatedAfter: true,\n\t// `-linked:pr`.\n\twithoutLinkedPullRequest: true,\n\t// `is:open` / `is:closed`, or neither for all states.\n\tstates: true,\n\t// `sort:created-desc`, `sort:updated`, `sort:comments-asc`, … — see `githubIssueSorts`.\n\tsorts: githubIssueSorts,\n};\n\n/**\n * The ordering vocabulary of GitHub's filtered PR search: `created` and `updated`, both directions.\n *\n * Hand-declared rather than derived from `@gitkraken/provider-apis` (which has no PR-sort surface), and narrower\n * than the issue set on purpose: the merged relationship × state facets can only be re-ordered by a field a\n * `PullRequestShape` carries (see `getPullRequestComparator`), and GitHub PRs have no priority and no relevance\n * that orders stably under the result ceiling. A parity test pins this to `gitHubPullRequestSortQualifiers`' keys\n * so the capability can't outrun the emitter.\n */\nconst githubPullRequestSorts: PullRequestSorting[] = ['updated:desc', 'updated:asc', 'created:desc', 'created:asc'];\n\n/** GitHub and GHE use the same filtered pull-request search syntax and result ceiling. */\nconst githubPullRequestSearchCapabilities: PullRequestSearchCapabilities = {\n\trelationships: [\n\t\tPullRequestFilter.Author,\n\t\tPullRequestFilter.Assignee,\n\t\tPullRequestFilter.ReviewRequested,\n\t\tPullRequestFilter.Reviewed,\n\t\tPullRequestFilter.Mention,\n\t],\n\tstates: ['open', 'closed', 'merged', 'all'],\n\ttext: true,\n\tupdatedAfter: true,\n\tcreatedAfter: true,\n\tincludeArchived: true,\n\tdraft: true,\n\trepositoryScope: true,\n\torganizationScope: true,\n\t// `sort:updated`, `sort:updated-asc`, `sort:created-desc`, `sort:created-asc` — see `githubPullRequestSorts`.\n\tsorts: githubPullRequestSorts,\n};\n\n/**\n * Bitbucket Data Center's filtered pull-request search (`bitbucket-server/pullRequestSearch.ts`), declared from what\n * its REST API can express rather than from what a PR shape carries:\n * - relationships: `role=AUTHOR`, and a reviewer's `UNAPPROVED` status for a pending review versus `APPROVED` or\n * `NEEDS_WORK` for one already given. A Bitbucket pull request has no assignee, and nothing filters by mention.\n * - text is `filterText` (title or description), draft is `draft`, and archived repositories are excluded unless\n * asked for — all re-checked on each row, since the dashboard read has neither filter.\n * - no date filters and no `created` ordering: `order` is only `NEWEST`/`OLDEST` by last update, and filtering a\n * date on the rows read would page through everything before it.\n * - no organization scope: there is no project-wide pull-request list, only per repository and the dashboard.\n */\nconst bitbucketServerPullRequestSearchCapabilities: PullRequestSearchCapabilities = {\n\trelationships: [PullRequestFilter.Author, PullRequestFilter.ReviewRequested, PullRequestFilter.Reviewed],\n\tstates: ['open', 'closed', 'merged', 'all'],\n\ttext: true,\n\tupdatedAfter: false,\n\tcreatedAfter: false,\n\tincludeArchived: true,\n\tdraft: true,\n\trepositoryScope: true,\n\torganizationScope: false,\n\tsorts: ['updated:desc', 'updated:asc'],\n};\n\n/**\n * Azure DevOps Server's filtered pull-request search. Azure's pull request query narrows only by creator, reviewer,\n * status and repository, so the provider drains each facet and applies text, draft and dates to the complete facet\n * before merging — so a criterion never narrows a page after its count, and the only sort keys are the two a merged\n * page can be re-ordered by. What text and `updatedAfter` match is bounded by the list endpoint: see\n * `toAzurePullRequestSearchFilter`.\n *\n * `Assignee` and `ReviewRequested` both read by reviewer: Azure has no assignee distinct from its reviewers.\n * `Reviewed` and `Mention` are absent because the pull request query has no axis for either, and `includeArchived`\n * because Azure has no archived repositories to exclude.\n */\nconst azureServerPullRequestSearchCapabilities: PullRequestSearchCapabilities = {\n\trelationships: [PullRequestFilter.Author, PullRequestFilter.Assignee, PullRequestFilter.ReviewRequested],\n\tstates: ['open', 'closed', 'merged', 'all'],\n\ttext: true,\n\tupdatedAfter: true,\n\tcreatedAfter: true,\n\tincludeArchived: false,\n\tdraft: true,\n\trepositoryScope: true,\n\torganizationScope: true,\n\tsorts: azurePullRequestSearchSorts,\n};\n\n/**\n * Azure DevOps Server's filtered work-item search: one WIQL query per collection, every criterion a clause of it.\n * `mentioned` is absent because `@RecentMentions` only reaches back 30 days; `milestone` and\n * `withoutLinkedPullRequest` because WIQL has no flat-query clause for either. See `azure/search.ts`.\n */\nconst azureServerIssueSearchCapabilities: IssueSearchCapabilities = {\n\trelationships: azureWorkItemSearchRelationships,\n\ttext: true,\n\tlabels: true,\n\tmilestone: false,\n\tupdatedAfter: true,\n\tcreatedAfter: true,\n\twithoutLinkedPullRequest: false,\n\tstates: true,\n\tsorts: azureWorkItemSearchSorts,\n};\n\nexport const providersMetadata: ProvidersMetadata = {\n\t[GitCloudHostIntegrationId.GitHub]: {\n\t\tdomain: 'github.com',\n\t\tid: GitCloudHostIntegrationId.GitHub,\n\t\tname: 'GitHub',\n\t\ttype: 'git',\n\t\ticonKey: GitCloudHostIntegrationId.GitHub,\n\t\tissuesPagingMode: PagingMode.Repos,\n\t\tpullRequestsPagingMode: PagingMode.Repos,\n\t\t// Use 'username' property on account for PR filters\n\t\tsupportedPullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t\tPullRequestFilter.Mention,\n\t\t],\n\t\tsupportedAccountWidePullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t\tPullRequestFilter.Reviewed,\n\t\t\tPullRequestFilter.Mention,\n\t\t],\n\t\tsupportedPullRequestSearch: githubPullRequestSearchCapabilities,\n\t\tpullRequestSearchResultLimit: githubSearchResultLimit,\n\t\t// Use 'username' property on account for issue filters\n\t\tsupportedIssueFilters: [IssueFilter.Author, IssueFilter.Assignee, IssueFilter.Mention],\n\t\t// The account-wide read is three independent searches (`author:@me`, `assignee:@me`, `mentions:@me`) behind\n\t\t// one composite cursor, so any subset of them is expressible.\n\t\tsupportedAccountWideIssueFilters: [IssueFilter.Author, IssueFilter.Assignee, IssueFilter.Mention],\n\t\t// One `search` field serves all three issue reads (repo-scoped, account-wide, filtered search), so the same\n\t\t// qualifiers are expressible on each — the account-wide one narrowed to what its three-alias merge can order.\n\t\tsupportedIssueSorts: githubIssueSorts,\n\t\tsupportedAccountWideIssueSorts: githubAccountWideIssueSorts,\n\t\tsupportedIssueSearch: githubIssueSearchCapabilities,\n\t\tissueSearchResultLimit: githubSearchResultLimit,\n\t\tscopes: ['repo', 'read:user', 'user:email'],\n\t},\n\t[GitSelfManagedHostIntegrationId.CloudGitHubEnterprise]: {\n\t\tdomain: '',\n\t\tid: GitSelfManagedHostIntegrationId.CloudGitHubEnterprise,\n\t\tname: 'GitHub Enterprise',\n\t\ttype: 'git',\n\t\ticonKey: 'github-enterprise',\n\t\tissuesPagingMode: PagingMode.Repos,\n\t\tpullRequestsPagingMode: PagingMode.Repos,\n\t\t// Use 'username' property on account for PR filters\n\t\tsupportedPullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t\tPullRequestFilter.Mention,\n\t\t],\n\t\tsupportedAccountWidePullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t\tPullRequestFilter.Reviewed,\n\t\t\tPullRequestFilter.Mention,\n\t\t],\n\t\tsupportedPullRequestSearch: githubPullRequestSearchCapabilities,\n\t\tpullRequestSearchResultLimit: githubSearchResultLimit,\n\t\t// Use 'username' property on account for issue filters\n\t\tsupportedIssueFilters: [IssueFilter.Author, IssueFilter.Assignee, IssueFilter.Mention],\n\t\t// The account-wide read is three independent searches (`author:@me`, `assignee:@me`, `mentions:@me`) behind\n\t\t// one composite cursor, so any subset of them is expressible.\n\t\tsupportedAccountWideIssueFilters: [IssueFilter.Author, IssueFilter.Assignee, IssueFilter.Mention],\n\t\t// One `search` field serves all three issue reads (repo-scoped, account-wide, filtered search), so the same\n\t\t// qualifiers are expressible on each — the account-wide one narrowed to what its three-alias merge can order.\n\t\tsupportedIssueSorts: githubIssueSorts,\n\t\tsupportedAccountWideIssueSorts: githubAccountWideIssueSorts,\n\t\tsupportedIssueSearch: githubIssueSearchCapabilities,\n\t\tissueSearchResultLimit: githubSearchResultLimit,\n\t\tscopes: ['repo', 'read:user', 'user:email'],\n\t},\n\t[GitCloudHostIntegrationId.GitLab]: {\n\t\tdomain: 'gitlab.com',\n\t\tid: GitCloudHostIntegrationId.GitLab,\n\t\tname: 'GitLab',\n\t\ttype: 'git',\n\t\ticonKey: GitCloudHostIntegrationId.GitLab,\n\t\tissuesPagingMode: PagingMode.Repo,\n\t\tpullRequestsPagingMode: PagingMode.Repo,\n\t\t// Use 'username' property on account for PR filters\n\t\tsupportedPullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t],\n\t\tsupportedAccountWidePullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t],\n\t\t// Use 'username' property on account for issue filters\n\t\tsupportedIssueFilters: [IssueFilter.Author, IssueFilter.Assignee],\n\t\t// The account-wide read drains one `scope=assigned_to_me` pass and one `scope=all` + `authorUsername` pass,\n\t\t// unioned, so either axis is expressible on its own. Mention is absent because GitLab's REST issue read has\n\t\t// no first-class mention filter to narrow with.\n\t\tsupportedAccountWideIssueFilters: [IssueFilter.Assignee, IssueFilter.Author],\n\t\t// Two different surfaces, not one narrowed twice: the repository-scoped read is GraphQL and the\n\t\t// account-wide one is REST, and REST has neither `title` nor `closed_at`.\n\t\tsupportedIssueSorts: gitlabIssueSorts,\n\t\tsupportedAccountWideIssueSorts: gitlabAccountWideIssueSorts,\n\t\tscopes: ['api', 'read_user', 'read_repository'],\n\t},\n\t[GitSelfManagedHostIntegrationId.CloudGitLabSelfHosted]: {\n\t\tdomain: '',\n\t\tid: GitSelfManagedHostIntegrationId.CloudGitLabSelfHosted,\n\t\tname: 'GitLab Self-Hosted',\n\t\ttype: 'git',\n\t\ticonKey: 'gitlab-self-hosted',\n\t\tissuesPagingMode: PagingMode.Repo,\n\t\tpullRequestsPagingMode: PagingMode.Repo,\n\t\t// Use 'username' property on account for PR filters\n\t\tsupportedPullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t],\n\t\tsupportedAccountWidePullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t],\n\t\t// Use 'username' property on account for issue filters\n\t\tsupportedIssueFilters: [IssueFilter.Author, IssueFilter.Assignee],\n\t\t// The account-wide read drains one `scope=assigned_to_me` pass and one `scope=all` + `authorUsername` pass,\n\t\t// unioned, so either axis is expressible on its own. Mention is absent because GitLab's REST issue read has\n\t\t// no first-class mention filter to narrow with.\n\t\tsupportedAccountWideIssueFilters: [IssueFilter.Assignee, IssueFilter.Author],\n\t\t// Two different surfaces, not one narrowed twice: the repository-scoped read is GraphQL and the\n\t\t// account-wide one is REST, and REST has neither `title` nor `closed_at`.\n\t\tsupportedIssueSorts: gitlabIssueSorts,\n\t\tsupportedAccountWideIssueSorts: gitlabAccountWideIssueSorts,\n\t\tscopes: ['api', 'read_user', 'read_repository'],\n\t},\n\t[GitCloudHostIntegrationId.Bitbucket]: {\n\t\tdomain: 'bitbucket.org',\n\t\tid: GitCloudHostIntegrationId.Bitbucket,\n\t\tname: 'Bitbucket',\n\t\ttype: 'git',\n\t\ticonKey: GitCloudHostIntegrationId.Bitbucket,\n\t\tpullRequestsPagingMode: PagingMode.Repo,\n\t\t// Use 'id' property on account for PR filters (reviewer filter keyed by account id / reviewerId)\n\t\tsupportedPullRequestFilters: [PullRequestFilter.Author, PullRequestFilter.ReviewRequested],\n\t\tsupportedAccountWidePullRequestFilters: [PullRequestFilter.Author, PullRequestFilter.ReviewRequested],\n\t\tscopes: ['account:read', 'repository:read', 'pullrequest:read', 'issue:read'],\n\t},\n\t[GitSelfManagedHostIntegrationId.BitbucketServer]: {\n\t\tdomain: '',\n\t\tid: GitSelfManagedHostIntegrationId.BitbucketServer,\n\t\tname: 'Bitbucket Data Center',\n\t\ttype: 'git',\n\t\ticonKey: GitSelfManagedHostIntegrationId.BitbucketServer,\n\t\tsupportedPullRequestFilters: [PullRequestFilter.Author, PullRequestFilter.ReviewRequested],\n\t\tsupportedAccountWidePullRequestFilters: [PullRequestFilter.Author, PullRequestFilter.ReviewRequested],\n\t\tsupportedPullRequestSearch: bitbucketServerPullRequestSearchCapabilities,\n\t\t// No `pullRequestSearchResultLimit`: nothing caps how far a search pages.\n\t\tscopes: ['Project (Read)', 'Repository (Write)'],\n\t},\n\t[GitCloudHostIntegrationId.AzureDevOps]: {\n\t\tsupportsIssueStates: true,\n\t\tdomain: 'dev.azure.com',\n\t\tid: GitCloudHostIntegrationId.AzureDevOps,\n\t\tname: 'Azure DevOps',\n\t\ttype: 'git',\n\t\ticonKey: GitCloudHostIntegrationId.AzureDevOps,\n\t\tissuesPagingMode: PagingMode.Project,\n\t\tpullRequestsPagingMode: PagingMode.Repo,\n\t\t// Use 'id' property on account for PR filters (reviewer filter keyed by account id / reviewerId)\n\t\tsupportedPullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t],\n\t\tsupportedAccountWidePullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t],\n\t\t// Use 'name' property on account for issue filters\n\t\tsupportedIssueFilters: [IssueFilter.Author, IssueFilter.Assignee, IssueFilter.Mention],\n\t\t// The account-wide read drains one (project × assignee) and one (project × author) query per project, so\n\t\t// either axis is expressible on its own. There is no mention query to narrow to.\n\t\tsupportedAccountWideIssueFilters: [IssueFilter.Author, IssueFilter.Assignee],\n\t\t// Both reads emit the same WIQL, but the account-wide one drains every (project x relationship) query and\n\t\t// merges the results, so it can only honor keys a normalized issue carries — `resolved` and `priority` are\n\t\t// dropped from that surface for the same reason they are dropped from GitLab's.\n\t\tsupportedIssueSorts: azureIssueSorts,\n\t\tsupportedAccountWideIssueSorts: azureAccountWideIssueSorts,\n\t\tscopes: ['vso.code', 'vso.identity', 'vso.project', 'vso.profile', 'vso.work'],\n\t},\n\t[GitSelfManagedHostIntegrationId.AzureDevOpsServer]: {\n\t\tsupportsIssueStates: true,\n\t\tdomain: '',\n\t\tid: GitSelfManagedHostIntegrationId.AzureDevOpsServer,\n\t\tname: 'Azure DevOps Server',\n\t\ttype: 'git',\n\t\ticonKey: GitCloudHostIntegrationId.AzureDevOps,\n\t\tissuesPagingMode: PagingMode.Project,\n\t\tpullRequestsPagingMode: PagingMode.Repo,\n\t\t// Use 'id' property on account for PR filters (reviewer filter keyed by account id / reviewerId)\n\t\tsupportedPullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t],\n\t\tsupportedAccountWidePullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t],\n\t\t// Use 'name' property on account for issue filters\n\t\tsupportedIssueFilters: [IssueFilter.Author, IssueFilter.Assignee, IssueFilter.Mention],\n\t\t// The account-wide read drains one (project × assignee) and one (project × author) query per project, so\n\t\t// either axis is expressible on its own. There is no mention query to narrow to.\n\t\tsupportedAccountWideIssueFilters: [IssueFilter.Author, IssueFilter.Assignee],\n\t\t// Both reads emit the same WIQL, but the account-wide one drains every (project x relationship) query and\n\t\t// merges the results, so it can only honor keys a normalized issue carries — `resolved` and `priority` are\n\t\t// dropped from that surface for the same reason they are dropped from GitLab's.\n\t\tsupportedIssueSorts: azureIssueSorts,\n\t\tsupportedAccountWideIssueSorts: azureAccountWideIssueSorts,\n\t\tsupportedPullRequestSearch: azureServerPullRequestSearchCapabilities,\n\t\tsupportedIssueSearch: azureServerIssueSearchCapabilities,\n\t\tissueSearchResultLimit: azureWorkItemSearchResultLimit,\n\t\texactSearchScopeNames: true,\n\t\tscopes: ['vso.code', 'vso.identity', 'vso.project', 'vso.profile', 'vso.work'],\n\t},\n\t[IssuesCloudHostIntegrationId.Jira]: {\n\t\tdomain: 'atlassian.net',\n\t\tid: IssuesCloudHostIntegrationId.Jira,\n\t\tname: 'Jira',\n\t\ttype: 'issues',\n\t\ticonKey: IssuesCloudHostIntegrationId.Jira,\n\t\tscopes: [\n\t\t\t'read:status:jira',\n\t\t\t'read:application-role:jira',\n\t\t\t'read:attachment:jira',\n\t\t\t'write:attachment:jira',\n\t\t\t'read:comment:jira',\n\t\t\t'read:project-category:jira',\n\t\t\t'read:project:jira',\n\t\t\t'read:issue.vote:jira',\n\t\t\t'read:field-configuration:jira',\n\t\t\t'write:issue:jira',\n\t\t\t'read:issue-security-level:jira',\n\t\t\t'write:issue.property:jira',\n\t\t\t'read:issue.changelog:jira',\n\t\t\t'read:avatar:jira',\n\t\t\t'read:issue-meta:jira',\n\t\t\t'read:permission:jira',\n\t\t\t'offline_access',\n\t\t\t'read:issue:jira',\n\t\t\t'read:me',\n\t\t\t'read:audit-log:jira',\n\t\t\t'read:project.component:jira',\n\t\t\t'read:group:jira',\n\t\t\t'read:project-role:jira',\n\t\t\t'write:comment:jira',\n\t\t\t'read:label:jira',\n\t\t\t'write:comment.property:jira',\n\t\t\t'read:issue-details:jira',\n\t\t\t'read:issue-type-hierarchy:jira',\n\t\t\t'read:issue.transition:jira',\n\t\t\t'read:user:jira',\n\t\t\t'read:field:jira',\n\t\t\t'read:issue-type:jira',\n\t\t\t'read:project.property:jira',\n\t\t\t'read:comment.property:jira',\n\t\t\t'read:project-version:jira',\n\t\t],\n\t\tsupportedIssueFilters: [IssueFilter.Author, IssueFilter.Assignee, IssueFilter.Mention],\n\t\t// A tracker's issues live under resource -> project, so it has no account-wide surface to declare: its\n\t\t// capability is reported under `issues`, which is what `listIssueTrackerIssuesPage` validates against.\n\t\tsupportedIssueSorts: jiraIssueSorts,\n\t\t// `statusCategory` clauses in the same JQL, shared with Server through `jiraHelpers`.\n\t\tsupportsIssueStates: true,\n\t},\n\t[IssuesSelfManagedHostIntegrationId.JiraServer]: {\n\t\t// Self-hosted: there is no canonical domain, so every read is addressed by the connection's own host\n\t\t// (see `JiraServerIntegration.apiBaseUrl`), exactly as the self-managed git hosts do.\n\t\tdomain: '',\n\t\tid: IssuesSelfManagedHostIntegrationId.JiraServer,\n\t\tname: 'Jira Data Center',\n\t\ttype: 'issues',\n\t\t// Reuses Jira's glicon: it is the same product, and the id only selects an icon.\n\t\ticonKey: IssuesCloudHostIntegrationId.Jira,\n\t\t// Jira Cloud's entries are Atlassian OAuth scope strings, which a self-hosted instance doesn't issue:\n\t\t// its token is a PAT the backend stores as-is, so there is no scope set to request.\n\t\tscopes: [],\n\t\t// The same JQL clauses Cloud narrows with — `jiraHelpers` builds one query for both.\n\t\tsupportedIssueFilters: [IssueFilter.Author, IssueFilter.Assignee, IssueFilter.Mention],\n\t\t// One JQL `ORDER BY` builder serves Cloud and Server, so they share a surface (see `issueSorts.ts`).\n\t\tsupportedIssueSorts: jiraIssueSorts,\n\t\tsupportsIssueStates: true,\n\t},\n\t[IssuesCloudHostIntegrationId.Linear]: {\n\t\tdomain: 'linear.app',\n\t\tid: IssuesCloudHostIntegrationId.Linear,\n\t\tname: 'Linear',\n\t\ttype: 'issues',\n\t\ticonKey: IssuesCloudHostIntegrationId.Linear,\n\t\tscopes: [],\n\t\t// Linear scopes \"my issues\" client-side by the viewer's assignee id; author/mention aren't supported.\n\t\tsupportedIssueFilters: [IssueFilter.Assignee],\n\t\t// Both directions, and one table for both reads: they are the same root `issues` query taking the same\n\t\t// `sort` argument, so there is no account-wide narrowing to declare.\n\t\tsupportedIssueSorts: linearIssueSorts,\n\t\t// A workflow-state type clause on both reads (`completed`/`canceled`/`duplicate` are closed), the same types\n\t\t// the SDK normalizes to a terminal category (`DONE`, or `CANCELED` for the last two).\n\t\tsupportsIssueStates: true,\n\t},\n\t[IssuesCloudHostIntegrationId.Trello]: {\n\t\tdomain: 'trello.com',\n\t\tid: IssuesCloudHostIntegrationId.Trello,\n\t\tname: 'Trello',\n\t\ttype: 'issues',\n\t\ticonKey: IssuesCloudHostIntegrationId.Trello,\n\t\tscopes: [],\n\t\t// Trello cards are filtered by the assignee (member) only; author/mention have no Trello equivalent.\n\t\tsupportedIssueFilters: [IssueFilter.Assignee],\n\t\t// `sort:edited` / `sort:-edited`. Trello's other search sorts (`created`, `due`) have no card-order effect.\n\t\tsupportedIssueSorts: trelloIssueSorts,\n\t\t// No `supportsIssueStates`: a card has no state beyond being archived, and the board read always sends\n\t\t// `-is:archived`, so `'closed'`/`'all'` are refused rather than answered with the open cards.\n\t},\n};\n\nexport function getReasonsForUserIssue(issue: ProviderIssue, userLogin: string): string[] {\n\tconst reasons: string[] = [];\n\tlet isAuthor = false;\n\tlet isAssignee = false;\n\tif (issue.author?.username === userLogin || issue.author?.name === userLogin) {\n\t\treasons.push('authored');\n\t\tisAuthor = true;\n\t}\n\tif (issue.assignees?.some(assignee => assignee.username === userLogin || assignee.name === userLogin)) {\n\t\treasons.push('assigned');\n\t\tisAssignee = true;\n\t}\n\n\t// TODO: Impossible to denote all issues we are mentioned on given their properties. for now just\n\t// assume we are mentioned on any of our issues we are not the author or assignee on\n\tif (!isAuthor && !isAssignee) {\n\t\treasons.push('mentioned');\n\t}\n\n\treturn reasons;\n}\n\nfunction toIssueIdentifier(value: string | number): string {\n\treturn String(value);\n}\n\nfunction toIssueProviderState(state: ProviderIssue['state']): IssueProviderState | undefined {\n\treturn state == null\n\t\t? undefined\n\t\t: {\n\t\t\t\tid: state.id,\n\t\t\t\tname: state.name,\n\t\t\t\tcolor: state.color ?? undefined,\n\t\t\t\tcategory: state.category,\n\t\t\t};\n}\n\nfunction getProviderIssueState(issue: ProviderIssue, providerId: ProviderReference['id']): IssueShape['state'] {\n\tconst category = issue.state?.category;\n\tif (\n\t\tproviderId === GitCloudHostIntegrationId.AzureDevOps ||\n\t\tproviderId === GitSelfManagedHostIntegrationId.AzureDevOpsServer\n\t) {\n\t\tif (category != null) return isTerminalIssueStateCategory(category) ? 'closed' : 'opened';\n\n\t\treturn issue.closedDate != null ? 'closed' : undefined;\n\t}\n\n\treturn issue.closedDate != null || isTerminalIssueStateCategory(category) ? 'closed' : 'opened';\n}\n\nexport function toIssueShape(\n\tissue: ProviderIssue,\n\tprovider: ProviderReference,\n\toptions?: { projection?: IssueProjection; viewer?: { id: string } },\n): IssueShape | undefined {\n\t// TODO: Add some protections/baselines rather than killing the transformation here\n\t// `author` is intentionally not required: some providers have no per-item creator (e.g. Trello cards,\n\t// which the SDK maps with `author: null`), and dropping every such item would discard the whole board.\n\t// Fall back to an empty author instead so these issues still surface.\n\tif (issue.updatedDate == null || issue.url == null) return undefined;\n\n\tconst state = getProviderIssueState(issue, provider.id);\n\n\treturn {\n\t\ttype: 'issue',\n\t\tprovider: provider,\n\t\t// `id` is the provider's display number/key (GitHub number, Jira/Linear key, Trello idShort), NOT a\n\t\t// globally-unique id: it's rendered to users as `#{id}`, used to build branch names, and passed back\n\t\t// to the provider as the `getIssue`/cache lookup key, all of which expect the number. `nodeId` is the\n\t\t// provider-native stable id, but its uniqueness scope is provider-specific (Azure work-item ids are\n\t\t// organization-scoped), so cross-scope consumers must include provider/domain/container identity too.\n\t\t// provider-apis declares this as a string, but some providers (notably\n\t\t// Azure's broadened work-item path) return a number at runtime. Keep the\n\t\t// public IssueShape contract truthful for consumers that use string APIs.\n\t\tid: toIssueIdentifier(issue.number),\n\t\tnodeId: issue.graphQLId ?? issue.id,\n\t\ttitle: issue.title,\n\t\turl: issue.url,\n\t\tcreatedDate: issue.createdDate,\n\t\tupdatedDate: issue.updatedDate,\n\t\tclosedDate: issue.closedDate ?? undefined,\n\t\tclosed: state === 'closed',\n\t\tstate: state,\n\t\tproviderState: toIssueProviderState(issue.state),\n\t\tauthor: {\n\t\t\tid: issue.author?.id ?? '',\n\t\t\t// An absent name stays absent, matching {@link fromProviderAccount}; see `IssueMember.name`.\n\t\t\tname: issue.author?.name ?? undefined,\n\t\t\tavatarUrl: issue.author?.avatarUrl ?? undefined,\n\t\t\turl: issue.author?.url ?? undefined,\n\t\t},\n\t\tassignees:\n\t\t\tissue.assignees?.map(assignee => ({\n\t\t\t\tid: assignee.id ?? '',\n\t\t\t\tname: assignee.name ?? undefined,\n\t\t\t\tavatarUrl: assignee.avatarUrl ?? undefined,\n\t\t\t\turl: assignee.url ?? undefined,\n\t\t\t})) ?? [],\n\t\tproject:\n\t\t\tissue.project?.id && issue.project.resourceId && issue.project.namespace\n\t\t\t\t? {\n\t\t\t\t\t\tid: issue.project.id,\n\t\t\t\t\t\tname: issue.project.name,\n\t\t\t\t\t\tresourceId: issue.project.resourceId,\n\t\t\t\t\t\tresourceName: issue.project.namespace,\n\t\t\t\t\t}\n\t\t\t\t: undefined,\n\t\trepository:\n\t\t\tissue.repository?.owner?.login != null\n\t\t\t\t? {\n\t\t\t\t\t\towner: issue.repository.owner.login,\n\t\t\t\t\t\trepo: issue.repository.name,\n\t\t\t\t\t\t// provider-apis sends `''` for an id it doesn't know.\n\t\t\t\t\t\tid: issue.repository.id || undefined,\n\t\t\t\t\t}\n\t\t\t\t: undefined,\n\t\tlabels: issue.labels.map(label => ({ color: label.color ?? undefined, name: label.name })),\n\t\tcommentsCount: issue.commentCount ?? undefined,\n\t\tthumbsUpCount: issue.upvoteCount ?? undefined,\n\t\tbody: issue.description ?? undefined,\n\t\t// Both Jira flavors return `/rest/api/2` wiki markup for the description.\n\t\tbodyFormat: isJiraIntegrationId(provider.id) ? 'jira-wiki' : undefined,\n\t\t// Only when known, so a row from any other provider keeps exactly the keys it always had.\n\t\t...(issue.descriptionField != null ? { bodyField: toIssueBodyField(issue.descriptionField) } : {}),\n\t\tissueType: issue.type ?? undefined,\n\t\titerations: toIssueIterations(issue),\n\t\t// Only when tagged, so an untagged row keeps exactly the keys it always had.\n\t\t...(options?.projection != null ? { projection: options.projection } : {}),\n\t\t...(options?.viewer != null && issueNamesPeople(issue) ? { viewer: options.viewer } : {}),\n\t};\n}\n\nexport function toIssueBodyField(field: NonNullable<ProviderIssue['descriptionField']>): IssueBodyField {\n\treturn { id: field.referenceName, name: field.name };\n}\n\nfunction toIssueIterations(issue: ProviderIssue): IssueIteration[] | undefined {\n\t// The two sources are mutually exclusive per provider: Azure reports a single `iteration` and no sprints, Jira\n\t// reports `sprints` and no iteration. Should a provider ever report both, the richer sprint metadata would be\n\t// dropped here, so revisit this branch rather than assuming the exclusivity still holds.\n\tif (issue.iteration != null) return [{ id: issue.iteration.path, name: issue.iteration.name }];\n\tif (!issue.sprints?.length) return undefined;\n\n\treturn issue.sprints.map(sprint => ({\n\t\tid: sprint.id,\n\t\tname: sprint.name,\n\t\tisActive: sprint.isActive,\n\t\tstartDate: sprint.startDate ?? undefined,\n\t\tendDate: sprint.endDate ?? undefined,\n\t}));\n}\n\n/**\n * Maps a raw provider-apis {@link ProviderRepository} to the GitLens-owned {@link ProviderRepositoryShape}\n * the ProviderBackend `listRepos` facade surfaces, so consumers don't depend on the SDK repo type. The SDK's\n * nullable fields (`webUrl`/`httpsUrl`/`sshUrl`/`defaultBranch`) collapse to `undefined`, matching the\n * `?? undefined` convention in {@link toIssueShape}/{@link toAccount}.\n */\nexport function toProviderRepositoryShape(repo: ProviderRepository): ProviderRepositoryShape {\n\treturn {\n\t\tid: repo.id,\n\t\tnamespace: repo.namespace,\n\t\tname: repo.name,\n\t\tproject: repo.project ?? undefined,\n\t\turl: repo.webUrl ?? undefined,\n\t\tcloneUrlHttps: repo.httpsUrl ?? undefined,\n\t\tcloneUrlSsh: repo.sshUrl ?? undefined,\n\t\tdefaultBranch: repo.defaultBranch?.name ?? undefined,\n\t};\n}\n\nexport function issueFilterToReason(filter: IssueFilter): 'authored' | 'assigned' | 'mentioned' {\n\tswitch (filter) {\n\t\tcase IssueFilter.Author:\n\t\t\treturn 'authored';\n\t\tcase IssueFilter.Assignee:\n\t\t\treturn 'assigned';\n\t\tcase IssueFilter.Mention:\n\t\t\treturn 'mentioned';\n\t}\n}\n\nexport function toAccount(account: ProviderAccount, provider: ProviderReference): UserAccount {\n\treturn {\n\t\tprovider: provider,\n\t\tid: account.id,\n\t\tname: account.name ?? undefined,\n\t\temail: account.email ?? undefined,\n\t\tavatarUrl: account.avatarUrl ?? undefined,\n\t\tusername: account.username ?? undefined,\n\t};\n}\n\nexport const toProviderBuildStatusState = {\n\t[PullRequestStatusCheckRollupState.Success]: GitBuildStatusState.Success,\n\t[PullRequestStatusCheckRollupState.Failed]: GitBuildStatusState.Failed,\n\t[PullRequestStatusCheckRollupState.Pending]: GitBuildStatusState.Pending,\n};\n\nexport const fromProviderBuildStatusState = {\n\t[GitBuildStatusState.Success]: PullRequestStatusCheckRollupState.Success,\n\t[GitBuildStatusState.Failed]: PullRequestStatusCheckRollupState.Failed,\n\t[GitBuildStatusState.Pending]: PullRequestStatusCheckRollupState.Pending,\n\t[GitBuildStatusState.ActionRequired]: PullRequestStatusCheckRollupState.Failed,\n\t// TODO: The rest of these are defaulted because we don't have a matching state for them\n\t[GitBuildStatusState.Error]: undefined,\n\t[GitBuildStatusState.Cancelled]: undefined,\n\t[GitBuildStatusState.OptionalActionRequired]: undefined,\n\t[GitBuildStatusState.Skipped]: undefined,\n\t[GitBuildStatusState.Running]: undefined,\n\t[GitBuildStatusState.Warning]: undefined,\n};\n\n/** Rolls every check context up into one state, the way a provider's own rollup does: failed, errored, or\n * action-required fails; else pending or running is pending; else success — reading only the first context\n * would call a pull request passing on the strength of whichever check happens to come back first. States\n * carrying no verdict (cancelled, skipped, optional action required, warning) don't vote. Reads the raw\n * state rather than `fromProviderBuildStatusState`, which drops errored and running to `undefined` and\n * would let a lone success outvote a check still in flight. */\nexport function toStatusCheckRollupState(\n\tstatuses: GitBuildStatus[] | null | undefined,\n): PullRequestStatusCheckRollupState | undefined {\n\tif (!statuses?.length) return undefined;\n\n\tlet rollup: PullRequestStatusCheckRollupState | undefined;\n\tfor (const { state } of statuses) {\n\t\tswitch (state) {\n\t\t\tcase GitBuildStatusState.Failed:\n\t\t\tcase GitBuildStatusState.Error:\n\t\t\tcase GitBuildStatusState.ActionRequired:\n\t\t\t\treturn PullRequestStatusCheckRollupState.Failed;\n\t\t\tcase GitBuildStatusState.Pending:\n\t\t\tcase GitBuildStatusState.Running:\n\t\t\t\trollup = PullRequestStatusCheckRollupState.Pending;\n\t\t\t\tbreak;\n\t\t\tcase GitBuildStatusState.Success:\n\t\t\t\trollup ??= PullRequestStatusCheckRollupState.Success;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\treturn rollup;\n}\n\nexport const toProviderPullRequestMergeableState = {\n\t[PullRequestMergeableState.Mergeable]: GitPullRequestMergeableState.Mergeable,\n\t[PullRequestMergeableState.Conflicting]: GitPullRequestMergeableState.Conflicts,\n\t[PullRequestMergeableState.Unknown]: GitPullRequestMergeableState.Unknown,\n\t[PullRequestMergeableState.FailingChecks]: GitPullRequestMergeableState.FailingChecks,\n\t[PullRequestMergeableState.BlockedByPolicy]: GitPullRequestMergeableState.Blocked,\n};\n\nexport const fromProviderPullRequestMergeableState = {\n\t[GitPullRequestMergeableState.Mergeable]: PullRequestMergeableState.Mergeable,\n\t[GitPullRequestMergeableState.Conflicts]: PullRequestMergeableState.Conflicting,\n\t[GitPullRequestMergeableState.Blocked]: PullRequestMergeableState.BlockedByPolicy,\n\t[GitPullRequestMergeableState.FailingChecks]: PullRequestMergeableState.FailingChecks,\n\t[GitPullRequestMergeableState.Unknown]: PullRequestMergeableState.Unknown,\n\t[GitPullRequestMergeableState.Behind]: PullRequestMergeableState.Unknown,\n\t[GitPullRequestMergeableState.UnknownAndBlocked]: PullRequestMergeableState.Unknown,\n\t[GitPullRequestMergeableState.Unstable]: PullRequestMergeableState.Unknown,\n};\n\nexport function toProviderPullRequestState(state: PullRequestState): GitPullRequestState {\n\treturn state === 'opened'\n\t\t? GitPullRequestState.Open\n\t\t: state === 'closed'\n\t\t\t? GitPullRequestState.Closed\n\t\t\t: GitPullRequestState.Merged;\n}\n\nexport function fromProviderPullRequestState(state: GitPullRequestState): PullRequestState {\n\treturn state === GitPullRequestState.Open ? 'opened' : state === GitPullRequestState.Closed ? 'closed' : 'merged';\n}\n\ntype PullRequestStateInput = PullRequestState | PullRequestStateFilter;\n\nfunction toProviderPullRequestStatesCore(state: PullRequestStateInput): GitPullRequestState[] {\n\tswitch (state) {\n\t\tcase 'open':\n\t\tcase 'opened':\n\t\t\treturn [GitPullRequestState.Open];\n\t\tcase 'closed':\n\t\t\treturn [GitPullRequestState.Closed];\n\t\tcase 'merged':\n\t\t\treturn [GitPullRequestState.Merged];\n\t\tcase 'all':\n\t\t\treturn [GitPullRequestState.Open, GitPullRequestState.Closed, GitPullRequestState.Merged];\n\t}\n}\n\n/** Maps PR include/state filters to the SDK's `states` input. `undefined`/omitted preserves the open-only default. */\nexport function toProviderPullRequestStates(\n\tstate: PullRequestStateInput | PullRequestStateInput[] | undefined,\n): GitPullRequestState[] | undefined {\n\tif (state == null) return undefined;\n\n\tconst states = (Array.isArray(state) ? state : [state]).flatMap(s => toProviderPullRequestStatesCore(s));\n\treturn states.length > 0 ? [...new Set(states)] : undefined;\n}\n\n/**\n * Maps an issue state filter to the SDK's `states` input. `undefined`/omitted preserves the open-only default.\n *\n * Throws on any other value, which only an untyped caller can pass: read as omitted it would serve open issues as\n * the state that was asked for. Called before a read's first request, so the throw refuses the whole read.\n */\nexport function toProviderIssueStates(state: IssueStateFilter | undefined): GitIssueState[] | undefined {\n\tswitch (state) {\n\t\tcase undefined:\n\t\t\treturn undefined;\n\t\tcase 'open':\n\t\t\treturn [GitIssueState.Open];\n\t\tcase 'closed':\n\t\t\treturn [GitIssueState.Closed];\n\t\tcase 'all':\n\t\t\treturn [GitIssueState.Open, GitIssueState.Closed];\n\t\tdefault:\n\t\t\tthrow new Error(`Unknown issue state; expected one of open, closed, all`);\n\t}\n}\n\n/**\n * Resolves a normalized {@link ProviderScope} to the provider-appropriate read inputs, dispatching on the\n * provider's {@link PagingMode} (the authoritative per-provider scoping selector). Project-mode providers\n * (Azure issues, Jira) produce `projectInputs` from `org` + `project`; repo/repos-mode providers produce a\n * repo `GetRepoInput[]` from `scope.repos` (carrying `project` where relevant, e.g. Azure). This is the\n * single public entry point consumers can use instead of hand-building the three underlying representations.\n */\nexport function resolveProviderScope(\n\tscope: ProviderScope,\n\tpagingMode: PagingMode | undefined,\n): { reposInput?: GetRepoInput[]; projectInputs?: { namespace: string; project: string }[] } {\n\tif (pagingMode === PagingMode.Project) {\n\t\tif (scope.org != null && scope.project != null) {\n\t\t\treturn { projectInputs: [{ namespace: scope.org, project: scope.project }] };\n\t\t}\n\t\treturn {};\n\t}\n\n\tconst reposInput = scope.repos?.map(r => ({ namespace: r.owner, name: r.name, project: scope.project }));\n\treturn { reposInput: reposInput };\n}\n\nexport function providerPullRequestMatchesSearch(pr: ProviderPullRequest, search: string): boolean {\n\tconst term = search.trim().toLowerCase();\n\tif (term.length === 0) return true;\n\n\treturn pr.title.toLowerCase().includes(term) || (pr.description?.toLowerCase().includes(term) ?? false);\n}\n\nfunction toProviderRemoteInfo(ref: PullRequestRef | undefined): GitRepositoryRemoteInfo | null {\n\t// Match the SDK convention: only populate remoteInfo when both clone URLs are known.\n\treturn ref?.cloneHttps && ref?.cloneSsh ? { cloneUrlHTTPS: ref.cloneHttps, cloneUrlSSH: ref.cloneSsh } : null;\n}\n\nexport function toProviderPullRequest(pr: PullRequest): ProviderPullRequest {\n\tconst prReviews = [...(pr.reviewRequests ?? []), ...(pr.latestReviews ?? [])];\n\treturn {\n\t\tid: pr.id,\n\t\tgraphQLId: pr.nodeId,\n\t\tnumber: pr.number ?? Number.parseInt(pr.id, 10),\n\t\ttitle: pr.title,\n\t\tdescription: pr.body ?? null,\n\t\turl: pr.url,\n\t\tstate: toProviderPullRequestState(pr.state),\n\t\tisCrossRepository: pr.refs?.isCrossRepository ?? false,\n\t\tisDraft: pr.isDraft ?? false,\n\t\tcreatedDate: pr.createdDate,\n\t\tupdatedDate: pr.updatedDate,\n\t\tclosedDate: pr.closedDate ?? null,\n\t\tmergedDate: pr.mergedDate ?? null,\n\t\tcommentCount: pr.commentsCount ?? null,\n\t\tupvoteCount: pr.thumbsUpCount ?? null,\n\t\tcommitCount: pr.commitCount ?? null,\n\t\tfileCount: pr.filesChanged ?? null,\n\t\tadditions: pr.additions ?? null,\n\t\tdeletions: pr.deletions ?? null,\n\t\tauthor: toProviderAccount(pr.author),\n\t\tassignees: pr.assignees?.map(toProviderAccount) ?? null,\n\t\tbaseRef:\n\t\t\tpr.refs?.base == null\n\t\t\t\t? null\n\t\t\t\t: {\n\t\t\t\t\t\tname: pr.refs.base.branch,\n\t\t\t\t\t\toid: pr.refs.base.sha,\n\t\t\t\t\t},\n\t\theadRef:\n\t\t\tpr.refs?.head == null\n\t\t\t\t? null\n\t\t\t\t: {\n\t\t\t\t\t\tname: pr.refs.head.branch,\n\t\t\t\t\t\toid: pr.refs.head.sha,\n\t\t\t\t\t},\n\t\t// `null` when the source carried no review data at all, rather than the empty array a lite read would\n\t\t// otherwise produce: `toCompletedReviews`/`toReviewRequests` map `null` back to `undefined`, which is what\n\t\t// lets a consumer tell \"nobody has reviewed this\" from \"this read never fetched reviews\" (see\n\t\t// `PullRequestShape.latestReviews`). An empty array from a full projection stays an empty array.\n\t\treviews: pr.reviewRequests == null && pr.latestReviews == null ? null : toProviderReviews(prReviews),\n\t\t// Derived for provider-apis' categorizer (Launchpad), which reads a pending request as \"waiting for review\"\n\t\t// and a comment as \"reviewer commented\" even where the host made no decision.\n\t\treviewDecision: toProviderReviewDecision(pr.reviewDecision, prReviews),\n\t\trepository:\n\t\t\tpr.repository != null\n\t\t\t\t? {\n\t\t\t\t\t\tid: pr.repository.id ?? '',\n\t\t\t\t\t\tname: pr.repository.repo,\n\t\t\t\t\t\towner: {\n\t\t\t\t\t\t\tlogin: pr.repository.owner,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tremoteInfo: toProviderRemoteInfo(pr.refs?.base),\n\t\t\t\t\t}\n\t\t\t\t: {\n\t\t\t\t\t\tid: '',\n\t\t\t\t\t\tname: '',\n\t\t\t\t\t\towner: {\n\t\t\t\t\t\t\tlogin: '',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tremoteInfo: null,\n\t\t\t\t\t},\n\t\theadRepository:\n\t\t\t// A deleted head repository has no owner or name: GitHub's rows leave them `undefined`, provider-apis' `''`.\n\t\t\tpr.refs?.head?.owner && pr.refs.head.repo\n\t\t\t\t? {\n\t\t\t\t\t\tid: pr.refs.head.repo,\n\t\t\t\t\t\tname: pr.refs.head.repo,\n\t\t\t\t\t\towner: {\n\t\t\t\t\t\t\tlogin: pr.refs.head.owner,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tremoteInfo: toProviderRemoteInfo(pr.refs.head),\n\t\t\t\t\t\tisFork: pr.refs.head.isFork,\n\t\t\t\t\t}\n\t\t\t\t: null,\n\t\theadCommit:\n\t\t\tpr.statusCheckRollupState != null\n\t\t\t\t? {\n\t\t\t\t\t\tbuildStatuses: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcompletedAt: null,\n\t\t\t\t\t\t\t\tdescription: '',\n\t\t\t\t\t\t\t\tname: '',\n\t\t\t\t\t\t\t\tstate: toProviderBuildStatusState[pr.statusCheckRollupState],\n\t\t\t\t\t\t\t\tstartedAt: null,\n\t\t\t\t\t\t\t\tstage: null,\n\t\t\t\t\t\t\t\turl: '',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t}\n\t\t\t\t: null,\n\t\tpermissions:\n\t\t\tpr.viewerCanUpdate == null\n\t\t\t\t? null\n\t\t\t\t: {\n\t\t\t\t\t\t// An unknown access level doesn't block a merge. Only GitHub's reads know it; any other row\n\t\t\t\t\t\t// with a `viewerCanUpdate` got it from provider-apis' own `canMerge`, which a missing access\n\t\t\t\t\t\t// level must not overturn. provider-apis' categorizer reads absent `permissions` the same way.\n\t\t\t\t\t\tcanMerge:\n\t\t\t\t\t\t\tpr.viewerCanUpdate === true &&\n\t\t\t\t\t\t\t(pr.repository.accessLevel == null ||\n\t\t\t\t\t\t\t\tpr.repository.accessLevel >= RepositoryAccessLevel.Write),\n\t\t\t\t\t\tcanMergeAndBypassProtections:\n\t\t\t\t\t\t\tpr.viewerCanUpdate === true &&\n\t\t\t\t\t\t\tpr.repository.accessLevel != null &&\n\t\t\t\t\t\t\tpr.repository.accessLevel >= RepositoryAccessLevel.Admin,\n\t\t\t\t\t},\n\t\tmergeableState: pr.mergeableState ? toProviderPullRequestMergeableState[pr.mergeableState] : undefined,\n\t};\n}\n\nexport function fromProviderPullRequest(\n\tpr: ProviderPullRequest,\n\tprovider: Provider,\n\toptions?: {\n\t\tproject?: IssueProject;\n\t\tcurrentAccount?: { id: string; username?: string };\n\t\tprojection?: PullRequestProjection;\n\t},\n): PullRequest {\n\tconst repository = pr.repository;\n\tconst repositoryName = repository?.name ?? '';\n\tconst repositoryOwner = repository?.owner?.login ?? '';\n\tconst repositoryRemoteInfo = repository?.remoteInfo;\n\tconst headRepository = pr.headRepository;\n\tconst headRepositoryRemoteInfo = headRepository?.remoteInfo;\n\n\treturn new PullRequest(\n\t\tprovider,\n\t\tfromProviderAccount(pr.author),\n\t\tpr.id,\n\t\tpr.graphQLId || pr.id,\n\t\tpr.title,\n\t\tpr.url ?? '',\n\t\t{\n\t\t\towner: repositoryOwner,\n\t\t\trepo: repositoryName,\n\t\t\t// provider-apis sends `''` for an id it doesn't know.\n\t\t\tid: repository?.id || undefined,\n\t\t},\n\t\tfromProviderPullRequestState(pr.state),\n\t\tpr.createdDate,\n\t\tpr.updatedDate,\n\t\tpr.closedDate ?? undefined,\n\t\tpr.mergedDate ?? undefined,\n\t\tpr.mergeableState ? fromProviderPullRequestMergeableState[pr.mergeableState] : undefined,\n\t\t// The SDK's `permissions` can only say \"can merge\", so its `false` stays unknown rather than \"can't update\".\n\t\tpr.permissions?.canMerge || pr.permissions?.canMergeAndBypassProtections ? true : undefined,\n\t\t{\n\t\t\tbase: {\n\t\t\t\tbranch: pr.baseRef?.name ?? '',\n\t\t\t\tsha: pr.baseRef?.oid ?? '',\n\t\t\t\trepo: repositoryName,\n\t\t\t\towner: repositoryOwner,\n\t\t\t\texists: pr.baseRef != null,\n\t\t\t\turl: repositoryRemoteInfo?.cloneUrlHTTPS\n\t\t\t\t\t? repositoryRemoteInfo.cloneUrlHTTPS.replace(gitSuffixRegex, '')\n\t\t\t\t\t: '',\n\t\t\t\tcloneHttps: repositoryRemoteInfo?.cloneUrlHTTPS || undefined,\n\t\t\t\tcloneSsh: repositoryRemoteInfo?.cloneUrlSSH || undefined,\n\t\t\t},\n\t\t\thead: {\n\t\t\t\tbranch: pr.headRef?.name ?? '',\n\t\t\t\tsha: pr.headRef?.oid ?? '',\n\t\t\t\trepo: headRepository?.name ?? '',\n\t\t\t\towner: headRepository?.owner?.login ?? '',\n\t\t\t\texists: pr.headRef != null,\n\t\t\t\turl: headRepositoryRemoteInfo?.cloneUrlHTTPS\n\t\t\t\t\t? headRepositoryRemoteInfo.cloneUrlHTTPS.replace(gitSuffixRegex, '')\n\t\t\t\t\t: '',\n\t\t\t\tcloneHttps: headRepositoryRemoteInfo?.cloneUrlHTTPS || undefined,\n\t\t\t\tcloneSsh: headRepositoryRemoteInfo?.cloneUrlSSH || undefined,\n\t\t\t\tisFork: headRepository?.isFork,\n\t\t\t},\n\t\t\tisCrossRepository: pr.isCrossRepository,\n\t\t},\n\t\tpr.isDraft,\n\t\tpr.additions ?? undefined,\n\t\tpr.deletions ?? undefined,\n\t\tpr.commentCount ?? undefined,\n\t\tpr.upvoteCount ?? undefined,\n\t\tpr.reviewDecision ? fromPullRequestReviewDecision[pr.reviewDecision] : undefined,\n\t\ttoReviewRequests(pr.reviews),\n\t\ttoCompletedReviews(pr.reviews),\n\t\tpr.assignees?.map(fromProviderAccount) ?? undefined,\n\t\ttoStatusCheckRollupState(pr.headCommit?.buildStatuses),\n\t\toptions?.project,\n\t\tpr.version,\n\t\tpr.commitCount ?? undefined,\n\t\tundefined, // stack\n\t\tpr.fileCount ?? undefined,\n\t\tpr.description ?? undefined,\n\t\tpr.number,\n\t\toptions?.currentAccount != null\n\t\t\t? authoredByCurrentAccount(pr.author, provider, options.currentAccount)\n\t\t\t: undefined,\n\t\toptions?.projection,\n\t\toptions?.currentAccount,\n\t);\n}\n\n/**\n * A GitLens-native row (GitHub's own reads) tagged for the read that returned it, with `authoredByMe` and `viewer`\n * resolved by the same rule {@link fromProviderPullRequest} applies. Returns a copy: the mapper's row stays as it was\n * built.\n */\nexport function stampNativePullRequest(\n\tpr: PullRequest,\n\toptions: { currentAccount?: { id: string; username?: string }; projection?: PullRequestProjection },\n): PullRequest {\n\treturn Object.assign(Object.create(PullRequest.prototype) as PullRequest, pr, {\n\t\tauthoredByMe:\n\t\t\toptions.currentAccount != null\n\t\t\t\t? authoredByCurrentAccount(pr.author, pr.provider, options.currentAccount)\n\t\t\t\t: undefined,\n\t\tviewer: options.currentAccount,\n\t\tprojection: options.projection,\n\t});\n}\n\n/**\n * A row of an account-wide read as a `PullRequest`. GitHub's are GitLens-native, which {@link stampNativePullRequest}\n * tags; every other host's are provider-apis', which {@link fromProviderPullRequest} converts.\n */\nexport function toPullRequestRow(\n\tpr: ProviderPullRequest | PullRequest,\n\tprovider: Provider,\n\toptions: { currentAccount?: { id: string; username?: string }; projection?: PullRequestProjection },\n): PullRequest {\n\treturn isNativePullRequest(pr)\n\t\t? stampNativePullRequest(pr, options)\n\t\t: fromProviderPullRequest(pr, provider, options);\n}\n\n/**\n * By shape rather than by class, which a second copy of the model module fails: a native row is a `'pullrequest'` that\n * names its provider, which provider-apis' rows never do. Both, so a key provider-apis adds later can't reroute its\n * rows.\n */\nexport function isNativePullRequest(pr: ProviderPullRequest | PullRequest): pr is PullRequest {\n\tconst row = pr as { type?: unknown; provider?: unknown };\n\treturn row.type === 'pullrequest' && row.provider != null && typeof row.provider === 'object';\n}\n\n/**\n * Whether `pr` names anyone the current account could be: its author, an assignee or a reviewer. A row naming no one\n * needs no viewer, as nothing on it can be matched against one.\n */\nexport function pullRequestNamesPeople(pr: ProviderPullRequest | PullRequest): boolean {\n\tif (pr.author != null || pr.assignees?.length) return true;\n\n\treturn isNativePullRequest(pr)\n\t\t? Boolean(pr.reviewRequests?.length || pr.latestReviews?.length)\n\t\t: Boolean(pr.reviews?.length);\n}\n\n/**\n * Whether `issue` names anyone the current account could be: its author or an assignee, by id. A row naming no one\n * gets no viewer, as nothing on it can be matched against one. Takes a raw row or a mapped one, so every read decides\n * alike.\n */\nexport function issueNamesPeople(issue: {\n\treadonly author?: { readonly id?: string | null } | null;\n\treadonly assignees?: readonly { readonly id?: string | null }[] | null;\n}): boolean {\n\treturn Boolean(issue.author?.id || issue.assignees?.some(a => a.id));\n}\n\n/**\n * GitLens' own GitHub GraphQL client keys people by login, while the current account's `id` is GitHub's\n * numeric database id, so an id-only match always misses there. The login is a unique handle on every\n * GitHub row shape, so the username fallback is safe there; elsewhere `toProviderAccount` fills `username`\n * from a display name that two people can share, so only GitHub and GitHub Enterprise get the fallback.\n *\n * A row without an author is unknown (`undefined`), not someone else's: it can still get a viewer for its reviewers.\n */\nfunction authoredByCurrentAccount(\n\tauthor: { id?: string | null; username?: string | null } | null | undefined,\n\tprovider: ProviderReference,\n\tcurrentAccount: { id: string; username?: string },\n): boolean | undefined {\n\tif (author == null) return undefined;\n\tif (author.id === currentAccount.id) return true;\n\n\tconst isGitHub =\n\t\tprovider.id === GitCloudHostIntegrationId.GitHub ||\n\t\tprovider.id === GitSelfManagedHostIntegrationId.CloudGitHubEnterprise;\n\treturn isGitHub && currentAccount.username != null && author.username === currentAccount.username;\n}\n\nexport function fromProviderIssue(\n\tissue: ProviderIssue,\n\tintegration: Integration,\n\toptions?: { project?: IssueProject; projection?: IssueProjection; viewer?: { id: string } },\n): Issue {\n\tconst identifier = toIssueIdentifier(issue.number);\n\tconst state = getProviderIssueState(issue, integration.id);\n\treturn new Issue(\n\t\tintegration,\n\t\tidentifier,\n\t\tissue.graphQLId ?? issue.id,\n\t\tissue.title,\n\t\tissue.url ?? '',\n\t\tissue.createdDate,\n\t\tissue.updatedDate ?? issue.closedDate ?? issue.createdDate,\n\t\tstate === 'closed',\n\t\tstate,\n\t\tfromProviderAccount(issue.author),\n\t\tissue.assignees?.map(fromProviderAccount) ?? undefined,\n\t\tissue.repository != null\n\t\t\t? {\n\t\t\t\t\towner: issue.repository.owner.login ?? '',\n\t\t\t\t\trepo: issue.repository.name,\n\t\t\t\t\t// provider-apis sends `''` for an id it doesn't know.\n\t\t\t\t\tid: issue.repository.id || undefined,\n\t\t\t\t}\n\t\t\t: undefined,\n\t\tissue.closedDate ?? undefined,\n\t\tissue.labels?.map(label => ({ name: label.name, color: label.color ?? undefined })),\n\t\tissue.commentCount ?? undefined,\n\t\tissue.upvoteCount ?? undefined,\n\t\tissue.description ?? undefined,\n\t\toptions?.project != null\n\t\t\t? {\n\t\t\t\t\tid: options.project.id,\n\t\t\t\t\tname: options.project.name,\n\t\t\t\t\tresourceId: options.project.resourceId,\n\t\t\t\t\tresourceName: options.project.resourceName,\n\t\t\t\t}\n\t\t\t: issue.project?.id && issue.project?.resourceId && issue.project?.namespace\n\t\t\t\t? {\n\t\t\t\t\t\tid: issue.project.id,\n\t\t\t\t\t\tname: issue.project.name,\n\t\t\t\t\t\tresourceId: issue.project.resourceId,\n\t\t\t\t\t\tresourceName: issue.project.namespace,\n\t\t\t\t\t}\n\t\t\t\t: undefined,\n\t\tidentifier,\n\t\tissue.type ?? undefined,\n\t\ttoIssueProviderState(issue.state),\n\t\tintegration.id === IssuesCloudHostIntegrationId.Jira ? 'jira-wiki' : undefined,\n\t\ttoIssueIterations(issue),\n\t\toptions?.projection,\n\t\tissue.descriptionField != null ? toIssueBodyField(issue.descriptionField) : undefined,\n\t\tissueNamesPeople(issue) ? options?.viewer : undefined,\n\t);\n}\n\nexport function toProviderPullRequestWithUniqueId(pr: PullRequest): PullRequestWithUniqueID {\n\tconst { reviews, mergeableState, ...providerPr } = toProviderPullRequest(pr);\n\treturn {\n\t\t...providerPr,\n\t\t// The SDK's type requires a mergeability, and its categorizer only acts on a known one, so an unfetched\n\t\t// one goes over as its own `UNKNOWN`. Except on Bitbucket Cloud, which reports no mergeability at all:\n\t\t// Launchpad's \"Ready to merge\" needs one, so its rows go over as `MERGEABLE`, as provider-apis' own\n\t\t// Bitbucket rows already do.\n\t\tmergeableState:\n\t\t\tmergeableState ??\n\t\t\t(pr.provider.id === GitCloudHostIntegrationId.Bitbucket\n\t\t\t\t? GitPullRequestMergeableState.Mergeable\n\t\t\t\t: GitPullRequestMergeableState.Unknown),\n\t\t// The SDK boundary: `getActionablePullRequests` categorizes by review state and only knows\n\t\t// provider-apis' own vocabulary, so the locally-added dismissed state is dropped here rather than\n\t\t// handed over as a value it would fall through on. Our own projection keeps it — see\n\t\t// `providerPullRequestReviewStateDismissed`. `commitOid` rides along on the surviving reviews: it is an\n\t\t// extra property the SDK ignores, not a value it could misread.\n\t\treviews:\n\t\t\treviews?.filter(\n\t\t\t\t(r): r is ProviderPullRequestReview & { state: GitPullRequestReviewState } =>\n\t\t\t\t\tr.state !== providerPullRequestReviewStateDismissed,\n\t\t\t) ?? null,\n\t\tuuid: EntityIdentifierUtils.encode(getEntityIdentifierInput(pr)),\n\t};\n}\n\nexport type ProviderActionablePullRequest = ActionablePullRequest;\n\n/**\n * Built on the SDK's `GitPullRequest`, NOT the local {@link ProviderPullRequest} widening: this is handed to\n * `getActionablePullRequests`, which categorizes by review state and only knows provider-apis' vocabulary.\n * {@link toProviderPullRequestWithUniqueId} is what narrows `reviews` down to it.\n */\nexport type EnrichablePullRequest = GitPullRequest & {\n\tuuid: string;\n\ttype: 'pullrequest';\n\tprovider: ProviderReference;\n\tenrichable: EnrichableItem;\n\trepoIdentity: PullRequestRepositoryIdentityDescriptor;\n\trefs?: PullRequestRefs;\n\tunderlyingPullRequest: PullRequest;\n};\n\nexport const getActionablePullRequests = GitProviderUtils.getActionablePullRequests;\n\nexport type GitConfigEntityIdentifier = AnyEntityIdentifierInput & {\n\tmetadata: {\n\t\tid: string;\n\t\towner: { key: string; name: string; id: string | undefined; owner: string | undefined };\n\t\tcreatedDate: string;\n\t\tisCloudEnterprise?: boolean;\n\t};\n};\n\nexport function isGitHubDotCom(domain: string | null | undefined): boolean {\n\treturn equalsIgnoreCase(domain, 'github.com');\n}\n\nexport function isGitLabDotCom(domain: string | null | undefined): boolean {\n\treturn equalsIgnoreCase(domain, 'gitlab.com');\n}\n\n// Anchor the `visualstudio.com` alternative on a label boundary (`^` or `.`) rather than `\\b`: `\\b` treats a\n// hyphen as a word boundary, so `\\bvisualstudio\\.com$` matched attacker-controlled hosts like\n// `evil-visualstudio.com` and classified them as Azure cloud, changing their auth/URL handling.\nconst azureCloudDomainRegex = /^dev\\.azure\\.com$|(?:^|\\.)visualstudio\\.com$/i;\nexport function isAzureCloudDomain(domain: string | undefined): boolean {\n\treturn domain != null && azureCloudDomainRegex.test(domain);\n}\n\nconst bitbucketCloudDomainRegex = /^bitbucket\\.org$/i;\nexport function isBitbucketCloudDomain(domain: string | undefined): boolean {\n\treturn domain != null && bitbucketCloudDomainRegex.test(domain);\n}\n\nexport function supportsCodeSuggest(provider: ProviderReference): boolean {\n\treturn isGitHubDotCom(provider.domain);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAuJA,MAAa,sBAAsB;CAClC,gBAAgB;CAChB,WAAW;CACX,OAAO;CACP,QAAQ;CACR,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,wBAAwB;AACzB;AAEA,MAAa,gBAAgB;CAC5B,MAAM;CACN,QAAQ;AACT;AAEA,MAAa,sBAAsB;CAClC,MAAM;CACN,QAAQ;CACR,QAAQ;AACT;AAEA,MAAa,4BAA4B;CACxC,UAAU;CACV,kBAAkB;CAClB,WAAW;CACX,iBAAiB;AAClB;AAEA,MAAa,+BAA+B;CAC3C,QAAQ;CACR,SAAS;CACT,WAAW;CACX,eAAe;CACf,WAAW;CACX,SAAS;CACT,mBAAmB;CACnB,UAAU;AACX;;;;;;;;;;;;;;AA0BA,SAAgB,eAAe,OAA8C;CAC5E,OACC,SAAS,QACT,MAAM,QAAQ,KAAK,KACnB,MAAM,OAAM,SAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,QAAQ;AAE1E;;;;;;AA+BA,SAAgB,+BACf,IACqB;CACrB,MAAM,aAAa,GAAG;CAWtB,MAAM,cAAc,GAAG,OAAO,QAAQ,GAAG,IAAI,KAAK,MAAM,KAAK,OAAO,GAAG,QAAQ,KAAA;CAC/E,IAAI,cAAc,MAAM,OAAO;CAE/B,MAAM,QAAQ,OAAO,WAAW,UAAU,WAAW,WAAW,QAAQ,WAAW,OAAO;CAC1F,M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AgB,eAAe,QAA4C;CAC1E,OAAO,iBAAiB,QAAQ,YAAY;AAC7C;AAKA,MAAM,wBAAwB;AAC9B,SAAgB,mBAAmB,QAAqC;CACvE,OAAO,UAAU,QAAQ,sBAAsB,KAAK,MAAM;AAC3D;AAEA,MAAM,4BAA4B;AAClC,SAAgB,uBAAuB,QAAqC;CAC3E,OAAO,UAAU,QAAQ,0BAA0B,KAAK,MAAM;AAC/D;AAEA,SAAgB,oBAAoB,UAAsC;CACzE,OAAO,eAAe,SAAS,MAAM;AACtC"}
|
|
1
|
+
{"version":3,"file":"models.js","names":[],"sources":["../../../../../plus/integrations/src/providers/models.ts"],"sourcesContent":["import type {\n\tAccount,\n\tActionablePullRequest,\n\tAnyEntityIdentifierInput,\n\tAzureDevOps,\n\tAzureOrganization,\n\tAzureProject,\n\tAzureSetPullRequestInput,\n\tBitbucket,\n\tBitbucketServer,\n\tBitbucketWorkspaceStub,\n\tCollectionMetadata,\n\tCursorPageInput,\n\tEnterpriseOptions,\n\tGetRepoInput,\n\tGitBuildStatus,\n\tGitBuildStatusState as GitBuildStatusStateType,\n\tGitHub,\n\tGitHubPullRequestFieldMap,\n\tGitIssueState as GitIssueStateType,\n\tGitLab,\n\tGitLabGroup,\n\tGitMergeStrategy,\n\tGitPullRequest,\n\tGitPullRequestMergeableState as GitPullRequestMergeableStateType,\n\tGitPullRequestReviewState as GitPullRequestReviewStateType,\n\tGitPullRequestState as GitPullRequestStateType,\n\tGitRepository,\n\tGitRepositoryRemoteInfo,\n\tJira,\n\tJiraProject,\n\tJiraResource,\n\tJiraServer,\n\tJiraServerProject,\n\tLinear,\n\tLinearOrganization,\n\tLinearTeam,\n\tNumberedPageInput,\n\tOrganization,\n\tIssue as ProviderApiIssue,\n\tPullRequestWithUniqueID,\n\tRequestFunction,\n\tRequestOptions,\n\tResponse,\n\tSetPullRequestInput,\n\tTrello,\n} from '@gitkraken/provider-apis';\nimport { EntityIdentifierUtils } from '@gitkraken/provider-apis/entity-identifiers';\nimport { GitProviderUtils } from '@gitkraken/provider-apis/provider-utils';\nimport { githubSearchResultLimit } from '@gitlens/git-github/api/config.js';\nimport type { Account as UserAccount } from '@gitlens/git/models/author.js';\nimport type {\n\tIssueBodyField,\n\tIssueIteration,\n\tIssueProject,\n\tIssueProjection,\n\tIssueProviderState,\n\tIssueShape,\n\tIssueStateFilter,\n} from '@gitlens/git/models/issue.js';\nimport { Issue, RepositoryAccessLevel } from '@gitlens/git/models/issue.js';\nimport type {\n\tPullRequestProjection,\n\tPullRequestRef,\n\tPullRequestRefs,\n\tPullRequestRepositoryIdentityDescriptor,\n\tPullRequestState,\n\tPullRequestStateFilter,\n} from '@gitlens/git/models/pullRequest.js';\nimport {\n\tPullRequest,\n\tPullRequestMergeableState,\n\tPullRequestStatusCheckRollupState,\n} from '@gitlens/git/models/pullRequest.js';\nimport type { Provider, ProviderReference } from '@gitlens/git/models/remoteProvider.js';\nimport type { ProviderScope } from '@gitlens/git/models/resourceDescriptor.js';\nimport { isTerminalIssueStateCategory } from '@gitlens/git/utils/issue.utils.js';\nimport { gitSuffixRegex } from '@gitlens/git/utils/remote.utils.js';\nimport type { PagedResult } from '@gitlens/utils/paging.js';\nimport { equalsIgnoreCase } from '@gitlens/utils/string.js';\nimport type { IntegrationIds } from '../constants.js';\nimport {\n\tGitCloudHostIntegrationId,\n\tGitSelfManagedHostIntegrationId,\n\tIssuesCloudHostIntegrationId,\n\tIssuesSelfManagedHostIntegrationId,\n} from '../constants.js';\nimport type { Integration, IntegrationType } from '../models/integration.js';\nimport type {\n\tIssueSearchCapabilities,\n\tIssueSorting,\n\tPullRequestSearchCapabilities,\n\tPullRequestSorting,\n} from '../providerFilters.js';\nimport { IssueFilter, PullRequestFilter } from '../providerFilters.js';\n\nexport { IssueFilter, PullRequestFilter } from '../providerFilters.js';\nexport type {\n\tIssueSearchCapabilities,\n\tIssueSearchCriteria,\n\tIssueSearchRelationship,\n\tIssueSortField,\n\tIssueSorting,\n\tPullRequestSearchCapabilities,\n\tPullRequestSearchCriteria,\n\tPullRequestSortField,\n\tPullRequestSorting,\n} from '../providerFilters.js';\nimport type { ProviderRepositoryShape } from '../results.js';\nimport { isJiraIntegrationId } from '../utils/integration.utils.js';\n\nexport type { ProviderOrganization, ProviderRepositoryShape } from '../results.js';\nimport { fromProviderAccount, toProviderAccount } from './accounts.js';\nimport {\n\tazurePullRequestSearchSorts,\n\tazureWorkItemSearchRelationships,\n\tazureWorkItemSearchResultLimit,\n\tazureWorkItemSearchSorts,\n} from './azure/search.js';\nimport {\n\tazureAccountWideIssueSorts,\n\tazureIssueSorts,\n\tgithubAccountWideIssueSorts,\n\tgithubIssueSorts,\n\tgitlabAccountWideIssueSorts,\n\tgitlabIssueSorts,\n\tjiraIssueSorts,\n\tlinearIssueSorts,\n\ttrelloIssueSorts,\n} from './issueSorts.js';\nimport type { ProviderPullRequestReview, ProviderPullRequestReviews } from './pullRequestReviews.js';\nimport {\n\tfromPullRequestReviewDecision,\n\tproviderPullRequestReviewStateDismissed,\n\ttoCompletedReviews,\n\ttoProviderReviewDecision,\n\ttoProviderReviews,\n\ttoReviewRequests,\n} from './pullRequestReviews.js';\nimport { getEntityIdentifierInput } from './utils.js';\n\ntype GitBuildStatusState = GitBuildStatusStateType;\ntype GitIssueState = GitIssueStateType;\ntype GitPullRequestMergeableState = GitPullRequestMergeableStateType;\ntype GitPullRequestReviewState = GitPullRequestReviewStateType;\ntype GitPullRequestState = GitPullRequestStateType;\n\n// Local runtime copies of the `@gitkraken/provider-apis` string enums. Duplicated (not imported as\n// values) because the SDK ships as CJS whose named enum exports can't be statically imported as ESM\n// values from the bundled `dist`. Exported so the enum-parity test can deep-equal them against the\n// real SDK enums and turn any upstream drift into a test failure instead of a silent mismatch.\nexport const GitBuildStatusState = {\n\tActionRequired: 'ACTION_REQUIRED' as GitBuildStatusState,\n\tCancelled: 'CANCELLED' as GitBuildStatusState,\n\tError: 'ERROR' as GitBuildStatusState,\n\tFailed: 'FAILED' as GitBuildStatusState,\n\tPending: 'PENDING' as GitBuildStatusState,\n\tRunning: 'RUNNING' as GitBuildStatusState,\n\tSkipped: 'SKIPPED' as GitBuildStatusState,\n\tSuccess: 'SUCCESS' as GitBuildStatusState,\n\tWarning: 'WARNING' as GitBuildStatusState,\n\tOptionalActionRequired: 'OPTIONAL_ACTION_REQUIRED' as GitBuildStatusState,\n} as const;\n\nexport const GitIssueState = {\n\tOpen: 'OPEN' as GitIssueState,\n\tClosed: 'CLOSED' as GitIssueState,\n} as const;\n\nexport const GitPullRequestState = {\n\tOpen: 'OPEN' as GitPullRequestState,\n\tClosed: 'CLOSED' as GitPullRequestState,\n\tMerged: 'MERGED' as GitPullRequestState,\n} as const;\n\nexport const GitPullRequestReviewState = {\n\tApproved: 'APPROVED' as GitPullRequestReviewState,\n\tChangesRequested: 'CHANGES_REQUESTED' as GitPullRequestReviewState,\n\tCommented: 'COMMENTED' as GitPullRequestReviewState,\n\tReviewRequested: 'REVIEW_REQUESTED' as GitPullRequestReviewState,\n} as const;\n\nexport const GitPullRequestMergeableState = {\n\tBehind: 'BEHIND' as GitPullRequestMergeableState,\n\tBlocked: 'BLOCKED' as GitPullRequestMergeableState,\n\tConflicts: 'CONFLICTS' as GitPullRequestMergeableState,\n\tFailingChecks: 'FAILING_CHECKS' as GitPullRequestMergeableState,\n\tMergeable: 'MERGEABLE' as GitPullRequestMergeableState,\n\tUnknown: 'UNKNOWN' as GitPullRequestMergeableState,\n\tUnknownAndBlocked: 'UNKNOWN_AND_BLOCKED' as GitPullRequestMergeableState,\n\tUnstable: 'UNSTABLE' as GitPullRequestMergeableState,\n} as const;\n\n/**\n * Forward-only host type — the package only sets `EnrichablePullRequest.enrichable`\n * for the host to consume. Typed as `any` to avoid duplicating the host's\n * `EnrichableItem` shape.\n */\ntype EnrichableItem = any;\n\nexport type ProviderAccount = Account;\nexport type ProviderReposInput = (string | number)[] | GetRepoInput[];\nexport type ProviderRepoInput = GetRepoInput;\n\n/**\n * Which half of {@link ProviderReposInput} a caller supplied: repository IDS rather than descriptors.\n *\n * The union has no discriminant, so the answer is the element shape — and several layers need it for different\n * reasons (`ProvidersApi` to pick `repoIds` vs `repos` in the SDK input, `GitHostIntegration` to refuse an\n * id-based read a provider can't serve, `listIssuesPage` to know GitLab's id form takes the SDK's own merging\n * aggregate). One predicate rather than one per layer, because each copy is free to disagree about the shape,\n * and the symptom of disagreement is a read routed to the wrong provider query.\n *\n * Takes `unknown` rather than {@link ProviderReposInput} because `ProvidersApi.isRepoIdsInput` forwards here and\n * is public with an unvalidated parameter, so the array check has to stay part of the rule rather than be assumed\n * from the parameter type.\n */\nexport function isRepoIdsInput(input: unknown): input is (string | number)[] {\n\treturn (\n\t\tinput != null &&\n\t\tArray.isArray(input) &&\n\t\tinput.every(repo => typeof repo === 'string' || typeof repo === 'number')\n\t);\n}\n\n/**\n * provider-apis' pull request. `mergeableState` is optional because {@link toProviderPullRequest} also converts\n * GitLens' own rows, and a read that didn't select it has none to give.\n */\nexport type ProviderPullRequest = Omit<GitPullRequest, 'reviews' | 'mergeableState'> & {\n\treviews: ProviderPullRequestReviews;\n\tmergeableState?: GitPullRequestMergeableState;\n};\nexport type ProviderRepository = GitRepository;\nexport type ProviderIssue = ProviderApiIssue;\nexport type ProviderEnterpriseOptions = EnterpriseOptions;\nexport type ProviderJiraProject = JiraProject;\nexport type ProviderJiraResource = JiraResource;\n// Jira Server's project shape is its own: `/rest/api/2/project` returns only an id and a name, with no `key`\n// and no enclosing resource (the instance itself is the resource).\nexport type ProviderJiraServerProject = JiraServerProject;\nexport type ProviderLinearTeam = LinearTeam;\nexport type ProviderLinearOrganization = LinearOrganization;\nexport type ProviderAzureProject = AzureProject;\nexport type ProviderAzureResource = AzureOrganization;\nexport type ProviderBitbucketResource = BitbucketWorkspaceStub;\nexport type ProviderGitHubOrganization = Organization;\nexport type ProviderGitLabGroup = GitLabGroup;\n\n/**\n * Returns an account-wide PR identity. Provider PR ids are commonly scoped to a repository or organization,\n * so an id alone is never safe for deduplication across a multi-repository fan-out. Repository identity wins\n * when available so the same row still deduplicates when a later facet adds or removes its URL.\n */\nexport function getProviderPullRequestIdentity(\n\tpr: Pick<ProviderPullRequest, 'id' | 'repository' | 'url'> | Pick<PullRequest, 'id' | 'repository' | 'url'>,\n): string | undefined {\n\tconst repository = pr.repository as\n\t\t| {\n\t\t\t\tid?: string | number;\n\t\t\t\tname?: string;\n\t\t\t\t/** A `PullRequest`'s name for `name`, so its key matches its provider-apis form's. */\n\t\t\t\trepo?: string;\n\t\t\t\tnamespace?: string;\n\t\t\t\towner?: { login?: string } | string;\n\t\t\t\tproject?: string;\n\t\t }\n\t\t| undefined;\n\tconst urlIdentity = pr.url != null && pr.url.trim() !== '' ? `url:${pr.url}` : undefined;\n\tif (repository == null) return urlIdentity;\n\n\tconst owner = typeof repository.owner === 'string' ? repository.owner : repository.owner?.login;\n\tconst repositoryId = repository.id != null ? String(repository.id).trim() : '';\n\tif (repositoryId !== '') return `repository:${repositoryId}:pull-request:${pr.id}`;\n\n\tconst name = (repository.name ?? repository.repo)?.trim() ?? '';\n\tconst namespace = (repository.namespace ?? owner)?.trim() ?? '';\n\tconst project = repository.project?.trim() ?? '';\n\tif (name !== '' && (namespace !== '' || project !== '')) {\n\t\treturn `repository:${namespace}/${project}/${name}:pull-request:${pr.id}`;\n\t}\n\treturn urlIdentity;\n}\n\nexport type ProviderHierarchyResult<T> = PagedResult<T> & {\n\treadonly truncated?: boolean;\n\t/**\n\t * SDK collection metadata merged across the drained pages. Independent from the local `truncated` backstop:\n\t * a page-drain backstop stays visible even if every fetched page reported `complete`, and SDK\n\t * incompleteness is preserved even when the drain finished within its page budget.\n\t */\n\treadonly metadata?: CollectionMetadata;\n};\n\n/**\n * A normalized {@link PagedResult} that additionally carries the SDK's collection {@link CollectionMetadata}\n * (completeness + per-scope failures). Named to avoid colliding with the public ProviderBackend\n * `ProviderPagedResult` in `results.ts`: this is the integration-local carrier between the `ProvidersApi`\n * boundary and the code that maps metadata into warnings/truncation. `metadata` is optional so providers and\n * test doubles that predate the SDK metadata contract keep behaving exactly as before.\n */\nexport type ProviderApiPagedResult<T> = PagedResult<T> & {\n\treadonly metadata?: CollectionMetadata;\n};\n\n/**\n * A non-paged collection result carrying SDK {@link CollectionMetadata}. Used for fan-out reads that return a\n * flat set of values with completeness/failure metadata but no provider-native pagination (e.g. Jira project\n * discovery across resources, Trello board search).\n */\nexport type ProviderApiCollectionResult<T> = {\n\treadonly values: NonNullable<T>[];\n\treadonly metadata?: CollectionMetadata;\n};\n\nexport const ProviderPullRequestReviewState = GitPullRequestReviewState;\nexport const ProviderBuildStatusState = GitBuildStatusState;\nexport type ProviderRequestFunction = RequestFunction;\nexport type ProviderRequestResponse<T> = Response<T>;\nexport type ProviderRequestOptions = RequestOptions;\n\nexport enum PagingMode {\n\tProject = 'project',\n\tRepo = 'repo',\n\tRepos = 'repos',\n}\n\nexport interface PagingInput {\n\tcursor?: string | null;\n\tpage?: number;\n}\n\nexport interface PagedRepoInput {\n\trepo: GetRepoInput;\n\tcursor?: string;\n}\n\nexport interface PagedProjectInput {\n\tnamespace: string;\n\tproject: string;\n\tcursor?: string;\n}\n\nexport interface GetPullRequestsOptions {\n\tauthorLogin?: string;\n\tassigneeLogins?: string[];\n\treviewRequestedLogin?: string;\n\t// Reviewer filters keyed differently per provider: GitHub/GitLab use reviewRequestedLogin (login),\n\t// Bitbucket/Azure DevOps use reviewerId (account id), Bitbucket Server uses reviewerLogin (login).\n\treviewerId?: string;\n\treviewerLogin?: string;\n\tmentionLogin?: string;\n\t// PR states to include; when omitted the provider returns its default (open only).\n\tstates?: GitPullRequestState[];\n\tquery?: string;\n\tcursor?: string; // stringified JSON object of type { type: 'cursor' | 'page'; value: string | number } | {}\n\tbaseUrl?: string;\n\t// 1-based page to request from numbered-page providers; takes precedence over a page-typed cursor.\n\tpage?: number;\n\t// Items to request per page (numbered-page providers, plus GitHub's maxPageSize).\n\tpageSize?: number;\n\t// Opt in to repository remote metadata (clone URLs) when the PR payload lacks it. Only Azure DevOps\n\t// acts on this today (extra API call); it is a no-op for the other providers.\n\tincludeRemoteInfo?: boolean;\n\t// Field selection for the row shape. GitHub-shaped because it is the only provider whose PR read gates\n\t// anything on it; the others ignore it. Declared here rather than passed through a spread so a typo or a\n\t// wrong-shaped map is a compile error instead of a silently ignored key. An ABSENT map means \"select\n\t// everything\", so only summary reads pass one.\n\tfields?: GitHubPullRequestFieldMap;\n}\n\nexport interface GetPullRequestsForUserOptions {\n\tincludeFromArchivedRepos?: boolean;\n\tcursor?: string; // stringified JSON object of type { type: 'cursor' | 'page'; value: string | number } | {}\n\tbaseUrl?: string;\n\t// PR states to include; when omitted the provider returns its default (open only).\n\tstates?: GitPullRequestState[];\n\t/**\n\t * Items to request per page. Worth setting explicitly on an account-wide read that gets DRAINED: each\n\t * provider falls back to its own historical page size when this is omitted, and GitHub's is 15\n\t * (`MAX_PR_PAGE_SIZE`), so a drain pays ~7x the round trips of the 100 its search actually allows.\n\t */\n\tpageSize?: number;\n}\n\nexport interface GetPullRequestsForUserInput extends GetPullRequestsForUserOptions {\n\tuserId: string;\n}\n\nexport interface GetPullRequestsAssociatedWithUserInput extends GetPullRequestsForUserOptions {\n\tusername: string;\n}\n\nexport interface GetPullRequestsForRepoInput extends GetPullRequestsOptions {\n\trepo: GetRepoInput;\n}\n\nexport interface GetPullRequestsForReposInput extends GetPullRequestsOptions {\n\trepos: GetRepoInput[];\n}\n\nexport interface GetPullRequestsForRepoIdsInput extends GetPullRequestsOptions {\n\trepoIds: (string | number)[];\n}\n\nexport interface GetIssuesOptions {\n\tauthorLogin?: string;\n\tassigneeLogins?: string[];\n\tmentionLogin?: string;\n\t// Issue states to include; when omitted the provider returns its default (open only).\n\tstates?: GitIssueState[];\n\tcursor?: string; // stringified JSON object of type { type: 'cursor' | 'page'; value: string | number } | {}\n\tbaseUrl?: string;\n\t// 1-based page to request from numbered-page providers; takes precedence over a page-typed cursor.\n\tpage?: number;\n\t// Items to request per page (numbered-page providers, plus GitHub's maxPageSize).\n\tpageSize?: number;\n\t/**\n\t * How the provider should order the result, as `field:direction`.\n\t *\n\t * Passed through to the SDK verbatim — the translation to each provider's own vocabulary lives THERE, next to\n\t * the capability map it validates against, so that the table this facade publishes and the table that does the\n\t * translating can't drift apart across two repositories. A key the provider can't express raises the SDK's\n\t * `UnsupportedSortError`, which is why the facade validates against `supportedIssueSorts` first: reaching that\n\t * error means this table has outrun the SDK's.\n\t *\n\t * Always supplied by the facade's reads, never omitted. Omitting it would delegate the order to each provider's\n\t * own default, which is the incoherence across providers the SDK deliberately preserves and this layer\n\t * deliberately does not.\n\t */\n\tsort?: IssueSorting;\n}\n\nexport interface GetIssuesForRepoInput extends GetIssuesOptions {\n\trepo: GetRepoInput;\n}\n\nexport interface GetIssuesForReposInput extends GetIssuesOptions {\n\trepos: GetRepoInput[];\n}\n\nexport interface GetIssuesForRepoIdsInput extends GetIssuesOptions {\n\trepoIds: (string | number)[];\n}\n\nexport interface GetIssuesForProjectInput extends GetIssuesOptions {\n\tproject: string;\n\tresourceId: string;\n}\n\nexport interface GetIssuesForAzureProjectInput extends GetIssuesOptions {\n\tnamespace: string;\n\tproject: string;\n}\n\nexport interface GetReposOptions {\n\tcursor?: string; // stringified JSON object of type { type: 'cursor' | 'page'; value: string | number } | {}\n}\n\nexport interface GetReposForAzureProjectInput {\n\tnamespace: string;\n\tproject: string;\n}\n\nexport interface PageInfo {\n\thasNextPage: boolean;\n\tendCursor?: string | null;\n\tnextPage?: number | null;\n\t// Numbered-page providers (Bitbucket, Bitbucket Server, Azure DevOps) additionally report these.\n\tcurrentPage?: number | null;\n\ttotalPages?: number | null;\n\ttotalCount?: number | null;\n}\n\nexport type GetRepoFn = (\n\tinput: ProviderRepoInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderRepository }>;\nexport type GetRepoOfProjectFn = (\n\tinput: ProviderRepoInput & { project: string },\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderRepository }>;\n\nexport type GetPullRequestsForReposFn = (\n\tinput: (GetPullRequestsForReposInput | GetPullRequestsForRepoIdsInput) & PagingInput,\n\toptions?: EnterpriseOptions,\n\t// `metadata` carries SDK collection completeness/failures for multi-repo fan-outs (Bitbucket, Azure DevOps,\n\t// Bitbucket Server); `pageInfo` is present for the cursor-based aggregate (GitHub). Both are optional so\n\t// each provider only sets what it actually reports.\n) => Promise<{ data: ProviderPullRequest[]; pageInfo?: PageInfo; metadata?: CollectionMetadata }>;\n\nexport type GetPullRequestsForRepoFn = (\n\tinput: GetPullRequestsForRepoInput & PagingInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderPullRequest[]; pageInfo?: PageInfo }>;\n\nexport type GetPullRequestForRepoFn = (\n\tinput: { repo: ProviderRepoInput; number: number; includeRemoteInfo?: boolean },\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderPullRequest | null }>;\n\nexport type GetPullRequestsForUserFn = (\n\tinput: GetPullRequestsForUserInput | GetPullRequestsAssociatedWithUserInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderPullRequest[]; pageInfo?: PageInfo }>;\n\nexport type GetPullRequestsForAzureProjectsFn = (\n\tinput: {\n\t\tprojects: { namespace: string; project: string }[];\n\t\tauthorLogin?: string;\n\t\tassigneeLogins?: string[];\n\t\treviewerId?: string;\n\t\tstates?: GitPullRequestState[];\n\t\trepo?: ProviderRepoInput;\n\t},\n\toptions?: EnterpriseOptions,\n\t// Aggregate multi-project fan-out: no `pageInfo` (call getPullRequestsForAzureProject for that), but SDK\n\t// collection metadata reports per-project completeness/failures.\n) => Promise<{ data: ProviderPullRequest[]; metadata?: CollectionMetadata }>;\n\n/** Single Azure project PR read, paginated by number (unlike the aggregate {@link GetPullRequestsForAzureProjectsFn}). */\nexport type GetPullRequestsForAzureProjectFn = (\n\tinput: {\n\t\tnamespace: string;\n\t\tproject: string;\n\t\tauthorLogin?: string;\n\t\tassigneeLogins?: string[];\n\t\treviewerId?: string;\n\t\tstates?: GitPullRequestState[];\n\t\trepo?: ProviderRepoInput;\n\t} & PagingInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderPullRequest[]; pageInfo: { hasNextPage: boolean; nextPage: number | null } }>;\n\nexport type MergePullRequestFn =\n\t| ((\n\t\t\tinput: {\n\t\t\t\tpullRequest: {\n\t\t\t\t\theadRef: {\n\t\t\t\t\t\toid: string | null;\n\t\t\t\t\t} | null;\n\t\t\t\t\tversion?: number; // Used by BitbucketServer\n\t\t\t\t} & SetPullRequestInput;\n\t\t\t\tmergeStrategy?: GitMergeStrategy;\n\t\t\t},\n\t\t\toptions?: EnterpriseOptions,\n\t ) => Promise<void>)\n\t| ((\n\t\t\tinput: {\n\t\t\t\tpullRequest: {\n\t\t\t\t\theadRef: {\n\t\t\t\t\t\toid: string | null;\n\t\t\t\t\t} | null;\n\t\t\t\t} & SetPullRequestInput;\n\t\t\t\tmergeStrategy?: GitMergeStrategy.Squash;\n\t\t\t},\n\t\t\toptions?: EnterpriseOptions,\n\t ) => Promise<void>)\n\t| ((\n\t\t\tinput: {\n\t\t\t\tpullRequest: {\n\t\t\t\t\theadRef: {\n\t\t\t\t\t\toid: string;\n\t\t\t\t\t};\n\t\t\t\t} & AzureSetPullRequestInput;\n\t\t\t\tmergeStrategy?:\n\t\t\t\t\t| GitMergeStrategy.MergeCommit\n\t\t\t\t\t| GitMergeStrategy.Rebase\n\t\t\t\t\t| GitMergeStrategy.RebaseThenMergeCommit\n\t\t\t\t\t| GitMergeStrategy.Squash;\n\t\t\t},\n\t\t\toptions?: EnterpriseOptions,\n\t ) => Promise<void>);\n\nexport type GetIssueFn = (\n\tinput:\n\t\t| { resourceId: string; number: string } // jira\n\t\t| { namespace: string; name: string; number: string }, // gitlab\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderIssue }>;\n\nexport type GetIssuesForReposFn = (\n\tinput: (GetIssuesForReposInput | GetIssuesForRepoIdsInput) & PagingInput,\n\toptions?: EnterpriseOptions,\n\t// GitHub's multi-repo issue search reports its 1,000-result cap — and, when it recovers past it by\n\t// partitioning, what that recovery could not reach — through `metadata`. Documented on the contract for\n\t// the reader; `getPagedResult` accepts and forwards `metadata` from any provider fn regardless.\n) => Promise<{ data: ProviderIssue[]; pageInfo?: PageInfo; metadata?: CollectionMetadata }>;\n\nexport type GetIssuesForCurrentUserInput = PagingInput & {\n\t// GitLab's account-wide REST read (`GET /issues`): `scope` controls breadth ('assigned_to_me' vs 'all') and\n\t// the username fields independently narrow a broad read to a specific assignee or author. Other providers\n\t// (Linear) ignore these and page purely off the cursor.\n\tscope?: 'assigned_to_me' | 'all';\n\tassigneeUsername?: string;\n\tauthorUsername?: string;\n\tpageSize?: number;\n\t/** Linear only (GitLab's REST read has its own `state`, not threaded here). Omitted reads open issues. */\n\tstates?: GitIssueState[];\n\t/** See {@link GetIssuesOptions.sort}. */\n\tsort?: IssueSorting;\n};\n\nexport type GetIssuesForCurrentUserFn = (\n\tinput: GetIssuesForCurrentUserInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderIssue[]; pageInfo?: PageInfo }>;\n\nexport type GetIssuesForRepoFn = (\n\tinput: GetIssuesForRepoInput & PagingInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderIssue[]; pageInfo?: PageInfo }>;\n\nexport type GetIssuesForAzureProjectFn = (\n\tinput: GetIssuesForAzureProjectInput & PagingInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderIssue[]; pageInfo?: PageInfo }>;\n\nexport type GetReposForAzureProjectFn = (\n\tinput: GetReposForAzureProjectInput & PagingInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderRepository[]; pageInfo?: PageInfo }>;\n\nexport type GetOrgsForCurrentUserFn = (\n\tinput?: CursorPageInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderGitHubOrganization[]; pageInfo?: PageInfo }>;\nexport type GetReposForOrgFn = (\n\tinput: { orgName: string } & PagingInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderRepository[]; pageInfo?: PageInfo }>;\nexport type GetReposForWorkspaceFn = (\n\tinput: { workspace: string } & PagingInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderRepository[]; pageInfo?: PageInfo }>;\nexport type GetReposForCurrentUserFn = (\n\t// `affiliations` narrows GitHub's `/user/repos` read (owner/collaborator/organization_member);\n\t// GitLab's equivalent read ignores it.\n\tinput: PagingInput & { affiliations?: ('owner' | 'collaborator' | 'organization_member')[] },\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderRepository[]; pageInfo?: PageInfo }>;\nexport type GetGroupsForCurrentUserFn = (\n\tinput?: { topLevelOnly?: boolean } & PagingInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderGitLabGroup[]; pageInfo?: PageInfo }>;\n\nexport type GetCurrentUserFn = (\n\tinput: Record<string, never>,\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderAccount }>;\nexport type GetCurrentUserForInstanceFn = (\n\tinput: { namespace: string },\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderAccount }>;\nexport type GetCurrentUserForResourceFn = (\n\tinput: { resourceId: string },\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderAccount }>;\n\nexport type GetJiraResourcesForCurrentUserFn = (options?: EnterpriseOptions) => Promise<{ data: JiraResource[] }>;\nexport type GetLinearOrganizationFn = (options?: EnterpriseOptions) => Promise<{ data: LinearOrganization }>;\nexport type GetLinearTeamsForCurrentUserFn = (options?: EnterpriseOptions) => Promise<{ data: LinearTeam[] }>;\n// Derived from the client method, like the Jira reads below, so a filter the SDK adds (`assignees`, `states`)\n// reaches the type system instead of being smuggled through `getPagedResult`'s `any`.\nexport type GetLinearIssuesFn = Linear['getIssues'];\n/**\n * Linear's current-user (viewer) query. Its raw `@linear/sdk` User isn't a `ProviderAccount` (no\n * username/avatar/url), so it's typed with the minimal fields the viewer query actually returns rather than\n * importing `@linear/sdk` (which is bundled in the SDK dist and not a resolvable top-level dependency).\n */\nexport type GetLinearCurrentUserFn = (\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: { id: string; name?: string | null; email?: string | null; displayName?: string | null } }>;\nexport type GetJiraProjectsForResourcesFn = (\n\tinput: { resourceIds: string[] },\n\toptions?: EnterpriseOptions,\n\t// Fan-out across resources: preserves successful resources' projects and reports per-resource failures in\n\t// SDK collection metadata instead of throwing when a single resource fails.\n) => Promise<{ data: JiraProject[]; metadata?: CollectionMetadata }>;\nexport type GetJiraProjectsForResourceFn = (\n\tinput: { resourceId: string } & CursorPageInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: JiraProject[]; pageInfo?: PageInfo; metadata?: CollectionMetadata }>;\nexport type GetGitLabPullRequestsForUserAssociationFn = (\n\tinput: {\n\t\tusername: string;\n\t\tassociation: 'assigned' | 'authored' | 'reviewRequested';\n\t\tincludeFromArchivedRepos?: boolean;\n\t\tlabelNames?: string[];\n\t\trepo?: ProviderRepoInput;\n\t\tstates?: GitPullRequestState[];\n\t\tpageSize?: number;\n\t} & CursorPageInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: ProviderPullRequest[]; pageInfo?: PageInfo }>;\nexport type GetAzureResourcesForUserFn = (\n\tinput: { userId: string },\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: AzureOrganization[] }>;\nexport type GetAzureProjectsForResourceFn = (\n\tinput: { namespace: string; cursor?: string },\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: AzureProject[]; pageInfo?: PageInfo }>;\nexport type GetBitbucketResourcesForCurrentUserFn = (\n\tinput: { page?: number },\n\toptions?: EnterpriseOptions,\n) => Promise<{ data: BitbucketWorkspaceStub[]; pageInfo?: PageInfo }>;\nexport type GetBitbucketPullRequestsAuthoredByUserForWorkspaceFn = (\n\tinput: {\n\t\tuserId: string;\n\t\tworkspaceSlug: string;\n\t\tstates?: GitPullRequestState[];\n\t} & NumberedPageInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{\n\tpageInfo: {\n\t\thasNextPage: boolean;\n\t\tnextPage: number | null;\n\t};\n\tdata: GitPullRequest[];\n}>;\nexport type GetBitbucketServerPullRequestsForCurrentUserFn = (\n\tinput: { states?: GitPullRequestState[] } & NumberedPageInput,\n\toptions?: EnterpriseOptions,\n) => Promise<{\n\tpageInfo: {\n\t\thasNextPage: boolean;\n\t\tnextPage: number | null;\n\t};\n\tdata: GitPullRequest[];\n}>;\n/**\n * One page of a Jira issue search; `nextCursor` is the raw provider cursor, fed back verbatim. `metadata` is the\n * SDK's: a page that dropped an issue it could not read reports it there as `partial` with a `provider` failure\n * (GKDEV-3652).\n */\nexport type JiraIssuePage =\n\t| { data: ProviderIssue[]; hasMore: boolean; nextCursor: string | undefined; metadata?: CollectionMetadata }\n\t| undefined;\n\nexport type GetIssuesForProjectFn = Jira['getIssuesForProject'];\n// Jira Server's own reads, derived from its client rather than shared with Cloud's: every one of them is\n// addressed by the instance's `baseUrl`/`resourceUrl` instead of Cloud's `resourceId`, and its project read is\n// a single unpaged call, so the shapes genuinely differ.\nexport type GetJiraServerCurrentUserFn = JiraServer['getCurrentUser'];\nexport type GetJiraServerProjectsFn = (options?: EnterpriseOptions) => Promise<{ data: JiraServerProject[] }>;\nexport type GetJiraServerIssuesForProjectFn = JiraServer['getIssuesForProject'];\nexport type GetJiraServerIssuesForProjectsFn = JiraServer['getIssuesForProjects'];\nexport type GetJiraServerIssueFn = JiraServer['getIssue'];\nexport type GetJiraServerIssuesForCurrentUserFn = JiraServer['getIssuesForResourceForCurrentUser'];\nexport type GetIssuesForProjectsFn = Jira['getIssuesForProjects'];\n// Derived from the client method rather than hand-declared, as its project-scoped sibling above already is: the\n// hand-written shape named only `resourceId`, so every other field the SDK accepts (the cursor, the sort, the\n// transitions switch) was invisible to the type system and had to be smuggled through `getPagedResult`'s `any`.\nexport type GetIssuesForResourceForCurrentUserFn = Jira['getIssuesForResourceForCurrentUser'];\n\n// Trello reads (issues-capable provider). The Trello client is keyed by an `appKey` (the Trello app key from\n// the cloud token exchange) alongside the OAuth token, so these mirror the client method shapes directly.\nexport type GetTrelloCurrentUserFn = Trello['getCurrentUser'];\nexport type GetTrelloBoardsForCurrentUserFn = Trello['getBoardsForCurrentUser'];\nexport type GetTrelloListsForBoardFn = Trello['getListsForTrelloBoard'];\nexport type GetTrelloAccountForIdFn = Trello['getAccountForId'];\nexport type GetTrelloIssuesForBoardFn = Trello['getIssuesForBoard'];\nexport type GetTrelloLabelsForBoardFn = Trello['getLabelsForBoard'];\n\nexport interface ProviderInfo extends ProviderMetadata {\n\tprovider: GitHub | GitLab | Bitbucket | BitbucketServer | Jira | JiraServer | Linear | Trello | AzureDevOps;\n\tgetRepoFn?: GetRepoFn;\n\tgetRepoOfProjectFn?: GetRepoOfProjectFn;\n\tgetPullRequestsForReposFn?: GetPullRequestsForReposFn;\n\tgetPullRequestsForRepoFn?: GetPullRequestsForRepoFn;\n\tgetPullRequestForRepoFn?: GetPullRequestForRepoFn;\n\tgetPullRequestsForUserFn?: GetPullRequestsForUserFn;\n\tgetGitLabPullRequestsForUserAssociationFn?: GetGitLabPullRequestsForUserAssociationFn;\n\tgetPullRequestsForAzureProjectsFn?: GetPullRequestsForAzureProjectsFn;\n\tgetPullRequestsForAzureProjectFn?: GetPullRequestsForAzureProjectFn;\n\tgetIssueFn?: GetIssueFn;\n\tgetIssuesForReposFn?: GetIssuesForReposFn;\n\tgetIssuesForCurrentUserFn?: GetIssuesForCurrentUserFn;\n\tgetIssuesForRepoFn?: GetIssuesForRepoFn;\n\tgetIssuesForAzureProjectFn?: GetIssuesForAzureProjectFn;\n\tgetCurrentUserFn?: GetCurrentUserFn;\n\tgetCurrentUserForInstanceFn?: GetCurrentUserForInstanceFn;\n\tgetCurrentUserForResourceFn?: GetCurrentUserForResourceFn;\n\tgetJiraResourcesForCurrentUserFn?: GetJiraResourcesForCurrentUserFn;\n\tgetLinearOrganizationFn?: GetLinearOrganizationFn;\n\tgetLinearTeamsForCurrentUserFn?: GetLinearTeamsForCurrentUserFn;\n\tgetLinearIssuesFn?: GetLinearIssuesFn;\n\tgetLinearCurrentUserFn?: GetLinearCurrentUserFn;\n\tgetAzureResourcesForUserFn?: GetAzureResourcesForUserFn;\n\tgetBitbucketResourcesForCurrentUserFn?: GetBitbucketResourcesForCurrentUserFn;\n\tgetBitbucketPullRequestsAuthoredByUserForWorkspaceFn?: GetBitbucketPullRequestsAuthoredByUserForWorkspaceFn;\n\tgetBitbucketServerPullRequestsForCurrentUserFn?: GetBitbucketServerPullRequestsForCurrentUserFn;\n\tgetJiraProjectsForResourcesFn?: GetJiraProjectsForResourcesFn;\n\tgetJiraServerCurrentUserFn?: GetJiraServerCurrentUserFn;\n\tgetJiraServerProjectsFn?: GetJiraServerProjectsFn;\n\tgetJiraServerIssuesForProjectFn?: GetJiraServerIssuesForProjectFn;\n\tgetJiraServerIssuesForProjectsFn?: GetJiraServerIssuesForProjectsFn;\n\tgetJiraServerIssueFn?: GetJiraServerIssueFn;\n\tgetJiraServerIssuesForCurrentUserFn?: GetJiraServerIssuesForCurrentUserFn;\n\tgetJiraProjectsForResourceFn?: GetJiraProjectsForResourceFn;\n\tgetAzureProjectsForResourceFn?: GetAzureProjectsForResourceFn;\n\tgetIssuesForProjectFn?: GetIssuesForProjectFn;\n\tgetIssuesForProjectsFn?: GetIssuesForProjectsFn;\n\tgetReposForAzureProjectFn?: GetReposForAzureProjectFn;\n\tgetIssuesForResourceForCurrentUserFn?: GetIssuesForResourceForCurrentUserFn;\n\tmergePullRequestFn?: MergePullRequestFn;\n\tgetOrgsForCurrentUserFn?: GetOrgsForCurrentUserFn;\n\tgetReposForOrgFn?: GetReposForOrgFn;\n\tgetReposForWorkspaceFn?: GetReposForWorkspaceFn;\n\tgetReposForCurrentUserFn?: GetReposForCurrentUserFn;\n\tgetGroupsForCurrentUserFn?: GetGroupsForCurrentUserFn;\n\tgetTrelloCurrentUserFn?: GetTrelloCurrentUserFn;\n\tgetTrelloBoardsForCurrentUserFn?: GetTrelloBoardsForCurrentUserFn;\n\tgetTrelloListsForBoardFn?: GetTrelloListsForBoardFn;\n\tgetTrelloAccountForIdFn?: GetTrelloAccountForIdFn;\n\tgetTrelloIssuesForBoardFn?: GetTrelloIssuesForBoardFn;\n\tgetTrelloLabelsForBoardFn?: GetTrelloLabelsForBoardFn;\n}\n\nexport interface ProviderMetadata {\n\tdomain: string;\n\tid: IntegrationIds;\n\tname: string;\n\ttype: IntegrationType;\n\t/** Key for the `gl-provider-<iconKey>` glicon. Cloud self-managed variants reuse the base\n\t * `'github-enterprise'`/`'gitlab-self-hosted'` icon (no enum member exists for those anymore). */\n\ticonKey: string;\n\tissuesPagingMode?: PagingMode;\n\tpullRequestsPagingMode?: PagingMode;\n\tscopes: string[];\n\tsupportedPullRequestFilters?: PullRequestFilter[];\n\t/**\n\t * Relationship filters the ACCOUNT-WIDE pull-request read can express as an exact OR union.\n\t * This is independent from `supportedPullRequestFilters`, which describes repo-scoped reads.\n\t */\n\tsupportedAccountWidePullRequestFilters?: PullRequestFilter[];\n\t/**\n\t * What the filtered pull-request search can express server-side. Absent means the provider has\n\t * no such search and the facade refuses it rather than returning an unfiltered page.\n\t */\n\tsupportedPullRequestSearch?: PullRequestSearchCapabilities;\n\t/**\n\t * Maximum results the provider will serve for one pull-request search facet. Matches beyond it are unreachable\n\t * and are reported as a succeeded omission carrying this limit plus the provider's pre-ceiling facet count.\n\t */\n\tpullRequestSearchResultLimit?: number;\n\t/** Filters the REPO-scoped issue read can express. */\n\tsupportedIssueFilters?: IssueFilter[];\n\t/**\n\t * Filters the ACCOUNT-WIDE issue read can express, which is NOT the same set as\n\t * {@link ProviderMetadata.supportedIssueFilters}: the two reads are different provider queries.\n\t *\n\t * Unfiltered, each provider's account-wide read is that provider's own definition of \"my issues\" — GitHub/GHE\n\t * union authored + assigned + mentioned, Azure drains assigned + authored, and GitLab reads assigned-to-me.\n\t * A consumer replacing a narrower tool (`gk`'s `assignee:@me`) must select the `Assignee` filter wherever the\n\t * provider's default is wider.\n\t *\n\t * A filter listed here narrows that read server-side. Absent/empty means the read can't be narrowed at all,\n\t * so the facade refuses a filtered request rather than serving the unnarrowed union as if it had been\n\t * filtered. GitLab lists `Assignee` and `Author` because the SDK's account-wide input exposes both username\n\t * axes; it omits `Mention` because that REST read has no first-class mention filter.\n\t */\n\tsupportedAccountWideIssueFilters?: IssueFilter[];\n\t/**\n\t * Sort keys the REPO-scoped issue read can express server-side — and, for an issue tracker (Jira/Linear/Trello),\n\t * its project-scoped read, which is the only issue surface a tracker has.\n\t *\n\t * Absent/empty means the read can't be ordered at all, so a request carrying `sort` is refused rather than\n\t * served in whatever order the provider felt like. Present, it is a promise: every key here reaches the\n\t * provider query.\n\t *\n\t * A key listed here is expressible on ONE provider query, which is what this read is when it is given ONE\n\t * scope. Given several (GitLab across repositories, Azure across projects, a tracker across projects) it merges\n\t * their results here and can only honor a key a normalized issue carries, so it additionally refuses\n\t * `priority`/`dueDate`/`resolved` — see `getIssueComparator`. That depends on the caller's scope count rather\n\t * than on the provider, which is why it is a runtime refusal and not a fourth table: encoding it here would\n\t * under-report the single-scope read, which really does support those keys.\n\t */\n\tsupportedIssueSorts?: IssueSorting[];\n\t/**\n\t * Sort keys the ACCOUNT-WIDE issue read can express server-side, which is NOT the same set as\n\t * {@link ProviderMetadata.supportedIssueSorts} — for GitLab the two reads are different APIs (GraphQL vs REST)\n\t * with genuinely different vocabularies, not one narrowed twice.\n\t *\n\t * Absent means the account-wide read can't be ordered (or doesn't exist). An issue tracker leaves this empty\n\t * and reports under `supportedIssueSorts`, so reading a tracker's capability from here under-reports it.\n\t *\n\t * Unlike {@link ProviderMetadata.supportedIssueSorts} this needs no companion runtime refusal, because every\n\t * provider's account-wide read is a union of several queries with no scope count for a caller to reduce: it\n\t * ALWAYS merges. So the keys a merge can't order by are simply absent here — the table states what the read can\n\t * honor, which is what makes intersecting against it sufficient.\n\t */\n\tsupportedAccountWideIssueSorts?: IssueSorting[];\n\t/**\n\t * Whether issue list reads (including Azure project/repository and account-wide reads) can be asked for a `state` other than open, and honor it server-side.\n\t *\n\t * A tracker read is open-only unless asked otherwise, so absent does not mean the read returns every state: it\n\t * means only `'open'` is expressible, and `'closed'`/`'all'` are refused rather than served as the open list.\n\t * Server-side, because each read drains to a page backstop: dropping states afterwards would let a project full\n\t * of done work spend that budget before reaching the open issues.\n\t */\n\tsupportsIssueStates?: boolean;\n\t/**\n\t * What the provider's FILTERED issue search (`searchIssuesPage`, and the `countIssues` probe over the same\n\t * criteria) can express server-side. A third, wider surface than either filter set above: it is not bound to\n\t * the user at all, so it takes relationships those reads have no way to name (`any-assignee`, `unassigned`),\n\t * plus free text and issue attributes.\n\t *\n\t * Absent means the provider has NO filtered issue search and the read is refused. Present, it is a promise:\n\t * every field declared here reaches the provider query, so a consumer that intersects against it never has a\n\t * read refused, and a criterion is never silently ignored.\n\t */\n\tsupportedIssueSearch?: IssueSearchCapabilities;\n\t/**\n\t * The maximum number of results the provider's filtered issue search will serve for ONE query, however it is\n\t * paged. Matches past it are UNREACHABLE, not merely unfetched, which is why a read that hits this reports an\n\t * omission with `recovery: 'none'` and the total match count rather than offering a \"load more\".\n\t *\n\t * Absent means the provider declares no ceiling, in which case a truncated read falls back to generic wording\n\t * instead of quoting a limit that was never published.\n\t */\n\tissueSearchResultLimit?: number;\n\t/**\n\t * Whether the filtered searches reach the provider with scope names verbatim — as encoded URL segments, or\n\t * matched against the names discovery reported — rather than inside a query string the provider sanitizes.\n\t *\n\t * Relaxes the scope-name rule (`isUsableSearchScopeName`) for that provider to refuse only blank names and\n\t * control characters: a space or a quote can't split or alter a scope that is never parsed as a query, and\n\t * refusing them would refuse real names. Absent for a query-string search (GitHub's), where both do.\n\t */\n\texactSearchScopeNames?: boolean;\n}\n\nexport type Providers = Record<IntegrationIds, ProviderInfo>;\nexport type ProvidersMetadata = Record<IntegrationIds, ProviderMetadata>;\n\n/**\n * GitHub and GitHub Enterprise express every criterion as a search qualifier on the same GraphQL `search` field,\n * so the two share one declaration — a GHE instance running the same search syntax has the same capability, and\n * two copies of this table would be free to drift.\n *\n * Every entry is a claim the implementation must keep: `searchIssuesPage` emits a qualifier for each of these,\n * and a test asserts that (see the `issueSearch` capability tests) so the table can't quietly outrun the code.\n */\nconst githubIssueSearchCapabilities: IssueSearchCapabilities = {\n\t// `author:@me` / `assignee:@me` / `mentions:@me` / `assignee:*` / `no:assignee`, each its own aliased search.\n\trelationships: ['authored', 'assigned', 'mentioned', 'any-assignee', 'unassigned'],\n\ttext: true,\n\tlabels: true,\n\tmilestone: true,\n\tupdatedAfter: true,\n\tcreatedAfter: true,\n\t// `-linked:pr`.\n\twithoutLinkedPullRequest: true,\n\t// `is:open` / `is:closed`, or neither for all states.\n\tstates: true,\n\t// `sort:created-desc`, `sort:updated`, `sort:comments-asc`, … — see `githubIssueSorts`.\n\tsorts: githubIssueSorts,\n};\n\n/**\n * The ordering vocabulary of GitHub's filtered PR search: `created` and `updated`, both directions.\n *\n * Hand-declared rather than derived from `@gitkraken/provider-apis` (which has no PR-sort surface), and narrower\n * than the issue set on purpose: the merged relationship × state facets can only be re-ordered by a field a\n * `PullRequestShape` carries (see `getPullRequestComparator`), and GitHub PRs have no priority and no relevance\n * that orders stably under the result ceiling. A parity test pins this to `gitHubPullRequestSortQualifiers`' keys\n * so the capability can't outrun the emitter.\n */\nconst githubPullRequestSorts: PullRequestSorting[] = ['updated:desc', 'updated:asc', 'created:desc', 'created:asc'];\n\n/** GitHub and GHE use the same filtered pull-request search syntax and result ceiling. */\nconst githubPullRequestSearchCapabilities: PullRequestSearchCapabilities = {\n\trelationships: [\n\t\tPullRequestFilter.Author,\n\t\tPullRequestFilter.Assignee,\n\t\tPullRequestFilter.ReviewRequested,\n\t\tPullRequestFilter.Reviewed,\n\t\tPullRequestFilter.Mention,\n\t],\n\tstates: ['open', 'closed', 'merged', 'all'],\n\ttext: true,\n\tupdatedAfter: true,\n\tcreatedAfter: true,\n\tincludeArchived: true,\n\tdraft: true,\n\trepositoryScope: true,\n\torganizationScope: true,\n\t// `sort:updated`, `sort:updated-asc`, `sort:created-desc`, `sort:created-asc` — see `githubPullRequestSorts`.\n\tsorts: githubPullRequestSorts,\n};\n\n/**\n * Bitbucket Data Center's filtered pull-request search (`bitbucket-server/pullRequestSearch.ts`), declared from what\n * its REST API can express rather than from what a PR shape carries:\n * - relationships: `role=AUTHOR`, and a reviewer's `UNAPPROVED` status for a pending review versus `APPROVED` or\n * `NEEDS_WORK` for one already given. A Bitbucket pull request has no assignee, and nothing filters by mention.\n * - text is `filterText` (title or description), draft is `draft`, and archived repositories are excluded unless\n * asked for — all re-checked on each row, since the dashboard read has neither filter.\n * - no date filters and no `created` ordering: `order` is only `NEWEST`/`OLDEST` by last update, and filtering a\n * date on the rows read would page through everything before it.\n * - no organization scope: there is no project-wide pull-request list, only per repository and the dashboard.\n */\nconst bitbucketServerPullRequestSearchCapabilities: PullRequestSearchCapabilities = {\n\trelationships: [PullRequestFilter.Author, PullRequestFilter.ReviewRequested, PullRequestFilter.Reviewed],\n\tstates: ['open', 'closed', 'merged', 'all'],\n\ttext: true,\n\tupdatedAfter: false,\n\tcreatedAfter: false,\n\tincludeArchived: true,\n\tdraft: true,\n\trepositoryScope: true,\n\torganizationScope: false,\n\tsorts: ['updated:desc', 'updated:asc'],\n};\n\n/**\n * Azure DevOps Server's filtered pull-request search. Azure's pull request query narrows only by creator, reviewer,\n * status and repository, so the provider drains each facet and applies text, draft and dates to the complete facet\n * before merging — so a criterion never narrows a page after its count, and the only sort keys are the two a merged\n * page can be re-ordered by. What text and `updatedAfter` match is bounded by the list endpoint: see\n * `toAzurePullRequestSearchFilter`.\n *\n * `Assignee` and `ReviewRequested` both read by reviewer: Azure has no assignee distinct from its reviewers.\n * `Reviewed` and `Mention` are absent because the pull request query has no axis for either, and `includeArchived`\n * because Azure has no archived repositories to exclude.\n */\nconst azureServerPullRequestSearchCapabilities: PullRequestSearchCapabilities = {\n\trelationships: [PullRequestFilter.Author, PullRequestFilter.Assignee, PullRequestFilter.ReviewRequested],\n\tstates: ['open', 'closed', 'merged', 'all'],\n\ttext: true,\n\tupdatedAfter: true,\n\tcreatedAfter: true,\n\tincludeArchived: false,\n\tdraft: true,\n\trepositoryScope: true,\n\torganizationScope: true,\n\tsorts: azurePullRequestSearchSorts,\n};\n\n/**\n * Azure DevOps Server's filtered work-item search: one WIQL query per collection, every criterion a clause of it.\n * `mentioned` is absent because `@RecentMentions` only reaches back 30 days; `milestone` and\n * `withoutLinkedPullRequest` because WIQL has no flat-query clause for either. See `azure/search.ts`.\n */\nconst azureServerIssueSearchCapabilities: IssueSearchCapabilities = {\n\trelationships: azureWorkItemSearchRelationships,\n\ttext: true,\n\tlabels: true,\n\tmilestone: false,\n\tupdatedAfter: true,\n\tcreatedAfter: true,\n\twithoutLinkedPullRequest: false,\n\tstates: true,\n\tsorts: azureWorkItemSearchSorts,\n};\n\nexport const providersMetadata: ProvidersMetadata = {\n\t[GitCloudHostIntegrationId.GitHub]: {\n\t\tdomain: 'github.com',\n\t\tid: GitCloudHostIntegrationId.GitHub,\n\t\tname: 'GitHub',\n\t\ttype: 'git',\n\t\ticonKey: GitCloudHostIntegrationId.GitHub,\n\t\tissuesPagingMode: PagingMode.Repos,\n\t\tpullRequestsPagingMode: PagingMode.Repos,\n\t\t// Use 'username' property on account for PR filters\n\t\tsupportedPullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t\tPullRequestFilter.Mention,\n\t\t],\n\t\tsupportedAccountWidePullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t\tPullRequestFilter.Reviewed,\n\t\t\tPullRequestFilter.Mention,\n\t\t],\n\t\tsupportedPullRequestSearch: githubPullRequestSearchCapabilities,\n\t\tpullRequestSearchResultLimit: githubSearchResultLimit,\n\t\t// Use 'username' property on account for issue filters\n\t\tsupportedIssueFilters: [IssueFilter.Author, IssueFilter.Assignee, IssueFilter.Mention],\n\t\t// The account-wide read is three independent searches (`author:@me`, `assignee:@me`, `mentions:@me`) behind\n\t\t// one composite cursor, so any subset of them is expressible.\n\t\tsupportedAccountWideIssueFilters: [IssueFilter.Author, IssueFilter.Assignee, IssueFilter.Mention],\n\t\t// One `search` field serves all three issue reads (repo-scoped, account-wide, filtered search), so the same\n\t\t// qualifiers are expressible on each — the account-wide one narrowed to what its three-alias merge can order.\n\t\tsupportedIssueSorts: githubIssueSorts,\n\t\tsupportedAccountWideIssueSorts: githubAccountWideIssueSorts,\n\t\tsupportedIssueSearch: githubIssueSearchCapabilities,\n\t\tissueSearchResultLimit: githubSearchResultLimit,\n\t\tscopes: ['repo', 'read:user', 'user:email'],\n\t},\n\t[GitSelfManagedHostIntegrationId.CloudGitHubEnterprise]: {\n\t\tdomain: '',\n\t\tid: GitSelfManagedHostIntegrationId.CloudGitHubEnterprise,\n\t\tname: 'GitHub Enterprise',\n\t\ttype: 'git',\n\t\ticonKey: 'github-enterprise',\n\t\tissuesPagingMode: PagingMode.Repos,\n\t\tpullRequestsPagingMode: PagingMode.Repos,\n\t\t// Use 'username' property on account for PR filters\n\t\tsupportedPullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t\tPullRequestFilter.Mention,\n\t\t],\n\t\tsupportedAccountWidePullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t\tPullRequestFilter.Reviewed,\n\t\t\tPullRequestFilter.Mention,\n\t\t],\n\t\tsupportedPullRequestSearch: githubPullRequestSearchCapabilities,\n\t\tpullRequestSearchResultLimit: githubSearchResultLimit,\n\t\t// Use 'username' property on account for issue filters\n\t\tsupportedIssueFilters: [IssueFilter.Author, IssueFilter.Assignee, IssueFilter.Mention],\n\t\t// The account-wide read is three independent searches (`author:@me`, `assignee:@me`, `mentions:@me`) behind\n\t\t// one composite cursor, so any subset of them is expressible.\n\t\tsupportedAccountWideIssueFilters: [IssueFilter.Author, IssueFilter.Assignee, IssueFilter.Mention],\n\t\t// One `search` field serves all three issue reads (repo-scoped, account-wide, filtered search), so the same\n\t\t// qualifiers are expressible on each — the account-wide one narrowed to what its three-alias merge can order.\n\t\tsupportedIssueSorts: githubIssueSorts,\n\t\tsupportedAccountWideIssueSorts: githubAccountWideIssueSorts,\n\t\tsupportedIssueSearch: githubIssueSearchCapabilities,\n\t\tissueSearchResultLimit: githubSearchResultLimit,\n\t\tscopes: ['repo', 'read:user', 'user:email'],\n\t},\n\t[GitCloudHostIntegrationId.GitLab]: {\n\t\tdomain: 'gitlab.com',\n\t\tid: GitCloudHostIntegrationId.GitLab,\n\t\tname: 'GitLab',\n\t\ttype: 'git',\n\t\ticonKey: GitCloudHostIntegrationId.GitLab,\n\t\tissuesPagingMode: PagingMode.Repo,\n\t\tpullRequestsPagingMode: PagingMode.Repo,\n\t\t// Use 'username' property on account for PR filters\n\t\tsupportedPullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t],\n\t\tsupportedAccountWidePullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t],\n\t\t// Use 'username' property on account for issue filters\n\t\tsupportedIssueFilters: [IssueFilter.Author, IssueFilter.Assignee],\n\t\t// The account-wide read drains one `scope=assigned_to_me` pass and one `scope=all` + `authorUsername` pass,\n\t\t// unioned, so either axis is expressible on its own. Mention is absent because GitLab's REST issue read has\n\t\t// no first-class mention filter to narrow with.\n\t\tsupportedAccountWideIssueFilters: [IssueFilter.Assignee, IssueFilter.Author],\n\t\t// Two different surfaces, not one narrowed twice: the repository-scoped read is GraphQL and the\n\t\t// account-wide one is REST, and REST has neither `title` nor `closed_at`.\n\t\tsupportedIssueSorts: gitlabIssueSorts,\n\t\tsupportedAccountWideIssueSorts: gitlabAccountWideIssueSorts,\n\t\tscopes: ['api', 'read_user', 'read_repository'],\n\t},\n\t[GitSelfManagedHostIntegrationId.CloudGitLabSelfHosted]: {\n\t\tdomain: '',\n\t\tid: GitSelfManagedHostIntegrationId.CloudGitLabSelfHosted,\n\t\tname: 'GitLab Self-Hosted',\n\t\ttype: 'git',\n\t\ticonKey: 'gitlab-self-hosted',\n\t\tissuesPagingMode: PagingMode.Repo,\n\t\tpullRequestsPagingMode: PagingMode.Repo,\n\t\t// Use 'username' property on account for PR filters\n\t\tsupportedPullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t],\n\t\tsupportedAccountWidePullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t],\n\t\t// Use 'username' property on account for issue filters\n\t\tsupportedIssueFilters: [IssueFilter.Author, IssueFilter.Assignee],\n\t\t// The account-wide read drains one `scope=assigned_to_me` pass and one `scope=all` + `authorUsername` pass,\n\t\t// unioned, so either axis is expressible on its own. Mention is absent because GitLab's REST issue read has\n\t\t// no first-class mention filter to narrow with.\n\t\tsupportedAccountWideIssueFilters: [IssueFilter.Assignee, IssueFilter.Author],\n\t\t// Two different surfaces, not one narrowed twice: the repository-scoped read is GraphQL and the\n\t\t// account-wide one is REST, and REST has neither `title` nor `closed_at`.\n\t\tsupportedIssueSorts: gitlabIssueSorts,\n\t\tsupportedAccountWideIssueSorts: gitlabAccountWideIssueSorts,\n\t\tscopes: ['api', 'read_user', 'read_repository'],\n\t},\n\t[GitCloudHostIntegrationId.Bitbucket]: {\n\t\tdomain: 'bitbucket.org',\n\t\tid: GitCloudHostIntegrationId.Bitbucket,\n\t\tname: 'Bitbucket',\n\t\ttype: 'git',\n\t\ticonKey: GitCloudHostIntegrationId.Bitbucket,\n\t\tpullRequestsPagingMode: PagingMode.Repo,\n\t\t// Use 'id' property on account for PR filters (reviewer filter keyed by account id / reviewerId)\n\t\tsupportedPullRequestFilters: [PullRequestFilter.Author, PullRequestFilter.ReviewRequested],\n\t\tsupportedAccountWidePullRequestFilters: [PullRequestFilter.Author, PullRequestFilter.ReviewRequested],\n\t\tscopes: ['account:read', 'repository:read', 'pullrequest:read', 'issue:read'],\n\t},\n\t[GitSelfManagedHostIntegrationId.BitbucketServer]: {\n\t\tdomain: '',\n\t\tid: GitSelfManagedHostIntegrationId.BitbucketServer,\n\t\tname: 'Bitbucket Data Center',\n\t\ttype: 'git',\n\t\ticonKey: GitSelfManagedHostIntegrationId.BitbucketServer,\n\t\tsupportedPullRequestFilters: [PullRequestFilter.Author, PullRequestFilter.ReviewRequested],\n\t\tsupportedAccountWidePullRequestFilters: [PullRequestFilter.Author, PullRequestFilter.ReviewRequested],\n\t\tsupportedPullRequestSearch: bitbucketServerPullRequestSearchCapabilities,\n\t\t// No `pullRequestSearchResultLimit`: nothing caps how far a search pages.\n\t\tscopes: ['Project (Read)', 'Repository (Write)'],\n\t},\n\t[GitCloudHostIntegrationId.AzureDevOps]: {\n\t\tsupportsIssueStates: true,\n\t\tdomain: 'dev.azure.com',\n\t\tid: GitCloudHostIntegrationId.AzureDevOps,\n\t\tname: 'Azure DevOps',\n\t\ttype: 'git',\n\t\ticonKey: GitCloudHostIntegrationId.AzureDevOps,\n\t\tissuesPagingMode: PagingMode.Project,\n\t\tpullRequestsPagingMode: PagingMode.Repo,\n\t\t// Use 'id' property on account for PR filters (reviewer filter keyed by account id / reviewerId)\n\t\tsupportedPullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t],\n\t\tsupportedAccountWidePullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t],\n\t\t// Use 'name' property on account for issue filters\n\t\tsupportedIssueFilters: [IssueFilter.Author, IssueFilter.Assignee, IssueFilter.Mention],\n\t\t// The account-wide read drains one (project × assignee) and one (project × author) query per project, so\n\t\t// either axis is expressible on its own. There is no mention query to narrow to.\n\t\tsupportedAccountWideIssueFilters: [IssueFilter.Author, IssueFilter.Assignee],\n\t\t// Both reads emit the same WIQL, but the account-wide one drains every (project x relationship) query and\n\t\t// merges the results, so it can only honor keys a normalized issue carries — `resolved` and `priority` are\n\t\t// dropped from that surface for the same reason they are dropped from GitLab's.\n\t\tsupportedIssueSorts: azureIssueSorts,\n\t\tsupportedAccountWideIssueSorts: azureAccountWideIssueSorts,\n\t\tscopes: ['vso.code', 'vso.identity', 'vso.project', 'vso.profile', 'vso.work'],\n\t},\n\t[GitSelfManagedHostIntegrationId.AzureDevOpsServer]: {\n\t\tsupportsIssueStates: true,\n\t\tdomain: '',\n\t\tid: GitSelfManagedHostIntegrationId.AzureDevOpsServer,\n\t\tname: 'Azure DevOps Server',\n\t\ttype: 'git',\n\t\ticonKey: GitCloudHostIntegrationId.AzureDevOps,\n\t\tissuesPagingMode: PagingMode.Project,\n\t\tpullRequestsPagingMode: PagingMode.Repo,\n\t\t// Use 'id' property on account for PR filters (reviewer filter keyed by account id / reviewerId)\n\t\tsupportedPullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t],\n\t\tsupportedAccountWidePullRequestFilters: [\n\t\t\tPullRequestFilter.Author,\n\t\t\tPullRequestFilter.Assignee,\n\t\t\tPullRequestFilter.ReviewRequested,\n\t\t],\n\t\t// Use 'name' property on account for issue filters\n\t\tsupportedIssueFilters: [IssueFilter.Author, IssueFilter.Assignee, IssueFilter.Mention],\n\t\t// The account-wide read drains one (project × assignee) and one (project × author) query per project, so\n\t\t// either axis is expressible on its own. There is no mention query to narrow to.\n\t\tsupportedAccountWideIssueFilters: [IssueFilter.Author, IssueFilter.Assignee],\n\t\t// Both reads emit the same WIQL, but the account-wide one drains every (project x relationship) query and\n\t\t// merges the results, so it can only honor keys a normalized issue carries — `resolved` and `priority` are\n\t\t// dropped from that surface for the same reason they are dropped from GitLab's.\n\t\tsupportedIssueSorts: azureIssueSorts,\n\t\tsupportedAccountWideIssueSorts: azureAccountWideIssueSorts,\n\t\tsupportedPullRequestSearch: azureServerPullRequestSearchCapabilities,\n\t\tsupportedIssueSearch: azureServerIssueSearchCapabilities,\n\t\tissueSearchResultLimit: azureWorkItemSearchResultLimit,\n\t\texactSearchScopeNames: true,\n\t\tscopes: ['vso.code', 'vso.identity', 'vso.project', 'vso.profile', 'vso.work'],\n\t},\n\t[IssuesCloudHostIntegrationId.Jira]: {\n\t\tdomain: 'atlassian.net',\n\t\tid: IssuesCloudHostIntegrationId.Jira,\n\t\tname: 'Jira',\n\t\ttype: 'issues',\n\t\ticonKey: IssuesCloudHostIntegrationId.Jira,\n\t\tscopes: [\n\t\t\t'read:status:jira',\n\t\t\t'read:application-role:jira',\n\t\t\t'read:attachment:jira',\n\t\t\t'write:attachment:jira',\n\t\t\t'read:comment:jira',\n\t\t\t'read:project-category:jira',\n\t\t\t'read:project:jira',\n\t\t\t'read:issue.vote:jira',\n\t\t\t'read:field-configuration:jira',\n\t\t\t'write:issue:jira',\n\t\t\t'read:issue-security-level:jira',\n\t\t\t'write:issue.property:jira',\n\t\t\t'read:issue.changelog:jira',\n\t\t\t'read:avatar:jira',\n\t\t\t'read:issue-meta:jira',\n\t\t\t'read:permission:jira',\n\t\t\t'offline_access',\n\t\t\t'read:issue:jira',\n\t\t\t'read:me',\n\t\t\t'read:audit-log:jira',\n\t\t\t'read:project.component:jira',\n\t\t\t'read:group:jira',\n\t\t\t'read:project-role:jira',\n\t\t\t'write:comment:jira',\n\t\t\t'read:label:jira',\n\t\t\t'write:comment.property:jira',\n\t\t\t'read:issue-details:jira',\n\t\t\t'read:issue-type-hierarchy:jira',\n\t\t\t'read:issue.transition:jira',\n\t\t\t'read:user:jira',\n\t\t\t'read:field:jira',\n\t\t\t'read:issue-type:jira',\n\t\t\t'read:project.property:jira',\n\t\t\t'read:comment.property:jira',\n\t\t\t'read:project-version:jira',\n\t\t],\n\t\tsupportedIssueFilters: [IssueFilter.Author, IssueFilter.Assignee, IssueFilter.Mention],\n\t\t// A tracker's issues live under resource -> project, so it has no account-wide surface to declare: its\n\t\t// capability is reported under `issues`, which is what `listIssueTrackerIssuesPage` validates against.\n\t\tsupportedIssueSorts: jiraIssueSorts,\n\t\t// `statusCategory` clauses in the same JQL, shared with Server through `jiraHelpers`.\n\t\tsupportsIssueStates: true,\n\t},\n\t[IssuesSelfManagedHostIntegrationId.JiraServer]: {\n\t\t// Self-hosted: there is no canonical domain, so every read is addressed by the connection's own host\n\t\t// (see `JiraServerIntegration.apiBaseUrl`), exactly as the self-managed git hosts do.\n\t\tdomain: '',\n\t\tid: IssuesSelfManagedHostIntegrationId.JiraServer,\n\t\tname: 'Jira Data Center',\n\t\ttype: 'issues',\n\t\t// Reuses Jira's glicon: it is the same product, and the id only selects an icon.\n\t\ticonKey: IssuesCloudHostIntegrationId.Jira,\n\t\t// Jira Cloud's entries are Atlassian OAuth scope strings, which a self-hosted instance doesn't issue:\n\t\t// its token is a PAT the backend stores as-is, so there is no scope set to request.\n\t\tscopes: [],\n\t\t// The same JQL clauses Cloud narrows with — `jiraHelpers` builds one query for both.\n\t\tsupportedIssueFilters: [IssueFilter.Author, IssueFilter.Assignee, IssueFilter.Mention],\n\t\t// One JQL `ORDER BY` builder serves Cloud and Server, so they share a surface (see `issueSorts.ts`).\n\t\tsupportedIssueSorts: jiraIssueSorts,\n\t\tsupportsIssueStates: true,\n\t},\n\t[IssuesCloudHostIntegrationId.Linear]: {\n\t\tdomain: 'linear.app',\n\t\tid: IssuesCloudHostIntegrationId.Linear,\n\t\tname: 'Linear',\n\t\ttype: 'issues',\n\t\ticonKey: IssuesCloudHostIntegrationId.Linear,\n\t\tscopes: [],\n\t\t// Linear scopes \"my issues\" client-side by the viewer's assignee id; author/mention aren't supported.\n\t\tsupportedIssueFilters: [IssueFilter.Assignee],\n\t\t// Both directions, and one table for both reads: they are the same root `issues` query taking the same\n\t\t// `sort` argument, so there is no account-wide narrowing to declare.\n\t\tsupportedIssueSorts: linearIssueSorts,\n\t\t// A workflow-state type clause on both reads (`completed`/`canceled`/`duplicate` are closed), the same types\n\t\t// the SDK normalizes to a terminal category (`DONE`, or `CANCELED` for the last two).\n\t\tsupportsIssueStates: true,\n\t},\n\t[IssuesCloudHostIntegrationId.Trello]: {\n\t\tdomain: 'trello.com',\n\t\tid: IssuesCloudHostIntegrationId.Trello,\n\t\tname: 'Trello',\n\t\ttype: 'issues',\n\t\ticonKey: IssuesCloudHostIntegrationId.Trello,\n\t\tscopes: [],\n\t\t// Trello cards are filtered by the assignee (member) only; author/mention have no Trello equivalent.\n\t\tsupportedIssueFilters: [IssueFilter.Assignee],\n\t\t// `sort:edited` / `sort:-edited`. Trello's other search sorts (`created`, `due`) have no card-order effect.\n\t\tsupportedIssueSorts: trelloIssueSorts,\n\t\t// No `supportsIssueStates`: a card has no state beyond being archived, and the board read always sends\n\t\t// `-is:archived`, so `'closed'`/`'all'` are refused rather than answered with the open cards.\n\t},\n};\n\nexport function getReasonsForUserIssue(issue: ProviderIssue, userLogin: string): string[] {\n\tconst reasons: string[] = [];\n\tlet isAuthor = false;\n\tlet isAssignee = false;\n\tif (issue.author?.username === userLogin || issue.author?.name === userLogin) {\n\t\treasons.push('authored');\n\t\tisAuthor = true;\n\t}\n\tif (issue.assignees?.some(assignee => assignee.username === userLogin || assignee.name === userLogin)) {\n\t\treasons.push('assigned');\n\t\tisAssignee = true;\n\t}\n\n\t// TODO: Impossible to denote all issues we are mentioned on given their properties. for now just\n\t// assume we are mentioned on any of our issues we are not the author or assignee on\n\tif (!isAuthor && !isAssignee) {\n\t\treasons.push('mentioned');\n\t}\n\n\treturn reasons;\n}\n\nfunction toIssueIdentifier(value: string | number): string {\n\treturn String(value);\n}\n\nfunction toIssueProviderState(state: ProviderIssue['state']): IssueProviderState | undefined {\n\treturn state == null\n\t\t? undefined\n\t\t: {\n\t\t\t\tid: state.id,\n\t\t\t\tname: state.name,\n\t\t\t\tcolor: state.color ?? undefined,\n\t\t\t\tcategory: state.category,\n\t\t\t};\n}\n\nfunction getProviderIssueState(issue: ProviderIssue, providerId: ProviderReference['id']): IssueShape['state'] {\n\tconst category = issue.state?.category;\n\tif (\n\t\tproviderId === GitCloudHostIntegrationId.AzureDevOps ||\n\t\tproviderId === GitSelfManagedHostIntegrationId.AzureDevOpsServer\n\t) {\n\t\tif (category != null) return isTerminalIssueStateCategory(category) ? 'closed' : 'opened';\n\n\t\treturn issue.closedDate != null ? 'closed' : undefined;\n\t}\n\n\treturn issue.closedDate != null || isTerminalIssueStateCategory(category) ? 'closed' : 'opened';\n}\n\n/**\n * `options.viewer` is the current account as the row's organization identifies it, or `null` where the read tried to\n * resolve that and couldn't: a row that names someone then gets {@link IssueShape.viewerUnresolved} instead.\n */\nexport function toIssueShape(\n\tissue: ProviderIssue,\n\tprovider: ProviderReference,\n\toptions?: { projection?: IssueProjection; viewer?: { id: string } | null },\n): IssueShape | undefined {\n\t// TODO: Add some protections/baselines rather than killing the transformation here\n\t// `author` is intentionally not required: some providers have no per-item creator (e.g. Trello cards,\n\t// which the SDK maps with `author: null`), and dropping every such item would discard the whole board.\n\t// Fall back to an empty author instead so these issues still surface.\n\tif (issue.updatedDate == null || issue.url == null) return undefined;\n\n\tconst state = getProviderIssueState(issue, provider.id);\n\n\treturn {\n\t\ttype: 'issue',\n\t\tprovider: provider,\n\t\t// `id` is the provider's display number/key (GitHub number, Jira/Linear key, Trello idShort), NOT a\n\t\t// globally-unique id: it's rendered to users as `#{id}`, used to build branch names, and passed back\n\t\t// to the provider as the `getIssue`/cache lookup key, all of which expect the number. `nodeId` is the\n\t\t// provider-native stable id, but its uniqueness scope is provider-specific (Azure work-item ids are\n\t\t// organization-scoped), so cross-scope consumers must include provider/domain/container identity too.\n\t\t// provider-apis declares this as a string, but some providers (notably\n\t\t// Azure's broadened work-item path) return a number at runtime. Keep the\n\t\t// public IssueShape contract truthful for consumers that use string APIs.\n\t\tid: toIssueIdentifier(issue.number),\n\t\tnodeId: issue.graphQLId ?? issue.id,\n\t\ttitle: issue.title,\n\t\turl: issue.url,\n\t\tcreatedDate: issue.createdDate,\n\t\tupdatedDate: issue.updatedDate,\n\t\tclosedDate: issue.closedDate ?? undefined,\n\t\tclosed: state === 'closed',\n\t\tstate: state,\n\t\tproviderState: toIssueProviderState(issue.state),\n\t\tauthor: {\n\t\t\tid: issue.author?.id ?? '',\n\t\t\t// An absent name stays absent, matching {@link fromProviderAccount}; see `IssueMember.name`.\n\t\t\tname: issue.author?.name ?? undefined,\n\t\t\tavatarUrl: issue.author?.avatarUrl ?? undefined,\n\t\t\turl: issue.author?.url ?? undefined,\n\t\t},\n\t\tassignees:\n\t\t\tissue.assignees?.map(assignee => ({\n\t\t\t\tid: assignee.id ?? '',\n\t\t\t\tname: assignee.name ?? undefined,\n\t\t\t\tavatarUrl: assignee.avatarUrl ?? undefined,\n\t\t\t\turl: assignee.url ?? undefined,\n\t\t\t})) ?? [],\n\t\tproject:\n\t\t\tissue.project?.id && issue.project.resourceId && issue.project.namespace\n\t\t\t\t? {\n\t\t\t\t\t\tid: issue.project.id,\n\t\t\t\t\t\tname: issue.project.name,\n\t\t\t\t\t\tresourceId: issue.project.resourceId,\n\t\t\t\t\t\tresourceName: issue.project.namespace,\n\t\t\t\t\t}\n\t\t\t\t: undefined,\n\t\trepository:\n\t\t\tissue.repository?.owner?.login != null\n\t\t\t\t? {\n\t\t\t\t\t\towner: issue.repository.owner.login,\n\t\t\t\t\t\trepo: issue.repository.name,\n\t\t\t\t\t\t// provider-apis sends `''` for an id it doesn't know.\n\t\t\t\t\t\tid: issue.repository.id || undefined,\n\t\t\t\t\t}\n\t\t\t\t: undefined,\n\t\tlabels: issue.labels.map(label => ({ color: label.color ?? undefined, name: label.name })),\n\t\tcommentsCount: issue.commentCount ?? undefined,\n\t\tthumbsUpCount: issue.upvoteCount ?? undefined,\n\t\tbody: issue.description ?? undefined,\n\t\t// Both Jira flavors return `/rest/api/2` wiki markup for the description.\n\t\tbodyFormat: isJiraIntegrationId(provider.id) ? 'jira-wiki' : undefined,\n\t\t// Only when known, so a row from any other provider keeps exactly the keys it always had.\n\t\t...(issue.descriptionField != null ? { bodyField: toIssueBodyField(issue.descriptionField) } : {}),\n\t\tissueType: issue.type ?? undefined,\n\t\titerations: toIssueIterations(issue),\n\t\t// Only when tagged, so an untagged row keeps exactly the keys it always had.\n\t\t...(options?.projection != null ? { projection: options.projection } : {}),\n\t\t...toIssueViewer(issue, options?.viewer),\n\t};\n}\n\nexport function toIssueBodyField(field: NonNullable<ProviderIssue['descriptionField']>): IssueBodyField {\n\treturn { id: field.referenceName, name: field.name };\n}\n\nfunction toIssueIterations(issue: ProviderIssue): IssueIteration[] | undefined {\n\t// The two sources are mutually exclusive per provider: Azure reports a single `iteration` and no sprints, Jira\n\t// reports `sprints` and no iteration. Should a provider ever report both, the richer sprint metadata would be\n\t// dropped here, so revisit this branch rather than assuming the exclusivity still holds.\n\tif (issue.iteration != null) return [{ id: issue.iteration.path, name: issue.iteration.name }];\n\tif (!issue.sprints?.length) return undefined;\n\n\treturn issue.sprints.map(sprint => ({\n\t\tid: sprint.id,\n\t\tname: sprint.name,\n\t\tisActive: sprint.isActive,\n\t\tstartDate: sprint.startDate ?? undefined,\n\t\tendDate: sprint.endDate ?? undefined,\n\t}));\n}\n\n/**\n * Maps a raw provider-apis {@link ProviderRepository} to the GitLens-owned {@link ProviderRepositoryShape}\n * the ProviderBackend `listRepos` facade surfaces, so consumers don't depend on the SDK repo type. The SDK's\n * nullable fields (`webUrl`/`httpsUrl`/`sshUrl`/`defaultBranch`) collapse to `undefined`, matching the\n * `?? undefined` convention in {@link toIssueShape}/{@link toAccount}.\n */\nexport function toProviderRepositoryShape(repo: ProviderRepository): ProviderRepositoryShape {\n\treturn {\n\t\tid: repo.id,\n\t\tnamespace: repo.namespace,\n\t\tname: repo.name,\n\t\tproject: repo.project ?? undefined,\n\t\turl: repo.webUrl ?? undefined,\n\t\tcloneUrlHttps: repo.httpsUrl ?? undefined,\n\t\tcloneUrlSsh: repo.sshUrl ?? undefined,\n\t\tdefaultBranch: repo.defaultBranch?.name ?? undefined,\n\t};\n}\n\nexport function issueFilterToReason(filter: IssueFilter): 'authored' | 'assigned' | 'mentioned' {\n\tswitch (filter) {\n\t\tcase IssueFilter.Author:\n\t\t\treturn 'authored';\n\t\tcase IssueFilter.Assignee:\n\t\t\treturn 'assigned';\n\t\tcase IssueFilter.Mention:\n\t\t\treturn 'mentioned';\n\t}\n}\n\nexport function toAccount(account: ProviderAccount, provider: ProviderReference): UserAccount {\n\treturn {\n\t\tprovider: provider,\n\t\tid: account.id,\n\t\tname: account.name ?? undefined,\n\t\temail: account.email ?? undefined,\n\t\tavatarUrl: account.avatarUrl ?? undefined,\n\t\tusername: account.username ?? undefined,\n\t};\n}\n\nexport const toProviderBuildStatusState = {\n\t[PullRequestStatusCheckRollupState.Success]: GitBuildStatusState.Success,\n\t[PullRequestStatusCheckRollupState.Failed]: GitBuildStatusState.Failed,\n\t[PullRequestStatusCheckRollupState.Pending]: GitBuildStatusState.Pending,\n};\n\nexport const fromProviderBuildStatusState = {\n\t[GitBuildStatusState.Success]: PullRequestStatusCheckRollupState.Success,\n\t[GitBuildStatusState.Failed]: PullRequestStatusCheckRollupState.Failed,\n\t[GitBuildStatusState.Pending]: PullRequestStatusCheckRollupState.Pending,\n\t[GitBuildStatusState.ActionRequired]: PullRequestStatusCheckRollupState.Failed,\n\t// TODO: The rest of these are defaulted because we don't have a matching state for them\n\t[GitBuildStatusState.Error]: undefined,\n\t[GitBuildStatusState.Cancelled]: undefined,\n\t[GitBuildStatusState.OptionalActionRequired]: undefined,\n\t[GitBuildStatusState.Skipped]: undefined,\n\t[GitBuildStatusState.Running]: undefined,\n\t[GitBuildStatusState.Warning]: undefined,\n};\n\n/** Rolls every check context up into one state, the way a provider's own rollup does: failed, errored, or\n * action-required fails; else pending or running is pending; else success — reading only the first context\n * would call a pull request passing on the strength of whichever check happens to come back first. States\n * carrying no verdict (cancelled, skipped, optional action required, warning) don't vote. Reads the raw\n * state rather than `fromProviderBuildStatusState`, which drops errored and running to `undefined` and\n * would let a lone success outvote a check still in flight. */\nexport function toStatusCheckRollupState(\n\tstatuses: GitBuildStatus[] | null | undefined,\n): PullRequestStatusCheckRollupState | undefined {\n\tif (!statuses?.length) return undefined;\n\n\tlet rollup: PullRequestStatusCheckRollupState | undefined;\n\tfor (const { state } of statuses) {\n\t\tswitch (state) {\n\t\t\tcase GitBuildStatusState.Failed:\n\t\t\tcase GitBuildStatusState.Error:\n\t\t\tcase GitBuildStatusState.ActionRequired:\n\t\t\t\treturn PullRequestStatusCheckRollupState.Failed;\n\t\t\tcase GitBuildStatusState.Pending:\n\t\t\tcase GitBuildStatusState.Running:\n\t\t\t\trollup = PullRequestStatusCheckRollupState.Pending;\n\t\t\t\tbreak;\n\t\t\tcase GitBuildStatusState.Success:\n\t\t\t\trollup ??= PullRequestStatusCheckRollupState.Success;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\treturn rollup;\n}\n\nexport const toProviderPullRequestMergeableState = {\n\t[PullRequestMergeableState.Mergeable]: GitPullRequestMergeableState.Mergeable,\n\t[PullRequestMergeableState.Conflicting]: GitPullRequestMergeableState.Conflicts,\n\t[PullRequestMergeableState.Unknown]: GitPullRequestMergeableState.Unknown,\n\t[PullRequestMergeableState.FailingChecks]: GitPullRequestMergeableState.FailingChecks,\n\t[PullRequestMergeableState.BlockedByPolicy]: GitPullRequestMergeableState.Blocked,\n};\n\nexport const fromProviderPullRequestMergeableState = {\n\t[GitPullRequestMergeableState.Mergeable]: PullRequestMergeableState.Mergeable,\n\t[GitPullRequestMergeableState.Conflicts]: PullRequestMergeableState.Conflicting,\n\t[GitPullRequestMergeableState.Blocked]: PullRequestMergeableState.BlockedByPolicy,\n\t[GitPullRequestMergeableState.FailingChecks]: PullRequestMergeableState.FailingChecks,\n\t[GitPullRequestMergeableState.Unknown]: PullRequestMergeableState.Unknown,\n\t[GitPullRequestMergeableState.Behind]: PullRequestMergeableState.Unknown,\n\t[GitPullRequestMergeableState.UnknownAndBlocked]: PullRequestMergeableState.Unknown,\n\t[GitPullRequestMergeableState.Unstable]: PullRequestMergeableState.Unknown,\n};\n\nexport function toProviderPullRequestState(state: PullRequestState): GitPullRequestState {\n\treturn state === 'opened'\n\t\t? GitPullRequestState.Open\n\t\t: state === 'closed'\n\t\t\t? GitPullRequestState.Closed\n\t\t\t: GitPullRequestState.Merged;\n}\n\nexport function fromProviderPullRequestState(state: GitPullRequestState): PullRequestState {\n\treturn state === GitPullRequestState.Open ? 'opened' : state === GitPullRequestState.Closed ? 'closed' : 'merged';\n}\n\ntype PullRequestStateInput = PullRequestState | PullRequestStateFilter;\n\nfunction toProviderPullRequestStatesCore(state: PullRequestStateInput): GitPullRequestState[] {\n\tswitch (state) {\n\t\tcase 'open':\n\t\tcase 'opened':\n\t\t\treturn [GitPullRequestState.Open];\n\t\tcase 'closed':\n\t\t\treturn [GitPullRequestState.Closed];\n\t\tcase 'merged':\n\t\t\treturn [GitPullRequestState.Merged];\n\t\tcase 'all':\n\t\t\treturn [GitPullRequestState.Open, GitPullRequestState.Closed, GitPullRequestState.Merged];\n\t}\n}\n\n/** Maps PR include/state filters to the SDK's `states` input. `undefined`/omitted preserves the open-only default. */\nexport function toProviderPullRequestStates(\n\tstate: PullRequestStateInput | PullRequestStateInput[] | undefined,\n): GitPullRequestState[] | undefined {\n\tif (state == null) return undefined;\n\n\tconst states = (Array.isArray(state) ? state : [state]).flatMap(s => toProviderPullRequestStatesCore(s));\n\treturn states.length > 0 ? [...new Set(states)] : undefined;\n}\n\n/**\n * Maps an issue state filter to the SDK's `states` input. `undefined`/omitted preserves the open-only default.\n *\n * Throws on any other value, which only an untyped caller can pass: read as omitted it would serve open issues as\n * the state that was asked for. Called before a read's first request, so the throw refuses the whole read.\n */\nexport function toProviderIssueStates(state: IssueStateFilter | undefined): GitIssueState[] | undefined {\n\tswitch (state) {\n\t\tcase undefined:\n\t\t\treturn undefined;\n\t\tcase 'open':\n\t\t\treturn [GitIssueState.Open];\n\t\tcase 'closed':\n\t\t\treturn [GitIssueState.Closed];\n\t\tcase 'all':\n\t\t\treturn [GitIssueState.Open, GitIssueState.Closed];\n\t\tdefault:\n\t\t\tthrow new Error(`Unknown issue state; expected one of open, closed, all`);\n\t}\n}\n\n/**\n * Resolves a normalized {@link ProviderScope} to the provider-appropriate read inputs, dispatching on the\n * provider's {@link PagingMode} (the authoritative per-provider scoping selector). Project-mode providers\n * (Azure issues, Jira) produce `projectInputs` from `org` + `project`; repo/repos-mode providers produce a\n * repo `GetRepoInput[]` from `scope.repos` (carrying `project` where relevant, e.g. Azure). This is the\n * single public entry point consumers can use instead of hand-building the three underlying representations.\n */\nexport function resolveProviderScope(\n\tscope: ProviderScope,\n\tpagingMode: PagingMode | undefined,\n): { reposInput?: GetRepoInput[]; projectInputs?: { namespace: string; project: string }[] } {\n\tif (pagingMode === PagingMode.Project) {\n\t\tif (scope.org != null && scope.project != null) {\n\t\t\treturn { projectInputs: [{ namespace: scope.org, project: scope.project }] };\n\t\t}\n\t\treturn {};\n\t}\n\n\tconst reposInput = scope.repos?.map(r => ({ namespace: r.owner, name: r.name, project: scope.project }));\n\treturn { reposInput: reposInput };\n}\n\nexport function providerPullRequestMatchesSearch(pr: ProviderPullRequest, search: string): boolean {\n\tconst term = search.trim().toLowerCase();\n\tif (term.length === 0) return true;\n\n\treturn pr.title.toLowerCase().includes(term) || (pr.description?.toLowerCase().includes(term) ?? false);\n}\n\nfunction toProviderRemoteInfo(ref: PullRequestRef | undefined): GitRepositoryRemoteInfo | null {\n\t// Match the SDK convention: only populate remoteInfo when both clone URLs are known.\n\treturn ref?.cloneHttps && ref?.cloneSsh ? { cloneUrlHTTPS: ref.cloneHttps, cloneUrlSSH: ref.cloneSsh } : null;\n}\n\nexport function toProviderPullRequest(pr: PullRequest): ProviderPullRequest {\n\tconst prReviews = [...(pr.reviewRequests ?? []), ...(pr.latestReviews ?? [])];\n\treturn {\n\t\tid: pr.id,\n\t\tgraphQLId: pr.nodeId,\n\t\tnumber: pr.number ?? Number.parseInt(pr.id, 10),\n\t\ttitle: pr.title,\n\t\tdescription: pr.body ?? null,\n\t\turl: pr.url,\n\t\tstate: toProviderPullRequestState(pr.state),\n\t\tisCrossRepository: pr.refs?.isCrossRepository ?? false,\n\t\tisDraft: pr.isDraft ?? false,\n\t\tcreatedDate: pr.createdDate,\n\t\tupdatedDate: pr.updatedDate,\n\t\tclosedDate: pr.closedDate ?? null,\n\t\tmergedDate: pr.mergedDate ?? null,\n\t\tcommentCount: pr.commentsCount ?? null,\n\t\tupvoteCount: pr.thumbsUpCount ?? null,\n\t\tcommitCount: pr.commitCount ?? null,\n\t\tfileCount: pr.filesChanged ?? null,\n\t\tadditions: pr.additions ?? null,\n\t\tdeletions: pr.deletions ?? null,\n\t\tauthor: toProviderAccount(pr.author),\n\t\tassignees: pr.assignees?.map(toProviderAccount) ?? null,\n\t\tbaseRef:\n\t\t\tpr.refs?.base == null\n\t\t\t\t? null\n\t\t\t\t: {\n\t\t\t\t\t\tname: pr.refs.base.branch,\n\t\t\t\t\t\toid: pr.refs.base.sha,\n\t\t\t\t\t},\n\t\theadRef:\n\t\t\tpr.refs?.head == null\n\t\t\t\t? null\n\t\t\t\t: {\n\t\t\t\t\t\tname: pr.refs.head.branch,\n\t\t\t\t\t\toid: pr.refs.head.sha,\n\t\t\t\t\t},\n\t\t// `null` when the source carried no review data at all, rather than the empty array a lite read would\n\t\t// otherwise produce: `toCompletedReviews`/`toReviewRequests` map `null` back to `undefined`, which is what\n\t\t// lets a consumer tell \"nobody has reviewed this\" from \"this read never fetched reviews\" (see\n\t\t// `PullRequestShape.latestReviews`). An empty array from a full projection stays an empty array.\n\t\treviews: pr.reviewRequests == null && pr.latestReviews == null ? null : toProviderReviews(prReviews),\n\t\t// Derived for provider-apis' categorizer (Launchpad), which reads a pending request as \"waiting for review\"\n\t\t// and a comment as \"reviewer commented\" even where the host made no decision.\n\t\treviewDecision: toProviderReviewDecision(pr.reviewDecision, prReviews),\n\t\trepository:\n\t\t\tpr.repository != null\n\t\t\t\t? {\n\t\t\t\t\t\tid: pr.repository.id ?? '',\n\t\t\t\t\t\tname: pr.repository.repo,\n\t\t\t\t\t\towner: {\n\t\t\t\t\t\t\tlogin: pr.repository.owner,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tremoteInfo: toProviderRemoteInfo(pr.refs?.base),\n\t\t\t\t\t}\n\t\t\t\t: {\n\t\t\t\t\t\tid: '',\n\t\t\t\t\t\tname: '',\n\t\t\t\t\t\towner: {\n\t\t\t\t\t\t\tlogin: '',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tremoteInfo: null,\n\t\t\t\t\t},\n\t\theadRepository:\n\t\t\t// A deleted head repository has no owner or name: GitHub's rows leave them `undefined`, provider-apis' `''`.\n\t\t\tpr.refs?.head?.owner && pr.refs.head.repo\n\t\t\t\t? {\n\t\t\t\t\t\tid: pr.refs.head.repo,\n\t\t\t\t\t\tname: pr.refs.head.repo,\n\t\t\t\t\t\towner: {\n\t\t\t\t\t\t\tlogin: pr.refs.head.owner,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tremoteInfo: toProviderRemoteInfo(pr.refs.head),\n\t\t\t\t\t\tisFork: pr.refs.head.isFork,\n\t\t\t\t\t}\n\t\t\t\t: null,\n\t\theadCommit:\n\t\t\tpr.statusCheckRollupState != null\n\t\t\t\t? {\n\t\t\t\t\t\tbuildStatuses: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcompletedAt: null,\n\t\t\t\t\t\t\t\tdescription: '',\n\t\t\t\t\t\t\t\tname: '',\n\t\t\t\t\t\t\t\tstate: toProviderBuildStatusState[pr.statusCheckRollupState],\n\t\t\t\t\t\t\t\tstartedAt: null,\n\t\t\t\t\t\t\t\tstage: null,\n\t\t\t\t\t\t\t\turl: '',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t}\n\t\t\t\t: null,\n\t\tpermissions:\n\t\t\tpr.viewerCanUpdate == null\n\t\t\t\t? null\n\t\t\t\t: {\n\t\t\t\t\t\t// An unknown access level doesn't block a merge. Only GitHub's reads know it; any other row\n\t\t\t\t\t\t// with a `viewerCanUpdate` got it from provider-apis' own `canMerge`, which a missing access\n\t\t\t\t\t\t// level must not overturn. provider-apis' categorizer reads absent `permissions` the same way.\n\t\t\t\t\t\tcanMerge:\n\t\t\t\t\t\t\tpr.viewerCanUpdate === true &&\n\t\t\t\t\t\t\t(pr.repository.accessLevel == null ||\n\t\t\t\t\t\t\t\tpr.repository.accessLevel >= RepositoryAccessLevel.Write),\n\t\t\t\t\t\tcanMergeAndBypassProtections:\n\t\t\t\t\t\t\tpr.viewerCanUpdate === true &&\n\t\t\t\t\t\t\tpr.repository.accessLevel != null &&\n\t\t\t\t\t\t\tpr.repository.accessLevel >= RepositoryAccessLevel.Admin,\n\t\t\t\t\t},\n\t\tmergeableState: pr.mergeableState ? toProviderPullRequestMergeableState[pr.mergeableState] : undefined,\n\t};\n}\n\n/**\n * `options.currentAccount` is what `authoredByMe` and `viewer` are resolved against, or `null` where the read tried to\n * resolve it and couldn't: a row that names someone then gets {@link PullRequestShape.viewerUnresolved} instead.\n */\nexport function fromProviderPullRequest(\n\tpr: ProviderPullRequest,\n\tprovider: Provider,\n\toptions?: {\n\t\tproject?: IssueProject;\n\t\tcurrentAccount?: { id: string; username?: string } | null;\n\t\tprojection?: PullRequestProjection;\n\t},\n): PullRequest {\n\tconst repository = pr.repository;\n\tconst repositoryName = repository?.name ?? '';\n\tconst repositoryOwner = repository?.owner?.login ?? '';\n\tconst repositoryRemoteInfo = repository?.remoteInfo;\n\tconst headRepository = pr.headRepository;\n\tconst headRepositoryRemoteInfo = headRepository?.remoteInfo;\n\n\treturn new PullRequest(\n\t\tprovider,\n\t\tfromProviderAccount(pr.author),\n\t\tpr.id,\n\t\tpr.graphQLId || pr.id,\n\t\tpr.title,\n\t\tpr.url ?? '',\n\t\t{\n\t\t\towner: repositoryOwner,\n\t\t\trepo: repositoryName,\n\t\t\t// provider-apis sends `''` for an id it doesn't know.\n\t\t\tid: repository?.id || undefined,\n\t\t},\n\t\tfromProviderPullRequestState(pr.state),\n\t\tpr.createdDate,\n\t\tpr.updatedDate,\n\t\tpr.closedDate ?? undefined,\n\t\tpr.mergedDate ?? undefined,\n\t\tpr.mergeableState ? fromProviderPullRequestMergeableState[pr.mergeableState] : undefined,\n\t\t// The SDK's `permissions` can only say \"can merge\", so its `false` stays unknown rather than \"can't update\".\n\t\tpr.permissions?.canMerge || pr.permissions?.canMergeAndBypassProtections ? true : undefined,\n\t\t{\n\t\t\tbase: {\n\t\t\t\tbranch: pr.baseRef?.name ?? '',\n\t\t\t\tsha: pr.baseRef?.oid ?? '',\n\t\t\t\trepo: repositoryName,\n\t\t\t\towner: repositoryOwner,\n\t\t\t\texists: pr.baseRef != null,\n\t\t\t\turl: repositoryRemoteInfo?.cloneUrlHTTPS\n\t\t\t\t\t? repositoryRemoteInfo.cloneUrlHTTPS.replace(gitSuffixRegex, '')\n\t\t\t\t\t: '',\n\t\t\t\tcloneHttps: repositoryRemoteInfo?.cloneUrlHTTPS || undefined,\n\t\t\t\tcloneSsh: repositoryRemoteInfo?.cloneUrlSSH || undefined,\n\t\t\t},\n\t\t\thead: {\n\t\t\t\tbranch: pr.headRef?.name ?? '',\n\t\t\t\tsha: pr.headRef?.oid ?? '',\n\t\t\t\trepo: headRepository?.name ?? '',\n\t\t\t\towner: headRepository?.owner?.login ?? '',\n\t\t\t\texists: pr.headRef != null,\n\t\t\t\turl: headRepositoryRemoteInfo?.cloneUrlHTTPS\n\t\t\t\t\t? headRepositoryRemoteInfo.cloneUrlHTTPS.replace(gitSuffixRegex, '')\n\t\t\t\t\t: '',\n\t\t\t\tcloneHttps: headRepositoryRemoteInfo?.cloneUrlHTTPS || undefined,\n\t\t\t\tcloneSsh: headRepositoryRemoteInfo?.cloneUrlSSH || undefined,\n\t\t\t\tisFork: headRepository?.isFork,\n\t\t\t},\n\t\t\tisCrossRepository: pr.isCrossRepository,\n\t\t},\n\t\tpr.isDraft,\n\t\tpr.additions ?? undefined,\n\t\tpr.deletions ?? undefined,\n\t\tpr.commentCount ?? undefined,\n\t\tpr.upvoteCount ?? undefined,\n\t\tpr.reviewDecision ? fromPullRequestReviewDecision[pr.reviewDecision] : undefined,\n\t\ttoReviewRequests(pr.reviews),\n\t\ttoCompletedReviews(pr.reviews),\n\t\tpr.assignees?.map(fromProviderAccount) ?? undefined,\n\t\ttoStatusCheckRollupState(pr.headCommit?.buildStatuses),\n\t\toptions?.project,\n\t\tpr.version,\n\t\tpr.commitCount ?? undefined,\n\t\tundefined, // stack\n\t\tpr.fileCount ?? undefined,\n\t\tpr.description ?? undefined,\n\t\tpr.number,\n\t\toptions?.currentAccount != null\n\t\t\t? authoredByCurrentAccount(pr.author, provider, options.currentAccount)\n\t\t\t: undefined,\n\t\toptions?.projection,\n\t\toptions?.currentAccount ?? undefined,\n\t\toptions?.currentAccount === null && pullRequestNamesPeople(pr) ? true : undefined,\n\t);\n}\n\n/**\n * A GitLens-native row (GitHub's own reads) tagged for the read that returned it, with `authoredByMe` and `viewer`\n * resolved by the same rule {@link fromProviderPullRequest} applies. Returns a copy: the mapper's row stays as it was\n * built.\n */\nexport function stampNativePullRequest(\n\tpr: PullRequest,\n\toptions: { currentAccount?: { id: string; username?: string }; projection?: PullRequestProjection },\n): PullRequest {\n\treturn Object.assign(Object.create(PullRequest.prototype) as PullRequest, pr, {\n\t\tauthoredByMe:\n\t\t\toptions.currentAccount != null\n\t\t\t\t? authoredByCurrentAccount(pr.author, pr.provider, options.currentAccount)\n\t\t\t\t: undefined,\n\t\tviewer: options.currentAccount,\n\t\tprojection: options.projection,\n\t});\n}\n\n/**\n * A row of an account-wide read as a `PullRequest`. GitHub's are GitLens-native, which {@link stampNativePullRequest}\n * tags; every other host's are provider-apis', which {@link fromProviderPullRequest} converts.\n */\nexport function toPullRequestRow(\n\tpr: ProviderPullRequest | PullRequest,\n\tprovider: Provider,\n\toptions: { currentAccount?: { id: string; username?: string } | null; projection?: PullRequestProjection },\n): PullRequest {\n\t// Only an Azure DevOps viewer can be unresolved, and its rows are never native.\n\treturn isNativePullRequest(pr)\n\t\t? stampNativePullRequest(pr, { ...options, currentAccount: options.currentAccount ?? undefined })\n\t\t: fromProviderPullRequest(pr, provider, options);\n}\n\n/**\n * By shape rather than by class, which a second copy of the model module fails: a native row is a `'pullrequest'` that\n * names its provider, which provider-apis' rows never do. Both, so a key provider-apis adds later can't reroute its\n * rows.\n */\nexport function isNativePullRequest(pr: ProviderPullRequest | PullRequest): pr is PullRequest {\n\tconst row = pr as { type?: unknown; provider?: unknown };\n\treturn row.type === 'pullrequest' && row.provider != null && typeof row.provider === 'object';\n}\n\n/**\n * Whether `pr` names anyone the current account could be: its author, an assignee or a reviewer. A row naming no one\n * needs no viewer, as nothing on it can be matched against one.\n */\nexport function pullRequestNamesPeople(pr: ProviderPullRequest | PullRequest): boolean {\n\tif (pr.author != null || pr.assignees?.length) return true;\n\n\treturn isNativePullRequest(pr)\n\t\t? Boolean(pr.reviewRequests?.length || pr.latestReviews?.length)\n\t\t: Boolean(pr.reviews?.length);\n}\n\n/**\n * The viewer fields of an issue row naming `issue`'s people, from what its read resolved: `viewer` when it resolved\n * one, `viewerUnresolved` when it tried and couldn't (`null`), and neither for a row that names no one, as nothing on\n * it can be matched. Only the keys it sets, so a row resolved as before keeps exactly the keys it always had.\n */\nexport function toIssueViewer(\n\tissue: Parameters<typeof issueNamesPeople>[0],\n\tviewer: { id: string } | null | undefined,\n): { viewer?: { id: string }; viewerUnresolved?: true } | undefined {\n\tif (viewer === undefined || !issueNamesPeople(issue)) return undefined;\n\n\treturn viewer != null ? { viewer: viewer } : { viewerUnresolved: true };\n}\n\n/**\n * Whether `issue` names anyone the current account could be: its author or an assignee, by id. A row naming no one\n * gets no viewer, as nothing on it can be matched against one. Takes a raw row or a mapped one, so every read decides\n * alike.\n */\nexport function issueNamesPeople(issue: {\n\treadonly author?: { readonly id?: string | null } | null;\n\treadonly assignees?: readonly { readonly id?: string | null }[] | null;\n}): boolean {\n\treturn Boolean(issue.author?.id || issue.assignees?.some(a => a.id));\n}\n\n/**\n * GitLens' own GitHub GraphQL client keys people by login, while the current account's `id` is GitHub's\n * numeric database id, so an id-only match always misses there. The login is a unique handle on every\n * GitHub row shape, so the username fallback is safe there; elsewhere `toProviderAccount` fills `username`\n * from a display name that two people can share, so only GitHub and GitHub Enterprise get the fallback.\n *\n * A row without an author is unknown (`undefined`), not someone else's: it can still get a viewer for its reviewers.\n */\nfunction authoredByCurrentAccount(\n\tauthor: { id?: string | null; username?: string | null } | null | undefined,\n\tprovider: ProviderReference,\n\tcurrentAccount: { id: string; username?: string },\n): boolean | undefined {\n\tif (author == null) return undefined;\n\tif (author.id === currentAccount.id) return true;\n\n\tconst isGitHub =\n\t\tprovider.id === GitCloudHostIntegrationId.GitHub ||\n\t\tprovider.id === GitSelfManagedHostIntegrationId.CloudGitHubEnterprise;\n\treturn isGitHub && currentAccount.username != null && author.username === currentAccount.username;\n}\n\n/** `options.viewer` as {@link toIssueShape} takes it. */\nexport function fromProviderIssue(\n\tissue: ProviderIssue,\n\tintegration: Integration,\n\toptions?: { project?: IssueProject; projection?: IssueProjection; viewer?: { id: string } | null },\n): Issue {\n\tconst identifier = toIssueIdentifier(issue.number);\n\tconst state = getProviderIssueState(issue, integration.id);\n\tconst viewer = toIssueViewer(issue, options?.viewer);\n\treturn new Issue(\n\t\tintegration,\n\t\tidentifier,\n\t\tissue.graphQLId ?? issue.id,\n\t\tissue.title,\n\t\tissue.url ?? '',\n\t\tissue.createdDate,\n\t\tissue.updatedDate ?? issue.closedDate ?? issue.createdDate,\n\t\tstate === 'closed',\n\t\tstate,\n\t\tfromProviderAccount(issue.author),\n\t\tissue.assignees?.map(fromProviderAccount) ?? undefined,\n\t\tissue.repository != null\n\t\t\t? {\n\t\t\t\t\towner: issue.repository.owner.login ?? '',\n\t\t\t\t\trepo: issue.repository.name,\n\t\t\t\t\t// provider-apis sends `''` for an id it doesn't know.\n\t\t\t\t\tid: issue.repository.id || undefined,\n\t\t\t\t}\n\t\t\t: undefined,\n\t\tissue.closedDate ?? undefined,\n\t\tissue.labels?.map(label => ({ name: label.name, color: label.color ?? undefined })),\n\t\tissue.commentCount ?? undefined,\n\t\tissue.upvoteCount ?? undefined,\n\t\tissue.description ?? undefined,\n\t\toptions?.project != null\n\t\t\t? {\n\t\t\t\t\tid: options.project.id,\n\t\t\t\t\tname: options.project.name,\n\t\t\t\t\tresourceId: options.project.resourceId,\n\t\t\t\t\tresourceName: options.project.resourceName,\n\t\t\t\t}\n\t\t\t: issue.project?.id && issue.project?.resourceId && issue.project?.namespace\n\t\t\t\t? {\n\t\t\t\t\t\tid: issue.project.id,\n\t\t\t\t\t\tname: issue.project.name,\n\t\t\t\t\t\tresourceId: issue.project.resourceId,\n\t\t\t\t\t\tresourceName: issue.project.namespace,\n\t\t\t\t\t}\n\t\t\t\t: undefined,\n\t\tidentifier,\n\t\tissue.type ?? undefined,\n\t\ttoIssueProviderState(issue.state),\n\t\tintegration.id === IssuesCloudHostIntegrationId.Jira ? 'jira-wiki' : undefined,\n\t\ttoIssueIterations(issue),\n\t\toptions?.projection,\n\t\tissue.descriptionField != null ? toIssueBodyField(issue.descriptionField) : undefined,\n\t\tviewer?.viewer,\n\t\tviewer?.viewerUnresolved,\n\t);\n}\n\nexport function toProviderPullRequestWithUniqueId(pr: PullRequest): PullRequestWithUniqueID {\n\tconst { reviews, mergeableState, ...providerPr } = toProviderPullRequest(pr);\n\treturn {\n\t\t...providerPr,\n\t\t// The SDK's type requires a mergeability, and its categorizer only acts on a known one, so an unfetched\n\t\t// one goes over as its own `UNKNOWN`. Except on Bitbucket Cloud, which reports no mergeability at all:\n\t\t// Launchpad's \"Ready to merge\" needs one, so its rows go over as `MERGEABLE`, as provider-apis' own\n\t\t// Bitbucket rows already do.\n\t\tmergeableState:\n\t\t\tmergeableState ??\n\t\t\t(pr.provider.id === GitCloudHostIntegrationId.Bitbucket\n\t\t\t\t? GitPullRequestMergeableState.Mergeable\n\t\t\t\t: GitPullRequestMergeableState.Unknown),\n\t\t// The SDK boundary: `getActionablePullRequests` categorizes by review state and only knows\n\t\t// provider-apis' own vocabulary, so the locally-added dismissed state is dropped here rather than\n\t\t// handed over as a value it would fall through on. Our own projection keeps it — see\n\t\t// `providerPullRequestReviewStateDismissed`. `commitOid` rides along on the surviving reviews: it is an\n\t\t// extra property the SDK ignores, not a value it could misread.\n\t\treviews:\n\t\t\treviews?.filter(\n\t\t\t\t(r): r is ProviderPullRequestReview & { state: GitPullRequestReviewState } =>\n\t\t\t\t\tr.state !== providerPullRequestReviewStateDismissed,\n\t\t\t) ?? null,\n\t\tuuid: EntityIdentifierUtils.encode(getEntityIdentifierInput(pr)),\n\t};\n}\n\nexport type ProviderActionablePullRequest = ActionablePullRequest;\n\n/**\n * Built on the SDK's `GitPullRequest`, NOT the local {@link ProviderPullRequest} widening: this is handed to\n * `getActionablePullRequests`, which categorizes by review state and only knows provider-apis' vocabulary.\n * {@link toProviderPullRequestWithUniqueId} is what narrows `reviews` down to it.\n */\nexport type EnrichablePullRequest = GitPullRequest & {\n\tuuid: string;\n\ttype: 'pullrequest';\n\tprovider: ProviderReference;\n\tenrichable: EnrichableItem;\n\trepoIdentity: PullRequestRepositoryIdentityDescriptor;\n\trefs?: PullRequestRefs;\n\tunderlyingPullRequest: PullRequest;\n};\n\nexport const getActionablePullRequests = GitProviderUtils.getActionablePullRequests;\n\nexport type GitConfigEntityIdentifier = AnyEntityIdentifierInput & {\n\tmetadata: {\n\t\tid: string;\n\t\towner: { key: string; name: string; id: string | undefined; owner: string | undefined };\n\t\tcreatedDate: string;\n\t\tisCloudEnterprise?: boolean;\n\t};\n};\n\nexport function isGitHubDotCom(domain: string | null | undefined): boolean {\n\treturn equalsIgnoreCase(domain, 'github.com');\n}\n\nexport function isGitLabDotCom(domain: string | null | undefined): boolean {\n\treturn equalsIgnoreCase(domain, 'gitlab.com');\n}\n\n// Anchor the `visualstudio.com` alternative on a label boundary (`^` or `.`) rather than `\\b`: `\\b` treats a\n// hyphen as a word boundary, so `\\bvisualstudio\\.com$` matched attacker-controlled hosts like\n// `evil-visualstudio.com` and classified them as Azure cloud, changing their auth/URL handling.\nconst azureCloudDomainRegex = /^dev\\.azure\\.com$|(?:^|\\.)visualstudio\\.com$/i;\nexport function isAzureCloudDomain(domain: string | undefined): boolean {\n\treturn domain != null && azureCloudDomainRegex.test(domain);\n}\n\nconst bitbucketCloudDomainRegex = /^bitbucket\\.org$/i;\nexport function isBitbucketCloudDomain(domain: string | undefined): boolean {\n\treturn domain != null && bitbucketCloudDomainRegex.test(domain);\n}\n\nexport function supportsCodeSuggest(provider: ProviderReference): boolean {\n\treturn isGitHubDotCom(provider.domain);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAuJA,MAAa,sBAAsB;CAClC,gBAAgB;CAChB,WAAW;CACX,OAAO;CACP,QAAQ;CACR,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,wBAAwB;AACzB;AAEA,MAAa,gBAAgB;CAC5B,MAAM;CACN,QAAQ;AACT;AAEA,MAAa,sBAAsB;CAClC,MAAM;CACN,QAAQ;CACR,QAAQ;AACT;AAEA,MAAa,4BAA4B;CACxC,UAAU;CACV,kBAAkB;CAClB,WAAW;CACX,iBAAiB;AAClB;AAEA,MAAa,+BAA+B;CAC3C,QAAQ;CACR,SAAS;CACT,WAAW;CACX,eAAe;CACf,WAAW;CACX,SAAS;CACT,mBAAmB;CACnB,UAAU;AACX;;;;;;;;;;;;;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ACpB,YAAY,MAAM,QAAQ;EAC1B,cAAc,MAAM,QAAQ;CAC7B,IACC,KAAA,GACJ,YACA,MAAM,QAAQ,KAAA,GACd,qBAAqB,MAAM,KAAK,GAChC,YAAY,OAAA,SAA2C,cAAc,KAAA,GACrE,kBAAkB,KAAK,GACvB,SAAS,YACT,MAAM,oBAAoB,OAAO,iBAAiB,MAAM,gBAAgB,IAAI,KAAA,GAC5E,QAAQ,QACR,QAAQ,gBACT;AACD;AAEA,SAAgB,kCAAkC,IAA0C;CAC3F,MAAM,EAAE,SAAS,gBAAgB,GAAG,eAAe,sBAAsB,EAAE;CAC3E,OAAO;EACN,GAAG;EAKH,gBACC,mBACC,GAAG,SAAS,OAAA,cACV,6BAA6B,YAC7B,6BAA6B;EAMjC,SACC,SAAS,QACP,MACA,EAAE,UAAA,WACJ,KAAK;EACN,MAAM,sBAAsB,OAAO,yBAAyB,EAAE,CAAC;CAChE;AACD;AAmBA,MAAa,4BAA4B,iBAAiB;AAW1D,SAAgB,eAAe,QAA4C;CAC1E,OAAO,iBAAiB,QAAQ,YAAY;AAC7C;AAEA,SAAgB,eAAe,QAA4C;CAC1E,OAAO,iBAAiB,QAAQ,YAAY;AAC7C;AAKA,MAAM,wBAAwB;AAC9B,SAAgB,mBAAmB,QAAqC;CACvE,OAAO,UAAU,QAAQ,sBAAsB,KAAK,MAAM;AAC3D;AAEA,MAAM,4BAA4B;AAClC,SAAgB,uBAAuB,QAAqC;CAC3E,OAAO,UAAU,QAAQ,0BAA0B,KAAK,MAAM;AAC/D;AAEA,SAAgB,oBAAoB,UAAsC;CACzE,OAAO,eAAe,SAAS,MAAM;AACtC"}
|
|
@@ -91,6 +91,6 @@ export declare function getCurrentAccountIdentity(integration: GitHostIntegratio
|
|
|
91
91
|
export declare function getPullRequestViewers(integration: GitHostIntegration, connectionId: string | undefined, pullRequests: readonly (ProviderPullRequest | PullRequest)[]): Promise<({
|
|
92
92
|
id: string;
|
|
93
93
|
username?: string;
|
|
94
|
-
} | undefined)[]>;
|
|
94
|
+
} | null | undefined)[]>;
|
|
95
95
|
//#endregion
|
|
96
96
|
//# sourceMappingURL=drains.d.ts.map
|