@lotics/app-sdk 0.116.0 → 0.117.1

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.js CHANGED
@@ -126,7 +126,7 @@ function installVisibleErrorHandlers(container) {
126
126
  container.parentElement?.insertBefore(banner, container);
127
127
  };
128
128
  window.addEventListener("error", (e) => {
129
- showError(`Uncaught error: ${e.message}
129
+ if (e.error !== null && e.error !== void 0) showError(`Uncaught error: ${e.message}
130
130
  ${e.error?.stack ?? ""}`);
131
131
  reportAppError("uncaught", e.error ?? e.message);
132
132
  });
@@ -24277,6 +24277,7 @@ var kitGlyphSchema = zod_default.string().superRefine((name, ctx) => {
24277
24277
  const refused = kitGlyphRefusal(name);
24278
24278
  if (refused !== void 0) ctx.addIssue({ code: "custom", message: refused });
24279
24279
  });
24280
+ var AVATAR_SUBJECTS = ["person", "organization"];
24280
24281
  var optionMarkSchema = zod_default.discriminatedUnion("kind", [
24281
24282
  zod_default.object({
24282
24283
  kind: zod_default.literal("brand"),
@@ -24285,12 +24286,16 @@ var optionMarkSchema = zod_default.discriminatedUnion("kind", [
24285
24286
  zod_default.object({
24286
24287
  kind: zod_default.literal("icon"),
24287
24288
  name: kitGlyphSchema.describe(`A kebab-case glyph from the kit's curated Lucide set, e.g. "wrench"`)
24289
+ }).strict(),
24290
+ zod_default.object({
24291
+ kind: zod_default.literal("avatar"),
24292
+ name: zod_default.enum(AVATAR_SUBJECTS).describe("Who the option IS, drawn as a face from its label: a person's disc or an organization's square")
24288
24293
  }).strict()
24289
24294
  ]).describe(
24290
- `The option's own mark, drawn in place of its colour dot wherever the option is shown: the brand it is ({kind: "brand"}) or a kit glyph ({kind: "icon"}). Every option of a field has one, or none does`
24295
+ `The option's own mark, drawn in place of its colour dot wherever the option is shown: the brand it is ({kind: "brand"}), a kit glyph ({kind: "icon"}) or the face of who it is ({kind: "avatar"}). Every option of a field has one, or none does`
24291
24296
  );
24292
24297
  var storedOptionMarkSchema = zod_default.object({ kind: zod_default.string(), name: zod_default.string() }).describe(
24293
- `The option's own mark, drawn in place of its colour dot wherever the option is shown: the brand it is ({kind: "brand", name: one of ${BRAND_NAMES.join(", ")}}) or a kit glyph ({kind: "icon", name: "wrench"}). Every option of a field has one, or none does. A mark a reader does not draw falls back to the dot`
24298
+ `The option's own mark, drawn in place of its colour dot wherever the option is shown: the brand it is ({kind: "brand", name: one of ${BRAND_NAMES.join(", ")}}) a kit glyph ({kind: "icon", name: "wrench"}) or the face of who it is, drawn from its label ({kind: "avatar", name: "person" or "organization"}). Every option of a field has one, or none does. A mark a reader does not draw falls back to the dot`
24294
24299
  );
