@ai-matrx/records 0.26.0 → 0.28.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 +51 -0
- package/dist/core/index.cjs +79 -0
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +50 -3
- package/dist/core/index.d.ts +50 -3
- package/dist/core/index.js +79 -0
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +12 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +189 -4
- package/dist/index.d.ts +189 -4
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +79 -0
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +229 -4
- package/dist/react/index.d.ts +229 -4
- package/dist/react/index.js +79 -0
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
package/dist/react/index.js
CHANGED
|
@@ -1849,6 +1849,12 @@ var DOORS = {
|
|
|
1849
1849
|
tableKernelId: "table_kernel_id",
|
|
1850
1850
|
// A saved view references its membership Rule, and the STORE decides who is
|
|
1851
1851
|
// in it — the screen never re-implements the predicate.
|
|
1852
|
+
pipelineDeclare: "pipeline_declare",
|
|
1853
|
+
pipelineRead: "pipeline_read",
|
|
1854
|
+
pipelineBoard: "pipeline_board",
|
|
1855
|
+
pipelineTransitionRefusal: "pipeline_transition_refusal",
|
|
1856
|
+
pipelineMove: "pipeline_move",
|
|
1857
|
+
tableStageField: "table_stage_field",
|
|
1852
1858
|
ruleMembers: "rule_members",
|
|
1853
1859
|
ruleMembership: "rule_membership",
|
|
1854
1860
|
ruleRun: "rule_run",
|
|
@@ -1864,6 +1870,12 @@ var DOORS = {
|
|
|
1864
1870
|
// are server-lane doors and a browser never calls them.
|
|
1865
1871
|
forms: "forms",
|
|
1866
1872
|
formDeclare: "form_declare",
|
|
1873
|
+
// PRODUCTS row 14 — "let clients book a 30-minute consult". A booking page IS an
|
|
1874
|
+
// `anon_form`, so it is opened and closed by `anonPublish` like any other; this is
|
|
1875
|
+
// the owner's list of them with the numbers that make it worth opening. The
|
|
1876
|
+
// VISITOR's three (`booking_public`, `booking_hold`, `booking_confirm`) are
|
|
1877
|
+
// deliberately absent: they are server-lane and a browser never calls them.
|
|
1878
|
+
bookings: "bookings",
|
|
1867
1879
|
// PRODUCTS row 9 — "pull my spreadsheet in". W4-IO built `io_import_open` and
|
|
1868
1880
|
// `io_import_rows`; lane IMPORT gave a run an IDENTITY (the file's sha-256, so
|
|
1869
1881
|
// a re-import doubles nothing), a duplicate key, a policy, per-row outcomes
|
|
@@ -2640,6 +2652,54 @@ function createRecordsClient(config) {
|
|
|
2640
2652
|
async ruleKernelId() {
|
|
2641
2653
|
return callDoor(DOORS.ruleKernelId, {}, "ruleKernelId");
|
|
2642
2654
|
},
|
|
2655
|
+
async pipelineRead({ table_id }) {
|
|
2656
|
+
return callDoor(
|
|
2657
|
+
DOORS.pipelineRead,
|
|
2658
|
+
{ p_organization_id: org, p_table_id: table_id },
|
|
2659
|
+
"pipelineRead"
|
|
2660
|
+
);
|
|
2661
|
+
},
|
|
2662
|
+
async pipelineBoard({ table_id, measure }) {
|
|
2663
|
+
return callDoor(
|
|
2664
|
+
DOORS.pipelineBoard,
|
|
2665
|
+
{ p_organization_id: org, p_table_id: table_id, p_measure: measure ?? null },
|
|
2666
|
+
"pipelineBoard"
|
|
2667
|
+
);
|
|
2668
|
+
},
|
|
2669
|
+
async pipelineTransitionRefusal({ record_id, to }) {
|
|
2670
|
+
return callDoor(
|
|
2671
|
+
DOORS.pipelineTransitionRefusal,
|
|
2672
|
+
{ p_organization_id: org, p_record_id: record_id, p_to: to },
|
|
2673
|
+
"pipelineTransitionRefusal"
|
|
2674
|
+
);
|
|
2675
|
+
},
|
|
2676
|
+
async pipelineMove({ record_id, to, also, expected_version }) {
|
|
2677
|
+
return callDoor(
|
|
2678
|
+
DOORS.pipelineMove,
|
|
2679
|
+
{
|
|
2680
|
+
p_organization_id: org,
|
|
2681
|
+
p_record_id: record_id,
|
|
2682
|
+
p_to: to,
|
|
2683
|
+
p_also: also ?? {},
|
|
2684
|
+
p_expected_version: expected_version ?? null
|
|
2685
|
+
},
|
|
2686
|
+
"pipelineMove"
|
|
2687
|
+
);
|
|
2688
|
+
},
|
|
2689
|
+
async pipelineDeclare({ table_id, spec }) {
|
|
2690
|
+
return callDoor(
|
|
2691
|
+
DOORS.pipelineDeclare,
|
|
2692
|
+
{ p_organization_id: org, p_table_id: table_id, p_spec: spec },
|
|
2693
|
+
"pipelineDeclare"
|
|
2694
|
+
);
|
|
2695
|
+
},
|
|
2696
|
+
async tableStageField({ table_id }) {
|
|
2697
|
+
return callDoor(
|
|
2698
|
+
DOORS.tableStageField,
|
|
2699
|
+
{ p_organization_id: org, p_table_id: table_id },
|
|
2700
|
+
"tableStageField"
|
|
2701
|
+
);
|
|
2702
|
+
},
|
|
2643
2703
|
async ruleMembers({ rule_id }) {
|
|
2644
2704
|
return callDoor(
|
|
2645
2705
|
DOORS.ruleMembers,
|
|
@@ -2661,6 +2721,13 @@ function createRecordsClient(config) {
|
|
|
2661
2721
|
"forms"
|
|
2662
2722
|
);
|
|
2663
2723
|
},
|
|
2724
|
+
async bookings(args) {
|
|
2725
|
+
return callDoor(
|
|
2726
|
+
DOORS.bookings,
|
|
2727
|
+
{ p_organization_id: org, p_table_id: args?.table_id ?? null },
|
|
2728
|
+
"bookings"
|
|
2729
|
+
);
|
|
2730
|
+
},
|
|
2664
2731
|
async formDeclare(args) {
|
|
2665
2732
|
return callDoor(
|
|
2666
2733
|
DOORS.formDeclare,
|
|
@@ -4312,7 +4379,16 @@ function looksLikeAnId(value) {
|
|
|
4312
4379
|
return typeof value === "string" && UUID.test(value);
|
|
4313
4380
|
}
|
|
4314
4381
|
|
|
4382
|
+
// src/pipeline.ts
|
|
4383
|
+
var PIPELINE_RULE_KINDS = ["moves", "requires", "who", "limit", "entry"];
|
|
4384
|
+
function mayDrag(level) {
|
|
4385
|
+
return level === "editor" || level === "admin" || level === "owner";
|
|
4386
|
+
}
|
|
4387
|
+
|
|
4315
4388
|
// src/rule.ts
|
|
4389
|
+
function bookingPath(formId) {
|
|
4390
|
+
return `/b/${formId}`;
|
|
4391
|
+
}
|
|
4316
4392
|
function publicFormPath(formId) {
|
|
4317
4393
|
return `/f/${formId}`;
|
|
4318
4394
|
}
|
|
@@ -4629,6 +4705,7 @@ export {
|
|
|
4629
4705
|
PARITY_FIELD_TYPES,
|
|
4630
4706
|
PERMISSION_LEVELS,
|
|
4631
4707
|
PER_VALUE_ACCESS_WORDS,
|
|
4708
|
+
PIPELINE_RULE_KINDS,
|
|
4632
4709
|
REFUSALS_WORTH_REPEATING,
|
|
4633
4710
|
RELATION_BINDINGS,
|
|
4634
4711
|
RELATION_CARDINALITIES,
|
|
@@ -4648,6 +4725,7 @@ export {
|
|
|
4648
4725
|
VALUE_ENVELOPE_KEYS,
|
|
4649
4726
|
asPermissionLevel,
|
|
4650
4727
|
atLeast,
|
|
4728
|
+
bookingPath,
|
|
4651
4729
|
choiceSlug,
|
|
4652
4730
|
choiceValuesOf,
|
|
4653
4731
|
choicesOf,
|
|
@@ -4659,6 +4737,7 @@ export {
|
|
|
4659
4737
|
isRecordsErr,
|
|
4660
4738
|
isTheChosen,
|
|
4661
4739
|
looksLikeAnId,
|
|
4740
|
+
mayDrag,
|
|
4662
4741
|
measureKey,
|
|
4663
4742
|
memoryStore,
|
|
4664
4743
|
mintClientKey,
|