@whooshbang/contracts 3.2.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/contract-manifest.json +32 -32
  3. package/dist/generated/artifact-index.d.ts +33 -33
  4. package/dist/generated/artifact-index.js +32 -32
  5. package/dist/generated/interaction-v1.d.ts +1 -1
  6. package/dist/generated/machine-v1.d.ts +1 -1
  7. package/dist/generated/validators-standalone.d.ts +377 -378
  8. package/dist/generated/validators-standalone.js +5070 -4019
  9. package/dist/generated/validators-standalone.js.map +1 -1
  10. package/dist/generated/whooshbang-v1.d.ts +47 -18
  11. package/fixtures/core-v1/fixture-index.json +1 -1
  12. package/fixtures/core-v1/scenarios/api-credential-invalid-indistinguishable.json +1 -1
  13. package/fixtures/core-v1/scenarios/api-credential-one-time-reveal.json +1 -1
  14. package/fixtures/core-v1/scenarios/api-credential-revocation-replay.json +1 -1
  15. package/fixtures/core-v1/scenarios/api-credential-rotation-overlap.json +1 -1
  16. package/fixtures/core-v1/scenarios/cancellation-too-late.json +1 -1
  17. package/fixtures/core-v1/scenarios/cross-organization-project.json +1 -1
  18. package/fixtures/core-v1/scenarios/cross-project-resource.json +1 -1
  19. package/fixtures/core-v1/scenarios/environment-mismatch.json +1 -1
  20. package/fixtures/core-v1/scenarios/idempotency-conflict.json +1 -1
  21. package/fixtures/core-v1/scenarios/idempotency-equivalent-replay.json +1 -1
  22. package/fixtures/core-v1/scenarios/malformed-bearer.json +1 -1
  23. package/fixtures/core-v1/scenarios/metadata-overrun.json +1 -1
  24. package/fixtures/core-v1/scenarios/missing-scope.json +1 -1
  25. package/fixtures/core-v1/scenarios/project-create-equivalent-replay.json +1 -1
  26. package/fixtures/core-v1/scenarios/project-slug-conflict.json +1 -1
  27. package/fixtures/core-v1/scenarios/provider-outcome-unknown.json +1 -1
  28. package/fixtures/core-v1/scenarios/subscription-activation-replay.json +1 -1
  29. package/fixtures/core-v1/scenarios/subscription-authorization-capability-opacity.json +1 -1
  30. package/fixtures/core-v1/scenarios/subscription-cross-connection-callback-rejected.json +1 -1
  31. package/fixtures/core-v1/scenarios/subscription-expired-replay.json +1 -1
  32. package/fixtures/core-v1/scenarios/subscription-selected-connection-replay.json +1 -1
  33. package/fixtures/interaction-machine-v1/scenarios/ack-conflict.json +1 -1
  34. package/fixtures/interaction-machine-v1/scenarios/ack-cross-machine.json +1 -1
  35. package/fixtures/interaction-machine-v1/scenarios/ack-out-of-order.json +1 -1
  36. package/fixtures/interaction-machine-v1/scenarios/ack-replay.json +1 -1
  37. package/fixtures/interaction-machine-v1/scenarios/ambiguous-free-text.json +1 -1
  38. package/fixtures/interaction-machine-v1/scenarios/callback-token-opacity.json +1 -1
  39. package/fixtures/interaction-machine-v1/scenarios/credential-registration-conflict.json +1 -1
  40. package/fixtures/interaction-machine-v1/scenarios/credential-registration-replay.json +1 -1
  41. package/fixtures/interaction-machine-v1/scenarios/credential-revocation-replay.json +1 -1
  42. package/fixtures/interaction-machine-v1/scenarios/credential-rotation.json +1 -1
  43. package/fixtures/interaction-machine-v1/scenarios/first-credential-activates.json +1 -1
  44. package/fixtures/interaction-machine-v1/scenarios/interaction-duplicate.json +1 -1
  45. package/fixtures/interaction-machine-v1/scenarios/interaction-expired.json +1 -1
  46. package/fixtures/interaction-machine-v1/scenarios/interaction-mismatch.json +1 -1
  47. package/fixtures/interaction-machine-v1/scenarios/interaction-retired.json +1 -1
  48. package/fixtures/interaction-machine-v1/scenarios/interaction-stale.json +1 -1
  49. package/fixtures/interaction-machine-v1/scenarios/machine-admin-denied.json +1 -1
  50. package/fixtures/interaction-machine-v1/scenarios/machine-bound-message-create.json +1 -1
  51. package/fixtures/interaction-machine-v1/scenarios/machine-cancel-denied.json +1 -1
  52. package/fixtures/interaction-machine-v1/scenarios/machine-crash-before-ack.json +1 -1
  53. package/fixtures/interaction-machine-v1/scenarios/machine-notifier-mismatch.json +1 -1
  54. package/fixtures/interaction-machine-v1/scenarios/machine-other-message-read.json +1 -1
  55. package/fixtures/interaction-machine-v1/scenarios/machine-owned-message-read.json +1 -1
  56. package/fixtures/interaction-machine-v1/scenarios/machine-subscriber-mismatch.json +1 -1
  57. package/fixtures/interaction-machine-v1/scenarios/poll-uncommitted-cursor-rejected.json +1 -1
  58. package/fixtures/interaction-machine-v1/scenarios/project-credential-machine-endpoint-denied.json +1 -1
  59. package/fixtures/interaction-machine-v1/scenarios/quarantine-integrity-rejected.json +1 -1
  60. package/fixtures/interaction-machine-v1/scenarios/quarantine-signature-rejected.json +1 -1
  61. package/fixtures/interaction-machine-v1/scenarios/quarantine-valid.json +1 -1
  62. package/fixtures/interaction-machine-v1/scenarios/revoked-machine-credential.json +1 -1
  63. package/fixtures/recipient-experience-v1/scenarios/membership-broadcast-snapshot.json +1 -1
  64. package/fixtures/recipient-experience-v1/scenarios/preferred-binding-resolution.json +1 -1
  65. package/fixtures/recipient-experience-v1/scenarios/recipient-session-security.json +1 -1
  66. package/fixtures/recipient-experience-v1/scenarios/subscriber-initial-groups-transaction.json +1 -1
  67. package/fixtures/recipient-experience-v1/success/project-recipient-experience.json +2 -0
  68. package/openapi/generated/whooshbang-v1.bundle.json +137 -24
  69. package/openapi/whooshbang-v1.yaml +32 -3
  70. package/package.json +1 -1
  71. package/schemas/core-scenario.schema.json +1 -1
  72. package/schemas/events/agent-binding-degraded-v1.schema.json +1 -1
  73. package/schemas/events/interaction-expired-v1.schema.json +1 -1
  74. package/schemas/events/interaction-received-v1.schema.json +1 -1
  75. package/schemas/events/message-delivered-v1.schema.json +1 -1
  76. package/schemas/events/message-expired-v1.schema.json +1 -1
  77. package/schemas/events/message-failed-v1.schema.json +1 -1
  78. package/schemas/events/message-provider-accepted-v1.schema.json +1 -1
  79. package/schemas/events/subscription-activated-v1.schema.json +1 -1
  80. package/schemas/events/subscription-revoked-v1.schema.json +1 -1
  81. package/schemas/events/whooshbang-event-v1.schema.json +1 -1
  82. package/schemas/fixture-index.schema.json +1 -1
  83. package/schemas/interaction-machine-scenario.schema.json +1 -1
  84. package/schemas/interaction-v1.schema.json +2 -2
  85. package/schemas/machine-v1.schema.json +1 -1
  86. package/schemas/provider-capabilities-v1.schema.json +1 -1
  87. package/schemas/webhooks/webhook-delivery-case-v1.schema.json +1 -1
  88. package/schemas/webhooks/webhook-signing-vector-v1.schema.json +1 -1
  89. package/schemas/whooshbang-v1.schema.json +109 -22
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://whooshbang.flowxo.com/schemas/whooshbang-v1.schema.json",
4
- "x-contract-version": "3.2.0",
4
+ "x-contract-version": "4.0.0",
5
5
  "title": "WhooshBangV1ContractDocument",
