@gitkraken/core-gitlens 0.3.1 → 0.4.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.
Files changed (230) hide show
  1. package/CHANGELOG.md +13 -1
  2. package/README.md +13 -10
  3. package/dist/git/context.d.ts +4 -3
  4. package/dist/git/context.d.ts.map +1 -1
  5. package/dist/git/context.js.map +1 -1
  6. package/dist/git/providers/operations.d.ts +1 -0
  7. package/dist/git/providers/operations.d.ts.map +1 -1
  8. package/dist/git/providers/worktrees.d.ts +2 -0
  9. package/dist/git/providers/worktrees.d.ts.map +1 -1
  10. package/dist/git/utils/conflictResolution.utils.d.ts +32 -0
  11. package/dist/git/utils/conflictResolution.utils.d.ts.map +1 -1
  12. package/dist/git/utils/conflictResolution.utils.js +95 -0
  13. package/dist/git/utils/conflictResolution.utils.js.map +1 -1
  14. package/dist/git-cli/providers/operations.d.ts +1 -0
  15. package/dist/git-cli/providers/operations.d.ts.map +1 -1
  16. package/dist/git-cli/providers/operations.js +22 -1
  17. package/dist/git-cli/providers/operations.js.map +1 -1
  18. package/dist/git-cli/providers/worktrees.d.ts +2 -0
  19. package/dist/git-cli/providers/worktrees.d.ts.map +1 -1
  20. package/dist/git-cli/providers/worktrees.js +3 -0
  21. package/dist/git-cli/providers/worktrees.js.map +1 -1
  22. package/dist/plus/ai/utils/ai.utils.js +5 -5
  23. package/dist/plus/ai/utils/ai.utils.js.map +1 -1
  24. package/dist/plus/git-github/api/github.d.ts +6 -13
  25. package/dist/plus/git-github/api/github.d.ts.map +1 -1
  26. package/dist/plus/git-github/api/github.js +5 -10
  27. package/dist/plus/git-github/api/github.js.map +1 -1
  28. package/dist/plus/integrations/authentication/cloudIntegrationService.d.ts +11 -0
  29. package/dist/plus/integrations/authentication/cloudIntegrationService.d.ts.map +1 -0
  30. package/dist/plus/integrations/authentication/cloudIntegrationService.js +90 -0
  31. package/dist/plus/integrations/authentication/cloudIntegrationService.js.map +1 -0
  32. package/dist/plus/integrations/authentication/configuredIntegrationService.d.ts +67 -0
  33. package/dist/plus/integrations/authentication/configuredIntegrationService.d.ts.map +1 -0
  34. package/dist/plus/integrations/authentication/configuredIntegrationService.js +295 -0
  35. package/dist/plus/integrations/authentication/configuredIntegrationService.js.map +1 -0
  36. package/dist/plus/integrations/authentication/integrationAuthenticationProvider.d.ts +92 -0
  37. package/dist/plus/integrations/authentication/integrationAuthenticationProvider.d.ts.map +1 -0
  38. package/dist/plus/integrations/authentication/integrationAuthenticationProvider.js +185 -0
  39. package/dist/plus/integrations/authentication/integrationAuthenticationProvider.js.map +1 -0
  40. package/dist/plus/integrations/authentication/integrationAuthenticationService.d.ts +62 -0
  41. package/dist/plus/integrations/authentication/integrationAuthenticationService.d.ts.map +1 -0
  42. package/dist/plus/integrations/authentication/integrationAuthenticationService.js +122 -0
  43. package/dist/plus/integrations/authentication/integrationAuthenticationService.js.map +1 -0
  44. package/dist/plus/integrations/authentication/manualTokenProvider.d.ts +15 -0
  45. package/dist/plus/integrations/authentication/manualTokenProvider.d.ts.map +1 -0
  46. package/dist/plus/integrations/authentication/manualTokenProvider.js +49 -0
  47. package/dist/plus/integrations/authentication/manualTokenProvider.js.map +1 -0
  48. package/dist/plus/integrations/authentication/models.d.ts +87 -0
  49. package/dist/plus/integrations/authentication/models.d.ts.map +1 -0
  50. package/dist/plus/integrations/authentication/models.js +64 -0
  51. package/dist/plus/integrations/authentication/models.js.map +1 -0
  52. package/dist/plus/integrations/constants.d.ts +47 -0
  53. package/dist/plus/integrations/constants.d.ts.map +1 -0
  54. package/dist/plus/integrations/constants.js +128 -0
  55. package/dist/plus/integrations/constants.js.map +1 -0
  56. package/dist/plus/integrations/context.d.ts +354 -0
  57. package/dist/plus/integrations/context.d.ts.map +1 -0
  58. package/dist/plus/integrations/context.js +2 -0
  59. package/dist/plus/integrations/context.js.map +1 -0
  60. package/dist/plus/integrations/errors.d.ts +14 -0
  61. package/dist/plus/integrations/errors.d.ts.map +1 -0
  62. package/dist/plus/integrations/errors.js +19 -0
  63. package/dist/plus/integrations/errors.js.map +1 -0
  64. package/dist/plus/integrations/index.d.ts +32 -0
  65. package/dist/plus/integrations/index.d.ts.map +1 -0
  66. package/dist/plus/integrations/index.js +62 -0
  67. package/dist/plus/integrations/index.js.map +1 -0
  68. package/dist/plus/integrations/integrationService.d.ts +98 -0
  69. package/dist/plus/integrations/integrationService.d.ts.map +1 -0
  70. package/dist/plus/integrations/integrationService.js +627 -0
  71. package/dist/plus/integrations/integrationService.js.map +1 -0
  72. package/dist/plus/integrations/models/gitHostIntegration.d.ts +82 -0
  73. package/dist/plus/integrations/models/gitHostIntegration.d.ts.map +1 -0
  74. package/dist/plus/integrations/models/gitHostIntegration.js +522 -0
  75. package/dist/plus/integrations/models/gitHostIntegration.js.map +1 -0
  76. package/dist/plus/integrations/models/integration.d.ts +127 -0
  77. package/dist/plus/integrations/models/integration.d.ts.map +1 -0
  78. package/dist/plus/integrations/models/integration.js +456 -0
  79. package/dist/plus/integrations/models/integration.js.map +1 -0
  80. package/dist/plus/integrations/models/issuesIntegration.d.ts +28 -0
  81. package/dist/plus/integrations/models/issuesIntegration.d.ts.map +1 -0
  82. package/dist/plus/integrations/models/issuesIntegration.js +101 -0
  83. package/dist/plus/integrations/models/issuesIntegration.js.map +1 -0
  84. package/dist/plus/integrations/providers/apiClients.d.ts +25 -0
  85. package/dist/plus/integrations/providers/apiClients.d.ts.map +1 -0
  86. package/dist/plus/integrations/providers/apiClients.js +39 -0
  87. package/dist/plus/integrations/providers/apiClients.js.map +1 -0
  88. package/dist/plus/integrations/providers/azure/azure.d.ts +47 -0
  89. package/dist/plus/integrations/providers/azure/azure.d.ts.map +1 -0
  90. package/dist/plus/integrations/providers/azure/azure.js +444 -0
  91. package/dist/plus/integrations/providers/azure/azure.js.map +1 -0
  92. package/dist/plus/integrations/providers/azure/models.d.ts +286 -0
  93. package/dist/plus/integrations/providers/azure/models.d.ts.map +1 -0
  94. package/dist/plus/integrations/providers/azure/models.js +203 -0
  95. package/dist/plus/integrations/providers/azure/models.js.map +1 -0
  96. package/dist/plus/integrations/providers/azureDevOps.d.ts +95 -0
  97. package/dist/plus/integrations/providers/azureDevOps.d.ts.map +1 -0
  98. package/dist/plus/integrations/providers/azureDevOps.js +432 -0
  99. package/dist/plus/integrations/providers/azureDevOps.js.map +1 -0
  100. package/dist/plus/integrations/providers/bitbucket/bitbucket.d.ts +42 -0
  101. package/dist/plus/integrations/providers/bitbucket/bitbucket.d.ts.map +1 -0
  102. package/dist/plus/integrations/providers/bitbucket/bitbucket.js +513 -0
  103. package/dist/plus/integrations/providers/bitbucket/bitbucket.js.map +1 -0
  104. package/dist/plus/integrations/providers/bitbucket/models.d.ts +222 -0
  105. package/dist/plus/integrations/providers/bitbucket/models.d.ts.map +1 -0
  106. package/dist/plus/integrations/providers/bitbucket/models.js +158 -0
  107. package/dist/plus/integrations/providers/bitbucket/models.js.map +1 -0
  108. package/dist/plus/integrations/providers/bitbucket-server/models.d.ts +120 -0
  109. package/dist/plus/integrations/providers/bitbucket-server/models.d.ts.map +1 -0
  110. package/dist/plus/integrations/providers/bitbucket-server/models.js +111 -0
  111. package/dist/plus/integrations/providers/bitbucket-server/models.js.map +1 -0
  112. package/dist/plus/integrations/providers/bitbucket-server.d.ts +60 -0
  113. package/dist/plus/integrations/providers/bitbucket-server.d.ts.map +1 -0
  114. package/dist/plus/integrations/providers/bitbucket-server.js +138 -0
  115. package/dist/plus/integrations/providers/bitbucket-server.js.map +1 -0
  116. package/dist/plus/integrations/providers/bitbucket.d.ts +50 -0
  117. package/dist/plus/integrations/providers/bitbucket.d.ts.map +1 -0
  118. package/dist/plus/integrations/providers/bitbucket.js +181 -0
  119. package/dist/plus/integrations/providers/bitbucket.js.map +1 -0
  120. package/dist/plus/integrations/providers/github/github.d.ts +5 -0
  121. package/dist/plus/integrations/providers/github/github.d.ts.map +1 -0
  122. package/dist/plus/integrations/providers/github/github.js +47 -0
  123. package/dist/plus/integrations/providers/github/github.js.map +1 -0
  124. package/dist/plus/integrations/providers/github/github.utils.d.ts +11 -0
  125. package/dist/plus/integrations/providers/github/github.utils.d.ts.map +1 -0
  126. package/dist/plus/integrations/providers/github/github.utils.js +6 -0
  127. package/dist/plus/integrations/providers/github/github.utils.js.map +1 -0
  128. package/dist/plus/integrations/providers/github/models.d.ts +3 -0
  129. package/dist/plus/integrations/providers/github/models.d.ts.map +1 -0
  130. package/dist/plus/integrations/providers/github/models.js +2 -0
  131. package/dist/plus/integrations/providers/github/models.js.map +1 -0
  132. package/dist/plus/integrations/providers/github.d.ts +73 -0
  133. package/dist/plus/integrations/providers/github.d.ts.map +1 -0
  134. package/dist/plus/integrations/providers/github.js +160 -0
  135. package/dist/plus/integrations/providers/github.js.map +1 -0
  136. package/dist/plus/integrations/providers/gitlab/gitlab.d.ts +63 -0
  137. package/dist/plus/integrations/providers/gitlab/gitlab.d.ts.map +1 -0
  138. package/dist/plus/integrations/providers/gitlab/gitlab.js +828 -0
  139. package/dist/plus/integrations/providers/gitlab/gitlab.js.map +1 -0
  140. package/dist/plus/integrations/providers/gitlab/gitlab.utils.d.ts +21 -0
  141. package/dist/plus/integrations/providers/gitlab/gitlab.utils.d.ts.map +1 -0
  142. package/dist/plus/integrations/providers/gitlab/gitlab.utils.js +45 -0
  143. package/dist/plus/integrations/providers/gitlab/gitlab.utils.js.map +1 -0
  144. package/dist/plus/integrations/providers/gitlab/models.d.ts +128 -0
  145. package/dist/plus/integrations/providers/gitlab/models.d.ts.map +1 -0
  146. package/dist/plus/integrations/providers/gitlab/models.js +96 -0
  147. package/dist/plus/integrations/providers/gitlab/models.js.map +1 -0
  148. package/dist/plus/integrations/providers/gitlab.d.ts +79 -0
  149. package/dist/plus/integrations/providers/gitlab.d.ts.map +1 -0
  150. package/dist/plus/integrations/providers/gitlab.js +253 -0
  151. package/dist/plus/integrations/providers/gitlab.js.map +1 -0
  152. package/dist/plus/integrations/providers/jira.d.ts +46 -0
  153. package/dist/plus/integrations/providers/jira.d.ts.map +1 -0
  154. package/dist/plus/integrations/providers/jira.js +255 -0
  155. package/dist/plus/integrations/providers/jira.js.map +1 -0
  156. package/dist/plus/integrations/providers/linear.d.ts +47 -0
  157. package/dist/plus/integrations/providers/linear.d.ts.map +1 -0
  158. package/dist/plus/integrations/providers/linear.js +198 -0
  159. package/dist/plus/integrations/providers/linear.js.map +1 -0
  160. package/dist/plus/integrations/providers/models.d.ts +433 -0
  161. package/dist/plus/integrations/providers/models.d.ts.map +1 -0
  162. package/dist/plus/integrations/providers/models.js +602 -0
  163. package/dist/plus/integrations/providers/models.js.map +1 -0
  164. package/dist/plus/integrations/providers/providersApi.d.ts +129 -0
  165. package/dist/plus/integrations/providers/providersApi.d.ts.map +1 -0
  166. package/dist/plus/integrations/providers/providersApi.js +602 -0
  167. package/dist/plus/integrations/providers/providersApi.js.map +1 -0
  168. package/dist/plus/integrations/providers/utils.d.ts +54 -0
  169. package/dist/plus/integrations/providers/utils.d.ts.map +1 -0
  170. package/dist/plus/integrations/providers/utils.js +262 -0
  171. package/dist/plus/integrations/providers/utils.js.map +1 -0
  172. package/dist/plus/integrations/telemetry.d.ts +26 -0
  173. package/dist/plus/integrations/telemetry.d.ts.map +1 -0
  174. package/dist/plus/integrations/telemetry.js +11 -0
  175. package/dist/plus/integrations/telemetry.js.map +1 -0
  176. package/dist/plus/integrations/utils/integration.utils.d.ts +14 -0
  177. package/dist/plus/integrations/utils/integration.utils.d.ts.map +1 -0
  178. package/dist/plus/integrations/utils/integration.utils.js +111 -0
  179. package/dist/plus/integrations/utils/integration.utils.js.map +1 -0
  180. package/dist/utils/disposable.d.ts +15 -2
  181. package/dist/utils/disposable.d.ts.map +1 -1
  182. package/dist/utils/disposable.js.map +1 -1
  183. package/package.json +43 -2
  184. package/src/git/context.ts +4 -3
  185. package/src/git/providers/operations.ts +1 -1
  186. package/src/git/providers/worktrees.ts +14 -2
  187. package/src/git/utils/conflictResolution.utils.ts +126 -0
  188. package/src/git-cli/providers/operations.ts +22 -2
  189. package/src/git-cli/providers/worktrees.ts +17 -2
  190. package/src/plus/ai/utils/ai.utils.ts +5 -5
  191. package/src/plus/git-github/api/github.ts +13 -25
  192. package/src/plus/integrations/authentication/cloudIntegrationService.ts +120 -0
  193. package/src/plus/integrations/authentication/configuredIntegrationService.ts +414 -0
  194. package/src/plus/integrations/authentication/integrationAuthenticationProvider.ts +289 -0
  195. package/src/plus/integrations/authentication/integrationAuthenticationService.ts +144 -0
  196. package/src/plus/integrations/authentication/manualTokenProvider.ts +72 -0
  197. package/src/plus/integrations/authentication/models.ts +168 -0
  198. package/src/plus/integrations/constants.ts +169 -0
  199. package/src/plus/integrations/context.ts +383 -0
  200. package/src/plus/integrations/errors.ts +35 -0
  201. package/src/plus/integrations/index.ts +119 -0
  202. package/src/plus/integrations/integrationService.ts +924 -0
  203. package/src/plus/integrations/models/gitHostIntegration.ts +738 -0
  204. package/src/plus/integrations/models/integration.ts +657 -0
  205. package/src/plus/integrations/models/issuesIntegration.ts +124 -0
  206. package/src/plus/integrations/providers/apiClients.ts +72 -0
  207. package/src/plus/integrations/providers/azure/azure.ts +691 -0
  208. package/src/plus/integrations/providers/azure/models.ts +605 -0
  209. package/src/plus/integrations/providers/azureDevOps.ts +677 -0
  210. package/src/plus/integrations/providers/bitbucket/bitbucket.ts +774 -0
  211. package/src/plus/integrations/providers/bitbucket/models.ts +445 -0
  212. package/src/plus/integrations/providers/bitbucket-server/models.ts +252 -0
  213. package/src/plus/integrations/providers/bitbucket-server.ts +282 -0
  214. package/src/plus/integrations/providers/bitbucket.ts +350 -0
  215. package/src/plus/integrations/providers/github/github.ts +64 -0
  216. package/src/plus/integrations/providers/github/github.utils.ts +23 -0
  217. package/src/plus/integrations/providers/github/models.ts +29 -0
  218. package/src/plus/integrations/providers/github.ts +366 -0
  219. package/src/plus/integrations/providers/gitlab/gitlab.ts +1210 -0
  220. package/src/plus/integrations/providers/gitlab/gitlab.utils.ts +71 -0
  221. package/src/plus/integrations/providers/gitlab/models.ts +257 -0
  222. package/src/plus/integrations/providers/gitlab.ts +473 -0
  223. package/src/plus/integrations/providers/jira.ts +359 -0
  224. package/src/plus/integrations/providers/linear.ts +275 -0
  225. package/src/plus/integrations/providers/models.ts +1114 -0
  226. package/src/plus/integrations/providers/providersApi.ts +1126 -0
  227. package/src/plus/integrations/providers/utils.ts +359 -0
  228. package/src/plus/integrations/telemetry.ts +29 -0
  229. package/src/plus/integrations/utils/integration.utils.ts +138 -0
  230. package/src/utils/disposable.ts +15 -2
