teak-sdk 1.0.86 → 1.0.88
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/README.md +3 -3
- package/{dist/sdk.js → index.js} +277 -60
- package/package.json +3 -18
- package/{dist/types/client → types}/authDiscovery.d.ts +3 -3
- package/{dist/types → types/convex}/devUrls.d.ts +0 -1
- package/{dist/types → types/convex}/shared/constants.d.ts +11 -36
- package/types/convex/shared/filesOrigins.d.ts +4 -0
- package/types/convex/shared/folders.d.ts +27 -0
- package/types/convex/shared/oauthSurfaces.d.ts +2 -0
- package/types/convex/shared/oauthUrl.d.ts +2 -0
- package/types/convex/shared/tags.d.ts +37 -0
- package/types/convex/shared/utils/codePoints.d.ts +2 -0
- package/types/convex/shared/utils/formatBytes.d.ts +1 -0
- package/types/convex/shared/workosResources.d.ts +7 -0
- package/types/index.d.ts +569 -0
- package/types/oauthCredentials.d.ts +10 -0
- package/dist/types/client/sdk.d.ts +0 -253
- package/dist/types/shared/workosResources.d.ts +0 -4
- /package/{dist/types → types/convex}/shared/boundedResponse.d.ts +0 -0
- /package/{dist/types → types/convex}/shared/fileFormats.d.ts +0 -0
- /package/{dist/types → types/convex}/shared/markdown.d.ts +0 -0
- /package/{dist/types/client → types}/workosConnect.d.ts +0 -0
|
@@ -1,33 +1,30 @@
|
|
|
1
1
|
export declare const SIGNUPS_PAUSED_MESSAGE = "New sign-ups are paused right now. Please try again later.";
|
|
2
|
-
export declare const ACCOUNT_CHANGES_PAUSED_MESSAGE = "Account changes are paused right now. Please try again later.";
|
|
3
2
|
export declare const cardTypes: readonly ["text", "link", "image", "video", "audio", "document", "palette", "quote"];
|
|
4
3
|
export type CardType = (typeof cardTypes)[number];
|
|
5
|
-
export declare const VISUAL_STYLE_TAXONOMY: readonly ["abstract", "cinematic", "dark", "illustrative", "minimal", "monochrome", "moody", "pastel", "photographic", "retro", "surreal", "vintage", "vibrant"];
|
|
4
|
+
export declare const VISUAL_STYLE_TAXONOMY: readonly ["abstract", "cinematic", "dark", "illustrative", "minimal", "monochrome", "moody", "pastel", "photographic", "retro", "surreal", "vintage", "vibrant", "typographic", "3d", "flat", "geometric", "hand-drawn", "futuristic"];
|
|
6
5
|
export type VisualStyle = (typeof VISUAL_STYLE_TAXONOMY)[number];
|
|
7
6
|
export declare const VISUAL_STYLE_LABELS: Record<VisualStyle, string>;
|
|
8
7
|
export declare const VISUAL_STYLE_ALIAS_MAP: Record<string, VisualStyle>;
|
|
9
8
|
export declare function normalizeVisualStyle(value: string): VisualStyle | null;
|
|
10
9
|
export declare function normalizeVisualStyleFilters(values?: string[]): VisualStyle[];
|
|
11
10
|
export declare function extractVisualStylesFromTags(tags?: string[]): VisualStyle[] | undefined;
|
|
11
|
+
export declare const COLOR_CARD_TYPES: readonly CardType[];
|
|
12
|
+
export declare const isColorCardType: (type: string) => boolean;
|
|
13
|
+
export declare const VISUAL_STYLE_CARD_TYPES: readonly CardType[];
|
|
14
|
+
export declare const isVisualStyleCardType: (type: string) => boolean;
|
|
15
|
+
export declare const isVisualStyle: (value: string) => value is VisualStyle;
|
|
12
16
|
export declare const COLOR_HUE_BUCKETS: readonly ["red", "orange", "yellow", "green", "teal", "cyan", "blue", "purple", "pink", "brown", "neutral"];
|
|
13
17
|
export type ColorHueBucket = (typeof COLOR_HUE_BUCKETS)[number];
|
|
14
18
|
export declare const COLOR_HUE_LABELS: Record<ColorHueBucket, string>;
|
|
15
19
|
export declare const COLOR_HUE_ALIAS_MAP: Record<string, ColorHueBucket>;
|
|
16
20
|
export declare function normalizeColorHueBucket(value: string): ColorHueBucket | null;
|
|
17
21
|
export declare function normalizeHueFilters(values?: string[]): ColorHueBucket[];
|
|
18
|
-
/**
|
|
19
|
-
* Maximum number of cards allowed for free tier users
|
|
20
|
-
*/
|
|
21
22
|
export declare const FREE_TIER_LIMIT = 200;
|
|
22
|
-
|
|
23
|
-
* Maximum file size for uploads (100MB in bytes)
|
|
24
|
-
*/
|
|
23
|
+
export declare const TRASH_RETENTION_MS: number;
|
|
25
24
|
export { MAX_FILE_SIZE } from "./fileFormats.js";
|
|
26
|
-
|
|
27
|
-
* Maximum number of files that can be uploaded at once
|
|
28
|
-
*/
|
|
29
|
-
export declare const MAX_FILES_PER_UPLOAD = 5;
|
|
25
|
+
export declare const MAX_FILES_PER_UPLOAD = 20;
|
|
30
26
|
export declare const MULTIPART_UPLOAD_THRESHOLD: number;
|
|
27
|
+
export declare const API_IDEMPOTENCY_KEY_TTL_MS: number;
|
|
31
28
|
export declare const CARD_ERROR_CODES: {
|
|
32
29
|
readonly CARD_LIMIT_REACHED: "CARD_LIMIT_REACHED";
|
|
33
30
|
readonly CONTENT_TOO_LARGE: "CONTENT_TOO_LARGE";
|
|
@@ -40,45 +37,23 @@ export declare const CARD_ERROR_CODES: {
|
|
|
40
37
|
};
|
|
41
38
|
export type CardErrorCode = (typeof CARD_ERROR_CODES)[keyof typeof CARD_ERROR_CODES];
|
|
42
39
|
export declare const CARD_ERROR_MESSAGES: Record<CardErrorCode, string>;
|
|
43
|
-
/**
|
|
44
|
-
* All card types as readonly array
|
|
45
|
-
*/
|
|
46
40
|
export declare const CARD_TYPES: readonly CardType[];
|
|
47
|
-
/**
|
|
48
|
-
* Card type labels for UI display
|
|
49
|
-
*/
|
|
50
41
|
export declare const CARD_TYPE_LABELS: Record<CardType, string>;
|
|
51
|
-
/**
|
|
52
|
-
* Card type icons mapping (for UI components)
|
|
53
|
-
*/
|
|
54
42
|
export declare const CARD_TYPE_ICONS: Record<CardType, string>;
|
|
55
|
-
/**
|
|
56
|
-
* Card type configuration registry for centralized management
|
|
57
|
-
*/
|
|
58
43
|
export interface CardTypeConfig {
|
|
59
44
|
icon: string;
|
|
60
45
|
label: string;
|
|
61
46
|
searchLabel: string;
|
|
62
47
|
}
|
|
63
48
|
export declare const CARD_TYPE_REGISTRY: Record<CardType, CardTypeConfig>;
|
|
64
|
-
/**
|
|
65
|
-
* Helper functions for card type configuration
|
|
66
|
-
*/
|
|
67
49
|
export declare function getCardTypeConfig(cardType: CardType): CardTypeConfig;
|
|
68
50
|
export declare function getCardTypeIcon(cardType: CardType): string;
|
|
69
51
|
export declare function getCardTypeLabel(cardType: CardType): string;
|
|
70
|
-
/**
|
|
71
|
-
* Typeahead option for search/filter dropdowns
|
|
72
|
-
*/
|
|
73
52
|
export interface TypeaheadOption {
|
|
74
53
|
label: string;
|
|
75
54
|
value: CardType | "favorites" | "trash";
|
|
76
55
|
}
|
|
77
|
-
/**
|
|
78
|
-
* Reserved keywords for search functionality
|
|
79
|
-
*/
|
|
80
56
|
export declare const RESERVED_KEYWORDS: TypeaheadOption[];
|
|
81
|
-
/**
|
|
82
|
-
* Type guard to check if a value is a valid CardType
|
|
83
|
-
*/
|
|
84
57
|
export declare function isCardType(value: unknown): value is CardType;
|
|
58
|
+
export { TEAK_FILES_ORIGINS } from "./filesOrigins.js";
|
|
59
|
+
export { HIDDEN_TAG_KEYS, isCardHidden, isHiddenTagList } from "./tags.js";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare const MAX_FOLDERS_PER_USER = 500;
|
|
2
|
+
export declare const MAX_FOLDERS_PER_CARD = 50;
|
|
3
|
+
export declare const MAX_FOLDER_NAME_LENGTH = 300;
|
|
4
|
+
export declare const MAX_FOLDER_CARD_IDS = 100;
|
|
5
|
+
export declare const MAX_SMART_FOLDER_QUERY_LENGTH = 500;
|
|
6
|
+
export type FolderKind = "manual" | "smart";
|
|
7
|
+
export declare const FOLDER_COLORS: readonly ["gray", "red", "orange", "amber", "green", "teal", "blue", "violet", "pink"];
|
|
8
|
+
export type FolderColor = (typeof FOLDER_COLORS)[number];
|
|
9
|
+
export declare const isFolderColor: (value: unknown) => value is FolderColor;
|
|
10
|
+
export declare const FOLDER_ERROR_MESSAGES: {
|
|
11
|
+
readonly DUPLICATE_NAME: "A folder with this name already exists";
|
|
12
|
+
readonly EMPTY_NAME: "Name the folder";
|
|
13
|
+
readonly NAME_TOO_LONG: "Folder names can be at most 300 characters";
|
|
14
|
+
readonly TOO_MANY_FOLDERS: "You can have up to 500 folders";
|
|
15
|
+
readonly TOO_MANY_FOLDERS_ON_CARD: "A card can be in up to 50 folders";
|
|
16
|
+
readonly NOT_FOUND: "Folder not found";
|
|
17
|
+
readonly EMPTY_QUERY: "Add a search for the smart folder";
|
|
18
|
+
readonly QUERY_TOO_LONG: "Smart folder searches can be at most 500 characters";
|
|
19
|
+
readonly SMART_FOLDER_IN_QUERY: "A smart folder's search can't use another smart folder";
|
|
20
|
+
readonly SMART_FOLDER_MEMBERSHIP: "Cards can't be added to a smart folder; it shows the cards that match its search";
|
|
21
|
+
readonly QUERY_ON_MANUAL_FOLDER: "Only smart folders have a search";
|
|
22
|
+
readonly SMART_FOLDER_TRASH: "Smart folders don't show Trash. To search for the word, put it in quotes";
|
|
23
|
+
};
|
|
24
|
+
export declare const normalizeFolderName: (name: string) => string;
|
|
25
|
+
export declare const folderNameKey: (name: string) => string;
|
|
26
|
+
export declare const explainInvalidFolderName: (name: string) => string | null;
|
|
27
|
+
export declare const explainInvalidSmartFolderQuery: (canonical: string) => string | null;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare const MAX_TAG_NAME_LENGTH = 64;
|
|
2
|
+
export declare const TAG_OPERATION_COUNT_LIMIT = 10000;
|
|
3
|
+
export declare const TAG_OPERATION_STALL_MS: number;
|
|
4
|
+
export type TagOperationKind = "rename" | "merge" | "delete";
|
|
5
|
+
export type TagOperationStatus = "running" | "completed" | "failed";
|
|
6
|
+
export declare const TAG_ERROR_MESSAGES: {
|
|
7
|
+
readonly EMPTY_NAME: "Name the tag";
|
|
8
|
+
readonly NAME_TOO_LONG: "Tags can be at most 64 characters";
|
|
9
|
+
readonly NOT_FOUND: "Tag not found";
|
|
10
|
+
readonly SAME_TAG: "Choose a different tag to merge into";
|
|
11
|
+
readonly OPERATION_RUNNING: "Another tag change is still running";
|
|
12
|
+
readonly OPERATION_NOT_FOUND: "Tag operation not found";
|
|
13
|
+
};
|
|
14
|
+
export declare const tagKey: (tag: string) => string;
|
|
15
|
+
export declare const HIDDEN_TAG_KEYS: readonly ["secret", "hidden"];
|
|
16
|
+
export declare const isHiddenTagList: (tags: readonly string[] | null | undefined) => boolean;
|
|
17
|
+
export declare const isCardHidden: (card: {
|
|
18
|
+
isHidden?: true;
|
|
19
|
+
tags?: readonly string[];
|
|
20
|
+
}) => boolean;
|
|
21
|
+
export declare const explainInvalidTagName: (name: string) => string | null;
|
|
22
|
+
export declare const MAX_TAG_KEY_LENGTH = 256;
|
|
23
|
+
export declare const explainInvalidTagSource: (name: string) => string | null;
|
|
24
|
+
export declare const tagExistsMessage: (name: string) => string;
|
|
25
|
+
export type TagRewrite = {
|
|
26
|
+
kind: "delete";
|
|
27
|
+
from: string;
|
|
28
|
+
} | {
|
|
29
|
+
kind: "rename";
|
|
30
|
+
from: string;
|
|
31
|
+
to: string;
|
|
32
|
+
} | {
|
|
33
|
+
kind: "merge";
|
|
34
|
+
from: string;
|
|
35
|
+
to: string;
|
|
36
|
+
};
|
|
37
|
+
export declare const rewriteTagList: (tags: readonly string[] | undefined, rewrite: TagRewrite) => string[] | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formatBytes: (bytes?: number | null) => string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface WorkosResources {
|
|
2
|
+
readonly api: string;
|
|
3
|
+
readonly mcp: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const PRODUCTION_WORKOS_RESOURCE_ORIGIN = "https://teakvault.com";
|
|
6
|
+
export declare const workosResourcesFor: (url: string) => WorkosResources;
|
|
7
|
+
export declare const PRODUCTION_WORKOS_RESOURCES: WorkosResources;
|