From 5bc9ae0fd7abf87d28047d8d84fab37034b80dcc Mon Sep 17 00:00:00 2001 From: Flavius Mardare Date: Sun, 7 Jun 2026 14:57:27 +0200 Subject: [PATCH] chore: upgrade ec client to have missed field --- clients/event-catalog-client/package.json | 2 +- clients/event-catalog-client/src/openapi.d.ts | 18 +++++++++++++ clients/event-catalog-client/src/openapi.json | 25 +++++++++++++++++++ 3 files changed, 44 insertions(+), 1 deletion(-) diff --git a/clients/event-catalog-client/package.json b/clients/event-catalog-client/package.json index 2572cadc..a25fe7aa 100644 --- a/clients/event-catalog-client/package.json +++ b/clients/event-catalog-client/package.json @@ -1,6 +1,6 @@ { "name": "@epilot/event-catalog-client", - "version": "0.6.0", + "version": "0.6.1", "description": "Client for epilot Event Catalog API", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/clients/event-catalog-client/src/openapi.d.ts b/clients/event-catalog-client/src/openapi.d.ts index fbe55f1f..741e2c9d 100644 --- a/clients/event-catalog-client/src/openapi.d.ts +++ b/clients/event-catalog-client/src/openapi.d.ts @@ -205,6 +205,10 @@ declare namespace Components { * */ _ack_id?: string; + /** + * Inline downgrade chain stamped by Event Catalog at publish time, ordered newest-to-oldest. Present ONLY on multi-version events. Internal versioning transport: consumers (e.g. svc-webhooks) walk the payload back to a pinned version using these JSONata steps, then strip the field before delivery -- end customers never receive it. + */ + _downgrades?: /* One step of an event's inline `_downgrades` chain. Maps the current-version payload to the previous version via a JSONata expression. Stamped by Event Catalog at publish time; executed by consumers during walk-back, never by EC itself. */ InlineDowngradeStep[]; } /** * A file attachment associated with an event @@ -890,6 +894,19 @@ declare namespace Components { */ fields?: string[]; } + /** + * One step of an event's inline `_downgrades` chain. Maps the current-version payload to the previous version via a JSONata expression. Stamped by Event Catalog at publish time; executed by consumers during walk-back, never by EC itself. + */ + export interface InlineDowngradeStep { + /** + * Version label this step downgrades to (the previous version). + */ + to: string; + /** + * JSONata expression mapping the current-shape payload to the previous-shape payload. + */ + jsonata: string; + } /** * A primitive JSON Schema field definition */ @@ -2010,6 +2027,7 @@ export type FieldsParam = Components.Schemas.FieldsParam; export type GraphDefinition = Components.Schemas.GraphDefinition; export type GraphEdge = Components.Schemas.GraphEdge; export type GraphNode = Components.Schemas.GraphNode; +export type InlineDowngradeStep = Components.Schemas.InlineDowngradeStep; export type PrimitiveField = Components.Schemas.PrimitiveField; export type SchemaField = Components.Schemas.SchemaField; export type SearchOptions = Components.Schemas.SearchOptions; diff --git a/clients/event-catalog-client/src/openapi.json b/clients/event-catalog-client/src/openapi.json index 7f05180f..49d6065f 100644 --- a/clients/event-catalog-client/src/openapi.json +++ b/clients/event-catalog-client/src/openapi.json @@ -878,6 +878,24 @@ ] } }, + "InlineDowngradeStep": { + "type": "object", + "description": "One step of an event's inline `_downgrades` chain. Maps the current-version payload to the previous version via a JSONata expression. Stamped by Event Catalog at publish time; executed by consumers during walk-back, never by EC itself.", + "properties": { + "to": { + "type": "string", + "description": "Version label this step downgrades to (the previous version)." + }, + "jsonata": { + "type": "string", + "description": "JSONata expression mapping the current-shape payload to the previous-shape payload." + } + }, + "required": [ + "to", + "jsonata" + ] + }, "Event": { "type": "object", "description": "An event instance in the event history", @@ -920,6 +938,13 @@ "_ack_id": { "type": "string", "description": "Unique acknowledgment tracking ID for the event.\nUsed to track event delivery and processing status.\n" + }, + "_downgrades": { + "type": "array", + "description": "Inline downgrade chain stamped by Event Catalog at publish time, ordered newest-to-oldest. Present ONLY on multi-version events. Internal versioning transport: consumers (e.g. svc-webhooks) walk the payload back to a pinned version using these JSONata steps, then strip the field before delivery -- end customers never receive it.", + "items": { + "$ref": "#/components/schemas/InlineDowngradeStep" + } } }, "required": [