@whooshbang/contracts 2.3.0 → 2.4.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 (83) hide show
  1. package/CHANGELOG.md +4 -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.js +4 -4
  6. package/fixtures/core-v1/fixture-index.json +1 -1
  7. package/fixtures/core-v1/scenarios/api-credential-invalid-indistinguishable.json +1 -1
  8. package/fixtures/core-v1/scenarios/api-credential-one-time-reveal.json +1 -1
  9. package/fixtures/core-v1/scenarios/api-credential-revocation-replay.json +1 -1
  10. package/fixtures/core-v1/scenarios/api-credential-rotation-overlap.json +1 -1
  11. package/fixtures/core-v1/scenarios/cancellation-too-late.json +1 -1
  12. package/fixtures/core-v1/scenarios/cross-organization-project.json +1 -1
  13. package/fixtures/core-v1/scenarios/cross-project-resource.json +1 -1
  14. package/fixtures/core-v1/scenarios/environment-mismatch.json +1 -1
  15. package/fixtures/core-v1/scenarios/idempotency-conflict.json +1 -1
  16. package/fixtures/core-v1/scenarios/idempotency-equivalent-replay.json +1 -1
  17. package/fixtures/core-v1/scenarios/malformed-bearer.json +1 -1
  18. package/fixtures/core-v1/scenarios/metadata-overrun.json +1 -1
  19. package/fixtures/core-v1/scenarios/missing-scope.json +1 -1
  20. package/fixtures/core-v1/scenarios/project-create-equivalent-replay.json +1 -1
  21. package/fixtures/core-v1/scenarios/project-slug-conflict.json +1 -1
  22. package/fixtures/core-v1/scenarios/provider-outcome-unknown.json +1 -1
  23. package/fixtures/core-v1/scenarios/subscription-activation-replay.json +1 -1
  24. package/fixtures/core-v1/scenarios/subscription-authorization-capability-opacity.json +1 -1
  25. package/fixtures/core-v1/scenarios/subscription-cross-connection-callback-rejected.json +1 -1
  26. package/fixtures/core-v1/scenarios/subscription-expired-replay.json +1 -1
  27. package/fixtures/core-v1/scenarios/subscription-selected-connection-replay.json +1 -1
  28. package/fixtures/interaction-machine-v1/scenarios/ack-conflict.json +1 -1
  29. package/fixtures/interaction-machine-v1/scenarios/ack-cross-machine.json +1 -1
  30. package/fixtures/interaction-machine-v1/scenarios/ack-out-of-order.json +1 -1
  31. package/fixtures/interaction-machine-v1/scenarios/ack-replay.json +1 -1
  32. package/fixtures/interaction-machine-v1/scenarios/ambiguous-free-text.json +1 -1
  33. package/fixtures/interaction-machine-v1/scenarios/callback-token-opacity.json +1 -1
  34. package/fixtures/interaction-machine-v1/scenarios/credential-registration-conflict.json +1 -1
  35. package/fixtures/interaction-machine-v1/scenarios/credential-registration-replay.json +1 -1
  36. package/fixtures/interaction-machine-v1/scenarios/credential-revocation-replay.json +1 -1
  37. package/fixtures/interaction-machine-v1/scenarios/credential-rotation.json +1 -1
  38. package/fixtures/interaction-machine-v1/scenarios/first-credential-activates.json +1 -1
  39. package/fixtures/interaction-machine-v1/scenarios/interaction-duplicate.json +1 -1
  40. package/fixtures/interaction-machine-v1/scenarios/interaction-expired.json +1 -1
  41. package/fixtures/interaction-machine-v1/scenarios/interaction-mismatch.json +1 -1
  42. package/fixtures/interaction-machine-v1/scenarios/interaction-retired.json +1 -1
  43. package/fixtures/interaction-machine-v1/scenarios/interaction-stale.json +1 -1
  44. package/fixtures/interaction-machine-v1/scenarios/machine-admin-denied.json +1 -1
  45. package/fixtures/interaction-machine-v1/scenarios/machine-bound-message-create.json +1 -1
  46. package/fixtures/interaction-machine-v1/scenarios/machine-cancel-denied.json +1 -1
  47. package/fixtures/interaction-machine-v1/scenarios/machine-crash-before-ack.json +1 -1
  48. package/fixtures/interaction-machine-v1/scenarios/machine-notifier-mismatch.json +1 -1
  49. package/fixtures/interaction-machine-v1/scenarios/machine-other-message-read.json +1 -1
  50. package/fixtures/interaction-machine-v1/scenarios/machine-owned-message-read.json +1 -1
  51. package/fixtures/interaction-machine-v1/scenarios/machine-subscriber-mismatch.json +1 -1
  52. package/fixtures/interaction-machine-v1/scenarios/poll-uncommitted-cursor-rejected.json +1 -1
  53. package/fixtures/interaction-machine-v1/scenarios/project-credential-machine-endpoint-denied.json +1 -1
  54. package/fixtures/interaction-machine-v1/scenarios/quarantine-integrity-rejected.json +1 -1
  55. package/fixtures/interaction-machine-v1/scenarios/quarantine-signature-rejected.json +1 -1
  56. package/fixtures/interaction-machine-v1/scenarios/quarantine-valid.json +1 -1
  57. package/fixtures/interaction-machine-v1/scenarios/revoked-machine-credential.json +1 -1
  58. package/fixtures/recipient-experience-v1/scenarios/membership-broadcast-snapshot.json +1 -1
  59. package/fixtures/recipient-experience-v1/scenarios/preferred-binding-resolution.json +1 -1
  60. package/fixtures/recipient-experience-v1/scenarios/recipient-session-security.json +1 -1
  61. package/fixtures/recipient-experience-v1/scenarios/subscriber-initial-groups-transaction.json +1 -1
  62. package/openapi/generated/whooshbang-v1.bundle.json +40 -11
  63. package/openapi/whooshbang-v1.yaml +31 -2
  64. package/package.json +1 -1
  65. package/schemas/core-scenario.schema.json +1 -1
  66. package/schemas/events/agent-binding-degraded-v1.schema.json +1 -1
  67. package/schemas/events/interaction-expired-v1.schema.json +1 -1
  68. package/schemas/events/interaction-received-v1.schema.json +1 -1
  69. package/schemas/events/message-delivered-v1.schema.json +1 -1
  70. package/schemas/events/message-expired-v1.schema.json +1 -1
  71. package/schemas/events/message-failed-v1.schema.json +1 -1
  72. package/schemas/events/message-provider-accepted-v1.schema.json +1 -1
  73. package/schemas/events/subscription-activated-v1.schema.json +1 -1
  74. package/schemas/events/subscription-revoked-v1.schema.json +1 -1
  75. package/schemas/events/whooshbang-event-v1.schema.json +1 -1
  76. package/schemas/fixture-index.schema.json +1 -1
  77. package/schemas/interaction-machine-scenario.schema.json +1 -1
  78. package/schemas/interaction-v1.schema.json +1 -1
  79. package/schemas/machine-v1.schema.json +1 -1
  80. package/schemas/provider-capabilities-v1.schema.json +1 -1
  81. package/schemas/webhooks/webhook-delivery-case-v1.schema.json +1 -1
  82. package/schemas/webhooks/webhook-signing-vector-v1.schema.json +1 -1
  83. package/schemas/whooshbang-v1.schema.json +5 -3
