From d3f48026015be5dbbb27cd39ae162e2fb629f2e3 Mon Sep 17 00:00:00 2001 From: Karl Rankla Date: Fri, 9 Oct 2026 12:08:02 +0300 Subject: [PATCH] docs(integrations): document grid lifecycle and plant registration core events Adds GridConnectionProgressed, GridPlantRegistrationRequested and GridPlantRegistrationProgressed to the Grid section, marks the grid events as early access, and refreshes GridConnectionRequested (new accounts node). Snapshots copied from event-catalog-api feat/grid-lifecycle-events-feature-flag. --- docs/integrations/core-events.md | 12 + .../GridConnectionProgressed.config.json | 213 ++ .../GridConnectionProgressed.sample.json | 1125 +++++++ .../GridConnectionProgressed.schema.json | 2794 +++++++++++++++++ .../GridConnectionRequested.config.json | 9 + .../GridConnectionRequested.sample.json | 170 + .../GridConnectionRequested.schema.json | 345 ++ ...ridPlantRegistrationProgressed.config.json | 203 ++ ...ridPlantRegistrationProgressed.sample.json | 752 +++++ ...ridPlantRegistrationProgressed.schema.json | 1747 +++++++++++ ...GridPlantRegistrationRequested.config.json | 164 + ...GridPlantRegistrationRequested.sample.json | 741 +++++ ...GridPlantRegistrationRequested.schema.json | 1708 ++++++++++ 13 files changed, 9983 insertions(+) create mode 100644 static/events/GridConnectionProgressed.config.json create mode 100644 static/events/GridConnectionProgressed.sample.json create mode 100644 static/events/GridConnectionProgressed.schema.json create mode 100644 static/events/GridPlantRegistrationProgressed.config.json create mode 100644 static/events/GridPlantRegistrationProgressed.sample.json create mode 100644 static/events/GridPlantRegistrationProgressed.schema.json create mode 100644 static/events/GridPlantRegistrationRequested.config.json create mode 100644 static/events/GridPlantRegistrationRequested.sample.json create mode 100644 static/events/GridPlantRegistrationRequested.schema.json diff --git a/docs/integrations/core-events.md b/docs/integrations/core-events.md index 4d3d024..9aa87bc 100644 --- a/docs/integrations/core-events.md +++ b/docs/integrations/core-events.md @@ -82,8 +82,20 @@ See [Event Catalog Trigger](/docs/automation/event-catalog-trigger) for configur ### Grid +:::info Early access +The grid events are in early access and only listed for organizations that have them enabled. Contact epilot to get access. +::: + +Each grid process runs on one opportunity. The `…Requested` event fires when the request is submitted; the `…Progressed` event fires at any later step the organization's automation chooses (follow-up journeys, completion, cancellation) and carries a full snapshot of the process plus its current `stage` (workflow phase and status, opportunity status). Parties are delivered as `contacts` and `accounts`, with their role on the request in `relation_tags`. + + + + + + + ### ERP Sync diff --git a/static/events/GridConnectionProgressed.config.json b/static/events/GridConnectionProgressed.config.json new file mode 100644 index 0000000..6cf08e0 --- /dev/null +++ b/static/events/GridConnectionProgressed.config.json @@ -0,0 +1,213 @@ +{ + "event_name": "GridConnectionProgressed", + "event_title": "Grid Connection Progress", + "event_description": "A grid connection process (new connection or change of an existing connection — electricity, gas, water, district heating, fibre) reached a further step, was completed or was cancelled. Explicitly triggered by Automation; carries a full snapshot of the process and where it stands.", + "event_version": "1.0", + "event_tags": [ + "builtin", + "grid", + "automation", + "opportunity", + "order", + "attachment", + "grid-connection" + ], + "schema_fields": { + "stage": { + "json_schema": { + "type": "object", + "properties": { + "workflow_definition_id": { + "type": "string", + "description": "ID of the workflow definition running the process" + }, + "workflow_status": { + "type": "string", + "description": "Status of the workflow, e.g. `STARTED` while running, `DONE` once completed, `CLOSED` once cancelled" + }, + "phase_id": { + "type": "string", + "description": "ID of the current workflow phase. Stable per workflow definition — match on this rather than the name" + }, + "phase_name": { + "type": "string", + "description": "Name of the current workflow phase as configured by the organization" + }, + "task_id": { + "type": "string", + "description": "ID of the current workflow task" + }, + "task_name": { + "type": "string", + "description": "Name of the current workflow task" + }, + "opportunity_status": { + "type": "string", + "description": "Status of the opportunity, e.g. `open`, `in_progress`, `closed`, `cancelled`" + } + }, + "additionalProperties": false, + "description": "Where the process stands when the event fires: the opportunity's primary workflow (status, current phase and task) and the opportunity status. Completion and cancellation show here — `workflow_status` / `opportunity_status`." + }, + "required": true, + "graph_source": "{\"workflow_definition_id\": opportunity.workflows.primary.definition_id, \"workflow_status\": opportunity.workflows.primary.status, \"phase_id\": opportunity.workflows.primary.phase_id, \"phase_name\": opportunity.workflows.primary.phase_name, \"task_id\": opportunity.workflows.primary.task_id, \"task_name\": opportunity.workflows.primary.task_name, \"opportunity_status\": opportunity.status}" + }, + "event_attachments": { + "json_schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entity_id": { + "type": "string", + "format": "uuid", + "description": "Entity ID of the file" + }, + "filename": { + "type": "string", + "description": "Name of the file" + }, + "mime_type": { + "type": "string", + "description": "MIME type of the file (e.g., application/pdf)" + }, + "size_bytes": { + "type": "integer", + "minimum": 0, + "description": "File size in bytes" + }, + "s3ref": { + "type": "object", + "properties": { + "bucket": { + "type": "string", + "description": "S3 bucket name" + }, + "key": { + "type": "string", + "description": "S3 object key" + } + }, + "required": [ + "bucket", + "key" + ], + "additionalProperties": false, + "description": "S3 reference for the file content" + }, + "version_index": { + "type": "integer", + "minimum": 0, + "description": "Latest version index of the file (versions[].length - 1, or 0 if no versions array)" + }, + "readable_size": { + "type": "string", + "description": "Human-readable file size (e.g., \"200 KB\")" + }, + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags on the file entity (semantic labels set by uploader/automation)" + }, + "relation_tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags on the relation pointing at the file (journey upload block tags such as \"Lageplan\", plus a hidden journey step marker)" + }, + "category": { + "type": "string", + "description": "File category select value (e.g., \"address-suggestions\", \"unknown\")" + }, + "file_date": { + "type": "string", + "description": "User-provided file date" + }, + "_created_at": { + "type": "string", + "format": "date-time", + "description": "When the file entity was created — useful for time-window filtering" + } + }, + "required": [ + "entity_id", + "version_index" + ], + "additionalProperties": false + }, + "description": "Every file related to the opportunity — the documents uploaded by the start journey and every follow-up journey. Empty when the process carries none. Consumers identify a given upload via `relation_tags` (the journey upload block tags) / `_tags`." + }, + "required": true, + "graph_source": "[opportunity_files.{\"entity_id\": _id, \"filename\": filename, \"mime_type\": mime_type, \"size_bytes\": size_bytes, \"s3ref\": s3ref, \"version_index\": ($count(versions) > 0 ? $count(versions) - 1 : 0), \"readable_size\": readable_size, \"_tags\": _tags, \"relation_tags\": relation_tags, \"category\": category, \"file_date\": file_date, \"_created_at\": _created_at}]" + } + }, + "entity_graph": { + "nodes": [ + { + "id": "opportunity", + "schema": "opportunity", + "cardinality": "one" + }, + { + "id": "submissions", + "schema": "submission", + "cardinality": "many", + "fields": [ + "!token_claims", + "!_historyIndexes", + "!_displayConditionsStatus", + "!_validation_warnings", + "!_fallback" + ] + }, + { + "id": "contacts", + "schema": "contact", + "cardinality": "many" + }, + { + "id": "accounts", + "schema": "account", + "cardinality": "many" + }, + { + "id": "orders", + "schema": "order", + "cardinality": "many" + }, + { + "id": "opportunity_files", + "schema": "file", + "cardinality": "many" + } + ], + "edges": [ + { + "from": "opportunity", + "to": "submissions" + }, + { + "from": "opportunity", + "to": "contacts" + }, + { + "from": "opportunity", + "to": "accounts" + }, + { + "from": "opportunity", + "to": "orders" + }, + { + "from": "opportunity", + "to": "opportunity_files" + } + ] + }, + "automation_trigger": true, + "automation_trigger_only": true, + "automation_trigger_seed_node": "opportunity" +} \ No newline at end of file diff --git a/static/events/GridConnectionProgressed.sample.json b/static/events/GridConnectionProgressed.sample.json new file mode 100644 index 0000000..de63f7f --- /dev/null +++ b/static/events/GridConnectionProgressed.sample.json @@ -0,0 +1,1125 @@ +{ + "_org_id": "123", + "_event_time": "1970-01-01T00:00:00.000Z", + "_event_id": "string", + "_event_name": "GridConnectionProgressed", + "_event_version": "1.0", + "_event_source": "automation", + "_ack_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_trigger_source_type": "automation", + "_trigger_source": "execution-id/action-id", + "_automation_chain": [ + "string" + ], + "_has_pending_changesets": true, + "_changeset_edit_modes": [ + "string" + ], + "_changeset_attributes": [ + "string" + ], + "_changeset_edit_modes_by_attribute": {}, + "stage": { + "workflow_definition_id": "string", + "workflow_status": "string", + "phase_id": "string", + "phase_name": "string", + "task_id": "string", + "task_name": "string", + "opportunity_status": "string" + }, + "event_attachments": [ + { + "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "filename": "string", + "mime_type": "string", + "size_bytes": 0, + "s3ref": { + "bucket": "string", + "key": "string" + }, + "version_index": 0, + "readable_size": "string", + "_tags": [ + "string" + ], + "relation_tags": [ + "string" + ], + "category": "string", + "file_date": "string", + "_created_at": "1970-01-01T00:00:00.000Z" + } + ], + "opportunity": { + "_schema": "opportunity", + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_title": "John Doe", + "_tags": [ + "family:label" + ], + "_purpose": [ + "7675dc56-fd1b-46ee-9c35-defe0667b32e" + ], + "opportunity_title": "string", + "opportunity_number": "string", + "status": "open", + "due_date": "1970-01-01T00:00:00.000Z", + "description": "string", + "assignee": { + "id": "string", + "organization_id": "123", + "email": "user@example.com", + "display_name": "John Doe", + "name": "John Doe", + "preferred_language": "de", + "signature": "

Best regards,
John Doe

", + "roles": [ + "Owner" + ], + "image_uri": { + "original": "https://account-profile-images.epilot.cloud/1/avatar.png", + "thumbnail_32": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + }, + "properties": [ + { + "name": "profileImageName", + "value": "avatar.png" + } + ] + }, + "source": { + "type": "link", + "title": "Visit Website", + "href": "https://example.com" + }, + "customer": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "billing_address": { + "$relation_ref": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "path": "address", + "_tags": [ + "example" + ], + "_id": "xHcOoJCa07eysJ1GaQeSb" + } + ] + }, + "delivery_address": { + "$relation_ref": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "path": "address", + "_tags": [ + "example" + ], + "_id": "xHcOoJCa07eysJ1GaQeSb" + } + ] + }, + "address": { + "$relation_ref": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "path": "address", + "_tags": [ + "example" + ], + "_id": "xHcOoJCa07eysJ1GaQeSb" + } + ] + }, + "payment": { + "$relation_ref": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "path": "address", + "_tags": [ + "example" + ], + "_id": "xHcOoJCa07eysJ1GaQeSb" + } + ] + }, + "dates": [ + { + "_tags": [ + "string" + ], + "value": "1970-01-01T00:00:00.000Z" + } + ], + "items": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "products": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "workflows": { + "primary": { + "id": "string", + "definition_id": "string", + "name": "string", + "status": "STARTED", + "assignees": [ + "string" + ], + "progress": 0, + "phases_in_progress": [ + { + "phase_id": "string", + "phase_name": "string", + "phase_progress": 0 + } + ], + "last_update_time": "1970-01-01T00:00:00.000Z", + "upcoming_tasks_assignees": [ + "string" + ], + "task_id": "string", + "task_name": "string", + "task_assignees": [ + "string" + ], + "task_duedate": "1970-01-01T00:00:00.000Z", + "task_execution_type": "MANUAL", + "task_status": "UNASSIGNED", + "phase_id": "string", + "phase_name": "string", + "phase_assignees": [ + "string" + ], + "phase_progress": 0 + } + }, + "consents": { + "_isValid": true + }, + "_files": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z" + }, + "submissions": [ + { + "_schema": "submission", + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_title": "John Doe", + "_tags": [ + "family:label" + ], + "_purpose": [ + "7675dc56-fd1b-46ee-9c35-defe0667b32e" + ], + "source": { + "type": "link", + "title": "Visit Website", + "href": "https://example.com" + }, + "mapped_entities": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "workflows": { + "primary": { + "id": "string", + "definition_id": "string", + "name": "string", + "status": "STARTED", + "assignees": [ + "string" + ], + "progress": 0, + "phases_in_progress": [ + { + "phase_id": "string", + "phase_name": "string", + "phase_progress": 0 + } + ], + "last_update_time": "1970-01-01T00:00:00.000Z", + "upcoming_tasks_assignees": [ + "string" + ], + "task_id": "string", + "task_name": "string", + "task_assignees": [ + "string" + ], + "task_duedate": "1970-01-01T00:00:00.000Z", + "task_execution_type": "MANUAL", + "task_status": "UNASSIGNED", + "phase_id": "string", + "phase_name": "string", + "phase_assignees": [ + "string" + ], + "phase_progress": 0 + } + }, + "_files": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z" + } + ], + "contacts": [ + { + "_schema": "contact", + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_title": "John Doe", + "_tags": [ + "family:label" + ], + "_purpose": [ + "7675dc56-fd1b-46ee-9c35-defe0667b32e" + ], + "salutation": "null", + "title": "null", + "first_name": "string", + "last_name": "string", + "customer_number": "string", + "birthdate": "2025-01-01", + "email": [ + { + "_tags": [ + "string" + ], + "email": "user@example.com" + } + ], + "phone": [ + { + "_tags": [ + "string" + ], + "phone": "+491234567890" + } + ], + "communication_preference": "postal", + "address": [ + { + "_tags": [ + "billing" + ], + "street": "Hauptstraße", + "street_number": "123", + "postal_code": "50668", + "city": "Cologne", + "country": "DE", + "additional_info": "string", + "company_name": "string", + "first_name": "string", + "last_name": "string", + "salutation": "string", + "title": "string", + "coordinates": "50.948484, 6.943147", + "plot_of_land": "string", + "plot_area": "string", + "start_date": "1970-01-01", + "end_date": "1970-01-01" + } + ], + "payment": [ + { + "type": "payment_sepa", + "data": { + "bank_name": "Deutsche Bank", + "iban": "DE89370400440532013000", + "bic_number": "DEUTDEFF", + "fullname": "John Doe" + } + } + ], + "account": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "marketing_permission": true, + "contact_owner": { + "id": "string", + "organization_id": "123", + "email": "user@example.com", + "display_name": "John Doe", + "name": "John Doe", + "preferred_language": "de", + "signature": "

Best regards,
John Doe

", + "roles": [ + "Owner" + ], + "image_uri": { + "original": "https://account-profile-images.epilot.cloud/1/avatar.png", + "thumbnail_32": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + }, + "properties": [ + { + "name": "profileImageName", + "value": "avatar.png" + } + ] + }, + "consent_email_marketing": { + "type": "consent", + "topic": "string", + "identifiers": [ + "string" + ] + }, + "consent_sms_marketing": { + "type": "consent", + "topic": "string", + "identifiers": [ + "string" + ] + }, + "consent_phone_call": { + "type": "consent", + "topic": "string", + "identifiers": [ + "string" + ] + }, + "consent_print_marketing": { + "type": "consent", + "topic": "string", + "identifiers": [ + "string" + ] + }, + "portal_users": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "opportunities": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "orders": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "contracts": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "external_id": "string", + "workflows": { + "primary": { + "id": "string", + "definition_id": "string", + "name": "string", + "status": "STARTED", + "assignees": [ + "string" + ], + "progress": 0, + "phases_in_progress": [ + { + "phase_id": "string", + "phase_name": "string", + "phase_progress": 0 + } + ], + "last_update_time": "1970-01-01T00:00:00.000Z", + "upcoming_tasks_assignees": [ + "string" + ], + "task_id": "string", + "task_name": "string", + "task_assignees": [ + "string" + ], + "task_duedate": "1970-01-01T00:00:00.000Z", + "task_execution_type": "MANUAL", + "task_status": "UNASSIGNED", + "phase_id": "string", + "phase_name": "string", + "phase_assignees": [ + "string" + ], + "phase_progress": 0 + } + }, + "_files": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z" + } + ], + "accounts": [ + { + "_schema": "account", + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_title": "John Doe", + "_tags": [ + "family:label" + ], + "_purpose": [ + "7675dc56-fd1b-46ee-9c35-defe0667b32e" + ], + "name": "string", + "customer_number": "string", + "registry_court": "string", + "registry_number": "string", + "tax_id": "string", + "tax_exemption": true, + "annual_revenue_currency": "EUR", + "annual_revenue_decimal": "123.45", + "annual_revenue": 0, + "industry": [ + "string" + ], + "company_size": "", + "website": "string", + "marketing_permission": true, + "address": [ + { + "_tags": [ + "billing" + ], + "street": "Hauptstraße", + "street_number": "123", + "postal_code": "50668", + "city": "Cologne", + "country": "DE", + "additional_info": "string", + "company_name": "string", + "first_name": "string", + "last_name": "string", + "salutation": "string", + "title": "string", + "coordinates": "50.948484, 6.943147", + "plot_of_land": "string", + "plot_area": "string", + "start_date": "1970-01-01", + "end_date": "1970-01-01" + } + ], + "payment": [ + { + "type": "payment_sepa", + "data": { + "bank_name": "Deutsche Bank", + "iban": "DE89370400440532013000", + "bic_number": "DEUTDEFF", + "fullname": "John Doe" + } + } + ], + "contacts": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "assigned_to": { + "id": "string", + "organization_id": "123", + "email": "user@example.com", + "display_name": "John Doe", + "name": "John Doe", + "preferred_language": "de", + "signature": "

Best regards,
John Doe

