@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.
- package/LICENSE +21 -0
- package/README.md +39 -0
- package/dist/ITeamHubClient.d.ts +261 -0
- package/dist/ITeamHubClient.d.ts.map +1 -0
- package/dist/ITeamHubClient.js +1 -0
- package/dist/TeamHubClient.d.ts +333 -0
- package/dist/TeamHubClient.d.ts.map +1 -0
- package/dist/TeamHubClient.js +665 -0
- package/dist/TeamHubClientError.d.ts +29 -0
- package/dist/TeamHubClientError.d.ts.map +1 -0
- package/dist/TeamHubClientError.js +30 -0
- package/dist/appTypes.d.ts +209 -0
- package/dist/appTypes.d.ts.map +1 -0
- package/dist/appTypes.js +74 -0
- package/dist/auth.d.ts +41 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +25 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/isTeamHubCollectionDeleteForbiddenError.d.ts +7 -0
- package/dist/isTeamHubCollectionDeleteForbiddenError.d.ts.map +1 -0
- package/dist/isTeamHubCollectionDeleteForbiddenError.js +12 -0
- package/dist/schemas.d.ts +630 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +353 -0
- package/dist/types.d.ts +717 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -0
- package/package.json +78 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,717 @@
|
|
|
1
|
+
import type { BodyType, HttpMethod, HubLlmModel, KeyValue, Variable } from './appTypes.js';
|
|
2
|
+
import type { TeamHubAuthConfig } from './auth.js';
|
|
3
|
+
/**
|
|
4
|
+
* Response body from `GET /plugins/sources`.
|
|
5
|
+
*/
|
|
6
|
+
export interface PluginSourcesResponse {
|
|
7
|
+
/**
|
|
8
|
+
* Plugin marketplace catalog JSON URLs configured on the Team Hub.
|
|
9
|
+
*/
|
|
10
|
+
catalogs: string[];
|
|
11
|
+
/**
|
|
12
|
+
* Trusted publisher signing-key registry JSON URLs configured on the Team Hub.
|
|
13
|
+
*/
|
|
14
|
+
trusted: string[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Connection settings for {@link TeamHubClient}.
|
|
18
|
+
*/
|
|
19
|
+
export interface TeamHubClientConfig {
|
|
20
|
+
/**
|
|
21
|
+
* HarborClient Server base URL (for example `http://127.0.0.1:8788`).
|
|
22
|
+
*/
|
|
23
|
+
baseUrl: string;
|
|
24
|
+
/**
|
|
25
|
+
* Bearer token prefixed with `hbk_` for protected routes.
|
|
26
|
+
*/
|
|
27
|
+
token: string;
|
|
28
|
+
/**
|
|
29
|
+
* Request timeout in milliseconds; defaults to 30 seconds when omitted.
|
|
30
|
+
*/
|
|
31
|
+
requestTimeoutMs?: number;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Response body from `GET /health`.
|
|
35
|
+
*/
|
|
36
|
+
export interface HealthResponse {
|
|
37
|
+
/**
|
|
38
|
+
* Fixed status literal reported by the server.
|
|
39
|
+
*/
|
|
40
|
+
status: 'ok';
|
|
41
|
+
/**
|
|
42
|
+
* HarborClient Server application version string.
|
|
43
|
+
*/
|
|
44
|
+
version: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Team Hub account role returned by session introspection.
|
|
48
|
+
*/
|
|
49
|
+
export type HubUserRole = 'admin' | 'user';
|
|
50
|
+
/**
|
|
51
|
+
* Capability flags derived from the authenticated Team Hub user account.
|
|
52
|
+
*/
|
|
53
|
+
export interface SessionCapabilities {
|
|
54
|
+
/**
|
|
55
|
+
* When true, the token may call entity data routes.
|
|
56
|
+
*/
|
|
57
|
+
dataApi: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* When true, the token may call management routes.
|
|
60
|
+
*/
|
|
61
|
+
managementApi: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* When true, the token may call hub-proxied LLM routes.
|
|
64
|
+
*/
|
|
65
|
+
llm: boolean;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Response body from `GET /auth/session`.
|
|
69
|
+
*/
|
|
70
|
+
export interface SessionResponse {
|
|
71
|
+
/**
|
|
72
|
+
* User account owning the authenticated bearer token.
|
|
73
|
+
*/
|
|
74
|
+
user: {
|
|
75
|
+
/**
|
|
76
|
+
* Stable user account identifier.
|
|
77
|
+
*/
|
|
78
|
+
id: string;
|
|
79
|
+
/**
|
|
80
|
+
* Unique display name for the account.
|
|
81
|
+
*/
|
|
82
|
+
name: string;
|
|
83
|
+
/**
|
|
84
|
+
* Account role determining API capabilities.
|
|
85
|
+
*/
|
|
86
|
+
role: HubUserRole;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Metadata for the API token used to authenticate the request.
|
|
90
|
+
*/
|
|
91
|
+
token: {
|
|
92
|
+
/**
|
|
93
|
+
* Stable token record identifier.
|
|
94
|
+
*/
|
|
95
|
+
id: string;
|
|
96
|
+
/**
|
|
97
|
+
* Non-secret prefix shown in operator listings.
|
|
98
|
+
*/
|
|
99
|
+
prefix: string;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* Derived capability flags for clients such as HarborClient.
|
|
103
|
+
*/
|
|
104
|
+
capabilities: SessionCapabilities;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Team Hub user account returned by management routes.
|
|
108
|
+
*/
|
|
109
|
+
export interface HubUserRecord {
|
|
110
|
+
/**
|
|
111
|
+
* Stable user account identifier.
|
|
112
|
+
*/
|
|
113
|
+
id: string;
|
|
114
|
+
/**
|
|
115
|
+
* Unique display name for the account.
|
|
116
|
+
*/
|
|
117
|
+
name: string;
|
|
118
|
+
/**
|
|
119
|
+
* Account role determining API capabilities.
|
|
120
|
+
*/
|
|
121
|
+
role: HubUserRole;
|
|
122
|
+
/**
|
|
123
|
+
* Collection ids the user may access, or `['*']` for all collections.
|
|
124
|
+
*/
|
|
125
|
+
collectionAccess: string[];
|
|
126
|
+
/**
|
|
127
|
+
* Environment ids the user may access, or `['*']` for all environments.
|
|
128
|
+
*/
|
|
129
|
+
environmentAccess: string[];
|
|
130
|
+
/**
|
|
131
|
+
* When true, the user may call hub-proxied LLM routes.
|
|
132
|
+
*/
|
|
133
|
+
llmAccess: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* LLM model ids the user may use, or `['*']` for all hub-offered models.
|
|
136
|
+
*/
|
|
137
|
+
llmModels: string[];
|
|
138
|
+
/**
|
|
139
|
+
* Maximum total tokens per UTC calendar month, or null for unlimited.
|
|
140
|
+
*/
|
|
141
|
+
llmMonthlyTokenLimit: number | null;
|
|
142
|
+
/**
|
|
143
|
+
* ISO 8601 timestamp when the account was created.
|
|
144
|
+
*/
|
|
145
|
+
createdAt: string;
|
|
146
|
+
/**
|
|
147
|
+
* ISO 8601 timestamp when the account was last updated.
|
|
148
|
+
*/
|
|
149
|
+
updatedAt: string;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Lightweight id/name record returned by admin list routes for autocomplete.
|
|
153
|
+
*/
|
|
154
|
+
export interface AdminResourceOption {
|
|
155
|
+
/**
|
|
156
|
+
* Stable resource identifier stored in access lists.
|
|
157
|
+
*/
|
|
158
|
+
id: string;
|
|
159
|
+
/**
|
|
160
|
+
* Human-readable label shown in autocomplete suggestions.
|
|
161
|
+
*/
|
|
162
|
+
name: string;
|
|
163
|
+
/**
|
|
164
|
+
* When true, non-admin users cannot delete this resource on the hub.
|
|
165
|
+
*/
|
|
166
|
+
deletionLocked: boolean;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Admin configuration returned by entity configuration routes.
|
|
170
|
+
*/
|
|
171
|
+
export interface AdminEntityConfig {
|
|
172
|
+
/**
|
|
173
|
+
* Stable resource identifier.
|
|
174
|
+
*/
|
|
175
|
+
id: string;
|
|
176
|
+
/**
|
|
177
|
+
* Human-readable label.
|
|
178
|
+
*/
|
|
179
|
+
name: string;
|
|
180
|
+
/**
|
|
181
|
+
* When true, non-admin users cannot delete this resource on the hub.
|
|
182
|
+
*/
|
|
183
|
+
deletionLocked: boolean;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Collection, environment, and LLM model options for admin user management forms.
|
|
187
|
+
*/
|
|
188
|
+
export interface TeamHubAdminResourceOptions {
|
|
189
|
+
/**
|
|
190
|
+
* All hub collections available when assigning collection access.
|
|
191
|
+
*/
|
|
192
|
+
collections: AdminResourceOption[];
|
|
193
|
+
/**
|
|
194
|
+
* All hub environments available when assigning environment access.
|
|
195
|
+
*/
|
|
196
|
+
environments: AdminResourceOption[];
|
|
197
|
+
/**
|
|
198
|
+
* All hub-offered LLM models available when assigning model access.
|
|
199
|
+
*/
|
|
200
|
+
models: HubLlmModel[];
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Config section name reported by `POST /admin/config/reload`.
|
|
204
|
+
*/
|
|
205
|
+
export type ReloadConfigSectionName = 'db' | 'redis' | 'llm' | 'plugins' | 'server';
|
|
206
|
+
/**
|
|
207
|
+
* Outcome for a single config section during reload.
|
|
208
|
+
*/
|
|
209
|
+
export type ReloadConfigSectionStatus = 'reloaded' | 'unchanged' | 'failed' | 'restart-required';
|
|
210
|
+
/**
|
|
211
|
+
* Per-section reload outcome from `POST /admin/config/reload`.
|
|
212
|
+
*/
|
|
213
|
+
export interface ReloadConfigSectionResult {
|
|
214
|
+
/**
|
|
215
|
+
* Config section that was evaluated.
|
|
216
|
+
*/
|
|
217
|
+
section: ReloadConfigSectionName;
|
|
218
|
+
/**
|
|
219
|
+
* Whether the section was applied, skipped, failed, or needs a process restart.
|
|
220
|
+
*/
|
|
221
|
+
status: ReloadConfigSectionStatus;
|
|
222
|
+
/**
|
|
223
|
+
* Human-readable error when status is `failed` or `restart-required`.
|
|
224
|
+
*/
|
|
225
|
+
error?: string;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Response body from `POST /admin/config/reload`.
|
|
229
|
+
*/
|
|
230
|
+
export interface ReloadConfigResponse {
|
|
231
|
+
/**
|
|
232
|
+
* Per-section reload outcomes when the config file parsed successfully.
|
|
233
|
+
*/
|
|
234
|
+
sections: ReloadConfigSectionResult[];
|
|
235
|
+
/**
|
|
236
|
+
* When set, the config file could not be read or parsed; no sections were changed.
|
|
237
|
+
*/
|
|
238
|
+
fatalError?: string;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Partial fields accepted when updating a Team Hub user via management routes.
|
|
242
|
+
*/
|
|
243
|
+
export interface UpdateHubUserInput {
|
|
244
|
+
/**
|
|
245
|
+
* New unique display name, when changing the account label.
|
|
246
|
+
*/
|
|
247
|
+
name?: string;
|
|
248
|
+
/**
|
|
249
|
+
* New role, when changing account capabilities.
|
|
250
|
+
*/
|
|
251
|
+
role?: HubUserRole;
|
|
252
|
+
/**
|
|
253
|
+
* Replacement collection access list.
|
|
254
|
+
*/
|
|
255
|
+
collectionAccess?: string[];
|
|
256
|
+
/**
|
|
257
|
+
* Replacement environment access list.
|
|
258
|
+
*/
|
|
259
|
+
environmentAccess?: string[];
|
|
260
|
+
/**
|
|
261
|
+
* Whether the user may use hub-proxied LLM routes.
|
|
262
|
+
*/
|
|
263
|
+
llmAccess?: boolean;
|
|
264
|
+
/**
|
|
265
|
+
* Replacement LLM model access list.
|
|
266
|
+
*/
|
|
267
|
+
llmModels?: string[];
|
|
268
|
+
/**
|
|
269
|
+
* Replacement monthly token limit, or null for unlimited.
|
|
270
|
+
*/
|
|
271
|
+
llmMonthlyTokenLimit?: number | null;
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Fields required to create a Team Hub user via management routes.
|
|
275
|
+
*/
|
|
276
|
+
export interface CreateHubUserInput {
|
|
277
|
+
/**
|
|
278
|
+
* Unique display name for the new account.
|
|
279
|
+
*/
|
|
280
|
+
name: string;
|
|
281
|
+
/**
|
|
282
|
+
* Role assigned to the new account.
|
|
283
|
+
*/
|
|
284
|
+
role: HubUserRole;
|
|
285
|
+
/**
|
|
286
|
+
* Collection access list; admins store an empty array.
|
|
287
|
+
*/
|
|
288
|
+
collectionAccess?: string[];
|
|
289
|
+
/**
|
|
290
|
+
* Environment access list; admins store an empty array.
|
|
291
|
+
*/
|
|
292
|
+
environmentAccess?: string[];
|
|
293
|
+
/**
|
|
294
|
+
* Whether the user may use hub-proxied LLM routes.
|
|
295
|
+
*/
|
|
296
|
+
llmAccess?: boolean;
|
|
297
|
+
/**
|
|
298
|
+
* Allowed LLM model ids, or `['*']` for all hub-offered models.
|
|
299
|
+
*/
|
|
300
|
+
llmModels?: string[];
|
|
301
|
+
/**
|
|
302
|
+
* Monthly token limit, or null for unlimited.
|
|
303
|
+
*/
|
|
304
|
+
llmMonthlyTokenLimit?: number | null;
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* API token metadata returned by admin token routes.
|
|
308
|
+
*/
|
|
309
|
+
export interface HubApiTokenRecord {
|
|
310
|
+
/**
|
|
311
|
+
* Stable token record identifier.
|
|
312
|
+
*/
|
|
313
|
+
id: string;
|
|
314
|
+
/**
|
|
315
|
+
* Owning user account identifier.
|
|
316
|
+
*/
|
|
317
|
+
userId: string;
|
|
318
|
+
/**
|
|
319
|
+
* Human-readable label chosen when the token was created.
|
|
320
|
+
*/
|
|
321
|
+
name: string;
|
|
322
|
+
/**
|
|
323
|
+
* Non-secret prefix shown in operator listings.
|
|
324
|
+
*/
|
|
325
|
+
tokenPrefix: string;
|
|
326
|
+
/**
|
|
327
|
+
* ISO 8601 timestamp when the token was created.
|
|
328
|
+
*/
|
|
329
|
+
createdAt: string;
|
|
330
|
+
/**
|
|
331
|
+
* ISO 8601 timestamp when the token was last used, if ever.
|
|
332
|
+
*/
|
|
333
|
+
lastUsedAt: string | null;
|
|
334
|
+
/**
|
|
335
|
+
* ISO 8601 timestamp when the token was revoked; null when active.
|
|
336
|
+
*/
|
|
337
|
+
revokedAt: string | null;
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Response from creating a user account and initial API token.
|
|
341
|
+
*/
|
|
342
|
+
export interface CreatedHubUser {
|
|
343
|
+
/**
|
|
344
|
+
* Newly created user account.
|
|
345
|
+
*/
|
|
346
|
+
user: HubUserRecord;
|
|
347
|
+
/**
|
|
348
|
+
* Metadata for the initial bearer token.
|
|
349
|
+
*/
|
|
350
|
+
token: HubApiTokenRecord;
|
|
351
|
+
/**
|
|
352
|
+
* One-time plaintext bearer token secret.
|
|
353
|
+
*/
|
|
354
|
+
secret: string;
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* Request body for creating an additional API token for a user.
|
|
358
|
+
*/
|
|
359
|
+
export interface CreateHubTokenInput {
|
|
360
|
+
/**
|
|
361
|
+
* Human-readable label for the new token.
|
|
362
|
+
*/
|
|
363
|
+
name: string;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Response from creating an additional API bearer token.
|
|
367
|
+
*/
|
|
368
|
+
export interface CreatedHubToken {
|
|
369
|
+
/**
|
|
370
|
+
* Metadata for the newly created bearer token.
|
|
371
|
+
*/
|
|
372
|
+
token: HubApiTokenRecord;
|
|
373
|
+
/**
|
|
374
|
+
* One-time plaintext bearer token secret.
|
|
375
|
+
*/
|
|
376
|
+
secret: string;
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Collection record returned by HarborClient Server entity routes.
|
|
380
|
+
*/
|
|
381
|
+
export interface CollectionRecord {
|
|
382
|
+
/**
|
|
383
|
+
* Collection UUID.
|
|
384
|
+
*/
|
|
385
|
+
id: string;
|
|
386
|
+
/**
|
|
387
|
+
* Display name shown in the sidebar.
|
|
388
|
+
*/
|
|
389
|
+
name: string;
|
|
390
|
+
/**
|
|
391
|
+
* Collection-scoped variables for `{{key}}` substitution.
|
|
392
|
+
*/
|
|
393
|
+
variables: Variable[];
|
|
394
|
+
/**
|
|
395
|
+
* Default headers applied to requests in this collection.
|
|
396
|
+
*/
|
|
397
|
+
headers: KeyValue[];
|
|
398
|
+
/**
|
|
399
|
+
* Default authorization settings for requests in this collection.
|
|
400
|
+
*/
|
|
401
|
+
auth: TeamHubAuthConfig;
|
|
402
|
+
/**
|
|
403
|
+
* JavaScript run before each request in this collection.
|
|
404
|
+
*/
|
|
405
|
+
preRequestScript: string;
|
|
406
|
+
/**
|
|
407
|
+
* JavaScript run after each request in this collection.
|
|
408
|
+
*/
|
|
409
|
+
postRequestScript: string;
|
|
410
|
+
/**
|
|
411
|
+
* ISO 8601 timestamp when the collection was created.
|
|
412
|
+
*/
|
|
413
|
+
createdAt: string;
|
|
414
|
+
/**
|
|
415
|
+
* When true, non-admin users cannot delete this collection on the hub.
|
|
416
|
+
*/
|
|
417
|
+
deletionLocked: boolean;
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Request body for `POST /collections`.
|
|
421
|
+
*/
|
|
422
|
+
export interface CreateCollectionInput {
|
|
423
|
+
/**
|
|
424
|
+
* Display name for the new collection.
|
|
425
|
+
*/
|
|
426
|
+
name: string;
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* Request body for `PUT /collections/:id`.
|
|
430
|
+
*/
|
|
431
|
+
export interface UpdateCollectionInput {
|
|
432
|
+
/**
|
|
433
|
+
* Updated display name.
|
|
434
|
+
*/
|
|
435
|
+
name: string;
|
|
436
|
+
/**
|
|
437
|
+
* Collection-scoped variables.
|
|
438
|
+
*/
|
|
439
|
+
variables: Variable[];
|
|
440
|
+
/**
|
|
441
|
+
* Default headers for requests in this collection.
|
|
442
|
+
*/
|
|
443
|
+
headers: KeyValue[];
|
|
444
|
+
/**
|
|
445
|
+
* Pre-request script source.
|
|
446
|
+
*/
|
|
447
|
+
preRequestScript: string;
|
|
448
|
+
/**
|
|
449
|
+
* Post-request script source.
|
|
450
|
+
*/
|
|
451
|
+
postRequestScript: string;
|
|
452
|
+
/**
|
|
453
|
+
* Default authorization settings.
|
|
454
|
+
*/
|
|
455
|
+
auth: TeamHubAuthConfig;
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* Environment record returned by HarborClient Server entity routes.
|
|
459
|
+
*/
|
|
460
|
+
export interface EnvironmentRecord {
|
|
461
|
+
/**
|
|
462
|
+
* Environment UUID.
|
|
463
|
+
*/
|
|
464
|
+
id: string;
|
|
465
|
+
/**
|
|
466
|
+
* Display name shown in the environment picker.
|
|
467
|
+
*/
|
|
468
|
+
name: string;
|
|
469
|
+
/**
|
|
470
|
+
* Environment-scoped variables.
|
|
471
|
+
*/
|
|
472
|
+
variables: Variable[];
|
|
473
|
+
/**
|
|
474
|
+
* ISO 8601 timestamp when the environment was created.
|
|
475
|
+
*/
|
|
476
|
+
createdAt: string;
|
|
477
|
+
/**
|
|
478
|
+
* When true, non-admin users cannot delete this environment on the hub.
|
|
479
|
+
*/
|
|
480
|
+
deletionLocked: boolean;
|
|
481
|
+
}
|
|
482
|
+
/**
|
|
483
|
+
* Request body for `POST /environments`.
|
|
484
|
+
*/
|
|
485
|
+
export interface CreateEnvironmentInput {
|
|
486
|
+
/**
|
|
487
|
+
* Display name for the new environment.
|
|
488
|
+
*/
|
|
489
|
+
name: string;
|
|
490
|
+
}
|
|
491
|
+
/**
|
|
492
|
+
* Request body for `PUT /environments/:id`.
|
|
493
|
+
*/
|
|
494
|
+
export interface UpdateEnvironmentInput {
|
|
495
|
+
/**
|
|
496
|
+
* Updated display name.
|
|
497
|
+
*/
|
|
498
|
+
name: string;
|
|
499
|
+
/**
|
|
500
|
+
* Environment-scoped variables.
|
|
501
|
+
*/
|
|
502
|
+
variables: Variable[];
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* Folder record returned by HarborClient Server entity routes.
|
|
506
|
+
*/
|
|
507
|
+
export interface FolderRecord {
|
|
508
|
+
/**
|
|
509
|
+
* Folder UUID.
|
|
510
|
+
*/
|
|
511
|
+
id: string;
|
|
512
|
+
/**
|
|
513
|
+
* Parent collection UUID.
|
|
514
|
+
*/
|
|
515
|
+
collectionId: string;
|
|
516
|
+
/**
|
|
517
|
+
* Display name shown in the collection tree.
|
|
518
|
+
*/
|
|
519
|
+
name: string;
|
|
520
|
+
/**
|
|
521
|
+
* Zero-based sort order within the collection.
|
|
522
|
+
*/
|
|
523
|
+
sortOrder: number;
|
|
524
|
+
/**
|
|
525
|
+
* ISO 8601 timestamp when the folder was created.
|
|
526
|
+
*/
|
|
527
|
+
createdAt: string;
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* Request body for `POST /collections/:collectionId/folders`.
|
|
531
|
+
*/
|
|
532
|
+
export interface CreateFolderInput {
|
|
533
|
+
/**
|
|
534
|
+
* Display name for the new folder.
|
|
535
|
+
*/
|
|
536
|
+
name: string;
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* Request body for `PATCH /folders/:id`.
|
|
540
|
+
*/
|
|
541
|
+
export interface RenameFolderInput {
|
|
542
|
+
/**
|
|
543
|
+
* Updated folder display name.
|
|
544
|
+
*/
|
|
545
|
+
name: string;
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* Request body for `PUT /collections/:collectionId/folders/reorder`.
|
|
549
|
+
*/
|
|
550
|
+
export interface ReorderFoldersInput {
|
|
551
|
+
/**
|
|
552
|
+
* Folder ids in the desired display order.
|
|
553
|
+
*/
|
|
554
|
+
orderedFolderIds: string[];
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* Saved request record returned by HarborClient Server entity routes.
|
|
558
|
+
*/
|
|
559
|
+
export interface SavedRequestRecord {
|
|
560
|
+
/**
|
|
561
|
+
* Saved request UUID.
|
|
562
|
+
*/
|
|
563
|
+
id: string;
|
|
564
|
+
/**
|
|
565
|
+
* Parent collection UUID.
|
|
566
|
+
*/
|
|
567
|
+
collectionId: string;
|
|
568
|
+
/**
|
|
569
|
+
* Display name shown in the collection tree.
|
|
570
|
+
*/
|
|
571
|
+
name: string;
|
|
572
|
+
/**
|
|
573
|
+
* HTTP method for the saved request.
|
|
574
|
+
*/
|
|
575
|
+
method: HttpMethod;
|
|
576
|
+
/**
|
|
577
|
+
* Request URL template or absolute URL.
|
|
578
|
+
*/
|
|
579
|
+
url: string;
|
|
580
|
+
/**
|
|
581
|
+
* Request headers.
|
|
582
|
+
*/
|
|
583
|
+
headers: KeyValue[];
|
|
584
|
+
/**
|
|
585
|
+
* Query parameters.
|
|
586
|
+
*/
|
|
587
|
+
params: KeyValue[];
|
|
588
|
+
/**
|
|
589
|
+
* Authorization settings for this request.
|
|
590
|
+
*/
|
|
591
|
+
auth: TeamHubAuthConfig;
|
|
592
|
+
/**
|
|
593
|
+
* Request body content.
|
|
594
|
+
*/
|
|
595
|
+
body: string;
|
|
596
|
+
/**
|
|
597
|
+
* Request body content type.
|
|
598
|
+
*/
|
|
599
|
+
bodyType: BodyType;
|
|
600
|
+
/**
|
|
601
|
+
* Pre-request script source.
|
|
602
|
+
*/
|
|
603
|
+
preRequestScript: string;
|
|
604
|
+
/**
|
|
605
|
+
* Post-request script source.
|
|
606
|
+
*/
|
|
607
|
+
postRequestScript: string;
|
|
608
|
+
/**
|
|
609
|
+
* Optional user comment or description.
|
|
610
|
+
*/
|
|
611
|
+
comment: string;
|
|
612
|
+
/**
|
|
613
|
+
* Parent folder UUID, or `null` when at the collection root.
|
|
614
|
+
*/
|
|
615
|
+
folderId: string | null;
|
|
616
|
+
/**
|
|
617
|
+
* Zero-based sort order within the folder or collection root.
|
|
618
|
+
*/
|
|
619
|
+
sortOrder: number;
|
|
620
|
+
/**
|
|
621
|
+
* ISO 8601 timestamp when the request was created.
|
|
622
|
+
*/
|
|
623
|
+
createdAt: string;
|
|
624
|
+
/**
|
|
625
|
+
* ISO 8601 timestamp when the request was last updated.
|
|
626
|
+
*/
|
|
627
|
+
updatedAt: string;
|
|
628
|
+
}
|
|
629
|
+
/**
|
|
630
|
+
* Request body for `POST /collections/:collectionId/requests`.
|
|
631
|
+
*/
|
|
632
|
+
export interface CreateRequestInput {
|
|
633
|
+
/**
|
|
634
|
+
* Display name for the saved request.
|
|
635
|
+
*/
|
|
636
|
+
name: string;
|
|
637
|
+
/**
|
|
638
|
+
* HTTP method.
|
|
639
|
+
*/
|
|
640
|
+
method: HttpMethod;
|
|
641
|
+
/**
|
|
642
|
+
* Request URL.
|
|
643
|
+
*/
|
|
644
|
+
url: string;
|
|
645
|
+
/**
|
|
646
|
+
* Request headers.
|
|
647
|
+
*/
|
|
648
|
+
headers: KeyValue[];
|
|
649
|
+
/**
|
|
650
|
+
* Query parameters.
|
|
651
|
+
*/
|
|
652
|
+
params: KeyValue[];
|
|
653
|
+
/**
|
|
654
|
+
* Authorization settings.
|
|
655
|
+
*/
|
|
656
|
+
auth: TeamHubAuthConfig;
|
|
657
|
+
/**
|
|
658
|
+
* Request body content.
|
|
659
|
+
*/
|
|
660
|
+
body: string;
|
|
661
|
+
/**
|
|
662
|
+
* Request body content type.
|
|
663
|
+
*/
|
|
664
|
+
bodyType: BodyType;
|
|
665
|
+
/**
|
|
666
|
+
* Pre-request script source.
|
|
667
|
+
*/
|
|
668
|
+
preRequestScript: string;
|
|
669
|
+
/**
|
|
670
|
+
* Post-request script source.
|
|
671
|
+
*/
|
|
672
|
+
postRequestScript: string;
|
|
673
|
+
/**
|
|
674
|
+
* Optional user comment.
|
|
675
|
+
*/
|
|
676
|
+
comment: string;
|
|
677
|
+
/**
|
|
678
|
+
* Parent folder UUID, or omitted/`null` for the collection root.
|
|
679
|
+
*/
|
|
680
|
+
folderId?: string | null;
|
|
681
|
+
}
|
|
682
|
+
/**
|
|
683
|
+
* Request body for `PUT /requests/:id`.
|
|
684
|
+
*/
|
|
685
|
+
export interface UpdateRequestInput extends CreateRequestInput {
|
|
686
|
+
/**
|
|
687
|
+
* Parent collection UUID (required on update).
|
|
688
|
+
*/
|
|
689
|
+
collectionId: string;
|
|
690
|
+
}
|
|
691
|
+
/**
|
|
692
|
+
* Request body for `PUT /collections/:collectionId/requests/reorder`.
|
|
693
|
+
*/
|
|
694
|
+
export interface ReorderRequestsInput {
|
|
695
|
+
/**
|
|
696
|
+
* Folder UUID, or `null` to reorder requests at the collection root.
|
|
697
|
+
*/
|
|
698
|
+
folderId: string | null;
|
|
699
|
+
/**
|
|
700
|
+
* Request ids in the desired display order.
|
|
701
|
+
*/
|
|
702
|
+
orderedRequestIds: string[];
|
|
703
|
+
}
|
|
704
|
+
/**
|
|
705
|
+
* Request body for `PUT /requests/:id/move`.
|
|
706
|
+
*/
|
|
707
|
+
export interface MoveRequestInput {
|
|
708
|
+
/**
|
|
709
|
+
* Destination folder UUID, or `null` for the collection root.
|
|
710
|
+
*/
|
|
711
|
+
folderId: string | null;
|
|
712
|
+
/**
|
|
713
|
+
* Zero-based index within the destination folder or root.
|
|
714
|
+
*/
|
|
715
|
+
index: number;
|
|
716
|
+
}
|
|
717
|
+
//# sourceMappingURL=types.d.ts.map
|