@meshery/schemas 1.3.115 → 1.3.117

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.
Files changed (34) hide show
  1. package/dist/cloudApi.d.mts +912 -11
  2. package/dist/cloudApi.d.ts +912 -11
  3. package/dist/cloudApi.js +1 -1
  4. package/dist/cloudApi.mjs +1 -1
  5. package/dist/constructs/v1beta3/connection/Connection.d.ts +17 -5
  6. package/dist/constructs/v1beta3/connection/ConnectionSchema.js +3 -3
  7. package/dist/constructs/v1beta3/connection/ConnectionSchema.mjs +3 -3
  8. package/dist/constructs/v1beta3/design/Design.d.ts +72 -2
  9. package/dist/constructs/v1beta3/design/DesignSchema.js +4 -2
  10. package/dist/constructs/v1beta3/design/DesignSchema.mjs +4 -2
  11. package/dist/constructs/v1beta3/environment/Environment.d.ts +710 -4
  12. package/dist/constructs/v1beta3/environment/EnvironmentSchema.js +1 -1
  13. package/dist/constructs/v1beta3/environment/EnvironmentSchema.mjs +1 -1
  14. package/dist/constructs/v1beta3/errorcode/Errorcode.d.ts +193 -0
  15. package/dist/constructs/v1beta3/errorcode/Errorcode.js +1 -0
  16. package/dist/constructs/v1beta3/errorcode/Errorcode.mjs +0 -0
  17. package/dist/constructs/v1beta3/errorcode/ErrorcodeSchema.d.ts +2 -0
  18. package/dist/constructs/v1beta3/errorcode/ErrorcodeSchema.js +9 -0
  19. package/dist/constructs/v1beta3/errorcode/ErrorcodeSchema.mjs +9 -0
  20. package/dist/constructs/v1beta3/event/Event.d.ts +558 -17
  21. package/dist/constructs/v1beta3/event/EventSchema.js +28 -9
  22. package/dist/constructs/v1beta3/event/EventSchema.mjs +28 -9
  23. package/dist/constructs/v1beta3/schedule/Schedule.d.ts +390 -1
  24. package/dist/constructs/v1beta3/schedule/ScheduleSchema.js +35 -15
  25. package/dist/constructs/v1beta3/schedule/ScheduleSchema.mjs +35 -15
  26. package/dist/index.d.mts +624 -85
  27. package/dist/index.d.ts +624 -85
  28. package/dist/index.js +10 -10
  29. package/dist/index.mjs +10 -10
  30. package/dist/mesheryApi.d.mts +332 -6
  31. package/dist/mesheryApi.d.ts +332 -6
  32. package/dist/mesheryApi.js +1 -1
  33. package/dist/mesheryApi.mjs +1 -1
  34. package/package.json +1 -1
