@meshery/schemas 1.3.115 → 1.3.116

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.
@@ -104,7 +104,15 @@ export interface paths {
104
104
  put?: never;
105
105
  /**
106
106
  * Create a new event
107
- * @description Records an event and answers 201 with it. When the payload carries an `idempotencyKey` the authenticated caller already used, nothing new is recorded and the answer is 200 with the event first recorded under that key. The server assigns the organization from the session; clients do not send it.
107
+ * @description Records an event and answers 201 with it. The server assigns the organization from the session; clients do not send it. A server MAY answer a legacy create, one carrying neither `correlationKey` nor `idempotencyKey`, with 200 and `Event-Disposition: created`, for compatibility with released Meshery Servers that treat any non-200 answer as failure. Clients accept any 2xx and read `Event-Disposition` rather than the status code to tell created from replayed.
108
+ *
109
+ * **Retries (`idempotencyKey`).** When the payload carries an `idempotencyKey` the authenticated caller already used, nothing is recorded or changed and the answer is 200 with the event that key is bound to (`Event-Disposition: replayed`). This check runs first, so a retried create never counts an occurrence twice.
110
+ *
111
+ * **Conditions (`correlationKey`).** A payload that carries a `correlationKey` reports an occurrence of an ongoing condition. A call that identifies no user records a new event and stores the correlation fields exactly as sent: no defaults are applied and no open event is matched, whether or not the payload carries `resolvedAt` (201, `Event-Disposition: created`). The open, increment and resolution rules below apply only to a call that identifies a user. A condition is open while its event has no `resolvedAt`, and that caller (organization and user, as for `idempotencyKey`) has at most one open event per key; the server enforces that atomically. For a payload without `resolvedAt`: when that caller has an open event with the key, no event is recorded; that event's `occurrenceCount` grows by the payload's `occurrenceCount` (1 when omitted), its `lastSeenAt` becomes the later of its own and the payload's `lastSeenAt` (the time of receipt when omitted), and its `updatedAt` advances. The answer is 200 with it (`Event-Disposition: incremented`). Every other field keeps the value it was first recorded with. Otherwise a new event is recorded, which opens the condition: `occurrenceCount` defaults to 1, `firstSeenAt` to the payload's `firstSeenAt`, else its `lastSeenAt`, else the time of receipt, and `lastSeenAt` to the payload's `lastSeenAt`, else `firstSeenAt` (201, `Event-Disposition: created`).
112
+ *
113
+ * **Resolution.** Only a call that identifies a user resolves. A producer closes a condition by creating an event with the condition's `correlationKey` and a `resolvedAt` time, after the condition clears. When that caller has an open event with the key, nothing new is recorded: that event gets the `resolvedAt`, its `severity` and `description` become the payload's when the payload carries them (an omitted field keeps the stored value) so the closed condition reads as cleared, its `lastSeenAt` becomes the later of its own and the payload's `lastSeenAt` (the time of receipt when omitted), and its `updatedAt` advances. The answer is 200 with the closed event (`Event-Disposition: resolved`). Every other field keeps the value it was recorded with, so `occurrenceCount` does not grow. When none is open, the payload is recorded as a new, already resolved event, using the opening defaults: `occurrenceCount` is the payload's (1 when omitted), and `firstSeenAt` and `lastSeenAt` are the payload's, else `resolvedAt` (201, `created`). Once closed, the next occurrence opens a new condition with a new event. Send a resolution only when the condition changes from present to cleared, never on every healthy check.
114
+ *
115
+ * **Composition.** When a create that carries both keys does not replay, its `idempotencyKey` is bound to the event the create recorded, incremented or resolved, so a retry answers 200 with that event and changes nothing. Deduplication a server applies on its own, without a client key, must not swallow an occurrence of an event that carries a `correlationKey`. A call that identifies a user counts the occurrence; a call that identifies no user is recorded as a new event with the correlation fields stored exactly as sent. Whether a counted occurrence notifies anyone again is the reader's policy, not this operation's. See docs/event-correlation-contract.md.
108
116
  */
109
117
  post: operations["createEvent"];
110
118
  delete?: never;
@@ -213,8 +221,45 @@ export interface components {
213
221
  action?: string;
214
222
  /** @description Description of the event. */
215
223
  description?: string;
224
+ /** @description Event level. MeshKit's producers set one of `emergency`, `alert`, `critical`, `error`, `warning`, `informational`, `debug` or `success`. The set is not closed on the wire - the event write APIs persist the value they are given - so consumers must tolerate other values. */
225
+ severity?: string;
216
226
  /** @description Optional client-chosen key that makes recording this event safe to retry. Keys are scoped to the authenticated caller (organization and user), never to the client-settable `owner` field, so `owner` may be omitted without affecting deduplication. The first event a caller records with a key is kept, and a later create with the same key records nothing and answers 200 with that event, whatever the rest of the payload says. Use a value that names the occurrence, for example a run id, so a client replaying a local queue after a timeout never records a duplicate. Omit it for events that need no deduplication. */
217
227
  idempotencyKey?: string;
228
+ /** @description Optional key naming the ongoing condition this event reports, so repeated occurrences count on one open event instead of recording one each (see createEvent). Name the condition, not the occurrence, and qualify it by the emitting source and component plus the subject, for example `meshery-server/k8s-connection/<connectionId>/unreachable`. Never use an error code alone: codes are scoped to the component that owns them. Unlike `idempotencyKey`, which makes one create safe to retry, this key spans many creates. */
229
+ correlationKey?: string;
230
+ /** @description Number of occurrences this create reports, for a producer that counted repeats locally before sending. A create without a `correlationKey`, and a call that identifies no user, stores this value exactly as sent, including when it is omitted. For a call that identifies a user and carries a `correlationKey`, omitted means 1. An opening create stores that count, counting an open condition adds it, and an already-resolved insert stores it. A resolving create on that open event does not add it. */
231
+ occurrenceCount?: number;
232
+ /**
233
+ * Format: date-time
234
+ * @description When the producer first saw the occurrences this create reports. A call that identifies no user stores this value exactly as sent. For a call that identifies a user, omitted while opening a condition means `lastSeenAt`, or the time of receipt, and omitted on a resolving create that inserts an already resolved event means `resolvedAt`. Stored when that create opens a condition or inserts one already resolved; a close of an open condition keeps the stored time.
235
+ */
236
+ firstSeenAt?: string;
237
+ /**
238
+ * Format: date-time
239
+ * @description When the producer last saw the occurrences this create reports. A call that identifies no user stores this value exactly as sent. For a call that identifies a user, omitted while opening a condition means `firstSeenAt`; omitted while counting an open condition, or while closing one, means the time of receipt; and omitted on a resolving create that inserts an already resolved event means `resolvedAt`.
240
+ */
241
+ lastSeenAt?: string;
242
+ /**
243
+ * Format: date-time
244
+ * @description When the condition named by `correlationKey` cleared. A call that identifies no user stores this value exactly as sent and does not match an open event. For a call that identifies a user, a create that carries it is a resolution: it closes that caller's open event with that key, copying this payload's `severity` and `description` onto the event when this payload carries them (an omitted field keeps the stored value) and setting `lastSeenAt` to the later of the stored time and this payload's `lastSeenAt` (the time of receipt when omitted), so the closed condition reads as cleared and the next occurrence opens a new condition (see createEvent). Give the resolution a severity and description that say what cleared, for example severity `success` and `Connection to cluster prod-1 restored`, under the condition's category.
245
+ */
246
+ resolvedAt?: string;
247
+ /**
248
+ * Format: uri-reference
249
+ * @description Which surface emitted the event, as a CloudEvents-compatible `source` (a URI reference): `meshery-server`, `meshery-ui`, `mesheryctl`, `meshery-adapter-<name>` (for example `meshery-adapter-istio`), `layer5-cloud`, or another client's name. `systemId` says which instance; `source` says which kind of client, so a failure a person caused in the UI is told apart from the same failure from the CLI. An open set: a new surface needs no schema change.
250
+ */
251
+ source?: string;
252
+ /** @description CloudEvents-compatible `type`: a reverse-DNS name of the kind of occurrence, for example `io.meshery.user.signup`. It does not replace `category` and `action`, which stay two free strings; `type` is for CloudEvents-aware consumers. */
253
+ type?: string;
254
+ /**
255
+ * @description The CloudEvents specification version the event's `source`, `type` and `id` are compatible with, when the producer sets them as CloudEvents attributes. A Meshery event is CloudEvents compatible; it is not a CloudEvent.
256
+ * @enum {string}
257
+ */
258
+ specversion?: "1.0";
259
+ /** @description W3C Trace Context `trace-id` (32 lowercase hex digits, not all zeros) of the user-level operation the event belongs to, so the event joins the OpenTelemetry trace that operation recorded. The client that starts the operation mints it, and every event of the operation and its sub-operations carries it; the server never mints one at persist time. */
260
+ traceId?: string;
261
+ /** @description W3C Trace Context `parent-id` (16 lowercase hex digits, not all zeros): the span of the sub-operation that emitted the event, so the events of one operation form its tree. Minted by the client with `traceId`, never by the server. */
262
+ parentId?: string;
218
263
  } & {
219
264
  [key: string]: unknown;
220
265
  };
@@ -310,6 +355,74 @@ export interface components {
310
355
  * @description Timestamp when the event was recorded.
311
356
  */
312
357
  createdAt?: string;
358
+ /** @description Key of the ongoing condition the event records (see Event.correlationKey); omitted for an event that reports no condition. */
359
+ correlationKey?: string;
360
+ /** @description How many occurrences of the condition the event counts (see Event.occurrenceCount). A create without a `correlationKey`, and a call that identifies no user, stores the payload's value exactly as sent, so an omitted count stays omitted. For a call that identifies a user and carries a `correlationKey`, it is the payload's `occurrenceCount` (1 when omitted) when the event was recorded, opening a condition or inserted already resolved, growing only as later creates that do not resolve are counted. A resolving create on the open event does not add to it. */
361
+ occurrenceCount?: number;
362
+ /**
363
+ * Format: date-time
364
+ * @description When the condition's first counted occurrence was seen (see Event.firstSeenAt). A call that identifies no user stores the payload's value exactly as sent. For a call that identifies a user, an opening create stores the payload's `firstSeenAt`, else its `lastSeenAt`, else the time of receipt. An already-resolved insert stores the payload's `firstSeenAt`, else `resolvedAt`. A close keeps the stored time. Omitted when the payload omitted it and the create applied no default.
365
+ */
366
+ firstSeenAt?: string;
367
+ /**
368
+ * Format: date-time
369
+ * @description When the condition was last seen (see Event.lastSeenAt). A call that identifies no user stores the payload's value exactly as sent. For a call that identifies a user, an opening create stores the payload's `lastSeenAt`, else `firstSeenAt`. An already-resolved insert stores the payload's `lastSeenAt`, else `resolvedAt`. Counting an occurrence, or closing one, brings the stored time forward. Omitted when the payload omitted it and the create applied no default.
370
+ */
371
+ lastSeenAt?: string;
372
+ /**
373
+ * Format: date-time
374
+ * @description When the condition cleared (see Event.resolvedAt). A call that identifies no user stores the payload's value exactly as sent. For a call that identifies a user it is omitted while the condition is open.
375
+ */
376
+ resolvedAt?: string;
377
+ /**
378
+ * Format: uri-reference
379
+ * @description Which surface emitted the event, for example `meshery-server` or `mesheryctl` (see Event.source).
380
+ */
381
+ source?: string;
382
+ /** @description CloudEvents-compatible `type`, for example `io.meshery.user.signup` (see Event.type). */
383
+ type?: string;
384
+ /**
385
+ * @description The CloudEvents specification version the event is compatible with (see Event.specversion).
386
+ * @enum {string}
387
+ */
388
+ specversion?: "1.0";
389
+ /** @description W3C Trace Context `trace-id` of the operation the event belongs to (see Event.traceId). */
390
+ traceId?: string;
391
+ /** @description W3C Trace Context `parent-id` of the sub-operation that emitted the event (see Event.parentId). */
392
+ parentId?: string;
393
+ /**
394
+ * Format: uuid
395
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
396
+ */
397
+ id?: string;
398
+ /**
399
+ * Format: uuid
400
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
401
+ */
402
+ actedUpon?: string;
403
+ /**
404
+ * Format: uuid
405
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
406
+ */
407
+ operationId?: string;
408
+ /** @description Event level (see Event.severity). MeshKit's producers set one of `emergency`, `alert`, `critical`, `error`, `warning`, `informational`, `debug` or `success`. The set is not closed on the wire, so consumers must tolerate other values. */
409
+ severity?: string;
410
+ /** @description Read state of the event (see Event.status). MeshKit records new events as `unread`, and acknowledged ones become `read`; consumers must tolerate other values. */
411
+ status?: string;
412
+ /** @description Event-specific details, the same nullable free-form map as Event.metadata. `null` when the producer attached none. On an error event, `metadata.error` holds only the MeshKit error, never the design or the request that failed: an EventError (the error's code, rendered descriptions, the causes and remediations that apply, `matchedCauses` and instance `details`), except that a design validation event whose operation did not complete (`status` `error`) carries it as a DesignEventOperationError. Rows recorded before EventError carry MeshKit's Go field names instead (`Code`, `Severity` as a number, `ShortDescription`, `LongDescription`, `ProbableCause` and `SuggestedRemediation` as lists); readers fall back to those keys when `code` is absent and treat their flat lists as unpaired. */
413
+ metadata?: {
414
+ [key: string]: unknown;
415
+ } | null;
416
+ /**
417
+ * Format: date-time
418
+ * @description Timestamp when the event was last updated (see Event.updatedAt).
419
+ */
420
+ updatedAt?: string;
421
+ /**
422
+ * Format: date-time
423
+ * @description Timestamp when the event was soft-deleted; omitted when it was not (see Event.deletedAt).
424
+ */
425
+ deletedAt?: string | null;
313
426
  };
314
427
  /** @description One recorded event (an `event_trackers` row) in the wire form MeshKit's `models/events.Event` serializes. Meshery Cloud returns these, for example, as the per-path failure records of a GitHub repository import (`importGithubRepository`, `errors`). Unlike EventResult, it carries no joined user profile fields. */
315
428
  Event: {
@@ -329,7 +442,7 @@ export interface components {
329
442
  category: string;
330
443
  /** @description Human-readable summary of what happened. */
331
444
  description: string;
332
- /** @description Event-specific details; the structure varies by event kind. `null` when the producer attached none. It stays a free-form map; design events fill it with a named shape: RelationshipEvaluationEventMetadata (category `relationship`, action `evaluation`), DesignValidationEventMetadata (category `pattern`, actions `validate`, `deploy`, `undeploy`, `dry-run`) and DesignSavedEventMetadata (category `pattern`, actions `create`, `update`); ScheduleCompletedEventMetadata (category `schedule`, action `completed`); DesignEventIdentity names the design. Never put design contents into event metadata - no `designFile`, `patternFile`, `components`, `relationships`, `trace`, `evaluationResponse`, the raw `summary` or `validationResult`. Meshery Server applies a 16 KB guard that drops oversized metadata down to the identity fields (`designId`, `designName`, `designVersion`, `designLink`, `viewLink`). On an error event, `metadata.error` holds only the MeshKit error, never the design or the request that failed; a design validation event whose operation did not complete (`status` `error`) carries it as a DesignEventOperationError. Older Meshery Cloud rows may carry the legacy `design_name` and `view_link` keys; readers should fall back to them when `designName` and `viewLink` are absent. */
445
+ /** @description Event-specific details; the structure varies by event kind. `null` when the producer attached none. It stays a free-form map; design events fill it with a named shape: RelationshipEvaluationEventMetadata (category `relationship`, action `evaluation`), DesignValidationEventMetadata (category `pattern`, actions `validate`, `deploy`, `undeploy`, `dry-run`) and DesignSavedEventMetadata (category `pattern`, actions `create`, `update`); ScheduleCompletedEventMetadata (category `schedule`, action `completed`); DesignEventIdentity names the design. Never put design contents into event metadata - no `designFile`, `patternFile`, `components`, `relationships`, `trace`, `evaluationResponse`, the raw `summary` or `validationResult`. Meshery Server applies a 16 KB guard that drops oversized metadata down to the identity fields (`designId`, `designName`, `designVersion`, `designLink`, `viewLink`). On an error event, `metadata.error` holds only the MeshKit error, never the design or the request that failed: an EventError (the error's code, rendered descriptions, the causes and remediations that apply, `matchedCauses` and instance `details`; docs/error-definition-contract.md), except that a design validation event whose operation did not complete (`status` `error`) carries it as a DesignEventOperationError. Rows recorded before EventError carry MeshKit's Go field names instead (`Code`, `Severity` as a number, `ShortDescription`, `LongDescription`, `ProbableCause` and `SuggestedRemediation` as lists); readers fall back to those keys when `code` is absent and treat their flat lists as unpaired. Older Meshery Cloud rows may carry the legacy `design_name` and `view_link` keys; readers should fall back to them when `designName` and `viewLink` are absent. */
333
446
  metadata: {
334
447
  [key: string]: unknown;
335
448
  } | null;
@@ -378,6 +491,41 @@ export interface components {
378
491
  * @description Timestamp when the event was soft-deleted; omitted when it was not.
379
492
  */
380
493
  deletedAt?: string | null;
494
+ /** @description Key of the ongoing condition the event records (see EventPayload.correlationKey and createEvent); omitted for an event that reports no condition. */
495
+ correlationKey?: string;
496
+ /** @description How many occurrences of the condition this event counts. A create without a `correlationKey`, and a call that identifies no user, stores the payload's value exactly as sent, so an omitted count stays omitted. For a call that identifies a user and carries a `correlationKey`, an opening create or a resolving create inserted already resolved stores the payload's `occurrenceCount` (1 when omitted). Later creates that do not resolve add their count. A resolving create on the open event does not add to it. */
497
+ occurrenceCount?: number;
498
+ /**
499
+ * Format: date-time
500
+ * @description When the condition's first counted occurrence was seen. A call that identifies no user stores the payload's value exactly as sent. For a call that identifies a user, an opening create stores the payload's `firstSeenAt`, else its `lastSeenAt`, else the time of receipt. An already-resolved insert stores the payload's `firstSeenAt`, else `resolvedAt`. A close keeps the stored time. Omitted when the payload omitted it and the create applied no default.
501
+ */
502
+ firstSeenAt?: string;
503
+ /**
504
+ * Format: date-time
505
+ * @description When the condition was last seen. A call that identifies no user stores the payload's value exactly as sent. For a call that identifies a user, an opening create stores the payload's `lastSeenAt`, else `firstSeenAt`. An already-resolved insert stores the payload's `lastSeenAt`, else `resolvedAt`. Counting an occurrence, or closing one, brings the stored time forward. Omitted when the payload omitted it and the create applied no default.
506
+ */
507
+ lastSeenAt?: string;
508
+ /**
509
+ * Format: date-time
510
+ * @description When the condition cleared. A call that identifies no user stores the payload's value exactly as sent and does not close another event. For a call that identifies a user it is omitted while the condition is open, and set by a resolution (see createEvent), which also replaces `severity` and `description` with the payload's when the payload carries them (an omitted field keeps the stored value) and brings `lastSeenAt` forward, after which a new occurrence opens a new event.
511
+ */
512
+ resolvedAt?: string;
513
+ /**
514
+ * Format: uri-reference
515
+ * @description Which surface emitted the event (CloudEvents-compatible `source`), for example `meshery-server`, `meshery-ui`, `mesheryctl` or `meshery-adapter-istio`; see EventPayload.source. Omitted when the producer did not say.
516
+ */
517
+ source?: string;
518
+ /** @description CloudEvents-compatible `type`, for example `io.meshery.user.signup`; see EventPayload.type. `category` and `action` stay the event's classification. */
519
+ type?: string;
520
+ /**
521
+ * @description The CloudEvents specification version the event is compatible with; see EventPayload.specversion.
522
+ * @enum {string}
523
+ */
524
+ specversion?: "1.0";
525
+ /** @description W3C Trace Context `trace-id` of the operation the event belongs to, as its client minted it; see EventPayload.traceId. */
526
+ traceId?: string;
527
+ /** @description W3C Trace Context `parent-id` of the sub-operation that emitted the event; see EventPayload.parentId. */
528
+ parentId?: string;
381
529
  };
382
530
  /** @description Paginated list of events. */
383
531
  EventsPage: {
@@ -434,8 +582,81 @@ export interface components {
434
582
  * @description Timestamp when the event was recorded.
435
583
  */
436
584
  createdAt?: string;
585
+ /** @description Key of the ongoing condition the event records (see Event.correlationKey); omitted for an event that reports no condition. */
586
+ correlationKey?: string;
587
+ /** @description How many occurrences of the condition the event counts (see Event.occurrenceCount). A create without a `correlationKey`, and a call that identifies no user, stores the payload's value exactly as sent, so an omitted count stays omitted. For a call that identifies a user and carries a `correlationKey`, it is the payload's `occurrenceCount` (1 when omitted) when the event was recorded, opening a condition or inserted already resolved, growing only as later creates that do not resolve are counted. A resolving create on the open event does not add to it. */
588
+ occurrenceCount?: number;
589
+ /**
590
+ * Format: date-time
591
+ * @description When the condition's first counted occurrence was seen (see Event.firstSeenAt). A call that identifies no user stores the payload's value exactly as sent. For a call that identifies a user, an opening create stores the payload's `firstSeenAt`, else its `lastSeenAt`, else the time of receipt. An already-resolved insert stores the payload's `firstSeenAt`, else `resolvedAt`. A close keeps the stored time. Omitted when the payload omitted it and the create applied no default.
592
+ */
593
+ firstSeenAt?: string;
594
+ /**
595
+ * Format: date-time
596
+ * @description When the condition was last seen (see Event.lastSeenAt). A call that identifies no user stores the payload's value exactly as sent. For a call that identifies a user, an opening create stores the payload's `lastSeenAt`, else `firstSeenAt`. An already-resolved insert stores the payload's `lastSeenAt`, else `resolvedAt`. Counting an occurrence, or closing one, brings the stored time forward. Omitted when the payload omitted it and the create applied no default.
597
+ */
598
+ lastSeenAt?: string;
599
+ /**
600
+ * Format: date-time
601
+ * @description When the condition cleared (see Event.resolvedAt). A call that identifies no user stores the payload's value exactly as sent. For a call that identifies a user it is omitted while the condition is open.
602
+ */
603
+ resolvedAt?: string;
604
+ /**
605
+ * Format: uri-reference
606
+ * @description Which surface emitted the event, for example `meshery-server` or `mesheryctl` (see Event.source).
607
+ */
608
+ source?: string;
609
+ /** @description CloudEvents-compatible `type`, for example `io.meshery.user.signup` (see Event.type). */
610
+ type?: string;
611
+ /**
612
+ * @description The CloudEvents specification version the event is compatible with (see Event.specversion).
613
+ * @enum {string}
614
+ */
615
+ specversion?: "1.0";
616
+ /** @description W3C Trace Context `trace-id` of the operation the event belongs to (see Event.traceId). */
617
+ traceId?: string;
618
+ /** @description W3C Trace Context `parent-id` of the sub-operation that emitted the event (see Event.parentId). */
619
+ parentId?: string;
620
+ /**
621
+ * Format: uuid
622
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
623
+ */
624
+ id?: string;
625
+ /**
626
+ * Format: uuid
627
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
628
+ */
629
+ actedUpon?: string;
630
+ /**
631
+ * Format: uuid
632
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
633
+ */
634
+ operationId?: string;
635
+ /** @description Event level (see Event.severity). MeshKit's producers set one of `emergency`, `alert`, `critical`, `error`, `warning`, `informational`, `debug` or `success`. The set is not closed on the wire, so consumers must tolerate other values. */
636
+ severity?: string;
637
+ /** @description Read state of the event (see Event.status). MeshKit records new events as `unread`, and acknowledged ones become `read`; consumers must tolerate other values. */
638
+ status?: string;
639
+ /** @description Event-specific details, the same nullable free-form map as Event.metadata. `null` when the producer attached none. On an error event, `metadata.error` holds only the MeshKit error, never the design or the request that failed: an EventError (the error's code, rendered descriptions, the causes and remediations that apply, `matchedCauses` and instance `details`), except that a design validation event whose operation did not complete (`status` `error`) carries it as a DesignEventOperationError. Rows recorded before EventError carry MeshKit's Go field names instead (`Code`, `Severity` as a number, `ShortDescription`, `LongDescription`, `ProbableCause` and `SuggestedRemediation` as lists); readers fall back to those keys when `code` is absent and treat their flat lists as unpaired. */
640
+ metadata?: {
641
+ [key: string]: unknown;
642
+ } | null;
643
+ /**
644
+ * Format: date-time
645
+ * @description Timestamp when the event was last updated (see Event.updatedAt).
646
+ */
647
+ updatedAt?: string;
648
+ /**
649
+ * Format: date-time
650
+ * @description Timestamp when the event was soft-deleted; omitted when it was not (see Event.deletedAt).
651
+ */
652
+ deletedAt?: string | null;
437
653
  }[];
438
654
  };
655
+ /**
656
+ * @description A CloudEvents specification version a Meshery event is compatible with. Only `1.0` is defined.
657
+ * @enum {string}
658
+ */
659
+ EventSpecVersion: "1.0";
439
660
  /**
440
661
  * @description Who can see the event. `private` (the default, set by Layer5 Cloud) means visible only inside the event's organization. `public` means the event may appear on the unauthenticated event feed, subject to the owner's `shareActivityPublicly` preference at read time. Clients such as Blowhorn decide whether to mark their own events public.
441
662
  * @default private
@@ -717,6 +938,75 @@ export interface components {
717
938
  /** @description One short, human-readable line saying what went wrong; omitted when the producer has none. Never design contents. */
718
939
  message?: string;
719
940
  };
941
+ /** @description The `metadata.error` of an event that reports an error: one occurrence of an ErrorDefinition (the error construct). It carries the code, the descriptions as rendered for this occurrence, the causes and remediations that apply, which of those causes are likely this time (`matchedCauses`), and the values the descriptions were rendered from (`details`). It holds only the error, never the design, the request or the response that failed. A producer that has only MeshKit's flat lists sends `probableCause` and `suggestedRemediation` alone; such an error is unpaired, and nothing may pair the lists by position. A producer with the nested form sends `probableCauses` and should also send the flat lists derived from it, for readers that predate the nesting. Like every metadata shape it is a sub-shape of Event.metadata, which stays a free-form map, so it has no `*Payload` twin (docs/error-definition-contract.md). */
942
+ EventError: {
943
+ /** @description The full error code, for example `meshery-server-1033`, as the definition names it. Consumers must tolerate codes they do not know. */
944
+ code: string;
945
+ /** @description The component that owns the code, when the producer names it; the code's prefix is the component's name. */
946
+ component?: {
947
+ /** @description The kind of component, for example `component` (Meshery Server), `adapter`, `library` (MeshKit) or `client` (mesheryctl). An open set: a new kind of component needs no schema change. */
948
+ type: string;
949
+ /** @description The component's name, for example `meshery-server`, `meshkit` or `mesheryctl`. It is the prefix of every code the component owns. */
950
+ name: string;
951
+ };
952
+ /**
953
+ * @description The definition's severity. The event's own `severity` is the level this occurrence was recorded at.
954
+ * @enum {string}
955
+ */
956
+ severity?: "emergency" | "alert" | "critical" | "fatal" | "error" | "warning" | "informational" | "debug";
957
+ /** @description The definition's short description, rendered for this occurrence. */
958
+ shortDescription?: string;
959
+ /** @description The definition's long description, rendered for this occurrence. */
960
+ longDescription?: string;
961
+ /** @description The definition's causes that apply to this occurrence, each with the remediations that answer it, in the definition's order. A producer may narrow the definition's causes to those that can apply; omitted when the producer has only flat lists. */
962
+ probableCauses?: {
963
+ /** @description Stable id of the cause, unique within the error's definition, for example `service-not-running`. An event names the causes that apply to one occurrence by this id (`EventError.matchedCauses`), and the docs page links to it, so it never changes once published. Lowercase words joined by hyphens. */
964
+ id: string;
965
+ /** @description What may have caused the error, for example `The service is not running.` */
966
+ description: string;
967
+ /** @description What answers this cause, the most likely fix first. A remediation that also answers another cause is repeated under that cause with the same `id` and identical fields. */
968
+ remediations: {
969
+ /** @description Stable id of the remediation, unique within the error's definition, for example `start-service`. The same id under two causes is one remediation answering both, so its fields must be identical in each place, and the flattened `suggestedRemediation` list carries it once. Lowercase words joined by hyphens. */
970
+ id: string;
971
+ /** @description What to do, written for a person, for example `Start the service.` */
972
+ description: string;
973
+ /** @description Identifier of an action a client can run to apply this remediation, as dot-separated lowercase words, for example `service.start` or `connection.reconnect`. The client that runs it owns its meaning; the definition only names it. Omitted when only a person can apply the remediation. */
974
+ action?: string;
975
+ /**
976
+ * @description Whether a client may run `action` on its own. `automatic` and `requiresApproval` need an `action`. Omitted means `manual`.
977
+ * @enum {string}
978
+ */
979
+ actionPolicy?: "automatic" | "requiresApproval" | "manual";
980
+ }[];
981
+ }[];
982
+ /** @description The causes most likely for this occurrence, most likely first, so a reader leads with their remediations. Each names a cause `id` of the definition and, when `probableCauses` is present, one of its causes. Omitted when the producer cannot tell which cause applies. */
983
+ matchedCauses?: {
984
+ /** @description The `id` of the matched cause in the error's definition (ProbableCause.id). */
985
+ causeId: string;
986
+ /** @description How sure the producer is that this cause applies, from 0 (a guess) to 1 (certain); omitted when the producer does not estimate it. */
987
+ confidence?: number;
988
+ }[];
989
+ /** @description The flat list of cause descriptions (MeshKit's `ProbableCause`). With `probableCauses`, it equals each cause's `description` in order; without, it is unpaired. */
990
+ probableCause?: string[];
991
+ /** @description The flat list of remediation descriptions (MeshKit's `SuggestedRemediation`). With `probableCauses`, it equals every remediation's `description` in order, each remediation `id` once; without, it is unpaired. */
992
+ suggestedRemediation?: string[];
993
+ /**
994
+ * Format: uri
995
+ * @description The code's page on docs.meshery.io (ErrorDefinition.referenceUrl), when the producer knows it.
996
+ */
997
+ referenceUrl?: string;
998
+ /** @description The instance values this occurrence's descriptions were rendered from, for example the connection name or the path that failed. Keys are camelCase. Never secrets, credentials, design contents or request bodies; Meshery Server's 16 KB metadata guard applies. */
999
+ details?: {
1000
+ [key: string]: unknown;
1001
+ };
1002
+ };
1003
+ /** @description One cause an error event names as likely for this occurrence (EventError.matchedCauses). */
1004
+ EventMatchedCause: {
1005
+ /** @description The `id` of the matched cause in the error's definition (ProbableCause.id). */
1006
+ causeId: string;
1007
+ /** @description How sure the producer is that this cause applies, from 0 (a guess) to 1 (certain); omitted when the producer does not estimate it. */
1008
+ confidence?: number;
1009
+ };
720
1010
  /** @description Metadata of a design saved event (category `pattern`, action `create` or `update`): a history title and the saved design's ID and name, never its contents. Never put design contents into event metadata - no `designFile`, `patternFile`, `components`, `relationships`, `trace`, `evaluationResponse`, the raw `summary` or `validationResult`. Meshery Server applies a 16 KB guard that drops oversized metadata down to the identity fields. */
721
1011
  DesignSavedEventMetadata: {
722
1012
  /** @description One-line title of the save for the design's history, for example `Version v0.0.3 - 12 components and 9 relationships`. */
@@ -879,7 +1169,10 @@ export interface components {
879
1169
  eventsScope: "user" | "organization";
880
1170
  };
881
1171
  requestBodies: never;
882
- headers: never;
1172
+ headers: {
1173
+ /** @description What `createEvent` did with the payload: `created` (a new event was recorded), `replayed` (the `idempotencyKey` was already used; nothing changed), `incremented` (an occurrence of the open condition with this `correlationKey` was counted) or `resolved` (that condition was closed). `incremented` and `resolved` apply only to a call that identifies a user; a call that identifies no user is `created`, with the correlation fields stored exactly as sent. A server MAY answer a legacy create, one carrying neither `correlationKey` nor `idempotencyKey`, with 200 and `created`, for compatibility with released Meshery Servers that treat any non-200 answer as failure. Clients accept any 2xx and read this header rather than the status code to tell created from replayed. A server that implements condition correlation sends it on every 200 and 201. A server that predates correlation omits it; there 201 means created and 200 means replayed. A browser client calling a server on another origin reads it only when that server lists it in `Access-Control-Expose-Headers`. */
1174
+ EventDisposition: "created" | "replayed" | "incremented" | "resolved";
1175
+ };
883
1176
  pathItems: never;
884
1177
  }
885
1178
  export type $defs = Record<string, never>;
@@ -1325,6 +1618,74 @@ export interface operations {
1325
1618
  * @description Timestamp when the event was recorded.
1326
1619
  */
1327
1620
  createdAt?: string;
1621
+ /** @description Key of the ongoing condition the event records (see Event.correlationKey); omitted for an event that reports no condition. */
1622
+ correlationKey?: string;
1623
+ /** @description How many occurrences of the condition the event counts (see Event.occurrenceCount). A create without a `correlationKey`, and a call that identifies no user, stores the payload's value exactly as sent, so an omitted count stays omitted. For a call that identifies a user and carries a `correlationKey`, it is the payload's `occurrenceCount` (1 when omitted) when the event was recorded, opening a condition or inserted already resolved, growing only as later creates that do not resolve are counted. A resolving create on the open event does not add to it. */
1624
+ occurrenceCount?: number;
1625
+ /**
1626
+ * Format: date-time
1627
+ * @description When the condition's first counted occurrence was seen (see Event.firstSeenAt). A call that identifies no user stores the payload's value exactly as sent. For a call that identifies a user, an opening create stores the payload's `firstSeenAt`, else its `lastSeenAt`, else the time of receipt. An already-resolved insert stores the payload's `firstSeenAt`, else `resolvedAt`. A close keeps the stored time. Omitted when the payload omitted it and the create applied no default.
1628
+ */
1629
+ firstSeenAt?: string;
1630
+ /**
1631
+ * Format: date-time
1632
+ * @description When the condition was last seen (see Event.lastSeenAt). A call that identifies no user stores the payload's value exactly as sent. For a call that identifies a user, an opening create stores the payload's `lastSeenAt`, else `firstSeenAt`. An already-resolved insert stores the payload's `lastSeenAt`, else `resolvedAt`. Counting an occurrence, or closing one, brings the stored time forward. Omitted when the payload omitted it and the create applied no default.
1633
+ */
1634
+ lastSeenAt?: string;
1635
+ /**
1636
+ * Format: date-time
1637
+ * @description When the condition cleared (see Event.resolvedAt). A call that identifies no user stores the payload's value exactly as sent. For a call that identifies a user it is omitted while the condition is open.
1638
+ */
1639
+ resolvedAt?: string;
1640
+ /**
1641
+ * Format: uri-reference
1642
+ * @description Which surface emitted the event, for example `meshery-server` or `mesheryctl` (see Event.source).
1643
+ */
1644
+ source?: string;
1645
+ /** @description CloudEvents-compatible `type`, for example `io.meshery.user.signup` (see Event.type). */
1646
+ type?: string;
1647
+ /**
1648
+ * @description The CloudEvents specification version the event is compatible with (see Event.specversion).
1649
+ * @enum {string}
1650
+ */
1651
+ specversion?: "1.0";
1652
+ /** @description W3C Trace Context `trace-id` of the operation the event belongs to (see Event.traceId). */
1653
+ traceId?: string;
1654
+ /** @description W3C Trace Context `parent-id` of the sub-operation that emitted the event (see Event.parentId). */
1655
+ parentId?: string;
1656
+ /**
1657
+ * Format: uuid
1658
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1659
+ */
1660
+ id?: string;
1661
+ /**
1662
+ * Format: uuid
1663
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1664
+ */
1665
+ actedUpon?: string;
1666
+ /**
1667
+ * Format: uuid
1668
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
1669
+ */
1670
+ operationId?: string;
1671
+ /** @description Event level (see Event.severity). MeshKit's producers set one of `emergency`, `alert`, `critical`, `error`, `warning`, `informational`, `debug` or `success`. The set is not closed on the wire, so consumers must tolerate other values. */
1672
+ severity?: string;
1673
+ /** @description Read state of the event (see Event.status). MeshKit records new events as `unread`, and acknowledged ones become `read`; consumers must tolerate other values. */
1674
+ status?: string;
1675
+ /** @description Event-specific details, the same nullable free-form map as Event.metadata. `null` when the producer attached none. On an error event, `metadata.error` holds only the MeshKit error, never the design or the request that failed: an EventError (the error's code, rendered descriptions, the causes and remediations that apply, `matchedCauses` and instance `details`), except that a design validation event whose operation did not complete (`status` `error`) carries it as a DesignEventOperationError. Rows recorded before EventError carry MeshKit's Go field names instead (`Code`, `Severity` as a number, `ShortDescription`, `LongDescription`, `ProbableCause` and `SuggestedRemediation` as lists); readers fall back to those keys when `code` is absent and treat their flat lists as unpaired. */
1676
+ metadata?: {
1677
+ [key: string]: unknown;
1678
+ } | null;
1679
+ /**
1680
+ * Format: date-time
1681
+ * @description Timestamp when the event was last updated (see Event.updatedAt).
1682
+ */
1683
+ updatedAt?: string;
1684
+ /**
1685
+ * Format: date-time
1686
+ * @description Timestamp when the event was soft-deleted; omitted when it was not (see Event.deletedAt).
1687
+ */
1688
+ deletedAt?: string | null;
1328
1689
  }[];
1329
1690
  };
1330
1691
  };
