@bettercms-ai/types 1.35.0 → 1.36.0

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/dist/index.d.ts CHANGED
@@ -1743,6 +1743,10 @@ interface Component {
1743
1743
  */
1744
1744
  interface DeliveryComponent {
1745
1745
  id: string;
1746
+ /** The project the component belongs to. */
1747
+ projectId?: string | null;
1748
+ /** The component's preview image in the editor's library, when it has one. */
1749
+ thumbnail?: string | null;
1746
1750
  name: string;
1747
1751
  slug: string;
1748
1752
  category: ComponentCategory;
@@ -1998,7 +2002,25 @@ interface DeliveryEntry<T = Record<string, unknown>> {
1998
2002
  status: "draft" | "published";
1999
2003
  publishedAt: string | null;
2000
2004
  updatedAt: string | null;
2005
+ /**
2006
+ * The entry's language (`null`: the site's default) and, on a translation, the id of the entry it
2007
+ * translates. Served on every entry since localization shipped; absent from this type until the
2008
+ * contract test (backend · src/__tests__/contracts/delivery-types.test.ts) held the two together.
2009
+ */
2010
+ locale?: string | null;
2011
+ translationOf?: string | null;
2012
+ /** Single-entry read only: the other languages of this entry. */
2013
+ translations?: Array<{
2014
+ id: string;
2015
+ locale: string | null;
2016
+ slug: string;
2017
+ }>;
2001
2018
  data: T;
2019
+ /** Only on a campaign entry: the account's section plan (ABM). */
2020
+ _abm?: {
2021
+ campaignId: string;
2022
+ layout: unknown;
2023
+ };
2002
2024
  /**
2003
2025
  * The entry's SEO, ready for `<head>`: its collection template's meta and JSON-LD with
2004
2026
  * `{{field}}` tokens already resolved for this entry, the entry's own values merged over it
@@ -2095,6 +2117,9 @@ interface DeliveryPage {
2095
2117
  layout?: DeliveredLayout | null;
2096
2118
  updatedAt: string | null;
2097
2119
  publishedAt: string | null;
2120
+ /** The page's language (`null`: the site's default) and, on a translation, the page it translates. */
2121
+ locale?: string | null;
2122
+ translationOf?: string | null;
2098
2123
  }
2099
2124
  /** Generic paginated list envelope (the `data` of a list response). */
2100
2125
  interface DeliveryList<T> {
@@ -2105,6 +2130,8 @@ interface DeliveryList<T> {
2105
2130
  totalPages: number;
2106
2131
  hasNextPage: boolean;
2107
2132
  hasPreviousPage: boolean;
2133
+ /** Entry lists only: the project the read was addressed to, when one was named or implied. */
2134
+ projectId?: string | null;
2108
2135
  }
2109
2136
 
2110
2137
  /**