@@ -1,5 +1,5 @@
1
1
  {
2
- "contract_version": "2.3.0",
2
+ "contract_version": "2.4.0",
3
3
  "id": "poll-uncommitted-cursor-rejected",
4
4
  "category": "machine_poll",
5
5
  "given": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "contract_version": "2.3.0",
2
+ "contract_version": "2.4.0",
3
3
  "id": "project-credential-machine-endpoint-denied",
4
4
  "category": "machine_authorization",
5
5
  "given": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "contract_version": "2.3.0",
2
+ "contract_version": "2.4.0",
3
3
  "id": "quarantine-integrity-rejected",
4
4
  "category": "quarantine",
5
5
  "given": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "contract_version": "2.3.0",
2
+ "contract_version": "2.4.0",
3
3
  "id": "quarantine-signature-rejected",
4
4
  "category": "quarantine",
5
5
  "given": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "contract_version": "2.3.0",
2
+ "contract_version": "2.4.0",
3
3
  "id": "quarantine-valid",
4
4
  "category": "quarantine",
5
5
  "given": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "contract_version": "2.3.0",
2
+ "contract_version": "2.4.0",
3
3
  "id": "revoked-machine-credential",
4
4
  "category": "machine_authorization",
5
5
  "given": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "contract_version": "2.3.0",
2
+ "contract_version": "2.4.0",
3
3
  "id": "membership-broadcast-snapshot",
4
4
  "category": "membership_broadcast",
5
5
  "given": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "contract_version": "2.3.0",
2
+ "contract_version": "2.4.0",
3
3
  "id": "preferred-binding-resolution",
4
4
  "category": "preference_resolution",
5
5
  "given": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "contract_version": "2.3.0",
2
+ "contract_version": "2.4.0",
3
3
  "id": "recipient-session-security",
4
4
  "category": "recipient_security",
5
5
  "given": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "contract_version": "2.3.0",
2
+ "contract_version": "2.4.0",
3
3
  "id": "subscriber-initial-groups-transaction",
4
4
  "category": "subscriber_groups",
5
5
  "given": {
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.1.1",
3
3
  "info": {
4
4
  "title": "WhooshBang API",
5
- "version": "2.3.0",
5
+ "version": "2.4.0",
6
6
  "description": "The V1 contract for human organization/project administration, project-scoped\nsubscription links, and asynchronous text messages. A Clerk session selects\none organization for administration. A project credential selects one organization,\nproject, and `test` or `live` environment for product operations; request\nbodies cannot override either authenticated scope.\n\nA person's OAuth grant selects one organization and carries scopes, but no\nproject. It names the project and environment it acts in through the URL\npath, on the environment-scoped form of each operation; the service checks\nthat path against the granting person's membership on every call. The flat\nforms remain credential-only and are unchanged.\n\nResource identifiers are opaque and are not authorization. Reads outside the\ncredential scope return the same `404` shape as absent resources. Provider\ncredentials, raw Telegram identity, and protected provider responses are\nnever part of this API.\n",
7
7
  "termsOfService": "https://flowxo.com/terms",
8
8
  "contact": {
@@ -97,6 +97,7 @@
97
97
  "/v1/projects/{project_id}/environments/{environment_id}/whoami": {
98
98
  "get": {
99
99
  "operationId": "whoAmI",
100
+ "x-notification-scopes": ["notifications:self", "notifications:team"],
100
101
  "summary": "Identify the authenticated caller",
101
102
  "description": "Personal login identifies me without a recipient question. Shared or service credentials report their actual principal and require an explicit recipient. No account owner or credential creator is inferred.",
102
103
  "tags": ["Operators"],
@@ -105,6 +106,8 @@
105
106
  { "bearerCredential": [] },
106
107
  { "bearerOrganizationCredential": [] },
107
108
  { "bearerGrant": ["messages:read"] },
109
+ { "bearerGrant": ["notifications:self"] },
110
+ { "bearerGrant": ["notifications:team"] },
108
111
  { "machineCredential": [] }
109
112
  ],
110
113
  "x-required-scopes": ["messages:read"],
@@ -129,13 +132,15 @@
129
132
  "/v1/projects/{project_id}/environments/{environment_id}/operators": {
130
133
  "get": {
131
134
  "operationId": "listOperators",
135
+ "x-notification-scopes": ["notifications:team"],
132
136
  "summary": "listOperators",
133
137
  "description": "Membership-derived operator messaging. Only the authenticated human can manage personal preferences.",
134
138
  "tags": ["Operators"],
135
139
  "security": [
136
140
  { "clerkSession": [] },
137
141
  { "bearerCredential": [] },
138
- { "bearerGrant": ["messages:read"] }
142
+ { "bearerGrant": ["messages:read"] },
143
+ { "bearerGrant": ["notifications:team"] }
139
144
  ],
140
145
  "x-required-scopes": ["messages:read"],
141
146
  "parameters": [
@@ -162,13 +167,15 @@
162
167
  "/v1/projects/{project_id}/environments/{environment_id}/operators/resolve": {
163
168
  "get": {
164
169
  "operationId": "resolveOperator",
170
+ "x-notification-scopes": ["notifications:team"],
165
171
  "summary": "resolveOperator",
166
172
  "description": "Membership-derived operator messaging. Only the authenticated human can manage personal preferences.",
167
173
  "tags": ["Operators"],
168
174
  "security": [
169
175
  { "clerkSession": [] },
170
176
  { "bearerCredential": [] },
171
- { "bearerGrant": ["messages:read"] }
177
+ { "bearerGrant": ["messages:read"] },
178
+ { "bearerGrant": ["notifications:team"] }
172
179
  ],
173
180
  "x-required-scopes": ["messages:read"],
174
181
  "parameters": [
@@ -198,6 +205,7 @@
198
205
  "/v1/projects/{project_id}/environments/{environment_id}/operator-messages": {
199
206
  "post": {
200
207
  "operationId": "sendOperatorMessage",
208
+ "x-notification-scopes": ["notifications:self", "notifications:team"],
201
209
  "summary": "sendOperatorMessage",
202
210
  "description": "Message a current teammate by name or operator ID. Personal callers may omit recipient or use me. Shared credentials must name a recipient. Runtime machine credentials report recipient_required for omitted or me; named operator sends are forbidden because runtime authority remains subscriber-bound.",
203
211
  "tags": ["Operators"],
@@ -206,7 +214,9 @@
206
214
  { "bearerCredential": [] },
207
215
  { "bearerOrganizationCredential": [] },
208
216
  { "machineCredential": [] },
209
- { "bearerGrant": ["messages:write"] }
217
+ { "bearerGrant": ["messages:write"] },
218
+ { "bearerGrant": ["notifications:self"] },
219
+ { "bearerGrant": ["notifications:team"] }
210
220
  ],
211
221
  "x-required-scopes": ["messages:write"],
212
222
  "parameters": [
@@ -243,13 +253,15 @@
243
253
  "/v1/projects/{project_id}/environments/{environment_id}/operators/broadcasts": {
244
254
  "post": {
245
255
  "operationId": "broadcastOperators",
256
+ "x-notification-scopes": ["notifications:team"],
246
257
  "summary": "broadcastOperators",
247
258
  "description": "Membership-derived operator messaging. Only the authenticated human can manage personal preferences.",
248
259
  "tags": ["Operators"],
249
260
  "security": [
250
261
  { "clerkSession": [] },
251
262
  { "bearerCredential": [] },
252
- { "bearerGrant": ["messages:write"] }
263
+ { "bearerGrant": ["messages:write"] },
264
+ { "bearerGrant": ["notifications:team"] }
253
265
  ],
254
266
  "x-required-scopes": ["messages:write"],
255
267
  "parameters": [
@@ -284,13 +296,15 @@
284
296
  "/v1/projects/{project_id}/environments/{environment_id}/operators/broadcasts/{broadcast_id}": {
285
297
  "get": {
286
298
  "operationId": "getOperatorBroadcast",
299
+ "x-notification-scopes": ["notifications:team"],
287
300
  "summary": "getOperatorBroadcast",
288
301
  "description": "Membership-derived operator messaging. Only the authenticated human can manage personal preferences.",
289
302
  "tags": ["Operators"],
290
303
  "security": [
291
304
  { "clerkSession": [] },
292
305
  { "bearerCredential": [] },
293
- { "bearerGrant": ["messages:read"] }
306
+ { "bearerGrant": ["messages:read"] },
307
+ { "bearerGrant": ["notifications:team"] }
294
308
  ],
295
309
  "x-required-scopes": ["messages:read"],
296
310
  "parameters": [
@@ -320,13 +334,16 @@
320
334
  "/v1/projects/{project_id}/environments/{environment_id}/notification-preferences": {
321
335
  "get": {
322
336
  "operationId": "getOperatorPreferences",
337
+ "x-notification-scopes": ["notifications:self", "notifications:team"],
323
338
  "summary": "getOperatorPreferences",
324
339
  "description": "Membership-derived operator messaging. Only the authenticated human can manage personal preferences.",
325
340
  "tags": ["Operators"],
326
341
  "security": [
327
342
  { "clerkSession": [] },
328
343
  { "bearerCredential": [] },
329
- { "bearerGrant": ["messages:read"] }
344
+ { "bearerGrant": ["messages:read"] },
345
+ { "bearerGrant": ["notifications:self"] },
346
+ { "bearerGrant": ["notifications:team"] }
330
347
  ],
331
348
  "x-required-scopes": ["messages:read"],
332
349
  "parameters": [
@@ -350,13 +367,16 @@
350
367
  "/v1/projects/{project_id}/environments/{environment_id}/notification-preferences/preferred-binding": {
351
368
  "put": {
352
369
  "operationId": "setOperatorPreferredBinding",
370
+ "x-notification-scopes": ["notifications:self", "notifications:team"],
353
371
  "summary": "setOperatorPreferredBinding",
354
372
  "description": "Membership-derived operator messaging. Only the authenticated human can manage personal preferences.",
355
373
  "tags": ["Operators"],
356
374
  "security": [
357
375
  { "clerkSession": [] },
358
376
  { "bearerCredential": [] },
359
- { "bearerGrant": ["messages:write"] }
377
+ { "bearerGrant": ["messages:write"] },
378
+ { "bearerGrant": ["notifications:self"] },
379
+ { "bearerGrant": ["notifications:team"] }
360
380
  ],
361
381
  "x-required-scopes": ["messages:write"],
362
382
  "parameters": [
@@ -390,13 +410,16 @@
390
410
  "/v1/projects/{project_id}/environments/{environment_id}/notification-preferences/connect": {
391
411
  "post": {
392
412
  "operationId": "connectOperatorChannel",
413
+ "x-notification-scopes": ["notifications:self", "notifications:team"],
393
414
  "summary": "connectOperatorChannel",
394
415
  "description": "Membership-derived operator messaging. Only the authenticated human can manage personal preferences.",
395
416
  "tags": ["Operators"],
396
417
  "security": [
397
418
  { "clerkSession": [] },
398
419
  { "bearerCredential": [] },
399
- { "bearerGrant": ["messages:write"] }
420
+ { "bearerGrant": ["messages:write"] },
421
+ { "bearerGrant": ["notifications:self"] },
422
+ { "bearerGrant": ["notifications:team"] }
400
423
  ],
401
424
  "x-required-scopes": ["messages:write"],
402
425
  "parameters": [
@@ -2190,12 +2213,15 @@
2190
2213
  "/v1/projects": {
2191
2214
  "get": {
2192
2215
  "operationId": "listProjects",
2216
+ "x-notification-scopes": ["notifications:self", "notifications:team"],
2193
2217
  "summary": "List projects in the current organization",
2194
2218
  "description": "Returns only projects owned by the organization selected by the verified\nClerk organization session. Every project includes its complete test/live\nenvironment and default-notifier bootstrap.\n",
2195
2219
  "tags": ["Projects"],
2196
2220
  "security": [
2197
2221
  { "clerkSession": [] },
2198
2222
  { "bearerGrant": [] },
2223
+ { "bearerGrant": ["notifications:self"] },
2224
+ { "bearerGrant": ["notifications:team"] },
2199
2225
  { "bearerOrganizationCredential": [] }
2200
2226
  ],
2201
2227
  "x-required-scopes": ["projects:read"],
@@ -2379,12 +2405,15 @@
2379
2405
  "parameters": [{ "$ref": "#/components/parameters/ProjectId" }],
2380
2406
  "get": {
2381
2407
  "operationId": "getProject",
2408
+ "x-notification-scopes": ["notifications:self", "notifications:team"],
2382
2409
  "summary": "Read one project in the current organization",
2383
2410
  "description": "Returns the complete project bootstrap. An absent project and a project\noutside the authenticated organization use the same non-enumerating `404`.\n",
2384
2411
  "tags": ["Projects"],
2385
2412
  "security": [
2386
2413
  { "clerkSession": [] },
2387
2414
  { "bearerGrant": [] },
2415
+ { "bearerGrant": ["notifications:self"] },
2416
+ { "bearerGrant": ["notifications:team"] },
2388
2417
  { "bearerOrganizationCredential": [] }
2389
2418
  ],
2390
2419
  "x-required-scopes": ["projects:read"],
@@ -20387,7 +20416,7 @@
20387
20416
  "provider-capabilities-v1.schema": {
20388
20417
  "$schema": "https://json-schema.org/draft/2020-12/schema",
20389
20418
  "$id": "https://whooshbang.flowxo.com/schemas/provider-capabilities-v1.schema.json",
20390
- "x-contract-version": "2.3.0",
20419
+ "x-contract-version": "2.4.0",
20391
20420
  "title": "ProviderCapabilitiesV1",
20392
20421
  "description": "Provider-neutral, renderer-facing delivery and interaction capabilities with explicit degradation.",
20393
20422
  "type": "object",
@@ -21168,5 +21197,5 @@
21168
21197
  }
21169
21198
  }
21170
21199
  },
21171
- "x-contract-version": "2.3.0"
21200
+ "x-contract-version": "2.4.0"
21172
21201
  }
@@ -1,10 +1,10 @@
1
1
  openapi: 3.1.1
2
2
  jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
3
3
  # whooshbang:public-origin production api https://api.whooshbang.com
4
- x-contract-version: 2.3.0
4
+ x-contract-version: 2.4.0
5
5
  info:
6
6
  title: WhooshBang API
7
- version: 2.3.0
7
+ version: 2.4.0
8
8
  description: |
9
9
  The V1 contract for human organization/project administration, project-scoped
10
10
  subscription links, and asynchronous text messages. A Clerk session selects
@@ -75,6 +75,7 @@ paths:
75
75
  /v1/projects/{project_id}/environments/{environment_id}/whoami:
76
76
  get:
77
77
  operationId: whoAmI
78
+ x-notification-scopes: [notifications:self, notifications:team]
78
79
  summary: Identify the authenticated caller
79
80
  description: Personal login identifies me without a recipient question. Shared or service credentials report their actual principal and require an explicit recipient. No account owner or credential creator is inferred.
80
81
  tags: [Operators]
@@ -83,6 +84,8 @@ paths:
83
84
  - bearerCredential: []
84
85
  - bearerOrganizationCredential: []
85
86
  - bearerGrant: [messages:read]
87
+ - bearerGrant: [notifications:self]
88
+ - bearerGrant: [notifications:team]
86
89
  - machineCredential: []
87
90
  x-required-scopes: [messages:read]
88
91
  parameters:
@@ -102,6 +105,7 @@ paths:
102
105
  /v1/projects/{project_id}/environments/{environment_id}/operators:
103
106
  get:
104
107
  operationId: listOperators
108
+ x-notification-scopes: [notifications:team]
105
109
  summary: listOperators
106
110
  description: Membership-derived operator messaging. Only the authenticated human can manage personal preferences.
107
111
  tags: [Operators]
@@ -109,6 +113,7 @@ paths:
109
113
  - clerkSession: []
110
114
  - bearerCredential: []
111
115
  - bearerGrant: [messages:read]
116
+ - bearerGrant: [notifications:team]
112
117
  x-required-scopes: [messages:read]
113
118
  parameters:
114
119
  - $ref: "#/components/parameters/ProjectId"
@@ -130,6 +135,7 @@ paths:
130
135
  /v1/projects/{project_id}/environments/{environment_id}/operators/resolve:
131
136
  get:
132
137
  operationId: resolveOperator
138
+ x-notification-scopes: [notifications:team]
133
139
  summary: resolveOperator
134
140
  description: Membership-derived operator messaging. Only the authenticated human can manage personal preferences.
135
141
  tags: [Operators]
@@ -137,6 +143,7 @@ paths:
137
143
  - clerkSession: []
138
144
  - bearerCredential: []
139
145
  - bearerGrant: [messages:read]
146
+ - bearerGrant: [notifications:team]
140
147
  x-required-scopes: [messages:read]
141
148
  parameters:
142
149
  - $ref: "#/components/parameters/ProjectId"
@@ -159,6 +166,7 @@ paths:
159
166
  /v1/projects/{project_id}/environments/{environment_id}/operator-messages:
160
167
  post:
161
168
  operationId: sendOperatorMessage
169
+ x-notification-scopes: [notifications:self, notifications:team]
162
170
  summary: sendOperatorMessage
163
171
  description: Message a current teammate by name or operator ID. Personal callers may omit recipient or use me. Shared credentials must name a recipient. Runtime machine credentials report recipient_required for omitted or me; named operator sends are forbidden because runtime authority remains subscriber-bound.
164
172
  tags: [Operators]
@@ -168,6 +176,8 @@ paths:
168
176
  - bearerOrganizationCredential: []
169
177
  - machineCredential: []
170
178
  - bearerGrant: [messages:write]
179
+ - bearerGrant: [notifications:self]
180
+ - bearerGrant: [notifications:team]
171
181
  x-required-scopes: [messages:write]
172
182
  parameters:
173
183
  - $ref: "#/components/parameters/ProjectId"
@@ -193,6 +203,7 @@ paths:
193
203
  /v1/projects/{project_id}/environments/{environment_id}/operators/broadcasts:
194
204
  post:
195
205
  operationId: broadcastOperators
206
+ x-notification-scopes: [notifications:team]
196
207
  summary: broadcastOperators
197
208
  description: Membership-derived operator messaging. Only the authenticated human can manage personal preferences.
198
209
  tags: [Operators]
@@ -200,6 +211,7 @@ paths:
200
211
  - clerkSession: []
201
212
  - bearerCredential: []
202
213
  - bearerGrant: [messages:write]
214
+ - bearerGrant: [notifications:team]
203
215
  x-required-scopes: [messages:write]
204
216
  parameters:
205
217
  - $ref: "#/components/parameters/ProjectId"
@@ -225,6 +237,7 @@ paths:
225
237
  /v1/projects/{project_id}/environments/{environment_id}/operators/broadcasts/{broadcast_id}:
226
238
  get:
227
239
  operationId: getOperatorBroadcast
240
+ x-notification-scopes: [notifications:team]
228
241
  summary: getOperatorBroadcast
229
242
  description: Membership-derived operator messaging. Only the authenticated human can manage personal preferences.
230
243
  tags: [Operators]
@@ -232,6 +245,7 @@ paths:
232
245
  - clerkSession: []
233
246
  - bearerCredential: []
234
247
  - bearerGrant: [messages:read]
248
+ - bearerGrant: [notifications:team]
235
249
  x-required-scopes: [messages:read]
236
250
  parameters:
237
251
  - $ref: "#/components/parameters/ProjectId"
@@ -254,6 +268,7 @@ paths:
254
268
  /v1/projects/{project_id}/environments/{environment_id}/notification-preferences:
255
269
  get:
256
270
  operationId: getOperatorPreferences
271
+ x-notification-scopes: [notifications:self, notifications:team]
257
272
  summary: getOperatorPreferences
258
273
  description: Membership-derived operator messaging. Only the authenticated human can manage personal preferences.
259
274
  tags: [Operators]
@@ -261,6 +276,8 @@ paths:
261
276
  - clerkSession: []
262
277
  - bearerCredential: []
263
278
  - bearerGrant: [messages:read]
279
+ - bearerGrant: [notifications:self]
280
+ - bearerGrant: [notifications:team]
264
281
  x-required-scopes: [messages:read]
265
282
  parameters:
266
283
  - $ref: "#/components/parameters/ProjectId"
@@ -279,6 +296,7 @@ paths:
279
296
  /v1/projects/{project_id}/environments/{environment_id}/notification-preferences/preferred-binding:
280
297
  put:
281
298
  operationId: setOperatorPreferredBinding
299
+ x-notification-scopes: [notifications:self, notifications:team]
282
300
  summary: setOperatorPreferredBinding
283
301
  description: Membership-derived operator messaging. Only the authenticated human can manage personal preferences.
284
302
  tags: [Operators]
@@ -286,6 +304,8 @@ paths:
286
304
  - clerkSession: []
287
305
  - bearerCredential: []
288
306
  - bearerGrant: [messages:write]
307
+ - bearerGrant: [notifications:self]
308
+ - bearerGrant: [notifications:team]
289
309
  x-required-scopes: [messages:write]
290
310
  parameters:
291
311
  - $ref: "#/components/parameters/ProjectId"
@@ -310,6 +330,7 @@ paths:
310
330
  /v1/projects/{project_id}/environments/{environment_id}/notification-preferences/connect:
311
331
  post:
312
332
  operationId: connectOperatorChannel
333
+ x-notification-scopes: [notifications:self, notifications:team]
313
334
  summary: connectOperatorChannel
314
335
  description: Membership-derived operator messaging. Only the authenticated human can manage personal preferences.
315
336
  tags: [Operators]
@@ -317,6 +338,8 @@ paths:
317
338
  - clerkSession: []
318
339
  - bearerCredential: []
319
340
  - bearerGrant: [messages:write]
341
+ - bearerGrant: [notifications:self]
342
+ - bearerGrant: [notifications:team]
320
343
  x-required-scopes: [messages:write]
321
344
  parameters:
322
345
  - $ref: "#/components/parameters/ProjectId"
@@ -1961,6 +1984,7 @@ paths:
1961
1984
  /v1/projects:
1962
1985
  get:
1963
1986
  operationId: listProjects
1987
+ x-notification-scopes: [notifications:self, notifications:team]
1964
1988
  summary: List projects in the current organization
1965
1989
  description: |
1966
1990
  Returns only projects owned by the organization selected by the verified
@@ -1971,6 +1995,8 @@ paths:
1971
1995
  security:
1972
1996
  - clerkSession: []
1973
1997
  - bearerGrant: []
1998
+ - bearerGrant: [notifications:self]
1999
+ - bearerGrant: [notifications:team]
1974
2000
  - bearerOrganizationCredential: []
1975
2001
  x-required-scopes:
1976
2002
  - projects:read
@@ -2064,6 +2090,7 @@ paths:
2064
2090
  - $ref: "#/components/parameters/ProjectId"
2065
2091
  get:
2066
2092
  operationId: getProject
2093
+ x-notification-scopes: [notifications:self, notifications:team]
2067
2094
  summary: Read one project in the current organization
2068
2095
  description: |
2069
2096
  Returns the complete project bootstrap. An absent project and a project
@@ -2073,6 +2100,8 @@ paths:
2073
2100
  security:
2074
2101
  - clerkSession: []
2075
2102
  - bearerGrant: []
2103
+ - bearerGrant: [notifications:self]
2104
+ - bearerGrant: [notifications:team]
2076
2105
  - bearerOrganizationCredential: []
2077
2106
  x-required-scopes:
2078
2107
  - projects:read
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whooshbang/contracts",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "Versioned public contracts for WhooshBang",
5
5
  "private": false,
6
6
  "license": "MIT",
@@ -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/core-scenario.schema.json",
4
- "x-contract-version": "2.3.0",
4
+ "x-contract-version": "2.4.0",
5
5
  "title": "CoreContractScenario",
6
6
  "description": "A deterministic C0-02 semantic, state, idempotency, or isolation scenario.",
7
7
  "type": "object",
@@ -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/events/agent-binding-degraded-v1.schema.json",
4
- "x-contract-version": "2.3.0",
4
+ "x-contract-version": "2.4.0",
5
5
  "title": "AgentBindingDegradedEventV1",
6
6
  "description": "An agent binding entered a provider-neutral degraded state.",
7
7
  "$ref": "whooshbang-event-v1.schema.json#/$defs/AgentBindingDegradedEvent"
@@ -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/events/interaction-expired-v1.schema.json",
4
- "x-contract-version": "2.3.0",
4
+ "x-contract-version": "2.4.0",
5
5
  "title": "InteractionExpiredEventV1",
6
6
  "description": "An interaction reached its terminal expiry without a valid answer.",
7
7
  "$ref": "whooshbang-event-v1.schema.json#/$defs/InteractionExpiredEvent"
@@ -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/events/interaction-received-v1.schema.json",
4
- "x-contract-version": "2.3.0",
4
+ "x-contract-version": "2.4.0",
5
5
  "title": "InteractionReceivedEventV1",
6
6
  "description": "One authenticated, provider-neutral interaction answer was received.",
7
7
  "$ref": "whooshbang-event-v1.schema.json#/$defs/InteractionReceivedEvent"
@@ -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/events/message-delivered-v1.schema.json",
4
- "x-contract-version": "2.3.0",
4
+ "x-contract-version": "2.4.0",
5
5
  "title": "MessageDeliveredEventV1",
6
6
  "description": "A provider supplied trustworthy evidence that a message was delivered.",
7
7
  "$ref": "whooshbang-event-v1.schema.json#/$defs/MessageDeliveredEvent"
@@ -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/events/message-expired-v1.schema.json",
4
- "x-contract-version": "2.3.0",
4
+ "x-contract-version": "2.4.0",
5
5
  "title": "MessageExpiredEventV1",
6
6
  "description": "A message expired before reaching a later delivery state.",
7
7
  "$ref": "whooshbang-event-v1.schema.json#/$defs/MessageExpiredEvent"
@@ -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/events/message-failed-v1.schema.json",
4
- "x-contract-version": "2.3.0",
4
+ "x-contract-version": "2.4.0",
5
5
  "title": "MessageFailedEventV1",
6
6
  "description": "A message reached a classified terminal failure.",
7
7
  "$ref": "whooshbang-event-v1.schema.json#/$defs/MessageFailedEvent"
@@ -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/events/message-provider-accepted-v1.schema.json",
4
- "x-contract-version": "2.3.0",
4
+ "x-contract-version": "2.4.0",
5
5
  "title": "MessageProviderAcceptedEventV1",
6
6
  "description": "The provider accepted a message without implying delivery.",
7
7
  "$ref": "whooshbang-event-v1.schema.json#/$defs/MessageProviderAcceptedEvent"
@@ -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/events/subscription-activated-v1.schema.json",
4
- "x-contract-version": "2.3.0",
4
+ "x-contract-version": "2.4.0",
5
5
  "title": "SubscriptionActivatedEventV1",
6
6
  "description": "A subscription became active with a safe public channel binding.",
7
7
  "$ref": "whooshbang-event-v1.schema.json#/$defs/SubscriptionActivatedEvent"
@@ -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/events/subscription-revoked-v1.schema.json",
4
- "x-contract-version": "2.3.0",
4
+ "x-contract-version": "2.4.0",
5
5
  "title": "SubscriptionRevokedEventV1",
6
6
  "description": "A subscription and its safe public channel binding were revoked.",
7
7
  "$ref": "whooshbang-event-v1.schema.json#/$defs/SubscriptionRevokedEvent"
@@ -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/events/whooshbang-event-v1.schema.json",
4
- "x-contract-version": "2.3.0",
4
+ "x-contract-version": "2.4.0",
5
5
  "title": "WhooshBangEventV1ContractDocument",
6
6
  "description": "Strict public customer-event envelope and initial WhooshBang event union.",
7
7
  "oneOf": [
@@ -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/fixture-index.schema.json",
4
- "x-contract-version": "2.3.0",
4
+ "x-contract-version": "2.4.0",
5
5
  "title": "CoreFixtureIndex",
6
6
  "description": "The machine-readable index of deterministic C0-02 through C0-04 golden fixtures.",
7
7
  "type": "object",
@@ -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/interaction-machine-scenario.schema.json",
4
- "x-contract-version": "2.3.0",
4
+ "x-contract-version": "2.4.0",
5
5
  "title": "InteractionMachineScenario",
6
6
  "description": "A deterministic C0-03 interaction, credential, authorization, polling, acknowledgement, or quarantine scenario.",
7
7
  "type": "object",
@@ -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/interaction-v1.schema.json",
4
- "x-contract-version": "2.3.0",
4
+ "x-contract-version": "2.4.0",
5
5
  "title": "InteractionV1ContractDocument",
6
6
  "description": "Provider-neutral confirm, single-select, input, lifecycle, callback-token, and authenticated answer-event contracts.",
7
7
  "$defs": {