Skip to content

Batch#

pyticktick.models.v2.responses.batch #

Responses for batch requests in the V2 API.

This module holds both the response for general POST batch requests and the response for GET batch requests.

Unofficial API

These models are part of the unofficial TickTick API. They were created by reverse engineering the API. They may be incomplete or inaccurate.

Classes:

Name Description
BatchRespV2

Model for the response of a generic batch request via the V2 API.

GetBatchV2

Model for the response of a batch object status request via the V2 API.

SyncOrderBeanV3V2

Unknown model for the V2 API.

SyncTaskBeanV2

Model for all the tasks in a batch response via the V2 API.

SyncTaskOrderBeanV2

Unknown model for the V2 API.

BatchRespV2 pydantic-model #

Bases: BaseModelV2

Model for the response of a generic batch request via the V2 API.

Warning

This model is a best guess at the structure of the response. It is not clear whether the id2etag and id2error fields are from MongoDB, but they seem to fit the pattern.

Show JSON schema:
{
  "additionalProperties": false,
  "description": "Model for the response of a generic batch request via the V2 API.\n\n!!! warning\n    This model is a best guess at the structure of the response. It is not clear\n    whether the `id2etag` and `id2error` fields are from MongoDB, but they seem to\n    fit the pattern.",
  "properties": {
    "id2error": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "Mapping of objects that failed to be created / updated",
      "title": "Id2Error",
      "type": "object"
    },
    "id2etag": {
      "additionalProperties": {
        "pattern": "^[a-z0-9]{8}$",
        "type": "string"
      },
      "description": "ID to ETag mapping of objects that were successfully created / updated",
      "title": "Id2Etag",
      "type": "object"
    }
  },
  "required": [
    "id2error",
    "id2etag"
  ],
  "title": "BatchRespV2",
  "type": "object"
}

Fields:

Validators:

etags property #

etags: list[str]

List of all the ETags in the response.

id2error pydantic-field #

id2error: dict[ObjectId, str]

Mapping of objects that failed to be created / updated

id2etag pydantic-field #

id2etag: dict[ObjectId, ETag]

ID to ETag mapping of objects that were successfully created / updated

ids property #

ids: list[str]

List of all the IDs in the response.

empty_str_to_none pydantic-validator #

empty_str_to_none(v: Any) -> Any

Convert empty strings to None.

TickTick API responses sometimes conflates None and empty strings for optional fields. This validator ensures that empty strings are converted to None, which then allows for more consistent handling of the data within the library.

Parameters:

Name Type Description Default
v Any

The value to validate.

required

Returns:

Name Type Description
Any Any

The input value if it is not an empty string, otherwise None.

Source code in src/pyticktick/models/v2/models.py
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
@field_validator("*", mode="before")
@classmethod
def empty_str_to_none(cls, v: Any) -> Any:
    """Convert empty strings to None.

    TickTick API responses sometimes conflates `None` and empty strings for
    optional fields. This validator ensures that empty strings are converted to
    `None`, which then allows for more consistent handling of the data within the
    library.

    Args:
        v (Any): The value to validate.

    Returns:
        Any: The input value if it is not an empty string, otherwise `None`.
    """
    if isinstance(v, str) and len(v) == 0:
        return None
    return v

override_forbid_extra_message_injector pydantic-validator #

override_forbid_extra_message_injector(
    data: Any,
    handler: ModelWrapValidatorHandler[BaseModelV2],
) -> BaseModelV2

Provide a better error message for extra fields.

The TickTick V2 API is unofficial and may change without notice. As such, the models may not always be up to date with the API. This validator catches the extra_forbidden errors and provides a more informative error message, including a link to the documentation on how to override the extra_forbidden behavior if needed.

Parameters:

Name Type Description Default
data Any

The input data to validate.

required
handler ModelWrapValidatorHandler[BaseModelV2]

The handler to call the next validator in the chain.

required

Raises:

Type Description
ValidationError

If the pydantic model fails validation for any reason.

Returns:

Name Type Description
BaseModelV2 BaseModelV2

The validated model instance.

Source code in src/pyticktick/models/v2/models.py
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
@model_validator(mode="wrap")
@classmethod
def override_forbid_extra_message_injector(
    cls,
    data: Any,
    handler: ModelWrapValidatorHandler[BaseModelV2],
) -> BaseModelV2:
    """Provide a better error message for extra fields.

    The TickTick V2 API is unofficial and may change without notice. As such, the
    models may not always be up to date with the API. This validator catches the
    `extra_forbidden` errors and provides a more informative error message,
    including a link to the documentation on how to override the `extra_forbidden`
    behavior if needed.

    Args:
        data (Any): The input data to validate.
        handler (ModelWrapValidatorHandler[BaseModelV2]): The handler to call the
            next validator in the chain.

    Raises:
        ValidationError: If the pydantic model fails validation for any reason.

    Returns:
        BaseModelV2: The validated model instance.
    """  # noqa: DOC501, DOC502 # ruff thinks `from_exception_data` should be raised instead of `ValidationError`
    try:
        return handler(data)
    except ValidationError as e:
        errors = []
        for error_dict in e.errors():
            if error_dict.get("type") in (
                "extra_forbidden",
                "custom_pyticktick_extra_forbidden",
            ):
                _type: str | PydanticCustomError = PydanticCustomError(
                    "custom_pyticktick_extra_forbidden",
                    f"Extra inputs are not permitted by default for `{cls.__name__}`. Please set `override_forbid_extra` to `True` if you believe the TickTick API has diverged from the model. See https://pyticktick.pretzer.io/guides/settings/overriding_models_that_forbid_extra_fields/ for more information.",  # pyright: ignore[reportArgumentType] # ty: ignore[invalid-argument-type]
                )
            else:
                _type = error_dict["type"]

            init_error_details: InitErrorDetails = {
                "type": _type,
                "input": error_dict["input"],
            }
            if "loc" in error_dict:
                init_error_details["loc"] = error_dict["loc"]
            if "ctx" in error_dict:
                init_error_details["ctx"] = error_dict["ctx"]

            errors.append(init_error_details)

        raise ValidationError.from_exception_data(e.title, errors) from e

GetBatchV2 pydantic-model #

Bases: BaseModelV2

Model for the response of a batch object status request via the V2 API.

This model appears to be used like an entity bean for TickTick apps to take advantage of. It keeps track of the state of the user's projects, tasks, etc. We do not have a complete understanding of the structure of this model, nor do we have an understanding of how to use this model to publish changes to the user's account. This model is currently intended for reading the user's state.

