@cjhyy/code-shell-link 0.9.8 → 0.9.10
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/dist/index.d.ts +1 -0
- package/dist/management-types.d.ts +72 -0
- package/dist/management-types.js +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { LINK_PROVIDER_MANIFESTS, getLinkProviderManifest, localizeLinkText } from "./catalog.js";
|
|
2
2
|
export type { LinkAuthGuide, LinkAuthKind, LinkConnectionMethodManifest, LinkCliSessionAuth, LinkExecutionRuntime, LinkLocalizedText, LinkMethodAvailability, LinkPermissionGuide, LinkPermissionLevel, LinkProviderAccent, LinkProviderCategory, LinkProviderIcon, LinkProviderManifest, LinkSecretLocation, } from "./types.js";
|
|
3
|
+
export type { LinkProviderView, LinkAuthorization, LinkConnectionInput, LinkErrorCode, LinkSnapshot, MaskedLinkConnection, TokenConnectionInput, } from "./management-types.js";
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { LinkProviderManifest } from "./types.js";
|
|
2
|
+
export type LinkProviderView = LinkProviderManifest & {
|
|
3
|
+
tokenLabel: string;
|
|
4
|
+
tokenPlaceholder: string;
|
|
5
|
+
actions: Array<{
|
|
6
|
+
id: string;
|
|
7
|
+
title: string;
|
|
8
|
+
description: string;
|
|
9
|
+
risk: "discovery" | "read" | "write";
|
|
10
|
+
}>;
|
|
11
|
+
deviceAuth?: {
|
|
12
|
+
providerId: "github" | "gitlab";
|
|
13
|
+
configured: boolean;
|
|
14
|
+
flow: "device-code";
|
|
15
|
+
configurationCode?: "client_id_missing";
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export interface MaskedLinkConnection {
|
|
19
|
+
id: string;
|
|
20
|
+
providerId: string;
|
|
21
|
+
methodId: string;
|
|
22
|
+
label: string;
|
|
23
|
+
runtime: "local";
|
|
24
|
+
authSource: "manual-token" | "cli-session" | "browser-oauth";
|
|
25
|
+
status: "connected" | "expired" | "invalid" | "unavailable";
|
|
26
|
+
account?: {
|
|
27
|
+
id?: string;
|
|
28
|
+
label?: string;
|
|
29
|
+
resources: string[];
|
|
30
|
+
};
|
|
31
|
+
capabilityIds: string[];
|
|
32
|
+
verifiedAt?: string;
|
|
33
|
+
expiresAt?: string;
|
|
34
|
+
revision: string;
|
|
35
|
+
scope: "user" | "project";
|
|
36
|
+
editable: boolean;
|
|
37
|
+
}
|
|
38
|
+
export interface LinkSnapshot {
|
|
39
|
+
providers: LinkProviderView[];
|
|
40
|
+
connections: MaskedLinkConnection[];
|
|
41
|
+
capabilities: {
|
|
42
|
+
token: boolean;
|
|
43
|
+
cliBinding: boolean;
|
|
44
|
+
deviceAuth: boolean;
|
|
45
|
+
};
|
|
46
|
+
revision: string;
|
|
47
|
+
}
|
|
48
|
+
/** null means create-only; a string is the exact connection revision reviewed by the user. */
|
|
49
|
+
export interface LinkConnectionInput {
|
|
50
|
+
providerId: string;
|
|
51
|
+
methodId: string;
|
|
52
|
+
label: string;
|
|
53
|
+
connectionId?: string;
|
|
54
|
+
expectedRevision: string | null;
|
|
55
|
+
}
|
|
56
|
+
export interface TokenConnectionInput extends LinkConnectionInput {
|
|
57
|
+
token: string;
|
|
58
|
+
}
|
|
59
|
+
export type LinkErrorCode = "invalid_request" | "login_required" | "not_found" | "read_only" | "conflict" | "busy" | "provider_rejected" | "cli_unavailable" | "authorization_failed" | "authorization_expired" | "cancelled" | "unavailable";
|
|
60
|
+
export interface LinkAuthorization {
|
|
61
|
+
id: string;
|
|
62
|
+
providerId: string;
|
|
63
|
+
state: "pending" | "connected" | "failed" | "cancelled";
|
|
64
|
+
prompt?: {
|
|
65
|
+
userCode: string;
|
|
66
|
+
verificationUri: string;
|
|
67
|
+
verificationUriComplete?: string;
|
|
68
|
+
expiresAt: string;
|
|
69
|
+
};
|
|
70
|
+
connection?: MaskedLinkConnection;
|
|
71
|
+
errorCode?: LinkErrorCode;
|
|
72
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|