@model-match/api 3.6.0 → 3.6.1

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/openapi.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.1.0",
3
3
  "info": {
4
4
  "title": "ModelMatch API",
5
- "version": "3.6.0",
5
+ "version": "3.7.0",
6
6
  "description": "ModelMatch API — mortgage and real-estate market data"
7
7
  },
8
8
  "tags": [
@@ -50,6 +50,10 @@
50
50
  "name": "Properties",
51
51
  "description": "Properties with owners and history"
52
52
  },
53
+ {
54
+ "name": "Realtime",
55
+ "description": "Realtime/notifications connection config"
56
+ },
53
57
  {
54
58
  "name": "Sales",
55
59
  "description": "Real-estate sales transactions"
@@ -320,6 +324,9 @@
320
324
  "enabled": {
321
325
  "$ref": "#/components/schemas/AlertEnabled"
322
326
  },
327
+ "emailEnabled": {
328
+ "$ref": "#/components/schemas/AlertEnabled"
329
+ },
323
330
  "conditions": {
324
331
  "$ref": "#/components/schemas/AlertConditions"
325
332
  },
@@ -334,6 +341,7 @@
334
341
  "email",
335
342
  "name",
336
343
  "enabled",
344
+ "emailEnabled",
337
345
  "conditions",
338
346
  "updatedAt"
339
347
  ]
@@ -415,6 +423,29 @@
415
423
  }
416
424
  }
417
425
  },
426
+ "emailEnabled": {
427
+ "type": "object",
428
+ "properties": {
429
+ "area_new_listing": {
430
+ "type": "boolean"
431
+ },
432
+ "watched_agent_pending": {
433
+ "type": "boolean"
434
+ },
435
+ "borrower_listed": {
436
+ "type": "boolean"
437
+ },
438
+ "epo_risk": {
439
+ "type": "boolean"
440
+ },
441
+ "agent_sale_closed": {
442
+ "type": "boolean"
443
+ },
444
+ "rate_term_refi_area": {
445
+ "type": "boolean"
446
+ }
447
+ }
448
+ },
418
449
  "conditions": {
419
450
  "$ref": "#/components/schemas/AlertConditions"
420
451
  },
@@ -429,9 +460,13 @@
429
460
  },
430
461
  "orgId": {
431
462
  "type": "string",
432
- "description": "Workspace id stamped on the config (admin supplies it)."
463
+ "minLength": 1,
464
+ "description": "Workspace id stamped on the config (admin supplies it). Required — alerts are org-scoped, so a config can't exist without a workspace."
433
465
  }
434
- }
466
+ },
467
+ "required": [
468
+ "orgId"
469
+ ]
435
470
  },
436
471
  "WatchedAgentsResponse": {
437
472
  "type": "object",
@@ -533,7 +568,9 @@
533
568
  "enum": [
534
569
  "city",
535
570
  "county",
536
- "zip"
571
+ "zip",
572
+ "bbox",
573
+ "radius"
537
574
  ]
538
575
  },
539
576
  "value": {
@@ -541,10 +578,38 @@
541
578
  },
542
579
  "state": {
543
580
  "type": "string",
544
- "description": "2-letter state ('' for zip)."
581
+ "description": "2-letter state ('' for zip + geo areas)."
545
582
  },
546
583
  "addedAt": {
547
584
  "type": "string"
585
+ },
586
+ "minLat": {
587
+ "type": "number",
588
+ "description": "Box south edge."
589
+ },
590
+ "minLon": {
591
+ "type": "number",
592
+ "description": "Box west edge."
593
+ },
594
+ "maxLat": {
595
+ "type": "number",
596
+ "description": "Box north edge."
597
+ },
598
+ "maxLon": {
599
+ "type": "number",
600
+ "description": "Box east edge."
601
+ },
602
+ "lat": {
603
+ "type": "number",
604
+ "description": "Radius center latitude."
605
+ },
606
+ "lon": {
607
+ "type": "number",
608
+ "description": "Radius center longitude."
609
+ },
610
+ "radiusMeters": {
611
+ "type": "number",
612
+ "description": "Radius in meters (canonical unit)."
548
613
  }
549
614
  },
550
615
  "required": [
@@ -563,24 +628,78 @@
563
628
  "enum": [
564
629
  "city",
565
630
  "county",
566
- "zip"
567
- ]
631
+ "zip",
632
+ "bbox",
633
+ "radius"
634
+ ],
635
+ "description": "Named area (city/county/zip) or geo area (bbox = bounding box, radius = point + radius)."
568
636
  },
569
637
  "value": {
570
638
  "type": "string",
571
- "minLength": 1,
572
- "description": "City / county name, or 5-digit zip.",
639
+ "description": "City / county name, or 5-digit zip. Required for named areas.",
573
640
  "example": "Los Angeles"
574
641
  },
575
642
  "state": {
576
643
  "type": "string",
577
- "description": "2-letter state. Ignored for zip.",
644
+ "description": "2-letter state. Ignored for zip + geo areas.",
578
645
  "example": "CA"
646
+ },
647
+ "minLat": {
648
+ "type": "number",
649
+ "minimum": -90,
650
+ "maximum": 90,
651
+ "description": "Box south edge."
652
+ },
653
+ "minLon": {
654
+ "type": "number",
655
+ "minimum": -180,
656
+ "maximum": 180,
657
+ "description": "Box west edge."
658
+ },
659
+ "maxLat": {
660
+ "type": "number",
661
+ "minimum": -90,
662
+ "maximum": 90,
663
+ "description": "Box north edge."
664
+ },
665
+ "maxLon": {
666
+ "type": "number",
667
+ "minimum": -180,
668
+ "maximum": 180,
669
+ "description": "Box east edge."
670
+ },
671
+ "lat": {
672
+ "type": "number",
673
+ "minimum": -90,
674
+ "maximum": 90,
675
+ "description": "Center latitude (point + radius)."
676
+ },
677
+ "lon": {
678
+ "type": "number",
679
+ "minimum": -180,
680
+ "maximum": 180,
681
+ "description": "Center longitude."
682
+ },
683
+ "radius": {
684
+ "type": "number",
685
+ "minimum": 0,
686
+ "exclusiveMinimum": true,
687
+ "description": "Radius around the center point.",
688
+ "example": 10
689
+ },
690
+ "unit": {
691
+ "type": "string",
692
+ "enum": [
693
+ "mi",
694
+ "km",
695
+ "m"
696
+ ],
697
+ "description": "Radius unit (default mi).",
698
+ "example": "mi"
579
699
  }
580
700
  },
581
701
  "required": [
582
- "type",
583
- "value"
702
+ "type"
584
703
  ]
585
704
  },
586
705
  "AdminAlertLogResponse": {
@@ -742,6 +861,97 @@
742
861
  "payload"
743
862
  ]
744
863
  },