", + "roles": [ + "Owner" + ], + "image_uri": { + "original": "https://account-profile-images.epilot.cloud/1/avatar.png", + "thumbnail_32": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + }, + "properties": [ + { + "name": "profileImageName", + "value": "avatar.png" + } + ] + }, + "email": [ + { + "_tags": [ + "string" + ], + "email": "user@example.com" + } + ], + "phone": [ + { + "_tags": [ + "string" + ], + "phone": "+491234567890" + } + ], + "opportunities": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "workflows": { + "primary": { + "id": "string", + "definition_id": "string", + "name": "string", + "status": "STARTED", + "assignees": [ + "string" + ], + "progress": 0, + "phases_in_progress": [ + { + "phase_id": "string", + "phase_name": "string", + "phase_progress": 0 + } + ], + "last_update_time": "1970-01-01T00:00:00.000Z", + "upcoming_tasks_assignees": [ + "string" + ], + "task_id": "string", + "task_name": "string", + "task_assignees": [ + "string" + ], + "task_duedate": "1970-01-01T00:00:00.000Z", + "task_execution_type": "MANUAL", + "task_status": "UNASSIGNED", + "phase_id": "string", + "phase_name": "string", + "phase_assignees": [ + "string" + ], + "phase_progress": 0 + } + }, + "_files": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z" + } + ], + "orders": [ + { + "_schema": "order", + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_title": "John Doe", + "_tags": [ + "family:label" + ], + "_purpose": [ + "7675dc56-fd1b-46ee-9c35-defe0667b32e" + ], + "order_number": "string", + "status": "draft", + "expires_at": "2025-01-01", + "source": { + "type": "link", + "title": "Visit Website", + "href": "https://example.com" + }, + "payment_method": { + "type": "payment_sepa", + "data": { + "bank_name": "Deutsche Bank", + "iban": "DE89370400440532013000", + "bic_number": "DEUTDEFF", + "fullname": "John Doe" + } + }, + "customer": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "billing_contact": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "billing_first_name": "string", + "billing_last_name": "string", + "billing_email": "string", + "billing_phone": "string", + "billing_company_name": "string", + "billing_vat": "string", + "billing_address": [ + { + "_tags": [ + "billing" + ], + "street": "Hauptstraße", + "street_number": "123", + "postal_code": "50668", + "city": "Cologne", + "country": "DE", + "additional_info": "string", + "company_name": "string", + "first_name": "string", + "last_name": "string", + "salutation": "string", + "title": "string", + "coordinates": "50.948484, 6.943147", + "plot_of_land": "string", + "plot_area": "string", + "start_date": "1970-01-01", + "end_date": "1970-01-01" + } + ], + "delivery_address": [ + { + "_tags": [ + "billing" + ], + "street": "Hauptstraße", + "street_number": "123", + "postal_code": "50668", + "city": "Cologne", + "country": "DE", + "additional_info": "string", + "company_name": "string", + "first_name": "string", + "last_name": "string", + "salutation": "string", + "title": "string", + "coordinates": "50.948484, 6.943147", + "plot_of_land": "string", + "plot_area": "string", + "start_date": "1970-01-01", + "end_date": "1970-01-01" + } + ], + "additional_addresses": [ + { + "_tags": [ + "billing" + ], + "street": "Hauptstraße", + "street_number": "123", + "postal_code": "50668", + "city": "Cologne", + "country": "DE", + "additional_info": "string", + "company_name": "string", + "first_name": "string", + "last_name": "string", + "salutation": "string", + "title": "string", + "coordinates": "50.948484, 6.943147", + "plot_of_land": "string", + "plot_area": "string", + "start_date": "1970-01-01", + "end_date": "1970-01-01" + } + ], + "dates": [ + { + "_tags": [ + "string" + ], + "value": "1970-01-01T00:00:00.000Z" + } + ], + "memo": "string", + "footer_notes": "string", + "currency": "string", + "amount_total": 0, + "amount_subtotal": 0, + "amount_tax": 0, + "products": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "prices": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "workflows": { + "primary": { + "id": "string", + "definition_id": "string", + "name": "string", + "status": "STARTED", + "assignees": [ + "string" + ], + "progress": 0, + "phases_in_progress": [ + { + "phase_id": "string", + "phase_name": "string", + "phase_progress": 0 + } + ], + "last_update_time": "1970-01-01T00:00:00.000Z", + "upcoming_tasks_assignees": [ + "string" + ], + "task_id": "string", + "task_name": "string", + "task_assignees": [ + "string" + ], + "task_duedate": "1970-01-01T00:00:00.000Z", + "task_execution_type": "MANUAL", + "task_status": "UNASSIGNED", + "phase_id": "string", + "phase_name": "string", + "phase_assignees": [ + "string" + ], + "phase_progress": 0 + } + }, + "consents": { + "_isValid": true + }, + "line_items": [ + { + "price_id": "123e4567-e89b-12d3-a456-426614174000", + "product_id": "123e4567-e89b-12d3-a456-426614174000", + "quantity": 0, + "description": "string", + "unit_amount": 0, + "unit_amount_decimal": "string", + "pricing_model": "per_unit", + "_price": { + "_id": "123e4567-e89b-12d3-a456-426614174000", + "_title": "string", + "description": "string", + "unit_amount": 0, + "unit_amount_decimal": "string", + "unit_amount_currency": "string", + "active": true, + "sales_tax": "string", + "tax_behavior": "string", + "price_display_in_journeys": "string", + "type": "string", + "billing_period": "string", + "billing_duration_unit": "string", + "notice_time_unit": "string", + "termination_time_unit": "string", + "renewal_duration_unit": "string", + "internal_description": "string", + "pricing_model": "string", + "is_tax_inclusive": true, + "headline": "string", + "subHeadline": "string", + "group": "string" + }, + "_product": { + "type": "product", + "_title": "string", + "name": "string", + "description": "string", + "price_options": [ + { + "_id": "123e4567-e89b-12d3-a456-426614174000", + "_title": "string", + "description": "string", + "unit_amount": 0, + "unit_amount_decimal": "string", + "unit_amount_currency": "string", + "active": true, + "_schema": "string", + "_org": "string", + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z", + "sales_tax": "string", + "tax_behavior": "string", + "price_display_in_journeys": "string", + "type": "string", + "billing_period": "string", + "billing_duration_unit": "string", + "notice_time_unit": "string", + "termination_time_unit": "string", + "renewal_duration_unit": "string", + "internal_description": "string", + "_owners": [ + { + "org_id": "string" + } + ], + "pricing_model": "string", + "is_tax_inclusive": true, + "_acl": { + "view": [ + "string" + ], + "edit": [ + "string" + ], + "delete": [ + "string" + ] + }, + "$relation": { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_schema": "string", + "_tags": [ + "string" + ] + } + } + ], + "_id": "123e4567-e89b-12d3-a456-426614174000" + }, + "taxes": [ + { + "rate": "string", + "rateValue": 0, + "amount": 0 + } + ], + "currency": "string", + "unit_amount_net": 0, + "unit_amount_net_decimal": "string", + "unit_amount_gross": 0, + "unit_amount_gross_decimal": "string", + "amount_subtotal": 0, + "amount_total": 0, + "amount_tax": 0, + "is_tax_inclusive": true, + "amount_subtotal_decimal": "string", + "amount_total_decimal": "string" + } + ], + "total_details": { + "amount_shipping": 0, + "amount_tax": 0, + "breakdown": { + "taxes": [ + { + "amount": 0, + "rate": "string", + "rateValue": 0, + "tax": { + "rate": 0, + "type": "VAT", + "_id": "string" + } + } + ], + "recurrences": [ + { + "type": "string", + "billing_period": "weekly", + "unit_amount_gross": 0, + "unit_amount_net": 0, + "amount_tax": 0, + "currency": "EUR", + "amount_subtotal": 0, + "amount_subtotal_decimal": "string", + "amount_total": 0, + "amount_total_decimal": "string" + } + ], + "recurrencesByTax": [ + { + "type": "string", + "billing_period": "weekly", + "amount_total": 0, + "amount_subtotal": 0, + "amount_tax": 0, + "tax": { + "amount": 0, + "rate": "string", + "rateValue": 0, + "tax": { + "rate": 0, + "type": "VAT", + "_id": "string" + } + } + } + ] + } + }, + "_files": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z" + } + ], + "opportunity_files": [ + { + "_schema": "file", + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_title": "John Doe", + "_tags": [ + "family:label" + ], + "_purpose": [ + "7675dc56-fd1b-46ee-9c35-defe0667b32e" + ], + "_thumbnail": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "filename": "string", + "mime_type": "string", + "type": "document", + "readable_size": "string", + "language": "de", + "alt_text": "string", + "access_control": "private", + "public_url": "string", + "shared_with_end_customer": true, + "category": "address-suggestions", + "_files": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z" + } + ] +} \ No newline at end of file diff --git a/static/events/GridConnectionProgressed.schema.json b/static/events/GridConnectionProgressed.schema.json new file mode 100644 index 0000000..c0694cc --- /dev/null +++ b/static/events/GridConnectionProgressed.schema.json @@ -0,0 +1,2794 @@ +{ + "type": "object", + "properties": { + "_org_id": { + "type": "string", + "description": "epilot tenant/organization ID", + "example": "123" + }, + "_event_time": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 timestamp when event occurred" + }, + "_event_id": { + "type": "string", + "description": "Unique event identifier (ULID)" + }, + "_event_name": { + "type": "string", + "description": "Event name from catalog", + "example": "GridConnectionProgressed" + }, + "_event_version": { + "type": "string", + "description": "Schema version number", + "example": "1.0" + }, + "_event_source": { + "type": "string", + "description": "Source that triggered the event", + "enum": [ + "automation" + ], + "example": "automation" + }, + "_ack_id": { + "type": "string", + "format": "uuid", + "description": "Acknowledgement ID for tracking event delivery (UUID)" + }, + "_trigger_source_type": { + "type": "string", + "description": "The type of system that triggered the event. Examples: api, automation, operation, portal_user", + "enum": [ + "automation" + ], + "example": "automation" + }, + "_trigger_source": { + "type": "string", + "description": "Identifier of the specific trigger source. Examples: user ID, automation execution ID, activity ID, portal user email", + "minLength": 1, + "example": "execution-id/action-id" + }, + "_automation_chain": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 100, + "description": "Ordered automation flow ids that caused this event; propagated verbatim for automation loop prevention" + }, + "_has_pending_changesets": { + "type": "boolean", + "description": "True when the triggering entity (or meter counter) has at least one pending changeset" + }, + "_changeset_edit_modes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Distinct edit modes across the PENDING changesets — only \"external\" (synced from an external system) or \"approval\" (awaiting approval). A \"direct\" write is applied immediately, is not a pending changeset, and so never appears here." + }, + "_changeset_attributes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Keys identifying pending changesets. For attribute changesets these are attribute names (e.g. `billing_cycle`); for meter-reading changesets these are the changeset IDs from `meter._meter_readings_changeset`" + }, + "_changeset_edit_modes_by_attribute": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "not": {} + }, + { + "type": "string" + } + ] + }, + "description": "Per-key edit mode map; keys are a subset of _changeset_attributes (attribute names for entity changesets, changeset IDs for meter-reading changesets) — only those whose pending changeset has an \"external\" or \"approval\" mode. A \"direct\"/unrecognised mode is omitted here, though the key still appears in _changeset_attributes. Enables fine-grained webhook conditions such as `_changeset_edit_modes_by_attribute.billing_cycle equals approval`" + }, + "stage": { + "type": "object", + "properties": { + "workflow_definition_id": { + "type": "string", + "description": "ID of the workflow definition running the process" + }, + "workflow_status": { + "type": "string", + "description": "Status of the workflow, e.g. `STARTED` while running, `DONE` once completed, `CLOSED` once cancelled" + }, + "phase_id": { + "type": "string", + "description": "ID of the current workflow phase. Stable per workflow definition — match on this rather than the name" + }, + "phase_name": { + "type": "string", + "description": "Name of the current workflow phase as configured by the organization" + }, + "task_id": { + "type": "string", + "description": "ID of the current workflow task" + }, + "task_name": { + "type": "string", + "description": "Name of the current workflow task" + }, + "opportunity_status": { + "type": "string", + "description": "Status of the opportunity, e.g. `open`, `in_progress`, `closed`, `cancelled`" + } + }, + "additionalProperties": false, + "description": "Where the process stands when the event fires: the opportunity's primary workflow (status, current phase and task) and the opportunity status. Completion and cancellation show here — `workflow_status` / `opportunity_status`." + }, + "event_attachments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entity_id": { + "type": "string", + "format": "uuid", + "description": "Entity ID of the file" + }, + "filename": { + "type": "string", + "description": "Name of the file" + }, + "mime_type": { + "type": "string", + "description": "MIME type of the file (e.g., application/pdf)" + }, + "size_bytes": { + "type": "integer", + "minimum": 0, + "description": "File size in bytes" + }, + "s3ref": { + "type": "object", + "properties": { + "bucket": { + "type": "string", + "description": "S3 bucket name" + }, + "key": { + "type": "string", + "description": "S3 object key" + } + }, + "required": [ + "bucket", + "key" + ], + "additionalProperties": false, + "description": "S3 reference for the file content" + }, + "version_index": { + "type": "integer", + "minimum": 0, + "description": "Latest version index of the file (versions[].length - 1, or 0 if no versions array)" + }, + "readable_size": { + "type": "string", + "description": "Human-readable file size (e.g., \"200 KB\")" + }, + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags on the file entity (semantic labels set by uploader/automation)" + }, + "relation_tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags on the relation pointing at the file (journey upload block tags such as \"Lageplan\", plus a hidden journey step marker)" + }, + "category": { + "type": "string", + "description": "File category select value (e.g., \"address-suggestions\", \"unknown\")" + }, + "file_date": { + "type": "string", + "description": "User-provided file date" + }, + "_created_at": { + "type": "string", + "format": "date-time", + "description": "When the file entity was created — useful for time-window filtering" + } + }, + "required": [ + "entity_id", + "version_index" + ], + "additionalProperties": false + }, + "description": "Every file related to the opportunity — the documents uploaded by the start journey and every follow-up journey. Empty when the process carries none. Consumers identify a given upload via `relation_tags` (the journey upload block tags) / `_tags`." + }, + "opportunity": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "required": [ + "_schema" + ], + "properties": { + "_schema": { + "readOnly": true, + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "example": "opportunity", + "description": "URL-friendly identifier for the entity schema" + }, + "_id": { + "readOnly": true, + "type": "string", + "format": "uuid", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "description": "Unique identifier for the entity" + }, + "_org": { + "type": "string", + "description": "Organization Id the entity belongs to", + "readOnly": true, + "example": "123" + }, + "_title": { + "readOnly": true, + "type": "string", + "nullable": true, + "example": "John Doe", + "description": "Generated title for the entity based on schema title_template" + }, + "_tags": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "example": [ + "family:label" + ], + "description": "Entity Labels" + }, + "_purpose": { + "$ref": "#/definitions/PurposeAttribute", + "description": "Purposes" + }, + "opportunity_title": { + "type": "string", + "description": "Opportunity Title" + }, + "opportunity_number": { + "type": "string", + "description": "Opportunity Number" + }, + "status": { + "type": "string", + "enum": [ + "open", + "in_progress", + "closed", + "cancelled" + ], + "description": "Status" + }, + "due_date": { + "type": "string", + "format": "date-time", + "description": "Due Date" + }, + "description": { + "type": "string", + "description": "Description" + }, + "assignee": { + "$ref": "#/definitions/User", + "description": "Assignee" + }, + "source": { + "$ref": "#/definitions/LinkAttribute", + "description": "Source" + }, + "customer": { + "$ref": "#/definitions/BaseRelation", + "description": "Customer" + }, + "billing_address": { + "$ref": "#/definitions/BaseRelationRef", + "description": "Billing Address" + }, + "delivery_address": { + "$ref": "#/definitions/BaseRelationRef", + "description": "Delivery Address" + }, + "address": { + "$ref": "#/definitions/BaseRelationRef", + "description": "Additional Addresses" + }, + "payment": { + "$ref": "#/definitions/BaseRelationRef", + "description": "Payment Details" + }, + "dates": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "value": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "value" + ] + }, + "description": "Dates" + }, + "items": { + "$ref": "#/definitions/BaseRelation", + "description": "Orders" + }, + "products": { + "$ref": "#/definitions/BaseRelation", + "description": "Products" + }, + "workflows": { + "$ref": "#/definitions/WorkflowOverview" + }, + "consents": { + "$ref": "#/definitions/LocalConsents" + }, + "_files": { + "$ref": "#/definitions/BaseRelation" + }, + "_created_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity creation" + }, + "_updated_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity last update" + } + }, + "description": "opportunity entity (hydrated from entity graph)" + }, + "submissions": { + "type": "array", + "description": "Array of submission entities (hydrated from entity graph)", + "items": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "required": [ + "_schema" + ], + "properties": { + "_schema": { + "readOnly": true, + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "example": "submission", + "description": "URL-friendly identifier for the entity schema" + }, + "_id": { + "readOnly": true, + "type": "string", + "format": "uuid", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "description": "Unique identifier for the entity" + }, + "_org": { + "type": "string", + "description": "Organization Id the entity belongs to", + "readOnly": true, + "example": "123" + }, + "_title": { + "readOnly": true, + "type": "string", + "nullable": true, + "example": "John Doe", + "description": "Generated title for the entity based on schema title_template" + }, + "_tags": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "example": [ + "family:label" + ], + "description": "Entity Labels" + }, + "_purpose": { + "$ref": "#/definitions/PurposeAttribute", + "description": "Purposes" + }, + "source": { + "$ref": "#/definitions/LinkAttribute", + "description": "Source" + }, + "mapped_entities": { + "$ref": "#/definitions/BaseRelation", + "description": "Entities" + }, + "workflows": { + "$ref": "#/definitions/WorkflowOverview" + }, + "_files": { + "$ref": "#/definitions/BaseRelation" + }, + "_created_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity creation" + }, + "_updated_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity last update" + } + } + } + }, + "contacts": { + "type": "array", + "description": "Array of contact entities (hydrated from entity graph)", + "items": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "required": [ + "_schema" + ], + "properties": { + "_schema": { + "readOnly": true, + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "example": "contact", + "description": "URL-friendly identifier for the entity schema" + }, + "_id": { + "readOnly": true, + "type": "string", + "format": "uuid", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "description": "Unique identifier for the entity" + }, + "_org": { + "type": "string", + "description": "Organization Id the entity belongs to", + "readOnly": true, + "example": "123" + }, + "_title": { + "readOnly": true, + "type": "string", + "nullable": true, + "example": "John Doe", + "description": "Generated title for the entity based on schema title_template" + }, + "_tags": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "example": [ + "family:label" + ], + "description": "Entity Labels" + }, + "_purpose": { + "$ref": "#/definitions/PurposeAttribute", + "description": "Purposes" + }, + "salutation": { + "type": "string", + "enum": [ + "null", + "Mr.", + "Ms. / Mrs.", + "Company", + "Contact Person", + "Company/Contact Person", + "Spouse", + "Family", + "Ownership", + "Assembly", + "Other" + ], + "description": "Salutation" + }, + "title": { + "type": "string", + "enum": [ + "null", + "Dr.", + "Prof.", + "Prof. Dr." + ], + "description": "Title" + }, + "first_name": { + "type": "string", + "description": "First Name" + }, + "last_name": { + "type": "string", + "description": "Last Name" + }, + "customer_number": { + "type": "string", + "description": "Customer Number" + }, + "birthdate": { + "type": "string", + "format": "date", + "example": "2025-01-01", + "description": "Date of Birth" + }, + "email": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "email": { + "type": "string", + "format": "email" + } + }, + "required": [ + "email" + ] + }, + "description": "Email" + }, + "phone": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "phone": { + "type": "string", + "example": "+491234567890" + } + }, + "required": [ + "phone" + ] + }, + "description": "Phone" + }, + "communication_preference": { + "type": "string", + "enum": [ + "postal", + "portal" + ], + "description": "Standard communication method" + }, + "address": { + "type": "array", + "items": { + "type": "object", + "description": "Address attribute", + "additionalProperties": true, + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "billing" + ] + }, + "street": { + "type": "string", + "description": "The first line of the address. Typically the street address or PO Box number.", + "nullable": true, + "example": "Hauptstraße" + }, + "street_number": { + "type": "string", + "description": "The second line of the address. Typically the number of the apartment, suite, or unit.", + "nullable": true, + "example": "123" + }, + "postal_code": { + "type": "string", + "description": "The postal code for the address.", + "nullable": true, + "example": "50668" + }, + "city": { + "type": "string", + "description": "The name of the city, district, village, or town.", + "nullable": true, + "example": "Cologne" + }, + "country": { + "type": "string", + "description": "The two-letter code for the country of the address.", + "nullable": true, + "example": "DE" + }, + "additional_info": { + "type": "string", + "description": "An additional description for the address", + "nullable": true + }, + "company_name": { + "type": "string", + "description": "the company name, usually used as extra delivery instructions", + "nullable": true + }, + "first_name": { + "type": "string", + "description": "the first name of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "last_name": { + "type": "string", + "description": "the last name of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "salutation": { + "type": "string", + "description": "the salutation of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "title": { + "type": "string", + "description": "the title of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "coordinates": { + "type": "string", + "description": "Geographical coordinates (latitude, longitude)", + "nullable": true, + "example": "50.948484, 6.943147" + }, + "plot_of_land": { + "type": "string", + "description": "Plot of land information", + "nullable": true + }, + "plot_area": { + "type": "string", + "description": "Area of the plot", + "nullable": true + }, + "start_date": { + "type": "string", + "description": "Start date for the address", + "format": "date", + "nullable": true + }, + "end_date": { + "type": "string", + "description": "End date for the address", + "format": "date", + "nullable": true + } + } + }, + "description": "Address" + }, + "payment": { + "type": "array", + "items": { + "type": "object", + "description": "Payment method details", + "properties": { + "type": { + "type": "string", + "enum": [ + "payment_sepa", + "payment_invoice", + "payment_cash" + ], + "example": "payment_sepa" + }, + "data": { + "type": "object", + "properties": { + "bank_name": { + "type": "string", + "example": "Deutsche Bank" + }, + "iban": { + "type": "string", + "example": "DE89370400440532013000" + }, + "bic_number": { + "type": "string", + "example": "DEUTDEFF" + }, + "fullname": { + "type": "string", + "example": "John Doe" + } + } + } + } + }, + "description": "Payment" + }, + "account": { + "$ref": "#/definitions/BaseRelation", + "description": "Account" + }, + "marketing_permission": { + "type": "boolean", + "description": "Marketing Permission" + }, + "contact_owner": { + "$ref": "#/definitions/User", + "description": "Contact Owner" + }, + "consent_email_marketing": { + "$ref": "#/definitions/ConsentAttribute", + "description": "Email Marketing" + }, + "consent_sms_marketing": { + "$ref": "#/definitions/ConsentAttribute", + "description": "SMS Marketing" + }, + "consent_phone_call": { + "$ref": "#/definitions/ConsentAttribute", + "description": "Direct Phone Marketing" + }, + "consent_print_marketing": { + "$ref": "#/definitions/ConsentAttribute", + "description": "Print Marketing" + }, + "portal_users": { + "$ref": "#/definitions/BaseRelation", + "description": "Portal Users" + }, + "opportunities": { + "$ref": "#/definitions/BaseRelation", + "description": "Opportunities" + }, + "orders": { + "$ref": "#/definitions/BaseRelation", + "description": "Orders" + }, + "contracts": { + "$ref": "#/definitions/BaseRelation", + "description": "Contracts" + }, + "external_id": { + "type": "string", + "description": "External ID" + }, + "workflows": { + "$ref": "#/definitions/WorkflowOverview" + }, + "_files": { + "$ref": "#/definitions/BaseRelation" + }, + "_created_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity creation" + }, + "_updated_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity last update" + } + } + } + }, + "accounts": { + "type": "array", + "description": "Array of account entities (hydrated from entity graph)", + "items": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "required": [ + "_schema" + ], + "properties": { + "_schema": { + "readOnly": true, + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "example": "account", + "description": "URL-friendly identifier for the entity schema" + }, + "_id": { + "readOnly": true, + "type": "string", + "format": "uuid", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "description": "Unique identifier for the entity" + }, + "_org": { + "type": "string", + "description": "Organization Id the entity belongs to", + "readOnly": true, + "example": "123" + }, + "_title": { + "readOnly": true, + "type": "string", + "nullable": true, + "example": "John Doe", + "description": "Generated title for the entity based on schema title_template" + }, + "_tags": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "example": [ + "family:label" + ], + "description": "Entity Labels" + }, + "_purpose": { + "$ref": "#/definitions/PurposeAttribute", + "description": "Purposes" + }, + "name": { + "type": "string", + "description": "Company name" + }, + "customer_number": { + "type": "string", + "description": "Customer Number" + }, + "registry_court": { + "type": "string", + "description": "Registry court" + }, + "registry_number": { + "type": "string", + "description": "Registry number" + }, + "tax_id": { + "type": "string", + "description": "Tax ID" + }, + "tax_exemption": { + "type": "boolean", + "description": "Tax exemption" + }, + "annual_revenue_currency": { + "type": "string", + "description": "Three-letter ISO currency code, in lowercase. Must be a supported currency.", + "example": "EUR" + }, + "annual_revenue_decimal": { + "type": "string", + "description": "The currency value as a decimal string", + "example": "123.45" + }, + "annual_revenue": { + "type": "number", + "description": "Annual revenue" + }, + "industry": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Company industry" + }, + "company_size": { + "type": "string", + "enum": [ + "", + "1-9", + "9-49", + "50-99", + "100-249", + "250-499", + "500+" + ], + "description": "Company size" + }, + "website": { + "type": "string", + "description": "Website" + }, + "marketing_permission": { + "type": "boolean", + "description": "Marketing Permission" + }, + "address": { + "type": "array", + "items": { + "type": "object", + "description": "Address attribute", + "additionalProperties": true, + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "billing" + ] + }, + "street": { + "type": "string", + "description": "The first line of the address. Typically the street address or PO Box number.", + "nullable": true, + "example": "Hauptstraße" + }, + "street_number": { + "type": "string", + "description": "The second line of the address. Typically the number of the apartment, suite, or unit.", + "nullable": true, + "example": "123" + }, + "postal_code": { + "type": "string", + "description": "The postal code for the address.", + "nullable": true, + "example": "50668" + }, + "city": { + "type": "string", + "description": "The name of the city, district, village, or town.", + "nullable": true, + "example": "Cologne" + }, + "country": { + "type": "string", + "description": "The two-letter code for the country of the address.", + "nullable": true, + "example": "DE" + }, + "additional_info": { + "type": "string", + "description": "An additional description for the address", + "nullable": true + }, + "company_name": { + "type": "string", + "description": "the company name, usually used as extra delivery instructions", + "nullable": true + }, + "first_name": { + "type": "string", + "description": "the first name of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "last_name": { + "type": "string", + "description": "the last name of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "salutation": { + "type": "string", + "description": "the salutation of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "title": { + "type": "string", + "description": "the title of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "coordinates": { + "type": "string", + "description": "Geographical coordinates (latitude, longitude)", + "nullable": true, + "example": "50.948484, 6.943147" + }, + "plot_of_land": { + "type": "string", + "description": "Plot of land information", + "nullable": true + }, + "plot_area": { + "type": "string", + "description": "Area of the plot", + "nullable": true + }, + "start_date": { + "type": "string", + "description": "Start date for the address", + "format": "date", + "nullable": true + }, + "end_date": { + "type": "string", + "description": "End date for the address", + "format": "date", + "nullable": true + } + } + }, + "description": "Address" + }, + "payment": { + "type": "array", + "items": { + "type": "object", + "description": "Payment method details", + "properties": { + "type": { + "type": "string", + "enum": [ + "payment_sepa", + "payment_invoice", + "payment_cash" + ], + "example": "payment_sepa" + }, + "data": { + "type": "object", + "properties": { + "bank_name": { + "type": "string", + "example": "Deutsche Bank" + }, + "iban": { + "type": "string", + "example": "DE89370400440532013000" + }, + "bic_number": { + "type": "string", + "example": "DEUTDEFF" + }, + "fullname": { + "type": "string", + "example": "John Doe" + } + } + } + } + }, + "description": "Payment" + }, + "contacts": { + "$ref": "#/definitions/BaseRelation", + "description": "Contacts" + }, + "assigned_to": { + "$ref": "#/definitions/User", + "description": "Assigned to" + }, + "email": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "email": { + "type": "string", + "format": "email" + } + }, + "required": [ + "email" + ] + }, + "description": "Email" + }, + "phone": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "phone": { + "type": "string", + "example": "+491234567890" + } + }, + "required": [ + "phone" + ] + }, + "description": "Phone" + }, + "opportunities": { + "$ref": "#/definitions/BaseRelation", + "description": "Opportunities" + }, + "workflows": { + "$ref": "#/definitions/WorkflowOverview" + }, + "_files": { + "$ref": "#/definitions/BaseRelation" + }, + "_created_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity creation" + }, + "_updated_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity last update" + } + } + } + }, + "orders": { + "type": "array", + "description": "Array of order entities (hydrated from entity graph)", + "items": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "required": [ + "_schema", + "status" + ], + "properties": { + "_schema": { + "readOnly": true, + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "example": "order", + "description": "URL-friendly identifier for the entity schema" + }, + "_id": { + "readOnly": true, + "type": "string", + "format": "uuid", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "description": "Unique identifier for the entity" + }, + "_org": { + "type": "string", + "description": "Organization Id the entity belongs to", + "readOnly": true, + "example": "123" + }, + "_title": { + "readOnly": true, + "type": "string", + "nullable": true, + "example": "John Doe", + "description": "Generated title for the entity based on schema title_template" + }, + "_tags": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "example": [ + "family:label" + ], + "description": "Entity Labels" + }, + "_purpose": { + "$ref": "#/definitions/PurposeAttribute", + "description": "Purposes" + }, + "order_number": { + "type": "string", + "description": "Order Number" + }, + "status": { + "type": "string", + "enum": [ + "draft", + "quote", + "placed", + "complete", + "cancelled", + "open_for_acceptance" + ], + "description": "Status" + }, + "expires_at": { + "type": "string", + "format": "date", + "example": "2025-01-01", + "description": "Expiration Date" + }, + "source": { + "$ref": "#/definitions/LinkAttribute", + "description": "Source" + }, + "payment_method": { + "$ref": "#/definitions/PaymentDetails", + "description": "Payment Details" + }, + "customer": { + "$ref": "#/definitions/BaseRelation", + "description": "Customer" + }, + "billing_contact": { + "$ref": "#/definitions/BaseRelation", + "description": "Billing Contact" + }, + "billing_first_name": { + "type": "string", + "description": "First Name" + }, + "billing_last_name": { + "type": "string", + "description": "Last Name" + }, + "billing_email": { + "type": "string", + "description": "Email" + }, + "billing_phone": { + "type": "string", + "description": "Phone" + }, + "billing_company_name": { + "type": "string", + "description": "Company name" + }, + "billing_vat": { + "type": "string", + "description": "Tax ID" + }, + "billing_address": { + "type": "array", + "items": { + "type": "object", + "description": "Address attribute", + "additionalProperties": true, + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "billing" + ] + }, + "street": { + "type": "string", + "description": "The first line of the address. Typically the street address or PO Box number.", + "nullable": true, + "example": "Hauptstraße" + }, + "street_number": { + "type": "string", + "description": "The second line of the address. Typically the number of the apartment, suite, or unit.", + "nullable": true, + "example": "123" + }, + "postal_code": { + "type": "string", + "description": "The postal code for the address.", + "nullable": true, + "example": "50668" + }, + "city": { + "type": "string", + "description": "The name of the city, district, village, or town.", + "nullable": true, + "example": "Cologne" + }, + "country": { + "type": "string", + "description": "The two-letter code for the country of the address.", + "nullable": true, + "example": "DE" + }, + "additional_info": { + "type": "string", + "description": "An additional description for the address", + "nullable": true + }, + "company_name": { + "type": "string", + "description": "the company name, usually used as extra delivery instructions", + "nullable": true + }, + "first_name": { + "type": "string", + "description": "the first name of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "last_name": { + "type": "string", + "description": "the last name of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "salutation": { + "type": "string", + "description": "the salutation of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "title": { + "type": "string", + "description": "the title of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "coordinates": { + "type": "string", + "description": "Geographical coordinates (latitude, longitude)", + "nullable": true, + "example": "50.948484, 6.943147" + }, + "plot_of_land": { + "type": "string", + "description": "Plot of land information", + "nullable": true + }, + "plot_area": { + "type": "string", + "description": "Area of the plot", + "nullable": true + }, + "start_date": { + "type": "string", + "description": "Start date for the address", + "format": "date", + "nullable": true + }, + "end_date": { + "type": "string", + "description": "End date for the address", + "format": "date", + "nullable": true + } + } + }, + "description": "Billing Address" + }, + "delivery_address": { + "type": "array", + "items": { + "type": "object", + "description": "Address attribute", + "additionalProperties": true, + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "billing" + ] + }, + "street": { + "type": "string", + "description": "The first line of the address. Typically the street address or PO Box number.", + "nullable": true, + "example": "Hauptstraße" + }, + "street_number": { + "type": "string", + "description": "The second line of the address. Typically the number of the apartment, suite, or unit.", + "nullable": true, + "example": "123" + }, + "postal_code": { + "type": "string", + "description": "The postal code for the address.", + "nullable": true, + "example": "50668" + }, + "city": { + "type": "string", + "description": "The name of the city, district, village, or town.", + "nullable": true, + "example": "Cologne" + }, + "country": { + "type": "string", + "description": "The two-letter code for the country of the address.", + "nullable": true, + "example": "DE" + }, + "additional_info": { + "type": "string", + "description": "An additional description for the address", + "nullable": true + }, + "company_name": { + "type": "string", + "description": "the company name, usually used as extra delivery instructions", + "nullable": true + }, + "first_name": { + "type": "string", + "description": "the first name of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "last_name": { + "type": "string", + "description": "the last name of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "salutation": { + "type": "string", + "description": "the salutation of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "title": { + "type": "string", + "description": "the title of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "coordinates": { + "type": "string", + "description": "Geographical coordinates (latitude, longitude)", + "nullable": true, + "example": "50.948484, 6.943147" + }, + "plot_of_land": { + "type": "string", + "description": "Plot of land information", + "nullable": true + }, + "plot_area": { + "type": "string", + "description": "Area of the plot", + "nullable": true + }, + "start_date": { + "type": "string", + "description": "Start date for the address", + "format": "date", + "nullable": true + }, + "end_date": { + "type": "string", + "description": "End date for the address", + "format": "date", + "nullable": true + } + } + }, + "description": "Delivery Address" + }, + "additional_addresses": { + "type": "array", + "items": { + "type": "object", + "description": "Address attribute", + "additionalProperties": true, + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "billing" + ] + }, + "street": { + "type": "string", + "description": "The first line of the address. Typically the street address or PO Box number.", + "nullable": true, + "example": "Hauptstraße" + }, + "street_number": { + "type": "string", + "description": "The second line of the address. Typically the number of the apartment, suite, or unit.", + "nullable": true, + "example": "123" + }, + "postal_code": { + "type": "string", + "description": "The postal code for the address.", + "nullable": true, + "example": "50668" + }, + "city": { + "type": "string", + "description": "The name of the city, district, village, or town.", + "nullable": true, + "example": "Cologne" + }, + "country": { + "type": "string", + "description": "The two-letter code for the country of the address.", + "nullable": true, + "example": "DE" + }, + "additional_info": { + "type": "string", + "description": "An additional description for the address", + "nullable": true + }, + "company_name": { + "type": "string", + "description": "the company name, usually used as extra delivery instructions", + "nullable": true + }, + "first_name": { + "type": "string", + "description": "the first name of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "last_name": { + "type": "string", + "description": "the last name of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "salutation": { + "type": "string", + "description": "the salutation of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "title": { + "type": "string", + "description": "the title of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "coordinates": { + "type": "string", + "description": "Geographical coordinates (latitude, longitude)", + "nullable": true, + "example": "50.948484, 6.943147" + }, + "plot_of_land": { + "type": "string", + "description": "Plot of land information", + "nullable": true + }, + "plot_area": { + "type": "string", + "description": "Area of the plot", + "nullable": true + }, + "start_date": { + "type": "string", + "description": "Start date for the address", + "format": "date", + "nullable": true + }, + "end_date": { + "type": "string", + "description": "End date for the address", + "format": "date", + "nullable": true + } + } + }, + "description": "Additional Addresses" + }, + "dates": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "value": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "value" + ] + }, + "description": "Dates" + }, + "memo": { + "type": "string", + "description": "Memo" + }, + "footer_notes": { + "type": "string", + "description": "Footer" + }, + "currency": { + "type": "string" + }, + "amount_total": { + "type": "number" + }, + "amount_subtotal": { + "type": "number" + }, + "amount_tax": { + "type": "number" + }, + "products": { + "$ref": "#/definitions/BaseRelation", + "description": "Products" + }, + "prices": { + "$ref": "#/definitions/BaseRelation", + "description": "Prices" + }, + "workflows": { + "$ref": "#/definitions/WorkflowOverview" + }, + "consents": { + "$ref": "#/definitions/LocalConsents" + }, + "line_items": { + "$ref": "#/definitions/LineItems" + }, + "total_details": { + "$ref": "#/definitions/TotalDetails" + }, + "_files": { + "$ref": "#/definitions/BaseRelation" + }, + "_created_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity creation" + }, + "_updated_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity last update" + } + } + } + }, + "opportunity_files": { + "type": "array", + "description": "Array of file entities (hydrated from entity graph)", + "items": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "required": [ + "_schema", + "filename", + "language" + ], + "properties": { + "_schema": { + "readOnly": true, + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "example": "file", + "description": "URL-friendly identifier for the entity schema" + }, + "_id": { + "readOnly": true, + "type": "string", + "format": "uuid", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "description": "Unique identifier for the entity" + }, + "_org": { + "type": "string", + "description": "Organization Id the entity belongs to", + "readOnly": true, + "example": "123" + }, + "_title": { + "readOnly": true, + "type": "string", + "nullable": true, + "example": "John Doe", + "description": "Generated title for the entity based on schema title_template" + }, + "_tags": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "example": [ + "family:label" + ], + "description": "Entity Labels" + }, + "_purpose": { + "$ref": "#/definitions/PurposeAttribute", + "description": "Purposes" + }, + "_thumbnail": { + "$ref": "#/definitions/BaseRelation", + "description": "Thumbnail" + }, + "filename": { + "type": "string", + "description": "File Name" + }, + "mime_type": { + "type": "string", + "description": "MIME Type" + }, + "type": { + "type": "string", + "enum": [ + "document", + "document_template", + "text", + "image", + "video", + "audio", + "spreadsheet", + "presentation", + "font", + "archive", + "application", + "unknown" + ], + "description": "File Type" + }, + "readable_size": { + "type": "string", + "description": "Size" + }, + "language": { + "type": "string", + "enum": [ + "de", + "en" + ], + "description": "Language" + }, + "alt_text": { + "type": "string", + "description": "Alt text" + }, + "access_control": { + "type": "string", + "enum": [ + "private", + "public-read" + ], + "description": "Access Control" + }, + "public_url": { + "type": "string", + "description": "Public URL" + }, + "shared_with_end_customer": { + "type": "boolean", + "description": "Shared with End Customer" + }, + "category": { + "type": "string", + "enum": [ + "address-suggestions", + "unknown" + ], + "description": "Category" + }, + "_files": { + "$ref": "#/definitions/BaseRelation" + }, + "_created_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity creation" + }, + "_updated_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity last update" + } + } + } + } + }, + "required": [ + "_org_id", + "_event_time", + "_event_id", + "_event_name", + "_event_version", + "_event_source", + "_ack_id", + "stage", + "event_attachments", + "opportunity", + "_trigger_source_type", + "_trigger_source" + ], + "additionalProperties": true, + "definitions": { + "PurposeAttribute": { + "type": "array", + "description": "List of purpose ids", + "items": { + "type": "string" + }, + "example": [ + "7675dc56-fd1b-46ee-9c35-defe0667b32e" + ] + }, + "LinkAttribute": { + "type": "object", + "description": "Link with title and href", + "properties": { + "type": { + "type": "string", + "enum": [ + "link" + ] + }, + "title": { + "type": "string", + "example": "Visit Website" + }, + "href": { + "type": "string", + "format": "uri", + "example": "https://example.com" + } + } + }, + "BaseUUID": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "BaseTags": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "example": [ + "example" + ] + }, + "BaseRelation": { + "type": "object", + "nullable": true, + "description": "Relation to another entity", + "properties": { + "$relation": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entity_id": { + "$ref": "#/definitions/BaseUUID" + }, + "_tags": { + "$ref": "#/definitions/BaseTags" + } + } + } + } + } + }, + "BaseRelationRef": { + "type": "object", + "nullable": true, + "description": "Reference to a specific property of another entity", + "properties": { + "$relation_ref": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entity_id": { + "$ref": "#/definitions/BaseUUID" + }, + "path": { + "type": "string", + "example": "address", + "description": "The property of the entity (pointed by entity_id) to be used as the reference" + }, + "_tags": { + "$ref": "#/definitions/BaseTags" + }, + "_id": { + "type": "string", + "example": "xHcOoJCa07eysJ1GaQeSb" + } + } + } + } + } + }, + "UserId": { + "description": "User's unique identifier", + "type": "string", + "readOnly": true + }, + "OrganizationId": { + "description": "Organization unique identifier", + "type": "string", + "readOnly": true, + "example": "123" + }, + "User": { + "type": "object", + "description": "User information", + "properties": { + "id": { + "$ref": "#/definitions/UserId" + }, + "organization_id": { + "$ref": "#/definitions/OrganizationId" + }, + "email": { + "type": "string", + "format": "email", + "example": "user@example.com" + }, + "display_name": { + "type": "string", + "example": "John Doe", + "deprecated": true + }, + "name": { + "type": "string", + "example": "John Doe", + "deprecated": true + }, + "preferred_language": { + "type": "string", + "example": "de", + "description": "ISO 639-1 language code" + }, + "signature": { + "type": "string", + "example": "

