@doist/todoist-api-typescript 6.1.4 → 6.1.6
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.
- package/dist/cjs/rest-client.js +6 -1
- package/dist/cjs/types/entities.js +6 -0
- package/dist/esm/rest-client.js +6 -1
- package/dist/esm/types/entities.js +6 -0
- package/dist/types/authentication.d.ts +6 -3
- package/dist/types/todoist-api.d.ts +2 -1
- package/dist/types/types/entities.d.ts +6 -0
- package/package.json +5 -5
package/dist/cjs/rest-client.js
CHANGED
|
@@ -17,9 +17,14 @@ function paramsSerializer(params) {
|
|
|
17
17
|
if (Array.isArray(value)) {
|
|
18
18
|
qs.append(key, value.join(','));
|
|
19
19
|
}
|
|
20
|
-
else
|
|
20
|
+
else if (typeof value === 'string' ||
|
|
21
|
+
typeof value === 'number' ||
|
|
22
|
+
typeof value === 'boolean') {
|
|
21
23
|
qs.append(key, String(value));
|
|
22
24
|
}
|
|
25
|
+
else {
|
|
26
|
+
qs.append(key, JSON.stringify(value));
|
|
27
|
+
}
|
|
23
28
|
}
|
|
24
29
|
});
|
|
25
30
|
return qs.toString();
|
|
@@ -197,6 +197,12 @@ exports.CurrentUserSchema = zod_1.z.object({
|
|
|
197
197
|
avatarSmall: zod_1.z.string().nullish(),
|
|
198
198
|
businessAccountId: zod_1.z.string().nullable(),
|
|
199
199
|
isPremium: zod_1.z.boolean(),
|
|
200
|
+
premiumStatus: zod_1.z.enum([
|
|
201
|
+
'not_premium',
|
|
202
|
+
'current_personal_plan',
|
|
203
|
+
'legacy_personal_plan',
|
|
204
|
+
'teams_business_member',
|
|
205
|
+
]),
|
|
200
206
|
dateFormat: zod_1.z.number().int(),
|
|
201
207
|
timeFormat: zod_1.z.number().int(),
|
|
202
208
|
weeklyGoal: zod_1.z.number().int(),
|
package/dist/esm/rest-client.js
CHANGED
|
@@ -12,9 +12,14 @@ export function paramsSerializer(params) {
|
|
|
12
12
|
if (Array.isArray(value)) {
|
|
13
13
|
qs.append(key, value.join(','));
|
|
14
14
|
}
|
|
15
|
-
else
|
|
15
|
+
else if (typeof value === 'string' ||
|
|
16
|
+
typeof value === 'number' ||
|
|
17
|
+
typeof value === 'boolean') {
|
|
16
18
|
qs.append(key, String(value));
|
|
17
19
|
}
|
|
20
|
+
else {
|
|
21
|
+
qs.append(key, JSON.stringify(value));
|
|
22
|
+
}
|
|
18
23
|
}
|
|
19
24
|
});
|
|
20
25
|
return qs.toString();
|
|
@@ -194,6 +194,12 @@ export const CurrentUserSchema = z.object({
|
|
|
194
194
|
avatarSmall: z.string().nullish(),
|
|
195
195
|
businessAccountId: z.string().nullable(),
|
|
196
196
|
isPremium: z.boolean(),
|
|
197
|
+
premiumStatus: z.enum([
|
|
198
|
+
'not_premium',
|
|
199
|
+
'current_personal_plan',
|
|
200
|
+
'legacy_personal_plan',
|
|
201
|
+
'teams_business_member',
|
|
202
|
+
]),
|
|
197
203
|
dateFormat: z.number().int(),
|
|
198
204
|
timeFormat: z.number().int(),
|
|
199
205
|
weeklyGoal: z.number().int(),
|
|
@@ -100,7 +100,8 @@ export declare function getAuthorizationUrl({ clientId, permissions, state, base
|
|
|
100
100
|
/**
|
|
101
101
|
* @deprecated Use options object instead: getAuthToken(args, { baseUrl, customFetch })
|
|
102
102
|
*/
|
|
103
|
-
export declare function getAuthToken(args: AuthTokenRequestArgs, baseUrl
|
|
103
|
+
export declare function getAuthToken(args: AuthTokenRequestArgs, baseUrl: string): Promise<AuthTokenResponse>;
|
|
104
|
+
export declare function getAuthToken(args: AuthTokenRequestArgs): Promise<AuthTokenResponse>;
|
|
104
105
|
export declare function getAuthToken(args: AuthTokenRequestArgs, options?: AuthOptions): Promise<AuthTokenResponse>;
|
|
105
106
|
/**
|
|
106
107
|
* Revokes an access token, making it invalid for future use.
|
|
@@ -121,7 +122,8 @@ export declare function getAuthToken(args: AuthTokenRequestArgs, options?: AuthO
|
|
|
121
122
|
/**
|
|
122
123
|
* @deprecated Use options object instead: revokeAuthToken(args, { baseUrl, customFetch })
|
|
123
124
|
*/
|
|
124
|
-
export declare function revokeAuthToken(args: RevokeAuthTokenRequestArgs, baseUrl
|
|
125
|
+
export declare function revokeAuthToken(args: RevokeAuthTokenRequestArgs, baseUrl: string): Promise<boolean>;
|
|
126
|
+
export declare function revokeAuthToken(args: RevokeAuthTokenRequestArgs): Promise<boolean>;
|
|
125
127
|
export declare function revokeAuthToken(args: RevokeAuthTokenRequestArgs, options?: AuthOptions): Promise<boolean>;
|
|
126
128
|
/**
|
|
127
129
|
* Revokes a token using the RFC 7009 OAuth 2.0 Token Revocation standard.
|
|
@@ -145,5 +147,6 @@ export declare function revokeAuthToken(args: RevokeAuthTokenRequestArgs, option
|
|
|
145
147
|
/**
|
|
146
148
|
* @deprecated Use options object instead: revokeToken(args, { baseUrl, customFetch })
|
|
147
149
|
*/
|
|
148
|
-
export declare function revokeToken(args: RevokeTokenRequestArgs, baseUrl
|
|
150
|
+
export declare function revokeToken(args: RevokeTokenRequestArgs, baseUrl: string): Promise<boolean>;
|
|
151
|
+
export declare function revokeToken(args: RevokeTokenRequestArgs): Promise<boolean>;
|
|
149
152
|
export declare function revokeToken(args: RevokeTokenRequestArgs, options?: AuthOptions): Promise<boolean>;
|
|
@@ -42,7 +42,8 @@ export declare class TodoistApi {
|
|
|
42
42
|
/**
|
|
43
43
|
* @deprecated Use options object instead: new TodoistApi(token, { baseUrl, customFetch })
|
|
44
44
|
*/
|
|
45
|
-
constructor(authToken: string, baseUrl
|
|
45
|
+
constructor(authToken: string, baseUrl: string);
|
|
46
|
+
constructor(authToken: string);
|
|
46
47
|
constructor(authToken: string, options?: TodoistApiOptions);
|
|
47
48
|
/**
|
|
48
49
|
* Retrieves information about the authenticated user.
|
|
@@ -549,6 +549,12 @@ export declare const CurrentUserSchema: z.ZodObject<{
|
|
|
549
549
|
avatarSmall: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
550
550
|
businessAccountId: z.ZodNullable<z.ZodString>;
|
|
551
551
|
isPremium: z.ZodBoolean;
|
|
552
|
+
premiumStatus: z.ZodEnum<{
|
|
553
|
+
not_premium: "not_premium";
|
|
554
|
+
current_personal_plan: "current_personal_plan";
|
|
555
|
+
legacy_personal_plan: "legacy_personal_plan";
|
|
556
|
+
teams_business_member: "teams_business_member";
|
|
557
|
+
}>;
|
|
552
558
|
dateFormat: z.ZodNumber;
|
|
553
559
|
timeFormat: z.ZodNumber;
|
|
554
560
|
weeklyGoal: z.ZodNumber;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doist/todoist-api-typescript",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.6",
|
|
4
4
|
"description": "A typescript wrapper for the Todoist REST API.",
|
|
5
5
|
"author": "Doist developers",
|
|
6
6
|
"repository": "git@github.com:doist/todoist-api-typescript.git",
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
"zod": "4.1.12"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@doist/eslint-config": "
|
|
51
|
+
"@doist/eslint-config": "12.0.0",
|
|
52
52
|
"@doist/prettier-config": "4.0.0",
|
|
53
53
|
"@types/jest": "30.0.0",
|
|
54
|
-
"@typescript-eslint/eslint-plugin": "
|
|
55
|
-
"@typescript-eslint/parser": "
|
|
56
|
-
"eslint": "8.
|
|
54
|
+
"@typescript-eslint/eslint-plugin": "8.46.3",
|
|
55
|
+
"@typescript-eslint/parser": "8.46.3",
|
|
56
|
+
"eslint": "8.57.1",
|
|
57
57
|
"eslint-config-prettier": "8.7.0",
|
|
58
58
|
"eslint-import-resolver-webpack": "0.13.2",
|
|
59
59
|
"eslint-plugin-import": "2.27.5",
|