6
6
  "description": "Public request, resource, summary, and Problem Details models for the WhooshBang V1 REST API.",
7
7
  "anyOf": [
@@ -2988,11 +2988,13 @@
2988
2988
  },
2989
2989
  "ProjectRecipientExperience": {
2990
2990
  "type": "object",
2991
- "description": "The project-owned recipient identity, fallback locale, and email answer behavior. Email answers use one click when no setting has been saved.",
2991
+ "description": "The project-owned recipient identity, fallback locale, email answer behavior, and category switch visibility. Email answers use one click when no setting has been saved.",
2992
2992
  "required": [
2993
2993
  "project_id",
2994
2994
  "default_locale",
2995
2995
  "brand",
2996
+ "show_service_category_switches",
2997
+ "show_marketing_category_switches",
2996
2998
  "row_version",
2997
2999
  "updated_at",
2998
3000
  "diagnostic_id"
@@ -3012,6 +3014,14 @@
3012
3014
  "enum": ["one_click", "confirm"],
3013
3015
  "description": "How an email confirm or select button records its bound answer. Defaults to one_click for existing and new projects; free-text answers always use a form."
3014
3016
  },
3017
+ "show_service_category_switches": {
3018
+ "type": "boolean",
3019
+ "description": "Whether subscriber settings show service category switches. A subscriber who already turned a category off still sees its switch. Defaults to true."
3020
+ },
3021
+ "show_marketing_category_switches": {
3022
+ "type": "boolean",
3023
+ "description": "Whether subscriber settings show marketing category switches. A subscriber who already turned a category off still sees its switch. Defaults to true."
3024
+ },
3015
3025
  "row_version": {
3016
3026
  "type": "integer",
3017
3027
  "minimum": 1
@@ -3027,8 +3037,8 @@
3027
3037
  },
3028
3038
  "UpdateProjectRecipientExperienceRequest": {
3029
3039
  "type": "object",
3030
- "description": "Replaces the project-owned recipient brand and fallback locale under the last observed row version. Omission of email_answer_confirmation preserves its current value, or one_click for an unwritten project.",
3031
- "required": ["default_locale", "brand", "row_version"],
3040
+ "description": "Updates supplied project recipient settings under the last observed row version. Omitted fields keep their current values or project defaults.",
3041
+ "required": ["row_version"],
3032
3042
  "properties": {
3033
3043
  "default_locale": {
3034
3044
  "$ref": "#/$defs/RecipientLanguage"
@@ -3041,6 +3051,14 @@
3041
3051
  "enum": ["one_click", "confirm"],
3042
3052
  "description": "Optional project-wide email answer behavior. Omission preserves the current value."
3043
3053
  },
3054
+ "show_service_category_switches": {
3055
+ "type": "boolean",
3056
+ "description": "Show service category switches in subscriber settings. A subscriber who already turned a category off still sees its switch. Omit to keep the current value."
3057
+ },
3058
+ "show_marketing_category_switches": {
3059
+ "type": "boolean",
3060
+ "description": "Show marketing category switches in subscriber settings. A subscriber who already turned a category off still sees its switch. Omit to keep the current value."
3061
+ },
3044
3062
  "row_version": {
3045
3063
  "type": "integer",
3046
3064
  "minimum": 1
@@ -5478,7 +5496,16 @@
5478
5496
  "purpose": { "enum": ["service", "marketing"] },
5479
5497
  "level": { "enum": ["low", "normal", "high", "critical"] },
5480
5498
  "can_turn_off": { "type": "boolean" },
5481
- "is_default": { "type": "boolean" }
5499
+ "is_default": { "type": "boolean" },
5500
+ "opted_out_subscriber_count": {
5501
+ "type": "integer",
5502
+ "minimum": 0,
5503
+ "description": "Number of subscribers in this project who currently have this category switched off. Returned when listing a project's categories."
5504
+ },
5505
+ "archived_at": {
5506
+ "$ref": "#/$defs/Timestamp",
5507
+ "description": "Present only when this category has been archived. Historical messages retain their acceptance-time category snapshot."
5508
+ }
5482
5509
  },
5483
5510
  "additionalProperties": false
5484
5511
  },
@@ -5488,7 +5515,6 @@
5488
5515
  "properties": {
5489
5516
  "items": {
5490
5517
  "type": "array",
5491
- "maxItems": 100,
5492
5518
  "items": { "$ref": "#/$defs/MessageCategory" }
5493
5519
  },
5494
5520
  "total": { "$ref": "#/$defs/ListTotal" }
@@ -5757,6 +5783,7 @@
5757
5783
  "dispatch_pending",
5758
5784
  "queued",
5759
5785
  "sending",
5786
+ "intake_pending",
5760
5787
  "provider_accepted",
5761
5788
  "retry_wait",
5762
5789
  "terminal_failed",
@@ -5958,6 +5985,7 @@
5958
5985
  "dispatch_pending",
5959
5986
  "queued",
5960
5987
  "sending",
5988
+ "intake_pending",
5961
5989
  "provider_accepted",
5962
5990
  "cancelled",
5963
5991
  "expired"
@@ -6051,6 +6079,36 @@
6051
6079
  }
6052
6080
  }
6053
6081
  },
