@vectorize-io/hindsight-client 0.4.15 → 0.4.17

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.
@@ -618,6 +618,42 @@ export type CreateMentalModelResponse = {
618
618
  operation_id: string;
619
619
  };
620
620
 
621
+ /**
622
+ * CreateWebhookRequest
623
+ *
624
+ * Request model for registering a webhook.
625
+ */
626
+ export type CreateWebhookRequest = {
627
+ /**
628
+ * Url
629
+ *
630
+ * HTTP(S) endpoint URL to deliver events to
631
+ */
632
+ url: string;
633
+ /**
634
+ * Secret
635
+ *
636
+ * HMAC-SHA256 signing secret (optional)
637
+ */
638
+ secret?: string | null;
639
+ /**
640
+ * Event Types
641
+ *
642
+ * List of event types to deliver. Currently supported: 'consolidation.completed'
643
+ */
644
+ event_types?: Array<string>;
645
+ /**
646
+ * Enabled
647
+ *
648
+ * Whether this webhook is active
649
+ */
650
+ enabled?: boolean;
651
+ /**
652
+ * HTTP delivery configuration (method, timeout, headers, params)
653
+ */
654
+ http_config?: WebhookHttpConfig;
655
+ };
656
+
621
657
  /**
622
658
  * DeleteDocumentResponse
623
659
  *
@@ -1915,6 +1951,26 @@ export type RetainResponse = {
1915
1951
  usage?: TokenUsage | null;
1916
1952
  };
1917
1953
 
1954
+ /**
1955
+ * RetryOperationResponse
1956
+ *
1957
+ * Response model for retry operation endpoint.
1958
+ */
1959
+ export type RetryOperationResponse = {
1960
+ /**
1961
+ * Success
1962
+ */
1963
+ success: boolean;
1964
+ /**
1965
+ * Message
1966
+ */
1967
+ message: string;
1968
+ /**
1969
+ * Operation Id
1970
+ */
1971
+ operation_id: string;
1972
+ };
1973
+
1918
1974
  /**
1919
1975
  * SourceFactsIncludeOptions
1920
1976
  *
@@ -1924,9 +1980,15 @@ export type SourceFactsIncludeOptions = {
1924
1980
  /**
1925
1981
  * Max Tokens
1926
1982
  *
1927
- * Maximum tokens for source facts
1983
+ * Maximum total tokens for source facts across all observations (-1 = unlimited)
1928
1984
  */
1929
1985
  max_tokens?: number;
1986
+ /**
1987
+ * Max Tokens Per Observation
1988
+ *
1989
+ * Maximum tokens of source facts per observation (-1 = unlimited)
1990
+ */
1991
+ max_tokens_per_observation?: number;
1930
1992
  };
1931
1993
 
1932
1994
  /**
@@ -2039,6 +2101,32 @@ export type UpdateDispositionRequest = {
2039
2101
  disposition: DispositionTraits;
2040
2102
  };
2041
2103
 
2104
+ /**
2105
+ * UpdateDocumentRequest
2106
+ *
2107
+ * Request model for updating a document's mutable fields.
2108
+ */
2109
+ export type UpdateDocumentRequest = {
2110
+ /**
2111
+ * Tags
2112
+ *
2113
+ * New tags for the document and its memory units. Triggers observation invalidation and re-consolidation.
2114
+ */
2115
+ tags?: Array<string> | null;
2116
+ };
2117
+
2118
+ /**
2119
+ * UpdateDocumentResponse
2120
+ *
2121
+ * Response model for update document endpoint.
2122
+ */
2123
+ export type UpdateDocumentResponse = {
2124
+ /**
2125
+ * Success
2126
+ */
2127
+ success?: boolean;
2128
+ };
2129
+
2042
2130
  /**
2043
2131
  * UpdateMentalModelRequest
2044
2132
  *
@@ -2075,6 +2163,42 @@ export type UpdateMentalModelRequest = {
2075
2163
  trigger?: MentalModelTrigger | null;
2076
2164
  };
2077
2165
 
2166
+ /**
2167
+ * UpdateWebhookRequest
2168
+ *
2169
+ * Request model for updating a webhook. Only provided fields are updated.
2170
+ */
2171
+ export type UpdateWebhookRequest = {
2172
+ /**
2173
+ * Url
2174
+ *
2175
+ * HTTP(S) endpoint URL
2176
+ */
2177
+ url?: string | null;
2178
+ /**
2179
+ * Secret
2180
+ *
2181
+ * HMAC-SHA256 signing secret. Omit to keep existing; send null to clear.
2182
+ */
2183
+ secret?: string | null;
2184
+ /**
2185
+ * Event Types
2186
+ *
2187
+ * List of event types
2188
+ */
2189
+ event_types?: Array<string> | null;
2190
+ /**
2191
+ * Enabled
2192
+ *
2193
+ * Whether this webhook is active
2194
+ */
2195
+ enabled?: boolean | null;
2196
+ /**
2197
+ * HTTP delivery configuration
2198
+ */
2199
+ http_config?: WebhookHttpConfig | null;
2200
+ };
2201
+
2078
2202
  /**
2079
2203
  * ValidationError
2080
2204
  */