864
+ "AdminAlertDigestResponse": {
865
+ "type": "object",
866
+ "properties": {
867
+ "items": {
868
+ "type": "array",
869
+ "items": {
870
+ "$ref": "#/components/schemas/AdminAlertDigestItem"
871
+ }
872
+ },
873
+ "cursor": {
874
+ "type": "string"
875
+ }
876
+ },
877
+ "required": [
878
+ "items"
879
+ ]
880
+ },
881
+ "AdminAlertDigestItem": {
882
+ "allOf": [
883
+ {
884
+ "$ref": "#/components/schemas/AlertDigestItem"
885
+ },
886
+ {
887
+ "type": "object",
888
+ "properties": {
889
+ "userId": {
890
+ "type": "string"
891
+ },
892
+ "correlationId": {
893
+ "type": "string",
894
+ "description": "The detector run that produced this digest (trace to /runs)."
895
+ }
896
+ },
897
+ "required": [
898
+ "userId"
899
+ ]
900
+ }
901
+ ]
902
+ },
903
+ "AlertDigestItem": {
904
+ "type": "object",
905
+ "properties": {
906
+ "id": {
907
+ "type": "string",
908
+ "description": "Opaque digest id for mark-read."
909
+ },
910
+ "type": {
911
+ "type": "string",
912
+ "enum": [
913
+ "area_new_listing",
914
+ "watched_agent_pending",
915
+ "borrower_listed",
916
+ "epo_risk",
917
+ "agent_sale_closed",
918
+ "rate_term_refi_area"
919
+ ]
920
+ },
921
+ "count": {
922
+ "type": "integer",
923
+ "description": "Total alerts rolled into this digest."
924
+ },
925
+ "ids": {
926
+ "type": "array",
927
+ "items": {
928
+ "type": "string"
929
+ },
930
+ "description": "The individual alert ids — resolve full detail via the feed."
931
+ },
932
+ "preview": {
933
+ "type": "array",
934
+ "items": {
935
+ "type": "string"
936
+ },
937
+ "description": "First few human-formatted preview lines."
938
+ },
939
+ "triggeredAt": {
940
+ "type": "string"
941
+ },
942
+ "readAt": {
943
+ "type": "string"
944
+ }
945
+ },
946
+ "required": [
947
+ "id",
948
+ "type",
949
+ "count",
950
+ "ids",
951
+ "preview",
952
+ "triggeredAt"
953
+ ]
954
+ },
745
955
  "UnreadCountResponse": {
746
956
  "type": "object",
747
957
  "properties": {
@@ -761,6 +971,158 @@
761
971
  "data"
762
972
  ]
763
973
  },
974
+ "RunUserDetectorResponse": {
975
+ "type": "object",
976
+ "properties": {
977
+ "data": {
978
+ "type": "object",
979
+ "properties": {
980
+ "correlationId": {
981
+ "type": "string"
982
+ },
983
+ "dryRun": {
984
+ "type": "boolean"
985
+ },
986
+ "perDetector": {
987
+ "type": "array",
988
+ "items": {
989
+ "type": "object",
990
+ "properties": {
991
+ "type": {
992
+ "type": "string",
993
+ "enum": [
994
+ "area_new_listing",
995
+ "watched_agent_pending",
996
+ "borrower_listed",
997
+ "epo_risk",
998
+ "agent_sale_closed",
999
+ "rate_term_refi_area"
1000
+ ]
1001
+ },
1002
+ "scanned": {
1003
+ "type": "integer"
1004
+ },
1005
+ "matched": {
1006
+ "type": "integer"
1007
+ },
1008
+ "deduped": {
1009
+ "type": "integer"
1010
+ },
1011
+ "written": {
1012
+ "type": "integer"
1013
+ },
1014
+ "published": {
1015
+ "type": "integer"
1016
+ },
1017
+ "decisions": {
1018
+ "type": "array",
1019
+ "items": {
1020
+ "$ref": "#/components/schemas/AlertDecision"
1021
+ },
1022
+ "description": "The alerts that fired for this detector (dry-run only)."
1023
+ }
1024
+ },
1025
+ "required": [
1026
+ "type",
1027
+ "scanned",
1028
+ "matched",
1029
+ "deduped",
1030
+ "written",
1031
+ "published"
1032
+ ]
1033
+ }
1034
+ }
1035
+ },
1036
+ "required": [
1037
+ "correlationId",
1038
+ "dryRun",
1039
+ "perDetector"
1040
+ ]
1041
+ }
1042
+ },
1043
+ "required": [
1044
+ "data"
1045
+ ]
1046
+ },
1047
+ "AlertDecision": {
1048
+ "type": "object",
1049
+ "properties": {
1050
+ "userId": {
1051
+ "type": "string"
1052
+ },
1053
+ "type": {
1054
+ "type": "string",
1055
+ "enum": [
1056
+ "area_new_listing",
1057
+ "watched_agent_pending",
1058
+ "borrower_listed",
1059
+ "epo_risk",
1060
+ "agent_sale_closed",
1061
+ "rate_term_refi_area"
1062
+ ]
1063
+ },
1064
+ "dedupeKey": {
1065
+ "type": "string"
1066
+ },
1067
+ "payload": {
1068
+ "type": "object",
1069
+ "properties": {
1070
+ "description": {
1071
+ "type": "string"
1072
+ },
1073
+ "url": {
1074
+ "type": "string"
1075
+ }
1076
+ },
1077
+ "required": [
1078
+ "description"
1079
+ ],
1080
+ "additionalProperties": {
1081
+ "nullable": true
1082
+ }
1083
+ },
1084
+ "triggeredAt": {
1085
+ "type": "string"
1086
+ },
1087
+ "orgId": {
1088
+ "type": "string"
1089
+ },
1090
+ "correlationId": {
1091
+ "type": "string"
1092
+ }
1093
+ },
1094
+ "required": [
1095
+ "userId",
1096
+ "type",
1097
+ "dedupeKey",
1098
+ "payload",
1099
+ "triggeredAt"
1100
+ ]
1101
+ },
1102
+ "RunUserDetectorRequest": {
1103
+ "type": "object",
1104
+ "properties": {
1105
+ "dryRun": {
1106
+ "type": "boolean",
1107
+ "description": "Preview only (default true): compute what would fire without writing the feed, publishing events, or sending email. Set false to actually fire — persists a run record + delivers like the cron."
1108
+ },
1109
+ "detectors": {
1110
+ "type": "array",
1111
+ "items": {
1112
+ "type": "string",
1113
+ "enum": [
1114
+ "area_new_listing",
1115
+ "watched_agent_pending",
1116
+ "borrower_listed",
1117
+ "epo_risk",
1118
+ "agent_sale_closed",
1119
+ "rate_term_refi_area"
1120
+ ]
1121
+ },
1122
+ "description": "Limit to specific triggers; all six when omitted."
1123
+ }
1124
+ }
1125
+ },
764
1126
  "AdminAlertRunsResponse": {
765
1127
  "type": "object",
766
1128
  "properties": {
@@ -2468,12 +2830,16 @@
2468
2830
  "enabled": {
2469
2831
  "$ref": "#/components/schemas/AlertEnabled"
2470
2832
  },
2833
+ "emailEnabled": {
2834
+ "$ref": "#/components/schemas/AlertEnabled"
2835
+ },
2471
2836
  "conditions": {
2472
2837
  "$ref": "#/components/schemas/AlertConditions"
2473
2838
  }
2474
2839
  },
2475
2840
  "required": [
2476
2841
  "enabled",
2842
+ "emailEnabled",
2477
2843
  "conditions"
2478
2844
  ]
2479
2845
  }
@@ -2509,12 +2875,36 @@
2509
2875
  },
2510
2876
  "description": "Per-trigger on/off flags to change (others keep their value)."
2511
2877
  },
2878
+ "emailEnabled": {
2879
+ "type": "object",
2880
+ "properties": {
2881
+ "area_new_listing": {
2882
+ "type": "boolean"
2883
+ },
2884
+ "watched_agent_pending": {
2885
+ "type": "boolean"
2886
+ },
2887
+ "borrower_listed": {
2888
+ "type": "boolean"
2889
+ },
2890
+ "epo_risk": {
2891
+ "type": "boolean"
2892
+ },
2893
+ "agent_sale_closed": {
2894
+ "type": "boolean"
2895
+ },
2896
+ "rate_term_refi_area": {
2897
+ "type": "boolean"
2898
+ }
2899
+ },
2900
+ "description": "Per-trigger email opt-ins to change (others keep their value). Off by default — turn one on to also receive an email when it fires."
2901
+ },
2512
2902
  "conditions": {
2513
2903
  "$ref": "#/components/schemas/AlertConditions"
2514
2904
  },
