@doist/todoist-api-typescript 7.9.0 → 7.9.1

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.
@@ -1,2 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StringOrNumberSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * Zod schema that accepts both string and number values and coerces to string.
7
+ * The REST API returns numeric IDs while the Sync API returns string IDs.
8
+ */
9
+ const StringOrNumberSchema = zod_1.z.union([zod_1.z.string(), zod_1.z.number()]).transform((val) => String(val));
10
+ exports.StringOrNumberSchema = StringOrNumberSchema;
@@ -1,7 +1,19 @@
1
1
  "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
2
13
  Object.defineProperty(exports, "__esModule", { value: true });
3
14
  exports.SyncWorkspaceSchema = void 0;
4
15
  const zod_1 = require("zod");
16
+ const common_1 = require("../../common");
5
17
  const types_1 = require("../../workspaces/types");
6
18
  /**
7
19
  * Sync API workspace resource.
@@ -12,20 +24,21 @@ const types_1 = require("../../workspaces/types");
12
24
  */
13
25
  exports.SyncWorkspaceSchema = zod_1.z
14
26
  .object({
15
- id: zod_1.z.string(),
27
+ id: common_1.StringOrNumberSchema,
16
28
  name: zod_1.z.string(),
17
29
  description: zod_1.z.string(),
18
30
  logoBig: zod_1.z.string().optional(),
19
31
  logoMedium: zod_1.z.string().optional(),
20
32
  logoSmall: zod_1.z.string().optional(),
21
33
  logoS640: zod_1.z.string().optional(),
22
- creatorId: zod_1.z.string(),
23
- createdAt: zod_1.z.string(),
34
+ creatorId: common_1.StringOrNumberSchema,
35
+ createdAt: zod_1.z.string().optional(),
36
+ dateCreated: zod_1.z.string().optional(),
24
37
  isDeleted: zod_1.z.boolean(),
25
38
  isCollapsed: zod_1.z.boolean(),
26
- role: types_1.WorkspaceRoleSchema,
39
+ role: types_1.WorkspaceRoleSchema.optional(),
27
40
  plan: types_1.WorkspacePlanSchema,
28
- limits: types_1.WorkspaceLimitsSchema,
41
+ limits: types_1.WorkspaceLimitsSchema.optional(),
29
42
  inviteCode: zod_1.z.string().nullable().optional(),
30
43
  isLinkSharingEnabled: zod_1.z.boolean().nullable().optional(),
31
44
  isGuestAllowed: zod_1.z.boolean().nullable().optional(),
@@ -53,4 +66,8 @@ exports.SyncWorkspaceSchema = zod_1.z
53
66
  .optional(),
54
67
  properties: types_1.WorkspacePropertiesSchema.optional(),
55
68
  })
56
- .passthrough();
69
+ .passthrough()
70
+ .transform((_a) => {
71
+ var { dateCreated, createdAt } = _a, rest = __rest(_a, ["dateCreated", "createdAt"]);
72
+ return (Object.assign(Object.assign({}, rest), { createdAt: createdAt !== null && createdAt !== void 0 ? createdAt : dateCreated }));
73
+ });
@@ -1,7 +1,19 @@
1
1
  "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
2
13
  Object.defineProperty(exports, "__esModule", { value: true });
3
14
  exports.WorkspaceUserTaskSchema = exports.MemberActivityInfoSchema = exports.WorkspaceSchema = exports.WorkspacePropertiesSchema = exports.WorkspaceLimitsSchema = exports.WorkspacePlanSchema = exports.WORKSPACE_PLANS = exports.JoinWorkspaceResultSchema = exports.WorkspacePlanDetailsSchema = exports.WORKSPACE_PLAN_STATUSES = exports.WORKSPACE_CURRENT_PLANS = exports.FormattedPriceListingSchema = exports.PlanPriceSchema = exports.WorkspaceInvitationSchema = exports.WorkspaceUserSchema = exports.WorkspaceRoleSchema = exports.WORKSPACE_ROLES = exports.COLLABORATOR_ROLES = void 0;
