@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
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
|
|
2
|
+
import type { CredentialSource, IntegrationInstanceSummary, IntegrationServiceBoundary, IntegrationSummary, PolicyPatch } from "../types.js";
|
|
3
|
+
export interface TestitRemote {
|
|
4
|
+
testitInstances(token: string): Promise<RemoteResult<readonly IntegrationInstanceSummary[]>>;
|
|
5
|
+
getTestit(token: string): Promise<RemoteResult<IntegrationSummary>>;
|
|
6
|
+
putTestitCredential(token: string, input: {
|
|
7
|
+
readonly instanceId: string;
|
|
8
|
+
readonly token: string;
|
|
9
|
+
readonly useServiceCredential?: boolean;
|
|
10
|
+
}): Promise<RemoteResult<IntegrationSummary>>;
|
|
11
|
+
testTestit(token: string): Promise<RemoteResult<IntegrationSummary>>;
|
|
12
|
+
patchTestitPolicy(token: string, patch: PolicyPatch): Promise<RemoteResult<IntegrationSummary>>;
|
|
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>>;
|
|
26
|
+
}
|
|
27
|
+
export declare function createTestitCard(remote: TestitRemote): ({ token, help }: import("./provider-card.js").ProviderCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
//# sourceMappingURL=testit.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
|
|
2
|
+
import type { CredentialSource, IntegrationInstanceSummary, IntegrationServiceBoundary, IntegrationSummary, PolicyPatch } from "../types.js";
|
|
3
|
+
export interface WeblateRemote {
|
|
4
|
+
weblateInstances(token: string): Promise<RemoteResult<readonly IntegrationInstanceSummary[]>>;
|
|
5
|
+
getWeblate(token: string): Promise<RemoteResult<IntegrationSummary>>;
|
|
6
|
+
putWeblateCredential(token: string, input: {
|
|
7
|
+
readonly instanceId: string;
|
|
8
|
+
readonly token: string;
|
|
9
|
+
readonly useServiceCredential?: boolean;
|
|
10
|
+
}): Promise<RemoteResult<IntegrationSummary>>;
|
|
11
|
+
testWeblate(token: string): Promise<RemoteResult<IntegrationSummary>>;
|
|
12
|
+
patchWeblatePolicy(token: string, patch: PolicyPatch): Promise<RemoteResult<IntegrationSummary>>;
|
|
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>>;
|
|
26
|
+
}
|
|
27
|
+
export declare function createWeblateCard(remote: WeblateRemote): ({ token, help }: import("./provider-card.js").ProviderCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
//# sourceMappingURL=weblate.d.ts.map
|
package/lib/types/coerce.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** Model-supplied identifiers are positive integers or the argument is refused. */
|
|
2
2
|
export declare function requiredInteger(value: unknown, field: string, min?: number, max?: number): number;
|
|
3
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;
|
|
4
|
+
export declare function requiredText(value: unknown, field: string, min: number, max: number, explain?: string): string;
|
|
5
|
+
export declare function optionalText(value: unknown, field: string, min: number, max: number, explain?: string): string | undefined;
|
|
6
6
|
export declare function optionalBoolean(value: unknown, field: string): boolean | undefined;
|
|
7
7
|
/** Date-only fields, as most REST APIs declare them. */
|
|
8
8
|
export declare function requiredDate(value: unknown, field: string): string;
|
package/lib/types/config.d.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import z from "@deepseek-ai/schemastery";
|
|
2
|
+
import type { CredentialHelpOverride } from "@yadsh/dsh-plugin-kit";
|
|
2
3
|
import { type Bitrix24Flags } from "./providers/bitrix24/config.js";
|
|
3
4
|
import { type ConfluenceFlags } from "./providers/confluence/config.js";
|
|
4
5
|
import { type GitlabFlags } from "./providers/gitlab/config.js";
|
|
5
6
|
import { type JiraFlags } from "./providers/jira/config.js";
|
|
6
7
|
import { type TeamCityConfigInput, type TeamCityFlags } from "./providers/teamcity/config.js";
|
|
8
|
+
import { type TestitFlags } from "./providers/testit/config.js";
|
|
9
|
+
import { type WeblateFlags } from "./providers/weblate/config.js";
|
|
10
|
+
import { type ManagedServiceCredentialsConfig, type ManagedServiceCredentialsInput } from "./service-credentials/config.js";
|
|
7
11
|
/**
|
|
8
12
|
* Composition root of the plugin config: the shared knobs plus one slice per
|
|
9
13
|
* provider. Adding a provider means adding its slice here and nothing else.
|
|
@@ -22,11 +26,24 @@ export interface QaIntegrationsConfig {
|
|
|
22
26
|
readonly maxResponseBytes?: number;
|
|
23
27
|
/** Host allowlist for providers that dial an operator-approved domain. */
|
|
24
28
|
readonly allowedPortalSuffixes?: string[];
|
|
29
|
+
/**
|
|
30
|
+
* Deployment replacements for the credential help each provider declares:
|
|
31
|
+
* corporate token pages, self-hosted instances, internal documentation. A
|
|
32
|
+
* provider without an entry keeps the help it ships.
|
|
33
|
+
*/
|
|
34
|
+
readonly credentialHelp?: Readonly<Record<string, CredentialHelpOverride>>;
|
|
25
35
|
readonly bitrix24?: Partial<Bitrix24Flags>;
|
|
26
36
|
readonly confluence?: Partial<ConfluenceFlags>;
|
|
27
37
|
readonly gitlab?: Partial<GitlabFlags>;
|
|
28
38
|
readonly teamcity?: TeamCityConfigInput;
|
|
29
39
|
readonly jira?: Partial<JiraFlags>;
|
|
40
|
+
readonly testit?: Partial<TestitFlags>;
|
|
41
|
+
readonly weblate?: Partial<WeblateFlags>;
|
|
42
|
+
/**
|
|
43
|
+
* Deployment-managed service credentials. Absent by default: a deployment
|
|
44
|
+
* opts in, and nothing about the feature exists until it does.
|
|
45
|
+
*/
|
|
46
|
+
readonly managedServiceCredentials?: ManagedServiceCredentialsInput;
|
|
30
47
|
}
|
|
31
48
|
export interface ResolvedQaIntegrationsConfig {
|
|
32
49
|
readonly enabled: boolean;
|
|
@@ -37,11 +54,15 @@ export interface ResolvedQaIntegrationsConfig {
|
|
|
37
54
|
readonly timeoutMs: number;
|
|
38
55
|
readonly maxResponseBytes: number;
|
|
39
56
|
readonly allowedPortalSuffixes: readonly string[];
|
|
57
|
+
readonly credentialHelp: Readonly<Record<string, CredentialHelpOverride | undefined>>;
|
|
40
58
|
readonly bitrix24: Bitrix24Flags;
|
|
41
59
|
readonly confluence: ConfluenceFlags;
|
|
42
60
|
readonly gitlab: GitlabFlags;
|
|
43
61
|
readonly teamcity: TeamCityFlags;
|
|
44
62
|
readonly jira: JiraFlags;
|
|
63
|
+
readonly testit: TestitFlags;
|
|
64
|
+
readonly weblate: WeblateFlags;
|
|
65
|
+
readonly managedServiceCredentials: ManagedServiceCredentialsConfig;
|
|
45
66
|
}
|
|
46
67
|
export declare const ConfigSchema: z<QaIntegrationsConfig>;
|
|
47
68
|
export declare function resolveConfig(input?: QaIntegrationsConfig): ResolvedQaIntegrationsConfig;
|
package/lib/types/errors.d.ts
CHANGED
|
@@ -16,7 +16,15 @@ export type IntegrationErrorCode = "IntegrationNotConnected" | "CredentialExpire
|
|
|
16
16
|
* certificate. The user cannot fix this from the connect form, so it is kept
|
|
17
17
|
* apart from a plain unreachable host.
|
|
18
18
|
*/
|
|
19
|
-
| "TlsFailure"
|
|
19
|
+
| "TlsFailure"
|
|
20
|
+
/**
|
|
21
|
+
* Managed service credentials. The first group describes the deployment's own
|
|
22
|
+
* credential; the second describes what one user's binding may do with it.
|
|
23
|
+
* The names follow the specification's `SERVICE_CREDENTIAL_*` /
|
|
24
|
+
* `OPERATION_NOT_ALLOWED_*` codes in this package's casing convention, and
|
|
25
|
+
* `publicIntegrationError` is what turns them into a client-visible reason.
|
|
26
|
+
*/
|
|
27
|
+
| "ServiceCredentialUnavailable" | "ServiceCredentialDisabled" | "ServiceCredentialInvalid" | "ServiceCredentialUnsafeScope" | "ServiceResourceNotAllowed" | "OperationNotAllowedWithServiceCredential" | "SensitiveReadRequiresPersonalCredential" | "PersonalCredentialRequired";
|
|
20
28
|
/** Safe domain error: message and code never include upstream bodies or secrets. */
|
|
21
29
|
export declare class IntegrationError extends Error {
|
|
22
30
|
readonly code: IntegrationErrorCode;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { Context } from "@deepseek-ai/cordis";
|
|
2
2
|
import { TypertRemoteService } from "@deepseek-ai/dsh-typert-protocol";
|
|
3
|
-
import z from "@deepseek-ai/schemastery";
|
|
4
3
|
import type { QaSurface } from "@yadsh/dsh-qa-surface";
|
|
5
4
|
import { IntegrationBroker } from "./broker.js";
|
|
6
5
|
import { type QaIntegrationsConfig } from "./config.js";
|
|
7
|
-
import type {
|
|
6
|
+
import type { CredentialSource, IntegrationInstanceSummary, ServiceCredentialHealth, IntegrationProviderId, IntegrationProviderSummary, IntegrationServiceBoundary, IntegrationSummary, PolicyPatch } from "./types.js";
|
|
8
7
|
export declare const name = "dsh-qa-integrations";
|
|
9
8
|
export declare const inject: readonly ["qaSurface", "tools"];
|
|
10
|
-
export declare const Config:
|
|
9
|
+
export declare const Config: import("@deepseek-ai/schemastery").default<QaIntegrationsConfig>;
|
|
11
10
|
type IntegrationsContext = Context & {
|
|
12
11
|
readonly qaSurface: QaSurface;
|
|
13
12
|
};
|
|
@@ -19,19 +18,82 @@ declare module "@deepseek-ai/cordis" {
|
|
|
19
18
|
/** Host remote, broker owner, and registration point for read-only tools. */
|
|
20
19
|
export declare class QaIntegrations extends TypertRemoteService {
|
|
21
20
|
static inject: readonly ["qaSurface", "tools"];
|
|
22
|
-
static Config:
|
|
21
|
+
static Config: import("@deepseek-ai/schemastery").default<QaIntegrationsConfig>;
|
|
23
22
|
readonly broker: IntegrationBroker;
|
|
24
23
|
private readonly logger;
|
|
25
|
-
private readonly
|
|
26
|
-
private
|
|
27
|
-
|
|
24
|
+
private readonly owner;
|
|
25
|
+
private enabled;
|
|
26
|
+
/** Providers by id; the service-credential registry resolves through them. */
|
|
27
|
+
private providerRegistry;
|
|
28
|
+
/** Absent unless the deployment configured managed service credentials. */
|
|
29
|
+
private serviceCredentials;
|
|
30
|
+
private defaultForNewConnections;
|
|
31
|
+
private providerSummaries;
|
|
32
|
+
private configuredInstances;
|
|
28
33
|
/** The Confluence sites this deployment dials, for the connect form. */
|
|
29
|
-
private
|
|
34
|
+
private configuredConfluenceSites;
|
|
30
35
|
/** The Jira Cloud sites this deployment allows, in config order. */
|
|
31
|
-
private
|
|
36
|
+
private configuredJiraSites;
|
|
32
37
|
/** The TeamCity server this deployment dials, or null when it mounts none. */
|
|
33
|
-
private
|
|
38
|
+
private configuredServer;
|
|
39
|
+
/** The Test IT installations this deployment allows, in config order. */
|
|
40
|
+
private configuredTestitInstances;
|
|
41
|
+
/** The Weblate instances this deployment allows, in config order. */
|
|
42
|
+
private configuredWeblateInstances;
|
|
43
|
+
/** The Bitrix24 portals this deployment allows, in config order. */
|
|
44
|
+
private configuredBitrix24Portals;
|
|
45
|
+
/**
|
|
46
|
+
* The composition row the Host resolved at load. It stays the base of the
|
|
47
|
+
* settings section, and the configuration source until the namespace takes
|
|
48
|
+
* over, so a deployment without a settings provider keeps booting on it.
|
|
49
|
+
*/
|
|
50
|
+
private readonly entryConfig;
|
|
51
|
+
/** Where the live configuration is read from; the settings namespace swaps this. */
|
|
52
|
+
private configSource;
|
|
53
|
+
/**
|
|
54
|
+
* The connection store and its key live for the whole process: connections
|
|
55
|
+
* and wrapped secrets belong to the boot path, and only derivations of the
|
|
56
|
+
* configuration re-apply while running.
|
|
57
|
+
*/
|
|
58
|
+
private readonly repository;
|
|
59
|
+
private readonly secrets;
|
|
60
|
+
private readonly bootDataPath;
|
|
61
|
+
private readonly bootMasterKeyPath;
|
|
62
|
+
private readonly bootMasterKeyVersion;
|
|
63
|
+
/** Removers of the currently mounted admission and tool registrations. */
|
|
64
|
+
private toolRemovers;
|
|
65
|
+
/** The mounted tool-name list; an unchanged signature never re-registers. */
|
|
66
|
+
private toolsKey;
|
|
34
67
|
constructor(ctx: IntegrationsContext, rawConfig?: QaIntegrationsConfig);
|
|
68
|
+
/**
|
|
69
|
+
* Rebuild every configuration-derived surface: the provider registry, the
|
|
70
|
+
* deployment instance lists, the service-credential registry and the tool
|
|
71
|
+
* mount. The store and its key do not travel here — connections and wrapped
|
|
72
|
+
* secrets belong to the boot path, and a card edit that re-points them is
|
|
73
|
+
* answered with a warning instead of a live reopen.
|
|
74
|
+
*/
|
|
75
|
+
private applyConfig;
|
|
76
|
+
/**
|
|
77
|
+
* Mount the tools the configuration asks for. The mounted set changes only
|
|
78
|
+
* when the plugin or its one write capability flips, so an unrelated card
|
|
79
|
+
* edit never churns the Host tool registry.
|
|
80
|
+
*/
|
|
81
|
+
private syncTools;
|
|
82
|
+
/**
|
|
83
|
+
* Attach the settings namespace. The installed section becomes the plugin's
|
|
84
|
+
* configuration source, so an operator card edit re-applies the running
|
|
85
|
+
* service instead of waiting for a restart; without a settings provider the
|
|
86
|
+
* composition entry stays authoritative. The read is structural and optional:
|
|
87
|
+
* a Host without a mounted settings provider keeps this plugin fully working.
|
|
88
|
+
*/
|
|
89
|
+
private installSettings;
|
|
90
|
+
/**
|
|
91
|
+
* Re-resolve the source after a committed settings change and rebuild what
|
|
92
|
+
* derives from it. A source the resolvers refuse keeps the running state:
|
|
93
|
+
* the settings provider validates on write, so this only covers a value
|
|
94
|
+
* that arrived through another path.
|
|
95
|
+
*/
|
|
96
|
+
private reapply;
|
|
35
97
|
describe(): {
|
|
36
98
|
readonly enabled: boolean;
|
|
37
99
|
readonly providers: readonly IntegrationProviderId[];
|
|
@@ -39,7 +101,13 @@ export declare class QaIntegrations extends TypertRemoteService {
|
|
|
39
101
|
providers(token: string): readonly IntegrationProviderSummary[];
|
|
40
102
|
list(token: string): readonly IntegrationSummary[];
|
|
41
103
|
getBitrix24(token: string): IntegrationSummary;
|
|
42
|
-
putBitrix24Credential(token: string, input:
|
|
104
|
+
putBitrix24Credential(token: string, input: {
|
|
105
|
+
readonly instanceId: string;
|
|
106
|
+
readonly token: string;
|
|
107
|
+
/** Whether the connect form asked for the managed credential instead. */
|
|
108
|
+
readonly useServiceCredential?: boolean | undefined;
|
|
109
|
+
}): Promise<IntegrationSummary>;
|
|
110
|
+
bitrix24Instances(token: string): readonly IntegrationInstanceSummary[];
|
|
43
111
|
testBitrix24(token: string): Promise<IntegrationSummary>;
|
|
44
112
|
patchBitrix24Policy(token: string, patch: PolicyPatch): IntegrationSummary;
|
|
45
113
|
disconnectBitrix24(token: string): boolean;
|
|
@@ -53,6 +121,8 @@ export declare class QaIntegrations extends TypertRemoteService {
|
|
|
53
121
|
putGitlabCredential(token: string, input: {
|
|
54
122
|
readonly instanceId: string;
|
|
55
123
|
readonly token: string;
|
|
124
|
+
/** Whether the connect form asked for the managed credential instead. */
|
|
125
|
+
readonly useServiceCredential?: boolean | undefined;
|
|
56
126
|
}): Promise<IntegrationSummary>;
|
|
57
127
|
testGitlab(token: string): Promise<IntegrationSummary>;
|
|
58
128
|
patchGitlabPolicy(token: string, patch: PolicyPatch): IntegrationSummary;
|
|
@@ -73,6 +143,8 @@ export declare class QaIntegrations extends TypertRemoteService {
|
|
|
73
143
|
readonly instanceId: string;
|
|
74
144
|
readonly email: string;
|
|
75
145
|
readonly token: string;
|
|
146
|
+
/** Whether the connect form asked for the managed credential instead. */
|
|
147
|
+
readonly useServiceCredential?: boolean | undefined;
|
|
76
148
|
}): Promise<IntegrationSummary>;
|
|
77
149
|
testConfluence(token: string): Promise<IntegrationSummary>;
|
|
78
150
|
patchConfluencePolicy(token: string, patch: PolicyPatch): IntegrationSummary;
|
|
@@ -86,6 +158,8 @@ export declare class QaIntegrations extends TypertRemoteService {
|
|
|
86
158
|
*/
|
|
87
159
|
putTeamcityCredential(token: string, input: {
|
|
88
160
|
readonly token: string;
|
|
161
|
+
/** Whether the connect form asked for the managed credential instead. */
|
|
162
|
+
readonly useServiceCredential?: boolean | undefined;
|
|
89
163
|
}): Promise<IntegrationSummary>;
|
|
90
164
|
/**
|
|
91
165
|
* The address the connect form shows next to the token field, or null when
|
|
@@ -109,25 +183,102 @@ export declare class QaIntegrations extends TypertRemoteService {
|
|
|
109
183
|
readonly siteId: string;
|
|
110
184
|
readonly email: string;
|
|
111
185
|
readonly token: string;
|
|
186
|
+
/** Whether the connect form asked for the managed credential instead. */
|
|
187
|
+
readonly useServiceCredential?: boolean | undefined;
|
|
112
188
|
}): Promise<IntegrationSummary>;
|
|
113
189
|
testJira(token: string): Promise<IntegrationSummary>;
|
|
114
190
|
patchJiraPolicy(token: string, patch: PolicyPatch): IntegrationSummary;
|
|
115
191
|
disconnectJira(token: string): boolean;
|
|
192
|
+
/**
|
|
193
|
+
* Installations this deployment allows. Like the GitLab instance list, the
|
|
194
|
+
* connect form picks from it and never takes a hostname: the Test IT address a
|
|
195
|
+
* token is spent against is operator configuration.
|
|
196
|
+
*/
|
|
197
|
+
testitInstances(token: string): readonly IntegrationInstanceSummary[];
|
|
198
|
+
getTestit(token: string): IntegrationSummary;
|
|
199
|
+
putTestitCredential(token: string, input: {
|
|
200
|
+
readonly instanceId: string;
|
|
201
|
+
readonly token: string;
|
|
202
|
+
/** Whether the connect form asked for the managed credential instead. */
|
|
203
|
+
readonly useServiceCredential?: boolean | undefined;
|
|
204
|
+
}): Promise<IntegrationSummary>;
|
|
205
|
+
testTestit(token: string): Promise<IntegrationSummary>;
|
|
206
|
+
patchTestitPolicy(token: string, patch: PolicyPatch): IntegrationSummary;
|
|
207
|
+
disconnectTestit(token: string): boolean;
|
|
208
|
+
/**
|
|
209
|
+
* Instances this deployment allows. The connect form picks from this list and
|
|
210
|
+
* never takes a hostname, which is what keeps the broker from being pointed at
|
|
211
|
+
* an origin the operator did not configure.
|
|
212
|
+
*/
|
|
213
|
+
weblateInstances(token: string): readonly IntegrationInstanceSummary[];
|
|
214
|
+
getWeblate(token: string): IntegrationSummary;
|
|
215
|
+
putWeblateCredential(token: string, input: {
|
|
216
|
+
readonly instanceId: string;
|
|
217
|
+
readonly token: string;
|
|
218
|
+
/** Whether the connect form asked for the managed credential instead. */
|
|
219
|
+
readonly useServiceCredential?: boolean | undefined;
|
|
220
|
+
}): Promise<IntegrationSummary>;
|
|
221
|
+
testWeblate(token: string): Promise<IntegrationSummary>;
|
|
222
|
+
patchWeblatePolicy(token: string, patch: PolicyPatch): IntegrationSummary;
|
|
223
|
+
disconnectWeblate(token: string): boolean;
|
|
224
|
+
/**
|
|
225
|
+
* Whether this deployment offers managed service credentials at all, and
|
|
226
|
+
* whether a new connection starts on one. Token-gated like every other card
|
|
227
|
+
* call: the answer describes the deployment, not the caller.
|
|
228
|
+
*/
|
|
229
|
+
managedServiceCredentials(token: string): {
|
|
230
|
+
readonly enabled: boolean;
|
|
231
|
+
readonly defaultForNewConnections: boolean;
|
|
232
|
+
};
|
|
233
|
+
/**
|
|
234
|
+
* Switch one provider of the calling principal between their own credential
|
|
235
|
+
* and the deployment's. The provider id is validated against the registry, and
|
|
236
|
+
* the profile is resolved server-side, so no caller can name a credential.
|
|
237
|
+
*/
|
|
238
|
+
credentialSource(token: string, input: {
|
|
239
|
+
readonly provider: IntegrationProviderId;
|
|
240
|
+
readonly source: CredentialSource;
|
|
241
|
+
}): Promise<IntegrationSummary>;
|
|
242
|
+
/**
|
|
243
|
+
* Narrow what this connection may read inside the profile's allowlist. A
|
|
244
|
+
* selection outside that allowlist is dropped rather than stored, so this can
|
|
245
|
+
* only ever remove.
|
|
246
|
+
*/
|
|
247
|
+
serviceBoundary(token: string, input: {
|
|
248
|
+
readonly provider: IntegrationProviderId;
|
|
249
|
+
readonly selection: IntegrationServiceBoundary | null;
|
|
250
|
+
}): IntegrationSummary;
|
|
251
|
+
/**
|
|
252
|
+
* Probe the managed credential of one provider instance. Answers a health
|
|
253
|
+
* status, never the secret and never the upstream identity it carries.
|
|
254
|
+
*/
|
|
255
|
+
serviceHealth(token: string, input: {
|
|
256
|
+
readonly provider: IntegrationProviderId;
|
|
257
|
+
readonly instanceId: string;
|
|
258
|
+
}): Promise<ServiceCredentialHealth | null>;
|
|
259
|
+
/** The safe alias of the managed credential bound to one instance, if any. */
|
|
260
|
+
private serviceBinding;
|
|
116
261
|
private requirePrincipal;
|
|
117
262
|
private run;
|
|
118
263
|
private runAsync;
|
|
119
264
|
}
|
|
120
265
|
export { IntegrationBroker } from "./broker.js";
|
|
121
266
|
export { ConfigSchema, resolveConfig, type QaIntegrationsConfig, type ResolvedQaIntegrationsConfig, } from "./config.js";
|
|
267
|
+
export { MANAGED_SERVICE_CREDENTIALS_DEFAULTS, managedServiceCredentialsSchema, resolveManagedServiceCredentials, type ManagedServiceCredentialProfileConfig, type ManagedServiceCredentialProfileInput, type ManagedServiceCredentialsConfig, type ManagedServiceCredentialsInput, } from "./service-credentials/config.js";
|
|
268
|
+
export { evaluateServiceOperation, narrowBoundary, SERVICE_CEILING, type ServiceOperationQuery, type ServicePolicyDecision, } from "./service-credentials/policy.js";
|
|
269
|
+
export { ServiceCredentialRegistry } from "./service-credentials/registry.js";
|
|
270
|
+
export { operationCapabilityServiceState } from "./service-credentials/state.js";
|
|
271
|
+
export { profilePolicyRevision } from "./service-credentials/config.js";
|
|
272
|
+
export { CREDENTIAL_SOURCES, isCredentialSource, UNCLASSIFIED_OPERATION, type CredentialSource as ManagedCredentialSource, type DataSensitivity, type OperationEffect, type OperationSecurityMetadata, type OperationServiceDecision, type ResolvedCredentialContext, type ResolvedServiceCredential, type SafeExternalIdentity, type ServiceCredentialHealth, type ServiceCredentialProfile, type ServiceCredentialStatus, type ServiceResourceBoundary, } from "./service-credentials/types.js";
|
|
122
273
|
export { IntegrationError } from "./errors.js";
|
|
123
274
|
export { BITRIX_CAPABILITIES, BITRIX_OPERATIONS, BITRIX24_CAPABILITY_INFO, bitrix24OperationCapability, enabledCapabilities, type Bitrix24Capability, type Bitrix24CapabilityDefinition, type BitrixOperationDefinition, } from "./providers/bitrix24/catalog.js";
|
|
124
275
|
export { BITRIX24_DEFAULTS, bitrix24ConfigSchema, resolveBitrix24Config, type Bitrix24Flags, } from "./providers/bitrix24/config.js";
|
|
125
276
|
export { Bitrix24Provider, parseBitrixWebhook, } from "./providers/bitrix24/index.js";
|
|
126
277
|
export { BITRIX_HANDLERS, BITRIX_PROJECTIONS, } from "./providers/bitrix24/operations.js";
|
|
127
278
|
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";
|
|
279
|
+
export { GitlabProvider, groupAllowed as gitlabGroupAllowed, projectAllowed as gitlabProjectAllowed, } from "./providers/gitlab/index.js";
|
|
280
|
+
export { GITLAB_CAPABILITIES, GITLAB_CAPABILITY_INFO, GITLAB_CI_SPLIT_CAPABILITIES, GITLAB_LEGACY_CI_CAPABILITY, GITLAB_OPERATIONS, GITLAB_RESOURCE_KIND, capabilitiesForScopes, gitlabOperationCapability, gitlabOperationMetadata, type GitlabCapability, type GitlabCapabilityDefinition, type GitlabOperationDefinition, } from "./providers/gitlab/catalog.js";
|
|
281
|
+
export { GITLAB_DEFAULTS, gitlabConfigSchema, resolveGitlabConfig, type GitlabConfigInput, type GitlabFlags, type GitlabInstance, } from "./providers/gitlab/config.js";
|
|
131
282
|
export { createGitlabTools, GITLAB_TOOL_NAMES, } from "./providers/gitlab/tools.js";
|
|
132
283
|
export { GitlabTransport, credentialFromPlaintext as gitlabCredentialFromPlaintext, credentialInstance, type GitlabCredential, } from "./providers/gitlab/transport.js";
|
|
133
284
|
export { GITLAB_HANDLERS, GITLAB_PROJECTIONS, } from "./providers/gitlab/operations.js";
|
|
@@ -139,8 +290,8 @@ export { buildCql, cqlLiteral, CONTENT_TYPES, ORDER_BY, type ConfluenceOrder, ty
|
|
|
139
290
|
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
291
|
export { createConfluenceTools, CONFLUENCE_TOOL_NAMES, } from "./providers/confluence/tools.js";
|
|
141
292
|
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";
|
|
293
|
+
export { TeamcityProvider, buildTypeAllowed as teamcityBuildTypeAllowed, projectAllowed as teamcityProjectAllowed, } from "./providers/teamcity/index.js";
|
|
294
|
+
export { TEAMCITY_CAPABILITIES, TEAMCITY_CAPABILITY_INFO, TEAMCITY_INSTANCE_ID, TEAMCITY_OPERATIONS, TEAMCITY_RESOURCE_KIND, TEAMCITY_STREAM_OPERATIONS, enabledCapabilities as enabledTeamcityCapabilities, teamcityOperationCapability, teamcityOperationMetadata, type TeamCityCapability, type TeamCityCapabilityDefinition, type TeamCityOperationDefinition, } from "./providers/teamcity/catalog.js";
|
|
144
295
|
export { TEAMCITY_DEFAULTS, DEFAULT_LOG_LINES, resolveTeamCityConfig, teamcityConfigSchema, type TeamCityConfigInput, type TeamCityFlags, } from "./providers/teamcity/config.js";
|
|
145
296
|
export { artifactBinaryProblem, artifactByteLimit, artifactPath, textArtifact, type ArtifactPath, } from "./providers/teamcity/artifacts.js";
|
|
146
297
|
export { LOG_MODES, logLines, logMode, sanitizeLog, selectLogWindow, trimToBytes, type LogMode, type LogWindow, } from "./providers/teamcity/logs.js";
|
|
@@ -157,13 +308,27 @@ export { buildJql, commentLimit, commentStart, issueKey as jiraIssueKey, jqlDate
|
|
|
157
308
|
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
309
|
export { JiraTransport, basicAuthorization, credentialFromPlaintext as jiraCredentialFromPlaintext, credentialSite, type JiraCredential, } from "./providers/jira/transport.js";
|
|
159
310
|
export { createJiraTools, JIRA_TOOL_NAMES } from "./providers/jira/tools.js";
|
|
311
|
+
export { TestitProvider } from "./providers/testit/index.js";
|
|
312
|
+
export { TESTIT_CAPABILITIES, TESTIT_CAPABILITY_INFO, TESTIT_OPERATIONS, enabledCapabilities as enabledTestitCapabilities, testitOperationCapability, type TestitCapability, type TestitCapabilityDefinition, type TestitListKind, type TestitOperationDefinition, } from "./providers/testit/catalog.js";
|
|
313
|
+
export { TESTIT_DEFAULTS, resolveTestitConfig, testitConfigSchema, testitInstance, type TestitFlags, type TestitInstance, } from "./providers/testit/config.js";
|
|
314
|
+
export { assertReadableSize, attachmentBinaryProblem, attachmentByteLimit, attachmentExtension, attachmentName, } from "./providers/testit/attachments.js";
|
|
315
|
+
export { RESULT_OUTCOMES, TESTIT_HANDLERS, TESTIT_LIMITS, TESTIT_PROJECTIONS, TEST_RUN_STATES, WORK_ITEM_ENTITY_TYPES, WORK_ITEM_PRIORITIES, WORK_ITEM_STATES, bounded as testitBounded, capped, contentBlock as testitContentBlock, listLimit as testitListLimit, listOffset as testitListOffset, paged, type TestitProjection, type TestitProjectionContext, type TestitRequest, } from "./providers/testit/operations.js";
|
|
316
|
+
export { TestitTransport, credentialFromPlaintext as testitCredentialFromPlaintext, credentialInstance as testitCredentialInstance, type TestitCredential, type TestitPage, } from "./providers/testit/transport.js";
|
|
317
|
+
export { createTestitTools, TESTIT_TOOL_NAMES, } from "./providers/testit/tools.js";
|
|
318
|
+
export { WeblateProvider } from "./providers/weblate/index.js";
|
|
319
|
+
export { WEBLATE_CAPABILITIES, WEBLATE_CAPABILITY_INFO, WEBLATE_OPERATIONS, enabledCapabilities as weblateEnabledCapabilities, weblateOperationCapability, type WeblateCapability, type WeblateCapabilityDefinition, type WeblateOperationDefinition, } from "./providers/weblate/catalog.js";
|
|
320
|
+
export { WEBLATE_DEFAULTS, resolveWeblateConfig, weblateConfigSchema, weblateInstance, type WeblateFlags, type WeblateInstance, } from "./providers/weblate/config.js";
|
|
321
|
+
export { WEBLATE_HANDLERS, WEBLATE_PROJECTIONS, WEBLATE_UNTRUSTED_OPERATIONS, accountFromUsers, componentRef, projectRef as weblateProjectRef, sameOriginUrl, translationRef as weblateTranslationRef, unitState as weblateUnitState, type WeblateProjection, type WeblateProjectionContext, } from "./providers/weblate/operations.js";
|
|
322
|
+
export { FAILING_CHECK_CLAUSE, UNIT_STATE_FILTERS, UNIT_TEXT_FIELDS, buildUnitQuery, exactClause as weblateExactClause, quoteQueryValue, stateClause as weblateStateClause, textClause as weblateTextClause, type UnitStateFilter, type UnitTextField, } from "./providers/weblate/query.js";
|
|
323
|
+
export { WeblateTransport, credentialFromPlaintext as weblateCredentialFromPlaintext, credentialInstance as weblateCredentialInstance, resultsOf, type WeblateCredential, } from "./providers/weblate/transport.js";
|
|
324
|
+
export { createWeblateTools, WEBLATE_TOOL_NAMES, } from "./providers/weblate/tools.js";
|
|
160
325
|
export { IntegrationProviderRegistry } from "./providers/registry.js";
|
|
326
|
+
export { serviceBoundaryOf, serviceResourceDenied, } from "./providers/shared/service-boundary.js";
|
|
161
327
|
export { IntegrationRepository } from "./repository.js";
|
|
162
328
|
export { DockerSecretKeyProvider, MemoryKeyProvider, type KeyProvider, } from "./secrets/key-provider.js";
|
|
163
329
|
export { SecretStore } from "./secrets/secret-store.js";
|
|
164
|
-
export { QA_INTEGRATIONS_SETTINGS_NAMESPACE } from "./shared/settings.js";
|
|
165
330
|
export { createToolKit, type ToolKitOptions } from "./tool-kit.js";
|
|
166
|
-
export { createIntegrationTools, INTEGRATION_TOOL_NAMES } from "./tools.js";
|
|
331
|
+
export { createIntegrationTools, INTEGRATION_TOOL_NAMES, integrationToolNames, } from "./tools.js";
|
|
167
332
|
export type * from "./types.js";
|
|
168
333
|
export { BitrixTransport, credentialFromPlaintext, type BitrixCredential, } from "./providers/bitrix24/transport.js";
|
|
169
334
|
export default QaIntegrations;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IntegrationCapability, IntegrationCapabilityInfo } from "../../types.js";
|
|
2
|
+
import type { OperationSecurityMetadata } from "../../service-credentials/types.js";
|
|
2
3
|
import type { Bitrix24Flags } from "./config.js";
|
|
3
4
|
/**
|
|
4
5
|
* Capabilities this provider can offer, one per Bitrix24 webhook scope. `scopes`
|
|
@@ -9,7 +10,7 @@ import type { Bitrix24Flags } from "./config.js";
|
|
|
9
10
|
* Labels live here so the host, the Settings card, and package verification all
|
|
10
11
|
* describe a capability the same way.
|
|
11
12
|
*/
|
|
12
|
-
export type Bitrix24Capability = "crm.read" | "chat.read" | "openlines.read" | "user.read" | "department.read" | "tasks.read" | "calendar.read" | "disk.read";
|
|
13
|
+
export type Bitrix24Capability = "crm.read" | "crm.comment.write" | "chat.read" | "openlines.read" | "user.read" | "department.read" | "tasks.read" | "calendar.read" | "disk.read";
|
|
13
14
|
export interface Bitrix24CapabilityDefinition {
|
|
14
15
|
readonly capability: Bitrix24Capability;
|
|
15
16
|
readonly flag: Exclude<keyof Bitrix24Flags, "enabled">;
|
|
@@ -32,6 +33,13 @@ export interface BitrixOperationDefinition {
|
|
|
32
33
|
/** REST method as called over the webhook, without the `.json` suffix. */
|
|
33
34
|
readonly method: string;
|
|
34
35
|
readonly list?: BitrixListShape;
|
|
36
|
+
/**
|
|
37
|
+
* Security classification for the managed service credential. Bitrix24 has
|
|
38
|
+
* no project tree, so the resource a service call has to stay inside is the
|
|
39
|
+
* portal itself: every boundary-required operation names the `"portals"`
|
|
40
|
+
* kind, and the profile's `resources.portals` has to name the portal host.
|
|
41
|
+
*/
|
|
42
|
+
readonly security: OperationSecurityMetadata;
|
|
35
43
|
}
|
|
36
44
|
/**
|
|
37
45
|
* Every model-reachable operation. The provider refuses any operation that is
|
|
@@ -1,13 +1,33 @@
|
|
|
1
1
|
import z from "@deepseek-ai/schemastery";
|
|
2
|
+
/**
|
|
3
|
+
* One operator-declared Bitrix24 portal. A personal connection names its
|
|
4
|
+
* portal implicitly, through the webhook URL; a managed service credential
|
|
5
|
+
* needs the portal named by the deployment, because the profile binds to it —
|
|
6
|
+
* the registry matches a profile to a connection by this host.
|
|
7
|
+
*/
|
|
8
|
+
export interface Bitrix24Instance {
|
|
9
|
+
readonly id: string;
|
|
10
|
+
readonly label: string;
|
|
11
|
+
/** Portal hostname (lowercase, no scheme, no path), e.g. company.bitrix24.ru. */
|
|
12
|
+
readonly portal: string;
|
|
13
|
+
}
|
|
2
14
|
/**
|
|
3
15
|
* Deployment switches for the Bitrix24 provider. Every read scope is on by
|
|
4
16
|
* default: a capability is offered to the agent only when the connected webhook
|
|
5
17
|
* was actually granted the matching Bitrix24 scope, so these switches bound what
|
|
6
|
-
* this deployment allows, they do not grant it.
|
|
18
|
+
* this deployment allows, they do not grant it. The write switch
|
|
19
|
+
* (`crmCommentWrite`) is off by default and rides the same `crm` scope the read
|
|
20
|
+
* switch uses — Bitrix24 has no read-only webhook scope.
|
|
7
21
|
*/
|
|
8
22
|
export interface Bitrix24Flags {
|
|
9
23
|
readonly enabled: boolean;
|
|
10
24
|
readonly crmRead: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Mounts the provider's only write tool, the timeline comment. A `crm`-scoped
|
|
27
|
+
* webhook can write on its own, so this switch — not the scope probe — is
|
|
28
|
+
* what bounds the deployment; the capability also starts policy-denied.
|
|
29
|
+
*/
|
|
30
|
+
readonly crmCommentWrite: boolean;
|
|
11
31
|
readonly chatRead: boolean;
|
|
12
32
|
readonly openlinesRead: boolean;
|
|
13
33
|
readonly userRead: boolean;
|
|
@@ -15,29 +35,10 @@ export interface Bitrix24Flags {
|
|
|
15
35
|
readonly tasksRead: boolean;
|
|
16
36
|
readonly calendarRead: boolean;
|
|
17
37
|
readonly diskRead: boolean;
|
|
38
|
+
readonly instances: readonly Bitrix24Instance[];
|
|
18
39
|
}
|
|
19
40
|
export declare const BITRIX24_DEFAULTS: Bitrix24Flags;
|
|
20
41
|
/** Config slice of this provider, as it appears under `bitrix24:` in YAML. */
|
|
21
|
-
export declare const bitrix24ConfigSchema: z<
|
|
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 const bitrix24ConfigSchema: z<Partial<Bitrix24Flags>>;
|
|
42
43
|
export declare function resolveBitrix24Config(input?: Partial<Bitrix24Flags>): Bitrix24Flags;
|
|
43
44
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CredentialHelp } from "@yadsh/dsh-plugin-kit";
|
|
2
|
+
/**
|
|
3
|
+
* How a Bitrix24 connection is obtained. There is no token page to link: the
|
|
4
|
+
* credential *is* the incoming webhook address of the user's own portal, so the
|
|
5
|
+
* help explains the mechanism and points at the vendor documentation.
|
|
6
|
+
*/
|
|
7
|
+
export declare const BITRIX24_CREDENTIAL_HELP: CredentialHelp;
|
|
8
|
+
//# sourceMappingURL=credential-help.d.ts.map
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { type CredentialHelp } from "@yadsh/dsh-plugin-kit";
|
|
1
2
|
import type { ResolvedQaIntegrationsConfig } from "../../config.js";
|
|
2
|
-
import type { IntegrationCapability, IntegrationCapabilityInfo, ProviderValidation } from "../../types.js";
|
|
3
|
+
import type { CapabilityServiceState, IntegrationCapability, IntegrationCapabilityInfo, ProviderValidation, ServiceCredentialHealth } from "../../types.js";
|
|
4
|
+
import type { OperationSecurityMetadata } from "../../service-credentials/types.js";
|
|
3
5
|
import type { IntegrationProvider, ProviderContext } from "../contract.js";
|
|
4
6
|
export { credentialFromPlaintext, parseBitrixWebhook, type BitrixCredential, } from "./transport.js";
|
|
5
7
|
/** Bitrix24 provider: incoming-webhook credentials over the Bitrix24 REST API. */
|
|
@@ -10,6 +12,10 @@ export declare class Bitrix24Provider implements IntegrationProvider {
|
|
|
10
12
|
/** What this deployment allows; the webhook scope probe narrows it per user. */
|
|
11
13
|
readonly capabilities: readonly IntegrationCapability[];
|
|
12
14
|
readonly capabilityInfo: Readonly<Record<IntegrationCapability, IntegrationCapabilityInfo>>;
|
|
15
|
+
/** Where the settings card says this provider's credential comes from. */
|
|
16
|
+
readonly credentialHelp: CredentialHelp | null;
|
|
17
|
+
/** Overrides the deployment got wrong; reported once at startup, never fatal. */
|
|
18
|
+
readonly credentialHelpProblems: readonly string[];
|
|
13
19
|
private readonly transport;
|
|
14
20
|
constructor(config: ResolvedQaIntegrationsConfig, fetcher?: typeof fetch);
|
|
15
21
|
/** Keep only the secret part of an operator-supplied webhook URL. */
|
|
@@ -18,7 +24,41 @@ export declare class Bitrix24Provider implements IntegrationProvider {
|
|
|
18
24
|
readonly portal: string;
|
|
19
25
|
};
|
|
20
26
|
operationCapability(operation: string): IntegrationCapability | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Security classification of one operation, straight from the catalog: an
|
|
29
|
+
* operation the catalog does not list is unclassified and unreachable
|
|
30
|
+
* through the managed credential.
|
|
31
|
+
*/
|
|
32
|
+
operationMetadata(operation: string): OperationSecurityMetadata | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* How one capability behaves under the managed credential. A capability that
|
|
35
|
+
* mixes portal reads with personal-only reads (CRM: the call transcript and
|
|
36
|
+
* the duplicate lookup stay personal) reports `sensitive`, so the card says
|
|
37
|
+
* what the connection loses in service mode.
|
|
38
|
+
*/
|
|
39
|
+
capabilityServiceState(capability: IntegrationCapability): CapabilityServiceState | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Bitrix24 scopes by portal, not by project, so `"portals"` is the one
|
|
42
|
+
* boundary kind: the profile names the portal hosts a service account may
|
|
43
|
+
* work inside, and every boundary-required call checks against them.
|
|
44
|
+
*/
|
|
45
|
+
resourceBoundaryKind(operation: string): string | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Portal host of one configured instance, so deployment configuration can
|
|
48
|
+
* name an instance the same way the connect form does and a typo fails at
|
|
49
|
+
* load. The host — not the URL — is the form a stored portal carries.
|
|
50
|
+
*/
|
|
51
|
+
instancePortal(instanceId: string): string | undefined;
|
|
21
52
|
validate(context: ProviderContext): Promise<ProviderValidation>;
|
|
53
|
+
/**
|
|
54
|
+
* Health of a deployment-managed webhook. The probe reads only the identity
|
|
55
|
+
* and scope self-inspection methods, so it never changes upstream state.
|
|
56
|
+
* Bitrix24 webhook scopes are coarse — the `crm` scope reads and writes with
|
|
57
|
+
* one bit — so the probe cannot certify read-only the way GitLab scopes can;
|
|
58
|
+
* the answer says so, and the local service ceiling is what bounds the
|
|
59
|
+
* credential either way.
|
|
60
|
+
*/
|
|
61
|
+
validateServiceCredential(context: ProviderContext): Promise<ServiceCredentialHealth>;
|
|
22
62
|
execute(context: ProviderContext, operation: string, input: Readonly<Record<string, unknown>>): Promise<unknown>;
|
|
23
63
|
/**
|
|
24
64
|
* The scopes the connected webhook was actually granted. A portal that
|
|
@@ -2,8 +2,12 @@ import type { ToolDefinition } from "@deepseek-ai/dsh-tools";
|
|
|
2
2
|
import type { IntegrationBroker } from "../../broker.js";
|
|
3
3
|
import type { IntegrationPrincipal } from "../../types.js";
|
|
4
4
|
export declare const BITRIX24_TOOL_NAMES: readonly ["bitrix_search_crm", "bitrix_get_crm_item", "bitrix_get_crm_fields", "bitrix_get_crm_funnels", "bitrix_get_crm_statuses", "bitrix_get_crm_activities", "bitrix_get_crm_activity", "bitrix_get_crm_timeline", "bitrix_get_crm_stage_history", "bitrix_get_crm_product_rows", "bitrix_find_crm_duplicates", "bitrix_get_crm_requisites", "bitrix_get_call_transcript", "bitrix_get_current_user", "bitrix_search_users", "bitrix_get_departments", "bitrix_get_user_fields", "bitrix_search_chats", "bitrix_get_chat_messages", "bitrix_search_chat_messages", "bitrix_get_recent_chats", "bitrix_search_chat_users", "bitrix_find_chat", "bitrix_get_chat_participants", "bitrix_get_chat_user_data", "bitrix_get_openline_dialog", "bitrix_get_openline_history", "bitrix_search_tasks", "bitrix_get_task", "bitrix_get_task_history", "bitrix_get_task_results", "bitrix_get_task_elapsed_time", "bitrix_get_calendar_events", "bitrix_get_calendar_accessibility", "bitrix_search_files", "bitrix_get_file", "bitrix_get_drives", "bitrix_get_storage_items", "bitrix_get_folder_items"];
|
|
5
|
+
/** The provider's single write tool; mounted only when the operator opts in. */
|
|
6
|
+
export declare const BITRIX24_COMMENT_TOOL_NAME: "bitrix_add_crm_timeline_comment";
|
|
5
7
|
export declare function createBitrix24Tools(options: {
|
|
6
8
|
readonly broker: IntegrationBroker;
|
|
7
9
|
readonly principalForSession: (sessionId: string) => IntegrationPrincipal | undefined;
|
|
10
|
+
/** Mount the timeline-comment write tool; default stays read-only. */
|
|
11
|
+
readonly crmCommentWrite?: boolean;
|
|
8
12
|
}): readonly ToolDefinition[];
|
|
9
13
|
//# sourceMappingURL=tools.d.ts.map
|