@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.
- package/LICENSE +21 -0
- package/README.md +840 -0
- package/dist/api/client.d.ts +78 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/datetime.d.ts +21 -0
- package/dist/api/datetime.d.ts.map +1 -0
- package/dist/api/index.d.ts +7 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/metadata.d.ts +75 -0
- package/dist/api/metadata.d.ts.map +1 -0
- package/dist/components/hooks/index.d.ts +8 -0
- package/dist/components/hooks/index.d.ts.map +1 -0
- package/dist/components/hooks/useFilter/index.d.ts +5 -0
- package/dist/components/hooks/useFilter/index.d.ts.map +1 -0
- package/dist/components/hooks/useFilter/payloadBuilder.utils.d.ts +33 -0
- package/dist/components/hooks/useFilter/payloadBuilder.utils.d.ts.map +1 -0
- package/dist/components/hooks/useFilter/types.d.ts +137 -0
- package/dist/components/hooks/useFilter/types.d.ts.map +1 -0
- package/dist/components/hooks/useFilter/useFilter.d.ts +3 -0
- package/dist/components/hooks/useFilter/useFilter.d.ts.map +1 -0
- package/dist/components/hooks/useFilter/validation.utils.d.ts +38 -0
- package/dist/components/hooks/useFilter/validation.utils.d.ts.map +1 -0
- package/dist/components/hooks/useForm/apiClient.d.ts +71 -0
- package/dist/components/hooks/useForm/apiClient.d.ts.map +1 -0
- package/dist/components/hooks/useForm/expressionValidator.utils.d.ts +28 -0
- package/dist/components/hooks/useForm/expressionValidator.utils.d.ts.map +1 -0
- package/dist/components/hooks/useForm/index.d.ts +6 -0
- package/dist/components/hooks/useForm/index.d.ts.map +1 -0
- package/dist/components/hooks/useForm/optimizedExpressionValidator.utils.d.ts +88 -0
- package/dist/components/hooks/useForm/optimizedExpressionValidator.utils.d.ts.map +1 -0
- package/dist/components/hooks/useForm/ruleClassifier.utils.d.ts +28 -0
- package/dist/components/hooks/useForm/ruleClassifier.utils.d.ts.map +1 -0
- package/dist/components/hooks/useForm/schemaParser.utils.d.ts +29 -0
- package/dist/components/hooks/useForm/schemaParser.utils.d.ts.map +1 -0
- package/dist/components/hooks/useForm/types.d.ts +412 -0
- package/dist/components/hooks/useForm/types.d.ts.map +1 -0
- package/dist/components/hooks/useForm/useForm.d.ts +3 -0
- package/dist/components/hooks/useForm/useForm.d.ts.map +1 -0
- package/dist/components/hooks/useKanban/apiClient.d.ts +99 -0
- package/dist/components/hooks/useKanban/apiClient.d.ts.map +1 -0
- package/dist/components/hooks/useKanban/context.d.ts +4 -0
- package/dist/components/hooks/useKanban/context.d.ts.map +1 -0
- package/dist/components/hooks/useKanban/dragDropManager.d.ts +27 -0
- package/dist/components/hooks/useKanban/dragDropManager.d.ts.map +1 -0
- package/dist/components/hooks/useKanban/index.d.ts +6 -0
- package/dist/components/hooks/useKanban/index.d.ts.map +1 -0
- package/dist/components/hooks/useKanban/types.d.ts +438 -0
- package/dist/components/hooks/useKanban/types.d.ts.map +1 -0
- package/dist/components/hooks/useKanban/useKanban.d.ts +3 -0
- package/dist/components/hooks/useKanban/useKanban.d.ts.map +1 -0
- package/dist/components/hooks/useKanban/useKanbanSimple.d.ts +62 -0
- package/dist/components/hooks/useKanban/useKanbanSimple.d.ts.map +1 -0
- package/dist/components/hooks/useTable/index.d.ts +3 -0
- package/dist/components/hooks/useTable/index.d.ts.map +1 -0
- package/dist/components/hooks/useTable/types.d.ts +107 -0
- package/dist/components/hooks/useTable/types.d.ts.map +1 -0
- package/dist/components/hooks/useTable/useTable.d.ts +8 -0
- package/dist/components/hooks/useTable/useTable.d.ts.map +1 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/ui/index.d.ts +2 -0
- package/dist/components/ui/index.d.ts.map +1 -0
- package/dist/components/ui/kanban/Kanban.d.ts +12 -0
- package/dist/components/ui/kanban/Kanban.d.ts.map +1 -0
- package/dist/components/ui/kanban/index.d.ts +2 -0
- package/dist/components/ui/kanban/index.d.ts.map +1 -0
- package/dist/index.cjs +45 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +6522 -0
- package/dist/types/base-fields.d.ts +182 -0
- package/dist/types/base-fields.d.ts.map +1 -0
- package/dist/types/common.d.ts +238 -0
- package/dist/types/common.d.ts.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/utils/cn.d.ts +7 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils/formatting.d.ts +52 -0
- package/dist/utils/formatting.d.ts.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/package.json +98 -0
- package/sdk/api/client.ts +447 -0
- package/sdk/api/datetime.ts +33 -0
- package/sdk/api/index.ts +61 -0
- package/sdk/api/metadata.ts +148 -0
- package/sdk/components/hooks/index.ts +34 -0
- package/sdk/components/hooks/useFilter/index.ts +37 -0
- package/sdk/components/hooks/useFilter/payloadBuilder.utils.ts +298 -0
- package/sdk/components/hooks/useFilter/types.ts +158 -0
- package/sdk/components/hooks/useFilter/useFilter.llm.txt +497 -0
- package/sdk/components/hooks/useFilter/useFilter.ts +494 -0
- package/sdk/components/hooks/useFilter/validation.utils.ts +401 -0
- package/sdk/components/hooks/useForm/apiClient.ts +441 -0
- package/sdk/components/hooks/useForm/expressionValidator.utils.ts +444 -0
- package/sdk/components/hooks/useForm/index.ts +64 -0
- package/sdk/components/hooks/useForm/optimizedExpressionValidator.utils.ts +482 -0
- package/sdk/components/hooks/useForm/ruleClassifier.utils.ts +424 -0
- package/sdk/components/hooks/useForm/schemaParser.utils.ts +519 -0
- package/sdk/components/hooks/useForm/types.ts +630 -0
- package/sdk/components/hooks/useForm/useForm.llm.txt +340 -0
- package/sdk/components/hooks/useForm/useForm.ts +821 -0
- package/sdk/components/hooks/useKanban/apiClient.ts +494 -0
- package/sdk/components/hooks/useKanban/context.ts +14 -0
- package/sdk/components/hooks/useKanban/dragDropManager.ts +529 -0
- package/sdk/components/hooks/useKanban/index.ts +63 -0
- package/sdk/components/hooks/useKanban/types.ts +606 -0
- package/sdk/components/hooks/useKanban/useKanban.llm.txt +482 -0
- package/sdk/components/hooks/useKanban/useKanban.ts +725 -0
- package/sdk/components/hooks/useKanban/useKanbanSimple.ts +389 -0
- package/sdk/components/hooks/useTable/index.ts +5 -0
- package/sdk/components/hooks/useTable/types.ts +154 -0
- package/sdk/components/hooks/useTable/useTable.llm.txt +344 -0
- package/sdk/components/hooks/useTable/useTable.ts +413 -0
- package/sdk/components/index.ts +15 -0
- package/sdk/components/ui/index.ts +2 -0
- package/sdk/components/ui/kanban/Kanban.tsx +134 -0
- package/sdk/components/ui/kanban/index.ts +11 -0
- package/sdk/index.ts +13 -0
- package/sdk/types/base-fields.ts +221 -0
- package/sdk/types/common.ts +306 -0
- package/sdk/types/index.ts +5 -0
- package/sdk/utils/cn.ts +10 -0
- package/sdk/utils/formatting.ts +212 -0
- package/sdk/utils/index.ts +5 -0
|
@@ -0,0 +1,182 @@
|
|
|
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
|
+
* String field with optional literal type constraint and length limits
|
|
9
|
+
* @template T - Literal string type (e.g., 'pending' | 'completed')
|
|
10
|
+
* @template MinLength - Minimum string length (optional)
|
|
11
|
+
* @template MaxLength - Maximum string length (optional)
|
|
12
|
+
* Resolves to: T or string
|
|
13
|
+
* Storage: VARCHAR in database
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* StringField // => string
|
|
17
|
+
* StringField<'active' | 'inactive'> // => 'active' | 'inactive'
|
|
18
|
+
* StringField<string, 1, 100> // => string with length constraints
|
|
19
|
+
*/
|
|
20
|
+
export type StringField<T extends string = string, _MinLength extends number = never, _MaxLength extends number = never> = T;
|
|
21
|
+
/**
|
|
22
|
+
* Multi-line text field for longer content
|
|
23
|
+
* Resolves to: string
|
|
24
|
+
* Storage: TEXT in database
|
|
25
|
+
* Use this for descriptions, comments, rich text content
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* TextAreaField // => string (multi-line)
|
|
29
|
+
*/
|
|
30
|
+
export type TextAreaField = string;
|
|
31
|
+
/**
|
|
32
|
+
* Numeric field with optional precision constraints
|
|
33
|
+
* @template Precision - Number of decimal places (optional)
|
|
34
|
+
* Resolves to: number
|
|
35
|
+
* Storage: DECIMAL/FLOAT in database
|
|
36
|
+
* Use this for quantities, measurements, calculations
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* NumberField // => number
|
|
40
|
+
* NumberField<2> // => number with 2 decimal places
|
|
41
|
+
*/
|
|
42
|
+
export type NumberField<_Precision extends number = never> = number;
|
|
43
|
+
/**
|
|
44
|
+
* Large integer field for big numbers
|
|
45
|
+
* Resolves to: number
|
|
46
|
+
* Storage: BIGINT in database
|
|
47
|
+
* Use this for large counters, timestamps, file sizes
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* LongField // => number (large integer)
|
|
51
|
+
*/
|
|
52
|
+
export type LongField = number;
|
|
53
|
+
/**
|
|
54
|
+
* Boolean field
|
|
55
|
+
* Resolves to: boolean
|
|
56
|
+
* Storage: BOOLEAN in database
|
|
57
|
+
* Use this for true/false values, flags, toggles
|
|
58
|
+
*/
|
|
59
|
+
export type BooleanField = boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Date field (date only, no time)
|
|
62
|
+
* Resolves to: Date
|
|
63
|
+
* Storage: DATE in database
|
|
64
|
+
* Use this for birth dates, due dates, calendar events
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* DateField // => Date (date only)
|
|
68
|
+
*/
|
|
69
|
+
export type DateField = Date;
|
|
70
|
+
/**
|
|
71
|
+
* DateTime field (date and time)
|
|
72
|
+
* Resolves to: Date
|
|
73
|
+
* Storage: DATETIME/TIMESTAMP in database
|
|
74
|
+
* Use this for created_at, updated_at, event timestamps
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* DateTimeField // => Date (with time)
|
|
78
|
+
*/
|
|
79
|
+
export type DateTimeField = Date;
|
|
80
|
+
/**
|
|
81
|
+
* Currency field supporting multiple value formats
|
|
82
|
+
* Resolves to: CurrencyValue
|
|
83
|
+
* Storage: JSON/VARCHAR in database
|
|
84
|
+
* Use this for prices, monetary amounts, financial data
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* CurrencyField // => {value: number, currency: string} | string
|
|
88
|
+
*/
|
|
89
|
+
export type CurrencyField = CurrencyValue;
|
|
90
|
+
/**
|
|
91
|
+
* Currency value format - supports both object and string representations
|
|
92
|
+
*/
|
|
93
|
+
export type CurrencyValue = {
|
|
94
|
+
value: number;
|
|
95
|
+
currency: string;
|
|
96
|
+
} | string;
|
|
97
|
+
/**
|
|
98
|
+
* JSON field for structured data
|
|
99
|
+
* @template T - Expected JSON structure (optional)
|
|
100
|
+
* Resolves to: T or JSONValue
|
|
101
|
+
* Storage: JSON/TEXT in database
|
|
102
|
+
* Use this for configurations, metadata, flexible schemas
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* JSONField // => JSONValue (any valid JSON)
|
|
106
|
+
* JSONField<{settings: {theme: string}}> // => {settings: {theme: string}}
|
|
107
|
+
*/
|
|
108
|
+
export type JSONField<T = JSONValue> = T;
|
|
109
|
+
export type ReferenceField = string;
|
|
110
|
+
/**
|
|
111
|
+
* Valid JSON value types
|
|
112
|
+
*/
|
|
113
|
+
export type JSONValue = string | number | boolean | null | JSONObject | JSONArray;
|
|
114
|
+
export interface JSONObject {
|
|
115
|
+
[key: string]: JSONValue;
|
|
116
|
+
}
|
|
117
|
+
export interface JSONArray extends Array<JSONValue> {
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Select field for single choice from predefined options
|
|
121
|
+
* @template T - Union of allowed option values
|
|
122
|
+
* Resolves to: T
|
|
123
|
+
* Storage: VARCHAR in database
|
|
124
|
+
* Use this for status fields, categories, enum-like values
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
* SelectField<'active' | 'inactive' | 'pending'> // => 'active' | 'inactive' | 'pending'
|
|
128
|
+
*/
|
|
129
|
+
export type SelectField<T extends string> = T;
|
|
130
|
+
/**
|
|
131
|
+
* Lookup field for references to other records
|
|
132
|
+
* @template T - Type of the referenced record ID (defaults to string)
|
|
133
|
+
* Resolves to: T
|
|
134
|
+
* Storage: VARCHAR in database (stores the ID)
|
|
135
|
+
* Use this for foreign keys, relationships, references
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* LookupField // => string (referenced record ID)
|
|
139
|
+
* LookupField<IdField> // => string (typed as IdField)
|
|
140
|
+
*/
|
|
141
|
+
export type LookupField<T extends string = string> = T;
|
|
142
|
+
/**
|
|
143
|
+
* Array field with MultiValue support
|
|
144
|
+
* @template T - Type of array elements
|
|
145
|
+
* Resolves to: T[]
|
|
146
|
+
* Storage: JSON in database
|
|
147
|
+
* Use this for tags, categories, multiple selections
|
|
148
|
+
*
|
|
149
|
+
* @example
|
|
150
|
+
* ArrayField<string> // => string[]
|
|
151
|
+
* ArrayField<IdField> // => string[]
|
|
152
|
+
* ArrayField<SelectField<'tag1' | 'tag2'>> // => ('tag1' | 'tag2')[]
|
|
153
|
+
*/
|
|
154
|
+
export type ArrayField<T> = T[];
|
|
155
|
+
/**
|
|
156
|
+
* Nested object field
|
|
157
|
+
* @template T - Shape of nested object
|
|
158
|
+
* Resolves to: T
|
|
159
|
+
* Storage: JSON in database
|
|
160
|
+
* Use this for complex nested structures, embedded documents
|
|
161
|
+
*
|
|
162
|
+
* @example
|
|
163
|
+
* ObjectField<{ name: string; age: number }> // => { name: string; age: number }
|
|
164
|
+
*/
|
|
165
|
+
export type ObjectField<T extends Record<string, any>> = T;
|
|
166
|
+
/**
|
|
167
|
+
* Optional field wrapper
|
|
168
|
+
* @template T - Base field type
|
|
169
|
+
* Resolves to: T | undefined
|
|
170
|
+
* Use this for fields that may not have values
|
|
171
|
+
*
|
|
172
|
+
* @example
|
|
173
|
+
* OptionalField<StringField> // => string | undefined
|
|
174
|
+
* OptionalField<NumberField> // => number | undefined
|
|
175
|
+
*/
|
|
176
|
+
export type OptionalField<T> = T | undefined;
|
|
177
|
+
/**
|
|
178
|
+
* Utility type to extract the base type from a field type
|
|
179
|
+
* Useful for runtime validation and type guards
|
|
180
|
+
*/
|
|
181
|
+
export type ExtractFieldType<T> = T extends OptionalField<infer U> ? U : T;
|
|
182
|
+
//# sourceMappingURL=base-fields.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-fields.d.ts","sourceRoot":"","sources":["../../sdk/types/base-fields.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAE7B;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,WAAW,CACrB,CAAC,SAAS,MAAM,GAAG,MAAM,EACzB,UAAU,SAAS,MAAM,GAAG,KAAK,EACjC,UAAU,SAAS,MAAM,GAAG,KAAK,IAC/B,CAAC,CAAC;AAEN;;;;;;;;GAQG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AAEnC;;;;;;;;;;GAUG;AACH,MAAM,MAAM,WAAW,CAAC,UAAU,SAAS,MAAM,GAAG,KAAK,IAAI,MAAM,CAAC;AAEpE;;;;;;;;GAQG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC;AAEnC;;;;;;;;GAQG;AACH,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC;AAE7B;;;;;;;;GAQG;AACH,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC;AAMjC;;;;;;;;GAQG;AACH,MAAM,MAA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
*/
|
|
4
|
+
export type SortDirection = "ASC" | "DESC";
|
|
5
|
+
/**
|
|
6
|
+
* Sort configuration: array of field-direction mappings
|
|
7
|
+
* Format: [{ "fieldName": "ASC" }, { "anotherField": "DESC" }]
|
|
8
|
+
*/
|
|
9
|
+
export type SortOption = Record<string, SortDirection>;
|
|
10
|
+
/**
|
|
11
|
+
* Sort configuration: array of sort options
|
|
12
|
+
*/
|
|
13
|
+
export type Sort = SortOption[];
|
|
14
|
+
/**
|
|
15
|
+
* Filter operators for individual conditions (leaf nodes)
|
|
16
|
+
*/
|
|
17
|
+
export type FilterOperator = "EQ" | "NE" | "GT" | "GTE" | "LT" | "LTE" | "Between" | "NotBetween" | "IN" | "NIN" | "Empty" | "NotEmpty" | "Contains" | "NotContains" | "MinLength" | "MaxLength";
|
|
18
|
+
/**
|
|
19
|
+
* Logical operators for combining filter conditions (tree nodes)
|
|
20
|
+
*/
|
|
21
|
+
export type LogicalOperator = "And" | "Or" | "Not";
|
|
22
|
+
/**
|
|
23
|
+
* RHS value type for filter conditions
|
|
24
|
+
*/
|
|
25
|
+
export type FilterRHSType = "Constant" | "BOField" | "AppVariable";
|
|
26
|
+
/**
|
|
27
|
+
* Base interface for all filter nodes
|
|
28
|
+
*/
|
|
29
|
+
interface FilterNodeBase {
|
|
30
|
+
/** Operator type */
|
|
31
|
+
Operator: FilterOperator | LogicalOperator;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Leaf filter condition (actual field comparison)
|
|
35
|
+
*/
|
|
36
|
+
export interface FilterCondition extends FilterNodeBase {
|
|
37
|
+
/** Condition operator */
|
|
38
|
+
Operator: FilterOperator;
|
|
39
|
+
/** Left-hand side field name */
|
|
40
|
+
LHSField: string;
|
|
41
|
+
/** Right-hand side value */
|
|
42
|
+
RHSValue: any;
|
|
43
|
+
/** Right-hand side type (optional, defaults to Constant) */
|
|
44
|
+
RHSType?: FilterRHSType;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Logical filter node (combines multiple conditions)
|
|
48
|
+
*/
|
|
49
|
+
export interface FilterLogical extends FilterNodeBase {
|
|
50
|
+
/** Logical operator */
|
|
51
|
+
Operator: LogicalOperator;
|
|
52
|
+
/** Nested conditions (can be FilterCondition or FilterLogical) */
|
|
53
|
+
Condition: Array<FilterCondition | FilterLogical>;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Filter structure matching API specification (root level)
|
|
57
|
+
* This is a discriminated union - a filter is either a logical node or a condition
|
|
58
|
+
*/
|
|
59
|
+
export type Filter = FilterLogical;
|
|
60
|
+
/**
|
|
61
|
+
* Convenience type for any filter node (leaf or logical)
|
|
62
|
+
*/
|
|
63
|
+
export type FilterNode = FilterCondition | FilterLogical;
|
|
64
|
+
/**
|
|
65
|
+
* DateTime encoding format used by the API
|
|
66
|
+
*/
|
|
67
|
+
export interface DateTimeEncoded {
|
|
68
|
+
$__dt__: number;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Date encoding format used by the API
|
|
72
|
+
*/
|
|
73
|
+
export interface DateEncoded {
|
|
74
|
+
$__d__: string;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Standard paginated list response
|
|
78
|
+
* @template T - Type of items in the list
|
|
79
|
+
*/
|
|
80
|
+
export interface ListResponse<T> {
|
|
81
|
+
/** Array of items for current page */
|
|
82
|
+
Data: T[];
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Read API response wrapper
|
|
86
|
+
* @template T - Type of the data object
|
|
87
|
+
*/
|
|
88
|
+
export interface ReadResponse<T> {
|
|
89
|
+
/** The data object */
|
|
90
|
+
Data: T;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Create/Update API response
|
|
94
|
+
*/
|
|
95
|
+
export interface CreateUpdateResponse {
|
|
96
|
+
/** ID of the created/updated record */
|
|
97
|
+
_id: string;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Delete API response
|
|
101
|
+
*/
|
|
102
|
+
export interface DeleteResponse {
|
|
103
|
+
/** Status of the delete operation */
|
|
104
|
+
status: "success";
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Count API response
|
|
108
|
+
*/
|
|
109
|
+
export interface CountResponse {
|
|
110
|
+
/** Total count of matching records */
|
|
111
|
+
Count: number;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Options for list queries (API request format)
|
|
115
|
+
*/
|
|
116
|
+
export interface ListOptions {
|
|
117
|
+
/** Query type (defaults to "List") */
|
|
118
|
+
Type?: "List";
|
|
119
|
+
/** Specific fields to return */
|
|
120
|
+
Field?: string[];
|
|
121
|
+
/** Filter criteria */
|
|
122
|
+
Filter?: Filter;
|
|
123
|
+
/** Sort configuration */
|
|
124
|
+
Sort?: Sort;
|
|
125
|
+
/** Search query (separate from filters) */
|
|
126
|
+
Search?: string;
|
|
127
|
+
/** Page number (1-indexed) */
|
|
128
|
+
Page?: number;
|
|
129
|
+
/** Records per page */
|
|
130
|
+
PageSize?: number;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Metric aggregation function types
|
|
134
|
+
*/
|
|
135
|
+
export type MetricType = "Sum" | "Avg" | "Count" | "Max" | "Min" | "DistinctCount" | "BlankCount" | "NotBlankCount" | "Concat" | "DistinctConcat";
|
|
136
|
+
/**
|
|
137
|
+
* Metric field configuration
|
|
138
|
+
*/
|
|
139
|
+
export interface MetricField {
|
|
140
|
+
/** Field to aggregate */
|
|
141
|
+
Field: string;
|
|
142
|
+
/** Aggregation function type */
|
|
143
|
+
Type: MetricType;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Options for metric/aggregate queries
|
|
147
|
+
*/
|
|
148
|
+
export interface MetricOptions {
|
|
149
|
+
/** Query type (always "Metric") */
|
|
150
|
+
Type: "Metric";
|
|
151
|
+
/** Fields to group by */
|
|
152
|
+
GroupBy: string[];
|
|
153
|
+
/** Metric definitions */
|
|
154
|
+
Metric: MetricField[];
|
|
155
|
+
/** Optional filter criteria */
|
|
156
|
+
Filter?: Filter;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Response from metric endpoint
|
|
160
|
+
*/
|
|
161
|
+
export interface MetricResponse {
|
|
162
|
+
/** Aggregated data rows */
|
|
163
|
+
Data: Record<string, any>[];
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Pivot table header item (hierarchical)
|
|
167
|
+
*/
|
|
168
|
+
export interface PivotHeaderItem {
|
|
169
|
+
/** Header key/label */
|
|
170
|
+
Key: string;
|
|
171
|
+
/** Child headers for nested grouping */
|
|
172
|
+
Children?: PivotHeaderItem[] | null;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Pivot response data structure
|
|
176
|
+
*/
|
|
177
|
+
export interface PivotResponseData {
|
|
178
|
+
/** Row headers */
|
|
179
|
+
RowHeader: PivotHeaderItem[];
|
|
180
|
+
/** Column headers */
|
|
181
|
+
ColumnHeader: PivotHeaderItem[];
|
|
182
|
+
/** Value matrix [row][column] */
|
|
183
|
+
Value: (number | string | null)[][];
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Options for pivot queries
|
|
187
|
+
*/
|
|
188
|
+
export interface PivotOptions {
|
|
189
|
+
/** Query type (always "Pivot") */
|
|
190
|
+
Type: "Pivot";
|
|
191
|
+
/** Row dimension fields */
|
|
192
|
+
Row: string[];
|
|
193
|
+
/** Column dimension fields */
|
|
194
|
+
Column: string[];
|
|
195
|
+
/** Metric definitions */
|
|
196
|
+
Metric: MetricField[];
|
|
197
|
+
/** Optional filter criteria */
|
|
198
|
+
Filter?: Filter;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Response from pivot endpoint
|
|
202
|
+
*/
|
|
203
|
+
export interface PivotResponse {
|
|
204
|
+
/** Pivot data including headers and values */
|
|
205
|
+
Data: PivotResponseData;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Response from draft operations
|
|
209
|
+
*/
|
|
210
|
+
export interface DraftResponse {
|
|
211
|
+
/** Computed field values */
|
|
212
|
+
[fieldName: string]: any;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Response from fields endpoint
|
|
216
|
+
*/
|
|
217
|
+
export interface FieldsResponse {
|
|
218
|
+
/** Field metadata */
|
|
219
|
+
Data: Record<string, any>[];
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Single option returned from fetch field endpoint
|
|
223
|
+
*/
|
|
224
|
+
export interface FetchFieldOption {
|
|
225
|
+
/** The value to be stored */
|
|
226
|
+
Value: string;
|
|
227
|
+
/** The display label */
|
|
228
|
+
Label: string;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Response from fetch field endpoint
|
|
232
|
+
*/
|
|
233
|
+
export interface FetchFieldResponse {
|
|
234
|
+
/** Array of field options */
|
|
235
|
+
Data: FetchFieldOption[];
|
|
236
|
+
}
|
|
237
|
+
export {};
|
|
238
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../sdk/types/common.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,MAAM,CAAC;AAE3C;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,IAAI,GAAG,UAAU,EAAE,CAAC;AAEhC;;GAEG;AACH,MAAM,MAAM,cAAc,GACtB,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,GACzC,SAAS,GAAG,YAAY,GAAG,IAAI,GAAG,KAAK,GACvC,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,aAAa,GACjD,WAAW,GAAG,WAAW,CAAC;AAE9B;;GAEG;AACH,MAAM,M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,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../sdk/types/index.ts"],"names":[],"mappings":"AACA,cAAc,eAAe,CAAC;AAG9B,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ClassValue } from "clsx";
|
|
2
|
+
/**
|
|
3
|
+
* Utility for merging Tailwind CSS classes
|
|
4
|
+
* Combines clsx for conditional classes and tailwind-merge for deduplication
|
|
5
|
+
*/
|
|
6
|
+
export declare function cn(...inputs: ClassValue[]): string;
|
|
7
|
+
//# sourceMappingURL=cn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../sdk/utils/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAC;AAG7C;;;GAGG;AACH,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { CurrencyValue, JSONValue } from '../types/base-fields';
|
|
2
|
+
/**
|
|
3
|
+
* Data formatting utilities for display and conversion
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Format currency value for display
|
|
7
|
+
*/
|
|
8
|
+
export declare function formatCurrency(value: CurrencyValue): string;
|
|
9
|
+
/**
|
|
10
|
+
* Parse currency string to currency object
|
|
11
|
+
*/
|
|
12
|
+
export declare function parseCurrency(value: string): CurrencyValue | null;
|
|
13
|
+
/**
|
|
14
|
+
* Format date for display
|
|
15
|
+
*/
|
|
16
|
+
export declare function formatDate(date: Date, format?: 'short' | 'medium' | 'long'): string;
|
|
17
|
+
/**
|
|
18
|
+
* Format datetime for display
|
|
19
|
+
*/
|
|
20
|
+
export declare function formatDateTime(date: Date, format?: 'short' | 'medium' | 'long'): string;
|
|
21
|
+
/**
|
|
22
|
+
* Format number with precision
|
|
23
|
+
*/
|
|
24
|
+
export declare function formatNumber(value: number, precision?: number): string;
|
|
25
|
+
/**
|
|
26
|
+
* Format JSON value for display
|
|
27
|
+
*/
|
|
28
|
+
export declare function formatJSON(value: JSONValue, indent?: number): string;
|
|
29
|
+
/**
|
|
30
|
+
* Format array values for display
|
|
31
|
+
*/
|
|
32
|
+
export declare function formatArray<T>(array: T[], formatter?: (item: T) => string, separator?: string): string;
|
|
33
|
+
/**
|
|
34
|
+
* Format boolean for display
|
|
35
|
+
*/
|
|
36
|
+
export declare function formatBoolean(value: boolean, options?: {
|
|
37
|
+
trueLabel?: string;
|
|
38
|
+
falseLabel?: string;
|
|
39
|
+
}): string;
|
|
40
|
+
/**
|
|
41
|
+
* Truncate string with ellipsis
|
|
42
|
+
*/
|
|
43
|
+
export declare function truncateString(value: string, maxLength?: number): string;
|
|
44
|
+
/**
|
|
45
|
+
* Format text area content for display (handle line breaks)
|
|
46
|
+
*/
|
|
47
|
+
export declare function formatTextArea(value: string, maxLines?: number): string;
|
|
48
|
+
/**
|
|
49
|
+
* Generic formatter that automatically detects field type and formats accordingly
|
|
50
|
+
*/
|
|
51
|
+
export declare function formatFieldValue(value: any, fieldType?: 'id' | 'string' | 'textarea' | 'number' | 'boolean' | 'date' | 'datetime' | 'currency' | 'json' | 'array'): string;
|
|
52
|
+
//# sourceMappingURL=formatting.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatting.d.ts","sourceRoot":"","sources":["../../sdk/utils/formatting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAErE;;GAEG;AAEH;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAc3D;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAcjE;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,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d.ts","sourceRoot":"","sources":["../../sdk/utils/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAC;AAG7B,cAAc,MAAM,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ram_28/kf-ai-sdk",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Type-safe, AI-driven SDK for building modern web applications with role-based access control",
|
|
5
|
+
"author": "Ramprasad",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "./dist/index.cjs",
|
|
9
|
+
"module": "./dist/index.mjs",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"default": "./dist/index.mjs"
|
|
16
|
+
},
|
|
17
|
+
"require": {
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"default": "./dist/index.cjs"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist",
|
|
25
|
+
"sdk",
|
|
26
|
+
"README.md",
|
|
27
|
+
"LICENSE"
|
|
28
|
+
],
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "https://github.com/Ramprasad-2809/kf-ai-sdk.git"
|
|
32
|
+
},
|
|
33
|
+
"homepage": "https://github.com/Ramprasad-2809/kf-ai-sdk#readme",
|
|
34
|
+
"bugs": {
|
|
35
|
+
"url": "https://github.com/Ramprasad-2809/kf-ai-sdk/issues"
|
|
36
|
+
},
|
|
37
|
+
"keywords": [
|
|
38
|
+
"sdk",
|
|
39
|
+
"react",
|
|
40
|
+
"hooks",
|
|
41
|
+
"typescript",
|
|
42
|
+
"useForm",
|
|
43
|
+
"useTable",
|
|
44
|
+
"useKanban",
|
|
45
|
+
"useFilter",
|
|
46
|
+
"form-validation",
|
|
47
|
+
"data-table",
|
|
48
|
+
"kanban-board",
|
|
49
|
+
"api-client",
|
|
50
|
+
"type-safe"
|
|
51
|
+
],
|
|
52
|
+
"publishConfig": {
|
|
53
|
+
"access": "public"
|
|
54
|
+
},
|
|
55
|
+
"scripts": {
|
|
56
|
+
"dev": "vite --config config/vite.config.js",
|
|
57
|
+
"build": "vite build --config config/vite.config.js && tsc --project tsconfig.build.json",
|
|
58
|
+
"preview": "vite preview --config config/vite.config.js",
|
|
59
|
+
"lint": "eslint sdk --ext .ts,.tsx",
|
|
60
|
+
"lint:fix": "eslint sdk --ext .ts,.tsx --fix",
|
|
61
|
+
"format": "prettier --write .",
|
|
62
|
+
"format:check": "prettier --check .",
|
|
63
|
+
"test": "vitest",
|
|
64
|
+
"test:watch": "vitest --watch",
|
|
65
|
+
"typecheck": "tsc --noEmit",
|
|
66
|
+
"prepublishOnly": "npm run build"
|
|
67
|
+
},
|
|
68
|
+
"dependencies": {
|
|
69
|
+
"@tanstack/react-virtual": "^3.0.0-beta.68",
|
|
70
|
+
"clsx": "^2.1.1",
|
|
71
|
+
"react-hook-form": "^7.48.2",
|
|
72
|
+
"tailwind-merge": "^3.4.0"
|
|
73
|
+
},
|
|
74
|
+
"peerDependencies": {
|
|
75
|
+
"react": ">=16.8.0",
|
|
76
|
+
"@tanstack/react-query": "^5.0.0"
|
|
77
|
+
},
|
|
78
|
+
"devDependencies": {
|
|
79
|
+
"@tanstack/react-query": "^5.17.0",
|
|
80
|
+
"@types/node": "^20.11.0",
|
|
81
|
+
"@types/react": "^18.2.0",
|
|
82
|
+
"@typescript-eslint/eslint-plugin": "^6.19.0",
|
|
83
|
+
"@typescript-eslint/parser": "^6.19.0",
|
|
84
|
+
"eslint": "^8.56.0",
|
|
85
|
+
"eslint-config-prettier": "^9.1.0",
|
|
86
|
+
"prettier": "^3.2.4",
|
|
87
|
+
"react": "^18.2.0",
|
|
88
|
+
"typescript": "^5.3.3",
|
|
89
|
+
"vite": "^5.0.0",
|
|
90
|
+
"vitest": "^1.2.0"
|
|
91
|
+
},
|
|
92
|
+
"engines": {
|
|
93
|
+
"node": ">=18.0.0"
|
|
94
|
+
},
|
|
95
|
+
"overrides": {
|
|
96
|
+
"csstype": "3.1.3"
|
|
97
|
+
}
|
|
98
|
+
}
|