2515
2905
  "nmlsId": {
2516
2906
  "type": "string",
2517
- "description": "The loan officer's NMLS id — required for alerts to run."
2907
+ "description": "The loan officer's NMLS id. Required to enable the borrower-centric triggers (borrower_listed, epo_risk); the agent + area triggers work without it."
2518
2908
  },
2519
2909
  "email": {
2520
2910
  "type": "string",
@@ -2543,6 +2933,23 @@
2543
2933
  "data"
2544
2934
  ]
2545
2935
  },
2936
+ "AlertDigestResponse": {
2937
+ "type": "object",
2938
+ "properties": {
2939
+ "data": {
2940
+ "type": "array",
2941
+ "items": {
2942
+ "$ref": "#/components/schemas/AlertDigestItem"
2943
+ }
2944
+ },
2945
+ "cursor": {
2946
+ "type": "string"
2947
+ }
2948
+ },
2949
+ "required": [
2950
+ "data"
2951
+ ]
2952
+ },
2546
2953
  "BranchListResponse": {
2547
2954
  "type": "object",
2548
2955
  "properties": {
@@ -7092,6 +7499,49 @@
7092
7499
  "zip"
7093
7500
  ]
7094
7501
  },
7502
+ "RealtimeConfigResponse": {
7503
+ "type": "object",
7504
+ "properties": {
7505
+ "endpoint": {
7506
+ "type": "string",
7507
+ "description": "IoT realtime endpoint host"
7508
+ },
7509
+ "authorizerName": {
7510
+ "type": "string",
7511
+ "description": "IoT custom authorizer name used to build the WSS URL"
7512
+ },
7513
+ "app": {
7514
+ "type": "string",
7515
+ "description": "Topic app segment (e.g. `mm`)"
7516
+ },
7517
+ "stage": {
7518
+ "type": "string",
7519
+ "description": "Deployed stage segment (e.g. `prod`)"
7520
+ },
7521
+ "userId": {
7522
+ "type": "string",
7523
+ "description": "The authenticated caller's user id (their MQTT topic key)"
7524
+ }
7525
+ },
7526
+ "required": [
7527
+ "endpoint",
7528
+ "authorizerName",
7529
+ "app",
7530
+ "stage",
7531
+ "userId"
7532
+ ]
7533
+ },
7534
+ "RealtimeConfigUnavailable": {
7535
+ "type": "object",
7536
+ "properties": {
7537
+ "error": {
7538
+ "type": "string"
7539
+ }
7540
+ },
7541
+ "required": [
7542
+ "error"
7543
+ ]
7544
+ },
7095
7545
  "SaleListResponse": {
7096
7546
  "type": "object",
7097
7547
  "properties": {
@@ -7631,6 +8081,16 @@
7631
8081
  }
7632
8082
  }
7633
8083
  },
8084
+ "403": {
8085
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
8086
+ "content": {
8087
+ "application/json": {
8088
+ "schema": {
8089
+ "$ref": "#/components/schemas/ErrorResponse"
8090
+ }
8091
+ }
8092
+ }
8093
+ },
7634
8094
  "404": {
7635
8095
  "description": "Not found",
7636
8096
  "content": {
@@ -7770,6 +8230,16 @@
7770
8230
  }
7771
8231
  }
7772
8232
  },
8233
+ "403": {
8234
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
8235
+ "content": {
8236
+ "application/json": {
8237
+ "schema": {
8238
+ "$ref": "#/components/schemas/ErrorResponse"
8239
+ }
8240
+ }
8241
+ }
8242
+ },
7773
8243
  "404": {
7774
8244
  "description": "Not found",
7775
8245
  "content": {
@@ -7840,6 +8310,16 @@
7840
8310
  }
7841
8311
  }
7842
8312
  },
8313
+ "403": {
8314
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
8315
+ "content": {
8316
+ "application/json": {
8317
+ "schema": {
8318
+ "$ref": "#/components/schemas/ErrorResponse"
8319
+ }
8320
+ }
8321
+ }
8322
+ },
7843
8323
  "404": {
7844
8324
  "description": "Not found",
7845
8325
  "content": {
@@ -7910,6 +8390,16 @@
7910
8390
  }
7911
8391
  }
7912
8392
  },
8393
+ "403": {
8394
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
8395
+ "content": {
8396
+ "application/json": {
8397
+ "schema": {
8398
+ "$ref": "#/components/schemas/ErrorResponse"
8399
+ }
8400
+ }
8401
+ }
8402
+ },
7913
8403
  "404": {
7914
8404
  "description": "Not found",
7915
8405
  "content": {
@@ -7992,6 +8482,16 @@
7992
8482
  }
7993
8483
  }
7994
8484
  },
8485
+ "403": {
8486
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
8487
+ "content": {
8488
+ "application/json": {
8489
+ "schema": {
8490
+ "$ref": "#/components/schemas/ErrorResponse"
8491
+ }
8492
+ }
8493
+ }
8494
+ },
7995
8495
  "404": {
7996
8496
  "description": "Not found",
7997
8497
  "content": {
@@ -8074,6 +8574,16 @@
8074
8574
  }
8075
8575
  }
8076
8576
  },
8577
+ "403": {
8578
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
8579
+ "content": {
8580
+ "application/json": {
8581
+ "schema": {
8582
+ "$ref": "#/components/schemas/ErrorResponse"
8583
+ }
8584
+ }
8585
+ }
8586
+ },
8077
8587
  "404": {
8078
8588
  "description": "Not found",
8079
8589
  "content": {
@@ -8156,6 +8666,16 @@
8156
8666
  }
8157
8667
  }
8158
8668
  },
8669
+ "403": {
8670
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
8671
+ "content": {
8672
+ "application/json": {
8673
+ "schema": {
8674
+ "$ref": "#/components/schemas/ErrorResponse"
8675
+ }
8676
+ }
8677
+ }
8678
+ },
8159
8679
  "404": {
8160
8680
  "description": "Not found",
8161
8681
  "content": {
@@ -8238,6 +8758,16 @@
8238
8758
  }
8239
8759
  }
8240
8760
  },
8761
+ "403": {
8762
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
8763
+ "content": {
8764
+ "application/json": {
8765
+ "schema": {
8766
+ "$ref": "#/components/schemas/ErrorResponse"
8767
+ }
8768
+ }
8769
+ }
8770
+ },
8241
8771
  "404": {
8242
8772
  "description": "Not found",
8243
8773
  "content": {
@@ -8320,6 +8850,16 @@
8320
8850
  }
8321
8851
  }
8322
8852
  },
8853
+ "403": {
8854
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
8855
+ "content": {
8856
+ "application/json": {
8857
+ "schema": {
8858
+ "$ref": "#/components/schemas/ErrorResponse"
8859
+ }
8860
+ }
8861
+ }
8862
+ },
8323
8863
  "404": {
8324
8864
  "description": "Not found",
8325
8865
  "content": {
@@ -8402,6 +8942,16 @@
8402
8942
  }
8403
8943
  }
8404
8944
  },
8945
+ "403": {
8946
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
8947
+ "content": {
8948
+ "application/json": {
8949
+ "schema": {
8950
+ "$ref": "#/components/schemas/ErrorResponse"
8951
+ }
8952
+ }
8953
+ }
8954
+ },
8405
8955
  "404": {
8406
8956
  "description": "Not found",
8407
8957
  "content": {
@@ -8484,6 +9034,16 @@
8484
9034
  }
8485
9035
  }
8486
9036
  },
9037
+ "403": {
9038
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
9039
+ "content": {
9040
+ "application/json": {
9041
+ "schema": {
9042
+ "$ref": "#/components/schemas/ErrorResponse"
9043
+ }
9044
+ }
9045
+ }
9046
+ },
8487
9047
  "404": {
8488
9048
  "description": "Not found",
8489
9049
  "content": {
@@ -8566,6 +9126,16 @@
8566
9126
  }
8567
9127
  }