Best regards,
John Doe

", + "description": "HTML email signature" + }, + "roles": { + "type": "array", + "items": { + "type": "string", + "example": "Owner" + }, + "deprecated": true, + "description": "Deprecated! Please use Permissions API instead" + }, + "image_uri": { + "type": "object", + "additionalProperties": true, + "properties": { + "original": { + "type": "string", + "format": "uri", + "example": "https://account-profile-images.epilot.cloud/1/avatar.png" + }, + "thumbnail_32": { + "type": "string", + "format": "uri", + "example": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + } + }, + "nullable": true + }, + "properties": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "profileImageName" + }, + "value": { + "type": "string", + "example": "avatar.png" + } + }, + "required": [ + "name", + "value" + ] + } + } + }, + "required": [ + "id", + "organization_id", + "email", + "name", + "preferred_language", + "roles", + "properties" + ] + }, + "LocalConsents": { + "type": "object", + "description": "Consent management", + "properties": { + "_isValid": { + "type": "boolean", + "example": true, + "description": "Whether all required consents are valid" + } + }, + "additionalProperties": { + "type": "object", + "properties": { + "agreed": { + "type": "boolean", + "example": true + }, + "topic": { + "type": "string", + "example": "privacy_policy" + }, + "text": { + "type": "string", + "example": "I agree to the privacy policy" + }, + "time": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "agreed", + "topic", + "text", + "time" + ] + }, + "required": [ + "_isValid" + ] + }, + "WorkflowStatus": { + "type": "string", + "enum": [ + "STARTED", + "DONE", + "CLOSED" + ] + }, + "StepType": { + "type": "string", + "enum": [ + "MANUAL", + "AUTOMATION" + ] + }, + "StepStatus": { + "type": "string", + "enum": [ + "UNASSIGNED", + "ASSIGNED", + "COMPLETED", + "SKIPPED", + "IN_PROGRESS" + ] + }, + "PhaseInEntity": { + "type": "object", + "description": "Workflow phase information", + "properties": { + "phase_id": { + "type": "string" + }, + "phase_name": { + "type": "string" + }, + "phase_progress": { + "type": "number" + } + }, + "required": [ + "phase_id", + "phase_name", + "phase_progress" + ] + }, + "WorkflowInEntity": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "definition_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/WorkflowStatus" + }, + "assignees": { + "type": "array", + "items": { + "type": "string" + } + }, + "progress": { + "type": "number" + }, + "phases_in_progress": { + "type": "array", + "items": { + "$ref": "#/definitions/PhaseInEntity" + } + }, + "last_update_time": { + "type": "string", + "format": "date-time" + }, + "upcoming_tasks_assignees": { + "type": "array", + "items": { + "type": "string" + } + }, + "task_id": { + "type": "string" + }, + "task_name": { + "type": "string" + }, + "task_assignees": { + "type": "array", + "items": { + "type": "string" + } + }, + "task_duedate": { + "type": "string", + "format": "date-time" + }, + "task_execution_type": { + "$ref": "#/definitions/StepType" + }, + "task_status": { + "$ref": "#/definitions/StepStatus" + }, + "phase_id": { + "type": "string" + }, + "phase_name": { + "type": "string" + }, + "phase_assignees": { + "type": "array", + "items": { + "type": "string" + } + }, + "phase_progress": { + "type": "number" + } + }, + "required": [ + "id", + "definition_id", + "name", + "status", + "assignees", + "last_update_time" + ] + }, + "WorkflowOverview": { + "type": "object", + "properties": { + "primary": { + "$ref": "#/definitions/WorkflowInEntity" + } + }, + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/definitions/WorkflowInEntity" + } + } + }, + "ConsentAttribute": { + "type": "object", + "description": "Consent Management", + "properties": { + "type": { + "type": "string", + "enum": [ + "consent" + ] + }, + "topic": { + "type": "string" + }, + "identifiers": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "type", + "topic" + ] + }, + "PaymentDetails": { + "type": "object", + "description": "Payment method details", + "properties": { + "type": { + "type": "string", + "enum": [ + "payment_sepa", + "payment_invoice", + "payment_cash" + ], + "example": "payment_sepa" + }, + "data": { + "type": "object", + "properties": { + "bank_name": { + "type": "string", + "example": "Deutsche Bank" + }, + "iban": { + "type": "string", + "example": "DE89370400440532013000" + }, + "bic_number": { + "type": "string", + "example": "DEUTDEFF" + }, + "fullname": { + "type": "string", + "example": "John Doe" + } + } + } + } + }, + "TaxBreakdownInfo": { + "type": "object", + "properties": { + "rate": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "VAT", + "GST", + "Custom" + ] + }, + "_id": { + "type": "string" + } + } + }, + "TaxAmountBreakdown": { + "type": "object", + "description": "A tax amount associated with a specific tax rate.", + "readOnly": true, + "properties": { + "amount": { + "type": "integer" + }, + "rate": { + "type": "string", + "description": "The tax rate applied. With the release of the tax manager feature this field is being deprecated in favor of the tax field.", + "deprecated": true + }, + "rateValue": { + "type": "number", + "description": "The tax rate value applied. With the release of the tax manager feature this field is being deprecated in favor of the tax field.", + "deprecated": true + }, + "tax": { + "$ref": "#/definitions/TaxBreakdownInfo" + } + } + }, + "Amounts": { + "type": "object", + "properties": { + "amount_subtotal": { + "type": "integer" + }, + "amount_subtotal_decimal": { + "type": "string" + }, + "amount_total": { + "type": "integer" + }, + "amount_total_decimal": { + "type": "string" + } + } + }, + "Currency": { + "type": "string", + "description": "Three-letter ISO currency code, in lowercase. Must be a supported currency.", + "example": "EUR" + }, + "RecurrenceAmount": { + "type": "object", + "description": "An amount associated with a specific recurrence.", + "readOnly": true, + "allOf": [ + { + "$ref": "#/definitions/Amounts" + } + ], + "properties": { + "type": { + "type": "string" + }, + "billing_period": { + "type": "string", + "enum": [ + "weekly", + "monthly", + "every_quarter", + "every_6_months", + "yearly" + ] + }, + "unit_amount_gross": { + "type": "integer" + }, + "unit_amount_net": { + "type": "integer" + }, + "amount_tax": { + "type": "integer" + }, + "currency": { + "$ref": "#/definitions/Currency" + } + }, + "required": [ + "amount_subtotal", + "amount_total", + "amount_subtotal_decimal", + "amount_total_decimal" + ] + }, + "RecurrenceAmountWithTax": { + "type": "object", + "description": "An amount associated with a specific recurrence.", + "properties": { + "type": { + "type": "string" + }, + "billing_period": { + "type": "string", + "enum": [ + "weekly", + "monthly", + "every_quarter", + "every_6_months", + "yearly" + ] + }, + "amount_total": { + "type": "integer" + }, + "amount_subtotal": { + "type": "integer" + }, + "amount_tax": { + "type": "integer" + }, + "tax": { + "$ref": "#/definitions/TaxAmountBreakdown" + } + }, + "required": [ + "amount_subtotal", + "amount_total" + ] + }, + "TotalDetails": { + "type": "object", + "description": "The total details with tax (and discount) aggregated totals.", + "readOnly": true, + "properties": { + "amount_shipping": { + "type": "integer", + "description": "This is the sum of all the price item shipping amounts." + }, + "amount_tax": { + "type": "integer", + "description": "This is the sum of all the price item tax amounts." + }, + "breakdown": { + "type": "object", + "description": "Breakdown of individual tax (and discount) amounts that add up to the totals.", + "properties": { + "taxes": { + "type": "array", + "description": "The aggregated price items tax amount per rate.", + "items": { + "$ref": "#/definitions/TaxAmountBreakdown" + } + }, + "recurrences": { + "type": "array", + "description": "The aggregated price items tax amount per rate.", + "items": { + "$ref": "#/definitions/RecurrenceAmount" + } + }, + "recurrencesByTax": { + "type": "array", + "description": "The aggregated price items recurrences by tax rate", + "items": { + "$ref": "#/definitions/RecurrenceAmountWithTax" + } + } + } + } + } + }, + "LineItems": { + "type": "array", + "items": { + "type": "object", + "properties": { + "price_id": { + "$ref": "#/definitions/BaseUUID" + }, + "product_id": { + "$ref": "#/definitions/BaseUUID" + }, + "quantity": { + "type": "integer" + }, + "description": { + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "type": "string" + }, + "pricing_model": { + "type": "string", + "enum": [ + "per_unit" + ] + }, + "_price": { + "type": "object", + "properties": { + "_id": { + "$ref": "#/definitions/BaseUUID" + }, + "_title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "type": "string" + }, + "unit_amount_currency": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "sales_tax": { + "type": "string" + }, + "tax_behavior": { + "type": "string" + }, + "price_display_in_journeys": { + "type": "string" + }, + "type": { + "type": "string" + }, + "billing_period": { + "type": "string" + }, + "billing_duration_unit": { + "type": "string" + }, + "notice_time_unit": { + "type": "string" + }, + "termination_time_unit": { + "type": "string" + }, + "renewal_duration_unit": { + "type": "string" + }, + "internal_description": { + "type": "string" + }, + "pricing_model": { + "type": "string" + }, + "is_tax_inclusive": { + "type": "boolean" + }, + "headline": { + "type": "string" + }, + "subHeadline": { + "type": "string" + }, + "group": { + "type": "string" + } + } + }, + "_product": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "product" + ] + }, + "_title": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "price_options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_id": { + "$ref": "#/definitions/BaseUUID" + }, + "_title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "unit_amount": { + "type": "integer" + }, + "unit_amount_decimal": { + "type": "string" + }, + "unit_amount_currency": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "_schema": { + "type": "string" + }, + "_org": { + "type": "string" + }, + "_created_at": { + "type": "string", + "format": "date-time" + }, + "_updated_at": { + "type": "string", + "format": "date-time" + }, + "sales_tax": { + "type": "string" + }, + "tax_behavior": { + "type": "string" + }, + "price_display_in_journeys": { + "type": "string" + }, + "type": { + "type": "string" + }, + "billing_period": { + "type": "string" + }, + "billing_duration_unit": { + "type": "string" + }, + "notice_time_unit": { + "type": "string" + }, + "termination_time_unit": { + "type": "string" + }, + "renewal_duration_unit": { + "type": "string" + }, + "internal_description": { + "type": "string" + }, + "_owners": { + "type": "array", + "items": { + "type": "object", + "properties": { + "org_id": { + "type": "string" + } + } + } + }, + "pricing_model": { + "type": "string" + }, + "is_tax_inclusive": { + "type": "boolean" + }, + "_acl": { + "type": "object", + "properties": { + "view": { + "type": "array", + "items": { + "type": "string" + } + }, + "edit": { + "type": "array", + "items": { + "type": "string" + } + }, + "delete": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "$relation": { + "type": "object", + "properties": { + "entity_id": { + "$ref": "#/definitions/BaseUUID" + }, + "_schema": { + "type": "string" + }, + "_tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "_id": { + "$ref": "#/definitions/BaseUUID" + } + } + }, + "taxes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "rate": { + "type": "string" + }, + "rateValue": { + "type": "integer" + }, + "amount": { + "type": "integer" + } + } + } + }, + "currency": { + "type": "string" + }, + "unit_amount_net": { + "type": "integer" + }, + "unit_amount_net_decimal": { + "type": "string" + }, + "unit_amount_gross": { + "type": "integer" + }, + "unit_amount_gross_decimal": { + "type": "string" + }, + "amount_subtotal": { + "type": "integer" + }, + "amount_total": { + "type": "integer" + }, + "amount_tax": { + "type": "integer" + }, + "is_tax_inclusive": { + "type": "boolean" + }, + "amount_subtotal_decimal": { + "type": "string" + }, + "amount_total_decimal": { + "type": "string" + } + } + } + } + } +} \ No newline at end of file diff --git a/static/events/GridConnectionRequested.config.json b/static/events/GridConnectionRequested.config.json index 9b608d5..54b1417 100644 --- a/static/events/GridConnectionRequested.config.json +++ b/static/events/GridConnectionRequested.config.json @@ -129,6 +129,11 @@ "schema": "contact", "cardinality": "many" }, + { + "id": "accounts", + "schema": "account", + "cardinality": "many" + }, { "id": "orders", "schema": "order", @@ -149,6 +154,10 @@ "from": "opportunity", "to": "contacts" }, + { + "from": "opportunity", + "to": "accounts" + }, { "from": "opportunity", "to": "orders" diff --git a/static/events/GridConnectionRequested.sample.json b/static/events/GridConnectionRequested.sample.json index 10dc08c..68f8c56 100644 --- a/static/events/GridConnectionRequested.sample.json +++ b/static/events/GridConnectionRequested.sample.json @@ -522,6 +522,176 @@ "_updated_at": "1970-01-01T00:00:00.000Z" } ], + "accounts": [ + { + "_schema": "account", + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_title": "John Doe", + "_tags": [ + "family:label" + ], + "_purpose": [ + "7675dc56-fd1b-46ee-9c35-defe0667b32e" + ], + "name": "string", + "customer_number": "string", + "registry_court": "string", + "registry_number": "string", + "tax_id": "string", + "tax_exemption": true, + "annual_revenue_currency": "EUR", + "annual_revenue_decimal": "123.45", + "annual_revenue": 0, + "industry": [ + "string" + ], + "company_size": "", + "website": "string", + "marketing_permission": true, + "address": [ + { + "_tags": [ + "billing" + ], + "street": "Hauptstraße", + "street_number": "123", + "postal_code": "50668", + "city": "Cologne", + "country": "DE", + "additional_info": "string", + "company_name": "string", + "first_name": "string", + "last_name": "string", + "salutation": "string", + "title": "string", + "coordinates": "50.948484, 6.943147", + "plot_of_land": "string", + "plot_area": "string", + "start_date": "1970-01-01", + "end_date": "1970-01-01" + } + ], + "payment": [ + { + "type": "payment_sepa", + "data": { + "bank_name": "Deutsche Bank", + "iban": "DE89370400440532013000", + "bic_number": "DEUTDEFF", + "fullname": "John Doe" + } + } + ], + "contacts": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "assigned_to": { + "id": "string", + "organization_id": "123", + "email": "user@example.com", + "display_name": "John Doe", + "name": "John Doe", + "preferred_language": "de", + "signature": "

