@yadsh/dsh-qa-integrations 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +636 -202
- package/compatibility.json +1 -1
- package/lib/broker.js +468 -9
- package/lib/broker.js.map +1 -1
- package/lib/client/bitrix24.js +67 -5
- package/lib/client/bitrix24.js.map +1 -1
- package/lib/client/card.js +8 -1
- package/lib/client/card.js.map +1 -1
- package/lib/client/confluence.js +98 -129
- package/lib/client/confluence.js.map +1 -1
- package/lib/client/gitlab.js +41 -5
- package/lib/client/gitlab.js.map +1 -1
- package/lib/client/index.js +33 -11
- package/lib/client/index.js.map +1 -1
- package/lib/client/integrations.js +40 -3
- package/lib/client/integrations.js.map +1 -1
- package/lib/client/jira.js +96 -127
- package/lib/client/jira.js.map +1 -1
- package/lib/client/operator-card.js +537 -0
- package/lib/client/operator-card.js.map +1 -0
- package/lib/client/operator-controls.js +232 -0
- package/lib/client/operator-controls.js.map +1 -0
- package/lib/client/provider-card.js +138 -4
- package/lib/client/provider-card.js.map +1 -1
- package/lib/client/styles.js +68 -5
- package/lib/client/styles.js.map +1 -1
- package/lib/client/teamcity.js +31 -4
- package/lib/client/teamcity.js.map +1 -1
- package/lib/client/testit.js +101 -0
- package/lib/client/testit.js.map +1 -0
- package/lib/client/weblate.js +105 -0
- package/lib/client/weblate.js.map +1 -0
- package/lib/client.js +5214 -1054
- package/lib/client.js.map +1 -1
- package/lib/coerce.js +16 -7
- package/lib/coerce.js.map +1 -1
- package/lib/config.js +12 -0
- package/lib/config.js.map +1 -1
- package/lib/errors.js.map +1 -1
- package/lib/index.js +444 -57
- package/lib/index.js.map +1 -1
- package/lib/providers/bitrix24/catalog.js +151 -8
- package/lib/providers/bitrix24/catalog.js.map +1 -1
- package/lib/providers/bitrix24/config.js +87 -13
- package/lib/providers/bitrix24/config.js.map +1 -1
- package/lib/providers/bitrix24/credential-help.js +24 -0
- package/lib/providers/bitrix24/credential-help.js.map +1 -0
- package/lib/providers/bitrix24/index.js +122 -0
- package/lib/providers/bitrix24/index.js.map +1 -1
- package/lib/providers/bitrix24/operations.js +60 -1
- package/lib/providers/bitrix24/operations.js.map +1 -1
- package/lib/providers/bitrix24/tools.js +95 -3
- package/lib/providers/bitrix24/tools.js.map +1 -1
- package/lib/providers/confluence/catalog.js +51 -3
- package/lib/providers/confluence/catalog.js.map +1 -1
- package/lib/providers/confluence/credential-help.js +29 -0
- package/lib/providers/confluence/credential-help.js.map +1 -0
- package/lib/providers/confluence/index.js +302 -35
- package/lib/providers/confluence/index.js.map +1 -1
- package/lib/providers/confluence/operations.js +1 -1
- package/lib/providers/confluence/operations.js.map +1 -1
- package/lib/providers/gitlab/catalog.js +108 -15
- package/lib/providers/gitlab/catalog.js.map +1 -1
- package/lib/providers/gitlab/config.js +11 -3
- package/lib/providers/gitlab/config.js.map +1 -1
- package/lib/providers/gitlab/credential-help.js +33 -0
- package/lib/providers/gitlab/credential-help.js.map +1 -0
- package/lib/providers/gitlab/index.js +337 -6
- package/lib/providers/gitlab/index.js.map +1 -1
- package/lib/providers/jira/catalog.js +73 -3
- package/lib/providers/jira/catalog.js.map +1 -1
- package/lib/providers/jira/credential-help.js +31 -0
- package/lib/providers/jira/credential-help.js.map +1 -0
- package/lib/providers/jira/index.js +275 -12
- package/lib/providers/jira/index.js.map +1 -1
- package/lib/providers/registry.js +4 -0
- package/lib/providers/registry.js.map +1 -1
- package/lib/providers/shared/credential-help.js +29 -0
- package/lib/providers/shared/credential-help.js.map +1 -0
- package/lib/providers/shared/service-boundary.js +44 -0
- package/lib/providers/shared/service-boundary.js.map +1 -0
- package/lib/providers/teamcity/catalog.js +56 -2
- package/lib/providers/teamcity/catalog.js.map +1 -1
- package/lib/providers/teamcity/credential-help.js +25 -0
- package/lib/providers/teamcity/credential-help.js.map +1 -0
- package/lib/providers/teamcity/index.js +254 -2
- package/lib/providers/teamcity/index.js.map +1 -1
- package/lib/providers/testit/attachments.js +131 -0
- package/lib/providers/testit/attachments.js.map +1 -0
- package/lib/providers/testit/catalog.js +302 -0
- package/lib/providers/testit/catalog.js.map +1 -0
- package/lib/providers/testit/config.js +175 -0
- package/lib/providers/testit/config.js.map +1 -0
- package/lib/providers/testit/credential-help.js +29 -0
- package/lib/providers/testit/credential-help.js.map +1 -0
- package/lib/providers/testit/index.js +458 -0
- package/lib/providers/testit/index.js.map +1 -0
- package/lib/providers/testit/operations.js +1070 -0
- package/lib/providers/testit/operations.js.map +1 -0
- package/lib/providers/testit/tools.js +717 -0
- package/lib/providers/testit/tools.js.map +1 -0
- package/lib/providers/testit/transport.js +158 -0
- package/lib/providers/testit/transport.js.map +1 -0
- package/lib/providers/weblate/catalog.js +279 -0
- package/lib/providers/weblate/catalog.js.map +1 -0
- package/lib/providers/weblate/config.js +147 -0
- package/lib/providers/weblate/config.js.map +1 -0
- package/lib/providers/weblate/credential-help.js +26 -0
- package/lib/providers/weblate/credential-help.js.map +1 -0
- package/lib/providers/weblate/index.js +419 -0
- package/lib/providers/weblate/index.js.map +1 -0
- package/lib/providers/weblate/operations.js +703 -0
- package/lib/providers/weblate/operations.js.map +1 -0
- package/lib/providers/weblate/query.js +80 -0
- package/lib/providers/weblate/query.js.map +1 -0
- package/lib/providers/weblate/tools.js +408 -0
- package/lib/providers/weblate/tools.js.map +1 -0
- package/lib/providers/weblate/transport.js +179 -0
- package/lib/providers/weblate/transport.js.map +1 -0
- package/lib/repository.js +197 -13
- package/lib/repository.js.map +1 -1
- package/lib/service-credentials/config.js +179 -0
- package/lib/service-credentials/config.js.map +1 -0
- package/lib/service-credentials/policy.js +92 -0
- package/lib/service-credentials/policy.js.map +1 -0
- package/lib/service-credentials/registry.js +142 -0
- package/lib/service-credentials/registry.js.map +1 -0
- package/lib/service-credentials/state.js +30 -0
- package/lib/service-credentials/state.js.map +1 -0
- package/lib/service-credentials/types.js +20 -0
- package/lib/service-credentials/types.js.map +1 -0
- package/lib/shared/settings.js +8 -13
- package/lib/shared/settings.js.map +1 -1
- package/lib/tools.js +27 -2
- package/lib/tools.js.map +1 -1
- package/lib/typert.host.js +1340 -100
- package/lib/typert.remote-client.d.ts +45 -11
- package/lib/typert.remote-client.js +1101 -38
- package/lib/types/broker.d.ts +79 -5
- package/lib/types/client/bitrix24.d.ts +24 -2
- package/lib/types/client/card.d.ts +3 -1
- package/lib/types/client/confluence.d.ts +19 -3
- package/lib/types/client/gitlab.d.ts +15 -2
- package/lib/types/client/index.d.ts +7 -5
- package/lib/types/client/integrations.d.ts +12 -3
- package/lib/types/client/jira.d.ts +20 -3
- package/lib/types/client/operator-card.d.ts +22 -0
- package/lib/types/client/operator-controls.d.ts +135 -0
- package/lib/types/client/provider-card.d.ts +50 -8
- package/lib/types/client/styles.d.ts +4 -3
- package/lib/types/client/teamcity.d.ts +15 -2
- package/lib/types/client/testit.d.ts +28 -0
- package/lib/types/client/weblate.d.ts +28 -0
- package/lib/types/coerce.d.ts +2 -2
- package/lib/types/config.d.ts +21 -0
- package/lib/types/errors.d.ts +9 -1
- package/lib/types/index.d.ts +183 -18
- package/lib/types/providers/bitrix24/catalog.d.ts +9 -1
- package/lib/types/providers/bitrix24/config.d.ts +23 -22
- package/lib/types/providers/bitrix24/credential-help.d.ts +8 -0
- package/lib/types/providers/bitrix24/index.d.ts +41 -1
- package/lib/types/providers/bitrix24/tools.d.ts +4 -0
- package/lib/types/providers/confluence/catalog.d.ts +11 -3
- package/lib/types/providers/confluence/credential-help.d.ts +9 -0
- package/lib/types/providers/confluence/index.d.ts +66 -7
- package/lib/types/providers/confluence/operations.d.ts +2 -0
- package/lib/types/providers/contract.d.ts +62 -1
- package/lib/types/providers/gitlab/catalog.d.ts +20 -5
- package/lib/types/providers/gitlab/config.d.ts +14 -3
- package/lib/types/providers/gitlab/credential-help.d.ts +9 -0
- package/lib/types/providers/gitlab/index.d.ts +51 -1
- package/lib/types/providers/jira/catalog.d.ts +13 -0
- package/lib/types/providers/jira/credential-help.d.ts +8 -0
- package/lib/types/providers/jira/index.d.ts +53 -1
- package/lib/types/providers/registry.d.ts +2 -0
- package/lib/types/providers/shared/credential-help.d.ts +17 -0
- package/lib/types/providers/shared/service-boundary.d.ts +25 -0
- package/lib/types/providers/teamcity/catalog.d.ts +18 -2
- package/lib/types/providers/teamcity/credential-help.d.ts +8 -0
- package/lib/types/providers/teamcity/index.d.ts +53 -2
- package/lib/types/providers/testit/attachments.d.ts +20 -0
- package/lib/types/providers/testit/catalog.d.ts +87 -0
- package/lib/types/providers/testit/config.d.ts +61 -0
- package/lib/types/providers/testit/credential-help.d.ts +8 -0
- package/lib/types/providers/testit/index.d.ts +119 -0
- package/lib/types/providers/testit/operations.d.ts +95 -0
- package/lib/types/providers/testit/tools.d.ts +15 -0
- package/lib/types/providers/testit/transport.d.ts +67 -0
- package/lib/types/providers/weblate/catalog.d.ts +60 -0
- package/lib/types/providers/weblate/config.d.ts +57 -0
- package/lib/types/providers/weblate/credential-help.d.ts +9 -0
- package/lib/types/providers/weblate/index.d.ts +92 -0
- package/lib/types/providers/weblate/operations.d.ts +77 -0
- package/lib/types/providers/weblate/query.d.ts +37 -0
- package/lib/types/providers/weblate/tools.d.ts +15 -0
- package/lib/types/providers/weblate/transport.d.ts +60 -0
- package/lib/types/repository.d.ts +38 -3
- package/lib/types/service-credentials/config.d.ts +73 -0
- package/lib/types/service-credentials/policy.d.ts +44 -0
- package/lib/types/service-credentials/registry.d.ts +43 -0
- package/lib/types/service-credentials/state.d.ts +14 -0
- package/lib/types/service-credentials/types.d.ts +97 -0
- package/lib/types/shared/settings.d.ts +8 -13
- package/lib/types/tools.d.ts +10 -1
- package/lib/types/types.d.ts +114 -10
- package/package.json +7 -7
package/lib/types/broker.d.ts
CHANGED
|
@@ -2,20 +2,66 @@ import type { PluginLogger } from "@yadsh/dsh-plugin-log";
|
|
|
2
2
|
import type { IntegrationProviderRegistry } from "./providers/registry.js";
|
|
3
3
|
import type { IntegrationRepository } from "./repository.js";
|
|
4
4
|
import type { SecretStore } from "./secrets/secret-store.js";
|
|
5
|
-
import type {
|
|
5
|
+
import type { ServiceCredentialRegistry } from "./service-credentials/registry.js";
|
|
6
|
+
import { type ServiceCredentialHealth, type ServiceResourceBoundary } from "./service-credentials/types.js";
|
|
7
|
+
import type { CredentialInput, CredentialSource, IntegrationPrincipal, IntegrationProviderId, IntegrationProviderSummary, IntegrationSummary, IntegrationToolResult, PolicyPatch } from "./types.js";
|
|
8
|
+
export interface BrokerOptions {
|
|
9
|
+
/** Absent in deployments that configure no managed credential at all. */
|
|
10
|
+
readonly serviceCredentials?: ServiceCredentialRegistry | undefined;
|
|
11
|
+
/** Whether a new connection starts in service mode when a profile exists. */
|
|
12
|
+
readonly defaultForNewConnections?: boolean | undefined;
|
|
13
|
+
}
|
|
6
14
|
/** In-process broker boundary; no caller outside it receives decrypted secrets. */
|
|
7
15
|
export declare class IntegrationBroker {
|
|
8
16
|
private readonly repository;
|
|
9
17
|
private readonly secrets;
|
|
10
|
-
private
|
|
18
|
+
private providers;
|
|
11
19
|
private readonly logger;
|
|
12
|
-
|
|
20
|
+
private serviceCredentials;
|
|
21
|
+
private defaultForNewConnections;
|
|
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;
|
|
13
31
|
listProviders(): readonly IntegrationProviderSummary[];
|
|
14
32
|
list(principal: IntegrationPrincipal): readonly IntegrationSummary[];
|
|
15
33
|
summary(principal: IntegrationPrincipal, providerId: IntegrationProviderId): IntegrationSummary;
|
|
16
|
-
/**
|
|
17
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Connect one provider for one principal. The credential source is decided
|
|
36
|
+
* here, server-side: the client may ask for service mode, and gets it only
|
|
37
|
+
* when this deployment really manages a credential for that provider
|
|
38
|
+
* instance. A new connection defaults to service mode when the deployment
|
|
39
|
+
* says so and a profile exists — an existing connection never moves on its
|
|
40
|
+
* own, because its source is already stored.
|
|
41
|
+
*/
|
|
42
|
+
connect(principal: IntegrationPrincipal, providerId: IntegrationProviderId, input: CredentialInput, options?: {
|
|
43
|
+
readonly useServiceCredential?: boolean | undefined;
|
|
44
|
+
}): Promise<IntegrationSummary>;
|
|
18
45
|
validate(principal: IntegrationPrincipal, providerId: IntegrationProviderId): Promise<IntegrationSummary>;
|
|
46
|
+
/**
|
|
47
|
+
* Probe the deployment's managed credential for one instance and report what
|
|
48
|
+
* state it is in. The probe never changes upstream state, and the answer is a
|
|
49
|
+
* health status plus operator warnings — never the secret, and never the
|
|
50
|
+
* upstream identity the credential carries.
|
|
51
|
+
*/
|
|
52
|
+
serviceCredentialHealth(providerId: IntegrationProviderId, instanceId: string): Promise<ServiceCredentialHealth | null>;
|
|
53
|
+
/**
|
|
54
|
+
* Move one binding between credential sources. Both directions invalidate
|
|
55
|
+
* everything derived from the previous identity by bumping the binding
|
|
56
|
+
* revision, and neither direction ever falls back on its own.
|
|
57
|
+
*/
|
|
58
|
+
setCredentialSource(principal: IntegrationPrincipal, providerId: IntegrationProviderId, source: CredentialSource): Promise<IntegrationSummary>;
|
|
59
|
+
/**
|
|
60
|
+
* Narrow what this binding may read inside the profile's allowlist. A user may
|
|
61
|
+
* only remove entries: anything outside the administrator's list is dropped
|
|
62
|
+
* rather than stored, so a forged request cannot widen the boundary.
|
|
63
|
+
*/
|
|
64
|
+
setServiceSelection(principal: IntegrationPrincipal, providerId: IntegrationProviderId, selection: ServiceResourceBoundary | null): IntegrationSummary;
|
|
19
65
|
patchPolicy(principal: IntegrationPrincipal, providerId: IntegrationProviderId, patch: PolicyPatch): IntegrationSummary;
|
|
20
66
|
disconnect(principal: IntegrationPrincipal, providerId: IntegrationProviderId): boolean;
|
|
21
67
|
call(principal: IntegrationPrincipal, request: {
|
|
@@ -24,6 +70,34 @@ export declare class IntegrationBroker {
|
|
|
24
70
|
readonly input: Readonly<Record<string, unknown>>;
|
|
25
71
|
readonly sourceSessionId: string;
|
|
26
72
|
}): Promise<IntegrationToolResult>;
|
|
73
|
+
/**
|
|
74
|
+
* Decide one operation against the service ceiling. Every refusal is audited
|
|
75
|
+
* with the real principal: upstream will only ever show the service account,
|
|
76
|
+
* so this row is what answers who asked.
|
|
77
|
+
*/
|
|
78
|
+
private assertServiceOperation;
|
|
79
|
+
/**
|
|
80
|
+
* The profile a binding resolves to. It is chosen by the deployment — provider
|
|
81
|
+
* and portal — and never by an argument the model or the user supplies, which
|
|
82
|
+
* is why a caller cannot point a session at somebody else's credential.
|
|
83
|
+
*/
|
|
84
|
+
private profileFor;
|
|
85
|
+
private resolveService;
|
|
86
|
+
/**
|
|
87
|
+
* Turn the deployment's secret into the credential shape of this provider.
|
|
88
|
+
* The provider owns that shape, so a service secret can never be spent against
|
|
89
|
+
* an instance other than the profile's.
|
|
90
|
+
*/
|
|
91
|
+
private buildServiceCredential;
|
|
92
|
+
private probeService;
|
|
93
|
+
/** Capabilities the managed credential can reach through this provider. */
|
|
94
|
+
private serviceCapabilities;
|
|
95
|
+
/**
|
|
96
|
+
* Managed-credential state of one provider, as a client renders it. Null for a
|
|
97
|
+
* provider that supports no managed credential at all, so nothing about the
|
|
98
|
+
* feature appears where it does not apply.
|
|
99
|
+
*/
|
|
100
|
+
private serviceSummary;
|
|
27
101
|
private requireConnected;
|
|
28
102
|
private decrypt;
|
|
29
103
|
}
|
|
@@ -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:
|
|
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
|
|
@@ -2,7 +2,7 @@ import type { QaUserSession } from "@yadsh/dsh-qa-surface/client/settings";
|
|
|
2
2
|
import { type ReactElement } from "react";
|
|
3
3
|
import { type IntegrationsClientRemote } from "./integrations.js";
|
|
4
4
|
/**
|
|
5
|
-
* The Integrations card
|
|
5
|
+
* The Integrations card shown inside the plugin-owned host settings tab.
|
|
6
6
|
*
|
|
7
7
|
* A connection belongs to a QA account, and the token of that account is the
|
|
8
8
|
* only credential the principal-scoped remotes accept, so the card renders the
|
|
@@ -10,4 +10,6 @@ import { type IntegrationsClientRemote } from "./integrations.js";
|
|
|
10
10
|
* and says so instead of showing forms that could only fail.
|
|
11
11
|
*/
|
|
12
12
|
export declare function createIntegrationsCard(remote: IntegrationsClientRemote, providers: readonly string[], session: QaUserSession): () => ReactElement;
|
|
13
|
+
/** Host tab wrapper that preserves the card shell's direct ul > li contract. */
|
|
14
|
+
export declare function createIntegrationsHostTab(remote: IntegrationsClientRemote, providers: readonly string[], session: QaUserSession): () => ReactElement;
|
|
13
15
|
//# sourceMappingURL=card.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
|
|
2
|
-
import type {
|
|
3
|
-
import type { IntegrationInstanceSummary, IntegrationSummary, PolicyPatch } from "../types.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>>;
|
|
@@ -8,10 +7,27 @@ export interface ConfluenceRemote {
|
|
|
8
7
|
readonly instanceId: string;
|
|
9
8
|
readonly email: string;
|
|
10
9
|
readonly token: string;
|
|
10
|
+
readonly useServiceCredential?: boolean;
|
|
11
11
|
}): Promise<RemoteResult<IntegrationSummary>>;
|
|
12
12
|
testConfluence(token: string): Promise<RemoteResult<IntegrationSummary>>;
|
|
13
13
|
patchConfluencePolicy(token: string, patch: PolicyPatch): Promise<RemoteResult<IntegrationSummary>>;
|
|
14
14
|
disconnectConfluence(token: string): Promise<RemoteResult<boolean>>;
|
|
15
|
+
/**
|
|
16
|
+
* Present on the host that mounts the shared managed-credential machinery.
|
|
17
|
+
* A caller without them gets a card that never offers service mode.
|
|
18
|
+
*/
|
|
19
|
+
managedServiceCredentials?(token: string): Promise<RemoteResult<{
|
|
20
|
+
readonly enabled: boolean;
|
|
21
|
+
readonly defaultForNewConnections: boolean;
|
|
22
|
+
}>>;
|
|
23
|
+
credentialSource?(token: string, input: {
|
|
24
|
+
readonly provider: string;
|
|
25
|
+
readonly source: CredentialSource;
|
|
26
|
+
}): Promise<RemoteResult<IntegrationSummary>>;
|
|
27
|
+
serviceBoundary?(token: string, input: {
|
|
28
|
+
readonly provider: string;
|
|
29
|
+
readonly selection: IntegrationServiceBoundary | null;
|
|
30
|
+
}): Promise<RemoteResult<IntegrationSummary>>;
|
|
15
31
|
}
|
|
16
|
-
export declare function createConfluenceCard(remote: ConfluenceRemote): ({ token }:
|
|
32
|
+
export declare function createConfluenceCard(remote: ConfluenceRemote): ({ token, help }: import("./provider-card.js").ProviderCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
33
|
//# sourceMappingURL=confluence.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 GitlabRemote {
|
|
4
4
|
gitlabInstances(token: string): Promise<RemoteResult<readonly IntegrationInstanceSummary[]>>;
|
|
5
5
|
getGitlab(token: string): Promise<RemoteResult<IntegrationSummary>>;
|
|
6
6
|
putGitlabCredential(token: string, input: {
|
|
7
7
|
readonly instanceId: string;
|
|
8
8
|
readonly token: string;
|
|
9
|
+
readonly useServiceCredential?: boolean;
|
|
9
10
|
}): Promise<RemoteResult<IntegrationSummary>>;
|
|
10
11
|
testGitlab(token: string): Promise<RemoteResult<IntegrationSummary>>;
|
|
11
12
|
patchGitlabPolicy(token: string, patch: PolicyPatch): Promise<RemoteResult<IntegrationSummary>>;
|
|
12
13
|
disconnectGitlab(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
|
-
export declare function createGitlabCard(remote: GitlabRemote): ({ token }: import("
|
|
27
|
+
export declare function createGitlabCard(remote: GitlabRemote): ({ token, help }: import("./provider-card.js").ProviderCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
28
|
//# sourceMappingURL=gitlab.d.ts.map
|
|
@@ -1,12 +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
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
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.
|
|
10
12
|
*/
|
|
11
13
|
export declare function apply(ctx: Context): Promise<() => Promise<void>>;
|
|
12
14
|
export type { IntegrationSummary, PolicyPatch, RemoteResult };
|
|
@@ -1,10 +1,18 @@
|
|
|
1
|
+
import type { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
|
|
1
2
|
import type { QaUserSettingsSectionProps } from "@yadsh/dsh-qa-surface/client/settings";
|
|
2
|
-
import {
|
|
3
|
+
import type { IntegrationProviderSummary } from "../types.js";
|
|
4
|
+
import { type Bitrix24Remote, type IntegrationsRemote } from "./bitrix24.js";
|
|
3
5
|
import { type ConfluenceRemote } from "./confluence.js";
|
|
4
6
|
import { type GitlabRemote } from "./gitlab.js";
|
|
5
7
|
import { type JiraRemote } from "./jira.js";
|
|
6
8
|
import { type TeamcityRemote } from "./teamcity.js";
|
|
7
|
-
|
|
9
|
+
import { type TestitRemote } from "./testit.js";
|
|
10
|
+
import { type WeblateRemote } from "./weblate.js";
|
|
11
|
+
/** The provider list arrives with each provider's credential help on it. */
|
|
12
|
+
export interface CredentialHelpRemote {
|
|
13
|
+
providers(token: string): Promise<RemoteResult<readonly IntegrationProviderSummary[]>>;
|
|
14
|
+
}
|
|
15
|
+
export type IntegrationsClientRemote = CredentialHelpRemote & IntegrationsRemote & Bitrix24Remote & ConfluenceRemote & GitlabRemote & TeamcityRemote & JiraRemote & TestitRemote & WeblateRemote;
|
|
8
16
|
/** What every mount of the provider cards needs. */
|
|
9
17
|
export interface ProviderCardsProps {
|
|
10
18
|
/** Current QA account token; transport authentication for the remotes. */
|
|
@@ -17,7 +25,8 @@ export declare const INTEGRATIONS_DISCLOSURE = "\u0414\u0430\u043D\u043D\u044B\u
|
|
|
17
25
|
/**
|
|
18
26
|
* One card per provider the deployment mounted. The list comes from the host
|
|
19
27
|
* (`describe`), so a provider the operator switched off simply never renders and
|
|
20
|
-
* the client carries no knowledge of which exist.
|
|
28
|
+
* the client carries no knowledge of which exist. The credential help each card
|
|
29
|
+
* shows comes from the same host, per provider.
|
|
21
30
|
*
|
|
22
31
|
* Both mounts share this component: the page of the QA settings dialog, where
|
|
23
32
|
* the account gate lives, and the host's plugin-configuration card.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
|
|
2
|
-
import type {
|
|
3
|
-
import type { IntegrationInstanceSummary, IntegrationSummary, PolicyPatch } from "../types.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>>;
|
|
@@ -8,10 +7,28 @@ export interface JiraRemote {
|
|
|
8
7
|
readonly siteId: string;
|
|
9
8
|
readonly email: string;
|
|
10
9
|
readonly token: string;
|
|
10
|
+
readonly useServiceCredential?: boolean | undefined;
|
|
11
11
|
}): Promise<RemoteResult<IntegrationSummary>>;
|
|
12
12
|
testJira(token: string): Promise<RemoteResult<IntegrationSummary>>;
|
|
13
13
|
patchJiraPolicy(token: string, patch: PolicyPatch): Promise<RemoteResult<IntegrationSummary>>;
|
|
14
14
|
disconnectJira(token: string): Promise<RemoteResult<boolean>>;
|
|
15
|
+
/**
|
|
16
|
+
* The service remotes exist on the host for every provider; they stay
|
|
17
|
+
* optional here so a card also renders against a slice that offers none of
|
|
18
|
+
* them — the checkbox and the switches simply never appear.
|
|
19
|
+
*/
|
|
20
|
+
managedServiceCredentials?(token: string): Promise<RemoteResult<{
|
|
21
|
+
readonly enabled: boolean;
|
|
22
|
+
readonly defaultForNewConnections: boolean;
|
|
23
|
+
}>>;
|
|
24
|
+
credentialSource?(token: string, input: {
|
|
25
|
+
readonly provider: string;
|
|
26
|
+
readonly source: CredentialSource;
|
|
27
|
+
}): Promise<RemoteResult<IntegrationSummary>>;
|
|
28
|
+
serviceBoundary?(token: string, input: {
|
|
29
|
+
readonly provider: string;
|
|
30
|
+
readonly selection: IntegrationServiceBoundary | null;
|
|
31
|
+
}): Promise<RemoteResult<IntegrationSummary>>;
|
|
15
32
|
}
|
|
16
|
-
export declare function createJiraCard(remote: JiraRemote): ({ token }:
|
|
33
|
+
export declare function createJiraCard(remote: JiraRemote): ({ token, help }: import("./provider-card.js").ProviderCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
34
|
//# 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,12 +1,23 @@
|
|
|
1
1
|
import type { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
|
|
2
|
+
import type { CredentialHelp } from "@yadsh/dsh-plugin-kit";
|
|
2
3
|
import type { QaUserSettingsSectionProps } from "@yadsh/dsh-qa-surface/client/settings";
|
|
3
4
|
import type { ReactNode } from "react";
|
|
4
|
-
import type { IntegrationCapability, IntegrationSummary, PolicyPatch } from "../types.js";
|
|
5
|
+
import type { CredentialSource, IntegrationCapability, IntegrationServiceBoundary, IntegrationSummary, PolicyPatch } from "../types.js";
|
|
5
6
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* What every provider card receives: the account token, plus the credential help
|
|
8
|
+
* this deployment declared for the provider. The help is metadata — a card
|
|
9
|
+
* renders it or renders nothing, and the credential field behaves the same
|
|
10
|
+
* either way.
|
|
11
|
+
*/
|
|
12
|
+
export interface ProviderCardProps extends QaUserSettingsSectionProps {
|
|
13
|
+
readonly help?: CredentialHelp | null;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The skeleton the provider cards share: the failure banner, the status head,
|
|
17
|
+
* the connected summary, the save/test/patch/disconnect flows, the managed
|
|
18
|
+
* credential block, the capability switches and the replace/disconnect
|
|
19
|
+
* confirmations. A provider supplies its copy, its load sequence, its credential
|
|
20
|
+
* form and how its instances map to a deployment credential.
|
|
10
21
|
*/
|
|
11
22
|
export interface ProviderCardState<Extra> {
|
|
12
23
|
readonly token: string;
|
|
@@ -16,12 +27,23 @@ export interface ProviderCardState<Extra> {
|
|
|
16
27
|
readonly showCredential: boolean;
|
|
17
28
|
readonly credential: string;
|
|
18
29
|
readonly extra: Extra;
|
|
30
|
+
/** Managed credential offered by the selected instance, or null. */
|
|
31
|
+
readonly service: {
|
|
32
|
+
readonly label: string;
|
|
33
|
+
} | null;
|
|
34
|
+
/** Whether the connect form asks for that credential instead of a token. */
|
|
35
|
+
readonly useService: boolean;
|
|
36
|
+
setUseService(value: boolean): void;
|
|
19
37
|
setCredential(value: string): void;
|
|
20
38
|
/** Clear the form and leave replace mode. */
|
|
21
39
|
cancelCredential(): void;
|
|
22
40
|
save(): void;
|
|
23
41
|
test(): void;
|
|
24
42
|
patch(capability: IntegrationCapability, allowed: boolean): void;
|
|
43
|
+
/** Move the connected binding onto the other credential source. */
|
|
44
|
+
switchSource(source: CredentialSource): void;
|
|
45
|
+
/** Store what this binding narrows the profile's allowlist to. */
|
|
46
|
+
saveBoundary(selection: IntegrationServiceBoundary | null): void;
|
|
25
47
|
setConfirmDisconnect(value: boolean): void;
|
|
26
48
|
disconnect(): void;
|
|
27
49
|
fail(cause: unknown): void;
|
|
@@ -36,10 +58,15 @@ export interface ProviderCardLoad<Extra> {
|
|
|
36
58
|
}
|
|
37
59
|
/** The remote calls every provider card makes on the shared skeleton. */
|
|
38
60
|
export interface ProviderCardCalls<Extra> {
|
|
39
|
-
save(token: string, credential: string, extra: Extra
|
|
61
|
+
save(token: string, credential: string, extra: Extra, options: {
|
|
62
|
+
readonly useServiceCredential: boolean;
|
|
63
|
+
}): Promise<RemoteResult<IntegrationSummary>>;
|
|
40
64
|
test(token: string): Promise<RemoteResult<IntegrationSummary>>;
|
|
41
65
|
patch(token: string, patch: PolicyPatch): Promise<RemoteResult<IntegrationSummary>>;
|
|
42
66
|
disconnect(token: string): Promise<RemoteResult<boolean>>;
|
|
67
|
+
/** Present on the providers a deployment may manage a credential for. */
|
|
68
|
+
setSource?(token: string, source: CredentialSource): Promise<RemoteResult<IntegrationSummary>>;
|
|
69
|
+
setBoundary?(token: string, selection: IntegrationServiceBoundary | null): Promise<RemoteResult<IntegrationSummary>>;
|
|
43
70
|
}
|
|
44
71
|
export interface ProviderCardSpec<Extra> {
|
|
45
72
|
readonly title: string;
|
|
@@ -55,9 +82,24 @@ export interface ProviderCardSpec<Extra> {
|
|
|
55
82
|
useExtra(): Extra;
|
|
56
83
|
load(load: ProviderCardLoad<Extra>): Promise<void>;
|
|
57
84
|
readonly calls: ProviderCardCalls<Extra>;
|
|
58
|
-
credentialSection(state: ProviderCardState<Extra
|
|
85
|
+
credentialSection(state: ProviderCardState<Extra>, help: CredentialHelp | null): ReactNode;
|
|
59
86
|
/** Muted note under the head, or null when this provider shows none. */
|
|
60
87
|
readonly notConfiguredHint?: (state: ProviderCardState<Extra>) => ReactNode | null;
|
|
88
|
+
/** Managed credential of the instance the form currently selects. */
|
|
89
|
+
readonly serviceBinding?: (extra: Extra) => {
|
|
90
|
+
readonly label: string;
|
|
91
|
+
} | null;
|
|
92
|
+
/**
|
|
93
|
+
* Whether a new connection starts on the managed credential. Read from the
|
|
94
|
+
* deployment, so the default the form shows is the one the host will apply.
|
|
95
|
+
*/
|
|
96
|
+
readonly serviceDefault?: (token: string) => Promise<boolean>;
|
|
61
97
|
}
|
|
62
|
-
|
|
98
|
+
/**
|
|
99
|
+
* The managed-credential block of a connect form: one checkbox, plus what the
|
|
100
|
+
* mode does and does not give. Rendered by the providers a deployment may
|
|
101
|
+
* manage a credential for, using the instance the form selected.
|
|
102
|
+
*/
|
|
103
|
+
export declare function serviceConnectOption<Extra>(state: ProviderCardState<Extra>): ReactNode;
|
|
104
|
+
export declare function createProviderCard<Extra>(spec: ProviderCardSpec<Extra>): ({ token, help }: ProviderCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
63
105
|
//# sourceMappingURL=provider-card.d.ts.map
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The canonical settings-card shell
|
|
3
|
-
*
|
|
4
|
-
* the
|
|
2
|
+
* The canonical settings-card shell and the shared credential-help note come
|
|
3
|
+
* from the kit (AGENTS.md pins the shell), and only the tab list and what lives
|
|
4
|
+
* inside the card body are this plugin's own: the provider cards the dialog page
|
|
5
|
+
* and the host tab both mount.
|
|
5
6
|
*/
|
|
6
7
|
export declare const styles: string;
|
|
7
8
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
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 TeamcityRemote {
|
|
4
4
|
getTeamcity(token: string): Promise<RemoteResult<IntegrationSummary>>;
|
|
5
5
|
/**
|
|
@@ -10,10 +10,23 @@ export interface TeamcityRemote {
|
|
|
10
10
|
teamcityServer(token: string): Promise<RemoteResult<IntegrationInstanceSummary | null>>;
|
|
11
11
|
putTeamcityCredential(token: string, input: {
|
|
12
12
|
readonly token: string;
|
|
13
|
+
readonly useServiceCredential?: boolean;
|
|
13
14
|
}): Promise<RemoteResult<IntegrationSummary>>;
|
|
14
15
|
testTeamcity(token: string): Promise<RemoteResult<IntegrationSummary>>;
|
|
15
16
|
patchTeamcityPolicy(token: string, patch: PolicyPatch): Promise<RemoteResult<IntegrationSummary>>;
|
|
16
17
|
disconnectTeamcity(token: string): Promise<RemoteResult<boolean>>;
|
|
18
|
+
managedServiceCredentials(token: string): Promise<RemoteResult<{
|
|
19
|
+
readonly enabled: boolean;
|
|
20
|
+
readonly defaultForNewConnections: boolean;
|
|
21
|
+
}>>;
|
|
22
|
+
credentialSource(token: string, input: {
|
|
23
|
+
readonly provider: string;
|
|
24
|
+
readonly source: CredentialSource;
|
|
25
|
+
}): Promise<RemoteResult<IntegrationSummary>>;
|
|
26
|
+
serviceBoundary(token: string, input: {
|
|
27
|
+
readonly provider: string;
|
|
28
|
+
readonly selection: IntegrationServiceBoundary | null;
|
|
29
|
+
}): Promise<RemoteResult<IntegrationSummary>>;
|
|
17
30
|
}
|
|
18
|
-
export declare function createTeamcityCard(remote: TeamcityRemote): ({ token }: import("
|
|
31
|
+
export declare function createTeamcityCard(remote: TeamcityRemote): ({ token, help }: import("./provider-card.js").ProviderCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
32
|
//# sourceMappingURL=teamcity.d.ts.map
|