@@ -2111,6 +2235,173 @@ export type VersionResponse = {
2111
2235
  features: FeaturesInfo;
2112
2236
  };
2113
2237
 
2238
+ /**
2239
+ * WebhookDeliveryListResponse
2240
+ *
2241
+ * Response model for listing webhook deliveries.
2242
+ */
2243
+ export type WebhookDeliveryListResponse = {
2244
+ /**
2245
+ * Items
2246
+ */
2247
+ items: Array<WebhookDeliveryResponse>;
2248
+ /**
2249
+ * Next Cursor
2250
+ */
2251
+ next_cursor?: string | null;
2252
+ };
2253
+
2254
+ /**
2255
+ * WebhookDeliveryResponse
2256
+ *
2257
+ * Response model for a webhook delivery record.
2258
+ */
2259
+ export type WebhookDeliveryResponse = {
2260
+ /**
2261
+ * Id
2262
+ */
2263
+ id: string;
2264
+ /**
2265
+ * Webhook Id
2266
+ */
2267
+ webhook_id: string | null;
2268
+ /**
2269
+ * Url
2270
+ */
2271
+ url: string;
2272
+ /**
2273
+ * Event Type
2274
+ */
2275
+ event_type: string;
2276
+ /**
2277
+ * Status
2278
+ */
2279
+ status: string;
2280
+ /**
2281
+ * Attempts
2282
+ */
2283
+ attempts: number;
2284
+ /**
2285
+ * Next Retry At
2286
+ */
2287
+ next_retry_at?: string | null;
2288
+ /**
2289
+ * Last Error
2290
+ */
2291
+ last_error?: string | null;
2292
+ /**
2293
+ * Last Response Status
2294
+ */
2295
+ last_response_status?: number | null;
2296
+ /**
2297
+ * Last Response Body
2298
+ */
2299
+ last_response_body?: string | null;
2300
+ /**
2301
+ * Last Attempt At
2302
+ */
2303
+ last_attempt_at?: string | null;
2304
+ /**
2305
+ * Created At
2306
+ */
2307
+ created_at?: string | null;
2308
+ /**
2309
+ * Updated At
2310
+ */
2311
+ updated_at?: string | null;
2312
+ };
2313
+
2314
+ /**
2315
+ * WebhookHttpConfig
2316
+ *
2317
+ * HTTP delivery configuration for a webhook.
2318
+ */
2319
+ export type WebhookHttpConfig = {
2320
+ /**
2321
+ * Method
2322
+ *
2323
+ * HTTP method: GET or POST
2324
+ */
2325
+ method?: string;
2326
+ /**
2327
+ * Timeout Seconds
2328
+ *
2329
+ * HTTP request timeout in seconds
2330
+ */
2331
+ timeout_seconds?: number;
2332
+ /**
2333
+ * Headers
2334
+ *
2335
+ * Custom HTTP headers
2336
+ */
2337
+ headers?: {
2338
+ [key: string]: string;
2339
+ };
2340
+ /**
2341
+ * Params
2342
+ *
2343
+ * Custom HTTP query parameters
2344
+ */
2345
+ params?: {
2346
+ [key: string]: string;
2347
+ };
2348
+ };
2349
+
2350
+ /**
2351
+ * WebhookListResponse
2352
+ *
2353
+ * Response model for listing webhooks.
2354
+ */
2355
+ export type WebhookListResponse = {
2356
+ /**
2357
+ * Items
2358
+ */
2359
+ items: Array<WebhookResponse>;
2360
+ };
2361
+
2362
+ /**
2363
+ * WebhookResponse
2364
+ *
2365
+ * Response model for a webhook.
2366
+ */
2367
+ export type WebhookResponse = {
2368
+ /**
2369
+ * Id
2370
+ */
2371
+ id: string;
2372
+ /**
2373
+ * Bank Id
2374
+ */
2375
+ bank_id: string | null;
2376
+ /**
2377
+ * Url
2378
+ */
2379
+ url: string;
2380
+ /**
2381
+ * Secret
2382
+ *
2383
+ * Signing secret (redacted in responses)
2384
+ */
2385
+ secret?: string | null;
2386
+ /**
2387
+ * Event Types
2388
+ */
2389
+ event_types: Array<string>;
2390
+ /**
2391
+ * Enabled
2392
+ */
2393
+ enabled: boolean;
2394
+ http_config?: WebhookHttpConfig;
2395
+ /**
2396
+ * Created At
2397
+ */
2398
+ created_at?: string | null;
2399
+ /**
2400
+ * Updated At
2401
+ */
2402
+ updated_at?: string | null;
2403
+ };
2404
+
2114
2405
  export type HealthEndpointHealthGetData = {
2115
2406
  body?: never;
2116
2407
  path?: never;
@@ -2304,6 +2595,45 @@ export type GetMemoryResponses = {
2304
2595
  200: unknown;
2305
2596
  };
2306
2597
 
2598
+ export type GetObservationHistoryData = {
2599
+ body?: never;
2600
+ headers?: {
2601
+ /**
2602
+ * Authorization
2603
+ */
2604
+ authorization?: string | null;
2605
+ };
2606
+ path: {
2607
+ /**
2608
+ * Bank Id
2609
+ */
2610
+ bank_id: string;
2611
+ /**
2612
+ * Memory Id
2613
+ */
2614
+ memory_id: string;
2615
+ };
2616
+ query?: never;
2617
+ url: "/v1/default/banks/{bank_id}/memories/{memory_id}/history";
2618
+ };
2619
+
2620
+ export type GetObservationHistoryErrors = {
2621
+ /**
2622
+ * Validation Error
2623
+ */
2624
+ 422: HttpValidationError;
2625
+ };
2626
+
2627
+ export type GetObservationHistoryError =
2628
+ GetObservationHistoryErrors[keyof GetObservationHistoryErrors];
2629
+
2630
+ export type GetObservationHistoryResponses = {
2631
+ /**
2632
+ * Successful Response
2633
+ */
2634
+ 200: unknown;
2635
+ };
2636
+
2307
2637
  export type RecallMemoriesData = {
2308
2638
  body: RecallRequest;
2309
2639
  headers?: {
@@ -2798,6 +3128,45 @@ export type UpdateMentalModelResponses = {
2798
3128
  export type UpdateMentalModelResponse =
2799
3129
  UpdateMentalModelResponses[keyof UpdateMentalModelResponses];
2800
3130
 
3131
+ export type GetMentalModelHistoryData = {
3132
+ body?: never;
3133
+ headers?: {
3134
+ /**
3135
+ * Authorization
3136
+ */
3137
+ authorization?: string | null;
3138
+ };
3139
+ path: {
3140
+ /**
3141
+ * Bank Id
3142
+ */
3143
+ bank_id: string;
3144
+ /**
3145
+ * Mental Model Id
3146
+ */
3147
+ mental_model_id: string;
3148
+ };
3149
+ query?: never;
3150
+ url: "/v1/default/banks/{bank_id}/mental-models/{mental_model_id}/history";
3151
+ };
3152
+
3153
+ export type GetMentalModelHistoryErrors = {
3154
+ /**
3155
+ * Validation Error
3156
+ */
3157
+ 422: HttpValidationError;
3158
+ };
3159
+
3160
+ export type GetMentalModelHistoryError =
3161
+ GetMentalModelHistoryErrors[keyof GetMentalModelHistoryErrors];
3162
+
3163
+ export type GetMentalModelHistoryResponses = {
3164
+ /**
3165
+ * Successful Response
3166
+ */
3167
+ 200: unknown;
3168
+ };
3169
+
2801
3170
  export type RefreshMentalModelData = {
2802
3171
  body?: never;
2803
3172
  headers?: {
@@ -3212,6 +3581,48 @@ export type GetDocumentResponses = {
3212
3581
  export type GetDocumentResponse =
3213
3582
  GetDocumentResponses[keyof GetDocumentResponses];
3214
3583
 
3584
+ export type UpdateDocumentData = {
3585
+ body: UpdateDocumentRequest;
3586
+ headers?: {
3587
+ /**
3588
+ * Authorization
3589
+ */
3590
+ authorization?: string | null;
3591
+ };
3592
+ path: {
3593
+ /**
3594
+ * Bank Id
3595
+ */
3596
+ bank_id: string;
3597
+ /**
3598
+ * Document Id
3599
+ */
3600
+ document_id: string;
3601
+ };
3602
+ query?: never;
3603
+ url: "/v1/default/banks/{bank_id}/documents/{document_id}";
3604
+ };
3605
+
3606
+ export type UpdateDocumentErrors = {
3607
+ /**
3608
+ * Validation Error
3609
+ */
3610
+ 422: HttpValidationError;
3611
+ };
3612
+
3613
+ export type UpdateDocumentError =
3614
+ UpdateDocumentErrors[keyof UpdateDocumentErrors];
3615
+
3616
+ export type UpdateDocumentResponses = {
3617
+ /**
3618
+ * Successful Response
3619
+ */
3620
+ 200: UpdateDocumentResponse;
3621
+ };
3622
+
3623
+ export type UpdateDocumentResponse2 =
3624
+ UpdateDocumentResponses[keyof UpdateDocumentResponses];
3625
+
3215
3626
  export type ListTagsData = {
3216
3627
  body?: never;
3217
3628
  headers?: {
@@ -3324,6 +3735,12 @@ export type ListOperationsData = {
3324
3735
  * Filter by status: pending, completed, or failed
3325
3736
  */
3326
3737
  status?: string | null;
3738
+ /**
3739
+ * Type
3740
+ *
3741
+ * Filter by operation type: retain, consolidation, refresh_mental_model, file_convert_retain, webhook_delivery
3742
+ */
3743
+ type?: string | null;
3327
3744
  /**
3328
3745
  * Limit
3329
3746
  *
@@ -3444,6 +3861,48 @@ export type GetOperationStatusResponses = {
3444
3861
  export type GetOperationStatusResponse =
3445
3862
  GetOperationStatusResponses[keyof GetOperationStatusResponses];
3446
3863
 
3864
+ export type RetryOperationData = {
3865
+ body?: never;
3866
+ headers?: {
3867
+ /**
3868
+ * Authorization
3869
+ */
3870
+ authorization?: string | null;
3871
+ };
3872
+ path: {
3873
+ /**
3874
+ * Bank Id
3875
+ */
3876
+ bank_id: string;
3877
+ /**
3878
+ * Operation Id
3879
+ */
3880
+ operation_id: string;
3881
+ };
3882
+ query?: never;
3883
+ url: "/v1/default/banks/{bank_id}/operations/{operation_id}/retry";
3884
+ };
3885
+
3886
+ export type RetryOperationErrors = {
3887
+ /**
3888
+ * Validation Error
3889
+ */
3890
+ 422: HttpValidationError;
3891
+ };
3892
+
3893
+ export type RetryOperationError =
3894
+ RetryOperationErrors[keyof RetryOperationErrors];
3895
+
3896
+ export type RetryOperationResponses = {
3897
+ /**
3898
+ * Successful Response
3899
+ */
3900
+ 200: RetryOperationResponse;
3901
+ };
3902
+
3903
+ export type RetryOperationResponse2 =
3904
+ RetryOperationResponses[keyof RetryOperationResponses];
3905
+
3447
3906
  export type GetBankProfileData = {
3448
3907
  body?: never;
3449
3908
  headers?: {
@@ -3899,6 +4358,217 @@ export type TriggerConsolidationResponses = {
3899
4358
  export type TriggerConsolidationResponse =
3900
4359
  TriggerConsolidationResponses[keyof TriggerConsolidationResponses];
3901
4360
 
4361
+ export type ListWebhooksData = {
4362
+ body?: never;
4363
+ headers?: {
4364
+ /**
4365
+ * Authorization
4366
+ */
4367
+ authorization?: string | null;
4368
+ };
4369
+ path: {
4370
+ /**
4371
+ * Bank Id
4372
+ */
4373
+ bank_id: string;
4374
+ };
4375
+ query?: never;
4376
+ url: "/v1/default/banks/{bank_id}/webhooks";
4377
+ };
4378
+
4379
+ export type ListWebhooksErrors = {
4380
+ /**
4381
+ * Validation Error
4382
+ */
4383
+ 422: HttpValidationError;
4384
+ };
4385
+
4386
+ export type ListWebhooksError = ListWebhooksErrors[keyof ListWebhooksErrors];
4387
+
4388
+ export type ListWebhooksResponses = {
4389
+ /**
4390
+ * Successful Response
4391
+ */
4392
+ 200: WebhookListResponse;
4393
+ };
4394
+
4395
+ export type ListWebhooksResponse =
4396
+ ListWebhooksResponses[keyof ListWebhooksResponses];
4397
+
4398
+ export type CreateWebhookData = {
4399
+ body: CreateWebhookRequest;
4400
+ headers?: {
4401
+ /**
4402
+ * Authorization
4403
+ */
4404
+ authorization?: string | null;
4405
+ };
4406
+ path: {
4407
+ /**
4408
+ * Bank Id
4409
+ */
4410
+ bank_id: string;
4411
+ };
4412
+ query?: never;
4413
+ url: "/v1/default/banks/{bank_id}/webhooks";
4414
+ };
4415
+
4416
+ export type CreateWebhookErrors = {
4417
+ /**
4418
+ * Validation Error
4419
+ */
4420
+ 422: HttpValidationError;
4421
+ };
4422
+
4423
+ export type CreateWebhookError = CreateWebhookErrors[keyof CreateWebhookErrors];
4424
+
4425
+ export type CreateWebhookResponses = {
4426
+ /**
4427
+ * Successful Response
4428
+ */
4429
+ 201: WebhookResponse;
4430
+ };
4431
+
4432
+ export type CreateWebhookResponse =
4433
+ CreateWebhookResponses[keyof CreateWebhookResponses];
4434
+
4435
+ export type DeleteWebhookData = {
4436
+ body?: never;
4437
+ headers?: {
4438
+ /**
4439
+ * Authorization
4440
+ */
4441
+ authorization?: string | null;
4442
+ };
4443
+ path: {
4444
+ /**
4445
+ * Bank Id
4446
+ */
4447
+ bank_id: string;
4448
+ /**
4449
+ * Webhook Id
4450
+ */
4451
+ webhook_id: string;
4452
+ };
4453
+ query?: never;
4454
+ url: "/v1/default/banks/{bank_id}/webhooks/{webhook_id}";
4455
+ };
4456
+
4457
+ export type DeleteWebhookErrors = {
4458
+ /**
4459
+ * Validation Error
4460
+ */
4461
+ 422: HttpValidationError;
4462
+ };
4463
+
4464
+ export type DeleteWebhookError = DeleteWebhookErrors[keyof DeleteWebhookErrors];
4465
+
4466
+ export type DeleteWebhookResponses = {
4467
+ /**
4468
+ * Successful Response
4469
+ */
4470
+ 200: DeleteResponse;
4471
+ };
4472
+
4473
+ export type DeleteWebhookResponse =
4474
+ DeleteWebhookResponses[keyof DeleteWebhookResponses];
4475
+
4476
+ export type UpdateWebhookData = {
4477
+ body: UpdateWebhookRequest;
4478
+ headers?: {
4479
+ /**
4480
+ * Authorization
4481
+ */
4482
+ authorization?: string | null;
4483
+ };
4484
+ path: {
4485
+ /**
4486
+ * Bank Id
4487
+ */
4488
+ bank_id: string;
4489
+ /**
4490
+ * Webhook Id
4491
+ */
4492
+ webhook_id: string;
4493
+ };
4494
+ query?: never;
4495
+ url: "/v1/default/banks/{bank_id}/webhooks/{webhook_id}";
4496
+ };
4497
+
4498
+ export type UpdateWebhookErrors = {
4499
+ /**
4500
+ * Validation Error
4501
+ */
4502
+ 422: HttpValidationError;
4503
+ };
4504
+
4505
+ export type UpdateWebhookError = UpdateWebhookErrors[keyof UpdateWebhookErrors];
4506
+
4507
+ export type UpdateWebhookResponses = {
4508
+ /**
4509
+ * Successful Response
4510
+ */
4511
+ 200: WebhookResponse;
4512
+ };
4513
+
4514
+ export type UpdateWebhookResponse =
4515
+ UpdateWebhookResponses[keyof UpdateWebhookResponses];
4516
+
4517
+ export type ListWebhookDeliveriesData = {
4518
+ body?: never;
4519
+ headers?: {
4520
+ /**
4521
+ * Authorization
4522
+ */
4523
+ authorization?: string | null;
4524
+ };
4525
+ path: {
4526
+ /**
4527
+ * Bank Id
4528
+ */
4529
+ bank_id: string;
4530
+ /**
4531
+ * Webhook Id
4532
+ */
4533
+ webhook_id: string;
4534
+ };
4535
+ query?: {
4536
+ /**
4537
+ * Limit
4538
+ *
4539
+ * Maximum number of deliveries to return
4540
+ */
4541
+ limit?: number;
4542
+ /**
4543
+ * Cursor
4544
+ *
4545
+ * Pagination cursor (created_at of last item)
4546
+ */
4547
+ cursor?: string | null;
4548
+ };
4549
+ url: "/v1/default/banks/{bank_id}/webhooks/{webhook_id}/deliveries";
4550
+ };
4551
+
4552
+ export type ListWebhookDeliveriesErrors = {
4553
+ /**
4554
+ * Validation Error
4555
+ */
4556
+ 422: HttpValidationError;
4557
+ };
4558
+
4559
+ export type ListWebhookDeliveriesError =
4560
+ ListWebhookDeliveriesErrors[keyof ListWebhookDeliveriesErrors];
4561
+
4562
+ export type ListWebhookDeliveriesResponses = {
4563
+ /**
4564
+ * Successful Response
4565
+ */
4566
+ 200: WebhookDeliveryListResponse;
4567
+ };
4568
+
4569
+ export type ListWebhookDeliveriesResponse =
4570
+ ListWebhookDeliveriesResponses[keyof ListWebhookDeliveriesResponses];
4571
+
3902
4572
  export type ClearBankMemoriesData = {
3903
4573
  body?: never;
3904
4574
  headers?: {