@anuragpal02/zcl-contracts 0.47.0 → 0.49.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/dist/common.d.ts CHANGED
@@ -1,12 +1,31 @@
1
1
  import { z } from 'zod';
2
2
  export declare const idSchema: z.ZodString;
3
3
  export declare const isoDateSchema: z.ZodString;
4
+ /**
5
+ * The machine-readable reason a request failed.
6
+ *
7
+ * These are the ONLY values a caller may branch on, and — because a UI turns a code
8
+ * into a sentence — each one has to mean a single thing. Two unrelated failures
9
+ * sharing a code produce a screen that lies:
10
+ *
11
+ * `POST /projects/:id/smart-video` used to answer 409 `conflict` both when another
12
+ * session had edited the wall AND when some panels simply had no image yet. The web
13
+ * app maps `conflict` to "Someone else changed this while you were working on it.
14
+ * Reload and try again." — advice that was useless in the second case, because
15
+ * reloading does not generate a missing still. `precondition_failed` exists to split
16
+ * those two apart.
17
+ *
18
+ * Adding a member is safe for consumers: both the web app and the BFF fall back to a
19
+ * generic sentence for a code they do not recognise, so an old client shows something
20
+ * vague rather than crashing. It is NOT safe to remove or rename one.
21
+ */
4
22
  export declare const apiErrorCodeSchema: z.ZodEnum<{
5
23
  bad_request: "bad_request";
6
24
  unauthorized: "unauthorized";
7
25
  forbidden: "forbidden";
8
26
  payment_required: "payment_required";
9
27
  conflict: "conflict";
28
+ precondition_failed: "precondition_failed";
10
29
  not_found: "not_found";
11
30
  validation_failed: "validation_failed";
12
31
  rate_limited: "rate_limited";
@@ -21,6 +40,7 @@ export declare const errorResponseSchema: z.ZodObject<{
21
40
  forbidden: "forbidden";
22
41
  payment_required: "payment_required";
23
42
  conflict: "conflict";
43
+ precondition_failed: "precondition_failed";
24
44
  not_found: "not_found";
25
45
  validation_failed: "validation_failed";
26
46
  rate_limited: "rate_limited";
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MA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;;;;;kBAKhF;AAED,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAC7D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAC/D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA"}
package/dist/common.js CHANGED
@@ -1,12 +1,44 @@
1
1
  import { z } from 'zod';
2
2
  export const idSchema = z.string().uuid();
3
3
  export const isoDateSchema = z.string().datetime();
4
+ /**
5
+ * The machine-readable reason a request failed.
6
+ *
7
+ * These are the ONLY values a caller may branch on, and — because a UI turns a code
8
+ * into a sentence — each one has to mean a single thing. Two unrelated failures
9
+ * sharing a code produce a screen that lies:
10
+ *
11
+ * `POST /projects/:id/smart-video` used to answer 409 `conflict` both when another
12
+ * session had edited the wall AND when some panels simply had no image yet. The web
13
+ * app maps `conflict` to "Someone else changed this while you were working on it.
14
+ * Reload and try again." — advice that was useless in the second case, because
15
+ * reloading does not generate a missing still. `precondition_failed` exists to split
16
+ * those two apart.
17
+ *
18
+ * Adding a member is safe for consumers: both the web app and the BFF fall back to a
19
+ * generic sentence for a code they do not recognise, so an old client shows something
20
+ * vague rather than crashing. It is NOT safe to remove or rename one.
21
+ */
4
22
  export const apiErrorCodeSchema = z.enum([
5
23
  'bad_request',
6
24
  'unauthorized',
7
25
  'forbidden',
8
26
  'payment_required',
27
+ /**
28
+ * The resource changed underneath you: the version you loaded is no longer current.
29
+ * "Reload and try again" is honest advice, because reloading genuinely fixes it.
30
+ * Examples: a stale LED-map version, a guideline set edited since it was read.
31
+ */
9
32
  'conflict',
33
+ /**
34
+ * The resource exists and you may act on it, but it is not in a state that permits
35
+ * this operation yet. Reloading does NOT help — something has to be done first, and
36
+ * the accompanying `message` names it.
37
+ *
38
+ * Examples: panels that still have no generated still, a master job that has not
39
+ * finished, a reservation already captured.
40
+ */
41
+ 'precondition_failed',
10
42
  'not_found',
11
43
  'validation_failed',
12
44
  'rate_limited',
@@ -449,7 +449,12 @@ export declare const updateProjectRequestSchema: z.ZodObject<{
449
449
  *
450
450
  * ⚠️ `'archived'` IS STILL A MEMBER, AND REMOVING IT WOULD BE AN OUTAGE.
451
451
  *
452
- * Archiving was retired in 0.47: nothing writes `'archived'` any more
452
+ * ⚠️ The paragraph below described 0.47, when archiving was retired. 0.48 RESTORED
453
+ * it — `updateProjectRunRequestSchema` carries `status` again and clients write
454
+ * `'archived'` once more. The enum membership was never in doubt; it is kept here
455
+ * because the reasoning about reader/writer asymmetry is still worth reading.
456
+ *
457
+ * Archiving was retired in 0.47: nothing wrote `'archived'` for one version —
453
458
  * `updateProjectRunRequestSchema` no longer carries `status` at all, and the
454
459
  * product action it backed is now Delete. But zcl-api parses its OUTBOUND
455
460
  * responses through this schema, so the enum has to keep admitting every value
@@ -489,6 +494,10 @@ export declare const createProjectRunRequestSchema: z.ZodObject<{
489
494
  }, z.core.$strip>;
490
495
  export declare const updateProjectRunRequestSchema: z.ZodObject<{
491
496
  name: z.ZodOptional<z.ZodString>;
497
+ status: z.ZodOptional<z.ZodEnum<{
498
+ active: "active";
499
+ archived: "archived";
500
+ }>>;
492
501
  masterJobId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
493
502
  ledMapId: z.ZodOptional<z.ZodString>;
494
503
  panelSetVariantGroupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -1 +1 @@
1
- {"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../src/projects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,uBAAuB;;;EAAmC,CAAA;AACvE,eAAO,MAAM,mBAAmB;;;;EAA4C,CAAA;AAE5E,eAAO,MAAM,gBAAgB,aAAmC,CAAA;AAEhE,eAAO,MAAM,cAAc;;;;;;;;;;iBA0CvB,CAAA;AAEJ,eAAO,MAAM,e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B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA"}
package/dist/projects.js CHANGED
@@ -374,7 +374,12 @@ export const updateProjectRequestSchema = z
374
374
  *
375
375
  * ⚠️ `'archived'` IS STILL A MEMBER, AND REMOVING IT WOULD BE AN OUTAGE.
376
376
  *
377
- * Archiving was retired in 0.47: nothing writes `'archived'` any more
377
+ * ⚠️ The paragraph below described 0.47, when archiving was retired. 0.48 RESTORED
378
+ * it — `updateProjectRunRequestSchema` carries `status` again and clients write
379
+ * `'archived'` once more. The enum membership was never in doubt; it is kept here
380
+ * because the reasoning about reader/writer asymmetry is still worth reading.
381
+ *
382
+ * Archiving was retired in 0.47: nothing wrote `'archived'` for one version —
378
383
  * `updateProjectRunRequestSchema` no longer carries `status` at all, and the
379
384
  * product action it backed is now Delete. But zcl-api parses its OUTBOUND
380
385
  * responses through this schema, so the enum has to keep admitting every value
@@ -418,20 +423,24 @@ export const updateProjectRunRequestSchema = z
418
423
  .object({
419
424
  name: z.string().min(1).max(200).optional(),
420
425
  /**
421
- * ⚠️ `status` IS GONE FROM THIS PATCH AS OF 0.47, ON PURPOSE.
426
+ * Archive / restore a creation. RESTORED IN 0.48 after 0.47 removed it.
427
+ *
428
+ * 0.47 retired archiving on the understanding that Delete replaced it. That
429
+ * was a misread of the requirement: the ask was for Delete to be ADDED
430
+ * alongside archiving, not to replace it. Archiving is reversible and
431
+ * Delete is not, and they answer different questions — "put this away" is
432
+ * not "destroy this and its assets".
422
433
  *
423
- * It was the archive/restore action, and archiving has been replaced by
424
- * `DELETE .../runs/:runId`. This object STRIPS unknown keys, so an older
425
- * client that still sends `{status: 'archived'}` does not get an error — its
426
- * key is dropped, and if that was the only key the `.refine` below turns the
427
- * request into a clean 400 instead of a silent no-op that reports success.
428
- * That is the intended outcome: an archive request from a stale client must
429
- * not appear to work.
434
+ * So both exist now: `status` here for archive/restore, and
435
+ * `DELETE .../runs/:runId` for the irreversible one. Nothing about the
436
+ * delete endpoint changes.
430
437
  *
431
- * `projectRunStatusSchema` is still exported and still read on the ENTITY
432
- * (`projectRunSchema.status`) see the note on the enum for why narrowing
433
- * the reader is a separate, later decision from removing the writer.
438
+ * Restoring the WRITER is the safe direction a schema that accepts a value
439
+ * it previously rejected cannot break a client that never sends it. (Removing
440
+ * it was the risky direction, which is why 0.47 had to keep `'archived'` in
441
+ * the reader enum.) Un-archiving is the same call with `'active'`.
434
442
  */
443
+ status: projectRunStatusSchema.optional(),
435
444
  masterJobId: idSchema.nullable().optional(),
436
445
  /**
437
446
  * Deliberately NOT `.nullable()`, unlike its siblings above and below. A
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anuragpal02/zcl-contracts",
3
- "version": "0.47.0",
3
+ "version": "0.49.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",