@whooshbang/contracts 1.0.0-rc.21 → 1.0.0-rc.22

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 (97) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/contract-manifest.json +34 -32
  3. package/dist/generated/artifact-index.d.ts +34 -34
  4. package/dist/generated/artifact-index.js +34 -32
  5. package/dist/generated/artifact-index.js.map +1 -1
  6. package/dist/generated/validators-standalone.d.ts +340 -288
  7. package/dist/generated/validators-standalone.js +5459 -2824
  8. package/dist/generated/validators-standalone.js.map +1 -1
  9. package/dist/generated/validators.d.ts +5 -1
  10. package/dist/generated/validators.js +5 -1
  11. package/dist/generated/validators.js.map +1 -1
  12. package/dist/generated/whooshbang-v1.d.ts +89 -3
  13. package/dist/index.d.ts +2 -2
  14. package/dist/index.js +1 -1
  15. package/dist/index.js.map +1 -1
  16. package/fixtures/core-v1/fixture-index.json +17 -1
  17. package/fixtures/core-v1/problems/live-simulator-refused.json +16 -0
  18. package/fixtures/core-v1/requests/update-project.json +3 -0
  19. package/fixtures/core-v1/scenarios/api-credential-invalid-indistinguishable.json +1 -1
  20. package/fixtures/core-v1/scenarios/api-credential-one-time-reveal.json +1 -1
  21. package/fixtures/core-v1/scenarios/api-credential-revocation-replay.json +1 -1
  22. package/fixtures/core-v1/scenarios/api-credential-rotation-overlap.json +1 -1
  23. package/fixtures/core-v1/scenarios/cancellation-too-late.json +1 -1
  24. package/fixtures/core-v1/scenarios/cross-account-project.json +1 -1
  25. package/fixtures/core-v1/scenarios/cross-project-resource.json +1 -1
  26. package/fixtures/core-v1/scenarios/environment-mismatch.json +1 -1
  27. package/fixtures/core-v1/scenarios/idempotency-conflict.json +1 -1
  28. package/fixtures/core-v1/scenarios/idempotency-equivalent-replay.json +1 -1
  29. package/fixtures/core-v1/scenarios/malformed-bearer.json +1 -1
  30. package/fixtures/core-v1/scenarios/metadata-overrun.json +1 -1
  31. package/fixtures/core-v1/scenarios/missing-scope.json +1 -1
  32. package/fixtures/core-v1/scenarios/project-create-equivalent-replay.json +1 -1
  33. package/fixtures/core-v1/scenarios/project-slug-conflict.json +1 -1
  34. package/fixtures/core-v1/scenarios/provider-outcome-unknown.json +1 -1
  35. package/fixtures/core-v1/scenarios/subscription-activation-replay.json +1 -1
  36. package/fixtures/core-v1/scenarios/subscription-authorization-capability-opacity.json +1 -1
  37. package/fixtures/core-v1/scenarios/subscription-cross-connection-callback-rejected.json +1 -1
  38. package/fixtures/core-v1/scenarios/subscription-expired-replay.json +1 -1
  39. package/fixtures/core-v1/scenarios/subscription-selected-connection-replay.json +1 -1
  40. package/fixtures/core-v1/success/project-collection.json +2 -1
  41. package/fixtures/core-v1/success/project-created.json +2 -1
  42. package/fixtures/interaction-machine-v1/scenarios/ack-conflict.json +1 -1
  43. package/fixtures/interaction-machine-v1/scenarios/ack-cross-machine.json +1 -1
  44. package/fixtures/interaction-machine-v1/scenarios/ack-out-of-order.json +1 -1
  45. package/fixtures/interaction-machine-v1/scenarios/ack-replay.json +1 -1
  46. package/fixtures/interaction-machine-v1/scenarios/ambiguous-free-text.json +1 -1
  47. package/fixtures/interaction-machine-v1/scenarios/callback-token-opacity.json +1 -1
  48. package/fixtures/interaction-machine-v1/scenarios/credential-registration-conflict.json +1 -1
  49. package/fixtures/interaction-machine-v1/scenarios/credential-registration-replay.json +1 -1
  50. package/fixtures/interaction-machine-v1/scenarios/credential-revocation-replay.json +1 -1
  51. package/fixtures/interaction-machine-v1/scenarios/credential-rotation.json +1 -1
  52. package/fixtures/interaction-machine-v1/scenarios/first-credential-activates.json +1 -1
  53. package/fixtures/interaction-machine-v1/scenarios/interaction-duplicate.json +1 -1
  54. package/fixtures/interaction-machine-v1/scenarios/interaction-expired.json +1 -1
  55. package/fixtures/interaction-machine-v1/scenarios/interaction-mismatch.json +1 -1
  56. package/fixtures/interaction-machine-v1/scenarios/interaction-retired.json +1 -1
  57. package/fixtures/interaction-machine-v1/scenarios/interaction-stale.json +1 -1
  58. package/fixtures/interaction-machine-v1/scenarios/machine-admin-denied.json +1 -1
  59. package/fixtures/interaction-machine-v1/scenarios/machine-bound-message-create.json +1 -1
  60. package/fixtures/interaction-machine-v1/scenarios/machine-cancel-denied.json +1 -1
  61. package/fixtures/interaction-machine-v1/scenarios/machine-crash-before-ack.json +1 -1
  62. package/fixtures/interaction-machine-v1/scenarios/machine-notifier-mismatch.json +1 -1
  63. package/fixtures/interaction-machine-v1/scenarios/machine-other-message-read.json +1 -1
  64. package/fixtures/interaction-machine-v1/scenarios/machine-owned-message-read.json +1 -1
  65. package/fixtures/interaction-machine-v1/scenarios/machine-subscriber-mismatch.json +1 -1
  66. package/fixtures/interaction-machine-v1/scenarios/poll-uncommitted-cursor-rejected.json +1 -1
  67. package/fixtures/interaction-machine-v1/scenarios/project-credential-machine-endpoint-denied.json +1 -1
  68. package/fixtures/interaction-machine-v1/scenarios/quarantine-integrity-rejected.json +1 -1
  69. package/fixtures/interaction-machine-v1/scenarios/quarantine-signature-rejected.json +1 -1
  70. package/fixtures/interaction-machine-v1/scenarios/quarantine-valid.json +1 -1
  71. package/fixtures/interaction-machine-v1/scenarios/revoked-machine-credential.json +1 -1
  72. package/fixtures/recipient-experience-v1/scenarios/membership-broadcast-snapshot.json +1 -1
  73. package/fixtures/recipient-experience-v1/scenarios/preferred-binding-resolution.json +1 -1
  74. package/fixtures/recipient-experience-v1/scenarios/recipient-session-security.json +1 -1
  75. package/fixtures/recipient-experience-v1/scenarios/subscriber-initial-groups-transaction.json +1 -1
  76. package/openapi/generated/whooshbang-v1.bundle.json +360 -11
  77. package/openapi/whooshbang-v1.yaml +216 -2
  78. package/package.json +1 -1
  79. package/schemas/core-scenario.schema.json +1 -1
  80. package/schemas/events/agent-binding-degraded-v1.schema.json +1 -1
  81. package/schemas/events/interaction-expired-v1.schema.json +1 -1
  82. package/schemas/events/interaction-received-v1.schema.json +1 -1
  83. package/schemas/events/message-delivered-v1.schema.json +1 -1
  84. package/schemas/events/message-expired-v1.schema.json +1 -1
  85. package/schemas/events/message-failed-v1.schema.json +1 -1
  86. package/schemas/events/message-provider-accepted-v1.schema.json +1 -1
  87. package/schemas/events/subscription-activated-v1.schema.json +1 -1
  88. package/schemas/events/subscription-revoked-v1.schema.json +1 -1
  89. package/schemas/events/whooshbang-event-v1.schema.json +1 -1
  90. package/schemas/fixture-index.schema.json +1 -1
  91. package/schemas/interaction-machine-scenario.schema.json +1 -1
  92. package/schemas/interaction-v1.schema.json +1 -1
  93. package/schemas/machine-v1.schema.json +1 -1
  94. package/schemas/provider-capabilities-v1.schema.json +1 -1
  95. package/schemas/webhooks/webhook-delivery-case-v1.schema.json +1 -1
  96. package/schemas/webhooks/webhook-signing-vector-v1.schema.json +1 -1
  97. package/schemas/whooshbang-v1.schema.json +225 -3
