@adminiumjs/manifest 0.3.70 → 0.3.72
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/adjust.d.ts +1 -0
- package/dist/adjust.d.ts.map +1 -1
- package/dist/adjust.js +9 -1
- package/dist/adjust.js.map +1 -1
- package/dist/booking-calendar.d.ts +65 -0
- package/dist/booking-calendar.d.ts.map +1 -0
- package/dist/booking-calendar.js +122 -0
- package/dist/booking-calendar.js.map +1 -0
- package/dist/booking.d.ts +128 -1
- package/dist/booking.d.ts.map +1 -1
- package/dist/booking.js +188 -1
- package/dist/booking.js.map +1 -1
- package/dist/compose.d.ts.map +1 -1
- package/dist/compose.js +1 -0
- package/dist/compose.js.map +1 -1
- package/dist/connected-accounts.d.ts +26 -0
- package/dist/connected-accounts.d.ts.map +1 -0
- package/dist/connected-accounts.js +57 -0
- package/dist/connected-accounts.js.map +1 -0
- package/dist/embed.d.ts +101 -0
- package/dist/embed.d.ts.map +1 -0
- package/dist/embed.js +138 -0
- package/dist/embed.js.map +1 -0
- package/dist/forms.d.ts +2 -0
- package/dist/forms.d.ts.map +1 -1
- package/dist/forms.js +2 -1
- package/dist/forms.js.map +1 -1
- package/dist/holders.d.ts +67 -0
- package/dist/holders.d.ts.map +1 -0
- package/dist/holders.js +122 -0
- package/dist/holders.js.map +1 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/instance.d.ts +4 -1
- package/dist/instance.d.ts.map +1 -1
- package/dist/instance.js +3 -0
- package/dist/instance.js.map +1 -1
- package/dist/modules.d.ts.map +1 -1
- package/dist/modules.js +13 -0
- package/dist/modules.js.map +1 -1
- package/dist/outbox.d.ts +12 -0
- package/dist/outbox.d.ts.map +1 -1
- package/dist/outbox.js +63 -0
- package/dist/outbox.js.map +1 -1
- package/dist/people.d.ts +4 -0
- package/dist/people.d.ts.map +1 -1
- package/dist/people.js +10 -0
- package/dist/people.js.map +1 -1
- package/dist/public-access.d.ts +9 -0
- package/dist/public-access.d.ts.map +1 -1
- package/dist/public-access.js +47 -1
- package/dist/public-access.js.map +1 -1
- package/dist/review.d.ts +1 -1
- package/dist/review.d.ts.map +1 -1
- package/dist/review.js +4 -2
- package/dist/review.js.map +1 -1
- package/dist/roles.d.ts.map +1 -1
- package/dist/roles.js +3 -1
- package/dist/roles.js.map +1 -1
- package/dist/saved-parts.d.ts +24 -0
- package/dist/saved-parts.d.ts.map +1 -1
- package/dist/saved-parts.js +14 -3
- package/dist/saved-parts.js.map +1 -1
- package/dist/schema.d.ts +960 -14
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +54 -2
- 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/states.d.ts +2 -2
- package/dist/words.d.ts +1 -1
- package/dist/words.d.ts.map +1 -1
- package/dist/words.js +112 -0
- package/dist/words.js.map +1 -1
- package/package.json +2 -2
package/dist/public-access.js
CHANGED
|
@@ -515,7 +515,7 @@ const withholdSchema = z
|
|
|
515
515
|
* stamps. `links`: it also stops the person's rows' own links (each gets a
|
|
516
516
|
* new code, which closes every session its old one opened) — an app's choice.
|
|
517
517
|
*/
|
|
518
|
-
const forgetSchema = z.object({ columns: z.array(refSchema).min(1).max(16), stamp: refSchema.optional(), links: z.literal(true).optional() }).strict();
|
|
518
|
+
const forgetSchema = z.object({ columns: z.array(refSchema).min(1).max(16), stamp: refSchema.optional(), links: z.literal(true).optional(), copies: z.literal(true).optional() }).strict();
|
|
519
519
|
/**
|
|
520
520
|
* "Make a new link" for a signed-in person's row: its own link (`column`)
|
|
521
521
|
* gets a new code, which closes every session the old one opened, and the new
|
|
@@ -618,6 +618,20 @@ export const publicAccessSchema = z
|
|
|
618
618
|
* browser cannot choose it), and a change never moves it.
|
|
619
619
|
*/
|
|
620
620
|
appColumn: refSchema.optional(),
|
|
621
|
+
/**
|
|
622
|
+
* On an add-on's read: only the rows this address column holds the address
|
|
623
|
+
* of the person signed in on the app's key, the one they proved by reading
|
|
624
|
+
* mail. A row an add-on keeps for a person (a pack, a gift card) names them
|
|
625
|
+
* by address, never by a key of the app's table, so `claimedBy` cannot.
|
|
626
|
+
*/
|
|
627
|
+
heldBy: z
|
|
628
|
+
.object({
|
|
629
|
+
address: refSchema,
|
|
630
|
+
/** A date column: until that day the row is not shown yet (a gift card dated for a birthday). */
|
|
631
|
+
from: refSchema.optional(),
|
|
632
|
+
})
|
|
633
|
+
.strict()
|
|
634
|
+
.optional(),
|
|
621
635
|
/** On a signed-in person's rows: "Make a new link" for a row's own link. */
|
|
622
636
|
newLink: newLinkSchema.optional(),
|
|
623
637
|
/**
|
|
@@ -1081,6 +1095,37 @@ function appColumnIssues(entries, index) {
|
|
|
1081
1095
|
});
|
|
1082
1096
|
return out;
|
|
1083
1097
|
}
|
|
1098
|
+
/**
|
|
1099
|
+
* A read of the rows a signed-in person holds (`heldBy`): a plain read at
|
|
1100
|
+
* `verified`, listing what it shows, on the app's key, by a column that keeps
|
|
1101
|
+
* an address in one spelling. Anything else could show one person another's.
|
|
1102
|
+
*/
|
|
1103
|
+
function heldByIssues(entries, index) {
|
|
1104
|
+
const out = [];
|
|
1105
|
+
entries.forEach((entry, i) => {
|
|
1106
|
+
if (entry.heldBy === undefined)
|
|
1107
|
+
return;
|
|
1108
|
+
const at = ['publicAccess', i, 'heldBy'];
|
|
1109
|
+
const found = index.column(entry.table, entry.heldBy.address);
|
|
1110
|
+
if (found === undefined)
|
|
1111
|
+
out.push({ path: at, message: `"${entry.table}" has no column "${entry.heldBy.address}"` });
|
|
1112
|
+
else if (found.type !== 'text' || found.rules?.normalize !== 'email')
|
|
1113
|
+
out.push({ path: at, message: `"${entry.table}.${entry.heldBy.address}" does not keep an address in one spelling (a text column with normalize "email")` });
|
|
1114
|
+
if (entry.heldBy.from !== undefined && index.column(entry.table, entry.heldBy.from)?.type !== 'date')
|
|
1115
|
+
out.push({ path: at, message: `"${entry.table}.${entry.heldBy.from}" is not a date column` });
|
|
1116
|
+
if (entry.methods.length !== 1 || entry.methods[0] !== 'GET')
|
|
1117
|
+
out.push({ path: at, message: 'the rows a person holds are read, never written, through this entry' });
|
|
1118
|
+
if (entry.level !== 'verified')
|
|
1119
|
+
out.push({ path: at, message: 'the rows a person holds are read at level "verified"' });
|
|
1120
|
+
if (entry.select === undefined)
|
|
1121
|
+
out.push({ path: at, message: 'a read of the rows a person holds lists what it shows' });
|
|
1122
|
+
if (entry.claim !== undefined || entry.claimedBy !== undefined || entry.visibleWith !== undefined || entry.unlockBy !== undefined)
|
|
1123
|
+
out.push({ path: at, message: 'an entry is read by the address a session proved, or by a claim, never both' });
|
|
1124
|
+
if ((entry.key ?? CUSTOMER_KEY) !== CUSTOMER_KEY)
|
|
1125
|
+
out.push({ path: at, message: `an entry on "${String(entry.key)}" has no signed-in customer` });
|
|
1126
|
+
});
|
|
1127
|
+
return out;
|
|
1128
|
+
}
|
|
1084
1129
|
/** Whether an entry declares any of a shopper's lists: filters, search, order, a filter through another list, a count. */
|
|
1085
1130
|
export function shopperLists(entry) {
|
|
1086
1131
|
return entry.filterable !== undefined || entry.searchable !== undefined || entry.orderable !== undefined || entry.via !== undefined || entry.count !== undefined;
|
|
@@ -1262,6 +1307,7 @@ export function publicAccessIssues(entries, ctx) {
|
|
|
1262
1307
|
const { index } = ctx;
|
|
1263
1308
|
const has = index.has;
|
|
1264
1309
|
out.push(...appColumnIssues(entries, index));
|
|
1310
|
+
out.push(...heldByIssues(entries, index));
|
|
1265
1311
|
out.push(...shopperListIssues(entries, ctx));
|
|
1266
1312
|
const doorKeys = ctx.chatReserved === false ? [FORMS_KEY] : DOOR_KEYS;
|
|
1267
1313
|
if (doorKeys.includes(CHAT_KEY) && ctx.publicKeys?.[CHAT_KEY] !== undefined) {
|