@arke-institute/sdk 2.3.8 → 2.3.10

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.
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * Source: Arke v1 API
8
8
  * Version: 1.0.0
9
- * Generated: 2026-01-12T16:14:47.577Z
9
+ * Generated: 2026-01-13T18:00:18.256Z
10
10
  */
11
11
  type paths = {
12
12
  "/auth/register": {
@@ -591,6 +591,110 @@ type paths = {
591
591
  patch?: never;
592
592
  trace?: never;
593
593
  };
594
+ "/users/me/search": {
595
+ parameters: {
596
+ query?: never;
597
+ header?: never;
598
+ path?: never;
599
+ cookie?: never;
600
+ };
601
+ get?: never;
602
+ put?: never;
603
+ /**
604
+ * Search across user collections
605
+ * @description Performs semantic search across all collections the authenticated user has access to.
606
+ *
607
+ * ## Features
608
+ * - Searches all user's collections in parallel (up to 25)
609
+ * - Optionally includes public-domain entities
610
+ * - Filter by entity type or collection role
611
+ * - Results ranked by semantic relevance
612
+ *
613
+ * ## Performance
614
+ * - Collections are queried in parallel for speed
615
+ * - If user has more than 25 collections, queries first 25 (by created_at). Use role filter to narrow down.
616
+ * - Response includes metadata showing collections_queried vs collections_total
617
+ *
618
+ * ## Scoring
619
+ * - Results use cosine similarity scores (0-1)
620
+ * - Scores are comparable across collections
621
+ */
622
+ post: {
623
+ parameters: {
624
+ query?: never;
625
+ header?: never;
626
+ path?: never;
627
+ cookie?: never;
628
+ };
629
+ requestBody?: {
630
+ content: {
631
+ "application/json": components["schemas"]["CrossCollectionSearchRequest"];
632
+ };
633
+ };
634
+ responses: {
635
+ /** @description Search results */
636
+ 200: {
637
+ headers: {
638
+ [name: string]: unknown;
639
+ };
640
+ content: {
641
+ "application/json": components["schemas"]["CrossCollectionSearchResponse"];
642
+ };
643
+ };
644
+ /** @description Bad Request - Invalid input */
645
+ 400: {
646
+ headers: {
647
+ [name: string]: unknown;
648
+ };
649
+ content: {
650
+ /**
651
+ * @example {
652
+ * "error": "Validation failed",
653
+ * "details": {
654
+ * "issues": [
655
+ * {
656
+ * "path": [
657
+ * "properties",
658
+ * "label"
659
+ * ],
660
+ * "message": "Required"
661
+ * }
662
+ * ]
663
+ * }
664
+ * }
665
+ */
666
+ "application/json": components["schemas"]["ValidationErrorResponse"];
667
+ };
668
+ };
669
+ /** @description Unauthorized - Missing or invalid authentication */
670
+ 401: {
671
+ headers: {
672
+ [name: string]: unknown;
673
+ };
674
+ content: {
675
+ /**
676
+ * @example {
677
+ * "error": "Unauthorized: Missing or invalid authentication token"
678
+ * }
679
+ */
680
+ "application/json": components["schemas"]["ErrorResponse"];
681
+ };
682
+ };
683
+ /** @description Search service unavailable */
684
+ 503: {
685
+ headers: {
686
+ [name: string]: unknown;
687
+ };
688
+ content?: never;
689
+ };
690
+ };
691
+ };
692
+ delete?: never;
693
+ options?: never;
694
+ head?: never;
695
+ patch?: never;
696
+ trace?: never;
697
+ };
594
698
  "/collections": {
595
699
  parameters: {
596
700
  query?: never;
@@ -2295,6 +2399,91 @@ type paths = {
2295
2399
  patch?: never;
2296
2400
  trace?: never;
2297
2401
  };
2402
+ "/entities/{id}/tree": {
2403
+ parameters: {
2404
+ query?: never;
2405
+ header?: never;
2406
+ path?: never;
2407
+ cookie?: never;
2408
+ };
2409
+ /**
2410
+ * Get entity tree
2411
+ * @description Returns a hierarchical tree of entities reachable from the source entity.
2412
+ *
2413
+ * Use this to browse collections and folders without making multiple API calls.
2414
+ * The tree follows relationship edges (optionally filtered by predicate) and
2415
+ * returns a nested structure suitable for tree UI rendering.
2416
+ *
2417
+ * Query parameters:
2418
+ * - `depth`: Max tree depth (1-4, default 2)
2419
+ * - `collection`: Constrain to entities in this collection
2420
+ * - `predicates`: Comma-separated predicates to follow (e.g., "contains")
2421
+ * - `limit`: Max nodes to return (default 100)
2422
+ */
2423
+ get: {
2424
+ parameters: {
2425
+ query?: {
2426
+ depth?: number;
2427
+ collection?: string;
2428
+ predicates?: string;
2429
+ limit?: number;
2430
+ };
2431
+ header?: never;
2432
+ path: {
2433
+ /** @description Entity ID (ULID) */
2434
+ id: string;
2435
+ };
2436
+ cookie?: never;
2437
+ };
2438
+ requestBody?: never;
2439
+ responses: {
2440
+ /** @description Tree retrieved */
2441
+ 200: {
2442
+ headers: {
2443
+ [name: string]: unknown;
2444
+ };
2445
+ content: {
2446
+ "application/json": components["schemas"]["TreeResponse"];
2447
+ };
2448
+ };
2449
+ /** @description Forbidden - Insufficient permissions */
2450
+ 403: {
2451
+ headers: {
2452
+ [name: string]: unknown;
2453
+ };
2454
+ content: {
2455
+ /**
2456
+ * @example {
2457
+ * "error": "Forbidden: You do not have permission to perform this action"
2458
+ * }
2459
+ */
2460
+ "application/json": components["schemas"]["ErrorResponse"];
2461
+ };
2462
+ };
2463
+ /** @description Not Found - Resource does not exist */
2464
+ 404: {
2465
+ headers: {
2466
+ [name: string]: unknown;
2467
+ };
2468
+ content: {
2469
+ /**
2470
+ * @example {
2471
+ * "error": "Entity not found"
2472
+ * }
2473
+ */
2474
+ "application/json": components["schemas"]["ErrorResponse"];
2475
+ };
2476
+ };
2477
+ };
2478
+ };
2479
+ put?: never;
2480
+ post?: never;
2481
+ delete?: never;
2482
+ options?: never;
2483
+ head?: never;
2484
+ patch?: never;
2485
+ trace?: never;
2486
+ };
2298
2487
  "/relationships": {
2299
2488
  parameters: {
2300
2489
  query?: never;
@@ -5734,72 +5923,121 @@ type paths = {
5734
5923
  patch?: never;
5735
5924
  trace?: never;
5736
5925
  };
5737
- "/entities/{id}/attestation": {
5926
+ "/search/similar/collections": {
5738
5927
  parameters: {
5739
5928
  query?: never;
5740
5929
  header?: never;
5741
5930
  path?: never;
5742
5931
  cookie?: never;
5743
5932
  };
5933
+ get?: never;
5934
+ put?: never;
5744
5935
  /**
5745
- * Get latest attestation
5746
- * @description Returns the Arweave attestation for the current (latest) version of an entity.
5936
+ * Find similar collections
5937
+ * @description Find collections that are semantically similar to a given collection.
5747
5938
  *
5748
- * Returns 202 Accepted if the attestation upload is still pending.
5939
+ * Uses the collection's weighted centroid vector (combination of description and entity embeddings) to find related collections.
5749
5940
  */
5750
- get: {
5941
+ post: {
5751
5942
  parameters: {
5752
5943
  query?: never;
5753
5944
  header?: never;
5754
- path: {
5755
- /** @description Entity ID (ULID) */
5756
- id: string;
5757
- };
5945
+ path?: never;
5758
5946
  cookie?: never;
5759
5947
  };
5760
- requestBody?: never;
5948
+ requestBody?: {
5949
+ content: {
5950
+ "application/json": {
5951
+ /** @description Collection PI to find similar collections for */
5952
+ pi: string;
5953
+ /**
5954
+ * @description Maximum results to return
5955
+ * @default 10
5956
+ */
5957
+ limit?: number;
5958
+ /**
5959
+ * @description Force fresh query, bypassing cache
5960
+ * @default false
5961
+ */
5962
+ refresh?: boolean;
5963
+ };
5964
+ };
5965
+ };
5761
5966
  responses: {
5762
- /** @description Attestation found */
5967
+ /** @description Similar collections found */
5763
5968
  200: {
5764
5969
  headers: {
5765
5970
  [name: string]: unknown;
5766
5971
  };
5767
5972
  content: {
5768
- "application/json": components["schemas"]["AttestationResponse"];
5973
+ "application/json": {
5974
+ results: {
5975
+ pi: string;
5976
+ label: string;
5977
+ score: number;
5978
+ created_at?: string;
5979
+ updated_at?: string;
5980
+ }[];
5981
+ metadata: {
5982
+ source_pi: string;
5983
+ result_count: number;
5984
+ cached?: boolean;
5985
+ cached_at?: string;
5986
+ };
5987
+ };
5769
5988
  };
5770
5989
  };
5771
- /** @description Attestation pending */
5772
- 202: {
5990
+ /** @description Bad Request - Invalid input */
5991
+ 400: {
5773
5992
  headers: {
5774
5993
  [name: string]: unknown;
5775
5994
  };
5776
5995
  content: {
5777
- "application/json": components["schemas"]["AttestationPendingResponse"];
5996
+ /**
5997
+ * @example {
5998
+ * "error": "Validation failed",
5999
+ * "details": {
6000
+ * "issues": [
6001
+ * {
6002
+ * "path": [
6003
+ * "properties",
6004
+ * "label"
6005
+ * ],
6006
+ * "message": "Required"
6007
+ * }
6008
+ * ]
6009
+ * }
6010
+ * }
6011
+ */
6012
+ "application/json": components["schemas"]["ValidationErrorResponse"];
5778
6013
  };
5779
6014
  };
5780
- /** @description Forbidden - Insufficient permissions */
5781
- 403: {
6015
+ /** @description Not Found - Resource does not exist */
6016
+ 404: {
5782
6017
  headers: {
5783
6018
  [name: string]: unknown;
5784
6019
  };
5785
6020
  content: {
5786
6021
  /**
5787
6022
  * @example {
5788
- * "error": "Forbidden: You do not have permission to perform this action"
6023
+ * "error": "Entity not found"
5789
6024
  * }
5790
6025
  */
5791
6026
  "application/json": components["schemas"]["ErrorResponse"];
5792
6027
  };
5793
6028
  };
5794
- /** @description Not Found - Resource does not exist */
5795
- 404: {
6029
+ /** @description Service Unavailable - External service not available */
6030
+ 503: {
5796
6031
  headers: {
5797
6032
  [name: string]: unknown;
5798
6033
  };
5799
6034
  content: {
5800
6035
  /**
5801
6036
  * @example {
5802
- * "error": "Entity not found"
6037
+ * "error": "Service unavailable",
6038
+ * "details": {
6039
+ * "service": "pinecone"
6040
+ * }
5803
6041
  * }
5804
6042
  */
5805
6043
  "application/json": components["schemas"]["ErrorResponse"];
@@ -5807,60 +6045,648 @@ type paths = {
5807
6045
  };
5808
6046
  };
5809
6047
  };
5810
- put?: never;
5811
- post?: never;
5812
6048
  delete?: never;
5813
6049
  options?: never;
5814
6050
  head?: never;
5815
6051
  patch?: never;
5816
6052
  trace?: never;
5817
6053
  };
5818
- "/versions/{id}/{ver}/attestation": {
6054
+ "/search/similar/items": {
5819
6055
  parameters: {
5820
6056
  query?: never;
5821
6057
  header?: never;
5822
6058
  path?: never;
5823
6059
  cookie?: never;
5824
6060
  };
6061
+ get?: never;
6062
+ put?: never;
5825
6063
  /**
5826
- * Get version attestation
5827
- * @description Returns the Arweave attestation for a specific version of an entity.
6064
+ * Find similar items across collections
6065
+ * @description Find entities that are semantically similar to a given entity, searching across multiple collections.
6066
+ *
6067
+ * This performs a two-tier search:
6068
+ * 1. First finds collections similar to the entity's collection
6069
+ * 2. Then searches within each collection for similar items
6070
+ * 3. Aggregates and ranks results with diversity weighting
5828
6071
  */
5829
- get: {
6072
+ post: {
5830
6073
  parameters: {
5831
6074
  query?: never;
5832
6075
  header?: never;
5833
- path: {
5834
- /** @description Entity ID (ULID) */
5835
- id: string;
5836
- /** @description Version number */
5837
- ver: number;
5838
- };
6076
+ path?: never;
5839
6077
  cookie?: never;
5840
6078
  };
5841
- requestBody?: never;
6079
+ requestBody?: {
6080
+ content: {
6081
+ "application/json": {
6082
+ /** @description Entity PI to find similar items for */
6083
+ pi: string;
6084
+ /** @description Entity's collection PI */
6085
+ collection_pi: string;
6086
+ /**
6087
+ * @description Maximum results to return
6088
+ * @default 20
6089
+ */
6090
+ limit?: number;
6091
+ /**
6092
+ * @description Number of similar collections to search
6093
+ * @default 10
6094
+ */
6095
+ tier1_limit?: number;
6096
+ /**
6097
+ * @description Items to fetch per collection
6098
+ * @default 5
6099
+ */
6100
+ tier2_limit?: number;
6101
+ /**
6102
+ * @description Include results from the same collection
6103
+ * @default true
6104
+ */
6105
+ include_same_collection?: boolean;
6106
+ /**
6107
+ * @description Force fresh query, bypassing cache
6108
+ * @default false
6109
+ */
6110
+ refresh?: boolean;
6111
+ };
6112
+ };
6113
+ };
5842
6114
  responses: {
5843
- /** @description Attestation found */
6115
+ /** @description Similar items found */
5844
6116
  200: {
5845
6117
  headers: {
5846
6118
  [name: string]: unknown;
5847
6119
  };
5848
6120
  content: {
5849
- "application/json": components["schemas"]["AttestationResponse"];
6121
+ "application/json": {
6122
+ results: {
6123
+ pi: string;
6124
+ type: string;
6125
+ label: string;
6126
+ collection_pi: string | null;
6127
+ score: number;
6128
+ created_at?: string;
6129
+ updated_at?: string;
6130
+ }[];
6131
+ metadata: {
6132
+ source_pi: string;
6133
+ collections_searched: number;
6134
+ result_count: number;
6135
+ cached?: boolean;
6136
+ cached_at?: string;
6137
+ };
6138
+ };
5850
6139
  };
5851
6140
  };
5852
- /** @description Forbidden - Insufficient permissions */
5853
- 403: {
6141
+ /** @description Bad Request - Invalid input */
6142
+ 400: {
5854
6143
  headers: {
5855
6144
  [name: string]: unknown;
5856
6145
  };
5857
6146
  content: {
5858
6147
  /**
5859
6148
  * @example {
5860
- * "error": "Forbidden: You do not have permission to perform this action"
5861
- * }
5862
- */
5863
- "application/json": components["schemas"]["ErrorResponse"];
6149
+ * "error": "Validation failed",
6150
+ * "details": {
6151
+ * "issues": [
6152
+ * {
6153
+ * "path": [
6154
+ * "properties",
6155
+ * "label"
6156
+ * ],
6157
+ * "message": "Required"
6158
+ * }
6159
+ * ]
6160
+ * }
6161
+ * }
6162
+ */
6163
+ "application/json": components["schemas"]["ValidationErrorResponse"];
6164
+ };
6165
+ };
6166
+ /** @description Not Found - Resource does not exist */
6167
+ 404: {
6168
+ headers: {
6169
+ [name: string]: unknown;
6170
+ };
6171
+ content: {
6172
+ /**
6173
+ * @example {
6174
+ * "error": "Entity not found"
6175
+ * }
6176
+ */
6177
+ "application/json": components["schemas"]["ErrorResponse"];
6178
+ };
6179
+ };
6180
+ /** @description Service Unavailable - External service not available */
6181
+ 503: {
6182
+ headers: {
6183
+ [name: string]: unknown;
6184
+ };
6185
+ content: {
6186
+ /**
6187
+ * @example {
6188
+ * "error": "Service unavailable",
6189
+ * "details": {
6190
+ * "service": "pinecone"
6191
+ * }
6192
+ * }
6193
+ */
6194
+ "application/json": components["schemas"]["ErrorResponse"];
6195
+ };
6196
+ };
6197
+ };
6198
+ };
6199
+ delete?: never;
6200
+ options?: never;
6201
+ head?: never;
6202
+ patch?: never;
6203
+ trace?: never;
6204
+ };
6205
+ "/search/collections": {
6206
+ parameters: {
6207
+ query?: never;
6208
+ header?: never;
6209
+ path?: never;
6210
+ cookie?: never;
6211
+ };
6212
+ get?: never;
6213
+ put?: never;
6214
+ /**
6215
+ * Search collections by text
6216
+ * @description Search for collections using semantic text search.
6217
+ *
6218
+ * Use this endpoint to discover collections about a topic. Results are ranked by semantic similarity to your query.
6219
+ */
6220
+ post: {
6221
+ parameters: {
6222
+ query?: never;
6223
+ header?: never;
6224
+ path?: never;
6225
+ cookie?: never;
6226
+ };
6227
+ requestBody?: {
6228
+ content: {
6229
+ "application/json": {
6230
+ /** @description Search query text */
6231
+ query: string;
6232
+ /**
6233
+ * @description Maximum results to return
6234
+ * @default 10
6235
+ */
6236
+ limit?: number;
6237
+ /** @description Filter by collection types */
6238
+ types?: string[];
6239
+ };
6240
+ };
6241
+ };
6242
+ responses: {
6243
+ /** @description Search results */
6244
+ 200: {
6245
+ headers: {
6246
+ [name: string]: unknown;
6247
+ };
6248
+ content: {
6249
+ "application/json": {
6250
+ results: {
6251
+ pi: string;
6252
+ label: string;
6253
+ type: string;
6254
+ score: number;
6255
+ created_at?: string;
6256
+ updated_at?: string;
6257
+ }[];
6258
+ metadata: {
6259
+ query: string;
6260
+ result_count: number;
6261
+ };
6262
+ };
6263
+ };
6264
+ };
6265
+ /** @description Bad Request - Invalid input */
6266
+ 400: {
6267
+ headers: {
6268
+ [name: string]: unknown;
6269
+ };
6270
+ content: {
6271
+ /**
6272
+ * @example {
6273
+ * "error": "Validation failed",
6274
+ * "details": {
6275
+ * "issues": [
6276
+ * {
6277
+ * "path": [
6278
+ * "properties",
6279
+ * "label"
6280
+ * ],
6281
+ * "message": "Required"
6282
+ * }
6283
+ * ]
6284
+ * }
6285
+ * }
6286
+ */
6287
+ "application/json": components["schemas"]["ValidationErrorResponse"];
6288
+ };
6289
+ };
6290
+ /** @description Service Unavailable - External service not available */
6291
+ 503: {
6292
+ headers: {
6293
+ [name: string]: unknown;
6294
+ };
6295
+ content: {
6296
+ /**
6297
+ * @example {
6298
+ * "error": "Service unavailable",
6299
+ * "details": {
6300
+ * "service": "pinecone"
6301
+ * }
6302
+ * }
6303
+ */
6304
+ "application/json": components["schemas"]["ErrorResponse"];
6305
+ };
6306
+ };
6307
+ };
6308
+ };
6309
+ delete?: never;
6310
+ options?: never;
6311
+ head?: never;
6312
+ patch?: never;
6313
+ trace?: never;
6314
+ };
6315
+ "/search/entities": {
6316
+ parameters: {
6317
+ query?: never;
6318
+ header?: never;
6319
+ path?: never;
6320
+ cookie?: never;
6321
+ };
6322
+ get?: never;
6323
+ put?: never;
6324
+ /**
6325
+ * Search entities within collection(s)
6326
+ * @description Search for entities within one or more collections using semantic text search.
6327
+ *
6328
+ * Provide either `collection_pi` for a single collection or `collection_pis` for multiple collections (searched in parallel).
6329
+ *
6330
+ * Use `per_collection_limit` to ensure result diversity when searching multiple collections.
6331
+ */
6332
+ post: {
6333
+ parameters: {
6334
+ query?: never;
6335
+ header?: never;
6336
+ path?: never;
6337
+ cookie?: never;
6338
+ };
6339
+ requestBody?: {
6340
+ content: {
6341
+ "application/json": {
6342
+ /** @description Single collection PI to search within */
6343
+ collection_pi?: string;
6344
+ /** @description Multiple collection PIs to search (max 20) */
6345
+ collection_pis?: string[];
6346
+ /** @description Search query text */
6347
+ query: string;
6348
+ /**
6349
+ * @description Maximum total results to return
6350
+ * @default 20
6351
+ */
6352
+ limit?: number;
6353
+ /** @description Filter by entity types */
6354
+ types?: string[];
6355
+ /** @description Max results per collection for diversity */
6356
+ per_collection_limit?: number;
6357
+ };
6358
+ };
6359
+ };
6360
+ responses: {
6361
+ /** @description Search results */
6362
+ 200: {
6363
+ headers: {
6364
+ [name: string]: unknown;
6365
+ };
6366
+ content: {
6367
+ "application/json": {
6368
+ results: {
6369
+ pi: string;
6370
+ label: string;
6371
+ type: string;
6372
+ score: number;
6373
+ collection_pi: string;
6374
+ created_at?: string;
6375
+ updated_at?: string;
6376
+ }[];
6377
+ metadata: {
6378
+ collection_pis: string[];
6379
+ query: string;
6380
+ collections_searched: number;
6381
+ result_count: number;
6382
+ };
6383
+ };
6384
+ };
6385
+ };
6386
+ /** @description Bad Request - Invalid input */
6387
+ 400: {
6388
+ headers: {
6389
+ [name: string]: unknown;
6390
+ };
6391
+ content: {
6392
+ /**
6393
+ * @example {
6394
+ * "error": "Validation failed",
6395
+ * "details": {
6396
+ * "issues": [
6397
+ * {
6398
+ * "path": [
6399
+ * "properties",
6400
+ * "label"
6401
+ * ],
6402
+ * "message": "Required"
6403
+ * }
6404
+ * ]
6405
+ * }
6406
+ * }
6407
+ */
6408
+ "application/json": components["schemas"]["ValidationErrorResponse"];
6409
+ };
6410
+ };
6411
+ /** @description Service Unavailable - External service not available */
6412
+ 503: {
6413
+ headers: {
6414
+ [name: string]: unknown;
6415
+ };
6416
+ content: {
6417
+ /**
6418
+ * @example {
6419
+ * "error": "Service unavailable",
6420
+ * "details": {
6421
+ * "service": "pinecone"
6422
+ * }
6423
+ * }
6424
+ */
6425
+ "application/json": components["schemas"]["ErrorResponse"];
6426
+ };
6427
+ };
6428
+ };
6429
+ };
6430
+ delete?: never;
6431
+ options?: never;
6432
+ head?: never;
6433
+ patch?: never;
6434
+ trace?: never;
6435
+ };
6436
+ "/search/discover": {
6437
+ parameters: {
6438
+ query?: never;
6439
+ header?: never;
6440
+ path?: never;
6441
+ cookie?: never;
6442
+ };
6443
+ get?: never;
6444
+ put?: never;
6445
+ /**
6446
+ * Discover entities across all collections
6447
+ * @description Two-step discovery search: first finds relevant collections, then searches within them.
6448
+ *
6449
+ * Use this endpoint when you don't know which collections to search. The system will:
6450
+ * 1. Find collections semantically related to your query
6451
+ * 2. Search within each collection in parallel
6452
+ * 3. Aggregate and rank results across all collections
6453
+ *
6454
+ * Great for exploration and AI agents navigating the network.
6455
+ */
6456
+ post: {
6457
+ parameters: {
6458
+ query?: never;
6459
+ header?: never;
6460
+ path?: never;
6461
+ cookie?: never;
6462
+ };
6463
+ requestBody?: {
6464
+ content: {
6465
+ "application/json": {
6466
+ /** @description Search query text */
6467
+ query: string;
6468
+ /**
6469
+ * @description Maximum total results to return
6470
+ * @default 20
6471
+ */
6472
+ limit?: number;
6473
+ /** @description Filter by entity types */
6474
+ types?: string[];
6475
+ /**
6476
+ * @description Number of collections to search
6477
+ * @default 10
6478
+ */
6479
+ collection_limit?: number;
6480
+ /**
6481
+ * @description Max results per collection
6482
+ * @default 5
6483
+ */
6484
+ per_collection_limit?: number;
6485
+ };
6486
+ };
6487
+ };
6488
+ responses: {
6489
+ /** @description Discovery results */
6490
+ 200: {
6491
+ headers: {
6492
+ [name: string]: unknown;
6493
+ };
6494
+ content: {
6495
+ "application/json": {
6496
+ results: {
6497
+ pi: string;
6498
+ label: string;
6499
+ type: string;
6500
+ score: number;
6501
+ collection_pi: string;
6502
+ created_at?: string;
6503
+ updated_at?: string;
6504
+ }[];
6505
+ metadata: {
6506
+ query: string;
6507
+ collections_searched: number;
6508
+ result_count: number;
6509
+ };
6510
+ };
6511
+ };
6512
+ };
6513
+ /** @description Bad Request - Invalid input */
6514
+ 400: {
6515
+ headers: {
6516
+ [name: string]: unknown;
6517
+ };
6518
+ content: {
6519
+ /**
6520
+ * @example {
6521
+ * "error": "Validation failed",
6522
+ * "details": {
6523
+ * "issues": [
6524
+ * {
6525
+ * "path": [
6526
+ * "properties",
6527
+ * "label"
6528
+ * ],
6529
+ * "message": "Required"
6530
+ * }
6531
+ * ]
6532
+ * }
6533
+ * }
6534
+ */
6535
+ "application/json": components["schemas"]["ValidationErrorResponse"];
6536
+ };
6537
+ };
6538
+ /** @description Service Unavailable - External service not available */
6539
+ 503: {
6540
+ headers: {
6541
+ [name: string]: unknown;
6542
+ };
6543
+ content: {
6544
+ /**
6545
+ * @example {
6546
+ * "error": "Service unavailable",
6547
+ * "details": {
6548
+ * "service": "pinecone"
6549
+ * }
6550
+ * }
6551
+ */
6552
+ "application/json": components["schemas"]["ErrorResponse"];
6553
+ };
6554
+ };
6555
+ };
6556
+ };
6557
+ delete?: never;
6558
+ options?: never;
6559
+ head?: never;
6560
+ patch?: never;
6561
+ trace?: never;
6562
+ };
6563
+ "/entities/{id}/attestation": {
6564
+ parameters: {
6565
+ query?: never;
6566
+ header?: never;
6567
+ path?: never;
6568
+ cookie?: never;
6569
+ };
6570
+ /**
6571
+ * Get latest attestation
6572
+ * @description Returns the Arweave attestation for the current (latest) version of an entity.
6573
+ *
6574
+ * Returns 202 Accepted if the attestation upload is still pending.
6575
+ */
6576
+ get: {
6577
+ parameters: {
6578
+ query?: never;
6579
+ header?: never;
6580
+ path: {
6581
+ /** @description Entity ID (ULID) */
6582
+ id: string;
6583
+ };
6584
+ cookie?: never;
6585
+ };
6586
+ requestBody?: never;
6587
+ responses: {
6588
+ /** @description Attestation found */
6589
+ 200: {
6590
+ headers: {
6591
+ [name: string]: unknown;
6592
+ };
6593
+ content: {
6594
+ "application/json": components["schemas"]["AttestationResponse"];
6595
+ };
6596
+ };
6597
+ /** @description Attestation pending */
6598
+ 202: {
6599
+ headers: {
6600
+ [name: string]: unknown;
6601
+ };
6602
+ content: {
6603
+ "application/json": components["schemas"]["AttestationPendingResponse"];
6604
+ };
6605
+ };
6606
+ /** @description Forbidden - Insufficient permissions */
6607
+ 403: {
6608
+ headers: {
6609
+ [name: string]: unknown;
6610
+ };
6611
+ content: {
6612
+ /**
6613
+ * @example {
6614
+ * "error": "Forbidden: You do not have permission to perform this action"
6615
+ * }
6616
+ */
6617
+ "application/json": components["schemas"]["ErrorResponse"];
6618
+ };
6619
+ };
6620
+ /** @description Not Found - Resource does not exist */
6621
+ 404: {
6622
+ headers: {
6623
+ [name: string]: unknown;
6624
+ };
6625
+ content: {
6626
+ /**
6627
+ * @example {
6628
+ * "error": "Entity not found"
6629
+ * }
6630
+ */
6631
+ "application/json": components["schemas"]["ErrorResponse"];
6632
+ };
6633
+ };
6634
+ };
6635
+ };
6636
+ put?: never;
6637
+ post?: never;
6638
+ delete?: never;
6639
+ options?: never;
6640
+ head?: never;
6641
+ patch?: never;
6642
+ trace?: never;
6643
+ };
6644
+ "/versions/{id}/{ver}/attestation": {
6645
+ parameters: {
6646
+ query?: never;
6647
+ header?: never;
6648
+ path?: never;
6649
+ cookie?: never;
6650
+ };
6651
+ /**
6652
+ * Get version attestation
6653
+ * @description Returns the Arweave attestation for a specific version of an entity.
6654
+ */
6655
+ get: {
6656
+ parameters: {
6657
+ query?: never;
6658
+ header?: never;
6659
+ path: {
6660
+ /** @description Entity ID (ULID) */
6661
+ id: string;
6662
+ /** @description Version number */
6663
+ ver: number;
6664
+ };
6665
+ cookie?: never;
6666
+ };
6667
+ requestBody?: never;
6668
+ responses: {
6669
+ /** @description Attestation found */
6670
+ 200: {
6671
+ headers: {
6672
+ [name: string]: unknown;
6673
+ };
6674
+ content: {
6675
+ "application/json": components["schemas"]["AttestationResponse"];
6676
+ };
6677
+ };
6678
+ /** @description Forbidden - Insufficient permissions */
6679
+ 403: {
6680
+ headers: {
6681
+ [name: string]: unknown;
6682
+ };
6683
+ content: {
6684
+ /**
6685
+ * @example {
6686
+ * "error": "Forbidden: You do not have permission to perform this action"
6687
+ * }
6688
+ */
6689
+ "application/json": components["schemas"]["ErrorResponse"];
5864
6690
  };
5865
6691
  };
5866
6692
  /** @description Not Found - Resource does not exist */
@@ -6254,6 +7080,93 @@ type components = {
6254
7080
  has_more: boolean;
6255
7081
  };
6256
7082
  };
7083
+ SearchResultItem: {
7084
+ /**
7085
+ * @description Entity persistent identifier
7086
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
7087
+ */
7088
+ pi: string;
7089
+ /**
7090
+ * @description Entity type
7091
+ * @example file
7092
+ */
7093
+ type: string;
7094
+ /**
7095
+ * @description Entity label/name
7096
+ * @example Research Paper.pdf
7097
+ */
7098
+ label: string;
7099
+ /**
7100
+ * @description Collection this entity belongs to (null for public-domain)
7101
+ * @example 01JCOLLECTION123456789AB
7102
+ */
7103
+ collection_pi: string | null;
7104
+ /**
7105
+ * @description Relevance score (0-1, higher is better)
7106
+ * @example 0.87
7107
+ */
7108
+ score: number;
7109
+ /**
7110
+ * @description When the entity was created
7111
+ * @example 2026-01-12T00:00:00.000Z
7112
+ */
7113
+ created_at?: string;
7114
+ /**
7115
+ * @description When the entity was last updated
7116
+ * @example 2026-01-12T10:30:00.000Z
7117
+ */
7118
+ updated_at?: string;
7119
+ };
7120
+ /** @description Search metadata and statistics */
7121
+ SearchMetadata: {
7122
+ /** @description Original search query */
7123
+ query: string;
7124
+ /** @description Number of collections searched */
7125
+ collections_queried: number;
7126
+ /** @description Total collections user has access to */
7127
+ collections_total: number;
7128
+ /** @description Whether public-domain was included */
7129
+ include_public: boolean;
7130
+ /** @description Total execution time in milliseconds */
7131
+ execution_time_ms: number;
7132
+ /** @description Number of results returned */
7133
+ result_count: number;
7134
+ };
7135
+ CrossCollectionSearchResponse: {
7136
+ /** @description Search results ranked by relevance */
7137
+ results: components["schemas"]["SearchResultItem"][];
7138
+ metadata: components["schemas"]["SearchMetadata"];
7139
+ };
7140
+ CrossCollectionSearchRequest: {
7141
+ /**
7142
+ * @description Search query text for semantic matching
7143
+ * @example medical research
7144
+ */
7145
+ query: string;
7146
+ /**
7147
+ * @description Filter results to specific entity type
7148
+ * @example file
7149
+ */
7150
+ type?: string;
7151
+ /**
7152
+ * @description Filter collections by user role (only search collections where user has this role)
7153
+ * @example owner
7154
+ * @enum {string}
7155
+ */
7156
+ role?: "owner" | "editor" | "viewer";
7157
+ /**
7158
+ * @description Include results from public-domain namespace (default: false)
7159
+ * @default false
7160
+ * @example false
7161
+ */
7162
+ include_public: boolean;
7163
+ /**
7164
+ * @description Maximum number of results to return (default: 20, max: 100)
7165
+ * @default 20
7166
+ * @example 50
7167
+ */
7168
+ limit: number;
7169
+ };
6257
7170
  CollectionResponse: components["schemas"]["EntityResponse"] & {
6258
7171
  /** @enum {string} */
6259
7172
  type?: "collection";
@@ -6906,6 +7819,29 @@ type components = {
6906
7819
  */
6907
7820
  collection_id: string | null;
6908
7821
  };
7822
+ /** @description Root node with nested children */
7823
+ TreeNode: {
7824
+ /**
7825
+ * @description Entity ID (ULID format)
7826
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
7827
+ */
7828
+ pi: string;
7829
+ /** @description Entity label */
7830
+ label: string;
7831
+ /** @description Entity type */
7832
+ type: string;
7833
+ /** @description Depth in tree (0 = root) */
7834
+ depth: number;
7835
+ /** @description Child nodes (recursive TreeNode array) */
7836
+ children: components["schemas"]["TreeNode"][];
7837
+ };
7838
+ TreeResponse: {
7839
+ root: components["schemas"]["TreeNode"];
7840
+ /** @description Total number of nodes in the tree */
7841
+ total_nodes: number;
7842
+ /** @description Whether results were truncated due to limit */
7843
+ truncated: boolean;
7844
+ };
6909
7845
  AddRelationshipResponse: {
6910
7846
  source: components["schemas"]["EntityResponse"] & unknown;
6911
7847
  target?: components["schemas"]["EntityResponse"] & unknown;
@@ -7128,9 +8064,14 @@ type components = {
7128
8064
  */
7129
8065
  size: number;
7130
8066
  /**
7131
- * @description Description of the file
8067
+ * @description Display label for the file. Defaults to filename if not provided.
7132
8068
  * @example Q4 Financial Report
7133
8069
  */
8070
+ label?: string;
8071
+ /**
8072
+ * @description Description of the file
8073
+ * @example Quarterly financial report for Q4 2024
8074
+ */
7134
8075
  description?: string;
7135
8076
  /**
7136
8077
  * @description Additional properties to store
@@ -7254,6 +8195,8 @@ type components = {
7254
8195
  content_type?: string;
7255
8196
  /** @description New file size in bytes */
7256
8197
  size?: number;
8198
+ /** @description New display label */
8199
+ label?: string;
7257
8200
  /** @description New description */
7258
8201
  description?: string;
7259
8202
  };
@@ -7292,6 +8235,8 @@ type components = {
7292
8235
  size: number;
7293
8236
  /** @description New filename (optional, keeps current if not provided) */
7294
8237
  filename?: string;
8238
+ /** @description New display label (optional, keeps current if not provided) */
8239
+ label?: string;
7295
8240
  /** @description New description */
7296
8241
  description?: string;
7297
8242
  };