@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.
Files changed (63) hide show
  1. package/dist/client.js +10 -4
  2. package/dist/inputFile.d.ts +0 -1
  3. package/dist/inputFile.js +1 -2
  4. package/dist/modules/agent/index.d.ts +0 -1
  5. package/dist/modules/agent/index.js +1 -2
  6. package/dist/modules/ai/node/index.d.ts +0 -1
  7. package/dist/modules/ai/node/index.js +1 -2
  8. package/dist/modules/builder/index.d.ts +0 -1
  9. package/dist/modules/builder/index.js +1 -2
  10. package/dist/modules/datasource/index.d.ts +0 -1
  11. package/dist/modules/datasource/index.js +1 -2
  12. package/dist/modules/emploid/index.d.ts +0 -1
  13. package/dist/modules/emploid/index.js +1 -2
  14. package/dist/modules/google/index.d.ts +0 -1
  15. package/dist/modules/google/index.js +1 -2
  16. package/dist/modules/hooks/index.d.ts +0 -1
  17. package/dist/modules/hooks/index.js +1 -2
  18. package/dist/modules/mail/index.d.ts +0 -1
  19. package/dist/modules/mail/index.js +1 -2
  20. package/dist/modules/notion/index.d.ts +0 -1
  21. package/dist/modules/notion/index.js +1 -2
  22. package/dist/modules/organization/index.d.ts +0 -1
  23. package/dist/modules/organization/index.js +1 -2
  24. package/dist/modules/scheduled-job/index.d.ts +0 -2
  25. package/dist/modules/scheduled-job/index.js +1 -3
  26. package/dist/modules/task/index.d.ts +0 -1
  27. package/dist/modules/task/index.js +1 -2
  28. package/dist/modules/tenant/index.d.ts +0 -1
  29. package/dist/modules/tenant/index.js +1 -2
  30. package/dist/modules/waitlist/index.d.ts +0 -1
  31. package/dist/modules/waitlist/index.js +1 -2
  32. package/package.json +1 -1
  33. package/src/client.ts +12 -3
  34. package/src/modules/agent/index.ts +1 -1
  35. package/src/modules/ai/node/index.ts +1 -1
  36. package/src/modules/builder/index.ts +1 -1
  37. package/src/modules/datasource/index.ts +1 -1
  38. package/src/modules/emploid/index.ts +1 -1
  39. package/src/modules/google/index.ts +1 -1
  40. package/src/modules/hooks/index.ts +1 -1
  41. package/src/modules/mail/index.ts +1 -1
  42. package/src/modules/notion/index.ts +1 -1
  43. package/src/modules/organization/index.ts +1 -1
  44. package/src/modules/scheduled-job/index.ts +1 -2
  45. package/src/modules/task/index.ts +1 -1
  46. package/src/modules/tenant/index.ts +1 -2
  47. package/src/modules/waitlist/index.ts +1 -1
  48. package/src/inputFile.ts +0 -23
  49. package/src/modules/agent/action.ts +0 -66
  50. package/src/modules/ai/node/actions.ts +0 -14
  51. package/src/modules/builder/action.ts +0 -234
  52. package/src/modules/datasource/action.ts +0 -189
  53. package/src/modules/emploid/action.ts +0 -1063
  54. package/src/modules/google/action.ts +0 -54
  55. package/src/modules/hooks/lib/handler.ts +0 -27
  56. package/src/modules/mail/action.ts +0 -22
  57. package/src/modules/notion/action.ts +0 -53
  58. package/src/modules/organization/action.ts +0 -71
  59. package/src/modules/scheduled-job/action.ts +0 -212
  60. package/src/modules/scheduled-job/lib/handler.ts +0 -27
  61. package/src/modules/task/action.ts +0 -819
  62. package/src/modules/tenant/actions.ts +0 -173
  63. package/src/modules/waitlist/action.ts +0 -93
