@tolinax/ayoune-interfaces 2026.31.1 → 2026.32.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.
@@ -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;
@@ -1271,6 +1271,12 @@ const modelsAndRights = [
1271
1271
  importable: true,
1272
1272
  allowDuplicate: false,
1273
1273
  updateBy: "_id",
1274
+ labelKey: "model.Consumer.label",
1275
+ labelPluralKey: "model.Consumer.labelPlural",
1276
+ descriptionKey: "model.Consumer.description",
1277
+ piiLevel: "high",
1278
+ availableInSDK: true,
1279
+ sdkOperations: ["find", "findOne", "insert", "update", "aggregate", "count"],
1274
1280
  searchable: true,
1275
1281
  searchableFields: ['firstname', 'lastname', 'email', 'phone', 'company'],
1276
1282
  actions: [
@@ -1307,6 +1313,12 @@ const modelsAndRights = [
1307
1313
  importable: false,
1308
1314
  allowDuplicate: false,
1309
1315
  updateBy: "_id",
1316
+ labelKey: "model.Event.label",
1317
+ labelPluralKey: "model.Event.labelPlural",
1318
+ descriptionKey: "model.Event.description",
1319
+ piiLevel: "low",
1320
+ availableInSDK: true,
1321
+ sdkOperations: ["find", "findOne", "aggregate", "count"],
1310
1322
  },
1311
1323
  {
1312
1324
  plural: "Hooks",
@@ -1397,6 +1409,12 @@ const modelsAndRights = [
1397
1409
  importable: false,
1398
1410
  allowDuplicate: true,
1399
1411
  updateBy: "_id",
1412
+ labelKey: "model.Product.label",
1413
+ labelPluralKey: "model.Product.labelPlural",
1414
+ descriptionKey: "model.Product.description",
1415
+ piiLevel: "none",
1416
+ availableInSDK: true,
1417
+ sdkOperations: ["find", "findOne", "aggregate", "count"],
1400
1418
  searchable: true,
1401
1419
  searchableFields: ['name', 'sku', 'ean', 'description'],
1402
1420
  },
@@ -1409,6 +1427,12 @@ const modelsAndRights = [
1409
1427
  importable: false,
1410
1428
  allowDuplicate: true,
1411
1429
  updateBy: "_id",
1430
+ labelKey: "model.Project.label",
1431
+ labelPluralKey: "model.Project.labelPlural",
1432
+ descriptionKey: "model.Project.description",
1433
+ piiLevel: "low",
1434
+ availableInSDK: true,
1435
+ sdkOperations: ["find", "findOne", "insert", "update", "aggregate", "count"],
1412
1436
  searchable: true,
1413
1437
  searchableFields: ['subject', 'description'],
1414
1438
  actions: [
@@ -1436,6 +1460,12 @@ const modelsAndRights = [
1436
1460
  importable: false,
1437
1461
  allowDuplicate: false,
1438
1462
  updateBy: "_id",
1463
+ labelKey: "model.Setting.label",
1464
+ labelPluralKey: "model.Setting.labelPlural",
1465
+ descriptionKey: "model.Setting.description",
1466
+ piiLevel: "low",
1467
+ availableInSDK: true,
1468
+ sdkOperations: ["find", "findOne", "aggregate", "count"],
1439
1469
  },
1440
1470
  {
1441
1471
  plural: "Sprints",
@@ -2200,6 +2230,12 @@ const modelsAndRights = [
2200
2230
  importable: false,
2201
2231
  allowDuplicate: false,
2202
2232
  updateBy: "_id",
2233
+ labelKey: "model.Company.label",
2234
+ labelPluralKey: "model.Company.labelPlural",
2235
+ descriptionKey: "model.Company.description",
2236
+ piiLevel: "low",
2237
+ availableInSDK: true,
2238
+ sdkOperations: ["find", "findOne", "insert", "update", "aggregate", "count"],
2203
2239
  searchable: true,
2204
2240
  searchableFields: ['name', 'email', 'phone', 'domain'],
2205
2241
  },
@@ -2372,6 +2408,12 @@ const modelsAndRights = [
2372
2408
  importable: false,
2373
2409
  allowDuplicate: false,
2374
2410
  updateBy: "_id",
2411
+ labelKey: "model.ContactPerson.label",
2412
+ labelPluralKey: "model.ContactPerson.labelPlural",
2413
+ descriptionKey: "model.ContactPerson.description",
2414
+ piiLevel: "high",
2415
+ availableInSDK: true,
2416
+ sdkOperations: ["find", "findOne", "insert", "update", "aggregate", "count"],
2375
2417
  },
2376
2418
  {
2377
2419
  plural: "ContentCategories",
@@ -2382,6 +2424,12 @@ const modelsAndRights = [
2382
2424
  importable: false,
2383
2425
  allowDuplicate: true,
2384
2426
  updateBy: "_id",
2427
+ labelKey: "model.ContentCategory.label",
2428
+ labelPluralKey: "model.ContentCategory.labelPlural",
2429
+ descriptionKey: "model.ContentCategory.description",
2430
+ piiLevel: "none",
2431
+ availableInSDK: true,
2432
+ sdkOperations: ["find", "findOne", "aggregate", "count"],
2385
2433
  },
2386
2434
  {
2387
2435
  plural: "ContentProjects",
@@ -2414,6 +2462,12 @@ const modelsAndRights = [
2414
2462
  importable: false,
2415
2463
  allowDuplicate: false,
2416
2464
  updateBy: "_id",
2465
+ labelKey: "model.Contract.label",
2466
+ labelPluralKey: "model.Contract.labelPlural",
2467
+ descriptionKey: "model.Contract.description",
2468
+ piiLevel: "low",
2469
+ availableInSDK: true,
2470
+ sdkOperations: ["find", "findOne", "insert", "update", "aggregate", "count"],
2417
2471
  searchable: true,
2418
2472
  searchableFields: ['name', 'contractNumber'],
2419
2473
  },
@@ -2558,6 +2612,12 @@ const modelsAndRights = [
2558
2612
  importable: false,
2559
2613
  allowDuplicate: false,
2560
2614
  updateBy: "_id",
2615
+ labelKey: "model.Assignment.label",
2616
+ labelPluralKey: "model.Assignment.labelPlural",
2617
+ descriptionKey: "model.Assignment.description",
2618
+ piiLevel: "low",
2619
+ availableInSDK: true,
2620
+ sdkOperations: ["find", "findOne", "insert", "update", "aggregate", "count"],
2561
2621
  },
2562
2622
  {
2563
2623
  plural: "CreditNotes",
@@ -3688,6 +3748,12 @@ const modelsAndRights = [
3688
3748
  importable: false,
3689
3749
  allowDuplicate: false,
3690
3750
  updateBy: "_id",
3751
+ labelKey: "model.Industry.label",
3752
+ labelPluralKey: "model.Industry.labelPlural",
3753
+ descriptionKey: "model.Industry.description",
3754
+ piiLevel: "none",
3755
+ availableInSDK: true,
3756
+ sdkOperations: ["find", "findOne", "aggregate", "count"],
3691
3757
  },
3692
3758
  {
3693
3759
  plural: "InputFeeds",
@@ -3828,6 +3894,12 @@ const modelsAndRights = [
3828
3894
  importable: false,
3829
3895
  allowDuplicate: false,
3830
3896
  updateBy: "_id",
3897
+ labelKey: "model.Invoice.label",
3898
+ labelPluralKey: "model.Invoice.labelPlural",
3899
+ descriptionKey: "model.Invoice.description",
3900
+ piiLevel: "low",
3901
+ availableInSDK: true,
3902
+ sdkOperations: ["find", "findOne", "insert", "update", "aggregate", "count"],
3831
3903
  searchable: true,
3832
3904
  searchableFields: ['invoiceNumber', 'subject', 'recipientName'],
3833
3905
  actions: [
@@ -4035,6 +4107,12 @@ const modelsAndRights = [
4035
4107
  importable: false,
4036
4108
  allowDuplicate: false,
4037
4109
  updateBy: "_id",
4110
+ labelKey: "model.Lead.label",
4111
+ labelPluralKey: "model.Lead.labelPlural",
4112
+ descriptionKey: "model.Lead.description",
4113
+ piiLevel: "high",
4114
+ availableInSDK: true,
4115
+ sdkOperations: ["find", "findOne", "insert", "update", "aggregate", "count"],
4038
4116
  },
4039
4117
  {
4040
4118
  plural: "LinkPortalClicks",
@@ -4375,6 +4453,12 @@ const modelsAndRights = [
4375
4453
  importable: false,
4376
4454
  allowDuplicate: true,
4377
4455
  updateBy: "_id",
4456
+ labelKey: "model.Meeting.label",
4457
+ labelPluralKey: "model.Meeting.labelPlural",
4458
+ descriptionKey: "model.Meeting.description",
4459
+ piiLevel: "low",
4460
+ availableInSDK: true,
4461
+ sdkOperations: ["find", "findOne", "insert", "update", "aggregate", "count"],
4378
4462
  },
4379
4463
  {
4380
4464
  plural: "MeetingGroups",
@@ -4575,6 +4659,12 @@ const modelsAndRights = [
4575
4659
  importable: false,
4576
4660
  allowDuplicate: false,
4577
4661
  updateBy: "_id",
4662
+ labelKey: "model.Notification.label",
4663
+ labelPluralKey: "model.Notification.labelPlural",
4664
+ descriptionKey: "model.Notification.description",
4665
+ piiLevel: "low",
4666
+ availableInSDK: true,
4667
+ sdkOperations: ["find", "findOne", "insert", "update", "aggregate", "count"],
4578
4668
  },
4579
4669
  {
4580
4670
  plural: "NotificationPolicies",
@@ -4625,6 +4715,12 @@ const modelsAndRights = [
4625
4715
  importable: false,
4626
4716
  allowDuplicate: false,
4627
4717
  updateBy: "_id",
4718
+ labelKey: "model.Offer.label",
4719
+ labelPluralKey: "model.Offer.labelPlural",
4720
+ descriptionKey: "model.Offer.description",
4721
+ piiLevel: "low",
4722
+ availableInSDK: true,
4723
+ sdkOperations: ["find", "findOne", "insert", "update", "aggregate", "count"],
4628
4724
  },
4629
4725
  {
4630
4726
  plural: "OMReports",
@@ -4645,6 +4741,12 @@ const modelsAndRights = [
4645
4741
  importable: false,
4646
4742
  allowDuplicate: false,
4647
4743
  updateBy: "_id",
4744
+ labelKey: "model.Opportunity.label",
4745
+ labelPluralKey: "model.Opportunity.labelPlural",
4746
+ descriptionKey: "model.Opportunity.description",
4747
+ piiLevel: "low",
4748
+ availableInSDK: true,
4749
+ sdkOperations: ["find", "findOne", "insert", "update", "aggregate", "count"],
4648
4750
  searchable: true,
4649
4751
  searchableFields: ['name', 'description'],
4650
4752
  actions: [
@@ -4942,6 +5044,12 @@ const modelsAndRights = [
4942
5044
  importable: false,
4943
5045
  allowDuplicate: true,
4944
5046
  updateBy: "_id",
5047
+ labelKey: "model.PriceGroup.label",
5048
+ labelPluralKey: "model.PriceGroup.labelPlural",
5049
+ descriptionKey: "model.PriceGroup.description",
5050
+ piiLevel: "none",
5051
+ availableInSDK: true,
5052
+ sdkOperations: ["find", "findOne", "aggregate", "count"],
4945
5053
  },
4946
5054
  {
4947
5055
  plural: "PriceRules",
@@ -4952,6 +5060,12 @@ const modelsAndRights = [
4952
5060
  importable: false,
4953
5061
  allowDuplicate: true,
4954
5062
  updateBy: "_id",
5063
+ labelKey: "model.PriceRule.label",
5064
+ labelPluralKey: "model.PriceRule.labelPlural",
5065
+ descriptionKey: "model.PriceRule.description",
5066
+ piiLevel: "none",
5067
+ availableInSDK: true,
5068
+ sdkOperations: ["find", "findOne", "aggregate", "count"],
4955
5069
  },
4956
5070
  {
4957
5071
  plural: "PricingTables",
@@ -5370,6 +5484,12 @@ const modelsAndRights = [
5370
5484
  importable: false,
5371
5485
  allowDuplicate: true,
5372
5486
  updateBy: "_id",
5487
+ labelKey: "model.Quote.label",
5488
+ labelPluralKey: "model.Quote.labelPlural",
5489
+ descriptionKey: "model.Quote.description",
5490
+ piiLevel: "low",
5491
+ availableInSDK: true,
5492
+ sdkOperations: ["find", "findOne", "insert", "update", "aggregate", "count"],
5373
5493
  },
5374
5494
  {
5375
5495
  plural: "Ratings",
@@ -6002,6 +6122,12 @@ const modelsAndRights = [
6002
6122
  importable: false,
6003
6123
  allowDuplicate: false,
6004
6124
  updateBy: "_id",
6125
+ labelKey: "model.Stock.label",
6126
+ labelPluralKey: "model.Stock.labelPlural",
6127
+ descriptionKey: "model.Stock.description",
6128
+ piiLevel: "none",
6129
+ availableInSDK: true,
6130
+ sdkOperations: ["find", "findOne", "aggregate", "count"],
6005
6131
  },
6006
6132
  {
6007
6133
  plural: "StorageAreas",
@@ -6012,6 +6138,12 @@ const modelsAndRights = [
6012
6138
  importable: false,
6013
6139
  allowDuplicate: true,
6014
6140
  updateBy: "_id",
6141
+ labelKey: "model.StorageArea.label",
6142
+ labelPluralKey: "model.StorageArea.labelPlural",
6143
+ descriptionKey: "model.StorageArea.description",
6144
+ piiLevel: "none",
6145
+ availableInSDK: true,
6146
+ sdkOperations: ["find", "findOne", "aggregate", "count"],
6015
6147
  searchable: true,
6016
6148
  searchableFields: ['name', 'shortID']
6017
6149
  },
@@ -6193,6 +6325,12 @@ const modelsAndRights = [
6193
6325
  importable: false,
6194
6326
  allowDuplicate: false,
6195
6327
  updateBy: "_id",
6328
+ labelKey: "model.Task.label",
6329
+ labelPluralKey: "model.Task.labelPlural",
6330
+ descriptionKey: "model.Task.description",
6331
+ piiLevel: "low",
6332
+ availableInSDK: true,
6333
+ sdkOperations: ["find", "findOne", "insert", "update", "aggregate", "count"],
6196
6334
  searchable: true,
6197
6335
  searchableFields: ['subject', 'description'],
6198
6336
  actions: [
@@ -6250,6 +6388,12 @@ const modelsAndRights = [
6250
6388
  importable: false,
6251
6389
  allowDuplicate: false,
6252
6390
  updateBy: "_id",
6391
+ labelKey: "model.Ticket.label",
6392
+ labelPluralKey: "model.Ticket.labelPlural",
6393
+ descriptionKey: "model.Ticket.description",
6394
+ piiLevel: "low",
6395
+ availableInSDK: true,
6396
+ sdkOperations: ["find", "findOne", "insert", "update", "aggregate", "count"],
6253
6397
  searchable: true,
6254
6398
  searchableFields: ['subject', 'ticketNumber'],
6255
6399
  },
@@ -6482,6 +6626,12 @@ const modelsAndRights = [
6482
6626
  importable: false,
6483
6627
  allowDuplicate: true,
6484
6628
  updateBy: "_id",
6629
+ labelKey: "model.Warehouse.label",
6630
+ labelPluralKey: "model.Warehouse.labelPlural",
6631
+ descriptionKey: "model.Warehouse.description",
6632
+ piiLevel: "none",
6633
+ availableInSDK: true,
6634
+ sdkOperations: ["find", "findOne", "aggregate", "count"],
6485
6635
  },
6486
6636
  {
6487
6637
  plural: "Watchers",
@@ -6646,6 +6796,12 @@ const modelsAndRights = [
6646
6796
  importable: false,
6647
6797
  allowDuplicate: true,
6648
6798
  updateBy: "_id",
6799
+ labelKey: "model.WorkCenter.label",
6800
+ labelPluralKey: "model.WorkCenter.labelPlural",
6801
+ descriptionKey: "model.WorkCenter.description",
6802
+ piiLevel: "none",
6803
+ availableInSDK: true,
6804
+ sdkOperations: ["find", "findOne", "aggregate", "count"],
6649
6805
  searchable: true,
6650
6806
  searchableFields: ['name', 'shortID'],
6651
6807
  actions: [
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.1",
4
4
  "description": "Houses TypeScript interfaces for aYOUne",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",