@ram_28/kf-ai-sdk 1.0.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.
Files changed (126) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +840 -0
  3. package/dist/api/client.d.ts +78 -0
  4. package/dist/api/client.d.ts.map +1 -0
  5. package/dist/api/datetime.d.ts +21 -0
  6. package/dist/api/datetime.d.ts.map +1 -0
  7. package/dist/api/index.d.ts +7 -0
  8. package/dist/api/index.d.ts.map +1 -0
  9. package/dist/api/metadata.d.ts +75 -0
  10. package/dist/api/metadata.d.ts.map +1 -0
  11. package/dist/components/hooks/index.d.ts +8 -0
  12. package/dist/components/hooks/index.d.ts.map +1 -0
  13. package/dist/components/hooks/useFilter/index.d.ts +5 -0
  14. package/dist/components/hooks/useFilter/index.d.ts.map +1 -0
  15. package/dist/components/hooks/useFilter/payloadBuilder.utils.d.ts +33 -0
  16. package/dist/components/hooks/useFilter/payloadBuilder.utils.d.ts.map +1 -0
  17. package/dist/components/hooks/useFilter/types.d.ts +137 -0
  18. package/dist/components/hooks/useFilter/types.d.ts.map +1 -0
  19. package/dist/components/hooks/useFilter/useFilter.d.ts +3 -0
  20. package/dist/components/hooks/useFilter/useFilter.d.ts.map +1 -0
  21. package/dist/components/hooks/useFilter/validation.utils.d.ts +38 -0
  22. package/dist/components/hooks/useFilter/validation.utils.d.ts.map +1 -0
  23. package/dist/components/hooks/useForm/apiClient.d.ts +71 -0
  24. package/dist/components/hooks/useForm/apiClient.d.ts.map +1 -0
  25. package/dist/components/hooks/useForm/expressionValidator.utils.d.ts +28 -0
  26. package/dist/components/hooks/useForm/expressionValidator.utils.d.ts.map +1 -0
  27. package/dist/components/hooks/useForm/index.d.ts +6 -0
  28. package/dist/components/hooks/useForm/index.d.ts.map +1 -0
  29. package/dist/components/hooks/useForm/optimizedExpressionValidator.utils.d.ts +88 -0
  30. package/dist/components/hooks/useForm/optimizedExpressionValidator.utils.d.ts.map +1 -0
  31. package/dist/components/hooks/useForm/ruleClassifier.utils.d.ts +28 -0
  32. package/dist/components/hooks/useForm/ruleClassifier.utils.d.ts.map +1 -0
  33. package/dist/components/hooks/useForm/schemaParser.utils.d.ts +29 -0
  34. package/dist/components/hooks/useForm/schemaParser.utils.d.ts.map +1 -0
  35. package/dist/components/hooks/useForm/types.d.ts +412 -0
  36. package/dist/components/hooks/useForm/types.d.ts.map +1 -0
  37. package/dist/components/hooks/useForm/useForm.d.ts +3 -0
  38. package/dist/components/hooks/useForm/useForm.d.ts.map +1 -0
  39. package/dist/components/hooks/useKanban/apiClient.d.ts +99 -0
  40. package/dist/components/hooks/useKanban/apiClient.d.ts.map +1 -0
  41. package/dist/components/hooks/useKanban/context.d.ts +4 -0
  42. package/dist/components/hooks/useKanban/context.d.ts.map +1 -0
  43. package/dist/components/hooks/useKanban/dragDropManager.d.ts +27 -0
  44. package/dist/components/hooks/useKanban/dragDropManager.d.ts.map +1 -0
  45. package/dist/components/hooks/useKanban/index.d.ts +6 -0
  46. package/dist/components/hooks/useKanban/index.d.ts.map +1 -0
  47. package/dist/components/hooks/useKanban/types.d.ts +438 -0
  48. package/dist/components/hooks/useKanban/types.d.ts.map +1 -0
  49. package/dist/components/hooks/useKanban/useKanban.d.ts +3 -0
  50. package/dist/components/hooks/useKanban/useKanban.d.ts.map +1 -0
  51. package/dist/components/hooks/useKanban/useKanbanSimple.d.ts +62 -0
  52. package/dist/components/hooks/useKanban/useKanbanSimple.d.ts.map +1 -0
  53. package/dist/components/hooks/useTable/index.d.ts +3 -0
  54. package/dist/components/hooks/useTable/index.d.ts.map +1 -0
  55. package/dist/components/hooks/useTable/types.d.ts +107 -0
  56. package/dist/components/hooks/useTable/types.d.ts.map +1 -0
  57. package/dist/components/hooks/useTable/useTable.d.ts +8 -0
  58. package/dist/components/hooks/useTable/useTable.d.ts.map +1 -0
  59. package/dist/components/index.d.ts +3 -0
  60. package/dist/components/index.d.ts.map +1 -0
  61. package/dist/components/ui/index.d.ts +2 -0
  62. package/dist/components/ui/index.d.ts.map +1 -0
  63. package/dist/components/ui/kanban/Kanban.d.ts +12 -0
  64. package/dist/components/ui/kanban/Kanban.d.ts.map +1 -0
  65. package/dist/components/ui/kanban/index.d.ts +2 -0
  66. package/dist/components/ui/kanban/index.d.ts.map +1 -0
  67. package/dist/index.cjs +45 -0
  68. package/dist/index.d.ts +5 -0
  69. package/dist/index.d.ts.map +1 -0
  70. package/dist/index.mjs +6522 -0
  71. package/dist/types/base-fields.d.ts +182 -0
  72. package/dist/types/base-fields.d.ts.map +1 -0
  73. package/dist/types/common.d.ts +238 -0
  74. package/dist/types/common.d.ts.map +1 -0
  75. package/dist/types/index.d.ts +3 -0
  76. package/dist/types/index.d.ts.map +1 -0
  77. package/dist/utils/cn.d.ts +7 -0
  78. package/dist/utils/cn.d.ts.map +1 -0
  79. package/dist/utils/formatting.d.ts +52 -0
  80. package/dist/utils/formatting.d.ts.map +1 -0
  81. package/dist/utils/index.d.ts +3 -0
  82. package/dist/utils/index.d.ts.map +1 -0
  83. package/package.json +98 -0
  84. package/sdk/api/client.ts +447 -0
  85. package/sdk/api/datetime.ts +33 -0
  86. package/sdk/api/index.ts +61 -0
  87. package/sdk/api/metadata.ts +148 -0
  88. package/sdk/components/hooks/index.ts +34 -0
  89. package/sdk/components/hooks/useFilter/index.ts +37 -0
  90. package/sdk/components/hooks/useFilter/payloadBuilder.utils.ts +298 -0
  91. package/sdk/components/hooks/useFilter/types.ts +158 -0
  92. package/sdk/components/hooks/useFilter/useFilter.llm.txt +497 -0
  93. package/sdk/components/hooks/useFilter/useFilter.ts +494 -0
  94. package/sdk/components/hooks/useFilter/validation.utils.ts +401 -0
  95. package/sdk/components/hooks/useForm/apiClient.ts +441 -0
  96. package/sdk/components/hooks/useForm/expressionValidator.utils.ts +444 -0
  97. package/sdk/components/hooks/useForm/index.ts +64 -0
  98. package/sdk/components/hooks/useForm/optimizedExpressionValidator.utils.ts +482 -0
  99. package/sdk/components/hooks/useForm/ruleClassifier.utils.ts +424 -0
  100. package/sdk/components/hooks/useForm/schemaParser.utils.ts +519 -0
  101. package/sdk/components/hooks/useForm/types.ts +630 -0
  102. package/sdk/components/hooks/useForm/useForm.llm.txt +340 -0
  103. package/sdk/components/hooks/useForm/useForm.ts +821 -0
  104. package/sdk/components/hooks/useKanban/apiClient.ts +494 -0
  105. package/sdk/components/hooks/useKanban/context.ts +14 -0
  106. package/sdk/components/hooks/useKanban/dragDropManager.ts +529 -0
  107. package/sdk/components/hooks/useKanban/index.ts +63 -0
  108. package/sdk/components/hooks/useKanban/types.ts +606 -0
  109. package/sdk/components/hooks/useKanban/useKanban.llm.txt +482 -0
  110. package/sdk/components/hooks/useKanban/useKanban.ts +725 -0
  111. package/sdk/components/hooks/useKanban/useKanbanSimple.ts +389 -0
  112. package/sdk/components/hooks/useTable/index.ts +5 -0
  113. package/sdk/components/hooks/useTable/types.ts +154 -0
  114. package/sdk/components/hooks/useTable/useTable.llm.txt +344 -0
  115. package/sdk/components/hooks/useTable/useTable.ts +413 -0
  116. package/sdk/components/index.ts +15 -0
  117. package/sdk/components/ui/index.ts +2 -0
  118. package/sdk/components/ui/kanban/Kanban.tsx +134 -0
  119. package/sdk/components/ui/kanban/index.ts +11 -0
  120. package/sdk/index.ts +13 -0
  121. package/sdk/types/base-fields.ts +221 -0
  122. package/sdk/types/common.ts +306 -0
  123. package/sdk/types/index.ts +5 -0
  124. package/sdk/utils/cn.ts +10 -0
  125. package/sdk/utils/formatting.ts +212 -0
  126. package/sdk/utils/index.ts +5 -0