@@ -1,19 +1,31 @@
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": "1.0.0-rc.21",
4
+ "x-contract-version": "1.0.0-rc.22",
5
5
  "title": "WhooshBangV1ContractDocument",
6
6
  "description": "Public request, resource, summary, and Problem Details models for the WhooshBang V1 REST API.",
7
7
  "anyOf": [
8
8
  {
9
9
  "$ref": "#/$defs/AccountProjection"
10
10
  },
11
+ {
12
+ "$ref": "#/$defs/CloseAccountRequest"
13
+ },
14
+ {
15
+ "$ref": "#/$defs/AccountClosureResult"
16
+ },
11
17
  {
12
18
  "$ref": "#/$defs/CreateProjectRequest"
13
19
  },
14
20
  {
15
21
  "$ref": "#/$defs/Project"
16
22
  },
23
+ {
24
+ "$ref": "#/$defs/UpdateProjectRequest"
25
+ },
26
+ {
27
+ "$ref": "#/$defs/PrivacyMode"
28
+ },
17
29
  {
18
30
  "$ref": "#/$defs/ProjectCollection"
19
31
  },
@@ -182,6 +194,9 @@
182
194
  {
183
195
  "$ref": "#/$defs/Subscriber"
184
196
  },
197
+ {
198
+ "$ref": "#/$defs/SubscriberDataExport"
199
+ },
185
200
  {
186
201
  "$ref": "#/$defs/CreateRecipientGroupRequest"
187
202
  },
@@ -372,6 +387,59 @@
372
387
  },