Best regards,
John Doe

", + "roles": [ + "Owner" + ], + "image_uri": { + "original": "https://account-profile-images.epilot.cloud/1/avatar.png", + "thumbnail_32": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + }, + "properties": [ + { + "name": "profileImageName", + "value": "avatar.png" + } + ] + }, + "email": [ + { + "_tags": [ + "string" + ], + "email": "user@example.com" + } + ], + "phone": [ + { + "_tags": [ + "string" + ], + "phone": "+491234567890" + } + ], + "opportunities": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "workflows": { + "primary": { + "id": "string", + "definition_id": "string", + "name": "string", + "status": "STARTED", + "assignees": [ + "string" + ], + "progress": 0, + "phases_in_progress": [ + { + "phase_id": "string", + "phase_name": "string", + "phase_progress": 0 + } + ], + "last_update_time": "1970-01-01T00:00:00.000Z", + "upcoming_tasks_assignees": [ + "string" + ], + "task_id": "string", + "task_name": "string", + "task_assignees": [ + "string" + ], + "task_duedate": "1970-01-01T00:00:00.000Z", + "task_execution_type": "MANUAL", + "task_status": "UNASSIGNED", + "phase_id": "string", + "phase_name": "string", + "phase_assignees": [ + "string" + ], + "phase_progress": 0 + } + }, + "_files": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z" + } + ], "orders": [ { "_schema": "order", diff --git a/static/events/GridConnectionRequested.schema.json b/static/events/GridConnectionRequested.schema.json index d363f3d..27698ae 100644 --- a/static/events/GridConnectionRequested.schema.json +++ b/static/events/GridConnectionRequested.schema.json @@ -787,6 +787,351 @@ } } }, + "accounts": { + "type": "array", + "description": "Array of account entities (hydrated from entity graph)", + "items": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "required": [ + "_schema" + ], + "properties": { + "_schema": { + "readOnly": true, + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "example": "account", + "description": "URL-friendly identifier for the entity schema" + }, + "_id": { + "readOnly": true, + "type": "string", + "format": "uuid", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "description": "Unique identifier for the entity" + }, + "_org": { + "type": "string", + "description": "Organization Id the entity belongs to", + "readOnly": true, + "example": "123" + }, + "_title": { + "readOnly": true, + "type": "string", + "nullable": true, + "example": "John Doe", + "description": "Generated title for the entity based on schema title_template" + }, + "_tags": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "example": [ + "family:label" + ], + "description": "Entity Labels" + }, + "_purpose": { + "$ref": "#/definitions/PurposeAttribute", + "description": "Purposes" + }, + "name": { + "type": "string", + "description": "Company name" + }, + "customer_number": { + "type": "string", + "description": "Customer Number" + }, + "registry_court": { + "type": "string", + "description": "Registry court" + }, + "registry_number": { + "type": "string", + "description": "Registry number" + }, + "tax_id": { + "type": "string", + "description": "Tax ID" + }, + "tax_exemption": { + "type": "boolean", + "description": "Tax exemption" + }, + "annual_revenue_currency": { + "type": "string", + "description": "Three-letter ISO currency code, in lowercase. Must be a supported currency.", + "example": "EUR" + }, + "annual_revenue_decimal": { + "type": "string", + "description": "The currency value as a decimal string", + "example": "123.45" + }, + "annual_revenue": { + "type": "number", + "description": "Annual revenue" + }, + "industry": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Company industry" + }, + "company_size": { + "type": "string", + "enum": [ + "", + "1-9", + "9-49", + "50-99", + "100-249", + "250-499", + "500+" + ], + "description": "Company size" + }, + "website": { + "type": "string", + "description": "Website" + }, + "marketing_permission": { + "type": "boolean", + "description": "Marketing Permission" + }, + "address": { + "type": "array", + "items": { + "type": "object", + "description": "Address attribute", + "additionalProperties": true, + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "billing" + ] + }, + "street": { + "type": "string", + "description": "The first line of the address. Typically the street address or PO Box number.", + "nullable": true, + "example": "Hauptstraße" + }, + "street_number": { + "type": "string", + "description": "The second line of the address. Typically the number of the apartment, suite, or unit.", + "nullable": true, + "example": "123" + }, + "postal_code": { + "type": "string", + "description": "The postal code for the address.", + "nullable": true, + "example": "50668" + }, + "city": { + "type": "string", + "description": "The name of the city, district, village, or town.", + "nullable": true, + "example": "Cologne" + }, + "country": { + "type": "string", + "description": "The two-letter code for the country of the address.", + "nullable": true, + "example": "DE" + }, + "additional_info": { + "type": "string", + "description": "An additional description for the address", + "nullable": true + }, + "company_name": { + "type": "string", + "description": "the company name, usually used as extra delivery instructions", + "nullable": true + }, + "first_name": { + "type": "string", + "description": "the first name of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "last_name": { + "type": "string", + "description": "the last name of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "salutation": { + "type": "string", + "description": "the salutation of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "title": { + "type": "string", + "description": "the title of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "coordinates": { + "type": "string", + "description": "Geographical coordinates (latitude, longitude)", + "nullable": true, + "example": "50.948484, 6.943147" + }, + "plot_of_land": { + "type": "string", + "description": "Plot of land information", + "nullable": true + }, + "plot_area": { + "type": "string", + "description": "Area of the plot", + "nullable": true + }, + "start_date": { + "type": "string", + "description": "Start date for the address", + "format": "date", + "nullable": true + }, + "end_date": { + "type": "string", + "description": "End date for the address", + "format": "date", + "nullable": true + } + } + }, + "description": "Address" + }, + "payment": { + "type": "array", + "items": { + "type": "object", + "description": "Payment method details", + "properties": { + "type": { + "type": "string", + "enum": [ + "payment_sepa", + "payment_invoice", + "payment_cash" + ], + "example": "payment_sepa" + }, + "data": { + "type": "object", + "properties": { + "bank_name": { + "type": "string", + "example": "Deutsche Bank" + }, + "iban": { + "type": "string", + "example": "DE89370400440532013000" + }, + "bic_number": { + "type": "string", + "example": "DEUTDEFF" + }, + "fullname": { + "type": "string", + "example": "John Doe" + } + } + } + } + }, + "description": "Payment" + }, + "contacts": { + "$ref": "#/definitions/BaseRelation", + "description": "Contacts" + }, + "assigned_to": { + "$ref": "#/definitions/User", + "description": "Assigned to" + }, + "email": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "email": { + "type": "string", + "format": "email" + } + }, + "required": [ + "email" + ] + }, + "description": "Email" + }, + "phone": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "phone": { + "type": "string", + "example": "+491234567890" + } + }, + "required": [ + "phone" + ] + }, + "description": "Phone" + }, + "opportunities": { + "$ref": "#/definitions/BaseRelation", + "description": "Opportunities" + }, + "workflows": { + "$ref": "#/definitions/WorkflowOverview" + }, + "_files": { + "$ref": "#/definitions/BaseRelation" + }, + "_created_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity creation" + }, + "_updated_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity last update" + } + } + } + }, "orders": { "type": "array", "description": "Array of order entities (hydrated from entity graph)", diff --git a/static/events/GridPlantRegistrationProgressed.config.json b/static/events/GridPlantRegistrationProgressed.config.json new file mode 100644 index 0000000..1b80b27 --- /dev/null +++ b/static/events/GridPlantRegistrationProgressed.config.json @@ -0,0 +1,203 @@ +{ + "event_name": "GridPlantRegistrationProgressed", + "event_title": "Grid Plant Registration Progress", + "event_description": "A registration of generation and/or consumption plants with the grid operator reached a further step, was completed or was cancelled. Explicitly triggered by Automation; carries a full snapshot of the process and where it stands.", + "event_version": "1.0", + "event_tags": [ + "builtin", + "grid", + "automation", + "opportunity", + "attachment", + "plant-registration" + ], + "schema_fields": { + "stage": { + "json_schema": { + "type": "object", + "properties": { + "workflow_definition_id": { + "type": "string", + "description": "ID of the workflow definition running the process" + }, + "workflow_status": { + "type": "string", + "description": "Status of the workflow, e.g. `STARTED` while running, `DONE` once completed, `CLOSED` once cancelled" + }, + "phase_id": { + "type": "string", + "description": "ID of the current workflow phase. Stable per workflow definition — match on this rather than the name" + }, + "phase_name": { + "type": "string", + "description": "Name of the current workflow phase as configured by the organization" + }, + "task_id": { + "type": "string", + "description": "ID of the current workflow task" + }, + "task_name": { + "type": "string", + "description": "Name of the current workflow task" + }, + "opportunity_status": { + "type": "string", + "description": "Status of the opportunity, e.g. `open`, `in_progress`, `closed`, `cancelled`" + } + }, + "additionalProperties": false, + "description": "Where the process stands when the event fires: the opportunity's primary workflow (status, current phase and task) and the opportunity status. Completion and cancellation show here — `workflow_status` / `opportunity_status`." + }, + "required": true, + "graph_source": "{\"workflow_definition_id\": opportunity.workflows.primary.definition_id, \"workflow_status\": opportunity.workflows.primary.status, \"phase_id\": opportunity.workflows.primary.phase_id, \"phase_name\": opportunity.workflows.primary.phase_name, \"task_id\": opportunity.workflows.primary.task_id, \"task_name\": opportunity.workflows.primary.task_name, \"opportunity_status\": opportunity.status}" + }, + "event_attachments": { + "json_schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entity_id": { + "type": "string", + "format": "uuid", + "description": "Entity ID of the file" + }, + "filename": { + "type": "string", + "description": "Name of the file" + }, + "mime_type": { + "type": "string", + "description": "MIME type of the file (e.g., application/pdf)" + }, + "size_bytes": { + "type": "integer", + "minimum": 0, + "description": "File size in bytes" + }, + "s3ref": { + "type": "object", + "properties": { + "bucket": { + "type": "string", + "description": "S3 bucket name" + }, + "key": { + "type": "string", + "description": "S3 object key" + } + }, + "required": [ + "bucket", + "key" + ], + "additionalProperties": false, + "description": "S3 reference for the file content" + }, + "version_index": { + "type": "integer", + "minimum": 0, + "description": "Latest version index of the file (versions[].length - 1, or 0 if no versions array)" + }, + "readable_size": { + "type": "string", + "description": "Human-readable file size (e.g., \"200 KB\")" + }, + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags on the file entity (semantic labels set by uploader/automation)" + }, + "relation_tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags on the relation pointing at the file (journey upload block tags such as \"Lageplan\", plus a hidden journey step marker)" + }, + "category": { + "type": "string", + "description": "File category select value (e.g., \"address-suggestions\", \"unknown\")" + }, + "file_date": { + "type": "string", + "description": "User-provided file date" + }, + "_created_at": { + "type": "string", + "format": "date-time", + "description": "When the file entity was created — useful for time-window filtering" + } + }, + "required": [ + "entity_id", + "version_index" + ], + "additionalProperties": false + }, + "description": "Every file related to the opportunity — the documents uploaded by the start journey and every follow-up journey. Empty when the process carries none. Consumers identify a given upload via `relation_tags` (the journey upload block tags) / `_tags`." + }, + "required": true, + "graph_source": "[opportunity_files.{\"entity_id\": _id, \"filename\": filename, \"mime_type\": mime_type, \"size_bytes\": size_bytes, \"s3ref\": s3ref, \"version_index\": ($count(versions) > 0 ? $count(versions) - 1 : 0), \"readable_size\": readable_size, \"_tags\": _tags, \"relation_tags\": relation_tags, \"category\": category, \"file_date\": file_date, \"_created_at\": _created_at}]" + } + }, + "entity_graph": { + "nodes": [ + { + "id": "opportunity", + "schema": "opportunity", + "cardinality": "one" + }, + { + "id": "submissions", + "schema": "submission", + "cardinality": "many", + "fields": [ + "!token_claims", + "!_historyIndexes", + "!_displayConditionsStatus", + "!_validation_warnings", + "!_fallback" + ] + }, + { + "id": "contacts", + "schema": "contact", + "cardinality": "many" + }, + { + "id": "accounts", + "schema": "account", + "cardinality": "many" + }, + { + "id": "opportunity_files", + "schema": "file", + "cardinality": "many" + } + ], + "edges": [ + { + "from": "opportunity", + "to": "submissions" + }, + { + "from": "opportunity", + "to": "contacts" + }, + { + "from": "opportunity", + "to": "accounts" + }, + { + "from": "opportunity", + "to": "opportunity_files" + } + ] + }, + "automation_trigger": true, + "automation_trigger_only": true, + "automation_trigger_seed_node": "opportunity" +} \ No newline at end of file diff --git a/static/events/GridPlantRegistrationProgressed.sample.json b/static/events/GridPlantRegistrationProgressed.sample.json new file mode 100644 index 0000000..64579ee --- /dev/null +++ b/static/events/GridPlantRegistrationProgressed.sample.json @@ -0,0 +1,752 @@ +{ + "_org_id": "123", + "_event_time": "1970-01-01T00:00:00.000Z", + "_event_id": "string", + "_event_name": "GridPlantRegistrationProgressed", + "_event_version": "1.0", + "_event_source": "automation", + "_ack_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_trigger_source_type": "automation", + "_trigger_source": "execution-id/action-id", + "_automation_chain": [ + "string" + ], + "_has_pending_changesets": true, + "_changeset_edit_modes": [ + "string" + ], + "_changeset_attributes": [ + "string" + ], + "_changeset_edit_modes_by_attribute": {}, + "stage": { + "workflow_definition_id": "string", + "workflow_status": "string", + "phase_id": "string", + "phase_name": "string", + "task_id": "string", + "task_name": "string", + "opportunity_status": "string" + }, + "event_attachments": [ + { + "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "filename": "string", + "mime_type": "string", + "size_bytes": 0, + "s3ref": { + "bucket": "string", + "key": "string" + }, + "version_index": 0, + "readable_size": "string", + "_tags": [ + "string" + ], + "relation_tags": [ + "string" + ], + "category": "string", + "file_date": "string", + "_created_at": "1970-01-01T00:00:00.000Z" + } + ], + "opportunity": { + "_schema": "opportunity", + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_title": "John Doe", + "_tags": [ + "family:label" + ], + "_purpose": [ + "7675dc56-fd1b-46ee-9c35-defe0667b32e" + ], + "opportunity_title": "string", + "opportunity_number": "string", + "status": "open", + "due_date": "1970-01-01T00:00:00.000Z", + "description": "string", + "assignee": { + "id": "string", + "organization_id": "123", + "email": "user@example.com", + "display_name": "John Doe", + "name": "John Doe", + "preferred_language": "de", + "signature": "

