@whooshbang/contracts 2.0.0 → 2.2.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 (92) hide show
  1. package/CHANGELOG.md +13 -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/validators-standalone.d.ts +577 -447
  6. package/dist/generated/validators-standalone.js +7241 -1096
  7. package/dist/generated/validators-standalone.js.map +1 -1
  8. package/dist/generated/validators.d.ts +11 -1
  9. package/dist/generated/validators.js +11 -1
  10. package/dist/generated/validators.js.map +1 -1
  11. package/dist/generated/whooshbang-v1.d.ts +139 -1
  12. package/dist/index.d.ts +2 -2
  13. package/dist/index.js +1 -1
  14. package/dist/index.js.map +1 -1
  15. package/fixtures/core-v1/fixture-index.json +1 -1
  16. package/fixtures/core-v1/scenarios/api-credential-invalid-indistinguishable.json +1 -1
  17. package/fixtures/core-v1/scenarios/api-credential-one-time-reveal.json +1 -1
  18. package/fixtures/core-v1/scenarios/api-credential-revocation-replay.json +1 -1
  19. package/fixtures/core-v1/scenarios/api-credential-rotation-overlap.json +1 -1
  20. package/fixtures/core-v1/scenarios/cancellation-too-late.json +1 -1
  21. package/fixtures/core-v1/scenarios/cross-organization-project.json +1 -1
  22. package/fixtures/core-v1/scenarios/cross-project-resource.json +1 -1
  23. package/fixtures/core-v1/scenarios/environment-mismatch.json +1 -1
  24. package/fixtures/core-v1/scenarios/idempotency-conflict.json +1 -1
  25. package/fixtures/core-v1/scenarios/idempotency-equivalent-replay.json +1 -1
  26. package/fixtures/core-v1/scenarios/malformed-bearer.json +1 -1
  27. package/fixtures/core-v1/scenarios/metadata-overrun.json +1 -1
  28. package/fixtures/core-v1/scenarios/missing-scope.json +1 -1
  29. package/fixtures/core-v1/scenarios/project-create-equivalent-replay.json +1 -1
  30. package/fixtures/core-v1/scenarios/project-slug-conflict.json +1 -1
  31. package/fixtures/core-v1/scenarios/provider-outcome-unknown.json +1 -1
  32. package/fixtures/core-v1/scenarios/subscription-activation-replay.json +1 -1
  33. package/fixtures/core-v1/scenarios/subscription-authorization-capability-opacity.json +1 -1
  34. package/fixtures/core-v1/scenarios/subscription-cross-connection-callback-rejected.json +1 -1
  35. package/fixtures/core-v1/scenarios/subscription-expired-replay.json +1 -1
  36. package/fixtures/core-v1/scenarios/subscription-selected-connection-replay.json +1 -1
  37. package/fixtures/interaction-machine-v1/scenarios/ack-conflict.json +1 -1
  38. package/fixtures/interaction-machine-v1/scenarios/ack-cross-machine.json +1 -1
  39. package/fixtures/interaction-machine-v1/scenarios/ack-out-of-order.json +1 -1
  40. package/fixtures/interaction-machine-v1/scenarios/ack-replay.json +1 -1
  41. package/fixtures/interaction-machine-v1/scenarios/ambiguous-free-text.json +1 -1
  42. package/fixtures/interaction-machine-v1/scenarios/callback-token-opacity.json +1 -1
  43. package/fixtures/interaction-machine-v1/scenarios/credential-registration-conflict.json +1 -1
  44. package/fixtures/interaction-machine-v1/scenarios/credential-registration-replay.json +1 -1
  45. package/fixtures/interaction-machine-v1/scenarios/credential-revocation-replay.json +1 -1
  46. package/fixtures/interaction-machine-v1/scenarios/credential-rotation.json +1 -1
  47. package/fixtures/interaction-machine-v1/scenarios/first-credential-activates.json +1 -1
  48. package/fixtures/interaction-machine-v1/scenarios/interaction-duplicate.json +1 -1
  49. package/fixtures/interaction-machine-v1/scenarios/interaction-expired.json +1 -1
  50. package/fixtures/interaction-machine-v1/scenarios/interaction-mismatch.json +1 -1
  51. package/fixtures/interaction-machine-v1/scenarios/interaction-retired.json +1 -1
  52. package/fixtures/interaction-machine-v1/scenarios/interaction-stale.json +1 -1
  53. package/fixtures/interaction-machine-v1/scenarios/machine-admin-denied.json +1 -1
  54. package/fixtures/interaction-machine-v1/scenarios/machine-bound-message-create.json +1 -1
  55. package/fixtures/interaction-machine-v1/scenarios/machine-cancel-denied.json +1 -1
  56. package/fixtures/interaction-machine-v1/scenarios/machine-crash-before-ack.json +1 -1
  57. package/fixtures/interaction-machine-v1/scenarios/machine-notifier-mismatch.json +1 -1
  58. package/fixtures/interaction-machine-v1/scenarios/machine-other-message-read.json +1 -1
  59. package/fixtures/interaction-machine-v1/scenarios/machine-owned-message-read.json +1 -1
  60. package/fixtures/interaction-machine-v1/scenarios/machine-subscriber-mismatch.json +1 -1
  61. package/fixtures/interaction-machine-v1/scenarios/poll-uncommitted-cursor-rejected.json +1 -1
  62. package/fixtures/interaction-machine-v1/scenarios/project-credential-machine-endpoint-denied.json +1 -1
  63. package/fixtures/interaction-machine-v1/scenarios/quarantine-integrity-rejected.json +1 -1
  64. package/fixtures/interaction-machine-v1/scenarios/quarantine-signature-rejected.json +1 -1
  65. package/fixtures/interaction-machine-v1/scenarios/quarantine-valid.json +1 -1
  66. package/fixtures/interaction-machine-v1/scenarios/revoked-machine-credential.json +1 -1
  67. package/fixtures/recipient-experience-v1/scenarios/membership-broadcast-snapshot.json +1 -1
  68. package/fixtures/recipient-experience-v1/scenarios/preferred-binding-resolution.json +1 -1
  69. package/fixtures/recipient-experience-v1/scenarios/recipient-session-security.json +1 -1
  70. package/fixtures/recipient-experience-v1/scenarios/subscriber-initial-groups-transaction.json +1 -1
  71. package/openapi/generated/whooshbang-v1.bundle.json +1359 -771
  72. package/openapi/whooshbang-v1.yaml +291 -2
  73. package/package.json +1 -1
  74. package/schemas/core-scenario.schema.json +1 -1
  75. package/schemas/events/agent-binding-degraded-v1.schema.json +1 -1
  76. package/schemas/events/interaction-expired-v1.schema.json +1 -1
  77. package/schemas/events/interaction-received-v1.schema.json +1 -1
  78. package/schemas/events/message-delivered-v1.schema.json +1 -1
  79. package/schemas/events/message-expired-v1.schema.json +1 -1
  80. package/schemas/events/message-failed-v1.schema.json +1 -1
  81. package/schemas/events/message-provider-accepted-v1.schema.json +1 -1
  82. package/schemas/events/subscription-activated-v1.schema.json +1 -1
  83. package/schemas/events/subscription-revoked-v1.schema.json +1 -1
  84. package/schemas/events/whooshbang-event-v1.schema.json +1 -1
  85. package/schemas/fixture-index.schema.json +1 -1
  86. package/schemas/interaction-machine-scenario.schema.json +1 -1
  87. package/schemas/interaction-v1.schema.json +1 -1
  88. package/schemas/machine-v1.schema.json +1 -1
  89. package/schemas/provider-capabilities-v1.schema.json +1 -1
  90. package/schemas/webhooks/webhook-delivery-case-v1.schema.json +1 -1
  91. package/schemas/webhooks/webhook-signing-vector-v1.schema.json +1 -1
  92. package/schemas/whooshbang-v1.schema.json +391 -1