8568
9128
  },
9129
+ "403": {
9130
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
9131
+ "content": {
9132
+ "application/json": {
9133
+ "schema": {
9134
+ "$ref": "#/components/schemas/ErrorResponse"
9135
+ }
9136
+ }
9137
+ }
9138
+ },
8569
9139
  "404": {
8570
9140
  "description": "Not found",
8571
9141
  "content": {
@@ -8648,6 +9218,16 @@
8648
9218
  }
8649
9219
  }
8650
9220
  },
9221
+ "403": {
9222
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
9223
+ "content": {
9224
+ "application/json": {
9225
+ "schema": {
9226
+ "$ref": "#/components/schemas/ErrorResponse"
9227
+ }
9228
+ }
9229
+ }
9230
+ },
8651
9231
  "404": {
8652
9232
  "description": "Not found",
8653
9233
  "content": {
@@ -8730,6 +9310,16 @@
8730
9310
  }
8731
9311
  }
8732
9312
  },
9313
+ "403": {
9314
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
9315
+ "content": {
9316
+ "application/json": {
9317
+ "schema": {
9318
+ "$ref": "#/components/schemas/ErrorResponse"
9319
+ }
9320
+ }
9321
+ }
9322
+ },
8733
9323
  "404": {
8734
9324
  "description": "Not found",
8735
9325
  "content": {
@@ -8955,6 +9545,16 @@
8955
9545
  }
8956
9546
  }
8957
9547
  },
9548
+ "403": {
9549
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
9550
+ "content": {
9551
+ "application/json": {
9552
+ "schema": {
9553
+ "$ref": "#/components/schemas/ErrorResponse"
9554
+ }
9555
+ }
9556
+ }
9557
+ },
8958
9558
  "404": {
8959
9559
  "description": "Not found",
8960
9560
  "content": {
@@ -9023,6 +9623,16 @@
9023
9623
  }
9024
9624
  }
9025
9625
  },
9626
+ "403": {
9627
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
9628
+ "content": {
9629
+ "application/json": {
9630
+ "schema": {
9631
+ "$ref": "#/components/schemas/ErrorResponse"
9632
+ }
9633
+ }
9634
+ }
9635
+ },
9026
9636
  "404": {
9027
9637
  "description": "Not found",
9028
9638
  "content": {
@@ -9084,6 +9694,16 @@
9084
9694
  }
9085
9695
  }
9086
9696
  },
9697
+ "403": {
9698
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
9699
+ "content": {
9700
+ "application/json": {
9701
+ "schema": {
9702
+ "$ref": "#/components/schemas/ErrorResponse"
9703
+ }
9704
+ }
9705
+ }
9706
+ },
9087
9707
  "404": {
9088
9708
  "description": "Not found",
9089
9709
  "content": {
@@ -9152,6 +9772,16 @@
9152
9772
  }
9153
9773
  }
9154
9774
  },
9775
+ "403": {
9776
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
9777
+ "content": {
9778
+ "application/json": {
9779
+ "schema": {
9780
+ "$ref": "#/components/schemas/ErrorResponse"
9781
+ }
9782
+ }
9783
+ }
9784
+ },
9155
9785
  "404": {
9156
9786
  "description": "Not found",
9157
9787
  "content": {
@@ -9225,6 +9855,16 @@
9225
9855
  }
9226
9856
  }
9227
9857
  },
9858
+ "403": {
9859
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
9860
+ "content": {
9861
+ "application/json": {
9862
+ "schema": {
9863
+ "$ref": "#/components/schemas/ErrorResponse"
9864
+ }
9865
+ }
9866
+ }
9867
+ },
9228
9868
  "404": {
9229
9869
  "description": "Not found",
9230
9870
  "content": {
@@ -9286,6 +9926,16 @@
9286
9926
  }
9287
9927
  }
9288
9928
  },
9929
+ "403": {
9930
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
9931
+ "content": {
9932
+ "application/json": {
9933
+ "schema": {
9934
+ "$ref": "#/components/schemas/ErrorResponse"
9935
+ }
9936
+ }
9937
+ }
9938
+ },
9289
9939
  "404": {
9290
9940
  "description": "Not found",
9291
9941
  "content": {
@@ -9354,6 +10004,16 @@
9354
10004
  }
9355
10005
  }
9356
10006
  },
10007
+ "403": {
10008
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
10009
+ "content": {
10010
+ "application/json": {
10011
+ "schema": {
10012
+ "$ref": "#/components/schemas/ErrorResponse"
10013
+ }
10014
+ }
10015
+ }
10016
+ },
9357
10017
  "404": {
9358
10018
  "description": "Not found",
9359
10019
  "content": {
@@ -9427,6 +10087,16 @@
9427
10087
  }
9428
10088
  }
9429
10089
  },
10090
+ "403": {
10091
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
10092
+ "content": {
10093
+ "application/json": {
10094
+ "schema": {
10095
+ "$ref": "#/components/schemas/ErrorResponse"
10096
+ }
10097
+ }
10098
+ }
10099
+ },
9430
10100
  "404": {
9431
10101
  "description": "Not found",
9432
10102
  "content": {
@@ -9512,6 +10182,16 @@
9512
10182
  }
9513
10183
  }
9514
10184
  },
10185
+ "403": {
10186
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
10187
+ "content": {
10188
+ "application/json": {
10189
+ "schema": {
10190
+ "$ref": "#/components/schemas/ErrorResponse"
10191
+ }
10192
+ }
10193
+ }
10194
+ },
9515
10195
  "404": {
9516
10196
  "description": "Not found",
9517
10197
  "content": {
@@ -9573,6 +10253,16 @@
9573
10253
  }
9574
10254
  }
9575
10255
  },
10256
+ "403": {
10257
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
10258
+ "content": {
10259
+ "application/json": {
10260
+ "schema": {
10261
+ "$ref": "#/components/schemas/ErrorResponse"
10262
+ }
10263
+ }
10264
+ }
10265
+ },
9576
10266
  "404": {
9577
10267
  "description": "Not found",
9578
10268
  "content": {
@@ -9646,6 +10336,16 @@
9646
10336
  }
9647
10337
  }
9648
10338
  },
10339
+ "403": {
10340
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
10341
+ "content": {
10342
+ "application/json": {
10343
+ "schema": {
10344
+ "$ref": "#/components/schemas/ErrorResponse"
10345
+ }
10346
+ }
10347
+ }
10348
+ },
9649
10349
  "404": {
9650
10350
  "description": "Not found",
9651
10351
  "content": {
@@ -9707,6 +10407,194 @@
9707
10407
  }
9708
10408
  }
9709
10409
  },
