@dosgato/templating 0.0.31 → 0.0.32

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.
@@ -96,9 +96,11 @@ export interface APIPageTemplate extends APITemplate {
96
96
  export interface APIDataTemplate extends APITemplate {
97
97
  type: 'data';
98
98
  /**
99
- * Data template implementations receive the dataId so they can self-reference in queries.
99
+ * Data template implementations receive the id of the dataroot the data is/will be inside,
100
+ * as well as the folder id (if applicable) and their own id. Keep in mind dataId will be
101
+ * null when it is a creation operation.
100
102
  */
101
- validate?: (data: ComponentData, query: GraphQLQueryFn, dataId: string) => Promise<ValidationFeedback[]>;
103
+ validate?: (data: ComponentData, query: GraphQLQueryFn, dataRootId: string, dataFolderId?: string, dataId?: string) => Promise<ValidationFeedback[]>;
102
104
  migrations: DataMigration[];
103
105
  }
104
106
  export declare type APIAnyTemplate = APIComponentTemplate | APIPageTemplate | APIDataTemplate;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dosgato/templating",
3
- "version": "0.0.31",
3
+ "version": "0.0.32",
4
4
  "description": "A library to support building templates for dosgato CMS.",
5
5
  "type": "module",
6
6
  "exports": {