@adobe/spacecat-shared-project-engine-client 1.16.0 → 1.17.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/package.json +1 -1
- package/src/index.d.ts +41 -1
- package/src/rest-transport.js +29 -1
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -111,7 +111,7 @@ type TransportData<P extends keyof paths, M extends keyof paths[P]> =
|
|
|
111
111
|
| null;
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
|
-
* Intent-named facade over {@link SerenityProjectEngineApiClient}. Wraps the
|
|
114
|
+
* Intent-named facade over {@link SerenityProjectEngineApiClient}. Wraps the 32 in-spec
|
|
115
115
|
* Project Engine operations spacecat-api-service consumes behind verb+resource methods, so
|
|
116
116
|
* consumers depend on this seam rather than the raw client's literal path strings. Each method
|
|
117
117
|
* is THIN: it forwards the caller's openapi-fetch `init` to the underlying client and resolves
|
|
@@ -324,6 +324,46 @@ export interface SerenityProjectEngineTransport {
|
|
|
324
324
|
): Promise<
|
|
325
325
|
TransportData<'/v2/workspaces/{id}/projects/{project_id}/aio/prompts/{prompt_id}/rename', 'post'>
|
|
326
326
|
>;
|
|
327
|
+
/**
|
|
328
|
+
* POST /v3/workspaces/{id}/projects/{project_id}/aio/prompts — aio-create-prompts
|
|
329
|
+
* (metadata-carrying create, LLMO-6289)
|
|
330
|
+
*/
|
|
331
|
+
createPromptsWithMetadata(
|
|
332
|
+
...init: TransportInitParam<
|
|
333
|
+
TransportInit<'/v3/workspaces/{id}/projects/{project_id}/aio/prompts', 'post'>
|
|
334
|
+
>
|
|
335
|
+
): Promise<TransportData<'/v3/workspaces/{id}/projects/{project_id}/aio/prompts', 'post'>>;
|
|
336
|
+
/**
|
|
337
|
+
* PATCH /v3/workspaces/{id}/projects/{project_id}/aio/prompts/{prompt_id}
|
|
338
|
+
* — aio-patch-prompt (combined name + metadata merge-patch, LLMO-6289)
|
|
339
|
+
*/
|
|
340
|
+
patchPrompt(
|
|
341
|
+
...init: TransportInitParam<
|
|
342
|
+
TransportInit<'/v3/workspaces/{id}/projects/{project_id}/aio/prompts/{prompt_id}', 'patch'>
|
|
343
|
+
>
|
|
344
|
+
): Promise<
|
|
345
|
+
TransportData<'/v3/workspaces/{id}/projects/{project_id}/aio/prompts/{prompt_id}', 'patch'>
|
|
346
|
+
>;
|
|
347
|
+
/**
|
|
348
|
+
* PATCH /v3/workspaces/{id}/projects/{project_id}/aio/prompts/{prompt_id}/metadata
|
|
349
|
+
* — aio-patch-prompt-metadata (metadata-only merge-patch, LLMO-6289)
|
|
350
|
+
*/
|
|
351
|
+
patchPromptMetadata(
|
|
352
|
+
...init: TransportInitParam<
|
|
353
|
+
TransportInit<'/v3/workspaces/{id}/projects/{project_id}/aio/prompts/{prompt_id}/metadata', 'patch'>
|
|
354
|
+
>
|
|
355
|
+
): Promise<
|
|
356
|
+
TransportData<'/v3/workspaces/{id}/projects/{project_id}/aio/prompts/{prompt_id}/metadata', 'patch'>
|
|
357
|
+
>;
|
|
358
|
+
/**
|
|
359
|
+
* PATCH /v3/workspaces/{id}/projects/{project_id}/aio/prompts/metadata
|
|
360
|
+
* — aio-patch-prompts-metadata-batch (atomic batch metadata merge-patch, LLMO-6289)
|
|
361
|
+
*/
|
|
362
|
+
patchPromptsMetadataBatch(
|
|
363
|
+
...init: TransportInitParam<
|
|
364
|
+
TransportInit<'/v3/workspaces/{id}/projects/{project_id}/aio/prompts/metadata', 'patch'>
|
|
365
|
+
>
|
|
366
|
+
): Promise<TransportData<'/v3/workspaces/{id}/projects/{project_id}/aio/prompts/metadata', 'patch'>>;
|
|
327
367
|
/** GET /v2/workspaces/{id}/projects/{project_id}/aio/tags — aio-get-project-tags */
|
|
328
368
|
listProjectTags(
|
|
329
369
|
...init: TransportInitParam<
|
package/src/rest-transport.js
CHANGED
|
@@ -22,7 +22,7 @@ import { ProjectEngineApiError } from './errors.js';
|
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Intent-named facade over the raw {@link createSerenityProjectEngineApiClient} openapi-fetch
|
|
25
|
-
* client. It wraps ONLY the
|
|
25
|
+
* client. It wraps ONLY the 32 in-spec Project Engine operations that spacecat-api-service
|
|
26
26
|
* consumes, behind verb+resource method names, so consumers depend on this seam rather than the
|
|
27
27
|
* raw client and its literal path strings. Each method is THIN: it forwards the caller's
|
|
28
28
|
* openapi-fetch `init` (params.path/query, body) to `client.<METHOD>('<literal path>', init)` and
|
|
@@ -222,6 +222,34 @@ export function createSerenityProjectEngineTransport(options) {
|
|
|
222
222
|
renamePrompt(init) {
|
|
223
223
|
return unwrap('POST', client.POST('/v2/workspaces/{id}/projects/{project_id}/aio/prompts/{prompt_id}/rename', init));
|
|
224
224
|
},
|
|
225
|
+
/**
|
|
226
|
+
* POST /v3/workspaces/{id}/projects/{project_id}/aio/prompts — aio-create-prompts
|
|
227
|
+
* (metadata-carrying create; each item is `{ name, metadata }`, LLMO-6289)
|
|
228
|
+
*/
|
|
229
|
+
createPromptsWithMetadata(init) {
|
|
230
|
+
return unwrap('POST', client.POST('/v3/workspaces/{id}/projects/{project_id}/aio/prompts', init));
|
|
231
|
+
},
|
|
232
|
+
/**
|
|
233
|
+
* PATCH /v3/workspaces/{id}/projects/{project_id}/aio/prompts/{prompt_id}
|
|
234
|
+
* — aio-patch-prompt (combined name + metadata merge-patch, RFC 7396, LLMO-6289)
|
|
235
|
+
*/
|
|
236
|
+
patchPrompt(init) {
|
|
237
|
+
return unwrap('PATCH', client.PATCH('/v3/workspaces/{id}/projects/{project_id}/aio/prompts/{prompt_id}', init));
|
|
238
|
+
},
|
|
239
|
+
/**
|
|
240
|
+
* PATCH /v3/workspaces/{id}/projects/{project_id}/aio/prompts/{prompt_id}/metadata
|
|
241
|
+
* — aio-patch-prompt-metadata (metadata-only merge-patch, RFC 7396, LLMO-6289)
|
|
242
|
+
*/
|
|
243
|
+
patchPromptMetadata(init) {
|
|
244
|
+
return unwrap('PATCH', client.PATCH('/v3/workspaces/{id}/projects/{project_id}/aio/prompts/{prompt_id}/metadata', init));
|
|
245
|
+
},
|
|
246
|
+
/**
|
|
247
|
+
* PATCH /v3/workspaces/{id}/projects/{project_id}/aio/prompts/metadata
|
|
248
|
+
* — aio-patch-prompts-metadata-batch (atomic batch metadata merge-patch, LLMO-6289)
|
|
249
|
+
*/
|
|
250
|
+
patchPromptsMetadataBatch(init) {
|
|
251
|
+
return unwrap('PATCH', client.PATCH('/v3/workspaces/{id}/projects/{project_id}/aio/prompts/metadata', init));
|
|
252
|
+
},
|
|
225
253
|
/** GET /v2/workspaces/{id}/projects/{project_id}/aio/tags — aio-get-project-tags */
|
|
226
254
|
listProjectTags(init) {
|
|
227
255
|
return unwrap('GET', client.GET('/v2/workspaces/{id}/projects/{project_id}/aio/tags', init));
|