373
388
  "additionalProperties": false
374
389
  },
390
+ "CloseAccountRequest": {
391
+ "type": "object",
392
+ "description": "Exact, explicit confirmation that the current account administrator intends to close the whole account.",
393
+ "required": ["confirmation"],
394
+ "properties": {
395
+ "confirmation": {
396
+ "type": "string",
397
+ "const": "close-account"
398
+ }
399
+ },
400
+ "additionalProperties": false
401
+ },
402
+ "AccountClosureProviderAction": {
403
+ "type": "object",
404
+ "description": "One provider-owned resource the customer must retire outside WhooshBang after account closure. It contains safe identifiers only, never provider credentials.",
405
+ "required": ["provider", "action", "connection_id"],
406
+ "properties": {
407
+ "provider": {
408
+ "type": "string",
409
+ "enum": ["telegram", "slack"]
410
+ },
411
+ "action": {
412
+ "type": "string",
413
+ "enum": ["revoke_bot_token", "delete_provider_application"]
414
+ },
415
+ "connection_id": {
416
+ "$ref": "#/$defs/OpaqueIdentifier"
417
+ }
418
+ },
419
+ "additionalProperties": false
420
+ },
421
+ "AccountClosureResult": {
422
+ "type": "object",
423
+ "description": "Terminal account-closure result. Repeating closure returns the same closed_at and any provider-owned resources that still require manual retirement.",
424
+ "required": ["status", "closed_at", "provider_actions_required"],
425
+ "properties": {
426
+ "status": {
427
+ "type": "string",
428
+ "const": "closed"
429
+ },
430
+ "closed_at": {
431
+ "$ref": "#/$defs/Timestamp"
432
+ },
433
+ "provider_actions_required": {
434
+ "type": "array",
435
+ "uniqueItems": true,
436
+ "items": {
437
+ "$ref": "#/$defs/AccountClosureProviderAction"
438
+ }
439
+ }
440
+ },
441
+ "additionalProperties": false
442
+ },
375
443
  "CreateProjectRequest": {
376
444
  "type": "object",
377
445
  "description": "Creates one project inside the account selected by the authenticated human session.",
@@ -392,6 +460,10 @@
392
460
  "$ref": "#/$defs/RecipientLanguage",
393
461
  "default": "en",
394
462
  "description": "The application fallback locale for recipient-owned surfaces when no session, subscriber, or supported provider locale is available."
463
+ },
464
+ "privacy_mode": {
465
+ "$ref": "#/$defs/PrivacyMode",
466
+ "default": "minimal"
395
467
  }
