diff --git a/docs/console/company-configuration/events.mdx b/docs/console/company-configuration/events.mdx index 5e4b075da8..028e64cb26 100644 --- a/docs/console/company-configuration/events.mdx +++ b/docs/console/company-configuration/events.mdx @@ -19,7 +19,6 @@ All the events triggered by the Console share some common properties: | `eventTimestamp` | `number` | The timestamp of the event emission | | `payload` | `object` | Contains the event-specific payload | - ## Event types Below are explained the events that can be triggered by the Console. @@ -101,9 +100,7 @@ This event will be triggered when a Project is created successfully. :::caution - The following schema is potentially non-exhaustive and may not cover all the possible properties of a Project resource. - ::: ```json @@ -461,6 +458,91 @@ hence there is no guarantee that the service will be found in the Project config +### Configuration saved + +This event will be triggered when the Project configuration is [successfully saved from Console Design section](/development_suite/api-console/api-design/overview.md#how-to-save-your-configuration). + + + + +| Property | Value | Description | +| -------------------- | -------- | ---------------------------------------------------------------------- | +| `tenantId` | `string` | The identifier of the Company the service belongs to | +| `projectId` | `string` | The identifier of the Project the service belongs to | +| `revisionName`  | `string` | The name of the saved revision (branch when using the standard workflow) | +| `savedChangesId`  | `string` | The changes id (commit for project using the standard workflow) used to register the saved configuration | +| `previousChangesId`  | `string` | The changes id (commit for project using the standard workflow) the current save started from | +| `startRef`  | `object` | Provided when saving on a new revision/branch | +| `startRef.name`  | `string` | Name of the original revision/branch/version/tag | +| `startRef.type`  | `string` | Type of the original ref used to start the current save, can be revision/version or branch/tag based on the used workflow | +| `author`  | `object` | Contains information about the save author | +| `author.id`  | `string` | Contains the id of the user performing the save | +| `author.name`  | `string` | Contains the name of the user performing the save | + + + + +```json +{ + "eventName": "tag_created", + "eventTimestamp": 123456, + "payload": { + "tenantId": "my-company-id", + "projectId": "0000000000000001", + "revisionName": "main", + "savedChangesId": "the-current-commit-id", + "previousChangesId": "the-previous-commit-id", + "author": { + "id": "the-user-id", + "name": "John Smith" + } + } +} +``` + + + + +```json +{ + "type": "object", + "required": ["eventName", "eventTimestamp", "payload"], + "additionalProperties": false, + "properties": { + "eventName": {"const": "configuration_saved", "type": "string"}, + "eventTimestamp": {"type": "number"}, + "payload": { + "type": "object", + "properties": { + "tenantId": {"type": "string"}, + "projectId": {"type": "string"}, + "revisionName": {"type": "string"}, + "savedChangesId": {"type": "string"}, + "previousChangesId": {"type": "string"}, + "startRef": { + "type":"object", + "properties": { + "name": {"type": "string"}, + "type": {"type": "string"} + } + }, + "author": { + "type": "object", + "properties": { + "id": {"type":"string"}, + "name": {"type":"string", "x-confidential": true} + } + } + } + } + } +} +``` + + + + + ### Tag or Version Created This event will be triggered when [a Project is successfully tagged from Console](/development_suite/api-console/api-design/overview.md#create-tag). @@ -539,167 +621,166 @@ In an Enhanced Workflow project, this event will be triggered when a version is -:::caution +:::caution The following schema is potentially non-exhaustive and may not cover all the possible properties of a Project resource. - ::: ```json { - "description": "The Project metadata (ideally, the whole Project resource)", - "type": "object", - "properties": { - "_id": { - "type": "string" - }, - "availableNamespaces": { - "type": "array", - "default": [], - "items": { - "type": "object", - "properties": { - "value": { - "type": "string" - }, - "label": { - "type": "string" - } + "description": "The Project metadata (ideally, the whole Project resource)", + "type": "object", + "properties": { + "_id": { + "type": "string" + }, + "availableNamespaces": { + "type": "array", + "default": [], + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" }, - "required": [ - "value" - ] - } - }, - "configurationGitPath": { - "type": "string" - }, - "defaultBranch": { - "type": "string" - }, - "description": { - "type": "string" - }, - "environments": { - "type": "array", - "default": [], - "items": { - "type": "object", - "properties": { - "label": { - "type": "string" - }, - "envId": { - "type": "string" - }, - "envPrefix": { - "type": "string" - }, - "hosts": { - "type": "array", - "items": { - "type": "object", - "properties": { - "host": { - "type": "string" - }, - "isBackoffice": { - "type": "boolean" - }, - "scheme": { - "type": "string", - "description": "an url schema, usually one of 'http' or 'https'" - } - } - } - }, - "description": { - "type": "string" - }, - "isProduction": { - "type": "boolean", - "default": false - }, - "cluster": { + "label": { + "type": "string" + } + }, + "required": [ + "value" + ] + } + }, + "configurationGitPath": { + "type": "string" + }, + "defaultBranch": { + "type": "string" + }, + "description": { + "type": "string" + }, + "environments": { + "type": "array", + "default": [], + "items": { + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "envId": { + "type": "string" + }, + "envPrefix": { + "type": "string" + }, + "hosts": { + "type": "array", + "items": { "type": "object", "properties": { - "namespace": { + "host": { "type": "string" }, - "clusterId": { - "type": "string" - } - } - }, - "deploy": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string" + "isBackoffice": { + "type": "boolean" + }, + "scheme": { + "type": "string", + "description": "an url schema, usually one of 'http' or 'https'" } } } }, - "required": [ - "envId" - ] - } - }, - "name": { - "type": "string" - }, - "projectId": { - "type": "string" - }, - "repository": { - "type": "object", - "properties": { - "type": { + "description": { "type": "string" }, - "providerId": { - "type": "string" + "isProduction": { + "type": "boolean", + "default": false + }, + "cluster": { + "type": "object", + "properties": { + "namespace": { + "type": "string" + }, + "clusterId": { + "type": "string" + } + } + }, + "deploy": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string" + } + } } - } - }, - "repositoryUrl": { - "type": "string" - }, - "tenantId": { - "type": "string" - }, - "imagePullSecretNames": { - "type": "array", - "items": { + }, + "required": [ + "envId" + ] + } + }, + "name": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "repository": { + "type": "object", + "properties": { + "type": { "type": "string" - } - }, - "monitoring": { - "type": "object", - "properties": { - "systems": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string" - } - }, - "required": ["type"] - } - } }, - "required": ["systems"] - }, - "containerRegistries": { - "type": "array" + "providerId": { + "type": "string" + } + } + }, + "repositoryUrl": { + "type": "string" + }, + "tenantId": { + "type": "string" + }, + "imagePullSecretNames": { + "type": "array", + "items": { + "type": "string" } + }, + "monitoring": { + "type": "object", + "properties": { + "systems": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": ["type"] + } + } + }, + "required": ["systems"] + }, + "containerRegistries": { + "type": "array" } } +} ```