@sunsteel/contracts 0.91.0 → 0.92.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/dist/index.cjs +13 -2
- package/dist/index.d.cts +550 -504
- package/dist/index.d.ts +550 -504
- package/dist/index.js +11 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1303,7 +1303,7 @@ var ROUTINE_VISIBILITY_VALUES = [
|
|
|
1303
1303
|
"PUBLIC"
|
|
1304
1304
|
];
|
|
1305
1305
|
var ROUTINE_SHARE_MAX_ACTIVE_LINKS = 10;
|
|
1306
|
-
var SHARED_ROUTINE_SOURCES = ["LINK", "VISIBILITY"];
|
|
1306
|
+
var SHARED_ROUTINE_SOURCES = ["LINK", "VISIBILITY", "MESSAGE"];
|
|
1307
1307
|
var CLONE_ROUTINE_REFUSALS = {
|
|
1308
1308
|
/** Neither `token` nor `routineId`, or both at once. */
|
|
1309
1309
|
SOURCE_REQUIRED: "SOURCE_REQUIRED",
|
|
@@ -1591,7 +1591,7 @@ var API_ERROR_MESSAGES = {
|
|
|
1591
1591
|
EXERCISE_GROUP_TOO_LARGE: "A superset or circuit has at most {max} exercises",
|
|
1592
1592
|
ROUTINE_ACTIVE_SESSION: "Finish the active session before changing the routine structure",
|
|
1593
1593
|
ROUTINE_SHARE_LINKS_MAX: "A routine keeps at most {max} active links.",
|
|
1594
|
-
CLONE_SOURCE_REQUIRED: "SOURCE_REQUIRED: send
|
|
1594
|
+
CLONE_SOURCE_REQUIRED: "SOURCE_REQUIRED: send one of a share token, a routine id or a message id",
|
|
1595
1595
|
CLONE_UNKNOWN_EXERCISE: "UNKNOWN_EXERCISE: an exercise in this routine is no longer in the catalog",
|
|
1596
1596
|
ROUTINE_VERSIONS_MAX: "A routine keeps at most {max} versions; delete one first",
|
|
1597
1597
|
ROUTINE_VERSION_EXERCISE_GONE: "An exercise in this version is no longer in the catalog",
|
|
@@ -1810,6 +1810,13 @@ function normalizeMessageBody(body) {
|
|
|
1810
1810
|
}
|
|
1811
1811
|
return text;
|
|
1812
1812
|
}
|
|
1813
|
+
var MESSAGE_ATTACHMENT_KINDS = ["ROUTINE"];
|
|
1814
|
+
function messageNote(body, hasAttachment) {
|
|
1815
|
+
if ((body ?? "").trim().length === 0) {
|
|
1816
|
+
return hasAttachment ? null : void 0;
|
|
1817
|
+
}
|
|
1818
|
+
return normalizeMessageBody(body ?? "") ?? void 0;
|
|
1819
|
+
}
|
|
1813
1820
|
var CONVERSATION_BOXES = ["INBOX", "REQUESTS"];
|
|
1814
1821
|
var MESSAGE_REQUEST_DECLINE_COOLDOWN_DAYS = 30;
|
|
1815
1822
|
var MESSAGE_PUSH_DELAY_SECONDS = 30;
|
|
@@ -1914,6 +1921,7 @@ export {
|
|
|
1914
1921
|
MEASURABLE_GOAL_TYPES,
|
|
1915
1922
|
MESSAGES_PAGE_SIZE,
|
|
1916
1923
|
MESSAGES_PER_MINUTE_MAX,
|
|
1924
|
+
MESSAGE_ATTACHMENT_KINDS,
|
|
1917
1925
|
MESSAGE_BODY_MAX,
|
|
1918
1926
|
MESSAGE_PERMISSIONS,
|
|
1919
1927
|
MESSAGE_PUSH_DELAY_SECONDS,
|
|
@@ -2106,6 +2114,7 @@ export {
|
|
|
2106
2114
|
lpWorkingSets,
|
|
2107
2115
|
matchesDeletionConfirmation,
|
|
2108
2116
|
messageBodyLength,
|
|
2117
|
+
messageNote,
|
|
2109
2118
|
normalizeDashboardLayout,
|
|
2110
2119
|
normalizeExerciseLinks,
|
|
2111
2120
|
normalizeExerciseName,
|