@yadsh/dsh-qa-integrations 0.5.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 (212) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +617 -0
  3. package/compatibility.json +10 -0
  4. package/cordis.patch.yml +5 -0
  5. package/lib/broker.js +239 -0
  6. package/lib/broker.js.map +1 -0
  7. package/lib/client/bitrix24.js +33 -0
  8. package/lib/client/bitrix24.js.map +1 -0
  9. package/lib/client/card.js +33 -0
  10. package/lib/client/card.js.map +1 -0
  11. package/lib/client/confluence.js +148 -0
  12. package/lib/client/confluence.js.map +1 -0
  13. package/lib/client/copy.js +18 -0
  14. package/lib/client/copy.js.map +1 -0
  15. package/lib/client/gitlab.js +64 -0
  16. package/lib/client/gitlab.js.map +1 -0
  17. package/lib/client/index.js +71 -0
  18. package/lib/client/index.js.map +1 -0
  19. package/lib/client/integrations.js +34 -0
  20. package/lib/client/integrations.js.map +1 -0
  21. package/lib/client/jira.js +150 -0
  22. package/lib/client/jira.js.map +1 -0
  23. package/lib/client/provider-card.js +143 -0
  24. package/lib/client/provider-card.js.map +1 -0
  25. package/lib/client/styles.js +35 -0
  26. package/lib/client/styles.js.map +1 -0
  27. package/lib/client/teamcity.js +55 -0
  28. package/lib/client/teamcity.js.map +1 -0
  29. package/lib/client.js +8069 -0
  30. package/lib/client.js.map +1 -0
  31. package/lib/coerce.js +69 -0
  32. package/lib/coerce.js.map +1 -0
  33. package/lib/config.js +51 -0
  34. package/lib/config.js.map +1 -0
  35. package/lib/errors.js +14 -0
  36. package/lib/errors.js.map +1 -0
  37. package/lib/index.js +510 -0
  38. package/lib/index.js.map +1 -0
  39. package/lib/providers/bitrix24/catalog.js +245 -0
  40. package/lib/providers/bitrix24/catalog.js.map +1 -0
  41. package/lib/providers/bitrix24/config.js +40 -0
  42. package/lib/providers/bitrix24/config.js.map +1 -0
  43. package/lib/providers/bitrix24/index.js +128 -0
  44. package/lib/providers/bitrix24/index.js.map +1 -0
  45. package/lib/providers/bitrix24/operations.js +491 -0
  46. package/lib/providers/bitrix24/operations.js.map +1 -0
  47. package/lib/providers/bitrix24/tools.js +1035 -0
  48. package/lib/providers/bitrix24/tools.js.map +1 -0
  49. package/lib/providers/bitrix24/transport.js +142 -0
  50. package/lib/providers/bitrix24/transport.js.map +1 -0
  51. package/lib/providers/confluence/adf.js +348 -0
  52. package/lib/providers/confluence/adf.js.map +1 -0
  53. package/lib/providers/confluence/catalog.js +135 -0
  54. package/lib/providers/confluence/catalog.js.map +1 -0
  55. package/lib/providers/confluence/config.js +196 -0
  56. package/lib/providers/confluence/config.js.map +1 -0
  57. package/lib/providers/confluence/cql.js +78 -0
  58. package/lib/providers/confluence/cql.js.map +1 -0
  59. package/lib/providers/confluence/index.js +319 -0
  60. package/lib/providers/confluence/index.js.map +1 -0
  61. package/lib/providers/confluence/operations.js +653 -0
  62. package/lib/providers/confluence/operations.js.map +1 -0
  63. package/lib/providers/confluence/tools.js +282 -0
  64. package/lib/providers/confluence/tools.js.map +1 -0
  65. package/lib/providers/confluence/transport.js +247 -0
  66. package/lib/providers/confluence/transport.js.map +1 -0
  67. package/lib/providers/contract.js +2 -0
  68. package/lib/providers/contract.js.map +1 -0
  69. package/lib/providers/gitlab/catalog.js +171 -0
  70. package/lib/providers/gitlab/catalog.js.map +1 -0
  71. package/lib/providers/gitlab/config.js +141 -0
  72. package/lib/providers/gitlab/config.js.map +1 -0
  73. package/lib/providers/gitlab/index.js +227 -0
  74. package/lib/providers/gitlab/index.js.map +1 -0
  75. package/lib/providers/gitlab/operations.js +794 -0
  76. package/lib/providers/gitlab/operations.js.map +1 -0
  77. package/lib/providers/gitlab/tools.js +859 -0
  78. package/lib/providers/gitlab/tools.js.map +1 -0
  79. package/lib/providers/gitlab/transport.js +140 -0
  80. package/lib/providers/gitlab/transport.js.map +1 -0
  81. package/lib/providers/jira/adf.js +235 -0
  82. package/lib/providers/jira/adf.js.map +1 -0
  83. package/lib/providers/jira/catalog.js +145 -0
  84. package/lib/providers/jira/catalog.js.map +1 -0
  85. package/lib/providers/jira/config.js +198 -0
  86. package/lib/providers/jira/config.js.map +1 -0
  87. package/lib/providers/jira/index.js +301 -0
  88. package/lib/providers/jira/index.js.map +1 -0
  89. package/lib/providers/jira/jql.js +299 -0
  90. package/lib/providers/jira/jql.js.map +1 -0
  91. package/lib/providers/jira/operations.js +617 -0
  92. package/lib/providers/jira/operations.js.map +1 -0
  93. package/lib/providers/jira/tools.js +341 -0
  94. package/lib/providers/jira/tools.js.map +1 -0
  95. package/lib/providers/jira/transport.js +227 -0
  96. package/lib/providers/jira/transport.js.map +1 -0
  97. package/lib/providers/registry.js +21 -0
  98. package/lib/providers/registry.js.map +1 -0
  99. package/lib/providers/shared/account.js +20 -0
  100. package/lib/providers/shared/account.js.map +1 -0
  101. package/lib/providers/shared/host.js +15 -0
  102. package/lib/providers/shared/host.js.map +1 -0
  103. package/lib/providers/shared/http.js +148 -0
  104. package/lib/providers/shared/http.js.map +1 -0
  105. package/lib/providers/teamcity/artifacts.js +155 -0
  106. package/lib/providers/teamcity/artifacts.js.map +1 -0
  107. package/lib/providers/teamcity/catalog.js +155 -0
  108. package/lib/providers/teamcity/catalog.js.map +1 -0
  109. package/lib/providers/teamcity/config.js +262 -0
  110. package/lib/providers/teamcity/config.js.map +1 -0
  111. package/lib/providers/teamcity/index.js +228 -0
  112. package/lib/providers/teamcity/index.js.map +1 -0
  113. package/lib/providers/teamcity/locators.js +95 -0
  114. package/lib/providers/teamcity/locators.js.map +1 -0
  115. package/lib/providers/teamcity/logs.js +113 -0
  116. package/lib/providers/teamcity/logs.js.map +1 -0
  117. package/lib/providers/teamcity/network.js +160 -0
  118. package/lib/providers/teamcity/network.js.map +1 -0
  119. package/lib/providers/teamcity/operations.js +625 -0
  120. package/lib/providers/teamcity/operations.js.map +1 -0
  121. package/lib/providers/teamcity/tools.js +480 -0
  122. package/lib/providers/teamcity/tools.js.map +1 -0
  123. package/lib/providers/teamcity/transport.js +126 -0
  124. package/lib/providers/teamcity/transport.js.map +1 -0
  125. package/lib/redaction.js +38 -0
  126. package/lib/redaction.js.map +1 -0
  127. package/lib/repository.js +414 -0
  128. package/lib/repository.js.map +1 -0
  129. package/lib/secrets/key-provider.js +76 -0
  130. package/lib/secrets/key-provider.js.map +1 -0
  131. package/lib/secrets/secret-store.js +93 -0
  132. package/lib/secrets/secret-store.js.map +1 -0
  133. package/lib/shared/settings.js +19 -0
  134. package/lib/shared/settings.js.map +1 -0
  135. package/lib/tool-kit.js +55 -0
  136. package/lib/tool-kit.js.map +1 -0
  137. package/lib/tools.js +28 -0
  138. package/lib/tools.js.map +1 -0
  139. package/lib/typert.host.d.ts +3 -0
  140. package/lib/typert.host.js +1689 -0
  141. package/lib/typert.remote-client.d.ts +84 -0
  142. package/lib/typert.remote-client.js +1429 -0
  143. package/lib/types/broker.d.ts +30 -0
  144. package/lib/types/client/bitrix24.d.ts +18 -0
  145. package/lib/types/client/card.d.ts +13 -0
  146. package/lib/types/client/confluence.d.ts +17 -0
  147. package/lib/types/client/copy.d.ts +7 -0
  148. package/lib/types/client/gitlab.d.ts +15 -0
  149. package/lib/types/client/index.d.ts +13 -0
  150. package/lib/types/client/integrations.d.ts +28 -0
  151. package/lib/types/client/jira.d.ts +17 -0
  152. package/lib/types/client/provider-card.d.ts +63 -0
  153. package/lib/types/client/styles.d.ts +7 -0
  154. package/lib/types/client/teamcity.d.ts +19 -0
  155. package/lib/types/coerce.d.ts +18 -0
  156. package/lib/types/config.d.ts +48 -0
  157. package/lib/types/errors.d.ts +26 -0
  158. package/lib/types/index.d.ts +170 -0
  159. package/lib/types/providers/bitrix24/catalog.d.ts +48 -0
  160. package/lib/types/providers/bitrix24/config.d.ts +43 -0
  161. package/lib/types/providers/bitrix24/index.d.ts +31 -0
  162. package/lib/types/providers/bitrix24/operations.d.ts +13 -0
  163. package/lib/types/providers/bitrix24/tools.d.ts +9 -0
  164. package/lib/types/providers/bitrix24/transport.d.ts +26 -0
  165. package/lib/types/providers/confluence/adf.d.ts +22 -0
  166. package/lib/types/providers/confluence/catalog.d.ts +59 -0
  167. package/lib/types/providers/confluence/config.d.ts +68 -0
  168. package/lib/types/providers/confluence/cql.d.ts +43 -0
  169. package/lib/types/providers/confluence/index.d.ts +73 -0
  170. package/lib/types/providers/confluence/operations.d.ts +92 -0
  171. package/lib/types/providers/confluence/tools.d.ts +15 -0
  172. package/lib/types/providers/confluence/transport.d.ts +77 -0
  173. package/lib/types/providers/contract.d.ts +33 -0
  174. package/lib/types/providers/gitlab/catalog.d.ts +49 -0
  175. package/lib/types/providers/gitlab/config.d.ts +50 -0
  176. package/lib/types/providers/gitlab/index.d.ts +49 -0
  177. package/lib/types/providers/gitlab/operations.d.ts +40 -0
  178. package/lib/types/providers/gitlab/tools.d.ts +15 -0
  179. package/lib/types/providers/gitlab/transport.d.ts +52 -0
  180. package/lib/types/providers/jira/adf.d.ts +27 -0
  181. package/lib/types/providers/jira/catalog.d.ts +74 -0
  182. package/lib/types/providers/jira/config.d.ts +73 -0
  183. package/lib/types/providers/jira/index.d.ts +79 -0
  184. package/lib/types/providers/jira/jql.d.ts +51 -0
  185. package/lib/types/providers/jira/operations.d.ts +58 -0
  186. package/lib/types/providers/jira/tools.d.ts +17 -0
  187. package/lib/types/providers/jira/transport.d.ts +65 -0
  188. package/lib/types/providers/registry.d.ts +9 -0
  189. package/lib/types/providers/shared/account.d.ts +10 -0
  190. package/lib/types/providers/shared/host.d.ts +9 -0
  191. package/lib/types/providers/shared/http.d.ts +51 -0
  192. package/lib/types/providers/teamcity/artifacts.d.ts +45 -0
  193. package/lib/types/providers/teamcity/catalog.d.ts +55 -0
  194. package/lib/types/providers/teamcity/config.d.ts +66 -0
  195. package/lib/types/providers/teamcity/index.d.ts +62 -0
  196. package/lib/types/providers/teamcity/locators.d.ts +47 -0
  197. package/lib/types/providers/teamcity/logs.d.ts +31 -0
  198. package/lib/types/providers/teamcity/network.d.ts +32 -0
  199. package/lib/types/providers/teamcity/operations.d.ts +84 -0
  200. package/lib/types/providers/teamcity/tools.d.ts +15 -0
  201. package/lib/types/providers/teamcity/transport.d.ts +53 -0
  202. package/lib/types/redaction.d.ts +3 -0
  203. package/lib/types/repository.d.ts +48 -0
  204. package/lib/types/secrets/key-provider.d.ts +30 -0
  205. package/lib/types/secrets/secret-store.d.ts +12 -0
  206. package/lib/types/shared/settings.d.ts +19 -0
  207. package/lib/types/tool-kit.d.ts +26 -0
  208. package/lib/types/tools.d.ts +16 -0
  209. package/lib/types/types.d.ts +138 -0
  210. package/lib/types.js +2 -0
  211. package/lib/types.js.map +1 -0
  212. package/package.json +143 -0
