@arbidocs/sdk 0.4.62 → 0.4.64

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.
@@ -857,11 +857,14 @@ interface UploadOptions {
857
857
  * backend's ``SkillManager`` recognises them. */
858
858
  wpType?: 'source' | 'skill' | 'artifact' | 'webpage';
859
859
  /**
860
- * Save the upload (a single file) as the next version of this document — any of its versions'
861
- * ids. It becomes the current version and takes the document's sharing, folder and labels.
860
+ * Save the upload (a single file) as the next version of this document. The document keeps its
861
+ * id, sharing, folder and labels; the result's `version` is the new version's number.
862
862
  */
863
863
  versionOf?: string;
864
- /** Record that the upload is a NEW document made from this one (provenance only), e.g. a crop. */
864
+ /**
865
+ * Record that the upload is a NEW document made from this one (provenance only), e.g. a crop.
866
+ * `docId` may name a version (`doc-…@v2`); a plain id means its current version.
867
+ */
865
868
  derivedFrom?: {
866
869
  docId: string;
867
870
  role: 'crop' | 'redline_base' | 'redline_revised';
@@ -873,6 +876,8 @@ interface SkippedFile {
873
876
  }
874
877
  interface UploadResult {
875
878
  doc_ext_ids?: string[];
879
+ /** For an upload saved as a new version (`versionOf`): its number (the id is unchanged). */
880
+ version?: number | null;
876
881
  batch_id?: string | null;
877
882
  skipped?: SkippedFile[];
878
883
  }
@@ -904,13 +909,27 @@ declare function listDocuments(arbi: ArbiClient): Promise<{
904
909
  re_ocred?: boolean | null | undefined;
905
910
  config_ext_id?: string | null | undefined;
906
911
  parent_ext_id?: string | null | undefined;
907
- lineage_id?: string | null | undefined;
908
- version_number: number;
909
- is_current: boolean;
912
+ current_version: number;
913
+ versions: {
914
+ n: number;
915
+ created_at?: string | null | undefined;
916
+ created_by_ext_id?: string | null | undefined;
917
+ reason: "upload" | "edit" | "signed" | "sync";
918
+ file_name?: string | null | undefined;
919
+ file_type?: string | null | undefined;
920
+ file_size?: number | null | undefined;
921
+ content_hash?: string | null | undefined;
922
+ status?: string | null | undefined;
923
+ n_pages?: number | null | undefined;
924
+ n_chunks?: number | null | undefined;
925
+ made_from?: number | null | undefined;
926
+ is_current: boolean;
927
+ }[];
910
928
  thread_id?: string | null | undefined;
911
929
  derived_from: {
912
930
  doc_ext_id: string;
913
931
  role: components["schemas"]["DocRelationRole"];
932
+ version?: number | null | undefined;
914
933
  }[];
915
934
  source_message_ext_id?: string | null | undefined;
916
935
  conversation_ext_id?: string | null | undefined;
@@ -925,6 +944,7 @@ declare function listDocuments(arbi: ArbiClient): Promise<{
925
944
  note?: string | null | undefined;
926
945
  citations?: {
927
946
  doc_ext_id: string;
947
+ version?: number | null | undefined;
928
948
  chunks?: {
929
949
  chunk_id: string;
930
950
  page?: number | null | undefined;
@@ -1012,13 +1032,27 @@ declare function getDocuments(arbi: ArbiClient, externalIds: string[]): Promise<
1012
1032
  re_ocred?: boolean | null | undefined;
1013
1033
  config_ext_id?: string | null | undefined;
1014
1034
  parent_ext_id?: string | null | undefined;
1015
- lineage_id?: string | null | undefined;
1016
- version_number: number;
1017
- is_current: boolean;
1035
+ current_version: number;
1036
+ versions: {
1037
+ n: number;
1038
+ created_at?: string | null | undefined;
1039
+ created_by_ext_id?: string | null | undefined;
1040
+ reason: "upload" | "edit" | "signed" | "sync";
1041
+ file_name?: string | null | undefined;
1042
+ file_type?: string | null | undefined;
1043
+ file_size?: number | null | undefined;
1044
+ content_hash?: string | null | undefined;
1045
+ status?: string | null | undefined;
1046
+ n_pages?: number | null | undefined;
1047
+ n_chunks?: number | null | undefined;
1048
+ made_from?: number | null | undefined;
1049
+ is_current: boolean;
1050
+ }[];
1018
1051
  thread_id?: string | null | undefined;
1019
1052
  derived_from: {
1020
1053
  doc_ext_id: string;
1021
1054
  role: components["schemas"]["DocRelationRole"];
1055
+ version?: number | null | undefined;
1022
1056
  }[];
1023
1057
  source_message_ext_id?: string | null | undefined;
1024
1058
  conversation_ext_id?: string | null | undefined;
@@ -1033,6 +1067,7 @@ declare function getDocuments(arbi: ArbiClient, externalIds: string[]): Promise<
1033
1067
  note?: string | null | undefined;
1034
1068
  citations?: {
1035
1069
  doc_ext_id: string;
1070
+ version?: number | null | undefined;
1036
1071
  chunks?: {
1037
1072
  chunk_id: string;
1038
1073
  page?: number | null | undefined;
@@ -1055,69 +1090,24 @@ declare function getDocuments(arbi: ArbiClient, externalIds: string[]): Promise<
1055
1090
  } | null | undefined;
1056
1091
  }[]>;
1057
1092
  /**
1058
- * Every version of the document `docId` belongs to (any version's id), oldest first; `is_current`
1059
- * marks the current one. Lists and search only show current versions.
1093
+ * Every version of the document `docId`, oldest first; `is_current` marks the current one. A
1094
+ * document keeps one id: older versions are read with a `version` (see `downloadDocument`,
1095
+ * `getParsedContent`) and asked about as `doc-…@v{n}`.
1060
1096
  */
1061
1097
  declare function listVersions(arbi: ArbiClient, docId: string): Promise<{
1062
- external_id: string;
1063
- workspace_ext_id: string;
1098
+ n: number;
1099
+ created_at?: string | null | undefined;
1100
+ created_by_ext_id?: string | null | undefined;
1101
+ reason: "upload" | "edit" | "signed" | "sync";
1064
1102
  file_name?: string | null | undefined;
1065
- status?: string | null | undefined;
1066
- error_message?: string | null | undefined;
1067
- failed_stage?: string | null | undefined;
1068
- n_pages?: number | null | undefined;
1069
- n_chunks?: number | null | undefined;
1070
- tokens?: number | null | undefined;
1071
1103
  file_type?: string | null | undefined;
1072
1104
  file_size?: number | null | undefined;
1073
- storage_type?: string | null | undefined;
1074
- storage_uri?: string | null | undefined;
1075
1105
  content_hash?: string | null | undefined;
1076
- shared?: boolean | null | undefined;
1077
- re_ocred?: boolean | null | undefined;
1078
- config_ext_id?: string | null | undefined;
1079
- parent_ext_id?: string | null | undefined;
1080
- lineage_id?: string | null | undefined;
1081
- version_number: number;
1106
+ status?: string | null | undefined;
1107
+ n_pages?: number | null | undefined;
1108
+ n_chunks?: number | null | undefined;
1109
+ made_from?: number | null | undefined;
1082
1110
  is_current: boolean;
1083
- thread_id?: string | null | undefined;
1084
- derived_from: {
1085
- doc_ext_id: string;
1086
- role: components["schemas"]["DocRelationRole"];
1087
- }[];
1088
- source_message_ext_id?: string | null | undefined;
1089
- conversation_ext_id?: string | null | undefined;
1090
- created_by_ext_id: string;
1091
- updated_by_ext_id?: string | null | undefined;
1092
- created_at: string;
1093
- updated_at: string;
1094
- wp_type?: string | null | undefined;
1095
- folder?: string | null | undefined;
1096
- sender?: string | null | undefined;
1097
- doctags: {
1098
- note?: string | null | undefined;
1099
- citations?: {
1100
- doc_ext_id: string;
1101
- chunks?: {
1102
- chunk_id: string;
1103
- page?: number | null | undefined;
1104
- }[] | undefined;
1105
- }[] | null | undefined;
1106
- external_id: string;
1107
- doc_ext_id: string;
1108
- tag_ext_id: string;
1109
- created_by_ext_id: string;
1110
- updated_by_ext_id?: string | null | undefined;
1111
- created_at: string;
1112
- updated_at: string;
1113
- }[];
1114
- doc_metadata?: {
1115
- doc_nature?: string | null | undefined;
1116
- doc_author?: string | null | undefined;
1117
- doc_subject?: string | null | undefined;
1118
- doc_date?: string | null | undefined;
1119
- title?: string | null | undefined;
1120
- } | null | undefined;
1121
1111
  }[]>;
1122
1112
  /** Delete documents. A document goes with all its versions, and an email with its attachments. */
1123
1113
  declare function deleteDocuments(arbi: ArbiClient, externalIds: string[]): Promise<void>;
@@ -1140,13 +1130,27 @@ declare function updateDocuments(arbi: ArbiClient, documents: DocUpdateRequest$1
1140
1130
  re_ocred?: boolean | null | undefined;
1141
1131
  config_ext_id?: string | null | undefined;
1142
1132
  parent_ext_id?: string | null | undefined;
1143
- lineage_id?: string | null | undefined;
1144
- version_number: number;
1145
- is_current: boolean;
1133
+ current_version: number;
1134
+ versions: {
1135
+ n: number;
1136
+ created_at?: string | null | undefined;
1137
+ created_by_ext_id?: string | null | undefined;
1138
+ reason: "upload" | "edit" | "signed" | "sync";
1139
+ file_name?: string | null | undefined;
1140
+ file_type?: string | null | undefined;
1141
+ file_size?: number | null | undefined;
1142
+ content_hash?: string | null | undefined;
1143
+ status?: string | null | undefined;
1144
+ n_pages?: number | null | undefined;
1145
+ n_chunks?: number | null | undefined;
1146
+ made_from?: number | null | undefined;
1147
+ is_current: boolean;
1148
+ }[];
1146
1149
  thread_id?: string | null | undefined;
1147
1150
  derived_from: {
1148
1151
  doc_ext_id: string;
1149
1152
  role: components["schemas"]["DocRelationRole"];
1153
+ version?: number | null | undefined;
1150
1154
  }[];
1151
1155
  source_message_ext_id?: string | null | undefined;
1152
1156
  conversation_ext_id?: string | null | undefined;
@@ -1161,6 +1165,7 @@ declare function updateDocuments(arbi: ArbiClient, documents: DocUpdateRequest$1
1161
1165
  note?: string | null | undefined;
1162
1166
  citations?: {
1163
1167
  doc_ext_id: string;
1168
+ version?: number | null | undefined;
1164
1169
  chunks?: {
1165
1170
  chunk_id: string;
1166
1171
  page?: number | null | undefined;
@@ -1189,6 +1194,7 @@ declare function updateDocuments(arbi: ArbiClient, documents: DocUpdateRequest$1
1189
1194
  */
1190
1195
  declare function uploadUrl(arbi: ArbiClient, urls: string[], shared?: boolean): Promise<{
1191
1196
  doc_ext_ids?: string[] | undefined;
1197
+ version?: number | null | undefined;
1192
1198
  batch_id?: string | null | undefined;
1193
1199
  skipped?: {
1194
1200
  file_name: string;
@@ -1198,7 +1204,7 @@ declare function uploadUrl(arbi: ArbiClient, urls: string[], shared?: boolean):
1198
1204
  /**
1199
1205
  * Get parsed document content.
1200
1206
  */
1201
- declare function getParsedContent(auth: AuthHeaders, docId: string, stage: string): Promise<Record<string, unknown>>;
1207
+ declare function getParsedContent(auth: AuthHeaders, docId: string, stage: string, version?: number): Promise<Record<string, unknown>>;
1202
1208
  /**
1203
1209
  * Batch-fetch first-page thumbnails for many documents in one request.
1204
1210
  *
@@ -1222,9 +1228,9 @@ declare function uploadFiles(auth: AuthHeaders, files: Array<{
1222
1228
  name: string;
1223
1229
  }>, options?: UploadOptions): Promise<UploadResult>;
1224
1230
  /**
1225
- * Download a document. Returns the response for the caller to handle.
1231
+ * Download a document (its current version, or `version`). Returns the response for the caller.
1226
1232
  */
1227
- declare function downloadDocument(auth: AuthHeaders, docId: string): Promise<Response>;
1233
+ declare function downloadDocument(auth: AuthHeaders, docId: string, version?: number): Promise<Response>;
1228
1234
  /**
1229
1235
  * One file prepared for the direct upload flow. The caller supplies raw,
1230
1236
  * pre-encryption bytes and a basename; the helper handles hashing + SecretBox
@@ -1265,8 +1271,13 @@ interface DirectUploadProgress {
1265
1271
  total: number;
1266
1272
  }
1267
1273
  interface UploadDirectResult {
1268
- /** Doc ext IDs that were committed and will process through the parse pipeline. */
1274
+ /**
1275
+ * Doc ext IDs that were committed and will process through the parse pipeline. For a
1276
+ * `versionOf` upload this is the document's own id (not the provisional init id).
1277
+ */
1269
1278
  doc_ext_ids: string[];
1279
+ /** For a `versionOf` upload: the new version's number. */
1280
+ version?: number | null;
1270
1281
  /**
1271
1282
  * Files that were not uploaded — either rejected at init (unsupported,
1272
1283
  * empty, duplicate, quota_exceeded) or reported back by the commit step
@@ -1453,6 +1464,7 @@ declare function getConversationThreads(arbi: ArbiClient, conversationId: string
1453
1464
  metadata: {
1454
1465
  workspace_ext_id?: string | null | undefined;
1455
1466
  doc_ext_id?: string | null | undefined;
1467
+ doc_version?: number | null | undefined;
1456
1468
  doc_title?: string | null | undefined;
1457
1469
  chunk_id?: string | null | undefined;
1458
1470
  chunk_ext_id: string;
@@ -1484,6 +1496,7 @@ declare function getConversationThreads(arbi: ArbiClient, conversationId: string
1484
1496
  metadata: {
1485
1497
  workspace_ext_id?: string | null | undefined;
1486
1498
  doc_ext_id?: string | null | undefined;
1499
+ doc_version?: number | null | undefined;
1487
1500
  doc_title?: string | null | undefined;
1488
1501
  chunk_id?: string | null | undefined;
1489
1502
  chunk_ext_id: string;
@@ -1630,6 +1643,7 @@ declare function getMessage$1(arbi: ArbiClient, messageId: string): Promise<{
1630
1643
  metadata: {
1631
1644
  workspace_ext_id?: string | null | undefined;
1632
1645
  doc_ext_id?: string | null | undefined;
1646
+ doc_version?: number | null | undefined;
1633
1647
  doc_title?: string | null | undefined;
1634
1648
  chunk_id?: string | null | undefined;
1635
1649
  chunk_ext_id: string;
@@ -1661,6 +1675,7 @@ declare function getMessage$1(arbi: ArbiClient, messageId: string): Promise<{
1661
1675
  metadata: {
1662
1676
  workspace_ext_id?: string | null | undefined;
1663
1677
  doc_ext_id?: string | null | undefined;
1678
+ doc_version?: number | null | undefined;
1664
1679
  doc_title?: string | null | undefined;
1665
1680
  chunk_id?: string | null | undefined;
1666
1681
  chunk_ext_id: string;
@@ -1814,6 +1829,7 @@ declare function postConversationMessage(arbi: ArbiClient, body: PostMessageRequ
1814
1829
  metadata: {
1815
1830
  workspace_ext_id?: string | null | undefined;
1816
1831
  doc_ext_id?: string | null | undefined;
1832
+ doc_version?: number | null | undefined;
1817
1833
  doc_title?: string | null | undefined;
1818
1834
  chunk_id?: string | null | undefined;
1819
1835
  chunk_ext_id: string;
@@ -1845,6 +1861,7 @@ declare function postConversationMessage(arbi: ArbiClient, body: PostMessageRequ
1845
1861
  metadata: {
1846
1862
  workspace_ext_id?: string | null | undefined;
1847
1863
  doc_ext_id?: string | null | undefined;
1864
+ doc_version?: number | null | undefined;
1848
1865
  doc_title?: string | null | undefined;
1849
1866
  chunk_id?: string | null | undefined;
1850
1867
  chunk_ext_id: string;
@@ -2818,7 +2835,6 @@ declare function getAgentConfig(arbi: ArbiClient, agentExtId: string): Promise<{
2818
2835
  WORKSPACE_TOOLS_ENABLED: boolean;
2819
2836
  REMOTE_CONTROL_ENABLED: boolean;
2820
2837
  ENABLED_SKILLS?: string[] | null | undefined;
2821
- MEMORY_CREATION: boolean;
2822
2838
  GOALS_ENABLED: boolean;
2823
2839
  GOAL_MAX_OUTER_LOOPS: number;
2824
2840
  PERSONA: string;
@@ -3972,6 +3988,7 @@ declare class Arbi {
3972
3988
  error?: string | null | undefined;
3973
3989
  kind: components["schemas"]["CopyItemKind"];
3974
3990
  warning?: string | null | undefined;
3991
+ skipped: boolean;
3975
3992
  }[];
3976
3993
  }>;
3977
3994
  };
@@ -3995,13 +4012,27 @@ declare class Arbi {
3995
4012
  re_ocred?: boolean | null | undefined;
3996
4013
  config_ext_id?: string | null | undefined;
3997
4014
  parent_ext_id?: string | null | undefined;
3998
- lineage_id?: string | null | undefined;
3999
- version_number: number;
4000
- is_current: boolean;
4015
+ current_version: number;
4016
+ versions: {
4017
+ n: number;
4018
+ created_at?: string | null | undefined;
4019
+ created_by_ext_id?: string | null | undefined;
4020
+ reason: "upload" | "edit" | "signed" | "sync";
4021
+ file_name?: string | null | undefined;
4022
+ file_type?: string | null | undefined;
4023
+ file_size?: number | null | undefined;
4024
+ content_hash?: string | null | undefined;
4025
+ status?: string | null | undefined;
4026
+ n_pages?: number | null | undefined;
4027
+ n_chunks?: number | null | undefined;
4028
+ made_from?: number | null | undefined;
4029
+ is_current: boolean;
4030
+ }[];
4001
4031
  thread_id?: string | null | undefined;
4002
4032
  derived_from: {
4003
4033
  doc_ext_id: string;
4004
4034
  role: components["schemas"]["DocRelationRole"];
4035
+ version?: number | null | undefined;
4005
4036
  }[];
4006
4037
  source_message_ext_id?: string | null | undefined;
4007
4038
  conversation_ext_id?: string | null | undefined;
@@ -4016,6 +4047,7 @@ declare class Arbi {
4016
4047
  note?: string | null | undefined;
4017
4048
  citations?: {
4018
4049
  doc_ext_id: string;
4050
+ version?: number | null | undefined;
4019
4051
  chunks?: {
4020
4052
  chunk_id: string;
4021
4053
  page?: number | null | undefined;
@@ -4067,9 +4099,8 @@ declare class Arbi {
4067
4099
  re_ocred?: boolean | null;
4068
4100
  config_ext_id?: string | null;
4069
4101
  parent_ext_id?: string | null;
4070
- lineage_id?: string | null;
4071
- version_number: number;
4072
- is_current: boolean;
4102
+ current_version: number;
4103
+ versions: components["schemas"]["DocVersion"][];
4073
4104
  thread_id?: string | null;
4074
4105
  derived_from: components["schemas"]["DerivedFrom"][];
4075
4106
  source_message_ext_id?: string | null;
@@ -4110,9 +4141,8 @@ declare class Arbi {
4110
4141
  re_ocred?: boolean | null;
4111
4142
  config_ext_id?: string | null;
4112
4143
  parent_ext_id?: string | null;
4113
- lineage_id?: string | null;
4114
- version_number: number;
4115
- is_current: boolean;
4144
+ current_version: number;
4145
+ versions: components["schemas"]["DocVersion"][];
4116
4146
  thread_id?: string | null;
4117
4147
  derived_from: components["schemas"]["DerivedFrom"][];
4118
4148
  source_message_ext_id?: string | null;
@@ -4146,13 +4176,27 @@ declare class Arbi {
4146
4176
  re_ocred?: boolean | null | undefined;
4147
4177
  config_ext_id?: string | null | undefined;
4148
4178
  parent_ext_id?: string | null | undefined;
4149
- lineage_id?: string | null | undefined;
4150
- version_number: number;
4151
- is_current: boolean;
4179
+ current_version: number;
4180
+ versions: {
4181
+ n: number;
4182
+ created_at?: string | null | undefined;
4183
+ created_by_ext_id?: string | null | undefined;
4184
+ reason: "upload" | "edit" | "signed" | "sync";
4185
+ file_name?: string | null | undefined;
4186
+ file_type?: string | null | undefined;
4187
+ file_size?: number | null | undefined;
4188
+ content_hash?: string | null | undefined;
4189
+ status?: string | null | undefined;
4190
+ n_pages?: number | null | undefined;
4191
+ n_chunks?: number | null | undefined;
4192
+ made_from?: number | null | undefined;
4193
+ is_current: boolean;
4194
+ }[];
4152
4195
  thread_id?: string | null | undefined;
4153
4196
  derived_from: {
4154
4197
  doc_ext_id: string;
4155
4198
  role: components["schemas"]["DocRelationRole"];
4199
+ version?: number | null | undefined;
4156
4200
  }[];
4157
4201
  source_message_ext_id?: string | null | undefined;
4158
4202
  conversation_ext_id?: string | null | undefined;
@@ -4167,6 +4211,7 @@ declare class Arbi {
4167
4211
  note?: string | null | undefined;
4168
4212
  citations?: {
4169
4213
  doc_ext_id: string;
4214
+ version?: number | null | undefined;
4170
4215
  chunks?: {
4171
4216
  chunk_id: string;
4172
4217
  page?: number | null | undefined;
@@ -4188,67 +4233,21 @@ declare class Arbi {
4188
4233
  title?: string | null | undefined;
4189
4234
  } | null | undefined;
4190
4235
  }[]>;
4191
- /** Every version of a document (any version's id), oldest first; `is_current` marks the current one. */
4236
+ /** Every version of a document, oldest first; `is_current` marks the current one. */
4192
4237
  versions: (docId: string) => Promise<{
4193
- external_id: string;
4194
- workspace_ext_id: string;
4238
+ n: number;
4239
+ created_at?: string | null | undefined;
4240
+ created_by_ext_id?: string | null | undefined;
4241
+ reason: "upload" | "edit" | "signed" | "sync";
4195
4242
  file_name?: string | null | undefined;
4196
- status?: string | null | undefined;
4197
- error_message?: string | null | undefined;
4198
- failed_stage?: string | null | undefined;
4199
- n_pages?: number | null | undefined;
4200
- n_chunks?: number | null | undefined;
4201
- tokens?: number | null | undefined;
4202
4243
  file_type?: string | null | undefined;
4203
4244
  file_size?: number | null | undefined;
4204
- storage_type?: string | null | undefined;
4205
- storage_uri?: string | null | undefined;
4206
4245
  content_hash?: string | null | undefined;
4207
- shared?: boolean | null | undefined;
4208
- re_ocred?: boolean | null | undefined;
4209
- config_ext_id?: string | null | undefined;
4210
- parent_ext_id?: string | null | undefined;
4211
- lineage_id?: string | null | undefined;
4212
- version_number: number;
4246
+ status?: string | null | undefined;
4247
+ n_pages?: number | null | undefined;
4248
+ n_chunks?: number | null | undefined;
4249
+ made_from?: number | null | undefined;
4213
4250
  is_current: boolean;
4214
- thread_id?: string | null | undefined;
4215
- derived_from: {
4216
- doc_ext_id: string;
4217
- role: components["schemas"]["DocRelationRole"];
4218
- }[];
4219
- source_message_ext_id?: string | null | undefined;
4220
- conversation_ext_id?: string | null | undefined;
4221
- created_by_ext_id: string;
4222
- updated_by_ext_id?: string | null | undefined;
4223
- created_at: string;
4224
- updated_at: string;
4225
- wp_type?: string | null | undefined;
4226
- folder?: string | null | undefined;
4227
- sender?: string | null | undefined;
4228
- doctags: {
4229
- note?: string | null | undefined;
4230
- citations?: {
4231
- doc_ext_id: string;
4232
- chunks?: {
4233
- chunk_id: string;
4234
- page?: number | null | undefined;
4235
- }[] | undefined;
4236
- }[] | null | undefined;
4237
- external_id: string;
4238
- doc_ext_id: string;
4239
- tag_ext_id: string;
4240
- created_by_ext_id: string;
4241
- updated_by_ext_id?: string | null | undefined;
4242
- created_at: string;
4243
- updated_at: string;
4244
- }[];
4245
- doc_metadata?: {
4246
- doc_nature?: string | null | undefined;
4247
- doc_author?: string | null | undefined;
4248
- doc_subject?: string | null | undefined;
4249
- doc_date?: string | null | undefined;
4250
- title?: string | null | undefined;
4251
- } | null | undefined;
4252
4251
  }[]>;
4253
4252
  delete: (externalIds: string[]) => Promise<void>;
4254
4253
  update: (documents: DocUpdateRequest[]) => Promise<{
@@ -4270,13 +4269,27 @@ declare class Arbi {
4270
4269
  re_ocred?: boolean | null | undefined;
4271
4270
  config_ext_id?: string | null | undefined;
4272
4271
  parent_ext_id?: string | null | undefined;
4273
- lineage_id?: string | null | undefined;
4274
- version_number: number;
4275
- is_current: boolean;
4272
+ current_version: number;
4273
+ versions: {
4274
+ n: number;
4275
+ created_at?: string | null | undefined;
4276
+ created_by_ext_id?: string | null | undefined;
4277
+ reason: "upload" | "edit" | "signed" | "sync";
4278
+ file_name?: string | null | undefined;
4279
+ file_type?: string | null | undefined;
4280
+ file_size?: number | null | undefined;
4281
+ content_hash?: string | null | undefined;
4282
+ status?: string | null | undefined;
4283
+ n_pages?: number | null | undefined;
4284
+ n_chunks?: number | null | undefined;
4285
+ made_from?: number | null | undefined;
4286
+ is_current: boolean;
4287
+ }[];
4276
4288
  thread_id?: string | null | undefined;
4277
4289
  derived_from: {
4278
4290
  doc_ext_id: string;
4279
4291
  role: components["schemas"]["DocRelationRole"];
4292
+ version?: number | null | undefined;
4280
4293
  }[];
4281
4294
  source_message_ext_id?: string | null | undefined;
4282
4295
  conversation_ext_id?: string | null | undefined;
@@ -4291,6 +4304,7 @@ declare class Arbi {
4291
4304
  note?: string | null | undefined;
4292
4305
  citations?: {
4293
4306
  doc_ext_id: string;
4307
+ version?: number | null | undefined;
4294
4308
  chunks?: {
4295
4309
  chunk_id: string;
4296
4310
  page?: number | null | undefined;
@@ -4314,6 +4328,7 @@ declare class Arbi {
4314
4328
  }[]>;
4315
4329
  uploadUrl: (urls: string[], shared?: boolean) => Promise<{
4316
4330
  doc_ext_ids?: string[] | undefined;
4331
+ version?: number | null | undefined;
4317
4332
  batch_id?: string | null | undefined;
4318
4333
  skipped?: {
4319
4334
  file_name: string;
@@ -4321,8 +4336,9 @@ declare class Arbi {
4321
4336
  }[] | undefined;
4322
4337
  }>;
4323
4338
  uploadFile: (fileData: Blob, fileName: string, options?: UploadOptions) => Promise<UploadResult>;
4324
- download: (docId: string) => Promise<Response>;
4325
- getParsedContent: (docId: string, stage: string) => Promise<Record<string, unknown>>;
4339
+ /** Download a document's original file — its current version, or `version`. */
4340
+ download: (docId: string, version?: number) => Promise<Response>;
4341
+ getParsedContent: (docId: string, stage: string, version?: number) => Promise<Record<string, unknown>>;
4326
4342
  getThumbnails: (docIds: string[]) => Promise<Record<string, string | null>>;
4327
4343
  };
4328
4344
  readonly conversations: {
@@ -4411,6 +4427,7 @@ declare class Arbi {
4411
4427
  metadata: {
4412
4428
  workspace_ext_id?: string | null | undefined;
4413
4429
  doc_ext_id?: string | null | undefined;
4430
+ doc_version?: number | null | undefined;
4414
4431
  doc_title?: string | null | undefined;
4415
4432
  chunk_id?: string | null | undefined;
4416
4433
  chunk_ext_id: string;
@@ -4442,6 +4459,7 @@ declare class Arbi {
4442
4459
  metadata: {
4443
4460
  workspace_ext_id?: string | null | undefined;
4444
4461
  doc_ext_id?: string | null | undefined;
4462
+ doc_version?: number | null | undefined;
4445
4463
  doc_title?: string | null | undefined;
4446
4464
  chunk_id?: string | null | undefined;
4447
4465
  chunk_ext_id: string;
@@ -4780,6 +4798,7 @@ declare class Arbi {
4780
4798
  metadata: {
4781
4799
  workspace_ext_id?: string | null | undefined;
4782
4800
  doc_ext_id?: string | null | undefined;
4801
+ doc_version?: number | null | undefined;
4783
4802
  doc_title?: string | null | undefined;
4784
4803
  chunk_id?: string | null | undefined;
4785
4804
  chunk_ext_id: string;
@@ -4811,6 +4830,7 @@ declare class Arbi {
4811
4830
  metadata: {
4812
4831
  workspace_ext_id?: string | null | undefined;
4813
4832
  doc_ext_id?: string | null | undefined;
4833
+ doc_version?: number | null | undefined;
4814
4834
  doc_title?: string | null | undefined;
4815
4835
  chunk_id?: string | null | undefined;
4816
4836
  chunk_ext_id: string;
@@ -4955,6 +4975,7 @@ declare class Arbi {
4955
4975
  metadata: {
4956
4976
  workspace_ext_id?: string | null | undefined;
4957
4977
  doc_ext_id?: string | null | undefined;
4978
+ doc_version?: number | null | undefined;
4958
4979
  doc_title?: string | null | undefined;
4959
4980
  chunk_id?: string | null | undefined;
4960
4981
  chunk_ext_id: string;
@@ -4986,6 +5007,7 @@ declare class Arbi {
4986
5007
  metadata: {
4987
5008
  workspace_ext_id?: string | null | undefined;
4988
5009
  doc_ext_id?: string | null | undefined;
5010
+ doc_version?: number | null | undefined;
4989
5011
  doc_title?: string | null | undefined;
4990
5012
  chunk_id?: string | null | undefined;
4991
5013
  chunk_ext_id: string;
@@ -5285,6 +5307,7 @@ declare class Arbi {
5285
5307
  note?: string | null | undefined;
5286
5308
  citations?: {
5287
5309
  doc_ext_id: string;
5310
+ version?: number | null | undefined;
5288
5311
  chunks?: {
5289
5312
  chunk_id: string;
5290
5313
  page?: number | null | undefined;
@@ -5306,6 +5329,7 @@ declare class Arbi {
5306
5329
  note?: string | null | undefined;
5307
5330
  citations?: {
5308
5331
  doc_ext_id: string;
5332
+ version?: number | null | undefined;
5309
5333
  chunks?: {
5310
5334
  chunk_id: string;
5311
5335
  page?: number | null | undefined;
@@ -5569,7 +5593,6 @@ declare class Arbi {
5569
5593
  WORKSPACE_TOOLS_ENABLED: boolean;
5570
5594
  REMOTE_CONTROL_ENABLED: boolean;
5571
5595
  ENABLED_SKILLS?: string[] | null | undefined;
5572
- MEMORY_CREATION: boolean;
5573
5596
  GOALS_ENABLED: boolean;
5574
5597
  GOAL_MAX_OUTER_LOOPS: number;
5575
5598
  PERSONA: string;
@@ -6028,7 +6051,6 @@ declare class Arbi {
6028
6051
  WORKSPACE_TOOLS_ENABLED: boolean;
6029
6052
  REMOTE_CONTROL_ENABLED: boolean;
6030
6053
  ENABLED_SKILLS?: string[] | null | undefined;
6031
- MEMORY_CREATION: boolean;
6032
6054
  GOALS_ENABLED: boolean;
6033
6055
  GOAL_MAX_OUTER_LOOPS: number;
6034
6056
  PERSONA: string;
@@ -6806,6 +6828,7 @@ declare function copyDocuments(arbi: ArbiClient, targetWorkspaceId: string, docI
6806
6828
  error?: string | null | undefined;
6807
6829
  kind: components["schemas"]["CopyItemKind"];
6808
6830
  warning?: string | null | undefined;
6831
+ skipped: boolean;
6809
6832
  }[];
6810
6833
  }>;
6811
6834
 
@@ -6909,6 +6932,7 @@ declare function assignDocTags(arbi: ArbiClient, tagId: string, docIds: string[]
6909
6932
  note?: string | null | undefined;
6910
6933
  citations?: {
6911
6934
  doc_ext_id: string;
6935
+ version?: number | null | undefined;
6912
6936
  chunks?: {
6913
6937
  chunk_id: string;
6914
6938
  page?: number | null | undefined;
@@ -6930,6 +6954,7 @@ declare function updateDocTag(arbi: ArbiClient, tagId: string, docId: string, up
6930
6954
  note?: string | null | undefined;
6931
6955
  citations?: {
6932
6956
  doc_ext_id: string;
6957
+ version?: number | null | undefined;
6933
6958
  chunks?: {
6934
6959
  chunk_id: string;
6935
6960
  page?: number | null | undefined;
@@ -7067,7 +7092,6 @@ declare function getConfig(arbi: ArbiClient, configId: string): Promise<{
7067
7092
  WORKSPACE_TOOLS_ENABLED: boolean;
7068
7093
  REMOTE_CONTROL_ENABLED: boolean;
7069
7094
  ENABLED_SKILLS?: string[] | null | undefined;
7070
- MEMORY_CREATION: boolean;
7071
7095
  GOALS_ENABLED: boolean;
7072
7096
  GOAL_MAX_OUTER_LOOPS: number;
7073
7097
  PERSONA: string;