@ram_28/kf-ai-sdk 2.0.1 → 2.0.3

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 (193) hide show
  1. package/README.md +36 -39
  2. package/dist/BaseField-B6da88U7.js +40 -0
  3. package/dist/BaseField-Drp0-OxL.cjs +1 -0
  4. package/dist/api/client.d.ts +7 -0
  5. package/dist/api/client.d.ts.map +1 -1
  6. package/dist/api/index.d.ts +1 -1
  7. package/dist/api/index.d.ts.map +1 -1
  8. package/dist/api/metadata.d.ts +26 -22
  9. package/dist/api/metadata.d.ts.map +1 -1
  10. package/dist/api.cjs +1 -1
  11. package/dist/api.mjs +3 -3
  12. package/dist/auth.cjs +1 -1
  13. package/dist/auth.mjs +2 -2
  14. package/dist/base-types.d.ts +1 -1
  15. package/dist/base-types.d.ts.map +1 -1
  16. package/dist/bdo/core/BaseBdo.d.ts +12 -20
  17. package/dist/bdo/core/BaseBdo.d.ts.map +1 -1
  18. package/dist/bdo/core/Item.d.ts +8 -44
  19. package/dist/bdo/core/Item.d.ts.map +1 -1
  20. package/dist/bdo/core/types.d.ts +124 -41
  21. package/dist/bdo/core/types.d.ts.map +1 -1
  22. package/dist/bdo/fields/ArrayField.d.ts +5 -4
  23. package/dist/bdo/fields/ArrayField.d.ts.map +1 -1
  24. package/dist/bdo/fields/BaseField.d.ts +14 -19
  25. package/dist/bdo/fields/BaseField.d.ts.map +1 -1
  26. package/dist/bdo/fields/BooleanField.d.ts +3 -4
  27. package/dist/bdo/fields/BooleanField.d.ts.map +1 -1
  28. package/dist/bdo/fields/DateField.d.ts +3 -4
  29. package/dist/bdo/fields/DateField.d.ts.map +1 -1
  30. package/dist/bdo/fields/DateTimeField.d.ts +5 -4
  31. package/dist/bdo/fields/DateTimeField.d.ts.map +1 -1
  32. package/dist/bdo/fields/FileField.d.ts +18 -0
  33. package/dist/bdo/fields/FileField.d.ts.map +1 -0
  34. package/dist/bdo/fields/NumberField.d.ts +6 -4
  35. package/dist/bdo/fields/NumberField.d.ts.map +1 -1
  36. package/dist/bdo/fields/ObjectField.d.ts +5 -4
  37. package/dist/bdo/fields/ObjectField.d.ts.map +1 -1
  38. package/dist/bdo/fields/ReferenceField.d.ts +13 -14
  39. package/dist/bdo/fields/ReferenceField.d.ts.map +1 -1
  40. package/dist/bdo/fields/SelectField.d.ts +9 -16
  41. package/dist/bdo/fields/SelectField.d.ts.map +1 -1
  42. package/dist/bdo/fields/StringField.d.ts +6 -4
  43. package/dist/bdo/fields/StringField.d.ts.map +1 -1
  44. package/dist/bdo/fields/TextAreaField.d.ts +1 -18
  45. package/dist/bdo/fields/TextAreaField.d.ts.map +1 -1
  46. package/dist/bdo/fields/TextField.d.ts +22 -0
  47. package/dist/bdo/fields/TextField.d.ts.map +1 -0
  48. package/dist/bdo/fields/UserField.d.ts +20 -0
  49. package/dist/bdo/fields/UserField.d.ts.map +1 -0
  50. package/dist/bdo/fields/index.d.ts +5 -2
  51. package/dist/bdo/fields/index.d.ts.map +1 -1
  52. package/dist/bdo/index.d.ts +2 -2
  53. package/dist/bdo/index.d.ts.map +1 -1
  54. package/dist/bdo.cjs +1 -1
  55. package/dist/bdo.d.ts +1 -5
  56. package/dist/bdo.d.ts.map +1 -1
  57. package/dist/bdo.mjs +286 -243
  58. package/dist/bdo.types.d.ts +2 -3
  59. package/dist/bdo.types.d.ts.map +1 -1
  60. package/dist/{client-BIkaIr2y.js → client-BULEEaCP.js} +84 -79
  61. package/dist/client-DtPpfJc1.cjs +1 -0
  62. package/dist/components/hooks/useFilter/useFilter.d.ts.map +1 -1
  63. package/dist/components/hooks/useForm/createItemProxy.d.ts.map +1 -1
  64. package/dist/components/hooks/useForm/createResolver.d.ts +12 -2
  65. package/dist/components/hooks/useForm/createResolver.d.ts.map +1 -1
  66. package/dist/components/hooks/useForm/index.d.ts +1 -1
  67. package/dist/components/hooks/useForm/index.d.ts.map +1 -1
  68. package/dist/components/hooks/useForm/types.d.ts +77 -8
  69. package/dist/components/hooks/useForm/types.d.ts.map +1 -1
  70. package/dist/components/hooks/useForm/useDraftInteraction.d.ts +26 -0
  71. package/dist/components/hooks/useForm/useDraftInteraction.d.ts.map +1 -0
  72. package/dist/components/hooks/useForm/useForm.d.ts +2 -27
  73. package/dist/components/hooks/useForm/useForm.d.ts.map +1 -1
  74. package/dist/components/hooks/useTable/useTable.d.ts.map +1 -1
  75. package/dist/{constants-DaX7GLgl.js → constants-BQrBcCON.js} +37 -13
  76. package/dist/constants-D0J69if5.cjs +1 -0
  77. package/dist/error-handling-CAoD0Kwb.cjs +1 -0
  78. package/dist/error-handling-CrhTtD88.js +14 -0
  79. package/dist/filter.cjs +1 -1
  80. package/dist/filter.mjs +2 -2
  81. package/dist/form.cjs +1 -1
  82. package/dist/form.d.ts +1 -1
  83. package/dist/form.d.ts.map +1 -1
  84. package/dist/form.mjs +333 -1142
  85. package/dist/form.types.d.ts +1 -1
  86. package/dist/form.types.d.ts.map +1 -1
  87. package/dist/index.d.ts +2 -1
  88. package/dist/index.d.ts.map +1 -1
  89. package/dist/index.esm-Cj63v5ny.js +1014 -0
  90. package/dist/index.esm-DuwT11sx.cjs +1 -0
  91. package/dist/{metadata-Bz8zJqC1.cjs → metadata-BJWukIqS.cjs} +1 -1
  92. package/dist/{metadata-VbQzyD2C.js → metadata-CJuFxytC.js} +1 -1
  93. package/dist/table.cjs +1 -1
  94. package/dist/table.mjs +116 -122
  95. package/dist/types/base-fields.d.ts +24 -59
  96. package/dist/types/base-fields.d.ts.map +1 -1
  97. package/dist/types/constants.d.ts +2 -2
  98. package/dist/types/constants.d.ts.map +1 -1
  99. package/dist/useFilter-Bg0jvIL6.cjs +1 -0
  100. package/dist/useFilter-DPNLKY3H.js +118 -0
  101. package/dist/utils/formatting.d.ts +10 -1
  102. package/dist/utils/formatting.d.ts.map +1 -1
  103. package/dist/workflow/Activity.d.ts +85 -0
  104. package/dist/workflow/Activity.d.ts.map +1 -0
  105. package/dist/workflow/ActivityInstance.d.ts +96 -0
  106. package/dist/workflow/ActivityInstance.d.ts.map +1 -0
  107. package/dist/workflow/client.d.ts +39 -0
  108. package/dist/workflow/client.d.ts.map +1 -0
  109. package/dist/workflow/components/useActivityForm/createActivityItemProxy.d.ts +16 -0
  110. package/dist/workflow/components/useActivityForm/createActivityItemProxy.d.ts.map +1 -0
  111. package/dist/workflow/components/useActivityForm/createActivityResolver.d.ts +22 -0
  112. package/dist/workflow/components/useActivityForm/createActivityResolver.d.ts.map +1 -0
  113. package/dist/workflow/components/useActivityForm/index.d.ts +3 -0
  114. package/dist/workflow/components/useActivityForm/index.d.ts.map +1 -0
  115. package/dist/workflow/components/useActivityForm/types.d.ts +80 -0
  116. package/dist/workflow/components/useActivityForm/types.d.ts.map +1 -0
  117. package/dist/workflow/components/useActivityForm/useActivityForm.d.ts +4 -0
  118. package/dist/workflow/components/useActivityForm/useActivityForm.d.ts.map +1 -0
  119. package/dist/workflow/index.d.ts +8 -0
  120. package/dist/workflow/index.d.ts.map +1 -0
  121. package/dist/workflow/types.d.ts +53 -0
  122. package/dist/workflow/types.d.ts.map +1 -0
  123. package/dist/workflow.cjs +1 -0
  124. package/dist/workflow.d.ts +8 -0
  125. package/dist/workflow.d.ts.map +1 -0
  126. package/dist/workflow.mjs +565 -0
  127. package/dist/workflow.types.cjs +1 -0
  128. package/dist/workflow.types.d.ts +2 -0
  129. package/dist/workflow.types.d.ts.map +1 -0
  130. package/dist/workflow.types.mjs +1 -0
  131. package/docs/api.md +140 -572
  132. package/docs/bdo.md +742 -0
  133. package/docs/useAuth.md +10 -4
  134. package/docs/useFilter.md +40 -40
  135. package/docs/useForm.md +91 -62
  136. package/docs/useTable.md +38 -38
  137. package/docs/workflow.md +703 -0
  138. package/package.json +21 -1
  139. package/sdk/api/client.ts +77 -57
  140. package/sdk/api/index.ts +1 -0
  141. package/sdk/api/metadata.ts +22 -20
  142. package/sdk/base-types.ts +5 -9
  143. package/sdk/bdo/core/BaseBdo.ts +23 -38
  144. package/sdk/bdo/core/Item.ts +34 -56
  145. package/sdk/bdo/core/types.ts +147 -45
  146. package/sdk/bdo/fields/ArrayField.ts +9 -5
  147. package/sdk/bdo/fields/BaseField.ts +19 -29
  148. package/sdk/bdo/fields/BooleanField.ts +4 -5
  149. package/sdk/bdo/fields/DateField.ts +4 -5
  150. package/sdk/bdo/fields/DateTimeField.ts +9 -5
  151. package/sdk/bdo/fields/FileField.ts +39 -0
  152. package/sdk/bdo/fields/NumberField.ts +8 -5
  153. package/sdk/bdo/fields/ObjectField.ts +9 -5
  154. package/sdk/bdo/fields/ReferenceField.ts +22 -28
  155. package/sdk/bdo/fields/SelectField.ts +13 -26
  156. package/sdk/bdo/fields/StringField.ts +10 -5
  157. package/sdk/bdo/fields/TextAreaField.ts +3 -32
  158. package/sdk/bdo/fields/TextField.ts +42 -0
  159. package/sdk/bdo/fields/UserField.ts +52 -0
  160. package/sdk/bdo/fields/index.ts +5 -2
  161. package/sdk/bdo/index.ts +19 -4
  162. package/sdk/bdo.ts +4 -31
  163. package/sdk/bdo.types.ts +26 -21
  164. package/sdk/components/hooks/useFilter/useFilter.ts +13 -30
  165. package/sdk/components/hooks/useForm/createItemProxy.ts +47 -11
  166. package/sdk/components/hooks/useForm/createResolver.ts +65 -6
  167. package/sdk/components/hooks/useForm/index.ts +4 -0
  168. package/sdk/components/hooks/useForm/types.ts +92 -9
  169. package/sdk/components/hooks/useForm/useDraftInteraction.ts +251 -0
  170. package/sdk/components/hooks/useForm/useForm.ts +132 -60
  171. package/sdk/components/hooks/useTable/useTable.ts +10 -2
  172. package/sdk/form.ts +1 -12
  173. package/sdk/form.types.ts +1 -0
  174. package/sdk/index.ts +9 -3
  175. package/sdk/types/base-fields.ts +28 -72
  176. package/sdk/types/constants.ts +2 -2
  177. package/sdk/utils/formatting.ts +13 -1
  178. package/sdk/workflow/Activity.ts +181 -0
  179. package/sdk/workflow/ActivityInstance.ts +339 -0
  180. package/sdk/workflow/client.ts +208 -0
  181. package/sdk/workflow/components/useActivityForm/createActivityItemProxy.ts +126 -0
  182. package/sdk/workflow/components/useActivityForm/createActivityResolver.ts +61 -0
  183. package/sdk/workflow/components/useActivityForm/index.ts +5 -0
  184. package/sdk/workflow/components/useActivityForm/types.ts +166 -0
  185. package/sdk/workflow/components/useActivityForm/useActivityForm.ts +386 -0
  186. package/sdk/workflow/index.ts +20 -0
  187. package/sdk/workflow/types.ts +84 -0
  188. package/sdk/workflow.ts +25 -0
  189. package/sdk/workflow.types.ts +11 -0
  190. package/dist/client-DxjRcEtN.cjs +0 -1
  191. package/dist/constants-C49b9Exc.cjs +0 -1
  192. package/dist/useFilter-DzpP_ag0.cjs +0 -1
  193. package/dist/useFilter-H5bgAZQF.js +0 -120