10410
+ "403": {
10411
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
10412
+ "content": {
10413
+ "application/json": {
10414
+ "schema": {
10415
+ "$ref": "#/components/schemas/ErrorResponse"
10416
+ }
10417
+ }
10418
+ }
10419
+ },
10420
+ "404": {
10421
+ "description": "Not found",
10422
+ "content": {
10423
+ "application/json": {
10424
+ "schema": {
10425
+ "$ref": "#/components/schemas/ErrorResponse"
10426
+ }
10427
+ }
10428
+ }
10429
+ },
10430
+ "413": {
10431
+ "description": "Response payload too large — detail endpoint capped to fit Lambda response limits",
10432
+ "content": {
10433
+ "application/json": {
10434
+ "schema": {
10435
+ "$ref": "#/components/schemas/PayloadTooLarge"
10436
+ }
10437
+ }
10438
+ }
10439
+ }
10440
+ }
10441
+ }
10442
+ },
10443
+ "/v1/alerts/digests": {
10444
+ "get": {
10445
+ "operationId": "listAlertDigests",
10446
+ "tags": [
10447
+ "Alerts"
10448
+ ],
10449
+ "summary": "List your alert digests (newest first)",
10450
+ "parameters": [
10451
+ {
10452
+ "schema": {
10453
+ "type": "integer",
10454
+ "minimum": 1,
10455
+ "maximum": 100,
10456
+ "description": "Max items to return (default 25)."
10457
+ },
10458
+ "required": false,
10459
+ "description": "Max items to return (default 25).",
10460
+ "name": "limit",
10461
+ "in": "query"
10462
+ },
10463
+ {
10464
+ "schema": {
10465
+ "type": "string",
10466
+ "description": "Pagination cursor from a previous response."
10467
+ },
10468
+ "required": false,
10469
+ "description": "Pagination cursor from a previous response.",
10470
+ "name": "cursor",
10471
+ "in": "query"
10472
+ }
10473
+ ],
10474
+ "responses": {
10475
+ "200": {
10476
+ "description": "Paginated digest feed",
10477
+ "content": {
10478
+ "application/json": {
10479
+ "schema": {
10480
+ "$ref": "#/components/schemas/AlertDigestResponse"
10481
+ }
10482
+ }
10483
+ }
10484
+ },
10485
+ "400": {
10486
+ "description": "Validation error",
10487
+ "content": {
10488
+ "application/json": {
10489
+ "schema": {
10490
+ "$ref": "#/components/schemas/ErrorResponse"
10491
+ }
10492
+ }
10493
+ }
10494
+ },
10495
+ "401": {
10496
+ "description": "Unauthorized",
10497
+ "content": {
10498
+ "application/json": {
10499
+ "schema": {
10500
+ "$ref": "#/components/schemas/ErrorResponse"
10501
+ }
10502
+ }
10503
+ }
10504
+ },
10505
+ "403": {
10506
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
10507
+ "content": {
10508
+ "application/json": {
10509
+ "schema": {
10510
+ "$ref": "#/components/schemas/ErrorResponse"
10511
+ }
10512
+ }
10513
+ }
10514
+ },
10515
+ "404": {
10516
+ "description": "Not found",
10517
+ "content": {
10518
+ "application/json": {
10519
+ "schema": {
10520
+ "$ref": "#/components/schemas/ErrorResponse"
10521
+ }
10522
+ }
10523
+ }
10524
+ },
10525
+ "413": {
10526
+ "description": "Response payload too large — detail endpoint capped to fit Lambda response limits",
10527
+ "content": {
10528
+ "application/json": {
10529
+ "schema": {
10530
+ "$ref": "#/components/schemas/PayloadTooLarge"
10531
+ }
10532
+ }
10533
+ }
10534
+ }
10535
+ }
10536
+ }
10537
+ },
10538
+ "/v1/alerts/digests/{id}/read": {
10539
+ "post": {
10540
+ "operationId": "markAlertDigestRead",
10541
+ "tags": [
10542
+ "Alerts"
10543
+ ],
10544
+ "summary": "Mark one digest read",
10545
+ "parameters": [
10546
+ {
10547
+ "schema": {
10548
+ "type": "string",
10549
+ "description": "Digest id (from the feed)."
10550
+ },
10551
+ "required": true,
10552
+ "description": "Digest id (from the feed).",
10553
+ "name": "id",
10554
+ "in": "path"
10555
+ }
10556
+ ],
10557
+ "responses": {
10558
+ "200": {
10559
+ "description": "Marked read (idempotent)",
10560
+ "content": {
10561
+ "application/json": {
10562
+ "schema": {
10563
+ "$ref": "#/components/schemas/AlertsOkResponse"
10564
+ }
10565
+ }
10566
+ }
10567
+ },
10568
+ "400": {
10569
+ "description": "Validation error",
10570
+ "content": {
10571
+ "application/json": {
10572
+ "schema": {
10573
+ "$ref": "#/components/schemas/ErrorResponse"
10574
+ }
10575
+ }
10576
+ }
10577
+ },
10578
+ "401": {
10579
+ "description": "Unauthorized",
10580
+ "content": {
10581
+ "application/json": {
10582
+ "schema": {
10583
+ "$ref": "#/components/schemas/ErrorResponse"
10584
+ }
10585
+ }
10586
+ }
10587
+ },
10588
+ "403": {
10589
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
10590
+ "content": {
10591
+ "application/json": {
10592
+ "schema": {
10593
+ "$ref": "#/components/schemas/ErrorResponse"
10594
+ }
10595
+ }
10596
+ }
10597
+ },
9710
10598
  "404": {
9711
10599
  "description": "Not found",
9712
10600
  "content": {
@@ -9778,6 +10666,16 @@
9778
10666
  }
9779
10667
  }
9780
10668
  },
10669
+ "403": {
10670
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
10671
+ "content": {
10672
+ "application/json": {
10673
+ "schema": {
10674
+ "$ref": "#/components/schemas/ErrorResponse"
10675
+ }
10676
+ }
10677
+ }
10678
+ },
9781
10679
  "404": {
9782
10680
  "description": "Not found",
9783
10681
  "content": {
@@ -10046,8 +10944,18 @@
10046
10944
  }
10047
10945
  }
10048
10946
  },
10049
- "401": {
10050
- "description": "Unauthorized",
10947
+ "401": {
10948
+ "description": "Unauthorized",
10949
+ "content": {
10950
+ "application/json": {
10951
+ "schema": {
10952
+ "$ref": "#/components/schemas/ErrorResponse"
10953
+ }
10954
+ }
10955
+ }
10956
+ },
10957
+ "403": {
10958
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
10051
10959
  "content": {
10052
10960
  "application/json": {
10053
10961
  "schema": {
@@ -10195,6 +11103,16 @@
10195
11103
  }
10196
11104
  }
10197
11105
  },
11106
+ "403": {
11107
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
11108
+ "content": {
11109
+ "application/json": {
11110
+ "schema": {
11111
+ "$ref": "#/components/schemas/ErrorResponse"
11112
+ }
11113
+ }
11114
+ }
11115
+ },
10198
11116
  "404": {
10199
11117
  "description": "Not found",
10200
11118
  "content": {
@@ -10265,6 +11183,16 @@
10265
11183
  }
10266
11184
  }
10267
11185
  },
11186
+ "403": {
11187
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
11188
+ "content": {
11189
+ "application/json": {
11190
+ "schema": {
11191
+ "$ref": "#/components/schemas/ErrorResponse"
11192
+ }
11193
+ }
11194
+ }
11195
+ },
10268
11196
  "404": {
10269
11197
  "description": "Not found",
10270
11198
  "content": {
@@ -10335,6 +11263,16 @@
10335
11263
  }
10336
11264
  }
10337
11265
  },
11266
+ "403": {
11267
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
11268
+ "content": {
11269
+ "application/json": {
11270
+ "schema": {
11271
+ "$ref": "#/components/schemas/ErrorResponse"
11272
+ }
11273
+ }
11274
+ }
11275
+ },
10338
11276
  "404": {
10339
11277
  "description": "Not found",
10340
11278
  "content": {
@@ -10417,6 +11355,16 @@
10417
11355
  }
10418
11356
  }
10419
11357
  },
11358
+ "403": {
11359
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
11360
+ "content": {
11361
+ "application/json": {
11362
+ "schema": {
11363
+ "$ref": "#/components/schemas/ErrorResponse"
11364
+ }
11365
+ }
11366
+ }
11367
+ },
10420
11368
  "404": {
10421
11369
  "description": "Not found",
10422
11370
  "content": {
@@ -10499,6 +11447,16 @@
10499
11447
  }
10500
11448
  }
10501
11449
  },