4
15
  const zod_1 = require("zod");
16
+ const common_1 = require("../common");
5
17
  const types_1 = require("../tasks/types");
6
18
  /** Available project collaborator roles. */
7
19
  exports.COLLABORATOR_ROLES = [
@@ -99,22 +111,28 @@ exports.WorkspacePropertiesSchema = zod_1.z.record(zod_1.z.string(), zod_1.z.unk
99
111
  /**
100
112
  * Represents a workspace in Todoist.
101
113
  */
102
- exports.WorkspaceSchema = zod_1.z.object({
103
- id: zod_1.z.string(),
114
+ exports.WorkspaceSchema = zod_1.z
115
+ .object({
116
+ id: common_1.StringOrNumberSchema,
104
117
  name: zod_1.z.string(),
105
118
  plan: exports.WorkspacePlanSchema,
106
- role: exports.WorkspaceRoleSchema,
119
+ role: exports.WorkspaceRoleSchema.optional(),
107
120
  inviteCode: zod_1.z.string(),
108
121
  isLinkSharingEnabled: zod_1.z.boolean(),
109
122
  isGuestAllowed: zod_1.z.boolean(),
110
- limits: exports.WorkspaceLimitsSchema,
123
+ limits: exports.WorkspaceLimitsSchema.optional(),
111
124
  logoBig: zod_1.z.string().nullish(),
112
125
  logoMedium: zod_1.z.string().nullish(),
113
126
  logoSmall: zod_1.z.string().nullish(),
114
127
  logoS640: zod_1.z.string().nullish(),
115
- createdAt: zod_1.z.string(),
116
- creatorId: zod_1.z.string(),
128
+ createdAt: zod_1.z.string().optional(),
129
+ dateCreated: zod_1.z.string().optional(),
130
+ creatorId: common_1.StringOrNumberSchema,
117
131
  properties: exports.WorkspacePropertiesSchema,
132
+ })
133
+ .transform((_a) => {
134
+ var { dateCreated, createdAt } = _a, rest = __rest(_a, ["dateCreated", "createdAt"]);
135
+ return (Object.assign(Object.assign({}, rest), { createdAt: createdAt !== null && createdAt !== void 0 ? createdAt : dateCreated }));
118
136
  });
119
137
  exports.MemberActivityInfoSchema = zod_1.z.object({
120
138
  userId: zod_1.z.string(),
@@ -1 +1,7 @@
1
- export {};
1
+ import { z } from 'zod';
2
+ /**
3
+ * Zod schema that accepts both string and number values and coerces to string.
4
+ * The REST API returns numeric IDs while the Sync API returns string IDs.
5
+ */
6
+ const StringOrNumberSchema = z.union([z.string(), z.number()]).transform((val) => String(val));
7
+ export { StringOrNumberSchema };
@@ -1,4 +1,16 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
1
12
  import { z } from 'zod';
13
+ import { StringOrNumberSchema } from '../../common.js';
2
14
  import { WorkspaceRoleSchema, WorkspacePlanSchema, WorkspaceLimitsSchema, WorkspacePropertiesSchema, } from '../../workspaces/types.js';
3
15
  /**
4
16
  * Sync API workspace resource.
@@ -9,20 +21,21 @@ import { WorkspaceRoleSchema, WorkspacePlanSchema, WorkspaceLimitsSchema, Worksp
9
21
  */
10
22
  export const SyncWorkspaceSchema = z
11
23
  .object({
12
- id: z.string(),
24
+ id: StringOrNumberSchema,
13
25
  name: z.string(),
14
26
  description: z.string(),
15
27
  logoBig: z.string().optional(),
16
28
  logoMedium: z.string().optional(),
17
29
  logoSmall: z.string().optional(),
18
30
  logoS640: z.string().optional(),
19
- creatorId: z.string(),
20
- createdAt: z.string(),
31
+ creatorId: StringOrNumberSchema,
32
+ createdAt: z.string().optional(),
33
+ dateCreated: z.string().optional(),
21
34
  isDeleted: z.boolean(),
22
35
  isCollapsed: z.boolean(),
23
- role: WorkspaceRoleSchema,
36
+ role: WorkspaceRoleSchema.optional(),
24
37
  plan: WorkspacePlanSchema,
25
- limits: WorkspaceLimitsSchema,
38
+ limits: WorkspaceLimitsSchema.optional(),
26
39
  inviteCode: z.string().nullable().optional(),
27
40
  isLinkSharingEnabled: z.boolean().nullable().optional(),
28
41
  isGuestAllowed: z.boolean().nullable().optional(),
@@ -50,4 +63,8 @@ export const SyncWorkspaceSchema = z
50
63
  .optional(),
51
64
  properties: WorkspacePropertiesSchema.optional(),
52
65
  })
53
- .passthrough();
66
+ .passthrough()
67
+ .transform((_a) => {
68
+ var { dateCreated, createdAt } = _a, rest = __rest(_a, ["dateCreated", "createdAt"]);
69
+ return (Object.assign(Object.assign({}, rest), { createdAt: createdAt !== null && createdAt !== void 0 ? createdAt : dateCreated }));
70
+ });
@@ -1,4 +1,16 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
1
12
  import { z } from 'zod';
13
+ import { StringOrNumberSchema } from '../common.js';
2
14
  import { DueDateSchema, DeadlineSchema } from '../tasks/types.js';
3
15
  /** Available project collaborator roles. */
4
16
  export const COLLABORATOR_ROLES = [
@@ -96,22 +108,28 @@ export const WorkspacePropertiesSchema = z.record(z.string(), z.unknown());
96
108
  /**
97
109
  * Represents a workspace in Todoist.
98
110
  */
99
- export const WorkspaceSchema = z.object({
100
- id: z.string(),
111
+ export const WorkspaceSchema = z
112
+ .object({
113
+ id: StringOrNumberSchema,
101
114
  name: z.string(),
102
115
  plan: WorkspacePlanSchema,
103
- role: WorkspaceRoleSchema,
116
+ role: WorkspaceRoleSchema.optional(),
104
117
  inviteCode: z.string(),
105
118
  isLinkSharingEnabled: z.boolean(),
106
119
  isGuestAllowed: z.boolean(),
107
- limits: WorkspaceLimitsSchema,
120
+ limits: WorkspaceLimitsSchema.optional(),
108
121
  logoBig: z.string().nullish(),
109
122
  logoMedium: z.string().nullish(),
110
123
  logoSmall: z.string().nullish(),
111
124
  logoS640: z.string().nullish(),
112
- createdAt: z.string(),
113
- creatorId: z.string(),
125
+ createdAt: z.string().optional(),
126
+ dateCreated: z.string().optional(),
127
+ creatorId: StringOrNumberSchema,
114
128
  properties: WorkspacePropertiesSchema,
129
+ })
130
+ .transform((_a) => {
131
+ var { dateCreated, createdAt } = _a, rest = __rest(_a, ["dateCreated", "createdAt"]);
132
+ return (Object.assign(Object.assign({}, rest), { createdAt: createdAt !== null && createdAt !== void 0 ? createdAt : dateCreated }));
115
133
  });
116
134
  export const MemberActivityInfoSchema = z.object({
117
135
  userId: z.string(),
@@ -1,6 +1,13 @@
1
+ import { z } from 'zod';
1
2
  type SearchArgs = {
2
3
  query: string;
3
4
  cursor?: string | null;
4
5
  limit?: number;
5
6
  };
7
+ /**
8
+ * Zod schema that accepts both string and number values and coerces to string.
9
+ * The REST API returns numeric IDs while the Sync API returns string IDs.
10
+ */
11
+ declare const StringOrNumberSchema: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
12
+ export { StringOrNumberSchema };
6
13
  export type { SearchArgs };
@@ -6,31 +6,32 @@ import { z } from 'zod';
6
6
  * additional fields like description, isDeleted, isCollapsed, member counts,
7
7
  * domain settings, and sorting preferences.
8
8
  */
9
- export declare const SyncWorkspaceSchema: z.ZodObject<{
10
- id: z.ZodString;
9
+ export declare const SyncWorkspaceSchema: z.ZodPipe<z.ZodObject<{
10
+ id: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
11
11
  name: z.ZodString;
12
12
  description: z.ZodString;
13
13
  logoBig: z.ZodOptional<z.ZodString>;
14
14
  logoMedium: z.ZodOptional<z.ZodString>;
15
15
  logoSmall: z.ZodOptional<z.ZodString>;
16
16
  logoS640: z.ZodOptional<z.ZodString>;
17
- creatorId: z.ZodString;
18
- createdAt: z.ZodString;
17
+ creatorId: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
18
+ createdAt: z.ZodOptional<z.ZodString>;
19
+ dateCreated: z.ZodOptional<z.ZodString>;
19
20
  isDeleted: z.ZodBoolean;
20
21
  isCollapsed: z.ZodBoolean;
21
- role: z.ZodEnum<{
22
+ role: z.ZodOptional<z.ZodEnum<{
22
23
  ADMIN: "ADMIN";
23
24
  MEMBER: "MEMBER";
24
25
  GUEST: "GUEST";
25
- }>;
26
+ }>>;
26
27
  plan: z.ZodEnum<{
27
28
  STARTER: "STARTER";
28
29
  BUSINESS: "BUSINESS";
29
30
  }>;
30
- limits: z.ZodObject<{
31
+ limits: z.ZodOptional<z.ZodObject<{
31
32
  current: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>;
32
33
  next: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>;
33
- }, z.core.$catchall<z.ZodAny>>;
34
+ }, z.core.$catchall<z.ZodAny>>>;
34
35
  inviteCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
35
36
  isLinkSharingEnabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
36
37
  isGuestAllowed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
@@ -53,5 +54,89 @@ export declare const SyncWorkspaceSchema: z.ZodObject<{
53
54
  userIds: z.ZodArray<z.ZodNumber>;
54
55
  }, z.core.$strip>>;
55
56
  properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
56
- }, z.core.$loose>;
57
+ }, z.core.$loose>, z.ZodTransform<{
58
+ createdAt: string | undefined;
59
+ id: string;
60
+ name: string;
61
+ description: string;
62
+ creatorId: string;
63
+ isDeleted: boolean;
64
+ isCollapsed: boolean;
65
+ plan: "STARTER" | "BUSINESS";
66
+ currentActiveProjects: number | null;
67
+ currentMemberCount: number | null;
68
+ currentTemplateCount: number | null;
69
+ adminSortingApplied: boolean;
70
+ logoBig?: string | undefined;
71
+ logoMedium?: string | undefined;
72
+ logoSmall?: string | undefined;
73
+ logoS640?: string | undefined;
74
+ role?: "ADMIN" | "MEMBER" | "GUEST" | undefined;
75
+ limits?: {
76
+ [x: string]: any;
77
+ current: Record<string, any> | null;
78
+ next: Record<string, any> | null;
79
+ } | undefined;
80
+ inviteCode?: string | null | undefined;
81
+ isLinkSharingEnabled?: boolean | null | undefined;
82
+ isGuestAllowed?: boolean | null | undefined;
83
+ memberCountByType?: {
84
+ adminCount: number;
85
+ guestCount: number;
86
+ memberCount: number;
87
+ } | undefined;
88
+ pendingInvitations?: string[] | null | undefined;
89
+ domainName?: string | undefined;
90
+ domainDiscovery?: boolean | undefined;
91
+ restrictEmailDomains?: boolean | undefined;
92
+ projectSortPreference?: string | undefined;
93
+ defaultCollaborators?: {
94
+ predefinedGroupIds: string[];
95
+ userIds: number[];
96
+ } | undefined;
97
+ properties?: Record<string, unknown> | undefined;
98
+ }, {
99
+ [x: string]: unknown;
100
+ id: string;
101
+ name: string;
102
+ description: string;
103
+ creatorId: string;
104
+ isDeleted: boolean;
105
+ isCollapsed: boolean;
106
+ plan: "STARTER" | "BUSINESS";
107
+ currentActiveProjects: number | null;
108
+ currentMemberCount: number | null;
109
+ currentTemplateCount: number | null;
110
+ adminSortingApplied: boolean;
111
+ logoBig?: string | undefined;
112
+ logoMedium?: string | undefined;
113
+ logoSmall?: string | undefined;
114
+ logoS640?: string | undefined;
115
+ createdAt?: string | undefined;
116
+ dateCreated?: string | undefined;
117
+ role?: "ADMIN" | "MEMBER" | "GUEST" | undefined;
118
+ limits?: {
119
+ [x: string]: any;
120
+ current: Record<string, any> | null;
121
+ next: Record<string, any> | null;
122
+ } | undefined;
123
+ inviteCode?: string | null | undefined;
124
+ isLinkSharingEnabled?: boolean | null | undefined;
125
+ isGuestAllowed?: boolean | null | undefined;
126
+ memberCountByType?: {
127
+ adminCount: number;
128
+ guestCount: number;
129
+ memberCount: number;
130
+ } | undefined;
131
+ pendingInvitations?: string[] | null | undefined;
132
+ domainName?: string | undefined;
133
+ domainDiscovery?: boolean | undefined;
134
+ restrictEmailDomains?: boolean | undefined;
135
+ projectSortPreference?: string | undefined;
136
+ defaultCollaborators?: {
137
+ predefinedGroupIds: string[];
138
+ userIds: number[];
139
+ } | undefined;
140
+ properties?: Record<string, unknown> | undefined;
141
+ }>>;
57
142
  export type SyncWorkspace = z.infer<typeof SyncWorkspaceSchema>;
@@ -158,33 +158,75 @@ export type WorkspaceProperties = z.infer<typeof WorkspacePropertiesSchema>;
158
158
  /**
159
159
  * Represents a workspace in Todoist.
160
160
  */
161
- export declare const WorkspaceSchema: z.ZodObject<{
162
- id: z.ZodString;
161
+ export declare const WorkspaceSchema: z.ZodPipe<z.ZodObject<{
162
+ id: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
163
163
  name: z.ZodString;
164
164
  plan: z.ZodEnum<{
165
165
  STARTER: "STARTER";
166
166
  BUSINESS: "BUSINESS";
167
167
  }>;
168
- role: z.ZodEnum<{
168
+ role: z.ZodOptional<z.ZodEnum<{
169
169
  ADMIN: "ADMIN";
170
170
  MEMBER: "MEMBER";
171
171
  GUEST: "GUEST";
172
- }>;
172
+ }>>;
173
173
  inviteCode: z.ZodString;
174
174
  isLinkSharingEnabled: z.ZodBoolean;
175
175
  isGuestAllowed: z.ZodBoolean;
176
- limits: z.ZodObject<{
176
+ limits: z.ZodOptional<z.ZodObject<{
177
177
  current: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>;
178
178
  next: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>;
179
- }, z.core.$catchall<z.ZodAny>>;
179
+ }, z.core.$catchall<z.ZodAny>>>;
180
180
  logoBig: z.ZodOptional<z.ZodNullable<z.ZodString>>;
181
181
  logoMedium: z.ZodOptional<z.ZodNullable<z.ZodString>>;
182
182
  logoSmall: z.ZodOptional<z.ZodNullable<z.ZodString>>;
183
183
  logoS640: z.ZodOptional<z.ZodNullable<z.ZodString>>;
184
- createdAt: z.ZodString;
185
- creatorId: z.ZodString;
184
+ createdAt: z.ZodOptional<z.ZodString>;
185
+ dateCreated: z.ZodOptional<z.ZodString>;
186
+ creatorId: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
186
187
  properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
187
- }, z.core.$strip>;
188
+ }, z.core.$strip>, z.ZodTransform<{
189
+ createdAt: string | undefined;
190
+ id: string;
191
+ name: string;
192
+ plan: "STARTER" | "BUSINESS";
193
+ inviteCode: string;
194
+ isLinkSharingEnabled: boolean;
195
+ isGuestAllowed: boolean;
196
+ creatorId: string;
197
+ properties: Record<string, unknown>;
198
+ role?: "ADMIN" | "MEMBER" | "GUEST" | undefined;
199
+ limits?: {
200
+ [x: string]: any;
201
+ current: Record<string, any> | null;
202
+ next: Record<string, any> | null;
203
+ } | undefined;
204
+ logoBig?: string | null | undefined;
205
+ logoMedium?: string | null | undefined;
206
+ logoSmall?: string | null | undefined;
207
+ logoS640?: string | null | undefined;
208
+ }, {
209
+ id: string;
210
+ name: string;
211
+ plan: "STARTER" | "BUSINESS";
212
+ inviteCode: string;
213
+ isLinkSharingEnabled: boolean;
214
+ isGuestAllowed: boolean;
215
+ creatorId: string;
216
+ properties: Record<string, unknown>;
217
+ role?: "ADMIN" | "MEMBER" | "GUEST" | undefined;
218
+ limits?: {
219
+ [x: string]: any;
220
+ current: Record<string, any> | null;
221
+ next: Record<string, any> | null;
222
+ } | undefined;
223
+ logoBig?: string | null | undefined;
224
+ logoMedium?: string | null | undefined;
225
+ logoSmall?: string | null | undefined;
226
+ logoS640?: string | null | undefined;
227
+ createdAt?: string | undefined;
228
+ dateCreated?: string | undefined;
229
+ }>>;
188
230
  export type Workspace = z.infer<typeof WorkspaceSchema>;
189
231
  export declare const MemberActivityInfoSchema: z.ZodObject<{
190
232
  userId: z.ZodString;
@@ -409,42 +409,42 @@ export declare const validateJoinWorkspaceResult: (input: unknown) => {
409
409
  workspaceId: string;
410
410
  };
411
411
  export declare const validateWorkspace: (input: unknown) => {
412
+ createdAt: string | undefined;
412
413
  id: string;
413
414
  name: string;
414
415
  plan: "STARTER" | "BUSINESS";
415
- role: "ADMIN" | "MEMBER" | "GUEST";
416
416
  inviteCode: string;
417
417
  isLinkSharingEnabled: boolean;
418
418
  isGuestAllowed: boolean;
419
- limits: {
419
+ creatorId: string;
420
+ properties: Record<string, unknown>;
421
+ role?: "ADMIN" | "MEMBER" | "GUEST" | undefined;
422
+ limits?: {
420
423
  [x: string]: any;
421
424
  current: Record<string, any> | null;
422
425
  next: Record<string, any> | null;
423
- };
424
- createdAt: string;
425
- creatorId: string;
426
- properties: Record<string, unknown>;
426
+ } | undefined;
427
427
  logoBig?: string | null | undefined;
428
428
  logoMedium?: string | null | undefined;
429
429
  logoSmall?: string | null | undefined;
430
430
  logoS640?: string | null | undefined;
431
431
  };
432
432
  export declare const validateWorkspaceArray: (input: unknown[]) => {
433
+ createdAt: string | undefined;
433
434
  id: string;
434
435
  name: string;
435
436
  plan: "STARTER" | "BUSINESS";
436
- role: "ADMIN" | "MEMBER" | "GUEST";
437
437
  inviteCode: string;
438
438
  isLinkSharingEnabled: boolean;
439
439
  isGuestAllowed: boolean;
440
- limits: {
440
+ creatorId: string;
441
+ properties: Record<string, unknown>;
442
+ role?: "ADMIN" | "MEMBER" | "GUEST" | undefined;
443
+ limits?: {
441
444
  [x: string]: any;
442
445
  current: Record<string, any> | null;
443
446
  next: Record<string, any> | null;
444
- };
445
- createdAt: string;
446
- creatorId: string;
447
- properties: Record<string, unknown>;
447
+ } | undefined;
448
448
  logoBig?: string | null | undefined;
449
449
  logoMedium?: string | null | undefined;
450
450
  logoSmall?: string | null | undefined;
@@ -1137,21 +1137,14 @@ export declare const validateLiveNotificationArray: (input: unknown[]) => {
1137
1137
  invitationSecret?: string | undefined;
1138
1138
  }[];
1139
1139
  export declare const validateSyncWorkspace: (input: unknown) => {
1140
- [x: string]: unknown;
1140
+ createdAt: string | undefined;
1141
1141
  id: string;
1142
1142
  name: string;
1143
1143
  description: string;
1144
1144
  creatorId: string;
1145
- createdAt: string;
1146
1145
  isDeleted: boolean;
1147
1146
  isCollapsed: boolean;
1148
- role: "ADMIN" | "MEMBER" | "GUEST";
1149
1147
  plan: "STARTER" | "BUSINESS";
1150
- limits: {
1151
- [x: string]: any;
1152
- current: Record<string, any> | null;
1153
- next: Record<string, any> | null;
1154
- };
1155
1148
  currentActiveProjects: number | null;
1156
1149
  currentMemberCount: number | null;
1157
1150
  currentTemplateCount: number | null;
@@ -1160,6 +1153,12 @@ export declare const validateSyncWorkspace: (input: unknown) => {
1160
1153
  logoMedium?: string | undefined;
1161
1154
  logoSmall?: string | undefined;
1162
1155
  logoS640?: string | undefined;
1156
+ role?: "ADMIN" | "MEMBER" | "GUEST" | undefined;
1157
+ limits?: {
1158
+ [x: string]: any;
1159
+ current: Record<string, any> | null;
1160
+ next: Record<string, any> | null;
1161
+ } | undefined;
1163
1162
  inviteCode?: string | null | undefined;
1164
1163
  isLinkSharingEnabled?: boolean | null | undefined;
1165
1164
  isGuestAllowed?: boolean | null | undefined;
@@ -1180,21 +1179,14 @@ export declare const validateSyncWorkspace: (input: unknown) => {
1180
1179
  properties?: Record<string, unknown> | undefined;
1181
1180
  };
1182
1181
  export declare const validateSyncWorkspaceArray: (input: unknown[]) => {
1183
- [x: string]: unknown;
1182
+ createdAt: string | undefined;
1184
1183
  id: string;
1185
1184
  name: string;
1186
1185
  description: string;
1187
1186
  creatorId: string;
1188
- createdAt: string;
1189
1187
  isDeleted: boolean;
1190
1188
  isCollapsed: boolean;
1191
- role: "ADMIN" | "MEMBER" | "GUEST";
1192
1189
  plan: "STARTER" | "BUSINESS";
1193
- limits: {
1194
- [x: string]: any;
1195
- current: Record<string, any> | null;
1196
- next: Record<string, any> | null;
1197
- };
1198
1190
  currentActiveProjects: number | null;
1199
1191
  currentMemberCount: number | null;
1200
1192
  currentTemplateCount: number | null;
@@ -1203,6 +1195,12 @@ export declare const validateSyncWorkspaceArray: (input: unknown[]) => {
1203
1195
  logoMedium?: string | undefined;
1204
1196
  logoSmall?: string | undefined;
1205
1197
  logoS640?: string | undefined;
1198
+ role?: "ADMIN" | "MEMBER" | "GUEST" | undefined;
1199
+ limits?: {
1200
+ [x: string]: any;
1201
+ current: Record<string, any> | null;
1202
+ next: Record<string, any> | null;
1203
+ } | undefined;
1206
1204
  inviteCode?: string | null | undefined;
1207
1205
  isLinkSharingEnabled?: boolean | null | undefined;
1208
1206
  isGuestAllowed?: boolean | null | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doist/todoist-api-typescript",
3
- "version": "7.9.0",
3
+ "version": "7.9.1",
4
4
  "description": "A typescript wrapper for the Todoist REST API.",
5
5
  "author": "Doist developers",
6
6
  "repository": "https://github.com/Doist/todoist-api-typescript",