{
  "asyncapi": "3.0.0",
  "info": {
    "title": "analytics/change-stores",
    "version": ""
  },
  "channels": {
    "systemEventsAnalyticsChangeStore": {
      "address": "system-events.analytics.change-store",
      "messages": {
        "analyticsChangeStoreChangesSaved": {
          "$ref": "#/components/messages/analytics.analyticsChangeStoreChangesSaved"
        }
      }
    }
  },
  "operations": {
    "analyticsChangeStoreChangesSaved": {
      "action": "send",
      "channel": {
        "$ref": "#/channels/systemEventsAnalyticsChangeStore"
      },
      "messages": [
        {
          "$ref": "#/channels/systemEventsAnalyticsChangeStore/messages/analyticsChangeStoreChangesSaved"
        }
      ]
    }
  },
  "components": {
    "messages": {
      "analytics.analyticsChangeStoreChangesSaved": {
        "name": "com.qlik.analytics.change-store.changes.saved",
        "tags": [
          {
            "name": "change-store"
          }
        ],
        "title": "Changes saved event for webhooks",
        "payload": {
          "type": "object",
          "allOf": [
            {
              "$ref": "#/components/schemas/cloudEvents"
            },
            {
              "type": "object",
              "properties": {
                "data": {
                  "type": "object",
                  "examples": [
                    {
                      "ownerId": "storeOwner1234",
                      "spaceId": "space123",
                      "storeId": "store012",
                      "tenantId": "tenant123",
                      "createdBy": "user345",
                      "committedAt": "2024-01-01T12:20:00Z"
                    }
                  ],
                  "properties": {
                    "ownerId": {
                      "type": "string",
                      "description": "The user that created the change-store. It is empty if the space is shared."
                    },
                    "spaceId": {
                      "type": "string",
                      "description": "The space that the change-store belongs to. It is empty if the space is personal."
                    },
                    "storeId": {
                      "type": "string",
                      "description": "The change-store unique identifier."
                    },
                    "tenantId": {
                      "type": "string",
                      "description": "The tenant where the change-store has been created."
                    },
                    "createdBy": {
                      "type": "string",
                      "description": "The user that saved the changes."
                    },
                    "committedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "The timestamp when the changes have been saved."
                    }
                  },
                  "description": "The data payload for changes saved event."
                },
                "type": {
                  "type": "string",
                  "default": "com.qlik.analytics.change-store.changes.saved",
                  "description": "The event type"
                }
              }
            }
          ]
        },
        "description": "Changes have been saved.",
        "x-qlik-deprecated": false,
        "x-qlik-stability": "stable",
        "x-qlik-visibility": "public"
      }
    },
    "schemas": {
      "cloudEvents": {
        "type": "object",
        "examples": [
          {
            "id": "id123",
            "time": "2018-10-30T07:06:22Z",
            "type": "com.qlik.analytics.write-table-event.proxied",
            "source": "com.qlik/write-table",
            "userid": "id123",
            "tenantid": "id123",
            "specversion": "1.0",
            "datacontenttype": "application/json"
          }
        ],
        "properties": {
          "id": {
            "type": "string",
            "examples": [
              "id123"
            ],
            "description": "Unique identifier for the event."
          },
          "time": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2018-10-30T07:06:22Z"
            ],
            "description": "Timestamp of when the event happened."
          },
          "type": {
            "type": "string",
            "examples": [
              "com.qlik.analytics.write-table-event.proxied"
            ],
            "description": "Content type"
          },
          "source": {
            "type": "string",
            "default": "com.qlik/write-table",
            "description": "The source of the event."
          },
          "userid": {
            "type": "string",
            "examples": [
              "id123"
            ],
            "description": "Unique identifier for the user triggering the event."
          },
          "tenantid": {
            "type": "string",
            "examples": [
              "id123"
            ],
            "description": "Unique identifier for the tenant related to the event."
          },
          "specversion": {
            "enum": [
              "1.0"
            ],
            "type": "string",
            "examples": [
              "1.0"
            ],
            "description": "The event is compatible with the CloudEvents specification v1.0"
          },
          "datacontenttype": {
            "type": "string",
            "default": "application/json",
            "description": "The content type of the event payload."
          }
        },
        "description": "CloudEvents schema v1.0"
      }
    }
  }
}