Show JSON schema:
{
  "$defs": {
    "ItemV2": {
      "additionalProperties": false,
      "description": "Model for a checklist item via the V2 API.",
      "properties": {
        "completedTime": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Completed time in `yyyy-MM-dd'T'HH:mm:ssZ` format",
          "title": "Completedtime"
        },
        "id": {
          "description": "ID of the checklist item",
          "title": "Id",
          "type": "string"
        },
        "isAllDay": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The task is due any time on the due date, rather than at a specific time",
          "title": "Isallday"
        },
        "sortOrder": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The order of checklist item",
          "title": "Sortorder"
        },
        "startDate": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Start date and time in `yyyy-MM-dd'T'HH:mm:ssZ` format",
          "title": "Startdate"
        },
        "status": {
          "anyOf": [
            {
              "enum": [
                -1,
                0,
                1,
                2
              ],
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The completion status of checklist item",
          "title": "Status"
        },
        "timeZone": {
          "anyOf": [
            {
              "enum": [
                "Africa/Abidjan",
                "Africa/Accra",
                "Africa/Addis_Ababa",
                "Africa/Algiers",
                "Africa/Asmara",
                "Africa/Asmera",
                "Africa/Bamako",
                "Africa/Bangui",
                "Africa/Banjul",
                "Africa/Bissau",
                "Africa/Blantyre",
                "Africa/Brazzaville",
                "Africa/Bujumbura",
                "Africa/Cairo",
                "Africa/Casablanca",
                "Africa/Ceuta",
                "Africa/Conakry",
                "Africa/Dakar",
                "Africa/Dar_es_Salaam",
                "Africa/Djibouti",
                "Africa/Douala",
                "Africa/El_Aaiun",
                "Africa/Freetown",
                "Africa/Gaborone",
                "Africa/Harare",
                "Africa/Johannesburg",
                "Africa/Juba",
                "Africa/Kampala",
                "Africa/Khartoum",
                "Africa/Kigali",
                "Africa/Kinshasa",
                "Africa/Lagos",
                "Africa/Libreville",
                "Africa/Lome",
                "Africa/Luanda",
                "Africa/Lubumbashi",
                "Africa/Lusaka",
                "Africa/Malabo",
                "Africa/Maputo",
                "Africa/Maseru",
                "Africa/Mbabane",
                "Africa/Mogadishu",
                "Africa/Monrovia",
                "Africa/Nairobi",
                "Africa/Ndjamena",
                "Africa/Niamey",
                "Africa/Nouakchott",
                "Africa/Ouagadougou",
                "Africa/Porto-Novo",
                "Africa/Sao_Tome",
                "Africa/Timbuktu",
                "Africa/Tripoli",
                "Africa/Tunis",
                "Africa/Windhoek",
                "America/Adak",
                "America/Anchorage",
                "America/Anguilla",
                "America/Antigua",
                "America/Araguaina",
                "America/Argentina/Buenos_Aires",
                "America/Argentina/Catamarca",
                "America/Argentina/ComodRivadavia",
                "America/Argentina/Cordoba",
                "America/Argentina/Jujuy",
                "America/Argentina/La_Rioja",
                "America/Argentina/Mendoza",
                "America/Argentina/Rio_Gallegos",
                "America/Argentina/Salta",
                "America/Argentina/San_Juan",
                "America/Argentina/San_Luis",
                "America/Argentina/Tucuman",
                "America/Argentina/Ushuaia",
                "America/Aruba",
                "America/Asuncion",
                "America/Atikokan",
                "America/Atka",
                "America/Bahia",
                "America/Bahia_Banderas",
                "America/Barbados",
                "America/Belem",
                "America/Belize",
                "America/Blanc-Sablon",
                "America/Boa_Vista",
                "America/Bogota",
                "America/Boise",
                "America/Buenos_Aires",
                "America/Cambridge_Bay",
                "America/Campo_Grande",
                "America/Cancun",
                "America/Caracas",
                "America/Catamarca",
                "America/Cayenne",
                "America/Cayman",
                "America/Chicago",
                "America/Chihuahua",
                "America/Ciudad_Juarez",
                "America/Coral_Harbour",
                "America/Cordoba",
                "America/Costa_Rica",
                "America/Coyhaique",
                "America/Creston",
                "America/Cuiaba",
                "America/Curacao",
                "America/Danmarkshavn",
                "America/Dawson",
                "America/Dawson_Creek",
                "America/Denver",
                "America/Detroit",
                "America/Dominica",
                "America/Edmonton",
                "America/Eirunepe",
                "America/El_Salvador",
                "America/Ensenada",
                "America/Fort_Nelson",
                "America/Fort_Wayne",
                "America/Fortaleza",
                "America/Glace_Bay",
                "America/Godthab",
                "America/Goose_Bay",
                "America/Grand_Turk",
                "America/Grenada",
                "America/Guadeloupe",
                "America/Guatemala",
                "America/Guayaquil",
                "America/Guyana",
                "America/Halifax",
                "America/Havana",
                "America/Hermosillo",
                "America/Indiana/Indianapolis",
                "America/Indiana/Knox",
                "America/Indiana/Marengo",
                "America/Indiana/Petersburg",
                "America/Indiana/Tell_City",
                "America/Indiana/Vevay",
                "America/Indiana/Vincennes",
                "America/Indiana/Winamac",
                "America/Indianapolis",
                "America/Inuvik",
                "America/Iqaluit",
                "America/Jamaica",
                "America/Jujuy",
                "America/Juneau",
                "America/Kentucky/Louisville",
                "America/Kentucky/Monticello",
                "America/Knox_IN",
                "America/Kralendijk",
                "America/La_Paz",
                "America/Lima",
                "America/Los_Angeles",
                "America/Louisville",
                "America/Lower_Princes",
                "America/Maceio",
                "America/Managua",
                "America/Manaus",
                "America/Marigot",
                "America/Martinique",
                "America/Matamoros",
                "America/Mazatlan",
                "America/Mendoza",
                "America/Menominee",
                "America/Merida",
                "America/Metlakatla",
                "America/Mexico_City",
                "America/Miquelon",
                "America/Moncton",
                "America/Monterrey",
                "America/Montevideo",
                "America/Montreal",
                "America/Montserrat",
                "America/Nassau",
                "America/New_York",
                "America/Nipigon",
                "America/Nome",
                "America/Noronha",
                "America/North_Dakota/Beulah",
                "America/North_Dakota/Center",
                "America/North_Dakota/New_Salem",
                "America/Nuuk",
                "America/Ojinaga",
                "America/Panama",
                "America/Pangnirtung",
                "America/Paramaribo",
                "America/Phoenix",
                "America/Port-au-Prince",
                "America/Port_of_Spain",
                "America/Porto_Acre",
                "America/Porto_Velho",
                "America/Puerto_Rico",
                "America/Punta_Arenas",
                "America/Rainy_River",
                "America/Rankin_Inlet",
                "America/Recife",
                "America/Regina",
                "America/Resolute",
                "America/Rio_Branco",
                "America/Rosario",
                "America/Santa_Isabel",
                "America/Santarem",
                "America/Santiago",
                "America/Santo_Domingo",
                "America/Sao_Paulo",
                "America/Scoresbysund",
                "America/Shiprock",
                "America/Sitka",
                "America/St_Barthelemy",
                "America/St_Johns",
                "America/St_Kitts",
                "America/St_Lucia",
                "America/St_Thomas",
                "America/St_Vincent",
                "America/Swift_Current",
                "America/Tegucigalpa",
                "America/Thule",
                "America/Thunder_Bay",
                "America/Tijuana",
                "America/Toronto",
                "America/Tortola",
                "America/Vancouver",
                "America/Virgin",
                "America/Whitehorse",
                "America/Winnipeg",
                "America/Yakutat",
                "America/Yellowknife",
                "Antarctica/Casey",
                "Antarctica/Davis",
                "Antarctica/DumontDUrville",
                "Antarctica/Macquarie",
                "Antarctica/Mawson",
                "Antarctica/McMurdo",
                "Antarctica/Palmer",
                "Antarctica/Rothera",
                "Antarctica/South_Pole",
                "Antarctica/Syowa",
                "Antarctica/Troll",
                "Antarctica/Vostok",
                "Arctic/Longyearbyen",
                "Asia/Aden",
                "Asia/Almaty",
                "Asia/Amman",
                "Asia/Anadyr",
                "Asia/Aqtau",
                "Asia/Aqtobe",
                "Asia/Ashgabat",
                "Asia/Ashkhabad",
                "Asia/Atyrau",
                "Asia/Baghdad",
                "Asia/Bahrain",
                "Asia/Baku",
                "Asia/Bangkok",
                "Asia/Barnaul",
                "Asia/Beirut",
                "Asia/Bishkek",
                "Asia/Brunei",
                "Asia/Calcutta",
                "Asia/Chita",
                "Asia/Choibalsan",
                "Asia/Chongqing",
                "Asia/Chungking",
                "Asia/Colombo",
                "Asia/Dacca",
                "Asia/Damascus",
                "Asia/Dhaka",
                "Asia/Dili",
                "Asia/Dubai",
                "Asia/Dushanbe",
                "Asia/Famagusta",
                "Asia/Gaza",
                "Asia/Harbin",
                "Asia/Hebron",
                "Asia/Ho_Chi_Minh",
                "Asia/Hong_Kong",
                "Asia/Hovd",
                "Asia/Irkutsk",
                "Asia/Istanbul",
                "Asia/Jakarta",
                "Asia/Jayapura",
                "Asia/Jerusalem",
                "Asia/Kabul",
                "Asia/Kamchatka",
                "Asia/Karachi",
                "Asia/Kashgar",
                "Asia/Kathmandu",
                "Asia/Katmandu",
                "Asia/Khandyga",
                "Asia/Kolkata",
                "Asia/Krasnoyarsk",
                "Asia/Kuala_Lumpur",
                "Asia/Kuching",
                "Asia/Kuwait",
                "Asia/Macao",
                "Asia/Macau",
                "Asia/Magadan",
                "Asia/Makassar",
                "Asia/Manila",
                "Asia/Muscat",
                "Asia/Nicosia",
                "Asia/Novokuznetsk",
                "Asia/Novosibirsk",
                "Asia/Omsk",
                "Asia/Oral",
                "Asia/Phnom_Penh",
                "Asia/Pontianak",
                "Asia/Pyongyang",
                "Asia/Qatar",
                "Asia/Qostanay",
                "Asia/Qyzylorda",
                "Asia/Rangoon",
                "Asia/Riyadh",
                "Asia/Saigon",
                "Asia/Sakhalin",
                "Asia/Samarkand",
                "Asia/Seoul",
                "Asia/Shanghai",
                "Asia/Singapore",
                "Asia/Srednekolymsk",
                "Asia/Taipei",
                "Asia/Tashkent",
                "Asia/Tbilisi",
                "Asia/Tehran",
                "Asia/Tel_Aviv",
                "Asia/Thimbu",
                "Asia/Thimphu",
                "Asia/Tokyo",
                "Asia/Tomsk",
                "Asia/Ujung_Pandang",
                "Asia/Ulaanbaatar",
                "Asia/Ulan_Bator",
                "Asia/Urumqi",
                "Asia/Ust-Nera",
                "Asia/Vientiane",
                "Asia/Vladivostok",
                "Asia/Yakutsk",
                "Asia/Yangon",
                "Asia/Yekaterinburg",
                "Asia/Yerevan",
                "Atlantic/Azores",
                "Atlantic/Bermuda",
                "Atlantic/Canary",
                "Atlantic/Cape_Verde",
                "Atlantic/Faeroe",
                "Atlantic/Faroe",
                "Atlantic/Jan_Mayen",
                "Atlantic/Madeira",
                "Atlantic/Reykjavik",
                "Atlantic/South_Georgia",
                "Atlantic/St_Helena",
                "Atlantic/Stanley",
                "Australia/ACT",
                "Australia/Adelaide",
                "Australia/Brisbane",
                "Australia/Broken_Hill",
                "Australia/Canberra",
                "Australia/Currie",
                "Australia/Darwin",
                "Australia/Eucla",
                "Australia/Hobart",
                "Australia/LHI",
                "Australia/Lindeman",
                "Australia/Lord_Howe",
                "Australia/Melbourne",
                "Australia/NSW",
                "Australia/North",
                "Australia/Perth",
                "Australia/Queensland",
                "Australia/South",
                "Australia/Sydney",
                "Australia/Tasmania",
                "Australia/Victoria",
                "Australia/West",
                "Australia/Yancowinna",
                "Brazil/Acre",
                "Brazil/DeNoronha",
                "Brazil/East",
                "Brazil/West",
                "CET",
                "CST6CDT",
                "Canada/Atlantic",
                "Canada/Central",
                "Canada/Eastern",
                "Canada/Mountain",
                "Canada/Newfoundland",
                "Canada/Pacific",
                "Canada/Saskatchewan",
                "Canada/Yukon",
                "Chile/Continental",
                "Chile/EasterIsland",
                "Cuba",
                "EET",
                "EST",
                "EST5EDT",
                "Egypt",
                "Eire",
                "Etc/GMT",
                "Etc/GMT+0",
                "Etc/GMT+1",
                "Etc/GMT+10",
                "Etc/GMT+11",
                "Etc/GMT+12",
                "Etc/GMT+2",
                "Etc/GMT+3",
                "Etc/GMT+4",
                "Etc/GMT+5",
                "Etc/GMT+6",
                "Etc/GMT+7",
                "Etc/GMT+8",
                "Etc/GMT+9",
                "Etc/GMT-0",
                "Etc/GMT-1",
                "Etc/GMT-10",
                "Etc/GMT-11",
                "Etc/GMT-12",
                "Etc/GMT-13",
                "Etc/GMT-14",
                "Etc/GMT-2",
                "Etc/GMT-3",
                "Etc/GMT-4",
                "Etc/GMT-5",
                "Etc/GMT-6",
                "Etc/GMT-7",
                "Etc/GMT-8",
                "Etc/GMT-9",
                "Etc/GMT0",
                "Etc/Greenwich",
                "Etc/UCT",
                "Etc/UTC",
                "Etc/Universal",
                "Etc/Zulu",
                "Europe/Amsterdam",
                "Europe/Andorra",
                "Europe/Astrakhan",
                "Europe/Athens",
                "Europe/Belfast",
                "Europe/Belgrade",
                "Europe/Berlin",
                "Europe/Bratislava",
                "Europe/Brussels",
                "Europe/Bucharest",
                "Europe/Budapest",
                "Europe/Busingen",
                "Europe/Chisinau",
                "Europe/Copenhagen",
                "Europe/Dublin",
                "Europe/Gibraltar",
                "Europe/Guernsey",
                "Europe/Helsinki",
                "Europe/Isle_of_Man",
                "Europe/Istanbul",
                "Europe/Jersey",
                "Europe/Kaliningrad",
                "Europe/Kiev",
                "Europe/Kirov",
                "Europe/Kyiv",
                "Europe/Lisbon",
                "Europe/Ljubljana",
                "Europe/London",
                "Europe/Luxembourg",
                "Europe/Madrid",
                "Europe/Malta",
                "Europe/Mariehamn",
                "Europe/Minsk",
                "Europe/Monaco",
                "Europe/Moscow",
                "Europe/Nicosia",
                "Europe/Oslo",
                "Europe/Paris",
                "Europe/Podgorica",
                "Europe/Prague",
                "Europe/Riga",
                "Europe/Rome",
                "Europe/Samara",
                "Europe/San_Marino",
                "Europe/Sarajevo",
                "Europe/Saratov",
                "Europe/Simferopol",
                "Europe/Skopje",
                "Europe/Sofia",
                "Europe/Stockholm",
                "Europe/Tallinn",
                "Europe/Tirane",
                "Europe/Tiraspol",
                "Europe/Ulyanovsk",
                "Europe/Uzhgorod",
                "Europe/Vaduz",
                "Europe/Vatican",
                "Europe/Vienna",
                "Europe/Vilnius",
                "Europe/Volgograd",
                "Europe/Warsaw",
                "Europe/Zagreb",
                "Europe/Zaporozhye",
                "Europe/Zurich",
                "Factory",
                "GB",
                "GB-Eire",
                "GMT",
                "GMT+0",
                "GMT-0",
                "GMT0",
                "Greenwich",
                "HST",
                "Hongkong",
                "Iceland",
                "Indian/Antananarivo",
                "Indian/Chagos",
                "Indian/Christmas",
                "Indian/Cocos",
                "Indian/Comoro",
                "Indian/Kerguelen",
                "Indian/Mahe",
                "Indian/Maldives",
                "Indian/Mauritius",
                "Indian/Mayotte",
                "Indian/Reunion",
                "Iran",
                "Israel",
                "Jamaica",
                "Japan",
                "Kwajalein",
                "Libya",
                "MET",
                "MST",
                "MST7MDT",
                "Mexico/BajaNorte",
                "Mexico/BajaSur",
                "Mexico/General",
                "NZ",
                "NZ-CHAT",
                "Navajo",
                "PRC",
                "PST8PDT",
                "Pacific/Apia",
                "Pacific/Auckland",
                "Pacific/Bougainville",
                "Pacific/Chatham",
                "Pacific/Chuuk",
                "Pacific/Easter",
                "Pacific/Efate",
                "Pacific/Enderbury",
                "Pacific/Fakaofo",
                "Pacific/Fiji",
                "Pacific/Funafuti",
                "Pacific/Galapagos",
                "Pacific/Gambier",
                "Pacific/Guadalcanal",
                "Pacific/Guam",
                "Pacific/Honolulu",
                "Pacific/Johnston",
                "Pacific/Kanton",
                "Pacific/Kiritimati",
                "Pacific/Kosrae",
                "Pacific/Kwajalein",
                "Pacific/Majuro",
                "Pacific/Marquesas",
                "Pacific/Midway",
                "Pacific/Nauru",
                "Pacific/Niue",
                "Pacific/Norfolk",
                "Pacific/Noumea",
                "Pacific/Pago_Pago",
                "Pacific/Palau",
                "Pacific/Pitcairn",
                "Pacific/Pohnpei",
                "Pacific/Ponape",
                "Pacific/Port_Moresby",
                "Pacific/Rarotonga",
                "Pacific/Saipan",
                "Pacific/Samoa",
                "Pacific/Tahiti",
                "Pacific/Tarawa",
                "Pacific/Tongatapu",
                "Pacific/Truk",
                "Pacific/Wake",
                "Pacific/Wallis",
                "Pacific/Yap",
                "Poland",
                "Portugal",
                "ROC",
                "ROK",
                "Singapore",
                "Turkey",
                "UCT",
                "US/Alaska",
                "US/Aleutian",
                "US/Arizona",
                "US/Central",
                "US/East-Indiana",
                "US/Eastern",
                "US/Hawaii",
                "US/Indiana-Starke",
                "US/Michigan",
                "US/Mountain",
                "US/Pacific",
                "US/Samoa",
                "UTC",
                "Universal",
                "W-SU",
                "WET",
                "Zulu",
                "localtime"
              ],
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "IANA time zone. Example: 'America/Los_Angeles'",
          "title": "Timezone"
        },
        "title": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Checklist item title",
          "title": "Title"
        },
        "snoozeReminderTime": {
          "default": null,
          "title": "Snoozeremindertime"
        }
      },
      "required": [
        "id"
      ],
      "title": "ItemV2",
      "type": "object"
    },
    "ProjectGroupV2": {
      "additionalProperties": false,
      "description": "Model for a project group in the V2 API.\n\nThis model is used to represent a group of projects in TickTick. It contains all the\nrelevant details, such as name, color, sort order, etc. that you see in the web app.",
      "properties": {
        "etag": {
          "description": "ETag of the project group object",
          "pattern": "^[a-z0-9]{8}$",
          "title": "Etag",
          "type": "string"
        },
        "id": {
          "description": "ID of the project group",
          "title": "Id",
          "type": "string"
        },
        "name": {
          "description": "Name of the project group",
          "title": "Name",
          "type": "string"
        },
        "sortOption": {
          "anyOf": [
            {
              "$ref": "#/$defs/SortOptionV2"
            },
            {
              "type": "null"
            }
          ],
          "description": "How to sort the tasks in the project"
        },
        "viewMode": {
          "anyOf": [
            {
              "enum": [
                "list",
                "kanban",
                "timeline"
              ],
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "view mode, \"list\", \"kanban\", \"timeline\"",
          "title": "Viewmode"
        },
        "background": {
          "title": "Background",
          "type": "null"
        },
        "deleted": {
          "title": "Deleted",
          "type": "integer"
        },
        "showAll": {
          "title": "Showall",
          "type": "boolean"
        },
        "sortOrder": {
          "title": "Sortorder",
          "type": "integer"
        },
        "sortType": {
          "title": "Sorttype",
          "type": "string"
        },
        "teamId": {
          "title": "Teamid"
        },
        "timeline": {
          "anyOf": [
            {
              "$ref": "#/$defs/ProjectTimelineV2"
            },
            {
              "type": "null"
            }
          ]
        },
        "userId": {
          "title": "Userid",
          "type": "integer"
        }
      },
      "required": [
        "etag",
        "id",
        "name",
        "sortOption",
        "background",
        "deleted",
        "showAll",
        "sortOrder",
        "sortType",
        "teamId",
        "timeline",
        "userId"
      ],
      "title": "ProjectGroupV2",
      "type": "object"
    },
    "ProjectTimelineV2": {
      "additionalProperties": false,
      "description": "Unknown model for the V2 API.",
      "properties": {
        "range": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Range"
        },
        "sortType": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sorttype"
        },
        "sortOption": {
          "$ref": "#/$defs/SortOptionV2"
        }
      },
      "required": [
        "range",
        "sortType",
        "sortOption"
      ],
      "title": "ProjectTimelineV2",
      "type": "object"
    },
    "ProjectV2": {
      "additionalProperties": false,
      "description": "Model for all the details of a project taken from the V2 API.\n\nThis model is used to represent a single project in TickTick. It contains all the\nrelevant details, such as name, color, sort order, etc. that you see in the web app.",
      "properties": {
        "color": {
          "anyOf": [
            {
              "format": "color",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Color of the project profile, eg. '#F18181'",
          "title": "Color"
        },
        "etag": {
          "description": "ETag of the project object",
          "pattern": "^[a-z0-9]{8}$",
          "title": "Etag",
          "type": "string"
        },
        "groupId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "ID of the project group the project is in",
          "title": "Groupid"
        },
        "id": {
          "anyOf": [
            {
              "pattern": "^inbox\\d+$",
              "type": "string"
            },
            {
              "type": "string"
            }
          ],
          "description": "ID of the project",
          "title": "Id"
        },
        "inAll": {
          "description": "Whether or not to show in Smart Lists. If False, tasks within this list won't be shown in 'All', 'Today', 'Tomorrow', 'Next 7 Days', or other smart lists, but you will still receive reminders.",
          "title": "Inall",
          "type": "boolean"
        },
        "kind": {
          "anyOf": [
            {
              "enum": [
                "TASK",
                "NOTE"
              ],
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "\"TASK\" or \"NOTE\"",
          "title": "Kind"
        },
        "modifiedTime": {
          "description": "Last modified time in `YYYY-MM-DD'T'HH:MM:SS.sss'+'hhmm` format",
          "format": "date-time",
          "title": "Modifiedtime",
          "type": "string"
        },
        "name": {
          "description": "Name of the project",
          "title": "Name",
          "type": "string"
        },
        "sortOption": {
          "anyOf": [
            {
              "$ref": "#/$defs/SortOptionV2"
            },
            {
              "type": "null"
            }
          ],
          "description": "How to sort the tasks in the project"
        },
        "viewMode": {
          "anyOf": [
            {
              "enum": [
                "list",
                "kanban",
                "timeline"
              ],
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "view mode, \"list\", \"kanban\", \"timeline\"",
          "title": "Viewmode"
        },
        "background": {
          "title": "Background",
          "type": "null"
        },
        "barcodeNeedAudit": {
          "title": "Barcodeneedaudit",
          "type": "boolean"
        },
        "isOwner": {
          "title": "Isowner",
          "type": "boolean"
        },
        "sortOrder": {
          "title": "Sortorder",
          "type": "integer"
        },
        "sortType": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sorttype"
        },
        "userCount": {
          "title": "Usercount",
          "type": "integer"
        },
        "closed": {
          "title": "Closed"
        },
        "muted": {
          "title": "Muted",
          "type": "boolean"
        },
        "transferred": {
          "title": "Transferred"
        },
        "notificationOptions": {
          "title": "Notificationoptions"
        },
        "teamId": {
          "title": "Teamid"
        },
        "permission": {
          "title": "Permission"
        },
        "timeline": {
          "anyOf": [
            {
              "$ref": "#/$defs/ProjectTimelineV2"
            },
            {
              "type": "null"
            }
          ]
        },
        "needAudit": {
          "title": "Needaudit",
          "type": "boolean"
        },
        "openToTeam": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Opentoteam"
        },
        "teamMemberPermission": {
          "title": "Teammemberpermission"
        },
        "source": {
          "title": "Source",
          "type": "integer"
        },
        "showType": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Showtype"
        },
        "reminderType": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Remindertype"
        }
      },
      "required": [
        "etag",
        "groupId",
        "id",
        "inAll",
        "modifiedTime",
        "name",
        "sortOption",
        "background",
        "barcodeNeedAudit",
        "isOwner",
        "sortOrder",
        "sortType",
        "userCount",
        "closed",
        "muted",
        "transferred",
        "notificationOptions",
        "teamId",
        "permission",
        "timeline",
        "needAudit",
        "openToTeam",
        "teamMemberPermission",
        "source",
        "showType",
        "reminderType"
      ],
      "title": "ProjectV2",
      "type": "object"
    },
    "SortOptionV2": {
      "additionalProperties": false,
      "description": "Model for the sort options of tasks within a project in the V2 API.",
      "properties": {
        "groupBy": {
          "description": "How tasks are grouped within a project",
          "enum": [
            "sortOrder",
            "dueDate",
            "tag",
            "priority",
            "project",
            "none"
          ],
          "title": "Groupby",
          "type": "string"
        },
        "orderBy": {
          "description": "How tasks are ordered within a project",
          "enum": [
            "sortOrder",
            "dueDate",
            "tag",
            "priority",
            "project",
            "none"
          ],
          "title": "Orderby",
          "type": "string"
        }
      },
      "required": [
        "groupBy",
        "orderBy"
      ],
      "title": "SortOptionV2",
      "type": "object"
    },
    "SyncOrderBeanV3V2": {
      "additionalProperties": false,
      "description": "Unknown model for the V2 API.",
      "properties": {
        "orderByType": {
          "additionalProperties": true,
          "title": "Orderbytype",
          "type": "object"
        }
      },
      "required": [
        "orderByType"
      ],
      "title": "SyncOrderBeanV3V2",
      "type": "object"
    },
    "SyncTaskBeanV2": {
      "additionalProperties": false,
      "description": "Model for all the tasks in a batch response via the V2 API.\n\nThis model is used to represent all the tasks in a batch response from the V2 API.\nIt lends itself to being used as parameters for a update request, but we do not have\na complete understanding of how. For now, the `update` field is the most important,\nas it contains all the active tasks for the user.",
      "properties": {
        "update": {
          "description": "List of all active tasks for the user",
          "items": {
            "$ref": "#/$defs/TaskV2"
          },
          "title": "Update",
          "type": "array"
        },
        "add": {
          "items": {},
          "title": "Add",
          "type": "array"
        },
        "delete": {
          "items": {},
          "title": "Delete",
          "type": "array"
        },
        "empty": {
          "title": "Empty",
          "type": "boolean"
        },
        "tagUpdate": {
          "items": {},
          "title": "Tagupdate",
          "type": "array"
        }
      },
      "required": [
        "update",
        "add",
        "delete",
        "empty",
        "tagUpdate"
      ],
      "title": "SyncTaskBeanV2",
      "type": "object"
    },
    "SyncTaskOrderBeanV2": {
      "additionalProperties": false,
      "description": "Unknown model for the V2 API.",
      "properties": {
        "taskOrderByDate": {
          "additionalProperties": true,
          "title": "Taskorderbydate",
          "type": "object"
        },
        "taskOrderByPriority": {
          "additionalProperties": true,
          "title": "Taskorderbypriority",
          "type": "object"
        },
        "taskOrderByProject": {
          "additionalProperties": true,
          "title": "Taskorderbyproject",
          "type": "object"
        }
      },
      "required": [
        "taskOrderByDate",
        "taskOrderByPriority",
        "taskOrderByProject"
      ],
      "title": "SyncTaskOrderBeanV2",
      "type": "object"
    },
    "TagV2": {
      "additionalProperties": false,
      "description": "Model for a tag in the V2 API.\n\nThis model is used to represent a tag in TickTick. Tags are used to categorize tasks\nand make them easier to find. They can be assigned a color and a sort order.\n\nThey do not have a unique ID, but they can be identified by their raw name.",
      "properties": {
        "color": {
          "anyOf": [
            {
              "format": "color",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Color of the tag, eg. '#F18181'",
          "title": "Color"
        },
        "etag": {
          "description": "ETag of the tag object",
          "pattern": "^[a-z0-9]{8}$",
          "title": "Etag",
          "type": "string"
        },
        "label": {
          "description": "Name of the tag, as it appears in the UI",
          "pattern": "^[^\\\\\\/\\\"#:*?<>|\\s]+$",
          "title": "Label",
          "type": "string"
        },
        "name": {
          "description": "Name of the tag, similar to the label but lowercase, and not visible in the UI",
          "pattern": "^[^\\\\\\/\\\"#:*?<>|\\sA-Z]+$",
          "title": "Name",
          "type": "string"
        },
        "parent": {
          "anyOf": [
            {
              "pattern": "^[^\\\\\\/\\\"#:*?<>|\\sA-Z]+$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Name of the parent tag, if nested.",
          "title": "Parent"
        },
        "rawName": {
          "description": "Original name of the tag, used to identify it",
          "pattern": "^[^\\\\\\/\\\"#:*?<>|\\sA-Z]+$",
          "title": "Rawname",
          "type": "string"
        },
        "sortOption": {
          "anyOf": [
            {
              "$ref": "#/$defs/SortOptionV2"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "How to sort the tasks within the tag"
        },
        "sortType": {
          "default": "project",
          "description": "Sort type when displaying by selected tag",
          "enum": [
            "project",
            "title",
            "tag"
          ],
          "title": "Sorttype",
          "type": "string"
        },
        "sortOrder": {
          "title": "Sortorder",
          "type": "integer"
        },
        "timeline": {
          "anyOf": [
            {
              "$ref": "#/$defs/ProjectTimelineV2"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "type": {
          "title": "Type",
          "type": "integer"
        }
      },
      "required": [
        "etag",
        "label",
        "name",
        "rawName",
        "sortOrder",
        "type"
      ],
      "title": "TagV2",
      "type": "object"
    },
    "TaskReminderV2": {
      "additionalProperties": false,
      "description": "Model for a reminder for a task via the V2 API.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Reminder ID",
          "title": "Id"
        },
        "trigger": {
          "description": "Reminder trigger",
          "title": "Trigger",
          "type": "string"
        }
      },
      "required": [
        "trigger"
      ],
      "title": "TaskReminderV2",
      "type": "object"
    },
    "TaskV2": {
      "additionalProperties": false,
      "description": "Model for a task in a batch response via the V2 API.",
      "properties": {
        "childIds": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "List of sub-task IDs",
          "title": "Childids"
        },
        "completedTime": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Completed time in `YYYY-MM-DD'T'HH:MM:SS.sss'+'hhmm` format",
          "title": "Completedtime"
        },
        "content": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Content of the task, used for `TEXT` or `NOTE` tasks, otherwise `desc` is used",
          "title": "Content"
        },
        "createdTime": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Created time in `YYYY-MM-DD'T'HH:MM:SS.sss'+'hhmm` format",
          "title": "Createdtime"
        },
        "desc": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Description of the task, used for `CHECKLIST` tasks, otherwise `content` is used",
          "title": "Desc"
        },
        "dueDate": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Due date and time in `yyyy-MM-dd'T'HH:mm:ssZ` format",
          "title": "Duedate"
        },
        "etag": {
          "description": "ETag of the task object",
          "pattern": "^[a-z0-9]{8}$",
          "title": "Etag",
          "type": "string"
        },
        "id": {
          "description": "ID of the task",
          "title": "Id",
          "type": "string"
        },
        "isAllDay": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The task is due any time on the due date, rather than at a specific time",
          "title": "Isallday"
        },
        "isFloating": {
          "description": "The task will remain at the same time regardless of time zone",
          "title": "Isfloating",
          "type": "boolean"
        },
        "items": {
          "description": "List of checklist items",
          "items": {
            "$ref": "#/$defs/ItemV2"
          },
          "title": "Items",
          "type": "array"
        },
        "kind": {
          "default": "TEXT",
          "description": "\"TEXT\", \"NOTE\", or \"CHECKLIST\"",
          "enum": [
            "TEXT",
            "NOTE",
            "CHECKLIST"
          ],
          "title": "Kind",
          "type": "string"
        },
        "modifiedTime": {
          "description": "Last modified time in `YYYY-MM-DD'T'HH:MM:SS.sss'+'hhmm` format",
          "format": "date-time",
          "title": "Modifiedtime",
          "type": "string"
        },
        "parentId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "ID of the parent task, if this is a subtask",
          "title": "Parentid"
        },
        "priority": {
          "description": "Priority of the task",
          "enum": [
            0,
            1,
            3,
            5
          ],
          "title": "Priority",
          "type": "integer"
        },
        "progress": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Progress of a `CHECKLIST` task, should be a number between 0 and 100",
          "title": "Progress"
        },
        "projectId": {
          "anyOf": [
            {
              "pattern": "^inbox\\d+$",
              "type": "string"
            },
            {
              "type": "string"
            }
          ],
          "description": "ID of the project the task is in",
          "title": "Projectid"
        },
        "reminder": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Unclear what this is, but it can sometimes be one of the reminder triggers in `reminders`",
          "title": "Reminder"
        },
        "reminders": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/TaskReminderV2"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "List of reminders for the task",
          "title": "Reminders"
        },
        "repeatFirstDate": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "First date of the repeating task in `yyyy-MM-dd'T'HH:mm:ssZ` format",
          "title": "Repeatfirstdate"
        },
        "repeatFlag": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Recurring rules of task",
          "title": "Repeatflag"
        },
        "repeatFrom": {
          "anyOf": [
            {
              "enum": [
                0,
                1,
                2
              ],
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "When to start repeating the task",
          "title": "Repeatfrom"
        },
        "repeatTaskId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "ID of the repeating task if a duplicate is somehow (re)opened",
          "title": "Repeattaskid"
        },
        "startDate": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Start date and time in `yyyy-MM-dd'T'HH:mm:ssZ` format",
          "title": "Startdate"
        },
        "status": {
          "description": "Status of the task",
          "enum": [
            -1,
            0,
            1,
            2
          ],
          "title": "Status",
          "type": "integer"
        },
        "tags": {
          "default": [],
          "description": "List of tag names for the task",
          "items": {
            "pattern": "^[^\\\\\\/\\\"#:*?<>|\\sA-Z]+$",
            "type": "string"
          },
          "title": "Tags",
          "type": "array"
        },
        "title": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Title of the task",
          "title": "Title"
        },
        "timeZone": {
          "anyOf": [
            {
              "enum": [
                "Africa/Abidjan",
                "Africa/Accra",
                "Africa/Addis_Ababa",
                "Africa/Algiers",
                "Africa/Asmara",
                "Africa/Asmera",
                "Africa/Bamako",
                "Africa/Bangui",
                "Africa/Banjul",
                "Africa/Bissau",
                "Africa/Blantyre",
                "Africa/Brazzaville",
                "Africa/Bujumbura",
                "Africa/Cairo",
                "Africa/Casablanca",
                "Africa/Ceuta",
                "Africa/Conakry",
                "Africa/Dakar",
                "Africa/Dar_es_Salaam",
                "Africa/Djibouti",
                "Africa/Douala",
                "Africa/El_Aaiun",
                "Africa/Freetown",
                "Africa/Gaborone",
                "Africa/Harare",
                "Africa/Johannesburg",
                "Africa/Juba",
                "Africa/Kampala",
                "Africa/Khartoum",
                "Africa/Kigali",
                "Africa/Kinshasa",
                "Africa/Lagos",
                "Africa/Libreville",
                "Africa/Lome",
                "Africa/Luanda",
                "Africa/Lubumbashi",
                "Africa/Lusaka",
                "Africa/Malabo",
                "Africa/Maputo",
                "Africa/Maseru",
                "Africa/Mbabane",
                "Africa/Mogadishu",
                "Africa/Monrovia",
                "Africa/Nairobi",
                "Africa/Ndjamena",
                "Africa/Niamey",
                "Africa/Nouakchott",
                "Africa/Ouagadougou",
                "Africa/Porto-Novo",
                "Africa/Sao_Tome",
                "Africa/Timbuktu",
                "Africa/Tripoli",
                "Africa/Tunis",
                "Africa/Windhoek",
                "America/Adak",
                "America/Anchorage",
                "America/Anguilla",
                "America/Antigua",
                "America/Araguaina",
                "America/Argentina/Buenos_Aires",
                "America/Argentina/Catamarca",
                "America/Argentina/ComodRivadavia",
                "America/Argentina/Cordoba",
                "America/Argentina/Jujuy",
                "America/Argentina/La_Rioja",
                "America/Argentina/Mendoza",
                "America/Argentina/Rio_Gallegos",
                "America/Argentina/Salta",
                "America/Argentina/San_Juan",
                "America/Argentina/San_Luis",
                "America/Argentina/Tucuman",
                "America/Argentina/Ushuaia",
                "America/Aruba",
                "America/Asuncion",
                "America/Atikokan",
                "America/Atka",
                "America/Bahia",
                "America/Bahia_Banderas",
                "America/Barbados",
                "America/Belem",
                "America/Belize",
                "America/Blanc-Sablon",
                "America/Boa_Vista",
                "America/Bogota",
                "America/Boise",
                "America/Buenos_Aires",
                "America/Cambridge_Bay",
                "America/Campo_Grande",
                "America/Cancun",
                "America/Caracas",
                "America/Catamarca",
                "America/Cayenne",
                "America/Cayman",
                "America/Chicago",
                "America/Chihuahua",
                "America/Ciudad_Juarez",
                "America/Coral_Harbour",
                "America/Cordoba",
                "America/Costa_Rica",
                "America/Coyhaique",
                "America/Creston",
                "America/Cuiaba",
                "America/Curacao",
                "America/Danmarkshavn",
                "America/Dawson",
                "America/Dawson_Creek",
                "America/Denver",
                "America/Detroit",
                "America/Dominica",
                "America/Edmonton",
                "America/Eirunepe",
                "America/El_Salvador",
                "America/Ensenada",
                "America/Fort_Nelson",
                "America/Fort_Wayne",
                "America/Fortaleza",
                "America/Glace_Bay",
                "America/Godthab",
                "America/Goose_Bay",
                "America/Grand_Turk",
                "America/Grenada",
                "America/Guadeloupe",
                "America/Guatemala",
                "America/Guayaquil",
                "America/Guyana",
                "America/Halifax",
                "America/Havana",
                "America/Hermosillo",
                "America/Indiana/Indianapolis",
                "America/Indiana/Knox",
                "America/Indiana/Marengo",
                "America/Indiana/Petersburg",
                "America/Indiana/Tell_City",
                "America/Indiana/Vevay",
                "America/Indiana/Vincennes",
                "America/Indiana/Winamac",
                "America/Indianapolis",
                "America/Inuvik",
                "America/Iqaluit",
                "America/Jamaica",
                "America/Jujuy",
                "America/Juneau",
                "America/Kentucky/Louisville",
                "America/Kentucky/Monticello",
                "America/Knox_IN",
                "America/Kralendijk",
                "America/La_Paz",
                "America/Lima",
                "America/Los_Angeles",
                "America/Louisville",
                "America/Lower_Princes",
                "America/Maceio",
                "America/Managua",
                "America/Manaus",
                "America/Marigot",
                "America/Martinique",
                "America/Matamoros",
                "America/Mazatlan",
                "America/Mendoza",
                "America/Menominee",
                "America/Merida",
                "America/Metlakatla",
                "America/Mexico_City",
                "America/Miquelon",
                "America/Moncton",
                "America/Monterrey",
                "America/Montevideo",
                "America/Montreal",
                "America/Montserrat",
                "America/Nassau",
                "America/New_York",
                "America/Nipigon",
                "America/Nome",
                "America/Noronha",
                "America/North_Dakota/Beulah",
                "America/North_Dakota/Center",
                "America/North_Dakota/New_Salem",
                "America/Nuuk",
                "America/Ojinaga",
                "America/Panama",
                "America/Pangnirtung",
                "America/Paramaribo",
                "America/Phoenix",
                "America/Port-au-Prince",
                "America/Port_of_Spain",
                "America/Porto_Acre",
                "America/Porto_Velho",
                "America/Puerto_Rico",
                "America/Punta_Arenas",
                "America/Rainy_River",
                "America/Rankin_Inlet",
                "America/Recife",
                "America/Regina",
                "America/Resolute",
                "America/Rio_Branco",
                "America/Rosario",
                "America/Santa_Isabel",
                "America/Santarem",
                "America/Santiago",
                "America/Santo_Domingo",
                "America/Sao_Paulo",
                "America/Scoresbysund",
                "America/Shiprock",
                "America/Sitka",
                "America/St_Barthelemy",
                "America/St_Johns",
                "America/St_Kitts",
                "America/St_Lucia",
                "America/St_Thomas",
                "America/St_Vincent",
                "America/Swift_Current",
                "America/Tegucigalpa",
                "America/Thule",
                "America/Thunder_Bay",
                "America/Tijuana",
                "America/Toronto",
                "America/Tortola",
                "America/Vancouver",
                "America/Virgin",
                "America/Whitehorse",
                "America/Winnipeg",
                "America/Yakutat",
                "America/Yellowknife",
                "Antarctica/Casey",
                "Antarctica/Davis",
                "Antarctica/DumontDUrville",
                "Antarctica/Macquarie",
                "Antarctica/Mawson",
                "Antarctica/McMurdo",
                "Antarctica/Palmer",
                "Antarctica/Rothera",
                "Antarctica/South_Pole",
                "Antarctica/Syowa",
                "Antarctica/Troll",
                "Antarctica/Vostok",
                "Arctic/Longyearbyen",
                "Asia/Aden",
                "Asia/Almaty",
                "Asia/Amman",
                "Asia/Anadyr",
                "Asia/Aqtau",
                "Asia/Aqtobe",
                "Asia/Ashgabat",
                "Asia/Ashkhabad",
                "Asia/Atyrau",
                "Asia/Baghdad",
                "Asia/Bahrain",
                "Asia/Baku",
                "Asia/Bangkok",
                "Asia/Barnaul",
                "Asia/Beirut",
                "Asia/Bishkek",
                "Asia/Brunei",
                "Asia/Calcutta",
                "Asia/Chita",
                "Asia/Choibalsan",
                "Asia/Chongqing",
                "Asia/Chungking",
                "Asia/Colombo",
                "Asia/Dacca",
                "Asia/Damascus",
                "Asia/Dhaka",
                "Asia/Dili",
                "Asia/Dubai",
                "Asia/Dushanbe",
                "Asia/Famagusta",
                "Asia/Gaza",
                "Asia/Harbin",
                "Asia/Hebron",
                "Asia/Ho_Chi_Minh",
                "Asia/Hong_Kong",
                "Asia/Hovd",
                "Asia/Irkutsk",
                "Asia/Istanbul",
                "Asia/Jakarta",
                "Asia/Jayapura",
                "Asia/Jerusalem",
                "Asia/Kabul",
                "Asia/Kamchatka",
                "Asia/Karachi",
                "Asia/Kashgar",
                "Asia/Kathmandu",
                "Asia/Katmandu",
                "Asia/Khandyga",
                "Asia/Kolkata",
                "Asia/Krasnoyarsk",
                "Asia/Kuala_Lumpur",
                "Asia/Kuching",
                "Asia/Kuwait",
                "Asia/Macao",
                "Asia/Macau",
                "Asia/Magadan",
                "Asia/Makassar",
                "Asia/Manila",
                "Asia/Muscat",
                "Asia/Nicosia",
                "Asia/Novokuznetsk",
                "Asia/Novosibirsk",
                "Asia/Omsk",
                "Asia/Oral",
                "Asia/Phnom_Penh",
                "Asia/Pontianak",
                "Asia/Pyongyang",
                "Asia/Qatar",
                "Asia/Qostanay",
                "Asia/Qyzylorda",
                "Asia/Rangoon",
                "Asia/Riyadh",
                "Asia/Saigon",
                "Asia/Sakhalin",
                "Asia/Samarkand",
                "Asia/Seoul",
                "Asia/Shanghai",
                "Asia/Singapore",
                "Asia/Srednekolymsk",
                "Asia/Taipei",
                "Asia/Tashkent",
                "Asia/Tbilisi",
                "Asia/Tehran",
                "Asia/Tel_Aviv",
                "Asia/Thimbu",
                "Asia/Thimphu",
                "Asia/Tokyo",
                "Asia/Tomsk",
                "Asia/Ujung_Pandang",
                "Asia/Ulaanbaatar",
                "Asia/Ulan_Bator",
                "Asia/Urumqi",
                "Asia/Ust-Nera",
                "Asia/Vientiane",
                "Asia/Vladivostok",
                "Asia/Yakutsk",
                "Asia/Yangon",
                "Asia/Yekaterinburg",
                "Asia/Yerevan",
                "Atlantic/Azores",
                "Atlantic/Bermuda",
                "Atlantic/Canary",
                "Atlantic/Cape_Verde",
                "Atlantic/Faeroe",
                "Atlantic/Faroe",
                "Atlantic/Jan_Mayen",
                "Atlantic/Madeira",
                "Atlantic/Reykjavik",
                "Atlantic/South_Georgia",
                "Atlantic/St_Helena",
                "Atlantic/Stanley",
                "Australia/ACT",
                "Australia/Adelaide",
                "Australia/Brisbane",
                "Australia/Broken_Hill",
                "Australia/Canberra",
                "Australia/Currie",
                "Australia/Darwin",
                "Australia/Eucla",
                "Australia/Hobart",
                "Australia/LHI",
                "Australia/Lindeman",
                "Australia/Lord_Howe",
                "Australia/Melbourne",
                "Australia/NSW",
                "Australia/North",
                "Australia/Perth",
                "Australia/Queensland",
                "Australia/South",
                "Australia/Sydney",
                "Australia/Tasmania",
                "Australia/Victoria",
                "Australia/West",
                "Australia/Yancowinna",
                "Brazil/Acre",
                "Brazil/DeNoronha",
                "Brazil/East",
                "Brazil/West",
                "CET",
                "CST6CDT",
                "Canada/Atlantic",
                "Canada/Central",
                "Canada/Eastern",
                "Canada/Mountain",
                "Canada/Newfoundland",
                "Canada/Pacific",
                "Canada/Saskatchewan",
                "Canada/Yukon",
                "Chile/Continental",
                "Chile/EasterIsland",
                "Cuba",
                "EET",
                "EST",
                "EST5EDT",
                "Egypt",
                "Eire",
                "Etc/GMT",
                "Etc/GMT+0",
                "Etc/GMT+1",
                "Etc/GMT+10",
                "Etc/GMT+11",
                "Etc/GMT+12",
                "Etc/GMT+2",
                "Etc/GMT+3",
                "Etc/GMT+4",
                "Etc/GMT+5",
                "Etc/GMT+6",
                "Etc/GMT+7",
                "Etc/GMT+8",
                "Etc/GMT+9",
                "Etc/GMT-0",
                "Etc/GMT-1",
                "Etc/GMT-10",
                "Etc/GMT-11",
                "Etc/GMT-12",
                "Etc/GMT-13",
                "Etc/GMT-14",
                "Etc/GMT-2",
                "Etc/GMT-3",
                "Etc/GMT-4",
                "Etc/GMT-5",
                "Etc/GMT-6",
                "Etc/GMT-7",
                "Etc/GMT-8",
                "Etc/GMT-9",
                "Etc/GMT0",
                "Etc/Greenwich",
                "Etc/UCT",
                "Etc/UTC",
                "Etc/Universal",
                "Etc/Zulu",
                "Europe/Amsterdam",
                "Europe/Andorra",
                "Europe/Astrakhan",
                "Europe/Athens",
                "Europe/Belfast",
                "Europe/Belgrade",
                "Europe/Berlin",
                "Europe/Bratislava",
                "Europe/Brussels",
                "Europe/Bucharest",
                "Europe/Budapest",
                "Europe/Busingen",
                "Europe/Chisinau",
                "Europe/Copenhagen",
                "Europe/Dublin",
                "Europe/Gibraltar",
                "Europe/Guernsey",
                "Europe/Helsinki",
                "Europe/Isle_of_Man",
                "Europe/Istanbul",
                "Europe/Jersey",
                "Europe/Kaliningrad",
                "Europe/Kiev",
                "Europe/Kirov",
                "Europe/Kyiv",
                "Europe/Lisbon",
                "Europe/Ljubljana",
                "Europe/London",
                "Europe/Luxembourg",
                "Europe/Madrid",
                "Europe/Malta",
                "Europe/Mariehamn",
                "Europe/Minsk",
                "Europe/Monaco",
                "Europe/Moscow",
                "Europe/Nicosia",
                "Europe/Oslo",
                "Europe/Paris",
                "Europe/Podgorica",
                "Europe/Prague",
                "Europe/Riga",
                "Europe/Rome",
                "Europe/Samara",
                "Europe/San_Marino",
                "Europe/Sarajevo",
                "Europe/Saratov",
                "Europe/Simferopol",
                "Europe/Skopje",
                "Europe/Sofia",
                "Europe/Stockholm",
                "Europe/Tallinn",
                "Europe/Tirane",
                "Europe/Tiraspol",
                "Europe/Ulyanovsk",
                "Europe/Uzhgorod",
                "Europe/Vaduz",
                "Europe/Vatican",
                "Europe/Vienna",
                "Europe/Vilnius",
                "Europe/Volgograd",
                "Europe/Warsaw",
                "Europe/Zagreb",
                "Europe/Zaporozhye",
                "Europe/Zurich",
                "Factory",
                "GB",
                "GB-Eire",
                "GMT",
                "GMT+0",
                "GMT-0",
                "GMT0",
                "Greenwich",
                "HST",
                "Hongkong",
                "Iceland",
                "Indian/Antananarivo",
                "Indian/Chagos",
                "Indian/Christmas",
                "Indian/Cocos",
                "Indian/Comoro",
                "Indian/Kerguelen",
                "Indian/Mahe",
                "Indian/Maldives",
                "Indian/Mauritius",
                "Indian/Mayotte",
                "Indian/Reunion",
                "Iran",
                "Israel",
                "Jamaica",
                "Japan",
                "Kwajalein",
                "Libya",
                "MET",
                "MST",
                "MST7MDT",
                "Mexico/BajaNorte",
                "Mexico/BajaSur",
                "Mexico/General",
                "NZ",
                "NZ-CHAT",
                "Navajo",
                "PRC",
                "PST8PDT",
                "Pacific/Apia",
                "Pacific/Auckland",
                "Pacific/Bougainville",
                "Pacific/Chatham",
                "Pacific/Chuuk",
                "Pacific/Easter",
                "Pacific/Efate",
                "Pacific/Enderbury",
                "Pacific/Fakaofo",
                "Pacific/Fiji",
                "Pacific/Funafuti",
                "Pacific/Galapagos",
                "Pacific/Gambier",
                "Pacific/Guadalcanal",
                "Pacific/Guam",
                "Pacific/Honolulu",
                "Pacific/Johnston",
                "Pacific/Kanton",
                "Pacific/Kiritimati",
                "Pacific/Kosrae",
                "Pacific/Kwajalein",
                "Pacific/Majuro",
                "Pacific/Marquesas",
                "Pacific/Midway",
                "Pacific/Nauru",
                "Pacific/Niue",
                "Pacific/Norfolk",
                "Pacific/Noumea",
                "Pacific/Pago_Pago",
                "Pacific/Palau",
                "Pacific/Pitcairn",
                "Pacific/Pohnpei",
                "Pacific/Ponape",
                "Pacific/Port_Moresby",
                "Pacific/Rarotonga",
                "Pacific/Saipan",
                "Pacific/Samoa",
                "Pacific/Tahiti",
                "Pacific/Tarawa",
                "Pacific/Tongatapu",
                "Pacific/Truk",
                "Pacific/Wake",
                "Pacific/Wallis",
                "Pacific/Yap",
                "Poland",
                "Portugal",
                "ROC",
                "ROK",
                "Singapore",
                "Turkey",
                "UCT",
                "US/Alaska",
                "US/Aleutian",
                "US/Arizona",
                "US/Central",
                "US/East-Indiana",
                "US/Eastern",
                "US/Hawaii",
                "US/Indiana-Starke",
                "US/Michigan",
                "US/Mountain",
                "US/Pacific",
                "US/Samoa",
                "UTC",
                "Universal",
                "W-SU",
                "WET",
                "Zulu",
                "localtime"
              ],
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "IANA time zone. Example: 'America/Los_Angeles'",
          "title": "Timezone"
        },
        "assignee": {
          "anyOf": [
            {},
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Assignee"
        },
        "attachments": {
          "default": [],
          "items": {},
          "title": "Attachments",
          "type": "array"
        },
        "annoyingAlert": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Annoyingalert"
        },
        "columnId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Columnid"
        },
        "commentCount": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Commentcount"
        },
        "completedUserId": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Completeduserid"
        },
        "creator": {
          "title": "Creator",
          "type": "integer"
        },
        "deleted": {
          "title": "Deleted",
          "type": "integer"
        },
        "exDate": {
          "anyOf": [
            {
              "items": {},
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Exdate"
        },
        "focusSummaries": {
          "default": [],
          "items": {},
          "title": "Focussummaries",
          "type": "array"
        },
        "imgMode": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Imgmode"
        },
        "isDirty": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Isdirty"
        },
        "local": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Local"
        },
        "remindTime": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Remindtime"
        },
        "sortOrder": {
          "title": "Sortorder",
          "type": "integer"
        }
      },
      "required": [
        "etag",
        "id",
        "isFloating",
        "items",
        "modifiedTime",
        "priority",
        "projectId",
        "status",
        "title",
        "creator",
        "deleted",
        "sortOrder"
      ],
      "title": "TaskV2",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "description": "Model for the response of a batch object status request via the V2 API.\n\nThis model appears to be used like an [entity bean](https://en.wikipedia.org/wiki/Entity_Bean)\nfor TickTick apps to take advantage of. It keeps track of the state of the user's\nprojects, tasks, etc. We do not have a complete understanding of the structure of\nthis model, nor do we have an understanding of how to use this model to\npublish changes to the user's account. This model is currently intended for\nreading the user's state.",
  "properties": {
    "inboxId": {
      "description": "ID of the inbox project, a special kind of project",
      "title": "Inboxid",
      "type": "string"
    },
    "projectGroups": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/ProjectGroupV2"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "description": "List of all active project groups",
      "title": "Projectgroups"
    },
    "projectProfiles": {
      "description": "List of all active projects, excluding the inbox",
      "items": {
        "$ref": "#/$defs/ProjectV2"
      },
      "title": "Projectprofiles",
      "type": "array"
    },
    "syncTaskBean": {
      "$ref": "#/$defs/SyncTaskBeanV2",
      "description": "List of all active tasks"
    },
    "tags": {
      "description": "List of all task tags",
      "items": {
        "$ref": "#/$defs/TagV2"
      },
      "title": "Tags",
      "type": "array"
    },
    "checkPoint": {
      "title": "Checkpoint",
      "type": "integer"
    },
    "checks": {
      "title": "Checks",
      "type": "null"
    },
    "filters": {
      "anyOf": [
        {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Filters"
    },
    "syncOrderBean": {
      "additionalProperties": true,
      "title": "Syncorderbean",
      "type": "object"
    },
    "syncOrderBeanV3": {
      "$ref": "#/$defs/SyncOrderBeanV3V2"
    },
    "syncTaskOrderBean": {
      "$ref": "#/$defs/SyncTaskOrderBeanV2"
    },
    "remindChanges": {
      "items": {},
      "title": "Remindchanges",
      "type": "array"
    }
  },
  "required": [
    "inboxId",
    "projectGroups",
    "projectProfiles",
    "syncTaskBean",
    "tags",
    "checkPoint",
    "checks",
    "filters",
    "syncOrderBean",
    "syncOrderBeanV3",
    "syncTaskOrderBean",
    "remindChanges"
  ],
  "title": "GetBatchV2",
  "type": "object"
}

