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