@@ -1515,17 +1876,56 @@ export interface operations {
1515
1876
  action?: string;
1516
1877
  /** @description Description of the event. */
1517
1878
  description?: string;
1879
+ /** @description Event level. MeshKit's producers set one of `emergency`, `alert`, `critical`, `error`, `warning`, `informational`, `debug` or `success`. The set is not closed on the wire - the event write APIs persist the value they are given - so consumers must tolerate other values. */
1880
+ severity?: string;
1518
1881
  /** @description Optional client-chosen key that makes recording this event safe to retry. Keys are scoped to the authenticated caller (organization and user), never to the client-settable `owner` field, so `owner` may be omitted without affecting deduplication. The first event a caller records with a key is kept, and a later create with the same key records nothing and answers 200 with that event, whatever the rest of the payload says. Use a value that names the occurrence, for example a run id, so a client replaying a local queue after a timeout never records a duplicate. Omit it for events that need no deduplication. */
1519
1882
  idempotencyKey?: string;
1883
+ /** @description Optional key naming the ongoing condition this event reports, so repeated occurrences count on one open event instead of recording one each (see createEvent). Name the condition, not the occurrence, and qualify it by the emitting source and component plus the subject, for example `meshery-server/k8s-connection/<connectionId>/unreachable`. Never use an error code alone: codes are scoped to the component that owns them. Unlike `idempotencyKey`, which makes one create safe to retry, this key spans many creates. */
1884
+ correlationKey?: string;
1885
+ /** @description Number of occurrences this create reports, for a producer that counted repeats locally before sending. A create without a `correlationKey`, and a call that identifies no user, stores this value exactly as sent, including when it is omitted. For a call that identifies a user and carries a `correlationKey`, omitted means 1. An opening create stores that count, counting an open condition adds it, and an already-resolved insert stores it. A resolving create on that open event does not add it. */
1886
+ occurrenceCount?: number;
1887
+ /**
1888
+ * Format: date-time
1889
+ * @description When the producer first saw the occurrences this create reports. A call that identifies no user stores this value exactly as sent. For a call that identifies a user, omitted while opening a condition means `lastSeenAt`, or the time of receipt, and omitted on a resolving create that inserts an already resolved event means `resolvedAt`. Stored when that create opens a condition or inserts one already resolved; a close of an open condition keeps the stored time.
1890
+ */
1891
+ firstSeenAt?: string;
1892
+ /**
1893
+ * Format: date-time
1894
+ * @description When the producer last saw the occurrences this create reports. A call that identifies no user stores this value exactly as sent. For a call that identifies a user, omitted while opening a condition means `firstSeenAt`; omitted while counting an open condition, or while closing one, means the time of receipt; and omitted on a resolving create that inserts an already resolved event means `resolvedAt`.
1895
+ */
1896
+ lastSeenAt?: string;
1897
+ /**
1898
+ * Format: date-time
1899
+ * @description When the condition named by `correlationKey` cleared. A call that identifies no user stores this value exactly as sent and does not match an open event. For a call that identifies a user, a create that carries it is a resolution: it closes that caller's open event with that key, copying this payload's `severity` and `description` onto the event when this payload carries them (an omitted field keeps the stored value) and setting `lastSeenAt` to the later of the stored time and this payload's `lastSeenAt` (the time of receipt when omitted), so the closed condition reads as cleared and the next occurrence opens a new condition (see createEvent). Give the resolution a severity and description that say what cleared, for example severity `success` and `Connection to cluster prod-1 restored`, under the condition's category.
1900
+ */
1901
+ resolvedAt?: string;
1902
+ /**
1903
+ * Format: uri-reference
1904
+ * @description Which surface emitted the event, as a CloudEvents-compatible `source` (a URI reference): `meshery-server`, `meshery-ui`, `mesheryctl`, `meshery-adapter-<name>` (for example `meshery-adapter-istio`), `layer5-cloud`, or another client's name. `systemId` says which instance; `source` says which kind of client, so a failure a person caused in the UI is told apart from the same failure from the CLI. An open set: a new surface needs no schema change.
1905
+ */
1906
+ source?: string;
1907
+ /** @description CloudEvents-compatible `type`: a reverse-DNS name of the kind of occurrence, for example `io.meshery.user.signup`. It does not replace `category` and `action`, which stay two free strings; `type` is for CloudEvents-aware consumers. */
1908
+ type?: string;
1909
+ /**
1910
+ * @description The CloudEvents specification version the event's `source`, `type` and `id` are compatible with, when the producer sets them as CloudEvents attributes. A Meshery event is CloudEvents compatible; it is not a CloudEvent.
1911
+ * @enum {string}
1912
+ */
1913
+ specversion?: "1.0";
1914
+ /** @description W3C Trace Context `trace-id` (32 lowercase hex digits, not all zeros) of the user-level operation the event belongs to, so the event joins the OpenTelemetry trace that operation recorded. The client that starts the operation mints it, and every event of the operation and its sub-operations carries it; the server never mints one at persist time. */
1915
+ traceId?: string;
1916
+ /** @description W3C Trace Context `parent-id` (16 lowercase hex digits, not all zeros): the span of the sub-operation that emitted the event, so the events of one operation form its tree. Minted by the client with `traceId`, never by the server. */
1917
+ parentId?: string;
1520
1918
  } & {
1521
1919
  [key: string]: unknown;
1522
1920
  };
