@doist/todoist-api-typescript 7.4.0 → 7.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +2 -0
  2. package/dist/cjs/authentication.js +50 -6
  3. package/dist/cjs/consts/endpoints.js +63 -1
  4. package/dist/cjs/test-utils/test-defaults.js +33 -1
  5. package/dist/cjs/todoist-api.js +1130 -168
  6. package/dist/cjs/{utils → transport}/fetch-with-retry.js +23 -71
  7. package/dist/cjs/{rest-client.js → transport/http-client.js} +5 -5
  8. package/dist/cjs/transport/http-dispatcher.js +72 -0
  9. package/dist/cjs/types/entities.js +124 -1
  10. package/dist/cjs/types/errors.js +9 -1
  11. package/dist/cjs/types/http.js +3 -1
  12. package/dist/cjs/types/requests.js +24 -0
  13. package/dist/cjs/types/sync/commands/shared.js +2 -8
  14. package/dist/cjs/types/sync/resources/reminders.js +2 -0
  15. package/dist/cjs/utils/multipart-upload.js +1 -1
  16. package/dist/cjs/utils/validators.js +19 -2
  17. package/dist/esm/authentication.js +47 -4
  18. package/dist/esm/consts/endpoints.js +52 -0
  19. package/dist/esm/test-utils/test-defaults.js +32 -0
  20. package/dist/esm/todoist-api.js +1061 -99
  21. package/dist/esm/{utils → transport}/fetch-with-retry.js +23 -38
  22. package/dist/esm/{rest-client.js → transport/http-client.js} +5 -5
  23. package/dist/esm/transport/http-dispatcher.js +35 -0
  24. package/dist/esm/types/entities.js +122 -0
  25. package/dist/esm/types/errors.js +7 -0
  26. package/dist/esm/types/http.js +3 -1
  27. package/dist/esm/types/requests.js +23 -1
  28. package/dist/esm/types/sync/commands/shared.js +1 -8
  29. package/dist/esm/types/sync/resources/reminders.js +2 -0
  30. package/dist/esm/utils/multipart-upload.js +1 -1
  31. package/dist/esm/utils/validators.js +19 -2
  32. package/dist/types/authentication.d.ts +51 -6
  33. package/dist/types/consts/endpoints.d.ts +31 -0
  34. package/dist/types/test-utils/test-defaults.d.ts +5 -1
  35. package/dist/types/todoist-api.d.ts +338 -6
  36. package/dist/types/{utils → transport}/fetch-with-retry.d.ts +1 -1
  37. package/dist/types/{rest-client.d.ts → transport/http-client.d.ts} +1 -1
  38. package/dist/types/transport/http-dispatcher.d.ts +3 -0
  39. package/dist/types/types/entities.d.ts +258 -14
  40. package/dist/types/types/errors.d.ts +4 -0
  41. package/dist/types/types/requests.d.ts +537 -43
  42. package/dist/types/types/sync/commands/projects.d.ts +2 -2
  43. package/dist/types/types/sync/commands/shared.d.ts +1 -4
  44. package/dist/types/types/sync/resources/reminders.d.ts +4 -0
  45. package/dist/types/types/sync/resources/user.d.ts +2 -2
  46. package/dist/types/types/sync/resources/view-options.d.ts +5 -5
  47. package/dist/types/types/sync/user-preferences.d.ts +1 -1
  48. package/dist/types/utils/validators.d.ts +202 -6
  49. package/package.json +4 -4
package/README.md CHANGED
@@ -4,6 +4,8 @@ This is the official TypeScript API client for the Todoist REST API.
4
4
 
5
5
  ## Installation
6
6
 
7
+ Requires Node 20.18.1+.
8
+
7
9
  ```
8
10
  npm install @doist/todoist-api-typescript
9
11
  ```
@@ -5,7 +5,8 @@ exports.getAuthStateParameter = getAuthStateParameter;
5
5
  exports.getAuthorizationUrl = getAuthorizationUrl;