396
468
  },
397
469
  "additionalProperties": false
@@ -463,7 +535,8 @@
463
535
  "environments",
464
536
  "created_at",
465
537
  "updated_at",
466
- "diagnostic_id"
538
+ "diagnostic_id",
539
+ "privacy_mode"
467
540
  ],
468
541
  "properties": {
469
542
  "id": {
@@ -507,6 +580,9 @@
507
580
  },
508
581
  "diagnostic_id": {
509
582
  "$ref": "#/$defs/DiagnosticId"
583
+ },
584
+ "privacy_mode": {
585
+ "$ref": "#/$defs/PrivacyMode"
510
586
  }
511
587
  },
512
588
  "additionalProperties": false
@@ -1969,6 +2045,115 @@
1969
2045
  },
1970
2046
  "additionalProperties": false
1971
2047
  },
2048
+ "SubscriberDataExportRecord": {
2049
+ "type": "object",
2050
+ "description": "One semantic record held about the subscriber. The source names the durable store or recovered semantic value; data contains plaintext business fields and excludes custody metadata and secrets.",
2051
+ "required": ["source", "data"],
2052
+ "properties": {
2053
+ "source": {
2054
+ "type": "string",
2055
+ "minLength": 1,
2056
+ "maxLength": 96,
2057
+ "pattern": "^[a-z][a-z0-9_.-]*$"
2058
+ },
2059
+ "data": {
2060
+ "type": "object",
2061
+ "additionalProperties": true
2062
+ }
2063
+ },
2064
+ "additionalProperties": false
2065
+ },
2066
+ "SubscriberDataExportExcludedControllerData": {
2067
+ "type": "object",
2068
+ "description": "A category deliberately outside the customer-controller artifact because WhooshBang is controller for it.",
2069
+ "required": ["category", "controller", "access"],
2070
+ "properties": {
2071
+ "category": {
2072
+ "type": "string",
2073
+ "enum": ["consent_lifecycle_audit", "service_logs"]
2074
+ },
2075
+ "controller": {
2076
+ "type": "string",
2077
+ "const": "whooshbang"
2078
+ },
2079
+ "access": {
2080
+ "type": "string",
2081
+ "const": "separate_recipient_request_required"
2082
+ }
2083
+ },
2084
+ "additionalProperties": false
2085
+ },
2086
+ "SubscriberDataExport": {
2087
+ "type": "object",
2088
+ "description": "A complete customer-controller access artifact for one subscriber across every environment in one project. provided_by_subscriber is the Article 20 portable subset; all three record groups together are the Article 15 access copy. WhooshBang-controller records are named but never mixed into the customer export.",
2089
+ "required": [
2090
+ "format",
2091
+ "generated_at",
2092
+ "controller_scope",
2093
+ "project_id",
2094
+ "environment_ids",
2095
+ "subscriber_id",
2096
+ "provided_by_subscriber",
2097
+ "provided_by_customer",
2098
+ "derived_by_service",
2099
+ "excluded_controller_data"
2100
+ ],
2101
+ "properties": {
2102
+ "format": {
2103
+ "type": "string",
2104
+ "const": "whooshbang.subscriber-data-export.v1"
2105
+ },
2106
+ "generated_at": {
2107
+ "$ref": "#/$defs/Timestamp"
2108
+ },
2109
+ "controller_scope": {
2110
+ "type": "string",
2111
+ "const": "customer"
2112
+ },
2113
+ "project_id": {
2114
+ "$ref": "#/$defs/OpaqueIdentifier"
2115
+ },
2116
+ "environment_ids": {
2117
+ "type": "array",
2118
+ "minItems": 1,
2119
+ "uniqueItems": true,
2120
+ "items": {
2121
+ "$ref": "#/$defs/OpaqueIdentifier"
2122
+ }
2123
+ },
2124
+ "subscriber_id": {
2125
+ "$ref": "#/$defs/OpaqueIdentifier"
2126
+ },
2127
+ "provided_by_subscriber": {
2128
+ "type": "array",
2129
+ "items": {
2130
+ "$ref": "#/$defs/SubscriberDataExportRecord"
2131
+ }
2132
+ },
2133
+ "provided_by_customer": {
2134
+ "type": "array",
2135
+ "items": {
2136
+ "$ref": "#/$defs/SubscriberDataExportRecord"
2137
+ }
2138
+ },
2139
+ "derived_by_service": {
2140
+ "type": "array",
2141
+ "items": {
2142
+ "$ref": "#/$defs/SubscriberDataExportRecord"
2143
+ }
2144
+ },
2145
+ "excluded_controller_data": {
2146
+ "type": "array",
2147
+ "minItems": 2,
2148
+ "maxItems": 2,
2149
+ "uniqueItems": true,
2150
+ "items": {
2151
+ "$ref": "#/$defs/SubscriberDataExportExcludedControllerData"
2152
+ }
2153
+ }
2154
+ },
2155
+ "additionalProperties": false
2156
+ },
1972
2157
  "CreateRecipientGroupRequest": {
1973
2158
  "type": "object",
1974
2159
  "description": "Creates one static, developer-managed recipient group.",
@@ -3237,7 +3422,7 @@
3237
3422
  },