Best regards,
John Doe

", + "roles": [ + "Owner" + ], + "image_uri": { + "original": "https://account-profile-images.epilot.cloud/1/avatar.png", + "thumbnail_32": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + }, + "properties": [ + { + "name": "profileImageName", + "value": "avatar.png" + } + ] + }, + "source": { + "type": "link", + "title": "Visit Website", + "href": "https://example.com" + }, + "customer": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "billing_address": { + "$relation_ref": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "path": "address", + "_tags": [ + "example" + ], + "_id": "xHcOoJCa07eysJ1GaQeSb" + } + ] + }, + "delivery_address": { + "$relation_ref": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "path": "address", + "_tags": [ + "example" + ], + "_id": "xHcOoJCa07eysJ1GaQeSb" + } + ] + }, + "address": { + "$relation_ref": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "path": "address", + "_tags": [ + "example" + ], + "_id": "xHcOoJCa07eysJ1GaQeSb" + } + ] + }, + "payment": { + "$relation_ref": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "path": "address", + "_tags": [ + "example" + ], + "_id": "xHcOoJCa07eysJ1GaQeSb" + } + ] + }, + "dates": [ + { + "_tags": [ + "string" + ], + "value": "1970-01-01T00:00:00.000Z" + } + ], + "items": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "products": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "workflows": { + "primary": { + "id": "string", + "definition_id": "string", + "name": "string", + "status": "STARTED", + "assignees": [ + "string" + ], + "progress": 0, + "phases_in_progress": [ + { + "phase_id": "string", + "phase_name": "string", + "phase_progress": 0 + } + ], + "last_update_time": "1970-01-01T00:00:00.000Z", + "upcoming_tasks_assignees": [ + "string" + ], + "task_id": "string", + "task_name": "string", + "task_assignees": [ + "string" + ], + "task_duedate": "1970-01-01T00:00:00.000Z", + "task_execution_type": "MANUAL", + "task_status": "UNASSIGNED", + "phase_id": "string", + "phase_name": "string", + "phase_assignees": [ + "string" + ], + "phase_progress": 0 + } + }, + "consents": { + "_isValid": true + }, + "_files": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z" + }, + "submissions": [ + { + "_schema": "submission", + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_title": "John Doe", + "_tags": [ + "family:label" + ], + "_purpose": [ + "7675dc56-fd1b-46ee-9c35-defe0667b32e" + ], + "source": { + "type": "link", + "title": "Visit Website", + "href": "https://example.com" + }, + "mapped_entities": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "workflows": { + "primary": { + "id": "string", + "definition_id": "string", + "name": "string", + "status": "STARTED", + "assignees": [ + "string" + ], + "progress": 0, + "phases_in_progress": [ + { + "phase_id": "string", + "phase_name": "string", + "phase_progress": 0 + } + ], + "last_update_time": "1970-01-01T00:00:00.000Z", + "upcoming_tasks_assignees": [ + "string" + ], + "task_id": "string", + "task_name": "string", + "task_assignees": [ + "string" + ], + "task_duedate": "1970-01-01T00:00:00.000Z", + "task_execution_type": "MANUAL", + "task_status": "UNASSIGNED", + "phase_id": "string", + "phase_name": "string", + "phase_assignees": [ + "string" + ], + "phase_progress": 0 + } + }, + "_files": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z" + } + ], + "contacts": [ + { + "_schema": "contact", + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_title": "John Doe", + "_tags": [ + "family:label" + ], + "_purpose": [ + "7675dc56-fd1b-46ee-9c35-defe0667b32e" + ], + "salutation": "null", + "title": "null", + "first_name": "string", + "last_name": "string", + "customer_number": "string", + "birthdate": "2025-01-01", + "email": [ + { + "_tags": [ + "string" + ], + "email": "user@example.com" + } + ], + "phone": [ + { + "_tags": [ + "string" + ], + "phone": "+491234567890" + } + ], + "communication_preference": "postal", + "address": [ + { + "_tags": [ + "billing" + ], + "street": "Hauptstraße", + "street_number": "123", + "postal_code": "50668", + "city": "Cologne", + "country": "DE", + "additional_info": "string", + "company_name": "string", + "first_name": "string", + "last_name": "string", + "salutation": "string", + "title": "string", + "coordinates": "50.948484, 6.943147", + "plot_of_land": "string", + "plot_area": "string", + "start_date": "1970-01-01", + "end_date": "1970-01-01" + } + ], + "payment": [ + { + "type": "payment_sepa", + "data": { + "bank_name": "Deutsche Bank", + "iban": "DE89370400440532013000", + "bic_number": "DEUTDEFF", + "fullname": "John Doe" + } + } + ], + "account": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "marketing_permission": true, + "contact_owner": { + "id": "string", + "organization_id": "123", + "email": "user@example.com", + "display_name": "John Doe", + "name": "John Doe", + "preferred_language": "de", + "signature": "

Best regards,
John Doe

", + "roles": [ + "Owner" + ], + "image_uri": { + "original": "https://account-profile-images.epilot.cloud/1/avatar.png", + "thumbnail_32": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + }, + "properties": [ + { + "name": "profileImageName", + "value": "avatar.png" + } + ] + }, + "consent_email_marketing": { + "type": "consent", + "topic": "string", + "identifiers": [ + "string" + ] + }, + "consent_sms_marketing": { + "type": "consent", + "topic": "string", + "identifiers": [ + "string" + ] + }, + "consent_phone_call": { + "type": "consent", + "topic": "string", + "identifiers": [ + "string" + ] + }, + "consent_print_marketing": { + "type": "consent", + "topic": "string", + "identifiers": [ + "string" + ] + }, + "portal_users": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "opportunities": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "orders": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "contracts": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "external_id": "string", + "workflows": { + "primary": { + "id": "string", + "definition_id": "string", + "name": "string", + "status": "STARTED", + "assignees": [ + "string" + ], + "progress": 0, + "phases_in_progress": [ + { + "phase_id": "string", + "phase_name": "string", + "phase_progress": 0 + } + ], + "last_update_time": "1970-01-01T00:00:00.000Z", + "upcoming_tasks_assignees": [ + "string" + ], + "task_id": "string", + "task_name": "string", + "task_assignees": [ + "string" + ], + "task_duedate": "1970-01-01T00:00:00.000Z", + "task_execution_type": "MANUAL", + "task_status": "UNASSIGNED", + "phase_id": "string", + "phase_name": "string", + "phase_assignees": [ + "string" + ], + "phase_progress": 0 + } + }, + "_files": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z" + } + ], + "accounts": [ + { + "_schema": "account", + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_title": "John Doe", + "_tags": [ + "family:label" + ], + "_purpose": [ + "7675dc56-fd1b-46ee-9c35-defe0667b32e" + ], + "name": "string", + "customer_number": "string", + "registry_court": "string", + "registry_number": "string", + "tax_id": "string", + "tax_exemption": true, + "annual_revenue_currency": "EUR", + "annual_revenue_decimal": "123.45", + "annual_revenue": 0, + "industry": [ + "string" + ], + "company_size": "", + "website": "string", + "marketing_permission": true, + "address": [ + { + "_tags": [ + "billing" + ], + "street": "Hauptstraße", + "street_number": "123", + "postal_code": "50668", + "city": "Cologne", + "country": "DE", + "additional_info": "string", + "company_name": "string", + "first_name": "string", + "last_name": "string", + "salutation": "string", + "title": "string", + "coordinates": "50.948484, 6.943147", + "plot_of_land": "string", + "plot_area": "string", + "start_date": "1970-01-01", + "end_date": "1970-01-01" + } + ], + "payment": [ + { + "type": "payment_sepa", + "data": { + "bank_name": "Deutsche Bank", + "iban": "DE89370400440532013000", + "bic_number": "DEUTDEFF", + "fullname": "John Doe" + } + } + ], + "contacts": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "assigned_to": { + "id": "string", + "organization_id": "123", + "email": "user@example.com", + "display_name": "John Doe", + "name": "John Doe", + "preferred_language": "de", + "signature": "

Best regards,
John Doe

