@goable-io/sdk 0.4.0 → 0.5.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.
@@ -130,6 +130,12 @@ export interface paths {
130
130
  /** @description Score 0-100 + verdict + confidence + eco + calibration_provenance */
131
131
  200: {
132
132
  headers: {
133
+ /** @description Daily safety cap for this endpoint + plan (not the monthly billing quota). Omitted on unlimited (Scale) plans. */
134
+ "X-RateLimit-Limit"?: number;
135
+ /** @description Requests remaining in the current UTC-midnight daily window. Omitted on unlimited (Scale) plans. */
136
+ "X-RateLimit-Remaining"?: number;
137
+ /** @description Unix timestamp (seconds) at which the daily window resets. Omitted on unlimited (Scale) plans. */
138
+ "X-RateLimit-Reset"?: number;
133
139
  [name: string]: unknown;
134
140
  };
135
141
  content: {
@@ -163,6 +169,17 @@ export interface paths {
163
169
  "application/json": components["schemas"]["Error"];
164
170
  };
165
171
  };
172
+ /** @description Daily rate limit (safety cap) exceeded for this endpoint + plan. */
173
+ 429: {
174
+ headers: {
175
+ /** @description Seconds until the daily rate-limit window resets. Present only on this 429 response. */
176
+ "Retry-After"?: number;
177
+ [name: string]: unknown;
178
+ };
179
+ content: {
180
+ "application/json": components["schemas"]["Error"];
181
+ };
182
+ };
166
183
  };
167
184
  };
168
185
  delete?: never;
@@ -486,7 +503,7 @@ export interface paths {
486
503
  binding_constraint?: boolean;
487
504
  best_window_24h?: boolean;
488
505
  best_nearby_spot_km?: number;
489
- /** @description LLM explanation (Pro+) */
506
+ /** @description LLM explanation. Available on any plan (Anthropic BYOK) — resolves the tenant's own Anthropic key set via PUT /v1/tenant/llm-key; no key configured degrades to a deterministic template (natural_language.degraded_mode=true) rather than an error. */
490
507
  natural_language?: boolean;
491
508
  };
492
509
  };
@@ -504,15 +521,6 @@ export interface paths {
504
521
  };
505
522
  };
506
523
  };
507
- /** @description natural_language=true requires Pro+ */
508
- 402: {
509
- headers: {
510
- [name: string]: unknown;
511
- };
512
- content: {
513
- "application/json": components["schemas"]["Error"];
514
- };
515
- };
516
524
  /** @description No profile for activity */