@@ -13467,9 +13467,243 @@ type GetEnvironmentConnectionsApiResponse = {
13467
13467
  pageSize?: number;
13468
13468
  /** Total number of items available. */
13469
13469
  totalCount?: number;
13470
- /** The connections of the environmentconnectionspage. */
13470
+ /** Connections associated with the environment, using the canonical Connection response schema. */
13471
13471
  connections?: {
13472
- [key: string]: any;
13472
+ /** Connection ID */
13473
+ id: string;
13474
+ /** Connection Name */
13475
+ name: string;
13476
+ /** Human-readable description of the connection and its purpose. */
13477
+ description?: string;
13478
+ /** URL of the remote resource this connection points to (e.g. the Helm repository URL, the Kubernetes API server endpoint, the Grafana instance URL). */
13479
+ url?: string;
13480
+ /** Associated Credential ID */
13481
+ credentialId?: string;
13482
+ /** Connection Type (platform, telemetry, collaboration) */
13483
+ type: string;
13484
+ /** Connection Subtype (cloud, identity, metrics, chat, git, orchestration) */
13485
+ subType: string;
13486
+ /** Connection Kind (meshery, kubernetes, prometheus, grafana, gke, aws, azure, slack, github, desktop) */
13487
+ kind: string;
13488
+ /** Reference to the specific registered model to which the component belongs and from which model version, category, and other properties may be referenced. Learn more at https://docs.meshery.io/concepts/models */
13489
+ modelReference?: {
13490
+ /** A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas. */
13491
+ id: string;
13492
+ /** The unique name for the model within the scope of a registrant. */
13493
+ name: string;
13494
+ /** Version of the model definition. */
13495
+ version: string;
13496
+ /** Human-readable name for the model. */
13497
+ displayName: string;
13498
+ /** Registrant-defined data associated with the model. Properties pertain to the software being managed (e.g. Kubernetes v1.31). */
13499
+ model: {
13500
+ /** Version of the model as defined by the registrant. */
13501
+ version: string;
13502
+ };
13503
+ registrant: {
13504
+ /** Kind of the registrant. */
13505
+ kind: string;
13506
+ };
13507
+ };
13508
+ /** Additional connection metadata */
13509
+ metadata?: object;
13510
+ /** Schema for the credential Associated with the connection */
13511
+ credentialSchema?: object;
13512
+ /** Schema for the connection */
13513
+ connectionSchema?: object;
13514
+ /** Visualization styles for the connection, including svgColor and svgWhite used for UI representation. */
13515
+ styles?: {
13516
+ /** Primary color of the component used for UI representation. */
13517
+ primaryColor: string;
13518
+ /** Secondary color of the entity used for UI representation. */
13519
+ secondaryColor?: string;
13520
+ /** White SVG of the entity used for UI representation on dark background. */
13521
+ svgWhite: string;
13522
+ /** Colored SVG of the entity used for UI representation on light background. */
13523
+ svgColor: string;
13524
+ /** Complete SVG of the entity used for UI representation, often inclusive of background. */
13525
+ svgComplete: string;
13526
+ /** The color of the element's label. Colours may be specified by name (e.g. red), hex (e.g. */
13527
+ color?: string;
13528
+ /** The opacity of the label text, including its outline. */
13529
+ textOpacity?: number;
13530
+ /** A comma-separated list of font names to use on the label text. */
13531
+ fontFamily?: string;
13532
+ /** The size of the label text. */
13533
+ fontSize?: string;
13534
+ /** A CSS font style to be applied to the label text. */
13535
+ fontStyle?: string;
13536
+ /** A CSS font weight to be applied to the label text. */
13537
+ fontWeight?: string;
13538
+ /** A transformation to apply to the label text */
13539
+ textTransform?: "none" | "uppercase" | "lowercase";
13540
+ /** The opacity of the element, ranging from 0 to 1. Note that the opacity of a compound node parent affects the effective opacity of its children. */
13541
+ opacity?: number;
13542
+ /** An integer value that affects the relative draw order of elements. In general, an element with a higher z-index will be drawn on top of an element with a lower z-index. Note that edges are under nodes despite z-index. */
13543
+ zIndex?: number;
13544
+ /** The text to display for an element's label. Can give a path, e.g. data(id) will label with the elements id */
13545
+ label?: string;
13546
+ /** The animation to apply to the element. example ripple,bounce,etc */
13547
+ animation?: object;
13548
+ [key: string]: any;
13549
+ } & {
13550
+ /** The shape of the node's body. Note that each shape fits within the specified width and height, and so you may have to adjust width and height if you desire an equilateral shape (i.e. width !== height for several equilateral shapes) */
13551
+ shape: "ellipse" | "triangle" | "round-triangle" | "rectangle" | "round-rectangle" | "bottom-round-rectangle" | "cut-rectangle" | "barrel" | "rhomboid" | "diamond" | "round-diamond" | "pentagon" | "round-pentagon" | "hexagon" | "round-hexagon" | "concave-hexagon" | "heptagon" | "round-heptagon" | "octagon" | "round-octagon" | "star" | "tag" | "round-tag" | "vee" | "polygon";
13552
+ /** The position of the node. If the position is set, the node is drawn at that position in the given dimensions. If the position is not set, the node is drawn at a random position. */
13553
+ position?: {
13554
+ /** The x-coordinate of the node. */
13555
+ x: number;
13556
+ /** The y-coordinate of the node. */
13557
+ y: number;
13558
+ };
13559
+ /** The text to display for an element's body. Can give a path, e.g. data(id) will label with the elements id */
13560
+ bodyText?: string;
13561
+ /** How to wrap the text in the node. Can be 'none', 'wrap', or 'ellipsis'. */
13562
+ bodyTextWrap?: "none" | "wrap" | "ellipsis";
13563
+ /** The maximum width for wrapping text in the node. */
13564
+ bodyTextMaxWidth?: string;
13565
+ /** The opacity of the node's body text, including its outline. */
13566
+ bodyTextOpacity?: number;
13567
+ /** The colour of the node's body text background. Colours may be specified by name (e.g. red), hex (e.g. */
13568
+ bodyTextBackgroundColor?: string;
13569
+ /** The size of the node's body text. */
13570
+ bodyTextFontSize?: number;
13571
+ /** The colour of the node's body text. Colours may be specified by name (e.g. red), hex (e.g. */
13572
+ bodyTextColor?: string;
13573
+ /** A CSS font weight to be applied to the node's body text. */
13574
+ bodyTextFontWeight?: string;
13575
+ /** A CSS horizontal alignment to be applied to the node's body text. */
13576
+ bodyTextHorizontalAlign?: string;
13577
+ /** A CSS text decoration to be applied to the node's body text. */
13578
+ bodyTextDecoration?: string;
13579
+ /** A CSS vertical alignment to be applied to the node's body text. */
13580
+ bodyTextVerticalAlign?: string;
13581
+ /** The width of the node's body or the width of an edge's line. */
13582
+ width?: number;
13583
+ /** The height of the node's body */
13584
+ height?: number;
13585
+ /** The URL that points to the image to show in the node. */
13586
+ backgroundImage?: string;
13587
+ /** The colour of the node's body. Colours may be specified by name (e.g. red), hex (e.g. */
13588
+ backgroundColor?: string;
13589
+ /** Blackens the node's body for values from 0 to 1; whitens the node's body for values from 0 to -1. */
13590
+ backgroundBlacken?: number;
13591
+ /** The opacity level of the node's background colour */
13592
+ backgroundOpacity?: number;
13593
+ /** The x position of the background image, measured in percent (e.g. 50%) or pixels (e.g. 10px) */
13594
+ backgroundPositionX?: string;
13595
+ /** The y position of the background image, measured in percent (e.g. 50%) or pixels (e.g. 10px) */
13596
+ backgroundPositionY?: string;
13597
+ /** The x offset of the background image, measured in percent (e.g. 50%) or pixels (e.g. 10px) */
13598
+ backgroundOffsetX?: string;
13599
+ /** The y offset of the background image, measured in percent (e.g. 50%) or pixels (e.g. 10px) */
13600
+ backgroundOffsetY?: string;
13601
+ /** How the background image is fit to the node. Can be 'none', 'contain', or 'cover'. */
13602
+ backgroundFit?: "none" | "contain" | "cover";
13603
+ /** How the background image is clipped to the node. Can be 'none', 'node', or 'node-border'. */
13604
+ backgroundClip?: "none" | "node" | "node-border";
13605
+ /** How the background image's width is determined. Can be 'none', 'inner', or 'outer'. */
13606
+ backgroundWidthRelativeTo?: "none" | "inner" | "outer";
13607
+ /** How the background image's height is determined. Can be 'none', 'inner', or 'outer'. */
13608
+ backgroundHeightRelativeTo?: "none" | "inner" | "outer";
13609
+ /** The size of the node's border. */
13610
+ borderWidth?: number;
13611
+ /** The style of the node's border */
13612
+ borderStyle?: "solid" | "dotted" | "dashed" | "double";
13613
+ /** The colour of the node's border. Colours may be specified by name (e.g. red), hex (e.g. */
13614
+ borderColor?: string;
13615
+ /** The opacity of the node's border */
13616
+ borderOpacity?: number;
13617
+ /** The amount of padding around all sides of the node. */
13618
+ padding?: number;
13619
+ /** The horizontal alignment of a node's label */
13620
+ textHalign?: "left" | "center" | "right";
13621
+ /** The vertical alignment of a node's label */
13622
+ textValign?: "top" | "center" | "bottom";
13623
+ /** Whether to use the ghost effect, a semitransparent duplicate of the element drawn at an offset. */
13624
+ ghost?: "yes" | "no";
13625
+ /** The colour of the indicator shown when the background is grabbed by the user. Selector needs to be *core*. Colours may be specified by name (e.g. red), hex (e.g. */
13626
+ activeBgColor?: string;
13627
+ /** The opacity of the active background indicator. Selector needs to be *core*. */
13628
+ activeBgOpacity?: string;
13629
+ /** The opacity of the active background indicator. Selector needs to be *core*. */
13630
+ activeBgSize?: string;
13631
+ /** The background colour of the selection box used for drag selection. Selector needs to be *core*. Colours may be specified by name (e.g. red), hex (e.g. */
13632
+ selectionBoxColor?: string;
13633
+ /** The size of the border on the selection box. Selector needs to be *core* */
13634
+ selectionBoxBorderWidth?: number;
13635
+ /** The opacity of the selection box. Selector needs to be *core* */
13636
+ selectionBoxOpacity?: number;
13637
+ /** The colour of the area outside the viewport texture when initOptions.textureOnViewport === true. Selector needs to be *core*. Colours may be specified by name (e.g. red), hex (e.g. */
13638
+ outsideTextureBgColor?: string;
13639
+ /** The opacity of the area outside the viewport texture. Selector needs to be *core* */
13640
+ outsideTextureBgOpacity?: number;
13641
+ /** An array (or a space-separated string) of numbers ranging on [-1, 1], representing alternating x and y values (i.e. x1 y1 x2 y2, x3 y3 ...). This represents the points in the polygon for the node's shape. The bounding box of the node is given by (-1, -1), (1, -1), (1, 1), (-1, 1). The node's position is the origin (0, 0 ) */
13642
+ shapePolygonPoints?: string;
13643
+ /** The colour of the background of the component menu. Colours may be specified by name (e.g. red), hex (e.g. */
13644
+ menuBackgroundColor?: string;
13645
+ /** The opacity of the background of the component menu. */
13646
+ menuBackgroundOpacity?: number;
13647
+ /** The colour of the text or icons in the component menu. Colours may be specified by name (e.g. red), hex (e.g. */
13648
+ menuForgroundColor?: string;
13649
+ };
13650
+ /** Connection Status */
13651
+ status: "discovered" | "registered" | "connected" | "ignored" | "maintenance" | "disconnected" | "deleted" | "not found";
13652
+ /** Map describing the connection state machine. Each key is a current connection status and its value is the list of states the connection may transition to from that status, along with a description of each transition. */
13653
+ transitionMap?: {
13654
+ [key: string]: {
13655
+ /** The connection state reachable from the current state. */
13656
+ nextState: "discovered" | "registered" | "connected" | "ignored" | "maintenance" | "disconnected" | "deleted" | "not found";
13657
+ /** Human-readable explanation of when or why this transition occurs. */
13658
+ description?: string;
13659
+ }[];
13660
+ };
13661
+ /** User ID who owns this connection */
13662
+ owner?: string;
13663
+ /** Timestamp when the connection was created. */
13664
+ createdAt?: string;
13665
+ /** Timestamp when the connection was last updated. */
13666
+ updatedAt?: string;
13667
+ /** Timestamp when the connection was soft-deleted, if applicable. */
13668
+ deletedAt?: string | null;
13669
+ /** The organization the connection belongs to. The server sets it from the session organization (`X-Current-Orgid`, or the caller's selected organization when that header is absent) when the connection is registered, and keeps it on later updates. Never accepted from clients on connection write payloads. Not marked readOnly: `RegistrantData` inlines this entity into registry registration requests, and readOnly there drops the connection field from the generated RTK client. A value sent on that inlined connection is ignored. With the owner and `metadata.installationId`, it is the deduplication key for `desktop` connections.
13670
+ */
13671
+ organizationId: string;
13672
+ /** Associated environments for this connection */
13673
+ environments?: {
13674
+ /** ID */
13675
+ id: string;
13676
+ /** Specifies the version of the schema to which the environment conforms. */
13677
+ schemaVersion: string;
13678
+ /** Environment name */
13679
+ name: string;
13680
+ /** Environment description */
13681
+ description: string;
13682
+ /** Environment organization ID */
13683
+ organizationId: string;
13684
+ /** Environment owner */
13685
+ owner?: string;
13686
+ /** Timestamp when the environment was created. */
13687
+ createdAt?: string;
13688
+ /** Additional metadata associated with the environment. */
13689
+ metadata?: object;
13690
+ /** Timestamp when the environment was last updated. */
13691
+ updatedAt?: string;
13692
+ /** Timestamp when the environment was soft deleted. Null while the environment remains active. */
13693
+ deletedAt?: string | null;
13694
+ /** What the environment exists for. `user` is an ordinary environment that people create to logically group Connections and their Credentials. `administrative` designates an environment the platform itself provisions to hold organization-level configuration, and which resolvers of that configuration therefore trust. Profiles are not environments: they are their own construct (`schemas/constructs/v1beta3/profile`, served at `/api/profiles` and assigned to workspaces under `/api/workspaces/{workspaceId}/profiles`).
13695
+
13696
+ Absent means `user`. Nothing may read an unset or unrecognised value as administrative: test for the administrative value explicitly rather than for "not user", so the property fails closed.
13697
+
13698
+ At most one live environment per organization may carry any single privileged purpose - `administrative`, and each privileged value a later version adds. Name those values explicitly wherever the rule is enforced, including the database index predicate: a "not `user`" test also matches the empty value that unmigrated rows and un-normalised writes read back as, which means ordinary. A resolver that selects an environment by purpose MUST fail closed when more than one live row matches: return an error rather than whichever row the database happened to return first.
13699
+
13700
+ Privileged values are server-owned and never client-settable. `EnvironmentPayload`, which every environment POST and PUT requestBody references, accepts only the non-privileged value `user`, and the create-or-edit form has no field for it, so the environment create and update endpoints cannot designate an environment administrative. That restriction is a codegen guarantee, never access control: the registrant connection inlines the full environment entity, so `registerRegistryComponent` and `registerRegistryRelationship` do carry `purpose` in a request type and consumers MUST refuse it on input there too. Whatever surface a value arrives on, every consumer MUST assign this property only from server-side provisioning or a data migration. Permission to create an environment does not confer the ability to make one administrative.
13701
+
13702
+ The database index that enforces the uniqueness invariant, the migration path for environments that are administrative by naming convention today, and each consumer's obligations are specified in https://github.com/meshery/schemas/blob/master/docs/environment-purpose-contract.md. */
13703
+ purpose?: "user" | "administrative";
13704
+ }[];
13705
+ /** Specifies the version of the schema used for the definition. */
13706
+ schemaVersion: string;
13473
13707
  }[];
13474
13708
  };