Fields:

Validators:

inbox_id pydantic-field #

inbox_id: str

ID of the inbox project, a special kind of project

project_groups pydantic-field #

project_groups: list[ProjectGroupV2] | None

List of all active project groups

project_profiles pydantic-field #

project_profiles: list[ProjectV2]

List of all active projects, excluding the inbox

sync_task_bean pydantic-field #

sync_task_bean: SyncTaskBeanV2

List of all active tasks

tags pydantic-field #

tags: list[TagV2]

List of all task tags

empty_str_to_none pydantic-validator #

empty_str_to_none(v: Any) -> Any

Convert empty strings to None.

TickTick API responses sometimes conflates None and empty strings for optional fields. This validator ensures that empty strings are converted to None, which then allows for more consistent handling of the data within the library.

Parameters:

Name Type Description Default
v Any

The value to validate.

required

Returns:

Name Type Description
Any Any

The input value if it is not an empty string, otherwise None.

Source code in src/pyticktick/models/v2/models.py
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
@field_validator("*", mode="before")
@classmethod
def empty_str_to_none(cls, v: Any) -> Any:
    """Convert empty strings to None.

    TickTick API responses sometimes conflates `None` and empty strings for
    optional fields. This validator ensures that empty strings are converted to
    `None`, which then allows for more consistent handling of the data within the
    library.

    Args:
        v (Any): The value to validate.

    Returns:
        Any: The input value if it is not an empty string, otherwise `None`.
    """
    if isinstance(v, str) and len(v) == 0:
        return None
    return v