", + "roles": [ + "Owner" + ], + "image_uri": { + "original": "https://account-profile-images.epilot.cloud/1/avatar.png", + "thumbnail_32": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + }, + "properties": [ + { + "name": "profileImageName", + "value": "avatar.png" + } + ] + }, + "email": [ + { + "_tags": [ + "string" + ], + "email": "user@example.com" + } + ], + "phone": [ + { + "_tags": [ + "string" + ], + "phone": "+491234567890" + } + ], + "opportunities": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "workflows": { + "primary": { + "id": "string", + "definition_id": "string", + "name": "string", + "status": "STARTED", + "assignees": [ + "string" + ], + "progress": 0, + "phases_in_progress": [ + { + "phase_id": "string", + "phase_name": "string", + "phase_progress": 0 + } + ], + "last_update_time": "1970-01-01T00:00:00.000Z", + "upcoming_tasks_assignees": [ + "string" + ], + "task_id": "string", + "task_name": "string", + "task_assignees": [ + "string" + ], + "task_duedate": "1970-01-01T00:00:00.000Z", + "task_execution_type": "MANUAL", + "task_status": "UNASSIGNED", + "phase_id": "string", + "phase_name": "string", + "phase_assignees": [ + "string" + ], + "phase_progress": 0 + } + }, + "_files": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z" + } + ], + "opportunity_files": [ + { + "_schema": "file", + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_title": "John Doe", + "_tags": [ + "family:label" + ], + "_purpose": [ + "7675dc56-fd1b-46ee-9c35-defe0667b32e" + ], + "_thumbnail": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "filename": "string", + "mime_type": "string", + "type": "document", + "readable_size": "string", + "language": "de", + "alt_text": "string", + "access_control": "private", + "public_url": "string", + "shared_with_end_customer": true, + "category": "address-suggestions", + "_files": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z" + } + ] +} \ No newline at end of file diff --git a/static/events/GridPlantRegistrationProgressed.schema.json b/static/events/GridPlantRegistrationProgressed.schema.json new file mode 100644 index 0000000..903c7e9 --- /dev/null +++ b/static/events/GridPlantRegistrationProgressed.schema.json @@ -0,0 +1,1747 @@ +{ + "type": "object", + "properties": { + "_org_id": { + "type": "string", + "description": "epilot tenant/organization ID", + "example": "123" + }, + "_event_time": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 timestamp when event occurred" + }, + "_event_id": { + "type": "string", + "description": "Unique event identifier (ULID)" + }, + "_event_name": { + "type": "string", + "description": "Event name from catalog", + "example": "GridPlantRegistrationProgressed" + }, + "_event_version": { + "type": "string", + "description": "Schema version number", + "example": "1.0" + }, + "_event_source": { + "type": "string", + "description": "Source that triggered the event", + "enum": [ + "automation" + ], + "example": "automation" + }, + "_ack_id": { + "type": "string", + "format": "uuid", + "description": "Acknowledgement ID for tracking event delivery (UUID)" + }, + "_trigger_source_type": { + "type": "string", + "description": "The type of system that triggered the event. Examples: api, automation, operation, portal_user", + "enum": [ + "automation" + ], + "example": "automation" + }, + "_trigger_source": { + "type": "string", + "description": "Identifier of the specific trigger source. Examples: user ID, automation execution ID, activity ID, portal user email", + "minLength": 1, + "example": "execution-id/action-id" + }, + "_automation_chain": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 100, + "description": "Ordered automation flow ids that caused this event; propagated verbatim for automation loop prevention" + }, + "_has_pending_changesets": { + "type": "boolean", + "description": "True when the triggering entity (or meter counter) has at least one pending changeset" + }, + "_changeset_edit_modes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Distinct edit modes across the PENDING changesets — only \"external\" (synced from an external system) or \"approval\" (awaiting approval). A \"direct\" write is applied immediately, is not a pending changeset, and so never appears here." + }, + "_changeset_attributes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Keys identifying pending changesets. For attribute changesets these are attribute names (e.g. `billing_cycle`); for meter-reading changesets these are the changeset IDs from `meter._meter_readings_changeset`" + }, + "_changeset_edit_modes_by_attribute": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "not": {} + }, + { + "type": "string" + } + ] + }, + "description": "Per-key edit mode map; keys are a subset of _changeset_attributes (attribute names for entity changesets, changeset IDs for meter-reading changesets) — only those whose pending changeset has an \"external\" or \"approval\" mode. A \"direct\"/unrecognised mode is omitted here, though the key still appears in _changeset_attributes. Enables fine-grained webhook conditions such as `_changeset_edit_modes_by_attribute.billing_cycle equals approval`" + }, + "stage": { + "type": "object", + "properties": { + "workflow_definition_id": { + "type": "string", + "description": "ID of the workflow definition running the process" + }, + "workflow_status": { + "type": "string", + "description": "Status of the workflow, e.g. `STARTED` while running, `DONE` once completed, `CLOSED` once cancelled" + }, + "phase_id": { + "type": "string", + "description": "ID of the current workflow phase. Stable per workflow definition — match on this rather than the name" + }, + "phase_name": { + "type": "string", + "description": "Name of the current workflow phase as configured by the organization" + }, + "task_id": { + "type": "string", + "description": "ID of the current workflow task" + }, + "task_name": { + "type": "string", + "description": "Name of the current workflow task" + }, + "opportunity_status": { + "type": "string", + "description": "Status of the opportunity, e.g. `open`, `in_progress`, `closed`, `cancelled`" + } + }, + "additionalProperties": false, + "description": "Where the process stands when the event fires: the opportunity's primary workflow (status, current phase and task) and the opportunity status. Completion and cancellation show here — `workflow_status` / `opportunity_status`." + }, + "event_attachments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entity_id": { + "type": "string", + "format": "uuid", + "description": "Entity ID of the file" + }, + "filename": { + "type": "string", + "description": "Name of the file" + }, + "mime_type": { + "type": "string", + "description": "MIME type of the file (e.g., application/pdf)" + }, + "size_bytes": { + "type": "integer", + "minimum": 0, + "description": "File size in bytes" + }, + "s3ref": { + "type": "object", + "properties": { + "bucket": { + "type": "string", + "description": "S3 bucket name" + }, + "key": { + "type": "string", + "description": "S3 object key" + } + }, + "required": [ + "bucket", + "key" + ], + "additionalProperties": false, + "description": "S3 reference for the file content" + }, + "version_index": { + "type": "integer", + "minimum": 0, + "description": "Latest version index of the file (versions[].length - 1, or 0 if no versions array)" + }, + "readable_size": { + "type": "string", + "description": "Human-readable file size (e.g., \"200 KB\")" + }, + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags on the file entity (semantic labels set by uploader/automation)" + }, + "relation_tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags on the relation pointing at the file (journey upload block tags such as \"Lageplan\", plus a hidden journey step marker)" + }, + "category": { + "type": "string", + "description": "File category select value (e.g., \"address-suggestions\", \"unknown\")" + }, + "file_date": { + "type": "string", + "description": "User-provided file date" + }, + "_created_at": { + "type": "string", + "format": "date-time", + "description": "When the file entity was created — useful for time-window filtering" + } + }, + "required": [ + "entity_id", + "version_index" + ], + "additionalProperties": false + }, + "description": "Every file related to the opportunity — the documents uploaded by the start journey and every follow-up journey. Empty when the process carries none. Consumers identify a given upload via `relation_tags` (the journey upload block tags) / `_tags`." + }, + "opportunity": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "required": [ + "_schema" + ], + "properties": { + "_schema": { + "readOnly": true, + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "example": "opportunity", + "description": "URL-friendly identifier for the entity schema" + }, + "_id": { + "readOnly": true, + "type": "string", + "format": "uuid", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "description": "Unique identifier for the entity" + }, + "_org": { + "type": "string", + "description": "Organization Id the entity belongs to", + "readOnly": true, + "example": "123" + }, + "_title": { + "readOnly": true, + "type": "string", + "nullable": true, + "example": "John Doe", + "description": "Generated title for the entity based on schema title_template" + }, + "_tags": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "example": [ + "family:label" + ], + "description": "Entity Labels" + }, + "_purpose": { + "$ref": "#/definitions/PurposeAttribute", + "description": "Purposes" + }, + "opportunity_title": { + "type": "string", + "description": "Opportunity Title" + }, + "opportunity_number": { + "type": "string", + "description": "Opportunity Number" + }, + "status": { + "type": "string", + "enum": [ + "open", + "in_progress", + "closed", + "cancelled" + ], + "description": "Status" + }, + "due_date": { + "type": "string", + "format": "date-time", + "description": "Due Date" + }, + "description": { + "type": "string", + "description": "Description" + }, + "assignee": { + "$ref": "#/definitions/User", + "description": "Assignee" + }, + "source": { + "$ref": "#/definitions/LinkAttribute", + "description": "Source" + }, + "customer": { + "$ref": "#/definitions/BaseRelation", + "description": "Customer" + }, + "billing_address": { + "$ref": "#/definitions/BaseRelationRef", + "description": "Billing Address" + }, + "delivery_address": { + "$ref": "#/definitions/BaseRelationRef", + "description": "Delivery Address" + }, + "address": { + "$ref": "#/definitions/BaseRelationRef", + "description": "Additional Addresses" + }, + "payment": { + "$ref": "#/definitions/BaseRelationRef", + "description": "Payment Details" + }, + "dates": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "value": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "value" + ] + }, + "description": "Dates" + }, + "items": { + "$ref": "#/definitions/BaseRelation", + "description": "Orders" + }, + "products": { + "$ref": "#/definitions/BaseRelation", + "description": "Products" + }, + "workflows": { + "$ref": "#/definitions/WorkflowOverview" + }, + "consents": { + "$ref": "#/definitions/LocalConsents" + }, + "_files": { + "$ref": "#/definitions/BaseRelation" + }, + "_created_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity creation" + }, + "_updated_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity last update" + } + }, + "description": "opportunity entity (hydrated from entity graph)" + }, + "submissions": { + "type": "array", + "description": "Array of submission entities (hydrated from entity graph)", + "items": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "required": [ + "_schema" + ], + "properties": { + "_schema": { + "readOnly": true, + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "example": "submission", + "description": "URL-friendly identifier for the entity schema" + }, + "_id": { + "readOnly": true, + "type": "string", + "format": "uuid", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "description": "Unique identifier for the entity" + }, + "_org": { + "type": "string", + "description": "Organization Id the entity belongs to", + "readOnly": true, + "example": "123" + }, + "_title": { + "readOnly": true, + "type": "string", + "nullable": true, + "example": "John Doe", + "description": "Generated title for the entity based on schema title_template" + }, + "_tags": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "example": [ + "family:label" + ], + "description": "Entity Labels" + }, + "_purpose": { + "$ref": "#/definitions/PurposeAttribute", + "description": "Purposes" + }, + "source": { + "$ref": "#/definitions/LinkAttribute", + "description": "Source" + }, + "mapped_entities": { + "$ref": "#/definitions/BaseRelation", + "description": "Entities" + }, + "workflows": { + "$ref": "#/definitions/WorkflowOverview" + }, + "_files": { + "$ref": "#/definitions/BaseRelation" + }, + "_created_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity creation" + }, + "_updated_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity last update" + } + } + } + }, + "contacts": { + "type": "array", + "description": "Array of contact entities (hydrated from entity graph)", + "items": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "required": [ + "_schema" + ], + "properties": { + "_schema": { + "readOnly": true, + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "example": "contact", + "description": "URL-friendly identifier for the entity schema" + }, + "_id": { + "readOnly": true, + "type": "string", + "format": "uuid", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "description": "Unique identifier for the entity" + }, + "_org": { + "type": "string", + "description": "Organization Id the entity belongs to", + "readOnly": true, + "example": "123" + }, + "_title": { + "readOnly": true, + "type": "string", + "nullable": true, + "example": "John Doe", + "description": "Generated title for the entity based on schema title_template" + }, + "_tags": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "example": [ + "family:label" + ], + "description": "Entity Labels" + }, + "_purpose": { + "$ref": "#/definitions/PurposeAttribute", + "description": "Purposes" + }, + "salutation": { + "type": "string", + "enum": [ + "null", + "Mr.", + "Ms. / Mrs.", + "Company", + "Contact Person", + "Company/Contact Person", + "Spouse", + "Family", + "Ownership", + "Assembly", + "Other" + ], + "description": "Salutation" + }, + "title": { + "type": "string", + "enum": [ + "null", + "Dr.", + "Prof.", + "Prof. Dr." + ], + "description": "Title" + }, + "first_name": { + "type": "string", + "description": "First Name" + }, + "last_name": { + "type": "string", + "description": "Last Name" + }, + "customer_number": { + "type": "string", + "description": "Customer Number" + }, + "birthdate": { + "type": "string", + "format": "date", + "example": "2025-01-01", + "description": "Date of Birth" + }, + "email": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "email": { + "type": "string", + "format": "email" + } + }, + "required": [ + "email" + ] + }, + "description": "Email" + }, + "phone": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "phone": { + "type": "string", + "example": "+491234567890" + } + }, + "required": [ + "phone" + ] + }, + "description": "Phone" + }, + "communication_preference": { + "type": "string", + "enum": [ + "postal", + "portal" + ], + "description": "Standard communication method" + }, + "address": { + "type": "array", + "items": { + "type": "object", + "description": "Address attribute", + "additionalProperties": true, + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "billing" + ] + }, + "street": { + "type": "string", + "description": "The first line of the address. Typically the street address or PO Box number.", + "nullable": true, + "example": "Hauptstraße" + }, + "street_number": { + "type": "string", + "description": "The second line of the address. Typically the number of the apartment, suite, or unit.", + "nullable": true, + "example": "123" + }, + "postal_code": { + "type": "string", + "description": "The postal code for the address.", + "nullable": true, + "example": "50668" + }, + "city": { + "type": "string", + "description": "The name of the city, district, village, or town.", + "nullable": true, + "example": "Cologne" + }, + "country": { + "type": "string", + "description": "The two-letter code for the country of the address.", + "nullable": true, + "example": "DE" + }, + "additional_info": { + "type": "string", + "description": "An additional description for the address", + "nullable": true + }, + "company_name": { + "type": "string", + "description": "the company name, usually used as extra delivery instructions", + "nullable": true + }, + "first_name": { + "type": "string", + "description": "the first name of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "last_name": { + "type": "string", + "description": "the last name of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "salutation": { + "type": "string", + "description": "the salutation of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "title": { + "type": "string", + "description": "the title of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "coordinates": { + "type": "string", + "description": "Geographical coordinates (latitude, longitude)", + "nullable": true, + "example": "50.948484, 6.943147" + }, + "plot_of_land": { + "type": "string", + "description": "Plot of land information", + "nullable": true + }, + "plot_area": { + "type": "string", + "description": "Area of the plot", + "nullable": true + }, + "start_date": { + "type": "string", + "description": "Start date for the address", + "format": "date", + "nullable": true + }, + "end_date": { + "type": "string", + "description": "End date for the address", + "format": "date", + "nullable": true + } + } + }, + "description": "Address" + }, + "payment": { + "type": "array", + "items": { + "type": "object", + "description": "Payment method details", + "properties": { + "type": { + "type": "string", + "enum": [ + "payment_sepa", + "payment_invoice", + "payment_cash" + ], + "example": "payment_sepa" + }, + "data": { + "type": "object", + "properties": { + "bank_name": { + "type": "string", + "example": "Deutsche Bank" + }, + "iban": { + "type": "string", + "example": "DE89370400440532013000" + }, + "bic_number": { + "type": "string", + "example": "DEUTDEFF" + }, + "fullname": { + "type": "string", + "example": "John Doe" + } + } + } + } + }, + "description": "Payment" + }, + "account": { + "$ref": "#/definitions/BaseRelation", + "description": "Account" + }, + "marketing_permission": { + "type": "boolean", + "description": "Marketing Permission" + }, + "contact_owner": { + "$ref": "#/definitions/User", + "description": "Contact Owner" + }, + "consent_email_marketing": { + "$ref": "#/definitions/ConsentAttribute", + "description": "Email Marketing" + }, + "consent_sms_marketing": { + "$ref": "#/definitions/ConsentAttribute", + "description": "SMS Marketing" + }, + "consent_phone_call": { + "$ref": "#/definitions/ConsentAttribute", + "description": "Direct Phone Marketing" + }, + "consent_print_marketing": { + "$ref": "#/definitions/ConsentAttribute", + "description": "Print Marketing" + }, + "portal_users": { + "$ref": "#/definitions/BaseRelation", + "description": "Portal Users" + }, + "opportunities": { + "$ref": "#/definitions/BaseRelation", + "description": "Opportunities" + }, + "orders": { + "$ref": "#/definitions/BaseRelation", + "description": "Orders" + }, + "contracts": { + "$ref": "#/definitions/BaseRelation", + "description": "Contracts" + }, + "external_id": { + "type": "string", + "description": "External ID" + }, + "workflows": { + "$ref": "#/definitions/WorkflowOverview" + }, + "_files": { + "$ref": "#/definitions/BaseRelation" + }, + "_created_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity creation" + }, + "_updated_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity last update" + } + } + } + }, + "accounts": { + "type": "array", + "description": "Array of account entities (hydrated from entity graph)", + "items": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "required": [ + "_schema" + ], + "properties": { + "_schema": { + "readOnly": true, + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "example": "account", + "description": "URL-friendly identifier for the entity schema" + }, + "_id": { + "readOnly": true, + "type": "string", + "format": "uuid", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "description": "Unique identifier for the entity" + }, + "_org": { + "type": "string", + "description": "Organization Id the entity belongs to", + "readOnly": true, + "example": "123" + }, + "_title": { + "readOnly": true, + "type": "string", + "nullable": true, + "example": "John Doe", + "description": "Generated title for the entity based on schema title_template" + }, + "_tags": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "example": [ + "family:label" + ], + "description": "Entity Labels" + }, + "_purpose": { + "$ref": "#/definitions/PurposeAttribute", + "description": "Purposes" + }, + "name": { + "type": "string", + "description": "Company name" + }, + "customer_number": { + "type": "string", + "description": "Customer Number" + }, + "registry_court": { + "type": "string", + "description": "Registry court" + }, + "registry_number": { + "type": "string", + "description": "Registry number" + }, + "tax_id": { + "type": "string", + "description": "Tax ID" + }, + "tax_exemption": { + "type": "boolean", + "description": "Tax exemption" + }, + "annual_revenue_currency": { + "type": "string", + "description": "Three-letter ISO currency code, in lowercase. Must be a supported currency.", + "example": "EUR" + }, + "annual_revenue_decimal": { + "type": "string", + "description": "The currency value as a decimal string", + "example": "123.45" + }, + "annual_revenue": { + "type": "number", + "description": "Annual revenue" + }, + "industry": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Company industry" + }, + "company_size": { + "type": "string", + "enum": [ + "", + "1-9", + "9-49", + "50-99", + "100-249", + "250-499", + "500+" + ], + "description": "Company size" + }, + "website": { + "type": "string", + "description": "Website" + }, + "marketing_permission": { + "type": "boolean", + "description": "Marketing Permission" + }, + "address": { + "type": "array", + "items": { + "type": "object", + "description": "Address attribute", + "additionalProperties": true, + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "billing" + ] + }, + "street": { + "type": "string", + "description": "The first line of the address. Typically the street address or PO Box number.", + "nullable": true, + "example": "Hauptstraße" + }, + "street_number": { + "type": "string", + "description": "The second line of the address. Typically the number of the apartment, suite, or unit.", + "nullable": true, + "example": "123" + }, + "postal_code": { + "type": "string", + "description": "The postal code for the address.", + "nullable": true, + "example": "50668" + }, + "city": { + "type": "string", + "description": "The name of the city, district, village, or town.", + "nullable": true, + "example": "Cologne" + }, + "country": { + "type": "string", + "description": "The two-letter code for the country of the address.", + "nullable": true, + "example": "DE" + }, + "additional_info": { + "type": "string", + "description": "An additional description for the address", + "nullable": true + }, + "company_name": { + "type": "string", + "description": "the company name, usually used as extra delivery instructions", + "nullable": true + }, + "first_name": { + "type": "string", + "description": "the first name of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "last_name": { + "type": "string", + "description": "the last name of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "salutation": { + "type": "string", + "description": "the salutation of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "title": { + "type": "string", + "description": "the title of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "coordinates": { + "type": "string", + "description": "Geographical coordinates (latitude, longitude)", + "nullable": true, + "example": "50.948484, 6.943147" + }, + "plot_of_land": { + "type": "string", + "description": "Plot of land information", + "nullable": true + }, + "plot_area": { + "type": "string", + "description": "Area of the plot", + "nullable": true + }, + "start_date": { + "type": "string", + "description": "Start date for the address", + "format": "date", + "nullable": true + }, + "end_date": { + "type": "string", + "description": "End date for the address", + "format": "date", + "nullable": true + } + } + }, + "description": "Address" + }, + "payment": { + "type": "array", + "items": { + "type": "object", + "description": "Payment method details", + "properties": { + "type": { + "type": "string", + "enum": [ + "payment_sepa", + "payment_invoice", + "payment_cash" + ], + "example": "payment_sepa" + }, + "data": { + "type": "object", + "properties": { + "bank_name": { + "type": "string", + "example": "Deutsche Bank" + }, + "iban": { + "type": "string", + "example": "DE89370400440532013000" + }, + "bic_number": { + "type": "string", + "example": "DEUTDEFF" + }, + "fullname": { + "type": "string", + "example": "John Doe" + } + } + } + } + }, + "description": "Payment" + }, + "contacts": { + "$ref": "#/definitions/BaseRelation", + "description": "Contacts" + }, + "assigned_to": { + "$ref": "#/definitions/User", + "description": "Assigned to" + }, + "email": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "email": { + "type": "string", + "format": "email" + } + }, + "required": [ + "email" + ] + }, + "description": "Email" + }, + "phone": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "phone": { + "type": "string", + "example": "+491234567890" + } + }, + "required": [ + "phone" + ] + }, + "description": "Phone" + }, + "opportunities": { + "$ref": "#/definitions/BaseRelation", + "description": "Opportunities" + }, + "workflows": { + "$ref": "#/definitions/WorkflowOverview" + }, + "_files": { + "$ref": "#/definitions/BaseRelation" + }, + "_created_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity creation" + }, + "_updated_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity last update" + } + } + } + }, + "opportunity_files": { + "type": "array", + "description": "Array of file entities (hydrated from entity graph)", + "items": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "required": [ + "_schema", + "filename", + "language" + ], + "properties": { + "_schema": { + "readOnly": true, + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "example": "file", + "description": "URL-friendly identifier for the entity schema" + }, + "_id": { + "readOnly": true, + "type": "string", + "format": "uuid", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "description": "Unique identifier for the entity" + }, + "_org": { + "type": "string", + "description": "Organization Id the entity belongs to", + "readOnly": true, + "example": "123" + }, + "_title": { + "readOnly": true, + "type": "string", + "nullable": true, + "example": "John Doe", + "description": "Generated title for the entity based on schema title_template" + }, + "_tags": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "example": [ + "family:label" + ], + "description": "Entity Labels" + }, + "_purpose": { + "$ref": "#/definitions/PurposeAttribute", + "description": "Purposes" + }, + "_thumbnail": { + "$ref": "#/definitions/BaseRelation", + "description": "Thumbnail" + }, + "filename": { + "type": "string", + "description": "File Name" + }, + "mime_type": { + "type": "string", + "description": "MIME Type" + }, + "type": { + "type": "string", + "enum": [ + "document", + "document_template", + "text", + "image", + "video", + "audio", + "spreadsheet", + "presentation", + "font", + "archive", + "application", + "unknown" + ], + "description": "File Type" + }, + "readable_size": { + "type": "string", + "description": "Size" + }, + "language": { + "type": "string", + "enum": [ + "de", + "en" + ], + "description": "Language" + }, + "alt_text": { + "type": "string", + "description": "Alt text" + }, + "access_control": { + "type": "string", + "enum": [ + "private", + "public-read" + ], + "description": "Access Control" + }, + "public_url": { + "type": "string", + "description": "Public URL" + }, + "shared_with_end_customer": { + "type": "boolean", + "description": "Shared with End Customer" + }, + "category": { + "type": "string", + "enum": [ + "address-suggestions", + "unknown" + ], + "description": "Category" + }, + "_files": { + "$ref": "#/definitions/BaseRelation" + }, + "_created_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity creation" + }, + "_updated_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity last update" + } + } + } + } + }, + "required": [ + "_org_id", + "_event_time", + "_event_id", + "_event_name", + "_event_version", + "_event_source", + "_ack_id", + "stage", + "event_attachments", + "opportunity", + "_trigger_source_type", + "_trigger_source" + ], + "additionalProperties": true, + "definitions": { + "PurposeAttribute": { + "type": "array", + "description": "List of purpose ids", + "items": { + "type": "string" + }, + "example": [ + "7675dc56-fd1b-46ee-9c35-defe0667b32e" + ] + }, + "LinkAttribute": { + "type": "object", + "description": "Link with title and href", + "properties": { + "type": { + "type": "string", + "enum": [ + "link" + ] + }, + "title": { + "type": "string", + "example": "Visit Website" + }, + "href": { + "type": "string", + "format": "uri", + "example": "https://example.com" + } + } + }, + "BaseUUID": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "BaseTags": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "example": [ + "example" + ] + }, + "BaseRelation": { + "type": "object", + "nullable": true, + "description": "Relation to another entity", + "properties": { + "$relation": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entity_id": { + "$ref": "#/definitions/BaseUUID" + }, + "_tags": { + "$ref": "#/definitions/BaseTags" + } + } + } + } + } + }, + "BaseRelationRef": { + "type": "object", + "nullable": true, + "description": "Reference to a specific property of another entity", + "properties": { + "$relation_ref": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entity_id": { + "$ref": "#/definitions/BaseUUID" + }, + "path": { + "type": "string", + "example": "address", + "description": "The property of the entity (pointed by entity_id) to be used as the reference" + }, + "_tags": { + "$ref": "#/definitions/BaseTags" + }, + "_id": { + "type": "string", + "example": "xHcOoJCa07eysJ1GaQeSb" + } + } + } + } + } + }, + "UserId": { + "description": "User's unique identifier", + "type": "string", + "readOnly": true + }, + "OrganizationId": { + "description": "Organization unique identifier", + "type": "string", + "readOnly": true, + "example": "123" + }, + "User": { + "type": "object", + "description": "User information", + "properties": { + "id": { + "$ref": "#/definitions/UserId" + }, + "organization_id": { + "$ref": "#/definitions/OrganizationId" + }, + "email": { + "type": "string", + "format": "email", + "example": "user@example.com" + }, + "display_name": { + "type": "string", + "example": "John Doe", + "deprecated": true + }, + "name": { + "type": "string", + "example": "John Doe", + "deprecated": true + }, + "preferred_language": { + "type": "string", + "example": "de", + "description": "ISO 639-1 language code" + }, + "signature": { + "type": "string", + "example": "

Best regards,
John Doe