@@ -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": "2.0.0",
4
+ "x-contract-version": "2.2.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": [
@@ -364,6 +364,36 @@
364
364
  },
365
365
  {
366
366
  "$ref": "#/$defs/ConfirmSubscriptionChangeRequest"
367
+ },
368
+ {
369
+ "$ref": "#/$defs/Operator"
370
+ },
371
+ {
372
+ "$ref": "#/$defs/OperatorCollection"
373
+ },
374
+ {
375
+ "$ref": "#/$defs/OperatorResolution"
376
+ },
377
+ {
378
+ "$ref": "#/$defs/CreateOperatorMessageRequest"
379
+ },
380
+ {
381
+ "$ref": "#/$defs/OperatorMessageResult"
382
+ },
383
+ {
384
+ "$ref": "#/$defs/OperatorBroadcastRecipient"
385
+ },
386
+ {
387
+ "$ref": "#/$defs/OperatorBroadcast"
388
+ },
389
+ {
390
+ "$ref": "#/$defs/OperatorPreferences"
391
+ },
392
+ {
393
+ "$ref": "#/$defs/OperatorConnectRequest"
394
+ },
395
+ {
396
+ "$ref": "#/$defs/WhoAmI"
367
397
  }
368
398
  ],
369
399
  "$defs": {
@@ -11499,6 +11529,366 @@
11499
11529
  }
