@goable-io/sdk 0.3.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.
- package/README.md +107 -9
- package/dist/client.d.ts +92 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +190 -4
- package/dist/client.js.map +1 -1
- package/dist/errors.d.ts +48 -7
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +53 -2
- package/dist/errors.js.map +1 -1
- package/dist/generated/api.d.ts +1874 -410
- package/dist/generated/api.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +114 -9
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +315 -4
- package/src/errors.ts +81 -10
- package/src/generated/api.ts +1874 -410
- package/src/index.ts +3 -0
- package/src/types.ts +144 -6
package/src/generated/api.ts
CHANGED
|
@@ -119,6 +119,11 @@ export interface paths {
|
|
|
119
119
|
/** @description L2a probabilistic ensemble (Pro+) */
|
|
120
120
|
ensemble?: boolean;
|
|
121
121
|
members?: number;
|
|
122
|
+
/**
|
|
123
|
+
* @description Skill-conditioned scoring (Pro+).
|
|
124
|
+
* @enum {string}
|
|
125
|
+
*/
|
|
126
|
+
rider_skill_level?: "beginner" | "intermediate" | "expert";
|
|
122
127
|
};
|
|
123
128
|
};
|
|
124
129
|
};
|
|
@@ -126,13 +131,19 @@ export interface paths {
|
|
|
126
131
|
/** @description Score 0-100 + verdict + confidence + eco + calibration_provenance */
|
|
127
132
|
200: {
|
|
128
133
|
headers: {
|
|
134
|
+
/** @description Daily safety cap for this endpoint + plan (not the monthly billing quota). Omitted on unlimited (Scale) plans. */
|
|
135
|
+
"X-RateLimit-Limit"?: number;
|
|
136
|
+
/** @description Requests remaining in the current UTC-midnight daily window. Omitted on unlimited (Scale) plans. */
|
|
137
|
+
"X-RateLimit-Remaining"?: number;
|
|
138
|
+
/** @description Unix timestamp (seconds) at which the daily window resets. Omitted on unlimited (Scale) plans. */
|
|
139
|
+
"X-RateLimit-Reset"?: number;
|
|
129
140
|
[name: string]: unknown;
|
|
130
141
|
};
|
|
131
142
|
content: {
|
|
132
143
|
"application/json": components["schemas"]["ScoreResponse"];
|
|
133
144
|
};
|
|
134
145
|
};
|
|
135
|
-
/** @description Plan upgrade required (ensemble on Free/Starter) */
|
|
146
|
+
/** @description Plan upgrade required (ensemble or rider_skill_level on Free/Starter) */
|
|
136
147
|
402: {
|
|
137
148
|
headers: {
|
|
138
149
|
[name: string]: unknown;
|
|
@@ -159,6 +170,17 @@ export interface paths {
|
|
|
159
170
|
"application/json": components["schemas"]["Error"];
|
|
160
171
|
};
|
|
161
172
|
};
|
|
173
|
+
/** @description Daily rate limit (safety cap) exceeded for this endpoint + plan. */
|
|
174
|
+
429: {
|
|
175
|
+
headers: {
|
|
176
|
+
/** @description Seconds until the daily rate-limit window resets. Present only on this 429 response. */
|
|
177
|
+
"Retry-After"?: number;
|
|
178
|
+
[name: string]: unknown;
|
|
179
|
+
};
|
|
180
|
+
content: {
|
|
181
|
+
"application/json": components["schemas"]["Error"];
|
|
182
|
+
};
|
|
183
|
+
};
|
|
162
184
|
};
|
|
163
185
|
};
|
|
164
186
|
delete?: never;
|
|
@@ -297,7 +319,10 @@ export interface paths {
|
|
|
297
319
|
};
|
|
298
320
|
get?: never;
|
|
299
321
|
put?: never;
|
|
300
|
-
/**
|
|
322
|
+
/**
|
|
323
|
+
* Historical climatology scoring (Pro+)
|
|
324
|
+
* @description Percentiles + exceedance + verdict frequency over ERA5 reanalysis. Each entry carries a historical-mode ConfidenceDetail block (see components.schemas.ConfidenceDetailHistorical).
|
|
325
|
+
*/
|
|
301
326
|
post: {
|
|
302
327
|
parameters: {
|
|
303
328
|
query?: never;
|
|
@@ -328,7 +353,7 @@ export interface paths {
|
|
|
328
353
|
};
|
|
329
354
|
};
|
|
330
355
|
responses: {
|
|
331
|
-
/** @description Percentiles + exceedance + verdict frequency */
|
|
356
|
+
/** @description Percentiles + exceedance + verdict frequency (per-entry confidenceDetail: historical) */
|
|
332
357
|
200: {
|
|
333
358
|
headers: {
|
|
334
359
|
[name: string]: unknown;
|
|
@@ -479,7 +504,7 @@ export interface paths {
|
|
|
479
504
|
binding_constraint?: boolean;
|
|
480
505
|
best_window_24h?: boolean;
|
|
481
506
|
best_nearby_spot_km?: number;
|
|
482
|
-
/** @description LLM explanation (
|
|
507
|
+
/** @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. */
|
|
483
508
|
natural_language?: boolean;
|
|
484
509
|
};
|
|
485
510
|
};
|
|
@@ -497,15 +522,6 @@ export interface paths {
|
|
|
497
522
|
};
|
|
498
523
|
};
|
|
499
524
|
};
|
|
500
|
-
/** @description natural_language=true requires Pro+ */
|
|
501
|
-
402: {
|
|
502
|
-
headers: {
|
|
503
|
-
[name: string]: unknown;
|
|
504
|
-
};
|
|
505
|
-
content: {
|
|
506
|
-
"application/json": components["schemas"]["Error"];
|
|
507
|
-
};
|
|
508
|
-
};
|
|
509
525
|
/** @description No profile for activity */
|
|
510
526
|
404: {
|
|
511
527
|
headers: {
|
|
@@ -541,7 +557,7 @@ export interface paths {
|
|
|
541
557
|
};
|
|
542
558
|
get?: never;
|
|
543
559
|
put?: never;
|
|
544
|
-
/** Personalized go/no-go decision (
|
|
560
|
+
/** Personalized go/no-go decision (any plan — Anthropic BYOK) */
|
|
545
561
|
post: {
|
|
546
562
|
parameters: {
|
|
547
563
|
query?: never;
|
|
@@ -571,7 +587,7 @@ export interface paths {
|
|
|
571
587
|
};
|
|
572
588
|
};
|
|
573
589
|
responses: {
|
|
574
|
-
/** @description score + verdict + decision block + degraded_mode + advisory_notice */
|
|
590
|
+
/** @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. */
|
|
575
591
|
200: {
|
|
576
592
|
headers: {
|
|
577
593
|
[name: string]: unknown;
|
|
@@ -582,15 +598,6 @@ export interface paths {
|
|
|
582
598
|
};
|
|
583
599
|
};
|
|
584
600
|
};
|
|
585
|
-
/** @description Requires Pro+ plan */
|
|
586
|
-
402: {
|
|
587
|
-
headers: {
|
|
588
|
-
[name: string]: unknown;
|
|
589
|
-
};
|
|
590
|
-
content: {
|
|
591
|
-
"application/json": components["schemas"]["Error"];
|
|
592
|
-
};
|
|
593
|
-
};
|
|
594
601
|
/** @description No profile for activity */
|
|
595
602
|
404: {
|
|
596
603
|
headers: {
|
|
@@ -662,7 +669,10 @@ export interface paths {
|
|
|
662
669
|
};
|
|
663
670
|
get?: never;
|
|
664
671
|
put?: never;
|
|
665
|
-
/**
|
|
672
|
+
/**
|
|
673
|
+
* LLM narrative explanation of a score (L2c, any plan — Anthropic BYOK)
|
|
674
|
+
* @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.
|
|
675
|
+
*/
|
|
666
676
|
post: {
|
|
667
677
|
parameters: {
|
|
668
678
|
query?: never;
|
|
@@ -696,8 +706,8 @@ export interface paths {
|
|
|
696
706
|
};
|
|
697
707
|
};
|
|
698
708
|
};
|
|
699
|
-
/** @description
|
|
700
|
-
|
|
709
|
+
/** @description Validation error */
|
|
710
|
+
422: {
|
|
701
711
|
headers: {
|
|
702
712
|
[name: string]: unknown;
|
|
703
713
|
};
|
|
@@ -705,8 +715,8 @@ export interface paths {
|
|
|
705
715
|
"application/json": components["schemas"]["Error"];
|
|
706
716
|
};
|
|
707
717
|
};
|
|
708
|
-
/** @description
|
|
709
|
-
|
|
718
|
+
/** @description No Anthropic key configured for this tenant */
|
|
719
|
+
503: {
|
|
710
720
|
headers: {
|
|
711
721
|
[name: string]: unknown;
|
|
712
722
|
};
|
|
@@ -731,7 +741,10 @@ export interface paths {
|
|
|
731
741
|
};
|
|
732
742
|
get?: never;
|
|
733
743
|
put?: never;
|
|
734
|
-
/**
|
|
744
|
+
/**
|
|
745
|
+
* LLM multi-slot briefing (L2c, any plan — Anthropic BYOK)
|
|
746
|
+
* @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.
|
|
747
|
+
*/
|
|
735
748
|
post: {
|
|
736
749
|
parameters: {
|
|
737
750
|
query?: never;
|
|
@@ -765,8 +778,8 @@ export interface paths {
|
|
|
765
778
|
};
|
|
766
779
|
};
|
|
767
780
|
};
|
|
768
|
-
/** @description
|
|
769
|
-
|
|
781
|
+
/** @description Validation error */
|
|
782
|
+
422: {
|
|
770
783
|
headers: {
|
|
771
784
|
[name: string]: unknown;
|
|
772
785
|
};
|
|
@@ -774,8 +787,8 @@ export interface paths {
|
|
|
774
787
|
"application/json": components["schemas"]["Error"];
|
|
775
788
|
};
|
|
776
789
|
};
|
|
777
|
-
/** @description
|
|
778
|
-
|
|
790
|
+
/** @description No Anthropic key configured for this tenant */
|
|
791
|
+
503: {
|
|
779
792
|
headers: {
|
|
780
793
|
[name: string]: unknown;
|
|
781
794
|
};
|
|
@@ -791,17 +804,58 @@ export interface paths {
|
|
|
791
804
|
patch?: never;
|
|
792
805
|
trace?: never;
|
|
793
806
|
};
|
|
794
|
-
"/v1/
|
|
807
|
+
"/v1/tenant/llm-key": {
|
|
795
808
|
parameters: {
|
|
796
809
|
query?: never;
|
|
797
810
|
header?: never;
|
|
798
811
|
path?: never;
|
|
799
812
|
cookie?: never;
|
|
800
813
|
};
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
814
|
+
/**
|
|
815
|
+
* Get the tenant's Anthropic key status (Anthropic BYOK)
|
|
816
|
+
* @description Never returns the key — only whether one is set, its last 4 characters, and timestamps.
|
|
817
|
+
*/
|
|
818
|
+
get: {
|
|
819
|
+
parameters: {
|
|
820
|
+
query?: never;
|
|
821
|
+
header?: never;
|
|
822
|
+
path?: never;
|
|
823
|
+
cookie?: never;
|
|
824
|
+
};
|
|
825
|
+
requestBody?: never;
|
|
826
|
+
responses: {
|
|
827
|
+
/** @description Masked key status */
|
|
828
|
+
200: {
|
|
829
|
+
headers: {
|
|
830
|
+
[name: string]: unknown;
|
|
831
|
+
};
|
|
832
|
+
content: {
|
|
833
|
+
"application/json": {
|
|
834
|
+
set: boolean;
|
|
835
|
+
last4?: string;
|
|
836
|
+
/** Format: date-time */
|
|
837
|
+
setAt?: string;
|
|
838
|
+
/** Format: date-time */
|
|
839
|
+
lastValidatedAt?: string | null;
|
|
840
|
+
};
|
|
841
|
+
};
|
|
842
|
+
};
|
|
843
|
+
/** @description BYOK storage not configured on this deployment */
|
|
844
|
+
503: {
|
|
845
|
+
headers: {
|
|
846
|
+
[name: string]: unknown;
|
|
847
|
+
};
|
|
848
|
+
content: {
|
|
849
|
+
"application/json": components["schemas"]["Error"];
|
|
850
|
+
};
|
|
851
|
+
};
|
|
852
|
+
};
|
|
853
|
+
};
|
|
854
|
+
/**
|
|
855
|
+
* Set/rotate the tenant's Anthropic API key (Anthropic BYOK)
|
|
856
|
+
* @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).
|
|
857
|
+
*/
|
|
858
|
+
put: {
|
|
805
859
|
parameters: {
|
|
806
860
|
query?: never;
|
|
807
861
|
header?: never;
|
|
@@ -811,32 +865,30 @@ export interface paths {
|
|
|
811
865
|
requestBody: {
|
|
812
866
|
content: {
|
|
813
867
|
"application/json": {
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
activity: string;
|
|
817
|
-
spotId?: string;
|
|
818
|
-
};
|
|
819
|
-
scenarios: ("SSP1-2.6" | "SSP2-4.5" | "SSP3-7.0" | "SSP5-8.5")[];
|
|
820
|
-
horizonDecades?: string[];
|
|
821
|
-
/** @enum {string} */
|
|
822
|
-
baselineDecade?: "2020s" | "2030s";
|
|
868
|
+
/** @description The tenant's own Anthropic API key (sk-ant-...). */
|
|
869
|
+
apiKey: string;
|
|
823
870
|
};
|
|
824
871
|
};
|
|
825
872
|
};
|
|
826
873
|
responses: {
|
|
827
|
-
/** @description
|
|
828
|
-
|
|
874
|
+
/** @description Key validated, encrypted, and stored. */
|
|
875
|
+
204: {
|
|
876
|
+
headers: {
|
|
877
|
+
[name: string]: unknown;
|
|
878
|
+
};
|
|
879
|
+
content?: never;
|
|
880
|
+
};
|
|
881
|
+
/** @description Validation error, or Anthropic rejected the key (LLM_KEY_INVALID) */
|
|
882
|
+
422: {
|
|
829
883
|
headers: {
|
|
830
884
|
[name: string]: unknown;
|
|
831
885
|
};
|
|
832
886
|
content: {
|
|
833
|
-
"application/json":
|
|
834
|
-
[key: string]: unknown;
|
|
835
|
-
};
|
|
887
|
+
"application/json": components["schemas"]["Error"];
|
|
836
888
|
};
|
|
837
889
|
};
|
|
838
|
-
/** @description
|
|
839
|
-
|
|
890
|
+
/** @description Rate limited */
|
|
891
|
+
429: {
|
|
840
892
|
headers: {
|
|
841
893
|
[name: string]: unknown;
|
|
842
894
|
};
|
|
@@ -844,8 +896,40 @@ export interface paths {
|
|
|
844
896
|
"application/json": components["schemas"]["Error"];
|
|
845
897
|
};
|
|
846
898
|
};
|
|
847
|
-
/** @description
|
|
848
|
-
|
|
899
|
+
/** @description BYOK storage or BYOK_MASTER_KEY not configured on this deployment */
|
|
900
|
+
503: {
|
|
901
|
+
headers: {
|
|
902
|
+
[name: string]: unknown;
|
|
903
|
+
};
|
|
904
|
+
content: {
|
|
905
|
+
"application/json": components["schemas"]["Error"];
|
|
906
|
+
};
|
|
907
|
+
};
|
|
908
|
+
};
|
|
909
|
+
};
|
|
910
|
+
post?: never;
|
|
911
|
+
/**
|
|
912
|
+
* Remove the tenant's Anthropic key (Anthropic BYOK)
|
|
913
|
+
* @description Hard-deletes the stored ciphertext. LLM routes revert to the no-key degraded/503 path for this tenant.
|
|
914
|
+
*/
|
|
915
|
+
delete: {
|
|
916
|
+
parameters: {
|
|
917
|
+
query?: never;
|
|
918
|
+
header?: never;
|
|
919
|
+
path?: never;
|
|
920
|
+
cookie?: never;
|
|
921
|
+
};
|
|
922
|
+
requestBody?: never;
|
|
923
|
+
responses: {
|
|
924
|
+
/** @description Key removed. */
|
|
925
|
+
204: {
|
|
926
|
+
headers: {
|
|
927
|
+
[name: string]: unknown;
|
|
928
|
+
};
|
|
929
|
+
content?: never;
|
|
930
|
+
};
|
|
931
|
+
/** @description BYOK storage not configured on this deployment */
|
|
932
|
+
503: {
|
|
849
933
|
headers: {
|
|
850
934
|
[name: string]: unknown;
|
|
851
935
|
};
|
|
@@ -855,13 +939,12 @@ export interface paths {
|
|
|
855
939
|
};
|
|
856
940
|
};
|
|
857
941
|
};
|
|
858
|
-
delete?: never;
|
|
859
942
|
options?: never;
|
|
860
943
|
head?: never;
|
|
861
944
|
patch?: never;
|
|
862
945
|
trace?: never;
|
|
863
946
|
};
|
|
864
|
-
"/v1/
|
|
947
|
+
"/v1/projections": {
|
|
865
948
|
parameters: {
|
|
866
949
|
query?: never;
|
|
867
950
|
header?: never;
|
|
@@ -870,7 +953,10 @@ export interface paths {
|
|
|
870
953
|
};
|
|
871
954
|
get?: never;
|
|
872
955
|
put?: never;
|
|
873
|
-
/**
|
|
956
|
+
/**
|
|
957
|
+
* Climate-decadal activity viability projection (Scale)
|
|
958
|
+
* @description Per-decade projection distributions. Each entry carries a climate-mode ConfidenceDetail block (see components.schemas.ConfidenceDetailClimate).
|
|
959
|
+
*/
|
|
874
960
|
post: {
|
|
875
961
|
parameters: {
|
|
876
962
|
query?: never;
|
|
@@ -881,36 +967,20 @@ export interface paths {
|
|
|
881
967
|
requestBody: {
|
|
882
968
|
content: {
|
|
883
969
|
"application/json": {
|
|
884
|
-
spot
|
|
885
|
-
location: components["schemas"]["GeoPoint"];
|
|
886
|
-
activity: string;
|
|
887
|
-
spotId?: string;
|
|
888
|
-
};
|
|
889
|
-
portfolio?: {
|
|
970
|
+
spot: {
|
|
890
971
|
location: components["schemas"]["GeoPoint"];
|
|
891
972
|
activity: string;
|
|
892
973
|
spotId?: string;
|
|
893
|
-
}[];
|
|
894
|
-
coverageWindow: {
|
|
895
|
-
monthFrom: number;
|
|
896
|
-
dayFrom: number;
|
|
897
|
-
monthTo: number;
|
|
898
|
-
dayTo: number;
|
|
899
|
-
} & {
|
|
900
|
-
[key: string]: unknown;
|
|
901
|
-
};
|
|
902
|
-
payout?: {
|
|
903
|
-
amount: number;
|
|
904
|
-
/** @enum {string} */
|
|
905
|
-
currency: "EUR" | "USD" | "GBP" | "CHF";
|
|
906
974
|
};
|
|
907
|
-
|
|
908
|
-
|
|
975
|
+
scenarios: ("SSP1-2.6" | "SSP2-4.5" | "SSP3-7.0" | "SSP5-8.5")[];
|
|
976
|
+
horizonDecades?: string[];
|
|
977
|
+
/** @enum {string} */
|
|
978
|
+
baselineDecade?: "2020s" | "2030s";
|
|
909
979
|
};
|
|
910
980
|
};
|
|
911
981
|
};
|
|
912
982
|
responses: {
|
|
913
|
-
/** @description
|
|
983
|
+
/** @description Per-decade projection distributions (per-entry confidenceDetail: climate) */
|
|
914
984
|
200: {
|
|
915
985
|
headers: {
|
|
916
986
|
[name: string]: unknown;
|
|
@@ -947,7 +1017,7 @@ export interface paths {
|
|
|
947
1017
|
patch?: never;
|
|
948
1018
|
trace?: never;
|
|
949
1019
|
};
|
|
950
|
-
"/v1/underwriting/
|
|
1020
|
+
"/v1/underwriting/quote": {
|
|
951
1021
|
parameters: {
|
|
952
1022
|
query?: never;
|
|
953
1023
|
header?: never;
|
|
@@ -957,8 +1027,8 @@ export interface paths {
|
|
|
957
1027
|
get?: never;
|
|
958
1028
|
put?: never;
|
|
959
1029
|
/**
|
|
960
|
-
*
|
|
961
|
-
* @description
|
|
1030
|
+
* Parametric underwriting quote (Scale)
|
|
1031
|
+
* @description Multi-currency `expectedPremium.byCurrency` — a mixed-currency portfolio returns per-currency stats with no FX conversion. `policy.spot.tier` / `policy.portfolio[i].tier` echo the resolved sub-spot tier (1/2/3) or null when no sub-spot covers the point; `tierSource` marks whether it came from the catalog YAML or L11's data-driven classifier.
|
|
962
1032
|
*/
|
|
963
1033
|
post: {
|
|
964
1034
|
parameters: {
|
|
@@ -970,25 +1040,65 @@ export interface paths {
|
|
|
970
1040
|
requestBody: {
|
|
971
1041
|
content: {
|
|
972
1042
|
"application/json": {
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
1043
|
+
spot?: {
|
|
1044
|
+
point: components["schemas"]["GeoPoint"];
|
|
1045
|
+
activity: string;
|
|
1046
|
+
spotId?: string;
|
|
1047
|
+
payout: {
|
|
1048
|
+
amount: number;
|
|
1049
|
+
/** @enum {string} */
|
|
1050
|
+
currency: "EUR" | "USD" | "GBP" | "CHF";
|
|
1051
|
+
};
|
|
976
1052
|
};
|
|
977
|
-
|
|
978
|
-
|
|
1053
|
+
portfolio?: {
|
|
1054
|
+
point: components["schemas"]["GeoPoint"];
|
|
1055
|
+
activity: string;
|
|
1056
|
+
spotId?: string;
|
|
1057
|
+
payout: {
|
|
1058
|
+
amount: number;
|
|
1059
|
+
/** @enum {string} */
|
|
1060
|
+
currency: "EUR" | "USD" | "GBP" | "CHF";
|
|
1061
|
+
};
|
|
1062
|
+
}[];
|
|
1063
|
+
coverageWindow: {
|
|
1064
|
+
monthFrom: number;
|
|
1065
|
+
dayFrom: number;
|
|
1066
|
+
monthTo: number;
|
|
1067
|
+
dayTo: number;
|
|
1068
|
+
};
|
|
1069
|
+
trigger: {
|
|
1070
|
+
/** @enum {string} */
|
|
1071
|
+
kind: "scoreBelow";
|
|
1072
|
+
scoreBelow: number;
|
|
1073
|
+
consecutiveHours?: number;
|
|
1074
|
+
cooldownHours?: number;
|
|
1075
|
+
maxPayoutsPerYear?: number;
|
|
1076
|
+
} | {
|
|
1077
|
+
/** @enum {string} */
|
|
1078
|
+
kind: "verdictAtOrBelow";
|
|
1079
|
+
verdict: components["schemas"]["Verdict"];
|
|
1080
|
+
consecutiveHours?: number;
|
|
1081
|
+
cooldownHours?: number;
|
|
1082
|
+
maxPayoutsPerYear?: number;
|
|
1083
|
+
};
|
|
1084
|
+
historicalYearsRange?: {
|
|
1085
|
+
from: number;
|
|
1086
|
+
to: number;
|
|
1087
|
+
};
|
|
1088
|
+
loadingFactor?: number;
|
|
1089
|
+
calibrationConfidenceMin?: number;
|
|
1090
|
+
forceIssue?: boolean;
|
|
979
1091
|
};
|
|
980
1092
|
};
|
|
981
1093
|
};
|
|
982
1094
|
responses: {
|
|
983
|
-
/** @description
|
|
1095
|
+
/** @description Premium + policy echo (with per-spot tier + tierSource) + bindable quote id when policy store is wired */
|
|
984
1096
|
200: {
|
|
985
1097
|
headers: {
|
|
986
1098
|
[name: string]: unknown;
|
|
987
1099
|
};
|
|
988
1100
|
content: {
|
|
989
|
-
"application/json":
|
|
990
|
-
[key: string]: unknown;
|
|
991
|
-
};
|
|
1101
|
+
"application/json": components["schemas"]["UnderwritingQuoteResponse"];
|
|
992
1102
|
};
|
|
993
1103
|
};
|
|
994
1104
|
/** @description Requires Scale plan */
|
|
@@ -1000,7 +1110,7 @@ export interface paths {
|
|
|
1000
1110
|
"application/json": components["schemas"]["Error"];
|
|
1001
1111
|
};
|
|
1002
1112
|
};
|
|
1003
|
-
/** @description
|
|
1113
|
+
/** @description No profile for activity */
|
|
1004
1114
|
404: {
|
|
1005
1115
|
headers: {
|
|
1006
1116
|
[name: string]: unknown;
|
|
@@ -1009,7 +1119,7 @@ export interface paths {
|
|
|
1009
1119
|
"application/json": components["schemas"]["Error"];
|
|
1010
1120
|
};
|
|
1011
1121
|
};
|
|
1012
|
-
/** @description Validation error */
|
|
1122
|
+
/** @description Validation error / low confidence / invalid trigger */
|
|
1013
1123
|
422: {
|
|
1014
1124
|
headers: {
|
|
1015
1125
|
[name: string]: unknown;
|
|
@@ -1018,6 +1128,15 @@ export interface paths {
|
|
|
1018
1128
|
"application/json": components["schemas"]["Error"];
|
|
1019
1129
|
};
|
|
1020
1130
|
};
|
|
1131
|
+
/** @description HistoricalProvider not configured */
|
|
1132
|
+
503: {
|
|
1133
|
+
headers: {
|
|
1134
|
+
[name: string]: unknown;
|
|
1135
|
+
};
|
|
1136
|
+
content: {
|
|
1137
|
+
"application/json": components["schemas"]["Error"];
|
|
1138
|
+
};
|
|
1139
|
+
};
|
|
1021
1140
|
};
|
|
1022
1141
|
};
|
|
1023
1142
|
delete?: never;
|
|
@@ -1026,43 +1145,35 @@ export interface paths {
|
|
|
1026
1145
|
patch?: never;
|
|
1027
1146
|
trace?: never;
|
|
1028
1147
|
};
|
|
1029
|
-
"/v1/underwriting/
|
|
1148
|
+
"/v1/underwriting/quote/{id}": {
|
|
1030
1149
|
parameters: {
|
|
1031
1150
|
query?: never;
|
|
1032
1151
|
header?: never;
|
|
1033
1152
|
path?: never;
|
|
1034
1153
|
cookie?: never;
|
|
1035
1154
|
};
|
|
1036
|
-
get?: never;
|
|
1037
|
-
put?: never;
|
|
1038
1155
|
/**
|
|
1039
|
-
*
|
|
1040
|
-
* @description
|
|
1156
|
+
* Fetch a bindable quote by id (Scale)
|
|
1157
|
+
* @description Tenant-scoped read of a quote created via POST /v1/underwriting/quote. Returns the same body shape as the create response (with the optional `boundPolicyId` populated once the quote has been bound).
|
|
1041
1158
|
*/
|
|
1042
|
-
|
|
1159
|
+
get: {
|
|
1043
1160
|
parameters: {
|
|
1044
1161
|
query?: never;
|
|
1045
1162
|
header?: never;
|
|
1046
|
-
path
|
|
1047
|
-
|
|
1048
|
-
};
|
|
1049
|
-
requestBody: {
|
|
1050
|
-
content: {
|
|
1051
|
-
"application/json": {
|
|
1052
|
-
policyId: string;
|
|
1053
|
-
};
|
|
1163
|
+
path: {
|
|
1164
|
+
id: string;
|
|
1054
1165
|
};
|
|
1166
|
+
cookie?: never;
|
|
1055
1167
|
};
|
|
1168
|
+
requestBody?: never;
|
|
1056
1169
|
responses: {
|
|
1057
|
-
/** @description
|
|
1170
|
+
/** @description Quote record (may include boundPolicyId when already bound) */
|
|
1058
1171
|
200: {
|
|
1059
1172
|
headers: {
|
|
1060
1173
|
[name: string]: unknown;
|
|
1061
1174
|
};
|
|
1062
1175
|
content: {
|
|
1063
|
-
"application/json":
|
|
1064
|
-
[key: string]: unknown;
|
|
1065
|
-
};
|
|
1176
|
+
"application/json": components["schemas"]["UnderwritingQuoteResponse"];
|
|
1066
1177
|
};
|
|
1067
1178
|
};
|
|
1068
1179
|
/** @description Requires Scale plan */
|
|
@@ -1074,7 +1185,7 @@ export interface paths {
|
|
|
1074
1185
|
"application/json": components["schemas"]["Error"];
|
|
1075
1186
|
};
|
|
1076
1187
|
};
|
|
1077
|
-
/** @description
|
|
1188
|
+
/** @description Quote not found for this tenant */
|
|
1078
1189
|
404: {
|
|
1079
1190
|
headers: {
|
|
1080
1191
|
[name: string]: unknown;
|
|
@@ -1083,8 +1194,8 @@ export interface paths {
|
|
|
1083
1194
|
"application/json": components["schemas"]["Error"];
|
|
1084
1195
|
};
|
|
1085
1196
|
};
|
|
1086
|
-
/** @description
|
|
1087
|
-
|
|
1197
|
+
/** @description Quote persistence not configured */
|
|
1198
|
+
503: {
|
|
1088
1199
|
headers: {
|
|
1089
1200
|
[name: string]: unknown;
|
|
1090
1201
|
};
|
|
@@ -1094,13 +1205,15 @@ export interface paths {
|
|
|
1094
1205
|
};
|
|
1095
1206
|
};
|
|
1096
1207
|
};
|
|
1208
|
+
put?: never;
|
|
1209
|
+
post?: never;
|
|
1097
1210
|
delete?: never;
|
|
1098
1211
|
options?: never;
|
|
1099
1212
|
head?: never;
|
|
1100
1213
|
patch?: never;
|
|
1101
1214
|
trace?: never;
|
|
1102
1215
|
};
|
|
1103
|
-
"/v1/
|
|
1216
|
+
"/v1/underwriting/policy/bind": {
|
|
1104
1217
|
parameters: {
|
|
1105
1218
|
query?: never;
|
|
1106
1219
|
header?: never;
|
|
@@ -1110,44 +1223,57 @@ export interface paths {
|
|
|
1110
1223
|
get?: never;
|
|
1111
1224
|
put?: never;
|
|
1112
1225
|
/**
|
|
1113
|
-
*
|
|
1114
|
-
* @description
|
|
1226
|
+
* Bind a parametric policy (Scale)
|
|
1227
|
+
* @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.
|
|
1115
1228
|
*/
|
|
1116
1229
|
post: {
|
|
1117
1230
|
parameters: {
|
|
1118
1231
|
query?: never;
|
|
1119
|
-
header?:
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
sessionId: string;
|
|
1232
|
+
header?: {
|
|
1233
|
+
/** @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. */
|
|
1234
|
+
"Idempotency-Key"?: string;
|
|
1123
1235
|
};
|
|
1236
|
+
path?: never;
|
|
1124
1237
|
cookie?: never;
|
|
1125
1238
|
};
|
|
1126
1239
|
requestBody: {
|
|
1127
1240
|
content: {
|
|
1128
1241
|
"application/json": {
|
|
1242
|
+
/** Format: uuid */
|
|
1243
|
+
quoteId: string;
|
|
1244
|
+
coverageYear: number;
|
|
1129
1245
|
/** @enum {string} */
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
[key: string]: unknown;
|
|
1133
|
-
};
|
|
1246
|
+
premiumCollection: "external" | "stripe" | "invoice_due";
|
|
1247
|
+
premiumPaid?: number;
|
|
1134
1248
|
};
|
|
1135
1249
|
};
|
|
1136
1250
|
};
|
|
1137
1251
|
responses: {
|
|
1138
|
-
/** @description
|
|
1139
|
-
|
|
1252
|
+
/** @description Policy bound */
|
|
1253
|
+
201: {
|
|
1140
1254
|
headers: {
|
|
1141
1255
|
[name: string]: unknown;
|
|
1142
1256
|
};
|
|
1143
1257
|
content: {
|
|
1144
1258
|
"application/json": {
|
|
1145
|
-
|
|
1259
|
+
policy: components["schemas"]["SerialisedPolicy"];
|
|
1260
|
+
/** Format: uuid */
|
|
1261
|
+
quoteId: string;
|
|
1262
|
+
/** @description Soft warnings for cells with an open watch-level L9 drift event. Present only when non-empty. */
|
|
1263
|
+
driftAdvisories?: {
|
|
1264
|
+
spotIndex: number;
|
|
1265
|
+
activity: string;
|
|
1266
|
+
subSpotSlug: string;
|
|
1267
|
+
/** @enum {string} */
|
|
1268
|
+
severity: "watch";
|
|
1269
|
+
/** Format: date-time */
|
|
1270
|
+
since: string;
|
|
1271
|
+
}[];
|
|
1146
1272
|
};
|
|
1147
1273
|
};
|
|
1148
1274
|
};
|
|
1149
|
-
/** @description
|
|
1150
|
-
|
|
1275
|
+
/** @description Requires Scale plan */
|
|
1276
|
+
402: {
|
|
1151
1277
|
headers: {
|
|
1152
1278
|
[name: string]: unknown;
|
|
1153
1279
|
};
|
|
@@ -1155,7 +1281,7 @@ export interface paths {
|
|
|
1155
1281
|
"application/json": components["schemas"]["Error"];
|
|
1156
1282
|
};
|
|
1157
1283
|
};
|
|
1158
|
-
/** @description
|
|
1284
|
+
/** @description Quote not found for this tenant */
|
|
1159
1285
|
404: {
|
|
1160
1286
|
headers: {
|
|
1161
1287
|
[name: string]: unknown;
|
|
@@ -1164,7 +1290,16 @@ export interface paths {
|
|
|
1164
1290
|
"application/json": components["schemas"]["Error"];
|
|
1165
1291
|
};
|
|
1166
1292
|
};
|
|
1167
|
-
/** @description
|
|
1293
|
+
/** @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 */
|
|
1294
|
+
409: {
|
|
1295
|
+
headers: {
|
|
1296
|
+
[name: string]: unknown;
|
|
1297
|
+
};
|
|
1298
|
+
content: {
|
|
1299
|
+
"application/json": components["schemas"]["Error"];
|
|
1300
|
+
};
|
|
1301
|
+
};
|
|
1302
|
+
/** @description Validation error / quote expired / quote not issuable / catalog drift / DRIFT_ACTIVE (open warning or critical drift event on resolved cell — `detail.openDriftEvents` lists each blocking cell) */
|
|
1168
1303
|
422: {
|
|
1169
1304
|
headers: {
|
|
1170
1305
|
[name: string]: unknown;
|
|
@@ -1173,6 +1308,15 @@ export interface paths {
|
|
|
1173
1308
|
"application/json": components["schemas"]["Error"];
|
|
1174
1309
|
};
|
|
1175
1310
|
};
|
|
1311
|
+
/** @description Policy persistence not configured */
|
|
1312
|
+
503: {
|
|
1313
|
+
headers: {
|
|
1314
|
+
[name: string]: unknown;
|
|
1315
|
+
};
|
|
1316
|
+
content: {
|
|
1317
|
+
"application/json": components["schemas"]["Error"];
|
|
1318
|
+
};
|
|
1319
|
+
};
|
|
1176
1320
|
};
|
|
1177
1321
|
};
|
|
1178
1322
|
delete?: never;
|
|
@@ -1181,51 +1325,44 @@ export interface paths {
|
|
|
1181
1325
|
patch?: never;
|
|
1182
1326
|
trace?: never;
|
|
1183
1327
|
};
|
|
1184
|
-
"/v1/
|
|
1328
|
+
"/v1/underwriting/policy": {
|
|
1185
1329
|
parameters: {
|
|
1186
1330
|
query?: never;
|
|
1187
1331
|
header?: never;
|
|
1188
1332
|
path?: never;
|
|
1189
1333
|
cookie?: never;
|
|
1190
1334
|
};
|
|
1191
|
-
get?: never;
|
|
1192
|
-
put?: never;
|
|
1193
1335
|
/**
|
|
1194
|
-
*
|
|
1195
|
-
* @description
|
|
1336
|
+
* List bound policies for the caller's tenant (Scale)
|
|
1337
|
+
* @description Paginated list of every bound policy owned by the calling tenant. Ordered by boundAt DESC.
|
|
1196
1338
|
*/
|
|
1197
|
-
|
|
1339
|
+
get: {
|
|
1198
1340
|
parameters: {
|
|
1199
|
-
query?:
|
|
1341
|
+
query?: {
|
|
1342
|
+
status?: "bound" | "triggered" | "settled" | "expired";
|
|
1343
|
+
coverageYear?: number;
|
|
1344
|
+
limit?: number;
|
|
1345
|
+
cursor?: string;
|
|
1346
|
+
};
|
|
1200
1347
|
header?: never;
|
|
1201
1348
|
path?: never;
|
|
1202
1349
|
cookie?: never;
|
|
1203
1350
|
};
|
|
1204
|
-
requestBody
|
|
1205
|
-
content: {
|
|
1206
|
-
"application/json": {
|
|
1207
|
-
activity: string;
|
|
1208
|
-
location: components["schemas"]["GeoPoint"];
|
|
1209
|
-
window?: components["schemas"]["TimeWindow"];
|
|
1210
|
-
/** @description Skill points (0-1) to score. Defaults to 5 quantile points. */
|
|
1211
|
-
riderSkillLevels?: number[];
|
|
1212
|
-
};
|
|
1213
|
-
};
|
|
1214
|
-
};
|
|
1351
|
+
requestBody?: never;
|
|
1215
1352
|
responses: {
|
|
1216
|
-
/** @description
|
|
1353
|
+
/** @description Bound policies for this tenant */
|
|
1217
1354
|
200: {
|
|
1218
1355
|
headers: {
|
|
1219
1356
|
[name: string]: unknown;
|
|
1220
1357
|
};
|
|
1221
1358
|
content: {
|
|
1222
1359
|
"application/json": {
|
|
1223
|
-
|
|
1360
|
+
policies: components["schemas"]["SerialisedPolicy"][];
|
|
1224
1361
|
};
|
|
1225
1362
|
};
|
|
1226
1363
|
};
|
|
1227
|
-
/** @description
|
|
1228
|
-
|
|
1364
|
+
/** @description Requires Scale plan */
|
|
1365
|
+
402: {
|
|
1229
1366
|
headers: {
|
|
1230
1367
|
[name: string]: unknown;
|
|
1231
1368
|
};
|
|
@@ -1242,104 +1379,60 @@ export interface paths {
|
|
|
1242
1379
|
"application/json": components["schemas"]["Error"];
|
|
1243
1380
|
};
|
|
1244
1381
|
};
|
|
1382
|
+
/** @description Policy persistence not configured */
|
|
1383
|
+
503: {
|
|
1384
|
+
headers: {
|
|
1385
|
+
[name: string]: unknown;
|
|
1386
|
+
};
|
|
1387
|
+
content: {
|
|
1388
|
+
"application/json": components["schemas"]["Error"];
|
|
1389
|
+
};
|
|
1390
|
+
};
|
|
1245
1391
|
};
|
|
1246
1392
|
};
|
|
1393
|
+
put?: never;
|
|
1394
|
+
post?: never;
|
|
1247
1395
|
delete?: never;
|
|
1248
1396
|
options?: never;
|
|
1249
1397
|
head?: never;
|
|
1250
1398
|
patch?: never;
|
|
1251
1399
|
trace?: never;
|
|
1252
1400
|
};
|
|
1253
|
-
"/v1/
|
|
1401
|
+
"/v1/underwriting/policy/{policyId}": {
|
|
1254
1402
|
parameters: {
|
|
1255
1403
|
query?: never;
|
|
1256
1404
|
header?: never;
|
|
1257
1405
|
path?: never;
|
|
1258
1406
|
cookie?: never;
|
|
1259
1407
|
};
|
|
1260
|
-
get?: never;
|
|
1261
|
-
put?: never;
|
|
1262
1408
|
/**
|
|
1263
|
-
*
|
|
1264
|
-
* @description
|
|
1409
|
+
* Fetch a single policy by id (Scale)
|
|
1410
|
+
* @description Read-only lookup. Cross-tenant policies return 404.
|
|
1265
1411
|
*/
|
|
1266
|
-
|
|
1412
|
+
get: {
|
|
1267
1413
|
parameters: {
|
|
1268
1414
|
query?: never;
|
|
1269
1415
|
header?: never;
|
|
1270
|
-
path
|
|
1271
|
-
|
|
1272
|
-
};
|
|
1273
|
-
requestBody: {
|
|
1274
|
-
content: {
|
|
1275
|
-
"application/json": {
|
|
1276
|
-
activity: string;
|
|
1277
|
-
regionCenter: components["schemas"]["GeoPoint"];
|
|
1278
|
-
radiusKm: number;
|
|
1279
|
-
topK: number;
|
|
1280
|
-
window?: components["schemas"]["TimeWindow"];
|
|
1281
|
-
/** @description Optional booking-platform-side pseudonym. When present, Pro+ tenants get personalization via the L6 cold-start blend (cap 0.5 weight). */
|
|
1282
|
-
userPseudonym?: string;
|
|
1283
|
-
};
|
|
1416
|
+
path: {
|
|
1417
|
+
policyId: string;
|
|
1284
1418
|
};
|
|
1419
|
+
cookie?: never;
|
|
1285
1420
|
};
|
|
1421
|
+
requestBody?: never;
|
|
1286
1422
|
responses: {
|
|
1287
|
-
/** @description
|
|
1423
|
+
/** @description Policy record + payout events */
|
|
1288
1424
|
200: {
|
|
1289
1425
|
headers: {
|
|
1290
1426
|
[name: string]: unknown;
|
|
1291
1427
|
};
|
|
1292
1428
|
content: {
|
|
1293
1429
|
"application/json": {
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
name?: string;
|
|
1297
|
-
location?: components["schemas"]["GeoPoint"];
|
|
1298
|
-
distanceKm?: number;
|
|
1299
|
-
score?: number;
|
|
1300
|
-
effectiveScore?: number;
|
|
1301
|
-
verdict?: string;
|
|
1302
|
-
personalScore?: number | null;
|
|
1303
|
-
personalWeight?: number;
|
|
1304
|
-
rank?: number;
|
|
1305
|
-
}[];
|
|
1306
|
-
allGated?: boolean;
|
|
1307
|
-
totalCandidates?: number;
|
|
1308
|
-
rankedCandidates?: number;
|
|
1309
|
-
effectiveRadiusKm?: number;
|
|
1310
|
-
effectiveTopK?: number;
|
|
1311
|
-
personalizationApplied?: boolean;
|
|
1312
|
-
latencyMs?: number;
|
|
1313
|
-
coverage?: {
|
|
1314
|
-
/** @enum {string} */
|
|
1315
|
-
status: "no_subspots_in_radius";
|
|
1316
|
-
nearestSubSpot: {
|
|
1317
|
-
slug: string;
|
|
1318
|
-
name: string;
|
|
1319
|
-
distanceKm: number;
|
|
1320
|
-
};
|
|
1321
|
-
/** @enum {string} */
|
|
1322
|
-
suggestedAction: "expand_radius";
|
|
1323
|
-
suggestedRadiusKm: number;
|
|
1324
|
-
} | {
|
|
1325
|
-
/** @enum {string} */
|
|
1326
|
-
status: "no_subspots_for_activity";
|
|
1327
|
-
/** @enum {string} */
|
|
1328
|
-
suggestedAction: "request_coverage";
|
|
1329
|
-
};
|
|
1430
|
+
policy: components["schemas"]["SerialisedPolicy"];
|
|
1431
|
+
events: components["schemas"]["SerialisedPayoutEvent"][];
|
|
1330
1432
|
};
|
|
1331
1433
|
};
|
|
1332
1434
|
};
|
|
1333
|
-
/** @description
|
|
1334
|
-
401: {
|
|
1335
|
-
headers: {
|
|
1336
|
-
[name: string]: unknown;
|
|
1337
|
-
};
|
|
1338
|
-
content: {
|
|
1339
|
-
"application/json": components["schemas"]["Error"];
|
|
1340
|
-
};
|
|
1341
|
-
};
|
|
1342
|
-
/** @description Plan limit exceeded (radius or topK above plan cap) */
|
|
1435
|
+
/** @description Requires Scale plan */
|
|
1343
1436
|
402: {
|
|
1344
1437
|
headers: {
|
|
1345
1438
|
[name: string]: unknown;
|
|
@@ -1348,8 +1441,8 @@ export interface paths {
|
|
|
1348
1441
|
"application/json": components["schemas"]["Error"];
|
|
1349
1442
|
};
|
|
1350
1443
|
};
|
|
1351
|
-
/** @description
|
|
1352
|
-
|
|
1444
|
+
/** @description Policy not found */
|
|
1445
|
+
404: {
|
|
1353
1446
|
headers: {
|
|
1354
1447
|
[name: string]: unknown;
|
|
1355
1448
|
};
|
|
@@ -1357,7 +1450,7 @@ export interface paths {
|
|
|
1357
1450
|
"application/json": components["schemas"]["Error"];
|
|
1358
1451
|
};
|
|
1359
1452
|
};
|
|
1360
|
-
/** @description
|
|
1453
|
+
/** @description Policy persistence not configured */
|
|
1361
1454
|
503: {
|
|
1362
1455
|
headers: {
|
|
1363
1456
|
[name: string]: unknown;
|
|
@@ -1368,13 +1461,15 @@ export interface paths {
|
|
|
1368
1461
|
};
|
|
1369
1462
|
};
|
|
1370
1463
|
};
|
|
1464
|
+
put?: never;
|
|
1465
|
+
post?: never;
|
|
1371
1466
|
delete?: never;
|
|
1372
1467
|
options?: never;
|
|
1373
1468
|
head?: never;
|
|
1374
1469
|
patch?: never;
|
|
1375
1470
|
trace?: never;
|
|
1376
1471
|
};
|
|
1377
|
-
"/v1/
|
|
1472
|
+
"/v1/underwriting/policy/{policyId}/evaluate": {
|
|
1378
1473
|
parameters: {
|
|
1379
1474
|
query?: never;
|
|
1380
1475
|
header?: never;
|
|
@@ -1384,43 +1479,35 @@ export interface paths {
|
|
|
1384
1479
|
get?: never;
|
|
1385
1480
|
put?: never;
|
|
1386
1481
|
/**
|
|
1387
|
-
*
|
|
1388
|
-
* @description
|
|
1482
|
+
* Re-evaluate a bound policy against historical replay (Scale)
|
|
1483
|
+
* @description Runs the trigger walk against the historical archive for the policy's coverage year and inserts any newly detected payout events. No request body. Fires the `underwriting.policy.triggered` webhook the first time new events are inserted.
|
|
1389
1484
|
*/
|
|
1390
1485
|
post: {
|
|
1391
1486
|
parameters: {
|
|
1392
1487
|
query?: never;
|
|
1393
1488
|
header?: never;
|
|
1394
|
-
path
|
|
1395
|
-
|
|
1396
|
-
};
|
|
1397
|
-
requestBody: {
|
|
1398
|
-
content: {
|
|
1399
|
-
"application/json": {
|
|
1400
|
-
location: components["schemas"]["GeoPoint"];
|
|
1401
|
-
scoreResult?: components["schemas"]["ScoreResponse"];
|
|
1402
|
-
/** Format: uuid */
|
|
1403
|
-
session_id?: string;
|
|
1404
|
-
/** @enum {string} */
|
|
1405
|
-
locale?: "en" | "it";
|
|
1406
|
-
/** @enum {string} */
|
|
1407
|
-
model?: "claude-haiku-4-5-20251001" | "claude-sonnet-4-6";
|
|
1408
|
-
};
|
|
1489
|
+
path: {
|
|
1490
|
+
policyId: string;
|
|
1409
1491
|
};
|
|
1492
|
+
cookie?: never;
|
|
1410
1493
|
};
|
|
1494
|
+
requestBody?: never;
|
|
1411
1495
|
responses: {
|
|
1412
|
-
/** @description
|
|
1496
|
+
/** @description Policy + payout events + counts of newly inserted / skipped */
|
|
1413
1497
|
200: {
|
|
1414
1498
|
headers: {
|
|
1415
1499
|
[name: string]: unknown;
|
|
1416
1500
|
};
|
|
1417
1501
|
content: {
|
|
1418
1502
|
"application/json": {
|
|
1419
|
-
|
|
1503
|
+
policy: components["schemas"]["SerialisedPolicy"];
|
|
1504
|
+
events: components["schemas"]["SerialisedPayoutEvent"][];
|
|
1505
|
+
inserted: number;
|
|
1506
|
+
skipped: number;
|
|
1420
1507
|
};
|
|
1421
1508
|
};
|
|
1422
1509
|
};
|
|
1423
|
-
/** @description Requires
|
|
1510
|
+
/** @description Requires Scale plan */
|
|
1424
1511
|
402: {
|
|
1425
1512
|
headers: {
|
|
1426
1513
|
[name: string]: unknown;
|
|
@@ -1429,7 +1516,16 @@ export interface paths {
|
|
|
1429
1516
|
"application/json": components["schemas"]["Error"];
|
|
1430
1517
|
};
|
|
1431
1518
|
};
|
|
1432
|
-
/** @description
|
|
1519
|
+
/** @description Policy not found */
|
|
1520
|
+
404: {
|
|
1521
|
+
headers: {
|
|
1522
|
+
[name: string]: unknown;
|
|
1523
|
+
};
|
|
1524
|
+
content: {
|
|
1525
|
+
"application/json": components["schemas"]["Error"];
|
|
1526
|
+
};
|
|
1527
|
+
};
|
|
1528
|
+
/** @description Policy in a terminal state (settled / expired) */
|
|
1433
1529
|
422: {
|
|
1434
1530
|
headers: {
|
|
1435
1531
|
[name: string]: unknown;
|
|
@@ -1438,6 +1534,15 @@ export interface paths {
|
|
|
1438
1534
|
"application/json": components["schemas"]["Error"];
|
|
1439
1535
|
};
|
|
1440
1536
|
};
|
|
1537
|
+
/** @description Policy persistence or HistoricalProvider not configured */
|
|
1538
|
+
503: {
|
|
1539
|
+
headers: {
|
|
1540
|
+
[name: string]: unknown;
|
|
1541
|
+
};
|
|
1542
|
+
content: {
|
|
1543
|
+
"application/json": components["schemas"]["Error"];
|
|
1544
|
+
};
|
|
1545
|
+
};
|
|
1441
1546
|
};
|
|
1442
1547
|
};
|
|
1443
1548
|
delete?: never;
|
|
@@ -1446,7 +1551,7 @@ export interface paths {
|
|
|
1446
1551
|
patch?: never;
|
|
1447
1552
|
trace?: never;
|
|
1448
1553
|
};
|
|
1449
|
-
"/v1/
|
|
1554
|
+
"/v1/underwriting/policy/{policyId}/settle": {
|
|
1450
1555
|
parameters: {
|
|
1451
1556
|
query?: never;
|
|
1452
1557
|
header?: never;
|
|
@@ -1455,38 +1560,37 @@ export interface paths {
|
|
|
1455
1560
|
};
|
|
1456
1561
|
get?: never;
|
|
1457
1562
|
put?: never;
|
|
1458
|
-
/**
|
|
1563
|
+
/**
|
|
1564
|
+
* Settle a bound policy (platform-ops only)
|
|
1565
|
+
* @description PLATFORM-OPS ONLY — requires the `platform_admin` scope (cross-tenant Goable/underwriter operation, not a policyholder self-service action). Records the settlement wire reference + freezes the payout, and fires the `underwriting.policy.settled` webhook. Normally invoked by the daily settlement cron; use manually only for out-of-band settlement.
|
|
1566
|
+
*/
|
|
1459
1567
|
post: {
|
|
1460
1568
|
parameters: {
|
|
1461
1569
|
query?: never;
|
|
1462
1570
|
header?: never;
|
|
1463
|
-
path
|
|
1571
|
+
path: {
|
|
1572
|
+
policyId: string;
|
|
1573
|
+
};
|
|
1464
1574
|
cookie?: never;
|
|
1465
1575
|
};
|
|
1466
1576
|
requestBody: {
|
|
1467
1577
|
content: {
|
|
1468
1578
|
"application/json": {
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
spotId?: string;
|
|
1473
|
-
}[];
|
|
1474
|
-
scenarios: ("SSP1-2.6" | "SSP2-4.5" | "SSP3-7.0" | "SSP5-8.5")[];
|
|
1475
|
-
horizonDecades?: string[];
|
|
1476
|
-
/** @enum {string} */
|
|
1477
|
-
baselineDecade?: "2020s" | "2030s";
|
|
1579
|
+
settlementReference: string;
|
|
1580
|
+
/** Format: date-time */
|
|
1581
|
+
settledAt?: string;
|
|
1478
1582
|
};
|
|
1479
1583
|
};
|
|
1480
1584
|
};
|
|
1481
1585
|
responses: {
|
|
1482
|
-
/** @description
|
|
1586
|
+
/** @description Settled policy */
|
|
1483
1587
|
200: {
|
|
1484
1588
|
headers: {
|
|
1485
1589
|
[name: string]: unknown;
|
|
1486
1590
|
};
|
|
1487
1591
|
content: {
|
|
1488
1592
|
"application/json": {
|
|
1489
|
-
|
|
1593
|
+
policy: components["schemas"]["SerialisedPolicy"];
|
|
1490
1594
|
};
|
|
1491
1595
|
};
|
|
1492
1596
|
};
|
|
@@ -1499,7 +1603,25 @@ export interface paths {
|
|
|
1499
1603
|
"application/json": components["schemas"]["Error"];
|
|
1500
1604
|
};
|
|
1501
1605
|
};
|
|
1502
|
-
/** @description
|
|
1606
|
+
/** @description Missing scope: platform_admin */
|
|
1607
|
+
403: {
|
|
1608
|
+
headers: {
|
|
1609
|
+
[name: string]: unknown;
|
|
1610
|
+
};
|
|
1611
|
+
content: {
|
|
1612
|
+
"application/json": components["schemas"]["Error"];
|
|
1613
|
+
};
|
|
1614
|
+
};
|
|
1615
|
+
/** @description Policy not found */
|
|
1616
|
+
404: {
|
|
1617
|
+
headers: {
|
|
1618
|
+
[name: string]: unknown;
|
|
1619
|
+
};
|
|
1620
|
+
content: {
|
|
1621
|
+
"application/json": components["schemas"]["Error"];
|
|
1622
|
+
};
|
|
1623
|
+
};
|
|
1624
|
+
/** @description Validation error or policy not in a settleable state */
|
|
1503
1625
|
422: {
|
|
1504
1626
|
headers: {
|
|
1505
1627
|
[name: string]: unknown;
|
|
@@ -1508,6 +1630,15 @@ export interface paths {
|
|
|
1508
1630
|
"application/json": components["schemas"]["Error"];
|
|
1509
1631
|
};
|
|
1510
1632
|
};
|
|
1633
|
+
/** @description Policy persistence not configured */
|
|
1634
|
+
503: {
|
|
1635
|
+
headers: {
|
|
1636
|
+
[name: string]: unknown;
|
|
1637
|
+
};
|
|
1638
|
+
content: {
|
|
1639
|
+
"application/json": components["schemas"]["Error"];
|
|
1640
|
+
};
|
|
1641
|
+
};
|
|
1511
1642
|
};
|
|
1512
1643
|
};
|
|
1513
1644
|
delete?: never;
|
|
@@ -1516,7 +1647,7 @@ export interface paths {
|
|
|
1516
1647
|
patch?: never;
|
|
1517
1648
|
trace?: never;
|
|
1518
1649
|
};
|
|
1519
|
-
"/v1/
|
|
1650
|
+
"/v1/score/{sessionId}/outcome": {
|
|
1520
1651
|
parameters: {
|
|
1521
1652
|
query?: never;
|
|
1522
1653
|
header?: never;
|
|
@@ -1526,37 +1657,36 @@ export interface paths {
|
|
|
1526
1657
|
get?: never;
|
|
1527
1658
|
put?: never;
|
|
1528
1659
|
/**
|
|
1529
|
-
*
|
|
1530
|
-
* @description
|
|
1660
|
+
* Report observed outcome for a scored session
|
|
1661
|
+
* @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.
|
|
1531
1662
|
*/
|
|
1532
1663
|
post: {
|
|
1533
1664
|
parameters: {
|
|
1534
1665
|
query?: never;
|
|
1535
|
-
header?:
|
|
1536
|
-
|
|
1666
|
+
header?: {
|
|
1667
|
+
/** @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. */
|
|
1668
|
+
"Idempotency-Key"?: string;
|
|
1669
|
+
};
|
|
1670
|
+
path: {
|
|
1671
|
+
/** @description Session UUID returned in the /v1/score response metadata. */
|
|
1672
|
+
sessionId: string;
|
|
1673
|
+
};
|
|
1537
1674
|
cookie?: never;
|
|
1538
1675
|
};
|
|
1539
1676
|
requestBody: {
|
|
1540
1677
|
content: {
|
|
1541
1678
|
"application/json": {
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
spotId?: string;
|
|
1546
|
-
subSpotSlug?: string;
|
|
1547
|
-
} & {
|
|
1679
|
+
/** @enum {string} */
|
|
1680
|
+
outcome_type: "ran" | "cancelled" | "rescheduled" | "no_show" | "note";
|
|
1681
|
+
detail?: {
|
|
1548
1682
|
[key: string]: unknown;
|
|
1549
|
-
}
|
|
1550
|
-
scenarios: ("SSP1-2.6" | "SSP2-4.5" | "SSP3-7.0" | "SSP5-8.5")[];
|
|
1551
|
-
horizonDecades?: string[];
|
|
1552
|
-
} & {
|
|
1553
|
-
[key: string]: unknown;
|
|
1683
|
+
};
|
|
1554
1684
|
};
|
|
1555
1685
|
};
|
|
1556
1686
|
};
|
|
1557
1687
|
responses: {
|
|
1558
|
-
/** @description
|
|
1559
|
-
|
|
1688
|
+
/** @description Accepted (queued for the next calibration batch) */
|
|
1689
|
+
202: {
|
|
1560
1690
|
headers: {
|
|
1561
1691
|
[name: string]: unknown;
|
|
1562
1692
|
};
|
|
@@ -1566,8 +1696,8 @@ export interface paths {
|
|
|
1566
1696
|
};
|
|
1567
1697
|
};
|
|
1568
1698
|
};
|
|
1569
|
-
/** @description
|
|
1570
|
-
|
|
1699
|
+
/** @description Missing scope: outcomes:write */
|
|
1700
|
+
403: {
|
|
1571
1701
|
headers: {
|
|
1572
1702
|
[name: string]: unknown;
|
|
1573
1703
|
};
|
|
@@ -1575,8 +1705,8 @@ export interface paths {
|
|
|
1575
1705
|
"application/json": components["schemas"]["Error"];
|
|
1576
1706
|
};
|
|
1577
1707
|
};
|
|
1578
|
-
/** @description
|
|
1579
|
-
|
|
1708
|
+
/** @description Session not found */
|
|
1709
|
+
404: {
|
|
1580
1710
|
headers: {
|
|
1581
1711
|
[name: string]: unknown;
|
|
1582
1712
|
};
|
|
@@ -1584,15 +1714,33 @@ export interface paths {
|
|
|
1584
1714
|
"application/json": components["schemas"]["Error"];
|
|
1585
1715
|
};
|
|
1586
1716
|
};
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1717
|
+
/** @description IDEMPOTENCY_KEY_CONFLICT — a request with this Idempotency-Key is still in flight, or was already used with a different request body */
|
|
1718
|
+
409: {
|
|
1719
|
+
headers: {
|
|
1720
|
+
[name: string]: unknown;
|
|
1721
|
+
};
|
|
1722
|
+
content: {
|
|
1723
|
+
"application/json": components["schemas"]["Error"];
|
|
1724
|
+
};
|
|
1725
|
+
};
|
|
1726
|
+
/** @description Validation error */
|
|
1727
|
+
422: {
|
|
1728
|
+
headers: {
|
|
1729
|
+
[name: string]: unknown;
|
|
1730
|
+
};
|
|
1731
|
+
content: {
|
|
1732
|
+
"application/json": components["schemas"]["Error"];
|
|
1733
|
+
};
|
|
1734
|
+
};
|
|
1735
|
+
};
|
|
1736
|
+
};
|
|
1737
|
+
delete?: never;
|
|
1738
|
+
options?: never;
|
|
1591
1739
|
head?: never;
|
|
1592
1740
|
patch?: never;
|
|
1593
1741
|
trace?: never;
|
|
1594
1742
|
};
|
|
1595
|
-
"/v1/
|
|
1743
|
+
"/v1/score/difficulty": {
|
|
1596
1744
|
parameters: {
|
|
1597
1745
|
query?: never;
|
|
1598
1746
|
header?: never;
|
|
@@ -1602,8 +1750,8 @@ export interface paths {
|
|
|
1602
1750
|
get?: never;
|
|
1603
1751
|
put?: never;
|
|
1604
1752
|
/**
|
|
1605
|
-
*
|
|
1606
|
-
* @description
|
|
1753
|
+
* L15 intrinsic-difficulty atlas lookup (Pro+)
|
|
1754
|
+
* @description Returns the per-dimension intrinsic difficulty curve δ(x) for the sub-spot the (activity, location) resolves to. Pure atlas read — no scoring, no weather fetch. 404 NO_DIFFICULTY_ATLAS when the sub-spot resolves but no atlas row exists yet (dormant cell — communicated honestly rather than synthesised).
|
|
1607
1755
|
*/
|
|
1608
1756
|
post: {
|
|
1609
1757
|
parameters: {
|
|
@@ -1615,28 +1763,35 @@ export interface paths {
|
|
|
1615
1763
|
requestBody: {
|
|
1616
1764
|
content: {
|
|
1617
1765
|
"application/json": {
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
/** Format: date-time */
|
|
1621
|
-
observedAt: string;
|
|
1622
|
-
values: {
|
|
1623
|
-
[key: string]: number;
|
|
1624
|
-
};
|
|
1625
|
-
qualityFlags?: {
|
|
1626
|
-
[key: string]: unknown;
|
|
1627
|
-
};
|
|
1766
|
+
activity: string;
|
|
1767
|
+
location: components["schemas"]["GeoPoint"];
|
|
1628
1768
|
};
|
|
1629
1769
|
};
|
|
1630
1770
|
};
|
|
1631
1771
|
responses: {
|
|
1632
|
-
/** @description
|
|
1633
|
-
|
|
1772
|
+
/** @description Per-dimension intrinsic difficulty curves for the resolved sub-spot */
|
|
1773
|
+
200: {
|
|
1634
1774
|
headers: {
|
|
1635
1775
|
[name: string]: unknown;
|
|
1636
1776
|
};
|
|
1637
1777
|
content: {
|
|
1638
1778
|
"application/json": {
|
|
1639
|
-
|
|
1779
|
+
resolved: {
|
|
1780
|
+
/** @enum {string} */
|
|
1781
|
+
level: "sub-spot" | "cluster" | "region" | "base";
|
|
1782
|
+
slug: string;
|
|
1783
|
+
sub_spot_slug?: string;
|
|
1784
|
+
distance_to_sub_spot_m?: number;
|
|
1785
|
+
};
|
|
1786
|
+
dimensions: {
|
|
1787
|
+
dimension: string;
|
|
1788
|
+
grid: number[];
|
|
1789
|
+
difficulty: number[];
|
|
1790
|
+
discrimination_a: number;
|
|
1791
|
+
cohort_hash: string;
|
|
1792
|
+
/** Format: date-time */
|
|
1793
|
+
computed_at: string;
|
|
1794
|
+
}[];
|
|
1640
1795
|
};
|
|
1641
1796
|
};
|
|
1642
1797
|
};
|
|
@@ -1649,7 +1804,7 @@ export interface paths {
|
|
|
1649
1804
|
"application/json": components["schemas"]["Error"];
|
|
1650
1805
|
};
|
|
1651
1806
|
};
|
|
1652
|
-
/** @description
|
|
1807
|
+
/** @description No profile for activity, or no atlas row for the resolved sub-spot */
|
|
1653
1808
|
404: {
|
|
1654
1809
|
headers: {
|
|
1655
1810
|
[name: string]: unknown;
|
|
@@ -1667,6 +1822,15 @@ export interface paths {
|
|
|
1667
1822
|
"application/json": components["schemas"]["Error"];
|
|
1668
1823
|
};
|
|
1669
1824
|
};
|
|
1825
|
+
/** @description Difficulty atlas reader not wired */
|
|
1826
|
+
503: {
|
|
1827
|
+
headers: {
|
|
1828
|
+
[name: string]: unknown;
|
|
1829
|
+
};
|
|
1830
|
+
content: {
|
|
1831
|
+
"application/json": components["schemas"]["Error"];
|
|
1832
|
+
};
|
|
1833
|
+
};
|
|
1670
1834
|
};
|
|
1671
1835
|
};
|
|
1672
1836
|
delete?: never;
|
|
@@ -1675,38 +1839,19 @@ export interface paths {
|
|
|
1675
1839
|
patch?: never;
|
|
1676
1840
|
trace?: never;
|
|
1677
1841
|
};
|
|
1678
|
-
"/v1/
|
|
1842
|
+
"/v1/recommend-spot": {
|
|
1679
1843
|
parameters: {
|
|
1680
1844
|
query?: never;
|
|
1681
1845
|
header?: never;
|
|
1682
1846
|
path?: never;
|
|
1683
1847
|
cookie?: never;
|
|
1684
1848
|
};
|
|
1685
|
-
|
|
1686
|
-
get: {
|
|
1687
|
-
parameters: {
|
|
1688
|
-
query?: never;
|
|
1689
|
-
header?: never;
|
|
1690
|
-
path?: never;
|
|
1691
|
-
cookie?: never;
|
|
1692
|
-
};
|
|
1693
|
-
requestBody?: never;
|
|
1694
|
-
responses: {
|
|
1695
|
-
/** @description Array of stations */
|
|
1696
|
-
200: {
|
|
1697
|
-
headers: {
|
|
1698
|
-
[name: string]: unknown;
|
|
1699
|
-
};
|
|
1700
|
-
content: {
|
|
1701
|
-
"application/json": {
|
|
1702
|
-
[key: string]: unknown;
|
|
1703
|
-
};
|
|
1704
|
-
};
|
|
1705
|
-
};
|
|
1706
|
-
};
|
|
1707
|
-
};
|
|
1849
|
+
get?: never;
|
|
1708
1850
|
put?: never;
|
|
1709
|
-
/**
|
|
1851
|
+
/**
|
|
1852
|
+
* Spot recommender — inverse query (L10)
|
|
1853
|
+
* @description Given (activity, region center, radius, window) → top-K ranked sub-spots in the catalog. Composition of L1-L3 scoring + L4.6 confidence + L6 personal blend (Pro+, when pseudonym supplied). Plan caps: radius 25/50/200/1000 km, topK 5/10/20/50 across Free / Starter / Pro / Scale. Personalization Pro+ only. Hard-gated candidates (lightning ≥ 0.85, AQI hazardous) are dropped from results; `allGated=true` distinguishes 'all in-radius spots were unsafe' from 'no spots in radius at all'.
|
|
1854
|
+
*/
|
|
1710
1855
|
post: {
|
|
1711
1856
|
parameters: {
|
|
1712
1857
|
query?: never;
|
|
@@ -1717,30 +1862,79 @@ export interface paths {
|
|
|
1717
1862
|
requestBody: {
|
|
1718
1863
|
content: {
|
|
1719
1864
|
"application/json": {
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
[key: string]: unknown;
|
|
1865
|
+
activity: string;
|
|
1866
|
+
regionCenter: components["schemas"]["GeoPoint"];
|
|
1867
|
+
radiusKm: number;
|
|
1868
|
+
topK: number;
|
|
1869
|
+
window?: components["schemas"]["TimeWindow"];
|
|
1870
|
+
/** @description Optional booking-platform-side pseudonym. When present, Pro+ tenants get personalization via the L6 cold-start blend (cap 0.5 weight). */
|
|
1871
|
+
userPseudonym?: string;
|
|
1728
1872
|
};
|
|
1729
1873
|
};
|
|
1730
1874
|
};
|
|
1731
1875
|
responses: {
|
|
1732
|
-
/** @description
|
|
1733
|
-
|
|
1876
|
+
/** @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). */
|
|
1877
|
+
200: {
|
|
1734
1878
|
headers: {
|
|
1879
|
+
/** @description Daily safety cap for this endpoint + plan (not the monthly billing quota). Omitted on unlimited (Scale) plans. */
|
|
1880
|
+
"X-RateLimit-Limit"?: number;
|
|
1881
|
+
/** @description Requests remaining in the current UTC-midnight daily window. Omitted on unlimited (Scale) plans. */
|
|
1882
|
+
"X-RateLimit-Remaining"?: number;
|
|
1883
|
+
/** @description Unix timestamp (seconds) at which the daily window resets. Omitted on unlimited (Scale) plans. */
|
|
1884
|
+
"X-RateLimit-Reset"?: number;
|
|
1735
1885
|
[name: string]: unknown;
|
|
1736
1886
|
};
|
|
1737
1887
|
content: {
|
|
1738
1888
|
"application/json": {
|
|
1739
|
-
|
|
1889
|
+
results?: {
|
|
1890
|
+
spotSlug?: string;
|
|
1891
|
+
name?: string;
|
|
1892
|
+
location?: components["schemas"]["GeoPoint"];
|
|
1893
|
+
distanceKm?: number;
|
|
1894
|
+
score?: number;
|
|
1895
|
+
effectiveScore?: number;
|
|
1896
|
+
verdict?: string;
|
|
1897
|
+
personalScore?: number | null;
|
|
1898
|
+
personalWeight?: number;
|
|
1899
|
+
rank?: number;
|
|
1900
|
+
}[];
|
|
1901
|
+
allGated?: boolean;
|
|
1902
|
+
totalCandidates?: number;
|
|
1903
|
+
rankedCandidates?: number;
|
|
1904
|
+
effectiveRadiusKm?: number;
|
|
1905
|
+
effectiveTopK?: number;
|
|
1906
|
+
personalizationApplied?: boolean;
|
|
1907
|
+
latencyMs?: number;
|
|
1908
|
+
coverage?: {
|
|
1909
|
+
/** @enum {string} */
|
|
1910
|
+
status: "no_subspots_in_radius";
|
|
1911
|
+
nearestSubSpot: {
|
|
1912
|
+
slug: string;
|
|
1913
|
+
name: string;
|
|
1914
|
+
distanceKm: number;
|
|
1915
|
+
};
|
|
1916
|
+
/** @enum {string} */
|
|
1917
|
+
suggestedAction: "expand_radius";
|
|
1918
|
+
suggestedRadiusKm: number;
|
|
1919
|
+
} | {
|
|
1920
|
+
/** @enum {string} */
|
|
1921
|
+
status: "no_subspots_for_activity";
|
|
1922
|
+
/** @enum {string} */
|
|
1923
|
+
suggestedAction: "request_coverage";
|
|
1924
|
+
};
|
|
1740
1925
|
};
|
|
1741
1926
|
};
|
|
1742
1927
|
};
|
|
1743
|
-
/** @description
|
|
1928
|
+
/** @description Missing/invalid bearer token */
|
|
1929
|
+
401: {
|
|
1930
|
+
headers: {
|
|
1931
|
+
[name: string]: unknown;
|
|
1932
|
+
};
|
|
1933
|
+
content: {
|
|
1934
|
+
"application/json": components["schemas"]["Error"];
|
|
1935
|
+
};
|
|
1936
|
+
};
|
|
1937
|
+
/** @description Plan limit exceeded (radius or topK above plan cap) */
|
|
1744
1938
|
402: {
|
|
1745
1939
|
headers: {
|
|
1746
1940
|
[name: string]: unknown;
|
|
@@ -1749,7 +1943,7 @@ export interface paths {
|
|
|
1749
1943
|
"application/json": components["schemas"]["Error"];
|
|
1750
1944
|
};
|
|
1751
1945
|
};
|
|
1752
|
-
/** @description Validation error */
|
|
1946
|
+
/** @description Validation error or unknown activity */
|
|
1753
1947
|
422: {
|
|
1754
1948
|
headers: {
|
|
1755
1949
|
[name: string]: unknown;
|
|
@@ -1758,6 +1952,26 @@ export interface paths {
|
|
|
1758
1952
|
"application/json": components["schemas"]["Error"];
|
|
1759
1953
|
};
|
|
1760
1954
|
};
|
|
1955
|
+
/** @description Daily rate limit (safety cap) exceeded for this endpoint + plan. */
|
|
1956
|
+
429: {
|
|
1957
|
+
headers: {
|
|
1958
|
+
/** @description Seconds until the daily rate-limit window resets. Present only on this 429 response. */
|
|
1959
|
+
"Retry-After"?: number;
|
|
1960
|
+
[name: string]: unknown;
|
|
1961
|
+
};
|
|
1962
|
+
content: {
|
|
1963
|
+
"application/json": components["schemas"]["Error"];
|
|
1964
|
+
};
|
|
1965
|
+
};
|
|
1966
|
+
/** @description Spatial resolver not wired */
|
|
1967
|
+
503: {
|
|
1968
|
+
headers: {
|
|
1969
|
+
[name: string]: unknown;
|
|
1970
|
+
};
|
|
1971
|
+
content: {
|
|
1972
|
+
"application/json": components["schemas"]["Error"];
|
|
1973
|
+
};
|
|
1974
|
+
};
|
|
1761
1975
|
};
|
|
1762
1976
|
};
|
|
1763
1977
|
delete?: never;
|
|
@@ -1766,7 +1980,7 @@ export interface paths {
|
|
|
1766
1980
|
patch?: never;
|
|
1767
1981
|
trace?: never;
|
|
1768
1982
|
};
|
|
1769
|
-
"/v1/
|
|
1983
|
+
"/v1/intelligence/edge-case": {
|
|
1770
1984
|
parameters: {
|
|
1771
1985
|
query?: never;
|
|
1772
1986
|
header?: never;
|
|
@@ -1775,36 +1989,33 @@ export interface paths {
|
|
|
1775
1989
|
};
|
|
1776
1990
|
get?: never;
|
|
1777
1991
|
put?: never;
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
patch: {
|
|
1992
|
+
/**
|
|
1993
|
+
* LLM analysis of a borderline / surprising score (L2c, any plan — Anthropic BYOK)
|
|
1994
|
+
* @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.
|
|
1995
|
+
*/
|
|
1996
|
+
post: {
|
|
1784
1997
|
parameters: {
|
|
1785
1998
|
query?: never;
|
|
1786
1999
|
header?: never;
|
|
1787
|
-
path
|
|
1788
|
-
stationId: string;
|
|
1789
|
-
};
|
|
2000
|
+
path?: never;
|
|
1790
2001
|
cookie?: never;
|
|
1791
2002
|
};
|
|
1792
2003
|
requestBody: {
|
|
1793
2004
|
content: {
|
|
1794
2005
|
"application/json": {
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
2006
|
+
location: components["schemas"]["GeoPoint"];
|
|
2007
|
+
scoreResult?: components["schemas"]["ScoreResponse"];
|
|
2008
|
+
/** Format: uuid */
|
|
2009
|
+
session_id?: string;
|
|
2010
|
+
/** @enum {string} */
|
|
2011
|
+
locale?: "en" | "it";
|
|
2012
|
+
/** @enum {string} */
|
|
2013
|
+
model?: "claude-haiku-4-5-20251001" | "claude-sonnet-4-6";
|
|
1803
2014
|
};
|
|
1804
2015
|
};
|
|
1805
2016
|
};
|
|
1806
2017
|
responses: {
|
|
1807
|
-
/** @description
|
|
2018
|
+
/** @description Narrative + limiting_class */
|
|
1808
2019
|
200: {
|
|
1809
2020
|
headers: {
|
|
1810
2021
|
[name: string]: unknown;
|
|
@@ -1815,8 +2026,8 @@ export interface paths {
|
|
|
1815
2026
|
};
|
|
1816
2027
|
};
|
|
1817
2028
|
};
|
|
1818
|
-
/** @description
|
|
1819
|
-
|
|
2029
|
+
/** @description Validation error */
|
|
2030
|
+
422: {
|
|
1820
2031
|
headers: {
|
|
1821
2032
|
[name: string]: unknown;
|
|
1822
2033
|
};
|
|
@@ -1824,8 +2035,8 @@ export interface paths {
|
|
|
1824
2035
|
"application/json": components["schemas"]["Error"];
|
|
1825
2036
|
};
|
|
1826
2037
|
};
|
|
1827
|
-
/** @description
|
|
1828
|
-
|
|
2038
|
+
/** @description No Anthropic key configured for this tenant */
|
|
2039
|
+
503: {
|
|
1829
2040
|
headers: {
|
|
1830
2041
|
[name: string]: unknown;
|
|
1831
2042
|
};
|
|
@@ -1835,9 +2046,13 @@ export interface paths {
|
|
|
1835
2046
|
};
|
|
1836
2047
|
};
|
|
1837
2048
|
};
|
|
2049
|
+
delete?: never;
|
|
2050
|
+
options?: never;
|
|
2051
|
+
head?: never;
|
|
2052
|
+
patch?: never;
|
|
1838
2053
|
trace?: never;
|
|
1839
2054
|
};
|
|
1840
|
-
"/v1/
|
|
2055
|
+
"/v1/projections/portfolio": {
|
|
1841
2056
|
parameters: {
|
|
1842
2057
|
query?: never;
|
|
1843
2058
|
header?: never;
|
|
@@ -1846,10 +2061,7 @@ export interface paths {
|
|
|
1846
2061
|
};
|
|
1847
2062
|
get?: never;
|
|
1848
2063
|
put?: never;
|
|
1849
|
-
/**
|
|
1850
|
-
* Self-service tenant signup (no auth)
|
|
1851
|
-
* @description Public endpoint, IP-rate-limited (3 attempts / 24h / IP). Creates a tenant + sends a magic-link to the contact email. Always returns 202 on success — never reveals whether an email is already registered. Optional Cloudflare Turnstile token strengthens the gate.
|
|
1852
|
-
*/
|
|
2064
|
+
/** Climate projections across a portfolio of spots (Scale) */
|
|
1853
2065
|
post: {
|
|
1854
2066
|
parameters: {
|
|
1855
2067
|
query?: never;
|
|
@@ -1860,21 +2072,21 @@ export interface paths {
|
|
|
1860
2072
|
requestBody: {
|
|
1861
2073
|
content: {
|
|
1862
2074
|
"application/json": {
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
2075
|
+
spots: {
|
|
2076
|
+
location: components["schemas"]["GeoPoint"];
|
|
2077
|
+
activity: string;
|
|
2078
|
+
spotId?: string;
|
|
2079
|
+
}[];
|
|
2080
|
+
scenarios: ("SSP1-2.6" | "SSP2-4.5" | "SSP3-7.0" | "SSP5-8.5")[];
|
|
2081
|
+
horizonDecades?: string[];
|
|
2082
|
+
/** @enum {string} */
|
|
2083
|
+
baselineDecade?: "2020s" | "2030s";
|
|
1872
2084
|
};
|
|
1873
2085
|
};
|
|
1874
2086
|
};
|
|
1875
2087
|
responses: {
|
|
1876
|
-
/** @description
|
|
1877
|
-
|
|
2088
|
+
/** @description Per-spot per-decade projection distributions */
|
|
2089
|
+
200: {
|
|
1878
2090
|
headers: {
|
|
1879
2091
|
[name: string]: unknown;
|
|
1880
2092
|
};
|
|
@@ -1884,8 +2096,8 @@ export interface paths {
|
|
|
1884
2096
|
};
|
|
1885
2097
|
};
|
|
1886
2098
|
};
|
|
1887
|
-
/** @description
|
|
1888
|
-
|
|
2099
|
+
/** @description Requires Scale plan */
|
|
2100
|
+
402: {
|
|
1889
2101
|
headers: {
|
|
1890
2102
|
[name: string]: unknown;
|
|
1891
2103
|
};
|
|
@@ -1893,8 +2105,8 @@ export interface paths {
|
|
|
1893
2105
|
"application/json": components["schemas"]["Error"];
|
|
1894
2106
|
};
|
|
1895
2107
|
};
|
|
1896
|
-
/** @description
|
|
1897
|
-
|
|
2108
|
+
/** @description Validation error */
|
|
2109
|
+
422: {
|
|
1898
2110
|
headers: {
|
|
1899
2111
|
[name: string]: unknown;
|
|
1900
2112
|
};
|
|
@@ -1910,32 +2122,761 @@ export interface paths {
|
|
|
1910
2122
|
patch?: never;
|
|
1911
2123
|
trace?: never;
|
|
1912
2124
|
};
|
|
1913
|
-
"/v1/
|
|
2125
|
+
"/v1/projections/adaptation-report": {
|
|
1914
2126
|
parameters: {
|
|
1915
2127
|
query?: never;
|
|
1916
2128
|
header?: never;
|
|
1917
2129
|
path?: never;
|
|
1918
2130
|
cookie?: never;
|
|
1919
2131
|
};
|
|
2132
|
+
get?: never;
|
|
2133
|
+
put?: never;
|
|
1920
2134
|
/**
|
|
1921
|
-
*
|
|
1922
|
-
* @description
|
|
2135
|
+
* Climate adaptation report for an operator (Scale)
|
|
2136
|
+
* @description Combines projections across a portfolio + qualitative summary of which dimensions are likely to bind (wind shifts, water-temp shifts, etc.). Designed as input for a tourism-board adaptation plan.
|
|
1923
2137
|
*/
|
|
1924
|
-
|
|
2138
|
+
post: {
|
|
1925
2139
|
parameters: {
|
|
1926
2140
|
query?: never;
|
|
1927
2141
|
header?: never;
|
|
1928
2142
|
path?: never;
|
|
1929
2143
|
cookie?: never;
|
|
1930
2144
|
};
|
|
1931
|
-
requestBody
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
2145
|
+
requestBody: {
|
|
2146
|
+
content: {
|
|
2147
|
+
"application/json": {
|
|
2148
|
+
spots: ({
|
|
2149
|
+
location: components["schemas"]["GeoPoint"];
|
|
2150
|
+
activity: string;
|
|
2151
|
+
spotId?: string;
|
|
2152
|
+
subSpotSlug?: string;
|
|
2153
|
+
} & {
|
|
2154
|
+
[key: string]: unknown;
|
|
2155
|
+
})[];
|
|
2156
|
+
scenarios: ("SSP1-2.6" | "SSP2-4.5" | "SSP3-7.0" | "SSP5-8.5")[];
|
|
2157
|
+
horizonDecades?: string[];
|
|
2158
|
+
} & {
|
|
2159
|
+
[key: string]: unknown;
|
|
2160
|
+
};
|
|
2161
|
+
};
|
|
2162
|
+
};
|
|
2163
|
+
responses: {
|
|
2164
|
+
/** @description Adaptation report + binding-dimension summary */
|
|
2165
|
+
200: {
|
|
2166
|
+
headers: {
|
|
2167
|
+
[name: string]: unknown;
|
|
2168
|
+
};
|
|
2169
|
+
content: {
|
|
2170
|
+
"application/json": {
|
|
2171
|
+
[key: string]: unknown;
|
|
2172
|
+
};
|
|
2173
|
+
};
|
|
2174
|
+
};
|
|
2175
|
+
/** @description Requires Scale plan */
|
|
2176
|
+
402: {
|
|
2177
|
+
headers: {
|
|
2178
|
+
[name: string]: unknown;
|
|
2179
|
+
};
|
|
2180
|
+
content: {
|
|
2181
|
+
"application/json": components["schemas"]["Error"];
|
|
2182
|
+
};
|
|
2183
|
+
};
|
|
2184
|
+
/** @description Validation error */
|
|
2185
|
+
422: {
|
|
2186
|
+
headers: {
|
|
2187
|
+
[name: string]: unknown;
|
|
2188
|
+
};
|
|
2189
|
+
content: {
|
|
2190
|
+
"application/json": components["schemas"]["Error"];
|
|
2191
|
+
};
|
|
2192
|
+
};
|
|
2193
|
+
};
|
|
2194
|
+
};
|
|
2195
|
+
delete?: never;
|
|
2196
|
+
options?: never;
|
|
2197
|
+
head?: never;
|
|
2198
|
+
patch?: never;
|
|
2199
|
+
trace?: never;
|
|
2200
|
+
};
|
|
2201
|
+
"/v1/observations": {
|
|
2202
|
+
parameters: {
|
|
2203
|
+
query?: never;
|
|
2204
|
+
header?: never;
|
|
2205
|
+
path?: never;
|
|
2206
|
+
cookie?: never;
|
|
2207
|
+
};
|
|
2208
|
+
get?: never;
|
|
2209
|
+
put?: never;
|
|
2210
|
+
/**
|
|
2211
|
+
* Submit station observations for data assimilation (Pro+)
|
|
2212
|
+
* @description Push tenant-station observations (wind / wave / temperature / etc.) into the 0-6h assimilation window. The optimal-interpolation blending pulls them into forecast samples for nearby spots, improving short-horizon skill.
|
|
2213
|
+
*/
|
|
2214
|
+
post: {
|
|
2215
|
+
parameters: {
|
|
2216
|
+
query?: never;
|
|
2217
|
+
header?: never;
|
|
2218
|
+
path?: never;
|
|
2219
|
+
cookie?: never;
|
|
2220
|
+
};
|
|
2221
|
+
requestBody: {
|
|
2222
|
+
content: {
|
|
2223
|
+
"application/json": {
|
|
2224
|
+
/** Format: uuid */
|
|
2225
|
+
stationId: string;
|
|
2226
|
+
observations: {
|
|
2227
|
+
/** Format: date-time */
|
|
2228
|
+
observedAt: string;
|
|
2229
|
+
/** @enum {string} */
|
|
2230
|
+
variable: "wind_speed_kn" | "wind_dir_deg" | "wave_height_m" | "temp_c" | "sea_surface_temp_c" | "pressure_hpa" | "precip_mm";
|
|
2231
|
+
value: number;
|
|
2232
|
+
/** @enum {string} */
|
|
2233
|
+
qualityFlag?: "verified" | "unflagged" | "flagged_low_quality";
|
|
2234
|
+
}[];
|
|
2235
|
+
};
|
|
2236
|
+
};
|
|
2237
|
+
};
|
|
2238
|
+
responses: {
|
|
2239
|
+
/** @description Accepted */
|
|
2240
|
+
202: {
|
|
2241
|
+
headers: {
|
|
2242
|
+
[name: string]: unknown;
|
|
2243
|
+
};
|
|
2244
|
+
content: {
|
|
2245
|
+
"application/json": {
|
|
2246
|
+
[key: string]: unknown;
|
|
2247
|
+
};
|
|
2248
|
+
};
|
|
2249
|
+
};
|
|
2250
|
+
/** @description Requires Pro+ plan */
|
|
2251
|
+
402: {
|
|
2252
|
+
headers: {
|
|
2253
|
+
[name: string]: unknown;
|
|
2254
|
+
};
|
|
2255
|
+
content: {
|
|
2256
|
+
"application/json": components["schemas"]["Error"];
|
|
2257
|
+
};
|
|
2258
|
+
};
|
|
2259
|
+
/** @description Station not found */
|
|
2260
|
+
404: {
|
|
2261
|
+
headers: {
|
|
2262
|
+
[name: string]: unknown;
|
|
2263
|
+
};
|
|
2264
|
+
content: {
|
|
2265
|
+
"application/json": components["schemas"]["Error"];
|
|
2266
|
+
};
|
|
2267
|
+
};
|
|
2268
|
+
/** @description Station inactive */
|
|
2269
|
+
409: {
|
|
2270
|
+
headers: {
|
|
2271
|
+
[name: string]: unknown;
|
|
2272
|
+
};
|
|
2273
|
+
content: {
|
|
2274
|
+
"application/json": components["schemas"]["Error"];
|
|
2275
|
+
};
|
|
2276
|
+
};
|
|
2277
|
+
/** @description Validation error / observation in future / variable mismatch */
|
|
2278
|
+
422: {
|
|
2279
|
+
headers: {
|
|
2280
|
+
[name: string]: unknown;
|
|
2281
|
+
};
|
|
2282
|
+
content: {
|
|
2283
|
+
"application/json": components["schemas"]["Error"];
|
|
2284
|
+
};
|
|
2285
|
+
};
|
|
2286
|
+
/** @description Observation store not wired */
|
|
2287
|
+
503: {
|
|
2288
|
+
headers: {
|
|
2289
|
+
[name: string]: unknown;
|
|
2290
|
+
};
|
|
2291
|
+
content: {
|
|
2292
|
+
"application/json": components["schemas"]["Error"];
|
|
2293
|
+
};
|
|
2294
|
+
};
|
|
2295
|
+
};
|
|
2296
|
+
};
|
|
2297
|
+
delete?: never;
|
|
2298
|
+
options?: never;
|
|
2299
|
+
head?: never;
|
|
2300
|
+
patch?: never;
|
|
2301
|
+
trace?: never;
|
|
2302
|
+
};
|
|
2303
|
+
"/v1/observations/stations": {
|
|
2304
|
+
parameters: {
|
|
2305
|
+
query?: never;
|
|
2306
|
+
header?: never;
|
|
2307
|
+
path?: never;
|
|
2308
|
+
cookie?: never;
|
|
2309
|
+
};
|
|
2310
|
+
/** List tenant stations */
|
|
2311
|
+
get: {
|
|
2312
|
+
parameters: {
|
|
2313
|
+
query?: never;
|
|
2314
|
+
header?: never;
|
|
2315
|
+
path?: never;
|
|
2316
|
+
cookie?: never;
|
|
2317
|
+
};
|
|
2318
|
+
requestBody?: never;
|
|
2319
|
+
responses: {
|
|
2320
|
+
/** @description Array of stations */
|
|
2321
|
+
200: {
|
|
2322
|
+
headers: {
|
|
2323
|
+
[name: string]: unknown;
|
|
2324
|
+
};
|
|
2325
|
+
content: {
|
|
2326
|
+
"application/json": {
|
|
2327
|
+
[key: string]: unknown;
|
|
2328
|
+
};
|
|
2329
|
+
};
|
|
2330
|
+
};
|
|
2331
|
+
/** @description Station registry not wired */
|
|
2332
|
+
503: {
|
|
2333
|
+
headers: {
|
|
2334
|
+
[name: string]: unknown;
|
|
2335
|
+
};
|
|
2336
|
+
content: {
|
|
2337
|
+
"application/json": components["schemas"]["Error"];
|
|
2338
|
+
};
|
|
2339
|
+
};
|
|
2340
|
+
};
|
|
2341
|
+
};
|
|
2342
|
+
put?: never;
|
|
2343
|
+
/** Register a tenant observation station */
|
|
2344
|
+
post: {
|
|
2345
|
+
parameters: {
|
|
2346
|
+
query?: never;
|
|
2347
|
+
header?: never;
|
|
2348
|
+
path?: never;
|
|
2349
|
+
cookie?: never;
|
|
2350
|
+
};
|
|
2351
|
+
requestBody: {
|
|
2352
|
+
content: {
|
|
2353
|
+
"application/json": {
|
|
2354
|
+
name: string;
|
|
2355
|
+
point: components["schemas"]["GeoPoint"];
|
|
2356
|
+
altitudeM?: number;
|
|
2357
|
+
variables: ("wind_speed_kn" | "wind_dir_deg" | "wave_height_m" | "temp_c" | "sea_surface_temp_c" | "pressure_hpa" | "precip_mm")[];
|
|
2358
|
+
/** @enum {string} */
|
|
2359
|
+
stationClass?: "verified" | "unflagged" | "flagged_low_quality";
|
|
2360
|
+
updateCadenceMinutes?: number;
|
|
2361
|
+
notes?: string;
|
|
2362
|
+
};
|
|
2363
|
+
};
|
|
2364
|
+
};
|
|
2365
|
+
responses: {
|
|
2366
|
+
/** @description Station created */
|
|
2367
|
+
201: {
|
|
2368
|
+
headers: {
|
|
2369
|
+
[name: string]: unknown;
|
|
2370
|
+
};
|
|
2371
|
+
content: {
|
|
2372
|
+
"application/json": {
|
|
2373
|
+
[key: string]: unknown;
|
|
2374
|
+
};
|
|
2375
|
+
};
|
|
2376
|
+
};
|
|
2377
|
+
/** @description Validation error */
|
|
2378
|
+
422: {
|
|
2379
|
+
headers: {
|
|
2380
|
+
[name: string]: unknown;
|
|
2381
|
+
};
|
|
2382
|
+
content: {
|
|
2383
|
+
"application/json": components["schemas"]["Error"];
|
|
2384
|
+
};
|
|
2385
|
+
};
|
|
2386
|
+
/** @description Station registry not wired */
|
|
2387
|
+
503: {
|
|
2388
|
+
headers: {
|
|
2389
|
+
[name: string]: unknown;
|
|
2390
|
+
};
|
|
2391
|
+
content: {
|
|
2392
|
+
"application/json": components["schemas"]["Error"];
|
|
2393
|
+
};
|
|
2394
|
+
};
|
|
2395
|
+
};
|
|
2396
|
+
};
|
|
2397
|
+
delete?: never;
|
|
2398
|
+
options?: never;
|
|
2399
|
+
head?: never;
|
|
2400
|
+
patch?: never;
|
|
2401
|
+
trace?: never;
|
|
2402
|
+
};
|
|
2403
|
+
"/v1/observations/stations/{stationId}": {
|
|
2404
|
+
parameters: {
|
|
2405
|
+
query?: never;
|
|
2406
|
+
header?: never;
|
|
2407
|
+
path?: never;
|
|
2408
|
+
cookie?: never;
|
|
2409
|
+
};
|
|
2410
|
+
get?: never;
|
|
2411
|
+
put?: never;
|
|
2412
|
+
post?: never;
|
|
2413
|
+
delete?: never;
|
|
2414
|
+
options?: never;
|
|
2415
|
+
head?: never;
|
|
2416
|
+
/** Update a station */
|
|
2417
|
+
patch: {
|
|
2418
|
+
parameters: {
|
|
2419
|
+
query?: never;
|
|
2420
|
+
header?: never;
|
|
2421
|
+
path: {
|
|
2422
|
+
stationId: string;
|
|
2423
|
+
};
|
|
2424
|
+
cookie?: never;
|
|
2425
|
+
};
|
|
2426
|
+
requestBody: {
|
|
2427
|
+
content: {
|
|
2428
|
+
"application/json": {
|
|
2429
|
+
name?: string;
|
|
2430
|
+
point?: components["schemas"]["GeoPoint"];
|
|
2431
|
+
altitudeM?: number;
|
|
2432
|
+
variables?: ("wind_speed_kn" | "wind_dir_deg" | "wave_height_m" | "temp_c" | "sea_surface_temp_c" | "pressure_hpa" | "precip_mm")[];
|
|
2433
|
+
/** @enum {string} */
|
|
2434
|
+
stationClass?: "verified" | "unflagged" | "flagged_low_quality";
|
|
2435
|
+
updateCadenceMinutes?: number;
|
|
2436
|
+
active?: boolean;
|
|
2437
|
+
notes?: string;
|
|
2438
|
+
};
|
|
2439
|
+
};
|
|
2440
|
+
};
|
|
2441
|
+
responses: {
|
|
2442
|
+
/** @description Updated station */
|
|
2443
|
+
200: {
|
|
2444
|
+
headers: {
|
|
2445
|
+
[name: string]: unknown;
|
|
2446
|
+
};
|
|
2447
|
+
content: {
|
|
2448
|
+
"application/json": {
|
|
2449
|
+
[key: string]: unknown;
|
|
2450
|
+
};
|
|
2451
|
+
};
|
|
2452
|
+
};
|
|
2453
|
+
/** @description Station not found */
|
|
2454
|
+
404: {
|
|
2455
|
+
headers: {
|
|
2456
|
+
[name: string]: unknown;
|
|
2457
|
+
};
|
|
2458
|
+
content: {
|
|
2459
|
+
"application/json": components["schemas"]["Error"];
|
|
2460
|
+
};
|
|
2461
|
+
};
|
|
2462
|
+
/** @description Validation error */
|
|
2463
|
+
422: {
|
|
2464
|
+
headers: {
|
|
2465
|
+
[name: string]: unknown;
|
|
2466
|
+
};
|
|
2467
|
+
content: {
|
|
2468
|
+
"application/json": components["schemas"]["Error"];
|
|
2469
|
+
};
|
|
2470
|
+
};
|
|
2471
|
+
/** @description Station registry not wired */
|
|
2472
|
+
503: {
|
|
2473
|
+
headers: {
|
|
2474
|
+
[name: string]: unknown;
|
|
2475
|
+
};
|
|
2476
|
+
content: {
|
|
2477
|
+
"application/json": components["schemas"]["Error"];
|
|
2478
|
+
};
|
|
2479
|
+
};
|
|
2480
|
+
};
|
|
2481
|
+
};
|
|
2482
|
+
trace?: never;
|
|
2483
|
+
};
|
|
2484
|
+
"/v1/observations/stations/{stationId}/recent": {
|
|
2485
|
+
parameters: {
|
|
2486
|
+
query?: never;
|
|
2487
|
+
header?: never;
|
|
2488
|
+
path?: never;
|
|
2489
|
+
cookie?: never;
|
|
2490
|
+
};
|
|
2491
|
+
/**
|
|
2492
|
+
* Recent observations for a tenant station
|
|
2493
|
+
* @description Returns up to `limit` most-recent observations submitted for the station (tenant-scoped). Useful for the tenant's own dashboard / debugging feed. Requires the `score:read` scope.
|
|
2494
|
+
*/
|
|
2495
|
+
get: {
|
|
2496
|
+
parameters: {
|
|
2497
|
+
query?: {
|
|
2498
|
+
limit?: number;
|
|
2499
|
+
};
|
|
2500
|
+
header?: never;
|
|
2501
|
+
path: {
|
|
2502
|
+
stationId: string;
|
|
2503
|
+
};
|
|
2504
|
+
cookie?: never;
|
|
2505
|
+
};
|
|
2506
|
+
requestBody?: never;
|
|
2507
|
+
responses: {
|
|
2508
|
+
/** @description Most-recent observations for this station (descending by observedAt) */
|
|
2509
|
+
200: {
|
|
2510
|
+
headers: {
|
|
2511
|
+
[name: string]: unknown;
|
|
2512
|
+
};
|
|
2513
|
+
content: {
|
|
2514
|
+
"application/json": {
|
|
2515
|
+
observations: {
|
|
2516
|
+
/** Format: uuid */
|
|
2517
|
+
id: string;
|
|
2518
|
+
/** Format: uuid */
|
|
2519
|
+
stationId: string;
|
|
2520
|
+
/** Format: date-time */
|
|
2521
|
+
observedAt: string;
|
|
2522
|
+
/** @enum {string} */
|
|
2523
|
+
variable: "wind_speed_kn" | "wind_dir_deg" | "wave_height_m" | "temp_c" | "sea_surface_temp_c" | "pressure_hpa" | "precip_mm";
|
|
2524
|
+
value: number;
|
|
2525
|
+
/** @enum {string|null} */
|
|
2526
|
+
qualityFlag?: "verified" | "unflagged" | "flagged_low_quality" | null;
|
|
2527
|
+
/** Format: date-time */
|
|
2528
|
+
ingestedAt: string;
|
|
2529
|
+
}[];
|
|
2530
|
+
};
|
|
2531
|
+
};
|
|
2532
|
+
};
|
|
2533
|
+
/** @description Station not found */
|
|
2534
|
+
404: {
|
|
2535
|
+
headers: {
|
|
2536
|
+
[name: string]: unknown;
|
|
2537
|
+
};
|
|
2538
|
+
content: {
|
|
2539
|
+
"application/json": components["schemas"]["Error"];
|
|
2540
|
+
};
|
|
2541
|
+
};
|
|
2542
|
+
/** @description Observation store not wired */
|
|
2543
|
+
503: {
|
|
2544
|
+
headers: {
|
|
2545
|
+
[name: string]: unknown;
|
|
2546
|
+
};
|
|
2547
|
+
content: {
|
|
2548
|
+
"application/json": components["schemas"]["Error"];
|
|
2549
|
+
};
|
|
2550
|
+
};
|
|
2551
|
+
};
|
|
2552
|
+
};
|
|
2553
|
+
put?: never;
|
|
2554
|
+
post?: never;
|
|
2555
|
+
delete?: never;
|
|
2556
|
+
options?: never;
|
|
2557
|
+
head?: never;
|
|
2558
|
+
patch?: never;
|
|
2559
|
+
trace?: never;
|
|
2560
|
+
};
|
|
2561
|
+
"/v1/public/signup": {
|
|
2562
|
+
parameters: {
|
|
2563
|
+
query?: never;
|
|
2564
|
+
header?: never;
|
|
2565
|
+
path?: never;
|
|
2566
|
+
cookie?: never;
|
|
2567
|
+
};
|
|
2568
|
+
get?: never;
|
|
2569
|
+
put?: never;
|
|
2570
|
+
/**
|
|
2571
|
+
* Self-service tenant signup (no auth)
|
|
2572
|
+
* @description Public endpoint, IP-rate-limited (3 attempts / 24h / IP). Creates a tenant + sends a magic-link to the contact email. Always returns 202 on success — never reveals whether an email is already registered. Optional Cloudflare Turnstile token strengthens the gate.
|
|
2573
|
+
*/
|
|
2574
|
+
post: {
|
|
2575
|
+
parameters: {
|
|
2576
|
+
query?: never;
|
|
2577
|
+
header?: never;
|
|
2578
|
+
path?: never;
|
|
2579
|
+
cookie?: never;
|
|
2580
|
+
};
|
|
2581
|
+
requestBody: {
|
|
2582
|
+
content: {
|
|
2583
|
+
"application/json": {
|
|
2584
|
+
displayName: string;
|
|
2585
|
+
/** Format: email */
|
|
2586
|
+
contactEmail: string;
|
|
2587
|
+
/**
|
|
2588
|
+
* @description Must be true — records ToS / Privacy / DPA acceptance.
|
|
2589
|
+
* @enum {boolean}
|
|
2590
|
+
*/
|
|
2591
|
+
acceptTerms: true;
|
|
2592
|
+
turnstileToken?: string;
|
|
2593
|
+
};
|
|
2594
|
+
};
|
|
2595
|
+
};
|
|
2596
|
+
responses: {
|
|
2597
|
+
/** @description Accepted — magic-link sent if signup valid */
|
|
2598
|
+
202: {
|
|
2599
|
+
headers: {
|
|
2600
|
+
[name: string]: unknown;
|
|
2601
|
+
};
|
|
2602
|
+
content: {
|
|
2603
|
+
"application/json": {
|
|
2604
|
+
[key: string]: unknown;
|
|
2605
|
+
};
|
|
2606
|
+
};
|
|
2607
|
+
};
|
|
2608
|
+
/** @description Validation error */
|
|
2609
|
+
422: {
|
|
2610
|
+
headers: {
|
|
2611
|
+
[name: string]: unknown;
|
|
2612
|
+
};
|
|
2613
|
+
content: {
|
|
2614
|
+
"application/json": components["schemas"]["Error"];
|
|
2615
|
+
};
|
|
2616
|
+
};
|
|
2617
|
+
/** @description IP rate limit exceeded */
|
|
2618
|
+
429: {
|
|
2619
|
+
headers: {
|
|
2620
|
+
[name: string]: unknown;
|
|
2621
|
+
};
|
|
2622
|
+
content: {
|
|
2623
|
+
"application/json": components["schemas"]["Error"];
|
|
2624
|
+
};
|
|
2625
|
+
};
|
|
2626
|
+
};
|
|
2627
|
+
};
|
|
2628
|
+
delete?: never;
|
|
2629
|
+
options?: never;
|
|
2630
|
+
head?: never;
|
|
2631
|
+
patch?: never;
|
|
2632
|
+
trace?: never;
|
|
2633
|
+
};
|
|
2634
|
+
"/v1/public/sustainability-index": {
|
|
2635
|
+
parameters: {
|
|
2636
|
+
query?: never;
|
|
2637
|
+
header?: never;
|
|
2638
|
+
path?: never;
|
|
2639
|
+
cookie?: never;
|
|
2640
|
+
};
|
|
2641
|
+
/**
|
|
2642
|
+
* Public Goable Sustainability Index (no auth, JSON-LD)
|
|
2643
|
+
* @description Public JSON-LD artefact of the Goable Sustainability Index (CC BY 4.0). Session-weighted 0-100 index across zones plus per-zone breakdowns. Governed by k-anonymity (default k≥10) + a 90-day publication lag in the underlying reader — no additional privacy work required for the public surface. Content-Type: application/ld+json. Edge-cached for 5 minutes.
|
|
2644
|
+
*/
|
|
2645
|
+
get: {
|
|
2646
|
+
parameters: {
|
|
2647
|
+
query: {
|
|
2648
|
+
/** @description Inclusive start of the reporting period. */
|
|
2649
|
+
from: string;
|
|
2650
|
+
/** @description Exclusive end of the reporting period. */
|
|
2651
|
+
to: string;
|
|
2652
|
+
/** @description Zone grid cell edge length in km (default: reader-configured). */
|
|
2653
|
+
zoneKm?: number;
|
|
2654
|
+
/** @description k-anonymity threshold: zones with fewer than k sessions are suppressed. */
|
|
2655
|
+
k?: number;
|
|
2656
|
+
};
|
|
2657
|
+
header?: never;
|
|
2658
|
+
path?: never;
|
|
2659
|
+
cookie?: never;
|
|
2660
|
+
};
|
|
2661
|
+
requestBody?: never;
|
|
2662
|
+
responses: {
|
|
2663
|
+
/** @description Sustainability Index document (JSON-LD) */
|
|
2664
|
+
200: {
|
|
2665
|
+
headers: {
|
|
2666
|
+
[name: string]: unknown;
|
|
2667
|
+
};
|
|
2668
|
+
content: {
|
|
2669
|
+
"application/ld+json": {
|
|
2670
|
+
/** @example https://schema.org */
|
|
2671
|
+
"@context": string;
|
|
2672
|
+
/** @enum {string} */
|
|
2673
|
+
"@type": "GoableSustainabilityIndex";
|
|
2674
|
+
/** Format: date-time */
|
|
2675
|
+
generatedAt: string;
|
|
2676
|
+
period: {
|
|
2677
|
+
/** Format: date-time */
|
|
2678
|
+
from: string;
|
|
2679
|
+
/** Format: date-time */
|
|
2680
|
+
to: string;
|
|
2681
|
+
};
|
|
2682
|
+
methodology: {
|
|
2683
|
+
indexFormula: string;
|
|
2684
|
+
weights: {
|
|
2685
|
+
carbonNeutralShare: number;
|
|
2686
|
+
electrificationShare: number;
|
|
2687
|
+
};
|
|
2688
|
+
suppression: string;
|
|
2689
|
+
notes: string;
|
|
2690
|
+
};
|
|
2691
|
+
overall: {
|
|
2692
|
+
index: number;
|
|
2693
|
+
totalSessions: number;
|
|
2694
|
+
carbonNeutralSessions: number;
|
|
2695
|
+
carbonPositiveSessions: number;
|
|
2696
|
+
carbonNeutralShare: number;
|
|
2697
|
+
zonesReleased: number;
|
|
2698
|
+
zonesSuppressed: number;
|
|
2699
|
+
};
|
|
2700
|
+
zones: {
|
|
2701
|
+
zoneKey: string;
|
|
2702
|
+
label: string | null;
|
|
2703
|
+
centroid: components["schemas"]["GeoPoint"] | null;
|
|
2704
|
+
totalSessions: number;
|
|
2705
|
+
carbonNeutralShare: number;
|
|
2706
|
+
electrificationShare: number | null;
|
|
2707
|
+
seasonalConcentration: number | null;
|
|
2708
|
+
zoneIndex: number;
|
|
2709
|
+
}[];
|
|
2710
|
+
/** @enum {string} */
|
|
2711
|
+
license: "CC BY 4.0";
|
|
2712
|
+
attribution: string;
|
|
2713
|
+
} & {
|
|
2714
|
+
[key: string]: unknown;
|
|
2715
|
+
};
|
|
2716
|
+
};
|
|
2717
|
+
};
|
|
2718
|
+
/** @description Validation error */
|
|
2719
|
+
422: {
|
|
2720
|
+
headers: {
|
|
2721
|
+
[name: string]: unknown;
|
|
2722
|
+
};
|
|
2723
|
+
content: {
|
|
2724
|
+
"application/json": components["schemas"]["Error"];
|
|
2725
|
+
};
|
|
2726
|
+
};
|
|
2727
|
+
/** @description Sustainability index reader not wired */
|
|
2728
|
+
503: {
|
|
2729
|
+
headers: {
|
|
2730
|
+
[name: string]: unknown;
|
|
2731
|
+
};
|
|
2732
|
+
content: {
|
|
2733
|
+
"application/json": components["schemas"]["Error"];
|
|
2734
|
+
};
|
|
2735
|
+
};
|
|
2736
|
+
};
|
|
2737
|
+
};
|
|
2738
|
+
put?: never;
|
|
2739
|
+
post?: never;
|
|
2740
|
+
delete?: never;
|
|
2741
|
+
options?: never;
|
|
2742
|
+
head?: never;
|
|
2743
|
+
patch?: never;
|
|
2744
|
+
trace?: never;
|
|
2745
|
+
};
|
|
2746
|
+
"/v1/research/verification/export": {
|
|
2747
|
+
parameters: {
|
|
2748
|
+
query?: never;
|
|
2749
|
+
header?: never;
|
|
2750
|
+
path?: never;
|
|
2751
|
+
cookie?: never;
|
|
2752
|
+
};
|
|
2753
|
+
/**
|
|
2754
|
+
* Public Stream F forecast verification export (no auth, JSONL)
|
|
2755
|
+
* @description Streamed newline-delimited JSON (`application/x-ndjson`) — one anonymised (activity × 1km² grid × weekly bucket) skill cell per line, followed by a trailing metadata line. CC BY 4.0. Governance: k≥10 contributor floor + 90-day publication lag + `research_eligible=true` filter enforced in the SQL reader.
|
|
2756
|
+
*/
|
|
2757
|
+
get: {
|
|
2758
|
+
parameters: {
|
|
2759
|
+
query?: {
|
|
2760
|
+
from?: string;
|
|
2761
|
+
to?: string;
|
|
2762
|
+
};
|
|
2763
|
+
header?: never;
|
|
2764
|
+
path?: never;
|
|
2765
|
+
cookie?: never;
|
|
2766
|
+
};
|
|
2767
|
+
requestBody?: never;
|
|
2768
|
+
responses: {
|
|
2769
|
+
/** @description Streamed JSONL — one cell per line + trailing meta line */
|
|
2770
|
+
200: {
|
|
2771
|
+
headers: {
|
|
2772
|
+
[name: string]: unknown;
|
|
2773
|
+
};
|
|
2774
|
+
content: {
|
|
2775
|
+
"application/x-ndjson": string;
|
|
2776
|
+
};
|
|
2777
|
+
};
|
|
2778
|
+
/** @description Validation error */
|
|
2779
|
+
422: {
|
|
2780
|
+
headers: {
|
|
2781
|
+
[name: string]: unknown;
|
|
2782
|
+
};
|
|
2783
|
+
content: {
|
|
2784
|
+
"application/json": components["schemas"]["Error"];
|
|
2785
|
+
};
|
|
2786
|
+
};
|
|
2787
|
+
/** @description Verification reader not wired */
|
|
2788
|
+
503: {
|
|
2789
|
+
headers: {
|
|
2790
|
+
[name: string]: unknown;
|
|
2791
|
+
};
|
|
2792
|
+
content: {
|
|
2793
|
+
"application/json": components["schemas"]["Error"];
|
|
2794
|
+
};
|
|
2795
|
+
};
|
|
2796
|
+
};
|
|
2797
|
+
};
|
|
2798
|
+
put?: never;
|
|
2799
|
+
post?: never;
|
|
2800
|
+
delete?: never;
|
|
2801
|
+
options?: never;
|
|
2802
|
+
head?: never;
|
|
2803
|
+
patch?: never;
|
|
2804
|
+
trace?: never;
|
|
2805
|
+
};
|
|
2806
|
+
"/v1/research/difficulty-atlas/export.jsonl": {
|
|
2807
|
+
parameters: {
|
|
2808
|
+
query?: never;
|
|
2809
|
+
header?: never;
|
|
2810
|
+
path?: never;
|
|
2811
|
+
cookie?: never;
|
|
2812
|
+
};
|
|
2813
|
+
/**
|
|
2814
|
+
* Public L15 Difficulty Atlas export (no auth, JSONL)
|
|
2815
|
+
* @description Streamed newline-delimited JSON (`application/x-ndjson`) — one anonymised (activity × sub-spot × dimension) difficulty row per line, followed by a trailing metadata line. CC BY 4.0. First openly-available intrinsic-difficulty measurement for outdoor activities. Governance mirrors Stream F: k≥10 contributors + 90-day publication lag.
|
|
2816
|
+
*/
|
|
2817
|
+
get: {
|
|
2818
|
+
parameters: {
|
|
2819
|
+
query?: never;
|
|
2820
|
+
header?: never;
|
|
2821
|
+
path?: never;
|
|
2822
|
+
cookie?: never;
|
|
2823
|
+
};
|
|
2824
|
+
requestBody?: never;
|
|
2825
|
+
responses: {
|
|
2826
|
+
/** @description Streamed JSONL — one atlas row per line + trailing meta line */
|
|
2827
|
+
200: {
|
|
2828
|
+
headers: {
|
|
2829
|
+
[name: string]: unknown;
|
|
2830
|
+
};
|
|
2831
|
+
content: {
|
|
2832
|
+
"application/x-ndjson": string;
|
|
2833
|
+
};
|
|
2834
|
+
};
|
|
2835
|
+
/** @description Difficulty atlas reader not wired */
|
|
2836
|
+
503: {
|
|
2837
|
+
headers: {
|
|
2838
|
+
[name: string]: unknown;
|
|
2839
|
+
};
|
|
2840
|
+
content: {
|
|
2841
|
+
"application/json": components["schemas"]["Error"];
|
|
2842
|
+
};
|
|
2843
|
+
};
|
|
2844
|
+
};
|
|
2845
|
+
};
|
|
2846
|
+
put?: never;
|
|
2847
|
+
post?: never;
|
|
2848
|
+
delete?: never;
|
|
2849
|
+
options?: never;
|
|
2850
|
+
head?: never;
|
|
2851
|
+
patch?: never;
|
|
2852
|
+
trace?: never;
|
|
2853
|
+
};
|
|
2854
|
+
"/v1/public/catalog-stats": {
|
|
2855
|
+
parameters: {
|
|
2856
|
+
query?: never;
|
|
2857
|
+
header?: never;
|
|
2858
|
+
path?: never;
|
|
2859
|
+
cookie?: never;
|
|
2860
|
+
};
|
|
2861
|
+
/**
|
|
2862
|
+
* Open catalogue coverage stats (no auth)
|
|
2863
|
+
* @description Live coverage numbers for the open activity catalogue (CC BY 4.0). Returns totals across activities · sub-spots · clusters · regions · countries plus a per-activity breakdown with country codes + status (`seeded` ≥10 sub-spots / `partial` 1-9 / `empty` 0). Edge-cached for 5 minutes — new sub-spots ship via PR + release cycle, not at runtime. Same JSON the /catalog landing renders; expose this surface for marketing / partner sites that want to embed live numbers without scraping HTML.
|
|
2864
|
+
*/
|
|
2865
|
+
get: {
|
|
2866
|
+
parameters: {
|
|
2867
|
+
query?: never;
|
|
2868
|
+
header?: never;
|
|
2869
|
+
path?: never;
|
|
2870
|
+
cookie?: never;
|
|
2871
|
+
};
|
|
2872
|
+
requestBody?: never;
|
|
2873
|
+
responses: {
|
|
2874
|
+
/** @description Live coverage stats from the @goable-io/profiles-catalog package */
|
|
2875
|
+
200: {
|
|
2876
|
+
headers: {
|
|
2877
|
+
[name: string]: unknown;
|
|
2878
|
+
};
|
|
2879
|
+
content: {
|
|
1939
2880
|
"application/json": {
|
|
1940
2881
|
/**
|
|
1941
2882
|
* Format: date-time
|
|
@@ -1991,6 +2932,239 @@ export interface paths {
|
|
|
1991
2932
|
patch?: never;
|
|
1992
2933
|
trace?: never;
|
|
1993
2934
|
};
|
|
2935
|
+
"/v1/outcomes": {
|
|
2936
|
+
parameters: {
|
|
2937
|
+
query?: never;
|
|
2938
|
+
header?: never;
|
|
2939
|
+
path?: never;
|
|
2940
|
+
cookie?: never;
|
|
2941
|
+
};
|
|
2942
|
+
get?: never;
|
|
2943
|
+
put?: never;
|
|
2944
|
+
/**
|
|
2945
|
+
* Report a standalone activity outcome
|
|
2946
|
+
* @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).
|
|
2947
|
+
*/
|
|
2948
|
+
post: {
|
|
2949
|
+
parameters: {
|
|
2950
|
+
query?: never;
|
|
2951
|
+
header?: never;
|
|
2952
|
+
path?: never;
|
|
2953
|
+
cookie?: never;
|
|
2954
|
+
};
|
|
2955
|
+
requestBody: {
|
|
2956
|
+
content: {
|
|
2957
|
+
"application/json": {
|
|
2958
|
+
/** Format: date-time */
|
|
2959
|
+
occurred_at: string;
|
|
2960
|
+
activity_slug: string;
|
|
2961
|
+
/** @enum {string} */
|
|
2962
|
+
outcome_type: "ran" | "cancelled" | "rescheduled" | "no_show" | "note";
|
|
2963
|
+
/** @description Optional catalogue sub-spot slug. */
|
|
2964
|
+
spot_id?: string;
|
|
2965
|
+
/** @description Optional link back to a scoring_audit_log row. */
|
|
2966
|
+
audit_log_id?: string;
|
|
2967
|
+
detail?: {
|
|
2968
|
+
[key: string]: unknown;
|
|
2969
|
+
};
|
|
2970
|
+
/**
|
|
2971
|
+
* @description Stream G equipment-transition signal.
|
|
2972
|
+
* @enum {string}
|
|
2973
|
+
*/
|
|
2974
|
+
equipment_type?: "electric" | "combustion" | "manual";
|
|
2975
|
+
};
|
|
2976
|
+
};
|
|
2977
|
+
};
|
|
2978
|
+
responses: {
|
|
2979
|
+
/** @description Accepted (queued for the next calibration batch) */
|
|
2980
|
+
202: {
|
|
2981
|
+
headers: {
|
|
2982
|
+
[name: string]: unknown;
|
|
2983
|
+
};
|
|
2984
|
+
content: {
|
|
2985
|
+
"application/json": {
|
|
2986
|
+
[key: string]: unknown;
|
|
2987
|
+
};
|
|
2988
|
+
};
|
|
2989
|
+
};
|
|
2990
|
+
/** @description Missing scope: outcomes:write */
|
|
2991
|
+
403: {
|
|
2992
|
+
headers: {
|
|
2993
|
+
[name: string]: unknown;
|
|
2994
|
+
};
|
|
2995
|
+
content: {
|
|
2996
|
+
"application/json": components["schemas"]["Error"];
|
|
2997
|
+
};
|
|
2998
|
+
};
|
|
2999
|
+
/** @description Validation error */
|
|
3000
|
+
422: {
|
|
3001
|
+
headers: {
|
|
3002
|
+
[name: string]: unknown;
|
|
3003
|
+
};
|
|
3004
|
+
content: {
|
|
3005
|
+
"application/json": components["schemas"]["Error"];
|
|
3006
|
+
};
|
|
3007
|
+
};
|
|
3008
|
+
};
|
|
3009
|
+
};
|
|
3010
|
+
delete?: never;
|
|
3011
|
+
options?: never;
|
|
3012
|
+
head?: never;
|
|
3013
|
+
patch?: never;
|
|
3014
|
+
trace?: never;
|
|
3015
|
+
};
|
|
3016
|
+
"/v1/audit/export": {
|
|
3017
|
+
parameters: {
|
|
3018
|
+
query?: never;
|
|
3019
|
+
header?: never;
|
|
3020
|
+
path?: never;
|
|
3021
|
+
cookie?: never;
|
|
3022
|
+
};
|
|
3023
|
+
/**
|
|
3024
|
+
* Export the caller's own score + outcome audit history
|
|
3025
|
+
* @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.
|
|
3026
|
+
*/
|
|
3027
|
+
get: {
|
|
3028
|
+
parameters: {
|
|
3029
|
+
query: {
|
|
3030
|
+
from: string;
|
|
3031
|
+
to: string;
|
|
3032
|
+
format?: "csv" | "json";
|
|
3033
|
+
limit?: number;
|
|
3034
|
+
offset?: number;
|
|
3035
|
+
};
|
|
3036
|
+
header?: never;
|
|
3037
|
+
path?: never;
|
|
3038
|
+
cookie?: never;
|
|
3039
|
+
};
|
|
3040
|
+
requestBody?: never;
|
|
3041
|
+
responses: {
|
|
3042
|
+
/** @description CSV (format=csv) or JSON (format=json, default) export of the window. */
|
|
3043
|
+
200: {
|
|
3044
|
+
headers: {
|
|
3045
|
+
[name: string]: unknown;
|
|
3046
|
+
};
|
|
3047
|
+
content: {
|
|
3048
|
+
"application/json": {
|
|
3049
|
+
rows: {
|
|
3050
|
+
[key: string]: unknown;
|
|
3051
|
+
}[];
|
|
3052
|
+
meta: {
|
|
3053
|
+
total: number;
|
|
3054
|
+
limit: number;
|
|
3055
|
+
offset: number;
|
|
3056
|
+
window: {
|
|
3057
|
+
from?: string;
|
|
3058
|
+
to?: string;
|
|
3059
|
+
};
|
|
3060
|
+
};
|
|
3061
|
+
};
|
|
3062
|
+
"text/csv": string;
|
|
3063
|
+
};
|
|
3064
|
+
};
|
|
3065
|
+
/** @description Validation error, `to` before `from`, or WINDOW_TOO_LARGE (range exceeds 366 days) */
|
|
3066
|
+
422: {
|
|
3067
|
+
headers: {
|
|
3068
|
+
[name: string]: unknown;
|
|
3069
|
+
};
|
|
3070
|
+
content: {
|
|
3071
|
+
"application/json": components["schemas"]["Error"];
|
|
3072
|
+
};
|
|
3073
|
+
};
|
|
3074
|
+
/** @description Audit export is not configured */
|
|
3075
|
+
503: {
|
|
3076
|
+
headers: {
|
|
3077
|
+
[name: string]: unknown;
|
|
3078
|
+
};
|
|
3079
|
+
content: {
|
|
3080
|
+
"application/json": components["schemas"]["Error"];
|
|
3081
|
+
};
|
|
3082
|
+
};
|
|
3083
|
+
};
|
|
3084
|
+
};
|
|
3085
|
+
put?: never;
|
|
3086
|
+
post?: never;
|
|
3087
|
+
delete?: never;
|
|
3088
|
+
options?: never;
|
|
3089
|
+
head?: never;
|
|
3090
|
+
patch?: never;
|
|
3091
|
+
trace?: never;
|
|
3092
|
+
};
|
|
3093
|
+
"/v1/legal/{kind}/current": {
|
|
3094
|
+
parameters: {
|
|
3095
|
+
query?: never;
|
|
3096
|
+
header?: never;
|
|
3097
|
+
path?: never;
|
|
3098
|
+
cookie?: never;
|
|
3099
|
+
};
|
|
3100
|
+
/**
|
|
3101
|
+
* Fetch the current published legal document (no auth)
|
|
3102
|
+
* @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.
|
|
3103
|
+
*/
|
|
3104
|
+
get: {
|
|
3105
|
+
parameters: {
|
|
3106
|
+
query?: never;
|
|
3107
|
+
header?: never;
|
|
3108
|
+
path: {
|
|
3109
|
+
/** @description Legal document kind. */
|
|
3110
|
+
kind: "terms_of_service" | "privacy_policy" | "data_processing_agreement" | "sla" | "acceptable_use" | "cookie_policy";
|
|
3111
|
+
};
|
|
3112
|
+
cookie?: never;
|
|
3113
|
+
};
|
|
3114
|
+
requestBody?: never;
|
|
3115
|
+
responses: {
|
|
3116
|
+
/** @description The current published document of the requested kind */
|
|
3117
|
+
200: {
|
|
3118
|
+
headers: {
|
|
3119
|
+
[name: string]: unknown;
|
|
3120
|
+
};
|
|
3121
|
+
content: {
|
|
3122
|
+
"application/json": {
|
|
3123
|
+
document: {
|
|
3124
|
+
/** Format: uuid */
|
|
3125
|
+
id: string;
|
|
3126
|
+
kind: string;
|
|
3127
|
+
version: string;
|
|
3128
|
+
title: string;
|
|
3129
|
+
body: string;
|
|
3130
|
+
contentHash: string;
|
|
3131
|
+
status: string;
|
|
3132
|
+
/** Format: date-time */
|
|
3133
|
+
createdAt: string;
|
|
3134
|
+
/** Format: date-time */
|
|
3135
|
+
publishedAt: string | null;
|
|
3136
|
+
};
|
|
3137
|
+
};
|
|
3138
|
+
};
|
|
3139
|
+
};
|
|
3140
|
+
/** @description Unknown document kind, or no published document */
|
|
3141
|
+
404: {
|
|
3142
|
+
headers: {
|
|
3143
|
+
[name: string]: unknown;
|
|
3144
|
+
};
|
|
3145
|
+
content: {
|
|
3146
|
+
"application/json": components["schemas"]["Error"];
|
|
3147
|
+
};
|
|
3148
|
+
};
|
|
3149
|
+
/** @description Legal document store not wired */
|
|
3150
|
+
503: {
|
|
3151
|
+
headers: {
|
|
3152
|
+
[name: string]: unknown;
|
|
3153
|
+
};
|
|
3154
|
+
content: {
|
|
3155
|
+
"application/json": components["schemas"]["Error"];
|
|
3156
|
+
};
|
|
3157
|
+
};
|
|
3158
|
+
};
|
|
3159
|
+
};
|
|
3160
|
+
put?: never;
|
|
3161
|
+
post?: never;
|
|
3162
|
+
delete?: never;
|
|
3163
|
+
options?: never;
|
|
3164
|
+
head?: never;
|
|
3165
|
+
patch?: never;
|
|
3166
|
+
trace?: never;
|
|
3167
|
+
};
|
|
1994
3168
|
}
|
|
1995
3169
|
export type webhooks = Record<string, never>;
|
|
1996
3170
|
export interface components {
|
|
@@ -2025,10 +3199,12 @@ export interface components {
|
|
|
2025
3199
|
verdict: components["schemas"]["Verdict"];
|
|
2026
3200
|
confidence: number;
|
|
2027
3201
|
breakdown: ({
|
|
2028
|
-
|
|
2029
|
-
|
|
3202
|
+
name?: string;
|
|
3203
|
+
value?: number;
|
|
3204
|
+
suitability?: number;
|
|
2030
3205
|
weight?: number;
|
|
2031
3206
|
contribution?: number;
|
|
3207
|
+
hasData?: boolean;
|
|
2032
3208
|
} & {
|
|
2033
3209
|
[key: string]: unknown;
|
|
2034
3210
|
})[];
|
|
@@ -2036,9 +3212,10 @@ export interface components {
|
|
|
2036
3212
|
[key: string]: unknown;
|
|
2037
3213
|
};
|
|
2038
3214
|
alerts: ({
|
|
3215
|
+
/** @enum {string} */
|
|
3216
|
+
level?: "info" | "warning" | "critical";
|
|
2039
3217
|
code?: string;
|
|
2040
|
-
|
|
2041
|
-
message?: string;
|
|
3218
|
+
description?: string;
|
|
2042
3219
|
} & {
|
|
2043
3220
|
[key: string]: unknown;
|
|
2044
3221
|
})[];
|
|
@@ -2049,12 +3226,8 @@ export interface components {
|
|
|
2049
3226
|
distribution?: {
|
|
2050
3227
|
[key: string]: unknown;
|
|
2051
3228
|
};
|
|
2052
|
-
confidenceDetail?:
|
|
2053
|
-
|
|
2054
|
-
};
|
|
2055
|
-
calibration_provenance?: {
|
|
2056
|
-
[key: string]: unknown;
|
|
2057
|
-
};
|
|
3229
|
+
confidenceDetail?: components["schemas"]["ConfidenceDetailForecast"];
|
|
3230
|
+
calibration_provenance?: components["schemas"]["CalibrationProvenance"] | null;
|
|
2058
3231
|
assimilation?: {
|
|
2059
3232
|
[key: string]: unknown;
|
|
2060
3233
|
};
|
|
@@ -2084,6 +3257,297 @@ export interface components {
|
|
|
2084
3257
|
} & {
|
|
2085
3258
|
[key: string]: unknown;
|
|
2086
3259
|
};
|
|
3260
|
+
CalibrationProvenance: {
|
|
3261
|
+
/** @enum {string} */
|
|
3262
|
+
level?: "sub-spot" | "cluster" | "region" | "base";
|
|
3263
|
+
slug?: string;
|
|
3264
|
+
scoring_profile_slug?: string;
|
|
3265
|
+
sub_spot_slug?: string;
|
|
3266
|
+
distance_to_sub_spot_m?: number;
|
|
3267
|
+
/** @enum {integer} */
|
|
3268
|
+
tier?: 1 | 2 | 3;
|
|
3269
|
+
/** @enum {string} */
|
|
3270
|
+
tier_source?: "catalog" | "classifier";
|
|
3271
|
+
};
|
|
3272
|
+
CalibrationProvenanceSummary: {
|
|
3273
|
+
/** @enum {string} */
|
|
3274
|
+
level: "base" | "region" | "cluster" | "sub-spot";
|
|
3275
|
+
n_local: number | null;
|
|
3276
|
+
shrinkage_weight_from_parent: number | null;
|
|
3277
|
+
};
|
|
3278
|
+
DriftFlag: {
|
|
3279
|
+
/** @enum {string} */
|
|
3280
|
+
severity: "watch" | "warning" | "critical";
|
|
3281
|
+
/** Format: date-time */
|
|
3282
|
+
since_timestamp: string;
|
|
3283
|
+
};
|
|
3284
|
+
ConfidenceDetail: components["schemas"]["ConfidenceDetailForecast"] | components["schemas"]["ConfidenceDetailHistorical"] | components["schemas"]["ConfidenceDetailClimate"];
|
|
3285
|
+
ConfidenceDetailForecast: {
|
|
3286
|
+
/**
|
|
3287
|
+
* @description discriminator enum property added by openapi-typescript
|
|
3288
|
+
* @enum {string}
|
|
3289
|
+
*/
|
|
3290
|
+
mode: "forecast";
|
|
3291
|
+
forecast_skill: number;
|
|
3292
|
+
provider_agreement: number;
|
|
3293
|
+
profile_maturity: number;
|
|
3294
|
+
hierarchical_calibration: number;
|
|
3295
|
+
calibration_provenance?: components["schemas"]["CalibrationProvenanceSummary"];
|
|
3296
|
+
skill_calibration?: {
|
|
3297
|
+
applied: boolean;
|
|
3298
|
+
n_train: number;
|
|
3299
|
+
cohort_hash: string;
|
|
3300
|
+
scalar: number;
|
|
3301
|
+
};
|
|
3302
|
+
drift_flag?: components["schemas"]["DriftFlag"];
|
|
3303
|
+
} & {
|
|
3304
|
+
[key: string]: unknown;
|
|
3305
|
+
};
|
|
3306
|
+
ConfidenceDetailHistorical: {
|
|
3307
|
+
/**
|
|
3308
|
+
* @description discriminator enum property added by openapi-typescript
|
|
3309
|
+
* @enum {string}
|
|
3310
|
+
*/
|
|
3311
|
+
mode: "historical";
|
|
3312
|
+
sample_size_confidence: number;
|
|
3313
|
+
base_climatology_quality: number;
|
|
3314
|
+
calibration_confidence: number;
|
|
3315
|
+
hierarchical_calibration: number;
|
|
3316
|
+
calibration_provenance?: components["schemas"]["CalibrationProvenanceSummary"];
|
|
3317
|
+
drift_flag?: components["schemas"]["DriftFlag"];
|
|
3318
|
+
} & {
|
|
3319
|
+
[key: string]: unknown;
|
|
3320
|
+
};
|
|
3321
|
+
ConfidenceDetailClimate: {
|
|
3322
|
+
/**
|
|
3323
|
+
* @description discriminator enum property added by openapi-typescript
|
|
3324
|
+
* @enum {string}
|
|
3325
|
+
*/
|
|
3326
|
+
mode: "climate";
|
|
3327
|
+
model_spread: number;
|
|
3328
|
+
bias_correction_residual: number;
|
|
3329
|
+
scenario_uncertainty: number;
|
|
3330
|
+
horizon_uncertainty: number;
|
|
3331
|
+
hierarchical_calibration: number;
|
|
3332
|
+
calibration_provenance?: components["schemas"]["CalibrationProvenanceSummary"];
|
|
3333
|
+
drift_flag?: components["schemas"]["DriftFlag"];
|
|
3334
|
+
} & {
|
|
3335
|
+
[key: string]: unknown;
|
|
3336
|
+
};
|
|
3337
|
+
SerialisedPolicy: {
|
|
3338
|
+
/** Format: uuid */
|
|
3339
|
+
id: string;
|
|
3340
|
+
/** Format: uuid */
|
|
3341
|
+
tenantId: string;
|
|
3342
|
+
/** Format: uuid */
|
|
3343
|
+
quoteId: string;
|
|
3344
|
+
/** @enum {string} */
|
|
3345
|
+
status: "bound" | "triggered" | "settled" | "expired";
|
|
3346
|
+
/** @description Null for mixed-currency portfolios; the breakdown lives on the underlying quote. */
|
|
3347
|
+
payoutAmount?: number | null;
|
|
3348
|
+
payoutCurrency?: ("EUR" | "USD" | "GBP" | "CHF") | null;
|
|
3349
|
+
premiumPaid?: number | null;
|
|
3350
|
+
/** @enum {string} */
|
|
3351
|
+
premiumCollection: "external" | "stripe" | "invoice_due";
|
|
3352
|
+
coverageWindow: {
|
|
3353
|
+
monthFrom: number;
|
|
3354
|
+
dayFrom: number;
|
|
3355
|
+
monthTo: number;
|
|
3356
|
+
dayTo: number;
|
|
3357
|
+
};
|
|
3358
|
+
coverageYear: number;
|
|
3359
|
+
/** @description Frozen at bind time — same shape as the quote's normalised trigger. */
|
|
3360
|
+
trigger: {
|
|
3361
|
+
[key: string]: unknown;
|
|
3362
|
+
};
|
|
3363
|
+
/** @description Frozen snapshot of the per-spot profile + payout terms — decouples the policy from later catalog changes. */
|
|
3364
|
+
policyTerms: {
|
|
3365
|
+
[key: string]: unknown;
|
|
3366
|
+
};
|
|
3367
|
+
/** Format: date-time */
|
|
3368
|
+
boundAt: string;
|
|
3369
|
+
/** Format: date-time */
|
|
3370
|
+
triggeredAt: string | null;
|
|
3371
|
+
/** Format: date-time */
|
|
3372
|
+
settledAt: string | null;
|
|
3373
|
+
/** Format: date-time */
|
|
3374
|
+
expiredAt: string | null;
|
|
3375
|
+
settlementReference: string | null;
|
|
3376
|
+
};
|
|
3377
|
+
SerialisedPayoutEvent: {
|
|
3378
|
+
/** Format: uuid */
|
|
3379
|
+
id: string;
|
|
3380
|
+
/** Format: uuid */
|
|
3381
|
+
policyId: string;
|
|
3382
|
+
spotIndex: number;
|
|
3383
|
+
/** Format: date-time */
|
|
3384
|
+
eventStartAt: string;
|
|
3385
|
+
/** Format: date-time */
|
|
3386
|
+
eventEndAt: string;
|
|
3387
|
+
hoursFired: number;
|
|
3388
|
+
payoutAmount: number;
|
|
3389
|
+
/** @enum {string} */
|
|
3390
|
+
payoutCurrency: "EUR" | "USD" | "GBP" | "CHF";
|
|
3391
|
+
/** Format: date-time */
|
|
3392
|
+
detectedAt: string;
|
|
3393
|
+
/** @enum {string} */
|
|
3394
|
+
evaluationSource: "manual" | "scheduled";
|
|
3395
|
+
};
|
|
3396
|
+
UnderwritingQuoteResponse: {
|
|
3397
|
+
policy: {
|
|
3398
|
+
coverageWindow: {
|
|
3399
|
+
monthFrom: number;
|
|
3400
|
+
dayFrom: number;
|
|
3401
|
+
monthTo: number;
|
|
3402
|
+
dayTo: number;
|
|
3403
|
+
};
|
|
3404
|
+
/** @description Normalised trigger echoed back with defaulted consecutiveHours/cooldownHours. */
|
|
3405
|
+
trigger: {
|
|
3406
|
+
[key: string]: unknown;
|
|
3407
|
+
};
|
|
3408
|
+
historicalYearsRange: {
|
|
3409
|
+
from: number;
|
|
3410
|
+
to: number;
|
|
3411
|
+
};
|
|
3412
|
+
spot?: {
|
|
3413
|
+
resolvedProfileSlug: string;
|
|
3414
|
+
point: components["schemas"]["GeoPoint"];
|
|
3415
|
+
spotId?: string;
|
|
3416
|
+
payout: {
|
|
3417
|
+
amount: number;
|
|
3418
|
+
/** @enum {string} */
|
|
3419
|
+
currency: "EUR" | "USD" | "GBP" | "CHF";
|
|
3420
|
+
};
|
|
3421
|
+
/**
|
|
3422
|
+
* @description Sub-spot tier (1/2/3) applied to the tier risk multiplier; null when no sub-spot resolved.
|
|
3423
|
+
* @enum {integer|null}
|
|
3424
|
+
*/
|
|
3425
|
+
tier?: 1 | 2 | 3 | null;
|
|
3426
|
+
/**
|
|
3427
|
+
* @description Provenance of the tier: 'catalog' from profile YAML, 'classifier' from L11 confidence=1.0 override, null when no tier applied.
|
|
3428
|
+
* @enum {string|null}
|
|
3429
|
+
*/
|
|
3430
|
+
tierSource?: "catalog" | "classifier" | null;
|
|
3431
|
+
};
|
|
3432
|
+
portfolio?: {
|
|
3433
|
+
resolvedProfileSlug: string;
|
|
3434
|
+
point: components["schemas"]["GeoPoint"];
|
|
3435
|
+
spotId?: string;
|
|
3436
|
+
payout: {
|
|
3437
|
+
amount: number;
|
|
3438
|
+
/** @enum {string} */
|
|
3439
|
+
currency: "EUR" | "USD" | "GBP" | "CHF";
|
|
3440
|
+
};
|
|
3441
|
+
/**
|
|
3442
|
+
* @description Sub-spot tier (1/2/3) applied to the tier risk multiplier; null when no sub-spot resolved.
|
|
3443
|
+
* @enum {integer|null}
|
|
3444
|
+
*/
|
|
3445
|
+
tier?: 1 | 2 | 3 | null;
|
|
3446
|
+
/**
|
|
3447
|
+
* @description Provenance of the tier: 'catalog' from profile YAML, 'classifier' from L11 confidence=1.0 override, null when no tier applied.
|
|
3448
|
+
* @enum {string|null}
|
|
3449
|
+
*/
|
|
3450
|
+
tierSource?: "catalog" | "classifier" | null;
|
|
3451
|
+
}[];
|
|
3452
|
+
} & {
|
|
3453
|
+
[key: string]: unknown;
|
|
3454
|
+
};
|
|
3455
|
+
expectedPayouts: {
|
|
3456
|
+
byCurrency: {
|
|
3457
|
+
EUR?: {
|
|
3458
|
+
mean: number;
|
|
3459
|
+
p10: number;
|
|
3460
|
+
p50: number;
|
|
3461
|
+
p90: number;
|
|
3462
|
+
perYear: number[];
|
|
3463
|
+
varianceStability: number;
|
|
3464
|
+
};
|
|
3465
|
+
USD?: {
|
|
3466
|
+
mean: number;
|
|
3467
|
+
p10: number;
|
|
3468
|
+
p50: number;
|
|
3469
|
+
p90: number;
|
|
3470
|
+
perYear: number[];
|
|
3471
|
+
varianceStability: number;
|
|
3472
|
+
};
|
|
3473
|
+
GBP?: {
|
|
3474
|
+
mean: number;
|
|
3475
|
+
p10: number;
|
|
3476
|
+
p50: number;
|
|
3477
|
+
p90: number;
|
|
3478
|
+
perYear: number[];
|
|
3479
|
+
varianceStability: number;
|
|
3480
|
+
};
|
|
3481
|
+
CHF?: {
|
|
3482
|
+
mean: number;
|
|
3483
|
+
p10: number;
|
|
3484
|
+
p50: number;
|
|
3485
|
+
p90: number;
|
|
3486
|
+
perYear: number[];
|
|
3487
|
+
varianceStability: number;
|
|
3488
|
+
};
|
|
3489
|
+
};
|
|
3490
|
+
};
|
|
3491
|
+
expectedPremium: {
|
|
3492
|
+
byCurrency: {
|
|
3493
|
+
EUR?: {
|
|
3494
|
+
fair: number;
|
|
3495
|
+
loaded: number;
|
|
3496
|
+
/** @description Weighted-average tier risk multiplier applied across spots in this currency (1.0 when no sub-spot). */
|
|
3497
|
+
tierMultiplierWeightedAvg: number;
|
|
3498
|
+
};
|
|
3499
|
+
USD?: {
|
|
3500
|
+
fair: number;
|
|
3501
|
+
loaded: number;
|
|
3502
|
+
/** @description Weighted-average tier risk multiplier applied across spots in this currency (1.0 when no sub-spot). */
|
|
3503
|
+
tierMultiplierWeightedAvg: number;
|
|
3504
|
+
};
|
|
3505
|
+
GBP?: {
|
|
3506
|
+
fair: number;
|
|
3507
|
+
loaded: number;
|
|
3508
|
+
/** @description Weighted-average tier risk multiplier applied across spots in this currency (1.0 when no sub-spot). */
|
|
3509
|
+
tierMultiplierWeightedAvg: number;
|
|
3510
|
+
};
|
|
3511
|
+
CHF?: {
|
|
3512
|
+
fair: number;
|
|
3513
|
+
loaded: number;
|
|
3514
|
+
/** @description Weighted-average tier risk multiplier applied across spots in this currency (1.0 when no sub-spot). */
|
|
3515
|
+
tierMultiplierWeightedAvg: number;
|
|
3516
|
+
};
|
|
3517
|
+
};
|
|
3518
|
+
loadingFactor: number;
|
|
3519
|
+
};
|
|
3520
|
+
modelConfidence: number;
|
|
3521
|
+
/** @enum {string} */
|
|
3522
|
+
advisoryLevel: "high_confidence" | "moderate_confidence" | "low_confidence";
|
|
3523
|
+
issuable: boolean;
|
|
3524
|
+
notes: string[];
|
|
3525
|
+
/** @description HistoricalScoreDistribution — object for single spot, array for portfolio. */
|
|
3526
|
+
underlying: {
|
|
3527
|
+
[key: string]: unknown;
|
|
3528
|
+
} | {
|
|
3529
|
+
[key: string]: unknown;
|
|
3530
|
+
}[];
|
|
3531
|
+
/**
|
|
3532
|
+
* Format: uuid
|
|
3533
|
+
* @description Present when the policy store is wired — pass to /v1/underwriting/policy/bind to bind this quote.
|
|
3534
|
+
*/
|
|
3535
|
+
quoteId?: string;
|
|
3536
|
+
/**
|
|
3537
|
+
* Format: date-time
|
|
3538
|
+
* @description ISO timestamp after which the quote can no longer be bound.
|
|
3539
|
+
*/
|
|
3540
|
+
expiresAt?: string;
|
|
3541
|
+
/**
|
|
3542
|
+
* Format: uuid
|
|
3543
|
+
* @description Present on GET after the quote has been bound — the resulting policy id.
|
|
3544
|
+
*/
|
|
3545
|
+
boundPolicyId?: string;
|
|
3546
|
+
} & {
|
|
3547
|
+
[key: string]: unknown;
|
|
3548
|
+
};
|
|
3549
|
+
/** @enum {string} */
|
|
3550
|
+
WebhookEvent: "outcome.created" | "drift.fired" | "drift.resolved" | "calibration.completed" | "billing.subscription_updated" | "recommendation.completed" | "underwriting.policy.bound" | "underwriting.policy.triggered" | "underwriting.policy.settled";
|
|
2087
3551
|
};
|
|
2088
3552
|
responses: never;
|
|
2089
3553
|
parameters: never;
|