override_forbid_extra_message_injector pydantic-validator #

override_forbid_extra_message_injector(
    data: Any,
    handler: ModelWrapValidatorHandler[BaseModelV2],
) -> BaseModelV2

Provide a better error message for extra fields.

The TickTick V2 API is unofficial and may change without notice. As such, the models may not always be up to date with the API. This validator catches the extra_forbidden errors and provides a more informative error message, including a link to the documentation on how to override the extra_forbidden behavior if needed.

Parameters:

Name Type Description Default
data Any

The input data to validate.

required
handler ModelWrapValidatorHandler[BaseModelV2]

The handler to call the next validator in the chain.

required

Raises:

Type Description
ValidationError

If the pydantic model fails validation for any reason.

Returns:

Name Type Description
BaseModelV2 BaseModelV2

The validated model instance.

Source code in src/pyticktick/models/v2/models.py
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
@model_validator(mode="wrap")
@classmethod
def override_forbid_extra_message_injector(
    cls,
    data: Any,
    handler: ModelWrapValidatorHandler[BaseModelV2],
) -> BaseModelV2:
    """Provide a better error message for extra fields.

    The TickTick V2 API is unofficial and may change without notice. As such, the
    models may not always be up to date with the API. This validator catches the
    `extra_forbidden` errors and provides a more informative error message,
    including a link to the documentation on how to override the `extra_forbidden`
    behavior if needed.

    Args:
        data (Any): The input data to validate.
        handler (ModelWrapValidatorHandler[BaseModelV2]): The handler to call the
            next validator in the chain.

    Raises:
        ValidationError: If the pydantic model fails validation for any reason.

    Returns:
        BaseModelV2: The validated model instance.
    """  # noqa: DOC501, DOC502 # ruff thinks `from_exception_data` should be raised instead of `ValidationError`
    try:
        return handler(data)
    except ValidationError as e:
        errors = []
        for error_dict in e.errors():
            if error_dict.get("type") in (
                "extra_forbidden",
                "custom_pyticktick_extra_forbidden",
            ):
                _type: str | PydanticCustomError = PydanticCustomError(
                    "custom_pyticktick_extra_forbidden",
                    f"Extra inputs are not permitted by default for `{cls.__name__}`. Please set `override_forbid_extra` to `True` if you believe the TickTick API has diverged from the model. See https://pyticktick.pretzer.io/guides/settings/overriding_models_that_forbid_extra_fields/ for more information.",  # pyright: ignore[reportArgumentType] # ty: ignore[invalid-argument-type]
                )
            else:
                _type = error_dict["type"]

            init_error_details: InitErrorDetails = {
                "type": _type,
                "input": error_dict["input"],
            }
            if "loc" in error_dict:
                init_error_details["loc"] = error_dict["loc"]
            if "ctx" in error_dict:
                init_error_details["ctx"] = error_dict["ctx"]

            errors.append(init_error_details)

        raise ValidationError.from_exception_data(e.title, errors) from e