11450
+ "403": {
11451
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
11452
+ "content": {
11453
+ "application/json": {
11454
+ "schema": {
11455
+ "$ref": "#/components/schemas/ErrorResponse"
11456
+ }
11457
+ }
11458
+ }
11459
+ },
10502
11460
  "404": {
10503
11461
  "description": "Not found",
10504
11462
  "content": {
@@ -10581,6 +11539,16 @@
10581
11539
  }
10582
11540
  }
10583
11541
  },
11542
+ "403": {
11543
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
11544
+ "content": {
11545
+ "application/json": {
11546
+ "schema": {
11547
+ "$ref": "#/components/schemas/ErrorResponse"
11548
+ }
11549
+ }
11550
+ }
11551
+ },
10584
11552
  "404": {
10585
11553
  "description": "Not found",
10586
11554
  "content": {
@@ -10663,6 +11631,16 @@
10663
11631
  }
10664
11632
  }
10665
11633
  },
11634
+ "403": {
11635
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
11636
+ "content": {
11637
+ "application/json": {
11638
+ "schema": {
11639
+ "$ref": "#/components/schemas/ErrorResponse"
11640
+ }
11641
+ }
11642
+ }
11643
+ },
10666
11644
  "404": {
10667
11645
  "description": "Not found",
10668
11646
  "content": {
@@ -10745,6 +11723,16 @@
10745
11723
  }
10746
11724
  }
10747
11725
  },
11726
+ "403": {
11727
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
11728
+ "content": {
11729
+ "application/json": {
11730
+ "schema": {
11731
+ "$ref": "#/components/schemas/ErrorResponse"
11732
+ }
11733
+ }
11734
+ }
11735
+ },
10748
11736
  "404": {
10749
11737
  "description": "Not found",
10750
11738
  "content": {
@@ -10827,6 +11815,16 @@
10827
11815
  }
10828
11816
  }
10829
11817
  },
11818
+ "403": {
11819
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
11820
+ "content": {
11821
+ "application/json": {
11822
+ "schema": {
11823
+ "$ref": "#/components/schemas/ErrorResponse"
11824
+ }
11825
+ }
11826
+ }
11827
+ },
10830
11828
  "404": {
10831
11829
  "description": "Not found",
10832
11830
  "content": {
@@ -10909,6 +11907,16 @@
10909
11907
  }
10910
11908
  }
10911
11909
  },
11910
+ "403": {
11911
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
11912
+ "content": {
11913
+ "application/json": {
11914
+ "schema": {
11915
+ "$ref": "#/components/schemas/ErrorResponse"
11916
+ }
11917
+ }
11918
+ }
11919
+ },
10912
11920
  "404": {
10913
11921
  "description": "Not found",
10914
11922
  "content": {
@@ -10991,6 +11999,16 @@
10991
11999
  }
10992
12000
  }
10993
12001
  },
12002
+ "403": {
12003
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
12004
+ "content": {
12005
+ "application/json": {
12006
+ "schema": {
12007
+ "$ref": "#/components/schemas/ErrorResponse"
12008
+ }
12009
+ }
12010
+ }
12011
+ },
10994
12012
  "404": {
10995
12013
  "description": "Not found",
10996
12014
  "content": {
@@ -11073,6 +12091,16 @@
11073
12091
  }
11074
12092
  }
11075
12093
  },
12094
+ "403": {
12095
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
12096
+ "content": {
12097
+ "application/json": {
12098
+ "schema": {
12099
+ "$ref": "#/components/schemas/ErrorResponse"
12100
+ }
12101
+ }
12102
+ }
12103
+ },
11076
12104
  "404": {
11077
12105
  "description": "Not found",
11078
12106
  "content": {
@@ -11308,6 +12336,16 @@
11308
12336
  }
11309
12337
  }
11310
12338
  },
12339
+ "403": {
12340
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
12341
+ "content": {
12342
+ "application/json": {
12343
+ "schema": {
12344
+ "$ref": "#/components/schemas/ErrorResponse"
12345
+ }
12346
+ }
12347
+ }
12348
+ },
11311
12349
  "404": {
11312
12350
  "description": "Not found",
11313
12351
  "content": {
@@ -11380,6 +12418,16 @@
11380
12418
  }
11381
12419
  }
11382
12420
  },
12421
+ "403": {
12422
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
12423
+ "content": {
12424
+ "application/json": {
12425
+ "schema": {
12426
+ "$ref": "#/components/schemas/ErrorResponse"
12427
+ }
12428
+ }
12429
+ }
12430
+ },
11383
12431
  "404": {
11384
12432
  "description": "Not found",
11385
12433
  "content": {
@@ -11460,6 +12508,16 @@
11460
12508
  }
11461
12509
  }
11462
12510
  },
12511
+ "403": {
12512
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
12513
+ "content": {
12514
+ "application/json": {
12515
+ "schema": {
12516
+ "$ref": "#/components/schemas/ErrorResponse"
12517
+ }
12518
+ }
12519
+ }
12520
+ },
11463
12521
  "404": {
11464
12522
  "description": "Not found",
11465
12523
  "content": {
@@ -11583,6 +12641,16 @@
11583
12641
  }
11584
12642
  }
11585
12643
  },
12644
+ "403": {
12645
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
12646
+ "content": {
12647
+ "application/json": {
12648
+ "schema": {
12649
+ "$ref": "#/components/schemas/ErrorResponse"
12650
+ }
12651
+ }
12652
+ }
12653
+ },
11586
12654
  "404": {
11587
12655
  "description": "Not found",
11588
12656
  "content": {
@@ -11706,6 +12774,16 @@
11706
12774
  }
11707
12775
  }
11708
12776
  },
12777
+ "403": {
12778
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
12779
+ "content": {
12780
+ "application/json": {
12781
+ "schema": {
12782
+ "$ref": "#/components/schemas/ErrorResponse"
12783
+ }
12784
+ }
12785
+ }
12786
+ },
11709
12787
  "404": {
11710
12788
  "description": "Not found",
11711
12789
  "content": {
@@ -11776,6 +12854,16 @@
11776
12854
  }
11777
12855
  }
11778
12856
  },
12857
+ "403": {
12858
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
12859
+ "content": {
12860
+ "application/json": {
12861
+ "schema": {
12862
+ "$ref": "#/components/schemas/ErrorResponse"
12863
+ }
12864
+ }
12865
+ }
12866
+ },
11779
12867
  "404": {
11780
12868
  "description": "Not found",
11781
12869
  "content": {
@@ -11846,6 +12934,16 @@
11846
12934
  }
11847
12935
  }
11848
12936
  },
12937
+ "403": {
12938
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
12939
+ "content": {
12940
+ "application/json": {
12941
+ "schema": {
12942
+ "$ref": "#/components/schemas/ErrorResponse"
12943
+ }
12944
+ }
12945
+ }
12946
+ },
11849
12947
  "404": {
11850
12948
  "description": "Not found",
11851
12949
  "content": {
@@ -12098,6 +13196,16 @@
12098
13196
  }
12099
13197
  }
12100
13198
  },
13199
+ "403": {
13200
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
13201
+ "content": {
13202
+ "application/json": {
13203
+ "schema": {
13204
+ "$ref": "#/components/schemas/ErrorResponse"
13205
+ }
13206
+ }
13207
+ }
13208
+ },
12101
13209
  "404": {
12102
13210
  "description": "Not found",
12103
13211
  "content": {
@@ -12173,6 +13281,16 @@
12173
13281
  }
12174
13282
  }
12175
13283
  },
13284
+ "403": {
13285
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
13286
+ "content": {
13287
+ "application/json": {
13288
+ "schema": {
13289
+ "$ref": "#/components/schemas/ErrorResponse"
13290
+ }
13291
+ }
13292
+ }
13293
+ },
12176
13294
  "404": {
12177
13295
  "description": "Not found",
12178
13296
  "content": {
@@ -12244,6 +13362,16 @@
12244
13362
  }
12245
13363
  }
