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

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,365 @@
1
+ {
2
+ "manifest_version": 1,
3
+ "repository": {
4
+ "name": "@webex/plugin-webhooks",
5
+ "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.",
6
+ "category": "cat2-legacy",
7
+ "primary_languages": [
8
+ "javascript"
9
+ ]
10
+ },
11
+ "topology": "Orchestrator-plus-components",
12
+ "commands": {
13
+ "install": {
14
+ "command": "yarn",
15
+ "source_file": "../../../.github/workflows/deploy.yml",
16
+ "role": "install"
17
+ },
18
+ "prebuild": {
19
+ "command": "yarn prebuild:modules",
20
+ "source_file": "../../../CONTRIBUTING.md",
21
+ "role": "other"
22
+ },
23
+ "compile": {
24
+ "command": "yarn build",
25
+ "source_file": "package.json",
26
+ "role": "compile",
27
+ "verified_at": "2026-11-13T02:22:00Z"
28
+ },
29
+ "build": {
30
+ "command": "yarn build:src",
31
+ "source_file": "package.json",
32
+ "role": "package",
33
+ "verified_at": "2026-11-13T02:21:59Z"
34
+ },
35
+ "unit-test": "[NEEDS HUMAN INPUT] -- package.json defines no test:unit script and the package has no test/unit directory; its only spec, test/integration/spec/webhooks.js, is wrapped in describe.skip and runs only under test:browser, which currently bundles nothing. Add a unit suite and script before recording a command here.",
36
+ "lint": {
37
+ "command": "yarn test:style",
38
+ "source_file": "package.json",
39
+ "role": "lint",
40
+ "verified_at": "2026-11-13T02:22:02Z"
41
+ },
42
+ "browser-test": {
43
+ "command": "yarn test:browser",
44
+ "source_file": "package.json",
45
+ "role": "other"
46
+ },
47
+ "deploy": {
48
+ "command": "yarn deploy:npm",
49
+ "source_file": "package.json",
50
+ "role": "deploy"
51
+ }
52
+ },
53
+ "toolchain": [
54
+ {
55
+ "name": "node",
56
+ "version": ">=18",
57
+ "origin": "repo-config",
58
+ "source_file": "package.json"
59
+ },
60
+ {
61
+ "name": "node",
62
+ "version": "22.14",
63
+ "origin": "repo-config",
64
+ "source_file": "../../../AGENTS.md"
65
+ },
66
+ {
67
+ "name": "node",
68
+ "version": "lts/jod",
69
+ "origin": "repo-config",
70
+ "source_file": "../../../.nvmrc"
71
+ },
72
+ {
73
+ "name": "node",
74
+ "version": "18.x",
75
+ "origin": "repo-config",
76
+ "source_file": "../../../package.json"
77
+ },
78
+ {
79
+ "name": "yarn",
80
+ "version": "3.4.1",
81
+ "origin": "repo-config",
82
+ "source_file": "../../../package.json"
83
+ },
84
+ {
85
+ "name": "babel",
86
+ "version": "^7.17.10",
87
+ "origin": "repo-config",
88
+ "source_file": "package.json"
89
+ },
90
+ {
91
+ "name": "eslint",
92
+ "version": "^8.24.0",
93
+ "origin": "repo-config",
94
+ "source_file": "package.json"
95
+ },
96
+ {
97
+ "name": "prettier",
98
+ "version": "^2.7.1",
99
+ "origin": "repo-config",
100
+ "source_file": "package.json"
101
+ }
102
+ ],
103
+ "quality_gates": {
104
+ "code_coverage": {
105
+ "origin": "none",
106
+ "declared_by": "rarajes2@cisco.com via the bootstrap questionnaire (generator check: package.json defines no test:unit or coverage script, the package has no test/unit directory, and jest.config.js re-exports @webex/jest-config-legacy, which sets no coverageThreshold)"
107
+ }
108
+ },
109
+ "coverage_status_definitions": {
110
+ "specced": ">=80% public surface specced, drift <5% - spec is authoritative",
111
+ "partial": "40-80% specced - spec is a hint, cross-check code",
112
+ "untracked": "<40% specced - code is the source of truth"
113
+ },
114
+ "spec_source_policy": {
115
+ "mode": "keep-separate",
116
+ "migrated_source_disposition": "retain",
117
+ "disposition_decided_by": "rarajes2@cisco.com",
118
+ "disposition_decided_at": "2026-11-13T02:20:00Z",
119
+ "decided_by": "rarajes2@cisco.com",
120
+ "decided_at": "2026-11-13T02:20:00Z",
121
+ "decision_record": "docs/adr/0001-retain-product-readme.md"
122
+ },
123
+ "spec_sources": [
124
+ {
125
+ "path": "README.md",
126
+ "scope": "repo",
127
+ "role": "reference-only",
128
+ "canonical": false,
129
+ "use_by_agents": "context-only",
130
+ "post_migration_action": "retain",
131
+ "deletion_status": "not-applicable",
132
+ "notes": "npm page, kept unchanged under keep-separate. It repeats its Install and Usage sections; its one example, webex.webhooks.get(id), matches the code. It documents nothing about create, list, remove, or update, names no scope, and says nothing about receiving webhook deliveries. See docs/adr/0001-retain-product-readme.md."
133
+ }
134
+ ],
135
+ "modules": [
136
+ {
137
+ "path": "src",
138
+ "canonical_spec": "src/docs/README.md",
139
+ "coverage_status": "Partial",
140
+ "coverage_evidence": "Field coverage 100% (12/12) assessed 2026-11-13 by the generator; critical field coverage 6/6. Independent validation passed 2026-11-13 (0 Blocking, 0 warnings; validator runtime 01a1d2c3-25b2-7a93-a84a-c3d3b83a8df1). The package has no unit tests: package.json defines no test:unit script and there is no test/unit directory, so none of MOD-001 to MOD-006 has running test evidence. The integration spec test/integration/spec/webhooks.js holds 7 live-service cases, all inside describe.skip; no package script would run them anyway: test:browser bundles nothing (isbot parse error, 0 tests, exit 0) and test:integration does not exist. build:src, build, and test:style exit 0 (0 warnings, 0 errors before this spec existed). No characterization baseline exists; the module remains Partial pending a unit suite, characterization baseline, and promotion review.",
141
+ "last_assessed": "2026-11-13",
142
+ "contracts": {
143
+ "provides": [
144
+ "webhooks-public-sdk"
145
+ ],
146
+ "requires": [
147
+ "hydra-webhooks-http",
148
+ "webex-core-plugin-host",
149
+ "webex-core-page"
150
+ ]
151
+ },
152
+ "section_profile": {
153
+ "has_tiers": false,
154
+ "has_ui": false,
155
+ "crosses_service_boundaries": true,
156
+ "holds_client_state": false,
157
+ "enforces_domain_rules": false,
158
+ "is_concurrent_async": true,
159
+ "owns_persistence": false,
160
+ "stateful_transitions": false,
161
+ "exposes_wire_protocol": true,
162
+ "ui_multi_screen": false,
163
+ "large_data_model": false,
164
+ "returns_caller_errors": true,
165
+ "module_specific_conventions": true,
166
+ "published_package": true,
167
+ "embedded_in_host": false,
168
+ "has_design_tradeoff": true,
169
+ "resolved_by": "claude-code (code evidence; bootstrap questionnaire)",
170
+ "resolved_at": "2026-11-13T02:25:00Z",
171
+ "has_submodules": false,
172
+ "has_submodules_computed_by": "scripts/module_tree.py",
173
+ "has_submodules_computed_at": "2026-11-13T02:25:00Z"
174
+ }
175
+ }
176
+ ],
177
+ "contract_catalog": {
178
+ "index_path": "docs/architecture.md",
179
+ "definitions": {
180
+ "webhooks-public-sdk": {
181
+ "kind": "sdk",
182
+ "publication": "published",
183
+ "source_kind": "repository-path",
184
+ "source": "package.json",
185
+ "summary": "Published npm package (public plugin). main is dist/index.js and devMain is src/index.js; no type declarations are published. Importing it registers Webhooks as public plugin 'webhooks' with no config; the first registration of the name wins. The entry exports only the default Webhooks class. webex.webhooks exposes create, get, list, remove, and update and nothing else (no SDK events, no delivery receiver); specified in src/docs/README.md."
186
+ },
187
+ "hydra-webhooks-http": {
188
+ "kind": "http",
189
+ "publication": "internal",
190
+ "source_kind": "external",
191
+ "source": "Webex REST API webhooks resource (catalog service name hydra, reached through service: 'hydra' in src/webhooks.js; route definitions are not in this repository)",
192
+ "summary": "POST /webhooks with a webhook body; GET /webhooks/<id>; GET /webhooks/ with the caller's query object answering a paged {items} with Link headers; DELETE /webhooks/<id> answering 204; PUT /webhooks/<id> with the whole webhook body. A webhook carries id, resource, event, filter, targetUrl, name, and created per the JSDoc typedef; the Webhook assertion of @webex/test-helper-chai expects a Hydra id and string resource, event, filter, targetUrl, and name. The service then POSTs each matching event to targetUrl; that delivery never passes through this package."
193
+ },
194
+ "webex-core-plugin-host": {
195
+ "kind": "sdk",
196
+ "publication": "published",
197
+ "source_kind": "external",
198
+ "source": "@webex/webex-core (workspace package; module spec consulted: packages/@webex/webex-core/src/docs/README.md MOD-013, MOD-014, MOD-048, UC-004)",
199
+ "summary": "registerPlugin keys a public plugin by its raw name (webhooks, first registration wins) and adds webex.<name> to later instances; WebexPlugin supplies webex and request; a failed request rejects with a WebexHttpError whose message names the method, service, and resource."
200
+ },
201
+ "webex-core-page": {
202
+ "kind": "sdk",
203
+ "publication": "published",
204
+ "source_kind": "external",
205
+ "source": "@webex/webex-core Page (module spec consulted: packages/@webex/webex-core/src/docs/README.md MOD-054, MOD-055)",
206
+ "summary": "new Page(res, webex) stores the body items and parsed Link headers; next and previous request the linked URL and resolve a new Page; hasNext and hasPrevious report the links; length and iteration follow items."
207
+ }
208
+ }
209
+ },
210
+ "spec_policy": {
211
+ "require_what_and_why": true,
212
+ "require_provenance": true,
213
+ "protected_specs": [
214
+ "src/docs/README.md"
215
+ ]
216
+ },
217
+ "validation": {
218
+ "generator_runtime": "claude-code",
219
+ "generator_model": "claude-opus-5-5",
220
+ "generator_runtime_source": "host-metadata",
221
+ "source_commit": "c22331c97be69968deddf2f8d55d26c84ae2c1ac",
222
+ "minimum_independence": "different-runtime",
223
+ "blocking_severities": [
224
+ "Blocking"
225
+ ],
226
+ "validator_runtime": "01a1d2c3-25b2-7a93-a84a-c3d3b83a8df1",
227
+ "validator_runtime_source": "invocation-input",
228
+ "validator_run_id": "01a1d2c3-25b2-7a93-a84a-c3d3b83a8df1",
229
+ "runtime_fallback_tier": "different-runtime"
230
+ },
231
+ "layout": {
232
+ "sdd_root": ".sdd",
233
+ "docs_root": "docs",
234
+ "agent_entry_path": "AGENTS.md",
235
+ "standing_docs_root": "docs",
236
+ "spec_index_path": "docs/specs/README.md",
237
+ "module_docs_strategy": "source-local",
238
+ "module_docs_relative_path": "docs/README.md",
239
+ "module_docs_decision": {
240
+ "basis": "repo-standards-default",
241
+ "reason": "No module-local documentation existed. The source-local default gives src/docs/README.md. test:style runs eslint ./src/**/*.*, and the shared @webex/eslint-config-legacy ignore patterns exclude docs/** and *.md; build:src processes -js -ts only, so Markdown under src/ does not enter dist/.",
242
+ "decided_by": "rarajes2@cisco.com (bootstrap questionnaire)",
243
+ "decided_at": "2026-11-13T02:25:00Z"
244
+ },
245
+ "repo_context_decision": {
246
+ "path": ".repo-context.json",
247
+ "schema_path": "schemas/repo-context.schema.json",
248
+ "action": "create",
249
+ "schema_action": "create",
250
+ "reason": "Neither the operational context nor its schema existed in this package. The context is created from package evidence and the schema is copied from the repository-root .sdd/templates/repo-standards/schemas/repo-context.schema.json.",
251
+ "decided_by": "rarajes2@cisco.com (bootstrap questionnaire)",
252
+ "decided_at": "2026-11-13T02:25:00Z"
253
+ },
254
+ "artifact_decisions": [
255
+ {
256
+ "path": "docs/service.md",
257
+ "action": "omit",
258
+ "reason": "Library package, not a deployable service. package.json has no start script, container, or deployment descriptor.",
259
+ "decided_by": "claude-code (code evidence)",
260
+ "decided_at": "2026-11-13T02:25:00Z"
261
+ },
262
+ {
263
+ "path": "mkdocs.yml",
264
+ "action": "omit",
265
+ "reason": "No package-level documentation site exists. Documentation publishing stays with the workspace.",
266
+ "decided_by": "claude-code (code evidence)",
267
+ "decided_at": "2026-11-13T02:25:00Z"
268
+ },
269
+ {
270
+ "path": "api-specs/openapi.yaml",
271
+ "action": "omit",
272
+ "reason": "The package serves no HTTP routes and does not receive webhook deliveries. It is a client of the Webex REST API webhooks resource; its published surface is the npm export described by webhooks-public-sdk.",
273
+ "decided_by": "claude-code (code evidence)",
274
+ "decided_at": "2026-11-13T02:25:00Z"
275
+ },
276
+ {
277
+ "path": "SECURITY.md",
278
+ "action": "omit",
279
+ "reason": "No package-level security policy exists. The workspace owns security policy, and a per-package copy would duplicate it; the package's trust boundaries are described under Security architecture in docs/architecture.md.",
280
+ "decided_by": "claude-code (code evidence)",
281
+ "decided_at": "2026-11-13T02:25:00Z"
282
+ },
283
+ {
284
+ "path": "CONTRIBUTING.md",
285
+ "action": "omit",
286
+ "reason": "Contribution instructions are owned at the workspace root CONTRIBUTING.md.",
287
+ "decided_by": "claude-code (code evidence)",
288
+ "decided_at": "2026-11-13T02:25:00Z"
289
+ },
290
+ {
291
+ "path": "CHANGELOG.md",
292
+ "action": "omit",
293
+ "reason": "Changelog generation is owned at the workspace root. This package has no changelog file.",
294
+ "decided_by": "claude-code (code evidence)",
295
+ "decided_at": "2026-11-13T02:25:00Z"
296
+ },
297
+ {
298
+ "path": "CTO_CHECKLIST.yml",
299
+ "action": "omit",
300
+ "reason": "The CTO readiness checklist applies to deployable services. This package is a library.",
301
+ "decided_by": "claude-code (code evidence)",
302
+ "decided_at": "2026-11-13T02:25:00Z"
303
+ },
304
+ {
305
+ "path": "schemas/cto-checklist.schema.json",
306
+ "action": "omit",
307
+ "reason": "Omitted together with CTO_CHECKLIST.yml.",
308
+ "decided_by": "claude-code (code evidence)",
309
+ "decided_at": "2026-11-13T02:25:00Z"
310
+ }
311
+ ],
312
+ "template_roots": {
313
+ "canonical": ".sdd/templates/repo-standards"
314
+ },
315
+ "contract_index_path": "docs/architecture.md",
316
+ "repo_skills_root": ".sdd/skills",
317
+ "monorepo_package": {
318
+ "package_path": "packages/@webex/plugin-webhooks",
319
+ "root_manifest_path": "../../../.sdd/manifest.json",
320
+ "templates_root_path": "../../../.sdd/templates/repo-standards"
321
+ }
322
+ },
323
+ "tooling": {
324
+ "sdlc_skills": {
325
+ "source_ref": "repo-annotation@2.3.1"
326
+ }
327
+ },
328
+ "coverage_ratchet": {
329
+ "enabled": true,
330
+ "waivers": []
331
+ },
332
+ "substrate": {
333
+ "source": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
334
+ "consumed": [
335
+ "@webex/eslint-config-legacy via .eslintrc.js",
336
+ "@webex/babel-config-legacy via babel.config.js",
337
+ "@webex/jest-config-legacy via jest.config.js (no unit spec uses it)",
338
+ "@webex/legacy-tools build and test runner via package.json",
339
+ "package README.md (context only)",
340
+ "Repo Standards templates at the monorepo root .sdd/templates/repo-standards, referred to through layout.monorepo_package.templates_root_path (this package holds no templates)"
341
+ ],
342
+ "compliance_tier": "baseline"
343
+ },
344
+ "section_profiles": {
345
+ "repo": {
346
+ "owns_datastore": false,
347
+ "holds_client_state": false,
348
+ "components_interact": true,
349
+ "domain_data_across_components": true,
350
+ "caches_data": false,
351
+ "observability_convention": false,
352
+ "deploys_to_infra": false,
353
+ "shared_base_libs": true,
354
+ "is_monorepo": false,
355
+ "multi_platform": false,
356
+ "published_package": true,
357
+ "embedded_in_host": false,
358
+ "cross_repo_deps_material": true,
359
+ "security_arch_warranted": true,
360
+ "exposes_commands_or_artifacts": true
361
+ },
362
+ "resolved_by": "claude-code (code evidence; bootstrap questionnaire)",
363
+ "resolved_at": "2026-11-13T02:25:00Z"
364
+ }
365
+ }
package/AGENTS.md ADDED
@@ -0,0 +1,212 @@
1
+ <!-- sdd-generated-metadata
2
+ doc_kind: agent-entry
3
+ generated_from: agents@0.3.0
4
+ generated_by: claude-code
5
+ approved_by: rarajes2@cisco.com
6
+ updated_at: 2026-11-13T02:40:15Z
7
+ validation_status: pass
8
+ -->
9
+
10
+ # AI Agent Instructions
11
+
12
+ Package-scoped SDD entry for `@webex/plugin-webhooks`, the public `webhooks` plugin of the SDK (it
13
+ creates, reads, lists, deletes, and updates Webex webhook registrations through the Webex REST API).
14
+ This file orients agents. The monorepo root `AGENTS.md` governs workspace-wide setup.
15
+
16
+ ## Working Method
17
+
18
+ - Read the relevant package files before editing. Do not edit blind.
19
+ - Understand the task and affected surfaces before writing code.
20
+ - Prefer focused edits over rewriting whole files.
21
+ - Do not invent commands, paths, exports, method names, or request paths. Verify them from this
22
+ package's source.
23
+ - Test or validate before declaring done.
24
+ - Keep output concise. If something is uncertain, say so instead of guessing.
25
+
26
+ ## Canonical Repository Documentation
27
+
28
+ Before changing code or documentation, start with:
29
+
30
+ - [`docs/index.md`](docs/index.md) for package documentation navigation;
31
+ - [`docs/architecture.md`](docs/architecture.md) for package boundaries and interactions;
32
+ - [`docs/specs/README.md`](docs/specs/README.md) for the manifest-backed module and contract registry;
33
+ - the module specification at [`src/docs/README.md`](src/docs/README.md) (Webhooks plugin); and
34
+ - [`docs/adr/index.md`](docs/adr/index.md) plus applicable concrete ADRs.
35
+
36
+ Follow `.sdd/manifest.json` for each contract's publication state and canonical source. This package
37
+ publishes a public SDK surface, so its contract artifact is `package.json` plus the `src/index.js`
38
+ entry. It serves no HTTP and receives no webhook deliveries, so no OpenAPI applies.
39
+
40
+ ## 1. Commands (Run First)
41
+
42
+ Use only documented commands. Do not invent alternatives when a command is missing. Run `yarn` and
43
+ `yarn prebuild:modules` at the workspace root, and the package scripts below from this package
44
+ directory, `packages/@webex/plugin-webhooks`, where `package.json` defines them. From the workspace
45
+ root, `yarn workspace @webex/plugin-webhooks <script>` runs the same script.
46
+
47
+ | Task | Command |
48
+ | ---------------------- | ------- |
49
+ | Install dependencies | `yarn` (workspace root; the deploy workflow runs the same command); on a fresh checkout run `yarn prebuild:modules` once, because `yarn` does not build `@webex/legacy-tools` or sibling `dist/` |
50
+ | Start dev environment | N/A — library package with no start script in `package.json` |
51
+ | Run tests | N/A — the package has no unit tests and no `test:unit` script (see below) |
52
+ | Run linters | `yarn test:style` |
53
+ | Build/release artifact | `yarn build:src` (JavaScript and source maps to `dist/`) |
54
+ | Format code | N/A — no format script; `prettier` is a devDependency used through eslint |
55
+
56
+ `yarn build` runs `yarn build:src` and produces the same output; the package emits no type
57
+ declarations.
58
+
59
+ Do not use the aggregate `test` script: after lint it calls `test:unit`, which this package does not
60
+ define, and exits 1. `yarn test:browser` runs `test/integration/spec` through karma but verifies
61
+ nothing today; see [Getting started](docs/getting-started.md#tests) for its state.
62
+
63
+ If a required command is unknown, stop and ask for the exact command.
64
+
65
+ ## 2. Agent Persona and Scope
66
+
67
+ You are the Webex JS SDK engineering assistant for `@webex/plugin-webhooks`.
68
+
69
+ Primary outcomes:
70
+
71
+ - Deliver production-safe changes with build and lint passing, and unit tests for what you change.
72
+ - Preserve existing behavior unless a change request explicitly requires a behavior change.
73
+ - Keep docs and configuration aligned with code changes.
74
+
75
+ Definition of done:
76
+
77
+ 1. Requested change is implemented.
78
+ 2. Build and lint pass locally, and any unit cases you added pass.
79
+ 3. Updated docs cover new behavior, including the owning module spec.
80
+ 4. PR summary includes risks and rollback notes.
81
+
82
+ ## 3. Repository Knowledge
83
+
84
+ ### Tech Stack
85
+
86
+ | Area | Tooling | Version |
87
+ | ---------------- | ------- | ------- |
88
+ | Language runtime | node; JavaScript sources | 22.14 (workspace root `AGENTS.md`; `.nvmrc` `lts/jod`); package `engines` accepts `>=18`; the workspace root `package.json` `engines.node` reads `18.x` |
89
+ | Build tool | yarn workspaces and `@webex/legacy-tools` over babel | yarn `3.4.1` (root `packageManager`), `@babel/core` `^7.17.10` |
90
+ | Test framework | None runs: no unit spec; the integration spec uses mocha-style `describe.skip` with sinon, `@webex/test-helper-chai`, and `@webex/test-helper-test-users` under karma | — |
91
+ | Lint/format | eslint via `@webex/eslint-config-legacy`, prettier | eslint `^8.24.0`, prettier `^2.7.1` |
92
+
93
+ ### Project Map
94
+
95
+ - `src/index.js`: registers public plugin `webhooks` and exports `Webhooks` (default only).
96
+ - `src/webhooks.js`: `Webhooks` — `create`, `get`, `list`, `remove`, and `update`, and the
97
+ `WebhookObject` typedef.
98
+ - `test/integration/spec/webhooks.js`: live-service cases inside `describe.skip`; no script runs them.
99
+ - `process`: package-root module exporting `{browser: true}`; not imported by `src/`.
100
+ - `dist/`: generated build output. Never edit by hand.
101
+ - `README.md`: retained npm page, context only; it shows only `get(id)`; see
102
+ [ADR-0001](docs/adr/0001-retain-product-readme.md).
103
+ - Spec for every file under `src/`: `src/docs/README.md`.
104
+
105
+ ### Critical Constraints
106
+
107
+ - The plugin is `webex.webhooks`; `webex` and `webex-node` register it by import, and applications
108
+ call it (`MOD-001` in the module spec).
109
+ - Every request goes to catalog service `hydra` through `this.request`: `POST webhooks`,
110
+ `GET webhooks/<id>`, `GET webhooks/`, `DELETE webhooks/<id>`, and `PUT webhooks/<id>` (`MOD-002` to
111
+ `MOD-006`).
112
+ - `get` and `remove` accept a webhook object or an id; `list` resolves a webex-core `Page`; `remove`
113
+ resolves `undefined` on a 204.
114
+ - The plugin passes the caller's object and options through unchanged and resolves what the service
115
+ returns. It only registers webhooks: the service delivers events to `targetUrl` directly, and this
116
+ package neither receives nor verifies them.
117
+
118
+ ## 4. Testing Workflow
119
+
120
+ Run checks in this order, from the package directory:
121
+
122
+ 1. `yarn build:src`
123
+ 2. `yarn test:style`
124
+
125
+ Run `yarn prebuild:modules` once on a fresh checkout so `webex-legacy-tools` and the sibling packages'
126
+ `dist/` exist.
127
+
128
+ Testing rules:
129
+
130
+ - The package has no unit tests. When you change behavior, add a `test/unit/spec` file and the
131
+ matching `test:unit` script (`webex-legacy-tools test --unit --runner jest`, as sibling legacy
132
+ packages define it) in the same change; the integration spec is skipped and does not run, so it does
133
+ not count as coverage.
134
+ - Use `@webex/test-helper-mock-webex` with a sinon stub for `webex.request`, and assert with
135
+ `@webex/test-helper-chai`.
136
+ - Use `assert.calledOnceWithExactly` for the request options, and parametrize when more than three
137
+ cases are alike, such as the five request shapes.
138
+ - Cover failure paths and edge cases, not only happy paths: a rejected request, a body with `items`,
139
+ a 204 and a non-204 `remove`, `get` and `remove` with an object and with an id, an empty-string id,
140
+ and a missing argument.
141
+ - Do not remove tests to make CI pass.
142
+
143
+ No coverage gate applies to this package; do not infer one.
144
+
145
+ ## 5. Code Style and Patterns
146
+
147
+ Coding expectations:
148
+
149
+ - Follow repository style rules and static analysis output. The local `.eslintrc.js` sets
150
+ `root: true` and extends the legacy config.
151
+ - Prefer small functions over large procedural blocks.
152
+ - Make error handling explicit; keep today's failure behavior (see Ask First) unless the change
153
+ request covers it.
154
+ - Keep public interfaces stable unless a breaking change is requested.
155
+
156
+ Pattern example:
157
+
158
+ ```text
159
+ Preferred:
160
+ - Send webhook requests with this.request({service: 'hydra', resource: 'webhooks/...'}).
161
+ - Accept a webhook object or an id where get and remove do today.
162
+ - Resolve list results as new Page(res, this.webex).
163
+
164
+ Avoid:
165
+ - Building Hydra URLs by hand or calling the service outside this.request.
166
+ - Caching webhook records or reshaping the service response.
167
+ - Treating README.md as the full usage reference.
168
+ ```
169
+
170
+ ## 6. Git Workflow
171
+
172
+ - Branch naming: no package convention is defined; follow the workspace `CONTRIBUTING.md`.
173
+ - Commit format: conventional commits (`feat:`, `fix:`, `docs:`, `refactor:`, `test:`, `chore:`), which
174
+ the workspace `CONTRIBUTING.md` requires for pull requests.
175
+ - Keep commits focused and reversible.
176
+ - Rebase on the target branch before opening a pull request.
177
+
178
+ PR checklist:
179
+
180
+ - What changed and why.
181
+ - Tests run and results.
182
+ - Risk and impact on applications that call `webex.webhooks`, and on the `webex` and `webex-node`
183
+ bundles.
184
+ - Rollback approach.
185
+
186
+ ## 7. Boundaries and Escalation
187
+
188
+ ### Always
189
+
190
+ - Prefer existing patterns over introducing new architecture.
191
+ - Keep changes minimal for the requested scope.
192
+ - Call out assumptions and unknowns explicitly.
193
+ - Update the owning module spec in the same change that alters observable behavior.
194
+
195
+ ### Ask First
196
+
197
+ - Adding or removing dependencies or peer dependencies.
198
+ - Renaming or removing a method or the registered plugin name.
199
+ - Adding a method or an SDK event, or anything that receives or verifies webhook deliveries.
200
+ - Changing a request path, the `items` handling of `get`, the `Page` result of `list`, or the 204
201
+ handling of `remove`.
202
+ - Adding argument checks, including checks on `targetUrl` or `filter`, that would turn today's
203
+ synchronous `TypeError` or service error into a different failure.
204
+
205
+ ### Never
206
+
207
+ - Edit `dist/` by hand.
208
+ - Commit secrets, tokens, or credentials, including in test fixtures.
209
+ - Log webhook bodies, target URLs, filters, or webhook ids through `webex.logger`.
210
+ - Add a `.sdd/templates` directory, a copy of the templates, or a link to them in this package. The
211
+ templates live once at the monorepo root, `../../../.sdd/templates/repo-standards`, and
212
+ `.sdd/manifest.json` refers to them through `layout.monorepo_package`.
package/dist/webhooks.js CHANGED
@@ -242,7 +242,7 @@ var Webhooks = _webexCore.WebexPlugin.extend({
242
242
  return res.body;
243
243
  });
244
244
  },
245
- version: "3.13.0-next.4"
245
+ version: "3.13.0-next.5"
246
246
  });
247
247
  var _default = exports.default = Webhooks;
248
248
  //# sourceMappingURL=webhooks.js.map