Trips

manifest.json 244 lines

Files · 9
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244{
  "id": "com.lattice.trips",
  "name": "Trips",
  "icon": "↗",
  "color": "#2563eb",
  "description": "Plan trips with dated itineraries and packing checklists.",
  "requested_permissions": {
    "storage": ["sql"],
    "network": {
      "allowlist": []
    },
    "events": {
      "trip-created": {
        "description": "A trip was created.",
        "schema": {
          "type": "object",
          "properties": {
            "trip_id": {
              "type": "string",
              "description": "Trip UUID.",
              "minLength": 1
            },
            "title": {
              "type": "string",
              "description": "Trip title.",
              "minLength": 1
            },
            "destination": {
              "type": "string",
              "description": "Destination name.",
              "minLength": 1
            },
            "start_date": {
              "type": "string",
              "description": "Inclusive trip start, destination-local YYYY-MM-DD.",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "end_date": {
              "type": "string",
              "description": "Inclusive trip end, destination-local YYYY-MM-DD; on or after start_date.",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "created_at": {
              "type": "string",
              "description": "Creation time, UTC ISO 8601 timestamp.",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
            }
          },
          "required": [
            "trip_id",
            "title",
            "destination",
            "start_date",
            "end_date",
            "created_at"
          ],
          "additionalProperties": false
        }
      },
      "item-added": {
        "description": "An itinerary item was added.",
        "schema": {
          "type": "object",
          "properties": {
            "item_id": {
              "type": "string",
              "description": "Itinerary item UUID.",
              "minLength": 1
            },
            "trip_id": {
              "type": "string",
              "description": "Trip UUID.",
              "minLength": 1
            },
            "kind": {
              "type": "string",
              "description": "Itinerary category.",
              "enum": ["flight", "lodging", "activity"]
            },
            "title": {
              "type": "string",
              "description": "Itinerary item title.",
              "minLength": 1
            },
            "date": {
              "type": "string",
              "description": "Itinerary date, destination-local YYYY-MM-DD; within inclusive trip dates.",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "time": {
              "type": "string",
              "description": "Destination-local HH:MM; empty means no time.",
              "pattern": "^(|([01]\\d|2[0-3]):[0-5]\\d)$"
            },
            "location": {
              "type": "string",
              "description": "Place or address; empty means none."
            },
            "confirmation_code": {
              "type": "string",
              "description": "Booking reference; empty means none."
            },
            "created_at": {
              "type": "string",
              "description": "Creation time, UTC ISO 8601 timestamp.",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
            }
          },
          "required": [
            "item_id",
            "trip_id",
            "kind",
            "title",
            "date",
            "time",
            "location",
            "confirmation_code",
            "created_at"
          ],
          "additionalProperties": false
        }
      },
      "packing-item-checked": {
        "description": "A packing item changed from unpacked to packed.",
        "schema": {
          "type": "object",
          "properties": {
            "packing_item_id": {
              "type": "string",
              "description": "Packing item UUID.",
              "minLength": 1
            },
            "trip_id": {
              "type": "string",
              "description": "Trip UUID.",
              "minLength": 1
            },
            "label": {
              "type": "string",
              "description": "Packing item name.",
              "minLength": 1
            },
            "quantity": {
              "type": "integer",
              "description": "Positive number of pieces.",
              "minimum": 1,
              "maximum": 999
            },
            "checked": {
              "type": "boolean",
              "const": true,
              "description": "True when marked packed."
            },
            "checked_at": {
              "type": "string",
              "description": "Packing time, UTC ISO 8601 timestamp.",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
            }
          },
          "required": [
            "packing_item_id",
            "trip_id",
            "label",
            "quantity",
            "checked",
            "checked_at"
          ],
          "additionalProperties": false
        }
      }
    },
    "listeners": {
      "add-itinerary-item": {
        "description": "Add an itinerary item to an existing trip.",
        "schema": {
          "type": "object",
          "properties": {
            "trip_id": {
              "type": "string",
              "description": "Trip UUID.",
              "minLength": 1
            },
            "kind": {
              "type": "string",
              "description": "Itinerary category.",
              "enum": ["flight", "lodging", "activity"]
            },
            "title": {
              "type": "string",
              "description": "Nonempty itinerary item title.",
              "minLength": 1
            },
            "date": {
              "type": "string",
              "description": "Itinerary date, destination-local YYYY-MM-DD; within inclusive trip dates.",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "time": {
              "type": "string",
              "description": "Destination-local HH:MM; omitted or empty means no time.",
              "pattern": "^(|([01]\\d|2[0-3]):[0-5]\\d)$"
            },
            "location": {
              "type": "string",
              "description": "Place or address; omitted or empty means none."
            },
            "confirmation_code": {
              "type": "string",
              "description": "Booking reference; omitted or empty means none."
            }
          },
          "required": ["trip_id", "kind", "title", "date"],
          "additionalProperties": false
        }
      },
      "add-packing-item": {
        "description": "Add an unchecked packing item to an existing trip.",
        "schema": {
          "type": "object",
          "properties": {
            "trip_id": {
              "type": "string",
              "description": "Trip UUID.",
              "minLength": 1
            },
            "label": {
              "type": "string",
              "description": "Packing item name.",
              "minLength": 1
            },
            "quantity": {
              "type": "integer",
              "description": "Positive number of pieces; omitted defaults to 1.",
              "minimum": 1,
              "maximum": 999
            }
          },
          "required": ["trip_id", "label"],
          "additionalProperties": false
        }
      }
    }
  }
}