12246
13364
  },
13365
+ "403": {
13366
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
13367
+ "content": {
13368
+ "application/json": {
13369
+ "schema": {
13370
+ "$ref": "#/components/schemas/ErrorResponse"
13371
+ }
13372
+ }
13373
+ }
13374
+ },
12247
13375
  "404": {
12248
13376
  "description": "Not found",
12249
13377
  "content": {
@@ -12314,6 +13442,16 @@
12314
13442
  }
12315
13443
  }
12316
13444
  },
13445
+ "403": {
13446
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
13447
+ "content": {
13448
+ "application/json": {
13449
+ "schema": {
13450
+ "$ref": "#/components/schemas/ErrorResponse"
13451
+ }
13452
+ }
13453
+ }
13454
+ },
12317
13455
  "404": {
12318
13456
  "description": "Not found",
12319
13457
  "content": {
@@ -12384,6 +13522,16 @@
12384
13522
  }
12385
13523
  }
12386
13524
  },
13525
+ "403": {
13526
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
13527
+ "content": {
13528
+ "application/json": {
13529
+ "schema": {
13530
+ "$ref": "#/components/schemas/ErrorResponse"
13531
+ }
13532
+ }
13533
+ }
13534
+ },
12387
13535
  "404": {
12388
13536
  "description": "Not found",
12389
13537
  "content": {
@@ -12454,6 +13602,16 @@
12454
13602
  }
12455
13603
  }
12456
13604
  },
13605
+ "403": {
13606
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
13607
+ "content": {
13608
+ "application/json": {
13609
+ "schema": {
13610
+ "$ref": "#/components/schemas/ErrorResponse"
13611
+ }
13612
+ }
13613
+ }
13614
+ },
12457
13615
  "404": {
12458
13616
  "description": "Not found",
12459
13617
  "content": {
@@ -12524,6 +13682,16 @@
12524
13682
  }
12525
13683
  }
12526
13684
  },
13685
+ "403": {
13686
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
13687
+ "content": {
13688
+ "application/json": {
13689
+ "schema": {
13690
+ "$ref": "#/components/schemas/ErrorResponse"
13691
+ }
13692
+ }
13693
+ }
13694
+ },
12527
13695
  "404": {
12528
13696
  "description": "Not found",
12529
13697
  "content": {
@@ -12595,6 +13763,16 @@
12595
13763
  }
12596
13764
  }
12597
13765
  },
13766
+ "403": {
13767
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
13768
+ "content": {
13769
+ "application/json": {
13770
+ "schema": {
13771
+ "$ref": "#/components/schemas/ErrorResponse"
13772
+ }
13773
+ }
13774
+ }
13775
+ },
12598
13776
  "404": {
12599
13777
  "description": "Not found",
12600
13778
  "content": {
@@ -12698,8 +13876,18 @@
12698
13876
  }
12699
13877
  }
12700
13878
  },
12701
- "401": {
12702
- "description": "Unauthorized",
13879
+ "401": {
13880
+ "description": "Unauthorized",
13881
+ "content": {
13882
+ "application/json": {
13883
+ "schema": {
13884
+ "$ref": "#/components/schemas/ErrorResponse"
13885
+ }
13886
+ }
13887
+ }
13888
+ },
13889
+ "403": {
13890
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
12703
13891
  "content": {
12704
13892
  "application/json": {
12705
13893
  "schema": {
@@ -12847,6 +14035,16 @@
12847
14035
  }
12848
14036
  }
12849
14037
  },
14038
+ "403": {
14039
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
14040
+ "content": {
14041
+ "application/json": {
14042
+ "schema": {
14043
+ "$ref": "#/components/schemas/ErrorResponse"
14044
+ }
14045
+ }
14046
+ }
14047
+ },
12850
14048
  "404": {
12851
14049
  "description": "Not found",
12852
14050
  "content": {
@@ -12917,6 +14115,16 @@
12917
14115
  }
12918
14116
  }
12919
14117
  },
14118
+ "403": {
14119
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
14120
+ "content": {
14121
+ "application/json": {
14122
+ "schema": {
14123
+ "$ref": "#/components/schemas/ErrorResponse"
14124
+ }
14125
+ }
14126
+ }
14127
+ },
12920
14128
  "404": {
12921
14129
  "description": "Not found",
12922
14130
  "content": {
@@ -12987,6 +14195,16 @@
12987
14195
  }
12988
14196
  }
12989
14197
  },
14198
+ "403": {
14199
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
14200
+ "content": {
14201
+ "application/json": {
14202
+ "schema": {
14203
+ "$ref": "#/components/schemas/ErrorResponse"
14204
+ }
14205
+ }
14206
+ }
14207
+ },
12990
14208
  "404": {
12991
14209
  "description": "Not found",
12992
14210
  "content": {
@@ -13069,6 +14287,16 @@
13069
14287
  }
13070
14288
  }
13071
14289
  },
14290
+ "403": {
14291
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
14292
+ "content": {
14293
+ "application/json": {
14294
+ "schema": {
14295
+ "$ref": "#/components/schemas/ErrorResponse"
14296
+ }
14297
+ }
14298
+ }
14299
+ },
13072
14300
  "404": {
13073
14301
  "description": "Not found",
13074
14302
  "content": {
@@ -13151,6 +14379,16 @@
13151
14379
  }
13152
14380
  }
13153
14381
  },
14382
+ "403": {
14383
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
14384
+ "content": {
14385
+ "application/json": {
14386
+ "schema": {
14387
+ "$ref": "#/components/schemas/ErrorResponse"
14388
+ }
14389
+ }
14390
+ }
14391
+ },
13154
14392
  "404": {
13155
14393
  "description": "Not found",
13156
14394
  "content": {
@@ -13233,6 +14471,16 @@
13233
14471
  }
13234
14472
  }
13235
14473
  },
14474
+ "403": {
14475
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
14476
+ "content": {
14477
+ "application/json": {
14478
+ "schema": {
14479
+ "$ref": "#/components/schemas/ErrorResponse"
14480
+ }
14481
+ }
14482
+ }
14483
+ },
13236
14484
  "404": {
13237
14485
  "description": "Not found",
13238
14486
  "content": {
@@ -13315,6 +14563,16 @@
13315
14563
  }
13316
14564
  }
13317
14565
  },
14566
+ "403": {
14567
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
14568
+ "content": {
14569
+ "application/json": {
14570
+ "schema": {
14571
+ "$ref": "#/components/schemas/ErrorResponse"
14572
+ }
14573
+ }
14574
+ }
14575
+ },
13318
14576
  "404": {
13319
14577
  "description": "Not found",
13320
14578
  "content": {
@@ -13397,6 +14655,16 @@
13397
14655
  }
13398
14656
  }
13399
14657
  },
14658
+ "403": {
14659
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
14660
+ "content": {
14661
+ "application/json": {
14662
+ "schema": {
14663
+ "$ref": "#/components/schemas/ErrorResponse"
14664
+ }
14665
+ }
14666
+ }
14667
+ },
13400
14668
  "404": {
13401
14669
  "description": "Not found",
13402
14670
  "content": {
@@ -13479,6 +14747,16 @@
13479
14747
  }
13480
14748
  }
13481
14749
  },
14750
+ "403": {
14751
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
14752
+ "content": {
14753
+ "application/json": {
14754
+ "schema": {
14755
+ "$ref": "#/components/schemas/ErrorResponse"
14756
+ }
14757
+ }
14758
+ }
14759
+ },
13482
14760
  "404": {
13483
14761
  "description": "Not found",
13484
14762
  "content": {
@@ -13561,6 +14839,16 @@
13561
14839
  }
13562
14840
  }
13563
14841
  },
