@ram_28/kf-ai-sdk 1.0.11 → 1.0.13

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 (195) hide show
  1. package/README.md +55 -48
  2. package/dist/api/client.d.ts +14 -14
  3. package/dist/api/client.d.ts.map +1 -1
  4. package/dist/api/datetime.d.ts +5 -5
  5. package/dist/api/datetime.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 +2 -2
  9. package/dist/api/metadata.d.ts.map +1 -1
  10. package/dist/api.cjs +1 -0
  11. package/dist/api.d.ts +4 -0
  12. package/dist/api.d.ts.map +1 -0
  13. package/dist/api.mjs +27 -0
  14. package/dist/api.types.cjs +1 -0
  15. package/dist/api.types.d.ts +4 -0
  16. package/dist/api.types.d.ts.map +1 -0
  17. package/dist/api.types.mjs +1 -0
  18. package/dist/auth/AuthProvider.d.ts +3 -3
  19. package/dist/auth/AuthProvider.d.ts.map +1 -1
  20. package/dist/auth/authClient.d.ts +4 -4
  21. package/dist/auth/authClient.d.ts.map +1 -1
  22. package/dist/auth/authConfig.d.ts +5 -5
  23. package/dist/auth/authConfig.d.ts.map +1 -1
  24. package/dist/auth/index.d.ts +1 -1
  25. package/dist/auth/index.d.ts.map +1 -1
  26. package/dist/auth/types.d.ts +21 -21
  27. package/dist/auth/types.d.ts.map +1 -1
  28. package/dist/auth/useAuth.d.ts +2 -2
  29. package/dist/auth/useAuth.d.ts.map +1 -1
  30. package/dist/auth.cjs +1 -0
  31. package/dist/auth.d.ts +5 -0
  32. package/dist/auth.d.ts.map +1 -0
  33. package/dist/auth.mjs +280 -0
  34. package/dist/auth.types.cjs +1 -0
  35. package/dist/auth.types.d.ts +2 -0
  36. package/dist/auth.types.d.ts.map +1 -0
  37. package/dist/auth.types.mjs +1 -0
  38. package/dist/base-types.d.ts +2 -0
  39. package/dist/base-types.d.ts.map +1 -0
  40. package/dist/client-C15j4O5B.cjs +1 -0
  41. package/dist/client-CfvLiGfP.js +233 -0
  42. package/dist/cn-Dr87sK3i.js +2775 -0
  43. package/dist/cn-mXUIg4vp.cjs +1 -0
  44. package/dist/components/hooks/index.d.ts +3 -3
  45. package/dist/components/hooks/index.d.ts.map +1 -1
  46. package/dist/components/hooks/useFilter/index.d.ts +2 -2
  47. package/dist/components/hooks/useFilter/index.d.ts.map +1 -1
  48. package/dist/components/hooks/useFilter/types.d.ts +19 -31
  49. package/dist/components/hooks/useFilter/types.d.ts.map +1 -1
  50. package/dist/components/hooks/useFilter/useFilter.d.ts +2 -2
  51. package/dist/components/hooks/useFilter/useFilter.d.ts.map +1 -1
  52. package/dist/components/hooks/useForm/apiClient.d.ts +6 -6
  53. package/dist/components/hooks/useForm/apiClient.d.ts.map +1 -1
  54. package/dist/components/hooks/useForm/expressionValidator.utils.d.ts +7 -7
  55. package/dist/components/hooks/useForm/expressionValidator.utils.d.ts.map +1 -1
  56. package/dist/components/hooks/useForm/index.d.ts +5 -5
  57. package/dist/components/hooks/useForm/index.d.ts.map +1 -1
  58. package/dist/components/hooks/useForm/optimizedExpressionValidator.utils.d.ts +10 -10
  59. package/dist/components/hooks/useForm/optimizedExpressionValidator.utils.d.ts.map +1 -1
  60. package/dist/components/hooks/useForm/ruleClassifier.utils.d.ts +7 -12
  61. package/dist/components/hooks/useForm/ruleClassifier.utils.d.ts.map +1 -1
  62. package/dist/components/hooks/useForm/schemaParser.utils.d.ts +7 -7
  63. package/dist/components/hooks/useForm/schemaParser.utils.d.ts.map +1 -1
  64. package/dist/components/hooks/useForm/types.d.ts +67 -76
  65. package/dist/components/hooks/useForm/types.d.ts.map +1 -1
  66. package/dist/components/hooks/useForm/useForm.d.ts +2 -2
  67. package/dist/components/hooks/useForm/useForm.d.ts.map +1 -1
  68. package/dist/components/hooks/useKanban/apiClient.d.ts +16 -16
  69. package/dist/components/hooks/useKanban/apiClient.d.ts.map +1 -1
  70. package/dist/components/hooks/useKanban/context.d.ts +3 -3
  71. package/dist/components/hooks/useKanban/context.d.ts.map +1 -1
  72. package/dist/components/hooks/useKanban/dragDropManager.d.ts +7 -7
  73. package/dist/components/hooks/useKanban/dragDropManager.d.ts.map +1 -1
  74. package/dist/components/hooks/useKanban/index.d.ts +1 -1
  75. package/dist/components/hooks/useKanban/index.d.ts.map +1 -1
  76. package/dist/components/hooks/useKanban/types.d.ts +65 -67
  77. package/dist/components/hooks/useKanban/types.d.ts.map +1 -1
  78. package/dist/components/hooks/useKanban/useKanban.d.ts +2 -2
  79. package/dist/components/hooks/useKanban/useKanban.d.ts.map +1 -1
  80. package/dist/components/hooks/useTable/index.d.ts +1 -1
  81. package/dist/components/hooks/useTable/index.d.ts.map +1 -1
  82. package/dist/components/hooks/useTable/types.d.ts +10 -10
  83. package/dist/components/hooks/useTable/types.d.ts.map +1 -1
  84. package/dist/components/hooks/useTable/useTable.d.ts +2 -2
  85. package/dist/components/hooks/useTable/useTable.d.ts.map +1 -1
  86. package/dist/filter.cjs +1 -0
  87. package/dist/filter.d.ts +3 -0
  88. package/dist/filter.d.ts.map +1 -0
  89. package/dist/filter.mjs +6 -0
  90. package/dist/filter.types.cjs +1 -0
  91. package/dist/filter.types.d.ts +2 -0
  92. package/dist/filter.types.d.ts.map +1 -0
  93. package/dist/filter.types.mjs +1 -0
  94. package/dist/form.cjs +1 -0
  95. package/dist/form.d.ts +3 -0
  96. package/dist/form.d.ts.map +1 -0
  97. package/dist/form.mjs +2355 -0
  98. package/dist/form.types.cjs +1 -0
  99. package/dist/form.types.d.ts +2 -0
  100. package/dist/form.types.d.ts.map +1 -0
  101. package/dist/form.types.mjs +1 -0
  102. package/dist/jsx-runtime-BYECrxsp.cjs +30 -0
  103. package/dist/jsx-runtime-DGlMoOmv.js +630 -0
  104. package/dist/kanban.cjs +13 -0
  105. package/dist/kanban.d.ts +5 -0
  106. package/dist/kanban.d.ts.map +1 -0
  107. package/dist/kanban.mjs +1060 -0
  108. package/dist/kanban.types.cjs +1 -0
  109. package/dist/kanban.types.d.ts +2 -0
  110. package/dist/kanban.types.d.ts.map +1 -0
  111. package/dist/kanban.types.mjs +1 -0
  112. package/dist/kanban.ui.cjs +1 -0
  113. package/dist/kanban.ui.d.ts +2 -0
  114. package/dist/kanban.ui.d.ts.map +1 -0
  115. package/dist/kanban.ui.mjs +104 -0
  116. package/dist/metadata-2FLBsFcf.cjs +1 -0
  117. package/dist/metadata-DBcoDth-.js +43 -0
  118. package/dist/table.cjs +1 -0
  119. package/dist/table.d.ts +2 -0
  120. package/dist/table.d.ts.map +1 -0
  121. package/dist/table.mjs +148 -0
  122. package/dist/table.types.cjs +1 -0
  123. package/dist/table.types.d.ts +2 -0
  124. package/dist/table.types.d.ts.map +1 -0
  125. package/dist/table.types.mjs +1 -0
  126. package/dist/types/base-fields.d.ts +45 -45
  127. package/dist/types/base-fields.d.ts.map +1 -1
  128. package/dist/types/common.d.ts +45 -61
  129. package/dist/types/common.d.ts.map +1 -1
  130. package/dist/types.cjs +1 -0
  131. package/dist/types.mjs +1 -0
  132. package/dist/useFilter-CXFqEHyI.js +129 -0
  133. package/dist/useFilter-D-bCDo6Z.cjs +1 -0
  134. package/dist/useQuery-BScHEo7x.cjs +1 -0
  135. package/dist/useQuery-KpZFg80c.js +748 -0
  136. package/dist/utils/formatting.d.ts +4 -4
  137. package/dist/utils/formatting.d.ts.map +1 -1
  138. package/dist/utils.cjs +4 -0
  139. package/dist/utils.d.ts +3 -0
  140. package/dist/utils.d.ts.map +1 -0
  141. package/dist/utils.mjs +105 -0
  142. package/package.json +147 -9
  143. package/sdk/api/client.ts +51 -51
  144. package/sdk/api/datetime.ts +5 -5
  145. package/sdk/api/index.ts +28 -33
  146. package/sdk/api/metadata.ts +4 -4
  147. package/sdk/api.ts +24 -0
  148. package/sdk/api.types.ts +58 -0
  149. package/sdk/auth/AuthProvider.tsx +18 -18
  150. package/sdk/auth/authClient.ts +9 -9
  151. package/sdk/auth/authConfig.ts +9 -9
  152. package/sdk/auth/index.ts +5 -5
  153. package/sdk/auth/types.ts +21 -21
  154. package/sdk/auth/useAuth.ts +2 -2
  155. package/sdk/auth.ts +22 -0
  156. package/sdk/auth.types.ts +28 -0
  157. package/sdk/base-types.ts +45 -0
  158. package/sdk/components/hooks/index.ts +22 -22
  159. package/sdk/components/hooks/useFilter/index.ts +8 -14
  160. package/sdk/components/hooks/useFilter/types.ts +29 -58
  161. package/sdk/components/hooks/useFilter/useFilter.ts +41 -44
  162. package/sdk/components/hooks/useForm/apiClient.ts +8 -8
  163. package/sdk/components/hooks/useForm/expressionValidator.utils.ts +18 -18
  164. package/sdk/components/hooks/useForm/index.ts +24 -24
  165. package/sdk/components/hooks/useForm/optimizedExpressionValidator.utils.ts +22 -22
  166. package/sdk/components/hooks/useForm/ruleClassifier.utils.ts +26 -62
  167. package/sdk/components/hooks/useForm/schemaParser.utils.ts +24 -24
  168. package/sdk/components/hooks/useForm/types.ts +66 -82
  169. package/sdk/components/hooks/useForm/useForm.ts +15 -21
  170. package/sdk/components/hooks/useKanban/apiClient.ts +54 -54
  171. package/sdk/components/hooks/useKanban/context.ts +3 -3
  172. package/sdk/components/hooks/useKanban/dragDropManager.ts +19 -19
  173. package/sdk/components/hooks/useKanban/index.ts +26 -26
  174. package/sdk/components/hooks/useKanban/types.ts +69 -71
  175. package/sdk/components/hooks/useKanban/useKanban.ts +43 -51
  176. package/sdk/components/hooks/useKanban/useKanbanSimple.ts +4 -4
  177. package/sdk/components/hooks/useTable/index.ts +5 -1
  178. package/sdk/components/hooks/useTable/types.ts +10 -10
  179. package/sdk/components/hooks/useTable/useTable.ts +10 -10
  180. package/sdk/filter.ts +13 -0
  181. package/sdk/filter.types.ts +17 -0
  182. package/sdk/form.ts +15 -0
  183. package/sdk/form.types.ts +46 -0
  184. package/sdk/kanban.ts +23 -0
  185. package/sdk/kanban.types.ts +50 -0
  186. package/sdk/kanban.ui.ts +16 -0
  187. package/sdk/table.ts +7 -0
  188. package/sdk/table.types.ts +13 -0
  189. package/sdk/types/base-fields.ts +47 -47
  190. package/sdk/types/common.ts +47 -71
  191. package/sdk/types/index.ts +1 -1
  192. package/sdk/utils/formatting.ts +4 -4
  193. package/sdk/utils.ts +10 -0
  194. package/dist/index.cjs +0 -45
  195. package/dist/index.mjs +0 -6387
