@webex/plugin-webhooks 3.13.0-next.4 → 3.13.0-next.6

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.
@@ -0,0 +1,421 @@
1
+ {
2
+ "$schema": "./schemas/repo-context.schema.json",
3
+ "version": 1,
4
+ "repository": {
5
+ "name": "@webex/plugin-webhooks",
6
+ "purpose": "Public plugin registered as webex.webhooks that manages Webex webhook registrations through the Webex REST API webhooks resource (catalog service hydra): create POSTs a webhook, get takes a webhook object or id and resolves one webhook, list resolves a webex-core Page, remove DELETEs a webhook and resolves undefined on a 204, and update PUTs the whole webhook object. Each call sends one request through webex.request and resolves what the service returns; the plugin checks no argument, does not receive or verify webhook deliveries, emits no SDK event, and caches or persists nothing."
7
+ },
8
+ "commands": {
9
+ "install": "yarn",
10
+ "compile": "yarn workspace @webex/plugin-webhooks build",
11
+ "build": "yarn workspace @webex/plugin-webhooks build:src",
12
+ "lint": "yarn workspace @webex/plugin-webhooks test:style",
13
+ "browser-test": "yarn workspace @webex/plugin-webhooks test:browser",
14
+ "deploy": "yarn workspace @webex/plugin-webhooks deploy:npm"
15
+ },
16
+ "public_interfaces": [
17
+ {
18
+ "name": "@webex/plugin-webhooks package entry",
19
+ "kind": "package_export",
20
+ "source": "src/index.js",
21
+ "entrypoints": [
22
+ "import '@webex/plugin-webhooks'",
23
+ "import Webhooks from '@webex/plugin-webhooks'"
24
+ ],
25
+ "audience": "SDK bundles (webex, webex-node) and applications that build their own webex instance",
26
+ "notes": "Importing the package registers Webhooks as public plugin 'webhooks' with no config; the first registration of the name wins. The default export Webhooks is the only export."
27
+ },
28
+ {
29
+ "name": "webex.webhooks methods",
30
+ "kind": "plugin_api",
31
+ "source": "src/webhooks.js",
32
+ "entrypoints": [
33
+ "webex.webhooks.create(webhook)",
34
+ "webex.webhooks.get(webhook)",
35
+ "webex.webhooks.list(options)",
36
+ "webex.webhooks.remove(webhook)",
37
+ "webex.webhooks.update(webhook)"
38
+ ],
39
+ "audience": "applications",
40
+ "notes": "Each method sends one hydra webhooks request. get and remove take a webhook object or an id; get resolves body.items when present, else the body; list resolves a webex-core Page; remove resolves undefined on a 204, else the body; update sends the whole object as the body. get, remove, and update read webhook.id synchronously, so a missing argument throws a TypeError instead of rejecting. The plugin registers webhooks only: the service delivers events to targetUrl directly, and nothing in the package receives, verifies, or emits them."
41
+ },
42
+ {
43
+ "name": "package scripts",
44
+ "kind": "npm_scripts",
45
+ "source": "package.json",
46
+ "entrypoints": [
47
+ "build",
48
+ "build:src",
49
+ "test:style",
50
+ "test:browser",
51
+ "test",
52
+ "deploy:npm"
53
+ ],
54
+ "audience": "contributors and CI",
55
+ "notes": "build runs build:src, which writes dist. There is no test:unit script and no unit test. test:browser (commands.browser-test) runs karma over test/integration/spec but bundles nothing today (0 tests, exit 0), and the spec it would load is wrapped in describe.skip. The aggregate test script runs test:style, then exits 1 because test:unit is not defined (it also names test:integration, which is not defined either); it is deliberately not a manifest command."
56
+ }
57
+ ],
58
+ "source_of_truth": [
59
+ {
60
+ "surface": "Webhooks plugin implementation",
61
+ "paths": [
62
+ "src/index.js",
63
+ "src/webhooks.js"
64
+ ],
65
+ "generated_artifacts": [
66
+ "dist"
67
+ ],
68
+ "refresh_with": [
69
+ "yarn workspace @webex/plugin-webhooks build:src"
70
+ ],
71
+ "validate_with": [
72
+ "yarn workspace @webex/plugin-webhooks test:style"
73
+ ]
74
+ },
75
+ {
76
+ "surface": "module specification",
77
+ "paths": [
78
+ "src/docs/README.md"
79
+ ],
80
+ "generated_artifacts": [],
81
+ "refresh_with": [
82
+ "update alongside the behavior change in the same commit"
83
+ ],
84
+ "validate_with": [
85
+ "spec-validator on an independent runtime"
86
+ ]
87
+ }
88
+ ],
89
+ "generated_artifacts": [
90
+ {
91
+ "path": "dist",
92
+ "generated_from": "src",
93
+ "refresh_with": "yarn workspace @webex/plugin-webhooks build:src"
94
+ },
95
+ {
96
+ "path": "../../../.sdd/templates/repo-standards/template-map.json",
97
+ "generated_from": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
98
+ "refresh_with": "The package holds no templates. It refers to the monorepo root snapshot at ../../../.sdd/templates/repo-standards through layout.monorepo_package.templates_root_path in .sdd/manifest.json. Refresh the root snapshot, not this package."
99
+ }
100
+ ],
101
+ "validation_matrix": [
102
+ {
103
+ "paths": [
104
+ "src/**"
105
+ ],
106
+ "minimum": [
107
+ "yarn workspace @webex/plugin-webhooks build:src",
108
+ "yarn workspace @webex/plugin-webhooks test:style"
109
+ ],
110
+ "recommended": [
111
+ "add a test/unit/spec case and a test:unit script for the changed behavior; the package has no unit tests"
112
+ ]
113
+ },
114
+ {
115
+ "paths": [
116
+ "src/webhooks.js"
117
+ ],
118
+ "minimum": [
119
+ "yarn workspace @webex/plugin-webhooks build:src",
120
+ "yarn workspace @webex/plugin-webhooks test:style"
121
+ ],
122
+ "recommended": [
123
+ "pin the five request options and the resolved values, including get resolving body.items, list resolving a Page, and remove resolving undefined on a 204, with unit cases before changing them"
124
+ ]
125
+ },
126
+ {
127
+ "paths": [
128
+ "src/index.js"
129
+ ],
130
+ "minimum": [
131
+ "yarn workspace @webex/plugin-webhooks build:src",
132
+ "yarn workspace @webex/plugin-webhooks test:style"
133
+ ],
134
+ "recommended": [
135
+ "check the bundles that register the plugin (webex, webex-node) when the registered name changes"
136
+ ]
137
+ }
138
+ ],
139
+ "change_impact": [
140
+ {
141
+ "paths": [
142
+ "src/webhooks.js"
143
+ ],
144
+ "affects": [
145
+ "the hydra webhooks requests and their result shapes",
146
+ "callers that pass a webhook object or an id to get or remove",
147
+ "callers that page through list",
148
+ "callers that test remove for an undefined result"
149
+ ],
150
+ "refresh_with": [
151
+ "yarn workspace @webex/plugin-webhooks build:src"
152
+ ],
153
+ "validate_with": [
154
+ "yarn workspace @webex/plugin-webhooks test:style"
155
+ ],
156
+ "avoid_direct_edits": [
157
+ "dist"
158
+ ],
159
+ "notes": "No unit case covers any method; add one before changing behavior."
160
+ },
161
+ {
162
+ "paths": [
163
+ "src/index.js"
164
+ ],
165
+ "affects": [
166
+ "the registered plugin name"
167
+ ],
168
+ "refresh_with": [
169
+ "yarn workspace @webex/plugin-webhooks build:src"
170
+ ],
171
+ "validate_with": [
172
+ "yarn workspace @webex/plugin-webhooks test:style"
173
+ ],
174
+ "avoid_direct_edits": [
175
+ "dist"
176
+ ],
177
+ "notes": "The webex and webex-node bundles require the package for this registration (MOD-001)."
178
+ }
179
+ ],
180
+ "evidence_rules": [
181
+ {
182
+ "claim_category": "command_name",
183
+ "sources": [
184
+ "package.json"
185
+ ],
186
+ "requirement": "The script must exist in package.json scripts.",
187
+ "notes": "test:unit and test:integration do not exist, so the aggregate test script fails; test:browser currently verifies nothing."
188
+ },
189
+ {
190
+ "claim_category": "import_path",
191
+ "sources": [
192
+ "src/index.js"
193
+ ],
194
+ "requirement": "A binding is public only if exported from src/index.js.",
195
+ "notes": "The only export is the default Webhooks."
196
+ },
197
+ {
198
+ "claim_category": "behavior_claim",
199
+ "sources": [
200
+ "src"
201
+ ],
202
+ "requirement": "Ground every behavioral claim in source evidence.",
203
+ "notes": "Commit history is not an evidence source for this package. README.md is context only (docs/adr/0001-retain-product-readme.md). The integration spec under test/integration/spec states intended behavior but is skipped and no script runs it. The webex-core and plugin-rooms specs were consulted; test-helper-chai has no spec, so its code was read."
204
+ }
205
+ ],
206
+ "negative_guidance": [
207
+ {
208
+ "rule": "Do not send webhook requests outside this.request with service hydra.",
209
+ "why": "webex-core resolves the catalog URL and adds authorization and tracking only on that path."
210
+ },
211
+ {
212
+ "rule": "Do not add argument checks, caching, or reshaping of the response without a unit case and a spec update.",
213
+ "why": "Callers receive the service response as it is today (MOD-002 to MOD-006)."
214
+ },
215
+ {
216
+ "rule": "Do not log webhook bodies, target URLs, filters, or ids through webex.logger.",
217
+ "why": "A target URL and its filter name where Webex event data is sent; the plugin logs nothing today."
218
+ },
219
+ {
220
+ "rule": "Do not add a webhook delivery receiver or signature check to this package without an ADR.",
221
+ "why": "The package only registers webhooks; receiving deliveries happens at the caller's targetUrl, outside the SDK."
222
+ },
223
+ {
224
+ "rule": "Do not treat README.md as the behavior reference.",
225
+ "why": "It shows only get(id); see docs/adr/0001-retain-product-readme.md."
226
+ },
227
+ {
228
+ "rule": "Do not infer a coverage threshold or a unit-test command for this package.",
229
+ "why": "No unit test, test:unit script, coverage script, or threshold exists."
230
+ }
231
+ ],
232
+ "confidence_policy": {
233
+ "high": {
234
+ "action": "update",
235
+ "expectation": "Source and a unit case agree; no such case exists in this package yet."
236
+ },
237
+ "medium": {
238
+ "action": "narrow-scope",
239
+ "expectation": "Only source evidence exists, or only the skipped integration spec, as for every method today. Pin current behavior with a unit case before modifying."
240
+ },
241
+ "low": {
242
+ "action": "noop",
243
+ "expectation": "Neither source, tests, nor a dependency's spec or code settles the question, as for why get reads body.items, which webhook fields the service accepts beyond the JSDoc typedef, or what a remove response other than 204 carries. Stop and report the gap."
244
+ }
245
+ },
246
+ "repository_topology": {
247
+ "main_entrypoints": [
248
+ {
249
+ "name": "package entry",
250
+ "path": "src/index.js",
251
+ "purpose": "Registers the webhooks plugin and exports the class",
252
+ "notes": "No subpath exports; package.json main is dist/index.js and devMain is src/index.js."
253
+ }
254
+ ],
255
+ "workspace_packages": [
256
+ {
257
+ "name": "@webex/plugin-webhooks",
258
+ "paths": [
259
+ "src",
260
+ "test"
261
+ ],
262
+ "notes": "One module; this SDD root is the package directory inside the webex-js-sdk monorepo."
263
+ }
264
+ ],
265
+ "source_surfaces": [
266
+ {
267
+ "name": "Webhooks plugin",
268
+ "paths": [
269
+ "src"
270
+ ],
271
+ "notes": "index.js and webhooks.js. Specified at src/docs/README.md."
272
+ },
273
+ {
274
+ "name": "tests",
275
+ "paths": [
276
+ "test/integration/spec"
277
+ ],
278
+ "notes": "One live-service integration spec, wrapped in describe.skip, that only test:browser would load, and it bundles nothing today. There is no unit spec."
279
+ }
280
+ ],
281
+ "generated_surfaces": [
282
+ {
283
+ "name": "build output",
284
+ "paths": [
285
+ "dist"
286
+ ],
287
+ "generated_from": "src",
288
+ "refresh_with": "yarn workspace @webex/plugin-webhooks build:src",
289
+ "notes": "JavaScript and source maps from webex-legacy-tools; no type declarations. Do not edit by hand."
290
+ },
291
+ {
292
+ "name": "repo-standards template map",
293
+ "paths": [
294
+ "../../../.sdd/templates/repo-standards"
295
+ ],
296
+ "generated_from": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
297
+ "refresh_with": "The package holds no templates. It refers to the monorepo root snapshot at ../../../.sdd/templates/repo-standards through layout.monorepo_package.templates_root_path in .sdd/manifest.json. Refresh the root snapshot, not this package.",
298
+ "notes": "The package holds no templates. It refers to the monorepo root snapshot at ../../../.sdd/templates/repo-standards through layout.monorepo_package.templates_root_path in .sdd/manifest.json. Refresh the root snapshot, not this package."
299
+ }
300
+ ],
301
+ "validation_entrypoints": [
302
+ {
303
+ "name": "compile",
304
+ "command": "yarn workspace @webex/plugin-webhooks build",
305
+ "scope": "src",
306
+ "notes": "Runs build:src."
307
+ },
308
+ {
309
+ "name": "lint",
310
+ "command": "yarn workspace @webex/plugin-webhooks test:style",
311
+ "scope": "src",
312
+ "notes": "eslint via the local .eslintrc.js; docs/** and *.md are ignored."
313
+ }
314
+ ],
315
+ "sync_paths": [
316
+ {
317
+ "source": "src/webhooks.js",
318
+ "targets": [
319
+ "src/docs/README.md"
320
+ ],
321
+ "mechanism": "Manual; update the module specification in the same change that alters observable behavior.",
322
+ "notes": "Keep the request and wire rows of the specification aligned with src/webhooks.js and src/index.js."
323
+ },
324
+ {
325
+ "source": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
326
+ "targets": [
327
+ "../../../.sdd/templates/repo-standards"
328
+ ],
329
+ "mechanism": "The package holds no templates. It refers to the monorepo root snapshot at ../../../.sdd/templates/repo-standards through layout.monorepo_package.templates_root_path in .sdd/manifest.json. Refresh the root snapshot, not this package.",
330
+ "notes": "The package holds no templates. It refers to the monorepo root snapshot at ../../../.sdd/templates/repo-standards through layout.monorepo_package.templates_root_path in .sdd/manifest.json. Refresh the root snapshot, not this package."
331
+ }
332
+ ]
333
+ },
334
+ "folder_readme_contract": {
335
+ "required_sections": [
336
+ "purpose",
337
+ "boundaries",
338
+ "key-files",
339
+ "common-tasks"
340
+ ],
341
+ "rules": [
342
+ "Orient the reader before describing detail.",
343
+ "Link to the module specification rather than duplicating it."
344
+ ],
345
+ "example_policy": "Examples are allowed only when verified against src/ or test/.",
346
+ "fallback": "Omit a section rather than inventing content; report unresolved facts as gaps."
347
+ },
348
+ "regression_feedback_rules": [
349
+ {
350
+ "trigger": "A webhooks request or its result handling in src/webhooks.js changes.",
351
+ "required_followups": [
352
+ "Add a test:unit script and a test/unit/spec case asserting the request options and the resolved value",
353
+ "Update MOD-002 to MOD-006 in src/docs/README.md"
354
+ ],
355
+ "notes": "No unit case exists for any method today."
356
+ },
357
+ {
358
+ "trigger": "The 204 handling of remove changes or moves to http-core.",
359
+ "required_followups": [
360
+ "Update MOD-005 and the Key design trade-off row in src/docs/README.md",
361
+ "Check the same handling in plugin-rooms, plugin-memberships, and plugin-messages"
362
+ ],
363
+ "notes": "The code comment says the handling should move to http-core."
364
+ },
365
+ {
366
+ "trigger": "The registration in src/index.js changes.",
367
+ "required_followups": [
368
+ "Check the webex and webex-node bundles that require the package",
369
+ "Update MOD-001 in src/docs/README.md"
370
+ ],
371
+ "notes": "Applications reach the plugin as webex.webhooks."
372
+ }
373
+ ],
374
+ "surface_owners": [
375
+ {
376
+ "surface": "module implementation and specifications",
377
+ "owner": "@webex/web-sdk",
378
+ "edit_boundary": "Owners per the default * rule of the monorepo .github/CODEOWNERS; no line names packages/@webex/plugin-webhooks."
379
+ }
380
+ ],
381
+ "do_not_edit": [
382
+ "dist",
383
+ "../../../.sdd/templates/repo-standards"
384
+ ],
385
+ "marker_scopes": {
386
+ "sdd": [
387
+ ".sdd/manifest.json",
388
+ "src/docs/README.md",
389
+ "docs"
390
+ ]
391
+ },
392
+ "fallback_rules": [
393
+ "When source and tests disagree, code is the referee and the disagreement is recorded rather than silently resolved.",
394
+ "When neither source nor tests settle a question, report it as a gap instead of inferring.",
395
+ "Commit history is not a valid rationale source for this package.",
396
+ "When a dependency's specification disagrees with that dependency's code, use the code and record the disagreement; when a dependency has no specification, use its code."
397
+ ],
398
+ "downstream_context_pack": {
399
+ "required_human_surfaces": [
400
+ "README.md",
401
+ "docs/index.md",
402
+ "docs/architecture.md",
403
+ "src/docs/README.md"
404
+ ],
405
+ "required_agent_operational_surfaces": [
406
+ "AGENTS.md",
407
+ "docs/specs/README.md"
408
+ ],
409
+ "required_machine_readable_surface": ".sdd/manifest.json",
410
+ "recommended_machine_readable_sections": [
411
+ "public_interfaces",
412
+ "change_impact",
413
+ "evidence_rules",
414
+ "negative_guidance",
415
+ "confidence_policy",
416
+ "repository_topology",
417
+ "folder_readme_contract",
418
+ "regression_feedback_rules"
419
+ ]
420
+ }
421
+ }