14842
+ "403": {
14843
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
14844
+ "content": {
14845
+ "application/json": {
14846
+ "schema": {
14847
+ "$ref": "#/components/schemas/ErrorResponse"
14848
+ }
14849
+ }
14850
+ }
14851
+ },
13564
14852
  "404": {
13565
14853
  "description": "Not found",
13566
14854
  "content": {
@@ -13643,6 +14931,16 @@
13643
14931
  }
13644
14932
  }
13645
14933
  },
14934
+ "403": {
14935
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
14936
+ "content": {
14937
+ "application/json": {
14938
+ "schema": {
14939
+ "$ref": "#/components/schemas/ErrorResponse"
14940
+ }
14941
+ }
14942
+ }
14943
+ },
13646
14944
  "404": {
13647
14945
  "description": "Not found",
13648
14946
  "content": {
@@ -13725,6 +15023,16 @@
13725
15023
  }
13726
15024
  }
13727
15025
  },
15026
+ "403": {
15027
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
15028
+ "content": {
15029
+ "application/json": {
15030
+ "schema": {
15031
+ "$ref": "#/components/schemas/ErrorResponse"
15032
+ }
15033
+ }
15034
+ }
15035
+ },
13728
15036
  "404": {
13729
15037
  "description": "Not found",
13730
15038
  "content": {
@@ -13807,6 +15115,16 @@
13807
15115
  }
13808
15116
  }
13809
15117
  },
15118
+ "403": {
15119
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
15120
+ "content": {
15121
+ "application/json": {
15122
+ "schema": {
15123
+ "$ref": "#/components/schemas/ErrorResponse"
15124
+ }
15125
+ }
15126
+ }
15127
+ },
13810
15128
  "404": {
13811
15129
  "description": "Not found",
13812
15130
  "content": {
@@ -14360,6 +15678,16 @@
14360
15678
  }
14361
15679
  }
14362
15680
  },
15681
+ "403": {
15682
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
15683
+ "content": {
15684
+ "application/json": {
15685
+ "schema": {
15686
+ "$ref": "#/components/schemas/ErrorResponse"
15687
+ }
15688
+ }
15689
+ }
15690
+ },
14363
15691
  "404": {
14364
15692
  "description": "Not found",
14365
15693
  "content": {
@@ -14483,6 +15811,16 @@
14483
15811
  }
14484
15812
  }
14485
15813
  },
15814
+ "403": {
15815
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
15816
+ "content": {
15817
+ "application/json": {
15818
+ "schema": {
15819
+ "$ref": "#/components/schemas/ErrorResponse"
15820
+ }
15821
+ }
15822
+ }
15823
+ },
14486
15824
  "404": {
14487
15825
  "description": "Not found",
14488
15826
  "content": {
@@ -14553,6 +15891,16 @@
14553
15891
  }
14554
15892
  }
14555
15893
  },
15894
+ "403": {
15895
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
15896
+ "content": {
15897
+ "application/json": {
15898
+ "schema": {
15899
+ "$ref": "#/components/schemas/ErrorResponse"
15900
+ }
15901
+ }
15902
+ }
15903
+ },
14556
15904
  "404": {
14557
15905
  "description": "Not found",
14558
15906
  "content": {
@@ -14740,6 +16088,88 @@
14740
16088
  }
14741
16089
  }
14742
16090
  },
16091
+ "/v1/realtime/config": {
16092
+ "get": {
16093
+ "operationId": "getRealtimeConfig",
16094
+ "tags": [
16095
+ "Realtime"
16096
+ ],
16097
+ "summary": "Get realtime connection config",
16098
+ "description": "Returns the realtime/notifications connection info (endpoint, authorizer, app, stage) merged with the caller's userId, so a trusted client can connect to its per-user IoT MQTT topic.",
16099
+ "responses": {
16100
+ "200": {
16101
+ "description": "Realtime connection config",
16102
+ "content": {
16103
+ "application/json": {
16104
+ "schema": {
16105
+ "$ref": "#/components/schemas/RealtimeConfigResponse"
16106
+ }
16107
+ }
16108
+ }
16109
+ },
16110
+ "400": {
16111
+ "description": "Validation error",
16112
+ "content": {
16113
+ "application/json": {
16114
+ "schema": {
16115
+ "$ref": "#/components/schemas/ErrorResponse"
16116
+ }
16117
+ }
16118
+ }
16119
+ },
16120
+ "401": {
16121
+ "description": "Unauthorized",
16122
+ "content": {
16123
+ "application/json": {
16124
+ "schema": {
16125
+ "$ref": "#/components/schemas/ErrorResponse"
16126
+ }
16127
+ }
16128
+ }
16129
+ },
16130
+ "403": {
16131
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
16132
+ "content": {
16133
+ "application/json": {
16134
+ "schema": {
16135
+ "$ref": "#/components/schemas/ErrorResponse"
16136
+ }
16137
+ }
16138
+ }
16139
+ },
16140
+ "404": {
16141
+ "description": "Not found",
16142
+ "content": {
16143
+ "application/json": {
16144
+ "schema": {
16145
+ "$ref": "#/components/schemas/ErrorResponse"
16146
+ }
16147
+ }
16148
+ }
16149
+ },
16150
+ "413": {
16151
+ "description": "Response payload too large — detail endpoint capped to fit Lambda response limits",
16152
+ "content": {
16153
+ "application/json": {
16154
+ "schema": {
16155
+ "$ref": "#/components/schemas/PayloadTooLarge"
16156
+ }
16157
+ }
16158
+ }
16159
+ },
16160
+ "503": {
16161
+ "description": "Realtime backend not configured",
16162
+ "content": {
16163
+ "application/json": {
16164
+ "schema": {
16165
+ "$ref": "#/components/schemas/RealtimeConfigUnavailable"
16166
+ }
16167
+ }
16168
+ }
16169
+ }
16170
+ }
16171
+ }
16172
+ },
14743
16173
  "/v1/sales": {
14744
16174
  "post": {
14745
16175
  "operationId": "listSales",
@@ -14787,6 +16217,16 @@
14787
16217
  }
14788
16218
  }
14789
16219
  },
16220
+ "403": {
16221
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
16222
+ "content": {
16223
+ "application/json": {
16224
+ "schema": {
16225
+ "$ref": "#/components/schemas/ErrorResponse"
16226
+ }
16227
+ }
16228
+ }
16229
+ },
14790
16230
  "404": {
14791
16231
  "description": "Not found",
14792
16232
  "content": {
@@ -14910,6 +16350,16 @@
14910
16350
  }
14911
16351
  }
14912
16352
  },
16353
+ "403": {
16354
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
16355
+ "content": {
16356
+ "application/json": {
16357
+ "schema": {
16358
+ "$ref": "#/components/schemas/ErrorResponse"
16359
+ }
16360
+ }
16361
+ }
16362
+ },
14913
16363
  "404": {
14914
16364
  "description": "Not found",
14915
16365
  "content": {
@@ -14980,6 +16430,16 @@
14980
16430
  }
14981
16431
  }
14982
16432
  },
16433
+ "403": {
16434
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
16435
+ "content": {
16436
+ "application/json": {
16437
+ "schema": {
16438
+ "$ref": "#/components/schemas/ErrorResponse"
16439
+ }
16440
+ }
16441
+ }
16442
+ },
14983
16443
  "404": {
14984
16444
  "description": "Not found",
14985
16445
  "content": {
@@ -15050,6 +16510,16 @@
15050
16510
  }
15051
16511
  }
15052
16512
  },
16513
+ "403": {
16514
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)",
16515
+ "content": {
16516
+ "application/json": {
16517
+ "schema": {
16518
+ "$ref": "#/components/schemas/ErrorResponse"
16519
+ }
16520
+ }
16521
+ }
16522
+ },
15053
16523
  "404": {
15054
16524
  "description": "Not found",
15055
16525
  "content": {