@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.cjs
CHANGED
|
@@ -40,6 +40,7 @@ __export(react_exports, {
|
|
|
40
40
|
PARITY_FIELD_TYPES: () => PARITY_FIELD_TYPES,
|
|
41
41
|
PERMISSION_LEVELS: () => PERMISSION_LEVELS,
|
|
42
42
|
PER_VALUE_ACCESS_WORDS: () => PER_VALUE_ACCESS_WORDS,
|
|
43
|
+
PIPELINE_RULE_KINDS: () => PIPELINE_RULE_KINDS,
|
|
43
44
|
REFUSALS_WORTH_REPEATING: () => REFUSALS_WORTH_REPEATING,
|
|
44
45
|
RELATION_BINDINGS: () => RELATION_BINDINGS,
|
|
45
46
|
RELATION_CARDINALITIES: () => RELATION_CARDINALITIES,
|
|
@@ -59,6 +60,7 @@ __export(react_exports, {
|
|
|
59
60
|
VALUE_ENVELOPE_KEYS: () => VALUE_ENVELOPE_KEYS,
|
|
60
61
|
asPermissionLevel: () => asPermissionLevel,
|
|
61
62
|
atLeast: () => atLeast,
|
|
63
|
+
bookingPath: () => bookingPath,
|
|
62
64
|
choiceSlug: () => choiceSlug,
|
|
63
65
|
choiceValuesOf: () => choiceValuesOf,
|
|
64
66
|
choicesOf: () => choicesOf,
|
|
@@ -70,6 +72,7 @@ __export(react_exports, {
|
|
|
70
72
|
isRecordsErr: () => isRecordsErr,
|
|
71
73
|
isTheChosen: () => isTheChosen,
|
|
72
74
|
looksLikeAnId: () => looksLikeAnId,
|
|
75
|
+
mayDrag: () => mayDrag,
|
|
73
76
|
measureKey: () => measureKey,
|
|
74
77
|
memoryStore: () => memoryStore,
|
|
75
78
|
mintClientKey: () => mintClientKey,
|
|
@@ -1944,6 +1947,12 @@ var DOORS = {
|
|
|
1944
1947
|
tableKernelId: "table_kernel_id",
|
|
1945
1948
|
// A saved view references its membership Rule, and the STORE decides who is
|
|
1946
1949
|
// in it — the screen never re-implements the predicate.
|
|
1950
|
+
pipelineDeclare: "pipeline_declare",
|
|
1951
|
+
pipelineRead: "pipeline_read",
|
|
1952
|
+
pipelineBoard: "pipeline_board",
|
|
1953
|
+
pipelineTransitionRefusal: "pipeline_transition_refusal",
|
|
1954
|
+
pipelineMove: "pipeline_move",
|
|
1955
|
+
tableStageField: "table_stage_field",
|
|
1947
1956
|
ruleMembers: "rule_members",
|
|
1948
1957
|
ruleMembership: "rule_membership",
|
|
1949
1958
|
ruleRun: "rule_run",
|
|
@@ -1959,6 +1968,12 @@ var DOORS = {
|
|
|
1959
1968
|
// are server-lane doors and a browser never calls them.
|
|
1960
1969
|
forms: "forms",
|
|
1961
1970
|
formDeclare: "form_declare",
|
|
1971
|
+
// PRODUCTS row 14 — "let clients book a 30-minute consult". A booking page IS an
|
|
1972
|
+
// `anon_form`, so it is opened and closed by `anonPublish` like any other; this is
|
|
1973
|
+
// the owner's list of them with the numbers that make it worth opening. The
|
|
1974
|
+
// VISITOR's three (`booking_public`, `booking_hold`, `booking_confirm`) are
|
|
1975
|
+
// deliberately absent: they are server-lane and a browser never calls them.
|
|
1976
|
+
bookings: "bookings",
|
|
1962
1977
|
// PRODUCTS row 9 — "pull my spreadsheet in". W4-IO built `io_import_open` and
|
|
1963
1978
|
// `io_import_rows`; lane IMPORT gave a run an IDENTITY (the file's sha-256, so
|
|
1964
1979
|
// a re-import doubles nothing), a duplicate key, a policy, per-row outcomes
|
|
@@ -2735,6 +2750,54 @@ function createRecordsClient(config) {
|
|
|
2735
2750
|
async ruleKernelId() {
|
|
2736
2751
|
return callDoor(DOORS.ruleKernelId, {}, "ruleKernelId");
|
|
2737
2752
|
},
|
|
2753
|
+
async pipelineRead({ table_id }) {
|
|
2754
|
+
return callDoor(
|
|
2755
|
+
DOORS.pipelineRead,
|
|
2756
|
+
{ p_organization_id: org, p_table_id: table_id },
|
|
2757
|
+
"pipelineRead"
|
|
2758
|
+
);
|
|
2759
|
+
},
|
|
2760
|
+
async pipelineBoard({ table_id, measure }) {
|
|
2761
|
+
return callDoor(
|
|
2762
|
+
DOORS.pipelineBoard,
|
|
2763
|
+
{ p_organization_id: org, p_table_id: table_id, p_measure: measure ?? null },
|
|
2764
|
+
"pipelineBoard"
|
|
2765
|
+
);
|
|
2766
|
+
},
|
|
2767
|
+
async pipelineTransitionRefusal({ record_id, to }) {
|
|
2768
|
+
return callDoor(
|
|
2769
|
+
DOORS.pipelineTransitionRefusal,
|
|
2770
|
+
{ p_organization_id: org, p_record_id: record_id, p_to: to },
|
|
2771
|
+
"pipelineTransitionRefusal"
|
|
2772
|
+
);
|
|
2773
|
+
},
|
|
2774
|
+
async pipelineMove({ record_id, to, also, expected_version }) {
|
|
2775
|
+
return callDoor(
|
|
2776
|
+
DOORS.pipelineMove,
|
|
2777
|
+
{
|
|
2778
|
+
p_organization_id: org,
|
|
2779
|
+
p_record_id: record_id,
|
|
2780
|
+
p_to: to,
|
|
2781
|
+
p_also: also ?? {},
|
|
2782
|
+
p_expected_version: expected_version ?? null
|
|
2783
|
+
},
|
|
2784
|
+
"pipelineMove"
|
|
2785
|
+
);
|
|
2786
|
+
},
|
|
2787
|
+
async pipelineDeclare({ table_id, spec }) {
|
|
2788
|
+
return callDoor(
|
|
2789
|
+
DOORS.pipelineDeclare,
|
|
2790
|
+
{ p_organization_id: org, p_table_id: table_id, p_spec: spec },
|
|
2791
|
+
"pipelineDeclare"
|
|
2792
|
+
);
|
|
2793
|
+
},
|
|
2794
|
+
async tableStageField({ table_id }) {
|
|
2795
|
+
return callDoor(
|
|
2796
|
+
DOORS.tableStageField,
|
|
2797
|
+
{ p_organization_id: org, p_table_id: table_id },
|
|
2798
|
+
"tableStageField"
|
|
2799
|
+
);
|
|
2800
|
+
},
|
|
2738
2801
|
async ruleMembers({ rule_id }) {
|
|
2739
2802
|
return callDoor(
|
|
2740
2803
|
DOORS.ruleMembers,
|
|
@@ -2756,6 +2819,13 @@ function createRecordsClient(config) {
|
|
|
2756
2819
|
"forms"
|
|
2757
2820
|
);
|
|
2758
2821
|
},
|
|
2822
|
+
async bookings(args) {
|
|
2823
|
+
return callDoor(
|
|
2824
|
+
DOORS.bookings,
|
|
2825
|
+
{ p_organization_id: org, p_table_id: args?.table_id ?? null },
|
|
2826
|
+
"bookings"
|
|
2827
|
+
);
|
|
2828
|
+
},
|
|
2759
2829
|
async formDeclare(args) {
|
|
2760
2830
|
return callDoor(
|
|
2761
2831
|
DOORS.formDeclare,
|
|
@@ -4407,7 +4477,16 @@ function looksLikeAnId(value) {
|
|
|
4407
4477
|
return typeof value === "string" && UUID.test(value);
|
|
4408
4478
|
}
|
|
4409
4479
|
|
|
4480
|
+
// src/pipeline.ts
|
|
4481
|
+
var PIPELINE_RULE_KINDS = ["moves", "requires", "who", "limit", "entry"];
|
|
4482
|
+
function mayDrag(level) {
|
|
4483
|
+
return level === "editor" || level === "admin" || level === "owner";
|
|
4484
|
+
}
|
|
4485
|
+
|
|
4410
4486
|
// src/rule.ts
|
|
4487
|
+
function bookingPath(formId) {
|
|
4488
|
+
return `/b/${formId}`;
|
|
4489
|
+
}
|
|
4411
4490
|
function publicFormPath(formId) {
|
|
4412
4491
|
return `/f/${formId}`;
|
|
4413
4492
|
}
|