@arke-institute/sdk 3.6.11 → 3.6.14

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-02-16T23:01:40.798Z
9
+ * Generated: 2026-02-20T03:10:32.965Z
10
10
  */
11
11
  type paths = {
12
12
  "/ops-reference": {
@@ -1037,6 +1037,88 @@ type paths = {
1037
1037
  patch?: never;
1038
1038
  trace?: never;
1039
1039
  };
1040
+ "/collections/catalog": {
1041
+ parameters: {
1042
+ query?: never;
1043
+ header?: never;
1044
+ path?: never;
1045
+ cookie?: never;
1046
+ };
1047
+ /**
1048
+ * List all collections for catalog/sitemap
1049
+ * @description Returns a paginated list of all collection IDs and their last update times.
1050
+ *
1051
+ * This endpoint is designed for sitemap generation and discovery services. It returns minimal data (just IDs and timestamps) for efficiency.
1052
+ *
1053
+ * **Lazy Population:** The catalog is populated as collections are created or updated. Newly created collections may take a moment to appear.
1054
+ *
1055
+ * **No Authentication Required:** This endpoint is public to allow crawlers and discovery services to access it.
1056
+ *
1057
+ * ---
1058
+ * **Permission:** `catalog:list`
1059
+ * **Auth:** none
1060
+ */
1061
+ get: {
1062
+ parameters: {
1063
+ query?: {
1064
+ limit?: number;
1065
+ offset?: number | null;
1066
+ };
1067
+ header?: never;
1068
+ path?: never;
1069
+ cookie?: never;
1070
+ };
1071
+ requestBody?: never;
1072
+ responses: {
1073
+ /** @description Paginated list of collections */
1074
+ 200: {
1075
+ headers: {
1076
+ [name: string]: unknown;
1077
+ };
1078
+ content: {
1079
+ "application/json": {
1080
+ data: {
1081
+ /**
1082
+ * @description Collection ID (PI)
1083
+ * @example 01JEXAMPLE...
1084
+ */
1085
+ id: string;
1086
+ /**
1087
+ * @description ISO timestamp of last update
1088
+ * @example 2026-02-17T12:00:00Z
1089
+ */
1090
+ updated_at: string;
1091
+ }[];
1092
+ pagination: {
1093
+ /** @description Total number of collections in catalog */
1094
+ total: number;
1095
+ /** @description Requested limit */
1096
+ limit: number;
1097
+ /** @description Current offset */
1098
+ offset: number;
1099
+ /** @description Whether more results are available */
1100
+ has_more: boolean;
1101
+ };
1102
+ };
1103
+ };
1104
+ };
1105
+ /** @description Collections catalog service unavailable */
1106
+ 503: {
1107
+ headers: {
1108
+ [name: string]: unknown;
1109
+ };
1110
+ content?: never;
1111
+ };
1112
+ };
1113
+ };
1114
+ put?: never;
1115
+ post?: never;
1116
+ delete?: never;
1117
+ options?: never;
1118
+ head?: never;
1119
+ patch?: never;
1120
+ trace?: never;
1121
+ };
1040
1122
  "/collections/{id}": {
1041
1123
  parameters: {
1042
1124
  query?: never;
@@ -2194,26 +2276,35 @@ type paths = {
2194
2276
  cookie?: never;
2195
2277
  };
2196
2278
  /**
2197
- * Search entities by keyword
2198
- * @description Fast (~5ms) keyword search within entity labels in this collection.
2279
+ * Search entities by keyword or similarity
2280
+ * @description Search within a collection's entities using keyword matching or semantic similarity.
2281
+ *
2282
+ * **Keyword Search (q parameter):**
2283
+ * - Fast (~5ms) using per-collection SQLite index
2284
+ * - Case-insensitive substring match on entity labels
2285
+ *
2286
+ * **Semantic Similarity Search (similar_to parameter):**
2287
+ * - Finds entities semantically similar to the given entity ID
2288
+ * - Uses Pinecone vector similarity
2289
+ * - Returns results with similarity scores
2199
2290
  *
2200
- * Uses a per-collection SQLite index for instant substring matching. Complements semantic search for quick keyword lookups.
2291
+ * One of `q` or `similar_to` must be provided.
2201
2292
  *
2202
2293
  * **Query Parameters:**
2203
- * - `q`: Search query (required, case-insensitive substring match)
2294
+ * - `q`: Search query (case-insensitive substring match)
2295
+ * - `similar_to`: Entity ID to find similar items for
2204
2296
  * - `type`: Filter by entity type
2205
2297
  * - `limit`: Maximum results (default: 100, max: 1000)
2206
2298
  *
2207
- * **Note:** This is a simple substring match, not semantic search. Use /query for AI-powered semantic search.
2208
- *
2209
2299
  * ---
2210
2300
  * **Permission:** `collection:view`
2211
2301
  * **Auth:** optional
2212
2302
  */
2213
2303
  get: {
2214
2304
  parameters: {
2215
- query: {
2216
- q: string;
2305
+ query?: {
2306
+ q?: string;
2307
+ similar_to?: string;
2217
2308
  type?: string;
2218
2309
  limit?: number;
2219
2310
  };
@@ -3930,7 +4021,7 @@ type paths = {
3930
4021
  * - Creates a new entity version on each upload
3931
4022
  *
3932
4023
  * **Storage:**
3933
- * Content is stored at `{entity_id}/{key}` in R2, enabling multiple versions per entity.
4024
+ * Content is stored at `{entity_id}/{cid}` in R2, enabling multiple versions per entity without overwriting.
3934
4025
  *
3935
4026
  * ---
3936
4027
  * **Permission:** `entity:update`
@@ -4626,6 +4717,76 @@ type paths = {
4626
4717
  patch?: never;
4627
4718
  trace?: never;
4628
4719
  };
4720
+ "/updates/queue/{id}": {
4721
+ parameters: {
4722
+ query?: never;
4723
+ header?: never;
4724
+ path?: never;
4725
+ cookie?: never;
4726
+ };
4727
+ /**
4728
+ * Get update queue status for entity
4729
+ * @description Returns the status of the additive update queue for a specific entity.
4730
+ *
4731
+ * **Use Cases:**
4732
+ * - Diagnose why additive updates may not have been applied
4733
+ * - Check for pending, processing, or failed updates
4734
+ * - Monitor queue processing progress
4735
+ *
4736
+ * **Response includes:**
4737
+ * - Counts by status (pending, processing, failed)
4738
+ * - Detailed items with actor, relationships count, error messages, attempts
4739
+ *
4740
+ *
4741
+ * ---
4742
+ * **Permission:** `entity:view`
4743
+ * **Auth:** required
4744
+ */
4745
+ get: {
4746
+ parameters: {
4747
+ query?: never;
4748
+ header?: never;
4749
+ path: {
4750
+ /** @description Entity ID (ULID) */
4751
+ id: string;
4752
+ };
4753
+ cookie?: never;
4754
+ };
4755
+ requestBody?: never;
4756
+ responses: {
4757
+ /** @description Queue status retrieved */
4758
+ 200: {
4759
+ headers: {
4760
+ [name: string]: unknown;
4761
+ };
4762
+ content: {
4763
+ "application/json": components["schemas"]["QueueStatusResponse"];
4764
+ };
4765
+ };
4766
+ /** @description Unauthorized - Missing or invalid authentication */
4767
+ 401: {
4768
+ headers: {
4769
+ [name: string]: unknown;
4770
+ };
4771
+ content: {
4772
+ /**
4773
+ * @example {
4774
+ * "error": "Unauthorized: Missing or invalid authentication token"
4775
+ * }
4776
+ */
4777
+ "application/json": components["schemas"]["ErrorResponse"];
4778
+ };
4779
+ };
4780
+ };
4781
+ };
4782
+ put?: never;
4783
+ post?: never;
4784
+ delete?: never;
4785
+ options?: never;
4786
+ head?: never;
4787
+ patch?: never;
4788
+ trace?: never;
4789
+ };
4629
4790
  "/updates/additive": {
4630
4791
  parameters: {
4631
4792
  query?: never;
@@ -9291,7 +9452,7 @@ type components = {
9291
9452
  * @description Whether to merge with default roles (true) or use only provided roles (false). Public role with *:view is always ensured.
9292
9453
  * @default true
9293
9454
  */
9294
- use_roles_default: boolean | null;
9455
+ use_roles_default?: boolean | null;
9295
9456
  /**
9296
9457
  * @description Role definitions. When use_roles_default is true (default), these merge with defaults. When false, these replace defaults entirely.
9297
9458
  * @example {
@@ -9698,13 +9859,22 @@ type components = {
9698
9859
  /** @description Number of entities returned */
9699
9860
  count: number;
9700
9861
  };
9862
+ CollectionEntitySearchResult: components["schemas"]["EntityIndexEntry"] & {
9863
+ /**
9864
+ * @description Similarity score (only present for semantic search via similar_to)
9865
+ * @example 0.87
9866
+ */
9867
+ score?: number;
9868
+ };
9701
9869
  CollectionEntitySearchResponse: {
9702
9870
  /** @description Collection ID */
9703
9871
  collection_id: string;
9704
- /** @description Original search query */
9705
- query: string;
9872
+ /** @description Original search query (for keyword search) */
9873
+ query?: string;
9874
+ /** @description Source entity ID (for similarity search) */
9875
+ similar_to?: string;
9706
9876
  /** @description Matching entities */
9707
- entities: components["schemas"]["EntityIndexEntry"][];
9877
+ entities: components["schemas"]["CollectionEntitySearchResult"][];
9708
9878
  /** @description Number of entities returned */
9709
9879
  count: number;
9710
9880
  };
@@ -9830,7 +10000,7 @@ type components = {
9830
10000
  * @description Wait for collection index update before returning. Use when checking for duplicates immediately after creation. Adds ~1-5ms latency per collection.
9831
10001
  * @default false
9832
10002
  */
9833
- sync_index: boolean | null;
10003
+ sync_index?: boolean | null;
9834
10004
  };
9835
10005
  BatchCreateSuccess: {
9836
10006
  /** @enum {boolean} */
@@ -10012,7 +10182,7 @@ type components = {
10012
10182
  * @description Wait for collection index update before returning. Use when checking index immediately after update.
10013
10183
  * @default false
10014
10184
  */
10015
- sync_index: boolean | null;
10185
+ sync_index?: boolean | null;
10016
10186
  };
10017
10187
  EntityDeletedResponse: {
10018
10188
  /**
@@ -10061,7 +10231,7 @@ type components = {
10061
10231
  * @description Wait for collection index removal before returning. Use when checking index immediately after deletion.
10062
10232
  * @default false
10063
10233
  */
10064
- sync_index: boolean | null;
10234
+ sync_index?: boolean | null;
10065
10235
  };
10066
10236
  CascadeDeletedEntity: {
10067
10237
  /**
@@ -10604,6 +10774,85 @@ type components = {
10604
10774
  */
10605
10775
  expect_tip: string;
10606
10776
  };
10777
+ QueueItem: {
10778
+ /**
10779
+ * @description Queue item ID
10780
+ * @example 1
10781
+ */
10782
+ id: number;
10783
+ /**
10784
+ * @description Actor who queued the update
10785
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
10786
+ */
10787
+ actor_id: string;
10788
+ /**
10789
+ * @description Current status of the queue item
10790
+ * @example pending
10791
+ * @enum {string}
10792
+ */
10793
+ status: "pending" | "processing" | "failed" | "completed";
10794
+ /**
10795
+ * @description Number of relationships in this update
10796
+ * @example 5
10797
+ */
10798
+ relationships_count: number;
10799
+ /**
10800
+ * @description Summary of relationships (predicate + peer)
10801
+ * @example [
10802
+ * {
10803
+ * "predicate": "sent_to",
10804
+ * "peer": "01KDETYWYWM0MJVKM8DK3AEXPY"
10805
+ * }
10806
+ * ]
10807
+ */
10808
+ relationships_summary: {
10809
+ predicate: string;
10810
+ peer: string;
10811
+ }[];
10812
+ /**
10813
+ * @description Top-level property keys being updated
10814
+ * @example [
10815
+ * "extracted",
10816
+ * "metadata"
10817
+ * ]
10818
+ */
10819
+ properties_keys: string[];
10820
+ /**
10821
+ * @description Optional note for the update
10822
+ * @example Extracted by kg-dedupe-resolver
10823
+ */
10824
+ note: string | null;
10825
+ /**
10826
+ * @description Error message if failed
10827
+ * @example CAS conflict after 20 attempts
10828
+ */
10829
+ error: string | null;
10830
+ /**
10831
+ * @description Number of processing attempts
10832
+ * @example 3
10833
+ */
10834
+ attempts: number;
10835
+ /**
10836
+ * @description ISO timestamp when queued
10837
+ * @example 2024-01-15T10:30:00.000Z
10838
+ */
10839
+ queued_at: string;
10840
+ };
10841
+ QueueStatusResponse: {
10842
+ /**
10843
+ * @description Entity ID (ULID format)
10844
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
10845
+ */
10846
+ entity_id: string;
10847
+ /** @description Count of items by status */
10848
+ counts: {
10849
+ pending: number;
10850
+ processing: number;
10851
+ failed: number;
10852
+ };
10853
+ /** @description Detailed queue items (most recent first, max 100) */
10854
+ items: components["schemas"]["QueueItem"][];
10855
+ };
10607
10856
  QueuedUpdateInfo: {
10608
10857
  /**
10609
10858
  * @description Entity ID (ULID format)
@@ -11619,6 +11868,20 @@ type components = {
11619
11868
  /** @description Target step name if condition matches */
11620
11869
  target: string;
11621
11870
  }[];
11871
+ } | {
11872
+ /** @description Target step name for bounded recursion */
11873
+ recurse: string;
11874
+ /**
11875
+ * @description Maximum recursion depth (default: 10)
11876
+ * @example 10
11877
+ */
11878
+ max_depth?: number;
11879
+ /** @description Conditional routing rules */
11880
+ route?: {
11881
+ where: components["schemas"]["WhereCondition"];
11882
+ /** @description Target step name if condition matches */
11883
+ target: string;
11884
+ }[];
11622
11885
  };
11623
11886
  };
11624
11887
  };
@@ -11807,6 +12070,20 @@ type components = {
11807
12070
  /** @description Target step name if condition matches */
11808
12071
  target: string;
11809
12072
  }[];
12073
+ } | {
12074
+ /** @description Target step name for bounded recursion */
12075
+ recurse: string;
12076
+ /**
12077
+ * @description Maximum recursion depth (default: 10)
12078
+ * @example 10
12079
+ */
12080
+ max_depth?: number;
12081
+ /** @description Conditional routing rules */
12082
+ route?: {
12083
+ where: components["schemas"]["WhereCondition"];
12084
+ /** @description Target step name if condition matches */
12085
+ target: string;
12086
+ }[];
11810
12087
  };
11811
12088
  };
11812
12089
  };