package/docs/useAuth.md CHANGED
@@ -64,12 +64,18 @@ Wrap your app with `AuthProvider` and use `useAuth` in components.
64
64
  ```tsx
65
65
  import { useAuth, AuthProvider } from "@ram_28/kf-ai-sdk/auth";
66
66
 
67
- // 1. Wrap app with AuthProvider
67
+ // 1. Wrap app with AuthProvider inside QueryClientProvider
68
+ import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
69
+
70
+ const queryClient = new QueryClient();
71
+
68
72
  function App() {
69
73
  return (
70
- <AuthProvider>
71
- <AppContent />
72
- </AuthProvider>
74
+ <QueryClientProvider client={queryClient}>
75
+ <AuthProvider>
76
+ <AppContent />
77
+ </AuthProvider>
78
+ </QueryClientProvider>
73
79
  );
74
80
  }
75
81
 
package/docs/useFilter.md CHANGED
@@ -217,7 +217,7 @@ function SimpleFilter() {
217
217
  const addCategoryFilter = () => {
218
218
  filter.addCondition({
219
219
  Operator: ConditionOperator.EQ,
220
- LHSField: product.Category.meta.id,
220
+ LHSField: product.Category.id,
221
221
  RHSValue: "Electronics",
222
222
  RHSType: RHSType.Constant,
223
223
  });
@@ -260,7 +260,7 @@ function TypeSafeFilter() {
260
260
  const addCategoryFilter = () => {
261
261
  filter.addCondition({
262
262
  Operator: ConditionOperator.EQ,
263
- LHSField: product.Category.meta.id, // Type-safe via BDO field
263
+ LHSField: product.Category.id, // Type-safe via BDO field
264
264
  RHSValue: "Electronics",
265
265
  RHSType: RHSType.Constant,
266
266
  });
@@ -306,13 +306,13 @@ function FilterWithInitialState() {
306
306
  conditions: [
307
307
  {
308
308
  Operator: ConditionOperator.EQ,
309
- LHSField: product.Category.meta.id,
309
+ LHSField: product.Category.id,
310
310
  RHSValue: "Electronics",
311
311
  RHSType: RHSType.Constant,
312
312
  },
313
313
  {
314
314
  Operator: ConditionOperator.GT,
315
- LHSField: product.Price.meta.id,
315
+ LHSField: product.Price.id,
316
316
  RHSValue: 100,
317
317
  RHSType: RHSType.Constant,
318
318
  },
@@ -346,7 +346,7 @@ function EqualityFilters() {
346
346
  const filterByStatus = (status: string) => {
347
347
  filter.addCondition({
348
348
  Operator: ConditionOperator.EQ,
349
- LHSField: product.Status.meta.id,
349
+ LHSField: product.Status.id,
350
350
  RHSValue: status,
351
351
  RHSType: RHSType.Constant,
352
352
  });
@@ -356,7 +356,7 @@ function EqualityFilters() {
356
356
  const excludeStatus = (status: string) => {
357
357
  filter.addCondition({
358
358
  Operator: ConditionOperator.NE,
359
- LHSField: product.Status.meta.id,
359
+ LHSField: product.Status.id,
360
360
  RHSValue: status,
361
361
  RHSType: RHSType.Constant,
362
362
  });
@@ -390,7 +390,7 @@ function ComparisonFilters() {
390
390
  const filterByMinPrice = (minPrice: number) => {
391
391
  filter.addCondition({
392
392
  Operator: ConditionOperator.GT,
393
- LHSField: product.Price.meta.id,
393
+ LHSField: product.Price.id,
394
394
  RHSValue: minPrice,
395
395
  RHSType: RHSType.Constant,
396
396
  });
@@ -400,7 +400,7 @@ function ComparisonFilters() {
400
400
  const filterLowStock = (threshold: number) => {
401
401
  filter.addCondition({
402
402
  Operator: ConditionOperator.LTE,
403
- LHSField: product.Stock.meta.id,
403
+ LHSField: product.Stock.id,
404
404
  RHSValue: threshold,
405
405
  RHSType: RHSType.Constant,
406
406
  });
@@ -446,7 +446,7 @@ function RangeFilters() {
446
446
  const filterPriceRange = (min: number, max: number) => {
447
447
  filter.addCondition({
448
448
  Operator: ConditionOperator.Between,
449
- LHSField: product.Price.meta.id,
449
+ LHSField: product.Price.id,
450
450
  RHSValue: [min, max],
451
451
  RHSType: RHSType.Constant,
452
452
  });
@@ -456,7 +456,7 @@ function RangeFilters() {
456
456
  const filterDateRange = (startDate: string, endDate: string) => {
457
457
  filter.addCondition({
458
458
  Operator: ConditionOperator.Between,
459
- LHSField: order.OrderDate.meta.id,
459
+ LHSField: order.OrderDate.id,
460
460
  RHSValue: [startDate, endDate],
461
461
  RHSType: RHSType.Constant,
462
462
  });
@@ -466,7 +466,7 @@ function RangeFilters() {
466
466
  const excludePriceRange = (min: number, max: number) => {
467
467
  filter.addCondition({
468
468
  Operator: ConditionOperator.NotBetween,
469
- LHSField: product.Price.meta.id,
469
+ LHSField: product.Price.id,
470
470
  RHSValue: [min, max],
471
471
  RHSType: RHSType.Constant,
472
472
  });
@@ -500,7 +500,7 @@ function ListFilters() {
500
500
  const filterByCategories = (categories: string[]) => {
501
501
  filter.addCondition({
502
502
  Operator: ConditionOperator.IN,
503
- LHSField: product.Category.meta.id,
503
+ LHSField: product.Category.id,
504
504
  RHSValue: categories,
505
505
  RHSType: RHSType.Constant,
506
506
  });
@@ -510,7 +510,7 @@ function ListFilters() {
510
510
  const excludeCategories = (categories: string[]) => {
511
511
  filter.addCondition({
512
512
  Operator: ConditionOperator.NIN,
513
- LHSField: product.Category.meta.id,
513
+ LHSField: product.Category.id,
514
514
  RHSValue: categories,
515
515
  RHSType: RHSType.Constant,
516
516
  });
@@ -546,7 +546,7 @@ function TextFilters() {
546
546
  const filterByKeyword = (keyword: string) => {
547
547
  filter.addCondition({
548
548
  Operator: ConditionOperator.Contains,
549
- LHSField: product.Title.meta.id,
549
+ LHSField: product.Title.id,
550
550
  RHSValue: keyword,
551
551
  RHSType: RHSType.Constant,
552
552
  });
@@ -556,7 +556,7 @@ function TextFilters() {
556
556
  const excludeKeyword = (keyword: string) => {
557
557
  filter.addCondition({
558
558
  Operator: ConditionOperator.NotContains,
559
- LHSField: product.Description.meta.id,
559
+ LHSField: product.Description.id,
560
560
  RHSValue: keyword,
561
561
  RHSType: RHSType.Constant,
562
562
  });
@@ -594,7 +594,7 @@ function EmptyFilters() {
594
594
  const filterUnassigned = () => {
595
595
  filter.addCondition({
596
596
  Operator: ConditionOperator.Empty,
597
- LHSField: task.AssignedTo.meta.id,
597
+ LHSField: task.AssignedTo.id,
598
598
  RHSValue: null,
599
599
  RHSType: RHSType.Constant,
600
600
  });
@@ -604,7 +604,7 @@ function EmptyFilters() {
604
604
  const filterAssigned = () => {
605
605
  filter.addCondition({
606
606
  Operator: ConditionOperator.NotEmpty,
607
- LHSField: task.AssignedTo.meta.id,
607
+ LHSField: task.AssignedTo.id,
608
608
  RHSValue: null,
609
609
  RHSType: RHSType.Constant,
610
610
  });
@@ -644,19 +644,19 @@ function AndFilter() {
644
644
  // Category AND Price AND InStock - all must be true
645
645
  filter.addCondition({
646
646
  Operator: ConditionOperator.EQ,
647
- LHSField: product.Category.meta.id,
647
+ LHSField: product.Category.id,
648
648
  RHSValue: "Electronics",
649
649
  RHSType: RHSType.Constant,
650
650
  });
651
651
  filter.addCondition({
652
652
  Operator: ConditionOperator.LTE,
653
- LHSField: product.Price.meta.id,
653
+ LHSField: product.Price.id,
654
654
  RHSValue: 500,
655
655
  RHSType: RHSType.Constant,
656
656
  });
657
657
  filter.addCondition({
658
658
  Operator: ConditionOperator.GT,
659
- LHSField: product.Stock.meta.id,
659
+ LHSField: product.Stock.id,
660
660
  RHSValue: 0,
661
661
  RHSType: RHSType.Constant,
662
662
  });
@@ -692,13 +692,13 @@ function OrFilter() {
692
692
  // High priority OR Overdue - either can match
693
693
  filter.addCondition({
694
694
  Operator: ConditionOperator.EQ,
695
- LHSField: task.Priority.meta.id,
695
+ LHSField: task.Priority.id,
696
696
  RHSValue: "High",
697
697
  RHSType: RHSType.Constant,
698
698
  });
699
699
  filter.addCondition({
700
700
  Operator: ConditionOperator.LT,
701
- LHSField: task.DueDate.meta.id,
701
+ LHSField: task.DueDate.id,
702
702
  RHSValue: new Date().toISOString(),
703
703
  RHSType: RHSType.Constant,
704
704
  });
@@ -730,7 +730,7 @@ function NestedFilter() {
730
730
  // Root level condition
731
731
  filter.addCondition({
732
732
  Operator: ConditionOperator.EQ,
733
- LHSField: product.Category.meta.id,
733
+ LHSField: product.Category.id,
734
734
  RHSValue: "Electronics",
735
735
  RHSType: RHSType.Constant,
736
736
  });
@@ -742,7 +742,7 @@ function NestedFilter() {
742
742
  filter.addCondition(
743
743
  {
744
744
  Operator: ConditionOperator.LT,
745
- LHSField: product.Price.meta.id,
745
+ LHSField: product.Price.id,
746
746
  RHSValue: 100,
747
747
  RHSType: RHSType.Constant,
748
748
  },
@@ -752,7 +752,7 @@ function NestedFilter() {
752
752
  filter.addCondition(
753
753
  {
754
754
  Operator: ConditionOperator.EQ,
755
- LHSField: product.OnSale.meta.id,
755
+ LHSField: product.OnSale.id,
756
756
  RHSValue: true,
757
757
  RHSType: RHSType.Constant,
758
758
  },
@@ -775,7 +775,7 @@ function DeepNestedFilter() {
775
775
  const filter = useFilter();
776
776
 
777
777
  // Build: (A AND B) OR (C AND D)
778
- // Generic example - for real usage, use bdo.field.meta.id for LHSField
778
+ // Generic example - for real usage, use bdo.field.id for LHSField
779
779
  const buildFilter = () => {
780
780
  filter.clearAllConditions();
781
781
  filter.setRootOperator(GroupOperator.Or);
@@ -918,7 +918,7 @@ function EditableFilter() {
918
918
  const addFilter = () => {
919
919
  const id = filter.addCondition({
920
920
  Operator: ConditionOperator.GT,
921
- LHSField: product.Price.meta.id,
921
+ LHSField: product.Price.id,
922
922
  RHSValue: 50,
923
923
  RHSType: RHSType.Constant,
924
924
  });
@@ -976,7 +976,7 @@ function ToggleableGroupOperator() {
976
976
  const filter = useFilter();
977
977
  const [groupId, setGroupId] = useState<string | null>(null);
978
978
 
979
- // Generic example - for real usage, use bdo.field.meta.id for LHSField
979
+ // Generic example - for real usage, use bdo.field.id for LHSField
980
980
  const createGroup = () => {
981
981
  const id = filter.addConditionGroup(GroupOperator.And);
982
982
  filter.addCondition(
@@ -1048,7 +1048,7 @@ function FilterWithApi() {
1048
1048
  onClick={() =>
1049
1049
  filter.addCondition({
1050
1050
  Operator: ConditionOperator.EQ,
1051
- LHSField: product.Status.meta.id,
1051
+ LHSField: product.Status.id,
1052
1052
  RHSValue: "Active",
1053
1053
  RHSType: RHSType.Constant,
1054
1054
  })
@@ -1080,13 +1080,13 @@ function FilterWithInitialState() {
1080
1080
  const savedFilters: Array<ConditionType | ConditionGroupType> = [
1081
1081
  {
1082
1082
  Operator: ConditionOperator.EQ,
1083
- LHSField: product.Status.meta.id,
1083
+ LHSField: product.Status.id,
1084
1084
  RHSValue: "Active",
1085
1085
  RHSType: RHSType.Constant,
1086
1086
  },
1087
1087
  {
1088
1088
  Operator: ConditionOperator.GT,
1089
- LHSField: product.Price.meta.id,
1089
+ LHSField: product.Price.id,
1090
1090
  RHSValue: 100,
1091
1091
  RHSType: RHSType.Constant,
1092
1092
  },
@@ -1119,7 +1119,7 @@ import { ConditionOperator, RHSType } from "@ram_28/kf-ai-sdk/filter";
1119
1119
 
1120
1120
  filter.addCondition({
1121
1121
  Operator: ConditionOperator.EQ,
1122
- LHSField: product.Status.meta.id,
1122
+ LHSField: product.Status.id,
1123
1123
  RHSValue: "Active",
1124
1124
  RHSType: RHSType.Constant,
1125
1125
  });
@@ -1148,19 +1148,19 @@ import { ConditionOperator, RHSType } from "@ram_28/kf-ai-sdk/filter";
1148
1148
 
1149
1149
  filter.addCondition({
1150
1150
  Operator: ConditionOperator.EQ,
1151
- LHSField: product.Category.meta.id,
1151
+ LHSField: product.Category.id,
1152
1152
  RHSValue: "Electronics",
1153
1153
  RHSType: RHSType.Constant,
1154
1154
  });
1155
1155
  filter.addCondition({
1156
1156
  Operator: ConditionOperator.GT,
1157
- LHSField: product.Price.meta.id,
1157
+ LHSField: product.Price.id,
1158
1158
  RHSValue: 100,
1159
1159
  RHSType: RHSType.Constant,
1160
1160
  });
1161
1161
  filter.addCondition({
1162
1162
  Operator: ConditionOperator.LTE,
1163
- LHSField: product.Stock.meta.id,
1163
+ LHSField: product.Stock.id,
1164
1164
  RHSValue: 50,
1165
1165
  RHSType: RHSType.Constant,
1166
1166
  });
@@ -1203,7 +1203,7 @@ import { ConditionOperator, GroupOperator, RHSType } from "@ram_28/kf-ai-sdk/fil
1203
1203
  // Category = "Electronics" AND (Price < 100 OR OnSale = true)
1204
1204
  filter.addCondition({
1205
1205
  Operator: ConditionOperator.EQ,
1206
- LHSField: product.Category.meta.id,
1206
+ LHSField: product.Category.id,
1207
1207
  RHSValue: "Electronics",
1208
1208
  RHSType: RHSType.Constant,
1209
1209
  });
@@ -1211,7 +1211,7 @@ const orGroupId = filter.addConditionGroup(GroupOperator.Or);
1211
1211
  filter.addCondition(
1212
1212
  {
1213
1213
  Operator: ConditionOperator.LT,
1214
- LHSField: product.Price.meta.id,
1214
+ LHSField: product.Price.id,
1215
1215
  RHSValue: 100,
1216
1216
  RHSType: RHSType.Constant,
1217
1217
  },
@@ -1220,7 +1220,7 @@ filter.addCondition(
1220
1220
  filter.addCondition(
1221
1221
  {
1222
1222
  Operator: ConditionOperator.EQ,
1223
- LHSField: product.OnSale.meta.id,
1223
+ LHSField: product.OnSale.id,
1224
1224
  RHSValue: true,
1225
1225
  RHSType: RHSType.Constant,
1226
1226
  },
@@ -1268,7 +1268,7 @@ import { ConditionOperator, RHSType } from "@ram_28/kf-ai-sdk/filter";
1268
1268
 
1269
1269
  filter.addCondition({
1270
1270
  Operator: ConditionOperator.Between,
1271
- LHSField: product.Price.meta.id,
1271
+ LHSField: product.Price.id,
1272
1272
  RHSValue: [50, 200],
1273
1273
  RHSType: RHSType.Constant,
1274
1274
  });
@@ -1297,7 +1297,7 @@ import { ConditionOperator, RHSType } from "@ram_28/kf-ai-sdk/filter";
1297
1297
 
1298
1298
  filter.addCondition({
1299
1299
  Operator: ConditionOperator.IN,
1300
- LHSField: product.Category.meta.id,
1300
+ LHSField: product.Category.id,
1301
1301
  RHSValue: ["Electronics", "Computers", "Accessories"],
1302
1302
  RHSType: RHSType.Constant,
1303
1303
  });