@yadsh/dsh-qa-integrations 0.6.0 → 0.8.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 (183) hide show
  1. package/README.md +341 -303
  2. package/lib/broker.js +12 -0
  3. package/lib/broker.js.map +1 -1
  4. package/lib/client/bitrix24.js +66 -5
  5. package/lib/client/bitrix24.js.map +1 -1
  6. package/lib/client/confluence.js +117 -128
  7. package/lib/client/confluence.js.map +1 -1
  8. package/lib/client/gitlab.js +1 -1
  9. package/lib/client/gitlab.js.map +1 -1
  10. package/lib/client/index.js +25 -5
  11. package/lib/client/index.js.map +1 -1
  12. package/lib/client/integrations.js +1 -1
  13. package/lib/client/integrations.js.map +1 -1
  14. package/lib/client/jira.js +115 -126
  15. package/lib/client/jira.js.map +1 -1
  16. package/lib/client/operator-card.js +537 -0
  17. package/lib/client/operator-card.js.map +1 -0
  18. package/lib/client/operator-controls.js +232 -0
  19. package/lib/client/operator-controls.js.map +1 -0
  20. package/lib/client/styles.js +60 -0
  21. package/lib/client/styles.js.map +1 -1
  22. package/lib/client/testit.js +39 -3
  23. package/lib/client/testit.js.map +1 -1
  24. package/lib/client/weblate.js +38 -3
  25. package/lib/client/weblate.js.map +1 -1
  26. package/lib/client.js +2966 -871
  27. package/lib/client.js.map +1 -1
  28. package/lib/coerce.js +17 -1
  29. package/lib/coerce.js.map +1 -1
  30. package/lib/config.js.map +1 -1
  31. package/lib/errors.js +22 -0
  32. package/lib/errors.js.map +1 -1
  33. package/lib/index.js +211 -52
  34. package/lib/index.js.map +1 -1
  35. package/lib/providers/bitrix24/catalog.js +138 -8
  36. package/lib/providers/bitrix24/catalog.js.map +1 -1
  37. package/lib/providers/bitrix24/config.js +84 -14
  38. package/lib/providers/bitrix24/config.js.map +1 -1
  39. package/lib/providers/bitrix24/index.js +100 -0
  40. package/lib/providers/bitrix24/index.js.map +1 -1
  41. package/lib/providers/bitrix24/operations.js +5 -9
  42. package/lib/providers/bitrix24/operations.js.map +1 -1
  43. package/lib/providers/bitrix24/transport.js +11 -31
  44. package/lib/providers/bitrix24/transport.js.map +1 -1
  45. package/lib/providers/confluence/adf.js +28 -23
  46. package/lib/providers/confluence/adf.js.map +1 -1
  47. package/lib/providers/confluence/catalog.js +91 -7
  48. package/lib/providers/confluence/catalog.js.map +1 -1
  49. package/lib/providers/confluence/config.js +27 -2
  50. package/lib/providers/confluence/config.js.map +1 -1
  51. package/lib/providers/confluence/credential-help.js +14 -8
  52. package/lib/providers/confluence/credential-help.js.map +1 -1
  53. package/lib/providers/confluence/dialect.js +215 -0
  54. package/lib/providers/confluence/dialect.js.map +1 -0
  55. package/lib/providers/confluence/index.js +393 -79
  56. package/lib/providers/confluence/index.js.map +1 -1
  57. package/lib/providers/confluence/operations.js +208 -153
  58. package/lib/providers/confluence/operations.js.map +1 -1
  59. package/lib/providers/confluence/storage.js +690 -0
  60. package/lib/providers/confluence/storage.js.map +1 -0
  61. package/lib/providers/confluence/transport.js +26 -89
  62. package/lib/providers/confluence/transport.js.map +1 -1
  63. package/lib/providers/gitlab/config.js +2 -3
  64. package/lib/providers/gitlab/config.js.map +1 -1
  65. package/lib/providers/gitlab/index.js +2 -20
  66. package/lib/providers/gitlab/index.js.map +1 -1
  67. package/lib/providers/gitlab/operations.js +7 -45
  68. package/lib/providers/gitlab/operations.js.map +1 -1
  69. package/lib/providers/gitlab/transport.js +2 -18
  70. package/lib/providers/gitlab/transport.js.map +1 -1
  71. package/lib/providers/jira/adf.js +19 -14
  72. package/lib/providers/jira/adf.js.map +1 -1
  73. package/lib/providers/jira/catalog.js +125 -4
  74. package/lib/providers/jira/catalog.js.map +1 -1
  75. package/lib/providers/jira/config.js +27 -2
  76. package/lib/providers/jira/config.js.map +1 -1
  77. package/lib/providers/jira/credential-help.js +16 -7
  78. package/lib/providers/jira/credential-help.js.map +1 -1
  79. package/lib/providers/jira/dialect.js +94 -0
  80. package/lib/providers/jira/dialect.js.map +1 -0
  81. package/lib/providers/jira/index.js +327 -67
  82. package/lib/providers/jira/index.js.map +1 -1
  83. package/lib/providers/jira/jql.js +54 -21
  84. package/lib/providers/jira/jql.js.map +1 -1
  85. package/lib/providers/jira/operations.js +77 -55
  86. package/lib/providers/jira/operations.js.map +1 -1
  87. package/lib/providers/jira/tools.js +1 -1
  88. package/lib/providers/jira/tools.js.map +1 -1
  89. package/lib/providers/jira/transport.js +12 -83
  90. package/lib/providers/jira/transport.js.map +1 -1
  91. package/lib/providers/shared/health.js +31 -0
  92. package/lib/providers/shared/health.js.map +1 -0
  93. package/lib/providers/shared/http.js +20 -0
  94. package/lib/providers/shared/http.js.map +1 -1
  95. package/lib/providers/shared/paths.js +14 -0
  96. package/lib/providers/shared/paths.js.map +1 -0
  97. package/lib/providers/shared/payload.js +46 -0
  98. package/lib/providers/shared/payload.js.map +1 -0
  99. package/lib/providers/teamcity/artifacts.js +0 -8
  100. package/lib/providers/teamcity/artifacts.js.map +1 -1
  101. package/lib/providers/teamcity/config.js +2 -3
  102. package/lib/providers/teamcity/config.js.map +1 -1
  103. package/lib/providers/teamcity/index.js +2 -20
  104. package/lib/providers/teamcity/index.js.map +1 -1
  105. package/lib/providers/teamcity/operations.js +5 -39
  106. package/lib/providers/teamcity/operations.js.map +1 -1
  107. package/lib/providers/teamcity/transport.js +2 -11
  108. package/lib/providers/teamcity/transport.js.map +1 -1
  109. package/lib/providers/testit/catalog.js +77 -0
  110. package/lib/providers/testit/catalog.js.map +1 -1
  111. package/lib/providers/testit/config.js +2 -3
  112. package/lib/providers/testit/config.js.map +1 -1
  113. package/lib/providers/testit/index.js +260 -4
  114. package/lib/providers/testit/index.js.map +1 -1
  115. package/lib/providers/testit/operations.js +34 -63
  116. package/lib/providers/testit/operations.js.map +1 -1
  117. package/lib/providers/testit/transport.js +2 -18
  118. package/lib/providers/testit/transport.js.map +1 -1
  119. package/lib/providers/weblate/catalog.js +103 -9
  120. package/lib/providers/weblate/catalog.js.map +1 -1
  121. package/lib/providers/weblate/config.js +2 -3
  122. package/lib/providers/weblate/config.js.map +1 -1
  123. package/lib/providers/weblate/index.js +227 -6
  124. package/lib/providers/weblate/index.js.map +1 -1
  125. package/lib/providers/weblate/operations.js +3 -33
  126. package/lib/providers/weblate/operations.js.map +1 -1
  127. package/lib/providers/weblate/query.js +3 -6
  128. package/lib/providers/weblate/query.js.map +1 -1
  129. package/lib/providers/weblate/transport.js +2 -12
  130. package/lib/providers/weblate/transport.js.map +1 -1
  131. package/lib/service-credentials/config.js +2 -3
  132. package/lib/service-credentials/config.js.map +1 -1
  133. package/lib/shared/settings.js +14 -0
  134. package/lib/shared/settings.js.map +1 -0
  135. package/lib/typert.host.js +159 -60
  136. package/lib/typert.remote-client.d.ts +13 -11
  137. package/lib/typert.remote-client.js +98 -52
  138. package/lib/types/broker.d.ts +11 -3
  139. package/lib/types/client/bitrix24.d.ts +24 -2
  140. package/lib/types/client/confluence.d.ts +24 -4
  141. package/lib/types/client/index.d.ts +7 -6
  142. package/lib/types/client/integrations.d.ts +2 -2
  143. package/lib/types/client/jira.d.ts +25 -4
  144. package/lib/types/client/operator-card.d.ts +22 -0
  145. package/lib/types/client/operator-controls.d.ts +135 -0
  146. package/lib/types/client/testit.d.ts +14 -1
  147. package/lib/types/client/weblate.d.ts +14 -1
  148. package/lib/types/coerce.d.ts +14 -0
  149. package/lib/types/config.d.ts +4 -4
  150. package/lib/types/errors.d.ts +16 -0
  151. package/lib/types/index.d.ts +91 -15
  152. package/lib/types/providers/bitrix24/catalog.d.ts +8 -0
  153. package/lib/types/providers/bitrix24/config.d.ts +14 -23
  154. package/lib/types/providers/bitrix24/index.d.ts +37 -1
  155. package/lib/types/providers/confluence/catalog.d.ts +44 -8
  156. package/lib/types/providers/confluence/config.d.ts +39 -7
  157. package/lib/types/providers/confluence/credential-help.d.ts +9 -4
  158. package/lib/types/providers/confluence/dialect.d.ts +113 -0
  159. package/lib/types/providers/confluence/index.d.ts +82 -8
  160. package/lib/types/providers/confluence/operations.d.ts +14 -4
  161. package/lib/types/providers/confluence/storage.d.ts +28 -0
  162. package/lib/types/providers/confluence/transport.d.ts +10 -21
  163. package/lib/types/providers/jira/catalog.d.ts +49 -2
  164. package/lib/types/providers/jira/config.d.ts +37 -6
  165. package/lib/types/providers/jira/credential-help.d.ts +11 -3
  166. package/lib/types/providers/jira/dialect.d.ts +79 -0
  167. package/lib/types/providers/jira/index.d.ts +76 -19
  168. package/lib/types/providers/jira/jql.d.ts +14 -4
  169. package/lib/types/providers/jira/operations.d.ts +3 -0
  170. package/lib/types/providers/jira/transport.d.ts +6 -13
  171. package/lib/types/providers/shared/health.d.ts +18 -0
  172. package/lib/types/providers/shared/http.d.ts +9 -0
  173. package/lib/types/providers/shared/paths.d.ts +10 -0
  174. package/lib/types/providers/shared/payload.d.ts +26 -0
  175. package/lib/types/providers/teamcity/artifacts.d.ts +0 -2
  176. package/lib/types/providers/teamcity/index.d.ts +2 -0
  177. package/lib/types/providers/testit/catalog.d.ts +12 -0
  178. package/lib/types/providers/testit/index.d.ts +63 -2
  179. package/lib/types/providers/weblate/catalog.d.ts +19 -2
  180. package/lib/types/providers/weblate/index.d.ts +43 -1
  181. package/lib/types/shared/settings.d.ts +14 -0
  182. package/lib/types/types.d.ts +8 -0
  183. package/package.json +3 -3