SyncOrderBeanV3V2 pydantic-model #

Bases: BaseModelV2

Unknown model for the V2 API.

Show JSON schema:
{
  "additionalProperties": false,
  "description": "Unknown model for the V2 API.",
  "properties": {
    "orderByType": {
      "additionalProperties": true,
      "title": "Orderbytype",
      "type": "object"
    }
  },
  "required": [
    "orderByType"
  ],
  "title": "SyncOrderBeanV3V2",
  "type": "object"
}

Fields:

  • order_by_type (dict[str, Any])

Validators:

empty_str_to_none pydantic-validator #

empty_str_to_none(v: Any) -> Any

Convert empty strings to None.

TickTick API responses sometimes conflates None and empty strings for optional fields. This validator ensures that empty strings are converted to None, which then allows for more consistent handling of the data within the library.

Parameters:

Name Type Description Default
v Any

The value to validate.

required

Returns:

Name Type Description
Any Any

The input value if it is not an empty string, otherwise None.

Source code in src/pyticktick/models/v2/models.py
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
@field_validator("*", mode="before")
@classmethod
def empty_str_to_none(cls, v: Any) -> Any:
    """Convert empty strings to None.

    TickTick API responses sometimes conflates `None` and empty strings for
    optional fields. This validator ensures that empty strings are converted to
    `None`, which then allows for more consistent handling of the data within the
    library.

    Args:
        v (Any): The value to validate.

    Returns:
        Any: The input value if it is not an empty string, otherwise `None`.
    """
    if isinstance(v, str) and len(v) == 0:
        return None
    return v

override_forbid_extra_message_injector pydantic-validator #

override_forbid_extra_message_injector(
    data: Any,
    handler: ModelWrapValidatorHandler[BaseModelV2],
) -> BaseModelV2

Provide a better error message for extra fields.

The TickTick V2 API is unofficial and may change without notice. As such, the models may not always be up to date with the API. This validator catches the extra_forbidden errors and provides a more informative error message, including a link to the documentation on how to override the extra_forbidden behavior if needed.

Parameters:

Name Type Description Default
data Any

The input data to validate.

required
handler ModelWrapValidatorHandler[BaseModelV2]

The handler to call the next validator in the chain.

required

Raises:

Type Description
ValidationError

If the pydantic model fails validation for any reason.

Returns:

Name Type Description
BaseModelV2 BaseModelV2

The validated model instance.

Source code in src/pyticktick/models/v2/models.py
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
@model_validator(mode="wrap")
@classmethod
def override_forbid_extra_message_injector(
    cls,
    data: Any,
    handler: ModelWrapValidatorHandler[BaseModelV2],
) -> BaseModelV2:
    """Provide a better error message for extra fields.

    The TickTick V2 API is unofficial and may change without notice. As such, the
    models may not always be up to date with the API. This validator catches the
    `extra_forbidden` errors and provides a more informative error message,
    including a link to the documentation on how to override the `extra_forbidden`
    behavior if needed.

    Args:
        data (Any): The input data to validate.
        handler (ModelWrapValidatorHandler[BaseModelV2]): The handler to call the
            next validator in the chain.

    Raises:
        ValidationError: If the pydantic model fails validation for any reason.

    Returns:
        BaseModelV2: The validated model instance.
    """  # noqa: DOC501, DOC502 # ruff thinks `from_exception_data` should be raised instead of `ValidationError`
    try:
        return handler(data)
    except ValidationError as e:
        errors = []
        for error_dict in e.errors():
            if error_dict.get("type") in (
                "extra_forbidden",
                "custom_pyticktick_extra_forbidden",
            ):
                _type: str | PydanticCustomError = PydanticCustomError(
                    "custom_pyticktick_extra_forbidden",
                    f"Extra inputs are not permitted by default for `{cls.__name__}`. Please set `override_forbid_extra` to `True` if you believe the TickTick API has diverged from the model. See https://pyticktick.pretzer.io/guides/settings/overriding_models_that_forbid_extra_fields/ for more information.",  # pyright: ignore[reportArgumentType] # ty: ignore[invalid-argument-type]
                )
            else:
                _type = error_dict["type"]

            init_error_details: InitErrorDetails = {
                "type": _type,
                "input": error_dict["input"],
            }
            if "loc" in error_dict:
                init_error_details["loc"] = error_dict["loc"]
            if "ctx" in error_dict:
                init_error_details["ctx"] = error_dict["ctx"]

            errors.append(init_error_details)

        raise ValidationError.from_exception_data(e.title, errors) from e

SyncTaskBeanV2 pydantic-model #

Bases: BaseModelV2

Model for all the tasks in a batch response via the V2 API.

This model is used to represent all the tasks in a batch response from the V2 API. It lends itself to being used as parameters for a update request, but we do not have a complete understanding of how. For now, the update field is the most important, as it contains all the active tasks for the user.

