spaps 0.9.0 → 0.9.2

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/AI_TOOLS.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "spaps",
3
- "version": "0.7.5",
3
+ "version": "0.9.0",
4
4
  "description": "Auth + payments via SPAPS. Resolve local auth requirements from /health/local-mode.",
5
- "base_url": "http://localhost:3301",
5
+ "base_url": "http://localhost:65535",
6
6
  "auth": {
7
7
  "local_mode": false,
8
8
  "mode_source": "/health/local-mode",
@@ -22,7 +22,15 @@
22
22
  },
23
23
  "responses": {
24
24
  "200": {
25
- "$ref": "#/components/schemas/LoginResponse"
25
+ "anyOf": [
26
+ {
27
+ "$ref": "#/components/schemas/LoginResponse"
28
+ },
29
+ {
30
+ "$ref": "#/components/schemas/MfaRequiredResponse"
31
+ }
32
+ ],
33
+ "title": "Response Login Api Auth Login Post"
26
34
  },
27
35
  "400": {
28
36
  "type": "object",
@@ -233,22 +241,17 @@
233
241
  }
234
242
  },
235
243
  {
236
- "name": "get_current_user",
237
- "description": "Get the currently authenticated user. Uses the bearer token from a previous login.",
244
+ "name": "auth_methods",
245
+ "description": "Discover the public auth methods configured for this application before rendering sign-in UI.",
238
246
  "method": "GET",
239
- "path": "/api/auth/user",
247
+ "path": "/api/auth/methods",
240
248
  "parameters": {
241
249
  "type": "object",
242
- "properties": {
243
- "authorization": {
244
- "type": "string",
245
- "description": "Bearer <access_token>"
246
- }
247
- }
250
+ "properties": {}
248
251
  },
249
252
  "responses": {
250
253
  "200": {
251
- "$ref": "#/components/schemas/GetUserResponse"
254
+ "$ref": "#/components/schemas/AuthMethodsResponse"
252
255
  },
253
256
  "400": {
254
257
  "type": "object",
@@ -346,18 +349,22 @@
346
349
  }
347
350
  },
348
351
  {
349
- "name": "create_checkout_session",
350
- "description": "Create a Stripe Checkout session against the configured SPAPS server.",
351
- "method": "POST",
352
- "path": "/api/stripe/checkout-sessions",
352
+ "name": "get_current_user",
353
+ "description": "Get the currently authenticated user. Uses the bearer token from a previous login.",
354
+ "method": "GET",
355
+ "path": "/api/auth/user",
353
356
  "parameters": {
354
- "$ref": "#/components/schemas/CreateCheckoutSessionRequest"
357
+ "type": "object",
358
+ "properties": {
359
+ "authorization": {
360
+ "type": "string",
361
+ "description": "Bearer <access_token>"
362
+ }
363
+ }
355
364
  },
356
365
  "responses": {
357
366
  "200": {
358
- "type": "object",
359
- "additionalProperties": true,
360
- "title": "Response Create Checkout Session Api Stripe Checkout Sessions Post"
367
+ "$ref": "#/components/schemas/GetUserResponse"
361
368
  },
362
369
  "400": {
363
370
  "type": "object",
@@ -418,9 +425,6 @@
418
425
  "error"
419
426
  ]
420
427
  },
421
- "422": {
422
- "$ref": "#/components/schemas/HTTPValidationError"
423
- },
424
428
  "429": {
425
429
  "type": "object",
426
430
  "properties": {
@@ -458,26 +462,18 @@
458
462
  }
459
463
  },
460
464
  {
461
- "name": "list_products",
462
- "description": "List products exposed by the SPAPS server.",
463
- "method": "GET",
464
- "path": "/api/stripe/products",
465
+ "name": "create_checkout_session",
466
+ "description": "Create a Stripe Checkout session against the configured SPAPS server.",
467
+ "method": "POST",
468
+ "path": "/api/stripe/checkout-sessions",
465
469
  "parameters": {
466
- "type": "object",
467
- "properties": {
468
- "active": {
469
- "type": "boolean"
470
- },
471
- "limit": {
472
- "type": "number"
473
- }
474
- }
470
+ "$ref": "#/components/schemas/CreateCheckoutSessionRequest"
475
471
  },
476
472
  "responses": {
477
473
  "200": {
478
474
  "type": "object",
479
475
  "additionalProperties": true,
480
- "title": "Response List Products Api Stripe Products Get"
476
+ "title": "Response Create Checkout Session Api Stripe Checkout Sessions Post"
481
477
  },
482
478
  "400": {
483
479
  "type": "object",
@@ -578,16 +574,26 @@
578
574
  }
579
575
  },
580
576
  {
581
- "name": "request_magic_link",
582
- "description": "Send a magic link for passwordless login.",
583
- "method": "POST",
584
- "path": "/api/auth/magic-link",
577
+ "name": "list_products",
578
+ "description": "List products exposed by the SPAPS server.",
579
+ "method": "GET",
580
+ "path": "/api/stripe/products",
585
581
  "parameters": {
586
- "$ref": "#/components/schemas/MagicLinkRequest"
582
+ "type": "object",
583
+ "properties": {
584
+ "active": {
585
+ "type": "boolean"
586
+ },
587
+ "limit": {
588
+ "type": "number"
589
+ }
590
+ }
587
591
  },
588
592
  "responses": {
589
593
  "200": {
590
- "$ref": "#/components/schemas/MagicLinkResponse"
594
+ "type": "object",
595
+ "additionalProperties": true,
596
+ "title": "Response List Products Api Stripe Products Get"
591
597
  },
592
598
  "400": {
593
599
  "type": "object",
@@ -688,16 +694,16 @@
688
694
  }
689
695
  },
690
696
  {
691
- "name": "get_wallet_nonce",
692
- "description": "Get a nonce to sign for wallet authentication.",
697
+ "name": "request_magic_link",
698
+ "description": "Send a magic link for passwordless login.",
693
699
  "method": "POST",
694
- "path": "/api/auth/nonce",
700
+ "path": "/api/auth/magic-link",
695
701
  "parameters": {
696
- "$ref": "#/components/schemas/NonceRequest"
702
+ "$ref": "#/components/schemas/MagicLinkRequest"
697
703
  },
698
704
  "responses": {
699
705
  "200": {
700
- "$ref": "#/components/schemas/NonceResponse"
706
+ "$ref": "#/components/schemas/MagicLinkResponse"
701
707
  },
702
708
  "400": {
703
709
  "type": "object",
@@ -798,20 +804,16 @@
798
804
  }
799
805
  },
800
806
  {
801
- "name": "dayrate_availability",
802
- "description": "List bookable slots within the configured horizon with dynamic pricing.",
803
- "method": "GET",
804
- "path": "/api/dayrate/availability",
807
+ "name": "get_wallet_nonce",
808
+ "description": "Get a nonce to sign for wallet authentication.",
809
+ "method": "POST",
810
+ "path": "/api/auth/nonce",
805
811
  "parameters": {
806
- "type": "object",
807
- "properties": {}
812
+ "$ref": "#/components/schemas/NonceRequest"
808
813
  },
809
- "domain": "dayrate",
810
- "admin_required": false,
811
- "agent_callable": true,
812
814
  "responses": {
813
815
  "200": {
814
- "$ref": "#/components/schemas/AvailabilityResponse"
816
+ "$ref": "#/components/schemas/NonceResponse"
815
817
  },
816
818
  "400": {
817
819
  "type": "object",
@@ -872,6 +874,9 @@
872
874
  "error"
873
875
  ]
874
876
  },
877
+ "422": {
878
+ "$ref": "#/components/schemas/HTTPValidationError"
879
+ },
875
880
  "429": {
876
881
  "type": "object",
877
882
  "properties": {
@@ -909,18 +914,25 @@
909
914
  }
910
915
  },
911
916
  {
912
- "name": "dayrate_book",
913
- "description": "Book a single slot. Returns FreeBookResponse when an entitled user has remaining allotment, otherwise a Stripe Checkout URL.",
917
+ "name": "wallet_sign_in",
918
+ "description": "Exchange a signed wallet nonce for SPAPS tokens or an mfa_required challenge.",
914
919
  "method": "POST",
915
- "path": "/api/dayrate/book",
920
+ "path": "/api/auth/wallet-sign-in",
916
921
  "parameters": {
917
- "$ref": "#/components/schemas/BookRequest"
922
+ "$ref": "#/components/schemas/WalletSignInRequest"
918
923
  },
919
- "domain": "dayrate",
920
- "admin_required": false,
921
- "agent_callable": true,
922
924
  "responses": {
923
- "200": {},
925
+ "200": {
926
+ "anyOf": [
927
+ {
928
+ "$ref": "#/components/schemas/spaps_server_quickstart__domains__auth__schemas__WalletSignInResponse"
929
+ },
930
+ {
931
+ "$ref": "#/components/schemas/MfaRequiredResponse"
932
+ }
933
+ ],
934
+ "title": "Response Wallet Sign In Api Auth Wallet Sign In Post"
935
+ },
924
936
  "400": {
925
937
  "type": "object",
926
938
  "properties": {
@@ -1020,19 +1032,24 @@
1020
1032
  }
1021
1033
  },
1022
1034
  {
1023
- "name": "dayrate_book_multi",
1024
- "description": "Book multiple slots in one Stripe session with running fill-rate pricing.",
1035
+ "name": "verify_magic_link",
1036
+ "description": "Exchange a magic-link token for SPAPS tokens or an mfa_required challenge.",
1025
1037
  "method": "POST",
1026
- "path": "/api/dayrate/book-multi",
1038
+ "path": "/api/auth/verify-magic-link",
1027
1039
  "parameters": {
1028
- "$ref": "#/components/schemas/BookMultiRequest"
1040
+ "$ref": "#/components/schemas/VerifyMagicLinkRequest"
1029
1041
  },
1030
- "domain": "dayrate",
1031
- "admin_required": false,
1032
- "agent_callable": true,
1033
1042
  "responses": {
1034
1043
  "200": {
1035
- "$ref": "#/components/schemas/BookMultiResponse"
1044
+ "anyOf": [
1045
+ {
1046
+ "$ref": "#/components/schemas/VerifyMagicLinkResponse"
1047
+ },
1048
+ {
1049
+ "$ref": "#/components/schemas/MfaRequiredResponse"
1050
+ }
1051
+ ],
1052
+ "title": "Response Verify Magic Link Api Auth Verify Magic Link Post"
1036
1053
  },
1037
1054
  "400": {
1038
1055
  "type": "object",
@@ -1133,20 +1150,17 @@
1133
1150
  }
1134
1151
  },
1135
1152
  {
1136
- "name": "dayrate_checkout_status",
1137
- "description": "Poll a Stripe session to learn the resulting booking status.",
1138
- "method": "GET",
1139
- "path": "/api/dayrate/checkout-status",
1153
+ "name": "oidc_nonce",
1154
+ "description": "Create a nonce challenge before exchanging an OIDC provider ID token.",
1155
+ "method": "POST",
1156
+ "path": "/api/auth/oidc/nonce",
1140
1157
  "parameters": {
1141
1158
  "type": "object",
1142
1159
  "properties": {}
1143
1160
  },
1144
- "domain": "dayrate",
1145
- "admin_required": false,
1146
- "agent_callable": true,
1147
1161
  "responses": {
1148
1162
  "200": {
1149
- "$ref": "#/components/schemas/CheckoutStatusResponse"
1163
+ "$ref": "#/components/schemas/OidcNonceResponse"
1150
1164
  },
1151
1165
  "400": {
1152
1166
  "type": "object",
@@ -1207,9 +1221,6 @@
1207
1221
  "error"
1208
1222
  ]
1209
1223
  },
1210
- "422": {
1211
- "$ref": "#/components/schemas/HTTPValidationError"
1212
- },
1213
1224
  "429": {
1214
1225
  "type": "object",
1215
1226
  "properties": {
@@ -1247,19 +1258,24 @@
1247
1258
  }
1248
1259
  },
1249
1260
  {
1250
- "name": "dayrate_cancel",
1251
- "description": "Cancel an existing booking. Owner verified by user_id then email.",
1261
+ "name": "oidc_sign_in",
1262
+ "description": "Exchange an OIDC ID token and challenge_id for SPAPS tokens or an mfa_required challenge.",
1252
1263
  "method": "POST",
1253
- "path": "/api/dayrate/cancel",
1264
+ "path": "/api/auth/oidc/sign-in",
1254
1265
  "parameters": {
1255
- "$ref": "#/components/schemas/CancelRequest"
1266
+ "$ref": "#/components/schemas/OidcSignInRequest"
1256
1267
  },
1257
- "domain": "dayrate",
1258
- "admin_required": false,
1259
- "agent_callable": true,
1260
1268
  "responses": {
1261
1269
  "200": {
1262
- "$ref": "#/components/schemas/CancelResponse"
1270
+ "anyOf": [
1271
+ {
1272
+ "$ref": "#/components/schemas/OidcSignInResponse"
1273
+ },
1274
+ {
1275
+ "$ref": "#/components/schemas/MfaRequiredResponse"
1276
+ }
1277
+ ],
1278
+ "title": "Response Oidc Sign In Api Auth Oidc Sign In Post"
1263
1279
  },
1264
1280
  "400": {
1265
1281
  "type": "object",
@@ -1360,20 +1376,16 @@
1360
1376
  }
1361
1377
  },
1362
1378
  {
1363
- "name": "dayrate_allotment",
1364
- "description": "Inspect free allotment status for a policy in the rolling window.",
1365
- "method": "GET",
1366
- "path": "/api/dayrate/allotment",
1379
+ "name": "sms_request",
1380
+ "description": "Request an enumeration-safe SMS OTP challenge.",
1381
+ "method": "POST",
1382
+ "path": "/api/auth/sms/request",
1367
1383
  "parameters": {
1368
- "type": "object",
1369
- "properties": {}
1384
+ "$ref": "#/components/schemas/SmsOtpRequest"
1370
1385
  },
1371
- "domain": "dayrate",
1372
- "admin_required": false,
1373
- "agent_callable": true,
1374
1386
  "responses": {
1375
1387
  "200": {
1376
- "$ref": "#/components/schemas/AllotmentResponse"
1388
+ "$ref": "#/components/schemas/SmsOtpRequestResponse"
1377
1389
  },
1378
1390
  "400": {
1379
1391
  "type": "object",
@@ -1474,20 +1486,24 @@
1474
1486
  }
1475
1487
  },
1476
1488
  {
1477
- "name": "dayrate_admin_get_config",
1478
- "description": "Fetch dayrate pricing/availability config.",
1479
- "method": "GET",
1480
- "path": "/api/dayrate/admin/config",
1489
+ "name": "sms_verify",
1490
+ "description": "Verify an SMS OTP challenge for SPAPS tokens or an mfa_required challenge.",
1491
+ "method": "POST",
1492
+ "path": "/api/auth/sms/verify",
1481
1493
  "parameters": {
1482
- "type": "object",
1483
- "properties": {}
1494
+ "$ref": "#/components/schemas/SmsOtpVerifyRequest"
1484
1495
  },
1485
- "domain": "dayrate",
1486
- "admin_required": true,
1487
- "agent_callable": true,
1488
1496
  "responses": {
1489
1497
  "200": {
1490
- "$ref": "#/components/schemas/GetConfigResponse"
1498
+ "anyOf": [
1499
+ {
1500
+ "$ref": "#/components/schemas/SmsSignInResponse"
1501
+ },
1502
+ {
1503
+ "$ref": "#/components/schemas/MfaRequiredResponse"
1504
+ }
1505
+ ],
1506
+ "title": "Response Verify Sms Otp Api Auth Sms Verify Post"
1491
1507
  },
1492
1508
  "400": {
1493
1509
  "type": "object",
@@ -1548,6 +1564,9 @@
1548
1564
  "error"
1549
1565
  ]
1550
1566
  },
1567
+ "422": {
1568
+ "$ref": "#/components/schemas/HTTPValidationError"
1569
+ },
1551
1570
  "429": {
1552
1571
  "type": "object",
1553
1572
  "properties": {
@@ -1585,19 +1604,24 @@
1585
1604
  }
1586
1605
  },
1587
1606
  {
1588
- "name": "dayrate_admin_update_config",
1589
- "description": "Upsert dayrate config (rates, tiers, horizon, timezone, slot definitions).",
1590
- "method": "PUT",
1591
- "path": "/api/dayrate/admin/config",
1607
+ "name": "webauthn_assertion_options",
1608
+ "description": "Request WebAuthn assertion options before navigator.credentials.get().",
1609
+ "method": "POST",
1610
+ "path": "/api/auth/webauthn/assertion/options",
1592
1611
  "parameters": {
1593
- "$ref": "#/components/schemas/UpdateConfigRequest"
1612
+ "anyOf": [
1613
+ {
1614
+ "$ref": "#/components/schemas/WebAuthnAssertionOptionsRequest"
1615
+ },
1616
+ {
1617
+ "type": "null"
1618
+ }
1619
+ ],
1620
+ "title": "Body"
1594
1621
  },
1595
- "domain": "dayrate",
1596
- "admin_required": true,
1597
- "agent_callable": true,
1598
1622
  "responses": {
1599
1623
  "200": {
1600
- "$ref": "#/components/schemas/UpdateConfigResponse"
1624
+ "$ref": "#/components/schemas/WebAuthnAssertionOptionsResponse"
1601
1625
  },
1602
1626
  "400": {
1603
1627
  "type": "object",
@@ -1698,20 +1722,24 @@
1698
1722
  }
1699
1723
  },
1700
1724
  {
1701
- "name": "dayrate_admin_list_bookings",
1702
- "description": "Admin view of bookings with status/date/email/enrollment/user/is_free filters.",
1703
- "method": "GET",
1704
- "path": "/api/dayrate/admin/bookings",
1725
+ "name": "webauthn_assertion_verify",
1726
+ "description": "Verify a browser WebAuthn assertion for SPAPS tokens or an mfa_required challenge.",
1727
+ "method": "POST",
1728
+ "path": "/api/auth/webauthn/assertion/verify",
1705
1729
  "parameters": {
1706
- "type": "object",
1707
- "properties": {}
1730
+ "$ref": "#/components/schemas/WebAuthnAssertionVerifyRequest"
1708
1731
  },
1709
- "domain": "dayrate",
1710
- "admin_required": true,
1711
- "agent_callable": true,
1712
1732
  "responses": {
1713
1733
  "200": {
1714
- "$ref": "#/components/schemas/ListBookingsResponse"
1734
+ "anyOf": [
1735
+ {
1736
+ "$ref": "#/components/schemas/WebAuthnAssertionVerifyResponse"
1737
+ },
1738
+ {
1739
+ "$ref": "#/components/schemas/MfaRequiredResponse"
1740
+ }
1741
+ ],
1742
+ "title": "Response Webauthn Assertion Verify Api Auth Webauthn Assertion Verify Post"
1715
1743
  },
1716
1744
  "400": {
1717
1745
  "type": "object",
@@ -1812,20 +1840,17 @@
1812
1840
  }
1813
1841
  },
1814
1842
  {
1815
- "name": "dayrate_admin_list_policies",
1816
- "description": "List active booking policies.",
1817
- "method": "GET",
1818
- "path": "/api/dayrate/admin/policies",
1843
+ "name": "webauthn_register_options",
1844
+ "description": "Request WebAuthn passkey registration options for an authenticated user.",
1845
+ "method": "POST",
1846
+ "path": "/api/auth/webauthn/register/options",
1819
1847
  "parameters": {
1820
1848
  "type": "object",
1821
1849
  "properties": {}
1822
1850
  },
1823
- "domain": "dayrate",
1824
- "admin_required": true,
1825
- "agent_callable": true,
1826
1851
  "responses": {
1827
1852
  "200": {
1828
- "$ref": "#/components/schemas/spaps_server_quickstart__domains__dayrate__schemas__ListPoliciesResponse"
1853
+ "$ref": "#/components/schemas/WebAuthnRegistrationOptionsResponse"
1829
1854
  },
1830
1855
  "400": {
1831
1856
  "type": "object",
@@ -1923,19 +1948,16 @@
1923
1948
  }
1924
1949
  },
1925
1950
  {
1926
- "name": "dayrate_admin_create_policy",
1927
- "description": "Create a booking policy (entitlement key, free allotment, overage rate, reschedule rules).",
1951
+ "name": "webauthn_register_verify",
1952
+ "description": "Verify browser WebAuthn registration output for an authenticated user.",
1928
1953
  "method": "POST",
1929
- "path": "/api/dayrate/admin/policies",
1954
+ "path": "/api/auth/webauthn/register/verify",
1930
1955
  "parameters": {
1931
- "$ref": "#/components/schemas/spaps_server_quickstart__domains__dayrate__schemas__CreatePolicyRequest"
1956
+ "$ref": "#/components/schemas/WebAuthnRegisterVerifyRequest"
1932
1957
  },
1933
- "domain": "dayrate",
1934
- "admin_required": true,
1935
- "agent_callable": true,
1936
1958
  "responses": {
1937
- "201": {
1938
- "$ref": "#/components/schemas/spaps_server_quickstart__domains__dayrate__schemas__PolicyResponse"
1959
+ "200": {
1960
+ "$ref": "#/components/schemas/WebAuthnRegisterVerifyResponse"
1939
1961
  },
1940
1962
  "400": {
1941
1963
  "type": "object",
@@ -2036,19 +2058,16 @@
2036
2058
  }
2037
2059
  },
2038
2060
  {
2039
- "name": "dayrate_admin_update_policy",
2040
- "description": "Partial update of a booking policy.",
2041
- "method": "PUT",
2042
- "path": "/api/dayrate/admin/policies/{policy_id}",
2061
+ "name": "mfa_verify",
2062
+ "description": "Complete an mfa_required challenge with a TOTP code or recovery code.",
2063
+ "method": "POST",
2064
+ "path": "/api/auth/mfa/verify",
2043
2065
  "parameters": {
2044
- "$ref": "#/components/schemas/spaps_server_quickstart__domains__dayrate__schemas__UpdatePolicyRequest"
2066
+ "$ref": "#/components/schemas/MfaVerifyRequest"
2045
2067
  },
2046
- "domain": "dayrate",
2047
- "admin_required": true,
2048
- "agent_callable": true,
2049
2068
  "responses": {
2050
2069
  "200": {
2051
- "$ref": "#/components/schemas/spaps_server_quickstart__domains__dayrate__schemas__PolicyResponse"
2070
+ "$ref": "#/components/schemas/MfaVerifyResponse"
2052
2071
  },
2053
2072
  "400": {
2054
2073
  "type": "object",
@@ -2149,20 +2168,17 @@
2149
2168
  }
2150
2169
  },
2151
2170
  {
2152
- "name": "dayrate_admin_delete_policy",
2153
- "description": "Delete a booking policy.",
2154
- "method": "DELETE",
2155
- "path": "/api/dayrate/admin/policies/{policy_id}",
2171
+ "name": "mfa_totp_enroll",
2172
+ "description": "Enroll TOTP MFA for an authenticated user.",
2173
+ "method": "POST",
2174
+ "path": "/api/auth/mfa/totp/enroll",
2156
2175
  "parameters": {
2157
2176
  "type": "object",
2158
2177
  "properties": {}
2159
2178
  },
2160
- "domain": "dayrate",
2161
- "admin_required": true,
2162
- "agent_callable": true,
2163
2179
  "responses": {
2164
2180
  "200": {
2165
- "$ref": "#/components/schemas/DeletePolicyResponse"
2181
+ "$ref": "#/components/schemas/MfaTotpEnrollResponse"
2166
2182
  },
2167
2183
  "400": {
2168
2184
  "type": "object",
@@ -2223,9 +2239,6 @@
2223
2239
  "error"
2224
2240
  ]
2225
2241
  },
2226
- "422": {
2227
- "$ref": "#/components/schemas/HTTPValidationError"
2228
- },
2229
2242
  "429": {
2230
2243
  "type": "object",
2231
2244
  "properties": {
@@ -2263,19 +2276,16 @@
2263
2276
  }
2264
2277
  },
2265
2278
  {
2266
- "name": "email_send",
2267
- "description": "Send a transactional email by template key. In local mode Mailgun calls are short-circuited.",
2279
+ "name": "mfa_totp_activate",
2280
+ "description": "Activate pending TOTP MFA enrollment with a current code.",
2268
2281
  "method": "POST",
2269
- "path": "/api/email/send",
2282
+ "path": "/api/auth/mfa/totp/activate",
2270
2283
  "parameters": {
2271
- "$ref": "#/components/schemas/SendEmailRequest"
2284
+ "$ref": "#/components/schemas/MfaTotpActivateRequest"
2272
2285
  },
2273
- "domain": "email",
2274
- "admin_required": false,
2275
- "agent_callable": true,
2276
2286
  "responses": {
2277
2287
  "200": {
2278
- "$ref": "#/components/schemas/SendEmailResponse"
2288
+ "$ref": "#/components/schemas/MfaTotpActivateResponse"
2279
2289
  },
2280
2290
  "400": {
2281
2291
  "type": "object",
@@ -2376,10 +2386,1882 @@
2376
2386
  }
2377
2387
  },
2378
2388
  {
2379
- "name": "email_get_template",
2380
- "description": "Fetch a template definition by key.",
2381
- "method": "GET",
2382
- "path": "/api/email/templates/{template_key}",
2389
+ "name": "mfa_totp_disable",
2390
+ "description": "Disable TOTP MFA for an authenticated user with a current code.",
2391
+ "method": "POST",
2392
+ "path": "/api/auth/mfa/totp/disable",
2393
+ "parameters": {
2394
+ "$ref": "#/components/schemas/MfaTotpDisableRequest"
2395
+ },
2396
+ "responses": {
2397
+ "200": {
2398
+ "$ref": "#/components/schemas/MfaTotpDisableResponse"
2399
+ },
2400
+ "400": {
2401
+ "type": "object",
2402
+ "properties": {
2403
+ "success": {
2404
+ "type": "boolean"
2405
+ },
2406
+ "error": {
2407
+ "type": "object",
2408
+ "properties": {
2409
+ "code": {
2410
+ "type": "string"
2411
+ },
2412
+ "message": {
2413
+ "type": "string"
2414
+ }
2415
+ },
2416
+ "required": [
2417
+ "message"
2418
+ ]
2419
+ }
2420
+ },
2421
+ "required": [
2422
+ "error"
2423
+ ]
2424
+ },
2425
+ "401": {
2426
+ "type": "object",
2427
+ "properties": {
2428
+ "error": {
2429
+ "type": "string",
2430
+ "enum": [
2431
+ "unauthorized"
2432
+ ]
2433
+ },
2434
+ "message": {
2435
+ "type": "string"
2436
+ }
2437
+ },
2438
+ "required": [
2439
+ "error"
2440
+ ]
2441
+ },
2442
+ "403": {
2443
+ "type": "object",
2444
+ "properties": {
2445
+ "error": {
2446
+ "type": "string",
2447
+ "enum": [
2448
+ "forbidden"
2449
+ ]
2450
+ },
2451
+ "message": {
2452
+ "type": "string"
2453
+ }
2454
+ },
2455
+ "required": [
2456
+ "error"
2457
+ ]
2458
+ },
2459
+ "422": {
2460
+ "$ref": "#/components/schemas/HTTPValidationError"
2461
+ },
2462
+ "429": {
2463
+ "type": "object",
2464
+ "properties": {
2465
+ "error": {
2466
+ "type": "string",
2467
+ "enum": [
2468
+ "rate_limited"
2469
+ ]
2470
+ },
2471
+ "message": {
2472
+ "type": "string"
2473
+ }
2474
+ },
2475
+ "required": [
2476
+ "error"
2477
+ ]
2478
+ },
2479
+ "500": {
2480
+ "type": "object",
2481
+ "properties": {
2482
+ "error": {
2483
+ "type": "string",
2484
+ "enum": [
2485
+ "server_error"
2486
+ ]
2487
+ },
2488
+ "message": {
2489
+ "type": "string"
2490
+ }
2491
+ },
2492
+ "required": [
2493
+ "error"
2494
+ ]
2495
+ }
2496
+ }
2497
+ },
2498
+ {
2499
+ "name": "dayrate_availability",
2500
+ "description": "List bookable slots within the configured horizon with dynamic pricing.",
2501
+ "method": "GET",
2502
+ "path": "/api/dayrate/availability",
2503
+ "parameters": {
2504
+ "type": "object",
2505
+ "properties": {}
2506
+ },
2507
+ "domain": "dayrate",
2508
+ "admin_required": false,
2509
+ "agent_callable": true,
2510
+ "responses": {
2511
+ "200": {
2512
+ "$ref": "#/components/schemas/AvailabilityResponse"
2513
+ },
2514
+ "400": {
2515
+ "type": "object",
2516
+ "properties": {
2517
+ "success": {
2518
+ "type": "boolean"
2519
+ },
2520
+ "error": {
2521
+ "type": "object",
2522
+ "properties": {
2523
+ "code": {
2524
+ "type": "string"
2525
+ },
2526
+ "message": {
2527
+ "type": "string"
2528
+ }
2529
+ },
2530
+ "required": [
2531
+ "message"
2532
+ ]
2533
+ }
2534
+ },
2535
+ "required": [
2536
+ "error"
2537
+ ]
2538
+ },
2539
+ "401": {
2540
+ "type": "object",
2541
+ "properties": {
2542
+ "error": {
2543
+ "type": "string",
2544
+ "enum": [
2545
+ "unauthorized"
2546
+ ]
2547
+ },
2548
+ "message": {
2549
+ "type": "string"
2550
+ }
2551
+ },
2552
+ "required": [
2553
+ "error"
2554
+ ]
2555
+ },
2556
+ "403": {
2557
+ "type": "object",
2558
+ "properties": {
2559
+ "error": {
2560
+ "type": "string",
2561
+ "enum": [
2562
+ "forbidden"
2563
+ ]
2564
+ },
2565
+ "message": {
2566
+ "type": "string"
2567
+ }
2568
+ },
2569
+ "required": [
2570
+ "error"
2571
+ ]
2572
+ },
2573
+ "429": {
2574
+ "type": "object",
2575
+ "properties": {
2576
+ "error": {
2577
+ "type": "string",
2578
+ "enum": [
2579
+ "rate_limited"
2580
+ ]
2581
+ },
2582
+ "message": {
2583
+ "type": "string"
2584
+ }
2585
+ },
2586
+ "required": [
2587
+ "error"
2588
+ ]
2589
+ },
2590
+ "500": {
2591
+ "type": "object",
2592
+ "properties": {
2593
+ "error": {
2594
+ "type": "string",
2595
+ "enum": [
2596
+ "server_error"
2597
+ ]
2598
+ },
2599
+ "message": {
2600
+ "type": "string"
2601
+ }
2602
+ },
2603
+ "required": [
2604
+ "error"
2605
+ ]
2606
+ }
2607
+ }
2608
+ },
2609
+ {
2610
+ "name": "dayrate_book",
2611
+ "description": "Book a single slot. Returns FreeBookResponse when an entitled user has remaining allotment, otherwise a Stripe Checkout URL.",
2612
+ "method": "POST",
2613
+ "path": "/api/dayrate/book",
2614
+ "parameters": {
2615
+ "$ref": "#/components/schemas/BookRequest"
2616
+ },
2617
+ "domain": "dayrate",
2618
+ "admin_required": false,
2619
+ "agent_callable": true,
2620
+ "responses": {
2621
+ "200": {},
2622
+ "400": {
2623
+ "type": "object",
2624
+ "properties": {
2625
+ "success": {
2626
+ "type": "boolean"
2627
+ },
2628
+ "error": {
2629
+ "type": "object",
2630
+ "properties": {
2631
+ "code": {
2632
+ "type": "string"
2633
+ },
2634
+ "message": {
2635
+ "type": "string"
2636
+ }
2637
+ },
2638
+ "required": [
2639
+ "message"
2640
+ ]
2641
+ }
2642
+ },
2643
+ "required": [
2644
+ "error"
2645
+ ]
2646
+ },
2647
+ "401": {
2648
+ "type": "object",
2649
+ "properties": {
2650
+ "error": {
2651
+ "type": "string",
2652
+ "enum": [
2653
+ "unauthorized"
2654
+ ]
2655
+ },
2656
+ "message": {
2657
+ "type": "string"
2658
+ }
2659
+ },
2660
+ "required": [
2661
+ "error"
2662
+ ]
2663
+ },
2664
+ "403": {
2665
+ "type": "object",
2666
+ "properties": {
2667
+ "error": {
2668
+ "type": "string",
2669
+ "enum": [
2670
+ "forbidden"
2671
+ ]
2672
+ },
2673
+ "message": {
2674
+ "type": "string"
2675
+ }
2676
+ },
2677
+ "required": [
2678
+ "error"
2679
+ ]
2680
+ },
2681
+ "422": {
2682
+ "$ref": "#/components/schemas/HTTPValidationError"
2683
+ },
2684
+ "429": {
2685
+ "type": "object",
2686
+ "properties": {
2687
+ "error": {
2688
+ "type": "string",
2689
+ "enum": [
2690
+ "rate_limited"
2691
+ ]
2692
+ },
2693
+ "message": {
2694
+ "type": "string"
2695
+ }
2696
+ },
2697
+ "required": [
2698
+ "error"
2699
+ ]
2700
+ },
2701
+ "500": {
2702
+ "type": "object",
2703
+ "properties": {
2704
+ "error": {
2705
+ "type": "string",
2706
+ "enum": [
2707
+ "server_error"
2708
+ ]
2709
+ },
2710
+ "message": {
2711
+ "type": "string"
2712
+ }
2713
+ },
2714
+ "required": [
2715
+ "error"
2716
+ ]
2717
+ }
2718
+ }
2719
+ },
2720
+ {
2721
+ "name": "dayrate_book_multi",
2722
+ "description": "Book multiple slots in one Stripe session with running fill-rate pricing.",
2723
+ "method": "POST",
2724
+ "path": "/api/dayrate/book-multi",
2725
+ "parameters": {
2726
+ "type": "object",
2727
+ "required": [
2728
+ "slots",
2729
+ "clientEmail",
2730
+ "clientName",
2731
+ "successUrl",
2732
+ "cancelUrl"
2733
+ ],
2734
+ "properties": {
2735
+ "slots": {
2736
+ "type": "array",
2737
+ "minItems": 1,
2738
+ "description": "List of slots to book",
2739
+ "items": {
2740
+ "type": "object",
2741
+ "required": [
2742
+ "date",
2743
+ "slot"
2744
+ ],
2745
+ "description": "A single slot within a book-multi request.",
2746
+ "properties": {
2747
+ "date": {
2748
+ "type": "string"
2749
+ },
2750
+ "slot": {
2751
+ "type": "string"
2752
+ }
2753
+ }
2754
+ }
2755
+ },
2756
+ "clientEmail": {
2757
+ "type": "string",
2758
+ "description": "Client email address"
2759
+ },
2760
+ "clientName": {
2761
+ "type": "string",
2762
+ "description": "Client name"
2763
+ },
2764
+ "successUrl": {
2765
+ "type": "string",
2766
+ "description": "Stripe success redirect URL"
2767
+ },
2768
+ "cancelUrl": {
2769
+ "type": "string",
2770
+ "description": "Stripe cancel redirect URL"
2771
+ },
2772
+ "expectedTotalPrice": {
2773
+ "anyOf": [
2774
+ {
2775
+ "type": "integer",
2776
+ "minimum": 0
2777
+ },
2778
+ {
2779
+ "type": "null"
2780
+ }
2781
+ ],
2782
+ "description": "Optional sum of the per-slot availability prices the client saw when building the cart. Used as a stale-price guard against external price drift before checkout."
2783
+ },
2784
+ "brandingDisplayName": {
2785
+ "anyOf": [
2786
+ {
2787
+ "type": "string"
2788
+ },
2789
+ {
2790
+ "type": "null"
2791
+ }
2792
+ ],
2793
+ "description": "Optional Checkout display name shown on Stripe hosted page"
2794
+ }
2795
+ }
2796
+ },
2797
+ "domain": "dayrate",
2798
+ "admin_required": false,
2799
+ "agent_callable": true,
2800
+ "responses": {
2801
+ "200": {
2802
+ "$ref": "#/components/schemas/BookMultiResponse"
2803
+ },
2804
+ "400": {
2805
+ "type": "object",
2806
+ "properties": {
2807
+ "success": {
2808
+ "type": "boolean"
2809
+ },
2810
+ "error": {
2811
+ "type": "object",
2812
+ "properties": {
2813
+ "code": {
2814
+ "type": "string"
2815
+ },
2816
+ "message": {
2817
+ "type": "string"
2818
+ }
2819
+ },
2820
+ "required": [
2821
+ "message"
2822
+ ]
2823
+ }
2824
+ },
2825
+ "required": [
2826
+ "error"
2827
+ ]
2828
+ },
2829
+ "401": {
2830
+ "type": "object",
2831
+ "properties": {
2832
+ "error": {
2833
+ "type": "string",
2834
+ "enum": [
2835
+ "unauthorized"
2836
+ ]
2837
+ },
2838
+ "message": {
2839
+ "type": "string"
2840
+ }
2841
+ },
2842
+ "required": [
2843
+ "error"
2844
+ ]
2845
+ },
2846
+ "403": {
2847
+ "type": "object",
2848
+ "properties": {
2849
+ "error": {
2850
+ "type": "string",
2851
+ "enum": [
2852
+ "forbidden"
2853
+ ]
2854
+ },
2855
+ "message": {
2856
+ "type": "string"
2857
+ }
2858
+ },
2859
+ "required": [
2860
+ "error"
2861
+ ]
2862
+ },
2863
+ "422": {
2864
+ "$ref": "#/components/schemas/HTTPValidationError"
2865
+ },
2866
+ "429": {
2867
+ "type": "object",
2868
+ "properties": {
2869
+ "error": {
2870
+ "type": "string",
2871
+ "enum": [
2872
+ "rate_limited"
2873
+ ]
2874
+ },
2875
+ "message": {
2876
+ "type": "string"
2877
+ }
2878
+ },
2879
+ "required": [
2880
+ "error"
2881
+ ]
2882
+ },
2883
+ "500": {
2884
+ "type": "object",
2885
+ "properties": {
2886
+ "error": {
2887
+ "type": "string",
2888
+ "enum": [
2889
+ "server_error"
2890
+ ]
2891
+ },
2892
+ "message": {
2893
+ "type": "string"
2894
+ }
2895
+ },
2896
+ "required": [
2897
+ "error"
2898
+ ]
2899
+ }
2900
+ }
2901
+ },
2902
+ {
2903
+ "name": "dayrate_checkout_status",
2904
+ "description": "Poll a Stripe session to learn the resulting booking status.",
2905
+ "method": "GET",
2906
+ "path": "/api/dayrate/checkout-status",
2907
+ "parameters": {
2908
+ "type": "object",
2909
+ "properties": {}
2910
+ },
2911
+ "domain": "dayrate",
2912
+ "admin_required": false,
2913
+ "agent_callable": true,
2914
+ "responses": {
2915
+ "200": {
2916
+ "$ref": "#/components/schemas/CheckoutStatusResponse"
2917
+ },
2918
+ "400": {
2919
+ "type": "object",
2920
+ "properties": {
2921
+ "success": {
2922
+ "type": "boolean"
2923
+ },
2924
+ "error": {
2925
+ "type": "object",
2926
+ "properties": {
2927
+ "code": {
2928
+ "type": "string"
2929
+ },
2930
+ "message": {
2931
+ "type": "string"
2932
+ }
2933
+ },
2934
+ "required": [
2935
+ "message"
2936
+ ]
2937
+ }
2938
+ },
2939
+ "required": [
2940
+ "error"
2941
+ ]
2942
+ },
2943
+ "401": {
2944
+ "type": "object",
2945
+ "properties": {
2946
+ "error": {
2947
+ "type": "string",
2948
+ "enum": [
2949
+ "unauthorized"
2950
+ ]
2951
+ },
2952
+ "message": {
2953
+ "type": "string"
2954
+ }
2955
+ },
2956
+ "required": [
2957
+ "error"
2958
+ ]
2959
+ },
2960
+ "403": {
2961
+ "type": "object",
2962
+ "properties": {
2963
+ "error": {
2964
+ "type": "string",
2965
+ "enum": [
2966
+ "forbidden"
2967
+ ]
2968
+ },
2969
+ "message": {
2970
+ "type": "string"
2971
+ }
2972
+ },
2973
+ "required": [
2974
+ "error"
2975
+ ]
2976
+ },
2977
+ "422": {
2978
+ "$ref": "#/components/schemas/HTTPValidationError"
2979
+ },
2980
+ "429": {
2981
+ "type": "object",
2982
+ "properties": {
2983
+ "error": {
2984
+ "type": "string",
2985
+ "enum": [
2986
+ "rate_limited"
2987
+ ]
2988
+ },
2989
+ "message": {
2990
+ "type": "string"
2991
+ }
2992
+ },
2993
+ "required": [
2994
+ "error"
2995
+ ]
2996
+ },
2997
+ "500": {
2998
+ "type": "object",
2999
+ "properties": {
3000
+ "error": {
3001
+ "type": "string",
3002
+ "enum": [
3003
+ "server_error"
3004
+ ]
3005
+ },
3006
+ "message": {
3007
+ "type": "string"
3008
+ }
3009
+ },
3010
+ "required": [
3011
+ "error"
3012
+ ]
3013
+ }
3014
+ }
3015
+ },
3016
+ {
3017
+ "name": "dayrate_cancel",
3018
+ "description": "Cancel an existing booking. Owner verified by user_id then email.",
3019
+ "method": "POST",
3020
+ "path": "/api/dayrate/cancel",
3021
+ "parameters": {
3022
+ "$ref": "#/components/schemas/CancelRequest"
3023
+ },
3024
+ "domain": "dayrate",
3025
+ "admin_required": false,
3026
+ "agent_callable": true,
3027
+ "responses": {
3028
+ "200": {
3029
+ "$ref": "#/components/schemas/CancelResponse"
3030
+ },
3031
+ "400": {
3032
+ "type": "object",
3033
+ "properties": {
3034
+ "success": {
3035
+ "type": "boolean"
3036
+ },
3037
+ "error": {
3038
+ "type": "object",
3039
+ "properties": {
3040
+ "code": {
3041
+ "type": "string"
3042
+ },
3043
+ "message": {
3044
+ "type": "string"
3045
+ }
3046
+ },
3047
+ "required": [
3048
+ "message"
3049
+ ]
3050
+ }
3051
+ },
3052
+ "required": [
3053
+ "error"
3054
+ ]
3055
+ },
3056
+ "401": {
3057
+ "type": "object",
3058
+ "properties": {
3059
+ "error": {
3060
+ "type": "string",
3061
+ "enum": [
3062
+ "unauthorized"
3063
+ ]
3064
+ },
3065
+ "message": {
3066
+ "type": "string"
3067
+ }
3068
+ },
3069
+ "required": [
3070
+ "error"
3071
+ ]
3072
+ },
3073
+ "403": {
3074
+ "type": "object",
3075
+ "properties": {
3076
+ "error": {
3077
+ "type": "string",
3078
+ "enum": [
3079
+ "forbidden"
3080
+ ]
3081
+ },
3082
+ "message": {
3083
+ "type": "string"
3084
+ }
3085
+ },
3086
+ "required": [
3087
+ "error"
3088
+ ]
3089
+ },
3090
+ "422": {
3091
+ "$ref": "#/components/schemas/HTTPValidationError"
3092
+ },
3093
+ "429": {
3094
+ "type": "object",
3095
+ "properties": {
3096
+ "error": {
3097
+ "type": "string",
3098
+ "enum": [
3099
+ "rate_limited"
3100
+ ]
3101
+ },
3102
+ "message": {
3103
+ "type": "string"
3104
+ }
3105
+ },
3106
+ "required": [
3107
+ "error"
3108
+ ]
3109
+ },
3110
+ "500": {
3111
+ "type": "object",
3112
+ "properties": {
3113
+ "error": {
3114
+ "type": "string",
3115
+ "enum": [
3116
+ "server_error"
3117
+ ]
3118
+ },
3119
+ "message": {
3120
+ "type": "string"
3121
+ }
3122
+ },
3123
+ "required": [
3124
+ "error"
3125
+ ]
3126
+ }
3127
+ }
3128
+ },
3129
+ {
3130
+ "name": "dayrate_allotment",
3131
+ "description": "Inspect free allotment status for a policy in the rolling window.",
3132
+ "method": "GET",
3133
+ "path": "/api/dayrate/allotment",
3134
+ "parameters": {
3135
+ "type": "object",
3136
+ "properties": {}
3137
+ },
3138
+ "domain": "dayrate",
3139
+ "admin_required": false,
3140
+ "agent_callable": true,
3141
+ "responses": {
3142
+ "200": {
3143
+ "$ref": "#/components/schemas/AllotmentResponse"
3144
+ },
3145
+ "400": {
3146
+ "type": "object",
3147
+ "properties": {
3148
+ "success": {
3149
+ "type": "boolean"
3150
+ },
3151
+ "error": {
3152
+ "type": "object",
3153
+ "properties": {
3154
+ "code": {
3155
+ "type": "string"
3156
+ },
3157
+ "message": {
3158
+ "type": "string"
3159
+ }
3160
+ },
3161
+ "required": [
3162
+ "message"
3163
+ ]
3164
+ }
3165
+ },
3166
+ "required": [
3167
+ "error"
3168
+ ]
3169
+ },
3170
+ "401": {
3171
+ "type": "object",
3172
+ "properties": {
3173
+ "error": {
3174
+ "type": "string",
3175
+ "enum": [
3176
+ "unauthorized"
3177
+ ]
3178
+ },
3179
+ "message": {
3180
+ "type": "string"
3181
+ }
3182
+ },
3183
+ "required": [
3184
+ "error"
3185
+ ]
3186
+ },
3187
+ "403": {
3188
+ "type": "object",
3189
+ "properties": {
3190
+ "error": {
3191
+ "type": "string",
3192
+ "enum": [
3193
+ "forbidden"
3194
+ ]
3195
+ },
3196
+ "message": {
3197
+ "type": "string"
3198
+ }
3199
+ },
3200
+ "required": [
3201
+ "error"
3202
+ ]
3203
+ },
3204
+ "422": {
3205
+ "$ref": "#/components/schemas/HTTPValidationError"
3206
+ },
3207
+ "429": {
3208
+ "type": "object",
3209
+ "properties": {
3210
+ "error": {
3211
+ "type": "string",
3212
+ "enum": [
3213
+ "rate_limited"
3214
+ ]
3215
+ },
3216
+ "message": {
3217
+ "type": "string"
3218
+ }
3219
+ },
3220
+ "required": [
3221
+ "error"
3222
+ ]
3223
+ },
3224
+ "500": {
3225
+ "type": "object",
3226
+ "properties": {
3227
+ "error": {
3228
+ "type": "string",
3229
+ "enum": [
3230
+ "server_error"
3231
+ ]
3232
+ },
3233
+ "message": {
3234
+ "type": "string"
3235
+ }
3236
+ },
3237
+ "required": [
3238
+ "error"
3239
+ ]
3240
+ }
3241
+ }
3242
+ },
3243
+ {
3244
+ "name": "dayrate_admin_get_config",
3245
+ "description": "Fetch dayrate pricing/availability config.",
3246
+ "method": "GET",
3247
+ "path": "/api/dayrate/admin/config",
3248
+ "parameters": {
3249
+ "type": "object",
3250
+ "properties": {}
3251
+ },
3252
+ "domain": "dayrate",
3253
+ "admin_required": true,
3254
+ "agent_callable": true,
3255
+ "responses": {
3256
+ "200": {
3257
+ "$ref": "#/components/schemas/GetConfigResponse"
3258
+ },
3259
+ "400": {
3260
+ "type": "object",
3261
+ "properties": {
3262
+ "success": {
3263
+ "type": "boolean"
3264
+ },
3265
+ "error": {
3266
+ "type": "object",
3267
+ "properties": {
3268
+ "code": {
3269
+ "type": "string"
3270
+ },
3271
+ "message": {
3272
+ "type": "string"
3273
+ }
3274
+ },
3275
+ "required": [
3276
+ "message"
3277
+ ]
3278
+ }
3279
+ },
3280
+ "required": [
3281
+ "error"
3282
+ ]
3283
+ },
3284
+ "401": {
3285
+ "type": "object",
3286
+ "properties": {
3287
+ "error": {
3288
+ "type": "string",
3289
+ "enum": [
3290
+ "unauthorized"
3291
+ ]
3292
+ },
3293
+ "message": {
3294
+ "type": "string"
3295
+ }
3296
+ },
3297
+ "required": [
3298
+ "error"
3299
+ ]
3300
+ },
3301
+ "403": {
3302
+ "type": "object",
3303
+ "properties": {
3304
+ "error": {
3305
+ "type": "string",
3306
+ "enum": [
3307
+ "forbidden"
3308
+ ]
3309
+ },
3310
+ "message": {
3311
+ "type": "string"
3312
+ }
3313
+ },
3314
+ "required": [
3315
+ "error"
3316
+ ]
3317
+ },
3318
+ "429": {
3319
+ "type": "object",
3320
+ "properties": {
3321
+ "error": {
3322
+ "type": "string",
3323
+ "enum": [
3324
+ "rate_limited"
3325
+ ]
3326
+ },
3327
+ "message": {
3328
+ "type": "string"
3329
+ }
3330
+ },
3331
+ "required": [
3332
+ "error"
3333
+ ]
3334
+ },
3335
+ "500": {
3336
+ "type": "object",
3337
+ "properties": {
3338
+ "error": {
3339
+ "type": "string",
3340
+ "enum": [
3341
+ "server_error"
3342
+ ]
3343
+ },
3344
+ "message": {
3345
+ "type": "string"
3346
+ }
3347
+ },
3348
+ "required": [
3349
+ "error"
3350
+ ]
3351
+ }
3352
+ }
3353
+ },
3354
+ {
3355
+ "name": "dayrate_admin_update_config",
3356
+ "description": "Upsert dayrate config (rates, tiers, horizon, timezone, slot definitions).",
3357
+ "method": "PUT",
3358
+ "path": "/api/dayrate/admin/config",
3359
+ "parameters": {
3360
+ "$ref": "#/components/schemas/UpdateConfigRequest"
3361
+ },
3362
+ "domain": "dayrate",
3363
+ "admin_required": true,
3364
+ "agent_callable": true,
3365
+ "responses": {
3366
+ "200": {
3367
+ "$ref": "#/components/schemas/UpdateConfigResponse"
3368
+ },
3369
+ "400": {
3370
+ "type": "object",
3371
+ "properties": {
3372
+ "success": {
3373
+ "type": "boolean"
3374
+ },
3375
+ "error": {
3376
+ "type": "object",
3377
+ "properties": {
3378
+ "code": {
3379
+ "type": "string"
3380
+ },
3381
+ "message": {
3382
+ "type": "string"
3383
+ }
3384
+ },
3385
+ "required": [
3386
+ "message"
3387
+ ]
3388
+ }
3389
+ },
3390
+ "required": [
3391
+ "error"
3392
+ ]
3393
+ },
3394
+ "401": {
3395
+ "type": "object",
3396
+ "properties": {
3397
+ "error": {
3398
+ "type": "string",
3399
+ "enum": [
3400
+ "unauthorized"
3401
+ ]
3402
+ },
3403
+ "message": {
3404
+ "type": "string"
3405
+ }
3406
+ },
3407
+ "required": [
3408
+ "error"
3409
+ ]
3410
+ },
3411
+ "403": {
3412
+ "type": "object",
3413
+ "properties": {
3414
+ "error": {
3415
+ "type": "string",
3416
+ "enum": [
3417
+ "forbidden"
3418
+ ]
3419
+ },
3420
+ "message": {
3421
+ "type": "string"
3422
+ }
3423
+ },
3424
+ "required": [
3425
+ "error"
3426
+ ]
3427
+ },
3428
+ "422": {
3429
+ "$ref": "#/components/schemas/HTTPValidationError"
3430
+ },
3431
+ "429": {
3432
+ "type": "object",
3433
+ "properties": {
3434
+ "error": {
3435
+ "type": "string",
3436
+ "enum": [
3437
+ "rate_limited"
3438
+ ]
3439
+ },
3440
+ "message": {
3441
+ "type": "string"
3442
+ }
3443
+ },
3444
+ "required": [
3445
+ "error"
3446
+ ]
3447
+ },
3448
+ "500": {
3449
+ "type": "object",
3450
+ "properties": {
3451
+ "error": {
3452
+ "type": "string",
3453
+ "enum": [
3454
+ "server_error"
3455
+ ]
3456
+ },
3457
+ "message": {
3458
+ "type": "string"
3459
+ }
3460
+ },
3461
+ "required": [
3462
+ "error"
3463
+ ]
3464
+ }
3465
+ }
3466
+ },
3467
+ {
3468
+ "name": "dayrate_admin_list_bookings",
3469
+ "description": "Admin view of bookings with status/date/email/enrollment/user/is_free filters.",
3470
+ "method": "GET",
3471
+ "path": "/api/dayrate/admin/bookings",
3472
+ "parameters": {
3473
+ "type": "object",
3474
+ "properties": {}
3475
+ },
3476
+ "domain": "dayrate",
3477
+ "admin_required": true,
3478
+ "agent_callable": true,
3479
+ "responses": {
3480
+ "200": {
3481
+ "$ref": "#/components/schemas/ListBookingsResponse"
3482
+ },
3483
+ "400": {
3484
+ "type": "object",
3485
+ "properties": {
3486
+ "success": {
3487
+ "type": "boolean"
3488
+ },
3489
+ "error": {
3490
+ "type": "object",
3491
+ "properties": {
3492
+ "code": {
3493
+ "type": "string"
3494
+ },
3495
+ "message": {
3496
+ "type": "string"
3497
+ }
3498
+ },
3499
+ "required": [
3500
+ "message"
3501
+ ]
3502
+ }
3503
+ },
3504
+ "required": [
3505
+ "error"
3506
+ ]
3507
+ },
3508
+ "401": {
3509
+ "type": "object",
3510
+ "properties": {
3511
+ "error": {
3512
+ "type": "string",
3513
+ "enum": [
3514
+ "unauthorized"
3515
+ ]
3516
+ },
3517
+ "message": {
3518
+ "type": "string"
3519
+ }
3520
+ },
3521
+ "required": [
3522
+ "error"
3523
+ ]
3524
+ },
3525
+ "403": {
3526
+ "type": "object",
3527
+ "properties": {
3528
+ "error": {
3529
+ "type": "string",
3530
+ "enum": [
3531
+ "forbidden"
3532
+ ]
3533
+ },
3534
+ "message": {
3535
+ "type": "string"
3536
+ }
3537
+ },
3538
+ "required": [
3539
+ "error"
3540
+ ]
3541
+ },
3542
+ "422": {
3543
+ "$ref": "#/components/schemas/HTTPValidationError"
3544
+ },
3545
+ "429": {
3546
+ "type": "object",
3547
+ "properties": {
3548
+ "error": {
3549
+ "type": "string",
3550
+ "enum": [
3551
+ "rate_limited"
3552
+ ]
3553
+ },
3554
+ "message": {
3555
+ "type": "string"
3556
+ }
3557
+ },
3558
+ "required": [
3559
+ "error"
3560
+ ]
3561
+ },
3562
+ "500": {
3563
+ "type": "object",
3564
+ "properties": {
3565
+ "error": {
3566
+ "type": "string",
3567
+ "enum": [
3568
+ "server_error"
3569
+ ]
3570
+ },
3571
+ "message": {
3572
+ "type": "string"
3573
+ }
3574
+ },
3575
+ "required": [
3576
+ "error"
3577
+ ]
3578
+ }
3579
+ }
3580
+ },
3581
+ {
3582
+ "name": "dayrate_admin_list_policies",
3583
+ "description": "List active booking policies.",
3584
+ "method": "GET",
3585
+ "path": "/api/dayrate/admin/policies",
3586
+ "parameters": {
3587
+ "type": "object",
3588
+ "properties": {}
3589
+ },
3590
+ "domain": "dayrate",
3591
+ "admin_required": true,
3592
+ "agent_callable": true,
3593
+ "responses": {
3594
+ "200": {
3595
+ "$ref": "#/components/schemas/spaps_server_quickstart__domains__dayrate__schemas__ListPoliciesResponse"
3596
+ },
3597
+ "400": {
3598
+ "type": "object",
3599
+ "properties": {
3600
+ "success": {
3601
+ "type": "boolean"
3602
+ },
3603
+ "error": {
3604
+ "type": "object",
3605
+ "properties": {
3606
+ "code": {
3607
+ "type": "string"
3608
+ },
3609
+ "message": {
3610
+ "type": "string"
3611
+ }
3612
+ },
3613
+ "required": [
3614
+ "message"
3615
+ ]
3616
+ }
3617
+ },
3618
+ "required": [
3619
+ "error"
3620
+ ]
3621
+ },
3622
+ "401": {
3623
+ "type": "object",
3624
+ "properties": {
3625
+ "error": {
3626
+ "type": "string",
3627
+ "enum": [
3628
+ "unauthorized"
3629
+ ]
3630
+ },
3631
+ "message": {
3632
+ "type": "string"
3633
+ }
3634
+ },
3635
+ "required": [
3636
+ "error"
3637
+ ]
3638
+ },
3639
+ "403": {
3640
+ "type": "object",
3641
+ "properties": {
3642
+ "error": {
3643
+ "type": "string",
3644
+ "enum": [
3645
+ "forbidden"
3646
+ ]
3647
+ },
3648
+ "message": {
3649
+ "type": "string"
3650
+ }
3651
+ },
3652
+ "required": [
3653
+ "error"
3654
+ ]
3655
+ },
3656
+ "422": {
3657
+ "$ref": "#/components/schemas/HTTPValidationError"
3658
+ },
3659
+ "429": {
3660
+ "type": "object",
3661
+ "properties": {
3662
+ "error": {
3663
+ "type": "string",
3664
+ "enum": [
3665
+ "rate_limited"
3666
+ ]
3667
+ },
3668
+ "message": {
3669
+ "type": "string"
3670
+ }
3671
+ },
3672
+ "required": [
3673
+ "error"
3674
+ ]
3675
+ },
3676
+ "500": {
3677
+ "type": "object",
3678
+ "properties": {
3679
+ "error": {
3680
+ "type": "string",
3681
+ "enum": [
3682
+ "server_error"
3683
+ ]
3684
+ },
3685
+ "message": {
3686
+ "type": "string"
3687
+ }
3688
+ },
3689
+ "required": [
3690
+ "error"
3691
+ ]
3692
+ }
3693
+ }
3694
+ },
3695
+ {
3696
+ "name": "dayrate_admin_create_policy",
3697
+ "description": "Create a booking policy (entitlement key, free allotment, overage rate, reschedule rules).",
3698
+ "method": "POST",
3699
+ "path": "/api/dayrate/admin/policies",
3700
+ "parameters": {
3701
+ "$ref": "#/components/schemas/spaps_server_quickstart__domains__dayrate__schemas__CreatePolicyRequest"
3702
+ },
3703
+ "domain": "dayrate",
3704
+ "admin_required": true,
3705
+ "agent_callable": true,
3706
+ "responses": {
3707
+ "201": {
3708
+ "$ref": "#/components/schemas/spaps_server_quickstart__domains__dayrate__schemas__PolicyResponse"
3709
+ },
3710
+ "400": {
3711
+ "type": "object",
3712
+ "properties": {
3713
+ "success": {
3714
+ "type": "boolean"
3715
+ },
3716
+ "error": {
3717
+ "type": "object",
3718
+ "properties": {
3719
+ "code": {
3720
+ "type": "string"
3721
+ },
3722
+ "message": {
3723
+ "type": "string"
3724
+ }
3725
+ },
3726
+ "required": [
3727
+ "message"
3728
+ ]
3729
+ }
3730
+ },
3731
+ "required": [
3732
+ "error"
3733
+ ]
3734
+ },
3735
+ "401": {
3736
+ "type": "object",
3737
+ "properties": {
3738
+ "error": {
3739
+ "type": "string",
3740
+ "enum": [
3741
+ "unauthorized"
3742
+ ]
3743
+ },
3744
+ "message": {
3745
+ "type": "string"
3746
+ }
3747
+ },
3748
+ "required": [
3749
+ "error"
3750
+ ]
3751
+ },
3752
+ "403": {
3753
+ "type": "object",
3754
+ "properties": {
3755
+ "error": {
3756
+ "type": "string",
3757
+ "enum": [
3758
+ "forbidden"
3759
+ ]
3760
+ },
3761
+ "message": {
3762
+ "type": "string"
3763
+ }
3764
+ },
3765
+ "required": [
3766
+ "error"
3767
+ ]
3768
+ },
3769
+ "422": {
3770
+ "$ref": "#/components/schemas/HTTPValidationError"
3771
+ },
3772
+ "429": {
3773
+ "type": "object",
3774
+ "properties": {
3775
+ "error": {
3776
+ "type": "string",
3777
+ "enum": [
3778
+ "rate_limited"
3779
+ ]
3780
+ },
3781
+ "message": {
3782
+ "type": "string"
3783
+ }
3784
+ },
3785
+ "required": [
3786
+ "error"
3787
+ ]
3788
+ },
3789
+ "500": {
3790
+ "type": "object",
3791
+ "properties": {
3792
+ "error": {
3793
+ "type": "string",
3794
+ "enum": [
3795
+ "server_error"
3796
+ ]
3797
+ },
3798
+ "message": {
3799
+ "type": "string"
3800
+ }
3801
+ },
3802
+ "required": [
3803
+ "error"
3804
+ ]
3805
+ }
3806
+ }
3807
+ },
3808
+ {
3809
+ "name": "dayrate_admin_update_policy",
3810
+ "description": "Partial update of a booking policy.",
3811
+ "method": "PUT",
3812
+ "path": "/api/dayrate/admin/policies/{policy_id}",
3813
+ "parameters": {
3814
+ "$ref": "#/components/schemas/spaps_server_quickstart__domains__dayrate__schemas__UpdatePolicyRequest"
3815
+ },
3816
+ "domain": "dayrate",
3817
+ "admin_required": true,
3818
+ "agent_callable": true,
3819
+ "responses": {
3820
+ "200": {
3821
+ "$ref": "#/components/schemas/spaps_server_quickstart__domains__dayrate__schemas__PolicyResponse"
3822
+ },
3823
+ "400": {
3824
+ "type": "object",
3825
+ "properties": {
3826
+ "success": {
3827
+ "type": "boolean"
3828
+ },
3829
+ "error": {
3830
+ "type": "object",
3831
+ "properties": {
3832
+ "code": {
3833
+ "type": "string"
3834
+ },
3835
+ "message": {
3836
+ "type": "string"
3837
+ }
3838
+ },
3839
+ "required": [
3840
+ "message"
3841
+ ]
3842
+ }
3843
+ },
3844
+ "required": [
3845
+ "error"
3846
+ ]
3847
+ },
3848
+ "401": {
3849
+ "type": "object",
3850
+ "properties": {
3851
+ "error": {
3852
+ "type": "string",
3853
+ "enum": [
3854
+ "unauthorized"
3855
+ ]
3856
+ },
3857
+ "message": {
3858
+ "type": "string"
3859
+ }
3860
+ },
3861
+ "required": [
3862
+ "error"
3863
+ ]
3864
+ },
3865
+ "403": {
3866
+ "type": "object",
3867
+ "properties": {
3868
+ "error": {
3869
+ "type": "string",
3870
+ "enum": [
3871
+ "forbidden"
3872
+ ]
3873
+ },
3874
+ "message": {
3875
+ "type": "string"
3876
+ }
3877
+ },
3878
+ "required": [
3879
+ "error"
3880
+ ]
3881
+ },
3882
+ "422": {
3883
+ "$ref": "#/components/schemas/HTTPValidationError"
3884
+ },
3885
+ "429": {
3886
+ "type": "object",
3887
+ "properties": {
3888
+ "error": {
3889
+ "type": "string",
3890
+ "enum": [
3891
+ "rate_limited"
3892
+ ]
3893
+ },
3894
+ "message": {
3895
+ "type": "string"
3896
+ }
3897
+ },
3898
+ "required": [
3899
+ "error"
3900
+ ]
3901
+ },
3902
+ "500": {
3903
+ "type": "object",
3904
+ "properties": {
3905
+ "error": {
3906
+ "type": "string",
3907
+ "enum": [
3908
+ "server_error"
3909
+ ]
3910
+ },
3911
+ "message": {
3912
+ "type": "string"
3913
+ }
3914
+ },
3915
+ "required": [
3916
+ "error"
3917
+ ]
3918
+ }
3919
+ }
3920
+ },
3921
+ {
3922
+ "name": "dayrate_admin_delete_policy",
3923
+ "description": "Delete a booking policy.",
3924
+ "method": "DELETE",
3925
+ "path": "/api/dayrate/admin/policies/{policy_id}",
3926
+ "parameters": {
3927
+ "type": "object",
3928
+ "properties": {}
3929
+ },
3930
+ "domain": "dayrate",
3931
+ "admin_required": true,
3932
+ "agent_callable": true,
3933
+ "responses": {
3934
+ "200": {
3935
+ "$ref": "#/components/schemas/DeletePolicyResponse"
3936
+ },
3937
+ "400": {
3938
+ "type": "object",
3939
+ "properties": {
3940
+ "success": {
3941
+ "type": "boolean"
3942
+ },
3943
+ "error": {
3944
+ "type": "object",
3945
+ "properties": {
3946
+ "code": {
3947
+ "type": "string"
3948
+ },
3949
+ "message": {
3950
+ "type": "string"
3951
+ }
3952
+ },
3953
+ "required": [
3954
+ "message"
3955
+ ]
3956
+ }
3957
+ },
3958
+ "required": [
3959
+ "error"
3960
+ ]
3961
+ },
3962
+ "401": {
3963
+ "type": "object",
3964
+ "properties": {
3965
+ "error": {
3966
+ "type": "string",
3967
+ "enum": [
3968
+ "unauthorized"
3969
+ ]
3970
+ },
3971
+ "message": {
3972
+ "type": "string"
3973
+ }
3974
+ },
3975
+ "required": [
3976
+ "error"
3977
+ ]
3978
+ },
3979
+ "403": {
3980
+ "type": "object",
3981
+ "properties": {
3982
+ "error": {
3983
+ "type": "string",
3984
+ "enum": [
3985
+ "forbidden"
3986
+ ]
3987
+ },
3988
+ "message": {
3989
+ "type": "string"
3990
+ }
3991
+ },
3992
+ "required": [
3993
+ "error"
3994
+ ]
3995
+ },
3996
+ "422": {
3997
+ "$ref": "#/components/schemas/HTTPValidationError"
3998
+ },
3999
+ "429": {
4000
+ "type": "object",
4001
+ "properties": {
4002
+ "error": {
4003
+ "type": "string",
4004
+ "enum": [
4005
+ "rate_limited"
4006
+ ]
4007
+ },
4008
+ "message": {
4009
+ "type": "string"
4010
+ }
4011
+ },
4012
+ "required": [
4013
+ "error"
4014
+ ]
4015
+ },
4016
+ "500": {
4017
+ "type": "object",
4018
+ "properties": {
4019
+ "error": {
4020
+ "type": "string",
4021
+ "enum": [
4022
+ "server_error"
4023
+ ]
4024
+ },
4025
+ "message": {
4026
+ "type": "string"
4027
+ }
4028
+ },
4029
+ "required": [
4030
+ "error"
4031
+ ]
4032
+ }
4033
+ }
4034
+ },
4035
+ {
4036
+ "name": "email_send",
4037
+ "description": "Send a transactional email by template key. In local mode Mailgun calls are short-circuited.",
4038
+ "method": "POST",
4039
+ "path": "/api/email/send",
4040
+ "parameters": {
4041
+ "$ref": "#/components/schemas/SendEmailRequest"
4042
+ },
4043
+ "domain": "email",
4044
+ "admin_required": false,
4045
+ "agent_callable": true,
4046
+ "responses": {
4047
+ "200": {
4048
+ "$ref": "#/components/schemas/SendEmailResponse"
4049
+ },
4050
+ "400": {
4051
+ "type": "object",
4052
+ "properties": {
4053
+ "success": {
4054
+ "type": "boolean"
4055
+ },
4056
+ "error": {
4057
+ "type": "object",
4058
+ "properties": {
4059
+ "code": {
4060
+ "type": "string"
4061
+ },
4062
+ "message": {
4063
+ "type": "string"
4064
+ }
4065
+ },
4066
+ "required": [
4067
+ "message"
4068
+ ]
4069
+ }
4070
+ },
4071
+ "required": [
4072
+ "error"
4073
+ ]
4074
+ },
4075
+ "401": {
4076
+ "type": "object",
4077
+ "properties": {
4078
+ "error": {
4079
+ "type": "string",
4080
+ "enum": [
4081
+ "unauthorized"
4082
+ ]
4083
+ },
4084
+ "message": {
4085
+ "type": "string"
4086
+ }
4087
+ },
4088
+ "required": [
4089
+ "error"
4090
+ ]
4091
+ },
4092
+ "403": {
4093
+ "type": "object",
4094
+ "properties": {
4095
+ "error": {
4096
+ "type": "string",
4097
+ "enum": [
4098
+ "forbidden"
4099
+ ]
4100
+ },
4101
+ "message": {
4102
+ "type": "string"
4103
+ }
4104
+ },
4105
+ "required": [
4106
+ "error"
4107
+ ]
4108
+ },
4109
+ "422": {
4110
+ "$ref": "#/components/schemas/HTTPValidationError"
4111
+ },
4112
+ "429": {
4113
+ "type": "object",
4114
+ "properties": {
4115
+ "error": {
4116
+ "type": "string",
4117
+ "enum": [
4118
+ "rate_limited"
4119
+ ]
4120
+ },
4121
+ "message": {
4122
+ "type": "string"
4123
+ }
4124
+ },
4125
+ "required": [
4126
+ "error"
4127
+ ]
4128
+ },
4129
+ "500": {
4130
+ "type": "object",
4131
+ "properties": {
4132
+ "error": {
4133
+ "type": "string",
4134
+ "enum": [
4135
+ "server_error"
4136
+ ]
4137
+ },
4138
+ "message": {
4139
+ "type": "string"
4140
+ }
4141
+ },
4142
+ "required": [
4143
+ "error"
4144
+ ]
4145
+ }
4146
+ }
4147
+ },
4148
+ {
4149
+ "name": "email_get_template",
4150
+ "description": "Fetch a template definition by key.",
4151
+ "method": "GET",
4152
+ "path": "/api/email/templates/{template_key}",
4153
+ "parameters": {
4154
+ "type": "object",
4155
+ "properties": {}
4156
+ },
4157
+ "domain": "email",
4158
+ "admin_required": false,
4159
+ "agent_callable": true,
4160
+ "responses": {
4161
+ "200": {},
4162
+ "400": {
4163
+ "type": "object",
4164
+ "properties": {
4165
+ "success": {
4166
+ "type": "boolean"
4167
+ },
4168
+ "error": {
4169
+ "type": "object",
4170
+ "properties": {
4171
+ "code": {
4172
+ "type": "string"
4173
+ },
4174
+ "message": {
4175
+ "type": "string"
4176
+ }
4177
+ },
4178
+ "required": [
4179
+ "message"
4180
+ ]
4181
+ }
4182
+ },
4183
+ "required": [
4184
+ "error"
4185
+ ]
4186
+ },
4187
+ "401": {
4188
+ "type": "object",
4189
+ "properties": {
4190
+ "error": {
4191
+ "type": "string",
4192
+ "enum": [
4193
+ "unauthorized"
4194
+ ]
4195
+ },
4196
+ "message": {
4197
+ "type": "string"
4198
+ }
4199
+ },
4200
+ "required": [
4201
+ "error"
4202
+ ]
4203
+ },
4204
+ "403": {
4205
+ "type": "object",
4206
+ "properties": {
4207
+ "error": {
4208
+ "type": "string",
4209
+ "enum": [
4210
+ "forbidden"
4211
+ ]
4212
+ },
4213
+ "message": {
4214
+ "type": "string"
4215
+ }
4216
+ },
4217
+ "required": [
4218
+ "error"
4219
+ ]
4220
+ },
4221
+ "422": {
4222
+ "$ref": "#/components/schemas/HTTPValidationError"
4223
+ },
4224
+ "429": {
4225
+ "type": "object",
4226
+ "properties": {
4227
+ "error": {
4228
+ "type": "string",
4229
+ "enum": [
4230
+ "rate_limited"
4231
+ ]
4232
+ },
4233
+ "message": {
4234
+ "type": "string"
4235
+ }
4236
+ },
4237
+ "required": [
4238
+ "error"
4239
+ ]
4240
+ },
4241
+ "500": {
4242
+ "type": "object",
4243
+ "properties": {
4244
+ "error": {
4245
+ "type": "string",
4246
+ "enum": [
4247
+ "server_error"
4248
+ ]
4249
+ },
4250
+ "message": {
4251
+ "type": "string"
4252
+ }
4253
+ },
4254
+ "required": [
4255
+ "error"
4256
+ ]
4257
+ }
4258
+ }
4259
+ },
4260
+ {
4261
+ "name": "email_preview_template",
4262
+ "description": "Render a template with its sample context.",
4263
+ "method": "GET",
4264
+ "path": "/api/email/templates/{template_key}/preview",
2383
4265
  "parameters": {
2384
4266
  "type": "object",
2385
4267
  "properties": {}
@@ -2488,10 +4370,121 @@
2488
4370
  }
2489
4371
  },
2490
4372
  {
2491
- "name": "email_preview_template",
2492
- "description": "Render a template with its sample context.",
4373
+ "name": "email_preview_template_with_context",
4374
+ "description": "Render a template with caller-provided context.",
4375
+ "method": "POST",
4376
+ "path": "/api/email/templates/{template_key}/preview",
4377
+ "parameters": {
4378
+ "$ref": "#/components/schemas/PreviewTemplateRequest"
4379
+ },
4380
+ "domain": "email",
4381
+ "admin_required": false,
4382
+ "agent_callable": true,
4383
+ "responses": {
4384
+ "200": {},
4385
+ "400": {
4386
+ "type": "object",
4387
+ "properties": {
4388
+ "success": {
4389
+ "type": "boolean"
4390
+ },
4391
+ "error": {
4392
+ "type": "object",
4393
+ "properties": {
4394
+ "code": {
4395
+ "type": "string"
4396
+ },
4397
+ "message": {
4398
+ "type": "string"
4399
+ }
4400
+ },
4401
+ "required": [
4402
+ "message"
4403
+ ]
4404
+ }
4405
+ },
4406
+ "required": [
4407
+ "error"
4408
+ ]
4409
+ },
4410
+ "401": {
4411
+ "type": "object",
4412
+ "properties": {
4413
+ "error": {
4414
+ "type": "string",
4415
+ "enum": [
4416
+ "unauthorized"
4417
+ ]
4418
+ },
4419
+ "message": {
4420
+ "type": "string"
4421
+ }
4422
+ },
4423
+ "required": [
4424
+ "error"
4425
+ ]
4426
+ },
4427
+ "403": {
4428
+ "type": "object",
4429
+ "properties": {
4430
+ "error": {
4431
+ "type": "string",
4432
+ "enum": [
4433
+ "forbidden"
4434
+ ]
4435
+ },
4436
+ "message": {
4437
+ "type": "string"
4438
+ }
4439
+ },
4440
+ "required": [
4441
+ "error"
4442
+ ]
4443
+ },
4444
+ "422": {
4445
+ "$ref": "#/components/schemas/HTTPValidationError"
4446
+ },
4447
+ "429": {
4448
+ "type": "object",
4449
+ "properties": {
4450
+ "error": {
4451
+ "type": "string",
4452
+ "enum": [
4453
+ "rate_limited"
4454
+ ]
4455
+ },
4456
+ "message": {
4457
+ "type": "string"
4458
+ }
4459
+ },
4460
+ "required": [
4461
+ "error"
4462
+ ]
4463
+ },
4464
+ "500": {
4465
+ "type": "object",
4466
+ "properties": {
4467
+ "error": {
4468
+ "type": "string",
4469
+ "enum": [
4470
+ "server_error"
4471
+ ]
4472
+ },
4473
+ "message": {
4474
+ "type": "string"
4475
+ }
4476
+ },
4477
+ "required": [
4478
+ "error"
4479
+ ]
4480
+ }
4481
+ }
4482
+ },
4483
+ {
4484
+ "name": "email_list_logs",
4485
+ "description": "List email sends. Non-admin users are scoped to their own logs; admins can filter by user_id or owner_id.",
2493
4486
  "method": "GET",
2494
- "path": "/api/email/templates/{template_key}/preview",
4487
+ "path": "/api/email/logs",
2495
4488
  "parameters": {
2496
4489
  "type": "object",
2497
4490
  "properties": {}
@@ -2500,7 +4493,9 @@
2500
4493
  "admin_required": false,
2501
4494
  "agent_callable": true,
2502
4495
  "responses": {
2503
- "200": {},
4496
+ "200": {
4497
+ "$ref": "#/components/schemas/ListLogsResponse"
4498
+ },
2504
4499
  "400": {
2505
4500
  "type": "object",
2506
4501
  "properties": {
@@ -2600,18 +4595,134 @@
2600
4595
  }
2601
4596
  },
2602
4597
  {
2603
- "name": "email_preview_template_with_context",
2604
- "description": "Render a template with caller-provided context.",
4598
+ "name": "email_admin_list_templates",
4599
+ "description": "List all templates for the application.",
4600
+ "method": "GET",
4601
+ "path": "/api/email/templates",
4602
+ "parameters": {
4603
+ "type": "object",
4604
+ "properties": {}
4605
+ },
4606
+ "domain": "email",
4607
+ "admin_required": true,
4608
+ "agent_callable": true,
4609
+ "responses": {
4610
+ "200": {
4611
+ "$ref": "#/components/schemas/ListTemplatesResponse"
4612
+ },
4613
+ "400": {
4614
+ "type": "object",
4615
+ "properties": {
4616
+ "success": {
4617
+ "type": "boolean"
4618
+ },
4619
+ "error": {
4620
+ "type": "object",
4621
+ "properties": {
4622
+ "code": {
4623
+ "type": "string"
4624
+ },
4625
+ "message": {
4626
+ "type": "string"
4627
+ }
4628
+ },
4629
+ "required": [
4630
+ "message"
4631
+ ]
4632
+ }
4633
+ },
4634
+ "required": [
4635
+ "error"
4636
+ ]
4637
+ },
4638
+ "401": {
4639
+ "type": "object",
4640
+ "properties": {
4641
+ "error": {
4642
+ "type": "string",
4643
+ "enum": [
4644
+ "unauthorized"
4645
+ ]
4646
+ },
4647
+ "message": {
4648
+ "type": "string"
4649
+ }
4650
+ },
4651
+ "required": [
4652
+ "error"
4653
+ ]
4654
+ },
4655
+ "403": {
4656
+ "type": "object",
4657
+ "properties": {
4658
+ "error": {
4659
+ "type": "string",
4660
+ "enum": [
4661
+ "forbidden"
4662
+ ]
4663
+ },
4664
+ "message": {
4665
+ "type": "string"
4666
+ }
4667
+ },
4668
+ "required": [
4669
+ "error"
4670
+ ]
4671
+ },
4672
+ "422": {
4673
+ "$ref": "#/components/schemas/HTTPValidationError"
4674
+ },
4675
+ "429": {
4676
+ "type": "object",
4677
+ "properties": {
4678
+ "error": {
4679
+ "type": "string",
4680
+ "enum": [
4681
+ "rate_limited"
4682
+ ]
4683
+ },
4684
+ "message": {
4685
+ "type": "string"
4686
+ }
4687
+ },
4688
+ "required": [
4689
+ "error"
4690
+ ]
4691
+ },
4692
+ "500": {
4693
+ "type": "object",
4694
+ "properties": {
4695
+ "error": {
4696
+ "type": "string",
4697
+ "enum": [
4698
+ "server_error"
4699
+ ]
4700
+ },
4701
+ "message": {
4702
+ "type": "string"
4703
+ }
4704
+ },
4705
+ "required": [
4706
+ "error"
4707
+ ]
4708
+ }
4709
+ }
4710
+ },
4711
+ {
4712
+ "name": "email_admin_create_template",
4713
+ "description": "Create a template (subject, html, text, variables, sample context).",
2605
4714
  "method": "POST",
2606
- "path": "/api/email/templates/{template_key}/preview",
4715
+ "path": "/api/email/templates",
2607
4716
  "parameters": {
2608
- "$ref": "#/components/schemas/PreviewTemplateRequest"
4717
+ "$ref": "#/components/schemas/CreateTemplateRequest"
2609
4718
  },
2610
4719
  "domain": "email",
2611
- "admin_required": false,
4720
+ "admin_required": true,
2612
4721
  "agent_callable": true,
2613
4722
  "responses": {
2614
- "200": {},
4723
+ "201": {
4724
+ "$ref": "#/components/schemas/CreateTemplateResponse"
4725
+ },
2615
4726
  "400": {
2616
4727
  "type": "object",
2617
4728
  "properties": {
@@ -2711,20 +4822,19 @@
2711
4822
  }
2712
4823
  },
2713
4824
  {
2714
- "name": "email_list_logs",
2715
- "description": "List email sends. Non-admin users are scoped to their own logs; admins can filter by user_id or owner_id.",
2716
- "method": "GET",
2717
- "path": "/api/email/logs",
4825
+ "name": "email_admin_update_template",
4826
+ "description": "Update an existing template.",
4827
+ "method": "PUT",
4828
+ "path": "/api/email/templates/{template_key}",
2718
4829
  "parameters": {
2719
- "type": "object",
2720
- "properties": {}
4830
+ "$ref": "#/components/schemas/UpdateTemplateRequest"
2721
4831
  },
2722
4832
  "domain": "email",
2723
- "admin_required": false,
4833
+ "admin_required": true,
2724
4834
  "agent_callable": true,
2725
4835
  "responses": {
2726
4836
  "200": {
2727
- "$ref": "#/components/schemas/ListLogsResponse"
4837
+ "$ref": "#/components/schemas/UpdateTemplateResponse"
2728
4838
  },
2729
4839
  "400": {
2730
4840
  "type": "object",
@@ -2825,20 +4935,20 @@
2825
4935
  }
2826
4936
  },
2827
4937
  {
2828
- "name": "email_admin_list_templates",
2829
- "description": "List all templates for the application.",
4938
+ "name": "email_admin_get_override",
4939
+ "description": "Get subject/body override for a template.",
2830
4940
  "method": "GET",
2831
- "path": "/api/email/templates",
4941
+ "path": "/api/email/templates/{template_key}/override",
2832
4942
  "parameters": {
2833
4943
  "type": "object",
2834
4944
  "properties": {}
2835
4945
  },
2836
4946
  "domain": "email",
2837
- "admin_required": true,
4947
+ "admin_required": false,
2838
4948
  "agent_callable": true,
2839
4949
  "responses": {
2840
4950
  "200": {
2841
- "$ref": "#/components/schemas/ListTemplatesResponse"
4951
+ "$ref": "#/components/schemas/TemplateOverrideResponse"
2842
4952
  },
2843
4953
  "400": {
2844
4954
  "type": "object",
@@ -2899,6 +5009,9 @@
2899
5009
  "error"
2900
5010
  ]
2901
5011
  },
5012
+ "422": {
5013
+ "$ref": "#/components/schemas/HTTPValidationError"
5014
+ },
2902
5015
  "429": {
2903
5016
  "type": "object",
2904
5017
  "properties": {
@@ -2936,19 +5049,19 @@
2936
5049
  }
2937
5050
  },
2938
5051
  {
2939
- "name": "email_admin_create_template",
2940
- "description": "Create a template (subject, html, text, variables, sample context).",
2941
- "method": "POST",
2942
- "path": "/api/email/templates",
5052
+ "name": "email_admin_set_override",
5053
+ "description": "Set subject/body override for a template.",
5054
+ "method": "PUT",
5055
+ "path": "/api/email/templates/{template_key}/override",
2943
5056
  "parameters": {
2944
- "$ref": "#/components/schemas/CreateTemplateRequest"
5057
+ "$ref": "#/components/schemas/TemplateOverrideRequest"
2945
5058
  },
2946
5059
  "domain": "email",
2947
5060
  "admin_required": true,
2948
5061
  "agent_callable": true,
2949
5062
  "responses": {
2950
- "201": {
2951
- "$ref": "#/components/schemas/CreateTemplateResponse"
5063
+ "200": {
5064
+ "$ref": "#/components/schemas/TemplateOverrideResponse"
2952
5065
  },
2953
5066
  "400": {
2954
5067
  "type": "object",
@@ -3049,19 +5162,20 @@
3049
5162
  }
3050
5163
  },
3051
5164
  {
3052
- "name": "email_admin_update_template",
3053
- "description": "Update an existing template.",
3054
- "method": "PUT",
3055
- "path": "/api/email/templates/{template_key}",
5165
+ "name": "email_admin_clear_override",
5166
+ "description": "Clear subject/body override for a template.",
5167
+ "method": "DELETE",
5168
+ "path": "/api/email/templates/{template_key}/override",
3056
5169
  "parameters": {
3057
- "$ref": "#/components/schemas/UpdateTemplateRequest"
5170
+ "type": "object",
5171
+ "properties": {}
3058
5172
  },
3059
5173
  "domain": "email",
3060
5174
  "admin_required": true,
3061
5175
  "agent_callable": true,
3062
5176
  "responses": {
3063
5177
  "200": {
3064
- "$ref": "#/components/schemas/UpdateTemplateResponse"
5178
+ "$ref": "#/components/schemas/DeleteTemplateOverrideResponse"
3065
5179
  },
3066
5180
  "400": {
3067
5181
  "type": "object",
@@ -3162,20 +5276,20 @@
3162
5276
  }
3163
5277
  },
3164
5278
  {
3165
- "name": "email_admin_get_override",
3166
- "description": "Get subject/body override for a template.",
5279
+ "name": "webhook_list",
5280
+ "description": "List registered outbound webhooks.",
3167
5281
  "method": "GET",
3168
- "path": "/api/email/templates/{template_key}/override",
5282
+ "path": "/api/webhooks",
3169
5283
  "parameters": {
3170
5284
  "type": "object",
3171
5285
  "properties": {}
3172
5286
  },
3173
- "domain": "email",
5287
+ "domain": "webhooks",
3174
5288
  "admin_required": false,
3175
5289
  "agent_callable": true,
3176
5290
  "responses": {
3177
5291
  "200": {
3178
- "$ref": "#/components/schemas/TemplateOverrideResponse"
5292
+ "$ref": "#/components/schemas/ListWebhooksResponse"
3179
5293
  },
3180
5294
  "400": {
3181
5295
  "type": "object",
@@ -3276,19 +5390,19 @@
3276
5390
  }
3277
5391
  },
3278
5392
  {
3279
- "name": "email_admin_set_override",
3280
- "description": "Set subject/body override for a template.",
3281
- "method": "PUT",
3282
- "path": "/api/email/templates/{template_key}/override",
5393
+ "name": "webhook_register",
5394
+ "description": "Register an outbound webhook. The create response returns a one-time signing_secret.",
5395
+ "method": "POST",
5396
+ "path": "/api/webhooks",
3283
5397
  "parameters": {
3284
- "$ref": "#/components/schemas/TemplateOverrideRequest"
5398
+ "$ref": "#/components/schemas/CreateWebhookRequest"
3285
5399
  },
3286
- "domain": "email",
3287
- "admin_required": true,
5400
+ "domain": "webhooks",
5401
+ "admin_required": false,
3288
5402
  "agent_callable": true,
3289
5403
  "responses": {
3290
- "200": {
3291
- "$ref": "#/components/schemas/TemplateOverrideResponse"
5404
+ "201": {
5405
+ "$ref": "#/components/schemas/CreateWebhookResponse"
3292
5406
  },
3293
5407
  "400": {
3294
5408
  "type": "object",
@@ -3389,20 +5503,19 @@
3389
5503
  }
3390
5504
  },
3391
5505
  {
3392
- "name": "email_admin_clear_override",
3393
- "description": "Clear subject/body override for a template.",
3394
- "method": "DELETE",
3395
- "path": "/api/email/templates/{template_key}/override",
5506
+ "name": "webhook_update",
5507
+ "description": "Update url, events, is_active, or headers on an existing webhook.",
5508
+ "method": "PUT",
5509
+ "path": "/api/webhooks/{webhook_id}",
3396
5510
  "parameters": {
3397
- "type": "object",
3398
- "properties": {}
5511
+ "$ref": "#/components/schemas/UpdateWebhookRequest"
3399
5512
  },
3400
- "domain": "email",
3401
- "admin_required": true,
5513
+ "domain": "webhooks",
5514
+ "admin_required": false,
3402
5515
  "agent_callable": true,
3403
5516
  "responses": {
3404
5517
  "200": {
3405
- "$ref": "#/components/schemas/DeleteTemplateOverrideResponse"
5518
+ "$ref": "#/components/schemas/UpdateWebhookResponse"
3406
5519
  },
3407
5520
  "400": {
3408
5521
  "type": "object",
@@ -3503,10 +5616,10 @@
3503
5616
  }
3504
5617
  },
3505
5618
  {
3506
- "name": "webhook_list",
3507
- "description": "List registered outbound webhooks.",
3508
- "method": "GET",
3509
- "path": "/api/webhooks",
5619
+ "name": "webhook_delete",
5620
+ "description": "Remove a registered webhook.",
5621
+ "method": "DELETE",
5622
+ "path": "/api/webhooks/{webhook_id}",
3510
5623
  "parameters": {
3511
5624
  "type": "object",
3512
5625
  "properties": {}
@@ -3516,7 +5629,7 @@
3516
5629
  "agent_callable": true,
3517
5630
  "responses": {
3518
5631
  "200": {
3519
- "$ref": "#/components/schemas/ListWebhooksResponse"
5632
+ "$ref": "#/components/schemas/DeleteWebhookResponse"
3520
5633
  },
3521
5634
  "400": {
3522
5635
  "type": "object",
@@ -3577,6 +5690,9 @@
3577
5690
  "error"
3578
5691
  ]
3579
5692
  },
5693
+ "422": {
5694
+ "$ref": "#/components/schemas/HTTPValidationError"
5695
+ },
3580
5696
  "429": {
3581
5697
  "type": "object",
3582
5698
  "properties": {
@@ -3614,19 +5730,20 @@
3614
5730
  }
3615
5731
  },
3616
5732
  {
3617
- "name": "webhook_register",
3618
- "description": "Register an outbound webhook. The create response returns a one-time signing_secret.",
3619
- "method": "POST",
3620
- "path": "/api/webhooks",
5733
+ "name": "webhook_deliveries",
5734
+ "description": "List delivery attempts for a webhook.",
5735
+ "method": "GET",
5736
+ "path": "/api/webhooks/{webhook_id}/deliveries",
3621
5737
  "parameters": {
3622
- "$ref": "#/components/schemas/CreateWebhookRequest"
5738
+ "type": "object",
5739
+ "properties": {}
3623
5740
  },
3624
5741
  "domain": "webhooks",
3625
5742
  "admin_required": false,
3626
5743
  "agent_callable": true,
3627
5744
  "responses": {
3628
- "201": {
3629
- "$ref": "#/components/schemas/CreateWebhookResponse"
5745
+ "200": {
5746
+ "$ref": "#/components/schemas/ListDeliveriesResponse"
3630
5747
  },
3631
5748
  "400": {
3632
5749
  "type": "object",
@@ -3727,19 +5844,20 @@
3727
5844
  }
3728
5845
  },
3729
5846
  {
3730
- "name": "webhook_update",
3731
- "description": "Update url, events, is_active, or headers on an existing webhook.",
3732
- "method": "PUT",
3733
- "path": "/api/webhooks/{webhook_id}",
5847
+ "name": "webhook_events",
5848
+ "description": "List supported outbound event types.",
5849
+ "method": "GET",
5850
+ "path": "/api/webhooks/events",
3734
5851
  "parameters": {
3735
- "$ref": "#/components/schemas/UpdateWebhookRequest"
5852
+ "type": "object",
5853
+ "properties": {}
3736
5854
  },
3737
5855
  "domain": "webhooks",
3738
5856
  "admin_required": false,
3739
5857
  "agent_callable": true,
3740
5858
  "responses": {
3741
5859
  "200": {
3742
- "$ref": "#/components/schemas/UpdateWebhookResponse"
5860
+ "$ref": "#/components/schemas/ListEventTypesResponse"
3743
5861
  },
3744
5862
  "400": {
3745
5863
  "type": "object",
@@ -3840,20 +5958,19 @@
3840
5958
  }
3841
5959
  },
3842
5960
  {
3843
- "name": "webhook_delete",
3844
- "description": "Remove a registered webhook.",
3845
- "method": "DELETE",
3846
- "path": "/api/webhooks/{webhook_id}",
5961
+ "name": "policy_authorize",
5962
+ "description": "Evaluate a named policy against a user/context. Returns allow/deny with reasons.",
5963
+ "method": "POST",
5964
+ "path": "/api/policies/authorize",
3847
5965
  "parameters": {
3848
- "type": "object",
3849
- "properties": {}
5966
+ "$ref": "#/components/schemas/spaps_server_quickstart__domains__policies__schemas__AuthorizeRequest"
3850
5967
  },
3851
- "domain": "webhooks",
5968
+ "domain": "policies",
3852
5969
  "admin_required": false,
3853
5970
  "agent_callable": true,
3854
5971
  "responses": {
3855
5972
  "200": {
3856
- "$ref": "#/components/schemas/DeleteWebhookResponse"
5973
+ "$ref": "#/components/schemas/spaps_server_quickstart__domains__policies__schemas__AuthorizeResponse"
3857
5974
  },
3858
5975
  "400": {
3859
5976
  "type": "object",
@@ -3954,20 +6071,20 @@
3954
6071
  }
3955
6072
  },
3956
6073
  {
3957
- "name": "webhook_deliveries",
3958
- "description": "List delivery attempts for a webhook.",
6074
+ "name": "policy_admin_list",
6075
+ "description": "List policies (is_active filter).",
3959
6076
  "method": "GET",
3960
- "path": "/api/webhooks/{webhook_id}/deliveries",
6077
+ "path": "/api/policies",
3961
6078
  "parameters": {
3962
6079
  "type": "object",
3963
6080
  "properties": {}
3964
6081
  },
3965
- "domain": "webhooks",
3966
- "admin_required": false,
6082
+ "domain": "policies",
6083
+ "admin_required": true,
3967
6084
  "agent_callable": true,
3968
6085
  "responses": {
3969
6086
  "200": {
3970
- "$ref": "#/components/schemas/ListDeliveriesResponse"
6087
+ "$ref": "#/components/schemas/spaps_server_quickstart__domains__policies__schemas__ListPoliciesResponse"
3971
6088
  },
3972
6089
  "400": {
3973
6090
  "type": "object",
@@ -4068,20 +6185,19 @@
4068
6185
  }
4069
6186
  },
4070
6187
  {
4071
- "name": "webhook_events",
4072
- "description": "List supported outbound event types.",
4073
- "method": "GET",
4074
- "path": "/api/webhooks/events",
6188
+ "name": "policy_admin_create",
6189
+ "description": "Create a policy (name, effect, conditions, priority, metadata).",
6190
+ "method": "POST",
6191
+ "path": "/api/policies",
4075
6192
  "parameters": {
4076
- "type": "object",
4077
- "properties": {}
6193
+ "$ref": "#/components/schemas/spaps_server_quickstart__domains__policies__schemas__CreatePolicyRequest"
4078
6194
  },
4079
- "domain": "webhooks",
4080
- "admin_required": false,
6195
+ "domain": "policies",
6196
+ "admin_required": true,
4081
6197
  "agent_callable": true,
4082
6198
  "responses": {
4083
- "200": {
4084
- "$ref": "#/components/schemas/ListEventTypesResponse"
6199
+ "201": {
6200
+ "$ref": "#/components/schemas/spaps_server_quickstart__domains__policies__schemas__PolicyResponse"
4085
6201
  },
4086
6202
  "400": {
4087
6203
  "type": "object",
@@ -4142,6 +6258,9 @@
4142
6258
  "error"
4143
6259
  ]
4144
6260
  },
6261
+ "422": {
6262
+ "$ref": "#/components/schemas/HTTPValidationError"
6263
+ },
4145
6264
  "429": {
4146
6265
  "type": "object",
4147
6266
  "properties": {
@@ -4179,19 +6298,20 @@
4179
6298
  }
4180
6299
  },
4181
6300
  {
4182
- "name": "policy_authorize",
4183
- "description": "Evaluate a named policy against a user/context. Returns allow/deny with reasons.",
4184
- "method": "POST",
4185
- "path": "/api/policies/authorize",
6301
+ "name": "policy_admin_get",
6302
+ "description": "Fetch a single policy.",
6303
+ "method": "GET",
6304
+ "path": "/api/policies/{policy_id}",
4186
6305
  "parameters": {
4187
- "$ref": "#/components/schemas/spaps_server_quickstart__domains__policies__schemas__AuthorizeRequest"
6306
+ "type": "object",
6307
+ "properties": {}
4188
6308
  },
4189
6309
  "domain": "policies",
4190
- "admin_required": false,
6310
+ "admin_required": true,
4191
6311
  "agent_callable": true,
4192
6312
  "responses": {
4193
6313
  "200": {
4194
- "$ref": "#/components/schemas/spaps_server_quickstart__domains__policies__schemas__AuthorizeResponse"
6314
+ "$ref": "#/components/schemas/spaps_server_quickstart__domains__policies__schemas__PolicyResponse"
4195
6315
  },
4196
6316
  "400": {
4197
6317
  "type": "object",
@@ -4292,20 +6412,19 @@
4292
6412
  }
4293
6413
  },
4294
6414
  {
4295
- "name": "policy_admin_list",
4296
- "description": "List policies (is_active filter).",
4297
- "method": "GET",
4298
- "path": "/api/policies",
6415
+ "name": "policy_admin_update",
6416
+ "description": "Partial update of a policy.",
6417
+ "method": "PUT",
6418
+ "path": "/api/policies/{policy_id}",
4299
6419
  "parameters": {
4300
- "type": "object",
4301
- "properties": {}
6420
+ "$ref": "#/components/schemas/spaps_server_quickstart__domains__policies__schemas__UpdatePolicyRequest"
4302
6421
  },
4303
6422
  "domain": "policies",
4304
6423
  "admin_required": true,
4305
6424
  "agent_callable": true,
4306
6425
  "responses": {
4307
6426
  "200": {
4308
- "$ref": "#/components/schemas/spaps_server_quickstart__domains__policies__schemas__ListPoliciesResponse"
6427
+ "$ref": "#/components/schemas/spaps_server_quickstart__domains__policies__schemas__PolicyResponse"
4309
6428
  },
4310
6429
  "400": {
4311
6430
  "type": "object",
@@ -4406,19 +6525,22 @@
4406
6525
  }
4407
6526
  },
4408
6527
  {
4409
- "name": "policy_admin_create",
4410
- "description": "Create a policy (name, effect, conditions, priority, metadata).",
4411
- "method": "POST",
4412
- "path": "/api/policies",
6528
+ "name": "policy_admin_delete",
6529
+ "description": "Delete a policy.",
6530
+ "method": "DELETE",
6531
+ "path": "/api/policies/{policy_id}",
4413
6532
  "parameters": {
4414
- "$ref": "#/components/schemas/spaps_server_quickstart__domains__policies__schemas__CreatePolicyRequest"
6533
+ "type": "object",
6534
+ "properties": {}
4415
6535
  },
4416
6536
  "domain": "policies",
4417
6537
  "admin_required": true,
4418
6538
  "agent_callable": true,
4419
6539
  "responses": {
4420
- "201": {
4421
- "$ref": "#/components/schemas/spaps_server_quickstart__domains__policies__schemas__PolicyResponse"
6540
+ "200": {
6541
+ "type": "object",
6542
+ "additionalProperties": true,
6543
+ "title": "Response Delete Policy Api Policies Policy Id Delete"
4422
6544
  },
4423
6545
  "400": {
4424
6546
  "type": "object",
@@ -4519,10 +6641,10 @@
4519
6641
  }
4520
6642
  },
4521
6643
  {
4522
- "name": "policy_admin_get",
4523
- "description": "Fetch a single policy.",
6644
+ "name": "policy_admin_evaluations",
6645
+ "description": "List policy evaluation audit logs.",
4524
6646
  "method": "GET",
4525
- "path": "/api/policies/{policy_id}",
6647
+ "path": "/api/policies/evaluations",
4526
6648
  "parameters": {
4527
6649
  "type": "object",
4528
6650
  "properties": {}
@@ -4532,7 +6654,7 @@
4532
6654
  "agent_callable": true,
4533
6655
  "responses": {
4534
6656
  "200": {
4535
- "$ref": "#/components/schemas/spaps_server_quickstart__domains__policies__schemas__PolicyResponse"
6657
+ "$ref": "#/components/schemas/EvaluationLogsResponse"
4536
6658
  },
4537
6659
  "400": {
4538
6660
  "type": "object",
@@ -4633,19 +6755,20 @@
4633
6755
  }
4634
6756
  },
4635
6757
  {
4636
- "name": "policy_admin_update",
4637
- "description": "Partial update of a policy.",
4638
- "method": "PUT",
4639
- "path": "/api/policies/{policy_id}",
6758
+ "name": "billing_status",
6759
+ "description": "Show current application billing-account resolution and redacted Stripe diagnostics.",
6760
+ "method": "GET",
6761
+ "path": "/api/admin/billing/status",
4640
6762
  "parameters": {
4641
- "$ref": "#/components/schemas/spaps_server_quickstart__domains__policies__schemas__UpdatePolicyRequest"
6763
+ "type": "object",
6764
+ "properties": {}
4642
6765
  },
4643
- "domain": "policies",
6766
+ "domain": "billing",
4644
6767
  "admin_required": true,
4645
6768
  "agent_callable": true,
4646
6769
  "responses": {
4647
6770
  "200": {
4648
- "$ref": "#/components/schemas/spaps_server_quickstart__domains__policies__schemas__PolicyResponse"
6771
+ "$ref": "#/components/schemas/BillingStatusResponse"
4649
6772
  },
4650
6773
  "400": {
4651
6774
  "type": "object",
@@ -4706,9 +6829,6 @@
4706
6829
  "error"
4707
6830
  ]
4708
6831
  },
4709
- "422": {
4710
- "$ref": "#/components/schemas/HTTPValidationError"
4711
- },
4712
6832
  "429": {
4713
6833
  "type": "object",
4714
6834
  "properties": {
@@ -4746,22 +6866,20 @@
4746
6866
  }
4747
6867
  },
4748
6868
  {
4749
- "name": "policy_admin_delete",
4750
- "description": "Delete a policy.",
4751
- "method": "DELETE",
4752
- "path": "/api/policies/{policy_id}",
6869
+ "name": "billing_verify",
6870
+ "description": "Verify that the current application has usable Stripe secret and webhook configuration.",
6871
+ "method": "GET",
6872
+ "path": "/api/admin/billing/verify",
4753
6873
  "parameters": {
4754
6874
  "type": "object",
4755
6875
  "properties": {}
4756
6876
  },
4757
- "domain": "policies",
6877
+ "domain": "billing",
4758
6878
  "admin_required": true,
4759
6879
  "agent_callable": true,
4760
6880
  "responses": {
4761
6881
  "200": {
4762
- "type": "object",
4763
- "additionalProperties": true,
4764
- "title": "Response Delete Policy Api Policies Policy Id Delete"
6882
+ "$ref": "#/components/schemas/BillingVerifyResponse"
4765
6883
  },
4766
6884
  "400": {
4767
6885
  "type": "object",
@@ -4822,9 +6940,6 @@
4822
6940
  "error"
4823
6941
  ]
4824
6942
  },
4825
- "422": {
4826
- "$ref": "#/components/schemas/HTTPValidationError"
4827
- },
4828
6943
  "429": {
4829
6944
  "type": "object",
4830
6945
  "properties": {
@@ -4862,20 +6977,19 @@
4862
6977
  }
4863
6978
  },
4864
6979
  {
4865
- "name": "policy_admin_evaluations",
4866
- "description": "List policy evaluation audit logs.",
4867
- "method": "GET",
4868
- "path": "/api/policies/evaluations",
6980
+ "name": "billing_attach",
6981
+ "description": "Bind the current application to an existing active Stripe billing account.",
6982
+ "method": "POST",
6983
+ "path": "/api/admin/billing/attach",
4869
6984
  "parameters": {
4870
- "type": "object",
4871
- "properties": {}
6985
+ "$ref": "#/components/schemas/BillingAttachRequest"
4872
6986
  },
4873
- "domain": "policies",
6987
+ "domain": "billing",
4874
6988
  "admin_required": true,
4875
6989
  "agent_callable": true,
4876
6990
  "responses": {
4877
6991
  "200": {
4878
- "$ref": "#/components/schemas/EvaluationLogsResponse"
6992
+ "$ref": "#/components/schemas/BillingAttachResponse"
4879
6993
  },
4880
6994
  "400": {
4881
6995
  "type": "object",
@@ -5277,6 +7391,9 @@
5277
7391
  "error"
5278
7392
  ]
5279
7393
  },
7394
+ "422": {
7395
+ "$ref": "#/components/schemas/HTTPValidationError"
7396
+ },
5280
7397
  "429": {
5281
7398
  "type": "object",
5282
7399
  "properties": {
@@ -5317,7 +7434,7 @@
5317
7434
  "name": "issue_report_get",
5318
7435
  "description": "Fetch a single issue report.",
5319
7436
  "method": "GET",
5320
- "path": "/api/v1/issue-reports/{report_id}",
7437
+ "path": "/api/v1/issue-reports/{issue_report_id}",
5321
7438
  "parameters": {
5322
7439
  "type": "object",
5323
7440
  "properties": {}
@@ -5326,6 +7443,9 @@
5326
7443
  "admin_required": false,
5327
7444
  "agent_callable": true,
5328
7445
  "responses": {
7446
+ "200": {
7447
+ "$ref": "#/components/schemas/IssueReportOut"
7448
+ },
5329
7449
  "400": {
5330
7450
  "type": "object",
5331
7451
  "properties": {
@@ -5385,6 +7505,9 @@
5385
7505
  "error"
5386
7506
  ]
5387
7507
  },
7508
+ "422": {
7509
+ "$ref": "#/components/schemas/HTTPValidationError"
7510
+ },
5388
7511
  "429": {
5389
7512
  "type": "object",
5390
7513
  "properties": {
@@ -5425,15 +7548,17 @@
5425
7548
  "name": "issue_report_update_note",
5426
7549
  "description": "Update the note on an existing report.",
5427
7550
  "method": "PATCH",
5428
- "path": "/api/v1/issue-reports/{report_id}",
7551
+ "path": "/api/v1/issue-reports/{issue_report_id}",
5429
7552
  "parameters": {
5430
- "type": "object",
5431
- "properties": {}
7553
+ "$ref": "#/components/schemas/UpdateIssueReportRequest"
5432
7554
  },
5433
7555
  "domain": "issue_reporting",
5434
7556
  "admin_required": false,
5435
7557
  "agent_callable": true,
5436
7558
  "responses": {
7559
+ "200": {
7560
+ "$ref": "#/components/schemas/IssueReportOut"
7561
+ },
5437
7562
  "400": {
5438
7563
  "type": "object",
5439
7564
  "properties": {
@@ -5493,6 +7618,9 @@
5493
7618
  "error"
5494
7619
  ]
5495
7620
  },
7621
+ "422": {
7622
+ "$ref": "#/components/schemas/HTTPValidationError"
7623
+ },
5496
7624
  "429": {
5497
7625
  "type": "object",
5498
7626
  "properties": {
@@ -5533,15 +7661,17 @@
5533
7661
  "name": "issue_report_reply",
5534
7662
  "description": "Reply to an issue; creates a child report and reopens the linked support case.",
5535
7663
  "method": "POST",
5536
- "path": "/api/v1/issue-reports/{report_id}/replies",
7664
+ "path": "/api/v1/issue-reports/{issue_report_id}/replies",
5537
7665
  "parameters": {
5538
- "type": "object",
5539
- "properties": {}
7666
+ "$ref": "#/components/schemas/ReplyIssueReportRequest"
5540
7667
  },
5541
7668
  "domain": "issue_reporting",
5542
7669
  "admin_required": false,
5543
7670
  "agent_callable": true,
5544
7671
  "responses": {
7672
+ "201": {
7673
+ "$ref": "#/components/schemas/IssueReportOut"
7674
+ },
5545
7675
  "400": {
5546
7676
  "type": "object",
5547
7677
  "properties": {
@@ -5601,6 +7731,9 @@
5601
7731
  "error"
5602
7732
  ]
5603
7733
  },
7734
+ "422": {
7735
+ "$ref": "#/components/schemas/HTTPValidationError"
7736
+ },
5604
7737
  "429": {
5605
7738
  "type": "object",
5606
7739
  "properties": {