@appconda/nextjs 1.0.68 → 1.0.69
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.
@@ -12,3 +12,30 @@ export declare const CreateAgentSchema: z.ZodObject<{
|
|
12
12
|
id?: string;
|
13
13
|
modelId?: string;
|
14
14
|
}>;
|
15
|
+
export declare const GetAgentSchema: z.ZodObject<{
|
16
|
+
id: z.ZodString;
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
18
|
+
id?: string;
|
19
|
+
}, {
|
20
|
+
id?: string;
|
21
|
+
}>;
|
22
|
+
export declare const UpdateAgentSchema: z.ZodObject<{
|
23
|
+
id: z.ZodString;
|
24
|
+
name: z.ZodString;
|
25
|
+
modelId: z.ZodString;
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
27
|
+
name?: string;
|
28
|
+
id?: string;
|
29
|
+
modelId?: string;
|
30
|
+
}, {
|
31
|
+
name?: string;
|
32
|
+
id?: string;
|
33
|
+
modelId?: string;
|
34
|
+
}>;
|
35
|
+
export declare const DeleteAgentSchema: z.ZodObject<{
|
36
|
+
id: z.ZodString;
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
38
|
+
id?: string;
|
39
|
+
}, {
|
40
|
+
id?: string;
|
41
|
+
}>;
|
@@ -4,3 +4,14 @@ export const CreateAgentSchema = z.object({
|
|
4
4
|
name: z.string(),
|
5
5
|
modelId: z.string()
|
6
6
|
});
|
7
|
+
export const GetAgentSchema = z.object({
|
8
|
+
id: z.string()
|
9
|
+
});
|
10
|
+
export const UpdateAgentSchema = z.object({
|
11
|
+
id: z.string(),
|
12
|
+
name: z.string(),
|
13
|
+
modelId: z.string()
|
14
|
+
});
|
15
|
+
export const DeleteAgentSchema = z.object({
|
16
|
+
id: z.string()
|
17
|
+
});
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import z from "zod";
|
2
2
|
import { ServiceClient } from "../../service-client";
|
3
|
-
import { CreateAgentSchema } from "./schema";
|
3
|
+
import { CreateAgentSchema, GetAgentSchema } from "./schema";
|
4
4
|
import { Agent } from "./types";
|
5
5
|
export declare class AgentService extends ServiceClient {
|
6
6
|
protected getServiceName(): string;
|
7
7
|
CreateAgent(payload: z.infer<typeof CreateAgentSchema>): Promise<Agent>;
|
8
|
+
GetAgent(payload: z.infer<typeof GetAgentSchema>): Promise<Agent>;
|
8
9
|
ListAgents(): Promise<Agent[]>;
|
9
10
|
}
|
@@ -6,6 +6,9 @@ export class AgentService extends ServiceClient {
|
|
6
6
|
async CreateAgent(payload) {
|
7
7
|
return await this.actionCall('CreateAgent', payload);
|
8
8
|
}
|
9
|
+
async GetAgent(payload) {
|
10
|
+
return await this.actionCall('GetAgent', payload);
|
11
|
+
}
|
9
12
|
async ListAgents() {
|
10
13
|
return await this.actionCall('ListAgents', {});
|
11
14
|
}
|
package/package.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
"name": "@appconda/nextjs",
|
3
3
|
"homepage": "https://appconda.io/support",
|
4
4
|
"description": "Appconda is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API",
|
5
|
-
"version": "1.0.
|
5
|
+
"version": "1.0.69",
|
6
6
|
"license": "BSD-3-Clause",
|
7
7
|
"main": "dist/index.js",
|
8
8
|
"types": "dist/index.d.ts",
|
@@ -5,3 +5,17 @@ export const CreateAgentSchema = z.object({
|
|
5
5
|
name: z.string(),
|
6
6
|
modelId: z.string()
|
7
7
|
});
|
8
|
+
|
9
|
+
export const GetAgentSchema = z.object({
|
10
|
+
id: z.string()
|
11
|
+
});
|
12
|
+
|
13
|
+
export const UpdateAgentSchema = z.object({
|
14
|
+
id: z.string(),
|
15
|
+
name: z.string(),
|
16
|
+
modelId: z.string()
|
17
|
+
});
|
18
|
+
|
19
|
+
export const DeleteAgentSchema = z.object({
|
20
|
+
id: z.string()
|
21
|
+
});
|
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
import z from "zod";
|
3
3
|
import { ServiceClient } from "../../service-client";
|
4
|
-
import { CreateAgentSchema } from "./schema";
|
4
|
+
import { CreateAgentSchema, GetAgentSchema } from "./schema";
|
5
5
|
import { Agent } from "./types";
|
6
6
|
|
7
7
|
|
@@ -14,6 +14,10 @@ export class AgentService extends ServiceClient {
|
|
14
14
|
return await this.actionCall('CreateAgent', payload);
|
15
15
|
}
|
16
16
|
|
17
|
+
public async GetAgent(payload: z.infer<typeof GetAgentSchema>): Promise<Agent> {
|
18
|
+
return await this.actionCall('GetAgent', payload);
|
19
|
+
}
|
20
|
+
|
17
21
|
public async ListAgents(): Promise<Agent[]> {
|
18
22
|
return await this.actionCall('ListAgents', {});
|
19
23
|
}
|