3238
3423
  "delivery_target": {
3239
3424
  "$ref": "#/$defs/MessageDeliveryTarget",
3240
- "description": "Optional routing override. Omit for notifier-default connection delivery, except reserved simulator destinations retained for compatibility."
3425
+ "description": "Optional routing override. Simulator delivery and the reserved test: subscriber prefix are test-environment-only; live requests are refused with 400 request_invalid. Omit for notifier-default connection delivery or the reserved test-environment simulator default."
3241
3426
  },
3242
3427
  "connection_id": {
3243
3428
  "allOf": [{ "$ref": "#/$defs/OpaqueIdentifier" }],
@@ -3828,6 +4013,7 @@
3828
4013
  "environment_mismatch",
3829
4014
  "idempotency_key_required",
3830
4015
  "idempotency_conflict",
4016
+ "privacy_operation_in_progress",
3831
4017
  "project_slug_conflict",
3832
4018
  "request_invalid",
3833
4019
  "replay_unavailable",
@@ -4253,6 +4439,26 @@
4253
4439
  }
4254
4440
  }
4255
4441
  },
4442
+ {
4443
+ "type": "object",
4444
+ "properties": {
4445
+ "type": {
4446
+ "const": "https://whooshbang.flowxo.com/problems/privacy_operation_in_progress"
4447
+ },
4448
+ "title": {
4449
+ "const": "Privacy operation in progress"
4450
+ },
4451
+ "status": {
4452
+ "const": 409
4453
+ },
4454
+ "code": {
4455
+ "const": "privacy_operation_in_progress"
4456
+ },
4457
+ "retryable": {
4458
+ "const": true
4459
+ }
4460
+ }
4461
+ },
4256
4462
  {
4257
4463
  "type": "object",
4258
4464
  "properties": {
@@ -6013,6 +6219,22 @@
6013
6219
  { "$ref": "#/$defs/TelegramConnectionIdentity" },
6014
6220
  { "$ref": "#/$defs/SlackConnectionIdentity" }
6015
6221
  ]
6222
+ },
6223
+ "PrivacyMode": {
6224
+ "type": "string",
6225
+ "enum": ["minimal", "standard", "private"],
6226
+ "description": "Project profile collection policy. minimal (the default for new and existing projects) keeps recipient language only; standard permits messenger profile data; private retains delivery routing and the customer-supplied subscriber identifier, with no profile data. Lowering collection erases existing fields the new mode disallows."
6227
+ },
6228
+ "UpdateProjectRequest": {
6229
+ "type": "object",
6230
+ "description": "Sets the project privacy policy. Moving from standard to minimal erases stored identifying profile data; moving to private also erases recipient language. Increasing collection does not restore erased data.",
6231
+ "required": ["privacy_mode"],
6232
+ "properties": {
6233
+ "privacy_mode": {
6234
+ "$ref": "#/$defs/PrivacyMode"
6235
+ }
6236
+ },
6237
+ "additionalProperties": false
6016
6238
  }
6017
6239
  }
6018
6240
  }