@tolinax/ayoune-interfaces 2026.31.1 → 2026.32.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.
@@ -15,6 +15,27 @@ interface IModelAction {
15
15
  dangerous?: boolean;
16
16
  confirmation?: string;
17
17
  }
18
+ /**
19
+ * Operations exposable to the Custom Functions `ay.db.*` sandbox SDK.
20
+ *
21
+ * Used in `IModelAndRight.sdkOperations` to narrow what customer-written
22
+ * code can do against a given entity. If omitted on an entry that has
23
+ * `availableInSDK: true`, the default follows the global `readOnly` flag:
24
+ *
25
+ * - `readOnly: true` → ["find", "findOne", "aggregate", "count"]
26
+ * - `readOnly: false` → all six operations
27
+ */
28
+ export type SDKOperation = "find" | "findOne" | "insert" | "update" | "aggregate" | "count";
29
+ /**
30
+ * GDPR classification for a model — drives audit verbosity in
31
+ * custom-functions-worker, warnings in the user-functions-editor, and
32
+ * filtering in admin-v2's rights manager.
33
+ *
34
+ * - `none` — reference data, no personal information (Countries, Taxes)
35
+ * - `low` — business data with tenant scope (Orders, Invoices, Products)
36
+ * - `high` — consumer PII, user data, payment, auth (Consumers, Credentials)
37
+ */
38
+ export type PIILevel = "none" | "low" | "high";
18
39
  export interface IModelAndRight {
19
40
  plural: string;
20
41
  singular: string;
@@ -28,6 +49,12 @@ export interface IModelAndRight {
28
49
  actions?: IModelAction[];
29
50
  searchable?: boolean;
30
51
  searchableFields?: string[];
52
+ labelKey?: string;
53
+ labelPluralKey?: string;
54
+ descriptionKey?: string;
55
+ piiLevel?: PIILevel;
56
+ availableInSDK?: boolean;
57
+ sdkOperations?: SDKOperation[];
31
58
  }
32
59
  declare const modelsAndRights: IModelAndRight[];
33
60
  export default modelsAndRights;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tolinax/ayoune-interfaces",
3
- "version": "2026.31.1",
3
+ "version": "2026.32.0",
4
4
  "description": "Houses TypeScript interfaces for aYOUne",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",