package/README.md CHANGED
@@ -28,24 +28,31 @@ npm install react @tanstack/react-query
28
28
  ## Quick Start
29
29
 
30
30
  ```tsx
31
- import {
32
- // Authentication
33
- AuthProvider,
34
- useAuth,
35
-
36
- // Hooks
37
- useForm,
38
- useTable,
39
- useKanban,
40
- useFilter,
41
-
42
- // API
43
- api,
44
-
45
- // Utilities
46
- formatCurrency,
47
- formatDate,
48
- } from "@ram_28/kf-ai-sdk";
31
+ // Authentication
32
+ import { AuthProvider, useAuth } from "@ram_28/kf-ai-sdk/auth";
33
+ import type { UseAuthReturnType, UserDetailsType } from "@ram_28/kf-ai-sdk/auth/types";
34
+
35
+ // Hooks
36
+ import { useForm } from "@ram_28/kf-ai-sdk/form";
37
+ import { useTable } from "@ram_28/kf-ai-sdk/table";
38
+ import { useKanban } from "@ram_28/kf-ai-sdk/kanban";
39
+ import { useFilter } from "@ram_28/kf-ai-sdk/filter";
40
+
41
+ // Types
42
+ import type { UseFormOptionsType, UseFormReturnType } from "@ram_28/kf-ai-sdk/form/types";
43
+ import type { UseTableOptionsType, UseTableReturnType } from "@ram_28/kf-ai-sdk/table/types";
44
+ import type { UseKanbanOptionsType, UseKanbanReturnType } from "@ram_28/kf-ai-sdk/kanban/types";
45
+ import type { UseFilterOptionsType, UseFilterReturnType } from "@ram_28/kf-ai-sdk/filter/types";
46
+
47
+ // API
48
+ import { api } from "@ram_28/kf-ai-sdk/api";
49
+ import type { ListResponseType, FilterType } from "@ram_28/kf-ai-sdk/api/types";
50
+
51
+ // Utilities
52
+ import { formatCurrency, formatDate } from "@ram_28/kf-ai-sdk/utils";
53
+
54
+ // Base Field Types
55
+ import type { IdFieldType, StringFieldType, CurrencyFieldType } from "@ram_28/kf-ai-sdk/types";
49
56
  ```
