@@ -12,14 +12,14 @@ accounts hit the carrier API with their own rates. npm has no direct FedEx node
1212done, ` pnpm build ` + ` pnpm lint ` verified green-toolchain. The node still contains the
1313** placeholder ` User ` /` Company ` resources** — these must be replaced with the four real operations.
1414The full spec, decided scope, API map, and acceptance criteria live in
15- ** ` fedex-node-build-brief.md ` ** (read it first). All doc links are centralized in
16- ** ` documentation.yaml ` ** — consult it before web-searching for any FedEx or n8n reference. The
17- scaffold's own n8n build guidance lives in ** ` AGENTS.md ` ** + ** ` .agents/*.md ` ** (load the relevant
18- ` .agents/ ` file before editing nodes/credentials — see the table in ` AGENTS.md ` ).
19-
20- ** The FedEx docs are captured locally in ` fedex-docs/ ` — do not web-search FedEx, read these.**
21- The ` .md ` files are the portal prose; ** ` fedex-docs/json-schemas/*.json ` are the OpenAPI specs and
22- are AUTHORITATIVE** for request/response field names, enums, and nesting. ` documentation.yaml `
15+ ** ` internal/ fedex-node-build-brief.md` ** (read it first). All doc links are centralized in
16+ ** ` internal/ documentation.yaml` ** — consult it before web-searching for any FedEx or n8n reference. The
17+ scaffold's own n8n build guidance lives in ** ` internal/ AGENTS.md` ** + ** ` internal/ .agents/*.md` ** (load the relevant
18+ ` internal/ .agents/` file before editing nodes/credentials — see the table in ` internal/ AGENTS.md` ).
19+
20+ ** The FedEx docs are captured locally in ` internal/ fedex-docs/` — do not web-search FedEx, read these.**
21+ The ` .md ` files are the portal prose; ** ` internal/ fedex-docs/json-schemas/*.json` are the OpenAPI specs and
22+ are AUTHORITATIVE** for request/response field names, enums, and nesting. ` internal/ documentation.yaml`
2323maps each operation to its ` local_md ` + ` local_schema ` and lists the confirmed Ship label enums
2424and a MIME map. The portal pages require login, so the captured specs are the working source.
2525
@@ -69,7 +69,7 @@ against `ship.json` — the leaf is `LabelResponseVO`, which also carries `track
6969the chosen ` imageType ` (` PDF ` →` application/pdf ` , ` PNG ` →` image/png ` , ` ZPLII ` /` EPL2 ` →
7070` application/octet-stream ` ) and a sensible filename (e.g. ` label-<trackingNumber>.pdf ` ). Pass the
7171JSON (tracking number, rates) through on the main output. Send ` labelResponseOptions: LABEL ` to get
72- the base64 inline (vs ` URL_ONLY ` ). The full confirmed enum lists are in ` documentation.yaml ` .
72+ the base64 inline (vs ` URL_ONLY ` ). The full confirmed enum lists are in ` internal/ documentation.yaml` .
7373
7474** Auth — the scaffold uses n8n's built-in OAuth2.** The generated credential
7575` FedexOAuth2Api ` (` credentials/FedexOAuth2Api.credentials.ts ` , credential name ` fedexOAuth2Api ` )
@@ -88,41 +88,45 @@ What still needs fixing before it works:
8888- The node's ` requestDefaults.baseURL ` is likewise hardcoded to prod — tie it to the same env choice.
8989
9090` client_id ` /` client_secret ` map to the FedEx ** API Key / Secret Key** . FedEx errors: surface
91- ` errors[].message ` ; treat ` 4xx ` validation distinctly. Exact OAuth shape: ` documentation.yaml ` → ` fedex.auth ` .
91+ ` errors[].message ` ; treat ` 4xx ` validation distinctly. Exact OAuth shape: ` internal/ documentation.yaml` → ` fedex.auth ` .
9292
9393** Account number is sensitive and required for Rate + Ship.** Source it from the credential or a
9494node field — never a default, never hardcoded. Same for API keys and base URLs.
9595
96- ** File layout (scaffolded).** Package lives at repo root; reference docs (` fedex-docs/ ` ,
97- ` documentation.yaml ` , ` fedex-node-build-brief.md ` ) sit alongside but are excluded from the npm
98- tarball (` package.json ` ` files: ["dist"] ` ). The node is ` nodes/Fedex/Fedex.node.ts ` ; per-resource
96+ ** File layout (scaffolded).** Package lives at repo root. All internal reference docs, specs, and
97+ planning live under ** ` internal/ ` ** , which is gitignored by this public repo and is ** its own
98+ private git repo** (` nodrel-dev/n8n-fedex-node-internal ` ). On a fresh clone, restore it with
99+ ` ./bootstrap-internal.sh ` ; commit doc changes from inside ` internal/ ` , code changes from the root.
100+ The reference docs (` internal/fedex-docs/ ` , ` internal/documentation.yaml ` ,
101+ ` internal/fedex-node-build-brief.md ` ) are also excluded from the npm tarball (` package.json `
102+ ` files: ["dist"] ` ). The node is ` nodes/Fedex/Fedex.node.ts ` ; per-resource
99103descriptions live in ` nodes/Fedex/resources/<resource>/ ` . The two resources ** mirror the two FedEx
100104dev-portal projects / credentials** (ADR-0004): ` tracking/ ` holding ** Track** (binds
101105` fedexTrackOAuth2Api ` ), and ` shipping/ ` holding ** Get Rates** , ** Create** , and ** Validate** (binds
102106` fedexShippingOAuth2Api ` — the shipping project bundles Rate + Ship + Address Validation under one
103107key). Resource = FedEx project, operation = verb; credentials bind per operation (operation values
104108are globally unique). Keep files focused (<800 lines), one resource per folder, so operations stay
105109independent and the pattern is reusable for a future UPS package. The rationale behind the resource
106- model and the sandbox/production credential design is captured in the local ` docs/adr/ ` notes (kept
107- out of the published repo, like ` fedex-docs/ ` and ` documentation.yaml ` ).
110+ model and the sandbox/production credential design is captured in the local ` internal/ docs/adr/` notes (kept
111+ out of the published repo, like ` internal/ fedex-docs/` and ` internal/ documentation.yaml` ).
108112
109113## Hard constraints (these will fail the build / lint if violated)
110114
111115- ** pnpm only.** npm breaks the install.
112116- ** Do not modify the eslint config** — ` n8n-node lint --strict ` fails if it differs from default.
113117- ** Verify FedEx field names / paths against live docs** before coding each operation — versions
114- drift. ` documentation.yaml ` flags which entries need re-verification (` verify: true ` ).
118+ drift. ` internal/ documentation.yaml` flags which entries need re-verification (` verify: true ` ).
115119- Surface the real FedEx error (` errors[].message ` ) via ` NodeApiError ` / ` NodeOperationError ` ;
116120 honor n8n's ** Continue On Fail** .
117121- Package must be named ` n8n-nodes-fedex ` , include the ` n8n-community-node-package ` keyword, and
118122 declare the ` n8n ` config block pointing at built nodes + credentials.
119123
120124## Reference shortcuts
121125
122- - Full spec & acceptance criteria → ` fedex-node-build-brief.md `
123- - All doc URLs, local doc map, confirmed endpoints/enums, OAuth shape → ` documentation.yaml `
124- - FedEx request/response shapes → ` fedex-docs/json-schemas/*.json ` (OpenAPI, authoritative);
125- prose → ` fedex-docs/*.md ` . Operation→file mapping is in ` documentation.yaml ` .
126+ - Full spec & acceptance criteria → ` internal/ fedex-node-build-brief.md`
127+ - All doc URLs, local doc map, confirmed endpoints/enums, OAuth shape → ` internal/ documentation.yaml`
128+ - FedEx request/response shapes → ` internal/ fedex-docs/json-schemas/*.json` (OpenAPI, authoritative);
129+ prose → ` internal/ fedex-docs/*.md` . Operation→file mapping is in ` internal/ documentation.yaml` .
126130- Live n8n SDK types (` INodeType ` , ` INodeTypeDescription ` , ` IExecuteFunctions ` , ` ICredentialType ` )
127131 → prefer the n8n-mcp (MCP_DOCKER) or Context7 MCP tools over recalling from memory.
128132
0 commit comments