@adminiumjs/manifest 0.3.79 → 0.3.80
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.
- package/dist/change-guards.d.ts +2 -0
- package/dist/change-guards.d.ts.map +1 -1
- package/dist/change-guards.js +7 -2
- package/dist/change-guards.js.map +1 -1
- package/dist/compose.d.ts.map +1 -1
- package/dist/compose.js +3 -0
- package/dist/compose.js.map +1 -1
- package/dist/expiry-notice.d.ts +68 -0
- package/dist/expiry-notice.d.ts.map +1 -0
- package/dist/expiry-notice.js +75 -0
- package/dist/expiry-notice.js.map +1 -0
- package/dist/from-template.d.ts +52 -0
- package/dist/from-template.d.ts.map +1 -0
- package/dist/from-template.js +89 -0
- package/dist/from-template.js.map +1 -0
- package/dist/index.d.ts +10 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/instance.d.ts +2 -1
- package/dist/instance.d.ts.map +1 -1
- package/dist/instance.js +1 -0
- package/dist/instance.js.map +1 -1
- package/dist/leave/away.d.ts +67 -0
- package/dist/leave/away.d.ts.map +1 -0
- package/dist/leave/away.js +74 -0
- package/dist/leave/away.js.map +1 -0
- package/dist/leave/civil.d.ts +35 -0
- package/dist/leave/civil.d.ts.map +1 -0
- package/dist/leave/civil.js +75 -0
- package/dist/leave/civil.js.map +1 -0
- package/dist/leave/close-line.d.ts +91 -0
- package/dist/leave/close-line.d.ts.map +1 -0
- package/dist/leave/close-line.js +90 -0
- package/dist/leave/close-line.js.map +1 -0
- package/dist/leave/count.d.ts +82 -0
- package/dist/leave/count.d.ts.map +1 -0
- package/dist/leave/count.js +129 -0
- package/dist/leave/count.js.map +1 -0
- package/dist/leave/deciders.d.ts +81 -0
- package/dist/leave/deciders.d.ts.map +1 -0
- package/dist/leave/deciders.js +158 -0
- package/dist/leave/deciders.js.map +1 -0
- package/dist/leave/entitlement.d.ts +104 -0
- package/dist/leave/entitlement.d.ts.map +1 -0
- package/dist/leave/entitlement.js +59 -0
- package/dist/leave/entitlement.js.map +1 -0
- package/dist/leave/floors.d.ts +27 -0
- package/dist/leave/floors.d.ts.map +1 -0
- package/dist/leave/floors.js +37 -0
- package/dist/leave/floors.js.map +1 -0
- package/dist/leave/index.d.ts +22 -0
- package/dist/leave/index.d.ts.map +1 -0
- package/dist/leave/index.js +23 -0
- package/dist/leave/index.js.map +1 -0
- package/dist/leave/notice-gate.d.ts +41 -0
- package/dist/leave/notice-gate.d.ts.map +1 -0
- package/dist/leave/notice-gate.js +27 -0
- package/dist/leave/notice-gate.js.map +1 -0
- package/dist/leave/preset-england-wales.d.ts +10 -0
- package/dist/leave/preset-england-wales.d.ts.map +1 -0
- package/dist/leave/preset-england-wales.js +67 -0
- package/dist/leave/preset-england-wales.js.map +1 -0
- package/dist/leave/preset-germany.d.ts +30 -0
- package/dist/leave/preset-germany.d.ts.map +1 -0
- package/dist/leave/preset-germany.js +92 -0
- package/dist/leave/preset-germany.js.map +1 -0
- package/dist/leave/preset-us.d.ts +8 -0
- package/dist/leave/preset-us.d.ts.map +1 -0
- package/dist/leave/preset-us.js +48 -0
- package/dist/leave/preset-us.js.map +1 -0
- package/dist/leave/replay.d.ts +126 -0
- package/dist/leave/replay.d.ts.map +1 -0
- package/dist/leave/replay.js +158 -0
- package/dist/leave/replay.js.map +1 -0
- package/dist/leave/state.d.ts +64 -0
- package/dist/leave/state.d.ts.map +1 -0
- package/dist/leave/state.js +74 -0
- package/dist/leave/state.js.map +1 -0
- package/dist/leave/told.d.ts +32 -0
- package/dist/leave/told.d.ts.map +1 -0
- package/dist/leave/told.js +32 -0
- package/dist/leave/told.js.map +1 -0
- package/dist/leave/units.d.ts +21 -0
- package/dist/leave/units.d.ts.map +1 -0
- package/dist/leave/units.js +21 -0
- package/dist/leave/units.js.map +1 -0
- package/dist/leave-shape.d.ts +324 -0
- package/dist/leave-shape.d.ts.map +1 -0
- package/dist/leave-shape.js +164 -0
- package/dist/leave-shape.js.map +1 -0
- package/dist/leave-word.d.ts +86 -0
- package/dist/leave-word.d.ts.map +1 -0
- package/dist/leave-word.js +235 -0
- package/dist/leave-word.js.map +1 -0
- package/dist/outbox.d.ts +2 -0
- package/dist/outbox.d.ts.map +1 -1
- package/dist/outbox.js +5 -0
- package/dist/outbox.js.map +1 -1
- package/dist/person-import.d.ts +98 -0
- package/dist/person-import.d.ts.map +1 -0
- package/dist/person-import.js +270 -0
- package/dist/person-import.js.map +1 -0
- package/dist/record-classes.d.ts +99 -0
- package/dist/record-classes.d.ts.map +1 -0
- package/dist/record-classes.js +123 -0
- package/dist/record-classes.js.map +1 -0
- package/dist/removal.d.ts +1 -0
- package/dist/removal.d.ts.map +1 -1
- package/dist/removal.js +2 -0
- package/dist/removal.js.map +1 -1
- package/dist/roles.d.ts +23 -1
- package/dist/roles.d.ts.map +1 -1
- package/dist/roles.js +34 -5
- package/dist/roles.js.map +1 -1
- package/dist/schema.d.ts +601 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +134 -14
- package/dist/schema.js.map +1 -1
- package/dist/staff-accounts.d.ts +102 -0
- package/dist/staff-accounts.d.ts.map +1 -0
- package/dist/staff-accounts.js +179 -0
- package/dist/staff-accounts.js.map +1 -0
- package/dist/words.d.ts +1 -1
- package/dist/words.d.ts.map +1 -1
- package/dist/words.js +80 -0
- package/dist/words.js.map +1 -1
- 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
|
+
{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,GAAG,EAAE,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", "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
|
package/dist/words.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"words.d.ts","sourceRoot":"","sources":["../src/words.ts"],"names":[],"mappings":"
|
|
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,qjMA+Y3B,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,CAmY3E,CAAC;AAYF,gFAAgF;AAChF,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,OAAO,GAAG,YAAY,EAAE,CAumBnE"}
|
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 } 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,22 @@ 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
|
+
'staffAccounts',
|
|
114
|
+
'personImport',
|
|
115
|
+
'roles.invitedByApp',
|
|
116
|
+
'roles.followsFrom',
|
|
117
|
+
'roles.peopleManage',
|
|
118
|
+
'roles.leaveReport',
|
|
119
|
+
'changes.notLoop',
|
|
120
|
+
'copy.clearsWithLink',
|
|
121
|
+
'stamp.follows',
|
|
105
122
|
'shape.create',
|
|
106
123
|
'table.appGrants',
|
|
107
124
|
'roles.rows',
|
|
@@ -111,6 +128,7 @@ export const INSTALL_FLOOR_WORD_NAMES = [
|
|
|
111
128
|
'app.modules',
|
|
112
129
|
'roles.names',
|
|
113
130
|
'app.maps',
|
|
131
|
+
'app.recordClasses',
|
|
114
132
|
'automations.staffRecipient',
|
|
115
133
|
'automations.perSpell',
|
|
116
134
|
'automations.urgent',
|
|
@@ -453,6 +471,9 @@ export const WORD_FLOORS = {
|
|
|
453
471
|
'column.staff': '0.3.28',
|
|
454
472
|
'table.belongs': '0.3.28',
|
|
455
473
|
'table.private': '0.3.28',
|
|
474
|
+
// 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.
|
|
475
|
+
'table.access': '0.3.80',
|
|
476
|
+
'table.readLog': '0.3.80',
|
|
456
477
|
// A row hung on a private row, reached by a person that private row's own `belongs` names.
|
|
457
478
|
'belongs.throughPrivate': '0.3.35',
|
|
458
479
|
// A table built on a shape holding its create to a condition on a column the app added.
|
|
@@ -482,6 +503,8 @@ export const WORD_FLOORS = {
|
|
|
482
503
|
'roles.names': '0.3.28',
|
|
483
504
|
// The app shows maps: its install asks whether they are shown.
|
|
484
505
|
'app.maps': '0.3.28',
|
|
506
|
+
// What an app keeps and for how long. Plan 81: the release round sets the real floor.
|
|
507
|
+
'app.recordClasses': '0.3.80',
|
|
485
508
|
// A rule that tells the person a staff column of its record names.
|
|
486
509
|
'automations.staffRecipient': '0.3.28',
|
|
487
510
|
// A row visited once for each spell it matches.
|
|
@@ -520,6 +543,8 @@ export const WORD_FLOORS = {
|
|
|
520
543
|
'automations.settingValue': '0.3.28',
|
|
521
544
|
'automations.daysAfter': '0.3.28',
|
|
522
545
|
'automations.settingElse': '0.3.29',
|
|
546
|
+
// When the relay accepted a message, the proof a mail left. Plan 81: the release round sets the real floor.
|
|
547
|
+
'outbox.relayAcceptedAt': '0.3.80',
|
|
523
548
|
'outbox.replyTo': '0.3.28',
|
|
524
549
|
'outbox.onDelete': '0.3.28',
|
|
525
550
|
// A text column in which people are mentioned.
|
|
@@ -779,6 +804,27 @@ export const WORD_FLOORS = {
|
|
|
779
804
|
'publicAccess.consent.no': '0.3.71',
|
|
780
805
|
'payments.refundOnStaff': '0.3.71',
|
|
781
806
|
'table.booking.sync': '0.3.71',
|
|
807
|
+
// A column that says who a row is about: a hand-over leaves it alone.
|
|
808
|
+
'belongs.identity': LEAVE_MIN,
|
|
809
|
+
// A table of leave requests: counted days, dated lots and the kept tables only Adminium writes.
|
|
810
|
+
'table.leave': LEAVE_MIN,
|
|
811
|
+
// The app's own staff: who the door may invite, roles that follow the data, a link that may not loop.
|
|
812
|
+
staffAccounts: LEAVE_MIN,
|
|
813
|
+
// One file builds each person's rows: the people door's import.
|
|
814
|
+
personImport: LEAVE_MIN,
|
|
815
|
+
'roles.invitedByApp': LEAVE_MIN,
|
|
816
|
+
'roles.followsFrom': LEAVE_MIN,
|
|
817
|
+
'roles.peopleManage': LEAVE_MIN,
|
|
818
|
+
'roles.leaveReport': LEAVE_MIN,
|
|
819
|
+
'changes.notLoop': LEAVE_MIN,
|
|
820
|
+
// A copy that names a person, emptied when its link is, so it never goes on naming them.
|
|
821
|
+
'copy.clearsWithLink': LEAVE_MIN,
|
|
822
|
+
// A date a followed copy moves, worked out again with it (a checklist task's due date, when its list's date moves).
|
|
823
|
+
'stamp.follows': LEAVE_MIN,
|
|
824
|
+
// A row made from a template gets the template's tasks, in the same write (a joiner's checklist).
|
|
825
|
+
'table.fromTemplate': LEAVE_MIN,
|
|
826
|
+
// A read-logged table's holders told each morning how many rows run out soon, and the first date (a confidential document's expiry).
|
|
827
|
+
'table.expiryNotice': LEAVE_MIN,
|
|
782
828
|
'addOn.reviews': '0.3.68',
|
|
783
829
|
'appGrants.appColumn': '0.3.68',
|
|
784
830
|
textTemplates: SMS_WORDS_FLOOR,
|
|
@@ -941,6 +987,8 @@ export function installFloorWords(document) {
|
|
|
941
987
|
out.push({ word: 'app.modules', path: 'modules' });
|
|
942
988
|
if (document['maps'] !== undefined)
|
|
943
989
|
out.push({ word: 'app.maps', path: 'maps' });
|
|
990
|
+
if (document['recordClasses'] !== undefined)
|
|
991
|
+
out.push({ word: 'app.recordClasses', path: 'recordClasses' });
|
|
944
992
|
// Starting rows: a release before the floor takes the block and writes none of it.
|
|
945
993
|
if (document['seeds'] !== undefined)
|
|
946
994
|
out.push({ word: 'app.seeds', path: 'seeds' });
|
|
@@ -975,6 +1023,10 @@ export function installFloorWords(document) {
|
|
|
975
1023
|
out.push({ word: 'roles.shippingGrants', path: `roles.${String(r)}.permissions.${String(g)}` });
|
|
976
1024
|
if (typeof grant === 'string' && grant.startsWith('accounts:@:'))
|
|
977
1025
|
out.push({ word: 'roles.accounts', path: `roles.${String(r)}.permissions.${String(g)}` });
|
|
1026
|
+
if (grant === 'people:@:manage')
|
|
1027
|
+
out.push({ word: 'roles.peopleManage', path: `roles.${String(r)}.permissions.${String(g)}` });
|
|
1028
|
+
if (grant === 'leave:@:report')
|
|
1029
|
+
out.push({ word: 'roles.leaveReport', path: `roles.${String(r)}.permissions.${String(g)}` });
|
|
978
1030
|
if (typeof grant === 'string' && /^texts:@:(read|reply)$/.test(grant))
|
|
979
1031
|
out.push({ word: 'roles.texts', path: `roles.${String(r)}.permissions.${String(g)}` });
|
|
980
1032
|
});
|
|
@@ -1107,9 +1159,19 @@ export function installFloorWords(document) {
|
|
|
1107
1159
|
list(table['belongs']).forEach((way, w) => {
|
|
1108
1160
|
if (isDoc(way) && isDoc(way['through']) && way['through']['while'] !== undefined)
|
|
1109
1161
|
out.push({ word: 'listing.while', path: `${at}.belongs.${String(w)}.through.while` });
|
|
1162
|
+
if (isDoc(way) && way['identity'] !== undefined)
|
|
1163
|
+
out.push({ word: 'belongs.identity', path: `${at}.belongs.${String(w)}.identity` });
|
|
1110
1164
|
});
|
|
1111
1165
|
if (table['private'] !== undefined)
|
|
1112
1166
|
out.push({ word: 'table.private', path: `${at}.private` });
|
|
1167
|
+
if (table['access'] !== undefined)
|
|
1168
|
+
out.push({ word: 'table.access', path: `${at}.access` });
|
|
1169
|
+
if (table['readLog'] !== undefined)
|
|
1170
|
+
out.push({ word: 'table.readLog', path: `${at}.readLog` });
|
|
1171
|
+
if (table['fromTemplate'] !== undefined)
|
|
1172
|
+
out.push({ word: 'table.fromTemplate', path: `${at}.fromTemplate` });
|
|
1173
|
+
if (table['expiryNotice'] !== undefined)
|
|
1174
|
+
out.push({ word: 'table.expiryNotice', path: `${at}.expiryNotice` });
|
|
1113
1175
|
list(table['belongs']).forEach((way, w) => {
|
|
1114
1176
|
if (!isDoc(way) || typeof way['column'] !== 'string' || way['person'] === undefined)
|
|
1115
1177
|
return;
|
|
@@ -1136,6 +1198,8 @@ export function installFloorWords(document) {
|
|
|
1136
1198
|
}
|
|
1137
1199
|
if (table['occupies'] !== undefined)
|
|
1138
1200
|
out.push({ word: 'table.occupies', path: `${at}.occupies` });
|
|
1201
|
+
if (table['leave'] !== undefined)
|
|
1202
|
+
out.push({ word: 'table.leave', path: `${at}.leave` });
|
|
1139
1203
|
if (table['removal'] !== undefined)
|
|
1140
1204
|
out.push({ word: 'table.removal', path: `${at}.removal` });
|
|
1141
1205
|
if (table['keep'] !== undefined)
|
|
@@ -1246,6 +1310,12 @@ export function installFloorWords(document) {
|
|
|
1246
1310
|
out.push({ word: 'stamp.notEarlier', path: `${here}.stamp.notEarlier` });
|
|
1247
1311
|
if (rules['band'] !== undefined)
|
|
1248
1312
|
out.push({ word: 'column.band', path: `${here}.band` });
|
|
1313
|
+
if (list(rules['changes']).some((guard) => isDoc(guard) && guard['notLoop'] !== undefined))
|
|
1314
|
+
out.push({ word: 'changes.notLoop', path: `${here}.changes` });
|
|
1315
|
+
if (isDoc(rules['copy']) && rules['copy']['clearsWithLink'] !== undefined)
|
|
1316
|
+
out.push({ word: 'copy.clearsWithLink', path: `${here}.copy.clearsWithLink` });
|
|
1317
|
+
if (isDoc(rules['stamp']) && rules['stamp']['follows'] !== undefined)
|
|
1318
|
+
out.push({ word: 'stamp.follows', path: `${here}.stamp.follows` });
|
|
1249
1319
|
if (isDoc(rules['stamp']) && isDoc(rules['stamp']['set']) && rules['stamp']['set']['addWorkingDays'] !== undefined) {
|
|
1250
1320
|
out.push({ word: 'stamp.addWorkingDays', path: `${here}.stamp.set.addWorkingDays` });
|
|
1251
1321
|
}
|
|
@@ -1255,9 +1325,17 @@ export function installFloorWords(document) {
|
|
|
1255
1325
|
out.push({ word: 'requiredWhen.stamp', path: `${here}.requiredWhen` });
|
|
1256
1326
|
});
|
|
1257
1327
|
});
|
|
1328
|
+
if (document['staffAccounts'] !== undefined)
|
|
1329
|
+
out.push({ word: 'staffAccounts', path: 'staffAccounts' });
|
|
1330
|
+
if (document['personImport'] !== undefined)
|
|
1331
|
+
out.push({ word: 'personImport', path: 'personImport' });
|
|
1258
1332
|
list(document['roles']).forEach((role, r) => {
|
|
1259
1333
|
if (!isDoc(role))
|
|
1260
1334
|
return;
|
|
1335
|
+
if (role['invitedByApp'] !== undefined)
|
|
1336
|
+
out.push({ word: 'roles.invitedByApp', path: `roles.${String(r)}.invitedByApp` });
|
|
1337
|
+
if (role['followsFrom'] !== undefined)
|
|
1338
|
+
out.push({ word: 'roles.followsFrom', path: `roles.${String(r)}.followsFrom` });
|
|
1261
1339
|
if (role['tables'] !== undefined)
|
|
1262
1340
|
out.push({ word: 'roles.tables', path: `roles.${String(r)}.tables` });
|
|
1263
1341
|
if (role['names'] !== undefined)
|
|
@@ -1425,6 +1503,8 @@ export function installFloorWords(document) {
|
|
|
1425
1503
|
});
|
|
1426
1504
|
// 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
1505
|
const outbox = isDoc(document['outbox']) ? document['outbox'] : {};
|
|
1506
|
+
if (isDoc(outbox['columns']) && outbox['columns']['relayAcceptedAt'] !== undefined)
|
|
1507
|
+
out.push({ word: 'outbox.relayAcceptedAt', path: 'outbox.columns.relayAcceptedAt' });
|
|
1428
1508
|
if (isDoc(outbox['pages']) && outbox['pages']['app'] !== undefined)
|
|
1429
1509
|
out.push({ word: 'outbox.pages.app', path: 'outbox.pages.app' });
|
|
1430
1510
|
if (outbox['classes'] !== undefined)
|