11500
11530
  },
11501
11531
  "additionalProperties": false
11532
+ },
11533
+ "Operator": {
11534
+ "type": "object",
11535
+ "description": "A safe, membership-derived operator in the authorized project. No email, provider identifiers or credentials are exposed.",
11536
+ "required": ["id", "name", "role", "readiness", "preferences_url"],
11537
+ "properties": {
11538
+ "id": {
11539
+ "type": "string",
11540
+ "minLength": 1,
11541
+ "maxLength": 128
11542
+ },
11543
+ "name": {
11544
+ "type": "string",
11545
+ "minLength": 1,
11546
+ "maxLength": 256
11547
+ },
11548
+ "role": {
11549
+ "enum": ["admin", "member", "messenger"]
11550
+ },
11551
+ "readiness": {
11552
+ "enum": ["ready", "channel_unavailable"]
11553
+ },
11554
+ "preferred_channel": {
11555
+ "$ref": "#/$defs/Channel"
11556
+ },
11557
+ "preferences_url": {
11558
+ "type": "string",
11559
+ "format": "uri"
11560
+ },
11561
+ "setup_reason": {
11562
+ "type": "string",
11563
+ "minLength": 1,
11564
+ "maxLength": 512,
11565
+ "description": "An actionable platform setup reason when the default shared email setup is missing, ambiguous or unavailable."
11566
+ }
11567
+ },
11568
+ "additionalProperties": false
11569
+ },
11570
+ "OperatorCollection": {
11571
+ "type": "object",
11572
+ "description": "Read-only predefined operators audience, filtered to current account and project membership.",
11573
+ "required": ["group", "items", "total"],
11574
+ "properties": {
11575
+ "group": {
11576
+ "const": "operators"
11577
+ },
11578
+ "items": {
11579
+ "type": "array",
11580
+ "items": {
11581
+ "$ref": "#/$defs/Operator"
11582
+ }
11583
+ },
11584
+ "total": {
11585
+ "$ref": "#/$defs/ListTotal"
11586
+ },
11587
+ "next_cursor": {
11588
+ "type": "string",
11589
+ "minLength": 1,
11590
+ "maxLength": 128
11591
+ },
11592
+ "page": {
11593
+ "$ref": "#/$defs/ListPageNumber"
11594
+ },
11595
+ "page_size": {
11596
+ "$ref": "#/$defs/ListPageSize"
11597
+ }
11598
+ },
11599
+ "additionalProperties": false
11600
+ },
11601
+ "OperatorResolution": {
11602
+ "type": "object",
11603
+ "description": "Exact normalized name or stable operator identity. Duplicate names are never guessed.",
11604
+ "required": ["outcome", "choices"],
11605
+ "properties": {
11606
+ "outcome": {
11607
+ "enum": ["resolved", "ambiguous", "not_found"]
11608
+ },
11609
+ "choices": {
11610
+ "type": "array",
11611
+ "items": {
11612
+ "$ref": "#/$defs/Operator"
11613
+ }
11614
+ }
11615
+ },
11616
+ "additionalProperties": false
11617
+ },
11618
+ "CreateOperatorMessageRequest": {
11619
+ "type": "object",
11620
+ "description": "Send to a teammate by exact name or operator ID, or use me. Omitted recipient means the verified authenticated human only. Shared and service credentials must name a recipient. Preferred channel, service-email billing and marketing restrictions still apply.",
11621
+ "required": ["content"],
11622
+ "properties": {
11623
+ "recipient": {
11624
+ "type": "string",
11625
+ "minLength": 1,
11626
+ "maxLength": 128
11627
+ },
11628
+ "content": {
11629
+ "$ref": "#/$defs/MessageContent"
11630
+ },
11631
+ "expires_at": {
11632
+ "$ref": "#/$defs/Timestamp",
11633
+ "description": "Optional server-authoritative expiry no more than 24 hours after acceptance."
11634
+ },
11635
+ "correlation_id": {
11636
+ "type": "string",
11637
+ "minLength": 1,
11638
+ "maxLength": 128
11639
+ },
11640
+ "metadata": {
11641
+ "$ref": "#/$defs/Metadata"
11642
+ },
11643
+ "interaction": {
11644
+ "$ref": "interaction-v1.schema.json#/$defs/InteractionRequest"
11645
+ },
11646
+ "purpose": {
11647
+ "enum": ["service", "marketing"],
11648
+ "default": "service",
11649
+ "description": "Omitted means service. Marketing refuses service-only bindings before charging and at every delayed dispatch."
11650
+ }
11651
+ },
11652
+ "additionalProperties": false
11653
+ },
11654
+ "OperatorMessageResult": {
11655
+ "type": "object",
11656
+ "description": "Readable acceptance or refusal. Accepted means queued, never proof of provider delivery.",
11657
+ "required": ["outcome", "choices", "detail"],
11658
+ "properties": {
11659
+ "outcome": {
11660
+ "enum": [
11661
+ "accepted",
11662
+ "ambiguous",
11663
+ "not_found",
11664
+ "recipient_required",
11665
+ "channel_unavailable"
11666
+ ]
11667
+ },
11668
+ "choices": {
11669
+ "type": "array",
11670
+ "items": {
11671
+ "$ref": "#/$defs/Operator"
11672
+ }
11673
+ },
11674
+ "detail": {
11675
+ "type": "string",
11676
+ "minLength": 1,
11677
+ "maxLength": 1024
11678
+ },
11679
+ "message": {
11680
+ "$ref": "#/$defs/Message"
11681
+ },
11682
+ "preferences_url": {
11683
+ "type": "string",
11684
+ "format": "uri"
11685
+ }
11686
+ },
11687
+ "additionalProperties": false
11688
+ },
11689
+ "OperatorBroadcastRecipient": {
11690
+ "type": "object",
11691
+ "description": "Per-person broadcast result. Sent requires provider acceptance; skipped includes removed membership or an unavailable destination.",
11692
+ "required": ["operator_id", "outcome"],
11693
+ "properties": {
11694
+ "operator_id": {
11695
+ "type": "string",
11696
+ "minLength": 1,
11697
+ "maxLength": 128
11698
+ },
11699
+ "name": {
11700
+ "type": "string"
11701
+ },
11702
+ "outcome": {
11703
+ "enum": ["pending", "sent", "skipped", "failed"]
11704
+ },
11705
+ "message_id": {
11706
+ "type": "string",
11707
+ "minLength": 1,
11708
+ "maxLength": 128
11709
+ },
11710
+ "reason": {
11711
+ "type": "string"
11712
+ }
11713
+ },
11714
+ "additionalProperties": false
11715
+ },
11716
+ "OperatorBroadcast": {
11717
+ "type": "object",
11718
+ "description": "Durable operators broadcast using ordinary child messages and charging. Read again for provider outcomes.",
11719
+ "required": ["broadcast", "recipients"],
11720
+ "properties": {
11721
+ "broadcast": {
11722
+ "$ref": "#/$defs/GroupBroadcast"
11723
+ },
11724
+ "recipients": {
11725
+ "type": "array",
11726
+ "items": {
11727
+ "$ref": "#/$defs/OperatorBroadcastRecipient"
11728
+ }
11729
+ }
11730
+ },
11731
+ "additionalProperties": false
11732
+ },
11733
+ "OperatorPreferences": {
11734
+ "type": "object",
11735
+ "description": "The authenticated person’s own destinations and preferred channel in this project. Shared credentials cannot manage a human’s preferences.",
11736
+ "required": ["operator", "settings", "connections"],
11737
+ "properties": {
11738
+ "operator": {
11739
+ "$ref": "#/$defs/Operator"
11740
+ },
11741
+ "settings": {
11742
+ "$ref": "#/$defs/SubscriberChannelSettings"
11743
+ },
11744
+ "connections": {
11745
+ "type": "array",
11746
+ "items": {
11747
+ "type": "object",
11748
+ "description": "An available personal connection route.",
11749
+ "required": ["id", "channel", "name"],
11750
+ "properties": {
11751
+ "id": {
11752
+ "type": "string",
11753
+ "minLength": 1,
11754
+ "maxLength": 128
11755
+ },
11756
+ "channel": {
11757
+ "$ref": "#/$defs/Channel"
11758
+ },
11759
+ "name": {
11760
+ "type": "string"
11761
+ }
11762
+ },
11763
+ "additionalProperties": false
11764
+ }
11765
+ }
11766
+ },
11767
+ "additionalProperties": false
11768
+ },
11769
+ "OperatorConnectRequest": {
11770
+ "type": "object",
11771
+ "description": "Connect the signed-in person’s own destination through a configured channel. This never changes another person’s channels.",
11772
+ "required": ["connection_id", "channel"],
11773
+ "properties": {
11774
+ "connection_id": {
11775
+ "type": "string",
11776
+ "minLength": 1,
11777
+ "maxLength": 128
11778
+ },
11779
+ "channel": {
11780
+ "enum": ["telegram", "slack"]
11781
+ }
11782
+ },
11783
+ "additionalProperties": false
11784
+ },
11785
+ "WhoAmI": {
11786
+ "type": "object",
11787
+ "description": "Current principal, authorized context, safe channel readiness and deterministic personal me identity. Contains no email or provider destination.",
11788
+ "required": ["principal", "context", "capabilities", "detail"],
11789
+ "properties": {
11790
+ "principal": {
11791
+ "type": "object",
11792
+ "description": "The credential actually authenticated for this request; service identity never implies its creator is the recipient.",
11793
+ "required": ["type", "id"],
11794
+ "properties": {
11795
+ "type": {
11796
+ "enum": [
11797
+ "personal_session",
11798
+ "personal_mcp",
11799
+ "project_credential",
11800
+ "organization_credential",
11801
+ "machine_client"
11802
+ ]
11803
+ },
11804
+ "id": {
11805
+ "type": "string",
11806
+ "minLength": 1,
11807
+ "maxLength": 128
11808
+ }
11809
+ },
11810
+ "additionalProperties": false
11811
+ },
11812
+ "context": {
11813
+ "type": "object",
11814
+ "description": "Explicit authorized account and project context. No context is guessed across tenants.",
11815
+ "required": [
11816
+ "organization_id",
11817
+ "project_id",
11818
+ "environment_id",
11819
+ "environment"
11820
+ ],
11821
+ "properties": {
11822
+ "organization_id": {
11823
+ "type": "string",
11824
+ "minLength": 1,
11825
+ "maxLength": 128
11826
+ },
11827
+ "project_id": {
11828
+ "type": "string",
11829
+ "minLength": 1,
11830
+ "maxLength": 128
11831
+ },
11832
+ "environment_id": {
11833
+ "type": "string",
11834
+ "minLength": 1,
11835
+ "maxLength": 128
11836
+ },
11837
+ "environment": {
11838
+ "enum": ["test", "live"]
11839
+ }
11840
+ },
11841
+ "additionalProperties": false
11842
+ },
11843
+ "capabilities": {
11844
+ "type": "object",
11845
+ "description": "Current messaging permissions; quota, binding readiness and provider gates still apply per send.",
11846
+ "required": [
11847
+ "can_message_self",
11848
+ "can_message_teammates",
11849
+ "can_broadcast_operators"
11850
+ ],
11851
+ "properties": {
11852
+ "can_message_self": {
11853
+ "type": "boolean"
11854
+ },
11855
+ "can_message_teammates": {
11856
+ "type": "boolean"
11857
+ },
11858
+ "can_broadcast_operators": {
11859
+ "type": "boolean"
11860
+ }
11861
+ },
11862
+ "additionalProperties": false
11863
+ },
11864
+ "user": {
11865
+ "type": "object",
11866
+ "description": "Verified authenticated human identity. Absent for shared/service credentials.",
11867
+ "required": ["id", "name"],
11868
+ "properties": {
11869
+ "id": {
11870
+ "type": "string",
11871
+ "minLength": 1,
11872
+ "maxLength": 128
11873
+ },
11874
+ "name": {
11875
+ "type": "string",
11876
+ "minLength": 1,
11877
+ "maxLength": 256
11878
+ }
11879
+ },
11880
+ "additionalProperties": false
11881
+ },
11882
+ "me": {
11883
+ "$ref": "#/$defs/Operator"
11884
+ },
11885
+ "detail": {
11886
+ "type": "string",
11887
+ "minLength": 1,
11888
+ "maxLength": 1024
11889
+ }
11890
+ },
11891
+ "additionalProperties": false
11502
11892
  }
11503
11893
  }
11504
11894
  }