@appconda/nextjs 1.0.69 → 1.0.70
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.
@@ -23,3 +23,15 @@ export declare const CreateAgent: import("next-safe-action").SafeActionFn<string
|
|
23
23
|
modelId?: string[];
|
24
24
|
};
|
25
25
|
}, readonly [], Agent>;
|
26
|
+
export declare const GetAgent: import("next-safe-action").SafeActionFn<string, import("zod").ZodObject<{
|
27
|
+
id: import("zod").ZodString;
|
28
|
+
}, "strip", import("zod").ZodTypeAny, {
|
29
|
+
id?: string;
|
30
|
+
}, {
|
31
|
+
id?: string;
|
32
|
+
}>, readonly [], {
|
33
|
+
formErrors: string[];
|
34
|
+
fieldErrors: {
|
35
|
+
id?: string[];
|
36
|
+
};
|
37
|
+
}, readonly [], Agent>;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
'use server';
|
2
2
|
import { actionClient } from '../../actions/actionClient';
|
3
3
|
import { getSDKForCurrentUser } from '../../getSDKForCurrentUser';
|
4
|
-
import { CreateAgentSchema } from './schema';
|
4
|
+
import { CreateAgentSchema, GetAgentSchema } from './schema';
|
5
5
|
export const ListAgents = actionClient
|
6
6
|
//.schema(ListWaitlistSignupsSchema)
|
7
7
|
.action(async ({ parsedInput }) => {
|
@@ -26,3 +26,15 @@ export const CreateAgent = actionClient
|
|
26
26
|
throw new Error('Failed to fetch ListWaitlists');
|
27
27
|
}
|
28
28
|
});
|
29
|
+
export const GetAgent = actionClient
|
30
|
+
.schema(GetAgentSchema)
|
31
|
+
.action(async ({ parsedInput }) => {
|
32
|
+
try {
|
33
|
+
const { agent } = await getSDKForCurrentUser();
|
34
|
+
return await agent.GetAgent(parsedInput);
|
35
|
+
}
|
36
|
+
catch (error) {
|
37
|
+
console.error('Error in ListWaitlists:', error);
|
38
|
+
throw new Error('Failed to fetch ListWaitlists');
|
39
|
+
}
|
40
|
+
});
|
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.70",
|
6
6
|
"license": "BSD-3-Clause",
|
7
7
|
"main": "dist/index.js",
|
8
8
|
"types": "dist/index.d.ts",
|
@@ -4,7 +4,7 @@
|
|
4
4
|
import { actionClient } from '../../actions/actionClient';
|
5
5
|
import { getSDKForCurrentUser } from '../../getSDKForCurrentUser';
|
6
6
|
import { getSDKForService } from '../../getSDKForService';
|
7
|
-
import { CreateAgentSchema } from './schema';
|
7
|
+
import { CreateAgentSchema, GetAgentSchema } from './schema';
|
8
8
|
import { Agent } from './types';
|
9
9
|
|
10
10
|
|
@@ -37,3 +37,16 @@ export const CreateAgent = actionClient
|
|
37
37
|
}
|
38
38
|
});
|
39
39
|
|
40
|
+
export const GetAgent = actionClient
|
41
|
+
.schema(GetAgentSchema)
|
42
|
+
.action(async ({ parsedInput }): Promise<Agent> => {
|
43
|
+
try {
|
44
|
+
|
45
|
+
const { agent } = await getSDKForCurrentUser();
|
46
|
+
return await agent.GetAgent(parsedInput);
|
47
|
+
|
48
|
+
} catch (error) {
|
49
|
+
console.error('Error in ListWaitlists:', error);
|
50
|
+
throw new Error('Failed to fetch ListWaitlists');
|
51
|
+
}
|
52
|
+
});
|