1523
1921
  };
1524
1922
  };
1525
1923
  responses: {
1526
- /** @description An event with this `idempotencyKey` was already recorded by the same caller; it is returned unchanged and no new event is recorded. */
1924
+ /** @description The event the create resolved to. When no new event was recorded, that is the one already recorded under this caller's `idempotencyKey` (`replayed`, unchanged) or, for a call that identifies a user, the open event of this `correlationKey` with the occurrence counted (`incremented`), or that event closed by the payload's `resolvedAt`, with its `severity` and `description` replaced by the payload's when the payload carries them (an omitted field keeps the stored value) and its `lastSeenAt` brought forward (`resolved`). A call that identifies no user records a new event instead, with the correlation fields stored exactly as sent. A server MAY also answer a legacy create, one carrying neither `correlationKey` nor `idempotencyKey`, with 200 and `Event-Disposition: created`, returning the event it just recorded, for compatibility with released Meshery Servers that treat any non-200 answer as failure. Clients accept any 2xx and read `Event-Disposition` rather than the status code to tell created from replayed. */
1527
1925
  200: {
1528
1926
  headers: {
1927
+ /** @description What `createEvent` did with the payload: `created` (a new event was recorded), `replayed` (the `idempotencyKey` was already used; nothing changed), `incremented` (an occurrence of the open condition with this `correlationKey` was counted) or `resolved` (that condition was closed). `incremented` and `resolved` apply only to a call that identifies a user; a call that identifies no user is `created`, with the correlation fields stored exactly as sent. A server MAY answer a legacy create, one carrying neither `correlationKey` nor `idempotencyKey`, with 200 and `created`, for compatibility with released Meshery Servers that treat any non-200 answer as failure. Clients accept any 2xx and read this header rather than the status code to tell created from replayed. A server that implements condition correlation sends it on every 200 and 201. A server that predates correlation omits it; there 201 means created and 200 means replayed. A browser client calling a server on another origin reads it only when that server lists it in `Access-Control-Expose-Headers`. */
1928
+ "Event-Disposition"?: "created" | "replayed" | "incremented" | "resolved";
1529
1929
  [name: string]: unknown;
1530
1930
  };
1531
1931
  content: {
@@ -1546,7 +1946,7 @@ export interface operations {
1546
1946
  category: string;
1547
1947
  /** @description Human-readable summary of what happened. */
1548
1948
  description: string;
1549
- /** @description Event-specific details; the structure varies by event kind. `null` when the producer attached none. It stays a free-form map; design events fill it with a named shape: RelationshipEvaluationEventMetadata (category `relationship`, action `evaluation`), DesignValidationEventMetadata (category `pattern`, actions `validate`, `deploy`, `undeploy`, `dry-run`) and DesignSavedEventMetadata (category `pattern`, actions `create`, `update`); ScheduleCompletedEventMetadata (category `schedule`, action `completed`); DesignEventIdentity names the design. Never put design contents into event metadata - no `designFile`, `patternFile`, `components`, `relationships`, `trace`, `evaluationResponse`, the raw `summary` or `validationResult`. Meshery Server applies a 16 KB guard that drops oversized metadata down to the identity fields (`designId`, `designName`, `designVersion`, `designLink`, `viewLink`). On an error event, `metadata.error` holds only the MeshKit error, never the design or the request that failed; a design validation event whose operation did not complete (`status` `error`) carries it as a DesignEventOperationError. Older Meshery Cloud rows may carry the legacy `design_name` and `view_link` keys; readers should fall back to them when `designName` and `viewLink` are absent. */
1949
+ /** @description Event-specific details; the structure varies by event kind. `null` when the producer attached none. It stays a free-form map; design events fill it with a named shape: RelationshipEvaluationEventMetadata (category `relationship`, action `evaluation`), DesignValidationEventMetadata (category `pattern`, actions `validate`, `deploy`, `undeploy`, `dry-run`) and DesignSavedEventMetadata (category `pattern`, actions `create`, `update`); ScheduleCompletedEventMetadata (category `schedule`, action `completed`); DesignEventIdentity names the design. Never put design contents into event metadata - no `designFile`, `patternFile`, `components`, `relationships`, `trace`, `evaluationResponse`, the raw `summary` or `validationResult`. Meshery Server applies a 16 KB guard that drops oversized metadata down to the identity fields (`designId`, `designName`, `designVersion`, `designLink`, `viewLink`). On an error event, `metadata.error` holds only the MeshKit error, never the design or the request that failed: an EventError (the error's code, rendered descriptions, the causes and remediations that apply, `matchedCauses` and instance `details`; docs/error-definition-contract.md), except that a design validation event whose operation did not complete (`status` `error`) carries it as a DesignEventOperationError. Rows recorded before EventError carry MeshKit's Go field names instead (`Code`, `Severity` as a number, `ShortDescription`, `LongDescription`, `ProbableCause` and `SuggestedRemediation` as lists); readers fall back to those keys when `code` is absent and treat their flat lists as unpaired. Older Meshery Cloud rows may carry the legacy `design_name` and `view_link` keys; readers should fall back to them when `designName` and `viewLink` are absent. */
1550
1950
  metadata: {
1551
1951
  [key: string]: unknown;
1552
1952
  } | null;
@@ -1595,12 +1995,49 @@ export interface operations {
1595
1995
  * @description Timestamp when the event was soft-deleted; omitted when it was not.
1596
1996
  */
1597
1997
  deletedAt?: string | null;
1998
+ /** @description Key of the ongoing condition the event records (see EventPayload.correlationKey and createEvent); omitted for an event that reports no condition. */
1999
+ correlationKey?: string;
2000
+ /** @description How many occurrences of the condition this event counts. A create without a `correlationKey`, and a call that identifies no user, stores the payload's value exactly as sent, so an omitted count stays omitted. For a call that identifies a user and carries a `correlationKey`, an opening create or a resolving create inserted already resolved stores the payload's `occurrenceCount` (1 when omitted). Later creates that do not resolve add their count. A resolving create on the open event does not add to it. */
2001
+ occurrenceCount?: number;
2002
+ /**
2003
+ * Format: date-time
2004
+ * @description When the condition's first counted occurrence was seen. A call that identifies no user stores the payload's value exactly as sent. For a call that identifies a user, an opening create stores the payload's `firstSeenAt`, else its `lastSeenAt`, else the time of receipt. An already-resolved insert stores the payload's `firstSeenAt`, else `resolvedAt`. A close keeps the stored time. Omitted when the payload omitted it and the create applied no default.
2005
+ */
2006
+ firstSeenAt?: string;
2007
+ /**
2008
+ * Format: date-time
2009
+ * @description When the condition was last seen. A call that identifies no user stores the payload's value exactly as sent. For a call that identifies a user, an opening create stores the payload's `lastSeenAt`, else `firstSeenAt`. An already-resolved insert stores the payload's `lastSeenAt`, else `resolvedAt`. Counting an occurrence, or closing one, brings the stored time forward. Omitted when the payload omitted it and the create applied no default.
2010
+ */
2011
+ lastSeenAt?: string;
2012
+ /**
2013
+ * Format: date-time
2014
+ * @description When the condition cleared. A call that identifies no user stores the payload's value exactly as sent and does not close another event. For a call that identifies a user it is omitted while the condition is open, and set by a resolution (see createEvent), which also replaces `severity` and `description` with the payload's when the payload carries them (an omitted field keeps the stored value) and brings `lastSeenAt` forward, after which a new occurrence opens a new event.
2015
+ */
2016
+ resolvedAt?: string;
2017
+ /**
2018
+ * Format: uri-reference
2019
+ * @description Which surface emitted the event (CloudEvents-compatible `source`), for example `meshery-server`, `meshery-ui`, `mesheryctl` or `meshery-adapter-istio`; see EventPayload.source. Omitted when the producer did not say.
2020
+ */
2021
+ source?: string;
2022
+ /** @description CloudEvents-compatible `type`, for example `io.meshery.user.signup`; see EventPayload.type. `category` and `action` stay the event's classification. */
2023
+ type?: string;
2024
+ /**
2025
+ * @description The CloudEvents specification version the event is compatible with; see EventPayload.specversion.
2026
+ * @enum {string}
2027
+ */
2028
+ specversion?: "1.0";
2029
+ /** @description W3C Trace Context `trace-id` of the operation the event belongs to, as its client minted it; see EventPayload.traceId. */
2030
+ traceId?: string;
2031
+ /** @description W3C Trace Context `parent-id` of the sub-operation that emitted the event; see EventPayload.parentId. */
2032
+ parentId?: string;
1598
2033
  };
1599
2034
  };
1600
2035
  };
1601
- /** @description Event created */
2036
+ /** @description A new event was recorded (`Event-Disposition: created`). A call that identifies no user stores the correlation fields exactly as sent. For a call that identifies a user and carries a `correlationKey`, the event opens a condition, or records one already resolved when the payload carries `resolvedAt`. An already resolved insert uses `occurrenceCount` 1 when omitted, and `firstSeenAt` and `lastSeenAt` from the payload, else `resolvedAt`. */
1602
2037
  201: {
1603
2038
  headers: {
2039
+ /** @description What `createEvent` did with the payload: `created` (a new event was recorded), `replayed` (the `idempotencyKey` was already used; nothing changed), `incremented` (an occurrence of the open condition with this `correlationKey` was counted) or `resolved` (that condition was closed). `incremented` and `resolved` apply only to a call that identifies a user; a call that identifies no user is `created`, with the correlation fields stored exactly as sent. A server MAY answer a legacy create, one carrying neither `correlationKey` nor `idempotencyKey`, with 200 and `created`, for compatibility with released Meshery Servers that treat any non-200 answer as failure. Clients accept any 2xx and read this header rather than the status code to tell created from replayed. A server that implements condition correlation sends it on every 200 and 201. A server that predates correlation omits it; there 201 means created and 200 means replayed. A browser client calling a server on another origin reads it only when that server lists it in `Access-Control-Expose-Headers`. */
2040
+ "Event-Disposition"?: "created" | "replayed" | "incremented" | "resolved";
1604
2041
  [name: string]: unknown;
1605
2042
  };
1606
2043
  content: {
@@ -1621,7 +2058,7 @@ export interface operations {
1621
2058
  category: string;
1622
2059
  /** @description Human-readable summary of what happened. */
1623
2060
  description: string;
1624
- /** @description Event-specific details; the structure varies by event kind. `null` when the producer attached none. It stays a free-form map; design events fill it with a named shape: RelationshipEvaluationEventMetadata (category `relationship`, action `evaluation`), DesignValidationEventMetadata (category `pattern`, actions `validate`, `deploy`, `undeploy`, `dry-run`) and DesignSavedEventMetadata (category `pattern`, actions `create`, `update`); ScheduleCompletedEventMetadata (category `schedule`, action `completed`); DesignEventIdentity names the design. Never put design contents into event metadata - no `designFile`, `patternFile`, `components`, `relationships`, `trace`, `evaluationResponse`, the raw `summary` or `validationResult`. Meshery Server applies a 16 KB guard that drops oversized metadata down to the identity fields (`designId`, `designName`, `designVersion`, `designLink`, `viewLink`). On an error event, `metadata.error` holds only the MeshKit error, never the design or the request that failed; a design validation event whose operation did not complete (`status` `error`) carries it as a DesignEventOperationError. Older Meshery Cloud rows may carry the legacy `design_name` and `view_link` keys; readers should fall back to them when `designName` and `viewLink` are absent. */
2061
+ /** @description Event-specific details; the structure varies by event kind. `null` when the producer attached none. It stays a free-form map; design events fill it with a named shape: RelationshipEvaluationEventMetadata (category `relationship`, action `evaluation`), DesignValidationEventMetadata (category `pattern`, actions `validate`, `deploy`, `undeploy`, `dry-run`) and DesignSavedEventMetadata (category `pattern`, actions `create`, `update`); ScheduleCompletedEventMetadata (category `schedule`, action `completed`); DesignEventIdentity names the design. Never put design contents into event metadata - no `designFile`, `patternFile`, `components`, `relationships`, `trace`, `evaluationResponse`, the raw `summary` or `validationResult`. Meshery Server applies a 16 KB guard that drops oversized metadata down to the identity fields (`designId`, `designName`, `designVersion`, `designLink`, `viewLink`). On an error event, `metadata.error` holds only the MeshKit error, never the design or the request that failed: an EventError (the error's code, rendered descriptions, the causes and remediations that apply, `matchedCauses` and instance `details`; docs/error-definition-contract.md), except that a design validation event whose operation did not complete (`status` `error`) carries it as a DesignEventOperationError. Rows recorded before EventError carry MeshKit's Go field names instead (`Code`, `Severity` as a number, `ShortDescription`, `LongDescription`, `ProbableCause` and `SuggestedRemediation` as lists); readers fall back to those keys when `code` is absent and treat their flat lists as unpaired. Older Meshery Cloud rows may carry the legacy `design_name` and `view_link` keys; readers should fall back to them when `designName` and `viewLink` are absent. */
1625
2062
  metadata: {
1626
2063
  [key: string]: unknown;
1627
2064
  } | null;
@@ -1670,6 +2107,41 @@ export interface operations {
1670
2107
  * @description Timestamp when the event was soft-deleted; omitted when it was not.
1671
2108
  */
1672
2109
  deletedAt?: string | null;
2110
+ /** @description Key of the ongoing condition the event records (see EventPayload.correlationKey and createEvent); omitted for an event that reports no condition. */
2111
+ correlationKey?: string;
2112
+ /** @description How many occurrences of the condition this event counts. A create without a `correlationKey`, and a call that identifies no user, stores the payload's value exactly as sent, so an omitted count stays omitted. For a call that identifies a user and carries a `correlationKey`, an opening create or a resolving create inserted already resolved stores the payload's `occurrenceCount` (1 when omitted). Later creates that do not resolve add their count. A resolving create on the open event does not add to it. */
2113
+ occurrenceCount?: number;
2114
+ /**
2115
+ * Format: date-time
2116
+ * @description When the condition's first counted occurrence was seen. A call that identifies no user stores the payload's value exactly as sent. For a call that identifies a user, an opening create stores the payload's `firstSeenAt`, else its `lastSeenAt`, else the time of receipt. An already-resolved insert stores the payload's `firstSeenAt`, else `resolvedAt`. A close keeps the stored time. Omitted when the payload omitted it and the create applied no default.
2117
+ */
2118
+ firstSeenAt?: string;
2119
+ /**
2120
+ * Format: date-time
2121
+ * @description When the condition was last seen. A call that identifies no user stores the payload's value exactly as sent. For a call that identifies a user, an opening create stores the payload's `lastSeenAt`, else `firstSeenAt`. An already-resolved insert stores the payload's `lastSeenAt`, else `resolvedAt`. Counting an occurrence, or closing one, brings the stored time forward. Omitted when the payload omitted it and the create applied no default.
2122
+ */
2123
+ lastSeenAt?: string;
2124
+ /**
2125
+ * Format: date-time
2126
+ * @description When the condition cleared. A call that identifies no user stores the payload's value exactly as sent and does not close another event. For a call that identifies a user it is omitted while the condition is open, and set by a resolution (see createEvent), which also replaces `severity` and `description` with the payload's when the payload carries them (an omitted field keeps the stored value) and brings `lastSeenAt` forward, after which a new occurrence opens a new event.
2127
+ */
2128
+ resolvedAt?: string;
2129
+ /**
2130
+ * Format: uri-reference
2131
+ * @description Which surface emitted the event (CloudEvents-compatible `source`), for example `meshery-server`, `meshery-ui`, `mesheryctl` or `meshery-adapter-istio`; see EventPayload.source. Omitted when the producer did not say.
2132
+ */
2133
+ source?: string;
2134
+ /** @description CloudEvents-compatible `type`, for example `io.meshery.user.signup`; see EventPayload.type. `category` and `action` stay the event's classification. */
2135
+ type?: string;
2136
+ /**
2137
+ * @description The CloudEvents specification version the event is compatible with; see EventPayload.specversion.
2138
+ * @enum {string}
2139
+ */
2140
+ specversion?: "1.0";
2141
+ /** @description W3C Trace Context `trace-id` of the operation the event belongs to, as its client minted it; see EventPayload.traceId. */
2142
+ traceId?: string;
2143
+ /** @description W3C Trace Context `parent-id` of the sub-operation that emitted the event; see EventPayload.parentId. */
2144
+ parentId?: string;
1673
2145
  };
1674
2146
  };
1675
2147
  };
@@ -1809,6 +2281,74 @@ export interface operations {
1809
2281
  * @description Timestamp when the event was recorded.
1810
2282
  */
1811
2283
  createdAt?: string;
2284
+ /** @description Key of the ongoing condition the event records (see Event.correlationKey); omitted for an event that reports no condition. */
2285
+ correlationKey?: string;
2286
+ /** @description How many occurrences of the condition the event counts (see Event.occurrenceCount). A create without a `correlationKey`, and a call that identifies no user, stores the payload's value exactly as sent, so an omitted count stays omitted. For a call that identifies a user and carries a `correlationKey`, it is the payload's `occurrenceCount` (1 when omitted) when the event was recorded, opening a condition or inserted already resolved, growing only as later creates that do not resolve are counted. A resolving create on the open event does not add to it. */
2287
+ occurrenceCount?: number;
2288
+ /**
2289
+ * Format: date-time
2290
+ * @description When the condition's first counted occurrence was seen (see Event.firstSeenAt). A call that identifies no user stores the payload's value exactly as sent. For a call that identifies a user, an opening create stores the payload's `firstSeenAt`, else its `lastSeenAt`, else the time of receipt. An already-resolved insert stores the payload's `firstSeenAt`, else `resolvedAt`. A close keeps the stored time. Omitted when the payload omitted it and the create applied no default.
2291
+ */
2292
+ firstSeenAt?: string;
2293
+ /**
2294
+ * Format: date-time
2295
+ * @description When the condition was last seen (see Event.lastSeenAt). A call that identifies no user stores the payload's value exactly as sent. For a call that identifies a user, an opening create stores the payload's `lastSeenAt`, else `firstSeenAt`. An already-resolved insert stores the payload's `lastSeenAt`, else `resolvedAt`. Counting an occurrence, or closing one, brings the stored time forward. Omitted when the payload omitted it and the create applied no default.
2296
+ */
2297
+ lastSeenAt?: string;
2298
+ /**
2299
+ * Format: date-time
2300
+ * @description When the condition cleared (see Event.resolvedAt). A call that identifies no user stores the payload's value exactly as sent. For a call that identifies a user it is omitted while the condition is open.
2301
+ */
2302
+ resolvedAt?: string;
2303
+ /**
2304
+ * Format: uri-reference
2305
+ * @description Which surface emitted the event, for example `meshery-server` or `mesheryctl` (see Event.source).
2306
+ */
2307
+ source?: string;
2308
+ /** @description CloudEvents-compatible `type`, for example `io.meshery.user.signup` (see Event.type). */
2309
+ type?: string;
2310
+ /**
2311
+ * @description The CloudEvents specification version the event is compatible with (see Event.specversion).
2312
+ * @enum {string}
2313
+ */
2314
+ specversion?: "1.0";
2315
+ /** @description W3C Trace Context `trace-id` of the operation the event belongs to (see Event.traceId). */
2316
+ traceId?: string;
2317
+ /** @description W3C Trace Context `parent-id` of the sub-operation that emitted the event (see Event.parentId). */
2318
+ parentId?: string;
2319
+ /**
2320
+ * Format: uuid
2321
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2322
+ */
2323
+ id?: string;
2324
+ /**
2325
+ * Format: uuid
2326
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2327
+ */
2328
+ actedUpon?: string;
2329
+ /**
2330
+ * Format: uuid
2331
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
2332
+ */
2333
+ operationId?: string;
2334
+ /** @description Event level (see Event.severity). MeshKit's producers set one of `emergency`, `alert`, `critical`, `error`, `warning`, `informational`, `debug` or `success`. The set is not closed on the wire, so consumers must tolerate other values. */
2335
+ severity?: string;
2336
+ /** @description Read state of the event (see Event.status). MeshKit records new events as `unread`, and acknowledged ones become `read`; consumers must tolerate other values. */
2337
+ status?: string;
2338
+ /** @description Event-specific details, the same nullable free-form map as Event.metadata. `null` when the producer attached none. On an error event, `metadata.error` holds only the MeshKit error, never the design or the request that failed: an EventError (the error's code, rendered descriptions, the causes and remediations that apply, `matchedCauses` and instance `details`), except that a design validation event whose operation did not complete (`status` `error`) carries it as a DesignEventOperationError. Rows recorded before EventError carry MeshKit's Go field names instead (`Code`, `Severity` as a number, `ShortDescription`, `LongDescription`, `ProbableCause` and `SuggestedRemediation` as lists); readers fall back to those keys when `code` is absent and treat their flat lists as unpaired. */
2339
+ metadata?: {
2340
+ [key: string]: unknown;
2341
+ } | null;
2342
+ /**
2343
+ * Format: date-time
2344
+ * @description Timestamp when the event was last updated (see Event.updatedAt).
2345
+ */
2346
+ updatedAt?: string;
2347
+ /**
2348
+ * Format: date-time
2349
+ * @description Timestamp when the event was soft-deleted; omitted when it was not (see Event.deletedAt).
2350
+ */
2351
+ deletedAt?: string | null;
1812
2352
  }[];
1813
2353
  };
1814
2354
  };