@truepic/vision-api-types 3.84.0 → 3.86.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 (2) hide show
  1. package/index.d.ts +298 -13
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -329,7 +329,7 @@ export interface paths {
329
329
  put?: never;
330
330
  /**
331
331
  * Complete an inspection
332
- * @description Finish an inspection request and set it to Ready for Review. The inspection request must be In Progress, otherwise a `400` error will be returned.
332
+ * @description Submit an inspection. The inspection must be Started or In Progress, otherwise a `400` error will be returned. Submitting moves the inspection to Processing while photo/AI processing runs in the background. If no processing is needed, the inspection will be pushed to Ready-for-Review after a short delay. A Ready-for-Review, Closed, or already-Processing inspection is a no-op that returns `200` without changing status.
333
333
  */
334
334
  post: {
335
335
  parameters: {
@@ -343,7 +343,7 @@ export interface paths {
343
343
  };
344
344
  requestBody?: never;
345
345
  responses: {
346
- /** @description The inspection request was successfully finished and set to Ready for Review. */
346
+ /** @description The inspection was successfully submitted or the request was a no-op because the inspection was already Processing, Ready for Review, or Closed. */
347
347
  200: {
348
348
  headers: {
349
349
  [name: string]: unknown;
@@ -3155,13 +3155,19 @@ export interface components {
3155
3155
  input_fingerprint: string | null;
3156
3156
  /** @description FK to ai_inspection_item_results.id. */
3157
3157
  inspection_item_id: number;
3158
+ /** @description VISION-2692: true when this `found` result selected the field's configured "not present / can't determine" option, so it reports ABSENCE rather than a detection. Read-time consumers (disposition, status rollup, alert count, conflict detection, PDF) use this instead of trying to recognise absence from the value text. Always false on `not_captured` / `conflict` rows and on rows predating the flag. */
3159
+ not_captured_option_selected: boolean;
3158
3160
  override_at: string | null;
3159
3161
  /** @description FK to users.id; set when a user overrides the disposition (Sprint 2). */
3160
3162
  override_user_id: number | null;
3161
3163
  reasoning: string | null;
3162
3164
  /** @description Evidence sources for this extraction. Empty when status !== 'found'. */
3163
3165
  sources: components["schemas"]["Source"][];
3164
- /** @description Per-field extraction status ( {@link FieldStatus } ). The DB column is a free-form string so future values (skipped, error, partial, low_confidence) need no migration; adding one means widening {@link FieldStatus } and the model-layer Joi `.valid(...)` together. */
3166
+ /**
3167
+ * @description Per-field extraction status ( {@link FieldStatus } ). The DB column is a free-form string so future values (skipped, error, partial) need no migration; adding one means widening {@link FieldStatus } and the model-layer Joi `.valid(...)` together.
3168
+ *
3169
+ * Model uncertainty is deliberately not one of them. A status is a terminal verdict occupying the same slot as `not_captured`, and would carry no value, sources or confidence; the product needs the opposite — a field that keeps its answer and is flagged alongside it, so it can read as low confidence and still pass. That is the serialized `is_low_confidence` flag (VISION-2911), derived from `confidence` at read time.
3170
+ */
3165
3171
  status: components["schemas"]["FieldStatus"];
3166
3172
  /**
3167
3173
  * Format: date-time
@@ -3315,6 +3321,14 @@ export interface components {
3315
3321
  disposition: "pass" | "warn";
3316
3322
  field_id: number;
3317
3323
  field_name: string;
3324
+ /**
3325
+ * @description True when a `found` field's `confidence` is below the configured threshold. Never true for a row whose value is the field's own configured "not present" option: that reports absence, so its confidence describes a selection rather than an answer.
3326
+ *
3327
+ * Independent of `disposition`, which reports only whether the answer is wrong or missing and never warns for low confidence alone — so `disposition: 'pass'` with `is_low_confidence: true` means "the answer looks fine but the model was unsure", and the inspection's `ai_status` and alert still flag it for review. A field can be both.
3328
+ */
3329
+ is_low_confidence: boolean;
3330
+ /** @description True when the model answered a `found` field by selecting its configured "not present" option (VISION-2692) — the row REPORTS ABSENCE, and clients must not render it as a positive finding. Mirrors `SerializedAIItemFieldResult.not_captured_option_selected` in `serializers/ai-inspection-items.ts`. */
3331
+ not_captured_option_selected: boolean;
3318
3332
  reasoning: string | null;
3319
3333
  sources: components["schemas"]["Source"][];
3320
3334
  status: components["schemas"]["FieldStatus"];
@@ -4695,6 +4709,12 @@ export interface components {
4695
4709
  * @example 2020-05-01T21:44:40.000Z
4696
4710
  */
4697
4711
  expires_at?: string | null;
4712
+ /**
4713
+ * Format: date-time
4714
+ * @description The date/time the inspection entered Processing (was submitted). Stamped on every entry into Processing (app-user submit, request-more resubmit, or request expiry), so it repopulates on resubmit. A non-null value is the durable "already submitted" signal consumed by vision-web and the mobile apps. Reset to `null` whenever a request-more moves the inspection back to In-Progress.
4715
+ * @example 2020-05-01T21:44:40.000Z
4716
+ */
4717
+ finished_at?: string | null;
4698
4718
  /**
4699
4719
  * @description The id of the group this inspection is for.
4700
4720
  * @example 23
@@ -4770,6 +4790,30 @@ export interface components {
4770
4790
  photo_uploaded_at?: string;
4771
4791
  /** @description The platform of our app that the inspection will be / has been performed on. */
4772
4792
  platform?: components["schemas"]["InspectionPlatform"];
4793
+ /**
4794
+ * Format: date-time
4795
+ * @description The date/time the inspection last entered Processing. Per-round token: the finalizer carries the round it was enqueued for and only transitions while this still matches, so a stale finalizer can't finalize a newer round. `null` for legacy inspections. VISION-2718.
4796
+ * @example 2020-05-01T21:44:40.000Z
4797
+ */
4798
+ processing_started_at?: string | null;
4799
+ /**
4800
+ * Format: date-time
4801
+ * @description The date/time the inspection moved to Ready for Review (processing completed, terminally failed, or timed out), written by the finalizer's transition. Reset to `null` whenever a request-more moves the inspection back to In-Progress and repopulated at the next finalization.
4802
+ * @example 2020-05-01T21:44:40.000Z
4803
+ */
4804
+ ready_at?: string | null;
4805
+ /**
4806
+ * Format: date-time
4807
+ * @description The date/time the Ready-for-Review assignee email was enqueued by the finalizer. Durable per-channel idempotency marker: `null` means not yet sent. Reset to `null` whenever the inspection (re-)enters Processing.
4808
+ * @example 2020-05-01T21:44:40.000Z
4809
+ */
4810
+ ready_for_review_email_sent_at?: string | null;
4811
+ /**
4812
+ * Format: date-time
4813
+ * @description The date/time the Ready-for-Review status webhook was enqueued by the finalizer. Durable per-channel idempotency marker: `null` means not yet sent. Reset to `null` whenever the inspection (re-)enters Processing.
4814
+ * @example 2020-05-01T21:44:40.000Z
4815
+ */
4816
+ ready_for_review_webhook_sent_at?: string | null;
4773
4817
  /**
4774
4818
  * Format: date-time
4775
4819
  * @description The date/time (in UTC) the inspection is scheduled to be sent to the customer
@@ -6718,6 +6762,12 @@ export interface components {
6718
6762
  * @example 2020-05-01T21:44:40.000Z
6719
6763
  */
6720
6764
  expires_at?: string | null;
6765
+ /**
6766
+ * Format: date-time
6767
+ * @description The date/time the inspection entered Processing (was submitted). Stamped on every entry into Processing (app-user submit, request-more resubmit, or request expiry), so it repopulates on resubmit. A non-null value is the durable "already submitted" signal consumed by vision-web and the mobile apps. Reset to `null` whenever a request-more moves the inspection back to In-Progress.
6768
+ * @example 2020-05-01T21:44:40.000Z
6769
+ */
6770
+ finished_at?: string | null;
6721
6771
  /**
6722
6772
  * @description The id of the group this inspection is for.
6723
6773
  * @example 23
@@ -6793,6 +6843,30 @@ export interface components {
6793
6843
  photo_uploaded_at?: string;
6794
6844
  /** @description The platform of our app that the inspection will be / has been performed on. */
6795
6845
  platform?: components["schemas"]["InspectionPlatform"];
6846
+ /**
6847
+ * Format: date-time
6848
+ * @description The date/time the inspection last entered Processing. Per-round token: the finalizer carries the round it was enqueued for and only transitions while this still matches, so a stale finalizer can't finalize a newer round. `null` for legacy inspections. VISION-2718.
6849
+ * @example 2020-05-01T21:44:40.000Z
6850
+ */
6851
+ processing_started_at?: string | null;
6852
+ /**
6853
+ * Format: date-time
6854
+ * @description The date/time the inspection moved to Ready for Review (processing completed, terminally failed, or timed out), written by the finalizer's transition. Reset to `null` whenever a request-more moves the inspection back to In-Progress and repopulated at the next finalization.
6855
+ * @example 2020-05-01T21:44:40.000Z
6856
+ */
6857
+ ready_at?: string | null;
6858
+ /**
6859
+ * Format: date-time
6860
+ * @description The date/time the Ready-for-Review assignee email was enqueued by the finalizer. Durable per-channel idempotency marker: `null` means not yet sent. Reset to `null` whenever the inspection (re-)enters Processing.
6861
+ * @example 2020-05-01T21:44:40.000Z
6862
+ */
6863
+ ready_for_review_email_sent_at?: string | null;
6864
+ /**
6865
+ * Format: date-time
6866
+ * @description The date/time the Ready-for-Review status webhook was enqueued by the finalizer. Durable per-channel idempotency marker: `null` means not yet sent. Reset to `null` whenever the inspection (re-)enters Processing.
6867
+ * @example 2020-05-01T21:44:40.000Z
6868
+ */
6869
+ ready_for_review_webhook_sent_at?: string | null;
6796
6870
  /**
6797
6871
  * Format: date-time
6798
6872
  * @description The date/time (in UTC) the inspection is scheduled to be sent to the customer
@@ -6995,12 +7069,6 @@ export interface components {
6995
7069
  * @example true
6996
7070
  */
6997
7071
  test_insecure_device: boolean;
6998
- /**
6999
- * @description Whether or not to surface an Inspection Readiness fail/warn as an alert. Opt-in: defaults to false so an org's alerting behavior does not change until it explicitly enables Inspection Readiness alerting.
7000
- * @default false
7001
- * @example false
7002
- */
7003
- test_inspection_readiness: boolean;
7004
7072
  /**
7005
7073
  * @description Whether or not to include the object detection test in this alert.
7006
7074
  * @default true
@@ -7013,7 +7081,8 @@ export interface components {
7013
7081
  */
7014
7082
  test_pop: boolean;
7015
7083
  /**
7016
- * @description Whether or not to include the ris test in this alert.
7084
+ * @deprecated
7085
+ * @description Whether or not to include the ris test in this alert. Reverse Image Search is deprecated and no longer runs.
7017
7086
  * @example true
7018
7087
  */
7019
7088
  test_ris: boolean;
@@ -7300,7 +7369,7 @@ export interface components {
7300
7369
  * @description The possible statuses for an inspection.
7301
7370
  * @enum {number}
7302
7371
  */
7303
- InspectionStatusId: 1 | 2 | 3 | 4 | 5 | 6 | 7;
7372
+ InspectionStatusId: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
7304
7373
  InspectionTruepic: {
7305
7374
  /**
7306
7375
  * @description The accuracy of the GPS coordinates in meters.
@@ -7599,7 +7668,8 @@ export interface components {
7599
7668
  */
7600
7669
  processing_completed_at?: string;
7601
7670
  /**
7602
- * @description The status of a reverse-image-search test on this Truepic.
7671
+ * @deprecated
7672
+ * @description The status of a reverse-image-search test on this Truepic. Reverse Image Search is deprecated and no longer runs. New captures will have ris_status 'N' (not applicable).
7603
7673
  * @example P
7604
7674
  */
7605
7675
  ris_status: components["schemas"]["TestResult"];
@@ -8740,7 +8810,7 @@ export interface components {
8740
8810
  updated_by_user_id: number | null;
8741
8811
  };
8742
8812
  /** @enum {string} */
8743
- OrganizationEnabledFeatureType: "ai_analysis" | "ask_for_app_review" | "inspection_device_insights" | "device_details" | "risk_network" | "external_risk_network" | "content_analysis_odometer" | "content_analysis_text_matching" | "content_analysis_vin" | "content_analysis_dot_tin" | "object_detection_auto" | "object_detection_jewelry" | "object_detection_real_estate" | "landing_pages" | "inspection_readiness" | "dashboard_user_feedback_forms" | "member_homepage" | "reuse_detection" | "restrict_members_to_inspection_details" | "ai_analysis_configuration" | "guided_capture" | "verisk_sso";
8813
+ OrganizationEnabledFeatureType: "ai_analysis" | "ask_for_app_review" | "inspection_device_insights" | "device_details" | "risk_network" | "external_risk_network" | "content_analysis_odometer" | "content_analysis_text_matching" | "content_analysis_vin" | "content_analysis_dot_tin" | "object_detection_auto" | "object_detection_jewelry" | "object_detection_real_estate" | "landing_pages" | "dashboard_user_feedback_forms" | "member_homepage" | "reuse_detection" | "restrict_members_to_inspection_details" | "ai_analysis_configuration" | "guided_capture" | "verisk_sso" | "enable_processing_status_for_inspections";
8744
8814
  /** @description A possible outcome for an inspection */
8745
8815
  Outcome: {
8746
8816
  /**
@@ -9933,6 +10003,8 @@ export interface components {
9933
10003
  ai_inspection_items_pipeline_id: number | null;
9934
10004
  ai_inspection_ready_result?: components["schemas"]["AIInspectionReadyResult"] | unknown;
9935
10005
  ai_item_type_instances?: components["schemas"]["PopulatedAIItemTypeInstance"][];
10006
+ /** @description Low-confidence threshold resolved from `global_configs` by `inspection-ai-items-populator`, carried here because the serializers that apply it are synchronous. Present whenever `ai_item_type_instances` is. */
10007
+ ai_low_confidence_threshold?: number;
9936
10008
  /**
9937
10009
  * @description The AI analysis result for this inspection.
9938
10010
  * @example pass
@@ -10051,6 +10123,12 @@ export interface components {
10051
10123
  * @example 2020-05-01T21:44:40.000Z
10052
10124
  */
10053
10125
  expires_at?: string | null;
10126
+ /**
10127
+ * Format: date-time
10128
+ * @description The date/time the inspection entered Processing (was submitted). Stamped on every entry into Processing (app-user submit, request-more resubmit, or request expiry), so it repopulates on resubmit. A non-null value is the durable "already submitted" signal consumed by vision-web and the mobile apps. Reset to `null` whenever a request-more moves the inspection back to In-Progress.
10129
+ * @example 2020-05-01T21:44:40.000Z
10130
+ */
10131
+ finished_at?: string | null;
10054
10132
  group?: components["schemas"]["Group"];
10055
10133
  /**
10056
10134
  * @description The id of the group this inspection is for.
@@ -10369,6 +10447,30 @@ export interface components {
10369
10447
  photos: components["schemas"]["InspectionTruepic"][];
10370
10448
  /** @description The platform of our app that the inspection will be / has been performed on. */
10371
10449
  platform?: components["schemas"]["InspectionPlatform"];
10450
+ /**
10451
+ * Format: date-time
10452
+ * @description The date/time the inspection last entered Processing. Per-round token: the finalizer carries the round it was enqueued for and only transitions while this still matches, so a stale finalizer can't finalize a newer round. `null` for legacy inspections. VISION-2718.
10453
+ * @example 2020-05-01T21:44:40.000Z
10454
+ */
10455
+ processing_started_at?: string | null;
10456
+ /**
10457
+ * Format: date-time
10458
+ * @description The date/time the inspection moved to Ready for Review (processing completed, terminally failed, or timed out), written by the finalizer's transition. Reset to `null` whenever a request-more moves the inspection back to In-Progress and repopulated at the next finalization.
10459
+ * @example 2020-05-01T21:44:40.000Z
10460
+ */
10461
+ ready_at?: string | null;
10462
+ /**
10463
+ * Format: date-time
10464
+ * @description The date/time the Ready-for-Review assignee email was enqueued by the finalizer. Durable per-channel idempotency marker: `null` means not yet sent. Reset to `null` whenever the inspection (re-)enters Processing.
10465
+ * @example 2020-05-01T21:44:40.000Z
10466
+ */
10467
+ ready_for_review_email_sent_at?: string | null;
10468
+ /**
10469
+ * Format: date-time
10470
+ * @description The date/time the Ready-for-Review status webhook was enqueued by the finalizer. Durable per-channel idempotency marker: `null` means not yet sent. Reset to `null` whenever the inspection (re-)enters Processing.
10471
+ * @example 2020-05-01T21:44:40.000Z
10472
+ */
10473
+ ready_for_review_webhook_sent_at?: string | null;
10372
10474
  /**
10373
10475
  * Format: date-time
10374
10476
  * @description The date/time (in UTC) the inspection is scheduled to be sent to the customer
@@ -11189,6 +11291,17 @@ export interface components {
11189
11291
  * @example false
11190
11292
  */
11191
11293
  mutual_tls: boolean;
11294
+ /**
11295
+ * @description The OAuth `client_secret` Vision presents when requesting an access token from `oauth_config.token_url`. Write-only: it is stored encrypted and is never returned by this API. To set or rotate it, provide the new secret. To remove it, set this to null. To leave it unchanged, omit this field.
11296
+ * @example some-oauth-client-secret
11297
+ */
11298
+ oauth_client_secret?: string | null;
11299
+ /**
11300
+ * @description OAuth 2.0 client credentials configuration. When set, Vision obtains an access token from the configured token endpoint and presents it on the webhook request. Null means the webhook is delivered without OAuth.
11301
+ *
11302
+ * This is independent of the `truepic-signature` payload signature and of mutual TLS — any combination of the three can be used together.
11303
+ */
11304
+ oauth_config?: components["schemas"]["TeamWebhookOAuthConfig"] | unknown;
11192
11305
  /**
11193
11306
  * @description The id of the organization.
11194
11307
  * @example 1
@@ -11238,6 +11351,11 @@ export interface components {
11238
11351
  * @example 2023-06-01 17:12:20.097233+00
11239
11352
  */
11240
11353
  disabled_at?: string | null;
11354
+ /**
11355
+ * @description Whether or not the webhook has an OAuth `client_secret` stored.
11356
+ * @example true
11357
+ */
11358
+ has_oauth_client_secret?: boolean;
11241
11359
  /**
11242
11360
  * @description Whether or not the webhook has a secret.
11243
11361
  * @example true
@@ -11259,6 +11377,22 @@ export interface components {
11259
11377
  * @example false
11260
11378
  */
11261
11379
  mutual_tls: boolean;
11380
+ /**
11381
+ * @description The OAuth `client_secret` Vision presents when requesting an access token from `oauth_config.token_url`. Write-only: it is stored encrypted and is never returned by this API. To set or rotate it, provide the new secret. To remove it, set this to null. To leave it unchanged, omit this field.
11382
+ * @example some-oauth-client-secret
11383
+ */
11384
+ oauth_client_secret?: string | null;
11385
+ /**
11386
+ * @description The encrypted OAuth `client_secret` used when requesting an access token.
11387
+ * @example WMHadsfgYQ+348BEPcoyucKSaerwgq34gq34grstXp62P0Svn5VyEAGCKXM+CKcaw==
11388
+ */
11389
+ oauth_client_secret_encrypted?: string | null;
11390
+ /**
11391
+ * @description OAuth 2.0 client credentials configuration. When set, Vision obtains an access token from the configured token endpoint and presents it on the webhook request. Null means the webhook is delivered without OAuth.
11392
+ *
11393
+ * This is independent of the `truepic-signature` payload signature and of mutual TLS — any combination of the three can be used together.
11394
+ */
11395
+ oauth_config?: components["schemas"]["TeamWebhookOAuthConfig"] | unknown;
11262
11396
  /**
11263
11397
  * @description The id of the organization.
11264
11398
  * @example 1
@@ -11298,6 +11432,118 @@ export interface components {
11298
11432
  */
11299
11433
  vision_api_version: components["schemas"]["VisionAPIVersion"];
11300
11434
  };
11435
+ /**
11436
+ * @description OAuth 2.0 client credentials configuration for an outbound webhook.
11437
+ *
11438
+ * When present, Vision exchanges the configured credentials for a short-lived access token before delivering a webhook, and presents that token on the webhook request. The webhook payload itself is unaffected.
11439
+ *
11440
+ * The `client_secret` is not part of this object — it is supplied through the separate write-only `oauth_client_secret` field on the webhook, stored encrypted, and never returned.
11441
+ *
11442
+ * Every field other than `token_url` and `client_id` is optional; the defaults describe a standard RFC 6749 §4.4 exchange against an authorization server that returns a standard token response.
11443
+ */
11444
+ TeamWebhookOAuthConfig: {
11445
+ /**
11446
+ * @description The field in the token response that holds the access token, for authorization servers that use a non-standard name.
11447
+ * @default access_token
11448
+ * @example access_token
11449
+ */
11450
+ access_token_field: string;
11451
+ /**
11452
+ * @description Any additional parameters the token endpoint requires beyond the standard set. Sent alongside `grant_type` in the request body.
11453
+ *
11454
+ * `grant_type`, `client_id`, `client_secret`, `scope`, `audience`, and `resource` are rejected here — they are built from their own configuration fields, and a duplicate would silently replace the configured value.
11455
+ * @example {
11456
+ * "tenant": "cotality-prod"
11457
+ * }
11458
+ */
11459
+ additional_token_parameters?: {
11460
+ [key: string]: string;
11461
+ } | unknown;
11462
+ /**
11463
+ * @description The `audience` parameter, if the authorization server requires one.
11464
+ * @example https://your-gateway.example.com/
11465
+ */
11466
+ audience?: string | null;
11467
+ /**
11468
+ * @description The header the access token is presented in on the webhook request, for gateways that expect something other than `Authorization`.
11469
+ * @default Authorization
11470
+ * @example Authorization
11471
+ */
11472
+ authorization_header_name: string;
11473
+ /**
11474
+ * @description The prefix placed before the token in the authorization header. A single space separates it from the token. Set to an empty string to send the bare token with no prefix.
11475
+ * @default Bearer
11476
+ * @example Bearer
11477
+ */
11478
+ authorization_header_prefix: string;
11479
+ /**
11480
+ * @description Whether Vision caches the access token and reuses it across deliveries until shortly before it expires. Set to false to request a fresh token for every delivery — this makes token endpoint load proportional to event volume rather than to token lifetime.
11481
+ * @default true
11482
+ * @example true
11483
+ */
11484
+ cache_tokens: boolean;
11485
+ /**
11486
+ * @description How the client credentials are presented on the token request: in the request body (`client_secret_post`) or as an HTTP Basic authorization header (`client_secret_basic`).
11487
+ * @default client_secret_post
11488
+ * @example client_secret_post
11489
+ */
11490
+ client_auth_method: components["schemas"]["WebhookOAuthClientAuthMethod"];
11491
+ /**
11492
+ * @description The OAuth client identifier issued to Truepic.
11493
+ * @example truepic-vision-webhooks
11494
+ */
11495
+ client_id: string;
11496
+ /**
11497
+ * @description The lifetime Vision assumes when the token response carries no expiry at all. Required in that case — without an expiry and without this, Vision cannot know when to refresh.
11498
+ * @example 3600
11499
+ */
11500
+ default_token_lifetime_seconds?: number | null;
11501
+ /**
11502
+ * @description The field in the token response that holds the expiry as an absolute timestamp (epoch seconds, epoch milliseconds, or an ISO 8601 string) rather than a duration. Takes precedence over `expires_in_field` when set.
11503
+ * @example expires_at
11504
+ */
11505
+ expires_at_field?: string | null;
11506
+ /**
11507
+ * @description The field in the token response that holds the token lifetime as a duration. Read as either a number or a numeric string.
11508
+ * @default expires_in
11509
+ * @example expires_in
11510
+ */
11511
+ expires_in_field: string;
11512
+ /**
11513
+ * @description The unit of the duration in `expires_in_field`.
11514
+ * @default seconds
11515
+ * @example seconds
11516
+ */
11517
+ expires_in_unit: components["schemas"]["WebhookOAuthExpiresInUnit"];
11518
+ /**
11519
+ * @description Whether `grant_type` is sent in the request body (per RFC 6749) or as a query parameter on the token endpoint URL.
11520
+ * @default body
11521
+ * @example body
11522
+ */
11523
+ grant_type_placement: components["schemas"]["WebhookOAuthGrantTypePlacement"];
11524
+ /**
11525
+ * @description The `resource` parameter, if the authorization server requires one.
11526
+ * @example https://your-gateway.example.com/webhooks
11527
+ */
11528
+ resource?: string | null;
11529
+ /**
11530
+ * @description Space-delimited scopes, if the authorization server requires them.
11531
+ * @example webhooks:write
11532
+ */
11533
+ scope?: string | null;
11534
+ /**
11535
+ * @description How long Vision waits for the token endpoint to respond, in milliseconds.
11536
+ * @default 10000
11537
+ * @example 10000
11538
+ */
11539
+ token_request_timeout_ms: number;
11540
+ /**
11541
+ * Format: url
11542
+ * @description The token endpoint Vision exchanges the client credentials at. Must be HTTPS outside of local development.
11543
+ * @example https://your-gateway.example.com/oauth/token
11544
+ */
11545
+ token_url: string;
11546
+ };
11301
11547
  TeamWebhookPayload: {
11302
11548
  /**
11303
11549
  * @description An object containing any custom headers that should be sent in the webhook POST request. If you want a unique request id header to be sent, create a header with a value of "{{ UUID }}". When the webhook is sent, this will be replaced with a unique UUID for each request.
@@ -11318,6 +11564,17 @@ export interface components {
11318
11564
  * @example false
11319
11565
  */
11320
11566
  mutual_tls: boolean;
11567
+ /**
11568
+ * @description The OAuth `client_secret` Vision presents when requesting an access token from `oauth_config.token_url`. Write-only: it is stored encrypted and is never returned by this API. To set or rotate it, provide the new secret. To remove it, set this to null. To leave it unchanged, omit this field.
11569
+ * @example some-oauth-client-secret
11570
+ */
11571
+ oauth_client_secret?: string | null;
11572
+ /**
11573
+ * @description OAuth 2.0 client credentials configuration. When set, Vision obtains an access token from the configured token endpoint and presents it on the webhook request. Null means the webhook is delivered without OAuth.
11574
+ *
11575
+ * This is independent of the `truepic-signature` payload signature and of mutual TLS — any combination of the three can be used together.
11576
+ */
11577
+ oauth_config?: components["schemas"]["TeamWebhookOAuthConfig"] | unknown;
11321
11578
  /**
11322
11579
  * @description The secret used for authenticating the webhooks. When we send webhooks to your endpoint, we will add a truepic-signature header to those requests that we generate using this secret. When your endpoint receives a webhook POST request, you can then verify that the request was signed with this secret to ensure that the request is from us. If you want to remove the secret, set this to null. If you want to set a new secret, provide the new secret string. If you don't want to change the secret, omit this field.
11323
11580
  * @example some-secret-string
@@ -11362,6 +11619,11 @@ export interface components {
11362
11619
  * @example 2023-06-01 17:12:20.097233+00
11363
11620
  */
11364
11621
  disabled_at?: string | null;
11622
+ /**
11623
+ * @description Whether or not the webhook has an OAuth `client_secret` stored.
11624
+ * @example true
11625
+ */
11626
+ has_oauth_client_secret?: boolean;
11365
11627
  /**
11366
11628
  * @description Whether or not the webhook has a secret.
11367
11629
  * @example true
@@ -11383,6 +11645,12 @@ export interface components {
11383
11645
  * @example false
11384
11646
  */
11385
11647
  mutual_tls: boolean;
11648
+ /**
11649
+ * @description OAuth 2.0 client credentials configuration. When set, Vision obtains an access token from the configured token endpoint and presents it on the webhook request. Null means the webhook is delivered without OAuth.
11650
+ *
11651
+ * This is independent of the `truepic-signature` payload signature and of mutual TLS — any combination of the three can be used together.
11652
+ */
11653
+ oauth_config?: components["schemas"]["TeamWebhookOAuthConfig"] | unknown;
11386
11654
  /**
11387
11655
  * @description The id of the organization.
11388
11656
  * @example 1
@@ -12116,6 +12384,23 @@ export interface components {
12116
12384
  /** @description URI of the page or document the model relied on. One URI per source — multiple supporting URIs become multiple `web_lookup` entries. */
12117
12385
  uri: string;
12118
12386
  };
12387
+ /**
12388
+ * @description How Vision presents the client credentials on the token request.
12389
+ *
12390
+ * Named after the RFC 6749 §2.3.1 client authentication methods so the value maps directly onto what an authorization server's documentation calls it.
12391
+ * @enum {string}
12392
+ */
12393
+ WebhookOAuthClientAuthMethod: "client_secret_post" | "client_secret_basic";
12394
+ /**
12395
+ * @description The unit the authorization server uses for the token expiry field.
12396
+ * @enum {string}
12397
+ */
12398
+ WebhookOAuthExpiresInUnit: "seconds" | "milliseconds";
12399
+ /**
12400
+ * @description Where Vision places `grant_type` on the token request.
12401
+ * @enum {string}
12402
+ */
12403
+ WebhookOAuthGrantTypePlacement: "body" | "query";
12119
12404
  WebsiteFormBearerSerialized: {
12120
12405
  inspection_types: {
12121
12406
  /** @description An array of custom fields that are used by this inspection type */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truepic/vision-api-types",
3
- "version": "3.84.0",
3
+ "version": "3.86.0",
4
4
  "description": "TypeScript type declarations for Truepic Vision API v3",
5
5
  "license": "MIT",
6
6
  "types": "index.d.ts",