@eight-atulya/atulya-client 0.8.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 (87) hide show
  1. package/README.md +89 -0
  2. package/dist/generated/client/client.gen.d.ts +3 -0
  3. package/dist/generated/client/client.gen.d.ts.map +1 -0
  4. package/dist/generated/client/client.gen.js +233 -0
  5. package/dist/generated/client/client.gen.js.map +1 -0
  6. package/dist/generated/client/index.d.ts +9 -0
  7. package/dist/generated/client/index.d.ts.map +1 -0
  8. package/dist/generated/client/index.js +18 -0
  9. package/dist/generated/client/index.js.map +1 -0
  10. package/dist/generated/client/types.gen.d.ts +118 -0
  11. package/dist/generated/client/types.gen.d.ts.map +1 -0
  12. package/dist/generated/client/types.gen.js +4 -0
  13. package/dist/generated/client/types.gen.js.map +1 -0
  14. package/dist/generated/client/utils.gen.d.ts +34 -0
  15. package/dist/generated/client/utils.gen.d.ts.map +1 -0
  16. package/dist/generated/client/utils.gen.js +245 -0
  17. package/dist/generated/client/utils.gen.js.map +1 -0
  18. package/dist/generated/client.gen.d.ts +13 -0
  19. package/dist/generated/client.gen.d.ts.map +1 -0
  20. package/dist/generated/client.gen.js +7 -0
  21. package/dist/generated/client.gen.js.map +1 -0
  22. package/dist/generated/core/auth.gen.d.ts +19 -0
  23. package/dist/generated/core/auth.gen.d.ts.map +1 -0
  24. package/dist/generated/core/auth.gen.js +19 -0
  25. package/dist/generated/core/auth.gen.js.map +1 -0
  26. package/dist/generated/core/bodySerializer.gen.d.ts +26 -0
  27. package/dist/generated/core/bodySerializer.gen.d.ts.map +1 -0
  28. package/dist/generated/core/bodySerializer.gen.js +61 -0
  29. package/dist/generated/core/bodySerializer.gen.js.map +1 -0
  30. package/dist/generated/core/params.gen.d.ts +44 -0
  31. package/dist/generated/core/params.gen.d.ts.map +1 -0
  32. package/dist/generated/core/params.gen.js +105 -0
  33. package/dist/generated/core/params.gen.js.map +1 -0
  34. package/dist/generated/core/pathSerializer.gen.d.ts +34 -0
  35. package/dist/generated/core/pathSerializer.gen.d.ts.map +1 -0
  36. package/dist/generated/core/pathSerializer.gen.js +124 -0
  37. package/dist/generated/core/pathSerializer.gen.js.map +1 -0
  38. package/dist/generated/core/queryKeySerializer.gen.d.ts +19 -0
  39. package/dist/generated/core/queryKeySerializer.gen.d.ts.map +1 -0
  40. package/dist/generated/core/queryKeySerializer.gen.js +106 -0
  41. package/dist/generated/core/queryKeySerializer.gen.js.map +1 -0
  42. package/dist/generated/core/serverSentEvents.gen.d.ts +72 -0
  43. package/dist/generated/core/serverSentEvents.gen.d.ts.map +1 -0
  44. package/dist/generated/core/serverSentEvents.gen.js +140 -0
  45. package/dist/generated/core/serverSentEvents.gen.js.map +1 -0
  46. package/dist/generated/core/types.gen.d.ts +79 -0
  47. package/dist/generated/core/types.gen.d.ts.map +1 -0
  48. package/dist/generated/core/types.gen.js +4 -0
  49. package/dist/generated/core/types.gen.js.map +1 -0
  50. package/dist/generated/core/utils.gen.d.ts +20 -0
  51. package/dist/generated/core/utils.gen.d.ts.map +1 -0
  52. package/dist/generated/core/utils.gen.js +94 -0
  53. package/dist/generated/core/utils.gen.js.map +1 -0
  54. package/dist/generated/index.d.ts +3 -0
  55. package/dist/generated/index.d.ts.map +1 -0
  56. package/dist/generated/index.js +19 -0
  57. package/dist/generated/index.js.map +1 -0
  58. package/dist/generated/sdk.gen.d.ts +417 -0
  59. package/dist/generated/sdk.gen.d.ts.map +1 -0
  60. package/dist/generated/sdk.gen.js +608 -0
  61. package/dist/generated/sdk.gen.js.map +1 -0
  62. package/dist/generated/types.gen.d.ts +4147 -0
  63. package/dist/generated/types.gen.d.ts.map +1 -0
  64. package/dist/generated/types.gen.js +4 -0
  65. package/dist/generated/types.gen.js.map +1 -0
  66. package/dist/src/index.d.ts +310 -0
  67. package/dist/src/index.d.ts.map +1 -0
  68. package/dist/src/index.js +518 -0
  69. package/dist/src/index.js.map +1 -0
  70. package/generated/client/client.gen.ts +301 -0
  71. package/generated/client/index.ts +25 -0
  72. package/generated/client/types.gen.ts +242 -0
  73. package/generated/client/utils.gen.ts +337 -0
  74. package/generated/client.gen.ts +23 -0
  75. package/generated/core/auth.gen.ts +42 -0
  76. package/generated/core/bodySerializer.gen.ts +100 -0
  77. package/generated/core/params.gen.ts +176 -0
  78. package/generated/core/pathSerializer.gen.ts +180 -0
  79. package/generated/core/queryKeySerializer.gen.ts +136 -0
  80. package/generated/core/serverSentEvents.gen.ts +264 -0
  81. package/generated/core/types.gen.ts +118 -0
  82. package/generated/core/utils.gen.ts +143 -0
  83. package/generated/index.ts +4 -0
  84. package/generated/sdk.gen.ts +1163 -0
  85. package/generated/types.gen.ts +4560 -0
  86. package/package.json +42 -0
  87. package/src/index.ts +749 -0
