@omnixdp/typegen 0.3.0 → 0.3.1

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.
package/README.md CHANGED
@@ -27,6 +27,8 @@ npx omnixdp-typegen \
27
27
 
28
28
  Space arguments can be a space id, slug, or exact name. Typegen loads `.env` and `.env.local` before evaluating config files, then exchanges client credentials for short-lived access tokens. Existing `--management-token`, `--business-objects-token`, and `--ratings-and-reviews-token` flags remain supported when you already have bearer tokens. Regenerate the output after changing content types, taxonomy types, data types, or global fields in the admin.
29
29
 
30
+ Generated CMS taxonomy response aliases use the delivery SDK's typed taxonomy tree shape: term `slug` and `url` remain top-level node metadata, while nested node `data` omits those route fields.
31
+
30
32
  ## Check in CI
31
33
 
32
34
  ```bash
package/dist/generate.js CHANGED
@@ -21,7 +21,7 @@ function renderHeader(schema) {
21
21
  `// Schema hash: ${schema.sourceHash}`
22
22
  ];
23
23
  if (usesDeliveryTypes(schema)) {
24
- lines.push("", "import type { DeliveryAsset, DeliveryEntry, DeliveryTaxonomyResponse } from \"@omnixdp/delivery\";");
24
+ lines.push("", "import type { DeliveryAsset, DeliveryEntry, TypedDeliveryTaxonomyResponse } from \"@omnixdp/delivery\";");
25
25
  }
26
26
  return lines.join("\n");
27
27
  }
@@ -75,7 +75,7 @@ function renderConvenienceAliases(schema) {
75
75
  lines.push("export type CmsDeliveryEntry<TApiIdentifier extends keyof CmsContentTypes> = DeliveryEntry<CmsContentTypes[TApiIdentifier]>;");
76
76
  }
77
77
  if (schema.cms.taxonomyTypes.length > 0) {
78
- lines.push("export type CmsTaxonomyResponse<TApiIdentifier extends keyof CmsTaxonomyTypes> = DeliveryTaxonomyResponse & {", " tree: Array<DeliveryTaxonomyResponse[\"tree\"][number] & { data?: CmsTaxonomyTypes[TApiIdentifier] | null }>;", "};");
78
+ lines.push("export type CmsTaxonomyResponse<TApiIdentifier extends keyof CmsTaxonomyTypes> = TypedDeliveryTaxonomyResponse<CmsTaxonomyTypes[TApiIdentifier]>;");
79
79
  }
80
80
  if (schema.businessObjects.dataTypes.length > 0) {
81
81
  lines.push("export type BusinessObjectDataObject<TApiIdentifier extends keyof BusinessObjectDataTypes> = {", " id: string;", " data: BusinessObjectDataTypes[TApiIdentifier];", " [key: string]: unknown;", "};");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omnixdp/typegen",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "TypeScript type generator for Omni xDP SDK response models.",
5
5
  "license": "MIT",
6
6
  "repository": {