@adobe/spacecat-shared-project-engine-client 1.10.0 → 1.11.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 CHANGED
@@ -46,8 +46,18 @@ version control. Semrush only provides the file (no endpoint access in the near
46
46
  it's **Swagger 2.0** (no v3/v3.1 on offer). The vendored file is **never edited**; where it
47
47
  diverges from the live API, a generation-time overlay corrects the converted artifact instead (see
48
48
  [Spec corrections](#spec-corrections)). Refresh is **manual**: drop in the newer file, re-run
49
- `npm run generate`, and review the diff. There is no automated drift detection while endpoint
50
- access is restricted.
49
+ `npm run generate`, and review the diff. A committed checksum lock
50
+ (`spec/projectengine_swagger_public.yaml.sha256`) is verified by `npm run spec:verify` (wired into
51
+ `pretest`, so CI enforces it): any re-vendor of the spec fails the build until the hash is
52
+ explicitly regenerated with `npm run spec:lock` and reviewed. A true live-drift contract test
53
+ against Semrush remains blocked on endpoint access.
54
+
55
+ Both scripts use a **package-root-relative** path and assume the working directory is this
56
+ package root — always invoke them via `npm run spec:verify` / `npm run spec:lock`, which npm
57
+ runs from the package root, rather than calling `shasum -c` by hand from the monorepo root or a
58
+ subdirectory (that yields a confusing "no such file" error). They also assume `shasum` (Perl,
59
+ present on macOS and the `ubuntu-latest` CI runner); minimal images such as Alpine ship
60
+ `sha256sum` instead and would need the scripts adjusted.
51
61
 
52
62
  ## Pipeline
53
63
 
@@ -144,6 +154,7 @@ Stateful endpoints (backed by the store):
144
154
  | `POST /v2/workspaces/{id}/projects/{project_id}/aio/prompts/tagged` | create prompts grouped by tag name |
145
155
  | `POST /v2/workspaces/{id}/projects/{project_id}/aio/prompts/by_tags` | list prompts (empty `tag_ids` lists all; otherwise OR-filter) |
146
156
  | `DELETE /v2/workspaces/{id}/projects/{project_id}/aio/prompts` | batch-delete prompts by id |
157
+ | `POST /v2/workspaces/{id}/projects/{project_id}/aio/prompts/{prompt_id}/rename` | in-place text edit (id stable; `409` on a sibling-text collision; `is_updated` mirrors the live layer) |
147
158
 
148
159
  ### Test control routes (not part of the Project Engine API)
149
160
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-project-engine-client",
3
- "version": "1.10.0",
3
+ "version": "1.11.0",
4
4
  "description": "Shared modules of the Spacecat Services - Semrush Project Engine client and generated types",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -20,12 +20,15 @@
20
20
  "npm": ">=10.9.0 <12.0.0"
21
21
  },
22
22
  "scripts": {
23
+ "pretest": "npm run spec:verify",
23
24
  "test": "c8 mocha",
24
25
  "lint": "eslint .",
25
26
  "lint:fix": "eslint --fix .",
26
27
  "clean": "rm -rf node_modules build .counterfact",
27
28
  "spec:convert": "mkdir -p build && swagger2openapi spec/projectengine_swagger_public.yaml --patch --outfile build/openapi3.json",
28
29
  "spec:overlay": "node scripts/apply-overlay.mjs",
30
+ "spec:verify": "shasum -a 256 -c spec/projectengine_swagger_public.yaml.sha256",
31
+ "spec:lock": "shasum -a 256 spec/projectengine_swagger_public.yaml > spec/projectengine_swagger_public.yaml.sha256",
29
32
  "generate:ts": "openapi-typescript build/openapi3.json --output src/generated/types.ts",
30
33
  "generate:pydantic": "datamodel-codegen --input build/openapi3.json --input-file-type openapi --output python/serenity_project_engine/ --output-model-type pydantic_v2.BaseModel",
31
34
  "generate": "npm run spec:convert && npm run spec:overlay && npm run generate:ts && npm run generate:pydantic",
@@ -2289,7 +2289,7 @@ export interface components {
2289
2289
  replace?: boolean;
2290
2290
  };
2291
2291
  "model.RenamePromptRequest": {
2292
- new_name?: string;
2292
+ new_name?: string | null;
2293
2293
  };
2294
2294
  "model.RenamePromptResponse": {
2295
2295
  id?: string;
@@ -7723,6 +7723,15 @@ export interface operations {
7723
7723
  "application/json": components["schemas"]["http_server.BasicResponse"];
7724
7724
  };
7725
7725
  };
7726
+ /** @description Conflict */
7727
+ 409: {
7728
+ headers: {
7729
+ [name: string]: unknown;
7730
+ };
7731
+ content: {
7732
+ "application/json": components["schemas"]["http_server.BasicResponse"];
7733
+ };
7734
+ };
7726
7735
  /** @description Internal Server Error */
7727
7736
  500: {
7728
7737
  headers: {