Show JSON schema:
{
  "$defs": {
    "ItemV2": {
      "additionalProperties": false,
      "description": "Model for a checklist item via the V2 API.",
      "properties": {
        "completedTime": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Completed time in `yyyy-MM-dd'T'HH:mm:ssZ` format",
          "title": "Completedtime"
        },
        "id": {
          "description": "ID of the checklist item",
          "title": "Id",
          "type": "string"
        },
        "isAllDay": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The task is due any time on the due date, rather than at a specific time",
          "title": "Isallday"
        },
        "sortOrder": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The order of checklist item",
          "title": "Sortorder"
        },
        "startDate": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Start date and time in `yyyy-MM-dd'T'HH:mm:ssZ` format",
          "title": "Startdate"
        },
        "status": {
          "anyOf": [
            {
              "enum": [
                -1,
                0,
                1,
                2
              ],
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The completion status of checklist item",
          "title": "Status"
        },
        "timeZone": {
          "anyOf": [
            {
              "enum": [
                "Africa/Abidjan",
                "Africa/Accra",
                "Africa/Addis_Ababa",
                "Africa/Algiers",
                "Africa/Asmara",
                "Africa/Asmera",
                "Africa/Bamako",
                "Africa/Bangui",
                "Africa/Banjul",
                "Africa/Bissau",
                "Africa/Blantyre",
                "Africa/Brazzaville",
                "Africa/Bujumbura",
                "Africa/Cairo",
                "Africa/Casablanca",
                "Africa/Ceuta",
                "Africa/Conakry",
                "Africa/Dakar",
                "Africa/Dar_es_Salaam",
                "Africa/Djibouti",
                "Africa/Douala",
                "Africa/El_Aaiun",
                "Africa/Freetown",
                "Africa/Gaborone",
                "Africa/Harare",
                "Africa/Johannesburg",
                "Africa/Juba",
                "Africa/Kampala",
                "Africa/Khartoum",
                "Africa/Kigali",
                "Africa/Kinshasa",
                "Africa/Lagos",
                "Africa/Libreville",
                "Africa/Lome",
                "Africa/Luanda",
                "Africa/Lubumbashi",
                "Africa/Lusaka",
                "Africa/Malabo",
                "Africa/Maputo",
                "Africa/Maseru",
                "Africa/Mbabane",
                "Africa/Mogadishu",
                "Africa/Monrovia",
                "Africa/Nairobi",
                "Africa/Ndjamena",
                "Africa/Niamey",
                "Africa/Nouakchott",
                "Africa/Ouagadougou",
                "Africa/Porto-Novo",
                "Africa/Sao_Tome",
                "Africa/Timbuktu",
                "Africa/Tripoli",
                "Africa/Tunis",
                "Africa/Windhoek",
                "America/Adak",
                "America/Anchorage",
                "America/Anguilla",
                "America/Antigua",
                "America/Araguaina",
                "America/Argentina/Buenos_Aires",
                "America/Argentina/Catamarca",
                "America/Argentina/ComodRivadavia",
                "America/Argentina/Cordoba",
                "America/Argentina/Jujuy",
                "America/Argentina/La_Rioja",
                "America/Argentina/Mendoza",
                "America/Argentina/Rio_Gallegos",
                "America/Argentina/Salta",
                "America/Argentina/San_Juan",
                "America/Argentina/San_Luis",
                "America/Argentina/Tucuman",
                "America/Argentina/Ushuaia",
                "America/Aruba",
                "America/Asuncion",
                "America/Atikokan",
                "America/Atka",
                "America/Bahia",
                "America/Bahia_Banderas",
                "America/Barbados",
                "America/Belem",
                "America/Belize",
                "America/Blanc-Sablon",
                "America/Boa_Vista",
                "America/Bogota",
                "America/Boise",
                "America/Buenos_Aires",
                "America/Cambridge_Bay",
                "America/Campo_Grande",
                "America/Cancun",
                "America/Caracas",
                "America/Catamarca",
                "America/Cayenne",
                "America/Cayman",
                "America/Chicago",
                "America/Chihuahua",
                "America/Ciudad_Juarez",
                "America/Coral_Harbour",
                "America/Cordoba",
                "America/Costa_Rica",
                "America/Coyhaique",
                "America/Creston",
                "America/Cuiaba",
                "America/Curacao",
                "America/Danmarkshavn",
                "America/Dawson",
                "America/Dawson_Creek",
                "America/Denver",
                "America/Detroit",
                "America/Dominica",
                "America/Edmonton",
                "America/Eirunepe",
                "America/El_Salvador",
                "America/Ensenada",
                "America/Fort_Nelson",
                "America/Fort_Wayne",
                "America/Fortaleza",
                "America/Glace_Bay",
                "America/Godthab",
                "America/Goose_Bay",
                "America/Grand_Turk",
                "America/Grenada",
                "America/Guadeloupe",
                "America/Guatemala",
                "America/Guayaquil",
                "America/Guyana",
                "America/Halifax",
                "America/Havana",
                "America/Hermosillo",
                "America/Indiana/Indianapolis",
                "America/Indiana/Knox",
                "America/Indiana/Marengo",
                "America/Indiana/Petersburg",
                "America/Indiana/Tell_City",
                "America/Indiana/Vevay",
                "America/Indiana/Vincennes",
                "America/Indiana/Winamac",
                "America/Indianapolis",
                "America/Inuvik",
                "America/Iqaluit",
                "America/Jamaica",
                "America/Jujuy",
                "America/Juneau",
                "America/Kentucky/Louisville",
                "America/Kentucky/Monticello",
                "America/Knox_IN",
                "America/Kralendijk",
                "America/La_Paz",
                "America/Lima",
                "America/Los_Angeles",
                "America/Louisville",
                "America/Lower_Princes",
                "America/Maceio",
                "America/Managua",
                "America/Manaus",
                "America/Marigot",
                "America/Martinique",
                "America/Matamoros",
                "America/Mazatlan",
                "America/Mendoza",
                "America/Menominee",
                "America/Merida",
                "America/Metlakatla",
                "America/Mexico_City",
                "America/Miquelon",
                "America/Moncton",
                "America/Monterrey",
                "America/Montevideo",
                "America/Montreal",
                "America/Montserrat",
                "America/Nassau",
                "America/New_York",
                "America/Nipigon",
                "America/Nome",
                "America/Noronha",
                "America/North_Dakota/Beulah",
                "America/North_Dakota/Center",
                "America/North_Dakota/New_Salem",
                "America/Nuuk",
                "America/Ojinaga",
                "America/Panama",
                "America/Pangnirtung",
                "America/Paramaribo",
                "America/Phoenix",
                "America/Port-au-Prince",
                "America/Port_of_Spain",
                "America/Porto_Acre",
                "America/Porto_Velho",
                "America/Puerto_Rico",
                "America/Punta_Arenas",
                "America/Rainy_River",
                "America/Rankin_Inlet",
                "America/Recife",
                "America/Regina",
                "America/Resolute",
                "America/Rio_Branco",
                "America/Rosario",
                "America/Santa_Isabel",
                "America/Santarem",
                "America/Santiago",
                "America/Santo_Domingo",
                "America/Sao_Paulo",
                "America/Scoresbysund",
                "America/Shiprock",
                "America/Sitka",
                "America/St_Barthelemy",
                "America/St_Johns",
                "America/St_Kitts",
                "America/St_Lucia",
                "America/St_Thomas",
                "America/St_Vincent",
                "America/Swift_Current",
                "America/Tegucigalpa",
                "America/Thule",
                "America/Thunder_Bay",
                "America/Tijuana",
                "America/Toronto",
                "America/Tortola",
                "America/Vancouver",
                "America/Virgin",
                "America/Whitehorse",
                "America/Winnipeg",
                "America/Yakutat",
                "America/Yellowknife",
                "Antarctica/Casey",
                "Antarctica/Davis",
                "Antarctica/DumontDUrville",
                "Antarctica/Macquarie",
                "Antarctica/Mawson",
                "Antarctica/McMurdo",
                "Antarctica/Palmer",
                "Antarctica/Rothera",
                "Antarctica/South_Pole",
                "Antarctica/Syowa",
                "Antarctica/Troll",
                "Antarctica/Vostok",
                "Arctic/Longyearbyen",
                "Asia/Aden",
                "Asia/Almaty",
                "Asia/Amman",
                "Asia/Anadyr",
                "Asia/Aqtau",
                "Asia/Aqtobe",
                "Asia/Ashgabat",
                "Asia/Ashkhabad",
                "Asia/Atyrau",
                "Asia/Baghdad",
                "Asia/Bahrain",
                "Asia/Baku",
                "Asia/Bangkok",
                "Asia/Barnaul",
                "Asia/Beirut",
                "Asia/Bishkek",
                "Asia/Brunei",
                "Asia/Calcutta",
                "Asia/Chita",
                "Asia/Choibalsan",
                "Asia/Chongqing",
                "Asia/Chungking",
                "Asia/Colombo",
                "Asia/Dacca",
                "Asia/Damascus",
                "Asia/Dhaka",
                "Asia/Dili",
                "Asia/Dubai",
                "Asia/Dushanbe",
                "Asia/Famagusta",
                "Asia/Gaza",
                "Asia/Harbin",
                "Asia/Hebron",
                "Asia/Ho_Chi_Minh",
                "Asia/Hong_Kong",
                "Asia/Hovd",
                "Asia/Irkutsk",
                "Asia/Istanbul",
                "Asia/Jakarta",
                "Asia/Jayapura",
                "Asia/Jerusalem",
                "Asia/Kabul",
                "Asia/Kamchatka",
                "Asia/Karachi",
                "Asia/Kashgar",
                "Asia/Kathmandu",
                "Asia/Katmandu",
                "Asia/Khandyga",
                "Asia/Kolkata",
                "Asia/Krasnoyarsk",
                "Asia/Kuala_Lumpur",
                "Asia/Kuching",
                "Asia/Kuwait",
                "Asia/Macao",
                "Asia/Macau",
                "Asia/Magadan",
                "Asia/Makassar",
                "Asia/Manila",
                "Asia/Muscat",
                "Asia/Nicosia",
                "Asia/Novokuznetsk",
                "Asia/Novosibirsk",
                "Asia/Omsk",
                "Asia/Oral",
                "Asia/Phnom_Penh",
                "Asia/Pontianak",
                "Asia/Pyongyang",
                "Asia/Qatar",
                "Asia/Qostanay",
                "Asia/Qyzylorda",
                "Asia/Rangoon",
                "Asia/Riyadh",
                "Asia/Saigon",
                "Asia/Sakhalin",
                "Asia/Samarkand",
                "Asia/Seoul",
                "Asia/Shanghai",
                "Asia/Singapore",
                "Asia/Srednekolymsk",
                "Asia/Taipei",
                "Asia/Tashkent",
                "Asia/Tbilisi",
                "Asia/Tehran",
                "Asia/Tel_Aviv",
                "Asia/Thimbu",
                "Asia/Thimphu",
                "Asia/Tokyo",
                "Asia/Tomsk",
                "Asia/Ujung_Pandang",
                "Asia/Ulaanbaatar",
                "Asia/Ulan_Bator",
                "Asia/Urumqi",
                "Asia/Ust-Nera",
                "Asia/Vientiane",
                "Asia/Vladivostok",
                "Asia/Yakutsk",
                "Asia/Yangon",
                "Asia/Yekaterinburg",
                "Asia/Yerevan",
                "Atlantic/Azores",
                "Atlantic/Bermuda",
                "Atlantic/Canary",
                "Atlantic/Cape_Verde",
                "Atlantic/Faeroe",
                "Atlantic/Faroe",
                "Atlantic/Jan_Mayen",
                "Atlantic/Madeira",
                "Atlantic/Reykjavik",
                "Atlantic/South_Georgia",
                "Atlantic/St_Helena",
                "Atlantic/Stanley",
                "Australia/ACT",
                "Australia/Adelaide",
                "Australia/Brisbane",
                "Australia/Broken_Hill",
                "Australia/Canberra",
                "Australia/Currie",
                "Australia/Darwin",
                "Australia/Eucla",
                "Australia/Hobart",
                "Australia/LHI",
                "Australia/Lindeman",
                "Australia/Lord_Howe",
                "Australia/Melbourne",
                "Australia/NSW",
                "Australia/North",
                "Australia/Perth",
                "Australia/Queensland",
                "Australia/South",
                "Australia/Sydney",
                "Australia/Tasmania",
                "Australia/Victoria",
                "Australia/West",
                "Australia/Yancowinna",
                "Brazil/Acre",
                "Brazil/DeNoronha",
                "Brazil/East",
                "Brazil/West",
                "CET",
                "CST6CDT",
                "Canada/Atlantic",
                "Canada/Central",
                "Canada/Eastern",
                "Canada/Mountain",
                "Canada/Newfoundland",
                "Canada/Pacific",
                "Canada/Saskatchewan",
                "Canada/Yukon",
                "Chile/Continental",
                "Chile/EasterIsland",
                "Cuba",
                "EET",
                "EST",
                "EST5EDT",
                "Egypt",
                "Eire",
                "Etc/GMT",
                "Etc/GMT+0",
                "Etc/GMT+1",
                "Etc/GMT+10",
                "Etc/GMT+11",
                "Etc/GMT+12",
                "Etc/GMT+2",
                "Etc/GMT+3",
                "Etc/GMT+4",
                "Etc/GMT+5",
                "Etc/GMT+6",
                "Etc/GMT+7",
                "Etc/GMT+8",
                "Etc/GMT+9",
                "Etc/GMT-0",
                "Etc/GMT-1",
                "Etc/GMT-10",
                "Etc/GMT-11",
                "Etc/GMT-12",
                "Etc/GMT-13",
                "Etc/GMT-14",
                "Etc/GMT-2",
                "Etc/GMT-3",
                "Etc/GMT-4",
                "Etc/GMT-5",
                "Etc/GMT-6",
                "Etc/GMT-7",
                "Etc/GMT-8",
                "Etc/GMT-9",
                "Etc/GMT0",
                "Etc/Greenwich",
                "Etc/UCT",
                "Etc/UTC",
                "Etc/Universal",
                "Etc/Zulu",
                "Europe/Amsterdam",
                "Europe/Andorra",
                "Europe/Astrakhan",
                "Europe/Athens",
                "Europe/Belfast",
                "Europe/Belgrade",
                "Europe/Berlin",
                "Europe/Bratislava",
                "Europe/Brussels",
                "Europe/Bucharest",
                "Europe/Budapest",
                "Europe/Busingen",
                "Europe/Chisinau",
                "Europe/Copenhagen",
                "Europe/Dublin",
                "Europe/Gibraltar",
                "Europe/Guernsey",
                "Europe/Helsinki",
                "Europe/Isle_of_Man",
                "Europe/Istanbul",
                "Europe/Jersey",
                "Europe/Kaliningrad",
                "Europe/Kiev",
                "Europe/Kirov",
                "Europe/Kyiv",
                "Europe/Lisbon",
                "Europe/Ljubljana",
                "Europe/London",
                "Europe/Luxembourg",
                "Europe/Madrid",
                "Europe/Malta",
                "Europe/Mariehamn",
                "Europe/Minsk",
                "Europe/Monaco",
                "Europe/Moscow",
                "Europe/Nicosia",
                "Europe/Oslo",
                "Europe/Paris",
                "Europe/Podgorica",
                "Europe/Prague",
                "Europe/Riga",
                "Europe/Rome",
                "Europe/Samara",
                "Europe/San_Marino",
                "Europe/Sarajevo",
                "Europe/Saratov",
                "Europe/Simferopol",
                "Europe/Skopje",
                "Europe/Sofia",
                "Europe/Stockholm",
                "Europe/Tallinn",
                "Europe/Tirane",
                "Europe/Tiraspol",
                "Europe/Ulyanovsk",
                "Europe/Uzhgorod",
                "Europe/Vaduz",
                "Europe/Vatican",
                "Europe/Vienna",
                "Europe/Vilnius",
                "Europe/Volgograd",
                "Europe/Warsaw",
                "Europe/Zagreb",
                "Europe/Zaporozhye",
                "Europe/Zurich",
                "Factory",
                "GB",
                "GB-Eire",
                "GMT",
                "GMT+0",
                "GMT-0",
                "GMT0",
                "Greenwich",
                "HST",
                "Hongkong",
                "Iceland",
                "Indian/Antananarivo",
                "Indian/Chagos",
                "Indian/Christmas",
                "Indian/Cocos",
                "Indian/Comoro",
                "Indian/Kerguelen",
                "Indian/Mahe",
                "Indian/Maldives",
                "Indian/Mauritius",
                "Indian/Mayotte",
                "Indian/Reunion",
                "Iran",
                "Israel",
                "Jamaica",
                "Japan",
                "Kwajalein",
                "Libya",
                "MET",
                "MST",
                "MST7MDT",
                "Mexico/BajaNorte",
                "Mexico/BajaSur",
                "Mexico/General",
                "NZ",
                "NZ-CHAT",
                "Navajo",
                "PRC",
                "PST8PDT",
                "Pacific/Apia",
                "Pacific/Auckland",
                "Pacific/Bougainville",
                "Pacific/Chatham",
                "Pacific/Chuuk",
                "Pacific/Easter",
                "Pacific/Efate",
                "Pacific/Enderbury",
                "Pacific/Fakaofo",
                "Pacific/Fiji",
                "Pacific/Funafuti",
                "Pacific/Galapagos",
                "Pacific/Gambier",
                "Pacific/Guadalcanal",
                "Pacific/Guam",
                "Pacific/Honolulu",
                "Pacific/Johnston",
                "Pacific/Kanton",
                "Pacific/Kiritimati",
                "Pacific/Kosrae",
                "Pacific/Kwajalein",
                "Pacific/Majuro",
                "Pacific/Marquesas",
                "Pacific/Midway",
                "Pacific/Nauru",
                "Pacific/Niue",
                "Pacific/Norfolk",
                "Pacific/Noumea",
                "Pacific/Pago_Pago",
                "Pacific/Palau",
                "Pacific/Pitcairn",
                "Pacific/Pohnpei",
                "Pacific/Ponape",
                "Pacific/Port_Moresby",
                "Pacific/Rarotonga",
                "Pacific/Saipan",
                "Pacific/Samoa",
                "Pacific/Tahiti",
                "Pacific/Tarawa",
                "Pacific/Tongatapu",
                "Pacific/Truk",
                "Pacific/Wake",
                "Pacific/Wallis",
                "Pacific/Yap",
                "Poland",
                "Portugal",
                "ROC",
                "ROK",
                "Singapore",
                "Turkey",
                "UCT",
                "US/Alaska",
                "US/Aleutian",
                "US/Arizona",
                "US/Central",
                "US/East-Indiana",
                "US/Eastern",
                "US/Hawaii",
                "US/Indiana-Starke",
                "US/Michigan",
                "US/Mountain",
                "US/Pacific",
                "US/Samoa",
                "UTC",
                "Universal",
                "W-SU",
                "WET",
                "Zulu",
                "localtime"
              ],
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "IANA time zone. Example: 'America/Los_Angeles'",
          "title": "Timezone"
        },
        "title": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Checklist item title",
          "title": "Title"
        },
        "snoozeReminderTime": {
          "default": null,
          "title": "Snoozeremindertime"
        }
      },
      "required": [
        "id"
      ],
      "title": "ItemV2",
      "type": "object"
    },
    "TaskReminderV2": {
      "additionalProperties": false,
      "description": "Model for a reminder for a task via the V2 API.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Reminder ID",
          "title": "Id"
        },
        "trigger": {
          "description": "Reminder trigger",
          "title": "Trigger",
          "type": "string"
        }
      },
      "required": [
        "trigger"
      ],
      "title": "TaskReminderV2",
      "type": "object"
    },
    "TaskV2": {
      "additionalProperties": false,
      "description": "Model for a task in a batch response via the V2 API.",
      "properties": {
        "childIds": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "List of sub-task IDs",
          "title": "Childids"
        },
        "completedTime": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Completed time in `YYYY-MM-DD'T'HH:MM:SS.sss'+'hhmm` format",
          "title": "Completedtime"
        },
        "content": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Content of the task, used for `TEXT` or `NOTE` tasks, otherwise `desc` is used",
          "title": "Content"
        },
        "createdTime": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Created time in `YYYY-MM-DD'T'HH:MM:SS.sss'+'hhmm` format",
          "title": "Createdtime"
        },
        "desc": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Description of the task, used for `CHECKLIST` tasks, otherwise `content` is used",
          "title": "Desc"
        },
        "dueDate": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Due date and time in `yyyy-MM-dd'T'HH:mm:ssZ` format",
          "title": "Duedate"
        },
        "etag": {
          "description": "ETag of the task object",
          "pattern": "^[a-z0-9]{8}$",
          "title": "Etag",
          "type": "string"
        },
        "id": {
          "description": "ID of the task",
          "title": "Id",
          "type": "string"
        },
        "isAllDay": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The task is due any time on the due date, rather than at a specific time",
          "title": "Isallday"
        },
        "isFloating": {
          "description": "The task will remain at the same time regardless of time zone",
          "title": "Isfloating",
          "type": "boolean"
        },
        "items": {
          "description": "List of checklist items",
          "items": {
            "$ref": "#/$defs/ItemV2"
          },
          "title": "Items",
          "type": "array"
        },
        "kind": {
          "default": "TEXT",
          "description": "\"TEXT\", \"NOTE\", or \"CHECKLIST\"",
          "enum": [
            "TEXT",
            "NOTE",
            "CHECKLIST"
          ],
          "title": "Kind",
          "type": "string"
        },
        "modifiedTime": {
          "description": "Last modified time in `YYYY-MM-DD'T'HH:MM:SS.sss'+'hhmm` format",
          "format": "date-time",
          "title": "Modifiedtime",
          "type": "string"
        },
        "parentId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "ID of the parent task, if this is a subtask",
          "title": "Parentid"
        },
        "priority": {
          "description": "Priority of the task",
          "enum": [
            0,
            1,
            3,
            5
          ],
          "title": "Priority",
          "type": "integer"
        },
        "progress": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Progress of a `CHECKLIST` task, should be a number between 0 and 100",
          "title": "Progress"
        },
        "projectId": {
          "anyOf": [
            {
              "pattern": "^inbox\\d+$",
              "type": "string"
            },
            {
              "type": "string"
            }
          ],
          "description": "ID of the project the task is in",
          "title": "Projectid"
        },
        "reminder": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Unclear what this is, but it can sometimes be one of the reminder triggers in `reminders`",
          "title": "Reminder"
        },
        "reminders": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/TaskReminderV2"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "List of reminders for the task",
          "title": "Reminders"
        },
        "repeatFirstDate": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "First date of the repeating task in `yyyy-MM-dd'T'HH:mm:ssZ` format",
          "title": "Repeatfirstdate"
        },
        "repeatFlag": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Recurring rules of task",
          "title": "Repeatflag"
        },
        "repeatFrom": {
          "anyOf": [
            {
              "enum": [
                0,
                1,
                2
              ],
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "When to start repeating the task",
          "title": "Repeatfrom"
        },
        "repeatTaskId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "ID of the repeating task if a duplicate is somehow (re)opened",
          "title": "Repeattaskid"
        },
        "startDate": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Start date and time in `yyyy-MM-dd'T'HH:mm:ssZ` format",
          "title": "Startdate"
        },
        "status": {
          "description": "Status of the task",
          "enum": [
            -1,
            0,
            1,
            2
          ],
          "title": "Status",
          "type": "integer"
        },
        "tags": {
          "default": [],
          "description": "List of tag names for the task",
          "items": {
            "pattern": "^[^\\\\\\/\\\"#:*?<>|\\sA-Z]+$",
            "type": "string"
          },
          "title": "Tags",
          "type": "array"
        },
        "title": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Title of the task",
          "title": "Title"
        },
        "timeZone": {
          "anyOf": [
            {
              "enum": [
                "Africa/Abidjan",
                "Africa/Accra",
                "Africa/Addis_Ababa",
                "Africa/Algiers",
                "Africa/Asmara",
                "Africa/Asmera",
                "Africa/Bamako",
                "Africa/Bangui",
                "Africa/Banjul",
                "Africa/Bissau",
                "Africa/Blantyre",
                "Africa/Brazzaville",
                "Africa/Bujumbura",
                "Africa/Cairo",
                "Africa/Casablanca",
                "Africa/Ceuta",
                "Africa/Conakry",
                "Africa/Dakar",
                "Africa/Dar_es_Salaam",
                "Africa/Djibouti",
                "Africa/Douala",
                "Africa/El_Aaiun",
                "Africa/Freetown",
                "Africa/Gaborone",
                "Africa/Harare",
                "Africa/Johannesburg",
                "Africa/Juba",
                "Africa/Kampala",
                "Africa/Khartoum",
                "Africa/Kigali",
                "Africa/Kinshasa",
                "Africa/Lagos",
                "Africa/Libreville",
                "Africa/Lome",
                "Africa/Luanda",
                "Africa/Lubumbashi",
                "Africa/Lusaka",
                "Africa/Malabo",
                "Africa/Maputo",
                "Africa/Maseru",
                "Africa/Mbabane",
                "Africa/Mogadishu",
                "Africa/Monrovia",
                "Africa/Nairobi",
                "Africa/Ndjamena",
                "Africa/Niamey",
                "Africa/Nouakchott",
                "Africa/Ouagadougou",
                "Africa/Porto-Novo",
                "Africa/Sao_Tome",
                "Africa/Timbuktu",
                "Africa/Tripoli",
                "Africa/Tunis",
                "Africa/Windhoek",
                "America/Adak",
                "America/Anchorage",
                "America/Anguilla",
                "America/Antigua",
                "America/Araguaina",
                "America/Argentina/Buenos_Aires",
                "America/Argentina/Catamarca",
                "America/Argentina/ComodRivadavia",
                "America/Argentina/Cordoba",
                "America/Argentina/Jujuy",
                "America/Argentina/La_Rioja",
                "America/Argentina/Mendoza",
                "America/Argentina/Rio_Gallegos",
                "America/Argentina/Salta",
                "America/Argentina/San_Juan",
                "America/Argentina/San_Luis",
                "America/Argentina/Tucuman",
                "America/Argentina/Ushuaia",
                "America/Aruba",
                "America/Asuncion",
                "America/Atikokan",
                "America/Atka",
                "America/Bahia",
                "America/Bahia_Banderas",
                "America/Barbados",
                "America/Belem",
                "America/Belize",
                "America/Blanc-Sablon",
                "America/Boa_Vista",
                "America/Bogota",
                "America/Boise",
                "America/Buenos_Aires",
                "America/Cambridge_Bay",
                "America/Campo_Grande",
                "America/Cancun",
                "America/Caracas",
                "America/Catamarca",
                "America/Cayenne",
                "America/Cayman",
                "America/Chicago",
                "America/Chihuahua",
                "America/Ciudad_Juarez",
                "America/Coral_Harbour",
                "America/Cordoba",
                "America/Costa_Rica",
                "America/Coyhaique",
                "America/Creston",
                "America/Cuiaba",
                "America/Curacao",
                "America/Danmarkshavn",
                "America/Dawson",
                "America/Dawson_Creek",
                "America/Denver",
                "America/Detroit",
                "America/Dominica",
                "America/Edmonton",
                "America/Eirunepe",
                "America/El_Salvador",
                "America/Ensenada",
                "America/Fort_Nelson",
                "America/Fort_Wayne",
                "America/Fortaleza",
                "America/Glace_Bay",
                "America/Godthab",
                "America/Goose_Bay",
                "America/Grand_Turk",
                "America/Grenada",
                "America/Guadeloupe",
                "America/Guatemala",
                "America/Guayaquil",
                "America/Guyana",
                "America/Halifax",
                "America/Havana",
                "America/Hermosillo",
                "America/Indiana/Indianapolis",
                "America/Indiana/Knox",
                "America/Indiana/Marengo",
                "America/Indiana/Petersburg",
                "America/Indiana/Tell_City",
                "America/Indiana/Vevay",
                "America/Indiana/Vincennes",
                "America/Indiana/Winamac",
                "America/Indianapolis",
                "America/Inuvik",
                "America/Iqaluit",
                "America/Jamaica",
                "America/Jujuy",
                "America/Juneau",
                "America/Kentucky/Louisville",
                "America/Kentucky/Monticello",
                "America/Knox_IN",
                "America/Kralendijk",
                "America/La_Paz",
                "America/Lima",
                "America/Los_Angeles",
                "America/Louisville",
                "America/Lower_Princes",
                "America/Maceio",
                "America/Managua",
                "America/Manaus",
                "America/Marigot",
                "America/Martinique",
                "America/Matamoros",
                "America/Mazatlan",
                "America/Mendoza",
                "America/Menominee",
                "America/Merida",
                "America/Metlakatla",
                "America/Mexico_City",
                "America/Miquelon",
                "America/Moncton",
                "America/Monterrey",
                "America/Montevideo",
                "America/Montreal",
                "America/Montserrat",
                "America/Nassau",
                "America/New_York",
                "America/Nipigon",
                "America/Nome",
                "America/Noronha",
                "America/North_Dakota/Beulah",
                "America/North_Dakota/Center",
                "America/North_Dakota/New_Salem",
                "America/Nuuk",
                "America/Ojinaga",
                "America/Panama",
                "America/Pangnirtung",
                "America/Paramaribo",
                "America/Phoenix",
                "America/Port-au-Prince",
                "America/Port_of_Spain",
                "America/Porto_Acre",
                "America/Porto_Velho",
                "America/Puerto_Rico",
                "America/Punta_Arenas",
                "America/Rainy_River",
                "America/Rankin_Inlet",
                "America/Recife",
                "America/Regina",
                "America/Resolute",
                "America/Rio_Branco",
                "America/Rosario",
                "America/Santa_Isabel",
                "America/Santarem",
                "America/Santiago",
                "America/Santo_Domingo",
                "America/Sao_Paulo",
                "America/Scoresbysund",
                "America/Shiprock",
                "America/Sitka",
                "America/St_Barthelemy",
                "America/St_Johns",
                "America/St_Kitts",
                "America/St_Lucia",
                "America/St_Thomas",
                "America/St_Vincent",
                "America/Swift_Current",
                "America/Tegucigalpa",
                "America/Thule",
                "America/Thunder_Bay",
                "America/Tijuana",
                "America/Toronto",
                "America/Tortola",
                "America/Vancouver",
                "America/Virgin",
                "America/Whitehorse",
                "America/Winnipeg",
                "America/Yakutat",
                "America/Yellowknife",
                "Antarctica/Casey",
                "Antarctica/Davis",
                "Antarctica/DumontDUrville",
                "Antarctica/Macquarie",
                "Antarctica/Mawson",
                "Antarctica/McMurdo",
                "Antarctica/Palmer",
                "Antarctica/Rothera",
                "Antarctica/South_Pole",
                "Antarctica/Syowa",
                "Antarctica/Troll",
                "Antarctica/Vostok",
                "Arctic/Longyearbyen",
                "Asia/Aden",
                "Asia/Almaty",
                "Asia/Amman",
                "Asia/Anadyr",
                "Asia/Aqtau",
                "Asia/Aqtobe",
                "Asia/Ashgabat",
                "Asia/Ashkhabad",
                "Asia/Atyrau",
                "Asia/Baghdad",
                "Asia/Bahrain",
                "Asia/Baku",
                "Asia/Bangkok",
                "Asia/Barnaul",
                "Asia/Beirut",
                "Asia/Bishkek",
                "Asia/Brunei",
                "Asia/Calcutta",
                "Asia/Chita",
                "Asia/Choibalsan",
                "Asia/Chongqing",
                "Asia/Chungking",
                "Asia/Colombo",
                "Asia/Dacca",
                "Asia/Damascus",
                "Asia/Dhaka",
                "Asia/Dili",
                "Asia/Dubai",
                "Asia/Dushanbe",
                "Asia/Famagusta",
                "Asia/Gaza",
                "Asia/Harbin",
                "Asia/Hebron",
                "Asia/Ho_Chi_Minh",
                "Asia/Hong_Kong",
                "Asia/Hovd",
                "Asia/Irkutsk",
                "Asia/Istanbul",
                "Asia/Jakarta",
                "Asia/Jayapura",
                "Asia/Jerusalem",
                "Asia/Kabul",
                "Asia/Kamchatka",
                "Asia/Karachi",
                "Asia/Kashgar",
                "Asia/Kathmandu",
                "Asia/Katmandu",
                "Asia/Khandyga",
                "Asia/Kolkata",
                "Asia/Krasnoyarsk",
                "Asia/Kuala_Lumpur",
                "Asia/Kuching",
                "Asia/Kuwait",
                "Asia/Macao",
                "Asia/Macau",
                "Asia/Magadan",
                "Asia/Makassar",
                "Asia/Manila",
                "Asia/Muscat",
                "Asia/Nicosia",
                "Asia/Novokuznetsk",
                "Asia/Novosibirsk",
                "Asia/Omsk",
                "Asia/Oral",
                "Asia/Phnom_Penh",
                "Asia/Pontianak",
                "Asia/Pyongyang",
                "Asia/Qatar",
                "Asia/Qostanay",
                "Asia/Qyzylorda",
                "Asia/Rangoon",
                "Asia/Riyadh",
                "Asia/Saigon",
                "Asia/Sakhalin",
                "Asia/Samarkand",
                "Asia/Seoul",
                "Asia/Shanghai",
                "Asia/Singapore",
                "Asia/Srednekolymsk",
                "Asia/Taipei",
                "Asia/Tashkent",
                "Asia/Tbilisi",
                "Asia/Tehran",
                "Asia/Tel_Aviv",
                "Asia/Thimbu",
                "Asia/Thimphu",
                "Asia/Tokyo",
                "Asia/Tomsk",
                "Asia/Ujung_Pandang",
                "Asia/Ulaanbaatar",
                "Asia/Ulan_Bator",
                "Asia/Urumqi",
                "Asia/Ust-Nera",
                "Asia/Vientiane",
                "Asia/Vladivostok",
                "Asia/Yakutsk",
                "Asia/Yangon",
                "Asia/Yekaterinburg",
                "Asia/Yerevan",
                "Atlantic/Azores",
                "Atlantic/Bermuda",
                "Atlantic/Canary",
                "Atlantic/Cape_Verde",
                "Atlantic/Faeroe",
                "Atlantic/Faroe",
                "Atlantic/Jan_Mayen",
                "Atlantic/Madeira",
                "Atlantic/Reykjavik",
                "Atlantic/South_Georgia",
                "Atlantic/St_Helena",
                "Atlantic/Stanley",
                "Australia/ACT",
                "Australia/Adelaide",
                "Australia/Brisbane",
                "Australia/Broken_Hill",
                "Australia/Canberra",
                "Australia/Currie",
                "Australia/Darwin",
                "Australia/Eucla",
                "Australia/Hobart",
                "Australia/LHI",
                "Australia/Lindeman",
                "Australia/Lord_Howe",
                "Australia/Melbourne",
                "Australia/NSW",
                "Australia/North",
                "Australia/Perth",
                "Australia/Queensland",
                "Australia/South",
                "Australia/Sydney",
                "Australia/Tasmania",
                "Australia/Victoria",
                "Australia/West",
                "Australia/Yancowinna",
                "Brazil/Acre",
                "Brazil/DeNoronha",
                "Brazil/East",
                "Brazil/West",
                "CET",
                "CST6CDT",
                "Canada/Atlantic",
                "Canada/Central",
                "Canada/Eastern",
                "Canada/Mountain",
                "Canada/Newfoundland",
                "Canada/Pacific",
                "Canada/Saskatchewan",
                "Canada/Yukon",
                "Chile/Continental",
                "Chile/EasterIsland",
                "Cuba",
                "EET",
                "EST",
                "EST5EDT",
                "Egypt",
                "Eire",
                "Etc/GMT",
                "Etc/GMT+0",
                "Etc/GMT+1",
                "Etc/GMT+10",
                "Etc/GMT+11",
                "Etc/GMT+12",
                "Etc/GMT+2",
                "Etc/GMT+3",
                "Etc/GMT+4",
                "Etc/GMT+5",
                "Etc/GMT+6",
                "Etc/GMT+7",
                "Etc/GMT+8",
                "Etc/GMT+9",
                "Etc/GMT-0",
                "Etc/GMT-1",
                "Etc/GMT-10",
                "Etc/GMT-11",
                "Etc/GMT-12",
                "Etc/GMT-13",
                "Etc/GMT-14",
                "Etc/GMT-2",
                "Etc/GMT-3",
                "Etc/GMT-4",
                "Etc/GMT-5",
                "Etc/GMT-6",
                "Etc/GMT-7",
                "Etc/GMT-8",
                "Etc/GMT-9",
                "Etc/GMT0",
                "Etc/Greenwich",
                "Etc/UCT",
                "Etc/UTC",
                "Etc/Universal",
                "Etc/Zulu",
                "Europe/Amsterdam",
                "Europe/Andorra",
                "Europe/Astrakhan",
                "Europe/Athens",
                "Europe/Belfast",
                "Europe/Belgrade",
                "Europe/Berlin",
                "Europe/Bratislava",
                "Europe/Brussels",
                "Europe/Bucharest",
                "Europe/Budapest",
                "Europe/Busingen",
                "Europe/Chisinau",
                "Europe/Copenhagen",
                "Europe/Dublin",
                "Europe/Gibraltar",
                "Europe/Guernsey",
                "Europe/Helsinki",
                "Europe/Isle_of_Man",
                "Europe/Istanbul",
                "Europe/Jersey",
                "Europe/Kaliningrad",
                "Europe/Kiev",
                "Europe/Kirov",
                "Europe/Kyiv",
                "Europe/Lisbon",
                "Europe/Ljubljana",
                "Europe/London",
                "Europe/Luxembourg",
                "Europe/Madrid",
                "Europe/Malta",
                "Europe/Mariehamn",
                "Europe/Minsk",
                "Europe/Monaco",
                "Europe/Moscow",
                "Europe/Nicosia",
                "Europe/Oslo",
                "Europe/Paris",
                "Europe/Podgorica",
                "Europe/Prague",
                "Europe/Riga",
                "Europe/Rome",
                "Europe/Samara",
                "Europe/San_Marino",
                "Europe/Sarajevo",
                "Europe/Saratov",
                "Europe/Simferopol",
                "Europe/Skopje",
                "Europe/Sofia",
                "Europe/Stockholm",
                "Europe/Tallinn",
                "Europe/Tirane",
                "Europe/Tiraspol",
                "Europe/Ulyanovsk",
                "Europe/Uzhgorod",
                "Europe/Vaduz",
                "Europe/Vatican",
                "Europe/Vienna",
                "Europe/Vilnius",
                "Europe/Volgograd",
                "Europe/Warsaw",
                "Europe/Zagreb",
                "Europe/Zaporozhye",
                "Europe/Zurich",
                "Factory",
                "GB",
                "GB-Eire",
                "GMT",
                "GMT+0",
                "GMT-0",
                "GMT0",
                "Greenwich",
                "HST",
                "Hongkong",
                "Iceland",
                "Indian/Antananarivo",
                "Indian/Chagos",
                "Indian/Christmas",
                "Indian/Cocos",
                "Indian/Comoro",
                "Indian/Kerguelen",
                "Indian/Mahe",
                "Indian/Maldives",
                "Indian/Mauritius",
                "Indian/Mayotte",
                "Indian/Reunion",
                "Iran",
                "Israel",
                "Jamaica",
                "Japan",
                "Kwajalein",
                "Libya",
                "MET",
                "MST",
                "MST7MDT",
                "Mexico/BajaNorte",
                "Mexico/BajaSur",
                "Mexico/General",
                "NZ",
                "NZ-CHAT",
                "Navajo",
                "PRC",
                "PST8PDT",
                "Pacific/Apia",
                "Pacific/Auckland",
                "Pacific/Bougainville",
                "Pacific/Chatham",
                "Pacific/Chuuk",
                "Pacific/Easter",
                "Pacific/Efate",
                "Pacific/Enderbury",
                "Pacific/Fakaofo",
                "Pacific/Fiji",
                "Pacific/Funafuti",
                "Pacific/Galapagos",
                "Pacific/Gambier",
                "Pacific/Guadalcanal",
                "Pacific/Guam",
                "Pacific/Honolulu",
                "Pacific/Johnston",
                "Pacific/Kanton",
                "Pacific/Kiritimati",
                "Pacific/Kosrae",
                "Pacific/Kwajalein",
                "Pacific/Majuro",
                "Pacific/Marquesas",
                "Pacific/Midway",
                "Pacific/Nauru",
                "Pacific/Niue",
                "Pacific/Norfolk",
                "Pacific/Noumea",
                "Pacific/Pago_Pago",
                "Pacific/Palau",
                "Pacific/Pitcairn",
                "Pacific/Pohnpei",
                "Pacific/Ponape",
                "Pacific/Port_Moresby",
                "Pacific/Rarotonga",
                "Pacific/Saipan",
                "Pacific/Samoa",
                "Pacific/Tahiti",
                "Pacific/Tarawa",
                "Pacific/Tongatapu",
                "Pacific/Truk",
                "Pacific/Wake",
                "Pacific/Wallis",
                "Pacific/Yap",
                "Poland",
                "Portugal",
                "ROC",
                "ROK",
                "Singapore",
                "Turkey",
                "UCT",
                "US/Alaska",
                "US/Aleutian",
                "US/Arizona",
                "US/Central",
                "US/East-Indiana",
                "US/Eastern",
                "US/Hawaii",
                "US/Indiana-Starke",
                "US/Michigan",
                "US/Mountain",
                "US/Pacific",
                "US/Samoa",
                "UTC",
                "Universal",
                "W-SU",
                "WET",
                "Zulu",
                "localtime"
              ],
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "IANA time zone. Example: 'America/Los_Angeles'",
          "title": "Timezone"
        },
        "assignee": {
          "anyOf": [
            {},
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Assignee"
        },
        "attachments": {
          "default": [],
          "items": {},
          "title": "Attachments",
          "type": "array"
        },
        "annoyingAlert": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Annoyingalert"
        },
        "columnId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Columnid"
        },
        "commentCount": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Commentcount"
        },
        "completedUserId": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Completeduserid"
        },
        "creator": {
          "title": "Creator",
          "type": "integer"
        },
        "deleted": {
          "title": "Deleted",
          "type": "integer"
        },
        "exDate": {
          "anyOf": [
            {
              "items": {},
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Exdate"
        },
        "focusSummaries": {
          "default": [],
          "items": {},
          "title": "Focussummaries",
          "type": "array"
        },
        "imgMode": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Imgmode"
        },
        "isDirty": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Isdirty"
        },
        "local": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Local"
        },
        "remindTime": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Remindtime"
        },
        "sortOrder": {
          "title": "Sortorder",
          "type": "integer"
        }
      },
      "required": [
        "etag",
        "id",
        "isFloating",
        "items",
        "modifiedTime",
        "priority",
        "projectId",
        "status",
        "title",
        "creator",
        "deleted",
        "sortOrder"
      ],
      "title": "TaskV2",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "description": "Model for all the tasks in a batch response via the V2 API.\n\nThis model is used to represent all the tasks in a batch response from the V2 API.\nIt lends itself to being used as parameters for a update request, but we do not have\na complete understanding of how. For now, the `update` field is the most important,\nas it contains all the active tasks for the user.",
  "properties": {
    "update": {
      "description": "List of all active tasks for the user",
      "items": {
        "$ref": "#/$defs/TaskV2"
      },
      "title": "Update",
      "type": "array"
    },
    "add": {
      "items": {},
      "title": "Add",
      "type": "array"
    },
    "delete": {
      "items": {},
      "title": "Delete",
      "type": "array"
    },
    "empty": {
      "title": "Empty",
      "type": "boolean"
    },
    "tagUpdate": {
      "items": {},
      "title": "Tagupdate",
      "type": "array"
    }
  },
  "required": [
    "update",
    "add",
    "delete",
    "empty",
    "tagUpdate"
  ],
  "title": "SyncTaskBeanV2",
  "type": "object"
}

