Skip to content

Commit 2805a8d

Browse files
BillLeoutsakosvl346Bill Leoutsakoswaleedlatif1
authored
feat(windchill): add document integration (#6577)
* feat(windchill): add document integration * fix(windchill): align tool contracts and docs * fix(windchill): use official integration icon * fix(windchill): correct response and paging semantics * fix(windchill): align execution and API contracts * refactor(windchill): inline route authentication * fix(windchill): correct OData query encoding, content download, and cleared-field handling Validated the integration end to end against PTC Windchill REST Services 2.7 documentation and fixed every divergence found. Protocol correctness: - Encode OData query spaces as %20 rather than the form-encoded `+` that URLSearchParams emits. Every multi-token $filter and $orderby reached Windchill as a literal `+` and could not match. - Download content through the documented typed navigation `<content>/PTC.ApplicationData/Content/URL`, which returns a signed vault URL, instead of a `$value` segment that WRS does not implement. The resolved URL is pinned to the configured HTTPS origin. - Terminate every Stage 2 CacheDescriptor_array entry with `;` to match the documented grammar. - Raise the $top bound to Windchill's documented 2000 maximum, keeping 200 as the default page size. Cleared-field handling: - The executor merges raw block inputs before the block's param transform, so omitting a key could not clear it. A cleared numeric or boolean field reached the URL builder as '' and threw, and cleared optional strings failed contract validation. Coercions now emit an explicit undefined, and the internal-route body strips blanks centrally. Robustness and contracts: - Bound the document-structure walk to the depth actually requested. - Loosen response schemas that re-applied request-side bounds to provider-returned values, which turned committed mutations into opaque parse failures. - Return contract-shaped bodies for oversized, malformed, and unhandled request failures. - Normalize downloaded content types and drop charset parameters. Presentation and docs: - Square the icon to a centred tile on white. - Replace WT.Document and PATCH-compatible jargon with plain language. - Fix canvas sentence noun stutters on the bulk operations. - Correct the revision skill's unverified working-copy claim to read the OID back rather than assume it, and add retirement and stale-checkout skills. - Add a manual intro section to the integration docs page. * fix(windchill): align tool copy with the docs page and rebase the route baseline Tool descriptions feed both the integration catalog and the generated docs page, so the plain-language pass had to reach them too: drop WT.Document and PATCH-compatible from the operation copy, and correct the $top bound the descriptions still advertised as 200. Correct the docs intro's attachment wording, gloss OData on first use, and attribute the bulk-atomicity claim to PTC's documented behavior. Raise the API route-count baseline, which staging advanced while this branch was behind. * feat(windchill): add update common properties Name, Number, and Organization are rejected by the PATCH-based update operation, and the rejection message told users to reach for Windchill's UpdateCommonProperties action that the integration did not expose. Add it. PTC documents UpdateCommonProperties as a bound DocMgmt action taking an Updates wrapper, available when hasCommonProperties is set on the Documents entity, and refused while the document is checked out. The subblock and param descriptions carry that constraint, and the rejection message now names the operation that does the job. * test(windchill): assert block and tool params stay aligned for every operation Validating the new operation surfaced that nothing enforced the block-to-tool alignment the review process had been checking by hand. Assert it for all 27 operations instead: every required tool param has a required, non-advanced input under that operation's condition, and no operation shows an input its tool cannot accept. Both fail on a deliberately broken condition or a dropped required flag. --------- Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local> Co-authored-by: Waleed Latif <walif6@gmail.com>
1 parent 9aa16e3 commit 2805a8d

50 files changed

Lines changed: 8309 additions & 6 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/docs/components/icons.tsx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2494,6 +2494,32 @@ export function DocumentIcon(props: SVGProps<SVGSVGElement>) {
24942494
)
24952495
}
24962496

2497+
export function WindchillIcon(props: SVGProps<SVGSVGElement>) {
2498+
return (
2499+
<svg
2500+
viewBox='79 57 88 88'
2501+
role='img'
2502+
aria-label='Windchill icon'
2503+
xmlns='http://www.w3.org/2000/svg'
2504+
{...props}
2505+
>
2506+
<rect x='79' y='57' width='88' height='88' fill='#FFFFFF' />
2507+
<g fill='#3D4647'>
2508+
<polygon points='137.2,86.6 137.2,68.5 122.8,60.2 107.1,69.2' />
2509+
<polygon points='142.7,106.4 158.4,97.3 158.4,80.7 142.7,71.6' />
2510+
<polygon points='108.5,115.8 108.5,133.9 122.8,142.2 138.5,133.2' />
2511+
<polygon points='128.2,121 143.9,130.1 158.4,121.7 158.4,103.6' />
2512+
<polygon points='117.4,81.4 101.7,72.4 87.3,80.7 87.3,98.8' />
2513+
<polygon points='103,96 87.3,105.1 87.3,121.7 103,130.8' />
2514+
</g>
2515+
<polygon
2516+
fill='#40AA1D'
2517+
points='137.2,109.5 122.8,117.8 108.4,109.5 108.4,92.9 122.8,84.6 137.2,92.9'
2518+
/>
2519+
</svg>
2520+
)
2521+
}
2522+
24972523
export function MintlifyIcon(props: SVGProps<SVGSVGElement>) {
24982524
return (
24992525
<svg {...props} xmlns='http://www.w3.org/2000/svg' viewBox='0 0 19 19' fill='none'>

apps/docs/components/ui/icon-mapping.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ import {
245245
WebhookIcon,
246246
WhatsAppIcon,
247247
WikipediaIcon,
248+
WindchillIcon,
248249
WizaIcon,
249250
WordpressIcon,
250251
WorkdayIcon,
@@ -538,6 +539,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
538539
webflow: WebflowIcon,
539540
whatsapp: WhatsAppIcon,
540541
wikipedia: WikipediaIcon,
542+
windchill: WindchillIcon,
541543
wiza: WizaIcon,
542544
wordpress: WordpressIcon,
543545
workday: WorkdayIcon,

apps/docs/content/docs/en/integrations/meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@
259259
"webflow-service-account",
260260
"whatsapp",
261261
"wikipedia",
262+
"windchill",
262263
"wiza",
263264
"wordpress",
264265
"workday",

apps/docs/content/docs/en/integrations/windchill.mdx

Lines changed: 937 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)