@appconda/nextjs 1.0.159 → 1.0.161

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 (88) hide show
  1. package/dist/actions/index.d.ts +0 -1
  2. package/dist/actions/index.js +0 -1
  3. package/dist/getSDKForCurrentUser.d.ts +7 -3
  4. package/dist/getSDKForCurrentUser.js +9 -3
  5. package/dist/getSDKForService.d.ts +6 -0
  6. package/dist/getSDKForService.js +49 -0
  7. package/dist/index.d.ts +5 -5
  8. package/dist/index.js +5 -5
  9. package/dist/modules/account/actions.d.ts +25 -0
  10. package/dist/modules/account/actions.js +17 -0
  11. package/dist/modules/account/enums/authentication-factor.d.ts +6 -0
  12. package/dist/modules/account/enums/authentication-factor.js +7 -0
  13. package/dist/modules/account/enums/authenticator-type.d.ts +3 -0
  14. package/dist/modules/account/enums/authenticator-type.js +4 -0
  15. package/dist/modules/account/enums/o-auth-provider.d.ts +41 -0
  16. package/dist/modules/account/enums/o-auth-provider.js +42 -0
  17. package/dist/modules/account/index.d.ts +3 -0
  18. package/dist/modules/account/index.js +3 -0
  19. package/dist/modules/account/schema.d.ts +17 -0
  20. package/dist/modules/account/schema.js +7 -0
  21. package/dist/modules/account/service.d.ts +530 -0
  22. package/dist/modules/account/service.js +1259 -0
  23. package/dist/modules/account/types.d.ts +411 -0
  24. package/dist/modules/account/types.js +1 -0
  25. package/dist/modules/agent/action.d.ts +53 -0
  26. package/dist/modules/agent/action.js +63 -0
  27. package/dist/modules/agent/index.d.ts +4 -0
  28. package/dist/modules/agent/index.js +4 -0
  29. package/dist/modules/agent/schema.d.ts +48 -0
  30. package/dist/modules/agent/schema.js +20 -0
  31. package/dist/modules/agent/service.d.ts +12 -0
  32. package/dist/modules/agent/service.js +21 -0
  33. package/dist/modules/agent/types.d.ts +11 -0
  34. package/dist/modules/agent/types.js +1 -0
  35. package/dist/modules/ai/index.d.ts +1 -0
  36. package/dist/modules/ai/index.js +1 -0
  37. package/dist/modules/ai/node/actions.d.ts +4 -0
  38. package/dist/modules/ai/node/actions.js +15 -0
  39. package/dist/modules/ai/node/index.d.ts +2 -0
  40. package/dist/modules/ai/node/index.js +2 -0
  41. package/dist/modules/ai/node/service.d.ts +5 -0
  42. package/dist/modules/ai/node/service.js +11 -0
  43. package/dist/modules/index.d.ts +3 -0
  44. package/dist/modules/index.js +3 -0
  45. package/dist/modules/waitlist/action.d.ts +24 -0
  46. package/dist/modules/waitlist/action.js +29 -4
  47. package/dist/modules/waitlist/index.d.ts +1 -0
  48. package/dist/modules/waitlist/index.js +1 -0
  49. package/dist/modules/waitlist/schema.d.ts +14 -0
  50. package/dist/modules/waitlist/schema.js +6 -0
  51. package/dist/modules/waitlist/service.d.ts +4 -2
  52. package/dist/modules/waitlist/service.js +6 -0
  53. package/dist/modules/waitlist/types.d.ts +4 -0
  54. package/dist/services/chat-flow.d.ts +7 -0
  55. package/dist/services/chat-flow.js +25 -0
  56. package/dist/services/projects.d.ts +1 -1
  57. package/dist/services/users.d.ts +1 -1
  58. package/package.json +1 -1
  59. package/src/actions/index.ts +0 -1
  60. package/src/getSDKForCurrentUser.ts +9 -3
  61. package/src/getSDKForService.ts +52 -0
  62. package/src/index.ts +5 -5
  63. package/src/modules/account/actions.ts +21 -0
  64. package/src/modules/account/index.ts +3 -0
  65. package/src/modules/account/schema.ts +8 -0
  66. package/src/{services/account.ts → modules/account/service.ts} +61 -59
  67. package/src/modules/account/types.ts +426 -0
  68. package/src/modules/agent/action.ts +77 -0
  69. package/src/modules/agent/index.ts +4 -0
  70. package/src/modules/agent/schema.ts +25 -0
  71. package/src/modules/agent/service.ts +34 -0
  72. package/src/modules/agent/types.ts +15 -0
  73. package/src/modules/ai/index.ts +1 -0
  74. package/src/{actions/nodes.ts → modules/ai/node/actions.ts} +2 -2
  75. package/src/modules/ai/node/index.ts +2 -0
  76. package/src/{services/node.ts → modules/ai/node/service.ts} +4 -4
  77. package/src/modules/index.ts +4 -1
  78. package/src/modules/waitlist/action.ts +33 -4
  79. package/src/modules/waitlist/index.ts +2 -1
  80. package/src/modules/waitlist/schema.ts +9 -0
  81. package/src/modules/waitlist/service.ts +11 -2
  82. package/src/modules/waitlist/types.ts +5 -0
  83. package/src/services/chat-flow.ts +32 -0
  84. package/src/services/projects.ts +1 -1
  85. package/src/services/users.ts +1 -1
  86. /package/src/{enums → modules/account/enums}/authentication-factor.ts +0 -0
  87. /package/src/{enums → modules/account/enums}/authenticator-type.ts +0 -0
  88. /package/src/{enums → modules/account/enums}/o-auth-provider.ts +0 -0