@@ -0,0 +1,30 @@
1
+ import type { PluginLogger } from "@yadsh/dsh-plugin-log";
2
+ import type { IntegrationProviderRegistry } from "./providers/registry.js";
3
+ import type { IntegrationRepository } from "./repository.js";
4
+ import type { SecretStore } from "./secrets/secret-store.js";
5
+ import type { CredentialInput, IntegrationPrincipal, IntegrationProviderId, IntegrationProviderSummary, IntegrationSummary, IntegrationToolResult, PolicyPatch } from "./types.js";
6
+ /** In-process broker boundary; no caller outside it receives decrypted secrets. */
7
+ export declare class IntegrationBroker {
8
+ private readonly repository;
9
+ private readonly secrets;
10
+ private readonly providers;
11
+ private readonly logger;
12
+ constructor(repository: IntegrationRepository, secrets: SecretStore, providers: IntegrationProviderRegistry, logger: PluginLogger);
13
+ listProviders(): readonly IntegrationProviderSummary[];
14
+ list(principal: IntegrationPrincipal): readonly IntegrationSummary[];
15
+ summary(principal: IntegrationPrincipal, providerId: IntegrationProviderId): IntegrationSummary;
16
+ /** Connect one provider for one principal; the provider owns its credential shape. */
17
+ connect(principal: IntegrationPrincipal, providerId: IntegrationProviderId, input: CredentialInput): Promise<IntegrationSummary>;
18
+ validate(principal: IntegrationPrincipal, providerId: IntegrationProviderId): Promise<IntegrationSummary>;
19
+ patchPolicy(principal: IntegrationPrincipal, providerId: IntegrationProviderId, patch: PolicyPatch): IntegrationSummary;
20
+ disconnect(principal: IntegrationPrincipal, providerId: IntegrationProviderId): boolean;
21
+ call(principal: IntegrationPrincipal, request: {
22
+ readonly provider: IntegrationProviderId;
23
+ readonly operation: string;
24
+ readonly input: Readonly<Record<string, unknown>>;
25
+ readonly sourceSessionId: string;
26
+ }): Promise<IntegrationToolResult>;
27
+ private requireConnected;
28
+ private decrypt;
29
+ }
30
+ //# sourceMappingURL=broker.d.ts.map
@@ -0,0 +1,18 @@
1
+ import type { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
2
+ import type { IntegrationSummary, PolicyPatch } from "../types.js";
3
+ export interface IntegrationsRemote {
4
+ describe(): Promise<RemoteResult<{
5
+ readonly enabled: boolean;
6
+ /** Ids of the providers this deployment mounted, in card order. */
7
+ readonly providers: readonly string[];
8
+ }>>;
9
+ getBitrix24(token: string): Promise<RemoteResult<IntegrationSummary>>;
10
+ putBitrix24Credential(token: string, input: {
11
+ readonly token: string;
12
+ }): Promise<RemoteResult<IntegrationSummary>>;
13
+ testBitrix24(token: string): Promise<RemoteResult<IntegrationSummary>>;
14
+ patchBitrix24Policy(token: string, patch: PolicyPatch): Promise<RemoteResult<IntegrationSummary>>;
15
+ disconnectBitrix24(token: string): Promise<RemoteResult<boolean>>;
16
+ }
17
+ export declare function createBitrix24Card(remote: IntegrationsRemote): ({ token }: import("@yadsh/dsh-qa-surface/client/settings").QaUserSettingsSectionProps) => import("react/jsx-runtime").JSX.Element;
18
+ //# sourceMappingURL=bitrix24.d.ts.map
@@ -0,0 +1,13 @@
1
+ import type { QaUserSession } from "@yadsh/dsh-qa-surface/client/settings";
2
+ import { type ReactElement } from "react";
3
+ import { type IntegrationsClientRemote } from "./integrations.js";
4
+ /**
5
+ * The Integrations card of the host's "Plugin configuration" tab.
6
+ *
7
+ * A connection belongs to a QA account, and the token of that account is the
8
+ * only credential the principal-scoped remotes accept, so the card renders the
9
+ * provider cards only once the QA session service reports a signed-in account —
10
+ * and says so instead of showing forms that could only fail.
11
+ */
12
+ export declare function createIntegrationsCard(remote: IntegrationsClientRemote, providers: readonly string[], session: QaUserSession): () => ReactElement;
13
+ //# sourceMappingURL=card.d.ts.map
@@ -0,0 +1,17 @@
1
+ import type { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
2
+ import type { QaUserSettingsSectionProps } from "@yadsh/dsh-qa-surface/client/settings";
3
+ import type { IntegrationInstanceSummary, IntegrationSummary, PolicyPatch } from "../types.js";
4
+ export interface ConfluenceRemote {
5
+ confluenceSites(token: string): Promise<RemoteResult<readonly IntegrationInstanceSummary[]>>;
6
+ getConfluence(token: string): Promise<RemoteResult<IntegrationSummary>>;
7
+ putConfluenceCredential(token: string, input: {
8
+ readonly instanceId: string;
9
+ readonly email: string;
10
+ readonly token: string;
11
+ }): Promise<RemoteResult<IntegrationSummary>>;
12
+ testConfluence(token: string): Promise<RemoteResult<IntegrationSummary>>;
13
+ patchConfluencePolicy(token: string, patch: PolicyPatch): Promise<RemoteResult<IntegrationSummary>>;
14
+ disconnectConfluence(token: string): Promise<RemoteResult<boolean>>;
15
+ }
16
+ export declare function createConfluenceCard(remote: ConfluenceRemote): ({ token }: QaUserSettingsSectionProps) => import("react/jsx-runtime").JSX.Element;
17
+ //# sourceMappingURL=confluence.d.ts.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Copy shared by the provider cards: both render the same failure taxonomy and
3
+ * the same timestamps, and only the provider-specific wording differs.
4
+ */
5
+ export declare function dateTime(value: string | null): string;
6
+ export declare function failureCopy(copy: Readonly<Record<string, string>>, error: unknown): string;
7
+ //# sourceMappingURL=copy.d.ts.map
@@ -0,0 +1,15 @@
1
+ import type { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
2
+ import type { IntegrationInstanceSummary, IntegrationSummary, PolicyPatch } from "../types.js";
3
+ export interface GitlabRemote {
4
+ gitlabInstances(token: string): Promise<RemoteResult<readonly IntegrationInstanceSummary[]>>;
5
+ getGitlab(token: string): Promise<RemoteResult<IntegrationSummary>>;
6
+ putGitlabCredential(token: string, input: {
7
+ readonly instanceId: string;
8
+ readonly token: string;
9
+ }): Promise<RemoteResult<IntegrationSummary>>;
10
+ testGitlab(token: string): Promise<RemoteResult<IntegrationSummary>>;
11
+ patchGitlabPolicy(token: string, patch: PolicyPatch): Promise<RemoteResult<IntegrationSummary>>;
12
+ disconnectGitlab(token: string): Promise<RemoteResult<boolean>>;
13
+ }
14
+ export declare function createGitlabCard(remote: GitlabRemote): ({ token }: import("@yadsh/dsh-qa-surface/client/settings").QaUserSettingsSectionProps) => import("react/jsx-runtime").JSX.Element;
15
+ //# sourceMappingURL=gitlab.d.ts.map
@@ -0,0 +1,13 @@
1
+ import type { Context } from "@deepseek-ai/cordis";
2
+ import type { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
3
+ import type { IntegrationSummary, PolicyPatch } from "../types.js";
4
+ export declare const inject: readonly ["remote", "qaUserSettingsSections", "qaUserSession", "slots"];
5
+ /**
6
+ * Both mounts of the provider cards come from this one bundle: the page of the
7
+ * signed-in user's QA settings dialog, where the account gate lives, and the
8
+ * card of the host's "Plugin configuration" tab, which reaches the same account
9
+ * through the `qaUserSession` service.
10
+ */
11
+ export declare function apply(ctx: Context): Promise<() => Promise<void>>;
12
+ export type { IntegrationSummary, PolicyPatch, RemoteResult };
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,28 @@
1
+ import type { QaUserSettingsSectionProps } from "@yadsh/dsh-qa-surface/client/settings";
2
+ import { type IntegrationsRemote } from "./bitrix24.js";
3
+ import { type ConfluenceRemote } from "./confluence.js";
4
+ import { type GitlabRemote } from "./gitlab.js";
5
+ import { type JiraRemote } from "./jira.js";
6
+ import { type TeamcityRemote } from "./teamcity.js";
7
+ export type IntegrationsClientRemote = IntegrationsRemote & ConfluenceRemote & GitlabRemote & TeamcityRemote & JiraRemote;
8
+ /** What every mount of the provider cards needs. */
9
+ export interface ProviderCardsProps {
10
+ /** Current QA account token; transport authentication for the remotes. */
11
+ readonly token: string;
12
+ /** Provider ids the Host declared, in mount order. */
13
+ readonly providers: readonly string[];
14
+ }
15
+ /** The disclosure that has to stand next to the credentials. */
16
+ export declare const INTEGRATIONS_DISCLOSURE = "\u0414\u0430\u043D\u043D\u044B\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u0430\u0433\u0435\u043D\u0442 \u0447\u0438\u0442\u0430\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 \u0438\u043D\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044E, \u043C\u043E\u0433\u0443\u0442 \u043F\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u043E\u043C\u0443 \u0434\u043B\u044F \u044D\u0442\u043E\u0433\u043E \u0447\u0430\u0442\u0430 LLM-\u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440\u0443 \u0434\u043B\u044F \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044F \u0437\u0430\u043F\u0440\u043E\u0441\u0430. \u0421\u0435\u043A\u0440\u0435\u0442 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F \u0432 \u043C\u043E\u0434\u0435\u043B\u044C \u043D\u0435 \u043F\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044F.";
17
+ /**
18
+ * One card per provider the deployment mounted. The list comes from the host
19
+ * (`describe`), so a provider the operator switched off simply never renders and
20
+ * the client carries no knowledge of which exist.
21
+ *
22
+ * Both mounts share this component: the page of the QA settings dialog, where
23
+ * the account gate lives, and the host's plugin-configuration card.
24
+ */
25
+ export declare function createProviderCards(remote: IntegrationsClientRemote): ({ token, providers }: ProviderCardsProps) => import("react/jsx-runtime").JSX.Element;
26
+ /** The `Интеграции` page of the signed-in user's QA settings dialog. */
27
+ export declare function createIntegrationsPage(remote: IntegrationsClientRemote, providers: readonly string[]): ({ token }: QaUserSettingsSectionProps) => import("react/jsx-runtime").JSX.Element;
28
+ //# sourceMappingURL=integrations.d.ts.map
@@ -0,0 +1,17 @@
1
+ import type { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
2
+ import type { QaUserSettingsSectionProps } from "@yadsh/dsh-qa-surface/client/settings";
3
+ import type { IntegrationInstanceSummary, IntegrationSummary, PolicyPatch } from "../types.js";
4
+ export interface JiraRemote {
5
+ jiraSites(token: string): Promise<RemoteResult<readonly IntegrationInstanceSummary[]>>;
6
+ getJira(token: string): Promise<RemoteResult<IntegrationSummary>>;
7
+ putJiraCredential(token: string, input: {
8
+ readonly siteId: string;
9
+ readonly email: string;
10
+ readonly token: string;
11
+ }): Promise<RemoteResult<IntegrationSummary>>;
12
+ testJira(token: string): Promise<RemoteResult<IntegrationSummary>>;
13
+ patchJiraPolicy(token: string, patch: PolicyPatch): Promise<RemoteResult<IntegrationSummary>>;
14
+ disconnectJira(token: string): Promise<RemoteResult<boolean>>;
15
+ }
16
+ export declare function createJiraCard(remote: JiraRemote): ({ token }: QaUserSettingsSectionProps) => import("react/jsx-runtime").JSX.Element;
17
+ //# sourceMappingURL=jira.d.ts.map
@@ -0,0 +1,63 @@
1
+ import type { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
2
+ import type { QaUserSettingsSectionProps } from "@yadsh/dsh-qa-surface/client/settings";
3
+ import type { ReactNode } from "react";
4
+ import type { IntegrationCapability, IntegrationSummary, PolicyPatch } from "../types.js";
5
+ /**
6
+ * The skeleton the three provider cards share: the failure banner, the status
7
+ * head, the connected summary, the save/test/patch/disconnect flows, the
8
+ * capability switches and the replace/disconnect confirmations. A provider
9
+ * only supplies its copy, its load sequence and its credential form.
10
+ */
11
+ export interface ProviderCardState<Extra> {
12
+ readonly token: string;
13
+ readonly busy: boolean;
14
+ readonly summary: IntegrationSummary | undefined;
15
+ readonly connected: boolean;
16
+ readonly showCredential: boolean;
17
+ readonly credential: string;
18
+ readonly extra: Extra;
19
+ setCredential(value: string): void;
20
+ /** Clear the form and leave replace mode. */
21
+ cancelCredential(): void;
22
+ save(): void;
23
+ test(): void;
24
+ patch(capability: IntegrationCapability, allowed: boolean): void;
25
+ setConfirmDisconnect(value: boolean): void;
26
+ disconnect(): void;
27
+ fail(cause: unknown): void;
28
+ accept(result: RemoteResult<IntegrationSummary>): boolean;
29
+ }
30
+ /** Everything a provider's load sequence may touch. */
31
+ export interface ProviderCardLoad<Extra> {
32
+ readonly token: string;
33
+ readonly extra: Extra;
34
+ accept(result: RemoteResult<IntegrationSummary>): boolean;
35
+ fail(cause: unknown): void;
36
+ }
37
+ /** The remote calls every provider card makes on the shared skeleton. */
38
+ export interface ProviderCardCalls<Extra> {
39
+ save(token: string, credential: string, extra: Extra): Promise<RemoteResult<IntegrationSummary>>;
40
+ test(token: string): Promise<RemoteResult<IntegrationSummary>>;
41
+ patch(token: string, patch: PolicyPatch): Promise<RemoteResult<IntegrationSummary>>;
42
+ disconnect(token: string): Promise<RemoteResult<boolean>>;
43
+ }
44
+ export interface ProviderCardSpec<Extra> {
45
+ readonly title: string;
46
+ /** Portal line while nothing is connected. */
47
+ readonly portalFallback: string;
48
+ /** Connected-account line when upstream reports no name. */
49
+ readonly accountFallback: string;
50
+ readonly errorCopy: Readonly<Record<string, string>>;
51
+ /** Muted per-capability note when the token lacks the scope. */
52
+ readonly notGrantedText: string;
53
+ /** Disabled capability rows the provider does not offer yet. */
54
+ readonly futurePermissions: readonly string[];
55
+ useExtra(): Extra;
56
+ load(load: ProviderCardLoad<Extra>): Promise<void>;
57
+ readonly calls: ProviderCardCalls<Extra>;
58
+ credentialSection(state: ProviderCardState<Extra>): ReactNode;
59
+ /** Muted note under the head, or null when this provider shows none. */
60
+ readonly notConfiguredHint?: (state: ProviderCardState<Extra>) => ReactNode | null;
61
+ }
62
+ export declare function createProviderCard<Extra>(spec: ProviderCardSpec<Extra>): ({ token }: QaUserSettingsSectionProps) => import("react/jsx-runtime").JSX.Element;
63
+ //# sourceMappingURL=provider-card.d.ts.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The canonical settings-card shell comes from the kit (AGENTS.md pins it), and
3
+ * only what lives inside the card body is this plugin's own: the provider cards
4
+ * the dialog page and the plugin card both mount.
5
+ */
6
+ export declare const styles: string;
7
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1,19 @@
1
+ import type { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
2
+ import type { IntegrationInstanceSummary, IntegrationSummary, PolicyPatch } from "../types.js";
3
+ export interface TeamcityRemote {
4
+ getTeamcity(token: string): Promise<RemoteResult<IntegrationSummary>>;
5
+ /**
6
+ * The address this deployment dials, or null when it configured none. The
7
+ * connect form shows it and never asks for it: the server one token is spent
8
+ * against is stand-wide configuration, not a choice each user makes.
9
+ */
10
+ teamcityServer(token: string): Promise<RemoteResult<IntegrationInstanceSummary | null>>;
11
+ putTeamcityCredential(token: string, input: {
12
+ readonly token: string;
13
+ }): Promise<RemoteResult<IntegrationSummary>>;
14
+ testTeamcity(token: string): Promise<RemoteResult<IntegrationSummary>>;
15
+ patchTeamcityPolicy(token: string, patch: PolicyPatch): Promise<RemoteResult<IntegrationSummary>>;
16
+ disconnectTeamcity(token: string): Promise<RemoteResult<boolean>>;
17
+ }
18
+ export declare function createTeamcityCard(remote: TeamcityRemote): ({ token }: import("@yadsh/dsh-qa-surface/client/settings").QaUserSettingsSectionProps) => import("react/jsx-runtime").JSX.Element;
19
+ //# sourceMappingURL=teamcity.d.ts.map
@@ -0,0 +1,18 @@
1
+ /** Model-supplied identifiers are positive integers or the argument is refused. */
2
+ export declare function requiredInteger(value: unknown, field: string, min?: number, max?: number): number;
3
+ export declare function optionalInteger(value: unknown, field: string, min?: number, max?: number): number | undefined;
4
+ export declare function requiredText(value: unknown, field: string, min: number, max: number): string;
5
+ export declare function optionalText(value: unknown, field: string, min: number, max: number): string | undefined;
6
+ export declare function optionalBoolean(value: unknown, field: string): boolean | undefined;
7
+ /** Date-only fields, as most REST APIs declare them. */
8
+ export declare function requiredDate(value: unknown, field: string): string;
9
+ export declare function optionalDate(value: unknown, field: string): string | undefined;
10
+ export declare function requiredIntegerList(value: unknown, field: string, maxItems: number): number[];
11
+ export declare function requiredStringList(value: unknown, field: string, maxItems: number, maxLength: number): string[];
12
+ /**
13
+ * The external account id, resolved server-side from the stored integration. It
14
+ * backs "mine" defaults, so an operation that needs it must fail closed rather
15
+ * than guess when the provider never reported one.
16
+ */
17
+ export declare function externalUserIdFrom(externalUserId: string | undefined, operation: string): number;
18
+ //# sourceMappingURL=coerce.d.ts.map
@@ -0,0 +1,48 @@
1
+ import z from "@deepseek-ai/schemastery";
2
+ import { type Bitrix24Flags } from "./providers/bitrix24/config.js";
3
+ import { type ConfluenceFlags } from "./providers/confluence/config.js";
4
+ import { type GitlabFlags } from "./providers/gitlab/config.js";
5
+ import { type JiraFlags } from "./providers/jira/config.js";
6
+ import { type TeamCityConfigInput, type TeamCityFlags } from "./providers/teamcity/config.js";
7
+ /**
8
+ * Composition root of the plugin config: the shared knobs plus one slice per
9
+ * provider. Adding a provider means adding its slice here and nothing else.
10
+ */
11
+ export interface QaIntegrationsConfig {
12
+ readonly enabled?: boolean;
13
+ readonly dataPath?: string;
14
+ /**
15
+ * How long the audit trail is kept. Rows older than this are dropped as the
16
+ * log is written, and a hard row cap applies whatever this says.
17
+ */
18
+ readonly auditRetentionDays?: number;
19
+ readonly masterKeyPath?: string;
20
+ readonly masterKeyVersion?: number;
21
+ readonly timeoutMs?: number;
22
+ readonly maxResponseBytes?: number;
23
+ /** Host allowlist for providers that dial an operator-approved domain. */
24
+ readonly allowedPortalSuffixes?: string[];
25
+ readonly bitrix24?: Partial<Bitrix24Flags>;
26
+ readonly confluence?: Partial<ConfluenceFlags>;
27
+ readonly gitlab?: Partial<GitlabFlags>;
28
+ readonly teamcity?: TeamCityConfigInput;
29
+ readonly jira?: Partial<JiraFlags>;
30
+ }
31
+ export interface ResolvedQaIntegrationsConfig {
32
+ readonly enabled: boolean;
33
+ readonly dataPath: string;
34
+ readonly auditRetentionDays: number;
35
+ readonly masterKeyPath: string;
36
+ readonly masterKeyVersion: number;
37
+ readonly timeoutMs: number;
38
+ readonly maxResponseBytes: number;
39
+ readonly allowedPortalSuffixes: readonly string[];
40
+ readonly bitrix24: Bitrix24Flags;
41
+ readonly confluence: ConfluenceFlags;
42
+ readonly gitlab: GitlabFlags;
43
+ readonly teamcity: TeamCityFlags;
44
+ readonly jira: JiraFlags;
45
+ }
46
+ export declare const ConfigSchema: z<QaIntegrationsConfig>;
47
+ export declare function resolveConfig(input?: QaIntegrationsConfig): ResolvedQaIntegrationsConfig;
48
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1,26 @@
1
+ export type IntegrationErrorCode = "IntegrationNotConnected" | "CredentialExpired" | "CredentialRevoked" | "ProviderPermissionDenied" | "ProviderUnavailable" | "OperationDeniedByPolicy" | "PrincipalNotResolved" | "InvalidCredential" | "InvalidRequest"
2
+ /**
3
+ * The resource does not exist, or the connected identity may not see it. Both
4
+ * cases answer alike on purpose: the model must not learn from the error
5
+ * whether some other account holds the resource.
6
+ */
7
+ | "ResourceNotFound" | "RateLimited" | "ResultTooLarge"
8
+ /**
9
+ * The upstream did not answer inside the provider timeout. Distinct from
10
+ * `ProviderUnavailable` because it is worth retrying later as it is, while an
11
+ * unreachable host usually needs an operator.
12
+ */
13
+ | "UpstreamTimeout"
14
+ /**
15
+ * The TLS handshake failed — an expired, self-signed or otherwise untrusted
16
+ * certificate. The user cannot fix this from the connect form, so it is kept
17
+ * apart from a plain unreachable host.
18
+ */
19
+ | "TlsFailure";
20
+ /** Safe domain error: message and code never include upstream bodies or secrets. */
21
+ export declare class IntegrationError extends Error {
22
+ readonly code: IntegrationErrorCode;
23
+ constructor(code: IntegrationErrorCode, message: string, options?: ErrorOptions);
24
+ }
25
+ export declare function publicIntegrationError(error: unknown): Error;
26
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1,170 @@
1
+ import type { Context } from "@deepseek-ai/cordis";
2
+ import { TypertRemoteService } from "@deepseek-ai/dsh-typert-protocol";
3
+ import z from "@deepseek-ai/schemastery";
4
+ import type { QaSurface } from "@yadsh/dsh-qa-surface";
5
+ import { IntegrationBroker } from "./broker.js";
6
+ import { type QaIntegrationsConfig } from "./config.js";
7
+ import type { CredentialInput, IntegrationInstanceSummary, IntegrationProviderId, IntegrationProviderSummary, IntegrationSummary, PolicyPatch } from "./types.js";
8
+ export declare const name = "dsh-qa-integrations";
9
+ export declare const inject: readonly ["qaSurface", "tools"];
10
+ export declare const Config: z<QaIntegrationsConfig>;
11
+ type IntegrationsContext = Context & {
12
+ readonly qaSurface: QaSurface;
13
+ };
14
+ declare module "@deepseek-ai/cordis" {
15
+ interface Context {
16
+ qaIntegrations: QaIntegrations;
17
+ }
18
+ }
19
+ /** Host remote, broker owner, and registration point for read-only tools. */
20
+ export declare class QaIntegrations extends TypertRemoteService {
21
+ static inject: readonly ["qaSurface", "tools"];
22
+ static Config: z<QaIntegrationsConfig>;
23
+ readonly broker: IntegrationBroker;
24
+ private readonly logger;
25
+ private readonly enabled;
26
+ private readonly providerSummaries;
27
+ private readonly configuredInstances;
28
+ /** The Confluence sites this deployment dials, for the connect form. */
29
+ private readonly configuredConfluenceSites;
30
+ /** The Jira Cloud sites this deployment allows, in config order. */
31
+ private readonly configuredJiraSites;
32
+ /** The TeamCity server this deployment dials, or null when it mounts none. */
33
+ private readonly configuredServer;
34
+ constructor(ctx: IntegrationsContext, rawConfig?: QaIntegrationsConfig);
35
+ describe(): {
36
+ readonly enabled: boolean;
37
+ readonly providers: readonly IntegrationProviderId[];
38
+ };
39
+ providers(token: string): readonly IntegrationProviderSummary[];
40
+ list(token: string): readonly IntegrationSummary[];
41
+ getBitrix24(token: string): IntegrationSummary;
42
+ putBitrix24Credential(token: string, input: CredentialInput): Promise<IntegrationSummary>;
43
+ testBitrix24(token: string): Promise<IntegrationSummary>;
44
+ patchBitrix24Policy(token: string, patch: PolicyPatch): IntegrationSummary;
45
+ disconnectBitrix24(token: string): boolean;
46
+ /**
47
+ * Instances this deployment allows. The connect form picks from this list and
48
+ * never takes a hostname, which is what keeps the broker from being pointed at
49
+ * an origin the operator did not configure.
50
+ */
51
+ gitlabInstances(token: string): readonly IntegrationInstanceSummary[];
52
+ getGitlab(token: string): IntegrationSummary;
53
+ putGitlabCredential(token: string, input: {
54
+ readonly instanceId: string;
55
+ readonly token: string;
56
+ }): Promise<IntegrationSummary>;
57
+ testGitlab(token: string): Promise<IntegrationSummary>;
58
+ patchGitlabPolicy(token: string, patch: PolicyPatch): IntegrationSummary;
59
+ disconnectGitlab(token: string): boolean;
60
+ /**
61
+ * Sites this deployment allows. The connect form picks from this list and
62
+ * never takes a hostname, which is what keeps the broker from being pointed
63
+ * at an origin the operator did not configure.
64
+ */
65
+ confluenceSites(token: string): readonly IntegrationInstanceSummary[];
66
+ getConfluence(token: string): IntegrationSummary;
67
+ /**
68
+ * The account e-mail is not a secret, but it is half of the Basic pair, so it
69
+ * travels with the secret instead of being a separate field: both halves land
70
+ * in one encrypted record, and a token can never be spent as another account.
71
+ */
72
+ putConfluenceCredential(token: string, input: {
73
+ readonly instanceId: string;
74
+ readonly email: string;
75
+ readonly token: string;
76
+ }): Promise<IntegrationSummary>;
77
+ testConfluence(token: string): Promise<IntegrationSummary>;
78
+ patchConfluencePolicy(token: string, patch: PolicyPatch): IntegrationSummary;
79
+ disconnectConfluence(token: string): boolean;
80
+ getTeamcity(token: string): IntegrationSummary;
81
+ /**
82
+ * The TeamCity address is operator configuration, so the connect form sends
83
+ * the token alone: a user cannot point the broker at a host of their choosing,
84
+ * and the address a token is spent against is re-read from the deployment on
85
+ * every call.
86
+ */
87
+ putTeamcityCredential(token: string, input: {
88
+ readonly token: string;
89
+ }): Promise<IntegrationSummary>;
90
+ /**
91
+ * The address the connect form shows next to the token field, or null when
92
+ * this deployment configured none. Token-gated like the GitLab instance list:
93
+ * a card has to be able to say "nothing to connect to here", and the address
94
+ * of the stand's CI is not something an unauthenticated caller needs.
95
+ */
96
+ teamcityServer(token: string): IntegrationInstanceSummary | null;
97
+ testTeamcity(token: string): Promise<IntegrationSummary>;
98
+ patchTeamcityPolicy(token: string, patch: PolicyPatch): IntegrationSummary;
99
+ disconnectTeamcity(token: string): boolean;
100
+ /**
101
+ * Sites this deployment allows. Like the GitLab instance list, the connect
102
+ * form picks from it and never takes a hostname: the Atlassian site a token is
103
+ * spent against is operator configuration, and the e-mail the form collects
104
+ * next to the token is an identity, not a secret.
105
+ */
106
+ jiraSites(token: string): readonly IntegrationInstanceSummary[];
107
+ getJira(token: string): IntegrationSummary;
108
+ putJiraCredential(token: string, input: {
109
+ readonly siteId: string;
110
+ readonly email: string;
111
+ readonly token: string;
112
+ }): Promise<IntegrationSummary>;
113
+ testJira(token: string): Promise<IntegrationSummary>;
114
+ patchJiraPolicy(token: string, patch: PolicyPatch): IntegrationSummary;
115
+ disconnectJira(token: string): boolean;
116
+ private requirePrincipal;
117
+ private run;
118
+ private runAsync;
119
+ }
120
+ export { IntegrationBroker } from "./broker.js";
121
+ export { ConfigSchema, resolveConfig, type QaIntegrationsConfig, type ResolvedQaIntegrationsConfig, } from "./config.js";
122
+ export { IntegrationError } from "./errors.js";
123
+ export { BITRIX_CAPABILITIES, BITRIX_OPERATIONS, BITRIX24_CAPABILITY_INFO, bitrix24OperationCapability, enabledCapabilities, type Bitrix24Capability, type Bitrix24CapabilityDefinition, type BitrixOperationDefinition, } from "./providers/bitrix24/catalog.js";
124
+ export { BITRIX24_DEFAULTS, bitrix24ConfigSchema, resolveBitrix24Config, type Bitrix24Flags, } from "./providers/bitrix24/config.js";
125
+ export { Bitrix24Provider, parseBitrixWebhook, } from "./providers/bitrix24/index.js";
126
+ export { BITRIX_HANDLERS, BITRIX_PROJECTIONS, } from "./providers/bitrix24/operations.js";
127
+ export { createBitrix24Tools, BITRIX24_TOOL_NAMES, } from "./providers/bitrix24/tools.js";
128
+ export { GitlabProvider } from "./providers/gitlab/index.js";
129
+ export { GITLAB_CAPABILITIES, GITLAB_CAPABILITY_INFO, GITLAB_OPERATIONS, capabilitiesForScopes, gitlabOperationCapability, type GitlabCapability, type GitlabCapabilityDefinition, type GitlabOperationDefinition, } from "./providers/gitlab/catalog.js";
130
+ export { GITLAB_DEFAULTS, gitlabConfigSchema, resolveGitlabConfig, type GitlabFlags, type GitlabInstance, } from "./providers/gitlab/config.js";
131
+ export { createGitlabTools, GITLAB_TOOL_NAMES, } from "./providers/gitlab/tools.js";
132
+ export { GitlabTransport, credentialFromPlaintext as gitlabCredentialFromPlaintext, credentialInstance, type GitlabCredential, } from "./providers/gitlab/transport.js";
133
+ export { GITLAB_HANDLERS, GITLAB_PROJECTIONS, } from "./providers/gitlab/operations.js";
134
+ export { ConfluenceProvider } from "./providers/confluence/index.js";
135
+ export { adfToText as confluenceAdfToText, textBudget, } from "./providers/confluence/adf.js";
136
+ export { CONFLUENCE_CAPABILITIES, CONFLUENCE_CAPABILITY_INFO, CONFLUENCE_OPERATIONS, confluenceOperationCapability, type ConfluenceCapability, type ConfluenceCapabilityDefinition, type ConfluenceOperationDefinition, } from "./providers/confluence/catalog.js";
137
+ export { CONFLUENCE_DEFAULTS, confluenceConfigSchema, resolveConfluenceConfig, spaceAllowed, type ConfluenceFlags, type ConfluenceInstance, } from "./providers/confluence/config.js";
138
+ export { buildCql, cqlLiteral, CONTENT_TYPES, ORDER_BY, type ConfluenceOrder, type ConfluenceSearchFilter, } from "./providers/confluence/cql.js";
139
+ export { COMMENT_KINDS, CONFLUENCE_HANDLERS, CONFLUENCE_PROJECTIONS, DEFAULT_LIMIT, bodyLimit, commentChildrenPath, commentCollections, commentKind, commentPath, commentReplies, isNumericSpace, modifiedAfterDate, numericId, offsetCursor, pageLimit, plainExcerpt, spaceRef, upstreamCursor, type ConfluenceCommentKind, type ConfluenceProjection, type ConfluenceProjectionContext, type ConfluenceRequest, } from "./providers/confluence/operations.js";
140
+ export { createConfluenceTools, CONFLUENCE_TOOL_NAMES, } from "./providers/confluence/tools.js";
141
+ export { ConfluenceTransport, credentialFromPlaintext as confluenceCredentialFromPlaintext, credentialInstance as confluenceCredentialInstance, type ConfluenceCredential, } from "./providers/confluence/transport.js";
142
+ export { TeamcityProvider } from "./providers/teamcity/index.js";
143
+ export { TEAMCITY_CAPABILITIES, TEAMCITY_CAPABILITY_INFO, TEAMCITY_OPERATIONS, TEAMCITY_STREAM_OPERATIONS, enabledCapabilities as enabledTeamcityCapabilities, teamcityOperationCapability, type TeamCityCapability, type TeamCityCapabilityDefinition, type TeamCityOperationDefinition, } from "./providers/teamcity/catalog.js";
144
+ export { TEAMCITY_DEFAULTS, DEFAULT_LOG_LINES, resolveTeamCityConfig, teamcityConfigSchema, type TeamCityConfigInput, type TeamCityFlags, } from "./providers/teamcity/config.js";
145
+ export { artifactBinaryProblem, artifactByteLimit, artifactPath, textArtifact, type ArtifactPath, } from "./providers/teamcity/artifacts.js";
146
+ export { LOG_MODES, logLines, logMode, sanitizeLog, selectLogWindow, trimToBytes, type LogMode, type LogWindow, } from "./providers/teamcity/logs.js";
147
+ export { PRIVATE_CIDRS, canonicalServerUrl, cidrProblem, hostPatternProblem, isIpLiteral, serverUrlProblem, type TeamCityNetworkMode, type TeamCityNetworkPolicy, } from "./providers/teamcity/network.js";
148
+ export { buildBuildLocator, dimension, joinDimensions, locatorValue, nested, teamCityDate, type BuildLocatorInput, } from "./providers/teamcity/locators.js";
149
+ export { TEAMCITY_HANDLERS, TEAMCITY_LIMITS, TEAMCITY_PROJECTIONS, isoDate, listLimit, type TeamCityProjection, type TeamCityRequest, } from "./providers/teamcity/operations.js";
150
+ export { TeamCityTransport, configuredServer as teamcityConfiguredServer, credentialFromPlaintext as teamcityCredentialFromPlaintext, type TeamCityCredential, } from "./providers/teamcity/transport.js";
151
+ export { createTeamcityTools, TEAMCITY_TOOL_NAMES, } from "./providers/teamcity/tools.js";
152
+ export { JiraProvider } from "./providers/jira/index.js";
153
+ export { JIRA_CAPABILITIES, JIRA_CAPABILITY_INFO, JIRA_COMPANION_PATHS, JIRA_OPERATIONS, JIRA_READ_PATHS, enabledCapabilities as enabledJiraCapabilities, jiraOperationCapability, type JiraCapability, type JiraCapabilityDefinition, type JiraOperationDefinition, } from "./providers/jira/catalog.js";
154
+ export { JIRA_DEFAULTS, SEARCH_PAGE_CAP, jiraConfigSchema, jiraSite, resolveJiraConfig, type JiraFlags, type JiraSite, } from "./providers/jira/config.js";
155
+ export { adfToText as jiraAdfToText, bodyText, isAdf, type AdfText, } from "./providers/jira/adf.js";
156
+ export { buildJql, commentLimit, commentStart, issueKey as jiraIssueKey, jqlDateValue, jqlLiteral, needsUserLookup, pageToken, projectKey as jiraProjectKey, searchLimit, textClauses, textMatch, type CustomFieldClause, } from "./providers/jira/jql.js";
157
+ export { ISSUE_INCLUDES, JIRA_HANDLERS, JIRA_PROJECTIONS, SEARCH_FIELDS as JIRA_SEARCH_FIELDS, customFieldValue, issueFields, issueUrl, requestedIncludes, wantsFieldNames, type JiraProjection, } from "./providers/jira/operations.js";
158
+ export { JiraTransport, basicAuthorization, credentialFromPlaintext as jiraCredentialFromPlaintext, credentialSite, type JiraCredential, } from "./providers/jira/transport.js";
159
+ export { createJiraTools, JIRA_TOOL_NAMES } from "./providers/jira/tools.js";
160
+ export { IntegrationProviderRegistry } from "./providers/registry.js";
161
+ export { IntegrationRepository } from "./repository.js";
162
+ export { DockerSecretKeyProvider, MemoryKeyProvider, type KeyProvider, } from "./secrets/key-provider.js";
163
+ export { SecretStore } from "./secrets/secret-store.js";
164
+ export { QA_INTEGRATIONS_SETTINGS_NAMESPACE } from "./shared/settings.js";
165
+ export { createToolKit, type ToolKitOptions } from "./tool-kit.js";
166
+ export { createIntegrationTools, INTEGRATION_TOOL_NAMES } from "./tools.js";
167
+ export type * from "./types.js";
168
+ export { BitrixTransport, credentialFromPlaintext, type BitrixCredential, } from "./providers/bitrix24/transport.js";
169
+ export default QaIntegrations;
170
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,48 @@
1
+ import type { IntegrationCapability, IntegrationCapabilityInfo } from "../../types.js";
2
+ import type { Bitrix24Flags } from "./config.js";
3
+ /**
4
+ * Capabilities this provider can offer, one per Bitrix24 webhook scope. `scopes`
5
+ * is the set of scopes that grant it; the provider intersects them with the
6
+ * scopes the connected webhook actually reports, and `flag` is the operator
7
+ * switch for this deployment.
8
+ *
9
+ * Labels live here so the host, the Settings card, and package verification all
10
+ * describe a capability the same way.
11
+ */
12
+ export type Bitrix24Capability = "crm.read" | "chat.read" | "openlines.read" | "user.read" | "department.read" | "tasks.read" | "calendar.read" | "disk.read";
13
+ export interface Bitrix24CapabilityDefinition {
14
+ readonly capability: Bitrix24Capability;
15
+ readonly flag: Exclude<keyof Bitrix24Flags, "enabled">;
16
+ readonly scopes: readonly string[];
17
+ readonly label: string;
18
+ readonly hint: string;
19
+ }
20
+ export declare const BITRIX_CAPABILITIES: readonly Bitrix24CapabilityDefinition[];
21
+ /**
22
+ * What a list operation returns in `result`, so every list tool can answer with
23
+ * the same `items` envelope:
24
+ *
25
+ * - `self` — `result` is the array itself;
26
+ * - `map` — `result` is an object keyed by id, values are the items;
27
+ * - any other value — the name of the key inside `result` that holds the array.
28
+ */
29
+ export type BitrixListShape = "self" | "map" | (string & {});
30
+ export interface BitrixOperationDefinition {
31
+ readonly capability: IntegrationCapability;
32
+ /** REST method as called over the webhook, without the `.json` suffix. */
33
+ readonly method: string;
34
+ readonly list?: BitrixListShape;
35
+ }
36
+ /**
37
+ * Every model-reachable operation. The provider refuses any operation that is
38
+ * not listed here, so this table — together with `requiredCapability` — is the
39
+ * permission surface.
40
+ */
41
+ export declare const BITRIX_OPERATIONS: Readonly<Record<string, BitrixOperationDefinition>>;
42
+ /** Capabilities this deployment allows, in catalog order. */
43
+ export declare function enabledCapabilities(flags: Bitrix24Flags): readonly Bitrix24Capability[];
44
+ /** Label and hint per capability, for clients that render what we declare. */
45
+ export declare const BITRIX24_CAPABILITY_INFO: Readonly<Record<Bitrix24Capability, IntegrationCapabilityInfo>>;
46
+ /** Capability an operation needs, or undefined when the catalog has none. */
47
+ export declare function bitrix24OperationCapability(operation: string): IntegrationCapability | undefined;
48
+ //# sourceMappingURL=catalog.d.ts.map
@@ -0,0 +1,43 @@
1
+ import z from "@deepseek-ai/schemastery";
2
+ /**
3
+ * Deployment switches for the Bitrix24 provider. Every read scope is on by
4
+ * default: a capability is offered to the agent only when the connected webhook
5
+ * was actually granted the matching Bitrix24 scope, so these switches bound what
6
+ * this deployment allows, they do not grant it.
7
+ */
8
+ export interface Bitrix24Flags {
9
+ readonly enabled: boolean;
10
+ readonly crmRead: boolean;
11
+ readonly chatRead: boolean;
12
+ readonly openlinesRead: boolean;
13
+ readonly userRead: boolean;
14
+ readonly departmentRead: boolean;
15
+ readonly tasksRead: boolean;
16
+ readonly calendarRead: boolean;
17
+ readonly diskRead: boolean;
18
+ }
19
+ export declare const BITRIX24_DEFAULTS: Bitrix24Flags;
20
+ /** Config slice of this provider, as it appears under `bitrix24:` in YAML. */
21
+ export declare const bitrix24ConfigSchema: z<Schemastery.ObjectS<{
22
+ enabled: z<boolean, boolean>;
23
+ crmRead: z<boolean, boolean>;
24
+ chatRead: z<boolean, boolean>;
25
+ openlinesRead: z<boolean, boolean>;
26
+ userRead: z<boolean, boolean>;
27
+ departmentRead: z<boolean, boolean>;
28
+ tasksRead: z<boolean, boolean>;
29
+ calendarRead: z<boolean, boolean>;
30
+ diskRead: z<boolean, boolean>;
31
+ }>, Schemastery.ObjectT<{
32
+ enabled: z<boolean, boolean>;
33
+ crmRead: z<boolean, boolean>;
34
+ chatRead: z<boolean, boolean>;
35
+ openlinesRead: z<boolean, boolean>;
36
+ userRead: z<boolean, boolean>;
37
+ departmentRead: z<boolean, boolean>;
38
+ tasksRead: z<boolean, boolean>;
39
+ calendarRead: z<boolean, boolean>;
40
+ diskRead: z<boolean, boolean>;
41
+ }>>;
42
+ export declare function resolveBitrix24Config(input?: Partial<Bitrix24Flags>): Bitrix24Flags;
43
+ //# sourceMappingURL=config.d.ts.map