@@ -1,66 +0,0 @@
1
- 'use server';
2
-
3
-
4
- import { z } from 'zod';
5
- import { getSDKForCurrentUser } from '../../getSDKForCurrentUser';
6
- import { Agent, AIModel } from './types';
7
- import { CreateAgentSchema, GetAgentSchema, ListModelsSchema } from './schema';
8
-
9
-
10
- export const ListAgents = async (): Promise<{data?: Agent[], serverError?: string}> => {
11
- try {
12
- const { agent } = await getSDKForCurrentUser();
13
- return { data: await agent.ListAgents() };
14
- } catch (error) {
15
- console.error('Error in ListAgents:', error);
16
- return { serverError: error.toString() };
17
- }
18
- };
19
-
20
-
21
-
22
- export const CreateAgent = async ({ parsedInput }: { parsedInput: z.infer<typeof CreateAgentSchema> }): Promise<{data?: Agent, serverError?: string}> => {
23
- try {
24
- const { agent } = await getSDKForCurrentUser();
25
- return { data: await agent.CreateAgent(parsedInput) };
26
-
27
- } catch (error) {
28
- console.error('Error in CreateAgent:', error);
29
- return { serverError: error.toString() };
30
- }
31
- };
32
-
33
- export const GetAgent = async ({ parsedInput }: { parsedInput: z.infer<typeof GetAgentSchema> }): Promise<{data?: Agent, serverError?: string}> => {
34
- try {
35
- const { agent } = await getSDKForCurrentUser();
36
- return { data: await agent.GetAgent(parsedInput) };
37
-
38
- } catch (error) {
39
- console.error('Error in GetAgent:', error);
40
- return { serverError: error.toString() };
41
- }
42
- };
43
-
44
- export const ListModelProviders = async (): Promise<{data?: Agent[], serverError?: string}> => {
45
- try {
46
-
47
- const { agent } = await getSDKForCurrentUser();
48
- return { data: await agent.ListModelProviders() };
49
- } catch (error) {
50
- console.error('Error in ListModelProviders:', error);
51
- return { serverError: error.toString() };
52
- }
53
- }
54
-
55
- export const ListModels = async ({ parsedInput }: { parsedInput: z.infer<typeof ListModelsSchema> }): Promise<{data?: AIModel[], serverError?: string}> => {
56
- try {
57
-
58
- const { agent } = await getSDKForCurrentUser();
59
- return { data: await agent.ListModels(parsedInput) };
60
- } catch (error) {
61
- console.error('Error in ListModels:', error);
62
- return { serverError: error.toString() };
63
- }
64
- };
65
-
66
-
@@ -1,14 +0,0 @@
1
- 'use server';
2
-
3
- import { getSDKForCurrentUser } from "../../../getSDKForCurrentUser";
4
-
5
- export const getAllNodesAction = async (): Promise<{data: Node[], serverError?: string}> => {
6
- try {
7
- const { node } = await getSDKForCurrentUser();
8
- return { data: await node.GetAllNodes() };
9
- } catch (error) {
10
- console.error('Error in getAllNodesAction:', error);
11
- //@ts-ignore
12
- return { serverError: error.toString() };
13
- }
14
- }
@@ -1,234 +0,0 @@
1
- 'use server';
2
-
3
- import { z } from 'zod';
4
- import { AppcondaException } from '../../client';
5
- import { getSDKForCurrentUser } from '../../getSDKForCurrentUser';
6
- import { CreateAppSchema, CreateModuleSchema, CreatePageSchema, CreatePageSchemaSchema, GetAppSchema, GetPageBySlugSchema, GetPageSchemaSchema, ListAppsSchema, ListModulesSchema, ListPagesSchema, UpdateAppSchema, UpdateEditorConfigSchema, UpdatePageSchemaSchema } from './schema';
7
- import { Config } from './types';
8
- import { getSDKForService } from '../../getSDKForService';
9
-
10
- export const CreateApp = async (parsedInput: z.infer<typeof CreateAppSchema>) => {
11
- try {
12
- const { builder } = await getSDKForService();
13
- //@ts-ignore
14
- const app = await builder.CreateApp(parsedInput);
15
- return app;
16
- } catch (error) {
17
- if (error instanceof AppcondaException) {
18
- throw new Error(error.message);
19
- }
20
-
21
- throw error;
22
- }
23
- };
24
-
25
- export const UpdateApp = async (parsedInput: z.infer<typeof UpdateAppSchema>) => {
26
- try {
27
- const { builder } = await getSDKForService();
28
- //@ts-ignore
29
- const app = await builder.UpdateApp(parsedInput);
30
- return app;
31
- } catch (error) {
32
- if (error instanceof AppcondaException) {
33
- throw new Error(error.message);
34
- }
35
-
36
- throw error;
37
- }
38
- };
39
-
40
- export const UpdateEditorConfig = async (parsedInput: z.infer<typeof UpdateEditorConfigSchema>) => {
41
- try {
42
- const { builder } = await getSDKForService();
43
- //@ts-ignore
44
- const app = await builder.UpdateEditorConfig(parsedInput);
45
- return app;
46
- } catch (error) {
47
- if (error instanceof AppcondaException) {
48
- throw new Error(error.message);
49
- }
50
-
51
- throw error;
52
- }
53
- };
54
-
55
- export const GetEditorConfig = async () => {
56
- try {
57
- const { builder } = await getSDKForService();
58
- //@ts-ignore
59
- const config = await builder.GetEditorConfig();
60
- return config;
61
- } catch (error) {
62
- if (error instanceof AppcondaException) {
63
- throw new Error(error.message);
64
- }
65
-
66
- throw error;
67
- }
68
- };
69
-
70
- export const GetApp = async (parsedInput: z.infer<typeof GetAppSchema>) => {
71
- try {
72
- const { builder } = await getSDKForService();
73
- //@ts-ignore
74
- const app = await builder.GetApp(parsedInput);
75
- return app;
76
- } catch (error) {
77
- if (error instanceof AppcondaException) {
78
- throw new Error(error.message);
79
- }
80
-
81
- throw error;
82
- }
83
- };
84
-
85
- export const ListApps = async (parsedInput: z.infer<typeof ListAppsSchema>) => {
86
- try {
87
-
88
- const { builder } = await getSDKForService();
89
- //@ts-ignore
90
- const apps = await builder.ListApps(parsedInput);
91
- return apps;
92
- } catch (error) {
93
- if (error instanceof AppcondaException) {
94
- throw new Error(error.message);
95
- }
96
-
97
- throw error;
98
- }
99
- };
100
-
101
- export const ListBuilderProjects = async (parsedInput: z.infer<typeof ListAppsSchema>) => {
102
- try {
103
- const { builder } = await getSDKForService();
104
- //@ts-ignore
105
- const apps = await builder.ListProjects(parsedInput);
106
- return apps;
107
- } catch (error) {
108
- if (error instanceof AppcondaException) {
109
- throw new Error(error.message);
110
- }
111
-
112
- throw error;
113
- }
114
- };
115
-
116
- export const CreatePage = async (parsedInput: z.infer<typeof CreatePageSchema>) => {
117
- try {
118
- const { builder } = await getSDKForService();
119
- //@ts-ignore
120
- const page = await builder.CreatePage(parsedInput);
121
- return page;
122
- } catch (error) {
123
- if (error instanceof AppcondaException) {
124
- throw new Error(error.message);
125
- }
126
-
127
- throw error;
128
- }
129
- };
130
-
131
- export const ListPages = async (parsedInput: z.infer<typeof ListPagesSchema>) => {
132
- try {
133
- const { builder } = await getSDKForService();
134
- //@ts-ignore
135
- const pages = await builder.ListPages(parsedInput);
136
- return pages;
137
- } catch (error) {
138
- if (error instanceof AppcondaException) {
139
- throw new Error(error.message);
140
- }
141
-
142
- throw error;
143
- }
144
- };
145
-
146
- export const CreatePageSchemaAction = async (parsedInput: z.infer<typeof CreatePageSchemaSchema>) => {
147
- try {
148
- const { builder } = await getSDKForService();
149
- //@ts-ignore
150
- const pageSchema = await builder.CreatePageSchema(parsedInput);
151
- return pageSchema;
152
- } catch (error) {
153
- if (error instanceof AppcondaException) {
154
- throw new Error(error.message);
155
- }
156
-
157
- throw error;
158
- }
159
- };
160
-
161
- export const UpdatePageSchema = async (parsedInput: z.infer<typeof UpdatePageSchemaSchema>) => {
162
- try {
163
- const { builder } = await getSDKForService();
164
- //@ts-ignore
165
- const pageSchema = await builder.UpdatePageSchema(parsedInput);
166
- return pageSchema;
167
- } catch (error) {
168
- if (error instanceof AppcondaException) {
169
- throw new Error(error.message);
170
- }
171
-
172
- throw error;
173
- }
174
- };
175
-
176
- export const GetPageSchema = async (parsedInput: z.infer<typeof GetPageSchemaSchema>) => {
177
- try {
178
- const { builder } = await getSDKForService();
179
- //@ts-ignore
180
- const pageSchema = await builder.GetPageSchema(parsedInput);
181
- return pageSchema;
182
- } catch (error) {
183
- if (error instanceof AppcondaException) {
184
- throw new Error(error.message);
185
- }
186
-
187
- throw error;
188
- }
189
- };
190
-
191
- export const ListModules = async (parsedInput: z.infer<typeof ListModulesSchema>) => {
192
- try {
193
- const { builder } = await getSDKForService();
194
- //@ts-ignore
195
- const modules = await builder.ListModules(parsedInput);
196
- return modules;
197
- } catch (error) {
198
- if (error instanceof AppcondaException) {
199
- throw new Error(error.message);
200
- }
201
-
202
- throw error;
203
- }
204
- };
205
-
206
- export const CreateModule = async (parsedInput: z.infer<typeof CreateModuleSchema>) => {
207
- try {
208
- const { builder } = await getSDKForService();
209
- //@ts-ignore
210
- const module = await builder.CreateModule(parsedInput);
211
- return module;
212
- } catch (error) {
213
- if (error instanceof AppcondaException) {
214
- throw new Error(error.message);
215
- }
216
-
217
- throw error;
218
- }
219
- };
220
-
221
- export const GetPageBySlug = async (parsedInput: z.infer<typeof GetPageBySlugSchema>) => {
222
- try {
223
- const { builder } = await getSDKForService();
224
- //@ts-ignore
225
- const page = await builder.GetPageBySlug(parsedInput);
226
- return page;
227
- } catch (error) {
228
- if (error instanceof AppcondaException) {
229
- throw new Error(error.message);
230
- }
231
-
232
- throw error;
233
- }
234
- };
@@ -1,189 +0,0 @@
1
- 'use server';
2
-
3
- import { z } from 'zod';
4
- import { AppcondaException } from '../../client';
5
- import { getSDKForCurrentUser } from '../../getSDKForCurrentUser';
6
- import { CreateColumnSchema, CreateDatabaseSchema, CreateDataSourceSchema, CreateTableSchema, GetColumnSchema, GetDatabaseSchema, GetDataSourceSchema, GetTableSchema, ListColumnsSchema, ListDatabasesSchema, ListDataSourcesSchema, ListTablesSchema } from './schema';
7
- import { getSDKForService } from '../../getSDKForService';
8
-
9
- export const CreateDataSource = async (parsedInput: z.infer<typeof CreateDataSourceSchema>) => {
10
- try {
11
- const { datasource } = await getSDKForService();
12
- //@ts-ignore
13
- const app = await datasource.CreateDataSource(parsedInput);
14
- return app;
15
- } catch (error) {
16
- if (error instanceof AppcondaException) {
17
- throw new Error(error.message);
18
- }
19
-
20
- throw error;
21
- }
22
- };
23
-
24
- export const GetDataSource = async (parsedInput: z.infer<typeof GetDataSourceSchema>) => {
25
- try {
26
- const { datasource } = await getSDKForService();
27
- //@ts-ignore
28
- const app = await datasource.GetDataSource(parsedInput);
29
- return app;
30
- } catch (error) {
31
- if (error instanceof AppcondaException) {
32
- throw new Error(error.message);
33
- }
34
-
35
- throw error;
36
- }
37
- };
38
-
39
-
40
- export const ListDataSources = async (parsedInput: z.infer<typeof ListDataSourcesSchema>) => {
41
- try {
42
- const { datasource } = await getSDKForService();
43
- //@ts-ignore
44
- const app = await datasource.ListDataSources(parsedInput);
45
- return app;
46
- } catch (error) {
47
- if (error instanceof AppcondaException) {
48
- throw new Error(error.message);
49
- }
50
-
51
- throw error;
52
- }
53
- };
54
-
55
- export const CreateDatabase = async (parsedInput: z.infer<typeof CreateDatabaseSchema>) => {
56
- try {
57
- const { datasource } = await getSDKForService();
58
- //@ts-ignore
59
- const app = await datasource.CreateDatabase(parsedInput);
60
- return app;
61
- } catch (error) {
62
- if (error instanceof AppcondaException) {
63
- throw new Error(error.message);
64
- }
65
-
66
- throw error;
67
- }
68
- };
69
-
70
- export const GetDatabase = async (parsedInput: z.infer<typeof GetDatabaseSchema>) => {
71
- try {
72
- const { datasource } = await getSDKForService();
73
- //@ts-ignore
74
- const app = await datasource.GetDatabase(parsedInput);
75
- return app;
76
- } catch (error) {
77
- if (error instanceof AppcondaException) {
78
- throw new Error(error.message);
79
- }
80
-
81
- throw error;
82
- }
83
- };
84
-
85
- export const ListDatabases = async (parsedInput: z.infer<typeof ListDatabasesSchema>) => {
86
- try {
87
- const { datasource } = await getSDKForService();
88
- //@ts-ignore
89
- const app = await datasource.ListDatabases(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 const CreateTable = async (parsedInput: z.infer<typeof CreateTableSchema>) => {
101
- try {
102
- const { datasource } = await getSDKForService();
103
- //@ts-ignore
104
- const app = await datasource.CreateTable(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 const GetTable = async (parsedInput: z.infer<typeof GetTableSchema>) => {
116
- try {
117
- const { datasource } = await getSDKForService();
118
- //@ts-ignore
119
- const app = await datasource.GetTable(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 const ListTables = async (parsedInput: z.infer<typeof ListTablesSchema>) => {
131
- try {
132
- const { datasource } = await getSDKForService();
133
- //@ts-ignore
134
- const app = await datasource.ListTables(parsedInput);
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 const CreateColumn = async (parsedInput: z.infer<typeof CreateColumnSchema>) => {
146
- try {
147
- const { datasource } = await getSDKForService();
148
- //@ts-ignore
149
- const app = await datasource.CreateColumn(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 const GetColumn = async (parsedInput: z.infer<typeof GetColumnSchema>) => {
161
- try {
162
- const { datasource } = await getSDKForService();
163
- //@ts-ignore
164
- const app = await datasource.GetColumn(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
- };
174
-
175
- export const ListColumns = async (parsedInput: z.infer<typeof ListColumnsSchema>) => {
176
- try {
177
- const { datasource } = await getSDKForService();
178
- //@ts-ignore
179
- const app = await datasource.ListColumns(parsedInput);
180
- return app;
181
- } catch (error) {
182
- if (error instanceof AppcondaException) {
183
- throw new Error(error.message);
184
- }
185
-
186
- throw error;
187
- }
188
- };
189
-