@ai-matrx/records 0.36.0 → 0.37.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # Changelog — @ai-matrx/records
2
2
 
3
+ ## 0.37.0
4
+
5
+ **Three doors the store already had and this client could not reach.**
6
+
7
+ Until this release the only way to a booking page or a saved view was to ask an
8
+ agent, because no method on `RecordsClient` called the doors that make them —
9
+ so the agent was not the FASTER path to those things, it was the ONLY one.
10
+
11
+ * `bookingDeclare` — `custom.booking_declare`, the owner's side of a booking
12
+ page. `admin` on the Table, because a booking page decides what a stranger may
13
+ write into it and which hours of the organization's week are on offer. It does
14
+ NOT publish: `anonPublish` is still the one act that opens a public surface,
15
+ for a booking page exactly as for a form. `BookingAvailability`,
16
+ `BookingWindow` and `BookingDeclared` are the answer's shape — a screen shows
17
+ the availability that came BACK, never the draft it sent, because the store
18
+ owns every default.
19
+ * `views` — `custom.views`, the saved views of a Table. Narrowed in SQL as the
20
+ definer to Tables the caller can already open, so a list can never reveal a
21
+ Table.
22
+ * `viewDeclare` — `custom.view_declare`. VIEWER on the Table, not editor:
23
+ writing down a question about a Table is not changing it. A subscription is
24
+ written OVER a saved view, so without this door a person who had never saved
25
+ one had nothing to subscribe to and "email me this every Monday" had nowhere
26
+ to land.
27
+
3
28
  ## 0.36.0
4
29
 
5
30
  Republish of 0.35.0's contents. 0.35.0 never reached npm: its gate was red on
@@ -2428,6 +2428,10 @@ var DOORS = {
2428
2428
  // VISITOR's three (`booking_public`, `booking_hold`, `booking_confirm`) are
2429
2429
  // deliberately absent: they are server-lane and a browser never calls them.
2430
2430
  bookings: "bookings",
2431
+ // The OWNER's side of a booking page, and the door that had no client method at
2432
+ // all until 2026-09-21: without it the only way to get a booking page was to ask
2433
+ // an agent, which made the agent the ONLY path rather than the faster one.
2434
+ bookingDeclare: "booking_declare",
2431
2435
  // PRODUCTS row 9 — "pull my spreadsheet in". W4-IO built `io_import_open` and
2432
2436
  // `io_import_rows`; lane IMPORT gave a run an IDENTITY (the file's sha-256, so
2433
2437
  // a re-import doubles nothing), a duplicate key, a policy, per-row outcomes
@@ -2560,6 +2564,13 @@ var DOORS = {
2560
2564
  // the summary it would send right now without sending it.
2561
2565
  subscriptionDeclare: "subscription_declare",
2562
2566
  subscriptionPreview: "subscription_preview",
2567
+ // A SUBSCRIPTION IS OVER A SAVED VIEW, so a person who has never saved one has
2568
+ // nothing to subscribe to. These two are the saved-view pair (lane DIGESTS'
2569
+ // `digests_a_saved_view_has_a_door.sql`), unreachable from this client until
2570
+ // 2026-09-21: `views` lists this Table's, `viewDeclare` writes one. A LIST IS A
2571
+ // DOOR, never a grant on `platform.saved_view` behind it.
2572
+ views: "views",
2573
+ viewDeclare: "view_declare",
2563
2574
  // The cadence CATALOGUE a person's screen may ask for. `agg_subscription_cadences`
2564
2575
  // above is the notifier's own and holds no client grant; this door delegates to
2565
2576
  // it, so a picker and the digest runner can never offer different words.
@@ -3334,6 +3345,30 @@ function createRecordsClient(config) {
3334
3345
  "bookings"
3335
3346
  );
3336
3347
  },
3348
+ async bookingDeclare(args) {
3349
+ return callDoor(
3350
+ DOORS.bookingDeclare,
3351
+ {
3352
+ p_organization_id: org,
3353
+ p_table_id: args.table_id,
3354
+ p_title: args.title,
3355
+ p_questions: args.questions,
3356
+ // AN EMPTY OBJECT IS NOT A MISTAKE. The store owns every default, so a
3357
+ // page declared with no availability comes back Monday-to-Friday,
3358
+ // nine-to-five, in the organization's own zone — and the screen draws
3359
+ // what came BACK rather than what it sent.
3360
+ p_availability: args.availability ?? {},
3361
+ p_presentation: args.presentation ?? {},
3362
+ p_submission_cap: args.submission_cap ?? null,
3363
+ p_quarantine_rule_id: args.quarantine_rule_id ?? null,
3364
+ p_notify_rule_id: args.notify_rule_id ?? null,
3365
+ p_form_id: args.form_id ?? null,
3366
+ p_slug: args.slug ?? null,
3367
+ p_home_id: args.home_id ?? null
3368
+ },
3369
+ "bookingDeclare"
3370
+ );
3371
+ },
3337
3372
  async formDeclare(args) {
3338
3373
  return callDoor(
3339
3374
  DOORS.formDeclare,
@@ -3758,6 +3793,20 @@ function createRecordsClient(config) {
3758
3793
  "subscriptionPreview"
3759
3794
  );
3760
3795
  },
3796
+ async views(args) {
3797
+ return callDoor(
3798
+ DOORS.views,
3799
+ { p_organization_id: org, p_table_id: args?.table_id ?? null },
3800
+ "views"
3801
+ );
3802
+ },
3803
+ async viewDeclare({ table_id, spec }) {
3804
+ return callDoor(
3805
+ DOORS.viewDeclare,
3806
+ { p_organization_id: org, p_table_id: table_id, p_spec: spec },
3807
+ "viewDeclare"
3808
+ );
3809
+ },
3761
3810
  async subscriptionMute({ rule_id, muted }) {
3762
3811
  return callDoor(
3763
3812
  DOORS.subscriptionMute,