{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/loadsmart/json-schema/loadsmart-create-trigger-dto-schema.json",
  "title": "CreateTriggerDto",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/loadsmart-custom-forms-triggers-api-openapi.yml#/components/schemas/CreateTriggerDto",
  "type": "object",
  "properties": {
    "tags": {
      "type": "object"
    },
    "app": {
      "$ref": "#/$defs/AppsEnum"
    },
    "category": {
      "$ref": "#/$defs/CustomFormFlowCategoryEnum"
    },
    "flowId": {
      "type": "object",
      "description": "The ID of the Flow that will be loaded when this trigger is executed"
    },
    "objectId": {
      "type": "string",
      "description": "The ID of the object that this trigger belongs to, the type is dependent on the entityName"
    },
    "feature": {
      "$ref": "#/$defs/CustomFormsFeatures"
    },
    "entityName": {
      "$ref": "#/$defs/CustomFormFlowEntitiesEnum"
    }
  },
  "required": [
    "app",
    "category",
    "objectId",
    "entityName"
  ],
  "$defs": {
    "AppsEnum": {
      "type": "string",
      "description": "The app that this trigger will be activated, based on the source of the request",
      "enum": [
        "api",
        "warehouse",
        "carrier",
        "driver",
        "all"
      ]
    },
    "CustomFormFlowCategoryEnum": {
      "type": "string",
      "description": "The event category that this trigger will be activated on",
      "enum": [
        "appointmentStatusCompleted",
        "appointmentStatusArrived",
        "appointmentCreated",
        "assetVisitCreated",
        "manualTrigger"
      ]
    },
    "CustomFormFlowEntitiesEnum": {
      "type": "string",
      "description": "The entity name that qualifies the objectId this trigger will be activated",
      "enum": [
        "loadtype",
        "dock",
        "warehouse"
      ]
    },
    "CustomFormsFeatures": {
      "type": "string",
      "description": "The feature that this trigger is related, used to group triggers by feature",
      "enum": [
        "check-out",
        "check-in",
        "check-in additional asset details",
        "asset container details",
        "Inbound Claim",
        "Outbound Claim",
        "Book Load Type",
        "appointment-completed"
      ]
    }
  }
}