@appconda/nextjs 1.0.36 → 1.0.37
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.
@@ -1,3 +1,9 @@
|
|
1
|
+
interface WaitlistSignup {
|
2
|
+
email: string;
|
3
|
+
}
|
4
|
+
interface Waitlist {
|
5
|
+
name: string;
|
6
|
+
}
|
1
7
|
export declare const ListWaitlistSignups: import("next-safe-action/.").SafeActionFn<string, import("zod").ZodObject<{
|
2
8
|
waitlistId: import("zod").ZodString;
|
3
9
|
}, "strip", import("zod").ZodTypeAny, {
|
@@ -9,8 +15,9 @@ export declare const ListWaitlistSignups: import("next-safe-action/.").SafeActio
|
|
9
15
|
fieldErrors: {
|
10
16
|
waitlistId?: string[];
|
11
17
|
};
|
12
|
-
}, readonly [],
|
18
|
+
}, readonly [], WaitlistSignup[]>;
|
13
19
|
export declare const ListWaitlists: import("next-safe-action/.").SafeActionFn<string, undefined, readonly [], {
|
14
20
|
formErrors: string[];
|
15
21
|
fieldErrors: {};
|
16
|
-
}, readonly [],
|
22
|
+
}, readonly [], Waitlist[]>;
|
23
|
+
export {};
|
@@ -8,7 +8,7 @@ export const ListWaitlistSignups = actionClient
|
|
8
8
|
try {
|
9
9
|
const { waitlistId } = parsedInput;
|
10
10
|
const { waitlist } = await getSDKForCurrentUser();
|
11
|
-
return await waitlist.ListWiatlistSignups(waitlistId);
|
11
|
+
return await waitlist.ListWiatlistSignups(waitlistId); // typo: Wiatlist mi?
|
12
12
|
}
|
13
13
|
catch (error) {
|
14
14
|
console.error('Error in ListWaitlistSignups:', error);
|
@@ -16,13 +16,13 @@ export const ListWaitlistSignups = actionClient
|
|
16
16
|
}
|
17
17
|
});
|
18
18
|
export const ListWaitlists = actionClient
|
19
|
-
.action(async (
|
19
|
+
.action(async () => {
|
20
20
|
try {
|
21
21
|
const { waitlist } = await getSDKForCurrentUser();
|
22
22
|
return await waitlist.ListWaitlists();
|
23
23
|
}
|
24
24
|
catch (error) {
|
25
|
-
console.error('Error in
|
26
|
-
throw new Error('Failed to fetch
|
25
|
+
console.error('Error in ListWaitlists:', error);
|
26
|
+
throw new Error('Failed to fetch ListWaitlists');
|
27
27
|
}
|
28
28
|
});
|
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.37",
|
6
6
|
"license": "BSD-3-Clause",
|
7
7
|
"main": "dist/index.js",
|
8
8
|
"types": "dist/index.d.ts",
|
@@ -5,28 +5,35 @@ import { actionClient } from '../../actions/actionClient';
|
|
5
5
|
import { getSDKForCurrentUser } from '../../getSDKForCurrentUser';
|
6
6
|
import { ListWaitlistSignupsSchema } from "./schema";
|
7
7
|
|
8
|
+
|
9
|
+
interface WaitlistSignup {
|
10
|
+
email: string;
|
11
|
+
}
|
12
|
+
|
13
|
+
interface Waitlist {
|
14
|
+
name: string;
|
15
|
+
}
|
16
|
+
|
8
17
|
export const ListWaitlistSignups = actionClient
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
18
|
+
.schema(ListWaitlistSignupsSchema)
|
19
|
+
.action(async ({ parsedInput }): Promise<WaitlistSignup[]> => {
|
20
|
+
try {
|
21
|
+
const { waitlistId } = parsedInput;
|
22
|
+
const { waitlist } = await getSDKForCurrentUser();
|
23
|
+
return await waitlist.ListWiatlistSignups(waitlistId); // typo: Wiatlist mi?
|
24
|
+
} catch (error) {
|
25
|
+
console.error('Error in ListWaitlistSignups:', error);
|
26
|
+
throw new Error('Failed to fetch ListWaitlistSignups');
|
27
|
+
}
|
28
|
+
});
|
20
29
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
}
|
32
|
-
});
|
30
|
+
export const ListWaitlists = actionClient
|
31
|
+
.action(async (): Promise<Waitlist[]> => {
|
32
|
+
try {
|
33
|
+
const { waitlist } = await getSDKForCurrentUser();
|
34
|
+
return await waitlist.ListWaitlists();
|
35
|
+
} catch (error) {
|
36
|
+
console.error('Error in ListWaitlists:', error);
|
37
|
+
throw new Error('Failed to fetch ListWaitlists');
|
38
|
+
}
|
39
|
+
});
|