@appconda/sdk 1.0.411 → 1.0.414
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/client.js +10 -4
- package/dist/inputFile.d.ts +0 -1
- package/dist/inputFile.js +1 -2
- package/dist/modules/agent/index.d.ts +0 -1
- package/dist/modules/agent/index.js +1 -2
- package/dist/modules/ai/node/index.d.ts +0 -1
- package/dist/modules/ai/node/index.js +1 -2
- package/dist/modules/builder/index.d.ts +0 -1
- package/dist/modules/builder/index.js +1 -2
- package/dist/modules/datasource/index.d.ts +0 -1
- package/dist/modules/datasource/index.js +1 -2
- package/dist/modules/emploid/index.d.ts +0 -1
- package/dist/modules/emploid/index.js +1 -2
- package/dist/modules/google/index.d.ts +0 -1
- package/dist/modules/google/index.js +1 -2
- package/dist/modules/hooks/index.d.ts +0 -1
- package/dist/modules/hooks/index.js +1 -2
- package/dist/modules/mail/index.d.ts +0 -1
- package/dist/modules/mail/index.js +1 -2
- package/dist/modules/notion/index.d.ts +0 -1
- package/dist/modules/notion/index.js +1 -2
- package/dist/modules/organization/index.d.ts +0 -1
- package/dist/modules/organization/index.js +1 -2
- package/dist/modules/scheduled-job/index.d.ts +0 -2
- package/dist/modules/scheduled-job/index.js +1 -3
- package/dist/modules/task/index.d.ts +0 -1
- package/dist/modules/task/index.js +1 -2
- package/dist/modules/tenant/index.d.ts +0 -1
- package/dist/modules/tenant/index.js +1 -2
- package/dist/modules/waitlist/index.d.ts +0 -1
- package/dist/modules/waitlist/index.js +1 -2
- package/package.json +1 -1
- package/src/client.ts +12 -3
- package/src/modules/agent/index.ts +1 -1
- package/src/modules/ai/node/index.ts +1 -1
- package/src/modules/builder/index.ts +1 -1
- package/src/modules/datasource/index.ts +1 -1
- package/src/modules/emploid/index.ts +1 -1
- package/src/modules/google/index.ts +1 -1
- package/src/modules/hooks/index.ts +1 -1
- package/src/modules/mail/index.ts +1 -1
- package/src/modules/notion/index.ts +1 -1
- package/src/modules/organization/index.ts +1 -1
- package/src/modules/scheduled-job/index.ts +1 -2
- package/src/modules/task/index.ts +1 -1
- package/src/modules/tenant/index.ts +1 -2
- package/src/modules/waitlist/index.ts +1 -1
- package/src/inputFile.ts +0 -23
- package/src/modules/agent/action.ts +0 -66
- package/src/modules/ai/node/actions.ts +0 -14
- package/src/modules/builder/action.ts +0 -234
- package/src/modules/datasource/action.ts +0 -189
- package/src/modules/emploid/action.ts +0 -1063
- package/src/modules/google/action.ts +0 -54
- package/src/modules/hooks/lib/handler.ts +0 -27
- package/src/modules/mail/action.ts +0 -22
- package/src/modules/notion/action.ts +0 -53
- package/src/modules/organization/action.ts +0 -71
- package/src/modules/scheduled-job/action.ts +0 -212
- package/src/modules/scheduled-job/lib/handler.ts +0 -27
- package/src/modules/task/action.ts +0 -819
- package/src/modules/tenant/actions.ts +0 -173
- package/src/modules/waitlist/action.ts +0 -93
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
'use server';
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import { AppcondaException } from "../../client";
|
|
4
|
-
import { getSDKForCurrentUser } from "../../getSDKForCurrentUser";
|
|
5
|
-
import { getSDKForService } from "../../getSDKForService";
|
|
6
|
-
import { CreateTenantSchema, CreateTenantUserSchema, GetTenantByIdSchema, ListTenantUsersSchema, ListUserTenantsSchema } from "./schema";
|
|
7
|
-
import { TTenant, TTenantUser } from "./types";
|
|
8
|
-
/*
|
|
9
|
-
const getTenantActionSchema = z.object({
|
|
10
|
-
tenantId: z.string()
|
|
11
|
-
}); */
|
|
12
|
-
/*
|
|
13
|
-
export const getTenantAction = async (parsedInput: z.infer<typeof getTenantActionSchema>) => {
|
|
14
|
-
try {
|
|
15
|
-
const { tenantId } = parsedInput;
|
|
16
|
-
const { tenants } = await getSDKForCurrentUser();
|
|
17
|
-
return await tenants.get(tenantId);
|
|
18
|
-
} catch (error) {
|
|
19
|
-
if (error instanceof AppcondaException) {
|
|
20
|
-
throw new Error(error.message);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
throw error;
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const listUserTenantsScheema = z.object({
|
|
30
|
-
userId: z.string()
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
export const listUserTenantsAction = async (parsedInput: z.infer<typeof listUserTenantsScheema>) => {
|
|
34
|
-
try {
|
|
35
|
-
const { userId } = parsedInput;
|
|
36
|
-
const { tenants } = await getSDKForService();
|
|
37
|
-
//@ts-ignore
|
|
38
|
-
return await tenants.listUserTenants(userId);
|
|
39
|
-
} catch (error) {
|
|
40
|
-
if (error instanceof AppcondaException) {
|
|
41
|
-
throw new Error(error.message);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
throw error;
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const createTenantScheema = z.object({
|
|
50
|
-
id: z.string(),
|
|
51
|
-
name: z.string(),
|
|
52
|
-
slug: z.string()
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
export const createTenantAction = async (parsedInput: z.infer<typeof createTenantScheema>)=> {
|
|
56
|
-
try {
|
|
57
|
-
const { id, name, slug } = parsedInput;
|
|
58
|
-
const { tenants } = await getSDKForCurrentUser();
|
|
59
|
-
return await tenants.create({ $id: id, name: name, slug: slug, users: [] });
|
|
60
|
-
} catch (error) {
|
|
61
|
-
if (error instanceof AppcondaException) {
|
|
62
|
-
throw new Error(error.message);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
throw error;
|
|
66
|
-
}
|
|
67
|
-
}; */
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
export const AdminGetAllTenantsIdsAndNames = async () => {
|
|
71
|
-
try {
|
|
72
|
-
|
|
73
|
-
const { tenants } = await getSDKForService();
|
|
74
|
-
return await tenants.AdminGetAllTenantsIdsAndNames();
|
|
75
|
-
} catch (error) {
|
|
76
|
-
if (error instanceof AppcondaException) {
|
|
77
|
-
throw new Error(error.message);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
throw error;
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
export async function CreateTenant(parsedInput: z.infer<typeof CreateTenantSchema>): Promise<TTenant> {
|
|
86
|
-
try {
|
|
87
|
-
const { tenants } = await getSDKForService();
|
|
88
|
-
//@ts-ignore
|
|
89
|
-
const app = await tenants.CreateTenant(parsedInput);
|
|
90
|
-
return app;
|
|
91
|
-
} catch (error) {
|
|
92
|
-
if (error instanceof AppcondaException) {
|
|
93
|
-
throw new Error(error.message);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
throw error;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export async function CreateTenantUser(parsedInput: z.infer<typeof CreateTenantUserSchema>): Promise<TTenantUser> {
|
|
101
|
-
try {
|
|
102
|
-
const { tenants } = await getSDKForService();
|
|
103
|
-
//@ts-ignore
|
|
104
|
-
const app = await tenants.CreateTenantUser(parsedInput);
|
|
105
|
-
return app;
|
|
106
|
-
} catch (error) {
|
|
107
|
-
if (error instanceof AppcondaException) {
|
|
108
|
-
throw new Error(error.message);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
throw error;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export async function GetTenantById(parsedInput: z.infer<typeof GetTenantByIdSchema>): Promise<TTenant> {
|
|
116
|
-
try {
|
|
117
|
-
const { tenants } = await getSDKForService();
|
|
118
|
-
//@ts-ignore
|
|
119
|
-
const app = await tenants.GetTenantById(parsedInput);
|
|
120
|
-
return app;
|
|
121
|
-
} catch (error) {
|
|
122
|
-
if (error instanceof AppcondaException) {
|
|
123
|
-
throw new Error(error.message);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
throw error;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
export async function ListTenants(): Promise<TTenant[]> {
|
|
131
|
-
try {
|
|
132
|
-
const { tenants } = await getSDKForService();
|
|
133
|
-
//@ts-ignore
|
|
134
|
-
const app = await tenants.ListTenants();
|
|
135
|
-
return app;
|
|
136
|
-
} catch (error) {
|
|
137
|
-
if (error instanceof AppcondaException) {
|
|
138
|
-
throw new Error(error.message);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
throw error;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
export async function ListTenantUsers(parsedInput: z.infer<typeof ListTenantUsersSchema>): Promise<TTenantUser[]> {
|
|
146
|
-
try {
|
|
147
|
-
const { tenants } = await getSDKForService();
|
|
148
|
-
//@ts-ignore
|
|
149
|
-
const app = await tenants.ListTenantUsers(parsedInput);
|
|
150
|
-
return app;
|
|
151
|
-
} catch (error) {
|
|
152
|
-
if (error instanceof AppcondaException) {
|
|
153
|
-
throw new Error(error.message);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
throw error;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
export async function ListUserTenants(parsedInput: z.infer<typeof ListUserTenantsSchema>): Promise<TTenant[]> {
|
|
161
|
-
try {
|
|
162
|
-
const { tenants } = await getSDKForService();
|
|
163
|
-
//@ts-ignore
|
|
164
|
-
const app = await tenants.ListUserTenants(parsedInput);
|
|
165
|
-
return app;
|
|
166
|
-
} catch (error) {
|
|
167
|
-
if (error instanceof AppcondaException) {
|
|
168
|
-
throw new Error(error.message);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
throw error;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
'use server';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { actionClient } from '../../actions/actionClient';
|
|
5
|
-
import { getSDKForCurrentUser } from '../../getSDKForCurrentUser';
|
|
6
|
-
import { getSDKForService } from '../../getSDKForService';
|
|
7
|
-
import { CreateWaitlistOffboardedSignupSchema, CreateWaitlistSchema, CreateWaitlistSignupSchema, ListWaitlistOffboardedSignupsSchema, ListWaitlistSignupsSchema } from "./schema";
|
|
8
|
-
import { Waitlist, WaitlistSignup } from './types';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export const ListWaitlistSignups = actionClient
|
|
14
|
-
.schema(ListWaitlistSignupsSchema)
|
|
15
|
-
.action(async ({ parsedInput }): Promise<WaitlistSignup[]> => {
|
|
16
|
-
try {
|
|
17
|
-
const { waitlistId } = parsedInput;
|
|
18
|
-
const { waitlist } = await getSDKForService();
|
|
19
|
-
return await waitlist.ListWiatlistSignups(waitlistId); // typo: Wiatlist mi?
|
|
20
|
-
} catch (error) {
|
|
21
|
-
console.error('Error in ListWaitlistSignups:', error);
|
|
22
|
-
throw new Error('Failed to fetch ListWaitlistSignups');
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
export const ListWaitlists = actionClient
|
|
27
|
-
.action(async (): Promise<Waitlist[]> => {
|
|
28
|
-
try {
|
|
29
|
-
const { waitlist } = await getSDKForService();
|
|
30
|
-
return await waitlist.ListWaitlists();
|
|
31
|
-
} catch (error) {
|
|
32
|
-
console.error('Error in ListWaitlists:', error);
|
|
33
|
-
throw new Error('Failed to fetch ListWaitlists');
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
export const CreateWaitlist = actionClient
|
|
39
|
-
.schema(CreateWaitlistSchema)
|
|
40
|
-
.action(async ({ parsedInput }): Promise<Waitlist> => {
|
|
41
|
-
try {
|
|
42
|
-
|
|
43
|
-
const { waitlist } = await getSDKForCurrentUser();
|
|
44
|
-
return await waitlist.CreateWaitlist(parsedInput);
|
|
45
|
-
|
|
46
|
-
} catch (error) {
|
|
47
|
-
console.error('Error in ListWaitlists:', error);
|
|
48
|
-
throw new Error('Failed to fetch ListWaitlists');
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
export const CreateWaitlistSignup = actionClient
|
|
54
|
-
.schema(CreateWaitlistSignupSchema)
|
|
55
|
-
.action(async ({ parsedInput }): Promise<WaitlistSignup> => {
|
|
56
|
-
try {
|
|
57
|
-
|
|
58
|
-
const { waitlist } = await getSDKForService();
|
|
59
|
-
return await waitlist.CreateWaitlistSignup(parsedInput);
|
|
60
|
-
|
|
61
|
-
} catch (error) {
|
|
62
|
-
console.error('Error in ListWaitlists:', error);
|
|
63
|
-
throw new Error('Failed to fetch ListWaitlists');
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
export const CreateWaitlistOffboardedSignup = actionClient
|
|
68
|
-
.schema(CreateWaitlistOffboardedSignupSchema)
|
|
69
|
-
.action(async ({ parsedInput }): Promise<WaitlistSignup> => {
|
|
70
|
-
try {
|
|
71
|
-
|
|
72
|
-
const { waitlist } = await getSDKForService();
|
|
73
|
-
return await waitlist.CreateWaitlistOffboardedSignup(parsedInput);
|
|
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
|
-
|
|
89
|
-
} catch (error) {
|
|
90
|
-
console.error('Error in ListWaitlists:', error);
|
|
91
|
-
throw new Error('Failed to fetch ListWaitlists');
|
|
92
|
-
}
|
|
93
|
-
});
|