Fields:

  • update (list[TaskV2])
  • add (list[Any])
  • delete (list[Any])
  • empty (bool)
  • tag_update (list[Any])

Validators:

update pydantic-field #

update: list[TaskV2]

List of all active tasks for the user

empty_str_to_none pydantic-validator #

empty_str_to_none(v: Any) -> Any

Convert empty strings to None.

TickTick API responses sometimes conflates None and empty strings for optional fields. This validator ensures that empty strings are converted to None, which then allows for more consistent handling of the data within the library.

Parameters:

Name Type Description Default
v Any

The value to validate.

required

Returns:

Name Type Description
Any Any

The input value if it is not an empty string, otherwise None.

Source code in src/pyticktick/models/v2/models.py
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
@field_validator("*", mode="before")
@classmethod
def empty_str_to_none(cls, v: Any) -> Any:
    """Convert empty strings to None.

    TickTick API responses sometimes conflates `None` and empty strings for
    optional fields. This validator ensures that empty strings are converted to
    `None`, which then allows for more consistent handling of the data within the
    library.

    Args:
        v (Any): The value to validate.

    Returns:
        Any: The input value if it is not an empty string, otherwise `None`.
    """
    if isinstance(v, str) and len(v) == 0:
        return None
    return v

override_forbid_extra_message_injector pydantic-validator #