6082
+ {
6083
+ "if": {
6084
+ "type": "object",
6085
+ "properties": {
6086
+ "state": {
6087
+ "const": "intake_pending"
6088
+ }
6089
+ },
6090
+ "required": ["state"]
6091
+ },
6092
+ "then": {
6093
+ "type": "object",
6094
+ "properties": {
6095
+ "delivery": {
6096
+ "allOf": [
6097
+ { "$ref": "#/$defs/DeliveryAttemptSummary" },
6098
+ {
6099
+ "type": "object",
6100
+ "properties": {
6101
+ "attempt_count": { "type": "integer", "minimum": 1 },
6102
+ "highest_proven_provider_state": { "const": "none" },
6103
+ "retry_scheduled": { "const": false },
6104
+ "classified_error": false
6105
+ }
6106
+ }
6107
+ ]
6108
+ }
6109
+ }
6110
+ }
6111
+ },
6054
6112
  {
6055
6113
  "if": {
6056
6114
  "type": "object",
@@ -6250,7 +6308,12 @@
6250
6308
  "type": "object",
6251
6309
  "properties": {
6252
6310
  "state": {
6253
- "enum": ["sending", "provider_accepted", "outcome_unknown"]
6311
+ "enum": [
6312
+ "sending",
6313
+ "intake_pending",
6314
+ "provider_accepted",
6315
+ "outcome_unknown"
6316
+ ]
6254
6317
  },
6255
6318
  "cancellation_effective": {
6256
6319
  "type": "boolean"
@@ -7990,7 +8053,7 @@
7990
8053
  "additionalProperties": false
7991
8054
  },
7992
8055
  "EmailDnsRecord": {
7993
- "description": "One exact neutral DNS record. `name` is preserved exactly as the provider returns it and is relative to the registrable domain (for example `send.notify`, not `send.notify.example.com`).",
8056
+ "description": "One exact neutral DNS record. `name` and `value` are preserved exactly as supplied; a record name may be relative to the registrable domain or a full hostname. DNS consoles differ in whether they append the zone automatically.",
7994
8057
  "oneOf": [
7995
8058
  {
7996
8059
  "type": "object",
@@ -8278,6 +8341,10 @@
8278
8341
  "type": "object",
8279
8342
  "required": ["items", "total"],
8280
8343
  "properties": {
8344
+ "managed_domain_available": {
8345
+ "type": "boolean",
8346
+ "description": "Whether this deployment is configured to offer service-managed custom-domain setup. False is a deployment capability, not a domain readiness verdict."
8347
+ },
8281
8348
  "items": {
8282
8349
  "type": "array",
8283
8350
  "maxItems": 100,
@@ -8304,22 +8371,41 @@
8304
8371
  "additionalProperties": false
8305
8372
  },
8306
8373
  "CreateEmailDomainRequest": {
8307
- "type": "object",
8308
- "description": "Creates or safely adopts one dedicated domain inside an authorized account-owned installation. No provider team id, API key or OAuth credential can be supplied.",
8309
- "required": ["installation_id", "domain"],
8310
- "properties": {
8311
- "installation_id": {
8312
- "$ref": "#/$defs/OpaqueIdentifier"
8313
- },
8314
- "domain": {
8315
- "$ref": "#/$defs/EmailDomainName"
8374
+ "description": "Creates or safely adopts an account-owned domain. Omit backend and installation_id for the default FlowXO Mail service. An existing legacy OAuth installation may still be selected by id.",
8375
+ "oneOf": [
8376
+ {
8377
+ "type": "object",
8378
+ "required": ["installation_id", "domain"],
8379
+ "properties": {
8380
+ "installation_id": {
8381
+ "$ref": "#/$defs/OpaqueIdentifier"
8382
+ },
8383
+ "domain": {
8384
+ "$ref": "#/$defs/EmailDomainName"
8385
+ },
8386
+ "tls": {
8387
+ "enum": ["opportunistic", "enforced"],
8388
+ "default": "opportunistic"
8389
+ }
8390
+ },
8391
+ "additionalProperties": false
8316
8392
  },
8317
- "tls": {
8318
- "enum": ["opportunistic", "enforced"],
8319
- "default": "opportunistic"
8393
+ {
8394
+ "type": "object",
8395
+ "required": ["domain"],
8396
+ "properties": {
8397
+ "backend": { "const": "flowxo_mail" },
8398
+ "domain": {
8399
+ "$ref": "#/$defs/EmailDomainName"
8400
+ },
8401
+ "tls": {
8402
+ "enum": ["opportunistic", "enforced"],
8403
+ "default": "opportunistic"
8404
+ }
8405
+ },
8406
+ "additionalProperties": false
8320
8407
  }
8321
- },
8322
- "additionalProperties": false
8408
+ ]
8323
8409
  },
8324
8410
  "EmailBindingImportRow": {
8325
8411
  "type": "object",
@@ -10360,6 +10446,7 @@
10360
10446
  "accepted",
10361
10447
  "queued",
10362
10448
  "attempt_started",
10449
+ "attempt_intake_pending",
10363
10450
  "attempt_sent",
10364
10451
  "attempt_retry_scheduled",
10365
10452
  "attempt_could_not_send",