@doist/todoist-sdk 9.1.0-next.2 → 9.1.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.
- package/dist/cjs/authentication.js +1 -0
- package/dist/cjs/clients/app-client.js +347 -0
- package/dist/cjs/clients/base-client.js +1 -0
- package/dist/cjs/clients/ui-extension-client.js +109 -0
- package/dist/cjs/consts/endpoints.js +70 -6
- package/dist/cjs/test-utils/test-defaults.js +75 -23
- package/dist/cjs/todoist-api.js +269 -33
- package/dist/cjs/transport/http-client.js +1 -0
- package/dist/cjs/types/apps/types.js +253 -0
- package/dist/cjs/types/index.js +2 -1
- package/dist/cjs/types/sync/commands/index.js +0 -1
- package/dist/cjs/types/sync/resource-types.js +0 -1
- package/dist/cjs/types/sync/response.js +10 -12
- package/dist/cjs/types/ui-extensions/index.js +18 -0
- package/dist/cjs/types/ui-extensions/types.js +77 -0
- package/dist/cjs/utils/validators.js +45 -33
- package/dist/esm/authentication.js +1 -0
- package/dist/esm/clients/app-client.js +343 -0
- package/dist/esm/clients/base-client.js +1 -0
- package/dist/esm/clients/ui-extension-client.js +105 -0
- package/dist/esm/consts/endpoints.js +54 -5
- package/dist/esm/test-utils/test-defaults.js +73 -22
- package/dist/esm/todoist-api.js +269 -33
- package/dist/esm/transport/http-client.js +1 -0
- package/dist/esm/types/apps/types.js +248 -0
- package/dist/esm/types/index.js +2 -1
- package/dist/esm/types/sync/commands/index.js +0 -1
- package/dist/esm/types/sync/resource-types.js +0 -1
- package/dist/esm/types/sync/response.js +0 -2
- package/dist/esm/types/ui-extensions/types.js +74 -0
- package/dist/esm/utils/validators.js +14 -2
- package/dist/types/authentication.d.ts +1 -1
- package/dist/types/clients/app-client.d.ts +37 -0
- package/dist/types/clients/base-client.d.ts +1 -0
- package/dist/types/clients/ui-extension-client.d.ts +18 -0
- package/dist/types/consts/endpoints.d.ts +25 -5
- package/dist/types/test-utils/test-defaults.d.ts +16 -4
- package/dist/types/todoist-api.d.ts +202 -12
- package/dist/types/types/apps/index.d.ts +2 -0
- package/dist/types/types/apps/requests.d.ts +89 -0
- package/dist/types/types/apps/types.d.ts +414 -0
- package/dist/types/types/http.d.ts +1 -1
- package/dist/types/types/index.d.ts +2 -1
- package/dist/types/types/sync/commands/index.d.ts +0 -9
- package/dist/types/types/sync/resource-types.d.ts +1 -1
- package/dist/types/types/sync/resources/user.d.ts +2 -2
- package/dist/types/types/sync/resources/view-options.d.ts +6 -6
- package/dist/types/types/sync/response.d.ts +6 -31
- package/dist/types/types/sync/user-preferences.d.ts +1 -1
- package/dist/types/types/tasks/requests.d.ts +0 -1
- package/dist/types/types/ui-extensions/index.d.ts +2 -0
- package/dist/types/types/ui-extensions/requests.d.ts +108 -0
- package/dist/types/types/ui-extensions/types.d.ts +185 -0
- package/dist/types/utils/validators.d.ts +231 -55
- package/package.json +1 -1
- package/dist/cjs/clients/goals-client.js +0 -145
- package/dist/cjs/types/goals/types.js +0 -56
- package/dist/esm/clients/goals-client.js +0 -141
- package/dist/esm/types/goals/types.js +0 -53
- package/dist/types/clients/goals-client.d.ts +0 -20
- package/dist/types/types/goals/requests.d.ts +0 -33
- package/dist/types/types/goals/types.d.ts +0 -51
- package/dist/types/types/sync/commands/goals.d.ts +0 -33
- /package/dist/cjs/types/{goals → apps}/index.js +0 -0
- /package/dist/cjs/types/{goals → apps}/requests.js +0 -0
- /package/dist/cjs/types/{sync/commands/goals.js → ui-extensions/requests.js} +0 -0
- /package/dist/esm/types/{goals → apps}/index.js +0 -0
- /package/dist/esm/types/{goals → apps}/requests.js +0 -0
- /package/dist/{types/types/goals/index.d.ts → esm/types/ui-extensions/index.js} +0 -0
- /package/dist/esm/types/{sync/commands/goals.js → ui-extensions/requests.js} +0 -0
|
@@ -417,7 +417,7 @@ export declare const SyncResponseSchema: z.ZodObject<{
|
|
|
417
417
|
mfaEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
418
418
|
mobileHost: z.ZodNullable<z.ZodString>;
|
|
419
419
|
mobileNumber: z.ZodNullable<z.ZodString>;
|
|
420
|
-
nextWeek: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>]>, z.ZodTransform<"Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday",
|
|
420
|
+
nextWeek: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>]>, z.ZodTransform<"Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday", 3 | 2 | 1 | 4 | 5 | 6 | 7>>;
|
|
421
421
|
onboardingLevel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
422
422
|
onboardingRole: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
423
423
|
onboardingPersona: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -441,7 +441,7 @@ export declare const SyncResponseSchema: z.ZodObject<{
|
|
|
441
441
|
}, z.core.$strip>>>;
|
|
442
442
|
shareLimit: z.ZodNumber;
|
|
443
443
|
sortOrder: z.ZodNumber;
|
|
444
|
-
startDay: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>]>, z.ZodTransform<"Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday",
|
|
444
|
+
startDay: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>]>, z.ZodTransform<"Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday", 3 | 2 | 1 | 4 | 5 | 6 | 7>>;
|
|
445
445
|
startPage: z.ZodString;
|
|
446
446
|
themeId: z.ZodString;
|
|
447
447
|
timeFormat: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>, z.ZodTransform<"24h" | "12h", 0 | 1>>;
|
|
@@ -750,7 +750,6 @@ export declare const SyncResponseSchema: z.ZodObject<{
|
|
|
750
750
|
}>;
|
|
751
751
|
objectId: z.ZodOptional<z.ZodString>;
|
|
752
752
|
groupedBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
753
|
-
WORKSPACE: "WORKSPACE";
|
|
754
753
|
PROJECT: "PROJECT";
|
|
755
754
|
LABEL: "LABEL";
|
|
756
755
|
ASSIGNEE: "ASSIGNEE";
|
|
@@ -758,6 +757,7 @@ export declare const SyncResponseSchema: z.ZodObject<{
|
|
|
758
757
|
DUE_DATE: "DUE_DATE";
|
|
759
758
|
DEADLINE: "DEADLINE";
|
|
760
759
|
PRIORITY: "PRIORITY";
|
|
760
|
+
WORKSPACE: "WORKSPACE";
|
|
761
761
|
}>>>;
|
|
762
762
|
filteredBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
763
763
|
viewMode: z.ZodOptional<z.ZodEnum<{
|
|
@@ -767,13 +767,13 @@ export declare const SyncResponseSchema: z.ZodObject<{
|
|
|
767
767
|
}>>;
|
|
768
768
|
showCompletedTasks: z.ZodOptional<z.ZodBoolean>;
|
|
769
769
|
sortedBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
770
|
-
WORKSPACE: "WORKSPACE";
|
|
771
770
|
PROJECT: "PROJECT";
|
|
772
771
|
ASSIGNEE: "ASSIGNEE";
|
|
773
772
|
ADDED_DATE: "ADDED_DATE";
|
|
774
773
|
DUE_DATE: "DUE_DATE";
|
|
775
774
|
DEADLINE: "DEADLINE";
|
|
776
775
|
PRIORITY: "PRIORITY";
|
|
776
|
+
WORKSPACE: "WORKSPACE";
|
|
777
777
|
MANUAL: "MANUAL";
|
|
778
778
|
ALPHABETICALLY: "ALPHABETICALLY";
|
|
779
779
|
}>>>;
|
|
@@ -790,7 +790,6 @@ export declare const SyncResponseSchema: z.ZodObject<{
|
|
|
790
790
|
CALENDAR: "CALENDAR";
|
|
791
791
|
}>>>;
|
|
792
792
|
groupedBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
793
|
-
WORKSPACE: "WORKSPACE";
|
|
794
793
|
PROJECT: "PROJECT";
|
|
795
794
|
LABEL: "LABEL";
|
|
796
795
|
ASSIGNEE: "ASSIGNEE";
|
|
@@ -798,15 +797,16 @@ export declare const SyncResponseSchema: z.ZodObject<{
|
|
|
798
797
|
DUE_DATE: "DUE_DATE";
|
|
799
798
|
DEADLINE: "DEADLINE";
|
|
800
799
|
PRIORITY: "PRIORITY";
|
|
800
|
+
WORKSPACE: "WORKSPACE";
|
|
801
801
|
}>>>;
|
|
802
802
|
sortedBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
803
|
-
WORKSPACE: "WORKSPACE";
|
|
804
803
|
PROJECT: "PROJECT";
|
|
805
804
|
ASSIGNEE: "ASSIGNEE";
|
|
806
805
|
ADDED_DATE: "ADDED_DATE";
|
|
807
806
|
DUE_DATE: "DUE_DATE";
|
|
808
807
|
DEADLINE: "DEADLINE";
|
|
809
808
|
PRIORITY: "PRIORITY";
|
|
809
|
+
WORKSPACE: "WORKSPACE";
|
|
810
810
|
MANUAL: "MANUAL";
|
|
811
811
|
ALPHABETICALLY: "ALPHABETICALLY";
|
|
812
812
|
}>>>;
|
|
@@ -832,31 +832,6 @@ export declare const SyncResponseSchema: z.ZodObject<{
|
|
|
832
832
|
defaultOrder: z.ZodNumber;
|
|
833
833
|
childOrder: z.ZodNumber;
|
|
834
834
|
}, z.core.$loose>>>;
|
|
835
|
-
goals: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
836
|
-
id: z.ZodString;
|
|
837
|
-
ownerType: z.ZodEnum<{
|
|
838
|
-
USER: "USER";
|
|
839
|
-
WORKSPACE: "WORKSPACE";
|
|
840
|
-
}>;
|
|
841
|
-
ownerId: z.ZodString;
|
|
842
|
-
name: z.ZodString;
|
|
843
|
-
description: z.ZodNullable<z.ZodString>;
|
|
844
|
-
deadline: z.ZodNullable<z.ZodString>;
|
|
845
|
-
parentGoalId: z.ZodNullable<z.ZodString>;
|
|
846
|
-
childOrder: z.ZodNumber;
|
|
847
|
-
isCompleted: z.ZodBoolean;
|
|
848
|
-
completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
849
|
-
responsibleUid: z.ZodNullable<z.ZodString>;
|
|
850
|
-
isDeleted: z.ZodBoolean;
|
|
851
|
-
progress: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
|
|
852
|
-
totalTaskCount: z.ZodNumber;
|
|
853
|
-
completedTaskCount: z.ZodNumber;
|
|
854
|
-
percentage: z.ZodNumber;
|
|
855
|
-
}, z.core.$loose>>>;
|
|
856
|
-
creatorUid: z.ZodString;
|
|
857
|
-
createdAt: z.ZodCoercedDate<unknown>;
|
|
858
|
-
updatedAt: z.ZodCoercedDate<unknown>;
|
|
859
|
-
}, z.core.$loose>>>;
|
|
860
835
|
workspaceGoals: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
861
836
|
id: z.ZodString;
|
|
862
837
|
workspaceId: z.ZodString;
|
|
@@ -36,4 +36,4 @@ export declare const BooleanFromZeroOneSchema: z.ZodPipe<z.ZodUnion<readonly [z.
|
|
|
36
36
|
/** Zod read-schemas: parse API numbers, emit descriptive strings */
|
|
37
37
|
export declare const DateFormatSchema: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>, z.ZodTransform<"DD/MM/YYYY" | "MM/DD/YYYY", 0 | 1>>;
|
|
38
38
|
export declare const TimeFormatSchema: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>, z.ZodTransform<"24h" | "12h", 0 | 1>>;
|
|
39
|
-
export declare const DayOfWeekSchema: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>]>, z.ZodTransform<"Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday",
|
|
39
|
+
export declare const DayOfWeekSchema: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>]>, z.ZodTransform<"Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday", 3 | 2 | 1 | 4 | 5 | 6 | 7>>;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import type { ComposerExtensionContext, ContextMenuExtensionContext, UiExtensionType } from './types.js';
|
|
2
|
+
import { UiExtensionTypeEnum } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Fields common to every UI extension variant — shared across all add/update
|
|
5
|
+
* request shapes.
|
|
6
|
+
*/
|
|
7
|
+
type BaseUiExtensionFields = {
|
|
8
|
+
/** HTTPS URL the extension loads. */
|
|
9
|
+
url: string;
|
|
10
|
+
/** Extension display name. */
|
|
11
|
+
name: string;
|
|
12
|
+
/** Extension description. */
|
|
13
|
+
description: string;
|
|
14
|
+
/** Rendered width in pixels. */
|
|
15
|
+
width?: number | null;
|
|
16
|
+
/** Rendered height in pixels. */
|
|
17
|
+
height?: number | null;
|
|
18
|
+
/** Optional HTTPS URL for the extension icon. */
|
|
19
|
+
icon?: string | null;
|
|
20
|
+
/** Extension definition version. Defaults to the backend default. */
|
|
21
|
+
defVersion?: number;
|
|
22
|
+
/** Minimum Cardist renderer version required, as a decimal version string (e.g. `'0.60'`). */
|
|
23
|
+
minimumCardistVersion?: string;
|
|
24
|
+
/** Optional client-specified extension ID (server generates one if omitted). */
|
|
25
|
+
extensionId?: string | null;
|
|
26
|
+
};
|
|
27
|
+
/** Arguments for adding a context-menu UI extension. */
|
|
28
|
+
export type AddContextMenuExtensionArgs = BaseUiExtensionFields & {
|
|
29
|
+
/** The developer application (integration) ID the extension belongs to. */
|
|
30
|
+
integrationId: string;
|
|
31
|
+
extensionType: typeof UiExtensionTypeEnum.ContextMenu;
|
|
32
|
+
/** Where the extension appears. */
|
|
33
|
+
contextType: ContextMenuExtensionContext;
|
|
34
|
+
};
|
|
35
|
+
/** Arguments for adding a composer UI extension. */
|
|
36
|
+
export type AddComposerExtensionArgs = BaseUiExtensionFields & {
|
|
37
|
+
/** The developer application (integration) ID the extension belongs to. */
|
|
38
|
+
integrationId: string;
|
|
39
|
+
extensionType: typeof UiExtensionTypeEnum.Composer;
|
|
40
|
+
/** Which composer the extension appears in. */
|
|
41
|
+
composerType: ComposerExtensionContext;
|
|
42
|
+
};
|
|
43
|
+
/** Arguments for adding a settings UI extension. */
|
|
44
|
+
export type AddSettingsExtensionArgs = BaseUiExtensionFields & {
|
|
45
|
+
/** The developer application (integration) ID the extension belongs to. */
|
|
46
|
+
integrationId: string;
|
|
47
|
+
extensionType: typeof UiExtensionTypeEnum.Settings;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Arguments for adding a new UI extension to a developer application.
|
|
51
|
+
* Discriminated on `extensionType` so impossible combinations
|
|
52
|
+
* (e.g. `settings` + `contextType`) fail at compile time.
|
|
53
|
+
*/
|
|
54
|
+
export type AddUiExtensionArgs = AddContextMenuExtensionArgs | AddComposerExtensionArgs | AddSettingsExtensionArgs;
|
|
55
|
+
/**
|
|
56
|
+
* Fields that are optional on every update variant.
|
|
57
|
+
*/
|
|
58
|
+
type UpdateUiExtensionFields = {
|
|
59
|
+
url?: string;
|
|
60
|
+
name?: string;
|
|
61
|
+
description?: string;
|
|
62
|
+
width?: number | null;
|
|
63
|
+
height?: number | null;
|
|
64
|
+
icon?: string | null;
|
|
65
|
+
defVersion?: number;
|
|
66
|
+
minimumCardistVersion?: string;
|
|
67
|
+
extensionId?: string | null;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Arguments for updating a context-menu UI extension.
|
|
71
|
+
* `extensionType` is required to discriminate the variant — callers
|
|
72
|
+
* already have it from the fetched `UiExtension`.
|
|
73
|
+
*/
|
|
74
|
+
export type UpdateContextMenuExtensionArgs = UpdateUiExtensionFields & {
|
|
75
|
+
extensionType: typeof UiExtensionTypeEnum.ContextMenu;
|
|
76
|
+
contextType?: ContextMenuExtensionContext;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Arguments for updating a composer UI extension.
|
|
80
|
+
*/
|
|
81
|
+
export type UpdateComposerExtensionArgs = UpdateUiExtensionFields & {
|
|
82
|
+
extensionType: typeof UiExtensionTypeEnum.Composer;
|
|
83
|
+
composerType?: ComposerExtensionContext;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Arguments for updating a settings UI extension.
|
|
87
|
+
*/
|
|
88
|
+
export type UpdateSettingsExtensionArgs = UpdateUiExtensionFields & {
|
|
89
|
+
extensionType: typeof UiExtensionTypeEnum.Settings;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Arguments for updating a UI extension — all value fields are optional
|
|
93
|
+
* but `extensionType` is required so TypeScript can discriminate which
|
|
94
|
+
* variant-specific fields (`contextType`, `composerType`) apply.
|
|
95
|
+
*/
|
|
96
|
+
export type UpdateUiExtensionArgs = UpdateContextMenuExtensionArgs | UpdateComposerExtensionArgs | UpdateSettingsExtensionArgs;
|
|
97
|
+
export type { UiExtensionType };
|
|
98
|
+
/**
|
|
99
|
+
* Arguments for uploading a UI extension icon.
|
|
100
|
+
*/
|
|
101
|
+
export type UploadUiExtensionIconArgs = {
|
|
102
|
+
/** The UI extension ID. */
|
|
103
|
+
uiExtensionId: string;
|
|
104
|
+
/** The icon file to upload (Buffer, Stream, or file path). */
|
|
105
|
+
file: Buffer | NodeJS.ReadableStream | string | Blob;
|
|
106
|
+
/** The file name (required for Buffer/Stream uploads). */
|
|
107
|
+
fileName?: string;
|
|
108
|
+
};
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Discriminator values for the UI extension variants.
|
|
4
|
+
* Exposed as an enum-like object because the values are used in `z.literal()`
|
|
5
|
+
* across multiple variant schemas (see AGENTS.md "Discriminated unions" exception).
|
|
6
|
+
*/
|
|
7
|
+
export declare const UiExtensionTypeEnum: {
|
|
8
|
+
readonly ContextMenu: "context-menu";
|
|
9
|
+
readonly Composer: "composer";
|
|
10
|
+
readonly Settings: "settings";
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* All UI extension type values.
|
|
14
|
+
*/
|
|
15
|
+
export declare const UI_EXTENSION_TYPES: readonly ["context-menu", "composer", "settings"];
|
|
16
|
+
/**
|
|
17
|
+
* Type of UI extension.
|
|
18
|
+
*/
|
|
19
|
+
export type UiExtensionType = (typeof UI_EXTENSION_TYPES)[number];
|
|
20
|
+
/**
|
|
21
|
+
* Context locations where a context-menu extension can appear.
|
|
22
|
+
*/
|
|
23
|
+
export declare const CONTEXT_MENU_EXTENSION_CONTEXTS: readonly ["project", "task"];
|
|
24
|
+
/**
|
|
25
|
+
* Context location of a context-menu UI extension.
|
|
26
|
+
*/
|
|
27
|
+
export type ContextMenuExtensionContext = (typeof CONTEXT_MENU_EXTENSION_CONTEXTS)[number];
|
|
28
|
+
export declare const ContextMenuExtensionContextSchema: z.ZodEnum<{
|
|
29
|
+
task: "task";
|
|
30
|
+
project: "project";
|
|
31
|
+
}>;
|
|
32
|
+
/**
|
|
33
|
+
* Composer locations where a composer extension can appear.
|
|
34
|
+
*/
|
|
35
|
+
export declare const COMPOSER_EXTENSION_CONTEXTS: readonly ["task", "comment"];
|
|
36
|
+
/**
|
|
37
|
+
* Composer location of a composer UI extension.
|
|
38
|
+
*/
|
|
39
|
+
export type ComposerExtensionContext = (typeof COMPOSER_EXTENSION_CONTEXTS)[number];
|
|
40
|
+
export declare const ComposerExtensionContextSchema: z.ZodEnum<{
|
|
41
|
+
task: "task";
|
|
42
|
+
comment: "comment";
|
|
43
|
+
}>;
|
|
44
|
+
/**
|
|
45
|
+
* Shared fields across all UI extension variants.
|
|
46
|
+
*/
|
|
47
|
+
export declare const UiExtensionBaseSchema: z.ZodObject<{
|
|
48
|
+
id: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
|
|
49
|
+
integrationId: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
|
|
50
|
+
extensionId: z.ZodString;
|
|
51
|
+
url: z.ZodString;
|
|
52
|
+
icon: z.ZodNullable<z.ZodString>;
|
|
53
|
+
name: z.ZodString;
|
|
54
|
+
description: z.ZodString;
|
|
55
|
+
width: z.ZodNullable<z.ZodNumber>;
|
|
56
|
+
height: z.ZodNullable<z.ZodNumber>;
|
|
57
|
+
defVersion: z.ZodNumber;
|
|
58
|
+
minimumCardistVersion: z.ZodString;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
/**
|
|
61
|
+
* Schema for a context-menu UI extension.
|
|
62
|
+
*/
|
|
63
|
+
export declare const ContextMenuExtensionSchema: z.ZodObject<{
|
|
64
|
+
id: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
|
|
65
|
+
integrationId: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
|
|
66
|
+
extensionId: z.ZodString;
|
|
67
|
+
url: z.ZodString;
|
|
68
|
+
icon: z.ZodNullable<z.ZodString>;
|
|
69
|
+
name: z.ZodString;
|
|
70
|
+
description: z.ZodString;
|
|
71
|
+
width: z.ZodNullable<z.ZodNumber>;
|
|
72
|
+
height: z.ZodNullable<z.ZodNumber>;
|
|
73
|
+
defVersion: z.ZodNumber;
|
|
74
|
+
minimumCardistVersion: z.ZodString;
|
|
75
|
+
extensionType: z.ZodLiteral<"context-menu">;
|
|
76
|
+
contextType: z.ZodEnum<{
|
|
77
|
+
task: "task";
|
|
78
|
+
project: "project";
|
|
79
|
+
}>;
|
|
80
|
+
}, z.core.$strip>;
|
|
81
|
+
/**
|
|
82
|
+
* A context-menu UI extension.
|
|
83
|
+
*/
|
|
84
|
+
export type ContextMenuExtension = z.infer<typeof ContextMenuExtensionSchema>;
|
|
85
|
+
/**
|
|
86
|
+
* Schema for a composer UI extension.
|
|
87
|
+
*/
|
|
88
|
+
export declare const ComposerExtensionSchema: z.ZodObject<{
|
|
89
|
+
id: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
|
|
90
|
+
integrationId: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
|
|
91
|
+
extensionId: z.ZodString;
|
|
92
|
+
url: z.ZodString;
|
|
93
|
+
icon: z.ZodNullable<z.ZodString>;
|
|
94
|
+
name: z.ZodString;
|
|
95
|
+
description: z.ZodString;
|
|
96
|
+
width: z.ZodNullable<z.ZodNumber>;
|
|
97
|
+
height: z.ZodNullable<z.ZodNumber>;
|
|
98
|
+
defVersion: z.ZodNumber;
|
|
99
|
+
minimumCardistVersion: z.ZodString;
|
|
100
|
+
extensionType: z.ZodLiteral<"composer">;
|
|
101
|
+
composerType: z.ZodEnum<{
|
|
102
|
+
task: "task";
|
|
103
|
+
comment: "comment";
|
|
104
|
+
}>;
|
|
105
|
+
}, z.core.$strip>;
|
|
106
|
+
/**
|
|
107
|
+
* A composer UI extension.
|
|
108
|
+
*/
|
|
109
|
+
export type ComposerExtension = z.infer<typeof ComposerExtensionSchema>;
|
|
110
|
+
/**
|
|
111
|
+
* Schema for a settings UI extension.
|
|
112
|
+
*/
|
|
113
|
+
export declare const SettingsExtensionSchema: z.ZodObject<{
|
|
114
|
+
id: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
|
|
115
|
+
integrationId: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
|
|
116
|
+
extensionId: z.ZodString;
|
|
117
|
+
url: z.ZodString;
|
|
118
|
+
icon: z.ZodNullable<z.ZodString>;
|
|
119
|
+
name: z.ZodString;
|
|
120
|
+
description: z.ZodString;
|
|
121
|
+
width: z.ZodNullable<z.ZodNumber>;
|
|
122
|
+
height: z.ZodNullable<z.ZodNumber>;
|
|
123
|
+
defVersion: z.ZodNumber;
|
|
124
|
+
minimumCardistVersion: z.ZodString;
|
|
125
|
+
extensionType: z.ZodLiteral<"settings">;
|
|
126
|
+
}, z.core.$strip>;
|
|
127
|
+
/**
|
|
128
|
+
* A settings UI extension.
|
|
129
|
+
*/
|
|
130
|
+
export type SettingsExtension = z.infer<typeof SettingsExtensionSchema>;
|
|
131
|
+
/**
|
|
132
|
+
* Discriminated union of all UI extension variants.
|
|
133
|
+
*/
|
|
134
|
+
export declare const UiExtensionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
135
|
+
id: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
|
|
136
|
+
integrationId: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
|
|
137
|
+
extensionId: z.ZodString;
|
|
138
|
+
url: z.ZodString;
|
|
139
|
+
icon: z.ZodNullable<z.ZodString>;
|
|
140
|
+
name: z.ZodString;
|
|
141
|
+
description: z.ZodString;
|
|
142
|
+
width: z.ZodNullable<z.ZodNumber>;
|
|
143
|
+
height: z.ZodNullable<z.ZodNumber>;
|
|
144
|
+
defVersion: z.ZodNumber;
|
|
145
|
+
minimumCardistVersion: z.ZodString;
|
|
146
|
+
extensionType: z.ZodLiteral<"context-menu">;
|
|
147
|
+
contextType: z.ZodEnum<{
|
|
148
|
+
task: "task";
|
|
149
|
+
project: "project";
|
|
150
|
+
}>;
|
|
151
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
152
|
+
id: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
|
|
153
|
+
integrationId: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
|
|
154
|
+
extensionId: z.ZodString;
|
|
155
|
+
url: z.ZodString;
|
|
156
|
+
icon: z.ZodNullable<z.ZodString>;
|
|
157
|
+
name: z.ZodString;
|
|
158
|
+
description: z.ZodString;
|
|
159
|
+
width: z.ZodNullable<z.ZodNumber>;
|
|
160
|
+
height: z.ZodNullable<z.ZodNumber>;
|
|
161
|
+
defVersion: z.ZodNumber;
|
|
162
|
+
minimumCardistVersion: z.ZodString;
|
|
163
|
+
extensionType: z.ZodLiteral<"composer">;
|
|
164
|
+
composerType: z.ZodEnum<{
|
|
165
|
+
task: "task";
|
|
166
|
+
comment: "comment";
|
|
167
|
+
}>;
|
|
168
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
169
|
+
id: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
|
|
170
|
+
integrationId: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
|
|
171
|
+
extensionId: z.ZodString;
|
|
172
|
+
url: z.ZodString;
|
|
173
|
+
icon: z.ZodNullable<z.ZodString>;
|
|
174
|
+
name: z.ZodString;
|
|
175
|
+
description: z.ZodString;
|
|
176
|
+
width: z.ZodNullable<z.ZodNumber>;
|
|
177
|
+
height: z.ZodNullable<z.ZodNumber>;
|
|
178
|
+
defVersion: z.ZodNumber;
|
|
179
|
+
minimumCardistVersion: z.ZodString;
|
|
180
|
+
extensionType: z.ZodLiteral<"settings">;
|
|
181
|
+
}, z.core.$strip>], "extensionType">;
|
|
182
|
+
/**
|
|
183
|
+
* A UI extension attached to a developer application.
|
|
184
|
+
*/
|
|
185
|
+
export type UiExtension = z.infer<typeof UiExtensionSchema>;
|