50
57
 
51
58
  ## Authentication
@@ -58,7 +65,7 @@ Wrap your app with `AuthProvider` inside a `QueryClientProvider`. No configurati
58
65
 
59
66
  ```tsx
60
67
  import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
61
- import { AuthProvider } from "@ram_28/kf-ai-sdk";
68
+ import { AuthProvider } from "@ram_28/kf-ai-sdk/auth";
62
69
 
63
70
  const queryClient = new QueryClient();
64
71
 
@@ -78,7 +85,7 @@ function App() {
78
85
  Access authentication state and operations in any component:
79
86
 
80
87
  ```tsx
81
- import { useAuth } from "@ram_28/kf-ai-sdk";
88
+ import { useAuth } from "@ram_28/kf-ai-sdk/auth";
82
89
 
83
90
  function UserMenu() {
84
91
  const { user, isAuthenticated, isLoading, logout, hasRole } = useAuth();
@@ -127,7 +134,7 @@ const {
127
134
  ### Multiple Auth Providers
128
135
 
129
136
  ```tsx
130
- import { useAuth } from "@ram_28/kf-ai-sdk";
137
+ import { useAuth } from "@ram_28/kf-ai-sdk/auth";
131
138
 
132
139
  function LoginPage() {
133
140
  const { login } = useAuth();
@@ -146,7 +153,7 @@ function LoginPage() {
146
153
  ### Protected Routes
147
154
 
148
155
  ```tsx
149
- import { useAuth } from "@ram_28/kf-ai-sdk";
156
+ import { useAuth } from "@ram_28/kf-ai-sdk/auth";
150
157
  import { Navigate } from "react-router-dom";
151
158
 
152
159
  function ProtectedRoute({ children, requiredRoles }) {
@@ -174,7 +181,7 @@ function ProtectedRoute({ children, requiredRoles }) {
174
181
  Data table hook with sorting, pagination, and React Query integration.
175
182
 
176
183
  ```tsx
177
- import { useTable } from "@ram_28/kf-ai-sdk";
184
+ import { useTable } from "@ram_28/kf-ai-sdk/table";
178
185
 
179
186
  function ProductTable() {
180
187
  const table = useTable({
@@ -219,7 +226,7 @@ function ProductTable() {
219
226
  Schema-driven form hook with backend validation support.
220
227
 
221
228
  ```tsx
222
- import { useForm } from "@ram_28/kf-ai-sdk";
229
+ import { useForm } from "@ram_28/kf-ai-sdk/form";
223
230
 
224
231
  function ProductForm() {
225
232
  const form = useForm({
@@ -251,7 +258,8 @@ function ProductForm() {
251
258
  Kanban board state management with drag-drop support.
252
259
 
253
260
  ```tsx
254
- import { useKanban, Kanban, KanbanColumn, KanbanCard } from "@ram_28/kf-ai-sdk";
261
+ import { useKanban } from "@ram_28/kf-ai-sdk/kanban";
262
+ import { Kanban, KanbanColumn, KanbanCard } from "@ram_28/kf-ai-sdk/kanban/ui";
255
263
 
256
264
  function TaskBoard() {
257
265
  const kanban = useKanban({
@@ -285,7 +293,7 @@ function TaskBoard() {
285
293
  Advanced filtering with logical operators.
286
294
 
287
295
  ```tsx
288
- import { useFilter, buildFilterPayload } from "@ram_28/kf-ai-sdk";
296
+ import { useFilter } from "@ram_28/kf-ai-sdk/filter";
289
297
 
290
298
  function ProductFilter() {
291
299
  const filter = useFilter({
@@ -323,7 +331,7 @@ function ProductFilter() {
323
331
  Type-safe API client for CRUD operations.
324
332
 
325
333
  ```tsx
326
- import { api, setApiBaseUrl } from "@ram_28/kf-ai-sdk";
334
+ import { api, setApiBaseUrl } from "@ram_28/kf-ai-sdk/api";
327
335
 
328
336
  // Configure base URL
329
337
  setApiBaseUrl("https://api.example.com");
@@ -378,28 +386,27 @@ The SDK provides semantic field types for type-safe data modeling:
378
386
 
379
387
  ```tsx
380
388
  import type {
381
- IdField,
382
- StringField,
383
- TextAreaField,
384
- NumberField,
385
- BooleanField,
386
- DateField,
387
- DateTimeField,
388
- CurrencyField,
389
- PercentageField,
390
- SelectField,
391
- } from "@ram_28/kf-ai-sdk";
389
+ IdFieldType,
390
+ StringFieldType,
391
+ TextAreaFieldType,
392
+ NumberFieldType,
393
+ BooleanFieldType,
394
+ DateFieldType,
395
+ DateTimeFieldType,
396
+ CurrencyFieldType,
397
+ SelectFieldType,
398
+ } from "@ram_28/kf-ai-sdk/types";
392
399
 
393
400
  // Define your data types
394
401
  interface Product {
395
- _id: IdField;
396
- name: StringField<string>;
397
- description: TextAreaField;
398
- price: CurrencyField;
399
- quantity: NumberField<0>;
400
- inStock: BooleanField;
401
- category: SelectField<"electronics" | "clothing" | "books">;
402
- createdAt: DateTimeField;
402
+ _id: IdFieldType;
403
+ name: StringFieldType;
404
+ description: TextAreaFieldType;
405
+ price: CurrencyFieldType;
406
+ quantity: NumberFieldType;
407
+ inStock: BooleanFieldType;
408
+ category: SelectFieldType<"electronics" | "clothing" | "books">;
409
+ createdAt: DateTimeFieldType;
403
410
  }
404
411
  ```
405
412
 
@@ -414,7 +421,7 @@ import {
414
421
  formatDateTime,
415
422
  formatNumber,
416
423
  formatPercentage,
417
- } from "@ram_28/kf-ai-sdk";
424
+ } from "@ram_28/kf-ai-sdk/utils";
418
425
 
419
426
  formatCurrency(99.99); // "$99.99"
420
427
  formatDate(new Date()); // "Jan 11, 2024"
@@ -426,7 +433,7 @@ formatPercentage(0.156); // "15.6%"
426
433
  ### Class Names
427
434
 
428
435
  ```tsx
429
- import { cn } from "@ram_28/kf-ai-sdk";
436
+ import { cn } from "@ram_28/kf-ai-sdk/utils";
430
437
 
431
438
  // Merge Tailwind classes with conflict resolution
432
439
  cn("px-4 py-2", "px-6"); // "py-2 px-6"
@@ -1,4 +1,4 @@
1
- import type { ListOptions, ListResponse, CreateUpdateResponse, DeleteResponse, CountResponse, MetricOptions, MetricResponse, PivotOptions, PivotResponse, DraftResponse, FieldsResponse, FetchFieldOption } from "../types/common";
1
+ import type { ListOptionsType, ListResponseType, CreateUpdateResponseType, DeleteResponseType, CountResponseType, MetricOptionsType, MetricResponseType, PivotOptionsType, PivotResponseType, DraftResponseType, FieldsResponseType, FetchFieldOptionType } from "../types/common";
2
2
  /**
3
3
  * API client interface for a specific Business Object
4
4
  */
@@ -8,30 +8,30 @@ export interface ResourceClient<T = any> {
8
8
  /** Create new record */
9
9
  create(data: Partial<T> & {
10
10
  _id?: string;
11
- }): Promise<CreateUpdateResponse>;
11
+ }): Promise<CreateUpdateResponseType>;
12
12
  /** Update existing record */
13
- update(id: string, data: Partial<T>): Promise<CreateUpdateResponse>;
13
+ update(id: string, data: Partial<T>): Promise<CreateUpdateResponseType>;
14
14
  /** Delete record by ID */
15
- delete(id: string): Promise<DeleteResponse>;
15
+ delete(id: string): Promise<DeleteResponseType>;
16
16
  /** List records with optional filtering, sorting, and pagination */
17
- list(options?: ListOptions): Promise<ListResponse<T>>;
17
+ list(options?: ListOptionsType): Promise<ListResponseType<T>>;
18
18
  /** Get count of records matching the same criteria as list */
19
- count(options?: ListOptions): Promise<CountResponse>;
19
+ count(options?: ListOptionsType): Promise<CountResponseType>;
20
20
  /**
21
21
  * Create draft - compute fields without persisting
22
22
  * POST /{bo_id}/draft
23
23
  */
24
- draft(data: Partial<T>): Promise<DraftResponse>;
24
+ draft(data: Partial<T>): Promise<DraftResponseType>;
25
25
  /**
26
26
  * Update draft (commit) - compute and prepare for update
27
27
  * POST /{bo_id}/{instance_id}/draft
28
28
  */
29
- draftUpdate(id: string, data: Partial<T>): Promise<CreateUpdateResponse>;
29
+ draftUpdate(id: string, data: Partial<T>): Promise<CreateUpdateResponseType>;
30
30
  /**
31
31
  * Update draft (patch) - compute fields during editing
32
32
  * PATCH /{bo_id}/{instance_id}/draft
33
33
  */
34
- draftPatch(id: string, data: Partial<T>): Promise<DraftResponse>;
34
+ draftPatch(id: string, data: Partial<T>): Promise<DraftResponseType>;
35
35
  /**
36
36
  * Interactive draft - create/update draft without instance ID
37
37
  * PATCH /{bo_id}/draft
@@ -39,29 +39,29 @@ export interface ResourceClient<T = any> {
39
39
  */
40
40
  draftInteraction(data: Partial<T> & {
41
41
  _id?: string;
42
- }): Promise<DraftResponse & {
42
+ }): Promise<DraftResponseType & {
43
43
  _id: string;
44
44
  }>;
45
45
  /**
46
46
  * Get aggregated metrics grouped by dimensions
47
47
  * POST /{bo_id}/metric
48
48
  */
49
- metric(options: Omit<MetricOptions, "Type">): Promise<MetricResponse>;
49
+ metric(options: Omit<MetricOptionsType, "Type">): Promise<MetricResponseType>;
50
50
  /**
51
51
  * Get pivot table data
52
52
  * POST /{bo_id}/pivot
53
53
  */
54
- pivot(options: Omit<PivotOptions, "Type">): Promise<PivotResponse>;
54
+ pivot(options: Omit<PivotOptionsType, "Type">): Promise<PivotResponseType>;
55
55
  /**
56
56
  * Get field definitions for this Business Object
57
57
  * GET /{bo_id}/fields
58
58
  */
59
- fields(): Promise<FieldsResponse>;
59
+ fields(): Promise<FieldsResponseType>;
60
60
  /**
61
61
  * Fetch reference data for a specific field (for lookup and dropdown fields)
62
62
  * GET /{bo_id}/{instance_id}/field/{field_id}/fetch
63
63
  */
64
- fetchField(instanceId: string, fieldId: string): Promise<FetchFieldOption[]>;
64
+ fetchField(instanceId: string, fieldId: string): Promise<FetchFieldOptionType[]>;
65
65
  }
66
66
  /**
67
67
  * Set the base URL for all API requests
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../sdk/api/client.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,WAAW,EACX,YAAY,EAEZ,oBAAoB,EACpB,cAAc,EACd,aAAa,EAGb,aAAa,EACb,cAAc,EACd,YAAY,EACZ,aAAa,EACb,aAAa,EACb,cAAc,EACd,gBAAgB,EAEjB,MAAM,iBAAiB,CAAC;AAEzB;;GAEG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC,GAAG,GAAG;IAKrC,8BAA8B;IAC9B,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAE5B,wBAAwB;IACxB,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG;QAAE,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAE3E,6BAA6B;IAC7B,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEpE,0BAA0B;IAC1B,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oBAAoB,EAAE,CAAC,CAAC;CAClF;AAoBD;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEnD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAEvE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAE1D;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAoCD;;;;GAIG;AACH,wBAAgB,GAAG,CAAC,CAAC,GAAG,GAAG,EAAE,KAAK,EAAE,MAAM,GAAG,cAAc,CAAC,CAAC,CAAC,CAmR7D"}
@@ -1,21 +1,21 @@
1
- import type { DateTimeEncoded, DateEncoded } from '../types/common';
1
+ import type { DateTimeEncodedType, DateEncodedType } from '../types/common';
2
2
  /**
3
3
  * Utility functions for datetime encoding/decoding
4
4
  */
5
5
  /**
6
6
  * Encode a Date object to API datetime format
7
7
  */
8
- export declare function encodeDatetime(date: Date): DateTimeEncoded;
8
+ export declare function encodeDatetime(date: Date): DateTimeEncodedType;
9
9
  /**
10
10
  * Decode API datetime format to Date object
11
11
  */
12
- export declare function decodeDatetime(encoded: DateTimeEncoded): Date;
12
+ export declare function decodeDatetime(encoded: DateTimeEncodedType): Date;
13
13
  /**
14
14
  * Encode a Date object to API date format (YYYY-MM-DD)
15
15
  */
16
- export declare function encodeDate(date: Date): DateEncoded;
16
+ export declare function encodeDate(date: Date): DateEncodedType;
17
17
  /**
18
18
  * Decode API date format to Date object
19
19
  */
20
- export declare function decodeDate(encoded: DateEncoded): Date;
20
+ export declare function decodeDate(encoded: DateEncodedType): Date;
21
21
  //# sourceMappingURL=datetime.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"datetime.d.ts","sourceRoot":"","sources":["../../sdk/api/datetime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEpE;;GAEG;AAEH;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,eAAe,CAE1D;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI,CAE7D;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,WAAW,CAElD;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAErD"}
1
+ {"version":3,"file":"datetime.d.ts","sourceRoot":"","sources":["../../sdk/api/datetime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAE5E;;GAEG;AAEH;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,mBAAmB,CAE9D;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAEjE;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,eAAe,CAEtD;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI,CAEzD"}
@@ -3,5 +3,5 @@ export type { ResourceClient } from "./client";
3
3
  export { encodeDatetime, decodeDatetime, encodeDate, decodeDate, } from "./datetime";
4
4
  export { getBdoSchema, listMetadata } from "./metadata";
5
5
  export type { BackendSchema, MetadataItem, FieldMetadata } from "./metadata";
6
- export type { SortDirection, SortOption, Sort, Condition, ConditionGroup, ConditionGroupOperator, Filter, FilterRHSType, ConditionOperator, FilterCondition, FilterOperator, FilterLogical, FilterNode, ListOptions, ListResponse, ReadResponse, CreateUpdateResponse, DeleteResponse, CountResponse, DateTimeEncoded, DateEncoded, MetricType, MetricField, MetricOptions, MetricResponse, PivotHeaderItem, PivotResponseData, PivotOptions, PivotResponse, DraftResponse, FieldsResponse, } from "../types/common";
6
+ export type { SortDirectionType, SortOptionType, SortType, ConditionType, ConditionGroupType, ConditionGroupOperatorType, FilterType, FilterRHSTypeType, ConditionOperatorType, ListOptionsType, ListResponseType, ReadResponseType, CreateUpdateResponseType, DeleteResponseType, CountResponseType, DateTimeEncodedType, DateEncodedType, MetricTypeType, MetricFieldType, MetricOptionsType, MetricResponseType, PivotHeaderItemType, PivotResponseDataType, PivotOptionsType, PivotResponseType, DraftResponseType, FieldsResponseType, } from "../types/common";
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../sdk/api/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,GAAG,EACH,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,GACd,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG/C,OAAO,EACL,cAAc,EACd,cAAc,EACd,UAAU,EACV,UAAU,GACX,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACxD,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG7E,YAAY,EAEV,aAAa,EACb,UAAU,EACV,IAAI,EAEJ,SAAS,EACT,cAAc,EACd,sBAAsB,EACtB,MAAM,EACN,aAAa,EACb,iBAAiB,EAEjB,eAAe,EACf,cAAc,EACd,aAAa,EACb,UAAU,EAEV,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,oBAAoB,EACpB,cAAc,EACd,aAAa,EAEb,eAAe,EACf,WAAW,EAEX,UAAU,EACV,WAAW,EACX,aAAa,EACb,cAAc,EAEd,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,aAAa,EAEb,aAAa,EAEb,cAAc,GACf,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../sdk/api/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,GAAG,EACH,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,GACd,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG/C,OAAO,EACL,cAAc,EACd,cAAc,EACd,UAAU,EACV,UAAU,GACX,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACxD,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG7E,YAAY,EAEV,iBAAiB,EACjB,cAAc,EACd,QAAQ,EAER,aAAa,EACb,kBAAkB,EAClB,0BAA0B,EAC1B,UAAU,EACV,iBAAiB,EACjB,qBAAqB,EAErB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,EAEjB,mBAAmB,EACnB,eAAe,EAEf,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAElB,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EAEjB,iBAAiB,EAEjB,kBAAkB,GACnB,MAAM,iBAAiB,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { ListOptions, ListResponse } from "../types/common";
1
+ import type { ListOptionsType, ListResponseType } from "../types/common";
2
2
  /**
3
3
  * BDO Schema Structure (Business Object Metadata)
4
4
  */
@@ -52,7 +52,7 @@ export interface MetadataItem {
52
52
  * });
53
53
  * ```
54
54
  */
55
- export declare function listMetadata(options?: ListOptions): Promise<ListResponse<MetadataItem>>;
55
+ export declare function listMetadata(options?: ListOptionsType): Promise<ListResponseType<MetadataItem>>;
56
56
  /**
57
57
  * Field metadata structure
58
58
  */
@@ -1 +1 @@
1
- {"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../sdk/api/met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Ae,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAOzE;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,CAAC,SAAS,EAAE,MAAM,GAAG,GAAG,CAAC;CAC1B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CA8BzE;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,YAAY,CAChC,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC,CA8BzC;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE;QACP,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAC;QAC3B,KAAK,CAAC,EAAE,KAAK,CAAC;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KACjD,CAAC;IACF,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB"}
package/dist/api.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./client-C15j4O5B.cjs"),a=require("./metadata-2FLBsFcf.cjs");function d(e){return{$__dt__:e.getTime()/1e3}}function i(e){return new Date(e.$__dt__*1e3)}function r(e){return{$__d__:e.toISOString().split("T")[0]}}function n(e){return new Date(e.$__d__)}exports.api=t.api;exports.getApiBaseUrl=t.getApiBaseUrl;exports.getDefaultHeaders=t.getDefaultHeaders;exports.setApiBaseUrl=t.setApiBaseUrl;exports.setDefaultHeaders=t.setDefaultHeaders;exports.getBdoSchema=a.getBdoSchema;exports.listMetadata=a.listMetadata;exports.decodeDate=n;exports.decodeDatetime=i;exports.encodeDate=r;exports.encodeDatetime=d;
package/dist/api.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ export { api, setApiBaseUrl, setDefaultHeaders, getDefaultHeaders, getApiBaseUrl, } from './api/client';
2
+ export { encodeDatetime, decodeDatetime, encodeDate, decodeDate, } from './api/datetime';
3
+ export { getBdoSchema, listMetadata } from './api/metadata';
4
+ //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../sdk/api.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,GAAG,EACH,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,GACd,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,cAAc,EACd,cAAc,EACd,UAAU,EACV,UAAU,GACX,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
package/dist/api.mjs ADDED
@@ -0,0 +1,27 @@
1
+ import { a as o, c as d, g as i, s as c, b as u } from "./client-CfvLiGfP.js";
2
+ import { g as D, l as g } from "./metadata-DBcoDth-.js";
3
+ function t(e) {
4
+ return { $__dt__: e.getTime() / 1e3 };
5
+ }
6
+ function a(e) {
7
+ return new Date(e.$__dt__ * 1e3);
8
+ }
9
+ function r(e) {
10
+ return { $__d__: e.toISOString().split("T")[0] };
11
+ }
12
+ function n(e) {
13
+ return new Date(e.$__d__);
14
+ }
15
+ export {
16
+ o as api,
17
+ n as decodeDate,
18
+ a as decodeDatetime,
19
+ r as encodeDate,
20
+ t as encodeDatetime,
21
+ d as getApiBaseUrl,
22
+ D as getBdoSchema,
23
+ i as getDefaultHeaders,
24
+ g as listMetadata,
25
+ c as setApiBaseUrl,
26
+ u as setDefaultHeaders
27
+ };
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,4 @@
1
+ export type { ResourceClient } from './api/client';
2
+ export type { BackendSchema, MetadataItem, FieldMetadata } from './api/metadata';
3
+ export type { SortDirectionType, SortOptionType, SortType, ConditionType, ConditionGroupType, ConditionGroupOperatorType, ConditionOperatorType, FilterType, FilterRHSTypeType, ListOptionsType, ListResponseType, ReadResponseType, CreateUpdateResponseType, DeleteResponseType, CountResponseType, DateTimeEncodedType, DateEncodedType, MetricTypeType, MetricFieldType, MetricOptionsType, MetricResponseType, PivotHeaderItemType, PivotResponseDataType, PivotOptionsType, PivotResponseType, DraftResponseType, FieldsResponseType, FetchFieldOptionType, FetchFieldResponseType, } from './types/common';
4
+ //# sourceMappingURL=api.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.types.d.ts","sourceRoot":"","sources":["../sdk/api.types.ts"],"names":[],"mappings":"AAMA,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAGnD,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGjF,YAAY,EAEV,iBAAiB,EACjB,cAAc,EACd,QAAQ,EAGR,aAAa,EACb,kBAAkB,EAClB,0BAA0B,EAC1B,qBAAqB,EACrB,UAAU,EACV,iBAAiB,EAGjB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,EAGjB,mBAAmB,EACnB,eAAe,EAGf,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAGlB,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EAGjB,iBAAiB,EAGjB,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1 @@
1
+
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import type { AuthContextValue, AuthProviderProps } from "./types";
3
- export declare function AuthProvider({ children, config: configOverride, onAuthChange, onError, loadingComponent, unauthenticatedComponent, skipInitialCheck, }: AuthProviderProps): React.ReactElement;
4
- export declare function useAuthContext(): AuthContextValue;
2
+ import type { AuthContextValueType, AuthProviderPropsType } from "./types";
3
+ export declare function AuthProvider({ children, config: configOverride, onAuthChange, onError, loadingComponent, unauthenticatedComponent, skipInitialCheck, }: AuthProviderPropsType): React.ReactElement;
4
+ export declare function useAuthContext(): AuthContextValueType;
5
5
  //# sourceMappingURL=AuthProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AuthProvider.d.ts","sourceRoot":"","sources":["../../sdk/auth/AuthProvider.tsx"],"names":[],"mappings":"AAKA,OAAO,KAQN,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EAOlB,MAAM,SAAS,CAAC;AAsBjB,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,MAAM,EAAE,cAAc,EACtB,YAAY,EACZ,OAAO,EACP,gBAAgB,EAChB,wBAAwB,EACxB,gBAAwB,GACzB,EAAE,iBAAiB,GAAG,KAAK,CAAC,YAAY,CAiNxC;AAMD,wBAAgB,cAAc,IAAI,gBAAgB,CAMjD"}
1
+ {"version":3,"file":"AuthProvider.d.ts","sourceRoot":"","sources":["../../sdk/auth/AuthProvider.tsx"],"names":[],"mappings":"AAKA,OAAO,KAQN,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EACV,oBAAoB,EACpB,qBAAqB,EAOtB,MAAM,SAAS,CAAC;AAsBjB,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,MAAM,EAAE,cAAc,EACtB,YAAY,EACZ,OAAO,EACP,gBAAgB,EAChB,wBAAwB,EACxB,gBAAwB,GACzB,EAAE,qBAAqB,GAAG,KAAK,CAAC,YAAY,CAiN5C;AAMD,wBAAgB,cAAc,IAAI,oBAAoB,CAMrD"}
@@ -1,4 +1,4 @@
1
- import type { SessionResponse, AuthProviderName, LoginOptions, LogoutOptions } from "./types";
1
+ import type { SessionResponseType, AuthProviderNameType, LoginOptionsType, LogoutOptionsType } from "./types";
2
2
  /**
3
3
  * Custom error class for authentication errors
4
4
  */
@@ -12,7 +12,7 @@ export declare class AuthenticationError extends Error {
12
12
  *
13
13
  * @throws AuthenticationError if session check fails or user is not authenticated
14
14
  */
15
- export declare function fetchSession(): Promise<SessionResponse>;
15
+ export declare function fetchSession(): Promise<SessionResponseType>;
16
16
  /**
17
17
  * Initiates OAuth login flow by redirecting to the auth provider.
18
18
  *
@@ -33,10 +33,10 @@ export declare function fetchSession(): Promise<SessionResponse>;
33
33
  * }
34
34
  * ```
35
35
  */
36
- export declare function initiateLogin(provider?: AuthProviderName, options?: LoginOptions): Promise<never>;
36
+ export declare function initiateLogin(provider?: AuthProviderNameType, options?: LoginOptionsType): Promise<never>;
37
37
  /**
38
38
  * Logout the current user
39
39
  * Optionally calls the logout endpoint before clearing client state
40
40
  */
41
- export declare function performLogout(options?: LogoutOptions): Promise<void>;
41
+ export declare function performLogout(options?: LogoutOptionsType): Promise<void>;
42
42
  //# sourceMappingURL=authClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"authClient.d.ts","sourceRoot":"","sources":["../../sdk/auth/authClient.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACd,MAAM,SAAS,CAAC;AAQjB;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,SAAgB,UAAU,EAAE,MAAM,CAAC;gBAEvB,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;CAKhD;AAED;;;;;GAKG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,eAAe,CAAC,CAuB7D;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,CAAC,EAAE,gBAAgB,EAC3B,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,KAAK,CAAC,CA0DhB;AAED;;;GAGG;AACH,wBAAsB,aAAa,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAyB1E"}
1
+ {"version":3,"file":"authClient.d.ts","sourceRoot":"","sources":["../../sdk/auth/authClient.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,SAAS,CAAC;AAQjB;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,SAAgB,UAAU,EAAE,MAAM,CAAC;gBAEvB,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;CAKhD;AAED;;;;;GAKG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAuBjE;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,CAAC,EAAE,oBAAoB,EAC/B,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,KAAK,CAAC,CA0DhB;AAED;;;GAGG;AACH,wBAAsB,aAAa,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAyB9E"}
@@ -1,4 +1,4 @@
1
- import type { AuthConfig, AuthProviderName, AuthEndpointConfig } from "./types";
1
+ import type { AuthConfigType, AuthProviderNameType, AuthEndpointConfigType } from "./types";
2
2
  /**
3
3
  * Configure authentication settings globally
4
4
  * @example
@@ -13,15 +13,15 @@ import type { AuthConfig, AuthProviderName, AuthEndpointConfig } from "./types";
13
13
  * });
14
14
  * ```
15
15
  */
16
- export declare function configureAuth(config: Partial<AuthConfig>): void;
16
+ export declare function configureAuth(config: Partial<AuthConfigType>): void;
17
17
  /**
18
18
  * Add or update an auth provider configuration
19
19
  */
20
- export declare function setAuthProvider(provider: AuthProviderName, config: AuthEndpointConfig): void;
20
+ export declare function setAuthProvider(provider: AuthProviderNameType, config: AuthEndpointConfigType): void;
21
21
  /**
22
22
  * Get current auth configuration
23
23
  */
24
- export declare function getAuthConfig(): Readonly<AuthConfig>;
24
+ export declare function getAuthConfig(): Readonly<AuthConfigType>;
25
25
  /**
26
26
  * Get the base URL for auth endpoints
27
27
  * Falls back to API base URL, then window.location.origin
@@ -30,7 +30,7 @@ export declare function getAuthBaseUrl(): string;
30
30
  /**
31
31
  * Get endpoint configuration for a specific provider
32
32
  */
33
- export declare function getProviderConfig(provider: AuthProviderName): AuthEndpointConfig | undefined;
33
+ export declare function getProviderConfig(provider: AuthProviderNameType): AuthEndpointConfigType | undefined;
34
34
  /**
35
35
  * Reset auth configuration to defaults
36
36
  */
@@ -1 +1 @@
1
- {"version":3,"file":"authConfig.d.ts","sourceRoot":"","sources":["../../sdk/auth/authConfig.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AA+BhF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,IAAI,CAa/D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,gBAAgB,EAC1B,MAAM,EAAE,kBAAkB,GACzB,IAAI,CAEN;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,QAAQ,CAAC,UAAU,CAAC,CAEpD;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,gBAAgB,GACzB,kBAAkB,GAAG,SAAS,CAEhC;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAEtC"}
1
+ {"version":3,"file":"authConfig.d.ts","sourceRoot":"","sources":["../../sdk/auth/authConfig.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AA+B5F;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,IAAI,CAanE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,oBAAoB,EAC9B,MAAM,EAAE,sBAAsB,GAC7B,IAAI,CAEN;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,QAAQ,CAAC,cAAc,CAAC,CAExD;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,oBAAoB,GAC7B,sBAAsB,GAAG,SAAS,CAEpC;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAEtC"}
@@ -1,5 +1,5 @@
1
1
  export { AuthProvider } from "./AuthProvider";
2
2
  export { useAuth } from "./useAuth";
3
3
  export { AuthenticationError } from "./authClient";
4
- export type { UserDetails, SessionResponse, AuthStatus, AuthProviderProps, UseAuthReturn, } from "./types";
4
+ export type { UserDetailsType, SessionResponseType, AuthStatusType, AuthProviderPropsType, UseAuthReturnType, } from "./types";
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../sdk/auth/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGnD,YAAY,EACV,WAAW,EACX,eAAe,EACf,UAAU,EACV,iBAAiB,EACjB,aAAa,GACd,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../sdk/auth/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGnD,YAAY,EACV,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,SAAS,CAAC"}