@appconda/nextjs 1.0.72 → 1.0.158
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/actions/index.d.ts +1 -0
- package/dist/actions/index.js +1 -0
- package/dist/{modules/ai/node/actions.js → actions/nodes.js} +2 -2
- package/dist/getSDKForCurrentUser.d.ts +3 -5
- package/dist/getSDKForCurrentUser.js +3 -6
- package/dist/index.d.ts +6 -5
- package/dist/index.js +5 -5
- package/dist/modules/index.d.ts +0 -3
- package/dist/modules/index.js +0 -3
- package/dist/modules/waitlist/action.d.ts +0 -24
- package/dist/modules/waitlist/action.js +4 -29
- package/dist/modules/waitlist/index.d.ts +0 -1
- package/dist/modules/waitlist/index.js +0 -1
- package/dist/modules/waitlist/schema.d.ts +0 -14
- package/dist/modules/waitlist/schema.js +0 -6
- package/dist/modules/waitlist/service.d.ts +2 -4
- package/dist/modules/waitlist/service.js +0 -6
- package/dist/modules/waitlist/types.d.ts +0 -4
- package/dist/{modules/account/service.d.ts → services/account.d.ts} +56 -56
- package/dist/{modules/account/service.js → services/account.js} +14 -14
- package/dist/{modules/ai/node/service.d.ts → services/node.d.ts} +1 -1
- package/dist/{modules/ai/node/service.js → services/node.js} +1 -1
- package/dist/services/projects.d.ts +1 -1
- package/dist/services/users.d.ts +1 -1
- package/package.json +1 -1
- package/src/actions/index.ts +1 -0
- package/src/{modules/ai/node/actions.ts → actions/nodes.ts} +2 -2
- package/src/getSDKForCurrentUser.ts +3 -6
- package/src/index.ts +8 -6
- package/src/modules/index.ts +1 -4
- package/src/modules/waitlist/action.ts +4 -33
- package/src/modules/waitlist/index.ts +1 -2
- package/src/modules/waitlist/schema.ts +0 -9
- package/src/modules/waitlist/service.ts +2 -11
- package/src/modules/waitlist/types.ts +0 -5
- package/src/{modules/account/service.ts → services/account.ts} +59 -61
- package/src/{modules/ai/node/service.ts → services/node.ts} +4 -4
- package/src/services/projects.ts +1 -1
- package/src/services/users.ts +1 -1
- package/dist/getSDKForService.d.ts +0 -6
- package/dist/getSDKForService.js +0 -49
- package/dist/modules/account/actions.d.ts +0 -25
- package/dist/modules/account/actions.js +0 -17
- package/dist/modules/account/index.d.ts +0 -3
- package/dist/modules/account/index.js +0 -3
- package/dist/modules/account/schema.d.ts +0 -17
- package/dist/modules/account/schema.js +0 -7
- package/dist/modules/account/types.d.ts +0 -411
- package/dist/modules/account/types.js +0 -1
- package/dist/modules/agent/action.d.ts +0 -53
- package/dist/modules/agent/action.js +0 -63
- package/dist/modules/agent/index.d.ts +0 -4
- package/dist/modules/agent/index.js +0 -4
- package/dist/modules/agent/schema.d.ts +0 -48
- package/dist/modules/agent/schema.js +0 -20
- package/dist/modules/agent/service.d.ts +0 -12
- package/dist/modules/agent/service.js +0 -21
- package/dist/modules/agent/types.d.ts +0 -11
- package/dist/modules/agent/types.js +0 -1
- package/dist/modules/ai/index.d.ts +0 -1
- package/dist/modules/ai/index.js +0 -1
- package/dist/modules/ai/node/index.d.ts +0 -2
- package/dist/modules/ai/node/index.js +0 -2
- package/src/getSDKForService.ts +0 -52
- package/src/modules/account/actions.ts +0 -21
- package/src/modules/account/index.ts +0 -3
- package/src/modules/account/schema.ts +0 -8
- package/src/modules/account/types.ts +0 -426
- package/src/modules/agent/action.ts +0 -77
- package/src/modules/agent/index.ts +0 -4
- package/src/modules/agent/schema.ts +0 -25
- package/src/modules/agent/service.ts +0 -34
- package/src/modules/agent/types.ts +0 -15
- package/src/modules/ai/index.ts +0 -1
- package/src/modules/ai/node/index.ts +0 -2
- /package/dist/{modules/ai/node/actions.d.ts → actions/nodes.d.ts} +0 -0
- /package/dist/{modules/account/enums → enums}/authentication-factor.d.ts +0 -0
- /package/dist/{modules/account/enums → enums}/authentication-factor.js +0 -0
- /package/dist/{modules/account/enums → enums}/authenticator-type.d.ts +0 -0
- /package/dist/{modules/account/enums → enums}/authenticator-type.js +0 -0
- /package/dist/{modules/account/enums → enums}/o-auth-provider.d.ts +0 -0
- /package/dist/{modules/account/enums → enums}/o-auth-provider.js +0 -0
- /package/src/{modules/account/enums → enums}/authentication-factor.ts +0 -0
- /package/src/{modules/account/enums → enums}/authenticator-type.ts +0 -0
- /package/src/{modules/account/enums → enums}/o-auth-provider.ts +0 -0
@@ -1,21 +0,0 @@
|
|
1
|
-
import { ServiceClient } from "../../service-client";
|
2
|
-
export class AgentService extends ServiceClient {
|
3
|
-
getServiceName() {
|
4
|
-
return 'com.appconda.service.agent';
|
5
|
-
}
|
6
|
-
async CreateAgent(payload) {
|
7
|
-
return await this.actionCall('CreateAgent', payload);
|
8
|
-
}
|
9
|
-
async GetAgent(payload) {
|
10
|
-
return await this.actionCall('GetAgent', payload);
|
11
|
-
}
|
12
|
-
async ListAgents() {
|
13
|
-
return await this.actionCall('ListAgents', {});
|
14
|
-
}
|
15
|
-
async ListModelProviders() {
|
16
|
-
return await this.actionCall('ListModelProviders', {});
|
17
|
-
}
|
18
|
-
async ListModels(payload) {
|
19
|
-
return await this.actionCall('ListModels', payload);
|
20
|
-
}
|
21
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './node';
|
package/dist/modules/ai/index.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export * from './node';
|
package/src/getSDKForService.ts
DELETED
@@ -1,52 +0,0 @@
|
|
1
|
-
import { getAppcondaClient } from "./getAppcondaClient";
|
2
|
-
import { WaitlistService } from "./modules";
|
3
|
-
import { Configuration } from "./services/configuration";
|
4
|
-
|
5
|
-
export async function getSDKForService() {
|
6
|
-
const adminClient = await getAppcondaClient();
|
7
|
-
|
8
|
-
adminClient.addHeader('x-service-token', process.env._SERVICE_TOKEN ?? '');
|
9
|
-
/*
|
10
|
-
const accounts = new Account(adminClient);
|
11
|
-
const databases = new Databases(adminClient);
|
12
|
-
|
13
|
-
const projects = new Projects(adminClient);
|
14
|
-
|
15
|
-
const currentUser = await accounts.get();
|
16
|
-
|
17
|
-
const users = new Users(adminClient);
|
18
|
-
const teams = new Teams(adminClient);
|
19
|
-
|
20
|
-
const tenants = new Tenant(adminClient);
|
21
|
-
const roles = new Roles(adminClient);
|
22
|
-
const permissions = new Permissions(adminClient);
|
23
|
-
const schemas = new Schemas(adminClient);
|
24
|
-
|
25
|
-
const community = new Community(adminClient);
|
26
|
-
|
27
|
-
const tenantSubscriptions = new TenantSubscription(adminClient);
|
28
|
-
|
29
|
-
const subscription = new Subscription(adminClient);
|
30
|
-
const pricing = new Pricing(adminClient); */
|
31
|
-
const waitlist = new WaitlistService(adminClient);
|
32
|
-
const configuration = new Configuration(adminClient);
|
33
|
-
|
34
|
-
return {
|
35
|
-
/* currentUser,
|
36
|
-
accounts,
|
37
|
-
databases,
|
38
|
-
projects,
|
39
|
-
users,
|
40
|
-
teams,
|
41
|
-
tenants,
|
42
|
-
roles,
|
43
|
-
permissions,
|
44
|
-
schemas,
|
45
|
-
community,
|
46
|
-
tenantSubscriptions,
|
47
|
-
subscription,
|
48
|
-
pricing, */
|
49
|
-
waitlist,
|
50
|
-
configuration
|
51
|
-
}
|
52
|
-
}
|
@@ -1,21 +0,0 @@
|
|
1
|
-
'use server';
|
2
|
-
|
3
|
-
import { actionClient } from "../../actions/actionClient";
|
4
|
-
import { getSDKForCurrentUser } from "../../getSDKForCurrentUser";
|
5
|
-
import { CreateUserSchema } from "./schema";
|
6
|
-
import { User } from "./types";
|
7
|
-
|
8
|
-
|
9
|
-
export const CreateUser = actionClient
|
10
|
-
.schema(CreateUserSchema)
|
11
|
-
.action(async ({ parsedInput }): Promise<User> => {
|
12
|
-
try {
|
13
|
-
const { userId, email, password, name } = parsedInput;
|
14
|
-
const { accounts } = await getSDKForCurrentUser();
|
15
|
-
return await accounts.create(userId, email, password, name);
|
16
|
-
|
17
|
-
} catch (error) {
|
18
|
-
console.error('Error in ListWaitlists:', error);
|
19
|
-
throw new Error('Failed to fetch ListWaitlists');
|
20
|
-
}
|
21
|
-
});
|
@@ -1,426 +0,0 @@
|
|
1
|
-
export type Jwt = {
|
2
|
-
/**
|
3
|
-
* JWT encoded string.
|
4
|
-
*/
|
5
|
-
jwt: string;
|
6
|
-
}
|
7
|
-
|
8
|
-
export type IdentityList = {
|
9
|
-
/**
|
10
|
-
* Total number of identities documents that matched your query.
|
11
|
-
*/
|
12
|
-
total: number;
|
13
|
-
/**
|
14
|
-
* List of identities.
|
15
|
-
*/
|
16
|
-
identities: Identity[];
|
17
|
-
}
|
18
|
-
|
19
|
-
/**
|
20
|
-
* Identity
|
21
|
-
*/
|
22
|
-
export type Identity = {
|
23
|
-
/**
|
24
|
-
* Identity ID.
|
25
|
-
*/
|
26
|
-
$id: string;
|
27
|
-
/**
|
28
|
-
* Identity creation date in ISO 8601 format.
|
29
|
-
*/
|
30
|
-
$createdAt: string;
|
31
|
-
/**
|
32
|
-
* Identity update date in ISO 8601 format.
|
33
|
-
*/
|
34
|
-
$updatedAt: string;
|
35
|
-
/**
|
36
|
-
* User ID.
|
37
|
-
*/
|
38
|
-
userId: string;
|
39
|
-
/**
|
40
|
-
* Identity Provider.
|
41
|
-
*/
|
42
|
-
provider: string;
|
43
|
-
/**
|
44
|
-
* ID of the User in the Identity Provider.
|
45
|
-
*/
|
46
|
-
providerUid: string;
|
47
|
-
/**
|
48
|
-
* Email of the User in the Identity Provider.
|
49
|
-
*/
|
50
|
-
providerEmail: string;
|
51
|
-
/**
|
52
|
-
* Identity Provider Access Token.
|
53
|
-
*/
|
54
|
-
providerAccessToken: string;
|
55
|
-
/**
|
56
|
-
* The date of when the access token expires in ISO 8601 format.
|
57
|
-
*/
|
58
|
-
providerAccessTokenExpiry: string;
|
59
|
-
/**
|
60
|
-
* Identity Provider Refresh Token.
|
61
|
-
*/
|
62
|
-
providerRefreshToken: string;
|
63
|
-
}
|
64
|
-
|
65
|
-
export type Preferences = {
|
66
|
-
[key: string]: any;
|
67
|
-
}
|
68
|
-
|
69
|
-
export type User<T extends Preferences = any> = {
|
70
|
-
/**
|
71
|
-
* User ID.
|
72
|
-
*/
|
73
|
-
$id: string;
|
74
|
-
/**
|
75
|
-
* User creation date in ISO 8601 format.
|
76
|
-
*/
|
77
|
-
$createdAt: string;
|
78
|
-
/**
|
79
|
-
* User update date in ISO 8601 format.
|
80
|
-
*/
|
81
|
-
$updatedAt: string;
|
82
|
-
/**
|
83
|
-
* User name.
|
84
|
-
*/
|
85
|
-
name: string;
|
86
|
-
/**
|
87
|
-
* Hashed user password.
|
88
|
-
*/
|
89
|
-
password?: string;
|
90
|
-
/**
|
91
|
-
* Password hashing algorithm.
|
92
|
-
*/
|
93
|
-
hash?: string;
|
94
|
-
/**
|
95
|
-
* Password hashing algorithm configuration.
|
96
|
-
*/
|
97
|
-
hashOptions?: object;
|
98
|
-
/**
|
99
|
-
* User registration date in ISO 8601 format.
|
100
|
-
*/
|
101
|
-
registration: string;
|
102
|
-
/**
|
103
|
-
* User status. Pass `true` for enabled and `false` for disabled.
|
104
|
-
*/
|
105
|
-
status: boolean;
|
106
|
-
/**
|
107
|
-
* Labels for the user.
|
108
|
-
*/
|
109
|
-
labels: string[];
|
110
|
-
/**
|
111
|
-
* Password update time in ISO 8601 format.
|
112
|
-
*/
|
113
|
-
passwordUpdate: string;
|
114
|
-
/**
|
115
|
-
* User email address.
|
116
|
-
*/
|
117
|
-
email: string;
|
118
|
-
/**
|
119
|
-
* User phone number in E.164 format.
|
120
|
-
*/
|
121
|
-
phone: string;
|
122
|
-
/**
|
123
|
-
* Email verification status.
|
124
|
-
*/
|
125
|
-
emailVerification: boolean;
|
126
|
-
/**
|
127
|
-
* Phone verification status.
|
128
|
-
*/
|
129
|
-
phoneVerification: boolean;
|
130
|
-
/**
|
131
|
-
* Multi factor authentication status.
|
132
|
-
*/
|
133
|
-
mfa: boolean;
|
134
|
-
/**
|
135
|
-
* User preferences as a key-value object
|
136
|
-
*/
|
137
|
-
prefs: Preferences;
|
138
|
-
/**
|
139
|
-
* A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider.
|
140
|
-
*/
|
141
|
-
targets: Target[];
|
142
|
-
/**
|
143
|
-
* Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.
|
144
|
-
*/
|
145
|
-
accessedAt: string;
|
146
|
-
}
|
147
|
-
|
148
|
-
export type LogList = {
|
149
|
-
/**
|
150
|
-
* Total number of logs documents that matched your query.
|
151
|
-
*/
|
152
|
-
total: number;
|
153
|
-
/**
|
154
|
-
* List of logs.
|
155
|
-
*/
|
156
|
-
logs: Log[];
|
157
|
-
}
|
158
|
-
|
159
|
-
export type Log = {
|
160
|
-
$id: string;
|
161
|
-
/**
|
162
|
-
* Target creation time in ISO 8601 format.
|
163
|
-
*/
|
164
|
-
$createdAt?: string;
|
165
|
-
/**
|
166
|
-
* Target update date in ISO 8601 format.
|
167
|
-
*/
|
168
|
-
$updatedAt?: string;
|
169
|
-
|
170
|
-
tenantId: string;
|
171
|
-
userId: string;
|
172
|
-
apiKeyId: string;
|
173
|
-
rowId: string;
|
174
|
-
url: string;
|
175
|
-
action: string;
|
176
|
-
details: string | null;
|
177
|
-
commentId: string | null;
|
178
|
-
}
|
179
|
-
|
180
|
-
export type MfaType = {
|
181
|
-
/**
|
182
|
-
* Secret token used for TOTP factor.
|
183
|
-
*/
|
184
|
-
secret: string;
|
185
|
-
/**
|
186
|
-
* URI for authenticator apps.
|
187
|
-
*/
|
188
|
-
uri: string;
|
189
|
-
}
|
190
|
-
|
191
|
-
export type MfaChallenge = {
|
192
|
-
/**
|
193
|
-
* Token ID.
|
194
|
-
*/
|
195
|
-
$id: string;
|
196
|
-
/**
|
197
|
-
* Token creation date in ISO 8601 format.
|
198
|
-
*/
|
199
|
-
$createdAt: string;
|
200
|
-
/**
|
201
|
-
* User ID.
|
202
|
-
*/
|
203
|
-
userId: string;
|
204
|
-
/**
|
205
|
-
* Token expiration date in ISO 8601 format.
|
206
|
-
*/
|
207
|
-
expire: string;
|
208
|
-
}
|
209
|
-
|
210
|
-
export type MfaFactors = {
|
211
|
-
/**
|
212
|
-
* Can TOTP be used for MFA challenge for this account.
|
213
|
-
*/
|
214
|
-
totp: boolean;
|
215
|
-
/**
|
216
|
-
* Can phone (SMS) be used for MFA challenge for this account.
|
217
|
-
*/
|
218
|
-
phone: boolean;
|
219
|
-
/**
|
220
|
-
* Can email be used for MFA challenge for this account.
|
221
|
-
*/
|
222
|
-
email: boolean;
|
223
|
-
/**
|
224
|
-
* Can recovery code be used for MFA challenge for this account.
|
225
|
-
*/
|
226
|
-
recoveryCode: boolean;
|
227
|
-
}
|
228
|
-
|
229
|
-
export type MfaRecoveryCodes = {
|
230
|
-
/**
|
231
|
-
* Recovery codes.
|
232
|
-
*/
|
233
|
-
recoveryCodes: string[];
|
234
|
-
}
|
235
|
-
|
236
|
-
export type Token = {
|
237
|
-
/**
|
238
|
-
* Token ID.
|
239
|
-
*/
|
240
|
-
$id: string;
|
241
|
-
/**
|
242
|
-
* Token creation date in ISO 8601 format.
|
243
|
-
*/
|
244
|
-
$createdAt: string;
|
245
|
-
/**
|
246
|
-
* User ID.
|
247
|
-
*/
|
248
|
-
userId: string;
|
249
|
-
/**
|
250
|
-
* Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.
|
251
|
-
*/
|
252
|
-
secret: string;
|
253
|
-
/**
|
254
|
-
* Token expiration date in ISO 8601 format.
|
255
|
-
*/
|
256
|
-
expire: string;
|
257
|
-
/**
|
258
|
-
* Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email.
|
259
|
-
*/
|
260
|
-
phrase: string;
|
261
|
-
}
|
262
|
-
|
263
|
-
export type SessionList = {
|
264
|
-
/**
|
265
|
-
* Total number of sessions documents that matched your query.
|
266
|
-
*/
|
267
|
-
total: number;
|
268
|
-
/**
|
269
|
-
* List of sessions.
|
270
|
-
*/
|
271
|
-
sessions: Session[];
|
272
|
-
}
|
273
|
-
|
274
|
-
export type Session = {
|
275
|
-
/**
|
276
|
-
* Session ID.
|
277
|
-
*/
|
278
|
-
$id: string;
|
279
|
-
/**
|
280
|
-
* Session creation date in ISO 8601 format.
|
281
|
-
*/
|
282
|
-
$createdAt: string;
|
283
|
-
/**
|
284
|
-
* Session update date in ISO 8601 format.
|
285
|
-
*/
|
286
|
-
$updatedAt: string;
|
287
|
-
/**
|
288
|
-
* User ID.
|
289
|
-
*/
|
290
|
-
userId: string;
|
291
|
-
/**
|
292
|
-
* Session expiration date in ISO 8601 format.
|
293
|
-
*/
|
294
|
-
expire: string;
|
295
|
-
/**
|
296
|
-
* Session Provider.
|
297
|
-
*/
|
298
|
-
provider: string;
|
299
|
-
/**
|
300
|
-
* Session Provider User ID.
|
301
|
-
*/
|
302
|
-
providerUid: string;
|
303
|
-
/**
|
304
|
-
* Session Provider Access Token.
|
305
|
-
*/
|
306
|
-
providerAccessToken: string;
|
307
|
-
/**
|
308
|
-
* The date of when the access token expires in ISO 8601 format.
|
309
|
-
*/
|
310
|
-
providerAccessTokenExpiry: string;
|
311
|
-
/**
|
312
|
-
* Session Provider Refresh Token.
|
313
|
-
*/
|
314
|
-
providerRefreshToken: string;
|
315
|
-
/**
|
316
|
-
* IP in use when the session was created.
|
317
|
-
*/
|
318
|
-
ip: string;
|
319
|
-
/**
|
320
|
-
* Operating system code name. View list of [available options](https://github.com/appconda/appconda/blob/master/docs/lists/os.json).
|
321
|
-
*/
|
322
|
-
osCode: string;
|
323
|
-
/**
|
324
|
-
* Operating system name.
|
325
|
-
*/
|
326
|
-
osName: string;
|
327
|
-
/**
|
328
|
-
* Operating system version.
|
329
|
-
*/
|
330
|
-
osVersion: string;
|
331
|
-
/**
|
332
|
-
* Client type.
|
333
|
-
*/
|
334
|
-
clientType: string;
|
335
|
-
/**
|
336
|
-
* Client code name. View list of [available options](https://github.com/appconda/appconda/blob/master/docs/lists/clients.json).
|
337
|
-
*/
|
338
|
-
clientCode: string;
|
339
|
-
/**
|
340
|
-
* Client name.
|
341
|
-
*/
|
342
|
-
clientName: string;
|
343
|
-
/**
|
344
|
-
* Client version.
|
345
|
-
*/
|
346
|
-
clientVersion: string;
|
347
|
-
/**
|
348
|
-
* Client engine name.
|
349
|
-
*/
|
350
|
-
clientEngine: string;
|
351
|
-
/**
|
352
|
-
* Client engine name.
|
353
|
-
*/
|
354
|
-
clientEngineVersion: string;
|
355
|
-
/**
|
356
|
-
* Device name.
|
357
|
-
*/
|
358
|
-
deviceName: string;
|
359
|
-
/**
|
360
|
-
* Device brand name.
|
361
|
-
*/
|
362
|
-
deviceBrand: string;
|
363
|
-
/**
|
364
|
-
* Device model name.
|
365
|
-
*/
|
366
|
-
deviceModel: string;
|
367
|
-
/**
|
368
|
-
* Country two-character ISO 3166-1 alpha code.
|
369
|
-
*/
|
370
|
-
countryCode: string;
|
371
|
-
/**
|
372
|
-
* Country name.
|
373
|
-
*/
|
374
|
-
countryName: string;
|
375
|
-
/**
|
376
|
-
* Returns true if this the current user session.
|
377
|
-
*/
|
378
|
-
current: boolean;
|
379
|
-
/**
|
380
|
-
* Returns a list of active session factors.
|
381
|
-
*/
|
382
|
-
factors: string[];
|
383
|
-
/**
|
384
|
-
* Secret used to authenticate the user. Only included if the request was made with an API key
|
385
|
-
*/
|
386
|
-
secret: string;
|
387
|
-
/**
|
388
|
-
* Most recent date in ISO 8601 format when the session successfully passed MFA challenge.
|
389
|
-
*/
|
390
|
-
mfaUpdatedAt: string;
|
391
|
-
}
|
392
|
-
|
393
|
-
export type Target = {
|
394
|
-
/**
|
395
|
-
* Target ID.
|
396
|
-
*/
|
397
|
-
$id: string;
|
398
|
-
/**
|
399
|
-
* Target creation time in ISO 8601 format.
|
400
|
-
*/
|
401
|
-
$createdAt: string;
|
402
|
-
/**
|
403
|
-
* Target update date in ISO 8601 format.
|
404
|
-
*/
|
405
|
-
$updatedAt: string;
|
406
|
-
/**
|
407
|
-
* Target Name.
|
408
|
-
*/
|
409
|
-
name: string;
|
410
|
-
/**
|
411
|
-
* User ID.
|
412
|
-
*/
|
413
|
-
userId: string;
|
414
|
-
/**
|
415
|
-
* Provider ID.
|
416
|
-
*/
|
417
|
-
providerId?: string;
|
418
|
-
/**
|
419
|
-
* The target provider type. Can be one of the following: `email`, `sms` or `push`.
|
420
|
-
*/
|
421
|
-
providerType: string;
|
422
|
-
/**
|
423
|
-
* The target identifier.
|
424
|
-
*/
|
425
|
-
identifier: string;
|
426
|
-
}
|
@@ -1,77 +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 { CreateAgentSchema, GetAgentSchema, ListModelsSchema } from './schema';
|
8
|
-
import { Agent, AIModel } from './types';
|
9
|
-
|
10
|
-
|
11
|
-
export const ListAgents = actionClient
|
12
|
-
//.schema(ListWaitlistSignupsSchema)
|
13
|
-
.action(async ({ parsedInput }): Promise<Agent[]> => {
|
14
|
-
try {
|
15
|
-
|
16
|
-
const { agent } = await getSDKForCurrentUser();
|
17
|
-
return await agent.ListAgents(); // typo: Wiatlist mi?
|
18
|
-
} catch (error) {
|
19
|
-
console.error('Error in ListWaitlistSignups:', error);
|
20
|
-
throw new Error('Failed to fetch ListWaitlistSignups');
|
21
|
-
}
|
22
|
-
});
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
export const CreateAgent = actionClient
|
27
|
-
.schema(CreateAgentSchema)
|
28
|
-
.action(async ({ parsedInput }): Promise<Agent> => {
|
29
|
-
try {
|
30
|
-
|
31
|
-
const { agent } = await getSDKForCurrentUser();
|
32
|
-
return await agent.CreateAgent(parsedInput);
|
33
|
-
|
34
|
-
} catch (error) {
|
35
|
-
console.error('Error in ListWaitlists:', error);
|
36
|
-
throw new Error('Failed to fetch ListWaitlists');
|
37
|
-
}
|
38
|
-
});
|
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
|
-
});
|
53
|
-
|
54
|
-
export const ListModelProviders = actionClient
|
55
|
-
.action(async ({ parsedInput }): Promise<Agent[]> => {
|
56
|
-
try {
|
57
|
-
|
58
|
-
const { agent } = await getSDKForCurrentUser();
|
59
|
-
return await agent.ListModelProviders();
|
60
|
-
} catch (error) {
|
61
|
-
console.error('Error in ListModelProviders:', error);
|
62
|
-
throw new Error('Failed to fetch ListModelProviders');
|
63
|
-
}
|
64
|
-
});
|
65
|
-
|
66
|
-
export const ListModels = actionClient
|
67
|
-
.schema(ListModelsSchema)
|
68
|
-
.action(async ({ parsedInput }): Promise<AIModel[]> => {
|
69
|
-
try {
|
70
|
-
|
71
|
-
const { agent } = await getSDKForCurrentUser();
|
72
|
-
return await agent.ListModels(parsedInput);
|
73
|
-
} catch (error) {
|
74
|
-
console.error('Error in ListModels:', error);
|
75
|
-
throw new Error('Failed to fetch ListModels');
|
76
|
-
}
|
77
|
-
});
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import { z } from "zod";
|
2
|
-
|
3
|
-
export const CreateAgentSchema = z.object({
|
4
|
-
id: z.string().optional(),
|
5
|
-
name: z.string(),
|
6
|
-
modelId: z.string()
|
7
|
-
});
|
8
|
-
|
9
|
-
export const GetAgentSchema = z.object({
|
10
|
-
id: z.string()
|
11
|
-
});
|
12
|
-
|
13
|
-
export const UpdateAgentSchema = z.object({
|
14
|
-
id: z.string(),
|
15
|
-
name: z.string(),
|
16
|
-
modelId: z.string()
|
17
|
-
});
|
18
|
-
|
19
|
-
export const DeleteAgentSchema = z.object({
|
20
|
-
id: z.string()
|
21
|
-
});
|
22
|
-
|
23
|
-
export const ListModelsSchema = z.object({
|
24
|
-
modelProviderId: z.string()
|
25
|
-
});
|
@@ -1,34 +0,0 @@
|
|
1
|
-
|
2
|
-
import z from "zod";
|
3
|
-
import { ServiceClient } from "../../service-client";
|
4
|
-
import { CreateAgentSchema, GetAgentSchema, ListModelsSchema } from "./schema";
|
5
|
-
import { Agent, AIModel } from "./types";
|
6
|
-
|
7
|
-
|
8
|
-
export class AgentService extends ServiceClient {
|
9
|
-
protected getServiceName(): string {
|
10
|
-
return 'com.appconda.service.agent';
|
11
|
-
}
|
12
|
-
|
13
|
-
public async CreateAgent(payload: z.infer<typeof CreateAgentSchema>): Promise<Agent> {
|
14
|
-
return await this.actionCall('CreateAgent', payload);
|
15
|
-
}
|
16
|
-
|
17
|
-
public async GetAgent(payload: z.infer<typeof GetAgentSchema>): Promise<Agent> {
|
18
|
-
return await this.actionCall('GetAgent', payload);
|
19
|
-
}
|
20
|
-
|
21
|
-
public async ListAgents(): Promise<Agent[]> {
|
22
|
-
return await this.actionCall('ListAgents', {});
|
23
|
-
}
|
24
|
-
|
25
|
-
public async ListModelProviders(): Promise<Agent[]> {
|
26
|
-
return await this.actionCall('ListModelProviders', {});
|
27
|
-
}
|
28
|
-
|
29
|
-
public async ListModels(payload: z.infer<typeof ListModelsSchema>): Promise<AIModel[]> {
|
30
|
-
return await this.actionCall('ListModels', payload);
|
31
|
-
}
|
32
|
-
|
33
|
-
|
34
|
-
}
|