517
525
  404: {
518
526
  headers: {
@@ -548,7 +556,7 @@ export interface paths {
548
556
  };
549
557
  get?: never;
550
558
  put?: never;
551
- /** Personalized go/no-go decision (Pro+) */
559
+ /** Personalized go/no-go decision (any plan — Anthropic BYOK) */
552
560
  post: {
553
561
  parameters: {
554
562
  query?: never;
@@ -578,7 +586,7 @@ export interface paths {
578
586
  };
579
587
  };
580
588
  responses: {
581
- /** @description score + verdict + decision block + degraded_mode + advisory_notice */
589
+ /** @description score + verdict + decision block + degraded_mode + advisory_notice. Available on any plan; the LLM reasoning narrative requires the tenant's own Anthropic key (PUT /v1/tenant/llm-key) — without one, degraded_mode=true and a deterministic template is returned instead of an error. */
582
590
  200: {
583
591
  headers: {
584
592
  [name: string]: unknown;
@@ -589,15 +597,6 @@ export interface paths {
589
597
  };
590
598
  };
591
599
  };
592
- /** @description Requires Pro+ plan */
593
- 402: {
594
- headers: {
595
- [name: string]: unknown;
596
- };
597
- content: {
598
- "application/json": components["schemas"]["Error"];
599
- };
600
- };
601
600
  /** @description No profile for activity */
602
601
  404: {
603
602
  headers: {
@@ -669,7 +668,10 @@ export interface paths {
669
668
  };
670
669
  get?: never;
671
670
  put?: never;
672
- /** LLM narrative explanation of a score (L2c, Pro+) */
671
+ /**
672
+ * LLM narrative explanation of a score (L2c, any plan — Anthropic BYOK)
673
+ * @description Requires the tenant to have its own Anthropic key set via PUT /v1/tenant/llm-key — no longer plan-gated. No key configured → 503 INTELLIGENCE_UNAVAILABLE.
674
+ */
673
675
  post: {
674
676
  parameters: {
675
677
  query?: never;
@@ -703,8 +705,8 @@ export interface paths {
703
705
  };
704
706
  };
705
707
  };
706
- /** @description Requires Pro+ plan */
707
- 402: {
708
+ /** @description Validation error */
709
+ 422: {
708
710
  headers: {
709
711
  [name: string]: unknown;
710
712
  };
@@ -712,8 +714,8 @@ export interface paths {
712
714
  "application/json": components["schemas"]["Error"];
713
715
  };
714
716
  };
715
- /** @description Validation error */
716
- 422: {
717
+ /** @description No Anthropic key configured for this tenant */
718
+ 503: {
717
719
  headers: {
718
720
  [name: string]: unknown;
719
721
  };
@@ -738,7 +740,10 @@ export interface paths {
738
740
  };
739
741
  get?: never;
740
742
  put?: never;
741
- /** LLM multi-slot briefing (L2c, Pro+) */
743
+ /**
744
+ * LLM multi-slot briefing (L2c, any plan — Anthropic BYOK)
745
+ * @description Requires the tenant to have its own Anthropic key set via PUT /v1/tenant/llm-key — no longer plan-gated. No key configured → 503 INTELLIGENCE_UNAVAILABLE.
746
+ */
742
747
  post: {
743
748
  parameters: {
744
749
  query?: never;
@@ -772,8 +777,8 @@ export interface paths {
772
777
  };
773
778
  };
774
779
  };
775
- /** @description Requires Pro+ plan */
776
- 402: {
780
+ /** @description Validation error */
781
+ 422: {
777
782
  headers: {
778
783
  [name: string]: unknown;
779
784
  };
@@ -781,8 +786,8 @@ export interface paths {
781
786
  "application/json": components["schemas"]["Error"];
782
787
  };
783
788
  };
784
- /** @description Validation error */
785
- 422: {
789
+ /** @description No Anthropic key configured for this tenant */
790
+ 503: {
786
791
  headers: {
787
792
  [name: string]: unknown;
788
793
  };
@@ -798,6 +803,146 @@ export interface paths {
798
803
  patch?: never;
799
804
  trace?: never;
800
805
  };
806
+ "/v1/tenant/llm-key": {
807
+ parameters: {
808
+ query?: never;
809
+ header?: never;
810
+ path?: never;
811
+ cookie?: never;
812
+ };
813
+ /**
814
+ * Get the tenant's Anthropic key status (Anthropic BYOK)
815
+ * @description Never returns the key — only whether one is set, its last 4 characters, and timestamps.
816
+ */
817
+ get: {
818
+ parameters: {
819
+ query?: never;
820
+ header?: never;
821
+ path?: never;
822
+ cookie?: never;
823
+ };
824
+ requestBody?: never;
825
+ responses: {
826
+ /** @description Masked key status */
827
+ 200: {
828
+ headers: {
829
+ [name: string]: unknown;
830
+ };
831
+ content: {
832
+ "application/json": {
833
+ set: boolean;
834
+ last4?: string;
835
+ /** Format: date-time */
836
+ setAt?: string;
837
+ /** Format: date-time */
838
+ lastValidatedAt?: string | null;
839
+ };
840
+ };
841
+ };
842
+ /** @description BYOK storage not configured on this deployment */
843
+ 503: {
844
+ headers: {
845
+ [name: string]: unknown;
846
+ };
847
+ content: {
848
+ "application/json": components["schemas"]["Error"];
849
+ };
850
+ };
851
+ };
852
+ };
853
+ /**
854
+ * Set/rotate the tenant's Anthropic API key (Anthropic BYOK)
855
+ * @description Validates the key with one cheap Anthropic API call before storing. Encrypts at rest (AES-256-GCM); the plaintext key is NEVER echoed back by this or any other endpoint. Available to any authenticated plan. Rate-limited (this call itself makes one real Anthropic API request).
856
+ */
857
+ put: {
858
+ parameters: {
859
+ query?: never;
860
+ header?: never;
861
+ path?: never;
862
+ cookie?: never;
863
+ };
864
+ requestBody: {
865
+ content: {
866
+ "application/json": {
867
+ /** @description The tenant's own Anthropic API key (sk-ant-...). */
868
+ apiKey: string;
869
+ };
870
+ };
871
+ };
872
+ responses: {
873
+ /** @description Key validated, encrypted, and stored. */
874
+ 204: {
875
+ headers: {
876
+ [name: string]: unknown;
877
+ };
878
+ content?: never;
879
+ };
880
+ /** @description Validation error, or Anthropic rejected the key (LLM_KEY_INVALID) */
881
+ 422: {
882
+ headers: {
883
+ [name: string]: unknown;
884
+ };
885
+ content: {
886
+ "application/json": components["schemas"]["Error"];
887
+ };
888
+ };
889
+ /** @description Rate limited */
890
+ 429: {
891
+ headers: {
892
+ [name: string]: unknown;
893
+ };
894
+ content: {
895
+ "application/json": components["schemas"]["Error"];
896
+ };
897
+ };
898
+ /** @description BYOK storage or BYOK_MASTER_KEY not configured on this deployment */
899
+ 503: {
900
+ headers: {
901
+ [name: string]: unknown;
902
+ };
903
+ content: {
904
+ "application/json": components["schemas"]["Error"];
905
+ };
906
+ };
907
+ };
908
+ };
909
+ post?: never;
910
+ /**
911
+ * Remove the tenant's Anthropic key (Anthropic BYOK)
912
+ * @description Hard-deletes the stored ciphertext. LLM routes revert to the no-key degraded/503 path for this tenant.
913
+ */
914
+ delete: {
915
+ parameters: {
916
+ query?: never;
917
+ header?: never;
918
+ path?: never;
919
+ cookie?: never;
920
+ };
921
+ requestBody?: never;
922
+ responses: {
923
+ /** @description Key removed. */
924
+ 204: {
925
+ headers: {
926
+ [name: string]: unknown;
927
+ };
928
+ content?: never;
929
+ };
930
+ /** @description BYOK storage not configured on this deployment */
931
+ 503: {
932
+ headers: {
933
+ [name: string]: unknown;
934
+ };
935
+ content: {
936
+ "application/json": components["schemas"]["Error"];
937
+ };
938
+ };
939
+ };
940
+ };
941
+ options?: never;
942
+ head?: never;
943
+ patch?: never;
944
+ trace?: never;
945
+ };
801
946
  "/v1/projections": {
802
947
  parameters: {
803
948
  query?: never;
@@ -1078,12 +1223,15 @@ export interface paths {
1078
1223
  put?: never;
1079
1224
  /**
1080
1225
  * Bind a parametric policy (Scale)
1081
- * @description Convert a bindable quote (≤24h old) into a bound policy for a specific coverage year. Returns the serialised policy + the quoteId + optional `driftAdvisories` — a soft warning surfaced when the resolved cell has an open watch-level L9 drift event. A warning/critical drift event at bind time REFUSES the bind with 422 DRIFT_ACTIVE (see the 422 response). Fires the `underwriting.policy.bound` webhook on success.
1226
+ * @description Convert a bindable quote (≤24h old) into a bound policy for a specific coverage year. Returns the serialised policy + the quoteId + optional `driftAdvisories` — a soft warning surfaced when the resolved cell has an open watch-level L9 drift event. A warning/critical drift event at bind time REFUSES the bind with 422 DRIFT_ACTIVE (see the 422 response). Fires the `underwriting.policy.bound` webhook on success. Supports the optional `Idempotency-Key` header (see parameter description) so a client-side retry after a network timeout can't double-bind.
1082
1227
  */
1083
1228
  post: {
1084
1229
  parameters: {
1085
1230
  query?: never;
1086
- header?: never;
1231
+ header?: {
1232
+ /** @description Optional client-generated key (unique per logical request, scoped to your tenant). A retry with the SAME key and the SAME request body replays the original response verbatim without re-executing the request. A retry with the same key and a DIFFERENT body, or one that arrives while the original is still in flight, returns 409 IDEMPOTENCY_KEY_CONFLICT. Claims expire after 24h. */
1233
+ "Idempotency-Key"?: string;
1234
+ };
1087
1235
  path?: never;
1088
1236
  cookie?: never;
1089
1237
  };
@@ -1141,7 +1289,7 @@ export interface paths {
1141
1289
  "application/json": components["schemas"]["Error"];
1142
1290
  };
1143
1291
  };
1144
- /** @description Quote already bound to another policy */
1292
+ /** @description Quote already bound to another policy (QUOTE_ALREADY_BOUND), or IDEMPOTENCY_KEY_CONFLICT — a request with this Idempotency-Key is still in flight, or was already used with a different request body */
1145
1293
  409: {
1146
1294
  headers: {
1147
1295
  [name: string]: unknown;
@@ -1509,12 +1657,15 @@ export interface paths {
1509
1657
  put?: never;
1510
1658
  /**
1511
1659
  * Report observed outcome for a scored session
1512
- * @description Close the calibration loop. Submit the actual outcome (ran/cancelled/no_show/rescheduled/note) of a /v1/score session. The calibration pipeline + forecast verification + drift monitor consume these. Requires the `outcomes:write` scope (live keys carry it by default; test keys don't).
1660
+ * @description Close the calibration loop. Submit the actual outcome (ran/cancelled/no_show/rescheduled/note) of a /v1/score session. The calibration pipeline + forecast verification + drift monitor consume these. Requires the `outcomes:write` scope (live keys carry it by default; test keys don't). Supports the optional `Idempotency-Key` header (see parameter description) so a client-side retry can't record the same outcome twice.
1513
1661
  */
1514
1662
  post: {
1515
1663
  parameters: {
1516
1664
  query?: never;
1517
- header?: never;
1665
+ header?: {
1666
+ /** @description Optional client-generated key (unique per logical request, scoped to your tenant). A retry with the SAME key and the SAME request body replays the original response verbatim without re-executing the request. A retry with the same key and a DIFFERENT body, or one that arrives while the original is still in flight, returns 409 IDEMPOTENCY_KEY_CONFLICT. Claims expire after 24h. */
1667
+ "Idempotency-Key"?: string;
1668
+ };
1518
1669
  path: {
1519
1670
  /** @description Session UUID returned in the /v1/score response metadata. */
1520
1671
  sessionId: string;
@@ -1562,6 +1713,15 @@ export interface paths {
1562
1713
  "application/json": components["schemas"]["Error"];
1563
1714
  };
1564
1715
  };
1716
+ /** @description IDEMPOTENCY_KEY_CONFLICT — a request with this Idempotency-Key is still in flight, or was already used with a different request body */
1717
+ 409: {
1718
+ headers: {
1719
+ [name: string]: unknown;
1720
+ };
1721
+ content: {
1722
+ "application/json": components["schemas"]["Error"];
1723
+ };
1724
+ };
1565
1725
  /** @description Validation error */
1566
1726
  422: {
1567
1727
  headers: {
@@ -1715,6 +1875,12 @@ export interface paths {
1715
1875
  /** @description Ranked top-K sub-spots + observability metadata. The optional `coverage` field appears only on empty results from a catalog gap (not from hard-gating). */
1716
1876
  200: {
1717
1877
  headers: {
1878
+ /** @description Daily safety cap for this endpoint + plan (not the monthly billing quota). Omitted on unlimited (Scale) plans. */
1879
+ "X-RateLimit-Limit"?: number;
1880
+ /** @description Requests remaining in the current UTC-midnight daily window. Omitted on unlimited (Scale) plans. */
1881
+ "X-RateLimit-Remaining"?: number;
1882
+ /** @description Unix timestamp (seconds) at which the daily window resets. Omitted on unlimited (Scale) plans. */
1883
+ "X-RateLimit-Reset"?: number;
1718
1884
  [name: string]: unknown;
1719
1885
  };
1720
1886
  content: {
@@ -1785,6 +1951,17 @@ export interface paths {
1785
1951
  "application/json": components["schemas"]["Error"];
1786
1952
  };
1787
1953
  };
1954
+ /** @description Daily rate limit (safety cap) exceeded for this endpoint + plan. */
1955
+ 429: {
1956
+ headers: {
1957
+ /** @description Seconds until the daily rate-limit window resets. Present only on this 429 response. */
1958
+ "Retry-After"?: number;
1959
+ [name: string]: unknown;
1960
+ };
1961
+ content: {
1962
+ "application/json": components["schemas"]["Error"];
1963
+ };
1964
+ };
1788
1965
  /** @description Spatial resolver not wired */
1789
1966
  503: {
1790
1967
  headers: {
@@ -1812,8 +1989,8 @@ export interface paths {
1812
1989
  get?: never;
1813
1990
  put?: never;
1814
1991
  /**
1815
- * LLM analysis of a borderline / surprising score (L2c, Pro+)
1816
- * @description Asks the LLM to inspect a score that's near a verdict boundary or contradicts operator intuition. Returns a narrative + a structured `limiting_class` taxonomy entry.
1992
+ * LLM analysis of a borderline / surprising score (L2c, any plan — Anthropic BYOK)
1993
+ * @description Asks the LLM to inspect a score that's near a verdict boundary or contradicts operator intuition. Returns a narrative + a structured `limiting_class` taxonomy entry. Requires the tenant's own Anthropic key (PUT /v1/tenant/llm-key) — no longer plan-gated.
1817
1994
  */
1818
1995
  post: {
1819
1996
  parameters: {
@@ -1848,8 +2025,8 @@ export interface paths {
1848
2025
  };
1849
2026
  };
1850
2027
  };
1851
- /** @description Requires Pro+ plan */
1852
- 402: {
2028
+ /** @description Validation error */
2029
+ 422: {
1853
2030
  headers: {
1854
2031
  [name: string]: unknown;
1855
2032
  };
@@ -1857,8 +2034,8 @@ export interface paths {
1857
2034
  "application/json": components["schemas"]["Error"];
1858
2035
  };
1859
2036
  };
1860
- /** @description Validation error */
1861
- 422: {
2037
+ /** @description No Anthropic key configured for this tenant */
2038
+ 503: {
1862
2039
  headers: {
1863
2040
  [name: string]: unknown;
1864
2041
  };
@@ -2754,6 +2931,239 @@ export interface paths {
2754
2931
  patch?: never;
2755
2932
  trace?: never;
2756
2933
  };
2934
+ "/v1/outcomes": {
2935
+ parameters: {
2936
+ query?: never;
2937
+ header?: never;
2938
+ path?: never;
2939
+ cookie?: never;
2940
+ };
2941
+ get?: never;
2942
+ put?: never;
2943
+ /**
2944
+ * Report a standalone activity outcome
2945
+ * @description Submit an observed outcome for an activity session not tied to a specific /v1/score call — the operator-reported behavioural signal behind the calibration + research datasets. For an outcome linked to a specific scored session, use POST /v1/score/{sessionId}/outcome instead. Requires the `outcomes:write` scope (live keys carry it by default; test keys don't).
2946
+ */
2947
+ post: {
2948
+ parameters: {
2949
+ query?: never;
2950
+ header?: never;
2951
+ path?: never;
2952
+ cookie?: never;
2953
+ };
2954
+ requestBody: {
2955
+ content: {
2956
+ "application/json": {
2957
+ /** Format: date-time */
2958
+ occurred_at: string;
2959
+ activity_slug: string;
2960
+ /** @enum {string} */
2961
+ outcome_type: "ran" | "cancelled" | "rescheduled" | "no_show" | "note";
2962
+ /** @description Optional catalogue sub-spot slug. */
2963
+ spot_id?: string;
2964
+ /** @description Optional link back to a scoring_audit_log row. */
2965
+ audit_log_id?: string;
2966
+ detail?: {
2967
+ [key: string]: unknown;
2968
+ };
2969
+ /**
2970
+ * @description Stream G equipment-transition signal.
2971
+ * @enum {string}
2972
+ */
2973
+ equipment_type?: "electric" | "combustion" | "manual";
2974
+ };
2975
+ };
2976
+ };
2977
+ responses: {
2978
+ /** @description Accepted (queued for the next calibration batch) */
2979
+ 202: {
2980
+ headers: {
2981
+ [name: string]: unknown;
2982
+ };
2983
+ content: {
2984
+ "application/json": {
2985
+ [key: string]: unknown;
2986
+ };
2987
+ };
2988
+ };
2989
+ /** @description Missing scope: outcomes:write */
2990
+ 403: {
2991
+ headers: {
2992
+ [name: string]: unknown;
2993
+ };
2994
+ content: {
2995
+ "application/json": components["schemas"]["Error"];
2996
+ };
2997
+ };
2998
+ /** @description Validation error */
2999
+ 422: {
3000
+ headers: {
3001
+ [name: string]: unknown;
3002
+ };
3003
+ content: {
3004
+ "application/json": components["schemas"]["Error"];
3005
+ };
3006
+ };
3007
+ };
3008
+ };
3009
+ delete?: never;
3010
+ options?: never;
3011
+ head?: never;
3012
+ patch?: never;
3013
+ trace?: never;
3014
+ };
3015
+ "/v1/audit/export": {
3016
+ parameters: {
3017
+ query?: never;
3018
+ header?: never;
3019
+ path?: never;
3020
+ cookie?: never;
3021
+ };
3022
+ /**
3023
+ * Export the caller's own score + outcome audit history
3024
+ * @description Tenant-scoped export of your own scoring_audit_log activity (one row per /v1/score call, with any linked outcome inline), date-range filtered. The tenant is always the calling API key's tenant — there is no way to request another tenant's data. Outcomes reported via the free-standing POST /v1/outcomes (i.e. not linked to a specific score via audit_log_id) are not included. Offset-paginated; `X-Total-Count` on every response carries the total row count for the window.
3025
+ */
3026
+ get: {
3027
+ parameters: {
3028
+ query: {
3029
+ from: string;
3030
+ to: string;
3031
+ format?: "csv" | "json";
3032
+ limit?: number;
3033
+ offset?: number;
3034
+ };
3035
+ header?: never;
3036
+ path?: never;
3037
+ cookie?: never;
3038
+ };
3039
+ requestBody?: never;
3040
+ responses: {
3041
+ /** @description CSV (format=csv) or JSON (format=json, default) export of the window. */
3042
+ 200: {
3043
+ headers: {
3044
+ [name: string]: unknown;
3045
+ };
3046
+ content: {
3047
+ "application/json": {
3048
+ rows: {
3049
+ [key: string]: unknown;
3050
+ }[];
3051
+ meta: {
3052
+ total: number;
3053
+ limit: number;
3054
+ offset: number;
3055
+ window: {
3056
+ from?: string;
3057
+ to?: string;
3058
+ };
3059
+ };
3060
+ };
3061
+ "text/csv": string;
3062
+ };
3063
+ };
3064
+ /** @description Validation error, `to` before `from`, or WINDOW_TOO_LARGE (range exceeds 366 days) */
3065
+ 422: {
3066
+ headers: {
3067
+ [name: string]: unknown;
3068
+ };
3069
+ content: {
3070
+ "application/json": components["schemas"]["Error"];
3071
+ };
3072
+ };
3073
+ /** @description Audit export is not configured */
3074
+ 503: {
3075
+ headers: {
3076
+ [name: string]: unknown;
3077
+ };
3078
+ content: {
3079
+ "application/json": components["schemas"]["Error"];
3080
+ };
3081
+ };
3082
+ };
3083
+ };
3084
+ put?: never;
3085
+ post?: never;
3086
+ delete?: never;
3087
+ options?: never;
3088
+ head?: never;
3089
+ patch?: never;
3090
+ trace?: never;
3091
+ };
3092
+ "/v1/legal/{kind}/current": {
3093
+ parameters: {
3094
+ query?: never;
3095
+ header?: never;
3096
+ path?: never;
3097
+ cookie?: never;
3098
+ };
3099
+ /**
3100
+ * Fetch the current published legal document (no auth)
3101
+ * @description Public read of the currently-published version of a legal document (Terms of Service, Privacy Policy, DPA, SLA, Acceptable Use, Cookie Policy). Returns the full body + content hash + published timestamp. Used by the signup flow + marketing site to render always-current legal copy without hardcoding it.
3102
+ */
3103
+ get: {
3104
+ parameters: {
3105
+ query?: never;
3106
+ header?: never;
3107
+ path: {
3108
+ /** @description Legal document kind. */
3109
+ kind: "terms_of_service" | "privacy_policy" | "data_processing_agreement" | "sla" | "acceptable_use" | "cookie_policy";
3110
+ };
3111
+ cookie?: never;
3112
+ };
3113
+ requestBody?: never;
3114
+ responses: {
3115
+ /** @description The current published document of the requested kind */
3116
+ 200: {
3117
+ headers: {
3118
+ [name: string]: unknown;
3119
+ };
3120
+ content: {
3121
+ "application/json": {
3122
+ document: {
3123
+ /** Format: uuid */
3124
+ id: string;
3125
+ kind: string;
3126
+ version: string;
3127
+ title: string;
3128
+ body: string;
3129
+ contentHash: string;
3130
+ status: string;
3131
+ /** Format: date-time */
3132
+ createdAt: string;
3133
+ /** Format: date-time */
3134
+ publishedAt: string | null;
3135
+ };
3136
+ };
3137
+ };
3138
+ };
3139
+ /** @description Unknown document kind, or no published document */
3140
+ 404: {
3141
+ headers: {
3142
+ [name: string]: unknown;
3143
+ };
3144
+ content: {
3145
+ "application/json": components["schemas"]["Error"];
3146
+ };
3147
+ };
3148
+ /** @description Legal document store not wired */
3149
+ 503: {
3150
+ headers: {
3151
+ [name: string]: unknown;
3152
+ };
3153
+ content: {
3154
+ "application/json": components["schemas"]["Error"];
3155
+ };
3156
+ };
3157
+ };
3158
+ };
3159
+ put?: never;
3160
+ post?: never;
3161
+ delete?: never;
3162
+ options?: never;
3163
+ head?: never;
3164
+ patch?: never;
3165
+ trace?: never;
3166
+ };
2757
3167
  }
2758
3168
  export type webhooks = Record<string, never>;
2759
3169
  export interface components {
@@ -2788,10 +3198,12 @@ export interface components {
2788
3198
  verdict: components["schemas"]["Verdict"];
2789
3199
  confidence: number;
2790
3200
  breakdown: ({
2791
- dimension?: string;
2792
- score?: number;
3201
+ name?: string;
3202
+ value?: number;
3203
+ suitability?: number;
2793
3204
  weight?: number;
2794
3205
  contribution?: number;
3206
+ hasData?: boolean;
2795
3207
  } & {
2796
3208
  [key: string]: unknown;
2797
3209
  })[];
@@ -2799,9 +3211,10 @@ export interface components {
2799
3211
  [key: string]: unknown;
2800
3212
  };
2801
3213
  alerts: ({
3214
+ /** @enum {string} */
3215
+ level?: "info" | "warning" | "critical";
2802
3216
  code?: string;
2803
- severity?: string;
2804
- message?: string;
3217
+ description?: string;
2805
3218
  } & {
2806
3219
  [key: string]: unknown;
2807
3220
  })[];