@appconda/nextjs 1.0.63 → 1.0.64
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/modules/waitlist/action.d.ts +12 -0
- package/dist/modules/waitlist/action.js +13 -1
- package/dist/modules/waitlist/schema.d.ts +7 -0
- package/dist/modules/waitlist/schema.js +3 -0
- package/dist/modules/waitlist/service.d.ts +3 -2
- package/dist/modules/waitlist/service.js +3 -0
- package/dist/modules/waitlist/types.d.ts +4 -0
- package/package.json +1 -1
- package/src/modules/waitlist/action.ts +15 -1
- package/src/modules/waitlist/schema.ts +4 -0
- package/src/modules/waitlist/service.ts +7 -2
- package/src/modules/waitlist/types.ts +5 -0
@@ -55,3 +55,15 @@ export declare const CreateWaitlistOffboardedSignup: import("next-safe-action").
|
|
55
55
|
waitlistSignupId?: string[];
|
56
56
|
};
|
57
57
|
}, readonly [], WaitlistSignup>;
|
58
|
+
export declare const ListWaitlistOffboardedSignups: import("next-safe-action").SafeActionFn<string, import("zod").ZodObject<{
|
59
|
+
waitlistId: import("zod").ZodString;
|
60
|
+
}, "strip", import("zod").ZodTypeAny, {
|
61
|
+
waitlistId?: string;
|
62
|
+
}, {
|
63
|
+
waitlistId?: string;
|
64
|
+
}>, readonly [], {
|
65
|
+
formErrors: string[];
|
66
|
+
fieldErrors: {
|
67
|
+
waitlistId?: string[];
|
68
|
+
};
|
69
|
+
}, readonly [], WaitlistSignup>;
|
@@ -2,7 +2,7 @@
|
|
2
2
|
import { actionClient } from '../../actions/actionClient';
|
3
3
|
import { getSDKForCurrentUser } from '../../getSDKForCurrentUser';
|
4
4
|
import { getSDKForService } from '../../getSDKForService';
|
5
|
-
import { CreateWaitlistOffboardedSignupSchema, CreateWaitlistSchema, CreateWaitlistSignupSchema, ListWaitlistSignupsSchema } from "./schema";
|
5
|
+
import { CreateWaitlistOffboardedSignupSchema, CreateWaitlistSchema, CreateWaitlistSignupSchema, ListWaitlistOffboardedSignupsSchema, ListWaitlistSignupsSchema } from "./schema";
|
6
6
|
export const ListWaitlistSignups = actionClient
|
7
7
|
.schema(ListWaitlistSignupsSchema)
|
8
8
|
.action(async ({ parsedInput }) => {
|
@@ -63,3 +63,15 @@ export const CreateWaitlistOffboardedSignup = actionClient
|
|
63
63
|
throw new Error('Failed to fetch ListWaitlists');
|
64
64
|
}
|
65
65
|
});
|
66
|
+
export const ListWaitlistOffboardedSignups = actionClient
|
67
|
+
.schema(ListWaitlistOffboardedSignupsSchema)
|
68
|
+
.action(async ({ parsedInput }) => {
|
69
|
+
try {
|
70
|
+
const { waitlist } = await getSDKForService();
|
71
|
+
return await waitlist.ListWaitlistOffboardedSignups(parsedInput);
|
72
|
+
}
|
73
|
+
catch (error) {
|
74
|
+
console.error('Error in ListWaitlists:', error);
|
75
|
+
throw new Error('Failed to fetch ListWaitlists');
|
76
|
+
}
|
77
|
+
});
|
@@ -6,6 +6,13 @@ export declare const ListWaitlistSignupsSchema: z.ZodObject<{
|
|
6
6
|
}, {
|
7
7
|
waitlistId?: string;
|
8
8
|
}>;
|
9
|
+
export declare const ListWaitlistOffboardedSignupsSchema: z.ZodObject<{
|
10
|
+
waitlistId: z.ZodString;
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
12
|
+
waitlistId?: string;
|
13
|
+
}, {
|
14
|
+
waitlistId?: string;
|
15
|
+
}>;
|
9
16
|
export declare const CreateWaitlistSchema: z.ZodObject<{
|
10
17
|
name: z.ZodString;
|
11
18
|
}, "strip", z.ZodTypeAny, {
|
@@ -2,6 +2,9 @@ import { z } from "zod";
|
|
2
2
|
export const ListWaitlistSignupsSchema = z.object({
|
3
3
|
waitlistId: z.string()
|
4
4
|
});
|
5
|
+
export const ListWaitlistOffboardedSignupsSchema = z.object({
|
6
|
+
waitlistId: z.string()
|
7
|
+
});
|
5
8
|
export const CreateWaitlistSchema = z.object({
|
6
9
|
name: z.string()
|
7
10
|
});
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import z from "zod";
|
2
2
|
import { ServiceClient } from "../../service-client";
|
3
|
-
import { Waitlist, WaitlistSignup } from "./types";
|
4
|
-
import { CreateWaitlistOffboardedSignupSchema, CreateWaitlistSchema, CreateWaitlistSignupSchema } from "./schema";
|
3
|
+
import { Waitlist, WaitlistOffboardedSignup, WaitlistSignup } from "./types";
|
4
|
+
import { CreateWaitlistOffboardedSignupSchema, CreateWaitlistSchema, CreateWaitlistSignupSchema, ListWaitlistOffboardedSignupsSchema } from "./schema";
|
5
5
|
export declare class WaitlistService extends ServiceClient {
|
6
6
|
protected getServiceName(): string;
|
7
7
|
ListWiatlistSignups(waitlistId: string): Promise<any[]>;
|
@@ -9,4 +9,5 @@ export declare class WaitlistService extends ServiceClient {
|
|
9
9
|
CreateWaitlist(payload: z.infer<typeof CreateWaitlistSchema>): Promise<Waitlist>;
|
10
10
|
CreateWaitlistSignup(payload: z.infer<typeof CreateWaitlistSignupSchema>): Promise<WaitlistSignup>;
|
11
11
|
CreateWaitlistOffboardedSignup(payload: z.infer<typeof CreateWaitlistOffboardedSignupSchema>): Promise<WaitlistSignup>;
|
12
|
+
ListWaitlistOffboardedSignups(payload: z.infer<typeof ListWaitlistOffboardedSignupsSchema>): Promise<WaitlistOffboardedSignup>;
|
12
13
|
}
|
@@ -21,4 +21,7 @@ export class WaitlistService extends ServiceClient {
|
|
21
21
|
async CreateWaitlistOffboardedSignup(payload) {
|
22
22
|
return await this.actionCall('CreateWaitlistOffboardedSignup', payload);
|
23
23
|
}
|
24
|
+
async ListWaitlistOffboardedSignups(payload) {
|
25
|
+
return await this.actionCall('ListOffboardedSignups', payload);
|
26
|
+
}
|
24
27
|
}
|
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.64",
|
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 { CreateWaitlistOffboardedSignupSchema, CreateWaitlistSchema, CreateWaitlistSignupSchema, ListWaitlistSignupsSchema } from "./schema";
|
7
|
+
import { CreateWaitlistOffboardedSignupSchema, CreateWaitlistSchema, CreateWaitlistSignupSchema, ListWaitlistOffboardedSignupsSchema, ListWaitlistSignupsSchema } from "./schema";
|
8
8
|
import { Waitlist, WaitlistSignup } from './types';
|
9
9
|
|
10
10
|
|
@@ -72,6 +72,20 @@ export const CreateWaitlistSignup = actionClient
|
|
72
72
|
const { waitlist } = await getSDKForService();
|
73
73
|
return await waitlist.CreateWaitlistOffboardedSignup(parsedInput);
|
74
74
|
|
75
|
+
} catch (error) {
|
76
|
+
console.error('Error in ListWaitlists:', error);
|
77
|
+
throw new Error('Failed to fetch ListWaitlists');
|
78
|
+
}
|
79
|
+
});
|
80
|
+
|
81
|
+
export const ListWaitlistOffboardedSignups = actionClient
|
82
|
+
.schema(ListWaitlistOffboardedSignupsSchema)
|
83
|
+
.action(async ({ parsedInput }): Promise<WaitlistSignup> => {
|
84
|
+
try {
|
85
|
+
|
86
|
+
const { waitlist } = await getSDKForService();
|
87
|
+
return await waitlist.ListWaitlistOffboardedSignups(parsedInput);
|
88
|
+
|
75
89
|
} catch (error) {
|
76
90
|
console.error('Error in ListWaitlists:', error);
|
77
91
|
throw new Error('Failed to fetch ListWaitlists');
|
@@ -2,8 +2,8 @@
|
|
2
2
|
import z from "zod";
|
3
3
|
import { Payload } from "../../client";
|
4
4
|
import { ServiceClient } from "../../service-client";
|
5
|
-
import { Waitlist, WaitlistSignup } from "./types";
|
6
|
-
import { CreateWaitlistOffboardedSignupSchema, CreateWaitlistSchema, CreateWaitlistSignupSchema } from "./schema";
|
5
|
+
import { Waitlist, WaitlistOffboardedSignup, WaitlistSignup } from "./types";
|
6
|
+
import { CreateWaitlistOffboardedSignupSchema, CreateWaitlistSchema, CreateWaitlistSignupSchema, ListWaitlistOffboardedSignupsSchema } from "./schema";
|
7
7
|
|
8
8
|
export class WaitlistService extends ServiceClient {
|
9
9
|
protected getServiceName(): string {
|
@@ -33,4 +33,9 @@ export class WaitlistService extends ServiceClient {
|
|
33
33
|
return await this.actionCall('CreateWaitlistOffboardedSignup', payload);
|
34
34
|
}
|
35
35
|
|
36
|
+
public async ListWaitlistOffboardedSignups(payload: z.infer<typeof ListWaitlistOffboardedSignupsSchema>): Promise<WaitlistOffboardedSignup> {
|
37
|
+
return await this.actionCall('ListOffboardedSignups', payload);
|
38
|
+
}
|
39
|
+
|
40
|
+
|
36
41
|
}
|