@harborclient/team-hub-api 0.1.1

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.
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Thrown when a HarborClient Server request fails or the response body is invalid.
3
+ */
4
+ export class TeamHubClientError extends Error {
5
+ /**
6
+ * HTTP status code from the server, or `0` for network and parse failures.
7
+ */
8
+ status;
9
+ /**
10
+ * HTTP method used for the failed request.
11
+ */
12
+ method;
13
+ /**
14
+ * Request path relative to the configured base URL.
15
+ */
16
+ path;
17
+ /**
18
+ * Creates a team hub client error with request context for logging and UI display.
19
+ *
20
+ * @param message - Human-readable error description.
21
+ * @param options - HTTP status and request metadata.
22
+ */
23
+ constructor(message, options) {
24
+ super(message);
25
+ this.name = 'TeamHubClientError';
26
+ this.status = options.status;
27
+ this.method = options.method;
28
+ this.path = options.path;
29
+ }
30
+ }
@@ -0,0 +1,209 @@
1
+ /**
2
+ * Supported HTTP methods for saved and live requests.
3
+ */
4
+ export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS';
5
+ /**
6
+ * Request body content type.
7
+ */
8
+ export type BodyType = 'none' | 'json' | 'text' | 'multipart' | 'urlencoded';
9
+ /**
10
+ * A key-value pair with an enable toggle for headers and query params.
11
+ */
12
+ export interface KeyValue {
13
+ /**
14
+ * Header or query parameter name.
15
+ */
16
+ key: string;
17
+ /**
18
+ * Header or query parameter value.
19
+ */
20
+ value: string;
21
+ /**
22
+ * When false, the pair is ignored when building the request.
23
+ */
24
+ enabled: boolean;
25
+ }
26
+ /**
27
+ * A collection-scoped variable for use in request URLs via {{key}} syntax.
28
+ */
29
+ export interface Variable {
30
+ /**
31
+ * Variable name referenced in {{key}} placeholders.
32
+ */
33
+ key: string;
34
+ /**
35
+ * Value substituted when the variable is resolved.
36
+ */
37
+ value: string;
38
+ /**
39
+ * Fallback value used when value is empty.
40
+ */
41
+ defaultValue: string;
42
+ /**
43
+ * When true, value is included in collection exports.
44
+ */
45
+ share: boolean;
46
+ }
47
+ /**
48
+ * Supported LLM providers for the OpenAI SDK compatibility layer.
49
+ */
50
+ export type LlmProvider = 'openai' | 'claude' | 'gemini';
51
+ /**
52
+ * Role of a message in an LLM completion step (includes tool roles).
53
+ */
54
+ export type ChatStepMessageRole = 'system' | 'user' | 'assistant' | 'tool';
55
+ /**
56
+ * Serializable tool call returned from a completion step.
57
+ */
58
+ export interface ChatToolCall {
59
+ /**
60
+ * Tool call id from the model.
61
+ */
62
+ id: string;
63
+ /**
64
+ * Tool function name.
65
+ */
66
+ name: string;
67
+ /**
68
+ * JSON-encoded tool arguments.
69
+ */
70
+ arguments: string;
71
+ }
72
+ /**
73
+ * Serializable message passed to a single LLM completion step.
74
+ */
75
+ export interface ChatStepMessage {
76
+ /**
77
+ * OpenAI-compatible message role.
78
+ */
79
+ role: ChatStepMessageRole;
80
+ /**
81
+ * Text content for user, assistant, tool, or system messages.
82
+ */
83
+ content?: string | null;
84
+ /**
85
+ * Tool calls requested by the assistant.
86
+ */
87
+ tool_calls?: ChatToolCall[];
88
+ /**
89
+ * Tool call id this tool message responds to.
90
+ */
91
+ tool_call_id?: string;
92
+ /**
93
+ * Tool name for tool role messages (optional).
94
+ */
95
+ name?: string;
96
+ }
97
+ /**
98
+ * One LLM model offered by a Team Hub.
99
+ */
100
+ export interface HubLlmModel {
101
+ /**
102
+ * Provider-specific model id.
103
+ */
104
+ id: string;
105
+ /**
106
+ * Human-readable label from the hub.
107
+ */
108
+ label: string;
109
+ /**
110
+ * LLM provider that owns this model.
111
+ */
112
+ provider: LlmProvider;
113
+ }
114
+ /**
115
+ * Result of one LLM completion step.
116
+ */
117
+ export interface ChatStepResult {
118
+ /**
119
+ * Assistant text when the model finishes without tool calls.
120
+ */
121
+ content: string | null;
122
+ /**
123
+ * Tool calls to execute in the renderer when present.
124
+ */
125
+ toolCalls?: ChatToolCall[];
126
+ }
127
+ /**
128
+ * Authorization type for the Auth tab; none inherits collection auth at send time.
129
+ */
130
+ export type AuthType = 'none' | 'basic' | 'bearer' | 'oauth2';
131
+ /**
132
+ * How OAuth client credentials are sent to the token endpoint.
133
+ */
134
+ export type OAuth2ClientAuth = 'body' | 'header';
135
+ /**
136
+ * OAuth 2.0 Client Credentials configuration stored on requests and collections.
137
+ */
138
+ export interface OAuth2Config {
139
+ /**
140
+ * Token endpoint URL.
141
+ */
142
+ tokenUrl: string;
143
+ /**
144
+ * OAuth client id.
145
+ */
146
+ clientId: string;
147
+ /**
148
+ * OAuth client secret.
149
+ */
150
+ clientSecret: string;
151
+ /**
152
+ * Space-delimited OAuth scopes.
153
+ */
154
+ scope: string;
155
+ /**
156
+ * Optional audience claim for token requests.
157
+ */
158
+ audience: string;
159
+ /**
160
+ * Whether client credentials are sent in the POST body or as HTTP Basic auth.
161
+ */
162
+ clientAuth: OAuth2ClientAuth;
163
+ }
164
+ /**
165
+ * Basic and bearer credential fields stored together so switching type preserves values.
166
+ */
167
+ export interface AuthConfig {
168
+ /**
169
+ * Selected auth mode; none means no request-level override.
170
+ */
171
+ type: AuthType;
172
+ /**
173
+ * Username and password for Basic Auth.
174
+ */
175
+ basic: {
176
+ username: string;
177
+ password: string;
178
+ };
179
+ /**
180
+ * Token value for Bearer Token auth.
181
+ */
182
+ bearer: {
183
+ token: string;
184
+ };
185
+ /**
186
+ * OAuth 2.0 Client Credentials settings.
187
+ */
188
+ oauth2: OAuth2Config;
189
+ }
190
+ /**
191
+ * Returns empty OAuth 2.0 Client Credentials fields.
192
+ *
193
+ * @returns Default OAuth2Config for new auth configs.
194
+ */
195
+ export declare function defaultOAuth2Config(): OAuth2Config;
196
+ /**
197
+ * Returns a default auth config with type none and empty credentials.
198
+ *
199
+ * @returns Empty AuthConfig safe for new requests and collections.
200
+ */
201
+ export declare function defaultAuth(): AuthConfig;
202
+ /**
203
+ * Normalizes a partial or legacy auth value from storage into a full AuthConfig.
204
+ *
205
+ * @param value - Parsed JSON or unknown field from the database.
206
+ * @returns Valid AuthConfig with defaults for missing fields.
207
+ */
208
+ export declare function normalizeAuth(value: unknown): AuthConfig;
209
+ //# sourceMappingURL=appTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appTypes.d.ts","sourceRoot":"","sources":["../src/appTypes.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Returns empty OAuth 2.0 Client Credentials fields.
3
+ *
4
+ * @returns Default OAuth2Config for new auth configs.
5
+ */
6
+ export function defaultOAuth2Config() {
7
+ return {
8
+ tokenUrl: '',
9
+ clientId: '',
10
+ clientSecret: '',
11
+ scope: '',
12
+ audience: '',
13
+ clientAuth: 'body'
14
+ };
15
+ }
16
+ /**
17
+ * Returns a default auth config with type none and empty credentials.
18
+ *
19
+ * @returns Empty AuthConfig safe for new requests and collections.
20
+ */
21
+ export function defaultAuth() {
22
+ return {
23
+ type: 'none',
24
+ basic: { username: '', password: '' },
25
+ bearer: { token: '' },
26
+ oauth2: defaultOAuth2Config()
27
+ };
28
+ }
29
+ /**
30
+ * Normalizes a partial or legacy auth value from storage into a full AuthConfig.
31
+ *
32
+ * @param value - Parsed JSON or unknown field from the database.
33
+ * @returns Valid AuthConfig with defaults for missing fields.
34
+ */
35
+ export function normalizeAuth(value) {
36
+ const fallback = defaultAuth();
37
+ if (value == null || typeof value !== 'object') {
38
+ return fallback;
39
+ }
40
+ const record = value;
41
+ const type = record.type === 'basic' ||
42
+ record.type === 'bearer' ||
43
+ record.type === 'oauth2' ||
44
+ record.type === 'none'
45
+ ? record.type
46
+ : fallback.type;
47
+ const basicRecord = record.basic != null && typeof record.basic === 'object'
48
+ ? record.basic
49
+ : {};
50
+ const bearerRecord = record.bearer != null && typeof record.bearer === 'object'
51
+ ? record.bearer
52
+ : {};
53
+ const oauth2Record = record.oauth2 != null && typeof record.oauth2 === 'object'
54
+ ? record.oauth2
55
+ : {};
56
+ return {
57
+ type,
58
+ basic: {
59
+ username: typeof basicRecord.username === 'string' ? basicRecord.username : '',
60
+ password: typeof basicRecord.password === 'string' ? basicRecord.password : ''
61
+ },
62
+ bearer: {
63
+ token: typeof bearerRecord.token === 'string' ? bearerRecord.token : ''
64
+ },
65
+ oauth2: {
66
+ tokenUrl: typeof oauth2Record.tokenUrl === 'string' ? oauth2Record.tokenUrl : '',
67
+ clientId: typeof oauth2Record.clientId === 'string' ? oauth2Record.clientId : '',
68
+ clientSecret: typeof oauth2Record.clientSecret === 'string' ? oauth2Record.clientSecret : '',
69
+ scope: typeof oauth2Record.scope === 'string' ? oauth2Record.scope : '',
70
+ audience: typeof oauth2Record.audience === 'string' ? oauth2Record.audience : '',
71
+ clientAuth: oauth2Record.clientAuth === 'header' ? 'header' : 'body'
72
+ }
73
+ };
74
+ }
package/dist/auth.d.ts ADDED
@@ -0,0 +1,41 @@
1
+ import { type AuthConfig } from './appTypes.js';
2
+ /**
3
+ * Authorization modes persisted by HarborClient Team Hub today.
4
+ */
5
+ export type TeamHubAuthType = 'none' | 'basic' | 'bearer';
6
+ /**
7
+ * Authorization settings shape returned by Team Hub entity routes.
8
+ *
9
+ * Team Hub does not store OAuth 2 yet; HarborClient normalizes this into a
10
+ * full {@link AuthConfig} when mapping records into local storage.
11
+ */
12
+ export interface TeamHubAuthConfig {
13
+ /**
14
+ * Selected auth mode supported by the hub API.
15
+ */
16
+ type: TeamHubAuthType;
17
+ /**
18
+ * Username and password for Basic Auth.
19
+ */
20
+ basic: {
21
+ username: string;
22
+ password: string;
23
+ };
24
+ /**
25
+ * Token value for Bearer Token auth.
26
+ */
27
+ bearer: {
28
+ token: string;
29
+ };
30
+ }
31
+ /**
32
+ * Converts local auth settings to the shape accepted by Team Hub API routes.
33
+ *
34
+ * OAuth 2 configs are downgraded to `none` because the hub does not persist
35
+ * OAuth fields yet; basic and bearer credential strings are preserved.
36
+ *
37
+ * @param auth - Auth configuration from a collection or saved request.
38
+ * @returns Auth payload safe to send to Team Hub create/update routes.
39
+ */
40
+ export declare function toTeamHubAuth(auth: AuthConfig): TeamHubAuthConfig;
41
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAE/D;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,IAAI,EAAE,eAAe,CAAC;IAEtB;;OAEG;IACH,KAAK,EAAE;QACL,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IAEF;;OAEG;IACH,MAAM,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,UAAU,GAAG,iBAAiB,CAejE"}
package/dist/auth.js ADDED
@@ -0,0 +1,25 @@
1
+ import { normalizeAuth } from './appTypes.js';
2
+ /**
3
+ * Converts local auth settings to the shape accepted by Team Hub API routes.
4
+ *
5
+ * OAuth 2 configs are downgraded to `none` because the hub does not persist
6
+ * OAuth fields yet; basic and bearer credential strings are preserved.
7
+ *
8
+ * @param auth - Auth configuration from a collection or saved request.
9
+ * @returns Auth payload safe to send to Team Hub create/update routes.
10
+ */
11
+ export function toTeamHubAuth(auth) {
12
+ const normalized = normalizeAuth(auth);
13
+ if (normalized.type === 'oauth2') {
14
+ return {
15
+ type: 'none',
16
+ basic: normalized.basic,
17
+ bearer: normalized.bearer
18
+ };
19
+ }
20
+ return {
21
+ type: normalized.type,
22
+ basic: normalized.basic,
23
+ bearer: normalized.bearer
24
+ };
25
+ }
@@ -0,0 +1,7 @@
1
+ export type { ITeamHubClient } from './ITeamHubClient.js';
2
+ export { DEFAULT_TEAM_HUB_REQUEST_TIMEOUT_MS, TeamHubClient, type HubChatStepRequest } from './TeamHubClient.js';
3
+ export { TeamHubClientError } from './TeamHubClientError.js';
4
+ export { toTeamHubAuth, type TeamHubAuthConfig, type TeamHubAuthType } from './auth.js';
5
+ export { isTeamHubCollectionDeleteForbiddenError } from './isTeamHubCollectionDeleteForbiddenError.js';
6
+ export type { AdminEntityConfig, AdminResourceOption, CollectionRecord, CreateCollectionInput, CreateEnvironmentInput, CreateFolderInput, CreateHubTokenInput, CreateHubUserInput, CreateRequestInput, CreatedHubToken, CreatedHubUser, EnvironmentRecord, FolderRecord, HealthResponse, HubApiTokenRecord, HubUserRecord, HubUserRole, MoveRequestInput, PluginSourcesResponse, RenameFolderInput, ReorderFoldersInput, ReorderRequestsInput, ReloadConfigResponse, ReloadConfigSectionResult, ReloadConfigSectionName, ReloadConfigSectionStatus, SavedRequestRecord, SessionCapabilities, SessionResponse, TeamHubAdminResourceOptions, TeamHubClientConfig, UpdateCollectionInput, UpdateEnvironmentInput, UpdateHubUserInput, UpdateRequestInput } from './types.js';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EACL,mCAAmC,EACnC,aAAa,EACb,KAAK,kBAAkB,EACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE,MAAM,WAAW,CAAC;AACxF,OAAO,EAAE,uCAAuC,EAAE,MAAM,8CAA8C,CAAC;AACvG,YAAY,EACV,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,yBAAyB,EACzB,uBAAuB,EACvB,yBAAyB,EACzB,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,2BAA2B,EAC3B,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,YAAY,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ export { DEFAULT_TEAM_HUB_REQUEST_TIMEOUT_MS, TeamHubClient } from './TeamHubClient.js';
2
+ export { TeamHubClientError } from './TeamHubClientError.js';
3
+ export { toTeamHubAuth } from './auth.js';
4
+ export { isTeamHubCollectionDeleteForbiddenError } from './isTeamHubCollectionDeleteForbiddenError.js';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Returns whether a Team Hub error indicates the caller may not delete a collection.
3
+ *
4
+ * @param err - Error thrown while deleting a hub-backed collection on the server.
5
+ */
6
+ export declare function isTeamHubCollectionDeleteForbiddenError(err: unknown): boolean;
7
+ //# sourceMappingURL=isTeamHubCollectionDeleteForbiddenError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isTeamHubCollectionDeleteForbiddenError.d.ts","sourceRoot":"","sources":["../src/isTeamHubCollectionDeleteForbiddenError.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,uCAAuC,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAO7E"}
@@ -0,0 +1,12 @@
1
+ import { TeamHubClientError } from './TeamHubClientError.js';
2
+ /**
3
+ * Returns whether a Team Hub error indicates the caller may not delete a collection.
4
+ *
5
+ * @param err - Error thrown while deleting a hub-backed collection on the server.
6
+ */
7
+ export function isTeamHubCollectionDeleteForbiddenError(err) {
8
+ return (err instanceof TeamHubClientError &&
9
+ err.status === 403 &&
10
+ err.method === 'DELETE' &&
11
+ err.path.startsWith('/collections/'));
12
+ }