13475
13709
  type GetEnvironmentConnectionsApiArg = {
@@ -13532,7 +13766,7 @@ type UpdateEventStatusApiArg = {
13532
13766
  };
13533
13767
  };
13534
13768
  type CreateEventApiResponse =
13535
- /** status 200 An event with this `idempotencyKey` was already recorded by the same caller; it is returned unchanged and no new event is recorded.
13769
+ /** status 200 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.
13536
13770
  */
13537
13771
  {
13538
13772
  /** Event ID. */
@@ -13545,7 +13779,7 @@ type CreateEventApiResponse =
13545
13779
  category: string;
13546
13780
  /** Human-readable summary of what happened. */
13547
13781
  description: string;
13548
- /** 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.
13782
+ /** 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.
13549
13783
  */
13550
13784
  metadata: {
13551
13785
  [key: string]: any;
@@ -13573,7 +13807,37 @@ type CreateEventApiResponse =
13573
13807
  visibility: "private" | "public";
13574
13808
  /** Timestamp when the event was soft-deleted; omitted when it was not. */
13575
13809
  deletedAt?: string | null;
13576
- } | /** status 201 Event created */ {
13810
+ /** Key of the ongoing condition the event records (see EventPayload.correlationKey and createEvent); omitted for an event that reports no condition.
13811
+ */
13812
+ correlationKey?: string;
13813
+ /** 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.
13814
+ */
13815
+ occurrenceCount?: number;
13816
+ /** 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.
13817
+ */
13818
+ firstSeenAt?: string;
13819
+ /** 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.
13820
+ */
13821
+ lastSeenAt?: string;
13822
+ /** 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.
13823
+ */
13824
+ resolvedAt?: string;
13825
+ /** 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.
13826
+ */
13827
+ source?: string;
13828
+ /** CloudEvents-compatible `type`, for example `io.meshery.user.signup`; see EventPayload.type. `category` and `action` stay the event's classification.
13829
+ */
13830
+ type?: string;
13831
+ /** The CloudEvents specification version the event is compatible with; see EventPayload.specversion. */
13832
+ specversion?: "1.0";
13833
+ /** W3C Trace Context `trace-id` of the operation the event belongs to, as its client minted it; see EventPayload.traceId.
13834
+ */
13835
+ traceId?: string;
13836
+ /** W3C Trace Context `parent-id` of the sub-operation that emitted the event; see EventPayload.parentId.
13837
+ */
13838
+ parentId?: string;
13839
+ } | /** status 201 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`.
13840
+ */ {
13577
13841
  /** Event ID. */
13578
13842
  id: string;
13579
13843
  /** ID of the entity on which the event was performed. */
@@ -13584,7 +13848,7 @@ type CreateEventApiResponse =
13584
13848
  category: string;
13585
13849
  /** Human-readable summary of what happened. */
13586
13850
  description: string;
13587
- /** 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.
13851
+ /** 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.
13588
13852
  */
13589
13853
  metadata: {
13590
13854
  [key: string]: any;
@@ -13612,6 +13876,35 @@ type CreateEventApiResponse =
13612
13876
  visibility: "private" | "public";
13613
13877
  /** Timestamp when the event was soft-deleted; omitted when it was not. */
13614
13878
  deletedAt?: string | null;
13879
+ /** Key of the ongoing condition the event records (see EventPayload.correlationKey and createEvent); omitted for an event that reports no condition.
13880
+ */
13881
+ correlationKey?: string;
13882
+ /** 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.
13883
+ */
13884
+ occurrenceCount?: number;
13885
+ /** 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.
13886
+ */
13887
+ firstSeenAt?: string;
13888
+ /** 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.
13889
+ */
13890
+ lastSeenAt?: string;
13891
+ /** 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.
13892
+ */
13893
+ resolvedAt?: string;
13894
+ /** 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.
13895
+ */
13896
+ source?: string;
13897
+ /** CloudEvents-compatible `type`, for example `io.meshery.user.signup`; see EventPayload.type. `category` and `action` stay the event's classification.
13898
+ */
13899
+ type?: string;
13900
+ /** The CloudEvents specification version the event is compatible with; see EventPayload.specversion. */
13901
+ specversion?: "1.0";
13902
+ /** W3C Trace Context `trace-id` of the operation the event belongs to, as its client minted it; see EventPayload.traceId.
13903
+ */
13904
+ traceId?: string;
13905
+ /** W3C Trace Context `parent-id` of the sub-operation that emitted the event; see EventPayload.parentId.
13906
+ */
13907
+ parentId?: string;
13615
13908
  };
13616
13909
  type CreateEventApiArg = {
13617
13910
  body: {
@@ -13625,9 +13918,42 @@ type CreateEventApiArg = {
13625
13918
  action?: string;
13626
13919
  /** Description of the event. */
13627
13920
  description?: string;
13921
+ /** 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.
13922
+ */
13923
+ severity?: string;
13628
13924
  /** 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.
13629
13925
  */
13630
13926
  idempotencyKey?: string;
13927
+ /** 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.
13928
+ */
13929
+ correlationKey?: string;
13930
+ /** 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.
13931
+ */
13932
+ occurrenceCount?: number;
13933
+ /** 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.
13934
+ */
13935
+ firstSeenAt?: string;
13936
+ /** 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`.
13937
+ */
13938
+ lastSeenAt?: string;
13939
+ /** 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.
13940
+ */
13941
+ resolvedAt?: string;
13942
+ /** 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.
13943
+ */
13944
+ source?: string;
13945
+ /** 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.
13946
+ */
13947
+ type?: string;
13948
+ /** 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.
13949
+ */
13950
+ specversion?: "1.0";
13951
+ /** 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.
13952
+ */
13953
+ traceId?: string;
13954
+ /** 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.
13955
+ */
13956
+ parentId?: string;
13631
13957
  [key: string]: any;
13632
13958
  };
13633
13959
  };