6
6
  exports.getAuthToken = getAuthToken;
7
7
  exports.revokeToken = revokeToken;
8
- const rest_client_1 = require("./rest-client");
8
+ exports.migratePersonalToken = migratePersonalToken;
9
+ const http_client_1 = require("./transport/http-client");
9
10
  const uuid_1 = require("uuid");
10
11
  const types_1 = require("./types");
11
12
  const endpoints_1 = require("./consts/endpoints");
@@ -58,7 +59,7 @@ function getAuthStateParameter() {
58
59
  * ```
59
60
  *
60
61
  * @returns The full authorization URL to redirect users to
61
- * @see https://todoist.com/api/v1/docs#tag/Authorization/OAuth
62
+ * @see https://developer.todoist.com/api/v1/#tag/Authorization/OAuth
62
63
  */
63
64
  function getAuthorizationUrl({ clientId, permissions, state, baseUrl, }) {
64
65
  if (!(permissions === null || permissions === void 0 ? void 0 : permissions.length)) {
@@ -90,7 +91,7 @@ async function getAuthToken(args, options) {
90
91
  const baseUrl = options === null || options === void 0 ? void 0 : options.baseUrl;
91
92
  const customFetch = options === null || options === void 0 ? void 0 : options.customFetch;
92
93
  try {
93
- const response = await (0, rest_client_1.request)({
94
+ const response = await (0, http_client_1.request)({
94
95
  httpMethod: 'POST',
95
96
  baseUri: (0, endpoints_1.getAuthBaseUri)(baseUrl),
96
97
  relativePath: endpoints_1.ENDPOINT_GET_TOKEN,
@@ -126,7 +127,7 @@ async function getAuthToken(args, options) {
126
127
  *
127
128
  * @returns True if revocation was successful
128
129
  * @see https://datatracker.ietf.org/doc/html/rfc7009
129
- * @see https://todoist.com/api/v1/docs#tag/Authorization
130
+ * @see https://developer.todoist.com/api/v1/#tag/Authorization
130
131
  */
131
132
  async function revokeToken(args, options) {
132
133
  if (typeof options === 'string') {
@@ -145,7 +146,7 @@ async function revokeToken(args, options) {
145
146
  token,
146
147
  token_type_hint: 'access_token',
147
148
  };
148
- const response = await (0, rest_client_1.request)({
149
+ const response = await (0, http_client_1.request)({
149
150
  httpMethod: 'POST',
150
151
  baseUri: (0, endpoints_1.getSyncBaseUri)(baseUrl),
151
152
  relativePath: endpoints_1.ENDPOINT_REVOKE,
@@ -156,5 +157,48 @@ async function revokeToken(args, options) {
156
157
  customHeaders: customHeaders,
157
158
  customFetch,
158
159
  });
159
- return (0, rest_client_1.isSuccess)(response);
160
+ return (0, http_client_1.isSuccess)(response);
161
+ }
162
+ /**
163
+ * Migrates a personal API token to an OAuth access token.
164
+ *
165
+ * This allows applications to transition users from personal API tokens
166
+ * to proper OAuth tokens without requiring the user to go through the
167
+ * full OAuth authorization flow.
168
+ *
169
+ * @example
170
+ * ```typescript
171
+ * const { accessToken } = await migratePersonalToken({
172
+ * clientId: 'your-client-id',
173
+ * clientSecret: 'your-client-secret',
174
+ * personalToken: 'user-personal-token',
175
+ * scope: 'data:read_write,data:delete'
176
+ * })
177
+ * ```
178
+ *
179
+ * @returns The new OAuth token response
180
+ * @throws {@link TodoistRequestError} If the migration fails
181
+ */
182
+ async function migratePersonalToken(args, options) {
183
+ var _a;
184
+ const baseUrl = options === null || options === void 0 ? void 0 : options.baseUrl;
185
+ const customFetch = options === null || options === void 0 ? void 0 : options.customFetch;
186
+ try {
187
+ const response = await (0, http_client_1.request)({
188
+ httpMethod: 'POST',
189
+ baseUri: (0, endpoints_1.getSyncBaseUri)(baseUrl),
190
+ relativePath: endpoints_1.ENDPOINT_REST_ACCESS_TOKENS_MIGRATE,
191
+ apiToken: undefined,
192
+ payload: Object.assign(Object.assign({}, args), { scope: args.scope.join(',') }),
193
+ customFetch,
194
+ });
195
+ if (response.status !== 200 || !((_a = response.data) === null || _a === void 0 ? void 0 : _a.accessToken)) {
196
+ throw new types_1.TodoistRequestError('Personal token migration failed.', response.status, response.data);
197
+ }
198
+ return response.data;
199
+ }
200
+ catch (error) {
201
+ const err = error;
202
+ throw new types_1.TodoistRequestError('Personal token migration failed.', err.httpStatusCode, err.responseData);
203
+ }
160
204
  }
@@ -1,10 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ENDPOINT_WORKSPACE_USERS = exports.ENDPOINT_WORKSPACE_PLAN_DETAILS = exports.ENDPOINT_WORKSPACE_LOGO = exports.ENDPOINT_WORKSPACE_JOIN = exports.ENDPOINT_WORKSPACE_INVITATIONS_DELETE = exports.ENDPOINT_WORKSPACE_INVITATIONS_ALL = exports.ENDPOINT_WORKSPACE_INVITATIONS = exports.ENDPOINT_REVOKE = exports.ENDPOINT_GET_TOKEN = exports.ENDPOINT_AUTHORIZATION = exports.ENDPOINT_SYNC = exports.ENDPOINT_SYNC_QUICK_ADD = exports.ENDPOINT_REST_PROJECTS_MOVE_TO_PERSONAL = exports.ENDPOINT_REST_PROJECTS_MOVE_TO_WORKSPACE = exports.PROJECT_UNARCHIVE = exports.PROJECT_ARCHIVE = exports.ENDPOINT_REST_UPLOADS = exports.ENDPOINT_REST_ACTIVITIES = exports.ENDPOINT_REST_PRODUCTIVITY = exports.ENDPOINT_REST_USER = exports.ENDPOINT_REST_PROJECT_COLLABORATORS = exports.ENDPOINT_REST_PROJECTS_ARCHIVED = exports.ENDPOINT_REST_PROJECTS_SEARCH = exports.ENDPOINT_REST_PROJECTS = exports.ENDPOINT_REST_TASK_MOVE = exports.ENDPOINT_REST_TASK_REOPEN = exports.ENDPOINT_REST_TASK_CLOSE = exports.ENDPOINT_REST_COMMENTS = exports.ENDPOINT_REST_LABELS_SHARED_REMOVE = exports.ENDPOINT_REST_LABELS_SHARED_RENAME = exports.ENDPOINT_REST_LABELS_SHARED = exports.ENDPOINT_REST_LABELS_SEARCH = exports.ENDPOINT_REST_LABELS = exports.ENDPOINT_REST_SECTIONS_SEARCH = exports.ENDPOINT_REST_SECTIONS = exports.ENDPOINT_REST_TASKS_COMPLETED_SEARCH = exports.ENDPOINT_REST_TASKS_COMPLETED_BY_DUE_DATE = exports.ENDPOINT_REST_TASKS_COMPLETED_BY_COMPLETION_DATE = exports.ENDPOINT_REST_TASKS_FILTER = exports.ENDPOINT_REST_TASKS = exports.API_BASE_URI = exports.API_VERSION = exports.TODOIST_WEB_URI = void 0;
3
+ exports.ENDPOINT_REST_ID_MAPPINGS = exports.ENDPOINT_REST_EMAILS = exports.ENDPOINT_REST_BACKUPS_DOWNLOAD = exports.ENDPOINT_REST_BACKUPS = exports.ENDPOINT_REST_ACCESS_TOKENS_MIGRATE = exports.ENDPOINT_REST_TEMPLATES_IMPORT_FROM_ID = exports.ENDPOINT_REST_TEMPLATES_IMPORT_FROM_FILE = exports.ENDPOINT_REST_TEMPLATES_CREATE_FROM_FILE = exports.ENDPOINT_REST_TEMPLATES_URL = exports.ENDPOINT_REST_TEMPLATES_FILE = exports.ENDPOINT_REST_TASKS_COMPLETED = exports.ENDPOINT_REST_PROJECTS_MOVE_TO_PERSONAL = exports.ENDPOINT_REST_PROJECTS_MOVE_TO_WORKSPACE = exports.SECTION_UNARCHIVE = exports.SECTION_ARCHIVE = exports.ENDPOINT_REST_PROJECT_JOIN = exports.ENDPOINT_REST_PROJECT_FULL = exports.ENDPOINT_REST_PROJECTS_PERMISSIONS = exports.ENDPOINT_REST_PROJECTS_ARCHIVED_COUNT = exports.PROJECT_UNARCHIVE = exports.PROJECT_ARCHIVE = exports.ENDPOINT_REST_UPLOADS = exports.ENDPOINT_REST_ACTIVITIES = exports.ENDPOINT_REST_PRODUCTIVITY = exports.ENDPOINT_REST_USER = exports.ENDPOINT_REST_PROJECT_COLLABORATORS = exports.ENDPOINT_REST_PROJECTS_ARCHIVED = exports.ENDPOINT_REST_PROJECTS_SEARCH = exports.ENDPOINT_REST_PROJECTS = exports.ENDPOINT_REST_TASK_MOVE = exports.ENDPOINT_REST_TASK_REOPEN = exports.ENDPOINT_REST_TASK_CLOSE = exports.ENDPOINT_REST_LOCATION_REMINDERS = exports.ENDPOINT_REST_REMINDERS = exports.ENDPOINT_REST_COMMENTS = exports.ENDPOINT_REST_LABELS_SHARED_REMOVE = exports.ENDPOINT_REST_LABELS_SHARED_RENAME = exports.ENDPOINT_REST_LABELS_SHARED = exports.ENDPOINT_REST_LABELS_SEARCH = exports.ENDPOINT_REST_LABELS = exports.ENDPOINT_REST_SECTIONS_SEARCH = exports.ENDPOINT_REST_SECTIONS = exports.ENDPOINT_REST_TASKS_COMPLETED_SEARCH = exports.ENDPOINT_REST_TASKS_COMPLETED_BY_DUE_DATE = exports.ENDPOINT_REST_TASKS_COMPLETED_BY_COMPLETION_DATE = exports.ENDPOINT_REST_TASKS_FILTER = exports.ENDPOINT_REST_TASKS = exports.API_BASE_URI = exports.API_VERSION = exports.TODOIST_WEB_URI = void 0;
4
+ exports.ENDPOINT_WORKSPACE_MEMBERS = exports.ENDPOINT_WORKSPACE_USERS = exports.ENDPOINT_WORKSPACE_PLAN_DETAILS = exports.ENDPOINT_WORKSPACE_LOGO = exports.ENDPOINT_WORKSPACE_JOIN = exports.ENDPOINT_WORKSPACE_INVITATIONS_DELETE = exports.ENDPOINT_WORKSPACE_INVITATIONS_ALL = exports.ENDPOINT_WORKSPACE_INVITATIONS = exports.ENDPOINT_REST_WORKSPACES = exports.ENDPOINT_REVOKE = exports.ENDPOINT_GET_TOKEN = exports.ENDPOINT_AUTHORIZATION = exports.ENDPOINT_SYNC = exports.ENDPOINT_SYNC_QUICK_ADD = exports.ENDPOINT_REST_MOVED_IDS = void 0;
4
5
  exports.getSyncBaseUri = getSyncBaseUri;
5
6
  exports.getAuthBaseUri = getAuthBaseUri;
6
7
  exports.getWorkspaceInvitationAcceptEndpoint = getWorkspaceInvitationAcceptEndpoint;
7
8
  exports.getWorkspaceInvitationRejectEndpoint = getWorkspaceInvitationRejectEndpoint;
9
+ exports.getProjectInsightsActivityStatsEndpoint = getProjectInsightsActivityStatsEndpoint;
10
+ exports.getProjectInsightsHealthEndpoint = getProjectInsightsHealthEndpoint;
11
+ exports.getProjectInsightsHealthContextEndpoint = getProjectInsightsHealthContextEndpoint;
12
+ exports.getProjectInsightsProgressEndpoint = getProjectInsightsProgressEndpoint;
13
+ exports.getProjectInsightsHealthAnalyzeEndpoint = getProjectInsightsHealthAnalyzeEndpoint;
14
+ exports.getWorkspaceInsightsEndpoint = getWorkspaceInsightsEndpoint;
15
+ exports.getWorkspaceUserTasksEndpoint = getWorkspaceUserTasksEndpoint;
16
+ exports.getWorkspaceInviteUsersEndpoint = getWorkspaceInviteUsersEndpoint;
17
+ exports.getWorkspaceUserEndpoint = getWorkspaceUserEndpoint;
8
18
  exports.getWorkspaceActiveProjectsEndpoint = getWorkspaceActiveProjectsEndpoint;
9
19
  exports.getWorkspaceArchivedProjectsEndpoint = getWorkspaceArchivedProjectsEndpoint;
10
20
  const BASE_URI = 'https://api.todoist.com';
@@ -34,6 +44,8 @@ exports.ENDPOINT_REST_LABELS_SHARED = exports.ENDPOINT_REST_LABELS + '/shared';
34
44
  exports.ENDPOINT_REST_LABELS_SHARED_RENAME = exports.ENDPOINT_REST_LABELS_SHARED + '/rename';
35
45
  exports.ENDPOINT_REST_LABELS_SHARED_REMOVE = exports.ENDPOINT_REST_LABELS_SHARED + '/remove';
36
46
  exports.ENDPOINT_REST_COMMENTS = 'comments';
47
+ exports.ENDPOINT_REST_REMINDERS = 'reminders';
48
+ exports.ENDPOINT_REST_LOCATION_REMINDERS = 'location_reminders';
37
49
  exports.ENDPOINT_REST_TASK_CLOSE = 'close';
38
50
  exports.ENDPOINT_REST_TASK_REOPEN = 'reopen';
39
51
  exports.ENDPOINT_REST_TASK_MOVE = 'move';
@@ -47,14 +59,33 @@ exports.ENDPOINT_REST_ACTIVITIES = 'activities';
47
59
  exports.ENDPOINT_REST_UPLOADS = 'uploads';
48
60
  exports.PROJECT_ARCHIVE = 'archive';
49
61
  exports.PROJECT_UNARCHIVE = 'unarchive';
62
+ exports.ENDPOINT_REST_PROJECTS_ARCHIVED_COUNT = exports.ENDPOINT_REST_PROJECTS + '/archived/count';
63
+ exports.ENDPOINT_REST_PROJECTS_PERMISSIONS = exports.ENDPOINT_REST_PROJECTS + '/permissions';
64
+ exports.ENDPOINT_REST_PROJECT_FULL = 'full';
65
+ exports.ENDPOINT_REST_PROJECT_JOIN = 'join';
66
+ exports.SECTION_ARCHIVE = 'archive';
67
+ exports.SECTION_UNARCHIVE = 'unarchive';
50
68
  exports.ENDPOINT_REST_PROJECTS_MOVE_TO_WORKSPACE = exports.ENDPOINT_REST_PROJECTS + '/move_to_workspace';
51
69
  exports.ENDPOINT_REST_PROJECTS_MOVE_TO_PERSONAL = exports.ENDPOINT_REST_PROJECTS + '/move_to_personal';
70
+ exports.ENDPOINT_REST_TASKS_COMPLETED = exports.ENDPOINT_REST_TASKS + '/completed';
71
+ exports.ENDPOINT_REST_TEMPLATES_FILE = 'templates/file';
72
+ exports.ENDPOINT_REST_TEMPLATES_URL = 'templates/url';
73
+ exports.ENDPOINT_REST_TEMPLATES_CREATE_FROM_FILE = 'templates/create_project_from_file';
74
+ exports.ENDPOINT_REST_TEMPLATES_IMPORT_FROM_FILE = 'templates/import_into_project_from_file';
75
+ exports.ENDPOINT_REST_TEMPLATES_IMPORT_FROM_ID = 'templates/import_into_project_from_template_id';
76
+ exports.ENDPOINT_REST_ACCESS_TOKENS_MIGRATE = 'access_tokens/migrate_personal_token';
77
+ exports.ENDPOINT_REST_BACKUPS = 'backups';
78
+ exports.ENDPOINT_REST_BACKUPS_DOWNLOAD = 'backups/download';
79
+ exports.ENDPOINT_REST_EMAILS = 'emails';
80
+ exports.ENDPOINT_REST_ID_MAPPINGS = 'id_mappings';
81
+ exports.ENDPOINT_REST_MOVED_IDS = 'moved_ids';
52
82
  exports.ENDPOINT_SYNC_QUICK_ADD = exports.ENDPOINT_REST_TASKS + '/quick';
53
83
  exports.ENDPOINT_SYNC = 'sync';
54
84
  exports.ENDPOINT_AUTHORIZATION = 'authorize';
55
85
  exports.ENDPOINT_GET_TOKEN = 'access_token';
56
86
  exports.ENDPOINT_REVOKE = 'revoke';
57
87
  // Workspace endpoints
88
+ exports.ENDPOINT_REST_WORKSPACES = 'workspaces';
58
89
  exports.ENDPOINT_WORKSPACE_INVITATIONS = 'workspaces/invitations';
59
90
  exports.ENDPOINT_WORKSPACE_INVITATIONS_ALL = 'workspaces/invitations/all';
60
91
  exports.ENDPOINT_WORKSPACE_INVITATIONS_DELETE = 'workspaces/invitations/delete';
@@ -69,6 +100,37 @@ function getWorkspaceInvitationAcceptEndpoint(inviteCode) {
69
100
  function getWorkspaceInvitationRejectEndpoint(inviteCode) {
70
101
  return `workspaces/invitations/${inviteCode}/reject`;
71
102
  }
103
+ // Insights endpoints
104
+ function getProjectInsightsActivityStatsEndpoint(projectId) {
105
+ return `projects/${projectId}/insights/activity_stats`;
106
+ }
107
+ function getProjectInsightsHealthEndpoint(projectId) {
108
+ return `projects/${projectId}/insights/health`;
109
+ }
110
+ function getProjectInsightsHealthContextEndpoint(projectId) {
111
+ return `projects/${projectId}/insights/health/context`;
112
+ }
113
+ function getProjectInsightsProgressEndpoint(projectId) {
114
+ return `projects/${projectId}/insights/progress`;
115
+ }
116
+ function getProjectInsightsHealthAnalyzeEndpoint(projectId) {
117
+ return `projects/${projectId}/insights/health/analyze`;
118
+ }
119
+ function getWorkspaceInsightsEndpoint(workspaceId) {
120
+ return `workspaces/${workspaceId}/insights`;
121
+ }
122
+ // Workspace members
123
+ exports.ENDPOINT_WORKSPACE_MEMBERS = 'workspaces/members';
124
+ // Workspace user management (require workspace_id and/or user_id parameters)
125
+ function getWorkspaceUserTasksEndpoint(workspaceId, userId) {
126
+ return `workspaces/${workspaceId}/users/${userId}/tasks`;
127
+ }
128
+ function getWorkspaceInviteUsersEndpoint(workspaceId) {
129
+ return `workspaces/${workspaceId}/users/invite`;
130
+ }
131
+ function getWorkspaceUserEndpoint(workspaceId, userId) {
132
+ return `workspaces/${workspaceId}/users/${userId}`;
133
+ }
72
134
  // Workspace projects (require workspace_id parameter)
73
135
  function getWorkspaceActiveProjectsEndpoint(workspaceId) {
74
136
  return `workspaces/${workspaceId}/projects/active`;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.COMMENT_WITH_OPTIONALS_AS_NULL_PROJECT = exports.RAW_COMMENT_WITH_OPTIONALS_AS_NULL_PROJECT = exports.COMMENT_WITH_ATTACHMENT_WITH_OPTIONALS_AS_NULL = exports.RAW_COMMENT_WITH_ATTACHMENT_WITH_OPTIONALS_AS_NULL = exports.COMMENT_WITH_OPTIONALS_AS_NULL_TASK = exports.RAW_COMMENT_WITH_OPTIONALS_AS_NULL_TASK = exports.INVALID_COMMENT = exports.DEFAULT_COMMENT = exports.DEFAULT_RAW_COMMENT = exports.INVALID_ATTACHMENT = exports.DEFAULT_ATTACHMENT = exports.INVALID_USER = exports.DEFAULT_USER = exports.INVALID_LABEL = exports.DEFAULT_LABEL = exports.INVALID_SECTION = exports.DEFAULT_SECTION = exports.PROJECT_WITH_OPTIONALS_AS_NULL = exports.INVALID_PROJECT = exports.DEFAULT_PROJECT = exports.TASK_WITH_OPTIONALS_AS_NULL = exports.INVALID_TASK = exports.DEFAULT_TASK = exports.DEFAULT_DEADLINE = exports.DEFAULT_DURATION = exports.DEFAULT_DUE_DATE = exports.INVALID_ENTITY_ID = exports.DEFAULT_REQUEST_ID = exports.DEFAULT_AUTH_TOKEN = exports.DEFAULT_PROJECT_VIEW_STYLE = exports.DEFAULT_PROJECT_NAME = exports.DEFAULT_PROJECT_ID = exports.DEFAULT_ORDER = exports.DEFAULT_TASK_PRIORITY = exports.DEFAULT_TASK_DESCRIPTION = exports.DEFAULT_TASK_CONTENT = exports.DEFAULT_TASK_ID = void 0;
3
+ exports.COMMENT_WITH_OPTIONALS_AS_NULL_PROJECT = exports.RAW_COMMENT_WITH_OPTIONALS_AS_NULL_PROJECT = exports.COMMENT_WITH_ATTACHMENT_WITH_OPTIONALS_AS_NULL = exports.RAW_COMMENT_WITH_ATTACHMENT_WITH_OPTIONALS_AS_NULL = exports.COMMENT_WITH_OPTIONALS_AS_NULL_TASK = exports.RAW_COMMENT_WITH_OPTIONALS_AS_NULL_TASK = exports.INVALID_COMMENT = exports.DEFAULT_LOCATION_REMINDER = exports.DEFAULT_ABSOLUTE_REMINDER = exports.DEFAULT_RELATIVE_REMINDER = exports.DEFAULT_REMINDER_ID = exports.DEFAULT_COMMENT = exports.DEFAULT_RAW_COMMENT = exports.INVALID_ATTACHMENT = exports.DEFAULT_ATTACHMENT = exports.INVALID_USER = exports.DEFAULT_USER = exports.INVALID_LABEL = exports.DEFAULT_LABEL = exports.INVALID_SECTION = exports.DEFAULT_SECTION = exports.PROJECT_WITH_OPTIONALS_AS_NULL = exports.INVALID_PROJECT = exports.DEFAULT_PROJECT = exports.TASK_WITH_OPTIONALS_AS_NULL = exports.INVALID_TASK = exports.DEFAULT_TASK = exports.DEFAULT_DEADLINE = exports.DEFAULT_DURATION = exports.DEFAULT_DUE_DATE = exports.INVALID_ENTITY_ID = exports.DEFAULT_REQUEST_ID = exports.DEFAULT_AUTH_TOKEN = exports.DEFAULT_PROJECT_VIEW_STYLE = exports.DEFAULT_PROJECT_NAME = exports.DEFAULT_PROJECT_ID = exports.DEFAULT_ORDER = exports.DEFAULT_TASK_PRIORITY = exports.DEFAULT_TASK_DESCRIPTION = exports.DEFAULT_TASK_CONTENT = exports.DEFAULT_TASK_ID = void 0;
4
4
  const url_helpers_1 = require("../utils/url-helpers");
5
5
  exports.DEFAULT_TASK_ID = '1234';
6
6
  exports.DEFAULT_TASK_CONTENT = 'This is a task';
@@ -179,6 +179,38 @@ exports.DEFAULT_RAW_COMMENT = {
179
179
  itemId: exports.DEFAULT_TASK_ID,
180
180
  };
181
181
  exports.DEFAULT_COMMENT = Object.assign(Object.assign({}, exports.DEFAULT_RAW_COMMENT), { taskId: exports.DEFAULT_RAW_COMMENT.itemId, itemId: undefined });
182
+ exports.DEFAULT_REMINDER_ID = '6XGgmFQrx44wfGHr';
183
+ exports.DEFAULT_RELATIVE_REMINDER = {
184
+ id: exports.DEFAULT_REMINDER_ID,
185
+ itemId: exports.DEFAULT_TASK_ID,
186
+ notifyUid: DEFAULT_USER_ID,
187
+ isDeleted: false,
188
+ type: 'relative',
189
+ minuteOffset: 30,
190
+ due: exports.DEFAULT_DUE_DATE,
191
+ isUrgent: false,
192
+ };
193
+ exports.DEFAULT_ABSOLUTE_REMINDER = {
194
+ id: exports.DEFAULT_REMINDER_ID,
195
+ itemId: exports.DEFAULT_TASK_ID,
196
+ notifyUid: DEFAULT_USER_ID,
197
+ isDeleted: false,
198
+ type: 'absolute',
199
+ due: exports.DEFAULT_DUE_DATE,
200
+ isUrgent: true,
201
+ };
202
+ exports.DEFAULT_LOCATION_REMINDER = {
203
+ id: exports.DEFAULT_REMINDER_ID,
204
+ itemId: exports.DEFAULT_TASK_ID,
205
+ notifyUid: DEFAULT_USER_ID,
206
+ isDeleted: false,
207
+ type: 'location',
208
+ name: 'Aliados',
209
+ locLat: '41.148581',
210
+ locLong: '-8.610945000000015',
211
+ locTrigger: 'on_enter',
212
+ radius: 100,
213
+ };
182
214
  exports.INVALID_COMMENT = Object.assign(Object.assign({}, exports.DEFAULT_RAW_COMMENT), { isDeleted: 'true' });
183
215
  exports.RAW_COMMENT_WITH_OPTIONALS_AS_NULL_TASK = Object.assign(Object.assign({}, exports.DEFAULT_RAW_COMMENT), { fileAttachment: null, uidsToNotify: null, reactions: null });
184
216
  exports.COMMENT_WITH_OPTIONALS_AS_NULL_TASK = Object.assign(Object.assign({}, exports.RAW_COMMENT_WITH_OPTIONALS_AS_NULL_TASK), { taskId: exports.RAW_COMMENT_WITH_OPTIONALS_AS_NULL_TASK.itemId, itemId: undefined });