{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/insuremo-com/json-schema/insuremo-com-comm-execution-detail-schema.json",
  "title": "CommExecutionDetail",
  "x-generated": "2026-12-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/insuremo-com-connecthub-openapi.yml#/components/schemas/CommExecutionDetail",
  "type": "object",
  "properties": {
    "ArchiveReason": {
      "type": "string"
    },
    "ArchiveRevision": {
      "type": "integer",
      "format": "int64"
    },
    "ArchiveState": {
      "type": "string",
      "enum": [
        "NOT_APPLICABLE",
        "PENDING",
        "AVAILABLE",
        "FAILED",
        "ABANDONED"
      ],
      "readOnly": true
    },
    "AttemptCount": {
      "type": "integer",
      "format": "int32"
    },
    "Attempts": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CommExecutionAttempt"
      }
    },
    "AttemptsHasMore": {
      "type": "boolean"
    },
    "AwaitingReceiptExpired": {
      "type": "boolean"
    },
    "Channel": {
      "type": "string"
    },
    "CompletionSatisfied": {
      "type": "boolean",
      "readOnly": true
    },
    "CustomerId": {
      "type": "string",
      "readOnly": true
    },
    "DeliveredTime": {
      "type": "string",
      "description": "Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics. Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics."
    },
    "DeliveryPolicyId": {
      "type": "integer",
      "format": "int64"
    },
    "DeliveryStrategy": {
      "type": "string"
    },
    "DeliveryStrategySource": {
      "type": "string"
    },
    "DispatchGeneration": {
      "type": "integer",
      "format": "int64"
    },
    "DispatchReadyAt": {
      "type": "string",
      "description": "Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics. Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics."
    },
    "DispatchRequestedAt": {
      "type": "string",
      "description": "Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics. Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics."
    },
    "DispatchStatus": {
      "type": "string"
    },
    "ErrorCode": {
      "type": "string"
    },
    "ErrorMessage": {
      "type": "string",
      "description": "Localized business message or safe summary derived from a known failure code; unknown technical errors use a generic message. Never contains raw provider responses or exception details."
    },
    "Events": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CommExecutionEvent"
      }
    },
    "EventsHasMore": {
      "type": "boolean"
    },
    "ExecutionId": {
      "type": "integer",
      "format": "int64"
    },
    "ExpireTime": {
      "type": "string",
      "description": "Task TTL deadline; undispatched messages become EXPIRED past it. Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics. Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics."
    },
    "FileTotal": {
      "type": "integer",
      "format": "int64"
    },
    "Files": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CommExecutionFile"
      }
    },
    "Finished": {
      "type": "boolean",
      "readOnly": true
    },
    "InsertTime": {
      "type": "string",
      "description": "Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics. Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics."
    },
    "LastSubmitTime": {
      "type": "string",
      "description": "Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics. Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics."
    },
    "MaxAttempt": {
      "type": "integer",
      "format": "int32"
    },
    "NeedsAttention": {
      "type": "boolean",
      "readOnly": true
    },
    "NextExecuteTime": {
      "type": "string",
      "description": "Earliest dispatch time while the message is SCHEDULED (ExecuteAt or quiet-hours release). Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics. Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics."
    },
    "NextRetryTime": {
      "type": "string",
      "description": "Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics. Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics."
    },
    "OrderNo": {
      "type": "integer",
      "format": "int32"
    },
    "OutcomeClass": {
      "type": "string"
    },
    "OutcomeCode": {
      "type": "string"
    },
    "OutcomeUncertain": {
      "type": "string"
    },
    "OutputContract": {
      "$ref": "#/$defs/CommFileOutputContract"
    },
    "PageCount": {
      "type": "integer",
      "format": "int32"
    },
    "PageIndex": {
      "type": "integer",
      "format": "int32"
    },
    "PageSize": {
      "type": "integer",
      "format": "int32"
    },
    "Payload": {
      "type": "object",
      "additionalProperties": true,
      "description": "Redacted payload; omitted when it cannot be safely exposed."
    },
    "PreferencePolicy": {
      "type": "string"
    },
    "ReceiptDeadline": {
      "type": "string",
      "description": "Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics. Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics."
    },
    "ReceiptEvidence": {
      "type": "string",
      "enum": [
        "ACCEPTED",
        "DELIVERED",
        "FAILED"
      ],
      "readOnly": true
    },
    "ReceiptMode": {
      "type": "string"
    },
    "ReceiptTimeoutSeconds": {
      "type": "integer",
      "format": "int32"
    },
    "RecipientAddress": {
      "type": "string",
      "description": "Masked recipient address."
    },
    "RecipientId": {
      "type": "string"
    },
    "RecipientRole": {
      "type": "string"
    },
    "RefNumber": {
      "type": "string",
      "readOnly": true
    },
    "RefType": {
      "type": "string",
      "readOnly": true
    },
    "RelevantRenderId": {
      "type": "string"
    },
    "RenderUsageTotal": {
      "type": "integer",
      "format": "int64"
    },
    "RenderUsages": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CommExecutionRenderUsage"
      }
    },
    "RetryBackoffMultiplier": {
      "type": "number"
    },
    "RetryDisabled": {
      "type": "string"
    },
    "RetryInitialDelaySeconds": {
      "type": "integer",
      "format": "int32"
    },
    "RetryMaxDelaySeconds": {
      "type": "integer",
      "format": "int32"
    },
    "RetryPolicySource": {
      "type": "string"
    },
    "Revision": {
      "type": "integer",
      "format": "int64",
      "readOnly": true
    },
    "ServiceCode": {
      "type": "string"
    },
    "ServiceKind": {
      "type": "string",
      "enum": [
        "DELIVERY",
        "DOCUMENT"
      ],
      "readOnly": true
    },
    "Status": {
      "type": "string",
      "description": "Persisted execution lifecycle state. Uncertainty is exposed through OutcomeUncertain; submission progress can separately project UNKNOWN.",
      "enum": [
        "WAITING",
        "SCHEDULED",
        "READY",
        "SUBMITTED",
        "ACCEPTED",
        "COMPLETED",
        "FAILED",
        "SKIPPED",
        "CANCELLED",
        "EXPIRED"
      ]
    },
    "TaskId": {
      "type": "integer",
      "format": "int64"
    },
    "TemplateCode": {
      "type": "string"
    },
    "TraceId": {
      "type": "string",
      "description": "Trace of the latest claimed attempt. Earlier attempt traces remain in Attempts. Absent before dispatch or in older history."
    }
  },
  "$defs": {
    "CommExecutionAttempt": {
      "type": "object",
      "properties": {
        "AdmissionMode": {
          "type": "string",
          "description": "Dispatch history metadata; null for unavailable historical evidence"
        },
        "AttemptId": {
          "type": "integer",
          "format": "int64"
        },
        "AttemptNo": {
          "type": "integer",
          "format": "int32"
        },
        "AttemptOrigin": {
          "type": "string",
          "enum": [
            "AUTOMATIC",
            "MANUAL"
          ]
        },
        "CompleteTime": {
          "type": "string",
          "description": "Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics. Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics."
        },
        "DispatchExecutionMs": {
          "type": "integer",
          "format": "int64",
          "description": "Measured milliseconds; null means unavailable"
        },
        "DispatchGeneration": {
          "type": "integer",
          "format": "int64",
          "description": "Dispatch history metadata; null for unavailable historical evidence"
        },
        "DispatchPodId": {
          "type": "string",
          "description": "Dispatch history metadata; null for unavailable historical evidence"
        },
        "DispatchQueueWaitMs": {
          "type": "integer",
          "format": "int64",
          "description": "Measured milliseconds; null means unavailable"
        },
        "DispatchReadyAt": {
          "type": "string",
          "description": "Dispatch history metadata; null for unavailable historical evidence Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics. Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics."
        },
        "DispatchRequestedAt": {
          "type": "string",
          "description": "Dispatch history metadata; null for unavailable historical evidence Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics. Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics."
        },
        "ErrorCode": {
          "type": "string"
        },
        "ErrorMessage": {
          "type": "string",
          "description": "A safe summary derived from a known failure code; unknown driver/provider errors use a generic message. Never contains raw provider responses or exception details."
        },
        "InvocationFinishedAt": {
          "type": "string",
          "description": "Dispatch history metadata; null for unavailable historical evidence Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics. Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics."
        },
        "InvocationStartedAt": {
          "type": "string",
          "description": "Dispatch history metadata; null for unavailable historical evidence Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics. Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics."
        },
        "ProviderRef": {
          "type": "string"
        },
        "ProviderTime": {
          "type": "string",
          "description": "Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics. Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics."
        },
        "ReceiptDeadline": {
          "type": "string",
          "description": "Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics. Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics."
        },
        "Retryable": {
          "type": "string"
        },
        "ServiceResponseMs": {
          "type": "integer",
          "format": "int64",
          "description": "Measured milliseconds; null means unavailable"
        },
        "Status": {
          "type": "string",
          "description": "Persisted attempt state; an uncertain provider outcome is exposed separately and is not a persisted UNKNOWN enum.",
          "enum": [
            "COMPLETED",
            "CLAIMED",
            "SUBMITTED",
            "ACCEPTED",
            "DELIVERED",
            "FAILED",
            "ABANDONED"
          ]
        },
        "SubmitTime": {
          "type": "string",
          "description": "Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics. Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics."
        },
        "TimingComplete": {
          "type": "string",
          "description": "Dispatch history metadata; null for unavailable historical evidence"
        },
        "TraceId": {
          "type": "string",
          "description": "Trace identifier recorded for this attempt; may be absent in historical data. Use it with ExecutionId and AttemptId to correlate logs."
        },
        "WaitReason": {
          "type": "string",
          "description": "Dispatch history metadata; null for unavailable historical evidence"
        }
      }
    },
    "CommExecutionEvent": {
      "type": "object",
      "properties": {
        "AttemptId": {
          "type": "integer",
          "format": "int64"
        },
        "DispatchGeneration": {
          "type": "integer",
          "format": "int64",
          "description": "Dispatch history metadata; null for unavailable historical evidence"
        },
        "DispatchQueueWaitMs": {
          "type": "integer",
          "format": "int64",
          "description": "Measured milliseconds; null means unavailable"
        },
        "DispatchReadyAt": {
          "type": "string",
          "description": "Dispatch history metadata; null for unavailable historical evidence Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics. Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics."
        },
        "DispatchRequestId": {
          "type": "string",
          "description": "Dispatch history metadata; null for unavailable historical evidence"
        },
        "DispatchRequestedAt": {
          "type": "string",
          "description": "Dispatch history metadata; null for unavailable historical evidence Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics. Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics."
        },
        "EventId": {
          "type": "integer",
          "format": "int64"
        },
        "EventSource": {
          "type": "string"
        },
        "EventTime": {
          "type": "string",
          "description": "Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics. Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics."
        },
        "EventType": {
          "type": "string"
        },
        "ExecutionId": {
          "type": "integer",
          "format": "int64"
        },
        "FromStatus": {
          "type": "string"
        },
        "Operator": {
          "type": "string"
        },
        "RetryReason": {
          "type": "string",
          "description": "Dispatch history metadata; null for unavailable historical evidence"
        },
        "TimingComplete": {
          "type": "string",
          "description": "Dispatch history metadata; null for unavailable historical evidence"
        },
        "ToStatus": {
          "type": "string"
        },
        "TraceId": {
          "type": "string"
        },
        "WaitReason": {
          "type": "string",
          "description": "Dispatch history metadata; null for unavailable historical evidence"
        }
      }
    },
    "CommExecutionFile": {
      "type": "object",
      "properties": {
        "AttemptId": {
          "type": "integer",
          "format": "int64"
        },
        "DocId": {
          "type": "integer",
          "format": "int64"
        },
        "FileKey": {
          "type": "string"
        },
        "FileName": {
          "type": "string"
        },
        "MediaType": {
          "type": "string"
        },
        "MessageFileId": {
          "type": "integer",
          "format": "int64",
          "description": "Execution output file identity. MessageFileId is the retained v1 wire name and messageFileId is its download selector."
        },
        "RenderId": {
          "type": "string"
        },
        "Role": {
          "type": "string"
        },
        "SizeBytes": {
          "type": "integer",
          "format": "int64"
        }
      }
    },
    "CommExecutionRenderUsage": {
      "type": "object",
      "properties": {
        "AttemptId": {
          "type": "integer",
          "format": "int64"
        },
        "RenderId": {
          "type": "string"
        }
      }
    },
    "CommFileLimits": {
      "type": "object",
      "additionalProperties": true,
      "description": "Explicit file CommFileLimitsVO contract.",
      "properties": {
        "MaxFileBytes": {
          "type": "integer",
          "format": "int64"
        },
        "MaxFiles": {
          "type": "integer",
          "format": "int32"
        },
        "MaxTotalBytes": {
          "type": "integer",
          "format": "int64"
        }
      }
    },
    "CommFileOutputContract": {
      "type": "object",
      "additionalProperties": true,
      "description": "NONE or complete FIXED/DYNAMIC archival obligation frozen at acceptance.",
      "properties": {
        "ArchiveRequirement": {
          "type": "string",
          "enum": [
            "NONE",
            "OPTIONAL",
            "REQUIRED"
          ]
        },
        "Entries": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CommFileOutputEntry"
          }
        },
        "Limits": {
          "$ref": "#/$defs/CommFileLimits"
        },
        "Mode": {
          "type": "string",
          "enum": [
            "FIXED",
            "DYNAMIC"
          ]
        },
        "Roles": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CommFileOutputRole"
          }
        }
      }
    },
    "CommFileOutputEntry": {
      "type": "object",
      "additionalProperties": true,
      "description": "Explicit file CommFileOutputEntryVO contract.",
      "properties": {
        "FileKey": {
          "type": "string"
        },
        "Role": {
          "type": "string"
        }
      }
    },
    "CommFileOutputRole": {
      "type": "object",
      "additionalProperties": true,
      "description": "Explicit file CommFileOutputRoleVO contract.",
      "properties": {
        "MaxCount": {
          "type": "integer",
          "format": "int32"
        },
        "MinCount": {
          "type": "integer",
          "format": "int32"
        },
        "Role": {
          "type": "string"
        }
      }
    }
  }
}