@adminiumjs/manifest 0.3.79 → 0.3.81

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 (144) hide show
  1. package/dist/change-guards.d.ts +2 -0
  2. package/dist/change-guards.d.ts.map +1 -1
  3. package/dist/change-guards.js +7 -2
  4. package/dist/change-guards.js.map +1 -1
  5. package/dist/compose.d.ts.map +1 -1
  6. package/dist/compose.js +3 -0
  7. package/dist/compose.js.map +1 -1
  8. package/dist/expiry-notice.d.ts +68 -0
  9. package/dist/expiry-notice.d.ts.map +1 -0
  10. package/dist/expiry-notice.js +75 -0
  11. package/dist/expiry-notice.js.map +1 -0
  12. package/dist/from-template.d.ts +52 -0
  13. package/dist/from-template.d.ts.map +1 -0
  14. package/dist/from-template.js +89 -0
  15. package/dist/from-template.js.map +1 -0
  16. package/dist/index.d.ts +10 -1
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +10 -1
  19. package/dist/index.js.map +1 -1
  20. package/dist/instance.d.ts +2 -1
  21. package/dist/instance.d.ts.map +1 -1
  22. package/dist/instance.js +1 -0
  23. package/dist/instance.js.map +1 -1
  24. package/dist/leave/away.d.ts +67 -0
  25. package/dist/leave/away.d.ts.map +1 -0
  26. package/dist/leave/away.js +74 -0
  27. package/dist/leave/away.js.map +1 -0
  28. package/dist/leave/civil.d.ts +35 -0
  29. package/dist/leave/civil.d.ts.map +1 -0
  30. package/dist/leave/civil.js +75 -0
  31. package/dist/leave/civil.js.map +1 -0
  32. package/dist/leave/close-line.d.ts +91 -0
  33. package/dist/leave/close-line.d.ts.map +1 -0
  34. package/dist/leave/close-line.js +90 -0
  35. package/dist/leave/close-line.js.map +1 -0
  36. package/dist/leave/count.d.ts +82 -0
  37. package/dist/leave/count.d.ts.map +1 -0
  38. package/dist/leave/count.js +129 -0
  39. package/dist/leave/count.js.map +1 -0
  40. package/dist/leave/deciders.d.ts +81 -0
  41. package/dist/leave/deciders.d.ts.map +1 -0
  42. package/dist/leave/deciders.js +158 -0
  43. package/dist/leave/deciders.js.map +1 -0
  44. package/dist/leave/earning-year.d.ts +34 -0
  45. package/dist/leave/earning-year.d.ts.map +1 -0
  46. package/dist/leave/earning-year.js +113 -0
  47. package/dist/leave/earning-year.js.map +1 -0
  48. package/dist/leave/entitlement.d.ts +104 -0
  49. package/dist/leave/entitlement.d.ts.map +1 -0
  50. package/dist/leave/entitlement.js +59 -0
  51. package/dist/leave/entitlement.js.map +1 -0
  52. package/dist/leave/floors.d.ts +33 -0
  53. package/dist/leave/floors.d.ts.map +1 -0
  54. package/dist/leave/floors.js +55 -0
  55. package/dist/leave/floors.js.map +1 -0
  56. package/dist/leave/index.d.ts +26 -0
  57. package/dist/leave/index.d.ts.map +1 -0
  58. package/dist/leave/index.js +27 -0
  59. package/dist/leave/index.js.map +1 -0
  60. package/dist/leave/notice-gate.d.ts +41 -0
  61. package/dist/leave/notice-gate.d.ts.map +1 -0
  62. package/dist/leave/notice-gate.js +27 -0
  63. package/dist/leave/notice-gate.js.map +1 -0
  64. package/dist/leave/preset-czechia.d.ts +10 -0
  65. package/dist/leave/preset-czechia.d.ts.map +1 -0
  66. package/dist/leave/preset-czechia.js +69 -0
  67. package/dist/leave/preset-czechia.js.map +1 -0
  68. package/dist/leave/preset-denmark.d.ts +24 -0
  69. package/dist/leave/preset-denmark.d.ts.map +1 -0
  70. package/dist/leave/preset-denmark.js +31 -0
  71. package/dist/leave/preset-denmark.js.map +1 -0
  72. package/dist/leave/preset-england-wales.d.ts +10 -0
  73. package/dist/leave/preset-england-wales.d.ts.map +1 -0
  74. package/dist/leave/preset-england-wales.js +67 -0
  75. package/dist/leave/preset-england-wales.js.map +1 -0
  76. package/dist/leave/preset-france.d.ts +30 -0
  77. package/dist/leave/preset-france.d.ts.map +1 -0
  78. package/dist/leave/preset-france.js +31 -0
  79. package/dist/leave/preset-france.js.map +1 -0
  80. package/dist/leave/preset-germany.d.ts +30 -0
  81. package/dist/leave/preset-germany.d.ts.map +1 -0
  82. package/dist/leave/preset-germany.js +92 -0
  83. package/dist/leave/preset-germany.js.map +1 -0
  84. package/dist/leave/preset-us.d.ts +8 -0
  85. package/dist/leave/preset-us.d.ts.map +1 -0
  86. package/dist/leave/preset-us.js +48 -0
  87. package/dist/leave/preset-us.js.map +1 -0
  88. package/dist/leave/replay.d.ts +126 -0
  89. package/dist/leave/replay.d.ts.map +1 -0
  90. package/dist/leave/replay.js +158 -0
  91. package/dist/leave/replay.js.map +1 -0
  92. package/dist/leave/state.d.ts +64 -0
  93. package/dist/leave/state.d.ts.map +1 -0
  94. package/dist/leave/state.js +74 -0
  95. package/dist/leave/state.js.map +1 -0
  96. package/dist/leave/told.d.ts +37 -0
  97. package/dist/leave/told.d.ts.map +1 -0
  98. package/dist/leave/told.js +32 -0
  99. package/dist/leave/told.js.map +1 -0
  100. package/dist/leave/units.d.ts +21 -0
  101. package/dist/leave/units.d.ts.map +1 -0
  102. package/dist/leave/units.js +21 -0
  103. package/dist/leave/units.js.map +1 -0
  104. package/dist/leave-shape.d.ts +326 -0
  105. package/dist/leave-shape.d.ts.map +1 -0
  106. package/dist/leave-shape.js +166 -0
  107. package/dist/leave-shape.js.map +1 -0
  108. package/dist/leave-word.d.ts +90 -0
  109. package/dist/leave-word.d.ts.map +1 -0
  110. package/dist/leave-word.js +255 -0
  111. package/dist/leave-word.js.map +1 -0
  112. package/dist/outbox.d.ts +2 -0
  113. package/dist/outbox.d.ts.map +1 -1
  114. package/dist/outbox.js +5 -0
  115. package/dist/outbox.js.map +1 -1
  116. package/dist/person-import.d.ts +98 -0
  117. package/dist/person-import.d.ts.map +1 -0
  118. package/dist/person-import.js +270 -0
  119. package/dist/person-import.js.map +1 -0
  120. package/dist/record-classes.d.ts +99 -0
  121. package/dist/record-classes.d.ts.map +1 -0
  122. package/dist/record-classes.js +123 -0
  123. package/dist/record-classes.js.map +1 -0
  124. package/dist/removal.d.ts +1 -0
  125. package/dist/removal.d.ts.map +1 -1
  126. package/dist/removal.js +2 -0
  127. package/dist/removal.js.map +1 -1
  128. package/dist/roles.d.ts +23 -1
  129. package/dist/roles.d.ts.map +1 -1
  130. package/dist/roles.js +34 -5
  131. package/dist/roles.js.map +1 -1
  132. package/dist/schema.d.ts +625 -0
  133. package/dist/schema.d.ts.map +1 -1
  134. package/dist/schema.js +134 -14
  135. package/dist/schema.js.map +1 -1
  136. package/dist/staff-accounts.d.ts +102 -0
  137. package/dist/staff-accounts.d.ts.map +1 -0
  138. package/dist/staff-accounts.js +179 -0
  139. package/dist/staff-accounts.js.map +1 -0
  140. package/dist/words.d.ts +1 -1
  141. package/dist/words.d.ts.map +1 -1
  142. package/dist/words.js +85 -0
  143. package/dist/words.js.map +1 -1
  144. package/package.json +2 -2