override_forbid_extra_message_injector(
    data: Any,
    handler: ModelWrapValidatorHandler[BaseModelV2],
) -> BaseModelV2

Provide a better error message for extra fields.

The TickTick V2 API is unofficial and may change without notice. As such, the models may not always be up to date with the API. This validator catches the extra_forbidden errors and provides a more informative error message, including a link to the documentation on how to override the extra_forbidden behavior if needed.

Parameters:

Name Type Description Default
data Any

The input data to validate.

required
handler ModelWrapValidatorHandler[BaseModelV2]

The handler to call the next validator in the chain.

required

Raises:

Type Description
ValidationError

If the pydantic model fails validation for any reason.

Returns:

Name Type Description
BaseModelV2 BaseModelV2

The validated model instance.

Source code in src/pyticktick/models/v2/models.py
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
@model_validator(mode="wrap")
@classmethod
def override_forbid_extra_message_injector(
    cls,
    data: Any,
    handler: ModelWrapValidatorHandler[BaseModelV2],
) -> BaseModelV2:
    """Provide a better error message for extra fields.

    The TickTick V2 API is unofficial and may change without notice. As such, the
    models may not always be up to date with the API. This validator catches the
    `extra_forbidden` errors and provides a more informative error message,
    including a link to the documentation on how to override the `extra_forbidden`
    behavior if needed.

    Args:
        data (Any): The input data to validate.
        handler (ModelWrapValidatorHandler[BaseModelV2]): The handler to call the
            next validator in the chain.

    Raises:
        ValidationError: If the pydantic model fails validation for any reason.

    Returns:
        BaseModelV2: The validated model instance.
    """  # noqa: DOC501, DOC502 # ruff thinks `from_exception_data` should be raised instead of `ValidationError`
    try:
        return handler(data)
    except ValidationError as e:
        errors = []
        for error_dict in e.errors():
            if error_dict.get("type") in (
                "extra_forbidden",
                "custom_pyticktick_extra_forbidden",
            ):
                _type: str | PydanticCustomError = PydanticCustomError(
                    "custom_pyticktick_extra_forbidden",
                    f"Extra inputs are not permitted by default for `{cls.__name__}`. Please set `override_forbid_extra` to `True` if you believe the TickTick API has diverged from the model. See https://pyticktick.pretzer.io/guides/settings/overriding_models_that_forbid_extra_fields/ for more information.",  # pyright: ignore[reportArgumentType] # ty: ignore[invalid-argument-type]
                )
            else:
                _type = error_dict["type"]

            init_error_details: InitErrorDetails = {
                "type": _type,
                "input": error_dict["input"],
            }
            if "loc" in error_dict:
                init_error_details["loc"] = error_dict["loc"]
            if "ctx" in error_dict:
                init_error_details["ctx"] = error_dict["ctx"]

            errors.append(init_error_details)

        raise ValidationError.from_exception_data(e.title, errors) from e

SyncTaskOrderBeanV2 pydantic-model #

Bases: BaseModelV2

Unknown model for the V2 API.

Show JSON schema:
{
  "additionalProperties": false,
  "description": "Unknown model for the V2 API.",
  "properties": {
    "taskOrderByDate": {
      "additionalProperties": true,
      "title": "Taskorderbydate",
      "type": "object"
    },
    "taskOrderByPriority": {
      "additionalProperties": true,
      "title": "Taskorderbypriority",
      "type": "object"
    },
    "taskOrderByProject": {
      "additionalProperties": true,
      "title": "Taskorderbyproject",
      "type": "object"
    }
  },
  "required": [
    "taskOrderByDate",
    "taskOrderByPriority",
    "taskOrderByProject"
  ],
  "title": "SyncTaskOrderBeanV2",
  "type": "object"
}

Fields:

  • task_order_by_date (dict[str, Any])
  • task_order_by_priority (dict[str, Any])
  • task_order_by_project (dict[str, Any])

Validators:

empty_str_to_none pydantic-validator #

empty_str_to_none(v: Any) -> Any

Convert empty strings to None.

TickTick API responses sometimes conflates None and empty strings for optional fields. This validator ensures that empty strings are converted to None, which then allows for more consistent handling of the data within the library.

Parameters:

Name Type Description Default
v Any

The value to validate.

required

Returns:

Name Type Description
Any Any

The input value if it is not an empty string, otherwise None.

Source code in src/pyticktick/models/v2/models.py
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
@field_validator("*", mode="before")
@classmethod
def empty_str_to_none(cls, v: Any) -> Any:
    """Convert empty strings to None.

    TickTick API responses sometimes conflates `None` and empty strings for
    optional fields. This validator ensures that empty strings are converted to
    `None`, which then allows for more consistent handling of the data within the
    library.

    Args:
        v (Any): The value to validate.

    Returns:
        Any: The input value if it is not an empty string, otherwise `None`.
    """
    if isinstance(v, str) and len(v) == 0:
        return None
    return v

override_forbid_extra_message_injector pydantic-validator #

override_forbid_extra_message_injector(
    data: Any,
    handler: ModelWrapValidatorHandler[BaseModelV2],
) -> BaseModelV2

Provide a better error message for extra fields.

The TickTick V2 API is unofficial and may change without notice. As such, the models may not always be up to date with the API. This validator catches the extra_forbidden errors and provides a more informative error message, including a link to the documentation on how to override the extra_forbidden behavior if needed.

Parameters:

Name Type Description Default
data Any

The input data to validate.

required
handler ModelWrapValidatorHandler[BaseModelV2]

The handler to call the next validator in the chain.

required

Raises:

Type Description
ValidationError

If the pydantic model fails validation for any reason.

Returns:

Name Type Description
BaseModelV2 BaseModelV2

The validated model instance.

Source code in src/pyticktick/models/v2/models.py
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
@model_validator(mode="wrap")
@classmethod
def override_forbid_extra_message_injector(
    cls,
    data: Any,
    handler: ModelWrapValidatorHandler[BaseModelV2],
) -> BaseModelV2:
    """Provide a better error message for extra fields.

    The TickTick V2 API is unofficial and may change without notice. As such, the
    models may not always be up to date with the API. This validator catches the
    `extra_forbidden` errors and provides a more informative error message,
    including a link to the documentation on how to override the `extra_forbidden`
    behavior if needed.

    Args:
        data (Any): The input data to validate.
        handler (ModelWrapValidatorHandler[BaseModelV2]): The handler to call the
            next validator in the chain.

    Raises:
        ValidationError: If the pydantic model fails validation for any reason.

    Returns:
        BaseModelV2: The validated model instance.
    """  # noqa: DOC501, DOC502 # ruff thinks `from_exception_data` should be raised instead of `ValidationError`
    try:
        return handler(data)
    except ValidationError as e:
        errors = []
        for error_dict in e.errors():
            if error_dict.get("type") in (
                "extra_forbidden",
                "custom_pyticktick_extra_forbidden",
            ):
                _type: str | PydanticCustomError = PydanticCustomError(
                    "custom_pyticktick_extra_forbidden",
                    f"Extra inputs are not permitted by default for `{cls.__name__}`. Please set `override_forbid_extra` to `True` if you believe the TickTick API has diverged from the model. See https://pyticktick.pretzer.io/guides/settings/overriding_models_that_forbid_extra_fields/ for more information.",  # pyright: ignore[reportArgumentType] # ty: ignore[invalid-argument-type]
                )
            else:
                _type = error_dict["type"]

            init_error_details: InitErrorDetails = {
                "type": _type,
                "input": error_dict["input"],
            }
            if "loc" in error_dict:
                init_error_details["loc"] = error_dict["loc"]
            if "ctx" in error_dict:
                init_error_details["ctx"] = error_dict["ctx"]

            errors.append(init_error_details)

        raise ValidationError.from_exception_data(e.title, errors) from e