@@ -15,11 +15,19 @@ export interface BrokerOptions {
15
15
  export declare class IntegrationBroker {
16
16
  private readonly repository;
17
17
  private readonly secrets;
18
- private readonly providers;
18
+ private providers;
19
19
  private readonly logger;
20
- private readonly serviceCredentials;
21
- private readonly defaultForNewConnections;
20
+ private serviceCredentials;
21
+ private defaultForNewConnections;
22
22
  constructor(repository: IntegrationRepository, secrets: SecretStore, providers: IntegrationProviderRegistry, logger: PluginLogger, options?: BrokerOptions);
23
+ /**
24
+ * Re-point the broker at the provider set and service-credential registry a
25
+ * fresh configuration resolved. The store and its key are process-lifetime —
26
+ * connections and wrapped secrets travel with them — so only derivations of
27
+ * the configuration move here. An in-flight call keeps the captures it
28
+ * already made and finishes against them.
29
+ */
30
+ swap(providers: IntegrationProviderRegistry, serviceCredentials: ServiceCredentialRegistry | undefined, defaultForNewConnections: boolean): void;
23
31
  listProviders(): readonly IntegrationProviderSummary[];
24
32
  list(principal: IntegrationPrincipal): readonly IntegrationSummary[];
25
33
  summary(principal: IntegrationPrincipal, providerId: IntegrationProviderId): IntegrationSummary;
@@ -1,18 +1,40 @@
1
1
  import type { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
2
- import type { IntegrationSummary, PolicyPatch } from "../types.js";
2
+ import type { CredentialSource, IntegrationInstanceSummary, IntegrationServiceBoundary, IntegrationSummary, PolicyPatch } from "../types.js";
3
+ /**
4
+ * Top-level remotes the shared mounts read: what `describe` reports decides
5
+ * which provider cards render at all. The Bitrix24-specific calls live in
6
+ * `Bitrix24Remote`.
7
+ */
3
8
  export interface IntegrationsRemote {
4
9
  describe(): Promise<RemoteResult<{
5
10
  readonly enabled: boolean;
6
11
  /** Ids of the providers this deployment mounted, in card order. */
7
12
  readonly providers: readonly string[];
8
13
  }>>;
14
+ }
15
+ export interface Bitrix24Remote {
16
+ bitrix24Instances(token: string): Promise<RemoteResult<readonly IntegrationInstanceSummary[]>>;
9
17
  getBitrix24(token: string): Promise<RemoteResult<IntegrationSummary>>;
10
18
  putBitrix24Credential(token: string, input: {
19
+ readonly instanceId: string;
11
20
  readonly token: string;
21
+ readonly useServiceCredential?: boolean;
12
22
  }): Promise<RemoteResult<IntegrationSummary>>;
13
23
  testBitrix24(token: string): Promise<RemoteResult<IntegrationSummary>>;
14
24
  patchBitrix24Policy(token: string, patch: PolicyPatch): Promise<RemoteResult<IntegrationSummary>>;
15
25
  disconnectBitrix24(token: string): Promise<RemoteResult<boolean>>;
26
+ managedServiceCredentials(token: string): Promise<RemoteResult<{
27
+ readonly enabled: boolean;
28
+ readonly defaultForNewConnections: boolean;
29
+ }>>;
30
+ credentialSource(token: string, input: {
31
+ readonly provider: string;
32
+ readonly source: CredentialSource;
33
+ }): Promise<RemoteResult<IntegrationSummary>>;
34
+ serviceBoundary(token: string, input: {
35
+ readonly provider: string;
36
+ readonly selection: IntegrationServiceBoundary | null;
37
+ }): Promise<RemoteResult<IntegrationSummary>>;
16
38
  }
17
- export declare function createBitrix24Card(remote: IntegrationsRemote): ({ token, help }: import("./provider-card.js").ProviderCardProps) => import("react/jsx-runtime").JSX.Element;
39
+ export declare function createBitrix24Card(remote: Bitrix24Remote): ({ token, help }: import("./provider-card.js").ProviderCardProps) => import("react/jsx-runtime").JSX.Element;
18
40
  //# sourceMappingURL=bitrix24.d.ts.map
@@ -1,17 +1,37 @@
1
1
  import type { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
2
- import type { IntegrationInstanceSummary, IntegrationSummary, PolicyPatch } from "../types.js";
3
- import type { ProviderCardProps } from "./provider-card.js";
2
+ import type { CredentialSource, IntegrationInstanceSummary, IntegrationServiceBoundary, IntegrationSummary, PolicyPatch } from "../types.js";
4
3
  export interface ConfluenceRemote {
5
4
  confluenceSites(token: string): Promise<RemoteResult<readonly IntegrationInstanceSummary[]>>;
6
5
  getConfluence(token: string): Promise<RemoteResult<IntegrationSummary>>;
7
6
  putConfluenceCredential(token: string, input: {
8
7
  readonly instanceId: string;
9
- readonly email: string;
8
+ /**
9
+ * Absent on a Server / Data Center connect: such an instance accepts a
10
+ * personal access token and needs no account at all.
11
+ */
12
+ readonly email?: string | undefined;
10
13
  readonly token: string;
14
+ readonly useServiceCredential?: boolean;
11
15
  }): Promise<RemoteResult<IntegrationSummary>>;
12
16
  testConfluence(token: string): Promise<RemoteResult<IntegrationSummary>>;
13
17
  patchConfluencePolicy(token: string, patch: PolicyPatch): Promise<RemoteResult<IntegrationSummary>>;
14
18
  disconnectConfluence(token: string): Promise<RemoteResult<boolean>>;
19
+ /**
20
+ * Present on the host that mounts the shared managed-credential machinery.
21
+ * A caller without them gets a card that never offers service mode.
22
+ */
23
+ managedServiceCredentials?(token: string): Promise<RemoteResult<{
24
+ readonly enabled: boolean;
25
+ readonly defaultForNewConnections: boolean;
26
+ }>>;
27
+ credentialSource?(token: string, input: {
28
+ readonly provider: string;
29
+ readonly source: CredentialSource;
30
+ }): Promise<RemoteResult<IntegrationSummary>>;
31
+ serviceBoundary?(token: string, input: {
32
+ readonly provider: string;
33
+ readonly selection: IntegrationServiceBoundary | null;
34
+ }): Promise<RemoteResult<IntegrationSummary>>;
15
35
  }
16
- export declare function createConfluenceCard(remote: ConfluenceRemote): ({ token, help }: ProviderCardProps) => import("react/jsx-runtime").JSX.Element;
36
+ export declare function createConfluenceCard(remote: ConfluenceRemote): ({ token, help }: import("./provider-card.js").ProviderCardProps) => import("react/jsx-runtime").JSX.Element;
17
37
  //# sourceMappingURL=confluence.d.ts.map
@@ -1,13 +1,14 @@
1
1
  import type { Context } from "@deepseek-ai/cordis";
2
2
  import type { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
3
3
  import type { IntegrationSummary, PolicyPatch } from "../types.js";
4
- export declare const inject: readonly ["remote", "qaUserSettingsSections", "qaUserSession", "slots"];
4
+ export declare const inject: readonly ["remote", "qaUserSettingsSections", "qaUserSession", "settingsScope", "slots"];
5
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
- * feature-owned tab in the host's Plugins settings, which reaches the same
9
- * account through the `qaUserSession` service without depending on the Host
10
- * settings directory.
6
+ * All three mounts of this one bundle: the operator card in the Host's
7
+ * "Plugin configuration" tab, which edits the plugin's settings namespace, the
8
+ * page of the signed-in user's QA settings dialog, where the account gate
9
+ * lives, and the feature-owned tab in the host's Plugins settings, which
10
+ * reaches the same account through the `qaUserSession` service without
11
+ * depending on the Host settings directory.
11
12
  */
12
13
  export declare function apply(ctx: Context): Promise<() => Promise<void>>;
13
14
  export type { IntegrationSummary, PolicyPatch, RemoteResult };
@@ -1,7 +1,7 @@
1
1
  import type { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
2
2
  import type { QaUserSettingsSectionProps } from "@yadsh/dsh-qa-surface/client/settings";
3
3
  import type { IntegrationProviderSummary } from "../types.js";
4
- import { type IntegrationsRemote } from "./bitrix24.js";
4
+ import { type Bitrix24Remote, type IntegrationsRemote } from "./bitrix24.js";
5
5
  import { type ConfluenceRemote } from "./confluence.js";
6
6
  import { type GitlabRemote } from "./gitlab.js";
7
7
  import { type JiraRemote } from "./jira.js";
@@ -12,7 +12,7 @@ import { type WeblateRemote } from "./weblate.js";
12
12
  export interface CredentialHelpRemote {
13
13
  providers(token: string): Promise<RemoteResult<readonly IntegrationProviderSummary[]>>;
14
14
  }
15
- export type IntegrationsClientRemote = CredentialHelpRemote & IntegrationsRemote & ConfluenceRemote & GitlabRemote & TeamcityRemote & JiraRemote & TestitRemote & WeblateRemote;
15
+ export type IntegrationsClientRemote = CredentialHelpRemote & IntegrationsRemote & Bitrix24Remote & ConfluenceRemote & GitlabRemote & TeamcityRemote & JiraRemote & TestitRemote & WeblateRemote;
16
16
  /** What every mount of the provider cards needs. */
17
17
  export interface ProviderCardsProps {
18
18
  /** Current QA account token; transport authentication for the remotes. */
@@ -1,17 +1,38 @@
1
1
  import type { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
2
- import type { IntegrationInstanceSummary, IntegrationSummary, PolicyPatch } from "../types.js";
3
- import type { ProviderCardProps } from "./provider-card.js";
2
+ import type { CredentialSource, IntegrationInstanceSummary, IntegrationServiceBoundary, IntegrationSummary, PolicyPatch } from "../types.js";
4
3
  export interface JiraRemote {
5
4
  jiraSites(token: string): Promise<RemoteResult<readonly IntegrationInstanceSummary[]>>;
6
5
  getJira(token: string): Promise<RemoteResult<IntegrationSummary>>;
7
6
  putJiraCredential(token: string, input: {
8
7
  readonly siteId: string;
9
- readonly email: string;
8
+ /**
9
+ * Absent on a Server / Data Center connect: such a site accepts a
10
+ * personal access token and needs no account at all.
11
+ */
12
+ readonly email?: string | undefined;
10
13
  readonly token: string;
14
+ readonly useServiceCredential?: boolean | undefined;
11
15
  }): Promise<RemoteResult<IntegrationSummary>>;
12
16
  testJira(token: string): Promise<RemoteResult<IntegrationSummary>>;
13
17
  patchJiraPolicy(token: string, patch: PolicyPatch): Promise<RemoteResult<IntegrationSummary>>;
14
18
  disconnectJira(token: string): Promise<RemoteResult<boolean>>;
19
+ /**
20
+ * The service remotes exist on the host for every provider; they stay
21
+ * optional here so a card also renders against a slice that offers none of
22
+ * them — the checkbox and the switches simply never appear.
23
+ */
24
+ managedServiceCredentials?(token: string): Promise<RemoteResult<{
25
+ readonly enabled: boolean;
26
+ readonly defaultForNewConnections: boolean;
27
+ }>>;
28
+ credentialSource?(token: string, input: {
29
+ readonly provider: string;
30
+ readonly source: CredentialSource;
31
+ }): Promise<RemoteResult<IntegrationSummary>>;
32
+ serviceBoundary?(token: string, input: {
33
+ readonly provider: string;
34
+ readonly selection: IntegrationServiceBoundary | null;
35
+ }): Promise<RemoteResult<IntegrationSummary>>;
15
36
  }
16
- export declare function createJiraCard(remote: JiraRemote): ({ token, help }: ProviderCardProps) => import("react/jsx-runtime").JSX.Element;
37
+ export declare function createJiraCard(remote: JiraRemote): ({ token, help }: import("./provider-card.js").ProviderCardProps) => import("react/jsx-runtime").JSX.Element;
17
38
  //# sourceMappingURL=jira.d.ts.map
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The Integrations operator card.
3
+ *
4
+ * One source meets here: the `qa-integrations` settings namespace, which is
5
+ * the plugin's configuration source on the Host — the card edits it through
6
+ * path-addressed mutations and the running service re-applies on each commit.
7
+ * Every deployment knob the resolvers accept is reachable from this card; the
8
+ * connection store and its key are the exception, because connections and
9
+ * wrapped secrets belong to the boot path and re-open on a Host restart.
10
+ */
11
+ import type { SettingsScope } from "@deepseek-ai/dsh-client-ui-settings/client";
12
+ import type { InjectFace, PropsRuntime } from "@deepseek-ai/dsh-client-ui-slots";
13
+ import { type ReactElement } from "react";
14
+ import type { QaIntegrationsConfig } from "../config.js";
15
+ /** The face the slot entry injects into this card. */
16
+ export interface OperatorCardFace {
17
+ readonly scope: SettingsScope<QaIntegrationsConfig>;
18
+ }
19
+ type CardProps = PropsRuntime<"settings.plugin.item"> & InjectFace<OperatorCardFace>;
20
+ export declare function OperatorCard({ scope }: CardProps): ReactElement | null;
21
+ export {};
22
+ //# sourceMappingURL=operator-card.d.ts.map
@@ -0,0 +1,135 @@
1
+ /**
2
+ * Shared controls of the operator card body.
3
+ *
4
+ * Every control edits the settings namespace through a path-addressed write,
5
+ * and text, number and list drafts commit on blur or Enter rather than per
6
+ * keystroke: a half-typed value is one the Host refuses, and a refusal
7
+ * mid-typing would clear the field the operator is still editing. Structured
8
+ * values (instance lists, records, credential profiles) commit as a whole at
9
+ * the parent path, because the Host stores the user layer per section path.
10
+ */
11
+ import { type ReactElement } from "react";
12
+ /** Path-addressed write into the plugin's settings namespace. */
13
+ export type ConfigWrite = (path: readonly string[], value: unknown) => void;
14
+ /** Path-addressed clear, so the field re-inherits the composition layer. */
15
+ export type ConfigUnset = (path: readonly string[]) => void;
16
+ /** Whether the raw user layer carries a path. */
17
+ export type OverrideCheck = (path: readonly string[]) => boolean;
18
+ /** What every control needs to reach the namespace. */
19
+ export interface ControlProps {
20
+ readonly disabled: boolean;
21
+ readonly write: ConfigWrite;
22
+ readonly unset: ConfigUnset;
23
+ readonly overridden: OverrideCheck;
24
+ }
25
+ /** Redrawn when the stored value moves under a draft, and to report refusals. */
26
+ export interface ValueProps<T> {
27
+ readonly path: readonly string[];
28
+ readonly value: T;
29
+ }
30
+ /** The control's DOM id, derived from its settings path: one per field. */
31
+ export declare function fieldId(path: readonly string[]): string;
32
+ /** Two-state control with a label and an explanatory hint. */
33
+ export declare function Toggle(props: {
34
+ label: string;
35
+ hint?: string;
36
+ path: readonly string[];
37
+ value: boolean;
38
+ disabled: boolean;
39
+ write: ConfigWrite;
40
+ overridden?: boolean;
41
+ }): ReactElement;
42
+ /** Whole-number control; the draft commits on blur and on Enter. */
43
+ export declare function NumberField(props: {
44
+ label: string;
45
+ hint?: string;
46
+ path: readonly string[];
47
+ value: number | undefined;
48
+ disabled: boolean;
49
+ write: ConfigWrite;
50
+ unset: ConfigUnset;
51
+ overridden: OverrideCheck;
52
+ }): ReactElement;
53
+ /** Free-text control; the draft commits on blur and on Enter. */
54
+ export declare function TextField(props: {
55
+ label: string;
56
+ hint?: string;
57
+ placeholder?: string;
58
+ path: readonly string[];
59
+ value: string | undefined;
60
+ disabled: boolean;
61
+ write: ConfigWrite;
62
+ unset: ConfigUnset;
63
+ overridden: OverrideCheck;
64
+ }): ReactElement;
65
+ /** Fixed-option control for the schema's string unions. */
66
+ export declare function SelectField(props: {
67
+ label: string;
68
+ hint?: string;
69
+ path: readonly string[];
70
+ value: string;
71
+ options: ReadonlyArray<{
72
+ value: string;
73
+ label: string;
74
+ }>;
75
+ disabled: boolean;
76
+ write: ConfigWrite;
77
+ overridden: OverrideCheck;
78
+ }): ReactElement;
79
+ /**
80
+ * List of strings; every committed value replaces the whole array at the
81
+ * parent path, which is the granularity the namespace stores.
82
+ */
83
+ export declare function StringListField(props: {
84
+ label: string;
85
+ hint?: string;
86
+ placeholder?: string;
87
+ path: readonly string[];
88
+ values: readonly string[];
89
+ disabled: boolean;
90
+ write: ConfigWrite;
91
+ unset: ConfigUnset;
92
+ overridden: OverrideCheck;
93
+ }): ReactElement;
94
+ /** One editable address row of an instance list. */
95
+ export interface InstanceDraft {
96
+ readonly id: string;
97
+ readonly label: string;
98
+ readonly baseUrl: string;
99
+ }
100
+ /**
101
+ * Deployment instances (GitLab, Confluence, Jira sites, Test IT, Weblate): a
102
+ * row edits id, label and address, and every committed edit writes the whole
103
+ * list, because a partially stored row would fail the resolvers anyway.
104
+ */
105
+ export declare function InstanceListField(props: {
106
+ label: string;
107
+ hint?: string;
108
+ path: readonly string[];
109
+ instances: readonly InstanceDraft[];
110
+ disabled: boolean;
111
+ write: ConfigWrite;
112
+ unset: ConfigUnset;
113
+ overridden: OverrideCheck;
114
+ }): ReactElement;
115
+ /**
116
+ * Mapping control for `fieldAliases`, credential resources and deny policy:
117
+ * rows of a key and its value, committed as one record at the parent path.
118
+ * A new entry is typed into the key (and value) inputs and lands in the
119
+ * record on «добавить»; an existing value commits on blur.
120
+ */
121
+ export declare function RecordField(props: {
122
+ label: string;
123
+ hint?: string;
124
+ path: readonly string[];
125
+ entries: ReadonlyArray<readonly [string, string]>;
126
+ keyPlaceholder: string;
127
+ valuePlaceholder: string;
128
+ /** Fixed value for entries whose schema admits one spelling ("deny"). */
129
+ fixedValue?: string;
130
+ disabled: boolean;
131
+ write: ConfigWrite;
132
+ unset: ConfigUnset;
133
+ overridden: OverrideCheck;
134
+ }): ReactElement;
135
+ //# sourceMappingURL=operator-controls.d.ts.map
@@ -1,15 +1,28 @@
1
1
  import type { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
2
- import type { IntegrationInstanceSummary, IntegrationSummary, PolicyPatch } from "../types.js";
2
+ import type { CredentialSource, IntegrationInstanceSummary, IntegrationServiceBoundary, IntegrationSummary, PolicyPatch } from "../types.js";
3
3
  export interface TestitRemote {
4
4
  testitInstances(token: string): Promise<RemoteResult<readonly IntegrationInstanceSummary[]>>;
5
5
  getTestit(token: string): Promise<RemoteResult<IntegrationSummary>>;
6
6
  putTestitCredential(token: string, input: {
7
7
  readonly instanceId: string;
8
8
  readonly token: string;
9
+ readonly useServiceCredential?: boolean;
9
10
  }): Promise<RemoteResult<IntegrationSummary>>;
10
11
  testTestit(token: string): Promise<RemoteResult<IntegrationSummary>>;
11
12
  patchTestitPolicy(token: string, patch: PolicyPatch): Promise<RemoteResult<IntegrationSummary>>;
12
13
  disconnectTestit(token: string): Promise<RemoteResult<boolean>>;
14
+ managedServiceCredentials(token: string): Promise<RemoteResult<{
15
+ readonly enabled: boolean;
16
+ readonly defaultForNewConnections: boolean;
17
+ }>>;
18
+ credentialSource(token: string, input: {
19
+ readonly provider: string;
20
+ readonly source: CredentialSource;
21
+ }): Promise<RemoteResult<IntegrationSummary>>;
22
+ serviceBoundary(token: string, input: {
23
+ readonly provider: string;
24
+ readonly selection: IntegrationServiceBoundary | null;
25
+ }): Promise<RemoteResult<IntegrationSummary>>;
13
26
  }
14
27
  export declare function createTestitCard(remote: TestitRemote): ({ token, help }: import("./provider-card.js").ProviderCardProps) => import("react/jsx-runtime").JSX.Element;
15
28
  //# sourceMappingURL=testit.d.ts.map
@@ -1,15 +1,28 @@
1
1
  import type { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
2
- import type { IntegrationInstanceSummary, IntegrationSummary, PolicyPatch } from "../types.js";
2
+ import type { CredentialSource, IntegrationInstanceSummary, IntegrationServiceBoundary, IntegrationSummary, PolicyPatch } from "../types.js";
3
3
  export interface WeblateRemote {
4
4
  weblateInstances(token: string): Promise<RemoteResult<readonly IntegrationInstanceSummary[]>>;
5
5
  getWeblate(token: string): Promise<RemoteResult<IntegrationSummary>>;
6
6
  putWeblateCredential(token: string, input: {
7
7
  readonly instanceId: string;
8
8
  readonly token: string;
9
+ readonly useServiceCredential?: boolean;
9
10
  }): Promise<RemoteResult<IntegrationSummary>>;
10
11
  testWeblate(token: string): Promise<RemoteResult<IntegrationSummary>>;
11
12
  patchWeblatePolicy(token: string, patch: PolicyPatch): Promise<RemoteResult<IntegrationSummary>>;
12
13
  disconnectWeblate(token: string): Promise<RemoteResult<boolean>>;
14
+ managedServiceCredentials(token: string): Promise<RemoteResult<{
15
+ readonly enabled: boolean;
16
+ readonly defaultForNewConnections: boolean;
17
+ }>>;
18
+ credentialSource(token: string, input: {
19
+ readonly provider: string;
20
+ readonly source: CredentialSource;
21
+ }): Promise<RemoteResult<IntegrationSummary>>;
22
+ serviceBoundary(token: string, input: {
23
+ readonly provider: string;
24
+ readonly selection: IntegrationServiceBoundary | null;
25
+ }): Promise<RemoteResult<IntegrationSummary>>;
13
26
  }
14
27
  export declare function createWeblateCard(remote: WeblateRemote): ({ token, help }: import("./provider-card.js").ProviderCardProps) => import("react/jsx-runtime").JSX.Element;
15
28
  //# sourceMappingURL=weblate.d.ts.map
@@ -1,9 +1,23 @@
1
+ /**
2
+ * The message a rejected argument carries. `explain` appends what a correct
3
+ * value looks like, so a model can repair the call instead of retrying it.
4
+ *
5
+ * Providers use it for the values that only they can judge — a project path, a
6
+ * branch name, a page id — so the refusal is phrased exactly once.
7
+ */
8
+ export declare function invalid(field: string, explain?: string): never;
1
9
  /** Model-supplied identifiers are positive integers or the argument is refused. */
2
10
  export declare function requiredInteger(value: unknown, field: string, min?: number, max?: number): number;
3
11
  export declare function optionalInteger(value: unknown, field: string, min?: number, max?: number): number | undefined;
4
12
  export declare function requiredText(value: unknown, field: string, min: number, max: number, explain?: string): string;
5
13
  export declare function optionalText(value: unknown, field: string, min: number, max: number, explain?: string): string | undefined;
6
14
  export declare function optionalBoolean(value: unknown, field: string): boolean | undefined;
15
+ /**
16
+ * A choice out of a fixed set, in the vocabulary the provider itself declares.
17
+ * The length window belongs to the caller: a short value must not pass as a
18
+ * real one, and the maximum is that field's own limit.
19
+ */
20
+ export declare function optionalChoice(value: unknown, allowed: readonly string[], field: string, min: number, max: number): string | undefined;
7
21
  /** Date-only fields, as most REST APIs declare them. */
8
22
  export declare function requiredDate(value: unknown, field: string): string;
9
23
  export declare function optionalDate(value: unknown, field: string): string | undefined;
@@ -1,9 +1,9 @@
1
1
  import z from "@deepseek-ai/schemastery";
2
2
  import type { CredentialHelpOverride } from "@yadsh/dsh-plugin-kit";
3
3
  import { type Bitrix24Flags } from "./providers/bitrix24/config.js";
4
- import { type ConfluenceFlags } from "./providers/confluence/config.js";
4
+ import { type ConfluenceConfigInput, type ConfluenceFlags } from "./providers/confluence/config.js";
5
5
  import { type GitlabFlags } from "./providers/gitlab/config.js";
6
- import { type JiraFlags } from "./providers/jira/config.js";
6
+ import { type JiraConfigInput, type JiraFlags } from "./providers/jira/config.js";
7
7
  import { type TeamCityConfigInput, type TeamCityFlags } from "./providers/teamcity/config.js";
8
8
  import { type TestitFlags } from "./providers/testit/config.js";
9
9
  import { type WeblateFlags } from "./providers/weblate/config.js";
@@ -33,10 +33,10 @@ export interface QaIntegrationsConfig {
33
33
  */
34
34
  readonly credentialHelp?: Readonly<Record<string, CredentialHelpOverride>>;
35
35
  readonly bitrix24?: Partial<Bitrix24Flags>;
36
- readonly confluence?: Partial<ConfluenceFlags>;
36
+ readonly confluence?: ConfluenceConfigInput;
37
37
  readonly gitlab?: Partial<GitlabFlags>;
38
38
  readonly teamcity?: TeamCityConfigInput;
39
- readonly jira?: Partial<JiraFlags>;
39
+ readonly jira?: JiraConfigInput;
40
40
  readonly testit?: Partial<TestitFlags>;
41
41
  readonly weblate?: Partial<WeblateFlags>;
42
42
  /**
@@ -31,4 +31,20 @@ export declare class IntegrationError extends Error {
31
31
  constructor(code: IntegrationErrorCode, message: string, options?: ErrorOptions);
32
32
  }
33
33
  export declare function publicIntegrationError(error: unknown): Error;
34
+ /**
35
+ * Whether a listing may pass over one resource instead of failing whole. A
36
+ * resource that is missing, or that the connected identity may not see, is
37
+ * worth reporting as unavailable: the caller asked for a set, and the rest of
38
+ * it is still an answer. Any other failure is about the connection itself
39
+ * (unreachable host, rejected credential) or the call itself, and must not be
40
+ * swallowed by a loop over resources.
41
+ */
42
+ export declare function recoverableResource(error: unknown): boolean;
43
+ /**
44
+ * A configuration-loading failure. The scope names the configuration an
45
+ * operator has to fix — "jira integration config", "qa-integrations managed
46
+ * service credentials" — and is bound once per configuration module, so every
47
+ * failure of that module reads alike and no message carries a secret value.
48
+ */
49
+ export declare function scopedConfigError(scope: string): (message: string) => Error;
34
50
  //# sourceMappingURL=errors.d.ts.map