@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.
Files changed (79) hide show
  1. package/dist/adjust.d.ts +1 -0
  2. package/dist/adjust.d.ts.map +1 -1
  3. package/dist/adjust.js +9 -1
  4. package/dist/adjust.js.map +1 -1
  5. package/dist/booking-calendar.d.ts +65 -0
  6. package/dist/booking-calendar.d.ts.map +1 -0
  7. package/dist/booking-calendar.js +122 -0
  8. package/dist/booking-calendar.js.map +1 -0
  9. package/dist/booking.d.ts +128 -1
  10. package/dist/booking.d.ts.map +1 -1
  11. package/dist/booking.js +188 -1
  12. package/dist/booking.js.map +1 -1
  13. package/dist/compose.d.ts.map +1 -1
  14. package/dist/compose.js +1 -0
  15. package/dist/compose.js.map +1 -1
  16. package/dist/connected-accounts.d.ts +26 -0
  17. package/dist/connected-accounts.d.ts.map +1 -0
  18. package/dist/connected-accounts.js +57 -0
  19. package/dist/connected-accounts.js.map +1 -0
  20. package/dist/embed.d.ts +101 -0
  21. package/dist/embed.d.ts.map +1 -0
  22. package/dist/embed.js +138 -0
  23. package/dist/embed.js.map +1 -0
  24. package/dist/forms.d.ts +2 -0
  25. package/dist/forms.d.ts.map +1 -1
  26. package/dist/forms.js +2 -1
  27. package/dist/forms.js.map +1 -1
  28. package/dist/holders.d.ts +67 -0
  29. package/dist/holders.d.ts.map +1 -0
  30. package/dist/holders.js +122 -0
  31. package/dist/holders.js.map +1 -0
  32. package/dist/index.d.ts +6 -1
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +6 -1
  35. package/dist/index.js.map +1 -1
  36. package/dist/instance.d.ts +4 -1
  37. package/dist/instance.d.ts.map +1 -1
  38. package/dist/instance.js +3 -0
  39. package/dist/instance.js.map +1 -1
  40. package/dist/modules.d.ts.map +1 -1
  41. package/dist/modules.js +13 -0
  42. package/dist/modules.js.map +1 -1
  43. package/dist/outbox.d.ts +12 -0
  44. package/dist/outbox.d.ts.map +1 -1
  45. package/dist/outbox.js +63 -0
  46. package/dist/outbox.js.map +1 -1
  47. package/dist/people.d.ts +4 -0
  48. package/dist/people.d.ts.map +1 -1
  49. package/dist/people.js +10 -0
  50. package/dist/people.js.map +1 -1
  51. package/dist/public-access.d.ts +9 -0
  52. package/dist/public-access.d.ts.map +1 -1
  53. package/dist/public-access.js +47 -1
  54. package/dist/public-access.js.map +1 -1
  55. package/dist/review.d.ts +1 -1
  56. package/dist/review.d.ts.map +1 -1
  57. package/dist/review.js +4 -2
  58. package/dist/review.js.map +1 -1
  59. package/dist/roles.d.ts.map +1 -1
  60. package/dist/roles.js +3 -1
  61. package/dist/roles.js.map +1 -1
  62. package/dist/saved-parts.d.ts +24 -0
  63. package/dist/saved-parts.d.ts.map +1 -1
  64. package/dist/saved-parts.js +14 -3
  65. package/dist/saved-parts.js.map +1 -1
  66. package/dist/schema.d.ts +960 -14
  67. package/dist/schema.d.ts.map +1 -1
  68. package/dist/schema.js +54 -2
  69. package/dist/schema.js.map +1 -1
  70. package/dist/shipping.d.ts +88 -0
  71. package/dist/shipping.d.ts.map +1 -0
  72. package/dist/shipping.js +128 -0
  73. package/dist/shipping.js.map +1 -0
  74. package/dist/states.d.ts +2 -2
  75. package/dist/words.d.ts +1 -1
  76. package/dist/words.d.ts.map +1 -1
  77. package/dist/words.js +112 -0
  78. package/dist/words.js.map +1 -1
  79. package/package.json +2 -2
@@ -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) {