@axsdk/core 0.2.12 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/axapi.d.ts +17 -0
- package/dist/axhandler.d.ts +36 -0
- package/dist/axsdk.d.ts +39 -1
- package/dist/axtools.d.ts +0 -32
- package/dist/cli.d.ts +15 -0
- package/dist/lib.cjs +9 -9
- package/dist/lib.cjs.map +10 -10
- package/dist/lib.d.ts +1 -0
- package/dist/lib.js +9 -9
- package/dist/lib.js.map +10 -10
- package/dist/store.d.ts +20 -0
- package/dist/types/axsdk.d.ts +2 -0
- package/package.json +2 -1
package/dist/axapi.d.ts
CHANGED
|
@@ -9,3 +9,20 @@ export declare function cancelSession(sessionID: string): Promise<unknown>;
|
|
|
9
9
|
export declare function getPendingCalls(): Promise<unknown>;
|
|
10
10
|
export declare function updateCall(callID: string, status: string, result: string): Promise<unknown>;
|
|
11
11
|
export declare function postAnswers(requestID: string, status: string, answers: string[]): Promise<unknown>;
|
|
12
|
+
export declare function getKnowledge(options?: {
|
|
13
|
+
group?: string;
|
|
14
|
+
page?: number;
|
|
15
|
+
limit?: number;
|
|
16
|
+
}): Promise<unknown>;
|
|
17
|
+
export declare function getKnowledgeGroups(): Promise<{
|
|
18
|
+
groups: {
|
|
19
|
+
group: string;
|
|
20
|
+
count: number;
|
|
21
|
+
}[];
|
|
22
|
+
}>;
|
|
23
|
+
export declare function searchKnowledge(options: {
|
|
24
|
+
group?: string;
|
|
25
|
+
regex: string;
|
|
26
|
+
page?: number;
|
|
27
|
+
limit?: number;
|
|
28
|
+
}): Promise<unknown>;
|
package/dist/axhandler.d.ts
CHANGED
|
@@ -1 +1,37 @@
|
|
|
1
|
+
export declare function AX_get_data_categories(): Promise<{
|
|
2
|
+
categories: string[];
|
|
3
|
+
}>;
|
|
4
|
+
export declare function AX_search_data(args: unknown): Promise<{
|
|
5
|
+
data: never[];
|
|
6
|
+
total: number;
|
|
7
|
+
offset: number;
|
|
8
|
+
limit: number;
|
|
9
|
+
hasMore: boolean;
|
|
10
|
+
error: string;
|
|
11
|
+
} | {
|
|
12
|
+
data: any[];
|
|
13
|
+
total: number;
|
|
14
|
+
offset: number;
|
|
15
|
+
limit: number;
|
|
16
|
+
hasMore: boolean;
|
|
17
|
+
error?: undefined;
|
|
18
|
+
}>;
|
|
19
|
+
export declare function AX_get_knowledge_groups(): Promise<{
|
|
20
|
+
groups: {
|
|
21
|
+
group: string;
|
|
22
|
+
count: number;
|
|
23
|
+
}[];
|
|
24
|
+
}>;
|
|
25
|
+
export declare function AX_search_knowledge(args: unknown): Promise<{
|
|
26
|
+
groups: Record<string, unknown[]>;
|
|
27
|
+
total: number;
|
|
28
|
+
page: number;
|
|
29
|
+
limit: number;
|
|
30
|
+
} | {
|
|
31
|
+
groups: {};
|
|
32
|
+
total: number;
|
|
33
|
+
page: number;
|
|
34
|
+
limit: number;
|
|
35
|
+
error: string;
|
|
36
|
+
}>;
|
|
1
37
|
export declare function processAXHandler(command: string, args: Record<string, unknown>): Promise<string | [string, Promise<void>]>;
|
package/dist/axsdk.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import EventEmitter from 'eventemitter3';
|
|
|
2
2
|
import { type StoreApi } from 'zustand/vanilla';
|
|
3
3
|
import type { AXSDKConfig, AXHandler } from './types';
|
|
4
4
|
export type * from './types';
|
|
5
|
-
import { type AppState, type ChatState, type EnvState, type DataState, type ErrorState } from './store';
|
|
5
|
+
import { type AppState, type ChatState, type EnvState, type DataState, type ErrorState, type KnowledgeState } from './store';
|
|
6
6
|
declare class AxSdk extends EventEmitter {
|
|
7
7
|
config: AXSDKConfig | undefined;
|
|
8
8
|
constructor();
|
|
@@ -19,6 +19,44 @@ declare class AxSdk extends EventEmitter {
|
|
|
19
19
|
getEnvStore(): StoreApi<EnvState>;
|
|
20
20
|
getDataStore(): StoreApi<DataState>;
|
|
21
21
|
getErrorStore(): StoreApi<ErrorState>;
|
|
22
|
+
getKnowledgeStore(): StoreApi<KnowledgeState>;
|
|
23
|
+
getKnowledgeGroups(): Promise<{
|
|
24
|
+
groups: {
|
|
25
|
+
group: string;
|
|
26
|
+
count: number;
|
|
27
|
+
}[];
|
|
28
|
+
}>;
|
|
29
|
+
fetchKnowledge(options?: {
|
|
30
|
+
group?: string;
|
|
31
|
+
page?: number;
|
|
32
|
+
limit?: number;
|
|
33
|
+
}): Promise<{
|
|
34
|
+
groups: Record<string, unknown[]>;
|
|
35
|
+
total: number;
|
|
36
|
+
page: number;
|
|
37
|
+
limit: number;
|
|
38
|
+
}>;
|
|
39
|
+
getKnowledge(options?: {
|
|
40
|
+
group?: string;
|
|
41
|
+
page?: number;
|
|
42
|
+
limit?: number;
|
|
43
|
+
}): Promise<{
|
|
44
|
+
groups: Record<string, unknown[]>;
|
|
45
|
+
total: number;
|
|
46
|
+
page: number;
|
|
47
|
+
limit: number;
|
|
48
|
+
}>;
|
|
49
|
+
searchKnowledge(options: {
|
|
50
|
+
group?: string;
|
|
51
|
+
regex: string | RegExp;
|
|
52
|
+
page?: number;
|
|
53
|
+
limit?: number;
|
|
54
|
+
}): Promise<{
|
|
55
|
+
groups: Record<string, unknown[]>;
|
|
56
|
+
total: number;
|
|
57
|
+
page: number;
|
|
58
|
+
limit: number;
|
|
59
|
+
}>;
|
|
22
60
|
getChatState(): ChatState;
|
|
23
61
|
getDataState(): DataState;
|
|
24
62
|
resetSession(): void;
|
package/dist/axtools.d.ts
CHANGED
|
@@ -1,40 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Options for screenshot capture functions.
|
|
3
|
-
*/
|
|
4
1
|
export interface ScreenshotOptions {
|
|
5
|
-
/** The DOM element to capture. Defaults to `document.documentElement`. */
|
|
6
2
|
element?: HTMLElement;
|
|
7
|
-
/** MIME type for the output image. Defaults to `'image/png'`. */
|
|
8
3
|
type?: 'image/png' | 'image/jpeg' | 'image/webp';
|
|
9
|
-
/** Image quality (0–1) for lossy formats like jpeg/webp. Defaults to `0.92`. */
|
|
10
4
|
quality?: number;
|
|
11
|
-
/** Device pixel ratio scale factor. Defaults to `window.devicePixelRatio` or `1`. */
|
|
12
5
|
scale?: number;
|
|
13
6
|
}
|
|
14
|
-
/**
|
|
15
|
-
* Captures the current browser viewport (or a specified element) as a
|
|
16
|
-
* base64-encoded data URL string.
|
|
17
|
-
*
|
|
18
|
-
* @param options - Optional screenshot configuration.
|
|
19
|
-
* @returns A `Promise<string>` that resolves to a base64 data URL (e.g. `data:image/png;base64,...`).
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```ts
|
|
23
|
-
* const dataUrl = await captureScreenshot();
|
|
24
|
-
* // dataUrl === 'data:image/png;base64,...'
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
7
|
export declare function captureScreenshot(options?: ScreenshotOptions): Promise<string>;
|
|
28
|
-
/**
|
|
29
|
-
* Captures the current browser viewport (or a specified element) as a `Blob`.
|
|
30
|
-
*
|
|
31
|
-
* @param options - Optional screenshot configuration.
|
|
32
|
-
* @returns A `Promise<Blob>` containing the image data.
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* ```ts
|
|
36
|
-
* const blob = await captureScreenshotBlob({ type: 'image/jpeg', quality: 0.8 });
|
|
37
|
-
* const url = URL.createObjectURL(blob);
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
8
|
export declare function captureScreenshotBlob(options?: ScreenshotOptions): Promise<Blob>;
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
/**
|
|
3
|
+
* CLI test harness for @axsdk/core
|
|
4
|
+
*
|
|
5
|
+
* Usage:
|
|
6
|
+
* bun run ./src/cli.ts
|
|
7
|
+
*
|
|
8
|
+
* Reads env from packages/axsdk-core/.env (Bun auto-loads .env):
|
|
9
|
+
* VITE_AXSDK_API_BASE_URL
|
|
10
|
+
* VITE_AXSDK_API_KEY
|
|
11
|
+
* VITE_AXSDK_APP_ID
|
|
12
|
+
* VITE_AXSDK_APP_DOMAIN (optional)
|
|
13
|
+
* VITE_AXSDK_APP_AUTH_TOKEN (optional)
|
|
14
|
+
*/
|
|
15
|
+
export {};
|