@adminiumjs/manifest 0.3.71 → 0.3.73
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/compose.d.ts.map +1 -1
- package/dist/compose.js +1 -0
- package/dist/compose.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/schema.d.ts +50 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +5 -0
- package/dist/schema.js.map +1 -1
- package/dist/shipping.d.ts +88 -0
- package/dist/shipping.d.ts.map +1 -0
- package/dist/shipping.js +128 -0
- package/dist/shipping.js.map +1 -0
- package/dist/words.d.ts +1 -1
- package/dist/words.d.ts.map +1 -1
- package/dist/words.js +11 -0
- package/dist/words.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `shipping` — where an app keeps what a carrier needs to know about an order.
|
|
3
|
+
*
|
|
4
|
+
* ```json
|
|
5
|
+
* "shipping": {
|
|
6
|
+
* "orders": [{
|
|
7
|
+
* "table": "orders",
|
|
8
|
+
* "reference": "number",
|
|
9
|
+
* "address": { "name": "ship_name", "lines": ["ship_line1", "ship_line2"], "city": "ship_city",
|
|
10
|
+
* "region": "ship_region", "postcode": "ship_postcode", "country": "ship_country",
|
|
11
|
+
* "phone": "ship_phone", "email": "ship_email", "company": "ship_company" }
|
|
12
|
+
* }]
|
|
13
|
+
* }
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* The server reads the address from these columns, so a request can never name
|
|
17
|
+
* where a parcel goes. An app without this block has not been updated for real
|
|
18
|
+
* carriers, and the engine refuses it one: a released app sends a sample
|
|
19
|
+
* address, and a real carrier would buy a label for it.
|
|
20
|
+
*
|
|
21
|
+
* `name`, `lines` (one to three), `city`, `postcode`, `country` and `reference`
|
|
22
|
+
* are required, the rest optional, and a table is named once. `tracking` and
|
|
23
|
+
* `carrier` name text columns the engine fills once a real label is bought; it
|
|
24
|
+
* never moves the order's status.
|
|
25
|
+
*
|
|
26
|
+
* Pure.
|
|
27
|
+
*/
|
|
28
|
+
import { z } from 'zod';
|
|
29
|
+
import { type ReferenceIssue, type TableIndex } from './refs.js';
|
|
30
|
+
export declare const shippingOrderSchema: z.ZodObject<{
|
|
31
|
+
table: z.ZodString;
|
|
32
|
+
reference: z.ZodString;
|
|
33
|
+
address: z.ZodObject<{
|
|
34
|
+
name: z.ZodString;
|
|
35
|
+
lines: z.ZodArray<z.ZodString>;
|
|
36
|
+
city: z.ZodString;
|
|
37
|
+
region: z.ZodOptional<z.ZodString>;
|
|
38
|
+
postcode: z.ZodString;
|
|
39
|
+
country: z.ZodString;
|
|
40
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
41
|
+
email: z.ZodOptional<z.ZodString>;
|
|
42
|
+
company: z.ZodOptional<z.ZodString>;
|
|
43
|
+
}, z.core.$strict>;
|
|
44
|
+
tracking: z.ZodOptional<z.ZodString>;
|
|
45
|
+
carrier: z.ZodOptional<z.ZodString>;
|
|
46
|
+
returns: z.ZodOptional<z.ZodObject<{
|
|
47
|
+
table: z.ZodString;
|
|
48
|
+
order: z.ZodString;
|
|
49
|
+
status: z.ZodString;
|
|
50
|
+
approved: z.ZodArray<z.ZodString>;
|
|
51
|
+
}, z.core.$strict>>;
|
|
52
|
+
}, z.core.$strict>;
|
|
53
|
+
export declare const shippingSchema: z.ZodObject<{
|
|
54
|
+
orders: z.ZodArray<z.ZodObject<{
|
|
55
|
+
table: z.ZodString;
|
|
56
|
+
reference: z.ZodString;
|
|
57
|
+
address: z.ZodObject<{
|
|
58
|
+
name: z.ZodString;
|
|
59
|
+
lines: z.ZodArray<z.ZodString>;
|
|
60
|
+
city: z.ZodString;
|
|
61
|
+
region: z.ZodOptional<z.ZodString>;
|
|
62
|
+
postcode: z.ZodString;
|
|
63
|
+
country: z.ZodString;
|
|
64
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
65
|
+
email: z.ZodOptional<z.ZodString>;
|
|
66
|
+
company: z.ZodOptional<z.ZodString>;
|
|
67
|
+
}, z.core.$strict>;
|
|
68
|
+
tracking: z.ZodOptional<z.ZodString>;
|
|
69
|
+
carrier: z.ZodOptional<z.ZodString>;
|
|
70
|
+
returns: z.ZodOptional<z.ZodObject<{
|
|
71
|
+
table: z.ZodString;
|
|
72
|
+
order: z.ZodString;
|
|
73
|
+
status: z.ZodString;
|
|
74
|
+
approved: z.ZodArray<z.ZodString>;
|
|
75
|
+
}, z.core.$strict>>;
|
|
76
|
+
}, z.core.$strict>>;
|
|
77
|
+
}, z.core.$strict>;
|
|
78
|
+
export type Shipping = z.infer<typeof shippingSchema>;
|
|
79
|
+
export type ShippingOrder = z.infer<typeof shippingOrderSchema>;
|
|
80
|
+
export type ShippingAddressColumns = ShippingOrder['address'];
|
|
81
|
+
/** Everything wrong with an app's `shipping`, checked against its own tables and columns. */
|
|
82
|
+
export declare function shippingIssues<C extends {
|
|
83
|
+
ref: string;
|
|
84
|
+
type: string;
|
|
85
|
+
}>(m: {
|
|
86
|
+
shipping?: Shipping | undefined;
|
|
87
|
+
}, index: TableIndex<C>): ReferenceIssue[];
|
|
88
|
+
//# sourceMappingURL=shipping.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shipping.d.ts","sourceRoot":"","sources":["../src/shipping.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAa,KAAK,cAAc,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAuB5E,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;kBAwBrB,CAAC;AAEZ,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;kBAIhB,CAAC;AAEZ,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,sBAAsB,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC;AAE9D,6FAA6F;AAC7F,wBAAgB,cAAc,CAAC,CAAC,SAAS;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;CAAE,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,cAAc,EAAE,CAmCtJ"}
|
package/dist/shipping.js
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
/**
|
|
3
|
+
* `shipping` — where an app keeps what a carrier needs to know about an order.
|
|
4
|
+
*
|
|
5
|
+
* ```json
|
|
6
|
+
* "shipping": {
|
|
7
|
+
* "orders": [{
|
|
8
|
+
* "table": "orders",
|
|
9
|
+
* "reference": "number",
|
|
10
|
+
* "address": { "name": "ship_name", "lines": ["ship_line1", "ship_line2"], "city": "ship_city",
|
|
11
|
+
* "region": "ship_region", "postcode": "ship_postcode", "country": "ship_country",
|
|
12
|
+
* "phone": "ship_phone", "email": "ship_email", "company": "ship_company" }
|
|
13
|
+
* }]
|
|
14
|
+
* }
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* The server reads the address from these columns, so a request can never name
|
|
18
|
+
* where a parcel goes. An app without this block has not been updated for real
|
|
19
|
+
* carriers, and the engine refuses it one: a released app sends a sample
|
|
20
|
+
* address, and a real carrier would buy a label for it.
|
|
21
|
+
*
|
|
22
|
+
* `name`, `lines` (one to three), `city`, `postcode`, `country` and `reference`
|
|
23
|
+
* are required, the rest optional, and a table is named once. `tracking` and
|
|
24
|
+
* `carrier` name text columns the engine fills once a real label is bought; it
|
|
25
|
+
* never moves the order's status.
|
|
26
|
+
*
|
|
27
|
+
* Pure.
|
|
28
|
+
*/
|
|
29
|
+
import { z } from 'zod';
|
|
30
|
+
import { refSchema } from './refs.js';
|
|
31
|
+
/** What may hold a line of an address: words, or a fixed list (a country picked from one). */
|
|
32
|
+
const ADDRESS_TYPES = ['text', 'enum'];
|
|
33
|
+
/** What a bought label's number and carrier are written into. */
|
|
34
|
+
const TEXT_TYPES = ['text'];
|
|
35
|
+
/** What may hold an order's reference: `MP-4118`, or a plain number. */
|
|
36
|
+
const REFERENCE_TYPES = ['text', 'int', 'bigint', 'uuid'];
|
|
37
|
+
const shippingAddressSchema = z
|
|
38
|
+
.object({
|
|
39
|
+
name: refSchema,
|
|
40
|
+
lines: z.array(refSchema).min(1).max(3),
|
|
41
|
+
city: refSchema,
|
|
42
|
+
region: refSchema.optional(),
|
|
43
|
+
postcode: refSchema,
|
|
44
|
+
country: refSchema,
|
|
45
|
+
phone: refSchema.optional(),
|
|
46
|
+
email: refSchema.optional(),
|
|
47
|
+
company: refSchema.optional(),
|
|
48
|
+
})
|
|
49
|
+
.strict();
|
|
50
|
+
export const shippingOrderSchema = z
|
|
51
|
+
.object({
|
|
52
|
+
table: refSchema,
|
|
53
|
+
reference: refSchema,
|
|
54
|
+
address: shippingAddressSchema,
|
|
55
|
+
/** Where a bought label's tracking number is written, for the order's own screens and mail. */
|
|
56
|
+
tracking: refSchema.optional(),
|
|
57
|
+
/** Where the name of the company moving the parcel is written. */
|
|
58
|
+
carrier: refSchema.optional(),
|
|
59
|
+
/**
|
|
60
|
+
* An app that takes returns: which table, the column naming the order, its
|
|
61
|
+
* status, and the states a return label may be bought in. Without this
|
|
62
|
+
* block the engine sells no return label for this order.
|
|
63
|
+
*/
|
|
64
|
+
returns: z
|
|
65
|
+
.object({
|
|
66
|
+
table: refSchema,
|
|
67
|
+
order: refSchema,
|
|
68
|
+
status: refSchema,
|
|
69
|
+
approved: z.array(z.string().min(1).max(64)).min(1).max(8),
|
|
70
|
+
})
|
|
71
|
+
.strict()
|
|
72
|
+
.optional(),
|
|
73
|
+
})
|
|
74
|
+
.strict();
|
|
75
|
+
export const shippingSchema = z
|
|
76
|
+
.object({
|
|
77
|
+
orders: z.array(shippingOrderSchema).min(1).max(8),
|
|
78
|
+
})
|
|
79
|
+
.strict();
|
|
80
|
+
/** Everything wrong with an app's `shipping`, checked against its own tables and columns. */
|
|
81
|
+
export function shippingIssues(m, index) {
|
|
82
|
+
const out = [];
|
|
83
|
+
const seen = new Set();
|
|
84
|
+
(m.shipping?.orders ?? []).forEach((order, o) => {
|
|
85
|
+
const at = (...rest) => ['shipping', 'orders', o, ...rest];
|
|
86
|
+
if (seen.has(order.table))
|
|
87
|
+
out.push({ path: at('table'), message: `"${order.table}" is named twice` });
|
|
88
|
+
seen.add(order.table);
|
|
89
|
+
if (index.table(order.table) === undefined) {
|
|
90
|
+
out.push({ path: at('table'), message: `"${order.table}" is not a table of this app` });
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const column = (ref, types, path) => {
|
|
94
|
+
const found = index.column(order.table, ref);
|
|
95
|
+
if (found === undefined)
|
|
96
|
+
out.push({ path, message: `"${order.table}" has no column "${ref}"` });
|
|
97
|
+
else if (!types.includes(found.type))
|
|
98
|
+
out.push({ path, message: `"${order.table}.${ref}" is a ${found.type} column, which cannot hold this` });
|
|
99
|
+
};
|
|
100
|
+
column(order.reference, REFERENCE_TYPES, at('reference'));
|
|
101
|
+
if (order.tracking !== undefined)
|
|
102
|
+
column(order.tracking, TEXT_TYPES, at('tracking'));
|
|
103
|
+
if (order.carrier !== undefined)
|
|
104
|
+
column(order.carrier, TEXT_TYPES, at('carrier'));
|
|
105
|
+
const { lines, ...single } = order.address;
|
|
106
|
+
for (const [field, ref] of Object.entries(single))
|
|
107
|
+
if (ref !== undefined)
|
|
108
|
+
column(ref, ADDRESS_TYPES, at('address', field));
|
|
109
|
+
lines.forEach((ref, l) => {
|
|
110
|
+
column(ref, ADDRESS_TYPES, at('address', 'lines', l));
|
|
111
|
+
if (lines.indexOf(ref) !== l)
|
|
112
|
+
out.push({ path: at('address', 'lines', l), message: `"${ref}" is named twice` });
|
|
113
|
+
});
|
|
114
|
+
if (order.returns !== undefined) {
|
|
115
|
+
const { table, order: link, status } = order.returns;
|
|
116
|
+
if (index.table(table) === undefined)
|
|
117
|
+
out.push({ path: at('returns', 'table'), message: `"${table}" is not a table of this app` });
|
|
118
|
+
else {
|
|
119
|
+
if (index.column(table, link) === undefined)
|
|
120
|
+
out.push({ path: at('returns', 'order'), message: `"${table}" has no column "${link}"` });
|
|
121
|
+
if (index.column(table, status) === undefined)
|
|
122
|
+
out.push({ path: at('returns', 'status'), message: `"${table}" has no column "${status}"` });
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
return out;
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=shipping.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shipping.js","sourceRoot":"","sources":["../src/shipping.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,SAAS,EAAwC,MAAM,WAAW,CAAC;AAE5E,8FAA8F;AAC9F,MAAM,aAAa,GAAsB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1D,iEAAiE;AACjE,MAAM,UAAU,GAAsB,CAAC,MAAM,CAAC,CAAC;AAC/C,wEAAwE;AACxE,MAAM,eAAe,GAAsB,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;AAE7E,MAAM,qBAAqB,GAAG,CAAC;KAC5B,MAAM,CAAC;IACN,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,GAAG,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AAC,CAAC;QAClH,CAAC,CAAC,CAAC;QACH,IAAI,KAAK,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC;YACrD,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,SAAS;gBAAE,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,KAAK,8BAA8B,EAAE,CAAC,CAAC;iBAC9H,CAAC;gBACJ,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,SAAS;oBAAE,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,KAAK,oBAAoB,IAAI,GAAG,EAAE,CAAC,CAAC;gBACvI,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,SAAS;oBAAE,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,KAAK,oBAAoB,MAAM,GAAG,EAAE,CAAC,CAAC;YAC9I,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/words.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export declare const ADD_ON_INSTALL_BLOCKS: readonly ["pages", "roles", "optionL
|
|
|
14
14
|
* runs the word, or it refuses a manifest that uses it — and its tests read
|
|
15
15
|
* this list to see that none is left without one.
|
|
16
16
|
*/
|
|
17
|
-
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", "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", "addOn.slots.on", "addOn.connect.accounts", "table.connectedAccounts", "roles.accounts"];
|
|
17
|
+
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", "addOn.slots.on", "shipping", "addOn.connect.accounts", "table.connectedAccounts", "roles.accounts"];
|
|
18
18
|
export type ManifestWordName = (typeof INSTALL_FLOOR_WORD_NAMES)[number];
|
|
19
19
|
/**
|
|
20
20
|
* 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":"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,iFAAiF;AACjF,eAAO,MAAM,qBAAqB,gLAcxB,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,
|
|
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,iFAAiF;AACjF,eAAO,MAAM,qBAAqB,gLAcxB,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,q1KAmW3B,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,CAqV3E,CAAC;AAYF,gFAAgF;AAChF,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,OAAO,GAAG,YAAY,EAAE,CA0jBnE"}
|
package/dist/words.js
CHANGED
|
@@ -249,6 +249,8 @@ export const INSTALL_FLOOR_WORD_NAMES = [
|
|
|
249
249
|
'roles.privacyPeople',
|
|
250
250
|
// An app role that gives back the money paid online for the app's own records (`payments:@:refund`).
|
|
251
251
|
'roles.paymentsRefund',
|
|
252
|
+
// An app role that books, cancels or declares customs for the app's own labels (`shipping:@:book`, `:cancel`, `:customs`).
|
|
253
|
+
'roles.shippingGrants',
|
|
252
254
|
// The columns a records page's list opens on, in order (`config.columns`).
|
|
253
255
|
'config.columns',
|
|
254
256
|
// An add-on kept once per server rather than installed per database.
|
|
@@ -387,6 +389,8 @@ export const INSTALL_FLOOR_WORD_NAMES = [
|
|
|
387
389
|
'people.lead',
|
|
388
390
|
// A record action Adminium's own record page shows on a kind of declared table (a companies table's "Fill in details").
|
|
389
391
|
'addOn.slots.on',
|
|
392
|
+
// Where an app's orders keep what a carrier needs: without it, the engine calls no real carrier for the app.
|
|
393
|
+
'shipping',
|
|
390
394
|
// An add-on whose people each connect their own outside account, and the app's table those people are rows of.
|
|
391
395
|
'addOn.connect.accounts',
|
|
392
396
|
'table.connectedAccounts',
|
|
@@ -626,6 +630,8 @@ export const WORD_FLOORS = {
|
|
|
626
630
|
'appGrants.more': '0.3.47',
|
|
627
631
|
'roles.privacyPeople': '0.3.47',
|
|
628
632
|
'roles.paymentsRefund': '0.3.60',
|
|
633
|
+
// A release before refuses the grant.
|
|
634
|
+
'roles.shippingGrants': '0.3.72',
|
|
629
635
|
// A release before ignores the key, and the list opens on the columns Adminium picks.
|
|
630
636
|
'config.columns': '0.3.47',
|
|
631
637
|
'addOn.scope': '0.3.49',
|
|
@@ -709,6 +715,7 @@ export const WORD_FLOORS = {
|
|
|
709
715
|
'addOn.leads': '0.3.66',
|
|
710
716
|
'people.lead': '0.3.66',
|
|
711
717
|
'addOn.slots.on': '0.3.66',
|
|
718
|
+
'shipping': '0.3.72',
|
|
712
719
|
'addOn.connect.accounts': '0.3.71',
|
|
713
720
|
'table.connectedAccounts': '0.3.71',
|
|
714
721
|
'roles.accounts': '0.3.71',
|
|
@@ -914,6 +921,8 @@ export function installFloorWords(document) {
|
|
|
914
921
|
out.push({ word: 'roles.privacyPeople', path: `roles.${String(r)}.permissions.${String(g)}` });
|
|
915
922
|
if (grant === 'payments:@:refund')
|
|
916
923
|
out.push({ word: 'roles.paymentsRefund', path: `roles.${String(r)}.permissions.${String(g)}` });
|
|
924
|
+
if (typeof grant === 'string' && /^shipping:@:(book|cancel|customs)$/.test(grant))
|
|
925
|
+
out.push({ word: 'roles.shippingGrants', path: `roles.${String(r)}.permissions.${String(g)}` });
|
|
917
926
|
if (typeof grant === 'string' && grant.startsWith('accounts:@:'))
|
|
918
927
|
out.push({ word: 'roles.accounts', path: `roles.${String(r)}.permissions.${String(g)}` });
|
|
919
928
|
});
|
|
@@ -968,6 +977,8 @@ export function installFloorWords(document) {
|
|
|
968
977
|
if (isDoc(entry) && entry['lead'] !== undefined)
|
|
969
978
|
out.push({ word: 'people.lead', path: `people.${String(e)}.lead` });
|
|
970
979
|
});
|
|
980
|
+
if (document['shipping'] !== undefined)
|
|
981
|
+
out.push({ word: 'shipping', path: 'shipping' });
|
|
971
982
|
}
|
|
972
983
|
// An agreement on a text's length, on an entry or on its child rows (two levels).
|
|
973
984
|
list(document['publicAccess']).forEach((entry, e) => {
|