[
    {
        "type": "CREATE_BLOCK",
        "reason": "Block updated",
        "payload": {
            "archetype": "",
            "description": "Handles traffic from the backend services.",
            "name": "api-gateway",
            "resources": [
                {
                    "description": "",
                    "name": "posts",
                    "to": "post-service",
                    "type": "CLIENT"
                },
                {
                    "description": "",
                    "name": "comments",
                    "to": "comment-service",
                    "type": "CLIENT"
                }
            ],
            "type": "GATEWAY",
            "blockRef": "kapeta://kapeta/api-gateway:local",
            "instanceId": "6b247f30-dec4-5960-a8a0-f300caa95226"
        },
        "created": 1720784242064
    },
    {
        "type": "CREATE_BLOCK",
        "reason": "Block updated",
        "payload": {
            "archetype": "",
            "description": "Manages the creation, editing, and deletion of blog posts.",
            "name": "post-service",
            "resources": [
                {
                    "description": "The posts API provides endpoints for managing blog posts. It includes functionality for creating, editing, and deleting posts, as well as retrieving and searching for posts. The API is designed to be secure and follows best practices for authentication and authorization.",
                    "name": "posts",
                    "type": "API"
                }
            ],
            "type": "BACKEND",
            "blockRef": "kapeta://kapeta/post-service:local",
            "instanceId": "4e002962-ca24-5b8b-bcea-395b9bbf7c26"
        },
        "created": 1720784243137
    },
    {
        "type": "CREATE_BLOCK",
        "reason": "Block updated",
        "payload": {
            "archetype": "",
            "description": "Manages the creation, editing, and deletion of comments on blog posts.",
            "name": "comment-service",
            "resources": [
                {
                    "description": "The comments API provides endpoints for managing comments on blog posts. It includes functionality for creating, editing, and deleting comments, as well as retrieving and searching for comments. The API is designed to be secure and follows best practices for authentication and authorization.",
                    "name": "comments",
                    "type": "API"
                }
            ],
            "type": "BACKEND",
            "blockRef": "kapeta://kapeta/comment-service:local",
            "instanceId": "d4215220-f552-5a6d-9429-bef1c40c4d7c"
        },
        "created": 1720784243141
    },
    {
        "type": "CREATE_TYPE",
        "reason": "Create type for post-service",
        "payload": {
            "blockName": "post-service",
            "content": "enum Status {\n    NEW,\n    ARCHIVED\n}\n\ntype Result {\n    status: Status\n}\n\ntype User {\n   id: string\n}",
            "blockRef": "kapeta://kapeta/post-service:local",
            "instanceId": "4e002962-ca24-5b8b-bcea-395b9bbf7c26"
        },
        "created": 1720784233286
    },
    {
        "type": "CREATE_API",
        "reason": "Create API for post-service",
        "payload": {
            "blockName": "post-service",
            "content": "@GET(\"/status\")\ngetStatus(): Result",
            "blockRef": "kapeta://kapeta/post-service:local",
            "instanceId": "4e002962-ca24-5b8b-bcea-395b9bbf7c26"
        },
        "created": 1720784233290
    },
    {
        "type": "CREATE_TYPE",
        "reason": "Create type for comment-service",
        "payload": {
            "blockName": "comment-service",
            "content": "enum Status {\n    NEW,\n    APPROVED\n}\n\ntype Result {\n    status: Status\n}\n\ntype User {\n   id: string\n}",
            "blockRef": "kapeta://kapeta/comment-service:local",
            "instanceId": "d4215220-f552-5a6d-9429-bef1c40c4d7c"
        },
        "created": 1720784241000
    },
    {
        "type": "CREATE_API",
        "reason": "Create API for comment-service",
        "payload": {
            "blockName": "comment-service",
            "content": "@GET(\"/status\")\ngetStatus(): Result",
            "blockRef": "kapeta://kapeta/comment-service:local",
            "instanceId": "d4215220-f552-5a6d-9429-bef1c40c4d7c"
        },
        "created": 1720784241002
    },
    {
        "type": "CREATE_CONNECTION",
        "reason": "api-gateway needs to be able to serve the posts API from the post-service",
        "payload": {
            "fromComponent": "post-service",
            "fromResource": "posts",
            "fromResourceType": "API",
            "toComponent": "api-gateway",
            "toResource": "posts",
            "toResourceType": "CLIENT",
            "fromBlockId": "4e002962-ca24-5b8b-bcea-395b9bbf7c26",
            "toBlockId": "6b247f30-dec4-5960-a8a0-f300caa95226"
        },
        "created": 1720784243173
    },
    {
        "type": "CREATE_CONNECTION",
        "reason": "api-gateway needs to be able to serve the comments API from the comment-service",
        "payload": {
            "fromComponent": "comment-service",
            "fromResource": "comments",
            "fromResourceType": "API",
            "toComponent": "api-gateway",
            "toResource": "comments",
            "toResourceType": "CLIENT",
            "fromBlockId": "d4215220-f552-5a6d-9429-bef1c40c4d7c",
            "toBlockId": "6b247f30-dec4-5960-a8a0-f300caa95226"
        },
        "created": 1720784243174
    }
]