@@ -0,0 +1,221 @@
1
+ /**
2
+ * Base field type for ID fields
3
+ * Resolves to: string
4
+ * Use this for all ID-type fields (user IDs, order IDs, etc.)
5
+ */
6
+ export type IdField = string;
7
+
8
+ /**
9
+ * String field with optional literal type constraint and length limits
10
+ * @template T - Literal string type (e.g., 'pending' | 'completed')
11
+ * @template MinLength - Minimum string length (optional)
12
+ * @template MaxLength - Maximum string length (optional)
13
+ * Resolves to: T or string
14
+ * Storage: VARCHAR in database
15
+ *
16
+ * @example
17
+ * StringField // => string
18
+ * StringField<'active' | 'inactive'> // => 'active' | 'inactive'
19
+ * StringField<string, 1, 100> // => string with length constraints
20
+ */
21
+ export type StringField<
22
+ T extends string = string,
23
+ _MinLength extends number = never,
24
+ _MaxLength extends number = never,
25
+ > = T;
26
+
27
+ /**
28
+ * Multi-line text field for longer content
29
+ * Resolves to: string
30
+ * Storage: TEXT in database
31
+ * Use this for descriptions, comments, rich text content
32
+ *
33
+ * @example
34
+ * TextAreaField // => string (multi-line)
35
+ */
36
+ export type TextAreaField = string;
37
+
38
+ /**
39
+ * Numeric field with optional precision constraints
40
+ * @template Precision - Number of decimal places (optional)
41
+ * Resolves to: number
42
+ * Storage: DECIMAL/FLOAT in database
43
+ * Use this for quantities, measurements, calculations
44
+ *
45
+ * @example
46
+ * NumberField // => number
47
+ * NumberField<2> // => number with 2 decimal places
48
+ */
49
+ export type NumberField<_Precision extends number = never> = number;
50
+
51
+ /**
52
+ * Large integer field for big numbers
53
+ * Resolves to: number
54
+ * Storage: BIGINT in database
55
+ * Use this for large counters, timestamps, file sizes
56
+ *
57
+ * @example
58
+ * LongField // => number (large integer)
59
+ */
60
+ export type LongField = number;
61
+
62
+ /**
63
+ * Boolean field
64
+ * Resolves to: boolean
65
+ * Storage: BOOLEAN in database
66
+ * Use this for true/false values, flags, toggles
67
+ */
68
+ export type BooleanField = boolean;
69
+
70
+ /**
71
+ * Date field (date only, no time)
72
+ * Resolves to: Date
73
+ * Storage: DATE in database
74
+ * Use this for birth dates, due dates, calendar events
75
+ *
76
+ * @example
77
+ * DateField // => Date (date only)
78
+ */
79
+ export type DateField = Date;
80
+
81
+ /**
82
+ * DateTime field (date and time)
83
+ * Resolves to: Date
84
+ * Storage: DATETIME/TIMESTAMP in database
85
+ * Use this for created_at, updated_at, event timestamps
86
+ *
87
+ * @example
88
+ * DateTimeField // => Date (with time)
89
+ */
90
+ export type DateTimeField = Date;
91
+
92
+ // ============================================================
93
+ // COMPLEX FIELD TYPES
94
+ // ============================================================
95
+
96
+ /**
97
+ * Currency field supporting multiple value formats
98
+ * Resolves to: CurrencyValue
99
+ * Storage: JSON/VARCHAR in database
100
+ * Use this for prices, monetary amounts, financial data
101
+ *
102
+ * @example
103
+ * CurrencyField // => {value: number, currency: string} | string
104
+ */
105
+ export type CurrencyField = CurrencyValue;
106
+
107
+ /**
108
+ * Currency value format - supports both object and string representations
109
+ */
110
+ export type CurrencyValue =
111
+ | { value: number; currency: string } // Object format: {value: 100.50, currency: "USD"}
112
+ | string; // String format: "100.50 USD" or "USD 100.50"
113
+
114
+ /**
115
+ * JSON field for structured data
116
+ * @template T - Expected JSON structure (optional)
117
+ * Resolves to: T or JSONValue
118
+ * Storage: JSON/TEXT in database
119
+ * Use this for configurations, metadata, flexible schemas
120
+ *
121
+ * @example
122
+ * JSONField // => JSONValue (any valid JSON)
123
+ * JSONField<{settings: {theme: string}}> // => {settings: {theme: string}}
124
+ */
125
+ export type JSONField<T = JSONValue> = T;
126
+
127
+ export type ReferenceField = string;
128
+
129
+ /**
130
+ * Valid JSON value types
131
+ */
132
+ export type JSONValue =
133
+ | string
134
+ | number
135
+ | boolean
136
+ | null
137
+ | JSONObject
138
+ | JSONArray;
139
+
140
+ export interface JSONObject {
141
+ [key: string]: JSONValue;
142
+ }
143
+
144
+ export interface JSONArray extends Array<JSONValue> {}
145
+
146
+ /**
147
+ * Select field for single choice from predefined options
148
+ * @template T - Union of allowed option values
149
+ * Resolves to: T
150
+ * Storage: VARCHAR in database
151
+ * Use this for status fields, categories, enum-like values
152
+ *
153
+ * @example
154
+ * SelectField<'active' | 'inactive' | 'pending'> // => 'active' | 'inactive' | 'pending'
155
+ */
156
+ export type SelectField<T extends string> = T;
157
+
158
+ /**
159
+ * Lookup field for references to other records
160
+ * @template T - Type of the referenced record ID (defaults to string)
161
+ * Resolves to: T
162
+ * Storage: VARCHAR in database (stores the ID)
163
+ * Use this for foreign keys, relationships, references
164
+ *
165
+ * @example
166
+ * LookupField // => string (referenced record ID)
167
+ * LookupField<IdField> // => string (typed as IdField)
168
+ */
169
+ export type LookupField<T extends string = string> = T;
170
+
171
+ // ============================================================
172
+ // CONTAINER AND UTILITY TYPES
173
+ // ============================================================
174
+
175
+ /**
176
+ * Array field with MultiValue support
177
+ * @template T - Type of array elements
178
+ * Resolves to: T[]
179
+ * Storage: JSON in database
180
+ * Use this for tags, categories, multiple selections
181
+ *
182
+ * @example
183
+ * ArrayField<string> // => string[]
184
+ * ArrayField<IdField> // => string[]
185
+ * ArrayField<SelectField<'tag1' | 'tag2'>> // => ('tag1' | 'tag2')[]
186
+ */
187
+ export type ArrayField<T> = T[];
188
+
189
+ /**
190
+ * Nested object field
191
+ * @template T - Shape of nested object
192
+ * Resolves to: T
193
+ * Storage: JSON in database
194
+ * Use this for complex nested structures, embedded documents
195
+ *
196
+ * @example
197
+ * ObjectField<{ name: string; age: number }> // => { name: string; age: number }
198
+ */
199
+ export type ObjectField<T extends Record<string, any>> = T;
200
+
201
+ /**
202
+ * Optional field wrapper
203
+ * @template T - Base field type
204
+ * Resolves to: T | undefined
205
+ * Use this for fields that may not have values
206
+ *
207
+ * @example
208
+ * OptionalField<StringField> // => string | undefined
209
+ * OptionalField<NumberField> // => number | undefined
210
+ */
211
+ export type OptionalField<T> = T | undefined;
212
+
213
+ // ============================================================
214
+ // UTILITY TYPES FOR FIELD VALIDATION
215
+ // ============================================================
216
+
217
+ /**
218
+ * Utility type to extract the base type from a field type
219
+ * Useful for runtime validation and type guards
220
+ */
221
+ export type ExtractFieldType<T> = T extends OptionalField<infer U> ? U : T;
@@ -0,0 +1,306 @@
1
+ /**
2
+ * Sort direction for API queries (matching API spec)
3
+ */
4
+ export type SortDirection = "ASC" | "DESC";
5
+
6
+ /**
7
+ * Sort configuration: array of field-direction mappings
8
+ * Format: [{ "fieldName": "ASC" }, { "anotherField": "DESC" }]
9
+ */
10
+ export type SortOption = Record<string, SortDirection>;
11
+
12
+ /**
13
+ * Sort configuration: array of sort options
14
+ */
15
+ export type Sort = SortOption[];
16
+
17
+ /**
18
+ * Filter operators for individual conditions (leaf nodes)
19
+ */
20
+ export type FilterOperator =
21
+ | "EQ" | "NE" | "GT" | "GTE" | "LT" | "LTE"
22
+ | "Between" | "NotBetween" | "IN" | "NIN"
23
+ | "Empty" | "NotEmpty" | "Contains" | "NotContains"
24
+ | "MinLength" | "MaxLength";
25
+
26
+ /**
27
+ * Logical operators for combining filter conditions (tree nodes)
28
+ */
29
+ export type LogicalOperator = "And" | "Or" | "Not";
30
+
31
+ /**
32
+ * RHS value type for filter conditions
33
+ */
34
+ export type FilterRHSType = "Constant" | "BOField" | "AppVariable";
35
+
36
+ /**
37
+ * Base interface for all filter nodes
38
+ */
39
+ interface FilterNodeBase {
40
+ /** Operator type */
41
+ Operator: FilterOperator | LogicalOperator;
42
+ }
43
+
44
+ /**
45
+ * Leaf filter condition (actual field comparison)
46
+ */
47
+ export interface FilterCondition extends FilterNodeBase {
48
+ /** Condition operator */
49
+ Operator: FilterOperator;
50
+ /** Left-hand side field name */
51
+ LHSField: string;
52
+ /** Right-hand side value */
53
+ RHSValue: any;
54
+ /** Right-hand side type (optional, defaults to Constant) */
55
+ RHSType?: FilterRHSType;
56
+ }
57
+
58
+ /**
59
+ * Logical filter node (combines multiple conditions)
60
+ */
61
+ export interface FilterLogical extends FilterNodeBase {
62
+ /** Logical operator */
63
+ Operator: LogicalOperator;
64
+ /** Nested conditions (can be FilterCondition or FilterLogical) */
65
+ Condition: Array<FilterCondition | FilterLogical>;
66
+ }
67
+
68
+ /**
69
+ * Filter structure matching API specification (root level)
70
+ * This is a discriminated union - a filter is either a logical node or a condition
71
+ */
72
+ export type Filter = FilterLogical;
73
+
74
+ /**
75
+ * Convenience type for any filter node (leaf or logical)
76
+ */
77
+ export type FilterNode = FilterCondition | FilterLogical;
78
+
79
+ /**
80
+ * DateTime encoding format used by the API
81
+ */
82
+ export interface DateTimeEncoded {
83
+ $__dt__: number;
84
+ }
85
+
86
+ /**
87
+ * Date encoding format used by the API
88
+ */
89
+ export interface DateEncoded {
90
+ $__d__: string;
91
+ }
92
+
93
+ /**
94
+ * Standard paginated list response
95
+ * @template T - Type of items in the list
96
+ */
97
+ export interface ListResponse<T> {
98
+ /** Array of items for current page */
99
+ Data: T[];
100
+ }
101
+
102
+ /**
103
+ * Read API response wrapper
104
+ * @template T - Type of the data object
105
+ */
106
+ export interface ReadResponse<T> {
107
+ /** The data object */
108
+ Data: T;
109
+ }
110
+
111
+ /**
112
+ * Create/Update API response
113
+ */
114
+ export interface CreateUpdateResponse {
115
+ /** ID of the created/updated record */
116
+ _id: string;
117
+ }
118
+
119
+ /**
120
+ * Delete API response
121
+ */
122
+ export interface DeleteResponse {
123
+ /** Status of the delete operation */
124
+ status: "success";
125
+ }
126
+
127
+ /**
128
+ * Count API response
129
+ */
130
+ export interface CountResponse {
131
+ /** Total count of matching records */
132
+ Count: number;
133
+ }
134
+
135
+ /**
136
+ * Options for list queries (API request format)
137
+ */
138
+ export interface ListOptions {
139
+ /** Query type (defaults to "List") */
140
+ Type?: "List";
141
+
142
+ /** Specific fields to return */
143
+ Field?: string[];
144
+
145
+ /** Filter criteria */
146
+ Filter?: Filter;
147
+
148
+ /** Sort configuration */
149
+ Sort?: Sort;
150
+
151
+ /** Search query (separate from filters) */
152
+ Search?: string;
153
+
154
+ /** Page number (1-indexed) */
155
+ Page?: number;
156
+
157
+ /** Records per page */
158
+ PageSize?: number;
159
+ }
160
+
161
+ // ============================================================
162
+ // METRIC/AGGREGATE TYPES
163
+ // ============================================================
164
+
165
+ /**
166
+ * Metric aggregation function types
167
+ */
168
+ export type MetricType =
169
+ | "Sum"
170
+ | "Avg"
171
+ | "Count"
172
+ | "Max"
173
+ | "Min"
174
+ | "DistinctCount"
175
+ | "BlankCount"
176
+ | "NotBlankCount"
177
+ | "Concat"
178
+ | "DistinctConcat";
179
+
180
+ /**
181
+ * Metric field configuration
182
+ */
183
+ export interface MetricField {
184
+ /** Field to aggregate */
185
+ Field: string;
186
+ /** Aggregation function type */
187
+ Type: MetricType;
188
+ }
189
+
190
+ /**
191
+ * Options for metric/aggregate queries
192
+ */
193
+ export interface MetricOptions {
194
+ /** Query type (always "Metric") */
195
+ Type: "Metric";
196
+ /** Fields to group by */
197
+ GroupBy: string[];
198
+ /** Metric definitions */
199
+ Metric: MetricField[];
200
+ /** Optional filter criteria */
201
+ Filter?: Filter;
202
+ }
203
+
204
+ /**
205
+ * Response from metric endpoint
206
+ */
207
+ export interface MetricResponse {
208
+ /** Aggregated data rows */
209
+ Data: Record<string, any>[];
210
+ }
211
+
212
+ // ============================================================
213
+ // PIVOT TYPES
214
+ // ============================================================
215
+
216
+ /**
217
+ * Pivot table header item (hierarchical)
218
+ */
219
+ export interface PivotHeaderItem {
220
+ /** Header key/label */
221
+ Key: string;
222
+ /** Child headers for nested grouping */
223
+ Children?: PivotHeaderItem[] | null;
224
+ }
225
+
226
+ /**
227
+ * Pivot response data structure
228
+ */
229
+ export interface PivotResponseData {
230
+ /** Row headers */
231
+ RowHeader: PivotHeaderItem[];
232
+ /** Column headers */
233
+ ColumnHeader: PivotHeaderItem[];
234
+ /** Value matrix [row][column] */
235
+ Value: (number | string | null)[][];
236
+ }
237
+
238
+ /**
239
+ * Options for pivot queries
240
+ */
241
+ export interface PivotOptions {
242
+ /** Query type (always "Pivot") */
243
+ Type: "Pivot";
244
+ /** Row dimension fields */
245
+ Row: string[];
246
+ /** Column dimension fields */
247
+ Column: string[];
248
+ /** Metric definitions */
249
+ Metric: MetricField[];
250
+ /** Optional filter criteria */
251
+ Filter?: Filter;
252
+ }
253
+
254
+ /**
255
+ * Response from pivot endpoint
256
+ */
257
+ export interface PivotResponse {
258
+ /** Pivot data including headers and values */
259
+ Data: PivotResponseData;
260
+ }
261
+
262
+ // ============================================================
263
+ // DRAFT/INTERACTIVE TYPES
264
+ // ============================================================
265
+
266
+ /**
267
+ * Response from draft operations
268
+ */
269
+ export interface DraftResponse {
270
+ /** Computed field values */
271
+ [fieldName: string]: any;
272
+ }
273
+
274
+ // ============================================================
275
+ // FIELDS METADATA TYPES
276
+ // ============================================================
277
+
278
+ /**
279
+ * Response from fields endpoint
280
+ */
281
+ export interface FieldsResponse {
282
+ /** Field metadata */
283
+ Data: Record<string, any>[];
284
+ }
285
+
286
+ // ============================================================
287
+ // FETCH FIELD TYPES
288
+ // ============================================================
289
+
290
+ /**
291
+ * Single option returned from fetch field endpoint
292
+ */
293
+ export interface FetchFieldOption {
294
+ /** The value to be stored */
295
+ Value: string;
296
+ /** The display label */
297
+ Label: string;
298
+ }
299
+
300
+ /**
301
+ * Response from fetch field endpoint
302
+ */
303
+ export interface FetchFieldResponse {
304
+ /** Array of field options */
305
+ Data: FetchFieldOption[];
306
+ }
@@ -0,0 +1,5 @@
1
+ // Base field types
2
+ export * from './base-fields';
3
+
4
+ // Common API types
5
+ export * from './common';
@@ -0,0 +1,10 @@
1
+ import { type ClassValue, clsx } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
+
4
+ /**
5
+ * Utility for merging Tailwind CSS classes
6
+ * Combines clsx for conditional classes and tailwind-merge for deduplication
7
+ */
8
+ export function cn(...inputs: ClassValue[]) {
9
+ return twMerge(clsx(inputs));
10
+ }