24295
24300
  function unevenMarks(options, nameOf2) {
24296
24301
  const bare = options.flatMap((option, index) => option.mark === void 0 ? [nameOf2(index)] : []);
@@ -24945,6 +24950,14 @@ var booleanDefaultValueSchema = zod_default.boolean().nullish().describe(DEFAULT
24945
24950
  var dateDefaultValueSchema = zod_default.string().nullish().describe(`${DEFAULT_VALUE_DESC} A date string in the field's format.`);
24946
24951
  var selectDefaultValueSchema = zod_default.array(zod_default.string()).nullish().describe(`${DEFAULT_VALUE_DESC} Option key(s) \u2014 one for single-select.`);
24947
24952
  var memberDefaultValueSchema = zod_default.array(zod_default.string()).nullish().describe(`${DEFAULT_VALUE_DESC} Member ID(s) \u2014 one for single-select.`);
24953
+ var fieldCopySchema = zod_default.object({
24954
+ link_field_key: zod_default.string().describe("A one-row link field of this table: the row the value is copied from"),
24955
+ field_key: zod_default.string().describe("The field of the linked table whose value is copied"),
24956
+ options: zod_default.record(zod_default.string(), zod_default.string()).optional().describe("Where the source is a select: each of its option keys \u2192 this field's option key. An option it leaves unmapped is not copied.")
24957
+ }).strict();
24958
+ var defaultFromSchema = fieldCopySchema.nullish().describe(
24959
+ "Copied off the row `link_field_key` names when a record is made, and never re-read: the source changing later leaves the record alone. A value the write states wins; `default_value` fills what the copy leaves empty. null clears it."
24960
+ );
24948
24961
  function perRowRefusals(value) {
24949
24962
  const unitField = value.unit_field == null ? [] : [
24950
24963
  ...value.unit != null ? ['a figure reads its unit from "unit" or from "unit_field", never both'] : [],
@@ -24984,7 +24997,8 @@ var tableNumberFieldShape = tableFieldBaseSchema.extend({
24984
24997
  unit: zod_default.string().nullish().describe(`${UNIT_DESCRIPTION} null clears it. ${BEFORE_NOTATION}`),
24985
24998
  unit_field: zod_default.string().nullish().describe(`${UNIT_FIELD_DESCRIPTION} null clears it. ${BEFORE_NOTATION}`),
24986
24999
  currency_field: zod_default.string().nullish().describe(`${CURRENCY_FIELD_DESCRIPTION} null clears it. ${BEFORE_NOTATION}`),
24987
- default_value: numberDefaultValueSchema
25000
+ default_value: numberDefaultValueSchema,
25001
+ default_from: defaultFromSchema
24988
25002
  });
24989
25003
  var tableNumberFieldSchema = tableNumberFieldShape.superRefine(figureIssue([]));
24990
25004
  var tableNumberFieldInputSchema = tableNumberFieldShape.extend({ format: numberFormatSchema.optional().describe(BEFORE_NOTATION) }).superRefine(figureIssue([]));
@@ -24993,7 +25007,8 @@ var tableTextFieldSchema = tableFieldBaseSchema.extend({
24993
25007
  unique: zod_default.boolean().optional().describe("Unique values required"),
24994
25008
  // it's `optional` only for backward compatibility
24995
25009
  format: textFormatSchema.optional(),
24996
- default_value: textDefaultValueSchema
25010
+ default_value: textDefaultValueSchema,
25011
+ default_from: defaultFromSchema
24997
25012
  });
24998
25013
  var tableDateFieldSchema = tableFieldBaseSchema.extend({
24999
25014
  type: zod_default.literal("date"),
@@ -25004,11 +25019,13 @@ var tableDateFieldSchema = tableFieldBaseSchema.extend({
25004
25019
  ),
25005
25020
  // A derived date is read-only, so derive_from and default_value are mutually
25006
25021
  // exclusive — enforced in validateFieldDefaultValue.
25007
- default_value: dateDefaultValueSchema
25022
+ default_value: dateDefaultValueSchema,
25023
+ default_from: defaultFromSchema
25008
25024
  });
25009
25025
  var tableBooleanFieldSchema = tableFieldBaseSchema.extend({
25010
25026
  type: zod_default.literal("boolean"),
25011
- default_value: booleanDefaultValueSchema
25027
+ default_value: booleanDefaultValueSchema,
25028
+ default_from: defaultFromSchema
25012
25029
  });
25013
25030
  var tableSelectFieldOptionSchema = zod_default.object({
25014
25031
  key: zod_default.string(),
@@ -25020,12 +25037,14 @@ var tableSelectFieldSchema = tableFieldBaseSchema.extend({
25020
25037
  type: zod_default.literal("select"),
25021
25038
  options: zod_default.array(tableSelectFieldOptionSchema),
25022
25039
  multi: zod_default.boolean().optional().describe("Allow multiple selections"),
25023
- default_value: selectDefaultValueSchema
25040
+ default_value: selectDefaultValueSchema,
25041
+ default_from: defaultFromSchema
25024
25042
  });
25025
25043
  var tableSelectMemberFieldSchema = tableFieldBaseSchema.extend({
25026
25044
  type: zod_default.literal("select_member"),
25027
25045
  multi: zod_default.boolean().optional().describe("Allow multiple selections"),
25028
- default_value: memberDefaultValueSchema
25046
+ default_value: memberDefaultValueSchema,
25047
+ default_from: defaultFromSchema
25029
25048
  });
25030
25049
  var recordLinkItemSchema = zod_default.object({
25031
25050
  id: zod_default.string(),
@@ -25048,7 +25067,8 @@ var tableSelectRecordLinkFieldInputSchema = tableFieldBaseSchema.extend({
25048
25067
  ),
25049
25068
  cardinality: zod_default.enum(["one", "many"]).optional().describe(
25050
25069
  "How many linked records this field can hold. Default 'many' (multi-select). 'one' = single-select; this side holds exactly one linked record, paired or not. Two paired sides cannot both be 'one'."
25051
- )
25070
+ ),
25071
+ default_from: defaultFromSchema
25052
25072
  });
25053
25073
  var tableSelectRecordLinkFieldSchema = tableFieldBaseSchema.extend({
25054
25074
  type: zod_default.literal("select_record_link").describe("Field type for linking to records in another table"),
@@ -25064,7 +25084,8 @@ var tableSelectRecordLinkFieldSchema = tableFieldBaseSchema.extend({
25064
25084
  ),
25065
25085
  cardinality: zod_default.enum(["one", "many"]).optional().describe(
25066
25086
  "How many linked records this field can hold. Default 'many' (multi-select). 'one' = single-select; this side holds exactly one linked record, paired or not. Two paired sides cannot both be 'one'."
25067
- )
25087
+ ),
25088
+ default_from: defaultFromSchema
25068
25089
  });
25069
25090
  var tableRollupFieldSchema = tableFieldBaseSchema.extend({
25070
25091
  type: zod_default.literal("rollup").describe(
@@ -25271,35 +25292,41 @@ var tableFieldTypeConfigSchema = zod_default.discriminatedUnion("type", [
25271
25292
  zod_default.object({
25272
25293
  type: zod_default.literal("number"),
25273
25294
  notation: notationSchema.optional().describe(`${NOTATION_DESCRIPTION} Omitted, a decimal.`),
25274
- default_value: numberDefaultValueSchema
25295
+ default_value: numberDefaultValueSchema,
25296
+ default_from: defaultFromSchema
25275
25297
  }).superRefine(notationStatedIssue([])),
25276
25298
  zod_default.object({
25277
25299
  type: zod_default.literal("text"),
25278
25300
  unique: zod_default.boolean().optional().describe("Unique values required"),
25279
25301
  format: textFormatSchema.default("text"),
25280
- default_value: textDefaultValueSchema
25302
+ default_value: textDefaultValueSchema,
25303
+ default_from: defaultFromSchema
25281
25304
  }),
25282
25305
  zod_default.object({
25283
25306
  type: zod_default.literal("date"),
25284
25307
  format: dateFormatSchema.optional(),
25285
25308
  timezone: zod_default.string().optional().describe("IANA timezone"),
25286
25309
  derive_from: zod_default.enum(["created_at", "updated_at"]).nullable().optional().describe("Auto-populate from row system timestamp; field becomes read-only. Only valid for date/datetime formats. Pass null to clear and revert to a manual date field."),
25287
- default_value: dateDefaultValueSchema
25310
+ default_value: dateDefaultValueSchema,
25311
+ default_from: defaultFromSchema
25288
25312
  }),
25289
25313
  zod_default.object({
25290
25314
  type: zod_default.literal("boolean"),
25291
- default_value: booleanDefaultValueSchema
25315
+ default_value: booleanDefaultValueSchema,
25316
+ default_from: defaultFromSchema
25292
25317
  }),
25293
25318
  zod_default.object({
25294
25319
  type: zod_default.literal("select"),
25295
25320
  options: zod_default.array(tableSelectFieldOptionCreateSchema).superRefine(everyOptionMarked((option) => option.name)),
25296
25321
  multi: zod_default.boolean().optional().describe("Allow multiple selections"),
25297
- default_value: selectDefaultValueSchema
25322
+ default_value: selectDefaultValueSchema,
25323
+ default_from: defaultFromSchema
25298
25324
  }),
25299
25325
  zod_default.object({
25300
25326
  type: zod_default.literal("select_member"),
25301
25327
  multi: zod_default.boolean().optional().describe("Allow multiple selections"),
25302
- default_value: memberDefaultValueSchema
25328
+ default_value: memberDefaultValueSchema,
25329
+ default_from: defaultFromSchema
25303
25330
  }),
25304
25331
  zod_default.object({
25305
25332
  type: zod_default.literal("select_record_link"),
@@ -25317,7 +25344,8 @@ var tableFieldTypeConfigSchema = zod_default.discriminatedUnion("type", [
25317
25344
  ),
25318
25345
  cardinality: zod_default.enum(["one", "many"]).optional().describe(
25319
25346
  "How many linked records this field can hold. Default 'many' (multi-select). 'one' = single-select; this side holds exactly one linked record, paired or not. Two paired sides cannot both be 'one'."
25320
- )
25347
+ ),
25348
+ default_from: defaultFromSchema
25321
25349
  }),
25322
25350
  zod_default.object({
25323
25351
  type: zod_default.literal("rollup"),
@@ -30270,18 +30298,27 @@ var NEGATION_TO_POSITIVE = {
30270
30298
  is_not_current_member: "is_current_member",
30271
30299
  is_not_locked: "is_locked"
30272
30300
  };
30301
+ function walkFilter(filter2, visit) {
30302
+ if (!filter2) return;
30303
+ const walk = (node) => {
30304
+ if (node.node_type !== "group") return visit(node);
30305
+ if (Array.isArray(node.children)) for (const child of node.children) walk(child);
30306
+ };
30307
+ walk(filter2);
30308
+ }
30309
+ function filterTraversals(filter2) {
30310
+ const traversals = [];
30311
+ walkFilter(filter2, (node) => {
30312
+ if (node.node_type !== "traversal" || !Array.isArray(node.path)) return;
30313
+ traversals.push({
30314
+ path: node.path.filter((hop) => Boolean(hop)),
30315
+ fieldKey: node.condition?.field_key || void 0
30316
+ });
30317
+ });
30318
+ return traversals;
30319
+ }
30273
30320
  function filterTraversalPaths(filter2) {
30274
- const paths = [];
30275
- if (!filter2) return paths;
30276
- const visit = (node) => {
30277
- if (node.node_type === "group") {
30278
- if (Array.isArray(node.children)) for (const child of node.children) visit(child);
30279
- } else if (node.node_type === "traversal") {
30280
- if (Array.isArray(node.path)) paths.push(node.path.filter((hop) => Boolean(hop)));
30281
- }
30282
- };
30283
- visit(filter2);
30284
- return paths;
30321
+ return filterTraversals(filter2).map((traversal) => traversal.path);
30285
30322
  }
30286
30323
  var FileNamesUnavailableError = class extends Error {
30287
30324
  constructor(fieldKey, operator) {
@@ -66,7 +66,7 @@ export type ReportReadingHead = {
66
66
  /** The read behind it was cut: its figures stand, every total over them is left out (`null`). */
67
67
  truncated: boolean;
68
68
  };
69
- export type TableField = { key: string; name: string; description: string; type: "number"; format: "number" | "currency" | "percentage"; confirm_before_update?: boolean | undefined; required?: boolean | undefined; notation?: { style: "decimal"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | undefined; currency?: string | null | undefined; unit?: string | null | undefined; unit_field?: string | null | undefined; currency_field?: string | null | undefined; default_value?: number | null | undefined; } | { key: string; name: string; description: string; type: "text"; confirm_before_update?: boolean | undefined; required?: boolean | undefined; unique?: boolean | undefined; format?: "text" | "link" | "markdown" | undefined; default_value?: string | null | undefined; } | { key: string; name: string; description: string; type: "date"; confirm_before_update?: boolean | undefined; required?: boolean | undefined; format?: "date" | "datetime" | "date_range" | "datetime_range" | undefined; timezone?: string | undefined; derive_from?: "created_at" | "updated_at" | undefined; default_value?: string | null | undefined; } | { key: string; name: string; description: string; type: "boolean"; confirm_before_update?: boolean | undefined; required?: boolean | undefined; default_value?: boolean | null | undefined; } | { key: string; name: string; description: string; type: "select"; options: { key: string; name: string; color: "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | "slate" | "gray" | "zinc" | "neutral" | "stone"; mark?: { kind: string; name: string; } | undefined; }[]; confirm_before_update?: boolean | undefined; required?: boolean | undefined; multi?: boolean | undefined; default_value?: string[] | null | undefined; } | { key: string; name: string; description: string; type: "select_member"; confirm_before_update?: boolean | undefined; required?: boolean | undefined; multi?: boolean | undefined; default_value?: string[] | null | undefined; } | { key: string; name: string; description: string; type: "select_record_link"; table_id: string; display_field_keys: string[]; confirm_before_update?: boolean | undefined; required?: boolean | undefined; display_field_widths?: Record<string, number> | undefined; paired_field_key?: string | undefined; cardinality?: "one" | "many" | undefined; } | { key: string; name: string; description: string; type: "rollup"; source_field_key: string; aggregate_option: { operation: "count"; field_key?: string | undefined; } | { operation: "unique" | "empty" | "filled" | "percent_empty" | "percent_filled" | "percent_unique"; field_key: string; } | { operation: "min" | "unique" | "empty" | "filled" | "percent_empty" | "percent_filled" | "percent_unique" | "sum" | "avg" | "median" | "max" | "range"; field_key: string; } | { operation: "unique" | "date_range" | "empty" | "filled" | "percent_empty" | "percent_filled" | "percent_unique" | "earliest" | "latest"; field_key: string; } | { operation: "unique" | "empty" | "filled" | "percent_empty" | "percent_filled" | "percent_unique" | "selected"; field_key: string; } | { operation: "unique" | "empty" | "filled" | "percent_empty" | "percent_filled" | "percent_unique" | "selected"; field_key: string; } | { operation: "empty" | "filled" | "percent_empty" | "percent_filled" | "selected"; field_key: string; } | { operation: "checked" | "unchecked" | "percent_checked" | "percent_unchecked"; field_key: string; } | { operation: "empty" | "filled" | "percent_empty" | "percent_filled" | "selected"; field_key: string; } | { operation: "min" | "unique" | "date_range" | "empty" | "filled" | "percent_empty" | "percent_filled" | "percent_unique" | "sum" | "avg" | "median" | "max" | "range" | "earliest" | "latest" | "checked" | "unchecked" | "percent_checked" | "percent_unchecked"; field_key: string; } | { operation: "min" | "unique" | "date_range" | "empty" | "filled" | "percent_empty" | "percent_filled" | "percent_unique" | "sum" | "avg" | "median" | "max" | "range" | "earliest" | "latest"; field_key: string; }; confirm_before_update?: boolean | undefined; required?: boolean | undefined; filter?: TableRecordFiltersGroupNode | undefined; aggregate_field_type?: "number" | "boolean" | "date" | "files" | "text" | "select" | "select_member" | "select_record_link" | "rollup" | "formula" | "lookup" | "button" | "autonumber" | undefined; aggregate_field_notation?: { style: "decimal"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | undefined; aggregate_field_format?: string | undefined; aggregate_field_currency?: string | undefined; aggregate_field_unit?: string | undefined; aggregate_field_unit_field?: string | undefined; aggregate_field_currency_field?: string | undefined; } | { key: string; name: string; description: string; type: "lookup"; source_field_key: string; lookup_field_key: string; confirm_before_update?: boolean | undefined; required?: boolean | undefined; lookup_field_type?: "number" | "boolean" | "date" | "files" | "text" | "select" | "select_member" | "select_record_link" | "rollup" | "formula" | "lookup" | "button" | "autonumber" | undefined; lookup_field_notation?: { style: "decimal"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | undefined; lookup_field_format?: string | undefined; lookup_field_currency?: string | undefined; lookup_field_unit?: string | undefined; lookup_field_options?: { key: string; name: string; color?: string | undefined; mark?: { kind: string; name: string; } | undefined; }[] | undefined; lookup_field_autonumber?: boolean | undefined; order_by?: { field_key: string; direction: "asc" | "desc"; } | undefined; } | { key: string; name: string; description: string; type: "files"; confirm_before_update?: boolean | undefined; required?: boolean | undefined; } | { key: string; name: string; description: string; type: "formula"; formula: { expression: string; notation?: { style: "decimal"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | undefined; link?: true | undefined; format?: "number" | "currency" | "percentage" | "link" | undefined; currency?: string | undefined; unit?: string | undefined; unit_field?: string | undefined; currency_field?: string | undefined; options?: { key: string; name: string; color: "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | "slate" | "gray" | "zinc" | "neutral" | "stone"; mark?: { kind: string; name: string; } | undefined; }[] | undefined; output_type?: "number" | "boolean" | "date" | "text" | "datetime" | "select" | undefined; volatile?: boolean | undefined; }; confirm_before_update?: boolean | undefined; required?: boolean | undefined; } | { key: string; name: string; description: string; type: "button"; text: string; confirm_before_update?: boolean | undefined; required?: boolean | undefined; workflow_id?: string | null | undefined; } | { key: string; name: string; description: string; type: "autonumber"; confirm_before_update?: boolean | undefined; required?: boolean | undefined; prefix?: string | undefined; padding?: number | undefined; template?: string | undefined; };
69
+ export type TableField = { key: string; name: string; description: string; type: "number"; format: "number" | "currency" | "percentage"; confirm_before_update?: boolean | undefined; required?: boolean | undefined; notation?: { style: "decimal"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | undefined; currency?: string | null | undefined; unit?: string | null | undefined; unit_field?: string | null | undefined; currency_field?: string | null | undefined; default_value?: number | null | undefined; default_from?: { link_field_key: string; field_key: string; options?: Record<string, string> | undefined; } | null | undefined; } | { key: string; name: string; description: string; type: "text"; confirm_before_update?: boolean | undefined; required?: boolean | undefined; unique?: boolean | undefined; format?: "text" | "link" | "markdown" | undefined; default_value?: string | null | undefined; default_from?: { link_field_key: string; field_key: string; options?: Record<string, string> | undefined; } | null | undefined; } | { key: string; name: string; description: string; type: "date"; confirm_before_update?: boolean | undefined; required?: boolean | undefined; format?: "date" | "datetime" | "date_range" | "datetime_range" | undefined; timezone?: string | undefined; derive_from?: "created_at" | "updated_at" | undefined; default_value?: string | null | undefined; default_from?: { link_field_key: string; field_key: string; options?: Record<string, string> | undefined; } | null | undefined; } | { key: string; name: string; description: string; type: "boolean"; confirm_before_update?: boolean | undefined; required?: boolean | undefined; default_value?: boolean | null | undefined; default_from?: { link_field_key: string; field_key: string; options?: Record<string, string> | undefined; } | null | undefined; } | { key: string; name: string; description: string; type: "select"; options: { key: string; name: string; color: "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | "slate" | "gray" | "zinc" | "neutral" | "stone"; mark?: { kind: string; name: string; } | undefined; }[]; confirm_before_update?: boolean | undefined; required?: boolean | undefined; multi?: boolean | undefined; default_value?: string[] | null | undefined; default_from?: { link_field_key: string; field_key: string; options?: Record<string, string> | undefined; } | null | undefined; } | { key: string; name: string; description: string; type: "select_member"; confirm_before_update?: boolean | undefined; required?: boolean | undefined; multi?: boolean | undefined; default_value?: string[] | null | undefined; default_from?: { link_field_key: string; field_key: string; options?: Record<string, string> | undefined; } | null | undefined; } | { key: string; name: string; description: string; type: "select_record_link"; table_id: string; display_field_keys: string[]; confirm_before_update?: boolean | undefined; required?: boolean | undefined; display_field_widths?: Record<string, number> | undefined; paired_field_key?: string | undefined; cardinality?: "one" | "many" | undefined; default_from?: { link_field_key: string; field_key: string; options?: Record<string, string> | undefined; } | null | undefined; } | { key: string; name: string; description: string; type: "rollup"; source_field_key: string; aggregate_option: { operation: "count"; field_key?: string | undefined; } | { operation: "unique" | "empty" | "filled" | "percent_empty" | "percent_filled" | "percent_unique"; field_key: string; } | { operation: "min" | "unique" | "empty" | "filled" | "percent_empty" | "percent_filled" | "percent_unique" | "sum" | "avg" | "median" | "max" | "range"; field_key: string; } | { operation: "unique" | "date_range" | "empty" | "filled" | "percent_empty" | "percent_filled" | "percent_unique" | "earliest" | "latest"; field_key: string; } | { operation: "unique" | "empty" | "filled" | "percent_empty" | "percent_filled" | "percent_unique" | "selected"; field_key: string; } | { operation: "unique" | "empty" | "filled" | "percent_empty" | "percent_filled" | "percent_unique" | "selected"; field_key: string; } | { operation: "empty" | "filled" | "percent_empty" | "percent_filled" | "selected"; field_key: string; } | { operation: "checked" | "unchecked" | "percent_checked" | "percent_unchecked"; field_key: string; } | { operation: "empty" | "filled" | "percent_empty" | "percent_filled" | "selected"; field_key: string; } | { operation: "min" | "unique" | "date_range" | "empty" | "filled" | "percent_empty" | "percent_filled" | "percent_unique" | "sum" | "avg" | "median" | "max" | "range" | "earliest" | "latest" | "checked" | "unchecked" | "percent_checked" | "percent_unchecked"; field_key: string; } | { operation: "min" | "unique" | "date_range" | "empty" | "filled" | "percent_empty" | "percent_filled" | "percent_unique" | "sum" | "avg" | "median" | "max" | "range" | "earliest" | "latest"; field_key: string; }; confirm_before_update?: boolean | undefined; required?: boolean | undefined; filter?: TableRecordFiltersGroupNode | undefined; aggregate_field_type?: "number" | "boolean" | "date" | "files" | "text" | "select" | "select_member" | "select_record_link" | "rollup" | "formula" | "lookup" | "button" | "autonumber" | undefined; aggregate_field_notation?: { style: "decimal"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | undefined; aggregate_field_format?: string | undefined; aggregate_field_currency?: string | undefined; aggregate_field_unit?: string | undefined; aggregate_field_unit_field?: string | undefined; aggregate_field_currency_field?: string | undefined; } | { key: string; name: string; description: string; type: "lookup"; source_field_key: string; lookup_field_key: string; confirm_before_update?: boolean | undefined; required?: boolean | undefined; lookup_field_type?: "number" | "boolean" | "date" | "files" | "text" | "select" | "select_member" | "select_record_link" | "rollup" | "formula" | "lookup" | "button" | "autonumber" | undefined; lookup_field_notation?: { style: "decimal"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | undefined; lookup_field_format?: string | undefined; lookup_field_currency?: string | undefined; lookup_field_unit?: string | undefined; lookup_field_options?: { key: string; name: string; color?: string | undefined; mark?: { kind: string; name: string; } | undefined; }[] | undefined; lookup_field_autonumber?: boolean | undefined; order_by?: { field_key: string; direction: "asc" | "desc"; } | undefined; } | { key: string; name: string; description: string; type: "files"; confirm_before_update?: boolean | undefined; required?: boolean | undefined; } | { key: string; name: string; description: string; type: "formula"; formula: { expression: string; notation?: { style: "decimal"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | undefined; link?: true | undefined; format?: "number" | "currency" | "percentage" | "link" | undefined; currency?: string | undefined; unit?: string | undefined; unit_field?: string | undefined; currency_field?: string | undefined; options?: { key: string; name: string; color: "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | "slate" | "gray" | "zinc" | "neutral" | "stone"; mark?: { kind: string; name: string; } | undefined; }[] | undefined; output_type?: "number" | "boolean" | "date" | "text" | "datetime" | "select" | undefined; volatile?: boolean | undefined; }; confirm_before_update?: boolean | undefined; required?: boolean | undefined; } | { key: string; name: string; description: string; type: "button"; text: string; confirm_before_update?: boolean | undefined; required?: boolean | undefined; workflow_id?: string | null | undefined; } | { key: string; name: string; description: string; type: "autonumber"; confirm_before_update?: boolean | undefined; required?: boolean | undefined; prefix?: string | undefined; padding?: number | undefined; template?: string | undefined; };
70
70
  export type TableRecordFilters = TableRecordFiltersConditionNode | TableRecordFiltersTraversalNode | TableRecordFiltersGroupNode;
71
71
  export type TableRecordFiltersConditionNode = { node_type: "condition"; field_key?: string | undefined; type?: string | undefined; operator: string; value?: unknown; unit_option?: string | undefined; };
72
72
  export type TableRecordFiltersGroupNode = { node_type: "group"; logic: "and" | "or"; children: (TableRecordFilters)[]; };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lotics/app-sdk",
3
- "version": "0.116.0",
4
- "description": "The SDK a Lotics custom-code app reads and writes through \u2014 typed hooks over the host bridge, cell readers, mount() and AppRouter",
3
+ "version": "0.117.1",
4
+ "description": "The SDK a Lotics custom-code app reads and writes through — typed hooks over the host bridge, cell readers, mount() and AppRouter",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {