@adminiumjs/manifest 0.3.37 → 0.3.38

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.
Files changed (44) hide show
  1. package/dist/automations.d.ts +55 -1
  2. package/dist/automations.d.ts.map +1 -1
  3. package/dist/automations.js +14 -1
  4. package/dist/automations.js.map +1 -1
  5. package/dist/compose.d.ts.map +1 -1
  6. package/dist/compose.js +1 -0
  7. package/dist/compose.js.map +1 -1
  8. package/dist/index.d.ts +3 -1
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +3 -1
  11. package/dist/index.js.map +1 -1
  12. package/dist/mail-class.d.ts +74 -0
  13. package/dist/mail-class.d.ts.map +1 -0
  14. package/dist/mail-class.js +62 -0
  15. package/dist/mail-class.js.map +1 -0
  16. package/dist/mail-classes.d.ts +8 -0
  17. package/dist/mail-classes.d.ts.map +1 -0
  18. package/dist/mail-classes.js +8 -0
  19. package/dist/mail-classes.js.map +1 -0
  20. package/dist/modules.d.ts +2 -1
  21. package/dist/modules.d.ts.map +1 -1
  22. package/dist/modules.js +50 -1
  23. package/dist/modules.js.map +1 -1
  24. package/dist/outbox.d.ts +4 -0
  25. package/dist/outbox.d.ts.map +1 -1
  26. package/dist/outbox.js +15 -0
  27. package/dist/outbox.js.map +1 -1
  28. package/dist/people.d.ts +304 -0
  29. package/dist/people.d.ts.map +1 -0
  30. package/dist/people.js +319 -0
  31. package/dist/people.js.map +1 -0
  32. package/dist/public-access.d.ts +12 -1
  33. package/dist/public-access.d.ts.map +1 -1
  34. package/dist/public-access.js +11 -0
  35. package/dist/public-access.js.map +1 -1
  36. package/dist/schema.d.ts +262 -4
  37. package/dist/schema.d.ts.map +1 -1
  38. package/dist/schema.js +17 -0
  39. package/dist/schema.js.map +1 -1
  40. package/dist/words.d.ts +1 -1
  41. package/dist/words.d.ts.map +1 -1
  42. package/dist/words.js +36 -0
  43. package/dist/words.js.map +1 -1
  44. package/package.json +2 -2
package/dist/schema.js CHANGED
@@ -34,6 +34,8 @@ import { compareSemver, parseSemverRange } from './semver.js';
34
34
  import { assistantIssues } from './assistant.js';
35
35
  import { stepsIssues } from './steps.js';
36
36
  import { WORD_FLOORS, installFloorWords } from './words.js';
37
+ import { mailClassFloorIssues } from './mail-class.js';
38
+ import { keepSchema, peopleIssues, peopleSchema, publicConsentIssues } from './people.js';
37
39
  import { automationIssues, manifestAutomationsSchema } from './automations.js';
38
40
  import { changeGuardIssues, changeGuardsSchema } from './change-guards.js';
39
41
  import { adjustDecidedColumns, adjustIssues, adjustSchema, adjusterIssues, adjusterSchema } from './adjust.js';
@@ -1036,6 +1038,8 @@ export const requiredTableSchema = z
1036
1038
  appGrants: appGrantsSchema.optional(),
1037
1039
  /** What a removal of a row takes (a reason) and keeps (the removed row's history, read through a parent): see `removal.ts`. */
1038
1040
  removal: removalSchema.optional(),
1041
+ /** The law makes the business keep its rows (`{law: 'tax'}`): an erasure leaves them, and says why (see `people.ts`). */
1042
+ keep: keepSchema.optional(),
1039
1043
  })
1040
1044
  .strict()
1041
1045
  .refine((t) => new Set(t.columns.map((c) => c.ref)).size === t.columns.length, { message: 'duplicate column ref in table', path: ['columns'] })
@@ -3482,6 +3486,8 @@ export const appManifestSchema = z
3482
3486
  * first app that says this asks, and no later one asks again.
3483
3487
  */
3484
3488
  maps: z.literal(true).optional(),
3489
+ /** The tables that hold the app's people and companies, and where else a person is copied (see `people.ts`). */
3490
+ people: peopleSchema.optional(),
3485
3491
  })
3486
3492
  .strict()
3487
3493
  .refine(capabilitiesNotContradictory, { ...CAPS_MESSAGE, path: [...CAPS_MESSAGE.path] })
@@ -3494,6 +3500,12 @@ export const appManifestSchema = z
3494
3500
  ctx.addIssue({ code: 'custom', message: issue.message, path: issue.path });
3495
3501
  for (const issue of installFloorIssues(m))
3496
3502
  ctx.addIssue({ code: 'custom', message: issue.message, path: issue.path });
3503
+ for (const issue of mailClassFloorIssues(m))
3504
+ ctx.addIssue({ code: 'custom', message: issue.message, path: issue.path });
3505
+ for (const issue of peopleIssues(m, tableIndex(m.requiredSchema.tables)))
3506
+ ctx.addIssue({ code: 'custom', message: issue.message, path: issue.path });
3507
+ for (const issue of publicConsentIssues(m, tableIndex(m.requiredSchema.tables)))
3508
+ ctx.addIssue({ code: 'custom', message: issue.message, path: issue.path });
3497
3509
  for (const issue of appReferenceIssues(m)) {
3498
3510
  ctx.addIssue({ code: 'custom', message: issue.message, path: issue.path });
3499
3511
  }
@@ -3559,6 +3571,11 @@ export const addOnManifestSchema = z
3559
3571
  .superRefine((m, ctx) => {
3560
3572
  for (const issue of installFloorIssues(m))
3561
3573
  ctx.addIssue({ code: 'custom', message: issue.message, path: issue.path });
3574
+ for (const issue of mailClassFloorIssues(m))
3575
+ ctx.addIssue({ code: 'custom', message: issue.message, path: issue.path });
3576
+ // An add-on keeps no people of its own: a tick on its public entry has nobody to be kept for.
3577
+ for (const issue of publicConsentIssues(m, tableIndex(m.requiredSchema?.tables ?? [])))
3578
+ ctx.addIssue({ code: 'custom', message: issue.message, path: issue.path });
3562
3579
  for (const issue of addOnModuleIssues(m))
3563
3580
  ctx.addIssue({ code: 'custom', message: issue.message, path: issue.path });
3564
3581
  // Add-ons released before the floor keep the page refs they shipped with.