@@ -0,0 +1,1163 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ import {
4
+ type Client,
5
+ formDataBodySerializer,
6
+ type Options as Options2,
7
+ type TDataShape,
8
+ } from "./client";
9
+ import { client } from "./client.gen";
10
+ import type {
11
+ AddBankBackgroundData,
12
+ AddBankBackgroundErrors,
13
+ AddBankBackgroundResponses,
14
+ CancelOperationData,
15
+ CancelOperationErrors,
16
+ CancelOperationResponses,
17
+ ClearBankMemoriesData,
18
+ ClearBankMemoriesErrors,
19
+ ClearBankMemoriesResponses,
20
+ ClearMemoryObservationsData,
21
+ ClearMemoryObservationsErrors,
22
+ ClearMemoryObservationsResponses,
23
+ ClearObservationsData,
24
+ ClearObservationsErrors,
25
+ ClearObservationsResponses,
26
+ CreateDirectiveData,
27
+ CreateDirectiveErrors,
28
+ CreateDirectiveResponses,
29
+ CreateMentalModelData,
30
+ CreateMentalModelErrors,
31
+ CreateMentalModelResponses,
32
+ CreateOrUpdateBankData,
33
+ CreateOrUpdateBankErrors,
34
+ CreateOrUpdateBankResponses,
35
+ CreateWebhookData,
36
+ CreateWebhookErrors,
37
+ CreateWebhookResponses,
38
+ DeleteBankData,
39
+ DeleteBankErrors,
40
+ DeleteBankResponses,
41
+ DeleteDirectiveData,
42
+ DeleteDirectiveErrors,
43
+ DeleteDirectiveResponses,
44
+ DeleteDocumentData,
45
+ DeleteDocumentErrors,
46
+ DeleteDocumentResponses,
47
+ DeleteMentalModelData,
48
+ DeleteMentalModelErrors,
49
+ DeleteMentalModelResponses,
50
+ DeleteWebhookData,
51
+ DeleteWebhookErrors,
52
+ DeleteWebhookResponses,
53
+ FileRetainData,
54
+ FileRetainErrors,
55
+ FileRetainResponses,
56
+ GetAgentStatsData,
57
+ GetAgentStatsErrors,
58
+ GetAgentStatsResponses,
59
+ GetBankConfigData,
60
+ GetBankConfigErrors,
61
+ GetBankConfigResponses,
62
+ GetBankProfileData,
63
+ GetBankProfileErrors,
64
+ GetBankProfileResponses,
65
+ GetChunkData,
66
+ GetChunkErrors,
67
+ GetChunkResponses,
68
+ GetDirectiveData,
69
+ GetDirectiveErrors,
70
+ GetDirectiveResponses,
71
+ GetDocumentData,
72
+ GetDocumentErrors,
73
+ GetDocumentResponses,
74
+ GetEntityData,
75
+ GetEntityErrors,
76
+ GetEntityResponses,
77
+ GetGraphData,
78
+ GetGraphErrors,
79
+ GetGraphResponses,
80
+ GetMemoryData,
81
+ GetMemoryErrors,
82
+ GetMemoryResponses,
83
+ GetMentalModelData,
84
+ GetMentalModelErrors,
85
+ GetMentalModelHistoryData,
86
+ GetMentalModelHistoryErrors,
87
+ GetMentalModelHistoryResponses,
88
+ GetMentalModelResponses,
89
+ GetObservationHistoryData,
90
+ GetObservationHistoryErrors,
91
+ GetObservationHistoryResponses,
92
+ GetOperationStatusData,
93
+ GetOperationStatusErrors,
94
+ GetOperationStatusResponses,
95
+ GetVersionData,
96
+ GetVersionResponses,
97
+ HealthEndpointHealthGetData,
98
+ HealthEndpointHealthGetResponses,
99
+ ListBanksData,
100
+ ListBanksErrors,
101
+ ListBanksResponses,
102
+ ListDirectivesData,
103
+ ListDirectivesErrors,
104
+ ListDirectivesResponses,
105
+ ListDocumentsData,
106
+ ListDocumentsErrors,
107
+ ListDocumentsResponses,
108
+ ListEntitiesData,
109
+ ListEntitiesErrors,
110
+ ListEntitiesResponses,
111
+ ListMemoriesData,
112
+ ListMemoriesErrors,
113
+ ListMemoriesResponses,
114
+ ListMentalModelsData,
115
+ ListMentalModelsErrors,
116
+ ListMentalModelsResponses,
117
+ ListOperationsData,
118
+ ListOperationsErrors,
119
+ ListOperationsResponses,
120
+ ListTagsData,
121
+ ListTagsErrors,
122
+ ListTagsResponses,
123
+ ListWebhookDeliveriesData,
124
+ ListWebhookDeliveriesErrors,
125
+ ListWebhookDeliveriesResponses,
126
+ ListWebhooksData,
127
+ ListWebhooksErrors,
128
+ ListWebhooksResponses,
129
+ MetricsEndpointMetricsGetData,
130
+ MetricsEndpointMetricsGetResponses,
131
+ RecallMemoriesData,
132
+ RecallMemoriesErrors,
133
+ RecallMemoriesResponses,
134
+ ReflectData,
135
+ ReflectErrors,
136
+ ReflectResponses,
137
+ RefreshMentalModelData,
138
+ RefreshMentalModelErrors,
139
+ RefreshMentalModelResponses,
140
+ RegenerateEntityObservationsData,
141
+ RegenerateEntityObservationsErrors,
142
+ RegenerateEntityObservationsResponses,
143
+ ResetBankConfigData,
144
+ ResetBankConfigErrors,
145
+ ResetBankConfigResponses,
146
+ RetainMemoriesData,
147
+ RetainMemoriesErrors,
148
+ RetainMemoriesResponses,
149
+ TriggerConsolidationData,
150
+ TriggerConsolidationErrors,
151
+ TriggerConsolidationResponses,
152
+ UpdateBankConfigData,
153
+ UpdateBankConfigErrors,
154
+ UpdateBankConfigResponses,
155
+ UpdateBankData,
156
+ UpdateBankDispositionData,
157
+ UpdateBankDispositionErrors,
158
+ UpdateBankDispositionResponses,
159
+ UpdateBankErrors,
160
+ UpdateBankResponses,
161
+ UpdateDirectiveData,
162
+ UpdateDirectiveErrors,
163
+ UpdateDirectiveResponses,
164
+ UpdateMentalModelData,
165
+ UpdateMentalModelErrors,
166
+ UpdateMentalModelResponses,
167
+ UpdateWebhookData,
168
+ UpdateWebhookErrors,
169
+ UpdateWebhookResponses,
170
+ } from "./types.gen";
171
+
172
+ export type Options<
173
+ TData extends TDataShape = TDataShape,
174
+ ThrowOnError extends boolean = boolean,
175
+ > = Options2<TData, ThrowOnError> & {
176
+ /**
177
+ * You can provide a client instance returned by `createClient()` instead of
178
+ * individual options. This might be also useful if you want to implement a
179
+ * custom client.
180
+ */
181
+ client?: Client;
182
+ /**
183
+ * You can pass arbitrary values through the `meta` object. This can be
184
+ * used to access values that aren't defined as part of the SDK function.
185
+ */
186
+ meta?: Record<string, unknown>;
187
+ };
188
+
189
+ /**
190
+ * Health check endpoint
191
+ *
192
+ * Checks the health of the API and database connection
193
+ */
194
+ export const healthEndpointHealthGet = <ThrowOnError extends boolean = false>(
195
+ options?: Options<HealthEndpointHealthGetData, ThrowOnError>,
196
+ ) =>
197
+ (options?.client ?? client).get<
198
+ HealthEndpointHealthGetResponses,
199
+ unknown,
200
+ ThrowOnError
201
+ >({ url: "/health", ...options });
202
+
203
+ /**
204
+ * Get API version and feature flags
205
+ *
206
+ * Returns API version information and enabled feature flags. Use this to check which capabilities are available in this deployment.
207
+ */
208
+ export const getVersion = <ThrowOnError extends boolean = false>(
209
+ options?: Options<GetVersionData, ThrowOnError>,
210
+ ) =>
211
+ (options?.client ?? client).get<GetVersionResponses, unknown, ThrowOnError>({
212
+ url: "/version",
213
+ ...options,
214
+ });
215
+
216
+ /**
217
+ * Prometheus metrics endpoint
218
+ *
219
+ * Exports metrics in Prometheus format for scraping
220
+ */
221
+ export const metricsEndpointMetricsGet = <ThrowOnError extends boolean = false>(
222
+ options?: Options<MetricsEndpointMetricsGetData, ThrowOnError>,
223
+ ) =>
224
+ (options?.client ?? client).get<
225
+ MetricsEndpointMetricsGetResponses,
226
+ unknown,
227
+ ThrowOnError
228
+ >({ url: "/metrics", ...options });
229
+
230
+ /**
231
+ * Get memory graph data
232
+ *
233
+ * Retrieve graph data for visualization, optionally filtered by type (world/experience/opinion).
234
+ */
235
+ export const getGraph = <ThrowOnError extends boolean = false>(
236
+ options: Options<GetGraphData, ThrowOnError>,
237
+ ) =>
238
+ (options.client ?? client).get<
239
+ GetGraphResponses,
240
+ GetGraphErrors,
241
+ ThrowOnError
242
+ >({ url: "/v1/default/banks/{bank_id}/graph", ...options });
243
+
244
+ /**
245
+ * List memory units
246
+ *
247
+ * List memory units with pagination and optional full-text search. Supports filtering by type. Results are sorted by most recent first (mentioned_at DESC, then created_at DESC).
248
+ */
249
+ export const listMemories = <ThrowOnError extends boolean = false>(
250
+ options: Options<ListMemoriesData, ThrowOnError>,
251
+ ) =>
252
+ (options.client ?? client).get<
253
+ ListMemoriesResponses,
254
+ ListMemoriesErrors,
255
+ ThrowOnError
256
+ >({ url: "/v1/default/banks/{bank_id}/memories/list", ...options });
257
+
258
+ /**
259
+ * Get memory unit
260
+ *
261
+ * Get a single memory unit by ID with all its metadata including entities and tags. Note: the 'history' field is deprecated and always returns an empty list - use GET /memories/{memory_id}/history instead.
262
+ */
263
+ export const getMemory = <ThrowOnError extends boolean = false>(
264
+ options: Options<GetMemoryData, ThrowOnError>,
265
+ ) =>
266
+ (options.client ?? client).get<
267
+ GetMemoryResponses,
268
+ GetMemoryErrors,
269
+ ThrowOnError
270
+ >({ url: "/v1/default/banks/{bank_id}/memories/{memory_id}", ...options });
271
+
272
+ /**
273
+ * Get observation history
274
+ *
275
+ * Get the full history of an observation, with each change's source facts resolved to their text.
276
+ */
277
+ export const getObservationHistory = <ThrowOnError extends boolean = false>(
278
+ options: Options<GetObservationHistoryData, ThrowOnError>,
279
+ ) =>
280
+ (options.client ?? client).get<
281
+ GetObservationHistoryResponses,
282
+ GetObservationHistoryErrors,
283
+ ThrowOnError
284
+ >({
285
+ url: "/v1/default/banks/{bank_id}/memories/{memory_id}/history",
286
+ ...options,
287
+ });
288
+
289
+ /**
290
+ * Recall memory
291
+ *
292
+ * Recall memory using semantic similarity and spreading activation.
293
+ *
294
+ * The type parameter is optional and must be one of:
295
+ * - `world`: General knowledge about people, places, events, and things that happen
296
+ * - `experience`: Memories about experience, conversations, actions taken, and tasks performed
297
+ */
298
+ export const recallMemories = <ThrowOnError extends boolean = false>(
299
+ options: Options<RecallMemoriesData, ThrowOnError>,
300
+ ) =>
301
+ (options.client ?? client).post<
302
+ RecallMemoriesResponses,
303
+ RecallMemoriesErrors,
304
+ ThrowOnError
305
+ >({
306
+ url: "/v1/default/banks/{bank_id}/memories/recall",
307
+ ...options,
308
+ headers: {
309
+ "Content-Type": "application/json",
310
+ ...options.headers,
311
+ },
312
+ });
313
+
314
+ /**
315
+ * Reflect and generate answer
316
+ *
317
+ * Reflect and formulate an answer using bank identity, world facts, and opinions.
318
+ *
319
+ * This endpoint:
320
+ * 1. Retrieves experience (conversations and events)
321
+ * 2. Retrieves world facts relevant to the query
322
+ * 3. Retrieves existing opinions (bank's perspectives)
323
+ * 4. Uses LLM to formulate a contextual answer
324
+ * 5. Returns plain text answer and the facts used
325
+ */
326
+ export const reflect = <ThrowOnError extends boolean = false>(
327
+ options: Options<ReflectData, ThrowOnError>,
328
+ ) =>
329
+ (options.client ?? client).post<
330
+ ReflectResponses,
331
+ ReflectErrors,
332
+ ThrowOnError
333
+ >({
334
+ url: "/v1/default/banks/{bank_id}/reflect",
335
+ ...options,
336
+ headers: {
337
+ "Content-Type": "application/json",
338
+ ...options.headers,
339
+ },
340
+ });
341
+
342
+ /**
343
+ * List all memory banks
344
+ *
345
+ * Get a list of all agents with their profiles
346
+ */
347
+ export const listBanks = <ThrowOnError extends boolean = false>(
348
+ options?: Options<ListBanksData, ThrowOnError>,
349
+ ) =>
350
+ (options?.client ?? client).get<
351
+ ListBanksResponses,
352
+ ListBanksErrors,
353
+ ThrowOnError
354
+ >({ url: "/v1/default/banks", ...options });
355
+
356
+ /**
357
+ * Get statistics for memory bank
358
+ *
359
+ * Get statistics about nodes and links for a specific agent
360
+ */
361
+ export const getAgentStats = <ThrowOnError extends boolean = false>(
362
+ options: Options<GetAgentStatsData, ThrowOnError>,
363
+ ) =>
364
+ (options.client ?? client).get<
365
+ GetAgentStatsResponses,
366
+ GetAgentStatsErrors,
367
+ ThrowOnError
368
+ >({ url: "/v1/default/banks/{bank_id}/stats", ...options });
369
+
370
+ /**
371
+ * List entities
372
+ *
373
+ * List all entities (people, organizations, etc.) known by the bank, ordered by mention count. Supports pagination.
374
+ */
375
+ export const listEntities = <ThrowOnError extends boolean = false>(
376
+ options: Options<ListEntitiesData, ThrowOnError>,
377
+ ) =>
378
+ (options.client ?? client).get<
379
+ ListEntitiesResponses,
380
+ ListEntitiesErrors,
381
+ ThrowOnError
382
+ >({ url: "/v1/default/banks/{bank_id}/entities", ...options });
383
+
384
+ /**
385
+ * Get entity details
386
+ *
387
+ * Get detailed information about an entity including observations (mental model).
388
+ */
389
+ export const getEntity = <ThrowOnError extends boolean = false>(
390
+ options: Options<GetEntityData, ThrowOnError>,
391
+ ) =>
392
+ (options.client ?? client).get<
393
+ GetEntityResponses,
394
+ GetEntityErrors,
395
+ ThrowOnError
396
+ >({ url: "/v1/default/banks/{bank_id}/entities/{entity_id}", ...options });
397
+
398
+ /**
399
+ * Regenerate entity observations (deprecated)
400
+ *
401
+ * This endpoint is deprecated. Entity observations have been replaced by mental models.
402
+ *
403
+ * @deprecated
404
+ */
405
+ export const regenerateEntityObservations = <
406
+ ThrowOnError extends boolean = false,
407
+ >(
408
+ options: Options<RegenerateEntityObservationsData, ThrowOnError>,
409
+ ) =>
410
+ (options.client ?? client).post<
411
+ RegenerateEntityObservationsResponses,
412
+ RegenerateEntityObservationsErrors,
413
+ ThrowOnError
414
+ >({
415
+ url: "/v1/default/banks/{bank_id}/entities/{entity_id}/regenerate",
416
+ ...options,
417
+ });
418
+
419
+ /**
420
+ * List mental models
421
+ *
422
+ * List user-curated living documents that stay current.
423
+ */
424
+ export const listMentalModels = <ThrowOnError extends boolean = false>(
425
+ options: Options<ListMentalModelsData, ThrowOnError>,
426
+ ) =>
427
+ (options.client ?? client).get<
428
+ ListMentalModelsResponses,
429
+ ListMentalModelsErrors,
430
+ ThrowOnError
431
+ >({ url: "/v1/default/banks/{bank_id}/mental-models", ...options });
432
+
433
+ /**
434
+ * Create mental model
435
+ *
436
+ * Create a mental model by running reflect with the source query in the background. Returns an operation ID to track progress. The content is auto-generated by the reflect endpoint. Use the operations endpoint to check completion status.
437
+ */
438
+ export const createMentalModel = <ThrowOnError extends boolean = false>(
439
+ options: Options<CreateMentalModelData, ThrowOnError>,
440
+ ) =>
441
+ (options.client ?? client).post<
442
+ CreateMentalModelResponses,
443
+ CreateMentalModelErrors,
444
+ ThrowOnError
445
+ >({
446
+ url: "/v1/default/banks/{bank_id}/mental-models",
447
+ ...options,
448
+ headers: {
449
+ "Content-Type": "application/json",
450
+ ...options.headers,
451
+ },
452
+ });
453
+
454
+ /**
455
+ * Delete mental model
456
+ *
457
+ * Delete a mental model.
458
+ */
459
+ export const deleteMentalModel = <ThrowOnError extends boolean = false>(
460
+ options: Options<DeleteMentalModelData, ThrowOnError>,
461
+ ) =>
462
+ (options.client ?? client).delete<
463
+ DeleteMentalModelResponses,
464
+ DeleteMentalModelErrors,
465
+ ThrowOnError
466
+ >({
467
+ url: "/v1/default/banks/{bank_id}/mental-models/{mental_model_id}",
468
+ ...options,
469
+ });
470
+
471
+ /**
472
+ * Get mental model
473
+ *
474
+ * Get a specific mental model by ID.
475
+ */
476
+ export const getMentalModel = <ThrowOnError extends boolean = false>(
477
+ options: Options<GetMentalModelData, ThrowOnError>,
478
+ ) =>
479
+ (options.client ?? client).get<
480
+ GetMentalModelResponses,
481
+ GetMentalModelErrors,
482
+ ThrowOnError
483
+ >({
484
+ url: "/v1/default/banks/{bank_id}/mental-models/{mental_model_id}",
485
+ ...options,
486
+ });
487
+
488
+ /**
489
+ * Update mental model
490
+ *
491
+ * Update a mental model's name and/or source query.
492
+ */
493
+ export const updateMentalModel = <ThrowOnError extends boolean = false>(
494
+ options: Options<UpdateMentalModelData, ThrowOnError>,
495
+ ) =>
496
+ (options.client ?? client).patch<
497
+ UpdateMentalModelResponses,
498
+ UpdateMentalModelErrors,
499
+ ThrowOnError
500
+ >({
501
+ url: "/v1/default/banks/{bank_id}/mental-models/{mental_model_id}",
502
+ ...options,
503
+ headers: {
504
+ "Content-Type": "application/json",
505
+ ...options.headers,
506
+ },
507
+ });
508
+
509
+ /**
510
+ * Get mental model history
511
+ *
512
+ * Get the refresh history of a mental model, showing content changes over time.
513
+ */
514
+ export const getMentalModelHistory = <ThrowOnError extends boolean = false>(
515
+ options: Options<GetMentalModelHistoryData, ThrowOnError>,
516
+ ) =>
517
+ (options.client ?? client).get<
518
+ GetMentalModelHistoryResponses,
519
+ GetMentalModelHistoryErrors,
520
+ ThrowOnError
521
+ >({
522
+ url: "/v1/default/banks/{bank_id}/mental-models/{mental_model_id}/history",
523
+ ...options,
524
+ });
525
+
526
+ /**
527
+ * Refresh mental model
528
+ *
529
+ * Submit an async task to re-run the source query through reflect and update the content.
530
+ */
531
+ export const refreshMentalModel = <ThrowOnError extends boolean = false>(
532
+ options: Options<RefreshMentalModelData, ThrowOnError>,
533
+ ) =>
534
+ (options.client ?? client).post<
535
+ RefreshMentalModelResponses,
536
+ RefreshMentalModelErrors,
537
+ ThrowOnError
538
+ >({
539
+ url: "/v1/default/banks/{bank_id}/mental-models/{mental_model_id}/refresh",
540
+ ...options,
541
+ });
542
+
543
+ /**
544
+ * List directives
545
+ *
546
+ * List hard rules that are injected into prompts.
547
+ */
548
+ export const listDirectives = <ThrowOnError extends boolean = false>(
549
+ options: Options<ListDirectivesData, ThrowOnError>,
550
+ ) =>
551
+ (options.client ?? client).get<
552
+ ListDirectivesResponses,
553
+ ListDirectivesErrors,
554
+ ThrowOnError
555
+ >({ url: "/v1/default/banks/{bank_id}/directives", ...options });
556
+
557
+ /**
558
+ * Create directive
559
+ *
560
+ * Create a hard rule that will be injected into prompts.
561
+ */
562
+ export const createDirective = <ThrowOnError extends boolean = false>(
563
+ options: Options<CreateDirectiveData, ThrowOnError>,
564
+ ) =>
565
+ (options.client ?? client).post<
566
+ CreateDirectiveResponses,
567
+ CreateDirectiveErrors,
568
+ ThrowOnError
569
+ >({
570
+ url: "/v1/default/banks/{bank_id}/directives",
571
+ ...options,
572
+ headers: {
573
+ "Content-Type": "application/json",
574
+ ...options.headers,
575
+ },
576
+ });
577
+
578
+ /**
579
+ * Delete directive
580
+ *
581
+ * Delete a directive.
582
+ */
583
+ export const deleteDirective = <ThrowOnError extends boolean = false>(
584
+ options: Options<DeleteDirectiveData, ThrowOnError>,
585
+ ) =>
586
+ (options.client ?? client).delete<
587
+ DeleteDirectiveResponses,
588
+ DeleteDirectiveErrors,
589
+ ThrowOnError
590
+ >({
591
+ url: "/v1/default/banks/{bank_id}/directives/{directive_id}",
592
+ ...options,
593
+ });
594
+
595
+ /**
596
+ * Get directive
597
+ *
598
+ * Get a specific directive by ID.
599
+ */
600
+ export const getDirective = <ThrowOnError extends boolean = false>(
601
+ options: Options<GetDirectiveData, ThrowOnError>,
602
+ ) =>
603
+ (options.client ?? client).get<
604
+ GetDirectiveResponses,
605
+ GetDirectiveErrors,
606
+ ThrowOnError
607
+ >({
608
+ url: "/v1/default/banks/{bank_id}/directives/{directive_id}",
609
+ ...options,
610
+ });
611
+
612
+ /**
613
+ * Update directive
614
+ *
615
+ * Update a directive's properties.
616
+ */
617
+ export const updateDirective = <ThrowOnError extends boolean = false>(
618
+ options: Options<UpdateDirectiveData, ThrowOnError>,
619
+ ) =>
620
+ (options.client ?? client).patch<
621
+ UpdateDirectiveResponses,
622
+ UpdateDirectiveErrors,
623
+ ThrowOnError
624
+ >({
625
+ url: "/v1/default/banks/{bank_id}/directives/{directive_id}",
626
+ ...options,
627
+ headers: {
628
+ "Content-Type": "application/json",
629
+ ...options.headers,
630
+ },
631
+ });
632
+
633
+ /**
634
+ * List documents
635
+ *
636
+ * List documents with pagination and optional search. Documents are the source content from which memory units are extracted.
637
+ */
638
+ export const listDocuments = <ThrowOnError extends boolean = false>(
639
+ options: Options<ListDocumentsData, ThrowOnError>,
640
+ ) =>
641
+ (options.client ?? client).get<
642
+ ListDocumentsResponses,
643
+ ListDocumentsErrors,
644
+ ThrowOnError
645
+ >({ url: "/v1/default/banks/{bank_id}/documents", ...options });
646
+
647
+ /**
648
+ * Delete a document
649
+ *
650
+ * Delete a document and all its associated memory units and links.
651
+ *
652
+ * This will cascade delete:
653
+ * - The document itself
654
+ * - All memory units extracted from this document
655
+ * - All links (temporal, semantic, entity) associated with those memory units
656
+ *
657
+ * This operation cannot be undone.
658
+ */
659
+ export const deleteDocument = <ThrowOnError extends boolean = false>(
660
+ options: Options<DeleteDocumentData, ThrowOnError>,
661
+ ) =>
662
+ (options.client ?? client).delete<
663
+ DeleteDocumentResponses,
664
+ DeleteDocumentErrors,
665
+ ThrowOnError
666
+ >({ url: "/v1/default/banks/{bank_id}/documents/{document_id}", ...options });
667
+
668
+ /**
669
+ * Get document details
670
+ *
671
+ * Get a specific document including its original text
672
+ */
673
+ export const getDocument = <ThrowOnError extends boolean = false>(
674
+ options: Options<GetDocumentData, ThrowOnError>,
675
+ ) =>
676
+ (options.client ?? client).get<
677
+ GetDocumentResponses,
678
+ GetDocumentErrors,
679
+ ThrowOnError
680
+ >({ url: "/v1/default/banks/{bank_id}/documents/{document_id}", ...options });
681
+
682
+ /**
683
+ * List tags
684
+ *
685
+ * List all unique tags in a memory bank with usage counts. Supports wildcard search using '*' (e.g., 'user:*', '*-fred', 'tag*-2'). Case-insensitive.
686
+ */
687
+ export const listTags = <ThrowOnError extends boolean = false>(
688
+ options: Options<ListTagsData, ThrowOnError>,
689
+ ) =>
690
+ (options.client ?? client).get<
691
+ ListTagsResponses,
692
+ ListTagsErrors,
693
+ ThrowOnError
694
+ >({ url: "/v1/default/banks/{bank_id}/tags", ...options });
695
+
696
+ /**
697
+ * Get chunk details
698
+ *
699
+ * Get a specific chunk by its ID
700
+ */
701
+ export const getChunk = <ThrowOnError extends boolean = false>(
702
+ options: Options<GetChunkData, ThrowOnError>,
703
+ ) =>
704
+ (options.client ?? client).get<
705
+ GetChunkResponses,
706
+ GetChunkErrors,
707
+ ThrowOnError
708
+ >({ url: "/v1/default/chunks/{chunk_id}", ...options });
709
+
710
+ /**
711
+ * List async operations
712
+ *
713
+ * Get a list of async operations for a specific agent, with optional filtering by status and operation type. Results are sorted by most recent first.
714
+ */
715
+ export const listOperations = <ThrowOnError extends boolean = false>(
716
+ options: Options<ListOperationsData, ThrowOnError>,
717
+ ) =>
718
+ (options.client ?? client).get<
719
+ ListOperationsResponses,
720
+ ListOperationsErrors,
721
+ ThrowOnError
722
+ >({ url: "/v1/default/banks/{bank_id}/operations", ...options });
723
+
724
+ /**
725
+ * Cancel a pending async operation
726
+ *
727
+ * Cancel a pending async operation by removing it from the queue
728
+ */
729
+ export const cancelOperation = <ThrowOnError extends boolean = false>(
730
+ options: Options<CancelOperationData, ThrowOnError>,
731
+ ) =>
732
+ (options.client ?? client).delete<
733
+ CancelOperationResponses,
734
+ CancelOperationErrors,
735
+ ThrowOnError
736
+ >({
737
+ url: "/v1/default/banks/{bank_id}/operations/{operation_id}",
738
+ ...options,
739
+ });
740
+
741
+ /**
742
+ * Get operation status
743
+ *
744
+ * Get the status of a specific async operation. Returns 'pending', 'completed', or 'failed'. Completed operations are removed from storage, so 'completed' means the operation finished successfully.
745
+ */
746
+ export const getOperationStatus = <ThrowOnError extends boolean = false>(
747
+ options: Options<GetOperationStatusData, ThrowOnError>,
748
+ ) =>
749
+ (options.client ?? client).get<
750
+ GetOperationStatusResponses,
751
+ GetOperationStatusErrors,
752
+ ThrowOnError
753
+ >({
754
+ url: "/v1/default/banks/{bank_id}/operations/{operation_id}",
755
+ ...options,
756
+ });
757
+
758
+ /**
759
+ * Get memory bank profile
760
+ *
761
+ * Get disposition traits and mission for a memory bank. Auto-creates agent with defaults if not exists.
762
+ *
763
+ * @deprecated
764
+ */
765
+ export const getBankProfile = <ThrowOnError extends boolean = false>(
766
+ options: Options<GetBankProfileData, ThrowOnError>,
767
+ ) =>
768
+ (options.client ?? client).get<
769
+ GetBankProfileResponses,
770
+ GetBankProfileErrors,
771
+ ThrowOnError
772
+ >({ url: "/v1/default/banks/{bank_id}/profile", ...options });
773
+
774
+ /**
775
+ * Update memory bank disposition
776
+ *
777
+ * Update bank's disposition traits (skepticism, literalism, empathy)
778
+ *
779
+ * @deprecated
780
+ */
781
+ export const updateBankDisposition = <ThrowOnError extends boolean = false>(
782
+ options: Options<UpdateBankDispositionData, ThrowOnError>,
783
+ ) =>
784
+ (options.client ?? client).put<
785
+ UpdateBankDispositionResponses,
786
+ UpdateBankDispositionErrors,
787
+ ThrowOnError
788
+ >({
789
+ url: "/v1/default/banks/{bank_id}/profile",
790
+ ...options,
791
+ headers: {
792
+ "Content-Type": "application/json",
793
+ ...options.headers,
794
+ },
795
+ });
796
+
797
+ /**
798
+ * Add/merge memory bank background (deprecated)
799
+ *
800
+ * Deprecated: Use PUT /mission instead. This endpoint now updates the mission field.
801
+ *
802
+ * @deprecated
803
+ */
804
+ export const addBankBackground = <ThrowOnError extends boolean = false>(
805
+ options: Options<AddBankBackgroundData, ThrowOnError>,
806
+ ) =>
807
+ (options.client ?? client).post<
808
+ AddBankBackgroundResponses,
809
+ AddBankBackgroundErrors,
810
+ ThrowOnError
811
+ >({
812
+ url: "/v1/default/banks/{bank_id}/background",
813
+ ...options,
814
+ headers: {
815
+ "Content-Type": "application/json",
816
+ ...options.headers,
817
+ },
818
+ });
819
+
820
+ /**
821
+ * Delete memory bank
822
+ *
823
+ * Delete an entire memory bank including all memories, entities, documents, and the bank profile itself. This is a destructive operation that cannot be undone.
824
+ */
825
+ export const deleteBank = <ThrowOnError extends boolean = false>(
826
+ options: Options<DeleteBankData, ThrowOnError>,
827
+ ) =>
828
+ (options.client ?? client).delete<
829
+ DeleteBankResponses,
830
+ DeleteBankErrors,
831
+ ThrowOnError
832
+ >({ url: "/v1/default/banks/{bank_id}", ...options });
833
+
834
+ /**
835
+ * Partial update memory bank
836
+ *
837
+ * Partially update an agent's profile. Only provided fields will be updated.
838
+ */
839
+ export const updateBank = <ThrowOnError extends boolean = false>(
840
+ options: Options<UpdateBankData, ThrowOnError>,
841
+ ) =>
842
+ (options.client ?? client).patch<
843
+ UpdateBankResponses,
844
+ UpdateBankErrors,
845
+ ThrowOnError
846
+ >({
847
+ url: "/v1/default/banks/{bank_id}",
848
+ ...options,
849
+ headers: {
850
+ "Content-Type": "application/json",
851
+ ...options.headers,
852
+ },
853
+ });
854
+
855
+ /**
856
+ * Create or update memory bank
857
+ *
858
+ * Create a new agent or update existing agent with disposition and mission. Auto-fills missing fields with defaults.
859
+ */
860
+ export const createOrUpdateBank = <ThrowOnError extends boolean = false>(
861
+ options: Options<CreateOrUpdateBankData, ThrowOnError>,
862
+ ) =>
863
+ (options.client ?? client).put<
864
+ CreateOrUpdateBankResponses,
865
+ CreateOrUpdateBankErrors,
866
+ ThrowOnError
867
+ >({
868
+ url: "/v1/default/banks/{bank_id}",
869
+ ...options,
870
+ headers: {
871
+ "Content-Type": "application/json",
872
+ ...options.headers,
873
+ },
874
+ });
875
+
876
+ /**
877
+ * Clear all observations
878
+ *
879
+ * Delete all observations for a memory bank. This is useful for resetting the consolidated knowledge.
880
+ */
881
+ export const clearObservations = <ThrowOnError extends boolean = false>(
882
+ options: Options<ClearObservationsData, ThrowOnError>,
883
+ ) =>
884
+ (options.client ?? client).delete<
885
+ ClearObservationsResponses,
886
+ ClearObservationsErrors,
887
+ ThrowOnError
888
+ >({ url: "/v1/default/banks/{bank_id}/observations", ...options });
889
+
890
+ /**
891
+ * Clear observations for a memory
892
+ *
893
+ * Delete all observations derived from a specific memory and reset it for re-consolidation. The memory itself is not deleted. A consolidation job is triggered automatically so the memory will produce fresh observations on the next consolidation run.
894
+ */
895
+ export const clearMemoryObservations = <ThrowOnError extends boolean = false>(
896
+ options: Options<ClearMemoryObservationsData, ThrowOnError>,
897
+ ) =>
898
+ (options.client ?? client).delete<
899
+ ClearMemoryObservationsResponses,
900
+ ClearMemoryObservationsErrors,
901
+ ThrowOnError
902
+ >({
903
+ url: "/v1/default/banks/{bank_id}/memories/{memory_id}/observations",
904
+ ...options,
905
+ });
906
+
907
+ /**
908
+ * Reset bank configuration
909
+ *
910
+ * Reset bank configuration to defaults by removing all bank-specific overrides. The bank will then use global and tenant-level configuration only.
911
+ */
912
+ export const resetBankConfig = <ThrowOnError extends boolean = false>(
913
+ options: Options<ResetBankConfigData, ThrowOnError>,
914
+ ) =>
915
+ (options.client ?? client).delete<
916
+ ResetBankConfigResponses,
917
+ ResetBankConfigErrors,
918
+ ThrowOnError
919
+ >({ url: "/v1/default/banks/{bank_id}/config", ...options });
920
+
921
+ /**
922
+ * Get bank configuration
923
+ *
924
+ * Get fully resolved configuration for a bank including all hierarchical overrides (global → tenant → bank). The 'config' field contains all resolved config values. The 'overrides' field shows only bank-specific overrides.
925
+ */
926
+ export const getBankConfig = <ThrowOnError extends boolean = false>(
927
+ options: Options<GetBankConfigData, ThrowOnError>,
928
+ ) =>
929
+ (options.client ?? client).get<
930
+ GetBankConfigResponses,
931
+ GetBankConfigErrors,
932
+ ThrowOnError
933
+ >({ url: "/v1/default/banks/{bank_id}/config", ...options });
934
+
935
+ /**
936
+ * Update bank configuration
937
+ *
938
+ * Update configuration overrides for a bank. Only hierarchical fields can be overridden (LLM settings, retention parameters, etc.). Keys can be provided in Python field format (llm_provider) or environment variable format (ATULYA_API_LLM_PROVIDER).
939
+ */
940
+ export const updateBankConfig = <ThrowOnError extends boolean = false>(
941
+ options: Options<UpdateBankConfigData, ThrowOnError>,
942
+ ) =>
943
+ (options.client ?? client).patch<
944
+ UpdateBankConfigResponses,
945
+ UpdateBankConfigErrors,
946
+ ThrowOnError
947
+ >({
948
+ url: "/v1/default/banks/{bank_id}/config",
949
+ ...options,
950
+ headers: {
951
+ "Content-Type": "application/json",
952
+ ...options.headers,
953
+ },
954
+ });
955
+
956
+ /**
957
+ * Trigger consolidation
958
+ *
959
+ * Run memory consolidation to create/update observations from recent memories.
960
+ */
961
+ export const triggerConsolidation = <ThrowOnError extends boolean = false>(
962
+ options: Options<TriggerConsolidationData, ThrowOnError>,
963
+ ) =>
964
+ (options.client ?? client).post<
965
+ TriggerConsolidationResponses,
966
+ TriggerConsolidationErrors,
967
+ ThrowOnError
968
+ >({ url: "/v1/default/banks/{bank_id}/consolidate", ...options });
969
+
970
+ /**
971
+ * List webhooks
972
+ *
973
+ * List all webhooks registered for a bank.
974
+ */
975
+ export const listWebhooks = <ThrowOnError extends boolean = false>(
976
+ options: Options<ListWebhooksData, ThrowOnError>,
977
+ ) =>
978
+ (options.client ?? client).get<
979
+ ListWebhooksResponses,
980
+ ListWebhooksErrors,
981
+ ThrowOnError
982
+ >({ url: "/v1/default/banks/{bank_id}/webhooks", ...options });
983
+
984
+ /**
985
+ * Register webhook
986
+ *
987
+ * Register a webhook endpoint to receive event notifications for this bank.
988
+ */
989
+ export const createWebhook = <ThrowOnError extends boolean = false>(
990
+ options: Options<CreateWebhookData, ThrowOnError>,
991
+ ) =>
992
+ (options.client ?? client).post<
993
+ CreateWebhookResponses,
994
+ CreateWebhookErrors,
995
+ ThrowOnError
996
+ >({
997
+ url: "/v1/default/banks/{bank_id}/webhooks",
998
+ ...options,
999
+ headers: {
1000
+ "Content-Type": "application/json",
1001
+ ...options.headers,
1002
+ },
1003
+ });
1004
+
1005
+ /**
1006
+ * Delete webhook
1007
+ *
1008
+ * Remove a registered webhook.
1009
+ */
1010
+ export const deleteWebhook = <ThrowOnError extends boolean = false>(
1011
+ options: Options<DeleteWebhookData, ThrowOnError>,
1012
+ ) =>
1013
+ (options.client ?? client).delete<
1014
+ DeleteWebhookResponses,
1015
+ DeleteWebhookErrors,
1016
+ ThrowOnError
1017
+ >({ url: "/v1/default/banks/{bank_id}/webhooks/{webhook_id}", ...options });
1018
+
1019
+ /**
1020
+ * Update webhook
1021
+ *
1022
+ * Update one or more fields of a registered webhook. Only provided fields are changed.
1023
+ */
1024
+ export const updateWebhook = <ThrowOnError extends boolean = false>(
1025
+ options: Options<UpdateWebhookData, ThrowOnError>,
1026
+ ) =>
1027
+ (options.client ?? client).patch<
1028
+ UpdateWebhookResponses,
1029
+ UpdateWebhookErrors,
1030
+ ThrowOnError
1031
+ >({
1032
+ url: "/v1/default/banks/{bank_id}/webhooks/{webhook_id}",
1033
+ ...options,
1034
+ headers: {
1035
+ "Content-Type": "application/json",
1036
+ ...options.headers,
1037
+ },
1038
+ });
1039
+
1040
+ /**
1041
+ * List webhook deliveries
1042
+ *
1043
+ * Inspect delivery history for a webhook (useful for debugging).
1044
+ */
1045
+ export const listWebhookDeliveries = <ThrowOnError extends boolean = false>(
1046
+ options: Options<ListWebhookDeliveriesData, ThrowOnError>,
1047
+ ) =>
1048
+ (options.client ?? client).get<
1049
+ ListWebhookDeliveriesResponses,
1050
+ ListWebhookDeliveriesErrors,
1051
+ ThrowOnError
1052
+ >({
1053
+ url: "/v1/default/banks/{bank_id}/webhooks/{webhook_id}/deliveries",
1054
+ ...options,
1055
+ });
1056
+
1057
+ /**
1058
+ * Clear memory bank memories
1059
+ *
1060
+ * Delete memory units for a memory bank. Optionally filter by type (world, experience, opinion) to delete only specific types. This is a destructive operation that cannot be undone. The bank profile (disposition and background) will be preserved.
1061
+ */
1062
+ export const clearBankMemories = <ThrowOnError extends boolean = false>(
1063
+ options: Options<ClearBankMemoriesData, ThrowOnError>,
1064
+ ) =>
1065
+ (options.client ?? client).delete<
1066
+ ClearBankMemoriesResponses,
1067
+ ClearBankMemoriesErrors,
1068
+ ThrowOnError
1069
+ >({ url: "/v1/default/banks/{bank_id}/memories", ...options });
1070
+
1071
+ /**
1072
+ * Retain memories
1073
+ *
1074
+ * Retain memory items with automatic fact extraction.
1075
+ *
1076
+ * This is the main endpoint for storing memories. It supports both synchronous and asynchronous processing via the `async` parameter.
1077
+ *
1078
+ * **Features:**
1079
+ * - Efficient batch processing
1080
+ * - Automatic fact extraction from natural language
1081
+ * - Entity recognition and linking
1082
+ * - Document tracking with automatic upsert (when document_id is provided)
1083
+ * - Temporal and semantic linking
1084
+ * - Optional asynchronous processing
1085
+ *
1086
+ * **The system automatically:**
1087
+ * 1. Extracts semantic facts from the content
1088
+ * 2. Generates embeddings
1089
+ * 3. Deduplicates similar facts
1090
+ * 4. Creates temporal, semantic, and entity links
1091
+ * 5. Tracks document metadata
1092
+ *
1093
+ * **When `async=true`:** Returns immediately after queuing. Use the operations endpoint to monitor progress.
1094
+ *
1095
+ * **When `async=false` (default):** Waits for processing to complete.
1096
+ *
1097
+ * **Note:** If a memory item has a `document_id` that already exists, the old document and its memory units will be deleted before creating new ones (upsert behavior).
1098
+ */
1099
+ export const retainMemories = <ThrowOnError extends boolean = false>(
1100
+ options: Options<RetainMemoriesData, ThrowOnError>,
1101
+ ) =>
1102
+ (options.client ?? client).post<
1103
+ RetainMemoriesResponses,
1104
+ RetainMemoriesErrors,
1105
+ ThrowOnError
1106
+ >({
1107
+ url: "/v1/default/banks/{bank_id}/memories",
1108
+ ...options,
1109
+ headers: {
1110
+ "Content-Type": "application/json",
1111
+ ...options.headers,
1112
+ },
1113
+ });
1114
+
1115
+ /**
1116
+ * Convert files to memories
1117
+ *
1118
+ * Upload files (PDF, DOCX, etc.), convert them to markdown, and retain as memories.
1119
+ *
1120
+ * This endpoint handles file upload, conversion, and memory creation in a single operation.
1121
+ *
1122
+ * **Features:**
1123
+ * - Supports PDF, DOCX, PPTX, XLSX, images (with OCR), audio (with transcription)
1124
+ * - Automatic file-to-markdown conversion using pluggable parsers
1125
+ * - Files stored in object storage (PostgreSQL by default, S3 for production)
1126
+ * - Each file becomes a separate document with optional metadata/tags
1127
+ * - Always processes asynchronously — returns operation IDs immediately
1128
+ *
1129
+ * **The system automatically:**
1130
+ * 1. Stores uploaded files in object storage
1131
+ * 2. Converts files to markdown
1132
+ * 3. Creates document records with file metadata
1133
+ * 4. Extracts facts and creates memory units (same as regular retain)
1134
+ *
1135
+ * Use the operations endpoint to monitor progress.
1136
+ *
1137
+ * **Request format:** multipart/form-data with:
1138
+ * - `files`: One or more files to upload
1139
+ * - `request`: JSON string with FileRetainRequest model
1140
+ *
1141
+ * **Parser selection:**
1142
+ * - Set `parser` in the request body to override the server default for all files.
1143
+ * - Set `parser` inside a `files_metadata` entry for per-file control.
1144
+ * - Pass a list (e.g. `['iris', 'markitdown']`) to define an ordered fallback chain — each parser is tried in sequence until one succeeds.
1145
+ * - Falls back to the server default (`ATULYA_API_FILE_PARSER`) if not specified.
1146
+ * - Only parsers enabled on the server may be requested; others return HTTP 400.
1147
+ */
1148
+ export const fileRetain = <ThrowOnError extends boolean = false>(
1149
+ options: Options<FileRetainData, ThrowOnError>,
1150
+ ) =>
1151
+ (options.client ?? client).post<
1152
+ FileRetainResponses,
1153
+ FileRetainErrors,
1154
+ ThrowOnError
1155
+ >({
1156
+ ...formDataBodySerializer,
1157
+ url: "/v1/default/banks/{bank_id}/files/retain",
1158
+ ...options,
1159
+ headers: {
1160
+ "Content-Type": null,
1161
+ ...options.headers,
1162
+ },
1163
+ });