@camox/api-contract 0.60.2 → 0.62.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.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/router.d.ts +422 -115
- package/package.json +1 -1
- package/src/record-templates.ts +6 -3
- package/src/reference-query.ts +4 -2
package/package.json
CHANGED
package/src/record-templates.ts
CHANGED
|
@@ -17,10 +17,13 @@ export function templateFields(template: string): string[] {
|
|
|
17
17
|
*/
|
|
18
18
|
export function nonStringTemplateFields(
|
|
19
19
|
template: string,
|
|
20
|
-
properties: Readonly<Record<string,
|
|
20
|
+
properties: Readonly<Record<string, unknown>>,
|
|
21
21
|
): string[] {
|
|
22
|
-
const isString = (field:
|
|
23
|
-
field
|
|
22
|
+
const isString = (field: unknown) =>
|
|
23
|
+
typeof field === "object" &&
|
|
24
|
+
field !== null &&
|
|
25
|
+
"fieldType" in field &&
|
|
26
|
+
field.fieldType === "String";
|
|
24
27
|
return templateFields(template).filter((name) => !isString(properties[name]));
|
|
25
28
|
}
|
|
26
29
|
|
package/src/reference-query.ts
CHANGED
|
@@ -15,8 +15,10 @@ export function isSystemOrderKey(key: string): key is SystemOrderKey {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
/** Whether a reference list field is query-backed: code defines its records, nothing is stored. */
|
|
18
|
-
export function isQueryBacked(field:
|
|
19
|
-
return
|
|
18
|
+
export function isQueryBacked(field: unknown) {
|
|
19
|
+
return (
|
|
20
|
+
typeof field === "object" && field !== null && "query" in field && field.query !== undefined
|
|
21
|
+
);
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
/**
|