@ai-matrx/records 0.87.23 → 0.87.24
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 +14 -2
- package/dist/{client-xyH0cLVd.d.cts → client-C3ZZNfGH.d.cts} +1 -1
- package/dist/{client-Bvk0ymIs.d.ts → client-E0VQ0NPO.d.ts} +1 -1
- package/dist/core/index.d.cts +4 -4
- package/dist/core/index.d.ts +4 -4
- package/dist/data/index.d.cts +2 -2
- package/dist/data/index.d.ts +2 -2
- package/dist/{declareTable-CVzk6RVH.d.ts → declareTable-B12XybRp.d.ts} +2 -2
- package/dist/{declareTable-DNhNDvh9.d.cts → declareTable-BK3zufr7.d.cts} +2 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/react/index.cjs +8 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +6 -0
- package/dist/react/index.d.ts +6 -0
- package/dist/react/index.js +8 -1
- package/dist/react/index.js.map +1 -1
- package/dist/{table-kind-1aiKFy1k.d.cts → table-kind-BZu8mtND.d.cts} +2 -0
- package/dist/{table-kind-ClSGi6ze.d.ts → table-kind-xKxTHtrV.d.ts} +2 -0
- package/dist/typed-table/index.cjs +8 -1
- package/dist/typed-table/index.cjs.map +1 -1
- package/dist/typed-table/index.d.cts +7 -3
- package/dist/typed-table/index.d.ts +7 -3
- package/dist/typed-table/index.js +8 -1
- package/dist/typed-table/index.js.map +1 -1
- package/package.json +4 -4
package/dist/react/index.d.cts
CHANGED
|
@@ -10124,6 +10124,8 @@ type AutomationAction = {
|
|
|
10124
10124
|
author: true;
|
|
10125
10125
|
};
|
|
10126
10126
|
text: string;
|
|
10127
|
+
subject?: string;
|
|
10128
|
+
link?: string;
|
|
10127
10129
|
} | {
|
|
10128
10130
|
do: "webhook";
|
|
10129
10131
|
url: string;
|
|
@@ -16508,6 +16510,10 @@ interface AppAutomationSpec {
|
|
|
16508
16510
|
author: true;
|
|
16509
16511
|
};
|
|
16510
16512
|
text: string;
|
|
16513
|
+
/** The notice's subject line (in-app and email); defaults to the automation's name. Same `{{key}}` words as `text`. */
|
|
16514
|
+
subject?: string;
|
|
16515
|
+
/** Where the notice opens: a path (`/hr/performance/{{record_id}}?org={{organization_id}}`) or a URL field's `{{key}}`. */
|
|
16516
|
+
link?: string;
|
|
16511
16517
|
}>;
|
|
16512
16518
|
}
|
|
16513
16519
|
/**
|
package/dist/react/index.d.ts
CHANGED
|
@@ -10124,6 +10124,8 @@ type AutomationAction = {
|
|
|
10124
10124
|
author: true;
|
|
10125
10125
|
};
|
|
10126
10126
|
text: string;
|
|
10127
|
+
subject?: string;
|
|
10128
|
+
link?: string;
|
|
10127
10129
|
} | {
|
|
10128
10130
|
do: "webhook";
|
|
10129
10131
|
url: string;
|
|
@@ -16508,6 +16510,10 @@ interface AppAutomationSpec {
|
|
|
16508
16510
|
author: true;
|
|
16509
16511
|
};
|
|
16510
16512
|
text: string;
|
|
16513
|
+
/** The notice's subject line (in-app and email); defaults to the automation's name. Same `{{key}}` words as `text`. */
|
|
16514
|
+
subject?: string;
|
|
16515
|
+
/** Where the notice opens: a path (`/hr/performance/{{record_id}}?org={{organization_id}}`) or a URL field's `{{key}}`. */
|
|
16516
|
+
link?: string;
|
|
16511
16517
|
}>;
|
|
16512
16518
|
}
|
|
16513
16519
|
/**
|
package/dist/react/index.js
CHANGED
|
@@ -9343,7 +9343,14 @@ async function ensureAppAutomations(client, def, specs, options = {}) {
|
|
|
9343
9343
|
if (a.do === "set") actions.push({ do: "set", values: keyed(a.values, own.data, own.data, def.name) });
|
|
9344
9344
|
else if (a.do === "notify") {
|
|
9345
9345
|
const to = "field" in a.to ? { field: byId(own.data, a.to.field, def.name) } : a.to;
|
|
9346
|
-
|
|
9346
|
+
const words = (t) => t.replace(/\{\{(\w+)\}\}/g, (m, k) => k === "record_id" || k === "organization_id" ? m : `{{${byId(own.data, k, def.name)}}}`);
|
|
9347
|
+
actions.push({
|
|
9348
|
+
do: "notify",
|
|
9349
|
+
to,
|
|
9350
|
+
text: words(a.text),
|
|
9351
|
+
...a.subject ? { subject: words(a.subject) } : {},
|
|
9352
|
+
...a.link ? { link: words(a.link) } : {}
|
|
9353
|
+
});
|
|
9347
9354
|
} else {
|
|
9348
9355
|
const other = await ensureTypedTable(client, a.table, { organizationId: org.data });
|
|
9349
9356
|
if (!other.ok) return other;
|