@karakeep/sdk 0.26.0 → 0.29.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 (2) hide show
  1. package/dist/index.d.ts +395 -16
  2. package/package.json +5 -5
package/dist/index.d.ts CHANGED
@@ -13,6 +13,8 @@ declare interface components {
13
13
  HighlightId: string;
14
14
  /** @example ieidlxygmwj87oxz5hxttoc8 */
15
15
  AssetId: string;
16
+ /** @example ieidlxygmwj87oxz5hxttoc8 */
17
+ BackupId: string;
16
18
  Bookmark: {
17
19
  id: string;
18
20
  createdAt: string;
@@ -26,6 +28,18 @@ declare interface components {
26
28
  summarizationStatus: "success" | "failure" | "pending" | null;
27
29
  note?: string | null;
28
30
  summary?: string | null;
31
+ /** @enum {string|null} */
32
+ source?:
33
+ | "api"
34
+ | "web"
35
+ | "cli"
36
+ | "mobile"
37
+ | "extension"
38
+ | "singlefile"
39
+ | "rss"
40
+ | "import"
41
+ | null;
42
+ userId: string;
29
43
  tags: {
30
44
  id: string;
31
45
  name: string;
@@ -87,7 +101,9 @@ declare interface components {
87
101
  | "video"
88
102
  | "bookmarkAsset"
89
103
  | "precrawledArchive"
104
+ | "userUploaded"
90
105
  | "unknown";
106
+ fileName?: string | null;
91
107
  }[];
92
108
  };
93
109
  PaginatedBookmarks: {
@@ -95,6 +111,23 @@ declare interface components {
95
111
  nextCursor: string | null;
96
112
  };
97
113
  Cursor: string;
114
+ List: {
115
+ id: string;
116
+ name: string;
117
+ description?: string | null;
118
+ icon: string;
119
+ parentId: string | null;
120
+ /**
121
+ * @default manual
122
+ * @enum {string}
123
+ */
124
+ type: "manual" | "smart";
125
+ query?: string | null;
126
+ public: boolean;
127
+ hasCollaborators: boolean;
128
+ /** @enum {string} */
129
+ userRole: "owner" | "editor" | "viewer" | "public";
130
+ };
98
131
  Highlight: {
99
132
  bookmarkId: string;
100
133
  startOffset: number;
@@ -110,20 +143,6 @@ declare interface components {
110
143
  userId: string;
111
144
  createdAt: string;
112
145
  };
113
- List: {
114
- id: string;
115
- name: string;
116
- description?: string | null;
117
- icon: string;
118
- parentId: string | null;
119
- /**
120
- * @default manual
121
- * @enum {string}
122
- */
123
- type: "manual" | "smart";
124
- query?: string | null;
125
- public: boolean;
126
- };
127
146
  Tag: {
128
147
  id: string;
129
148
  name: string;
@@ -152,6 +171,7 @@ declare interface components {
152
171
  TagId: components["schemas"]["TagId"];
153
172
  HighlightId: components["schemas"]["HighlightId"];
154
173
  AssetId: components["schemas"]["AssetId"];
174
+ BackupId: components["schemas"]["BackupId"];
155
175
  };
156
176
  requestBodies: never;
157
177
  headers: never;
@@ -236,6 +256,17 @@ declare interface paths {
236
256
  createdAt?: string | null;
237
257
  /** @enum {string} */
238
258
  crawlPriority?: "low" | "normal";
259
+ importSessionId?: string;
260
+ /** @enum {string} */
261
+ source?:
262
+ | "api"
263
+ | "web"
264
+ | "cli"
265
+ | "mobile"
266
+ | "extension"
267
+ | "singlefile"
268
+ | "rss"
269
+ | "import";
239
270
  } & (
240
271
  | {
241
272
  /** @enum {string} */
@@ -263,7 +294,16 @@ declare interface paths {
263
294
  };
264
295
  };
265
296
  responses: {
266
- /** @description The created bookmark */
297
+ /** @description The bookmark already exists */
298
+ 200: {
299
+ headers: {
300
+ [name: string]: unknown;
301
+ };
302
+ content: {
303
+ "application/json": components["schemas"]["Bookmark"];
304
+ };
305
+ };
306
+ /** @description The bookmark got created */
267
307
  201: {
268
308
  headers: {
269
309
  [name: string]: unknown;
@@ -481,6 +521,18 @@ declare interface paths {
481
521
  summarizationStatus: "success" | "failure" | "pending" | null;
482
522
  note?: string | null;
483
523
  summary?: string | null;
524
+ /** @enum {string|null} */
525
+ source?:
526
+ | "api"
527
+ | "web"
528
+ | "cli"
529
+ | "mobile"
530
+ | "extension"
531
+ | "singlefile"
532
+ | "rss"
533
+ | "import"
534
+ | null;
535
+ userId: string;
484
536
  };
485
537
  };
486
538
  };
@@ -543,6 +595,18 @@ declare interface paths {
543
595
  summarizationStatus: "success" | "failure" | "pending" | null;
544
596
  note?: string | null;
545
597
  summary?: string | null;
598
+ /** @enum {string|null} */
599
+ source?:
600
+ | "api"
601
+ | "web"
602
+ | "cli"
603
+ | "mobile"
604
+ | "extension"
605
+ | "singlefile"
606
+ | "rss"
607
+ | "import"
608
+ | null;
609
+ userId: string;
546
610
  };
547
611
  };
548
612
  };
@@ -680,6 +744,61 @@ declare interface paths {
680
744
  patch?: never;
681
745
  trace?: never;
682
746
  };
747
+ "/bookmarks/{bookmarkId}/lists": {
748
+ parameters: {
749
+ query?: never;
750
+ header?: never;
751
+ path?: never;
752
+ cookie?: never;
753
+ };
754
+ /**
755
+ * Get lists of a bookmark
756
+ * @description Get lists of a bookmark
757
+ */
758
+ get: {
759
+ parameters: {
760
+ query?: never;
761
+ header?: never;
762
+ path: {
763
+ bookmarkId: components["parameters"]["BookmarkId"];
764
+ };
765
+ cookie?: never;
766
+ };
767
+ requestBody?: never;
768
+ responses: {
769
+ /** @description The list of highlights */
770
+ 200: {
771
+ headers: {
772
+ [name: string]: unknown;
773
+ };
774
+ content: {
775
+ "application/json": {
776
+ lists: components["schemas"]["List"][];
777
+ };
778
+ };
779
+ };
780
+ /** @description Bookmark not found */
781
+ 404: {
782
+ headers: {
783
+ [name: string]: unknown;
784
+ };
785
+ content: {
786
+ "application/json": {
787
+ code: string;
788
+ message: string;
789
+ };
790
+ };
791
+ };
792
+ };
793
+ };
794
+ put?: never;
795
+ post?: never;
796
+ delete?: never;
797
+ options?: never;
798
+ head?: never;
799
+ patch?: never;
800
+ trace?: never;
801
+ };
683
802
  "/bookmarks/{bookmarkId}/highlights": {
684
803
  parameters: {
685
804
  query?: never;
@@ -772,6 +891,7 @@ declare interface paths {
772
891
  | "video"
773
892
  | "bookmarkAsset"
774
893
  | "precrawledArchive"
894
+ | "userUploaded"
775
895
  | "unknown";
776
896
  };
777
897
  };
@@ -795,7 +915,9 @@ declare interface paths {
795
915
  | "video"
796
916
  | "bookmarkAsset"
797
917
  | "precrawledArchive"
918
+ | "userUploaded"
798
919
  | "unknown";
920
+ fileName?: string | null;
799
921
  };
800
922
  };
801
923
  };
@@ -1315,7 +1437,13 @@ declare interface paths {
1315
1437
  */
1316
1438
  get: {
1317
1439
  parameters: {
1318
- query?: never;
1440
+ query?: {
1441
+ nameContains?: string;
1442
+ sort?: "name" | "usage" | "relevance";
1443
+ attachedBy?: "ai" | "human" | "none";
1444
+ cursor?: string;
1445
+ limit?: number | null;
1446
+ };
1319
1447
  header?: never;
1320
1448
  path?: never;
1321
1449
  cookie?: never;
@@ -1330,6 +1458,7 @@ declare interface paths {
1330
1458
  content: {
1331
1459
  "application/json": {
1332
1460
  tags: components["schemas"]["Tag"][];
1461
+ nextCursor: string | null;
1333
1462
  };
1334
1463
  };
1335
1464
  };
@@ -1781,6 +1910,7 @@ declare interface paths {
1781
1910
  "application/json": {
1782
1911
  /** @enum {string} */
1783
1912
  color?: "yellow" | "red" | "green" | "blue";
1913
+ note?: string | null;
1784
1914
  };
1785
1915
  };
1786
1916
  };
@@ -1919,6 +2049,20 @@ declare interface paths {
1919
2049
  name: string;
1920
2050
  count: number;
1921
2051
  }[];
2052
+ bookmarksBySource: {
2053
+ /** @enum {string|null} */
2054
+ source:
2055
+ | "api"
2056
+ | "web"
2057
+ | "cli"
2058
+ | "mobile"
2059
+ | "extension"
2060
+ | "singlefile"
2061
+ | "rss"
2062
+ | "import"
2063
+ | null;
2064
+ count: number;
2065
+ }[];
1922
2066
  };
1923
2067
  };
1924
2068
  };
@@ -2114,6 +2258,241 @@ declare interface paths {
2114
2258
  patch?: never;
2115
2259
  trace?: never;
2116
2260
  };
2261
+ "/backups": {
2262
+ parameters: {
2263
+ query?: never;
2264
+ header?: never;
2265
+ path?: never;
2266
+ cookie?: never;
2267
+ };
2268
+ /**
2269
+ * Get all backups
2270
+ * @description Get all backups
2271
+ */
2272
+ get: {
2273
+ parameters: {
2274
+ query?: never;
2275
+ header?: never;
2276
+ path?: never;
2277
+ cookie?: never;
2278
+ };
2279
+ requestBody?: never;
2280
+ responses: {
2281
+ /** @description Object with all backups data. */
2282
+ 200: {
2283
+ headers: {
2284
+ [name: string]: unknown;
2285
+ };
2286
+ content: {
2287
+ "application/json": {
2288
+ backups: {
2289
+ id: string;
2290
+ userId: string;
2291
+ assetId: string;
2292
+ createdAt: string;
2293
+ size: number;
2294
+ bookmarkCount: number;
2295
+ /** @enum {string} */
2296
+ status: "pending" | "success" | "failure";
2297
+ errorMessage?: string | null;
2298
+ }[];
2299
+ };
2300
+ };
2301
+ };
2302
+ };
2303
+ };
2304
+ put?: never;
2305
+ /**
2306
+ * Trigger a new backup
2307
+ * @description Trigger a new backup
2308
+ */
2309
+ post: {
2310
+ parameters: {
2311
+ query?: never;
2312
+ header?: never;
2313
+ path?: never;
2314
+ cookie?: never;
2315
+ };
2316
+ requestBody?: never;
2317
+ responses: {
2318
+ /** @description Backup created successfully */
2319
+ 201: {
2320
+ headers: {
2321
+ [name: string]: unknown;
2322
+ };
2323
+ content: {
2324
+ "application/json": {
2325
+ id: string;
2326
+ userId: string;
2327
+ assetId: string;
2328
+ createdAt: string;
2329
+ size: number;
2330
+ bookmarkCount: number;
2331
+ /** @enum {string} */
2332
+ status: "pending" | "success" | "failure";
2333
+ errorMessage?: string | null;
2334
+ };
2335
+ };
2336
+ };
2337
+ };
2338
+ };
2339
+ delete?: never;
2340
+ options?: never;
2341
+ head?: never;
2342
+ patch?: never;
2343
+ trace?: never;
2344
+ };
2345
+ "/backups/{backupId}": {
2346
+ parameters: {
2347
+ query?: never;
2348
+ header?: never;
2349
+ path?: never;
2350
+ cookie?: never;
2351
+ };
2352
+ /**
2353
+ * Get a single backup
2354
+ * @description Get backup by its id
2355
+ */
2356
+ get: {
2357
+ parameters: {
2358
+ query?: never;
2359
+ header?: never;
2360
+ path: {
2361
+ backupId: components["parameters"]["BackupId"];
2362
+ };
2363
+ cookie?: never;
2364
+ };
2365
+ requestBody?: never;
2366
+ responses: {
2367
+ /** @description Object with backup data. */
2368
+ 200: {
2369
+ headers: {
2370
+ [name: string]: unknown;
2371
+ };
2372
+ content: {
2373
+ "application/json": {
2374
+ id: string;
2375
+ userId: string;
2376
+ assetId: string;
2377
+ createdAt: string;
2378
+ size: number;
2379
+ bookmarkCount: number;
2380
+ /** @enum {string} */
2381
+ status: "pending" | "success" | "failure";
2382
+ errorMessage?: string | null;
2383
+ };
2384
+ };
2385
+ };
2386
+ /** @description Backup not found */
2387
+ 404: {
2388
+ headers: {
2389
+ [name: string]: unknown;
2390
+ };
2391
+ content: {
2392
+ "application/json": {
2393
+ code: string;
2394
+ message: string;
2395
+ };
2396
+ };
2397
+ };
2398
+ };
2399
+ };
2400
+ put?: never;
2401
+ post?: never;
2402
+ /**
2403
+ * Delete a backup
2404
+ * @description Delete backup by its id
2405
+ */
2406
+ delete: {
2407
+ parameters: {
2408
+ query?: never;
2409
+ header?: never;
2410
+ path: {
2411
+ backupId: components["parameters"]["BackupId"];
2412
+ };
2413
+ cookie?: never;
2414
+ };
2415
+ requestBody?: never;
2416
+ responses: {
2417
+ /** @description No content - the backup was deleted */
2418
+ 204: {
2419
+ headers: {
2420
+ [name: string]: unknown;
2421
+ };
2422
+ content?: never;
2423
+ };
2424
+ /** @description Backup not found */
2425
+ 404: {
2426
+ headers: {
2427
+ [name: string]: unknown;
2428
+ };
2429
+ content: {
2430
+ "application/json": {
2431
+ code: string;
2432
+ message: string;
2433
+ };
2434
+ };
2435
+ };
2436
+ };
2437
+ };
2438
+ options?: never;
2439
+ head?: never;
2440
+ patch?: never;
2441
+ trace?: never;
2442
+ };
2443
+ "/backups/{backupId}/download": {
2444
+ parameters: {
2445
+ query?: never;
2446
+ header?: never;
2447
+ path?: never;
2448
+ cookie?: never;
2449
+ };
2450
+ /**
2451
+ * Download a backup
2452
+ * @description Download backup file
2453
+ */
2454
+ get: {
2455
+ parameters: {
2456
+ query?: never;
2457
+ header?: never;
2458
+ path: {
2459
+ backupId: components["parameters"]["BackupId"];
2460
+ };
2461
+ cookie?: never;
2462
+ };
2463
+ requestBody?: never;
2464
+ responses: {
2465
+ /** @description Backup file (zip archive) */
2466
+ 200: {
2467
+ headers: {
2468
+ [name: string]: unknown;
2469
+ };
2470
+ content: {
2471
+ "application/zip": unknown;
2472
+ };
2473
+ };
2474
+ /** @description Backup not found */
2475
+ 404: {
2476
+ headers: {
2477
+ [name: string]: unknown;
2478
+ };
2479
+ content: {
2480
+ "application/json": {
2481
+ code: string;
2482
+ message: string;
2483
+ };
2484
+ };
2485
+ };
2486
+ };
2487
+ };
2488
+ put?: never;
2489
+ post?: never;
2490
+ delete?: never;
2491
+ options?: never;
2492
+ head?: never;
2493
+ patch?: never;
2494
+ trace?: never;
2495
+ };
2117
2496
  }
2118
2497
 
2119
2498
  export { }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@karakeep/sdk",
4
- "version": "0.26.0",
4
+ "version": "0.29.0",
5
5
  "description": "Typescript SDK for Karakeep",
6
6
  "license": "GNU Affero General Public License version 3",
7
7
  "keywords": [
@@ -16,8 +16,8 @@
16
16
  "@karakeep/tsconfig": "^0.1.0",
17
17
  "@tsconfig/node22": "^22.0.0",
18
18
  "openapi-typescript": "^7.6.1",
19
- "tsx": "^4.7.1",
20
- "vite": "^5.1.0",
19
+ "tsx": "^4.8.1",
20
+ "vite": "^7.0.6",
21
21
  "vite-plugin-dts": "^4.4.0"
22
22
  },
23
23
  "repository": {
@@ -34,8 +34,8 @@
34
34
  "run": "tsx src/index.ts",
35
35
  "lint": "oxlint .",
36
36
  "lint:fix": "oxlint . --fix",
37
- "format": "prettier . --ignore-path ../../.prettierignore",
38
- "format:fix": "prettier . --write --ignore-path ../../.prettierignore",
37
+ "format": "prettier . --cache --ignore-path ../../.prettierignore --check",
38
+ "format:fix": "prettier . --cache --write --ignore-path ../../.prettierignore",
39
39
  "typecheck": "tsc --noEmit"
40
40
  },
41
41
  "exports": "./dist/index.js",