@@ -1 +0,0 @@
1
- export * from './nodes';
@@ -1 +0,0 @@
1
- export * from './nodes';
@@ -1,4 +1,3 @@
1
- import { Account } from "./services/account";
2
1
  import { Community } from "./services/community";
3
2
  import { Configuration } from "./services/configuration";
4
3
  import { Databases } from "./services/databases";
@@ -11,11 +10,14 @@ import { Teams } from "./services/teams";
11
10
  import { Tenant } from "./services/tenant";
12
11
  import { TenantSubscription } from "./services/tenant-subscription";
13
12
  import { Users } from "./services/users";
14
- import { Node } from "./services/node";
15
13
  import { Permissions } from "./services/permissions";
16
14
  import { WaitlistService } from "./modules/waitlist/service";
15
+ import { Account } from "./modules/account/service";
16
+ import { Node } from "./modules/ai/node/service";
17
+ import { AgentService } from "./modules/agent/service";
18
+ import { ChatFlow } from "./services/chat-flow";
17
19
  export declare function getSDKForCurrentUser(): Promise<{
18
- currentUser: import("./models").Models.User<import("./models").Models.Preferences>;
20
+ currentUser: import("./modules/account/types").User<import("./modules/account/types").Preferences>;
19
21
  accounts: Account;
20
22
  databases: Databases;
21
23
  projects: Projects;
@@ -32,4 +34,6 @@ export declare function getSDKForCurrentUser(): Promise<{
32
34
  configuration: Configuration;
33
35
  node: Node;
34
36
  waitlist: WaitlistService;
37
+ agent: AgentService;
38
+ chatFlow: ChatFlow;
35
39
  }>;
@@ -1,6 +1,5 @@
1
1
  import { cookies } from "next/headers";
2
2
  import { getAppcondaClient } from "./getAppcondaClient";
3
- import { Account } from "./services/account";
4
3
  import { Community } from "./services/community";
5
4
  import { Configuration } from "./services/configuration";
6
5
  import { Databases } from "./services/databases";
@@ -13,9 +12,12 @@ import { Teams } from "./services/teams";
13
12
  import { Tenant } from "./services/tenant";
14
13
  import { TenantSubscription } from "./services/tenant-subscription";
15
14
  import { Users } from "./services/users";
16
- import { Node } from "./services/node";
17
15
  import { Permissions } from "./services/permissions";
18
16
  import { WaitlistService } from "./modules/waitlist/service";
17
+ import { Account } from "./modules/account/service";
18
+ import { Node } from "./modules/ai/node/service";
19
+ import { AgentService } from "./modules/agent/service";
20
+ import { ChatFlow } from "./services/chat-flow";
19
21
  export async function getSDKForCurrentUser() {
20
22
  const adminClient = await getAppcondaClient();
21
23
  const c = await cookies();
@@ -42,6 +44,8 @@ export async function getSDKForCurrentUser() {
42
44
  //const acl = new Acl(adminClient);
43
45
  const node = new Node(adminClient);
44
46
  const waitlist = new WaitlistService(adminClient);
47
+ const agent = new AgentService(adminClient);
48
+ const chatFlow = new ChatFlow(adminClient);
45
49
  return {
46
50
  currentUser,
47
51
  accounts,
@@ -60,6 +64,8 @@ export async function getSDKForCurrentUser() {
60
64
  configuration,
61
65
  // acl,
62
66
  node,
63
- waitlist
67
+ waitlist,
68
+ agent,
69
+ chatFlow
64
70
  };
65
71
  }
@@ -0,0 +1,6 @@
1
+ import { WaitlistService } from "./modules";
2
+ import { Configuration } from "./services/configuration";
3
+ export declare function getSDKForService(): Promise<{
4
+ waitlist: WaitlistService;
5
+ configuration: Configuration;
6
+ }>;
@@ -0,0 +1,49 @@
1
+ import { getAppcondaClient } from "./getAppcondaClient";
2
+ import { WaitlistService } from "./modules";
3
+ import { Configuration } from "./services/configuration";
4
+ export async function getSDKForService() {
5
+ const adminClient = await getAppcondaClient();
6
+ adminClient.addHeader('x-service-token', process.env._SERVICE_TOKEN ?? '');
7
+ /*
8
+ const accounts = new Account(adminClient);
9
+ const databases = new Databases(adminClient);
10
+
11
+ const projects = new Projects(adminClient);
12
+
13
+ const currentUser = await accounts.get();
14
+
15
+ const users = new Users(adminClient);
16
+ const teams = new Teams(adminClient);
17
+
18
+ const tenants = new Tenant(adminClient);
19
+ const roles = new Roles(adminClient);
20
+ const permissions = new Permissions(adminClient);
21
+ const schemas = new Schemas(adminClient);
22
+
23
+ const community = new Community(adminClient);
24
+
25
+ const tenantSubscriptions = new TenantSubscription(adminClient);
26
+
27
+ const subscription = new Subscription(adminClient);
28
+ const pricing = new Pricing(adminClient); */
29
+ const waitlist = new WaitlistService(adminClient);
30
+ const configuration = new Configuration(adminClient);
31
+ return {
32
+ /* currentUser,
33
+ accounts,
34
+ databases,
35
+ projects,
36
+ users,
37
+ teams,
38
+ tenants,
39
+ roles,
40
+ permissions,
41
+ schemas,
42
+ community,
43
+ tenantSubscriptions,
44
+ subscription,
45
+ pricing, */
46
+ waitlist,
47
+ configuration
48
+ };
49
+ }
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { Client, Query, AppcondaException } from './client';
2
- export { Account } from './services/account';
2
+ export { Account } from './modules/account/service';
3
3
  export { Avatars } from './services/avatars';
4
4
  export { Databases } from './services/databases';
5
5
  export { Applets } from './services/applets';
@@ -16,9 +16,9 @@ export type { QueryTypes, QueryTypesList } from './query';
16
16
  export { Permission } from './permission';
17
17
  export { Role } from './role';
18
18
  export { ID } from './id';
19
- export { AuthenticatorType } from './enums/authenticator-type';
20
- export { AuthenticationFactor } from './enums/authentication-factor';
21
- export { OAuthProvider } from './enums/o-auth-provider';
19
+ export { AuthenticatorType } from './modules/account/enums/authenticator-type';
20
+ export { AuthenticationFactor } from './modules/account/enums/authentication-factor';
21
+ export { OAuthProvider } from './modules/account/enums/o-auth-provider';
22
22
  export { Browser } from './enums/browser';
23
23
  export { CreditCard } from './enums/credit-card';
24
24
  export { Flag } from './enums/flag';
@@ -35,7 +35,7 @@ export { ImageFormat } from './enums/image-format';
35
35
  export { PasswordHash } from './enums/password-hash';
36
36
  export { MessagingProviderType } from './enums/messaging-provider-type';
37
37
  export { getSDKForCurrentUser } from './getSDKForCurrentUser';
38
- export * from './actions';
38
+ export { getSDKForService } from './getSDKForService';
39
39
  export * from './modules';
40
40
  export type { SafeActionFn } from 'next-safe-action';
41
41
  export { getAppcondaClient } from './getAppcondaClient';
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { Client, Query, AppcondaException } from './client';
2
- export { Account } from './services/account';
2
+ export { Account } from './modules/account/service';
3
3
  export { Avatars } from './services/avatars';
4
4
  export { Databases } from './services/databases';
5
5
  export { Applets } from './services/applets';
@@ -14,9 +14,9 @@ export { Users } from './services/users';
14
14
  export { Permission } from './permission';
15
15
  export { Role } from './role';
16
16
  export { ID } from './id';
17
- export { AuthenticatorType } from './enums/authenticator-type';
18
- export { AuthenticationFactor } from './enums/authentication-factor';
19
- export { OAuthProvider } from './enums/o-auth-provider';
17
+ export { AuthenticatorType } from './modules/account/enums/authenticator-type';
18
+ export { AuthenticationFactor } from './modules/account/enums/authentication-factor';
19
+ export { OAuthProvider } from './modules/account/enums/o-auth-provider';
20
20
  export { Browser } from './enums/browser';
21
21
  export { CreditCard } from './enums/credit-card';
22
22
  export { Flag } from './enums/flag';
@@ -33,6 +33,6 @@ export { ImageFormat } from './enums/image-format';
33
33
  export { PasswordHash } from './enums/password-hash';
34
34
  export { MessagingProviderType } from './enums/messaging-provider-type';
35
35
  export { getSDKForCurrentUser } from './getSDKForCurrentUser';
36
- export * from './actions';
36
+ export { getSDKForService } from './getSDKForService';
37
37
  export * from './modules';
38
38
  export { getAppcondaClient } from './getAppcondaClient';
@@ -0,0 +1,25 @@
1
+ import { User } from "./types";
2
+ export declare const CreateUser: import("next-safe-action").SafeActionFn<string, import("zod").ZodObject<{
3
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
4
+ email: import("zod").ZodString;
5
+ password: import("zod").ZodString;
6
+ name: import("zod").ZodOptional<import("zod").ZodString>;
7
+ }, "strip", import("zod").ZodTypeAny, {
8
+ name?: string;
9
+ password?: string;
10
+ email?: string;
11
+ userId?: string;
12
+ }, {
13
+ name?: string;
14
+ password?: string;
15
+ email?: string;
16
+ userId?: string;
17
+ }>, readonly [], {
18
+ formErrors: string[];
19
+ fieldErrors: {
20
+ name?: string[];
21
+ password?: string[];
22
+ email?: string[];
23
+ userId?: string[];
24
+ };
25
+ }, readonly [], User>;
@@ -0,0 +1,17 @@
1
+ 'use server';
2
+ import { actionClient } from "../../actions/actionClient";
3
+ import { getSDKForCurrentUser } from "../../getSDKForCurrentUser";
4
+ import { CreateUserSchema } from "./schema";
5
+ export const CreateUser = actionClient
6
+ .schema(CreateUserSchema)
7
+ .action(async ({ parsedInput }) => {
8
+ try {
9
+ const { userId, email, password, name } = parsedInput;
10
+ const { accounts } = await getSDKForCurrentUser();
11
+ return await accounts.create(userId, email, password, name);
12
+ }
13
+ catch (error) {
14
+ console.error('Error in ListWaitlists:', error);
15
+ throw new Error('Failed to fetch ListWaitlists');
16
+ }
17
+ });
@@ -0,0 +1,6 @@
1
+ export declare enum AuthenticationFactor {
2
+ Email = "email",
3
+ Phone = "phone",
4
+ Totp = "totp",
5
+ Recoverycode = "recoverycode"
6
+ }
@@ -0,0 +1,7 @@
1
+ export var AuthenticationFactor;
2
+ (function (AuthenticationFactor) {
3
+ AuthenticationFactor["Email"] = "email";
4
+ AuthenticationFactor["Phone"] = "phone";
5
+ AuthenticationFactor["Totp"] = "totp";
6
+ AuthenticationFactor["Recoverycode"] = "recoverycode";
7
+ })(AuthenticationFactor || (AuthenticationFactor = {}));
@@ -0,0 +1,3 @@
1
+ export declare enum AuthenticatorType {
2
+ Totp = "totp"
3
+ }
@@ -0,0 +1,4 @@
1
+ export var AuthenticatorType;
2
+ (function (AuthenticatorType) {
3
+ AuthenticatorType["Totp"] = "totp";
4
+ })(AuthenticatorType || (AuthenticatorType = {}));
@@ -0,0 +1,41 @@
1
+ export declare enum OAuthProvider {
2
+ Amazon = "amazon",
3
+ Apple = "apple",
4
+ Auth0 = "auth0",
5
+ Authentik = "authentik",
6
+ Autodesk = "autodesk",
7
+ Bitbucket = "bitbucket",
8
+ Bitly = "bitly",
9
+ Box = "box",
10
+ Dailymotion = "dailymotion",
11
+ Discord = "discord",
12
+ Disqus = "disqus",
13
+ Dropbox = "dropbox",
14
+ Etsy = "etsy",
15
+ Facebook = "facebook",
16
+ Github = "github",
17
+ Gitlab = "gitlab",
18
+ Google = "google",
19
+ Linkedin = "linkedin",
20
+ Microsoft = "microsoft",
21
+ Notion = "notion",
22
+ Oidc = "oidc",
23
+ Okta = "okta",
24
+ Paypal = "paypal",
25
+ PaypalSandbox = "paypalSandbox",
26
+ Podio = "podio",
27
+ Salesforce = "salesforce",
28
+ Slack = "slack",
29
+ Spotify = "spotify",
30
+ Stripe = "stripe",
31
+ Tradeshift = "tradeshift",
32
+ TradeshiftBox = "tradeshiftBox",
33
+ Twitch = "twitch",
34
+ Wordpress = "wordpress",
35
+ Yahoo = "yahoo",
36
+ Yammer = "yammer",
37
+ Yandex = "yandex",
38
+ Zoho = "zoho",
39
+ Zoom = "zoom",
40
+ Mock = "mock"
41
+ }
@@ -0,0 +1,42 @@
1
+ export var OAuthProvider;
2
+ (function (OAuthProvider) {
3
+ OAuthProvider["Amazon"] = "amazon";
4
+ OAuthProvider["Apple"] = "apple";
5
+ OAuthProvider["Auth0"] = "auth0";
6
+ OAuthProvider["Authentik"] = "authentik";
7
+ OAuthProvider["Autodesk"] = "autodesk";
8
+ OAuthProvider["Bitbucket"] = "bitbucket";
9
+ OAuthProvider["Bitly"] = "bitly";
10
+ OAuthProvider["Box"] = "box";
11
+ OAuthProvider["Dailymotion"] = "dailymotion";
12
+ OAuthProvider["Discord"] = "discord";
13
+ OAuthProvider["Disqus"] = "disqus";
14
+ OAuthProvider["Dropbox"] = "dropbox";
15
+ OAuthProvider["Etsy"] = "etsy";
16
+ OAuthProvider["Facebook"] = "facebook";
17
+ OAuthProvider["Github"] = "github";
18
+ OAuthProvider["Gitlab"] = "gitlab";
19
+ OAuthProvider["Google"] = "google";
20
+ OAuthProvider["Linkedin"] = "linkedin";
21
+ OAuthProvider["Microsoft"] = "microsoft";
22
+ OAuthProvider["Notion"] = "notion";
23
+ OAuthProvider["Oidc"] = "oidc";
24
+ OAuthProvider["Okta"] = "okta";
25
+ OAuthProvider["Paypal"] = "paypal";
26
+ OAuthProvider["PaypalSandbox"] = "paypalSandbox";
27
+ OAuthProvider["Podio"] = "podio";
28
+ OAuthProvider["Salesforce"] = "salesforce";
29
+ OAuthProvider["Slack"] = "slack";
30
+ OAuthProvider["Spotify"] = "spotify";
31
+ OAuthProvider["Stripe"] = "stripe";
32
+ OAuthProvider["Tradeshift"] = "tradeshift";
33
+ OAuthProvider["TradeshiftBox"] = "tradeshiftBox";
34
+ OAuthProvider["Twitch"] = "twitch";
35
+ OAuthProvider["Wordpress"] = "wordpress";
36
+ OAuthProvider["Yahoo"] = "yahoo";
37
+ OAuthProvider["Yammer"] = "yammer";
38
+ OAuthProvider["Yandex"] = "yandex";
39
+ OAuthProvider["Zoho"] = "zoho";
40
+ OAuthProvider["Zoom"] = "zoom";
41
+ OAuthProvider["Mock"] = "mock";
42
+ })(OAuthProvider || (OAuthProvider = {}));
@@ -0,0 +1,3 @@
1
+ export * from './actions';
2
+ export * from './schema';
3
+ export * from './service';
@@ -0,0 +1,3 @@
1
+ export * from './actions';
2
+ export * from './schema';
3
+ export * from './service';
@@ -0,0 +1,17 @@
1
+ import { z } from "zod";
2
+ export declare const CreateUserSchema: z.ZodObject<{
3
+ userId: z.ZodOptional<z.ZodString>;
4
+ email: z.ZodString;
5
+ password: z.ZodString;
6
+ name: z.ZodOptional<z.ZodString>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ name?: string;
9
+ password?: string;
10
+ email?: string;
11
+ userId?: string;
12
+ }, {
13
+ name?: string;
14
+ password?: string;
15
+ email?: string;
16
+ userId?: string;
17
+ }>;
@@ -0,0 +1,7 @@
1
+ import { z } from "zod";
2
+ export const CreateUserSchema = z.object({
3
+ userId: z.string().optional(),
4
+ email: z.string(),
5
+ password: z.string(),
6
+ name: z.string().optional()
7
+ });