@@ -0,0 +1,102 @@
1
+ /**
2
+ * `staffAccounts` — THE APP'S PEOPLE ARE ITS STAFF.
3
+ *
4
+ * One table of the app holds a row per person, and one of its columns says
5
+ * which account that person signs in with. The block names them, so an app's
6
+ * HR can invite and stop its ordinary staff without being able to hand out any
7
+ * other role:
8
+ *
9
+ * ```json
10
+ * "staffAccounts": {
11
+ * "table": "employees",
12
+ * "identity": "user_id",
13
+ * "address": "work_email",
14
+ * "start": { "table": "employment", "via": "employee_id", "column": "start_date" },
15
+ * "zone": { "via": "location_id", "table": "locations", "column": "time_zone" }
16
+ * }
17
+ * ```
18
+ *
19
+ * Two words on a role go with it. `invitedByApp` says the role is the one the
20
+ * door gives: `before-start` until the person's first day, `from-start` after
21
+ * it. The door takes no role from its caller. `followsFrom` says the role is
22
+ * held by whoever a staff column of a table names, and by nobody else:
23
+ *
24
+ * ```json
25
+ * { "key": "manager", "screensOnly": true,
26
+ * "followsFrom": { "table": "employees", "column": "manager_user_id", "while": { "column": "listed", "in": [true] } } }
27
+ * ```
28
+ *
29
+ * Both open screens and nothing else, because a role somebody else can hand
30
+ * out, or one that follows the data, must never carry more than that.
31
+ */
32
+ import { z } from 'zod';
33
+ import { type ColumnShape, type ReferenceIssue } from './refs.js';
34
+ /** When the door gives the role: before the person's first day, or from it. */
35
+ export declare const INVITED_BY_APP: readonly ["before-start", "from-start"];
36
+ export declare const invitedByAppSchema: z.ZodEnum<{
37
+ "before-start": "before-start";
38
+ "from-start": "from-start";
39
+ }>;
40
+ export type InvitedByApp = z.infer<typeof invitedByAppSchema>;
41
+ export declare const followsFromSchema: z.ZodObject<{
42
+ table: z.ZodString;
43
+ column: z.ZodString;
44
+ while: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
45
+ column: z.ZodString;
46
+ in: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
47
+ }, z.core.$strict>, z.ZodObject<{
48
+ column: z.ZodString;
49
+ isNull: z.ZodBoolean;
50
+ }, z.core.$strict>]>>;
51
+ }, z.core.$strict>;
52
+ export type FollowsFrom = z.infer<typeof followsFromSchema>;
53
+ export declare const staffAccountsSchema: z.ZodObject<{
54
+ table: z.ZodString;
55
+ identity: z.ZodString;
56
+ address: z.ZodOptional<z.ZodString>;
57
+ start: z.ZodOptional<z.ZodObject<{
58
+ table: z.ZodString;
59
+ via: z.ZodString;
60
+ column: z.ZodString;
61
+ }, z.core.$strict>>;
62
+ zone: z.ZodOptional<z.ZodObject<{
63
+ via: z.ZodString;
64
+ table: z.ZodString;
65
+ column: z.ZodString;
66
+ }, z.core.$strict>>;
67
+ }, z.core.$strict>;
68
+ export type StaffAccounts = z.infer<typeof staffAccountsSchema>;
69
+ /** The one grant that opens the door. A role the door gives, or one that follows the data, never holds it. */
70
+ export declare const PEOPLE_MANAGE_GRANT = "people:@:manage";
71
+ interface StaffColumn extends ColumnShape {
72
+ unique?: true | undefined;
73
+ rules?: {
74
+ staff?: unknown;
75
+ copy?: {
76
+ clearsWithLink?: true | undefined;
77
+ } | undefined;
78
+ } | undefined;
79
+ }
80
+ interface StaffTable {
81
+ ref: string;
82
+ columns: readonly StaffColumn[];
83
+ belongs?: readonly unknown[] | undefined;
84
+ }
85
+ interface StaffRole {
86
+ key: string;
87
+ cloneFrom?: string | undefined;
88
+ permissions?: readonly string[] | undefined;
89
+ screensOnly?: boolean | undefined;
90
+ invitedByApp?: InvitedByApp | undefined;
91
+ followsFrom?: FollowsFrom | undefined;
92
+ }
93
+ /** Everything wrong with the block and the two role words, as the manifest can see it. */
94
+ export declare function staffAccountsIssues(m: {
95
+ staffAccounts?: StaffAccounts | undefined;
96
+ roles?: readonly StaffRole[] | undefined;
97
+ requiredSchema: {
98
+ tables: readonly StaffTable[];
99
+ };
100
+ }): ReferenceIssue[];
101
+ export {};
102
+ //# sourceMappingURL=staff-accounts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"staff-accounts.d.ts","sourceRoot":"","sources":["../src/staff-accounts.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAa,KAAK,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAG7E,+EAA+E;AAC/E,eAAO,MAAM,cAAc,yCAA0C,CAAC;AACtE,eAAO,MAAM,kBAAkB;;;EAAyB,CAAC;AACzD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,iBAAiB;;;;;;;;;;kBAQnB,CAAC;AACZ,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;kBAarB,CAAC;AACZ,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,8GAA8G;AAC9G,eAAO,MAAM,mBAAmB,oBAAoB,CAAC;AAIrD,UAAU,WAAY,SAAQ,WAAW;IACvC,MAAM,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE;YAAE,cAAc,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;SAAE,GAAG,SAAS,CAAA;KAAE,GAAG,SAAS,CAAC;CACnG;AAED,UAAU,UAAU;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,SAAS,WAAW,EAAE,CAAC;IAChC,OAAO,CAAC,EAAE,SAAS,OAAO,EAAE,GAAG,SAAS,CAAC;CAC1C;AAED,UAAU,SAAS;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IAC5C,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAClC,YAAY,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;IACxC,WAAW,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;CACvC;AAUD,0FAA0F;AAC1F,wBAAgB,mBAAmB,CAAC,CAAC,EAAE;IAAE,aAAa,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,SAAS,EAAE,GAAG,SAAS,CAAC;IAAC,cAAc,EAAE;QAAE,MAAM,EAAE,SAAS,UAAU,EAAE,CAAA;KAAE,CAAA;CAAE,GAAG,cAAc,EAAE,CAiFnM"}
@@ -0,0 +1,179 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ /**
3
+ * `staffAccounts` — THE APP'S PEOPLE ARE ITS STAFF.
4
+ *
5
+ * One table of the app holds a row per person, and one of its columns says
6
+ * which account that person signs in with. The block names them, so an app's
7
+ * HR can invite and stop its ordinary staff without being able to hand out any
8
+ * other role:
9
+ *
10
+ * ```json
11
+ * "staffAccounts": {
12
+ * "table": "employees",
13
+ * "identity": "user_id",
14
+ * "address": "work_email",
15
+ * "start": { "table": "employment", "via": "employee_id", "column": "start_date" },
16
+ * "zone": { "via": "location_id", "table": "locations", "column": "time_zone" }
17
+ * }
18
+ * ```
19
+ *
20
+ * Two words on a role go with it. `invitedByApp` says the role is the one the
21
+ * door gives: `before-start` until the person's first day, `from-start` after
22
+ * it. The door takes no role from its caller. `followsFrom` says the role is
23
+ * held by whoever a staff column of a table names, and by nobody else:
24
+ *
25
+ * ```json
26
+ * { "key": "manager", "screensOnly": true,
27
+ * "followsFrom": { "table": "employees", "column": "manager_user_id", "while": { "column": "listed", "in": [true] } } }
28
+ * ```
29
+ *
30
+ * Both open screens and nothing else, because a role somebody else can hand
31
+ * out, or one that follows the data, must never carry more than that.
32
+ */
33
+ import { z } from 'zod';
34
+ import { refSchema } from './refs.js';
35
+ import { listingWhileSchema } from './roles.js';
36
+ /** When the door gives the role: before the person's first day, or from it. */
37
+ export const INVITED_BY_APP = ['before-start', 'from-start'];
38
+ export const invitedByAppSchema = z.enum(INVITED_BY_APP);
39
+ export const followsFromSchema = z
40
+ .object({
41
+ table: refSchema,
42
+ /** A staff column: whoever it names holds the role. */
43
+ column: refSchema,
44
+ /** Only the rows where another column of that table holds some values count. */
45
+ while: listingWhileSchema.optional(),
46
+ })
47
+ .strict();
48
+ export const staffAccountsSchema = z
49
+ .object({
50
+ /** The table with one row per person. */
51
+ table: refSchema,
52
+ /** Its staff column marked `identity`: the account this row is. */
53
+ identity: refSchema,
54
+ /** A text column holding the address an invitation goes to. */
55
+ address: refSchema.optional(),
56
+ /** Where the person's first day is kept: `column` of `table`, whose `via` links to the person. */
57
+ start: z.object({ table: refSchema, via: refSchema, column: refSchema }).strict().optional(),
58
+ /** Where the person's time zone is kept: `column` of `table`, which the person's `via` links to. */
59
+ zone: z.object({ via: refSchema, table: refSchema, column: refSchema }).strict().optional(),
60
+ })
61
+ .strict();
62
+ /** The one grant that opens the door. A role the door gives, or one that follows the data, never holds it. */
63
+ export const PEOPLE_MANAGE_GRANT = 'people:@:manage';
64
+ const SCREEN_GRANT = /^(?:table:@|page:@)|^app:@:staff$/;
65
+ function identityWay(table, column) {
66
+ return (table.belongs ?? []).some((way) => typeof way === 'object' && way !== null && way.column === column && way.identity === true);
67
+ }
68
+ function whileColumn(guard) {
69
+ return guard.column;
70
+ }
71
+ /** Everything wrong with the block and the two role words, as the manifest can see it. */
72
+ export function staffAccountsIssues(m) {
73
+ const out = [];
74
+ const tables = new Map(m.requiredSchema.tables.map((table) => [table.ref, table]));
75
+ const columnOf = (table, column) => tables.get(table)?.columns.find((c) => c.ref === column);
76
+ const block = m.staffAccounts;
77
+ const roles = m.roles ?? [];
78
+ if (block !== undefined) {
79
+ const at = (...rest) => ['staffAccounts', ...rest];
80
+ const person = tables.get(block.table);
81
+ if (person === undefined)
82
+ out.push({ path: at('table'), message: `there is no table "${block.table}"` });
83
+ else {
84
+ const identity = columnOf(block.table, block.identity);
85
+ if (identity === undefined)
86
+ out.push({ path: at('identity'), message: `"${block.table}" has no column "${block.identity}"` });
87
+ else {
88
+ if (identity.rules?.staff === undefined)
89
+ out.push({ path: at('identity'), message: `"${block.table}.${block.identity}" is not a staff column` });
90
+ if (!identityWay(person, block.identity))
91
+ out.push({ path: at('identity'), message: `"${block.table}" must say this column is who the row is about: "belongs": [{ "column": "${block.identity}", "identity": true }]` });
92
+ if (identity.unique !== true)
93
+ out.push({ path: at('identity'), message: `"${block.table}.${block.identity}" must be unique: one account is one person` });
94
+ if (identity.nullable !== true)
95
+ out.push({ path: at('identity'), message: `"${block.table}.${block.identity}" must be nullable: a person has no account until they are invited` });
96
+ }
97
+ if (block.address !== undefined) {
98
+ const address = columnOf(block.table, block.address);
99
+ if (address === undefined)
100
+ out.push({ path: at('address'), message: `"${block.table}" has no column "${block.address}"` });
101
+ else if (address.type !== 'text')
102
+ out.push({ path: at('address'), message: `"${block.table}.${block.address}" must be a text column` });
103
+ }
104
+ if (block.zone !== undefined) {
105
+ const via = columnOf(block.table, block.zone.via);
106
+ if (via === undefined)
107
+ out.push({ path: at('zone', 'via'), message: `"${block.table}" has no column "${block.zone.via}"` });
108
+ else if (via.references !== block.zone.table)
109
+ out.push({ path: at('zone', 'via'), message: `"${block.table}.${block.zone.via}" must link to "${block.zone.table}"` });
110
+ const zone = columnOf(block.zone.table, block.zone.column);
111
+ if (zone === undefined)
112
+ out.push({ path: at('zone', 'column'), message: `"${block.zone.table}" has no column "${block.zone.column}"` });
113
+ else if (zone.type !== 'text')
114
+ out.push({ path: at('zone', 'column'), message: `"${block.zone.table}.${block.zone.column}" must be a text column holding a time zone` });
115
+ }
116
+ }
117
+ if (block.start !== undefined) {
118
+ const via = columnOf(block.start.table, block.start.via);
119
+ if (via === undefined)
120
+ out.push({ path: at('start', 'via'), message: `"${block.start.table}" has no column "${block.start.via}"` });
121
+ else if (via.references !== block.table)
122
+ out.push({ path: at('start', 'via'), message: `"${block.start.table}.${block.start.via}" must link to "${block.table}"` });
123
+ const start = columnOf(block.start.table, block.start.column);
124
+ if (start === undefined)
125
+ out.push({ path: at('start', 'column'), message: `"${block.start.table}" has no column "${block.start.column}"` });
126
+ else if (start.type !== 'date')
127
+ out.push({ path: at('start', 'column'), message: `"${block.start.table}.${block.start.column}" must be a date column` });
128
+ }
129
+ if (!roles.some((role) => role.invitedByApp === 'from-start'))
130
+ out.push({ path: at(), message: 'one role must say "invitedByApp": "from-start": the role a person holds once they have started' });
131
+ }
132
+ const seen = new Map();
133
+ roles.forEach((role, r) => {
134
+ const here = (...rest) => ['roles', r, ...rest];
135
+ const from = role.cloneFrom === undefined ? undefined : roles.find((other) => other.key === role.cloneFrom);
136
+ const grants = [...(from?.permissions ?? []), ...(role.permissions ?? [])];
137
+ const given = role.invitedByApp !== undefined;
138
+ const follows = role.followsFrom !== undefined;
139
+ if (!given && !follows)
140
+ return;
141
+ const word = given ? 'invitedByApp' : 'followsFrom';
142
+ if (given && follows)
143
+ out.push({ path: here('followsFrom'), message: 'a role is given by the door or follows the data, never both' });
144
+ if (block === undefined)
145
+ out.push({ path: here(word), message: `"${word}" needs the app's "staffAccounts" block` });
146
+ if (role.screensOnly !== true)
147
+ out.push({ path: here(word), message: `a role with "${word}" must be screensOnly` });
148
+ for (const grant of grants) {
149
+ if (grant === PEOPLE_MANAGE_GRANT)
150
+ out.push({ path: here('permissions'), message: `a role with "${word}" never holds "${PEOPLE_MANAGE_GRANT}": whoever holds it could invite their own kind` });
151
+ else if (!SCREEN_GRANT.test(grant))
152
+ out.push({ path: here('permissions'), message: `a role with "${word}" opens screens only (table:@…, page:@…, app:@:staff), and "${grant}" is not one` });
153
+ }
154
+ if (role.invitedByApp !== undefined) {
155
+ const other = seen.get(role.invitedByApp);
156
+ if (other !== undefined)
157
+ out.push({ path: here('invitedByApp'), message: `"${other}" already says "${role.invitedByApp}": the door has one role for each` });
158
+ seen.set(role.invitedByApp, role.key);
159
+ }
160
+ if (role.followsFrom !== undefined) {
161
+ const rule = role.followsFrom;
162
+ const column = columnOf(rule.table, rule.column);
163
+ if (!tables.has(rule.table))
164
+ out.push({ path: here('followsFrom', 'table'), message: `there is no table "${rule.table}"` });
165
+ else if (column === undefined)
166
+ out.push({ path: here('followsFrom', 'column'), message: `"${rule.table}" has no column "${rule.column}"` });
167
+ else if (column.rules?.staff === undefined)
168
+ out.push({ path: here('followsFrom', 'column'), message: `"${rule.table}.${rule.column}" is not a staff column` });
169
+ else if (column.rules.copy !== undefined && column.rules.copy.clearsWithLink !== true) {
170
+ out.push({ path: here('followsFrom', 'column'), message: `"${rule.table}.${rule.column}" is a copy that keeps its value when its link is emptied, so the role would go on following somebody who left: give the copy "clearsWithLink": true` });
171
+ }
172
+ if (rule.while !== undefined && tables.has(rule.table) && columnOf(rule.table, whileColumn(rule.while)) === undefined) {
173
+ out.push({ path: here('followsFrom', 'while', 'column'), message: `"${rule.table}" has no column "${whileColumn(rule.while)}"` });
174
+ }
175
+ }
176
+ });
177
+ return out;
178
+ }
179
+ //# sourceMappingURL=staff-accounts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file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AAE,CAAC,CAAC;YACpI,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,GAAG,CAAC;AACb,CAAC"}
package/dist/words.d.ts CHANGED
@@ -19,7 +19,7 @@ export declare const ADD_ON_INSTALL_BLOCKS: readonly ["pages", "roles", "optionL
19
19
  * runs the word, or it refuses a manifest that uses it — and its tests read
20
20
  * this list to see that none is left without one.
21
21
  */
22
- export declare const INSTALL_FLOOR_WORD_NAMES: readonly ["pages", "roles", "optionLists", "emailTemplates", "outbox", "documents", "sampleData", "publicAccess", "publicKeys", "navGroups", "seeds", "automations", "addOns", "requiredSchema.prefixed", "addOn.settingsTable", "addOn.ledgers", "addOn.adjuster", "addOn.words", "addOn.recordTabs", "recordTab.presence", "addOn.hostApi.2", "addOn.lookUp", "ledger.decides", "table.indexes", "table.postings", "table.adjust", "states.actions", "states.planned", "column.addOnLink", "column.addOnLink.default", "column.tableRef", "column.announce", "column.plainText", "column.customerKey", "column.codeLast4", "code.givenByLedger", "addOn.framedPage", "lookup.held", "adjuster.vouchers.held", "rollup.capUnless", "rollup.latest", "roles.tables", "roles.writableFrom", "toolbar.links", "config.tabs", "config.bulk", "sampleData.addOns", "sampleData.people", "app.seeds", "table.occupies", "sequence.sample", "email.onlyWith", "email.onlyWithout", "outbox.pages.app", "rows.pair", "unlockBy.self", "availability.words", "addOn.steps", "addOn.assistant", "automations.addOnStep", "email.showWhen", "placeholder.backup", "frontend.mobile", "column.staff", "table.belongs", "table.private", "belongs.throughPrivate", "shape.create", "table.appGrants", "roles.rows", "rows.several", "listing.while", "states.handOver", "app.modules", "roles.names", "app.maps", "automations.staffRecipient", "automations.perSpell", "automations.urgent", "automations.digest", "digest.reach", "digest.sum", "digest.by", "digest.target", "digest.within", "automations.stepName", "automations.many", "automations.replyTo", "automations.lead", "automations.leadAlone", "automations.listed", "automations.staffName", "automations.recordUrl", "automations.was", "automations.settingAmount", "automations.settingValue", "automations.daysAfter", "automations.settingElse", "outbox.replyTo", "outbox.onDelete", "column.mentions", "column.place", "column.area", "column.linkable", "linkable.same", "column.file", "config.board", "board.toolbar", "board.secondAmount", "board.daysLabel", "states.notPast", "states.moveOnCreate", "publicAccess.requiresWhen", "frontend.records", "nav.offRail", "navLinks", "outbox.staffName", "card.module", "card.columnLabels", "link.staffPath", "column.changes", "rows.notBy", "rows.via", "rows.notThrough", "states.carries", "table.removal", "column.history", "bounds.other", "bounds.now", "stamp.strict", "requiredWhen.stamp", "outbox.classes", "automations.emailClass", "people", "table.keep", "publicAccess.consent", "automations.more", "addOn.forms", "publicAccess.forms", "outbox.purposes", "outbox.surveyLinks", "publicAccess.forms.source", "addOn.chat", "publicAccess.chat", "addOn.landing", "step.person", "step.recordBy", "step.recordWhere", "step.help", "step.recordTokens", "publicAccess.appColumn", "publicAccess.heldBy", "publicAccess.forget.copies", "people.addOnCopies", "table.expire", "table.holders", "column.band", "stamp.addWorkingDays", "formula.ceilFloor", "table.check", "addOn.checker", "addOn.panels", "publicAccess.uploads", "file.upload", "file.tiff", "file.large", "file.assetKinds", "publicAccess.assets", "publicAccess.ownLink", "publicAccess.sessionRead", "people.copyDetails", "publicAccess.ownDelete", "roles.addOnPages", "agrees.length", "people.addOnCopyFrom", "email.rowPicture", "roles.addOnActions", "appGrants.more", "roles.privacyPeople", "roles.paymentsRefund", "roles.shippingGrants", "config.columns", "addOn.scope", "frontend.instances", "frontend.embed", "page.envelope", "page.views", "app.provenance", "app.icon", "apps.requires", "instance", "column.time", "column.precision", "column.hidden", "column.yesNo", "column.name", "relation.label", "relation.remove", "relation.noConstraint", "table.exclude", "table.existingCustomers", "table.switchedOff", "table.name", "table.schema", "optionList.description", "email.kind", "email.category", "email.brand", "email.attachments", "automations.webhook", "automations.documentRender", "automations.fixedAddress", "automations.purpose", "automations.watch", "documents.options", "documents.trigger", "documents.deliver", "reports", "invoiceLayouts", "scheduledReports", "payments", "publicAccess.put", "publicAccess.delete", "publicAccess.batch", "publicAccess.path", "publicAccess.pagination", "publicAccess.rateLimit", "publicAccess.response", "publicAccess.filterable", "publicAccess.searchable", "publicAccess.orderable", "publicAccess.via", "publicAccess.count", "publicAccess.appPagination", "automations.words", "table.review", "table.review.proved", "table.booking.buffer", "table.booking.busy", "table.booking.anyone", "table.booking.hours.within", "table.booking.windowFor", "table.booking.placedFrom", "outbox.reviewLinks", "table.booking.calendar", "emailTemplate.calendar", "publicAccess.consent.no", "payments.refundOnStaff", "table.booking.sync", "addOn.reviews", "appGrants.appColumn", "states.supersedes", "sampleData.addOns.assets", "sampleData.productAssets", "form.referenceScope", "stamp.notEarlier", "states.starts", "publicAccess.requireSettingIn", "payments.appPayables", "payments.payableExtras", "states.waitsForPayment", "publicAccess.pay", "states.noPaymentInFlight", "publicAccess.requirePayments", "outbox.producerPayments", "outbox.manyProducers", "payments.statusSet", "addOn.sources", "provides.lead-source", "addOn.leads", "people.lead", "people.copyEvenIfKept", "addOn.slots.on", "shipping", "shipping.customs", "shipping.customs.lineUnless", "shipping.customs.refunded", "addOn.connect.accounts", "table.connectedAccounts", "roles.accounts", "textTemplates", "outbox.channels", "outbox.recipient.phone", "outbox.waiting", "people.phone", "publicAccess.textConsent", "outbox.settings.textName", "outbox.recipient.textPhone", "outbox.columns.textReason", "automations.text", "instance.textMarketingConfirm", "textReplies", "roles.texts"];
22
+ export declare const INSTALL_FLOOR_WORD_NAMES: readonly ["pages", "roles", "optionLists", "emailTemplates", "outbox", "documents", "sampleData", "publicAccess", "publicKeys", "navGroups", "seeds", "automations", "addOns", "requiredSchema.prefixed", "addOn.settingsTable", "addOn.ledgers", "addOn.adjuster", "addOn.words", "addOn.recordTabs", "recordTab.presence", "addOn.hostApi.2", "addOn.lookUp", "ledger.decides", "table.indexes", "table.postings", "table.adjust", "states.actions", "states.planned", "column.addOnLink", "column.addOnLink.default", "column.tableRef", "column.announce", "column.plainText", "column.customerKey", "column.codeLast4", "code.givenByLedger", "addOn.framedPage", "lookup.held", "adjuster.vouchers.held", "rollup.capUnless", "rollup.latest", "roles.tables", "roles.writableFrom", "toolbar.links", "config.tabs", "config.bulk", "sampleData.addOns", "sampleData.people", "app.seeds", "table.occupies", "sequence.sample", "email.onlyWith", "email.onlyWithout", "outbox.pages.app", "outbox.relayAcceptedAt", "rows.pair", "unlockBy.self", "availability.words", "addOn.steps", "addOn.assistant", "automations.addOnStep", "email.showWhen", "placeholder.backup", "frontend.mobile", "column.staff", "table.belongs", "table.private", "table.access", "table.readLog", "table.fromTemplate", "table.expiryNotice", "belongs.throughPrivate", "belongs.identity", "table.leave", "table.leave.absenceByTeam", "staffAccounts", "personImport", "roles.invitedByApp", "roles.followsFrom", "roles.peopleManage", "roles.leaveReport", "changes.notLoop", "copy.clearsWithLink", "stamp.follows", "shape.create", "table.appGrants", "roles.rows", "rows.several", "listing.while", "states.handOver", "app.modules", "roles.names", "app.maps", "app.recordClasses", "automations.staffRecipient", "automations.perSpell", "automations.urgent", "automations.digest", "digest.reach", "digest.sum", "digest.by", "digest.target", "digest.within", "automations.stepName", "automations.many", "automations.replyTo", "automations.lead", "automations.leadAlone", "automations.listed", "automations.staffName", "automations.recordUrl", "automations.was", "automations.settingAmount", "automations.settingValue", "automations.daysAfter", "automations.settingElse", "outbox.replyTo", "outbox.onDelete", "column.mentions", "column.place", "column.area", "column.linkable", "linkable.same", "column.file", "config.board", "board.toolbar", "board.secondAmount", "board.daysLabel", "states.notPast", "states.moveOnCreate", "publicAccess.requiresWhen", "frontend.records", "nav.offRail", "navLinks", "outbox.staffName", "card.module", "card.columnLabels", "link.staffPath", "column.changes", "rows.notBy", "rows.via", "rows.notThrough", "states.carries", "table.removal", "column.history", "bounds.other", "bounds.now", "stamp.strict", "requiredWhen.stamp", "outbox.classes", "automations.emailClass", "people", "table.keep", "publicAccess.consent", "automations.more", "addOn.forms", "publicAccess.forms", "outbox.purposes", "outbox.surveyLinks", "publicAccess.forms.source", "addOn.chat", "publicAccess.chat", "addOn.landing", "step.person", "step.recordBy", "step.recordWhere", "step.help", "step.recordTokens", "publicAccess.appColumn", "publicAccess.heldBy", "publicAccess.forget.copies", "people.addOnCopies", "table.expire", "table.holders", "column.band", "stamp.addWorkingDays", "formula.ceilFloor", "table.check", "addOn.checker", "addOn.panels", "publicAccess.uploads", "file.upload", "file.tiff", "file.large", "file.assetKinds", "publicAccess.assets", "publicAccess.ownLink", "publicAccess.sessionRead", "people.copyDetails", "publicAccess.ownDelete", "roles.addOnPages", "agrees.length", "people.addOnCopyFrom", "email.rowPicture", "roles.addOnActions", "appGrants.more", "roles.privacyPeople", "roles.paymentsRefund", "roles.shippingGrants", "config.columns", "addOn.scope", "frontend.instances", "frontend.embed", "page.envelope", "page.views", "app.provenance", "app.icon", "apps.requires", "instance", "column.time", "column.precision", "column.hidden", "column.yesNo", "column.name", "relation.label", "relation.remove", "relation.noConstraint", "table.exclude", "table.existingCustomers", "table.switchedOff", "table.name", "table.schema", "optionList.description", "email.kind", "email.category", "email.brand", "email.attachments", "automations.webhook", "automations.documentRender", "automations.fixedAddress", "automations.purpose", "automations.watch", "documents.options", "documents.trigger", "documents.deliver", "reports", "invoiceLayouts", "scheduledReports", "payments", "publicAccess.put", "publicAccess.delete", "publicAccess.batch", "publicAccess.path", "publicAccess.pagination", "publicAccess.rateLimit", "publicAccess.response", "publicAccess.filterable", "publicAccess.searchable", "publicAccess.orderable", "publicAccess.via", "publicAccess.count", "publicAccess.appPagination", "automations.words", "table.review", "table.review.proved", "table.booking.buffer", "table.booking.busy", "table.booking.anyone", "table.booking.hours.within", "table.booking.windowFor", "table.booking.placedFrom", "outbox.reviewLinks", "table.booking.calendar", "emailTemplate.calendar", "publicAccess.consent.no", "payments.refundOnStaff", "table.booking.sync", "addOn.reviews", "appGrants.appColumn", "states.supersedes", "sampleData.addOns.assets", "sampleData.productAssets", "form.referenceScope", "stamp.notEarlier", "states.starts", "publicAccess.requireSettingIn", "payments.appPayables", "payments.payableExtras", "states.waitsForPayment", "publicAccess.pay", "states.noPaymentInFlight", "publicAccess.requirePayments", "outbox.producerPayments", "outbox.manyProducers", "payments.statusSet", "addOn.sources", "provides.lead-source", "addOn.leads", "people.lead", "people.copyEvenIfKept", "addOn.slots.on", "shipping", "shipping.customs", "shipping.customs.lineUnless", "shipping.customs.refunded", "addOn.connect.accounts", "table.connectedAccounts", "roles.accounts", "textTemplates", "outbox.channels", "outbox.recipient.phone", "outbox.waiting", "people.phone", "publicAccess.textConsent", "outbox.settings.textName", "outbox.recipient.textPhone", "outbox.columns.textReason", "automations.text", "instance.textMarketingConfirm", "textReplies", "roles.texts"];
23
23
  export type ManifestWordName = (typeof INSTALL_FLOOR_WORD_NAMES)[number];
24
24
  /**
25
25
  * The words that came after the install floor, each with the first Adminium
@@ -1 +1 @@
1
- {"version":3,"file":"words.d.ts","sourceRoot":"","sources":["../src/words.ts"],"names":[],"mappings":"AAkBA,MAAM,WAAW,YAAY;IAC3B,8FAA8F;IAC9F,IAAI,EAAE,gBAAgB,CAAC;IACvB,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;CACd;AAOD,2HAA2H;AAC3H,eAAO,MAAM,6BAA6B,QAAmB,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,eAAe,WAAW,CAAC;AAExC,iFAAiF;AACjF,eAAO,MAAM,qBAAqB,gLAcxB,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,ouLA8X3B,CAAC;AACX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzE;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC,CAuW3E,CAAC;AAYF,gFAAgF;AAChF,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,OAAO,GAAG,YAAY,EAAE,CAslBnE"}
1
+ {"version":3,"file":"words.d.ts","sourceRoot":"","sources":["../src/words.ts"],"names":[],"mappings":"AAmBA,MAAM,WAAW,YAAY;IAC3B,8FAA8F;IAC9F,IAAI,EAAE,gBAAgB,CAAC;IACvB,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;CACd;AAOD,2HAA2H;AAC3H,eAAO,MAAM,6BAA6B,QAAmB,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,eAAe,WAAW,CAAC;AAExC,iFAAiF;AACjF,eAAO,MAAM,qBAAqB,gLAcxB,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,klMAgZ3B,CAAC;AACX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzE;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC,CAqY3E,CAAC;AAYF,gFAAgF;AAChF,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,OAAO,GAAG,YAAY,EAAE,CAwmBnE"}
package/dist/words.js CHANGED
@@ -13,6 +13,7 @@
13
13
  * It reads the plain document, not the typed manifest, so the schema file may
14
14
  * import it without the two files importing each other.
15
15
  */
16
+ import { LEAVE_MIN, LEAVE_TEAM_MIN } from './leave-shape.js';
16
17
  import { OUTBOX_PRODUCERS_BEFORE } from './outbox.js';
17
18
  import { placeholdersIn } from './placeholders.js';
18
19
  const isDoc = (value) => typeof value === 'object' && value !== null && !Array.isArray(value);
@@ -89,6 +90,7 @@ export const INSTALL_FLOOR_WORD_NAMES = [
89
90
  'email.onlyWith',
90
91
  'email.onlyWithout',
91
92
  'outbox.pages.app',
93
+ 'outbox.relayAcceptedAt',
92
94
  'rows.pair',
93
95
  'unlockBy.self',
94
96
  'availability.words',
@@ -101,7 +103,23 @@ export const INSTALL_FLOOR_WORD_NAMES = [
101
103
  'column.staff',
102
104
  'table.belongs',
103
105
  'table.private',
106
+ 'table.access',
107
+ 'table.readLog',
108
+ 'table.fromTemplate',
109
+ 'table.expiryNotice',
104
110
  'belongs.throughPrivate',
111
+ 'belongs.identity',
112
+ 'table.leave',
113
+ 'table.leave.absenceByTeam',
114
+ 'staffAccounts',
115
+ 'personImport',
116
+ 'roles.invitedByApp',
117
+ 'roles.followsFrom',
118
+ 'roles.peopleManage',
119
+ 'roles.leaveReport',
120
+ 'changes.notLoop',
121
+ 'copy.clearsWithLink',
122
+ 'stamp.follows',
105
123
  'shape.create',
106
124
  'table.appGrants',
107
125
  'roles.rows',
@@ -111,6 +129,7 @@ export const INSTALL_FLOOR_WORD_NAMES = [
111
129
  'app.modules',
112
130
  'roles.names',
113
131
  'app.maps',
132
+ 'app.recordClasses',
114
133
  'automations.staffRecipient',
115
134
  'automations.perSpell',
116
135
  'automations.urgent',
@@ -453,6 +472,9 @@ export const WORD_FLOORS = {
453
472
  'column.staff': '0.3.28',
454
473
  'table.belongs': '0.3.28',
455
474
  'table.private': '0.3.28',
475
+ // A table only a role naming it reaches, and one whose every open is logged first. Plan 81: the release round sets the real floor.
476
+ 'table.access': '0.3.80',
477
+ 'table.readLog': '0.3.80',
456
478
  // A row hung on a private row, reached by a person that private row's own `belongs` names.
457
479
  'belongs.throughPrivate': '0.3.35',
458
480
  // A table built on a shape holding its create to a condition on a column the app added.
@@ -482,6 +504,8 @@ export const WORD_FLOORS = {
482
504
  'roles.names': '0.3.28',
483
505
  // The app shows maps: its install asks whether they are shown.
484
506
  'app.maps': '0.3.28',
507
+ // What an app keeps and for how long. Plan 81: the release round sets the real floor.
508
+ 'app.recordClasses': '0.3.80',
485
509
  // A rule that tells the person a staff column of its record names.
486
510
  'automations.staffRecipient': '0.3.28',
487
511
  // A row visited once for each spell it matches.
@@ -520,6 +544,8 @@ export const WORD_FLOORS = {
520
544
  'automations.settingValue': '0.3.28',
521
545
  'automations.daysAfter': '0.3.28',
522
546
  'automations.settingElse': '0.3.29',
547
+ // When the relay accepted a message, the proof a mail left. Plan 81: the release round sets the real floor.
548
+ 'outbox.relayAcceptedAt': '0.3.80',
523
549
  'outbox.replyTo': '0.3.28',
524
550
  'outbox.onDelete': '0.3.28',
525
551
  // A text column in which people are mentioned.
@@ -779,6 +805,29 @@ export const WORD_FLOORS = {
779
805
  'publicAccess.consent.no': '0.3.71',
780
806
  'payments.refundOnStaff': '0.3.71',
781
807
  'table.booking.sync': '0.3.71',
808
+ // A column that says who a row is about: a hand-over leaves it alone.
809
+ 'belongs.identity': LEAVE_MIN,
810
+ // A table of leave requests: counted days, dated lots and the kept tables only Adminium writes.
811
+ 'table.leave': LEAVE_MIN,
812
+ // The setting that switches HR's absence-by-team report on, and the Overview's figure by team with it.
813
+ 'table.leave.absenceByTeam': LEAVE_TEAM_MIN,
814
+ // The app's own staff: who the door may invite, roles that follow the data, a link that may not loop.
815
+ staffAccounts: LEAVE_MIN,
816
+ // One file builds each person's rows: the people door's import.
817
+ personImport: LEAVE_MIN,
818
+ 'roles.invitedByApp': LEAVE_MIN,
819
+ 'roles.followsFrom': LEAVE_MIN,
820
+ 'roles.peopleManage': LEAVE_MIN,
821
+ 'roles.leaveReport': LEAVE_MIN,
822
+ 'changes.notLoop': LEAVE_MIN,
823
+ // A copy that names a person, emptied when its link is, so it never goes on naming them.
824
+ 'copy.clearsWithLink': LEAVE_MIN,
825
+ // A date a followed copy moves, worked out again with it (a checklist task's due date, when its list's date moves).
826
+ 'stamp.follows': LEAVE_MIN,
827
+ // A row made from a template gets the template's tasks, in the same write (a joiner's checklist).
828
+ 'table.fromTemplate': LEAVE_MIN,
829
+ // A read-logged table's holders told each morning how many rows run out soon, and the first date (a confidential document's expiry).
830
+ 'table.expiryNotice': LEAVE_MIN,
782
831
  'addOn.reviews': '0.3.68',
783
832
  'appGrants.appColumn': '0.3.68',
784
833
  textTemplates: SMS_WORDS_FLOOR,
@@ -941,6 +990,8 @@ export function installFloorWords(document) {
941
990
  out.push({ word: 'app.modules', path: 'modules' });
942
991
  if (document['maps'] !== undefined)
943
992
  out.push({ word: 'app.maps', path: 'maps' });
993
+ if (document['recordClasses'] !== undefined)
994
+ out.push({ word: 'app.recordClasses', path: 'recordClasses' });
944
995
  // Starting rows: a release before the floor takes the block and writes none of it.
945
996
  if (document['seeds'] !== undefined)
946
997
  out.push({ word: 'app.seeds', path: 'seeds' });
@@ -975,6 +1026,10 @@ export function installFloorWords(document) {
975
1026
  out.push({ word: 'roles.shippingGrants', path: `roles.${String(r)}.permissions.${String(g)}` });
976
1027
  if (typeof grant === 'string' && grant.startsWith('accounts:@:'))
977
1028
  out.push({ word: 'roles.accounts', path: `roles.${String(r)}.permissions.${String(g)}` });
1029
+ if (grant === 'people:@:manage')
1030
+ out.push({ word: 'roles.peopleManage', path: `roles.${String(r)}.permissions.${String(g)}` });
1031
+ if (grant === 'leave:@:report')
1032
+ out.push({ word: 'roles.leaveReport', path: `roles.${String(r)}.permissions.${String(g)}` });
978
1033
  if (typeof grant === 'string' && /^texts:@:(read|reply)$/.test(grant))
979
1034
  out.push({ word: 'roles.texts', path: `roles.${String(r)}.permissions.${String(g)}` });
980
1035
  });
@@ -1107,9 +1162,19 @@ export function installFloorWords(document) {
1107
1162
  list(table['belongs']).forEach((way, w) => {
1108
1163
  if (isDoc(way) && isDoc(way['through']) && way['through']['while'] !== undefined)
1109
1164
  out.push({ word: 'listing.while', path: `${at}.belongs.${String(w)}.through.while` });
1165
+ if (isDoc(way) && way['identity'] !== undefined)
1166
+ out.push({ word: 'belongs.identity', path: `${at}.belongs.${String(w)}.identity` });
1110
1167
  });
1111
1168
  if (table['private'] !== undefined)
1112
1169
  out.push({ word: 'table.private', path: `${at}.private` });
1170
+ if (table['access'] !== undefined)
1171
+ out.push({ word: 'table.access', path: `${at}.access` });
1172
+ if (table['readLog'] !== undefined)
1173
+ out.push({ word: 'table.readLog', path: `${at}.readLog` });
1174
+ if (table['fromTemplate'] !== undefined)
1175
+ out.push({ word: 'table.fromTemplate', path: `${at}.fromTemplate` });
1176
+ if (table['expiryNotice'] !== undefined)
1177
+ out.push({ word: 'table.expiryNotice', path: `${at}.expiryNotice` });
1113
1178
  list(table['belongs']).forEach((way, w) => {
1114
1179
  if (!isDoc(way) || typeof way['column'] !== 'string' || way['person'] === undefined)
1115
1180
  return;
@@ -1136,6 +1201,10 @@ export function installFloorWords(document) {
1136
1201
  }
1137
1202
  if (table['occupies'] !== undefined)
1138
1203
  out.push({ word: 'table.occupies', path: `${at}.occupies` });
1204
+ if (table['leave'] !== undefined)
1205
+ out.push({ word: 'table.leave', path: `${at}.leave` });
1206
+ if (isDoc(table['leave']) && table['leave']['absenceByTeam'] !== undefined)
1207
+ out.push({ word: 'table.leave.absenceByTeam', path: `${at}.leave.absenceByTeam` });
1139
1208
  if (table['removal'] !== undefined)
1140
1209
  out.push({ word: 'table.removal', path: `${at}.removal` });
1141
1210
  if (table['keep'] !== undefined)
@@ -1246,6 +1315,12 @@ export function installFloorWords(document) {
1246
1315
  out.push({ word: 'stamp.notEarlier', path: `${here}.stamp.notEarlier` });
1247
1316
  if (rules['band'] !== undefined)
1248
1317
  out.push({ word: 'column.band', path: `${here}.band` });
1318
+ if (list(rules['changes']).some((guard) => isDoc(guard) && guard['notLoop'] !== undefined))
1319
+ out.push({ word: 'changes.notLoop', path: `${here}.changes` });
1320
+ if (isDoc(rules['copy']) && rules['copy']['clearsWithLink'] !== undefined)
1321
+ out.push({ word: 'copy.clearsWithLink', path: `${here}.copy.clearsWithLink` });
1322
+ if (isDoc(rules['stamp']) && rules['stamp']['follows'] !== undefined)
1323
+ out.push({ word: 'stamp.follows', path: `${here}.stamp.follows` });
1249
1324
  if (isDoc(rules['stamp']) && isDoc(rules['stamp']['set']) && rules['stamp']['set']['addWorkingDays'] !== undefined) {
1250
1325
  out.push({ word: 'stamp.addWorkingDays', path: `${here}.stamp.set.addWorkingDays` });
1251
1326
  }
@@ -1255,9 +1330,17 @@ export function installFloorWords(document) {
1255
1330
  out.push({ word: 'requiredWhen.stamp', path: `${here}.requiredWhen` });
1256
1331
  });
1257
1332
  });
1333
+ if (document['staffAccounts'] !== undefined)
1334
+ out.push({ word: 'staffAccounts', path: 'staffAccounts' });
1335
+ if (document['personImport'] !== undefined)
1336
+ out.push({ word: 'personImport', path: 'personImport' });
1258
1337
  list(document['roles']).forEach((role, r) => {
1259
1338
  if (!isDoc(role))
1260
1339
  return;
1340
+ if (role['invitedByApp'] !== undefined)
1341
+ out.push({ word: 'roles.invitedByApp', path: `roles.${String(r)}.invitedByApp` });
1342
+ if (role['followsFrom'] !== undefined)
1343
+ out.push({ word: 'roles.followsFrom', path: `roles.${String(r)}.followsFrom` });
1261
1344
  if (role['tables'] !== undefined)
1262
1345
  out.push({ word: 'roles.tables', path: `roles.${String(r)}.tables` });
1263
1346
  if (role['names'] !== undefined)
@@ -1425,6 +1508,8 @@ export function installFloorWords(document) {
1425
1508
  });
1426
1509
  // An email block sent only with, or without, a variable; an add-on's links into its app; rows found by a table-and-row pair.
1427
1510
  const outbox = isDoc(document['outbox']) ? document['outbox'] : {};
1511
+ if (isDoc(outbox['columns']) && outbox['columns']['relayAcceptedAt'] !== undefined)
1512
+ out.push({ word: 'outbox.relayAcceptedAt', path: 'outbox.columns.relayAcceptedAt' });
1428
1513
  if (isDoc(outbox['pages']) && outbox['pages']['app'] !== undefined)
1429
1514
  out.push({ word: 'outbox.pages.app', path: 'outbox.pages.app' });
1430
1515
  if (outbox['classes'] !== undefined)