@ram_28/kf-ai-sdk 1.0.11 → 1.0.12
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/README.md +55 -48
- package/dist/api/client.d.ts +14 -14
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/datetime.d.ts +5 -5
- package/dist/api/datetime.d.ts.map +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/metadata.d.ts +2 -2
- package/dist/api/metadata.d.ts.map +1 -1
- package/dist/api.cjs +1 -0
- package/dist/api.d.ts +4 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.mjs +27 -0
- package/dist/api.types.cjs +1 -0
- package/dist/api.types.d.ts +4 -0
- package/dist/api.types.d.ts.map +1 -0
- package/dist/api.types.mjs +1 -0
- package/dist/auth/AuthProvider.d.ts +3 -3
- package/dist/auth/AuthProvider.d.ts.map +1 -1
- package/dist/auth/authClient.d.ts +4 -4
- package/dist/auth/authClient.d.ts.map +1 -1
- package/dist/auth/authConfig.d.ts +5 -5
- package/dist/auth/authConfig.d.ts.map +1 -1
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/types.d.ts +21 -21
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/auth/useAuth.d.ts +2 -2
- package/dist/auth/useAuth.d.ts.map +1 -1
- package/dist/auth.cjs +1 -0
- package/dist/auth.d.ts +5 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.mjs +280 -0
- package/dist/auth.types.cjs +1 -0
- package/dist/auth.types.d.ts +2 -0
- package/dist/auth.types.d.ts.map +1 -0
- package/dist/auth.types.mjs +1 -0
- package/dist/base-types.d.ts +2 -0
- package/dist/base-types.d.ts.map +1 -0
- package/dist/client-C15j4O5B.cjs +1 -0
- package/dist/client-CfvLiGfP.js +233 -0
- package/dist/cn-Dr87sK3i.js +2775 -0
- package/dist/cn-mXUIg4vp.cjs +1 -0
- package/dist/components/hooks/index.d.ts +3 -3
- package/dist/components/hooks/index.d.ts.map +1 -1
- package/dist/components/hooks/useFilter/index.d.ts +2 -2
- package/dist/components/hooks/useFilter/index.d.ts.map +1 -1
- package/dist/components/hooks/useFilter/types.d.ts +19 -31
- package/dist/components/hooks/useFilter/types.d.ts.map +1 -1
- package/dist/components/hooks/useFilter/useFilter.d.ts +2 -2
- package/dist/components/hooks/useFilter/useFilter.d.ts.map +1 -1
- package/dist/components/hooks/useForm/apiClient.d.ts +6 -6
- package/dist/components/hooks/useForm/apiClient.d.ts.map +1 -1
- package/dist/components/hooks/useForm/expressionValidator.utils.d.ts +7 -7
- package/dist/components/hooks/useForm/expressionValidator.utils.d.ts.map +1 -1
- package/dist/components/hooks/useForm/index.d.ts +5 -5
- package/dist/components/hooks/useForm/index.d.ts.map +1 -1
- package/dist/components/hooks/useForm/optimizedExpressionValidator.utils.d.ts +10 -10
- package/dist/components/hooks/useForm/optimizedExpressionValidator.utils.d.ts.map +1 -1
- package/dist/components/hooks/useForm/ruleClassifier.utils.d.ts +7 -12
- package/dist/components/hooks/useForm/ruleClassifier.utils.d.ts.map +1 -1
- package/dist/components/hooks/useForm/schemaParser.utils.d.ts +7 -7
- package/dist/components/hooks/useForm/schemaParser.utils.d.ts.map +1 -1
- package/dist/components/hooks/useForm/types.d.ts +67 -76
- package/dist/components/hooks/useForm/types.d.ts.map +1 -1
- package/dist/components/hooks/useForm/useForm.d.ts +2 -2
- package/dist/components/hooks/useForm/useForm.d.ts.map +1 -1
- package/dist/components/hooks/useKanban/apiClient.d.ts +16 -16
- package/dist/components/hooks/useKanban/apiClient.d.ts.map +1 -1
- package/dist/components/hooks/useKanban/context.d.ts +3 -3
- package/dist/components/hooks/useKanban/context.d.ts.map +1 -1
- package/dist/components/hooks/useKanban/dragDropManager.d.ts +7 -7
- package/dist/components/hooks/useKanban/dragDropManager.d.ts.map +1 -1
- package/dist/components/hooks/useKanban/index.d.ts +1 -1
- package/dist/components/hooks/useKanban/index.d.ts.map +1 -1
- package/dist/components/hooks/useKanban/types.d.ts +65 -67
- package/dist/components/hooks/useKanban/types.d.ts.map +1 -1
- package/dist/components/hooks/useKanban/useKanban.d.ts +2 -2
- package/dist/components/hooks/useKanban/useKanban.d.ts.map +1 -1
- package/dist/components/hooks/useTable/index.d.ts +1 -1
- package/dist/components/hooks/useTable/index.d.ts.map +1 -1
- package/dist/components/hooks/useTable/types.d.ts +10 -10
- package/dist/components/hooks/useTable/types.d.ts.map +1 -1
- package/dist/components/hooks/useTable/useTable.d.ts +2 -2
- package/dist/components/hooks/useTable/useTable.d.ts.map +1 -1
- package/dist/filter.cjs +1 -0
- package/dist/filter.d.ts +3 -0
- package/dist/filter.d.ts.map +1 -0
- package/dist/filter.mjs +6 -0
- package/dist/filter.types.cjs +1 -0
- package/dist/filter.types.d.ts +2 -0
- package/dist/filter.types.d.ts.map +1 -0
- package/dist/filter.types.mjs +1 -0
- package/dist/form.cjs +1 -0
- package/dist/form.d.ts +3 -0
- package/dist/form.d.ts.map +1 -0
- package/dist/form.mjs +1346 -0
- package/dist/form.types.cjs +1 -0
- package/dist/form.types.d.ts +2 -0
- package/dist/form.types.d.ts.map +1 -0
- package/dist/form.types.mjs +1 -0
- package/dist/jsx-runtime-BYECrxsp.cjs +30 -0
- package/dist/jsx-runtime-DGlMoOmv.js +630 -0
- package/dist/kanban.cjs +13 -0
- package/dist/kanban.d.ts +5 -0
- package/dist/kanban.d.ts.map +1 -0
- package/dist/kanban.mjs +694 -0
- package/dist/kanban.types.cjs +1 -0
- package/dist/kanban.types.d.ts +2 -0
- package/dist/kanban.types.d.ts.map +1 -0
- package/dist/kanban.types.mjs +1 -0
- package/dist/kanban.ui.cjs +1 -0
- package/dist/kanban.ui.d.ts +2 -0
- package/dist/kanban.ui.d.ts.map +1 -0
- package/dist/kanban.ui.mjs +104 -0
- package/dist/metadata-2FLBsFcf.cjs +1 -0
- package/dist/metadata-DBcoDth-.js +43 -0
- package/dist/table.cjs +1 -0
- package/dist/table.d.ts +2 -0
- package/dist/table.d.ts.map +1 -0
- package/dist/table.mjs +148 -0
- package/dist/table.types.cjs +1 -0
- package/dist/table.types.d.ts +2 -0
- package/dist/table.types.d.ts.map +1 -0
- package/dist/table.types.mjs +1 -0
- package/dist/types/base-fields.d.ts +45 -45
- package/dist/types/base-fields.d.ts.map +1 -1
- package/dist/types/common.d.ts +45 -61
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types.cjs +1 -0
- package/dist/types.mjs +1 -0
- package/dist/useFilter-CXFqEHyI.js +129 -0
- package/dist/useFilter-D-bCDo6Z.cjs +1 -0
- package/dist/utils/formatting.d.ts +4 -4
- package/dist/utils/formatting.d.ts.map +1 -1
- package/dist/utils.cjs +4 -0
- package/dist/utils.d.ts +3 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.mjs +105 -0
- package/package.json +147 -9
- package/sdk/api/client.ts +51 -51
- package/sdk/api/datetime.ts +5 -5
- package/sdk/api/index.ts +28 -33
- package/sdk/api/metadata.ts +4 -4
- package/sdk/api.ts +24 -0
- package/sdk/api.types.ts +58 -0
- package/sdk/auth/AuthProvider.tsx +18 -18
- package/sdk/auth/authClient.ts +9 -9
- package/sdk/auth/authConfig.ts +9 -9
- package/sdk/auth/index.ts +5 -5
- package/sdk/auth/types.ts +21 -21
- package/sdk/auth/useAuth.ts +2 -2
- package/sdk/auth.ts +22 -0
- package/sdk/auth.types.ts +28 -0
- package/sdk/base-types.ts +45 -0
- package/sdk/components/hooks/index.ts +22 -22
- package/sdk/components/hooks/useFilter/index.ts +8 -14
- package/sdk/components/hooks/useFilter/types.ts +29 -58
- package/sdk/components/hooks/useFilter/useFilter.ts +41 -44
- package/sdk/components/hooks/useForm/apiClient.ts +8 -8
- package/sdk/components/hooks/useForm/expressionValidator.utils.ts +18 -18
- package/sdk/components/hooks/useForm/index.ts +24 -24
- package/sdk/components/hooks/useForm/optimizedExpressionValidator.utils.ts +22 -22
- package/sdk/components/hooks/useForm/ruleClassifier.utils.ts +26 -62
- package/sdk/components/hooks/useForm/schemaParser.utils.ts +24 -24
- package/sdk/components/hooks/useForm/types.ts +66 -82
- package/sdk/components/hooks/useForm/useForm.ts +15 -21
- package/sdk/components/hooks/useKanban/apiClient.ts +54 -54
- package/sdk/components/hooks/useKanban/context.ts +3 -3
- package/sdk/components/hooks/useKanban/dragDropManager.ts +19 -19
- package/sdk/components/hooks/useKanban/index.ts +26 -26
- package/sdk/components/hooks/useKanban/types.ts +69 -71
- package/sdk/components/hooks/useKanban/useKanban.ts +43 -51
- package/sdk/components/hooks/useKanban/useKanbanSimple.ts +4 -4
- package/sdk/components/hooks/useTable/index.ts +5 -1
- package/sdk/components/hooks/useTable/types.ts +10 -10
- package/sdk/components/hooks/useTable/useTable.ts +10 -10
- package/sdk/filter.ts +13 -0
- package/sdk/filter.types.ts +17 -0
- package/sdk/form.ts +15 -0
- package/sdk/form.types.ts +46 -0
- package/sdk/kanban.ts +23 -0
- package/sdk/kanban.types.ts +50 -0
- package/sdk/kanban.ui.ts +16 -0
- package/sdk/table.ts +7 -0
- package/sdk/table.types.ts +13 -0
- package/sdk/types/base-fields.ts +47 -47
- package/sdk/types/common.ts +47 -71
- package/sdk/types/index.ts +1 -1
- package/sdk/utils/formatting.ts +4 -4
- package/sdk/utils.ts +10 -0
- package/dist/index.cjs +0 -45
- 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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
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:
|
|
396
|
-
name:
|
|
397
|
-
description:
|
|
398
|
-
price:
|
|
399
|
-
quantity:
|
|
400
|
-
inStock:
|
|
401
|
-
category:
|
|
402
|
-
createdAt:
|
|
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"
|
package/dist/api/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
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<
|
|
11
|
+
}): Promise<CreateUpdateResponseType>;
|
|
12
12
|
/** Update existing record */
|
|
13
|
-
update(id: string, data: Partial<T>): Promise<
|
|
13
|
+
update(id: string, data: Partial<T>): Promise<CreateUpdateResponseType>;
|
|
14
14
|
/** Delete record by ID */
|
|
15
|
-
delete(id: string): Promise<
|
|
15
|
+
delete(id: string): Promise<DeleteResponseType>;
|
|
16
16
|
/** List records with optional filtering, sorting, and pagination */
|
|
17
|
-
list(options?:
|
|
17
|
+
list(options?: ListOptionsType): Promise<ListResponseType<T>>;
|
|
18
18
|
/** Get count of records matching the same criteria as list */
|
|
19
|
-
count(options?:
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
64
|
+
fetchField(instanceId: string, fieldId: string): Promise<FetchFieldOptionType[]>;
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
67
|
* Set the base URL for all API requests
|
package/dist/api/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../sdk/api/client.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../sdk/api/client.ts"],"names":[],"mappings":"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"}
|
package/dist/api/datetime.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import type {
|
|
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):
|
|
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:
|
|
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):
|
|
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:
|
|
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,
|
|
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"}
|
package/dist/api/index.d.ts
CHANGED
|
@@ -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 {
|
|
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
|
package/dist/api/index.d.ts.map
CHANGED
|
@@ -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,
|
|
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"}
|
package/dist/api/metadata.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
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?:
|
|
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/metadata.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../sdk/api/metadata.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,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 {
|
|
3
|
-
export declare function AuthProvider({ children, config: configOverride, onAuthChange, onError, loadingComponent, unauthenticatedComponent, skipInitialCheck, }:
|
|
4
|
-
export declare function useAuthContext():
|
|
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,
|
|
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 {
|
|
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<
|
|
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?:
|
|
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?:
|
|
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,
|
|
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 {
|
|
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<
|
|
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:
|
|
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<
|
|
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:
|
|
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,
|
|
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"}
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -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 {
|
|
4
|
+
export type { UserDetailsType, SessionResponseType, AuthStatusType, AuthProviderPropsType, UseAuthReturnType, } from "./types";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/auth/index.d.ts.map
CHANGED
|
@@ -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,
|
|
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"}
|