@qelos/sdk 3.11.9 → 3.11.10
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.
|
@@ -21,6 +21,18 @@ export interface IComponent {
|
|
|
21
21
|
type IComponentCreateParams = Pick<IComponent, 'identifier' | 'componentName' | 'content'> & {
|
|
22
22
|
description?: string;
|
|
23
23
|
};
|
|
24
|
+
interface IBulkComponentResult {
|
|
25
|
+
identifier: string;
|
|
26
|
+
success: boolean;
|
|
27
|
+
component?: IComponent;
|
|
28
|
+
error?: string;
|
|
29
|
+
}
|
|
30
|
+
interface IBulkComponentResponse {
|
|
31
|
+
total: number;
|
|
32
|
+
succeeded: number;
|
|
33
|
+
failed: number;
|
|
34
|
+
results: IBulkComponentResult[];
|
|
35
|
+
}
|
|
24
36
|
type IComponentUpdateParams = Partial<Pick<IComponent, 'identifier' | 'componentName' | 'description' | 'content'>>;
|
|
25
37
|
export default class QlComponents extends BaseSDK {
|
|
26
38
|
private relativePath;
|
|
@@ -30,5 +42,6 @@ export default class QlComponents extends BaseSDK {
|
|
|
30
42
|
remove(componentId: string): Promise<IComponent>;
|
|
31
43
|
update(componentId: string, changes: IComponentUpdateParams): Promise<IComponent>;
|
|
32
44
|
create(component: IComponentCreateParams): Promise<IComponent>;
|
|
45
|
+
bulkCreateOrUpdate(components: IComponentCreateParams[]): Promise<IBulkComponentResponse>;
|
|
33
46
|
}
|
|
34
47
|
export {};
|
|
@@ -27,5 +27,12 @@ export default class QlComponents extends BaseSDK {
|
|
|
27
27
|
body: JSON.stringify(component)
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
|
+
bulkCreateOrUpdate(components) {
|
|
31
|
+
return this.callJsonApi(`${this.relativePath}/bulk`, {
|
|
32
|
+
method: 'post',
|
|
33
|
+
headers: { 'content-type': 'application/json' },
|
|
34
|
+
body: JSON.stringify({ components })
|
|
35
|
+
});
|
|
36
|
+
}
|
|
30
37
|
}
|
|
31
38
|
//# sourceMappingURL=components.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../src/administrator/components.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../src/administrator/components.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,aAAa,CAAC;AA0ClC,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,OAAO;IACvC,YAAY,GAAG,iBAAiB,CAAC;IAEzC,YAAY,OAAwB;QAClC,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAED,YAAY,CAAC,WAAmB;QAC9B,OAAO,IAAI,CAAC,WAAW,CAAa,GAAG,IAAI,CAAC,YAAY,IAAI,WAAW,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,WAAW,CAAe,IAAI,CAAC,YAAY,CAAC,CAAC;IAC3D,CAAC;IAED,MAAM,CAAC,WAAmB;QACxB,OAAO,IAAI,CAAC,WAAW,CAAa,GAAG,IAAI,CAAC,YAAY,IAAI,WAAW,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;IACnG,CAAC;IAED,MAAM,CAAC,WAAmB,EAAE,OAA+B;QACzD,OAAO,IAAI,CAAC,WAAW,CACrB,GAAG,IAAI,CAAC,YAAY,IAAI,WAAW,EAAE,EACrC;YACE,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;YAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;SAC9B,CACF,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,SAAiC;QACtC,OAAO,IAAI,CAAC,WAAW,CAAa,IAAI,CAAC,YAAY,EAAE;YACrD,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;YAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;SAChC,CAAC,CAAC;IACL,CAAC;IAED,kBAAkB,CAAC,UAAoC;QACrD,OAAO,IAAI,CAAC,WAAW,CAAyB,GAAG,IAAI,CAAC,YAAY,OAAO,EAAE;YAC3E,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;YAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,UAAU,EAAE,CAAC;SACrC,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/dist/ai/types.d.ts
CHANGED
|
@@ -43,6 +43,7 @@ export interface IChatCompletionOptions {
|
|
|
43
43
|
stream?: boolean;
|
|
44
44
|
queryParams?: Record<string, any>;
|
|
45
45
|
clientTools?: IClientTool[];
|
|
46
|
+
rules?: string[];
|
|
46
47
|
}
|
|
47
48
|
export interface ISSEStreamProcessor extends AsyncIterable<any> {
|
|
48
49
|
processManually(onData: (data: any) => void | boolean): Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qelos/sdk",
|
|
3
|
-
"version": "3.11.
|
|
3
|
+
"version": "3.11.10",
|
|
4
4
|
"description": "SDK for Qelos API",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"access": "public"
|
|
103
103
|
},
|
|
104
104
|
"dependencies": {
|
|
105
|
-
"@qelos/global-types": "^3.11.
|
|
105
|
+
"@qelos/global-types": "^3.11.10"
|
|
106
106
|
},
|
|
107
107
|
"devDependencies": {
|
|
108
108
|
"tsx": "^4.21.0",
|
|
@@ -24,6 +24,20 @@ type IComponentCreateParams = Pick<IComponent, 'identifier' | 'componentName' |
|
|
|
24
24
|
description?: string;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
+
interface IBulkComponentResult {
|
|
28
|
+
identifier: string;
|
|
29
|
+
success: boolean;
|
|
30
|
+
component?: IComponent;
|
|
31
|
+
error?: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
interface IBulkComponentResponse {
|
|
35
|
+
total: number;
|
|
36
|
+
succeeded: number;
|
|
37
|
+
failed: number;
|
|
38
|
+
results: IBulkComponentResult[];
|
|
39
|
+
}
|
|
40
|
+
|
|
27
41
|
type IComponentUpdateParams = Partial<Pick<IComponent, 'identifier' | 'componentName' | 'description' | 'content'>>;
|
|
28
42
|
|
|
29
43
|
export default class QlComponents extends BaseSDK {
|
|
@@ -63,4 +77,12 @@ export default class QlComponents extends BaseSDK {
|
|
|
63
77
|
body: JSON.stringify(component)
|
|
64
78
|
});
|
|
65
79
|
}
|
|
80
|
+
|
|
81
|
+
bulkCreateOrUpdate(components: IComponentCreateParams[]): Promise<IBulkComponentResponse> {
|
|
82
|
+
return this.callJsonApi<IBulkComponentResponse>(`${this.relativePath}/bulk`, {
|
|
83
|
+
method: 'post',
|
|
84
|
+
headers: { 'content-type': 'application/json' },
|
|
85
|
+
body: JSON.stringify({ components })
|
|
86
|
+
});
|
|
87
|
+
}
|
|
66
88
|
}
|
package/src/ai/types.ts
CHANGED