@standards/schema 1.0.0-alpha.384 → 1.0.0-alpha.385
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/{all-C9OPP-r1.d.ts → all-Czr26_QP.d.ts} +1115 -1116
- package/dist/{all-CYmW48oj.d.mts → all-DIAipZSx.d.mts} +1115 -1116
- package/dist/api/index.d.mts +2894 -2894
- package/dist/api/index.d.ts +2894 -2894
- package/dist/api/index.js +1 -1
- package/dist/api/index.mjs +1 -1
- package/dist/attribute-validators-COsyRG9V.mjs +11 -0
- package/dist/attribute-validators-CQEf6iqM.js +11 -0
- package/dist/{attributes-D35Lcoui.d.ts → attributes-BcA_reJZ.d.ts} +58 -59
- package/dist/{attributes-CZD_B0mZ.d.mts → attributes-eqr1vdPP.d.mts} +58 -59
- package/dist/checkbox-C9aJ-6gq.d.ts +10 -0
- package/dist/checkbox-DfXrFM2z.d.mts +10 -0
- package/dist/config-C1CDWJf8.mjs +2 -0
- package/dist/config-DUQAd-Ur.js +2 -0
- package/dist/{core-397tQy5q.js → core-DAxRlJ5i.js} +1 -1
- package/dist/{core-BLHhNykL.mjs → core-rKI7Q9_U.mjs} +1 -1
- package/dist/{date-CQdP6Dxe.d.ts → date-BzggmHjS.d.mts} +5 -6
- package/dist/{date-B9051Wxe.d.mts → date-CdaoV9_L.d.ts} +5 -6
- package/dist/{exceptions-DoP6VK0v.d.mts → exceptions-CgzBcQIl.d.mts} +69 -70
- package/dist/{exceptions-DoP6VK0v.d.ts → exceptions-CgzBcQIl.d.ts} +69 -70
- package/dist/exceptions.d.mts +1 -1
- package/dist/exceptions.d.ts +1 -1
- package/dist/{index-E9rSexij.d.ts → index-BSYjSdhW.d.mts} +17 -18
- package/dist/{index-BLXzRQr9.d.ts → index-CCH94vyR.d.ts} +6 -7
- package/dist/{index-D0L0GHU0.d.mts → index-D1iR2xuc.d.ts} +17 -18
- package/dist/{index-CgEVJG3l.d.ts → index-DFQSFYiY.d.mts} +2775 -2774
- package/dist/{index-BS-60koN.d.mts → index-DKjcsjFG.d.ts} +2775 -2774
- package/dist/{index-CH-Vc-pK.d.ts → index-e1Oh8ngS.d.ts} +73 -74
- package/dist/{index-B3wdnfLl.d.mts → index-jDwfdudj.d.mts} +73 -74
- package/dist/{index-CSDAHifu.d.mts → index-zJz3LbXr.d.mts} +6 -7
- package/dist/index.d.mts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/number-B3u9vPtb.d.ts +10 -0
- package/dist/number-Br56q0hL.d.mts +10 -0
- package/dist/object-BF5y6bgs.mjs +4 -0
- package/dist/object-Kx-ADbIo.js +4 -0
- package/dist/{objects-CH22DJOx.d.ts → objects-CLxyZh-U.d.ts} +54 -55
- package/dist/{objects-DhKrQEo4.d.mts → objects-DxEMaC2Z.d.mts} +54 -55
- package/dist/phone-BGJea5sr.mjs +2 -0
- package/dist/phone-DrHyIujN.js +2 -0
- package/dist/record-aggregates-Cj3p3_ce.js +2 -0
- package/dist/{record-aggregates-CzG86pUS.mjs → record-aggregates-DQXrIuGE.mjs} +1 -1
- package/dist/record-operation-7-DRRONb.mjs +2 -0
- package/dist/record-operation-Bbn-LZhq.js +2 -0
- package/dist/text-2DB_Jc_x.js +2 -0
- package/dist/text-BaxaZ5Vv.mjs +2 -0
- package/dist/text-Bvk4ila8.d.ts +10 -0
- package/dist/text-C5NnfCJg.d.mts +10 -0
- package/dist/{utils-gY3d9Dwp.js → utils-B-gGq3FS.js} +1 -1
- package/dist/{utils-C_J_p_tL.d.ts → utils-B2bq4zLb.d.ts} +15 -16
- package/dist/{utils-CkcPS_M9.d.mts → utils-CRx-eR8T.d.mts} +15 -16
- package/dist/{utils-fXIvFFl6.mjs → utils-DaejNWxh.mjs} +1 -1
- package/dist/utils.d.mts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +1 -1
- package/dist/validation/all.d.mts +4 -4
- package/dist/validation/all.d.ts +4 -4
- package/dist/validation/all.js +1 -1
- package/dist/validation/all.mjs +1 -1
- package/dist/validation/complex/currency.d.mts +4 -4
- package/dist/validation/complex/currency.d.ts +4 -4
- package/dist/validation/complex/currency.js +1 -1
- package/dist/validation/complex/currency.mjs +1 -1
- package/dist/validation/complex/location.d.mts +4 -4
- package/dist/validation/complex/location.d.ts +4 -4
- package/dist/validation/complex/location.js +1 -1
- package/dist/validation/complex/location.mjs +1 -1
- package/dist/validation/complex/phone.d.mts +4 -4
- package/dist/validation/complex/phone.d.ts +4 -4
- package/dist/validation/complex/phone.js +1 -1
- package/dist/validation/complex/phone.mjs +1 -1
- package/dist/validation/complex/relation.d.mts +6 -6
- package/dist/validation/complex/relation.d.ts +6 -6
- package/dist/validation/complex/relation.js +1 -1
- package/dist/validation/complex/relation.mjs +1 -1
- package/dist/validation/complex/richtext.d.mts +4 -4
- package/dist/validation/complex/richtext.d.ts +4 -4
- package/dist/validation/complex/richtext.js +1 -1
- package/dist/validation/complex/richtext.mjs +1 -1
- package/dist/validation/complex/select.d.mts +6 -6
- package/dist/validation/complex/select.d.ts +6 -6
- package/dist/validation/complex/select.js +1 -1
- package/dist/validation/complex/select.mjs +1 -1
- package/dist/validation/complex/user.d.mts +4 -4
- package/dist/validation/complex/user.d.ts +4 -4
- package/dist/validation/complex/user.js +1 -1
- package/dist/validation/complex/user.mjs +1 -1
- package/dist/validation/computed/formula.d.mts +4 -4
- package/dist/validation/computed/formula.d.ts +4 -4
- package/dist/validation/computed/formula.js +1 -1
- package/dist/validation/computed/formula.mjs +1 -1
- package/dist/validation/computed/rollup.d.mts +4 -4
- package/dist/validation/computed/rollup.d.ts +4 -4
- package/dist/validation/computed/rollup.js +1 -1
- package/dist/validation/computed/rollup.mjs +1 -1
- package/dist/validation/config/index.d.mts +1 -1
- package/dist/validation/config/index.d.ts +1 -1
- package/dist/validation/config/index.js +1 -1
- package/dist/validation/config/index.mjs +1 -1
- package/dist/validation/core/index.d.mts +1 -1
- package/dist/validation/core/index.d.ts +1 -1
- package/dist/validation/core/index.js +1 -1
- package/dist/validation/core/index.mjs +1 -1
- package/dist/validation/object/index.d.mts +1 -1
- package/dist/validation/object/index.d.ts +1 -1
- package/dist/validation/object/index.js +1 -1
- package/dist/validation/object/index.mjs +1 -1
- package/dist/validation/primitives/checkbox.d.mts +1 -1
- package/dist/validation/primitives/checkbox.d.ts +1 -1
- package/dist/validation/primitives/checkbox.js +1 -1
- package/dist/validation/primitives/checkbox.mjs +1 -1
- package/dist/validation/primitives/date.d.mts +1 -1
- package/dist/validation/primitives/date.d.ts +1 -1
- package/dist/validation/primitives/date.js +1 -1
- package/dist/validation/primitives/date.mjs +1 -1
- package/dist/validation/primitives/number.d.mts +1 -1
- package/dist/validation/primitives/number.d.ts +1 -1
- package/dist/validation/primitives/number.js +1 -1
- package/dist/validation/primitives/number.mjs +1 -1
- package/dist/validation/primitives/text.d.mts +1 -1
- package/dist/validation/primitives/text.d.ts +1 -1
- package/dist/validation/primitives/text.js +1 -1
- package/dist/validation/primitives/text.mjs +1 -1
- package/dist/view-config.schema-BOuNAZ5T.js +2 -0
- package/dist/view-config.schema-Dl5GkAzl.mjs +2 -0
- package/dist/zod-locale-D_QkXhnp.d.mts +2 -0
- package/dist/zod-locale-D_QkXhnp.d.ts +2 -0
- package/dist/zod-locale.d.mts +2 -0
- package/dist/zod-locale.d.ts +2 -0
- package/dist/zod-locale.js +2 -0
- package/dist/zod-locale.mjs +2 -0
- package/package.json +17 -3
- package/dist/attribute-validators-DRqhAt2t.mjs +0 -11
- package/dist/attribute-validators-WAoJbap5.js +0 -11
- package/dist/checkbox-CQRDh5tF.d.ts +0 -11
- package/dist/checkbox-D00iEidf.d.mts +0 -11
- package/dist/config-BIxnbUN8.mjs +0 -2
- package/dist/config-DdjlHdPg.js +0 -2
- package/dist/number-BwCSeK20.d.ts +0 -11
- package/dist/number-CisXUosg.d.mts +0 -11
- package/dist/object-DcgxLvip.js +0 -4
- package/dist/object-Dzl7sfq8.mjs +0 -4
- package/dist/phone-BB-tzcSr.js +0 -2
- package/dist/phone-Bca_xiOX.mjs +0 -2
- package/dist/record-aggregates-DwpIJ2Dv.js +0 -2
- package/dist/record-operation-B7t5aXW3.js +0 -2
- package/dist/record-operation-DueJTyDh.mjs +0 -2
- package/dist/text-A9AJ1wUO.js +0 -2
- package/dist/text-C8Lb-NFo.mjs +0 -2
- package/dist/text-SkYUYEnE.d.ts +0 -11
- package/dist/text-Z1_WL8cd.d.mts +0 -11
- package/dist/view-config.schema-BqO1hmWR.mjs +0 -2
- package/dist/view-config.schema-DVoE_g3g.js +0 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { Uuid } from "./utils-B2bq4zLb.js";
|
|
3
3
|
import { ColorId, CountryIso3, CurrencyCode, IconName } from "@standards/constants";
|
|
4
4
|
//#region src/types/computed.d.ts
|
|
5
|
-
declare const COMPUTED_RETURN_TYPES: readonly ["text", "number", "boolean", "date", "select", "multiselect"];
|
|
6
|
-
type ComputedReturnType = (typeof COMPUTED_RETURN_TYPES)[number];
|
|
7
|
-
interface ComputedOptionsSource {
|
|
5
|
+
export declare const COMPUTED_RETURN_TYPES: readonly ["text", "number", "boolean", "date", "select", "multiselect"];
|
|
6
|
+
export type ComputedReturnType = (typeof COMPUTED_RETURN_TYPES)[number];
|
|
7
|
+
export interface ComputedOptionsSource {
|
|
8
8
|
objectName: string;
|
|
9
9
|
attributeName: string;
|
|
10
10
|
attributeId?: string;
|
|
@@ -17,14 +17,14 @@ interface ComputedOptionsSource {
|
|
|
17
17
|
* IMPORTANT: Complex types (formula, rollup, relation, file, user, document, richtext)
|
|
18
18
|
* are NOT supported to avoid duplicating backend behavior.
|
|
19
19
|
*/
|
|
20
|
-
type PropertyType = "text" | "number" | "checkbox" | "date" | "phone" | "currency" | "status" | "select" | "multiselect" | "location";
|
|
20
|
+
export type PropertyType = "text" | "number" | "checkbox" | "date" | "phone" | "currency" | "status" | "select" | "multiselect" | "location";
|
|
21
21
|
/**
|
|
22
22
|
* Union of attribute types allowed as qualified relation properties.
|
|
23
23
|
*
|
|
24
24
|
* These are the same Attribute types used for object attributes,
|
|
25
25
|
* restricted to simple types that don't require complex backend duplication.
|
|
26
26
|
*/
|
|
27
|
-
type PropertyAttribute = TextAttribute | NumberAttribute | CheckboxAttribute | DateAttribute | PhoneAttribute | CurrencyAttribute | StatusAttribute | SelectAttribute | MultiselectAttribute | LocationAttribute;
|
|
27
|
+
export type PropertyAttribute = TextAttribute | NumberAttribute | CheckboxAttribute | DateAttribute | PhoneAttribute | CurrencyAttribute | StatusAttribute | SelectAttribute | MultiselectAttribute | LocationAttribute;
|
|
28
28
|
/**
|
|
29
29
|
* Schema defining properties for a qualified relation.
|
|
30
30
|
*
|
|
@@ -40,7 +40,7 @@ type PropertyAttribute = TextAttribute | NumberAttribute | CheckboxAttribute | D
|
|
|
40
40
|
* )
|
|
41
41
|
* ```
|
|
42
42
|
*/
|
|
43
|
-
interface PropertySchema {
|
|
43
|
+
export interface PropertySchema {
|
|
44
44
|
definitions: PropertyAttribute[];
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
@@ -49,11 +49,11 @@ interface PropertySchema {
|
|
|
49
49
|
* shape (`{ definitions: [...] }`) and the raw-array shape used in test
|
|
50
50
|
* fixtures (`PropertyAttribute[]`).
|
|
51
51
|
*/
|
|
52
|
-
declare function resolvePropertyDefinitions(attr: unknown): PropertyAttribute[];
|
|
52
|
+
export declare function resolvePropertyDefinitions(attr: unknown): PropertyAttribute[];
|
|
53
53
|
/**
|
|
54
54
|
* Property attribute types that have an `options` array.
|
|
55
55
|
*/
|
|
56
|
-
type OptionPropertyAttribute = SelectAttribute | StatusAttribute | MultiselectAttribute;
|
|
56
|
+
export type OptionPropertyAttribute = SelectAttribute | StatusAttribute | MultiselectAttribute;
|
|
57
57
|
/**
|
|
58
58
|
* Type guard to check if a property attribute has options.
|
|
59
59
|
*
|
|
@@ -72,19 +72,19 @@ type OptionPropertyAttribute = SelectAttribute | StatusAttribute | MultiselectAt
|
|
|
72
72
|
* }
|
|
73
73
|
* ```
|
|
74
74
|
*/
|
|
75
|
-
declare function hasOptions(attr: PropertyAttribute): attr is OptionPropertyAttribute;
|
|
75
|
+
export declare function hasOptions(attr: PropertyAttribute): attr is OptionPropertyAttribute;
|
|
76
76
|
//#endregion
|
|
77
77
|
//#region src/types/attributes.d.ts
|
|
78
|
-
declare const ATTRIBUTE_TYPES: readonly ["text", "richtext", "number", "checkbox", "date", "phone", "currency", "status", "location", "select", "multiselect", "user", "relation", "formula", "rollup", "document"];
|
|
79
|
-
type AttributeType = (typeof ATTRIBUTE_TYPES)[number];
|
|
78
|
+
export declare const ATTRIBUTE_TYPES: readonly ["text", "richtext", "number", "checkbox", "date", "phone", "currency", "status", "location", "select", "multiselect", "user", "relation", "formula", "rollup", "document"];
|
|
79
|
+
export type AttributeType = (typeof ATTRIBUTE_TYPES)[number];
|
|
80
80
|
/**
|
|
81
81
|
* Status group categorization
|
|
82
82
|
*/
|
|
83
|
-
type StatusGroup = "idle" | "in_progress" | "finished";
|
|
83
|
+
export type StatusGroup = "idle" | "in_progress" | "finished";
|
|
84
84
|
/**
|
|
85
85
|
* Unified option type for select-like fields
|
|
86
86
|
*/
|
|
87
|
-
interface Option {
|
|
87
|
+
export interface Option {
|
|
88
88
|
value: string;
|
|
89
89
|
label: string;
|
|
90
90
|
color?: ColorId;
|
|
@@ -97,7 +97,7 @@ interface Option {
|
|
|
97
97
|
/**
|
|
98
98
|
* Attribute grouping for UI organization
|
|
99
99
|
*/
|
|
100
|
-
interface AttributeGroup {
|
|
100
|
+
export interface AttributeGroup {
|
|
101
101
|
id: string;
|
|
102
102
|
label: string;
|
|
103
103
|
description?: string;
|
|
@@ -106,7 +106,7 @@ interface AttributeGroup {
|
|
|
106
106
|
collapsed?: boolean;
|
|
107
107
|
order?: number;
|
|
108
108
|
}
|
|
109
|
-
interface BaseAttribute<DefaultValueType = unknown> {
|
|
109
|
+
export interface BaseAttribute<DefaultValueType = unknown> {
|
|
110
110
|
id?: Uuid;
|
|
111
111
|
objectId?: Uuid;
|
|
112
112
|
name: string;
|
|
@@ -125,7 +125,7 @@ interface BaseAttribute<DefaultValueType = unknown> {
|
|
|
125
125
|
unique?: boolean;
|
|
126
126
|
metadata?: Record<string, unknown>;
|
|
127
127
|
}
|
|
128
|
-
interface TextAttribute extends BaseAttribute<string> {
|
|
128
|
+
export interface TextAttribute extends BaseAttribute<string> {
|
|
129
129
|
type: "text";
|
|
130
130
|
multiline?: boolean;
|
|
131
131
|
minLength?: number;
|
|
@@ -133,8 +133,8 @@ interface TextAttribute extends BaseAttribute<string> {
|
|
|
133
133
|
pattern?: string;
|
|
134
134
|
format?: "email" | "url" | "slug";
|
|
135
135
|
}
|
|
136
|
-
type NumberUnit = "integer" | "decimal" | "percentage";
|
|
137
|
-
interface NumberAttribute extends BaseAttribute<number> {
|
|
136
|
+
export type NumberUnit = "integer" | "decimal" | "percentage";
|
|
137
|
+
export interface NumberAttribute extends BaseAttribute<number> {
|
|
138
138
|
type: "number";
|
|
139
139
|
min?: number;
|
|
140
140
|
max?: number;
|
|
@@ -142,14 +142,14 @@ interface NumberAttribute extends BaseAttribute<number> {
|
|
|
142
142
|
decimals?: number;
|
|
143
143
|
renderAs?: "number" | "rating";
|
|
144
144
|
}
|
|
145
|
-
interface CheckboxAttribute extends BaseAttribute<boolean> {
|
|
145
|
+
export interface CheckboxAttribute extends BaseAttribute<boolean> {
|
|
146
146
|
type: "checkbox";
|
|
147
147
|
}
|
|
148
|
-
type DateFormat = "short" | "long" | "full" | "relative";
|
|
149
|
-
type DateValue = string | "today";
|
|
150
|
-
type TimeFormat = "12h" | "24h";
|
|
148
|
+
export type DateFormat = "short" | "long" | "full" | "relative";
|
|
149
|
+
export type DateValue = string | "today";
|
|
150
|
+
export type TimeFormat = "12h" | "24h";
|
|
151
151
|
/** Stored value of a date attribute configured with `.endDate()`. */
|
|
152
|
-
interface DateRangeValue {
|
|
152
|
+
export interface DateRangeValue {
|
|
153
153
|
start: string;
|
|
154
154
|
end: string | null;
|
|
155
155
|
}
|
|
@@ -158,8 +158,8 @@ interface DateRangeValue {
|
|
|
158
158
|
* always a full day; a narrower precision says the day (and the month, for a
|
|
159
159
|
* year) is not part of the fact.
|
|
160
160
|
*/
|
|
161
|
-
type DatePrecision = "day" | "month" | "year";
|
|
162
|
-
interface DateAttribute extends BaseAttribute<string | DateRangeValue> {
|
|
161
|
+
export type DatePrecision = "day" | "month" | "year";
|
|
162
|
+
export interface DateAttribute extends BaseAttribute<string | DateRangeValue> {
|
|
163
163
|
type: "date";
|
|
164
164
|
dateFormat?: DateFormat;
|
|
165
165
|
/** Defaults to "day". Refused with `includeTime` or `endDate` when narrower. */
|
|
@@ -173,19 +173,19 @@ interface DateAttribute extends BaseAttribute<string | DateRangeValue> {
|
|
|
173
173
|
/** Display format for the time component. Defaults to "24h". */
|
|
174
174
|
timeFormat?: TimeFormat;
|
|
175
175
|
}
|
|
176
|
-
interface Phone {
|
|
176
|
+
export interface Phone {
|
|
177
177
|
countryCode: CountryIso3;
|
|
178
178
|
phoneNumber: string;
|
|
179
179
|
}
|
|
180
|
-
interface PhoneAttribute extends BaseAttribute<Phone> {
|
|
180
|
+
export interface PhoneAttribute extends BaseAttribute<Phone> {
|
|
181
181
|
type: "phone";
|
|
182
182
|
defaultCountryCode?: CountryIso3;
|
|
183
183
|
}
|
|
184
|
-
interface Currency {
|
|
184
|
+
export interface Currency {
|
|
185
185
|
code: CurrencyCode;
|
|
186
186
|
value: number;
|
|
187
187
|
}
|
|
188
|
-
interface CurrencyAttribute extends BaseAttribute<Currency> {
|
|
188
|
+
export interface CurrencyAttribute extends BaseAttribute<Currency> {
|
|
189
189
|
type: "currency";
|
|
190
190
|
defaultCurrency?: CurrencyCode;
|
|
191
191
|
allowedCurrencies?: CurrencyCode[];
|
|
@@ -197,11 +197,11 @@ interface CurrencyAttribute extends BaseAttribute<Currency> {
|
|
|
197
197
|
* Use this for: Task status, Order status, Project phases, Process states
|
|
198
198
|
* Use SelectAttribute for: Categories, Types, simple choices without workflow
|
|
199
199
|
*/
|
|
200
|
-
interface StatusAttribute extends BaseAttribute<string> {
|
|
200
|
+
export interface StatusAttribute extends BaseAttribute<string> {
|
|
201
201
|
type: "status";
|
|
202
202
|
options: Option[];
|
|
203
203
|
}
|
|
204
|
-
interface Location {
|
|
204
|
+
export interface Location {
|
|
205
205
|
address?: string;
|
|
206
206
|
address2?: string;
|
|
207
207
|
city?: string;
|
|
@@ -211,8 +211,8 @@ interface Location {
|
|
|
211
211
|
latitude?: number;
|
|
212
212
|
longitude?: number;
|
|
213
213
|
}
|
|
214
|
-
type LocationGranularity = "full" | "address" | "city" | "state" | "country" | "coordinates";
|
|
215
|
-
interface LocationAttribute extends BaseAttribute<Location> {
|
|
214
|
+
export type LocationGranularity = "full" | "address" | "city" | "state" | "country" | "coordinates";
|
|
215
|
+
export interface LocationAttribute extends BaseAttribute<Location> {
|
|
216
216
|
type: "location";
|
|
217
217
|
granularity?: LocationGranularity;
|
|
218
218
|
defaultCountry?: CountryIso3;
|
|
@@ -223,18 +223,18 @@ interface LocationAttribute extends BaseAttribute<Location> {
|
|
|
223
223
|
* Use this for: Categories, Document types, Departments, Priorities
|
|
224
224
|
* Options can be grouped (e.g., countries by continent) but no workflow logic
|
|
225
225
|
*/
|
|
226
|
-
interface SelectAttribute extends BaseAttribute<string> {
|
|
226
|
+
export interface SelectAttribute extends BaseAttribute<string> {
|
|
227
227
|
type: "select";
|
|
228
228
|
options: Option[];
|
|
229
229
|
renderAs?: "badges";
|
|
230
230
|
}
|
|
231
|
-
interface MultiselectAttribute extends BaseAttribute<string[]> {
|
|
231
|
+
export interface MultiselectAttribute extends BaseAttribute<string[]> {
|
|
232
232
|
type: "multiselect";
|
|
233
233
|
options: Option[];
|
|
234
234
|
renderAs?: "badges";
|
|
235
235
|
}
|
|
236
|
-
type UserReferenceType = "user" | "agent";
|
|
237
|
-
interface UserAttribute extends BaseAttribute<string | string[]> {
|
|
236
|
+
export type UserReferenceType = "user" | "agent";
|
|
237
|
+
export interface UserAttribute extends BaseAttribute<string | string[]> {
|
|
238
238
|
type: "user";
|
|
239
239
|
types?: UserReferenceType[];
|
|
240
240
|
multiple?: boolean;
|
|
@@ -245,11 +245,11 @@ interface UserAttribute extends BaseAttribute<string | string[]> {
|
|
|
245
245
|
* Wildcard marker for universal relations (can link to any object)
|
|
246
246
|
* Use with `.toAny()` builder method
|
|
247
247
|
*/
|
|
248
|
-
declare const RELATION_TARGET_ANY: "*";
|
|
248
|
+
export declare const RELATION_TARGET_ANY: "*";
|
|
249
249
|
/**
|
|
250
250
|
* Configuration for bilateral synchronization (bidirectional relations)
|
|
251
251
|
*/
|
|
252
|
-
interface BilateralConfig {
|
|
252
|
+
export interface BilateralConfig {
|
|
253
253
|
/** Target object containing the inverse attribute */
|
|
254
254
|
object: string;
|
|
255
255
|
/** Name of the inverse attribute */
|
|
@@ -265,7 +265,7 @@ interface BilateralConfig {
|
|
|
265
265
|
/**
|
|
266
266
|
* Target object for a relation - defines which objects can be linked
|
|
267
267
|
*/
|
|
268
|
-
interface RelationTarget {
|
|
268
|
+
export interface RelationTarget {
|
|
269
269
|
/** Object name (e.g., "companies", "contacts") or "*" for any object */
|
|
270
270
|
object: string;
|
|
271
271
|
/**
|
|
@@ -300,7 +300,7 @@ interface RelationAttributeBase extends Omit<BaseAttribute<unknown>, "defaultVal
|
|
|
300
300
|
* Single relation attribute (one-to-one or many-to-one)
|
|
301
301
|
* Stores a single record ID or null
|
|
302
302
|
*/
|
|
303
|
-
interface SingleRelationAttribute extends RelationAttributeBase {
|
|
303
|
+
export interface SingleRelationAttribute extends RelationAttributeBase {
|
|
304
304
|
cardinality: "one";
|
|
305
305
|
defaultValue?: string | null;
|
|
306
306
|
}
|
|
@@ -308,7 +308,7 @@ interface SingleRelationAttribute extends RelationAttributeBase {
|
|
|
308
308
|
* Multi relation attribute (one-to-many or many-to-many)
|
|
309
309
|
* Stores an array of record IDs
|
|
310
310
|
*/
|
|
311
|
-
interface MultiRelationAttribute extends RelationAttributeBase {
|
|
311
|
+
export interface MultiRelationAttribute extends RelationAttributeBase {
|
|
312
312
|
cardinality: "many";
|
|
313
313
|
defaultValue?: string[];
|
|
314
314
|
/** Maximum number of relations allowed */
|
|
@@ -345,7 +345,7 @@ interface MultiRelationAttribute extends RelationAttributeBase {
|
|
|
345
345
|
* // → Can link to records from any of these objects
|
|
346
346
|
* ```
|
|
347
347
|
*/
|
|
348
|
-
type RelationAttribute = SingleRelationAttribute | MultiRelationAttribute;
|
|
348
|
+
export type RelationAttribute = SingleRelationAttribute | MultiRelationAttribute;
|
|
349
349
|
/**
|
|
350
350
|
* Check if a relation attribute is universal (can link to any object)
|
|
351
351
|
* Universal relations have `targets: [{ object: "*" }]`
|
|
@@ -355,12 +355,12 @@ type RelationAttribute = SingleRelationAttribute | MultiRelationAttribute;
|
|
|
355
355
|
* stripped. Any other attribute type — and a relation row whose config lost
|
|
356
356
|
* its `targets` — yields no names.
|
|
357
357
|
*/
|
|
358
|
-
declare function relationTargetsOf(attribute: Attribute): string[];
|
|
359
|
-
declare function isUniversalRelation(attr: RelationAttribute): boolean;
|
|
358
|
+
export declare function relationTargetsOf(attribute: Attribute): string[];
|
|
359
|
+
export declare function isUniversalRelation(attr: RelationAttribute): boolean;
|
|
360
360
|
/**
|
|
361
361
|
* Check if a relation attribute has bilateral synchronization enabled
|
|
362
362
|
*/
|
|
363
|
-
declare function isBilateralRelation(attr: RelationAttribute): attr is RelationAttribute & {
|
|
363
|
+
export declare function isBilateralRelation(attr: RelationAttribute): attr is RelationAttribute & {
|
|
364
364
|
bilateral: BilateralConfig;
|
|
365
365
|
};
|
|
366
366
|
/**
|
|
@@ -368,7 +368,7 @@ declare function isBilateralRelation(attr: RelationAttribute): attr is RelationA
|
|
|
368
368
|
* - one → many (contact.company ↔ company.contacts)
|
|
369
369
|
* - many → many (contact.tags ↔ tag.contacts)
|
|
370
370
|
*/
|
|
371
|
-
declare function inferInverseCardinality(cardinality: "one" | "many"): "one" | "many";
|
|
371
|
+
export declare function inferInverseCardinality(cardinality: "one" | "many"): "one" | "many";
|
|
372
372
|
/**
|
|
373
373
|
* RichtextAttribute - Rich text content using semantic markdown
|
|
374
374
|
*
|
|
@@ -381,14 +381,14 @@ declare function inferInverseCardinality(cardinality: "one" | "many"): "one" | "
|
|
|
381
381
|
* richtext("content", "Content").required()
|
|
382
382
|
* ```
|
|
383
383
|
*/
|
|
384
|
-
interface RichtextAttribute extends BaseAttribute<string> {
|
|
384
|
+
export interface RichtextAttribute extends BaseAttribute<string> {
|
|
385
385
|
type: "richtext";
|
|
386
386
|
}
|
|
387
|
-
type RichTextAttribute = RichtextAttribute;
|
|
387
|
+
export type RichTextAttribute = RichtextAttribute;
|
|
388
388
|
/**
|
|
389
389
|
* Return type for formula expressions
|
|
390
390
|
*/
|
|
391
|
-
type FormulaReturnType = ComputedReturnType;
|
|
391
|
+
export type FormulaReturnType = ComputedReturnType;
|
|
392
392
|
/**
|
|
393
393
|
* FormulaAttribute - Computed value based on other attributes
|
|
394
394
|
*
|
|
@@ -410,7 +410,7 @@ type FormulaReturnType = ComputedReturnType;
|
|
|
410
410
|
* .returns("text")
|
|
411
411
|
* ```
|
|
412
412
|
*/
|
|
413
|
-
interface FormulaAttribute extends Omit<BaseAttribute<never>, "defaultValue" | "required"> {
|
|
413
|
+
export interface FormulaAttribute extends Omit<BaseAttribute<never>, "defaultValue" | "required"> {
|
|
414
414
|
type: "formula";
|
|
415
415
|
/** Expression to evaluate (e.g., "price * quantity") */
|
|
416
416
|
expression: string;
|
|
@@ -444,7 +444,7 @@ interface FormulaAttribute extends Omit<BaseAttribute<never>, "defaultValue" | "
|
|
|
444
444
|
* - Percent (percentEmpty, percentNotEmpty): Universal
|
|
445
445
|
* - Lookup (original): Returns all values as array, rendered as target type
|
|
446
446
|
*/
|
|
447
|
-
type RollupFunction = "sum" | "avg" | "earliest" | "latest" | "count" | "countValues" | "countUniqueValues" | "countEmpty" | "percentEmpty" | "percentNotEmpty" | "original";
|
|
447
|
+
export type RollupFunction = "sum" | "avg" | "earliest" | "latest" | "count" | "countValues" | "countUniqueValues" | "countEmpty" | "percentEmpty" | "percentNotEmpty" | "original";
|
|
448
448
|
/**
|
|
449
449
|
* RollupAttribute - Aggregates values from related records
|
|
450
450
|
*
|
|
@@ -468,7 +468,7 @@ type RollupFunction = "sum" | "avg" | "earliest" | "latest" | "count" | "countVa
|
|
|
468
468
|
* .using("count")
|
|
469
469
|
* ```
|
|
470
470
|
*/
|
|
471
|
-
interface RollupAttribute extends Omit<BaseAttribute<never>, "defaultValue" | "required"> {
|
|
471
|
+
export interface RollupAttribute extends Omit<BaseAttribute<never>, "defaultValue" | "required"> {
|
|
472
472
|
type: "rollup";
|
|
473
473
|
/** Name of the relation attribute on this object */
|
|
474
474
|
relationAttribute: string;
|
|
@@ -527,7 +527,7 @@ interface RollupAttribute extends Omit<BaseAttribute<never>, "defaultValue" | "r
|
|
|
527
527
|
* .accepts(["application/pdf"])
|
|
528
528
|
* ```
|
|
529
529
|
*/
|
|
530
|
-
interface DocumentAttribute extends BaseAttribute<string[]> {
|
|
530
|
+
export interface DocumentAttribute extends BaseAttribute<string[]> {
|
|
531
531
|
type: "document";
|
|
532
532
|
/**
|
|
533
533
|
* Schema for typed properties on the record→document edge.
|
|
@@ -546,12 +546,11 @@ interface DocumentAttribute extends BaseAttribute<string[]> {
|
|
|
546
546
|
* Use this type when code needs to inspect or render attributes generically
|
|
547
547
|
* across primitive, relation, computed, user, and document fields.
|
|
548
548
|
*/
|
|
549
|
-
type Attribute = TextAttribute | RichtextAttribute | NumberAttribute | CheckboxAttribute | DateAttribute | PhoneAttribute | CurrencyAttribute | StatusAttribute | LocationAttribute | SelectAttribute | MultiselectAttribute | UserAttribute | RelationAttribute | FormulaAttribute | RollupAttribute | DocumentAttribute;
|
|
549
|
+
export type Attribute = TextAttribute | RichtextAttribute | NumberAttribute | CheckboxAttribute | DateAttribute | PhoneAttribute | CurrencyAttribute | StatusAttribute | LocationAttribute | SelectAttribute | MultiselectAttribute | UserAttribute | RelationAttribute | FormulaAttribute | RollupAttribute | DocumentAttribute;
|
|
550
550
|
/**
|
|
551
551
|
* Check if an attribute supports sorting based on its type.
|
|
552
552
|
*/
|
|
553
|
-
declare function isAttributeSortable(attr: {
|
|
553
|
+
export declare function isAttributeSortable(attr: {
|
|
554
554
|
type: AttributeType;
|
|
555
555
|
}): boolean;
|
|
556
|
-
//#endregion
|
|
557
|
-
export { resolvePropertyDefinitions as $, RelationTarget as A, TimeFormat as B, NumberAttribute as C, PhoneAttribute as D, Phone as E, SelectAttribute as F, isBilateralRelation as G, UserReferenceType as H, SingleRelationAttribute as I, OptionPropertyAttribute as J, isUniversalRelation as K, StatusAttribute as L, RichtextAttribute as M, RollupAttribute as N, RELATION_TARGET_ANY as O, RollupFunction as P, hasOptions as Q, StatusGroup as R, MultiselectAttribute as S, Option as T, inferInverseCardinality as U, UserAttribute as V, isAttributeSortable as W, PropertySchema as X, PropertyAttribute as Y, PropertyType as Z, FormulaReturnType as _, BaseAttribute as a, LocationGranularity as b, Currency as c, DateFormat as d, COMPUTED_RETURN_TYPES as et, DatePrecision as f, FormulaAttribute as g, DocumentAttribute as h, AttributeType as i, RichTextAttribute as j, RelationAttribute as k, CurrencyAttribute as l, DateValue as m, Attribute as n, ComputedReturnType as nt, BilateralConfig as o, DateRangeValue as p, relationTargetsOf as q, AttributeGroup as r, CheckboxAttribute as s, ATTRIBUTE_TYPES as t, ComputedOptionsSource as tt, DateAttribute as u, Location as v, NumberUnit as w, MultiRelationAttribute as x, LocationAttribute as y, TextAttribute as z };
|
|
556
|
+
//#endregion
|