", + "description": "HTML email signature" + }, + "roles": { + "type": "array", + "items": { + "type": "string", + "example": "Owner" + }, + "deprecated": true, + "description": "Deprecated! Please use Permissions API instead" + }, + "image_uri": { + "type": "object", + "additionalProperties": true, + "properties": { + "original": { + "type": "string", + "format": "uri", + "example": "https://account-profile-images.epilot.cloud/1/avatar.png" + }, + "thumbnail_32": { + "type": "string", + "format": "uri", + "example": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + } + }, + "nullable": true + }, + "properties": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "profileImageName" + }, + "value": { + "type": "string", + "example": "avatar.png" + } + }, + "required": [ + "name", + "value" + ] + } + } + }, + "required": [ + "id", + "organization_id", + "email", + "name", + "preferred_language", + "roles", + "properties" + ] + }, + "LocalConsents": { + "type": "object", + "description": "Consent management", + "properties": { + "_isValid": { + "type": "boolean", + "example": true, + "description": "Whether all required consents are valid" + } + }, + "additionalProperties": { + "type": "object", + "properties": { + "agreed": { + "type": "boolean", + "example": true + }, + "topic": { + "type": "string", + "example": "privacy_policy" + }, + "text": { + "type": "string", + "example": "I agree to the privacy policy" + }, + "time": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "agreed", + "topic", + "text", + "time" + ] + }, + "required": [ + "_isValid" + ] + }, + "WorkflowStatus": { + "type": "string", + "enum": [ + "STARTED", + "DONE", + "CLOSED" + ] + }, + "StepType": { + "type": "string", + "enum": [ + "MANUAL", + "AUTOMATION" + ] + }, + "StepStatus": { + "type": "string", + "enum": [ + "UNASSIGNED", + "ASSIGNED", + "COMPLETED", + "SKIPPED", + "IN_PROGRESS" + ] + }, + "PhaseInEntity": { + "type": "object", + "description": "Workflow phase information", + "properties": { + "phase_id": { + "type": "string" + }, + "phase_name": { + "type": "string" + }, + "phase_progress": { + "type": "number" + } + }, + "required": [ + "phase_id", + "phase_name", + "phase_progress" + ] + }, + "WorkflowInEntity": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "definition_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/WorkflowStatus" + }, + "assignees": { + "type": "array", + "items": { + "type": "string" + } + }, + "progress": { + "type": "number" + }, + "phases_in_progress": { + "type": "array", + "items": { + "$ref": "#/definitions/PhaseInEntity" + } + }, + "last_update_time": { + "type": "string", + "format": "date-time" + }, + "upcoming_tasks_assignees": { + "type": "array", + "items": { + "type": "string" + } + }, + "task_id": { + "type": "string" + }, + "task_name": { + "type": "string" + }, + "task_assignees": { + "type": "array", + "items": { + "type": "string" + } + }, + "task_duedate": { + "type": "string", + "format": "date-time" + }, + "task_execution_type": { + "$ref": "#/definitions/StepType" + }, + "task_status": { + "$ref": "#/definitions/StepStatus" + }, + "phase_id": { + "type": "string" + }, + "phase_name": { + "type": "string" + }, + "phase_assignees": { + "type": "array", + "items": { + "type": "string" + } + }, + "phase_progress": { + "type": "number" + } + }, + "required": [ + "id", + "definition_id", + "name", + "status", + "assignees", + "last_update_time" + ] + }, + "WorkflowOverview": { + "type": "object", + "properties": { + "primary": { + "$ref": "#/definitions/WorkflowInEntity" + } + }, + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/definitions/WorkflowInEntity" + } + } + }, + "ConsentAttribute": { + "type": "object", + "description": "Consent Management", + "properties": { + "type": { + "type": "string", + "enum": [ + "consent" + ] + }, + "topic": { + "type": "string" + }, + "identifiers": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "type", + "topic" + ] + } + } +} \ No newline at end of file diff --git a/static/events/GridPlantRegistrationRequested.config.json b/static/events/GridPlantRegistrationRequested.config.json new file mode 100644 index 0000000..6ab1a92 --- /dev/null +++ b/static/events/GridPlantRegistrationRequested.config.json @@ -0,0 +1,164 @@ +{ + "event_name": "GridPlantRegistrationRequested", + "event_title": "Grid Plant Registration Request", + "event_description": "A registration of generation and/or consumption plants (PV, storage, heat pump, charging point, …) with the grid operator was submitted. Explicitly triggered by Automation once the journey mapping has created the opportunity, its parties and uploaded documents.", + "event_version": "1.0", + "event_tags": [ + "builtin", + "grid", + "automation", + "opportunity", + "attachment", + "plant-registration" + ], + "schema_fields": { + "event_attachments": { + "json_schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entity_id": { + "type": "string", + "format": "uuid", + "description": "Entity ID of the file" + }, + "filename": { + "type": "string", + "description": "Name of the file" + }, + "mime_type": { + "type": "string", + "description": "MIME type of the file (e.g., application/pdf)" + }, + "size_bytes": { + "type": "integer", + "minimum": 0, + "description": "File size in bytes" + }, + "s3ref": { + "type": "object", + "properties": { + "bucket": { + "type": "string", + "description": "S3 bucket name" + }, + "key": { + "type": "string", + "description": "S3 object key" + } + }, + "required": [ + "bucket", + "key" + ], + "additionalProperties": false, + "description": "S3 reference for the file content" + }, + "version_index": { + "type": "integer", + "minimum": 0, + "description": "Latest version index of the file (versions[].length - 1, or 0 if no versions array)" + }, + "readable_size": { + "type": "string", + "description": "Human-readable file size (e.g., \"200 KB\")" + }, + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags on the file entity (semantic labels set by uploader/automation)" + }, + "relation_tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags on the relation pointing at the file (journey upload block tags such as \"Lageplan\", plus a hidden journey step marker)" + }, + "category": { + "type": "string", + "description": "File category select value (e.g., \"address-suggestions\", \"unknown\")" + }, + "file_date": { + "type": "string", + "description": "User-provided file date" + }, + "_created_at": { + "type": "string", + "format": "date-time", + "description": "When the file entity was created — useful for time-window filtering" + } + }, + "required": [ + "entity_id", + "version_index" + ], + "additionalProperties": false + }, + "description": "Every file related to the opportunity — data sheets, site plans, certificates, further documents. Empty when the registration carries none. Consumers identify a given upload via `relation_tags` (the journey upload block tags) / `_tags`." + }, + "required": true, + "graph_source": "[opportunity_files.{\"entity_id\": _id, \"filename\": filename, \"mime_type\": mime_type, \"size_bytes\": size_bytes, \"s3ref\": s3ref, \"version_index\": ($count(versions) > 0 ? $count(versions) - 1 : 0), \"readable_size\": readable_size, \"_tags\": _tags, \"relation_tags\": relation_tags, \"category\": category, \"file_date\": file_date, \"_created_at\": _created_at}]" + } + }, + "entity_graph": { + "nodes": [ + { + "id": "opportunity", + "schema": "opportunity", + "cardinality": "one" + }, + { + "id": "submission", + "schema": "submission", + "cardinality": "one", + "fields": [ + "!token_claims", + "!_historyIndexes", + "!_displayConditionsStatus", + "!_validation_warnings", + "!_fallback" + ] + }, + { + "id": "contacts", + "schema": "contact", + "cardinality": "many" + }, + { + "id": "accounts", + "schema": "account", + "cardinality": "many" + }, + { + "id": "opportunity_files", + "schema": "file", + "cardinality": "many" + } + ], + "edges": [ + { + "from": "opportunity", + "to": "submission" + }, + { + "from": "opportunity", + "to": "contacts" + }, + { + "from": "opportunity", + "to": "accounts" + }, + { + "from": "opportunity", + "to": "opportunity_files" + } + ] + }, + "automation_trigger": true, + "automation_trigger_only": true, + "automation_trigger_seed_node": "opportunity" +} \ No newline at end of file diff --git a/static/events/GridPlantRegistrationRequested.sample.json b/static/events/GridPlantRegistrationRequested.sample.json new file mode 100644 index 0000000..f5e3619 --- /dev/null +++ b/static/events/GridPlantRegistrationRequested.sample.json @@ -0,0 +1,741 @@ +{ + "_org_id": "123", + "_event_time": "1970-01-01T00:00:00.000Z", + "_event_id": "string", + "_event_name": "GridPlantRegistrationRequested", + "_event_version": "1.0", + "_event_source": "automation", + "_ack_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_trigger_source_type": "automation", + "_trigger_source": "execution-id/action-id", + "_automation_chain": [ + "string" + ], + "_has_pending_changesets": true, + "_changeset_edit_modes": [ + "string" + ], + "_changeset_attributes": [ + "string" + ], + "_changeset_edit_modes_by_attribute": {}, + "event_attachments": [ + { + "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "filename": "string", + "mime_type": "string", + "size_bytes": 0, + "s3ref": { + "bucket": "string", + "key": "string" + }, + "version_index": 0, + "readable_size": "string", + "_tags": [ + "string" + ], + "relation_tags": [ + "string" + ], + "category": "string", + "file_date": "string", + "_created_at": "1970-01-01T00:00:00.000Z" + } + ], + "opportunity": { + "_schema": "opportunity", + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_title": "John Doe", + "_tags": [ + "family:label" + ], + "_purpose": [ + "7675dc56-fd1b-46ee-9c35-defe0667b32e" + ], + "opportunity_title": "string", + "opportunity_number": "string", + "status": "open", + "due_date": "1970-01-01T00:00:00.000Z", + "description": "string", + "assignee": { + "id": "string", + "organization_id": "123", + "email": "user@example.com", + "display_name": "John Doe", + "name": "John Doe", + "preferred_language": "de", + "signature": "

Best regards,
John Doe

", + "roles": [ + "Owner" + ], + "image_uri": { + "original": "https://account-profile-images.epilot.cloud/1/avatar.png", + "thumbnail_32": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + }, + "properties": [ + { + "name": "profileImageName", + "value": "avatar.png" + } + ] + }, + "source": { + "type": "link", + "title": "Visit Website", + "href": "https://example.com" + }, + "customer": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "billing_address": { + "$relation_ref": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "path": "address", + "_tags": [ + "example" + ], + "_id": "xHcOoJCa07eysJ1GaQeSb" + } + ] + }, + "delivery_address": { + "$relation_ref": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "path": "address", + "_tags": [ + "example" + ], + "_id": "xHcOoJCa07eysJ1GaQeSb" + } + ] + }, + "address": { + "$relation_ref": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "path": "address", + "_tags": [ + "example" + ], + "_id": "xHcOoJCa07eysJ1GaQeSb" + } + ] + }, + "payment": { + "$relation_ref": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "path": "address", + "_tags": [ + "example" + ], + "_id": "xHcOoJCa07eysJ1GaQeSb" + } + ] + }, + "dates": [ + { + "_tags": [ + "string" + ], + "value": "1970-01-01T00:00:00.000Z" + } + ], + "items": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "products": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "workflows": { + "primary": { + "id": "string", + "definition_id": "string", + "name": "string", + "status": "STARTED", + "assignees": [ + "string" + ], + "progress": 0, + "phases_in_progress": [ + { + "phase_id": "string", + "phase_name": "string", + "phase_progress": 0 + } + ], + "last_update_time": "1970-01-01T00:00:00.000Z", + "upcoming_tasks_assignees": [ + "string" + ], + "task_id": "string", + "task_name": "string", + "task_assignees": [ + "string" + ], + "task_duedate": "1970-01-01T00:00:00.000Z", + "task_execution_type": "MANUAL", + "task_status": "UNASSIGNED", + "phase_id": "string", + "phase_name": "string", + "phase_assignees": [ + "string" + ], + "phase_progress": 0 + } + }, + "consents": { + "_isValid": true + }, + "_files": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z" + }, + "submission": { + "_schema": "submission", + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_title": "John Doe", + "_tags": [ + "family:label" + ], + "_purpose": [ + "7675dc56-fd1b-46ee-9c35-defe0667b32e" + ], + "source": { + "type": "link", + "title": "Visit Website", + "href": "https://example.com" + }, + "mapped_entities": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "workflows": { + "primary": { + "id": "string", + "definition_id": "string", + "name": "string", + "status": "STARTED", + "assignees": [ + "string" + ], + "progress": 0, + "phases_in_progress": [ + { + "phase_id": "string", + "phase_name": "string", + "phase_progress": 0 + } + ], + "last_update_time": "1970-01-01T00:00:00.000Z", + "upcoming_tasks_assignees": [ + "string" + ], + "task_id": "string", + "task_name": "string", + "task_assignees": [ + "string" + ], + "task_duedate": "1970-01-01T00:00:00.000Z", + "task_execution_type": "MANUAL", + "task_status": "UNASSIGNED", + "phase_id": "string", + "phase_name": "string", + "phase_assignees": [ + "string" + ], + "phase_progress": 0 + } + }, + "_files": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z" + }, + "contacts": [ + { + "_schema": "contact", + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_title": "John Doe", + "_tags": [ + "family:label" + ], + "_purpose": [ + "7675dc56-fd1b-46ee-9c35-defe0667b32e" + ], + "salutation": "null", + "title": "null", + "first_name": "string", + "last_name": "string", + "customer_number": "string", + "birthdate": "2025-01-01", + "email": [ + { + "_tags": [ + "string" + ], + "email": "user@example.com" + } + ], + "phone": [ + { + "_tags": [ + "string" + ], + "phone": "+491234567890" + } + ], + "communication_preference": "postal", + "address": [ + { + "_tags": [ + "billing" + ], + "street": "Hauptstraße", + "street_number": "123", + "postal_code": "50668", + "city": "Cologne", + "country": "DE", + "additional_info": "string", + "company_name": "string", + "first_name": "string", + "last_name": "string", + "salutation": "string", + "title": "string", + "coordinates": "50.948484, 6.943147", + "plot_of_land": "string", + "plot_area": "string", + "start_date": "1970-01-01", + "end_date": "1970-01-01" + } + ], + "payment": [ + { + "type": "payment_sepa", + "data": { + "bank_name": "Deutsche Bank", + "iban": "DE89370400440532013000", + "bic_number": "DEUTDEFF", + "fullname": "John Doe" + } + } + ], + "account": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "marketing_permission": true, + "contact_owner": { + "id": "string", + "organization_id": "123", + "email": "user@example.com", + "display_name": "John Doe", + "name": "John Doe", + "preferred_language": "de", + "signature": "

Best regards,
John Doe

", + "roles": [ + "Owner" + ], + "image_uri": { + "original": "https://account-profile-images.epilot.cloud/1/avatar.png", + "thumbnail_32": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + }, + "properties": [ + { + "name": "profileImageName", + "value": "avatar.png" + } + ] + }, + "consent_email_marketing": { + "type": "consent", + "topic": "string", + "identifiers": [ + "string" + ] + }, + "consent_sms_marketing": { + "type": "consent", + "topic": "string", + "identifiers": [ + "string" + ] + }, + "consent_phone_call": { + "type": "consent", + "topic": "string", + "identifiers": [ + "string" + ] + }, + "consent_print_marketing": { + "type": "consent", + "topic": "string", + "identifiers": [ + "string" + ] + }, + "portal_users": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "opportunities": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "orders": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "contracts": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "external_id": "string", + "workflows": { + "primary": { + "id": "string", + "definition_id": "string", + "name": "string", + "status": "STARTED", + "assignees": [ + "string" + ], + "progress": 0, + "phases_in_progress": [ + { + "phase_id": "string", + "phase_name": "string", + "phase_progress": 0 + } + ], + "last_update_time": "1970-01-01T00:00:00.000Z", + "upcoming_tasks_assignees": [ + "string" + ], + "task_id": "string", + "task_name": "string", + "task_assignees": [ + "string" + ], + "task_duedate": "1970-01-01T00:00:00.000Z", + "task_execution_type": "MANUAL", + "task_status": "UNASSIGNED", + "phase_id": "string", + "phase_name": "string", + "phase_assignees": [ + "string" + ], + "phase_progress": 0 + } + }, + "_files": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z" + } + ], + "accounts": [ + { + "_schema": "account", + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_title": "John Doe", + "_tags": [ + "family:label" + ], + "_purpose": [ + "7675dc56-fd1b-46ee-9c35-defe0667b32e" + ], + "name": "string", + "customer_number": "string", + "registry_court": "string", + "registry_number": "string", + "tax_id": "string", + "tax_exemption": true, + "annual_revenue_currency": "EUR", + "annual_revenue_decimal": "123.45", + "annual_revenue": 0, + "industry": [ + "string" + ], + "company_size": "", + "website": "string", + "marketing_permission": true, + "address": [ + { + "_tags": [ + "billing" + ], + "street": "Hauptstraße", + "street_number": "123", + "postal_code": "50668", + "city": "Cologne", + "country": "DE", + "additional_info": "string", + "company_name": "string", + "first_name": "string", + "last_name": "string", + "salutation": "string", + "title": "string", + "coordinates": "50.948484, 6.943147", + "plot_of_land": "string", + "plot_area": "string", + "start_date": "1970-01-01", + "end_date": "1970-01-01" + } + ], + "payment": [ + { + "type": "payment_sepa", + "data": { + "bank_name": "Deutsche Bank", + "iban": "DE89370400440532013000", + "bic_number": "DEUTDEFF", + "fullname": "John Doe" + } + } + ], + "contacts": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "assigned_to": { + "id": "string", + "organization_id": "123", + "email": "user@example.com", + "display_name": "John Doe", + "name": "John Doe", + "preferred_language": "de", + "signature": "

Best regards,
John Doe

", + "roles": [ + "Owner" + ], + "image_uri": { + "original": "https://account-profile-images.epilot.cloud/1/avatar.png", + "thumbnail_32": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + }, + "properties": [ + { + "name": "profileImageName", + "value": "avatar.png" + } + ] + }, + "email": [ + { + "_tags": [ + "string" + ], + "email": "user@example.com" + } + ], + "phone": [ + { + "_tags": [ + "string" + ], + "phone": "+491234567890" + } + ], + "opportunities": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "workflows": { + "primary": { + "id": "string", + "definition_id": "string", + "name": "string", + "status": "STARTED", + "assignees": [ + "string" + ], + "progress": 0, + "phases_in_progress": [ + { + "phase_id": "string", + "phase_name": "string", + "phase_progress": 0 + } + ], + "last_update_time": "1970-01-01T00:00:00.000Z", + "upcoming_tasks_assignees": [ + "string" + ], + "task_id": "string", + "task_name": "string", + "task_assignees": [ + "string" + ], + "task_duedate": "1970-01-01T00:00:00.000Z", + "task_execution_type": "MANUAL", + "task_status": "UNASSIGNED", + "phase_id": "string", + "phase_name": "string", + "phase_assignees": [ + "string" + ], + "phase_progress": 0 + } + }, + "_files": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z" + } + ], + "opportunity_files": [ + { + "_schema": "file", + "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "_org": "123", + "_title": "John Doe", + "_tags": [ + "family:label" + ], + "_purpose": [ + "7675dc56-fd1b-46ee-9c35-defe0667b32e" + ], + "_thumbnail": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "filename": "string", + "mime_type": "string", + "type": "document", + "readable_size": "string", + "language": "de", + "alt_text": "string", + "access_control": "private", + "public_url": "string", + "shared_with_end_customer": true, + "category": "address-suggestions", + "_files": { + "$relation": [ + { + "entity_id": "123e4567-e89b-12d3-a456-426614174000", + "_tags": [ + "example" + ] + } + ] + }, + "_created_at": "1970-01-01T00:00:00.000Z", + "_updated_at": "1970-01-01T00:00:00.000Z" + } + ] +} \ No newline at end of file diff --git a/static/events/GridPlantRegistrationRequested.schema.json b/static/events/GridPlantRegistrationRequested.schema.json new file mode 100644 index 0000000..aa169d0 --- /dev/null +++ b/static/events/GridPlantRegistrationRequested.schema.json @@ -0,0 +1,1708 @@ +{ + "type": "object", + "properties": { + "_org_id": { + "type": "string", + "description": "epilot tenant/organization ID", + "example": "123" + }, + "_event_time": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 timestamp when event occurred" + }, + "_event_id": { + "type": "string", + "description": "Unique event identifier (ULID)" + }, + "_event_name": { + "type": "string", + "description": "Event name from catalog", + "example": "GridPlantRegistrationRequested" + }, + "_event_version": { + "type": "string", + "description": "Schema version number", + "example": "1.0" + }, + "_event_source": { + "type": "string", + "description": "Source that triggered the event", + "enum": [ + "automation" + ], + "example": "automation" + }, + "_ack_id": { + "type": "string", + "format": "uuid", + "description": "Acknowledgement ID for tracking event delivery (UUID)" + }, + "_trigger_source_type": { + "type": "string", + "description": "The type of system that triggered the event. Examples: api, automation, operation, portal_user", + "enum": [ + "automation" + ], + "example": "automation" + }, + "_trigger_source": { + "type": "string", + "description": "Identifier of the specific trigger source. Examples: user ID, automation execution ID, activity ID, portal user email", + "minLength": 1, + "example": "execution-id/action-id" + }, + "_automation_chain": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 100, + "description": "Ordered automation flow ids that caused this event; propagated verbatim for automation loop prevention" + }, + "_has_pending_changesets": { + "type": "boolean", + "description": "True when the triggering entity (or meter counter) has at least one pending changeset" + }, + "_changeset_edit_modes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Distinct edit modes across the PENDING changesets — only \"external\" (synced from an external system) or \"approval\" (awaiting approval). A \"direct\" write is applied immediately, is not a pending changeset, and so never appears here." + }, + "_changeset_attributes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Keys identifying pending changesets. For attribute changesets these are attribute names (e.g. `billing_cycle`); for meter-reading changesets these are the changeset IDs from `meter._meter_readings_changeset`" + }, + "_changeset_edit_modes_by_attribute": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "not": {} + }, + { + "type": "string" + } + ] + }, + "description": "Per-key edit mode map; keys are a subset of _changeset_attributes (attribute names for entity changesets, changeset IDs for meter-reading changesets) — only those whose pending changeset has an \"external\" or \"approval\" mode. A \"direct\"/unrecognised mode is omitted here, though the key still appears in _changeset_attributes. Enables fine-grained webhook conditions such as `_changeset_edit_modes_by_attribute.billing_cycle equals approval`" + }, + "event_attachments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entity_id": { + "type": "string", + "format": "uuid", + "description": "Entity ID of the file" + }, + "filename": { + "type": "string", + "description": "Name of the file" + }, + "mime_type": { + "type": "string", + "description": "MIME type of the file (e.g., application/pdf)" + }, + "size_bytes": { + "type": "integer", + "minimum": 0, + "description": "File size in bytes" + }, + "s3ref": { + "type": "object", + "properties": { + "bucket": { + "type": "string", + "description": "S3 bucket name" + }, + "key": { + "type": "string", + "description": "S3 object key" + } + }, + "required": [ + "bucket", + "key" + ], + "additionalProperties": false, + "description": "S3 reference for the file content" + }, + "version_index": { + "type": "integer", + "minimum": 0, + "description": "Latest version index of the file (versions[].length - 1, or 0 if no versions array)" + }, + "readable_size": { + "type": "string", + "description": "Human-readable file size (e.g., \"200 KB\")" + }, + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags on the file entity (semantic labels set by uploader/automation)" + }, + "relation_tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags on the relation pointing at the file (journey upload block tags such as \"Lageplan\", plus a hidden journey step marker)" + }, + "category": { + "type": "string", + "description": "File category select value (e.g., \"address-suggestions\", \"unknown\")" + }, + "file_date": { + "type": "string", + "description": "User-provided file date" + }, + "_created_at": { + "type": "string", + "format": "date-time", + "description": "When the file entity was created — useful for time-window filtering" + } + }, + "required": [ + "entity_id", + "version_index" + ], + "additionalProperties": false + }, + "description": "Every file related to the opportunity — data sheets, site plans, certificates, further documents. Empty when the registration carries none. Consumers identify a given upload via `relation_tags` (the journey upload block tags) / `_tags`." + }, + "opportunity": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "required": [ + "_schema" + ], + "properties": { + "_schema": { + "readOnly": true, + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "example": "opportunity", + "description": "URL-friendly identifier for the entity schema" + }, + "_id": { + "readOnly": true, + "type": "string", + "format": "uuid", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "description": "Unique identifier for the entity" + }, + "_org": { + "type": "string", + "description": "Organization Id the entity belongs to", + "readOnly": true, + "example": "123" + }, + "_title": { + "readOnly": true, + "type": "string", + "nullable": true, + "example": "John Doe", + "description": "Generated title for the entity based on schema title_template" + }, + "_tags": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "example": [ + "family:label" + ], + "description": "Entity Labels" + }, + "_purpose": { + "$ref": "#/definitions/PurposeAttribute", + "description": "Purposes" + }, + "opportunity_title": { + "type": "string", + "description": "Opportunity Title" + }, + "opportunity_number": { + "type": "string", + "description": "Opportunity Number" + }, + "status": { + "type": "string", + "enum": [ + "open", + "in_progress", + "closed", + "cancelled" + ], + "description": "Status" + }, + "due_date": { + "type": "string", + "format": "date-time", + "description": "Due Date" + }, + "description": { + "type": "string", + "description": "Description" + }, + "assignee": { + "$ref": "#/definitions/User", + "description": "Assignee" + }, + "source": { + "$ref": "#/definitions/LinkAttribute", + "description": "Source" + }, + "customer": { + "$ref": "#/definitions/BaseRelation", + "description": "Customer" + }, + "billing_address": { + "$ref": "#/definitions/BaseRelationRef", + "description": "Billing Address" + }, + "delivery_address": { + "$ref": "#/definitions/BaseRelationRef", + "description": "Delivery Address" + }, + "address": { + "$ref": "#/definitions/BaseRelationRef", + "description": "Additional Addresses" + }, + "payment": { + "$ref": "#/definitions/BaseRelationRef", + "description": "Payment Details" + }, + "dates": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "value": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "value" + ] + }, + "description": "Dates" + }, + "items": { + "$ref": "#/definitions/BaseRelation", + "description": "Orders" + }, + "products": { + "$ref": "#/definitions/BaseRelation", + "description": "Products" + }, + "workflows": { + "$ref": "#/definitions/WorkflowOverview" + }, + "consents": { + "$ref": "#/definitions/LocalConsents" + }, + "_files": { + "$ref": "#/definitions/BaseRelation" + }, + "_created_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity creation" + }, + "_updated_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity last update" + } + }, + "description": "opportunity entity (hydrated from entity graph)" + }, + "submission": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "required": [ + "_schema" + ], + "properties": { + "_schema": { + "readOnly": true, + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "example": "submission", + "description": "URL-friendly identifier for the entity schema" + }, + "_id": { + "readOnly": true, + "type": "string", + "format": "uuid", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "description": "Unique identifier for the entity" + }, + "_org": { + "type": "string", + "description": "Organization Id the entity belongs to", + "readOnly": true, + "example": "123" + }, + "_title": { + "readOnly": true, + "type": "string", + "nullable": true, + "example": "John Doe", + "description": "Generated title for the entity based on schema title_template" + }, + "_tags": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "example": [ + "family:label" + ], + "description": "Entity Labels" + }, + "_purpose": { + "$ref": "#/definitions/PurposeAttribute", + "description": "Purposes" + }, + "source": { + "$ref": "#/definitions/LinkAttribute", + "description": "Source" + }, + "mapped_entities": { + "$ref": "#/definitions/BaseRelation", + "description": "Entities" + }, + "workflows": { + "$ref": "#/definitions/WorkflowOverview" + }, + "_files": { + "$ref": "#/definitions/BaseRelation" + }, + "_created_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity creation" + }, + "_updated_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity last update" + } + }, + "description": "submission entity (hydrated from entity graph)" + }, + "contacts": { + "type": "array", + "description": "Array of contact entities (hydrated from entity graph)", + "items": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "required": [ + "_schema" + ], + "properties": { + "_schema": { + "readOnly": true, + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "example": "contact", + "description": "URL-friendly identifier for the entity schema" + }, + "_id": { + "readOnly": true, + "type": "string", + "format": "uuid", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "description": "Unique identifier for the entity" + }, + "_org": { + "type": "string", + "description": "Organization Id the entity belongs to", + "readOnly": true, + "example": "123" + }, + "_title": { + "readOnly": true, + "type": "string", + "nullable": true, + "example": "John Doe", + "description": "Generated title for the entity based on schema title_template" + }, + "_tags": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "example": [ + "family:label" + ], + "description": "Entity Labels" + }, + "_purpose": { + "$ref": "#/definitions/PurposeAttribute", + "description": "Purposes" + }, + "salutation": { + "type": "string", + "enum": [ + "null", + "Mr.", + "Ms. / Mrs.", + "Company", + "Contact Person", + "Company/Contact Person", + "Spouse", + "Family", + "Ownership", + "Assembly", + "Other" + ], + "description": "Salutation" + }, + "title": { + "type": "string", + "enum": [ + "null", + "Dr.", + "Prof.", + "Prof. Dr." + ], + "description": "Title" + }, + "first_name": { + "type": "string", + "description": "First Name" + }, + "last_name": { + "type": "string", + "description": "Last Name" + }, + "customer_number": { + "type": "string", + "description": "Customer Number" + }, + "birthdate": { + "type": "string", + "format": "date", + "example": "2025-01-01", + "description": "Date of Birth" + }, + "email": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "email": { + "type": "string", + "format": "email" + } + }, + "required": [ + "email" + ] + }, + "description": "Email" + }, + "phone": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "phone": { + "type": "string", + "example": "+491234567890" + } + }, + "required": [ + "phone" + ] + }, + "description": "Phone" + }, + "communication_preference": { + "type": "string", + "enum": [ + "postal", + "portal" + ], + "description": "Standard communication method" + }, + "address": { + "type": "array", + "items": { + "type": "object", + "description": "Address attribute", + "additionalProperties": true, + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "billing" + ] + }, + "street": { + "type": "string", + "description": "The first line of the address. Typically the street address or PO Box number.", + "nullable": true, + "example": "Hauptstraße" + }, + "street_number": { + "type": "string", + "description": "The second line of the address. Typically the number of the apartment, suite, or unit.", + "nullable": true, + "example": "123" + }, + "postal_code": { + "type": "string", + "description": "The postal code for the address.", + "nullable": true, + "example": "50668" + }, + "city": { + "type": "string", + "description": "The name of the city, district, village, or town.", + "nullable": true, + "example": "Cologne" + }, + "country": { + "type": "string", + "description": "The two-letter code for the country of the address.", + "nullable": true, + "example": "DE" + }, + "additional_info": { + "type": "string", + "description": "An additional description for the address", + "nullable": true + }, + "company_name": { + "type": "string", + "description": "the company name, usually used as extra delivery instructions", + "nullable": true + }, + "first_name": { + "type": "string", + "description": "the first name of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "last_name": { + "type": "string", + "description": "the last name of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "salutation": { + "type": "string", + "description": "the salutation of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "title": { + "type": "string", + "description": "the title of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "coordinates": { + "type": "string", + "description": "Geographical coordinates (latitude, longitude)", + "nullable": true, + "example": "50.948484, 6.943147" + }, + "plot_of_land": { + "type": "string", + "description": "Plot of land information", + "nullable": true + }, + "plot_area": { + "type": "string", + "description": "Area of the plot", + "nullable": true + }, + "start_date": { + "type": "string", + "description": "Start date for the address", + "format": "date", + "nullable": true + }, + "end_date": { + "type": "string", + "description": "End date for the address", + "format": "date", + "nullable": true + } + } + }, + "description": "Address" + }, + "payment": { + "type": "array", + "items": { + "type": "object", + "description": "Payment method details", + "properties": { + "type": { + "type": "string", + "enum": [ + "payment_sepa", + "payment_invoice", + "payment_cash" + ], + "example": "payment_sepa" + }, + "data": { + "type": "object", + "properties": { + "bank_name": { + "type": "string", + "example": "Deutsche Bank" + }, + "iban": { + "type": "string", + "example": "DE89370400440532013000" + }, + "bic_number": { + "type": "string", + "example": "DEUTDEFF" + }, + "fullname": { + "type": "string", + "example": "John Doe" + } + } + } + } + }, + "description": "Payment" + }, + "account": { + "$ref": "#/definitions/BaseRelation", + "description": "Account" + }, + "marketing_permission": { + "type": "boolean", + "description": "Marketing Permission" + }, + "contact_owner": { + "$ref": "#/definitions/User", + "description": "Contact Owner" + }, + "consent_email_marketing": { + "$ref": "#/definitions/ConsentAttribute", + "description": "Email Marketing" + }, + "consent_sms_marketing": { + "$ref": "#/definitions/ConsentAttribute", + "description": "SMS Marketing" + }, + "consent_phone_call": { + "$ref": "#/definitions/ConsentAttribute", + "description": "Direct Phone Marketing" + }, + "consent_print_marketing": { + "$ref": "#/definitions/ConsentAttribute", + "description": "Print Marketing" + }, + "portal_users": { + "$ref": "#/definitions/BaseRelation", + "description": "Portal Users" + }, + "opportunities": { + "$ref": "#/definitions/BaseRelation", + "description": "Opportunities" + }, + "orders": { + "$ref": "#/definitions/BaseRelation", + "description": "Orders" + }, + "contracts": { + "$ref": "#/definitions/BaseRelation", + "description": "Contracts" + }, + "external_id": { + "type": "string", + "description": "External ID" + }, + "workflows": { + "$ref": "#/definitions/WorkflowOverview" + }, + "_files": { + "$ref": "#/definitions/BaseRelation" + }, + "_created_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity creation" + }, + "_updated_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity last update" + } + } + } + }, + "accounts": { + "type": "array", + "description": "Array of account entities (hydrated from entity graph)", + "items": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "required": [ + "_schema" + ], + "properties": { + "_schema": { + "readOnly": true, + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "example": "account", + "description": "URL-friendly identifier for the entity schema" + }, + "_id": { + "readOnly": true, + "type": "string", + "format": "uuid", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "description": "Unique identifier for the entity" + }, + "_org": { + "type": "string", + "description": "Organization Id the entity belongs to", + "readOnly": true, + "example": "123" + }, + "_title": { + "readOnly": true, + "type": "string", + "nullable": true, + "example": "John Doe", + "description": "Generated title for the entity based on schema title_template" + }, + "_tags": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "example": [ + "family:label" + ], + "description": "Entity Labels" + }, + "_purpose": { + "$ref": "#/definitions/PurposeAttribute", + "description": "Purposes" + }, + "name": { + "type": "string", + "description": "Company name" + }, + "customer_number": { + "type": "string", + "description": "Customer Number" + }, + "registry_court": { + "type": "string", + "description": "Registry court" + }, + "registry_number": { + "type": "string", + "description": "Registry number" + }, + "tax_id": { + "type": "string", + "description": "Tax ID" + }, + "tax_exemption": { + "type": "boolean", + "description": "Tax exemption" + }, + "annual_revenue_currency": { + "type": "string", + "description": "Three-letter ISO currency code, in lowercase. Must be a supported currency.", + "example": "EUR" + }, + "annual_revenue_decimal": { + "type": "string", + "description": "The currency value as a decimal string", + "example": "123.45" + }, + "annual_revenue": { + "type": "number", + "description": "Annual revenue" + }, + "industry": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Company industry" + }, + "company_size": { + "type": "string", + "enum": [ + "", + "1-9", + "9-49", + "50-99", + "100-249", + "250-499", + "500+" + ], + "description": "Company size" + }, + "website": { + "type": "string", + "description": "Website" + }, + "marketing_permission": { + "type": "boolean", + "description": "Marketing Permission" + }, + "address": { + "type": "array", + "items": { + "type": "object", + "description": "Address attribute", + "additionalProperties": true, + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "billing" + ] + }, + "street": { + "type": "string", + "description": "The first line of the address. Typically the street address or PO Box number.", + "nullable": true, + "example": "Hauptstraße" + }, + "street_number": { + "type": "string", + "description": "The second line of the address. Typically the number of the apartment, suite, or unit.", + "nullable": true, + "example": "123" + }, + "postal_code": { + "type": "string", + "description": "The postal code for the address.", + "nullable": true, + "example": "50668" + }, + "city": { + "type": "string", + "description": "The name of the city, district, village, or town.", + "nullable": true, + "example": "Cologne" + }, + "country": { + "type": "string", + "description": "The two-letter code for the country of the address.", + "nullable": true, + "example": "DE" + }, + "additional_info": { + "type": "string", + "description": "An additional description for the address", + "nullable": true + }, + "company_name": { + "type": "string", + "description": "the company name, usually used as extra delivery instructions", + "nullable": true + }, + "first_name": { + "type": "string", + "description": "the first name of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "last_name": { + "type": "string", + "description": "the last name of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "salutation": { + "type": "string", + "description": "the salutation of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "title": { + "type": "string", + "description": "the title of the recipient, usually used as extra delivery instructions", + "nullable": true + }, + "coordinates": { + "type": "string", + "description": "Geographical coordinates (latitude, longitude)", + "nullable": true, + "example": "50.948484, 6.943147" + }, + "plot_of_land": { + "type": "string", + "description": "Plot of land information", + "nullable": true + }, + "plot_area": { + "type": "string", + "description": "Area of the plot", + "nullable": true + }, + "start_date": { + "type": "string", + "description": "Start date for the address", + "format": "date", + "nullable": true + }, + "end_date": { + "type": "string", + "description": "End date for the address", + "format": "date", + "nullable": true + } + } + }, + "description": "Address" + }, + "payment": { + "type": "array", + "items": { + "type": "object", + "description": "Payment method details", + "properties": { + "type": { + "type": "string", + "enum": [ + "payment_sepa", + "payment_invoice", + "payment_cash" + ], + "example": "payment_sepa" + }, + "data": { + "type": "object", + "properties": { + "bank_name": { + "type": "string", + "example": "Deutsche Bank" + }, + "iban": { + "type": "string", + "example": "DE89370400440532013000" + }, + "bic_number": { + "type": "string", + "example": "DEUTDEFF" + }, + "fullname": { + "type": "string", + "example": "John Doe" + } + } + } + } + }, + "description": "Payment" + }, + "contacts": { + "$ref": "#/definitions/BaseRelation", + "description": "Contacts" + }, + "assigned_to": { + "$ref": "#/definitions/User", + "description": "Assigned to" + }, + "email": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "email": { + "type": "string", + "format": "email" + } + }, + "required": [ + "email" + ] + }, + "description": "Email" + }, + "phone": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "phone": { + "type": "string", + "example": "+491234567890" + } + }, + "required": [ + "phone" + ] + }, + "description": "Phone" + }, + "opportunities": { + "$ref": "#/definitions/BaseRelation", + "description": "Opportunities" + }, + "workflows": { + "$ref": "#/definitions/WorkflowOverview" + }, + "_files": { + "$ref": "#/definitions/BaseRelation" + }, + "_created_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity creation" + }, + "_updated_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity last update" + } + } + } + }, + "opportunity_files": { + "type": "array", + "description": "Array of file entities (hydrated from entity graph)", + "items": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "required": [ + "_schema", + "filename", + "language" + ], + "properties": { + "_schema": { + "readOnly": true, + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "example": "file", + "description": "URL-friendly identifier for the entity schema" + }, + "_id": { + "readOnly": true, + "type": "string", + "format": "uuid", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "description": "Unique identifier for the entity" + }, + "_org": { + "type": "string", + "description": "Organization Id the entity belongs to", + "readOnly": true, + "example": "123" + }, + "_title": { + "readOnly": true, + "type": "string", + "nullable": true, + "example": "John Doe", + "description": "Generated title for the entity based on schema title_template" + }, + "_tags": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "example": [ + "family:label" + ], + "description": "Entity Labels" + }, + "_purpose": { + "$ref": "#/definitions/PurposeAttribute", + "description": "Purposes" + }, + "_thumbnail": { + "$ref": "#/definitions/BaseRelation", + "description": "Thumbnail" + }, + "filename": { + "type": "string", + "description": "File Name" + }, + "mime_type": { + "type": "string", + "description": "MIME Type" + }, + "type": { + "type": "string", + "enum": [ + "document", + "document_template", + "text", + "image", + "video", + "audio", + "spreadsheet", + "presentation", + "font", + "archive", + "application", + "unknown" + ], + "description": "File Type" + }, + "readable_size": { + "type": "string", + "description": "Size" + }, + "language": { + "type": "string", + "enum": [ + "de", + "en" + ], + "description": "Language" + }, + "alt_text": { + "type": "string", + "description": "Alt text" + }, + "access_control": { + "type": "string", + "enum": [ + "private", + "public-read" + ], + "description": "Access Control" + }, + "public_url": { + "type": "string", + "description": "Public URL" + }, + "shared_with_end_customer": { + "type": "boolean", + "description": "Shared with End Customer" + }, + "category": { + "type": "string", + "enum": [ + "address-suggestions", + "unknown" + ], + "description": "Category" + }, + "_files": { + "$ref": "#/definitions/BaseRelation" + }, + "_created_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity creation" + }, + "_updated_at": { + "readOnly": true, + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of entity last update" + } + } + } + } + }, + "required": [ + "_org_id", + "_event_time", + "_event_id", + "_event_name", + "_event_version", + "_event_source", + "_ack_id", + "event_attachments", + "opportunity", + "_trigger_source_type", + "_trigger_source" + ], + "additionalProperties": true, + "definitions": { + "PurposeAttribute": { + "type": "array", + "description": "List of purpose ids", + "items": { + "type": "string" + }, + "example": [ + "7675dc56-fd1b-46ee-9c35-defe0667b32e" + ] + }, + "LinkAttribute": { + "type": "object", + "description": "Link with title and href", + "properties": { + "type": { + "type": "string", + "enum": [ + "link" + ] + }, + "title": { + "type": "string", + "example": "Visit Website" + }, + "href": { + "type": "string", + "format": "uri", + "example": "https://example.com" + } + } + }, + "BaseUUID": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "BaseTags": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "example": [ + "example" + ] + }, + "BaseRelation": { + "type": "object", + "nullable": true, + "description": "Relation to another entity", + "properties": { + "$relation": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entity_id": { + "$ref": "#/definitions/BaseUUID" + }, + "_tags": { + "$ref": "#/definitions/BaseTags" + } + } + } + } + } + }, + "BaseRelationRef": { + "type": "object", + "nullable": true, + "description": "Reference to a specific property of another entity", + "properties": { + "$relation_ref": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entity_id": { + "$ref": "#/definitions/BaseUUID" + }, + "path": { + "type": "string", + "example": "address", + "description": "The property of the entity (pointed by entity_id) to be used as the reference" + }, + "_tags": { + "$ref": "#/definitions/BaseTags" + }, + "_id": { + "type": "string", + "example": "xHcOoJCa07eysJ1GaQeSb" + } + } + } + } + } + }, + "UserId": { + "description": "User's unique identifier", + "type": "string", + "readOnly": true + }, + "OrganizationId": { + "description": "Organization unique identifier", + "type": "string", + "readOnly": true, + "example": "123" + }, + "User": { + "type": "object", + "description": "User information", + "properties": { + "id": { + "$ref": "#/definitions/UserId" + }, + "organization_id": { + "$ref": "#/definitions/OrganizationId" + }, + "email": { + "type": "string", + "format": "email", + "example": "user@example.com" + }, + "display_name": { + "type": "string", + "example": "John Doe", + "deprecated": true + }, + "name": { + "type": "string", + "example": "John Doe", + "deprecated": true + }, + "preferred_language": { + "type": "string", + "example": "de", + "description": "ISO 639-1 language code" + }, + "signature": { + "type": "string", + "example": "

Best regards,
John Doe

", + "description": "HTML email signature" + }, + "roles": { + "type": "array", + "items": { + "type": "string", + "example": "Owner" + }, + "deprecated": true, + "description": "Deprecated! Please use Permissions API instead" + }, + "image_uri": { + "type": "object", + "additionalProperties": true, + "properties": { + "original": { + "type": "string", + "format": "uri", + "example": "https://account-profile-images.epilot.cloud/1/avatar.png" + }, + "thumbnail_32": { + "type": "string", + "format": "uri", + "example": "https://account-profile-images.epilot.cloud/1/avatar_32x32.png" + } + }, + "nullable": true + }, + "properties": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "profileImageName" + }, + "value": { + "type": "string", + "example": "avatar.png" + } + }, + "required": [ + "name", + "value" + ] + } + } + }, + "required": [ + "id", + "organization_id", + "email", + "name", + "preferred_language", + "roles", + "properties" + ] + }, + "LocalConsents": { + "type": "object", + "description": "Consent management", + "properties": { + "_isValid": { + "type": "boolean", + "example": true, + "description": "Whether all required consents are valid" + } + }, + "additionalProperties": { + "type": "object", + "properties": { + "agreed": { + "type": "boolean", + "example": true + }, + "topic": { + "type": "string", + "example": "privacy_policy" + }, + "text": { + "type": "string", + "example": "I agree to the privacy policy" + }, + "time": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "agreed", + "topic", + "text", + "time" + ] + }, + "required": [ + "_isValid" + ] + }, + "WorkflowStatus": { + "type": "string", + "enum": [ + "STARTED", + "DONE", + "CLOSED" + ] + }, + "StepType": { + "type": "string", + "enum": [ + "MANUAL", + "AUTOMATION" + ] + }, + "StepStatus": { + "type": "string", + "enum": [ + "UNASSIGNED", + "ASSIGNED", + "COMPLETED", + "SKIPPED", + "IN_PROGRESS" + ] + }, + "PhaseInEntity": { + "type": "object", + "description": "Workflow phase information", + "properties": { + "phase_id": { + "type": "string" + }, + "phase_name": { + "type": "string" + }, + "phase_progress": { + "type": "number" + } + }, + "required": [ + "phase_id", + "phase_name", + "phase_progress" + ] + }, + "WorkflowInEntity": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "definition_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/WorkflowStatus" + }, + "assignees": { + "type": "array", + "items": { + "type": "string" + } + }, + "progress": { + "type": "number" + }, + "phases_in_progress": { + "type": "array", + "items": { + "$ref": "#/definitions/PhaseInEntity" + } + }, + "last_update_time": { + "type": "string", + "format": "date-time" + }, + "upcoming_tasks_assignees": { + "type": "array", + "items": { + "type": "string" + } + }, + "task_id": { + "type": "string" + }, + "task_name": { + "type": "string" + }, + "task_assignees": { + "type": "array", + "items": { + "type": "string" + } + }, + "task_duedate": { + "type": "string", + "format": "date-time" + }, + "task_execution_type": { + "$ref": "#/definitions/StepType" + }, + "task_status": { + "$ref": "#/definitions/StepStatus" + }, + "phase_id": { + "type": "string" + }, + "phase_name": { + "type": "string" + }, + "phase_assignees": { + "type": "array", + "items": { + "type": "string" + } + }, + "phase_progress": { + "type": "number" + } + }, + "required": [ + "id", + "definition_id", + "name", + "status", + "assignees", + "last_update_time" + ] + }, + "WorkflowOverview": { + "type": "object", + "properties": { + "primary": { + "$ref": "#/definitions/WorkflowInEntity" + } + }, + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/definitions/WorkflowInEntity" + } + } + }, + "ConsentAttribute": { + "type": "object", + "description": "Consent Management", + "properties": { + "type": { + "type": "string", + "enum": [ + "consent" + ] + }, + "topic": { + "type": "string" + }, + "identifiers": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "type", + "topic" + ] + } + } +} \ No newline at end of file