## 参考 https://developer.todoist.com/sync/v9/#migrating-from-v8 ## メモ - [[Firebase]]とのやりとりはIDはstringになってそう ### General microsecondsが返ってくるように。パラメータ指定のときはどっちでもいいらしい。 ```diff - "date_added": "2015-10-13T14:14:43Z", + "added_at": "2015-10-13T14:14:43.000000Z", ``` - IDがすべてstringになった.... ==のだけど number のままのこともあるから注意してくれよ!== - `number` を `string | number` に変える ### Items `labels`がIDの配列ではなく名称の配列を返すようになった。 ```diff - "labels": [1111111, 2222222] + "labels": ["10分", "20分"] ``` ## やること - [x] General - [x] All datetime strings returned by the API have microsecond precision (2021-01-01T12:00:00.123456Z). Any sync commands or endpoints that have a datetime parameter accepts the value with or without the microseconds present (2021-01-01T12:00:00.123456Z or 2021-01-01T12:00:00Z). - [x] All ids are now strings, instead of numbers. Some of them may still contain only numbers, but it's not guaranteed it will continue to be that way. All string ids must be treated as opaque byte sequences. - [x] Items - [x] Labels on items now appear as a list of label names. Commands for adding and updating items are amended to take an array of label names instead of IDs. - [x] `string[]`に変える - [x] ドメインTaskのlabelIdsをlabelNamesに変更 - [x] nameベースでmap作成する必要あり - [x] The id attribute is now a string (was previously a number). - [x] The user_id attribute is now a string (was previously a number). - [x] The section_id attribute is now a string (was previously a number). - [x] The project_id attribute is now a string (was previously a number). - [x] The parent_id attribute is now a string (was previously a number). - [x] The added_by_uid attribute is now a string (was previously a number). - [x] The assigned_by_uid attribute is now a string (was previously a number). - [x] The responsible_uid attribute is now a string (was previously a number). - [x] The in_history attribute has been deprecated. An item can no longer be archived without being completed. The checked attribute should be used instead. - [x] The item_archive and item_unarchive sync commands have been deprecated. Child items are now automatically archived when their parents are modified using the item_complete command. To restore a child item and its parents from the archive, use the item_uncomplete command. - [x] The force_history parameter of the item_complete sync command has been deprecated. Child items are now completed and moved to the archive with their parent item. - [x] The date_added attribute has been renamed to added_at. - [x] The date_completed attribute has been renamed to completed_at. - [x] The checked attribute is now a boolean value (was previously a 0 or 1 integer). - [x] The collapsed attribute is now a boolean value (was previously a 0 or 1 integer). - [x] The is_deleted attribute is now a boolean value (was previously a 0 or 1 integer). - [x] Projects - [x] Projects have a new property view_style. This value determines whether the Todoist clients display the project as a list or board. This value can be set with the project_add or project_update commands. - [x] The id attribute is now a string (was previously a number). - [x] The parent_id attribute is now a string (was previously a number). - [x] The sync_id attribute is now a string (was previously a number). - [x] The color attribute is now a string representing the name of the color instead of a numeric ID. See the colors guide for details of the possible values. - [x] The collapsed attribute is now a boolean value (was previously a 0 or 1 integer). - [x] The is_archived attribute is now a boolean value (was previously a 0 or 1 integer). - [x] The is_deleted attribute is now a boolean value (was previously a 0 or 1 integer). - [x] The is_favorite attribute is now a boolean value (was previously a 0 or 1 integer). - [x] Sections - [x] The id attribute is now a string (was previously a number). - [x] The project_id attribute is now a string (was previously a number). - [x] The user_id attribute is now a string (was previously a number). - [x] The sync_id attribute is now a string (was previously a number). - [x] The date_added attribute has been renamed to added_at. - [x] The date_archived attribute has been renamed to archived_at. - [x] Labels - [x] We introduced a new concept of 'shared labels' to Todoist. These are labels that are not saved to a user's account but have been created by collaborators and appear on tasks. See the labels section for details of the differences between personal and shared labels. - [x] New commands label_rename and label_delete_occurrences were added to assist with management of shared labels. - [x] The id attribute is now a string (was previously a number). - [x] The delete_label command has a new optional parameter, cascade. This determines whether instances of a label should be removed when a personal label is deleted. - [x] The color attribute is now a string representing the name of the color instead of a numeric ID. See the colors guide for details of the possible values. - [x] The is_deleted attribute is now a boolean value (was previously a 0 or 1 integer). - [x] The is_favorite attribute is now a boolean value (was previously a 0 or 1 integer). - [x] Filters - [x] The id attribute is now a string (was previously a number). - [x] The color attribute is now a string representing the name of the color instead of a numeric ID. See the colors guide for details of the possible values. - [x] The is_deleted attribute is now a boolean value (was previously a 0 or 1 integer). - [x] The is_favorite attribute is now a boolean value (was previously a 0 or 1 integer). - [x] Archived items and sections - [x] Completed items, archived sections, and their associated reminders and notes no longer appear in full or partial sync responses. - [x] A new completed_info resource type is returned by the sync endpoint, which indicates how many completed items or archived sections are present within an active project, item or section. - [x] A new endpoint /archive/items has been added to allow retrieval of completed items. - [x] A new endpoint /archive/sections has been added to allow retrieval of archived sections. - [x] Full details of interacting with the archive can be found in the Items and sections archive section. - [x] Notes - [x] The id attribute is now a string (was previously a number). - [x] The project_id attribute is now a string (was previously a number). - [x] The posted_uid attribute is now a string (was previously a number). - [x] The item_id attribute is now a string (was previously a number). - [x] The project_id is no longer returned for item notes. It is only returned when the note is attached to a project. - [x] The is_deleted attribute is now a boolean value (was previously a 0 or 1 integer). - [x] The posted attribute has been renamed to posted_at. - [x] The reactions attribute is now a list of strings (was previously a list of numbers). - [x] The uids_to_notify attribute is now a list of strings (was previously a list of numbers). - [x] User - [x] The format of the start_page value for a user has changed. The start page can be one of the following: inbox, teaminbox, today, next7days, project?id=1234 to open a project, label?name=abc to open a label, or filter?id=1234 to open a filter. - [x] The business_account_id attribute is now a string (was previously a number). - [x] The join_date attribute has been renamed to joined_at. - [x] The inbox_project attribute has been renamed to inbox_project_id and its content is now a string. - [x] The team_inbox attribute has been renamed to team_inbox_id and its content is now a string. - [x] The theme attribute has been renamed to theme_id. - [x] A new property has_password is added to the user object. If the user has only used a 3rd party auth provider (Google, Facebook, Apple) to register and login this value is now be false until they set a password. - [x] A current_password parameter has been added to the user_update sync command. This is mandatory if the command is changing the user's email address or password and the user has_password value is true. - [x] A new property weekend_start_day is added to the user object. This value is used by the Todoist clients when a user chooses to schedule a task for the Weekend. The user_update command can be used to change this value. - [x] The default_reminder, mobile_number and mobile_host attributes have been removed from the user object. These values related to SMS reminder functionality that has been deprecated. - [x] Live Notifications - [x] Fields changed in their respective objects are also reflected here (e.g. project_id, item_id, responsible_uid, etc.) - [x] The id attribute is now a string (was previously a number). - [x] The ids attribute is now a list of strings (was previously a list of numbers). - [x] The from_uid attribute is now a string (was previously a number). - [x] The created attribute has been renamed to created_at - [x] The is_unread attribute is now a boolean value (was previously a 0 or 1 integer). - [x] Reminders - [x] The service attribute have been removed. - [x] The id attribute is now a string (was previously a number). - [x] The item_id attribute is now a string (was previously a number). - [x] The notify_uid attribute is now a string (was previously a number).