@@ -0,0 +1,47 @@
1
+ export declare enum GitCloudHostIntegrationId {
2
+ GitHub = "github",
3
+ GitLab = "gitlab",
4
+ Bitbucket = "bitbucket",
5
+ AzureDevOps = "azureDevOps"
6
+ }
7
+ export declare enum GitSelfManagedHostIntegrationId {
8
+ BitbucketServer = "bitbucket-server",
9
+ CloudGitHubEnterprise = "cloud-github-enterprise",
10
+ CloudGitLabSelfHosted = "cloud-gitlab-self-hosted",
11
+ AzureDevOpsServer = "azure-devops-server"
12
+ }
13
+ export declare enum IssuesCloudHostIntegrationId {
14
+ Jira = "jira",
15
+ Linear = "linear",
16
+ Trello = "trello"
17
+ }
18
+ export type CloudGitSelfManagedHostIntegrationIds = GitSelfManagedHostIntegrationId.CloudGitHubEnterprise | GitSelfManagedHostIntegrationId.BitbucketServer | GitSelfManagedHostIntegrationId.AzureDevOpsServer | GitSelfManagedHostIntegrationId.CloudGitLabSelfHosted;
19
+ export type GitHostIntegrationIds = GitCloudHostIntegrationId | GitSelfManagedHostIntegrationId;
20
+ export type IssuesHostIntegrationIds = IssuesCloudHostIntegrationId;
21
+ export type IntegrationIds = GitHostIntegrationIds | IssuesHostIntegrationIds;
22
+ export declare const supportedOrderedCloudIssuesIntegrationIds: IssuesCloudHostIntegrationId[];
23
+ export declare const supportedOrderedCloudIntegrationIds: (GitSelfManagedHostIntegrationId | GitCloudHostIntegrationId | IssuesCloudHostIntegrationId)[];
24
+ export declare const integrationIds: (GitSelfManagedHostIntegrationId | GitCloudHostIntegrationId | IssuesCloudHostIntegrationId)[];
25
+ export type SupportedCloudIntegrationIds = (typeof supportedOrderedCloudIntegrationIds)[number];
26
+ export declare function isSupportedCloudIntegrationId(id: IntegrationIds): id is SupportedCloudIntegrationIds;
27
+ export declare function isIntegrationId(id: string): id is IntegrationIds;
28
+ export type IntegrationFeatures = 'prs' | 'issues';
29
+ export interface IntegrationDescriptor {
30
+ id: SupportedCloudIntegrationIds;
31
+ name: string;
32
+ icon: string;
33
+ supports: IntegrationFeatures[];
34
+ requiresPro: boolean;
35
+ }
36
+ /** Stored shape of a configured-integration descriptor in workspace state. */
37
+ export interface StoredConfiguredIntegrationDescriptor {
38
+ cloud: boolean;
39
+ integrationId: IntegrationIds;
40
+ domain?: string;
41
+ expiresAt?: string;
42
+ scopes: string;
43
+ }
44
+ /** Stored shape of the `integrations:configured` storage key. */
45
+ export type StoredIntegrationConfigurations = Record<IntegrationIds, StoredConfiguredIntegrationDescriptor[] | undefined>;
46
+ export declare const supportedCloudIntegrationDescriptors: IntegrationDescriptor[];
47
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/plus/integrations/constants.ts"],"names":[],"mappings":"AAAA,oBAAY,yBAAyB;IACpC,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,WAAW,gBAAgB;CAC3B;AAED,oBAAY,+BAA+B;IAC1C,eAAe,qBAAqB;IACpC,qBAAqB,4BAA4B;IACjD,qBAAqB,6BAA6B;IAClD,iBAAiB,wBAAwB;CACzC;AAED,oBAAY,4BAA4B;IACvC,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,MAAM,WAAW;CACjB;AAED,MAAM,MAAM,qCAAqC,GAC9C,+BAA+B,CAAC,qBAAqB,GACrD,+BAA+B,CAAC,eAAe,GAC/C,+BAA+B,CAAC,iBAAiB,GACjD,+BAA+B,CAAC,qBAAqB,CAAC;AAEzD,MAAM,MAAM,qBAA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github";
4
+ GitCloudHostIntegrationId["GitLab"] = "gitlab";
5
+ GitCloudHostIntegrationId["Bitbucket"] = "bitbucket";
6
+ GitCloudHostIntegrationId["AzureDevOps"] = "azureDevOps";
7
+ })(GitCloudHostIntegrationId || (GitCloudHostIntegrationId = {}));
8
+ export var GitSelfManagedHostIntegrationId;
9
+ (function (GitSelfManagedHostIntegrationId) {
10
+ GitSelfManagedHostIntegrationId["BitbucketServer"] = "bitbucket-server";
11
+ GitSelfManagedHostIntegrationId["CloudGitHubEnterprise"] = "cloud-github-enterprise";
12
+ GitSelfManagedHostIntegrationId["CloudGitLabSelfHosted"] = "cloud-gitlab-self-hosted";
13
+ GitSelfManagedHostIntegrationId["AzureDevOpsServer"] = "azure-devops-server";
14
+ })(GitSelfManagedHostIntegrationId || (GitSelfManagedHostIntegrationId = {}));
15
+ export var IssuesCloudHostIntegrationId;
16
+ (function (IssuesCloudHostIntegrationId) {
17
+ IssuesCloudHostIntegrationId["Jira"] = "jira";
18
+ IssuesCloudHostIntegrationId["Linear"] = "linear";
19
+ IssuesCloudHostIntegrationId["Trello"] = "trello";
20
+ })(IssuesCloudHostIntegrationId || (IssuesCloudHostIntegrationId = {}));
21
+ export const supportedOrderedCloudIssuesIntegrationIds = [
22
+ IssuesCloudHostIntegrationId.Jira,
23
+ IssuesCloudHostIntegrationId.Linear,
24
+ ];
25
+ export const supportedOrderedCloudIntegrationIds = [
26
+ GitCloudHostIntegrationId.GitHub,
27
+ GitSelfManagedHostIntegrationId.CloudGitHubEnterprise,
28
+ GitCloudHostIntegrationId.GitLab,
29
+ GitSelfManagedHostIntegrationId.CloudGitLabSelfHosted,
30
+ GitCloudHostIntegrationId.AzureDevOps,
31
+ GitSelfManagedHostIntegrationId.AzureDevOpsServer,
32
+ GitCloudHostIntegrationId.Bitbucket,
33
+ GitSelfManagedHostIntegrationId.BitbucketServer,
34
+ IssuesCloudHostIntegrationId.Jira,
35
+ IssuesCloudHostIntegrationId.Linear,
36
+ ];
37
+ export const integrationIds = [
38
+ GitCloudHostIntegrationId.GitHub,
39
+ GitCloudHostIntegrationId.GitLab,
40
+ GitCloudHostIntegrationId.Bitbucket,
41
+ GitCloudHostIntegrationId.AzureDevOps,
42
+ GitSelfManagedHostIntegrationId.AzureDevOpsServer,
43
+ GitSelfManagedHostIntegrationId.BitbucketServer,
44
+ GitSelfManagedHostIntegrationId.CloudGitHubEnterprise,
45
+ GitSelfManagedHostIntegrationId.CloudGitLabSelfHosted,
46
+ IssuesCloudHostIntegrationId.Jira,
47
+ IssuesCloudHostIntegrationId.Linear,
48
+ IssuesCloudHostIntegrationId.Trello,
49
+ ];
50
+ export function isSupportedCloudIntegrationId(id) {
51
+ return supportedOrderedCloudIntegrationIds.includes(id);
52
+ }
53
+ export function isIntegrationId(id) {
54
+ return integrationIds.includes(id);
55
+ }
56
+ export const supportedCloudIntegrationDescriptors = [
57
+ {
58
+ id: GitCloudHostIntegrationId.GitHub,
59
+ name: 'GitHub',
60
+ icon: 'gl-provider-github',
61
+ supports: ['prs', 'issues'],
62
+ requiresPro: false,
63
+ },
64
+ {
65
+ id: GitSelfManagedHostIntegrationId.CloudGitHubEnterprise,
66
+ name: 'GitHub Enterprise',
67
+ icon: 'gl-provider-github',
68
+ supports: ['prs', 'issues'],
69
+ requiresPro: true,
70
+ },
71
+ {
72
+ id: GitCloudHostIntegrationId.GitLab,
73
+ name: 'GitLab',
74
+ icon: 'gl-provider-gitlab',
75
+ supports: ['prs', 'issues'],
76
+ requiresPro: false,
77
+ },
78
+ {
79
+ id: GitSelfManagedHostIntegrationId.CloudGitLabSelfHosted,
80
+ name: 'GitLab Self-Hosted',
81
+ icon: 'gl-provider-gitlab',
82
+ supports: ['prs', 'issues'],
83
+ requiresPro: true,
84
+ },
85
+ {
86
+ id: GitCloudHostIntegrationId.AzureDevOps,
87
+ name: 'Azure DevOps',
88
+ icon: 'gl-provider-azdo',
89
+ supports: ['prs', 'issues'],
90
+ requiresPro: true,
91
+ },
92
+ {
93
+ id: GitSelfManagedHostIntegrationId.AzureDevOpsServer,
94
+ name: 'Azure DevOps Server',
95
+ icon: 'gl-provider-azdo',
96
+ supports: ['prs', 'issues'],
97
+ requiresPro: true,
98
+ },
99
+ {
100
+ id: GitCloudHostIntegrationId.Bitbucket,
101
+ name: 'Bitbucket',
102
+ icon: 'gl-provider-bitbucket',
103
+ supports: ['prs', 'issues'],
104
+ requiresPro: false,
105
+ },
106
+ {
107
+ id: GitSelfManagedHostIntegrationId.BitbucketServer,
108
+ name: 'Bitbucket Data Center',
109
+ icon: 'gl-provider-bitbucket',
110
+ supports: ['prs'],
111
+ requiresPro: true,
112
+ },
113
+ {
114
+ id: IssuesCloudHostIntegrationId.Jira,
115
+ name: 'Jira',
116
+ icon: 'gl-provider-jira',
117
+ supports: ['issues'],
118
+ requiresPro: true,
119
+ },
120
+ {
121
+ id: IssuesCloudHostIntegrationId.Linear,
122
+ name: 'Linear',
123
+ icon: 'gl-provider-linear',
124
+ supports: ['issues'],
125
+ requiresPro: true,
126
+ },
127
+ ];
128
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/plus/integrations/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,yBAKX;AALD,WAAY,yBAAyB;IACpC,8CAAiB,CAAA;IACjB,8CAAiB,CAAA;IACjB,oDAAuB,CAAA;IACvB,wDAA2B,CAAA;AAC5B,CAAC,EALW,yBAAyB,KAAzB,yBAAyB,QAKpC;AAED,MAAM,CAAN,IAAY,+BAKX;AALD,WAAY,+BAA+B;IAC1C,uEAAoC,CAAA;IACpC,oFAAiD,CAAA;IACjD,qFAAkD,CAAA;IAClD,4EAAyC,CAAA;AAC1C,CAAC,EALW,+BAA+B,KAA/B,+BAA+B,QAK1C;AAED,MAAM,CAAN,IAAY,4BAIX;AAJD,WAAY,4BAA4B;IACvC,6CAAa,CAAA;IACb,iDAAiB,CAAA;IACjB,iDAAiB,CAAA;AACl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AAW,EAAE,IAAI;KACjB;IACD;QACC,EAAE,EAAE,4BAA4B,CAAC,IAAI;QACrC,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,kBAAkB;QACxB,QAAQ,EAAE,CAAC,QAAQ,CAAC;QACpB,WAAW,EAAE,IAAI;KACjB;IACD;QACC,EAAE,EAAE,4BAA4B,CAAC,MAAM;QACvC,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,oBAAoB;QAC1B,QAAQ,EAAE,CAAC,QAAQ,CAAC;QACpB,WAAW,EAAE,IAAI;KACjB;CACD,CAAC"}
@@ -0,0 +1,354 @@
1
+ import type { Account } from '../../git/models/author.js';
2
+ import type { DefaultBranch } from '../../git/models/defaultBranch.js';
3
+ import type { Issue } from '../../git/models/issue.js';
4
+ import type { IssueOrPullRequest, IssueOrPullRequestType } from '../../git/models/issueOrPullRequest.js';
5
+ import type { PullRequest } from '../../git/models/pullRequest.js';
6
+ import type { GitRemote } from '../../git/models/remote.js';
7
+ import type { RepositoryMetadata } from '../../git/models/repositoryMetadata.js';
8
+ import type { ResourceDescriptor } from '../../git/models/resourceDescriptor.js';
9
+ import type { Event } from '../../utils/event.js';
10
+ import type { CacheController } from '../../utils/promiseCache.js';
11
+ import type { ConfiguredIntegrationService } from './authentication/configuredIntegrationService.js';
12
+ import type { IntegrationAuthenticationProvider } from './authentication/integrationAuthenticationProvider.js';
13
+ import type { IntegrationAuthenticationService } from './authentication/integrationAuthenticationService.js';
14
+ import type { IntegrationIds } from './constants.js';
15
+ import type { GitHostIntegration } from './models/gitHostIntegration.js';
16
+ import type { IntegrationBase } from './models/integration.js';
17
+ import type { Source } from './telemetry.js';
18
+ /**
19
+ * Context provided to {@link IntegrationService} at construction time.
20
+ *
21
+ * Replaces all extension-host coupling that integrations would otherwise reach
22
+ * for: storage, subscription, cloud connection, host-side authentication,
23
+ * configuration, commands, UI surfaces, etc. The package boundary at
24
+ * `@gitkraken/core-gitlens/plus/integrations` cannot import `vscode` or reach into the extension
25
+ * host directly — every cross-boundary concern is named here so the host can
26
+ * adapt its own services to satisfy it.
27
+ *
28
+ * Mirrors the {@link import('../../git/context.js').GitServiceContext} pattern.
29
+ */
30
+ export interface IntegrationServiceContext {
31
+ readonly storage: IntegrationStorageProvider;
32
+ readonly account: AccountProvider;
33
+ readonly config: ConfigProvider;
34
+ readonly http: HttpProvider;
35
+ readonly cache: IntegrationCacheProvider;
36
+ readonly repositories: RepositoriesProvider;
37
+ readonly hooks?: IntegrationServiceHooks;
38
+ }
39
+ /**
40
+ * The GitKraken account + the GK-cloud connect/manage flows. Unifies the former
41
+ * subscription/cloudConnection/authentication/uris ports: the host owns the GK-Dev OAuth round-trips
42
+ * end-to-end (URL shape, exchange token, redirect, callback, redeem), so the package stays out of the
43
+ * GK-cloud UI and only orchestrates (state, sync, hooks) around `connect`/`openManagement`.
44
+ */
45
+ export interface AccountProvider {
46
+ /**
47
+ * The signed-in GK account, or `undefined` when signed out. `createIfNeeded` triggers the host's
48
+ * sign-in/sign-up flow (folds the former `loginOrSignUp`/`isSignedIn`/`hasAccountSession`).
49
+ */
50
+ getAccount(options?: {
51
+ createIfNeeded?: boolean;
52
+ source?: Source;
53
+ }): Promise<{
54
+ id: string;
55
+ name?: string;
56
+ email?: string;
57
+ } | undefined>;
58
+ /** Fires when account/subscription state changes (login, logout, plan change). */
59
+ readonly onDidChange: Event<void>;
60
+ /**
61
+ * Fires on a host account check-in; `force` requests a force-refresh of cloud integration sessions
62
+ * (explicit re-validation: login, trial activation, manual validate).
63
+ */
64
+ readonly onDidCheckIn: Event<{
65
+ force?: boolean;
66
+ }>;
67
+ /** Fires when a host auth session changes (carries the changed provider id the package matches). */
68
+ readonly onDidChangeSessions: Event<AuthenticationSessionsChangeEvent>;
69
+ /**
70
+ * Whether the account is in a trial-or-paid state. Read by {@link IntegrationBase.access} to decide
71
+ * whether a connected integration's rich features are usable.
72
+ */
73
+ isTrialOrPaid(): Promise<boolean>;
74
+ /**
75
+ * Authenticated request against the GK cloud API (the connections/tokens endpoints used by
76
+ * `CloudIntegrationService`). Routes through the host's shared `ServerConnection` (circuit-breaker).
77
+ */
78
+ fetchGkApi(path: string, init?: RequestInit): Promise<Response>;
79
+ /**
80
+ * Run the GK-Dev connect flow for the given integrations: the host builds the connect URL (query,
81
+ * provider, exchange-token vs redirect), opens it, awaits its own OAuth callback, and signs in +
82
+ * connects in one round-trip. Returns `true` on success; the package syncs + fires hooks around it.
83
+ */
84
+ connect(options: {
85
+ integrationIds?: IntegrationIds[];
86
+ source?: Source;
87
+ }): Promise<boolean>;
88
+ /**
89
+ * Open the GK-Dev integrations-management page (signing in first if needed) and resolve when the user
90
+ * returns to the window — `true` if they returned (so the package re-syncs), `false` otherwise.
91
+ */
92
+ openManagement(source?: Source): Promise<boolean>;
93
+ }
94
+ /** A cached value, possibly still resolving. Mirrors the host `CacheProvider`'s result shape. */
95
+ type CacheResult<T> = Promise<T | undefined> | T | undefined;
96
+ /** Produces the value (and optional expiry) to cache on a miss; the controller allows invalidation. */
97
+ type Cacheable<T> = (cacheable: CacheController) => {
98
+ value: CacheResult<T>;
99
+ expiresAt?: number;
100
+ };
101
+ /** Cache expiry controls. */
102
+ interface CacheExpiryOptions {
103
+ expiryOverride?: boolean | number;
104
+ expireOnError?: boolean;
105
+ }
106
+ /**
107
+ * Cross-call cache for expensive provider lookups. Wraps the host's cache
108
+ * service, which deduplicates concurrent loads for the same logical key.
109
+ *
110
+ * Method names + shapes mirror the host's `CacheProvider` so the package routes
111
+ * every cache call through this provider without adapting call sites — and the
112
+ * host adapter can assign its real `CacheProvider` directly (no cast).
113
+ */
114
+ export interface IntegrationCacheProvider {
115
+ getRepositoryMetadata(repo: ResourceDescriptor, integration: GitHostIntegration | undefined, cacheable: Cacheable<RepositoryMetadata>, options?: CacheExpiryOptions): CacheResult<RepositoryMetadata>;
116
+ getRepositoryDefaultBranch(repo: ResourceDescriptor, integration: GitHostIntegration | undefined, cacheable: Cacheable<DefaultBranch>, options?: CacheExpiryOptions): CacheResult<DefaultBranch>;
117
+ getPullRequestForSha(sha: string, repo: ResourceDescriptor, integration: GitHostIntegration | undefined, cacheable: Cacheable<PullRequest>, options?: CacheExpiryOptions): CacheResult<PullRequest>;
118
+ getPullRequestForBranch(branch: string, repo: ResourceDescriptor, integration: GitHostIntegration | undefined, cacheable: Cacheable<PullRequest>, options?: CacheExpiryOptions): CacheResult<PullRequest>;
119
+ getPullRequest(id: string, resource: ResourceDescriptor, integration: IntegrationBase | undefined, cacheable: Cacheable<PullRequest>, options?: CacheExpiryOptions): CacheResult<PullRequest>;
120
+ getIssueOrPullRequest(id: string, type: IssueOrPullRequestType | undefined, resource: ResourceDescriptor, integration: IntegrationBase | undefined, cacheable: Cacheable<IssueOrPullRequest>, options?: CacheExpiryOptions): CacheResult<IssueOrPullRequest>;
121
+ getIssue(id: string, resource: ResourceDescriptor, integration: IntegrationBase | undefined, cacheable: Cacheable<Issue>, options?: CacheExpiryOptions): CacheResult<Issue>;
122
+ getCurrentAccount(integration: IntegrationBase, cacheable: Cacheable<Account>, options?: CacheExpiryOptions): CacheResult<Account>;
123
+ }
124
+ /**
125
+ * The remotes across all currently-open repositories. The package only ever needs the *remotes* (to map
126
+ * them to integrations) — never the repositories themselves — so the host flattens to a remote list
127
+ * rather than leaking a repository shape across the boundary. Used for "across all open repos" queries:
128
+ * issue aggregation by remote ({@link IntegrationService.getMyIssues}) and bitbucket's reviewing-PRs search.
129
+ */
130
+ export interface RepositoriesProvider {
131
+ getOpenRemotes(): Promise<readonly GitRemote[]>;
132
+ }
133
+ /**
134
+ * HTTP primitives the package uses to call out to provider APIs. Wraps the
135
+ * host's `@env/fetch` (which differs between Node and browser builds) so the
136
+ * package itself stays environment-agnostic.
137
+ */
138
+ export interface HttpProvider {
139
+ /** Whether the package is running in a webworker/browser environment. */
140
+ readonly isWeb: boolean;
141
+ /** Pre-assembled User-Agent string for provider API requests (host builds it from its env facts). */
142
+ readonly userAgent: string;
143
+ /** Host-supplied fetch implementation. */
144
+ fetch(input: string | URL, init?: RequestInit): Promise<Response>;
145
+ /**
146
+ * Wrap a fetch in the host's "ignore SSL errors" toggle. On Node, this
147
+ * disables TLS verification while the wrapped fetch is in flight; on the
148
+ * browser, it's a no-op.
149
+ */
150
+ wrapForForcedInsecureSSL<T>(ignoreSSLErrors: boolean | 'force', fn: () => Promise<T> | PromiseLike<T>): Promise<T>;
151
+ }
152
+ /**
153
+ * Persists integration token/session/configured-integration state.
154
+ * Wraps the host's `Container.storage` (global + workspace + secret stores).
155
+ *
156
+ * Two non-secret namespaces:
157
+ * - **Global** (`get`/`store`/`delete`/`deleteWithPrefix`) — values shared
158
+ * across all workspaces (e.g., the `integrations:configured` descriptor
159
+ * map, per-account caches keyed by access token).
160
+ * - **Workspace** (`getWorkspace`/`storeWorkspace`/`deleteWorkspace`) —
161
+ * values scoped to the active workspace (e.g., `connected:<id>` flags).
162
+ *
163
+ * Plus a **Secret** namespace (`getSecret`/`storeSecret`/`deleteSecret`)
164
+ * for OAuth tokens and other credentials.
165
+ *
166
+ * Method names mirror the host's `Storage` API so the package can route
167
+ * every storage access through this provider without renaming call sites.
168
+ */
169
+ export interface IntegrationStorageProvider {
170
+ /** Read a global (cross-workspace) value (non-secret). */
171
+ get<T = any>(key: string): T | undefined;
172
+ /** Write a global (cross-workspace) value (non-secret). */
173
+ store<T = any>(key: string, value: T): Promise<void>;
174
+ /** Delete a global value. */
175
+ delete(key: string): Promise<void>;
176
+ /** Delete every global key with the given prefix. */
177
+ deleteWithPrefix(prefix: string): Promise<void>;
178
+ /** Read a workspace-scoped value (non-secret). */
179
+ getWorkspace<T = any>(key: string): T | undefined;
180
+ /** Write a workspace-scoped value (non-secret). */
181
+ storeWorkspace<T = any>(key: string, value: T): Promise<void>;
182
+ /** Delete a workspace-scoped value (non-secret). */
183
+ deleteWorkspace(key: string): Promise<void>;
184
+ /** Read a secret (e.g., access token). */
185
+ getSecret(key: string): Promise<string | undefined>;
186
+ /** Store a secret. */
187
+ storeSecret(key: string, value: string): Promise<void>;
188
+ /** Delete a secret. */
189
+ deleteSecret(key: string): Promise<void>;
190
+ }
191
+ export interface AuthenticationSessionsChangeEvent {
192
+ readonly provider: {
193
+ readonly id: string;
194
+ };
195
+ }
196
+ /**
197
+ * Per-remote-host configuration entry (subset of the host's `RemotesConfig`).
198
+ * Used by `IntegrationService.ignoreSSLErrors` to look up self-managed remote
199
+ * settings.
200
+ */
201
+ export interface IntegrationsRemoteConfig {
202
+ readonly type: string;
203
+ readonly domain: string;
204
+ readonly ignoreSSLErrors?: boolean | 'force';
205
+ }
206
+ /**
207
+ * Snapshot of integration-relevant config values + reactive change detection.
208
+ *
209
+ * Only the keys integrations actually read are surfaced; everything else is
210
+ * the host's concern. Host adapter wraps the `system/-webview/configuration`
211
+ * helper to satisfy this.
212
+ */
213
+ export interface ConfigProvider {
214
+ /** `integrations.enabled`. Optional — omit (or omit a `false` return) and integrations are enabled. */
215
+ isIntegrationsEnabled?(): boolean;
216
+ /**
217
+ * `launchpad.*` knobs surfaced to the GitHub provider.
218
+ */
219
+ getLaunchpadOptions(): {
220
+ queryLimit?: number;
221
+ ignoredRepositories?: readonly string[];
222
+ includedOrganizations?: readonly string[];
223
+ ignoredOrganizations?: readonly string[];
224
+ };
225
+ /** Per-remote-host configurations from `remotes`. */
226
+ getRemoteConfigs(): readonly IntegrationsRemoteConfig[];
227
+ /** Fires when any integration-relevant config changes. */
228
+ readonly onDidChange: Event<ConfigChangeEvent>;
229
+ }
230
+ /** Typed change descriptor returned by {@link ConfigProvider.onDidChange}. */
231
+ export interface ConfigChangeEvent {
232
+ /** Whether `remotes` configuration changed. */
233
+ readonly remotes: boolean;
234
+ /** Whether `integrations.enabled` changed. */
235
+ readonly integrationsEnabled: boolean;
236
+ /** Whether one of the `launchpad.*` keys changed. */
237
+ readonly launchpad: boolean;
238
+ /** Whether `http.proxy` or `http.proxyStrictSSL` (VS Code core) changed. */
239
+ readonly httpProxy: boolean;
240
+ }
241
+ /**
242
+ * Outbound hooks: the package raises domain events the host wants to observe
243
+ * and exposes host-owned composition hooks (e.g., `createAuthenticationProvider`).
244
+ *
245
+ * Hooks are optional; the package omits the call when unset. They follow the
246
+ * pattern used by `@gitkraken/core-gitlens/plus/agents` (`AgentProviderCallbacks`) and the
247
+ * existing `GitServiceHooks` — the package surfaces named events; the host
248
+ * decides what to do (send telemetry, log, update UI, etc.).
249
+ *
250
+ * Replaces the direct `Container.telemetry.sendEvent` calls scattered through
251
+ * integration source today. Each hook below is named after the domain event,
252
+ * not its current telemetry event name; the host adapter forwards each one to
253
+ * the corresponding `telemetry.sendEvent('cloudIntegrations/...')` call to
254
+ * preserve existing analytics.
255
+ */
256
+ export interface IntegrationServiceHooks {
257
+ /**
258
+ * Ask the host to confirm reauthentication after an integration auth/permission failure. The host
259
+ * owns the prompt (and its "Reauthenticate" affordance) and resolves to the user's choice; the
260
+ * package performs the actual reauth when this resolves truthy. Omit to never prompt.
261
+ */
262
+ onReauthenticationRequired?(message: string): Promise<boolean | undefined>;
263
+ /**
264
+ * Confirm disabling a connected integration. The host renders the dialog (offering a "sign out"
265
+ * choice when `offerSignOut`); resolves to the user's decision, or `undefined` to cancel. Omit to
266
+ * make interactive `disconnect()` a no-op (callers should pass `silent`/`currentSessionOnly` then).
267
+ */
268
+ onConfirmDisconnect?(e: {
269
+ integrationName: string;
270
+ offerSignOut: boolean;
271
+ }): Promise<{
272
+ signOut: boolean;
273
+ } | undefined>;
274
+ /**
275
+ * Optional consumer override: construct a custom authentication provider for `id` (e.g. a manual-token
276
+ * provider via {@link createManualTokenAuthProvider}). Return `undefined` to defer to the package's own
277
+ * cloud-OAuth provider. GitLens omits this — the package builds its cloud providers internally; an
278
+ * external consumer can plug in any auth strategy here.
279
+ */
280
+ createAuthenticationProvider?(args: {
281
+ id: IntegrationIds;
282
+ auth: IntegrationAuthenticationService;
283
+ configured: ConfiguredIntegrationService;
284
+ }): Promise<IntegrationAuthenticationProvider | undefined>;
285
+ /**
286
+ * Outbound behavioral events, nested by domain — mirroring `@gitkraken/core-gitlens/git`'s `GitServiceHooks`. The
287
+ * package raises typed domain events; the host decides what to do (GitLens maps each to its telemetry
288
+ * schema, but a consumer could log or ignore them — they're behavioral, not telemetry-specific).
289
+ * Optional throughout — omit to opt out entirely (no stub functions needed).
290
+ */
291
+ connection?: {
292
+ /** A connect flow was initiated. */
293
+ onStarted?(e: {
294
+ integrationIds: IntegrationIds[] | undefined;
295
+ }, source: Source | undefined): void;
296
+ /** A connect flow finished syncing. */
297
+ onCompleted?(e: {
298
+ integrationIds: IntegrationIds[] | undefined;
299
+ connectedIntegrationIds: IntegrationIds[] | undefined;
300
+ }, source: Source | undefined): void;
301
+ /** The user opened the integrations management surface. */
302
+ onManaged?(source: Source | undefined): void;
303
+ /** A hosting/remote/issue integration's connection state changed. */
304
+ onStateChanged?(e: {
305
+ id: IntegrationIds;
306
+ key: string;
307
+ connected: boolean;
308
+ kind: 'hosting' | 'remote' | 'issue';
309
+ }): void;
310
+ /** The set of connected integrations changed (e.g. for connected-count attributes). */
311
+ onConnectedChanged?(e: {
312
+ integrationIds: IntegrationIds[];
313
+ }): void;
314
+ /** Fetching the set of connected providers failed. */
315
+ onConnectionsFetchFailed?(e: {
316
+ code: number | undefined;
317
+ }): void;
318
+ /** Fetching/refreshing a single provider's token failed. */
319
+ onConnectionFetchFailed?(e: {
320
+ id: IntegrationIds;
321
+ code: number | undefined;
322
+ refreshing: boolean;
323
+ }): void;
324
+ /** Disconnecting a provider's token failed. */
325
+ onDisconnectFailed?(e: {
326
+ id: IntegrationIds;
327
+ code: number | undefined;
328
+ }): void;
329
+ };
330
+ /** Outbound session events (behavioral; the host maps to telemetry). */
331
+ session?: {
332
+ /** A session refresh was skipped (reported once per reason). */
333
+ onRefreshSkipped?(e: {
334
+ id: IntegrationIds;
335
+ reason: 'skip-non-cloud' | 'missing-expiry';
336
+ cloud: boolean | undefined;
337
+ }): void;
338
+ };
339
+ /** Outbound user-facing notifications (fire-and-forget). The host renders them; a consumer may log/ignore. */
340
+ ui?: {
341
+ /** A non-fatal error to surface. */
342
+ onError?(message: string): void;
343
+ /** The integration's API returned a 500-level error. */
344
+ onRequestFailed?(message: string): void;
345
+ /** The integration's API request timed out. */
346
+ onRequestTimedOut?(integrationName: string): void;
347
+ /** An integration was disconnected after too many consecutive failed requests. */
348
+ onDisconnectedAfterTooManyFailures?(integrationName: string): void;
349
+ /** Bitbucket's "Pull Requests for Commit" app isn't installed; `revLink` opens the install page. */
350
+ onBitbucketCommitLinksAppMissing?(revLink: string): void;
351
+ };
352
+ }
353
+ export {};
354
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/plus/integrations/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AAC5G,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,kDAAkD,CAAC;AACrG,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,uDAAuD,CAAC;AAC/G,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,sDAAsD,C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IAAI,CAAC;KACT,CAAC;IACF,8GAA8G;IAC9G,EAAE,CAAC,EAAE;QACJ,oCAAoC;QACpC,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QAChC,wDAAwD;QACxD,eAAe,CAAC,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QACxC,+CAA+C;QAC/C,iBAAiB,CAAC,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;QAClD,kFAAkF;QAClF,kCAAkC,CAAC,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;QACnE,oGAAoG;QACpG,gCAAgC,CAAC,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;KACzD,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/plus/integrations/context.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ export type { AuthTokenInfo } from '../../git/errors.js';
2
+ export { AuthenticationError, AuthenticationErrorReason, RequestClientError, RequestNotFoundError, RequestRateLimitError, } from '../../git/errors.js';
3
+ /**
4
+ * Thrown by integration provider HTTP clients when an upstream request fails.
5
+ */
6
+ export declare class ProviderFetchError extends Error {
7
+ readonly response: Response;
8
+ get status(): number;
9
+ get statusText(): string;
10
+ constructor(provider: string, response: Response, errors?: {
11
+ message: string;
12
+ }[]);
13
+ }
14
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/plus/integrations/errors.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EACN,mBAAmB,EACnB,yBAAyB,EACzB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,GACrB,MAAM,wBAAwB,CAAC;AAEhC;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,KAAK;aAW3B,QAAQ,EAAE,QAAQ;IAVnC,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,IAAI,UAAU,IAAI,MAAM,CAEvB;gBAGA,QAAQ,EAAE,MAAM,EACA,QAAQ,EAAE,QAAQ,EAClC,MAAM,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE;CAU/B"}
@@ -0,0 +1,19 @@
1
+ export { AuthenticationError, AuthenticationErrorReason, RequestClientError, RequestNotFoundError, RequestRateLimitError, } from '../../git/errors.js';
2
+ /**
3
+ * Thrown by integration provider HTTP clients when an upstream request fails.
4
+ */
5
+ export class ProviderFetchError extends Error {
6
+ response;
7
+ get status() {
8
+ return this.response.status;
9
+ }
10
+ get statusText() {
11
+ return this.response.statusText;
12
+ }
13
+ constructor(provider, response, errors) {
14
+ super(`${provider} request failed: ${!response.ok ? `(${response.status}) ${response.statusText}. ` : ''}${errors?.length ? errors[0].message : ''}`);
15
+ this.response = response;
16
+ Error.captureStackTrace?.(this, new.target);
17
+ }
18
+ }
19
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/plus/integrations/errors.ts"],"names":[],"mappings":"AACA,OAAO,EACN,mBAAmB,EACnB,yBAAyB,EACzB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,GACrB,MAAM,wBAAwB,CAAC;AAEhC;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,KAAK;IAW3B;IAVjB,IAAI,MAAM;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;IAC7B,CAAC;IAED,IAAI,UAAU;QACb,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC;IACjC,CAAC;IAED,YACC,QAAgB,EACA,QAAkB,EAClC,MAA8B;QAE9B,KAAK,CACJ,GAAG,QAAQ,oBAAoB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,MAAM,KAAK,QAAQ,CAAC,UAAU,IAAI,CAAC,CAAC,CAAC,EAAE,GACjG,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EACtC,EAAE,CACF,CAAC;QAPc,aAAQ,GAAR,QAAQ,CAAU;QASlC,KAAK,CAAC,iBAAiB,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;CACD"}
@@ -0,0 +1,32 @@
1
+ import type { IntegrationServiceContext } from './context.js';
2
+ import { IntegrationService } from './integrationService.js';
3
+ /**
4
+ * The public manager — what consumers get back from
5
+ * {@link createIntegrationManager}. Identical shape to {@link IntegrationService}
6
+ * for now (we may narrow this surface in a future major).
7
+ */
8
+ export type IntegrationManager = IntegrationService;
9
+ /**
10
+ * Construct an `@gitkraken/core-gitlens/plus/integrations` manager bound to the supplied runtime.
11
+ *
12
+ * The runtime is the **single** cross-boundary contract — anything the
13
+ * package needs (HTTP, storage, cache, auth, subscription, telemetry, UI,
14
+ * configuration, environment) flows through it. The package never imports
15
+ * `vscode`, `Container`, or any consumer-internal types.
16
+ *
17
+ * The returned manager owns its internal services; dispose it (or its
18
+ * containing scope) to release every cached integration plus the runtime's
19
+ * own VS Code subscriptions.
20
+ */
21
+ export declare function createIntegrationManager(ctx: IntegrationServiceContext): IntegrationManager;
22
+ export type { AccountProvider, AuthenticationSessionsChangeEvent, IntegrationCacheProvider, ConfigChangeEvent, ConfigProvider, RepositoriesProvider, HttpProvider, IntegrationServiceContext, IntegrationServiceHooks, IntegrationStorageProvider, } from './context.js';
23
+ export type { ApiClients } from './providers/apiClients.js';
24
+ export type { Source } from './telemetry.js';
25
+ export type { IntegrationIds, SupportedCloudIntegrationIds } from './constants.js';
26
+ export type { ConnectionStateChangeEvent, IntegrationConnectionChangeEvent } from './integrationService.js';
27
+ export type { ConfiguredIntegrationsChangeEvent } from './authentication/configuredIntegrationService.js';
28
+ export type { IntegrationAuthenticationProvider, IntegrationAuthenticationProviderDescriptor, IntegrationAuthenticationSessionDescriptor, } from './authentication/integrationAuthenticationProvider.js';
29
+ export type { AuthenticationSessionLike, CloudIntegrationAuthType, ProviderAuthenticationSession, } from './authentication/models.js';
30
+ export { createManualTokenAuthProvider, type ManualTokenAuthProviderOptions, } from './authentication/manualTokenProvider.js';
31
+ export { GitCloudHostIntegrationId, GitSelfManagedHostIntegrationId, IssuesCloudHostIntegrationId, isIntegrationId, isSupportedCloudIntegrationId, } from './constants.js';
32
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plus/integrations/index.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,kBAAkB,CAAC;AAEpD;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,yBAAyB,GAAG,kBAAkB,CAiB3F;AAsBD,YAAY,EACX,eAAe,EACf,iCAAiC,EACjC,wBAAwB,EACxB,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,yBAAyB,EACzB,uBAAuB,EACvB,0BAA0B,GAC1B,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,YAAY,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,YAAY,EAAE,cAAc,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AACnF,YAAY,EAAE,0BAA0B,EAAE,gCAAgC,EAAE,MAAM,yBAAyB,CAAC;AAC5G,YAAY,EAAE,iCAAiC,EAAE,MAAM,kDAAkD,CAAC;AAM1G,YAAY,EACX,iCAAiC,EACjC,2CAA2C,EAC3C,0CAA0C,GAC1C,MAAM,uDAAuD,CAAC;AAC/D,YAAY,EACX,yBAAyB,EACzB,wBAAwB,EACxB,6BAA6B,GAC7B,MAAM,4BAA4B,CAAC;AAKpC,OAAO,EACN,6BAA6B,EAC7B,KAAK,8BAA8B,GACnC,MAAM,yCAAyC,CAAC;AAEjD,OAAO,EACN,yBAAyB,EACzB,+BAA+B,EAC/B,4BAA4B,EAC5B,eAAe,EACf,6BAA6B,GAC7B,MAAM,gBAAgB,CAAC"}