@appconda/nextjs 1.0.161 → 1.1.3
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/actionClient.d.ts +8 -2
- package/dist/actions/actionClient.js +21 -15
- package/dist/actions/auth.d.ts +1 -0
- package/dist/actions/auth.js +7 -0
- package/dist/actions/authOptions.d.ts +5 -0
- package/dist/actions/authOptions.js +235 -0
- package/dist/actions/index.d.ts +3 -0
- package/dist/actions/index.js +4 -0
- package/dist/actions/nextAuthHandler.d.ts +1 -0
- package/dist/actions/nextAuthHandler.js +6 -0
- package/dist/client.d.ts +1 -1
- package/dist/client.js +1 -0
- package/dist/decorators/Cache.js +1 -0
- package/dist/decorators/CacheKey.js +1 -0
- package/dist/decorators/Invalidate.js +1 -0
- package/dist/enums/api-service.js +1 -0
- package/dist/enums/api.js +1 -0
- package/dist/enums/auth-method.js +1 -0
- package/dist/enums/browser.js +1 -0
- package/dist/enums/compression.js +1 -0
- package/dist/enums/credit-card.js +1 -0
- package/dist/enums/database-usage-range.js +1 -0
- package/dist/enums/email-template-locale.js +1 -0
- package/dist/enums/email-template-type.js +1 -0
- package/dist/enums/entities/EntityLimitType.js +1 -0
- package/dist/enums/entities/PropertyAttributeName.js +1 -0
- package/dist/enums/entities/PropertyCondition.js +1 -0
- package/dist/enums/entities/PropertyType.js +1 -0
- package/dist/enums/entities/PropertyValueType.js +1 -0
- package/dist/enums/entities/RowAccess.js +1 -0
- package/dist/enums/entities/ViewFilterCondition.js +1 -0
- package/dist/enums/execution-method.js +1 -0
- package/dist/enums/flag.js +1 -0
- package/dist/enums/function-usage-range.js +1 -0
- package/dist/enums/image-format.js +1 -0
- package/dist/enums/image-gravity.js +1 -0
- package/dist/enums/index-type.js +1 -0
- package/dist/enums/messaging-provider-type.js +1 -0
- package/dist/enums/name.js +1 -0
- package/dist/enums/o-auth-provider copy.js +1 -0
- package/dist/enums/password-hash.js +1 -0
- package/dist/enums/platform-type.js +1 -0
- package/dist/enums/project-usage-range.js +1 -0
- package/dist/enums/region.js +1 -0
- package/dist/enums/relation-mutate.js +1 -0
- package/dist/enums/relationship-type.js +1 -0
- package/dist/enums/resource-type.js +1 -0
- package/dist/enums/runtime.js +1 -0
- package/dist/enums/s-m-t-p-secure.js +1 -0
- package/dist/enums/shared/ApplicationLayout.js +1 -0
- package/dist/enums/shared/Colors.js +1 -0
- package/dist/enums/shared/InputType.js +1 -0
- package/dist/enums/shared/Periodicity.js +1 -0
- package/dist/enums/shared/SvgIcon.js +1 -0
- package/dist/enums/shared/Theme.js +1 -0
- package/dist/enums/sms-template-locale.js +1 -0
- package/dist/enums/sms-template-type.js +1 -0
- package/dist/enums/smtp-encryption.js +1 -0
- package/dist/enums/storage-usage-range.js +1 -0
- package/dist/enums/subscriptions/PricingModel.js +1 -0
- package/dist/enums/subscriptions/SubscriptionBillingPeriod.js +1 -0
- package/dist/enums/subscriptions/SubscriptionFeatureLimitType.js +1 -0
- package/dist/enums/subscriptions/SubscriptionPriceType.js +1 -0
- package/dist/enums/tenants/LinkedAccountStatus.js +1 -0
- package/dist/enums/tenants/TenantUserJoined.js +1 -0
- package/dist/enums/tenants/TenantUserStatus.js +1 -0
- package/dist/enums/tenants/TenantUserType.js +1 -0
- package/dist/enums/user-usage-range.js +1 -0
- package/dist/getAppcondaClient.js +5 -3
- package/dist/getSDKForCurrentUser.d.ts +8 -2
- package/dist/getSDKForCurrentUser.js +13 -5
- package/dist/getSDKForService.js +3 -1
- package/dist/getSDKForTenant.d.ts +20 -0
- package/dist/getSDKForTenant.js +44 -0
- package/dist/id.js +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +5 -1
- package/dist/inputFile.js +1 -0
- package/dist/lib/Cache/Adapter.js +1 -0
- package/dist/lib/Cache/Adapters/Filesystem.js +1 -0
- package/dist/lib/Cache/Adapters/Memory.js +1 -0
- package/dist/lib/Cache/Adapters/None.js +1 -0
- package/dist/lib/Cache/Adapters/Sharding.js +1 -0
- package/dist/lib/Cache/Cache.js +1 -0
- package/dist/lib/Cache/index.js +1 -0
- package/dist/lib/Cache/test.js +1 -0
- package/dist/lib/Registry/Registry.js +1 -0
- package/dist/lib/Registry/index.js +1 -0
- package/dist/lib/Services.js +1 -0
- package/dist/lib/crypto.d.ts +23 -0
- package/dist/lib/crypto.js +78 -0
- package/dist/lib/env.d.ts +1 -0
- package/dist/lib/env.js +137 -0
- package/dist/lib/errors.d.ts +70 -0
- package/dist/lib/errors.js +76 -0
- package/dist/lib/index.d.ts +2 -0
- package/dist/lib/index.js +3 -0
- package/dist/lib/jwt.d.ts +12 -0
- package/dist/lib/jwt.js +103 -0
- package/dist/models.js +1 -0
- package/dist/modules/account/actions.d.ts +20 -14
- package/dist/modules/account/actions.js +1 -0
- package/dist/modules/account/enums/authentication-factor.js +1 -0
- package/dist/modules/account/enums/authenticator-type.js +1 -0
- package/dist/modules/account/enums/o-auth-provider.js +1 -0
- package/dist/modules/account/index.js +1 -0
- package/dist/modules/account/schema.d.ts +8 -8
- package/dist/modules/account/schema.js +1 -0
- package/dist/modules/account/service.js +1 -0
- package/dist/modules/account/types.js +1 -0
- package/dist/modules/acl/service.d.ts +26 -0
- package/dist/modules/acl/service.js +27 -0
- package/dist/modules/agent/action.d.ts +27 -23
- package/dist/modules/agent/action.js +1 -0
- package/dist/modules/agent/index.js +1 -0
- package/dist/modules/agent/schema.d.ts +18 -18
- package/dist/modules/agent/schema.js +1 -0
- package/dist/modules/agent/service.js +1 -0
- package/dist/modules/agent/types.js +1 -0
- package/dist/modules/ai/index.js +1 -0
- package/dist/modules/ai/node/actions.d.ts +1 -1
- package/dist/modules/ai/node/actions.js +1 -0
- package/dist/modules/ai/node/index.js +1 -0
- package/dist/modules/ai/node/service.js +1 -0
- package/dist/modules/hooks/index.d.ts +2 -0
- package/dist/modules/hooks/index.js +3 -0
- package/dist/modules/hooks/lib/Hooks.d.ts +32 -0
- package/dist/modules/hooks/lib/Hooks.js +64 -0
- package/dist/modules/hooks/lib/handler.d.ts +12 -0
- package/dist/modules/hooks/lib/handler.js +23 -0
- package/dist/modules/hooks/lib/jobs/index.d.ts +2 -0
- package/dist/modules/hooks/lib/jobs/index.js +3 -0
- package/dist/modules/hooks/lib/jobs/job1.d.ts +1 -0
- package/dist/modules/hooks/lib/jobs/job1.js +31 -0
- package/dist/modules/hooks/lib/jobs/log-job.d.ts +1 -0
- package/dist/modules/hooks/lib/jobs/log-job.js +9 -0
- package/dist/modules/hooks/lib/wait.d.ts +8 -0
- package/dist/modules/hooks/lib/wait.js +13 -0
- package/dist/modules/index.d.ts +4 -0
- package/dist/modules/index.js +5 -0
- package/dist/modules/scheduled-job/action.d.ts +97 -0
- package/dist/modules/scheduled-job/action.js +77 -0
- package/dist/modules/scheduled-job/index.d.ts +7 -0
- package/dist/modules/scheduled-job/index.js +8 -0
- package/dist/modules/scheduled-job/lib/Schedules.d.ts +32 -0
- package/dist/modules/scheduled-job/lib/Schedules.js +64 -0
- package/dist/modules/scheduled-job/lib/handler.d.ts +12 -0
- package/dist/modules/scheduled-job/lib/handler.js +23 -0
- package/dist/modules/scheduled-job/lib/jobs/index.d.ts +2 -0
- package/dist/modules/scheduled-job/lib/jobs/index.js +3 -0
- package/dist/modules/scheduled-job/lib/jobs/job1.d.ts +1 -0
- package/dist/modules/scheduled-job/lib/jobs/job1.js +30 -0
- package/dist/modules/scheduled-job/lib/jobs/log-job.d.ts +1 -0
- package/dist/modules/scheduled-job/lib/jobs/log-job.js +9 -0
- package/dist/modules/scheduled-job/lib/wait.d.ts +8 -0
- package/dist/modules/scheduled-job/lib/wait.js +13 -0
- package/dist/modules/scheduled-job/schema.d.ts +52 -0
- package/dist/modules/scheduled-job/schema.js +23 -0
- package/dist/modules/scheduled-job/service.d.ts +13 -0
- package/dist/modules/scheduled-job/service.js +25 -0
- package/dist/modules/scheduled-job/types.d.ts +29 -0
- package/dist/modules/scheduled-job/types.js +2 -0
- package/dist/modules/task/action.d.ts +201 -0
- package/dist/modules/task/action.js +147 -0
- package/dist/modules/task/index.d.ts +4 -0
- package/dist/modules/task/index.js +5 -0
- package/dist/modules/task/schema.d.ts +107 -0
- package/dist/modules/task/schema.js +44 -0
- package/dist/modules/task/service.d.ts +19 -0
- package/dist/modules/task/service.js +43 -0
- package/dist/modules/task/types.d.ts +84 -0
- package/dist/modules/task/types.js +2 -0
- package/dist/modules/tenant/actions.d.ts +49 -0
- package/dist/modules/tenant/actions.js +38 -0
- package/dist/modules/tenant/index.d.ts +3 -0
- package/dist/modules/tenant/index.js +4 -0
- package/dist/{services → modules/tenant}/tenant.d.ts +3 -3
- package/dist/modules/tenant/tenant.js +125 -0
- package/dist/modules/tenant/types.d.ts +11 -0
- package/dist/modules/tenant/types.js +2 -0
- package/dist/modules/waitlist/action.d.ts +31 -29
- package/dist/modules/waitlist/action.js +1 -0
- package/dist/modules/waitlist/index.js +1 -0
- package/dist/modules/waitlist/schema.d.ts +12 -12
- package/dist/modules/waitlist/schema.js +1 -0
- package/dist/modules/waitlist/service.js +1 -0
- package/dist/modules/waitlist/types.js +1 -0
- package/dist/permission.js +1 -0
- package/dist/query.js +1 -0
- package/dist/role.js +1 -0
- package/dist/schemas/nodes.js +1 -0
- package/dist/service-client.js +1 -0
- package/dist/service.js +1 -0
- package/dist/services/applets.js +1 -0
- package/dist/services/avatars.js +1 -0
- package/dist/services/chat-flow.js +1 -0
- package/dist/services/community.js +1 -0
- package/dist/services/configuration.js +1 -0
- package/dist/services/databases.js +1 -0
- package/dist/services/functions.js +1 -0
- package/dist/services/graphql.js +1 -0
- package/dist/services/health.js +1 -0
- package/dist/services/locale.js +1 -0
- package/dist/services/messaging.js +1 -0
- package/dist/services/permissions.js +1 -0
- package/dist/services/pricing.js +1 -0
- package/dist/services/projects.js +1 -0
- package/dist/services/roles.js +1 -0
- package/dist/services/schema.js +1 -0
- package/dist/services/storage.js +1 -0
- package/dist/services/subscription.js +1 -0
- package/dist/services/teams.js +1 -0
- package/dist/services/tenant-subscription.js +1 -0
- package/dist/services/users.js +1 -0
- package/package.json +4 -1
- package/src/actions/actionClient.ts +13 -6
- package/src/actions/auth.ts +7 -0
- package/src/actions/authOptions.ts +255 -0
- package/src/actions/index.ts +3 -0
- package/src/actions/nextAuthHandler.ts +9 -0
- package/src/client.ts +1 -1
- package/src/getAppcondaClient.ts +4 -3
- package/src/getSDKForCurrentUser.ts +12 -5
- package/src/getSDKForService.ts +2 -1
- package/src/getSDKForTenant.ts +52 -0
- package/src/index.ts +4 -2
- package/src/lib/crypto.ts +105 -0
- package/src/lib/env.ts +145 -0
- package/src/lib/errors.ts +138 -0
- package/src/lib/index.ts +2 -0
- package/src/lib/jwt.ts +113 -0
- package/src/modules/account/actions.ts +1 -1
- package/src/modules/acl/service.ts +55 -0
- package/src/modules/agent/action.ts +2 -0
- package/src/modules/ai/node/actions.ts +0 -1
- package/src/modules/hooks/index.ts +4 -0
- package/src/modules/hooks/lib/Hooks.ts +103 -0
- package/src/modules/hooks/lib/handler.ts +27 -0
- package/src/modules/hooks/lib/jobs/index.ts +2 -0
- package/src/modules/hooks/lib/jobs/job1.ts +35 -0
- package/src/modules/hooks/lib/jobs/log-job.ts +9 -0
- package/src/modules/hooks/lib/wait.ts +17 -0
- package/src/modules/index.ts +5 -1
- package/src/modules/scheduled-job/action.ts +94 -0
- package/src/modules/scheduled-job/index.ts +8 -0
- package/src/modules/scheduled-job/lib/Schedules.ts +103 -0
- package/src/modules/scheduled-job/lib/handler.ts +27 -0
- package/src/modules/scheduled-job/lib/jobs/index.ts +2 -0
- package/src/modules/scheduled-job/lib/jobs/job1.ts +34 -0
- package/src/modules/scheduled-job/lib/jobs/log-job.ts +9 -0
- package/src/modules/scheduled-job/lib/wait.ts +17 -0
- package/src/modules/scheduled-job/schema.ts +31 -0
- package/src/modules/scheduled-job/service.ts +37 -0
- package/src/modules/scheduled-job/types.ts +35 -0
- package/src/modules/task/action.ts +175 -0
- package/src/modules/task/index.ts +4 -0
- package/src/modules/task/schema.ts +53 -0
- package/src/modules/task/service.ts +62 -0
- package/src/modules/task/types.ts +89 -0
- package/src/modules/tenant/actions.ts +46 -0
- package/src/modules/tenant/index.ts +3 -0
- package/src/{services → modules/tenant}/tenant.ts +3 -4
- package/src/modules/tenant/types.ts +12 -0
- package/tsconfig.json +4 -1
- package/dist/actions/nodes.d.ts +0 -4
- package/dist/actions/nodes.js +0 -15
- package/dist/enums/authentication-factor.d.ts +0 -6
- package/dist/enums/authentication-factor.js +0 -7
- package/dist/enums/authenticator-type.d.ts +0 -3
- package/dist/enums/authenticator-type.js +0 -4
- package/dist/enums/o-auth-provider.d.ts +0 -41
- package/dist/enums/o-auth-provider.js +0 -42
- package/dist/services/account.d.ts +0 -530
- package/dist/services/account.js +0 -1259
- package/dist/services/node.d.ts +0 -5
- package/dist/services/node.js +0 -11
- package/dist/services/tenant.js +0 -124
@@ -0,0 +1,35 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
export type ScheduledJob = {
|
4
|
+
id: string;
|
5
|
+
name: string;
|
6
|
+
cron: string;
|
7
|
+
enabled: boolean;
|
8
|
+
lastRun?: Date;
|
9
|
+
nextRun?: Date;
|
10
|
+
createdAt: Date;
|
11
|
+
updatedAt: Date;
|
12
|
+
}
|
13
|
+
|
14
|
+
export type JobRun = {
|
15
|
+
id: string;
|
16
|
+
jobId: string;
|
17
|
+
createdAt: Date;
|
18
|
+
updatedAt: Date;
|
19
|
+
}
|
20
|
+
|
21
|
+
export type Execution = {
|
22
|
+
id: string;
|
23
|
+
scheduledJobId: string;
|
24
|
+
createdAt: Date;
|
25
|
+
updatedAt: Date;
|
26
|
+
status: string;
|
27
|
+
}
|
28
|
+
|
29
|
+
export type AvgExecution = {
|
30
|
+
scheduledJobId: string;
|
31
|
+
totalExecutions: number;
|
32
|
+
activeDays: number;
|
33
|
+
avgExecutionsPerDay: number;
|
34
|
+
}
|
35
|
+
|
@@ -0,0 +1,175 @@
|
|
1
|
+
'use server';
|
2
|
+
|
3
|
+
|
4
|
+
import { actionClient } from '../../actions/actionClient';
|
5
|
+
import { getSDKForCurrentUser } from '../../getSDKForCurrentUser';
|
6
|
+
import { getSDKForService } from '../../getSDKForService';
|
7
|
+
import { CreateProjectSchema, CreateSprintSchema, CreateTaskListSchema, DeleteSprintSchema, DeleteTaskListSchema, GetSprintSchema, GetTaskListSchema, ListProjectsSchema, UpdateSprintSchema, UpdateTaskListSchema } from './schema';
|
8
|
+
import { Project, Sprint, TaskList } from './types';
|
9
|
+
|
10
|
+
export const CreateProject = actionClient
|
11
|
+
.schema(CreateProjectSchema)
|
12
|
+
.action(async ({ parsedInput }): Promise<Project> => {
|
13
|
+
try {
|
14
|
+
|
15
|
+
const { task } = await getSDKForCurrentUser();
|
16
|
+
return await task.CreateProject(parsedInput);
|
17
|
+
|
18
|
+
} catch (error) {
|
19
|
+
console.error('Error in CreateProject:', error);
|
20
|
+
throw new Error('Failed to fetch CreateProject');
|
21
|
+
}
|
22
|
+
});
|
23
|
+
|
24
|
+
export const ListProjects = actionClient
|
25
|
+
.schema(ListProjectsSchema)
|
26
|
+
.action(async ({ parsedInput }): Promise<Project[]> => {
|
27
|
+
try {
|
28
|
+
|
29
|
+
const { task } = await getSDKForCurrentUser();
|
30
|
+
return await task.ListProjects(parsedInput);
|
31
|
+
|
32
|
+
} catch (error) {
|
33
|
+
console.error('Error in ListProjects:', error);
|
34
|
+
throw new Error('Failed to fetch ListProjects');
|
35
|
+
}
|
36
|
+
});
|
37
|
+
|
38
|
+
export const CreateTaskList = actionClient
|
39
|
+
.schema(CreateTaskListSchema)
|
40
|
+
.action(async ({ parsedInput }): Promise<TaskList> => {
|
41
|
+
try {
|
42
|
+
|
43
|
+
const { task } = await getSDKForCurrentUser();
|
44
|
+
return await task.CreateTaskList(parsedInput);
|
45
|
+
|
46
|
+
} catch (error) {
|
47
|
+
console.error('Error in CreateTaskList:', error);
|
48
|
+
throw new Error('Failed to fetch CreateTaskList');
|
49
|
+
}
|
50
|
+
});
|
51
|
+
|
52
|
+
export const GetTaskList = actionClient
|
53
|
+
.schema(GetTaskListSchema)
|
54
|
+
.action(async ({ parsedInput }): Promise<TaskList> => {
|
55
|
+
try {
|
56
|
+
|
57
|
+
const { task } = await getSDKForCurrentUser();
|
58
|
+
return await task.GetTaskList(parsedInput);
|
59
|
+
|
60
|
+
} catch (error) {
|
61
|
+
console.error('Error in GetTaskList:', error);
|
62
|
+
throw new Error('Failed to fetch GetTaskList');
|
63
|
+
}
|
64
|
+
});
|
65
|
+
|
66
|
+
export const ListTaskLists = actionClient
|
67
|
+
.action(async ({ parsedInput }): Promise<TaskList[]> => {
|
68
|
+
try {
|
69
|
+
|
70
|
+
const { task } = await getSDKForCurrentUser();
|
71
|
+
return await task.ListTaskLists();
|
72
|
+
|
73
|
+
} catch (error) {
|
74
|
+
console.error('Error in ListTaskLists:', error);
|
75
|
+
throw new Error('Failed to fetch ListTaskLists');
|
76
|
+
}
|
77
|
+
});
|
78
|
+
|
79
|
+
export const UpdateTaskList = actionClient
|
80
|
+
.schema(UpdateTaskListSchema)
|
81
|
+
.action(async ({ parsedInput }): Promise<TaskList> => {
|
82
|
+
try {
|
83
|
+
|
84
|
+
const { task } = await getSDKForCurrentUser();
|
85
|
+
return await task.UpdateTaskList(parsedInput);
|
86
|
+
|
87
|
+
} catch (error) {
|
88
|
+
console.error('Error in UpdateTaskList:', error);
|
89
|
+
throw new Error('Failed to fetch UpdateTaskList');
|
90
|
+
}
|
91
|
+
});
|
92
|
+
|
93
|
+
export const DeleteTaskList = actionClient
|
94
|
+
.schema(DeleteTaskListSchema)
|
95
|
+
.action(async ({ parsedInput }): Promise<void> => {
|
96
|
+
try {
|
97
|
+
|
98
|
+
const { task } = await getSDKForCurrentUser();
|
99
|
+
return await task.DeleteTaskList(parsedInput);
|
100
|
+
|
101
|
+
} catch (error) {
|
102
|
+
console.error('Error in DeleteTaskList:', error);
|
103
|
+
throw new Error('Failed to fetch DeleteTaskList');
|
104
|
+
}
|
105
|
+
});
|
106
|
+
|
107
|
+
|
108
|
+
export const CreateSprint = actionClient
|
109
|
+
.schema(CreateSprintSchema)
|
110
|
+
.action(async ({ parsedInput }): Promise<Sprint> => {
|
111
|
+
try {
|
112
|
+
|
113
|
+
const { task } = await getSDKForCurrentUser();
|
114
|
+
return await task.CreateSprint(parsedInput);
|
115
|
+
|
116
|
+
} catch (error) {
|
117
|
+
console.error('Error in CreateSprint:', error);
|
118
|
+
throw new Error('Failed to fetch CreateSprint');
|
119
|
+
}
|
120
|
+
});
|
121
|
+
|
122
|
+
export const GetSprint = actionClient
|
123
|
+
.schema(GetSprintSchema)
|
124
|
+
.action(async ({ parsedInput }): Promise<Sprint> => {
|
125
|
+
try {
|
126
|
+
|
127
|
+
const { task } = await getSDKForCurrentUser();
|
128
|
+
return await task.GetSprint(parsedInput);
|
129
|
+
|
130
|
+
} catch (error) {
|
131
|
+
console.error('Error in GetSprint:', error);
|
132
|
+
throw new Error('Failed to fetch GetSprint');
|
133
|
+
}
|
134
|
+
});
|
135
|
+
|
136
|
+
export const ListSprints = actionClient
|
137
|
+
.action(async ({ parsedInput }): Promise<Sprint[]> => {
|
138
|
+
try {
|
139
|
+
|
140
|
+
const { task } = await getSDKForCurrentUser();
|
141
|
+
return await task.ListSprints();
|
142
|
+
|
143
|
+
} catch (error) {
|
144
|
+
console.error('Error in ListSprints:', error);
|
145
|
+
throw new Error('Failed to fetch ListSprints');
|
146
|
+
}
|
147
|
+
});
|
148
|
+
|
149
|
+
export const UpdateSprint = actionClient
|
150
|
+
.schema(UpdateSprintSchema)
|
151
|
+
.action(async ({ parsedInput }): Promise<Sprint> => {
|
152
|
+
try {
|
153
|
+
|
154
|
+
const { task } = await getSDKForCurrentUser();
|
155
|
+
return await task.UpdateSprint(parsedInput);
|
156
|
+
|
157
|
+
} catch (error) {
|
158
|
+
console.error('Error in UpdateSprint:', error);
|
159
|
+
throw new Error('Failed to fetch UpdateSprint');
|
160
|
+
}
|
161
|
+
});
|
162
|
+
|
163
|
+
export const DeleteSprint = actionClient
|
164
|
+
.schema(DeleteSprintSchema)
|
165
|
+
.action(async ({ parsedInput }): Promise<void> => {
|
166
|
+
try {
|
167
|
+
|
168
|
+
const { task } = await getSDKForCurrentUser();
|
169
|
+
return await task.DeleteSprint(parsedInput);
|
170
|
+
|
171
|
+
} catch (error) {
|
172
|
+
console.error('Error in DeleteSprint:', error);
|
173
|
+
throw new Error('Failed to fetch DeleteSprint');
|
174
|
+
}
|
175
|
+
});
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import { z } from "zod";
|
2
|
+
|
3
|
+
export const CreateProjectSchema = z.object({
|
4
|
+
id: z.string().optional(),
|
5
|
+
tenantId: z.string(),
|
6
|
+
ownerId: z.string(),
|
7
|
+
title: z.string(),
|
8
|
+
description: z.string().optional()
|
9
|
+
});
|
10
|
+
|
11
|
+
export const ListProjectsSchema = z.object({
|
12
|
+
tenantId: z.string()
|
13
|
+
});
|
14
|
+
|
15
|
+
export const CreateTaskListSchema = z.object({
|
16
|
+
id: z.string().optional(),
|
17
|
+
name: z.string(),
|
18
|
+
description: z.string().optional()
|
19
|
+
});
|
20
|
+
|
21
|
+
export const CreateSprintSchema = z.object({
|
22
|
+
id: z.string().optional(),
|
23
|
+
name: z.string(),
|
24
|
+
description: z.string().optional()
|
25
|
+
});
|
26
|
+
|
27
|
+
export const GetTaskListSchema = z.object({
|
28
|
+
id: z.string()
|
29
|
+
});
|
30
|
+
|
31
|
+
export const GetSprintSchema = z.object({
|
32
|
+
id: z.string()
|
33
|
+
});
|
34
|
+
|
35
|
+
export const UpdateTaskListSchema = z.object({
|
36
|
+
id: z.string(),
|
37
|
+
name: z.string(),
|
38
|
+
description: z.string().optional()
|
39
|
+
});
|
40
|
+
|
41
|
+
export const UpdateSprintSchema = z.object({
|
42
|
+
id: z.string(),
|
43
|
+
name: z.string(),
|
44
|
+
description: z.string().optional()
|
45
|
+
});
|
46
|
+
|
47
|
+
export const DeleteTaskListSchema = z.object({
|
48
|
+
id: z.string()
|
49
|
+
});
|
50
|
+
|
51
|
+
export const DeleteSprintSchema = z.object({
|
52
|
+
id: z.string()
|
53
|
+
});
|
@@ -0,0 +1,62 @@
|
|
1
|
+
|
2
|
+
import z from "zod";
|
3
|
+
import { ServiceClient } from "../../service-client";
|
4
|
+
import { CreateProjectSchema, CreateSprintSchema, CreateTaskListSchema, DeleteSprintSchema, DeleteTaskListSchema, GetSprintSchema, GetTaskListSchema, ListProjectsSchema, UpdateSprintSchema, UpdateTaskListSchema } from "./schema";
|
5
|
+
import { Project, Sprint, TaskList } from "./types";
|
6
|
+
|
7
|
+
|
8
|
+
export class TaskService extends ServiceClient {
|
9
|
+
protected getServiceName(): string {
|
10
|
+
return 'com.appconda.service.task';
|
11
|
+
}
|
12
|
+
|
13
|
+
public async CreateProject(payload: z.infer<typeof CreateProjectSchema>): Promise<Project> {
|
14
|
+
return await this.actionCall('CreateProject', payload);
|
15
|
+
}
|
16
|
+
|
17
|
+
public async ListProjects(payload: z.infer<typeof ListProjectsSchema>): Promise<Project[]> {
|
18
|
+
return await this.actionCall('ListProjects', payload);
|
19
|
+
}
|
20
|
+
|
21
|
+
public async CreateTaskList(payload: z.infer<typeof CreateTaskListSchema>): Promise<TaskList> {
|
22
|
+
return await this.actionCall('CreateTaskList', payload);
|
23
|
+
}
|
24
|
+
|
25
|
+
public async CreateSprint(payload: z.infer<typeof CreateSprintSchema>): Promise<Sprint> {
|
26
|
+
return await this.actionCall('CreateSprint', payload);
|
27
|
+
}
|
28
|
+
|
29
|
+
public async ListTaskLists(): Promise<TaskList[]> {
|
30
|
+
return await this.actionCall('ListTaskLists', {});
|
31
|
+
}
|
32
|
+
|
33
|
+
public async ListSprints(): Promise<Sprint[]> {
|
34
|
+
return await this.actionCall('ListSprints', {});
|
35
|
+
}
|
36
|
+
|
37
|
+
public async GetTaskList(payload: z.infer<typeof GetTaskListSchema>): Promise<TaskList> {
|
38
|
+
return await this.actionCall('GetTaskList', payload);
|
39
|
+
}
|
40
|
+
|
41
|
+
public async GetSprint(payload: z.infer<typeof GetSprintSchema>): Promise<Sprint> {
|
42
|
+
return await this.actionCall('GetSprint', payload);
|
43
|
+
}
|
44
|
+
|
45
|
+
public async UpdateTaskList(payload: z.infer<typeof UpdateTaskListSchema>): Promise<TaskList> {
|
46
|
+
return await this.actionCall('UpdateTaskList', payload);
|
47
|
+
}
|
48
|
+
|
49
|
+
public async UpdateSprint(payload: z.infer<typeof UpdateSprintSchema>): Promise<Sprint> {
|
50
|
+
return await this.actionCall('UpdateSprint', payload);
|
51
|
+
}
|
52
|
+
|
53
|
+
public async DeleteTaskList(payload: z.infer<typeof DeleteTaskListSchema>): Promise<void> {
|
54
|
+
return await this.actionCall('DeleteTaskList', payload);
|
55
|
+
}
|
56
|
+
|
57
|
+
public async DeleteSprint(payload: z.infer<typeof DeleteSprintSchema>): Promise<void> {
|
58
|
+
return await this.actionCall('DeleteSprint', payload);
|
59
|
+
}
|
60
|
+
|
61
|
+
|
62
|
+
}
|
@@ -0,0 +1,89 @@
|
|
1
|
+
|
2
|
+
export type TaskList = {
|
3
|
+
id: string;
|
4
|
+
name: string;
|
5
|
+
description: string;
|
6
|
+
}
|
7
|
+
|
8
|
+
export type Sprint = {
|
9
|
+
id: string;
|
10
|
+
name: string;
|
11
|
+
description: string;
|
12
|
+
}
|
13
|
+
|
14
|
+
|
15
|
+
export type Project = {
|
16
|
+
id: string;
|
17
|
+
tenantId: string;
|
18
|
+
picture?: string;
|
19
|
+
ownerId: string;
|
20
|
+
title: string;
|
21
|
+
web?: string;
|
22
|
+
createdDate: Date;
|
23
|
+
updatedDate: Date;
|
24
|
+
description?: string;
|
25
|
+
starred: number;
|
26
|
+
archived: boolean;
|
27
|
+
defaultView: boolean;
|
28
|
+
itemName: string;
|
29
|
+
itemsName: string;
|
30
|
+
projectType: number;
|
31
|
+
commentAll: number;
|
32
|
+
commitsVisibility: number;
|
33
|
+
inviteAll: boolean;
|
34
|
+
projectColor?: string;
|
35
|
+
viewTitle?: string;
|
36
|
+
position?: number;
|
37
|
+
tasks: Task[];
|
38
|
+
}
|
39
|
+
export interface Task {
|
40
|
+
id: string;
|
41
|
+
projectId: string;
|
42
|
+
project: Project;
|
43
|
+
milestoneId?: string;
|
44
|
+
milestone?: Milestone;
|
45
|
+
sprintId?: string;
|
46
|
+
sprint?: Sprint;
|
47
|
+
taskType: string;
|
48
|
+
creator: string;
|
49
|
+
secondId: number;
|
50
|
+
title: string;
|
51
|
+
description?: string;
|
52
|
+
lastPicture?: string;
|
53
|
+
lastPictureExternalUrl?: string;
|
54
|
+
createdAt: Date;
|
55
|
+
updatedAt: Date;
|
56
|
+
deadline?: Date;
|
57
|
+
archived: boolean;
|
58
|
+
color?: string;
|
59
|
+
estimated?: string;
|
60
|
+
timeTracked?: string;
|
61
|
+
isPublic: boolean;
|
62
|
+
state: number;
|
63
|
+
coverWidth?: number;
|
64
|
+
coverHeight?: number;
|
65
|
+
checklist?: string;
|
66
|
+
comments: number;
|
67
|
+
publicComments: number;
|
68
|
+
likes: number;
|
69
|
+
attachments: number;
|
70
|
+
commits: number;
|
71
|
+
supportTickets: number;
|
72
|
+
value?: number;
|
73
|
+
points?: number;
|
74
|
+
pointsDone?: number;
|
75
|
+
position?: number;
|
76
|
+
}
|
77
|
+
|
78
|
+
export type Milestone = {
|
79
|
+
id: string;
|
80
|
+
title: string;
|
81
|
+
createdAt: Date;
|
82
|
+
updatedAt: Date;
|
83
|
+
archived: boolean;
|
84
|
+
complete: boolean;
|
85
|
+
deadline: Date;
|
86
|
+
color?: string;
|
87
|
+
position: number;
|
88
|
+
Task: Task[];
|
89
|
+
}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
'use server';
|
2
|
+
import { z } from "zod";
|
3
|
+
import { actionClient } from "../../actions/actionClient";
|
4
|
+
import { getSDKForCurrentUser } from "../../getSDKForCurrentUser";
|
5
|
+
|
6
|
+
const getTenantActionSchema = z.object({
|
7
|
+
tenantId: z.string()
|
8
|
+
});
|
9
|
+
|
10
|
+
export const getTenantAction = actionClient
|
11
|
+
.schema(getTenantActionSchema)
|
12
|
+
.action(async ({ parsedInput }) => {
|
13
|
+
const { tenantId } = parsedInput;
|
14
|
+
const { tenants } = await getSDKForCurrentUser();
|
15
|
+
return await tenants.get(tenantId);
|
16
|
+
});
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
const listUserTenantsScheema = z.object({
|
21
|
+
userId: z.string()
|
22
|
+
});
|
23
|
+
|
24
|
+
export const listUserTenantsAction = actionClient
|
25
|
+
.schema(listUserTenantsScheema)
|
26
|
+
.action(async ({ parsedInput }) => {
|
27
|
+
const { userId } = parsedInput;
|
28
|
+
const { tenants } = await getSDKForCurrentUser();
|
29
|
+
return await tenants.listUserTenants(userId);
|
30
|
+
});
|
31
|
+
|
32
|
+
|
33
|
+
const createTenantScheema = z.object({
|
34
|
+
id: z.string(),
|
35
|
+
name: z.string(),
|
36
|
+
slug: z.string()
|
37
|
+
});
|
38
|
+
|
39
|
+
export const createTenantAction = actionClient
|
40
|
+
.schema(createTenantScheema)
|
41
|
+
.action(async ({ parsedInput }) => {
|
42
|
+
const { id, name, slug } = parsedInput;
|
43
|
+
const { tenants } = await getSDKForCurrentUser();
|
44
|
+
//@ts-ignore
|
45
|
+
return await tenants.create({ $id: id, name: name, slug: slug });
|
46
|
+
});
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { AppcondaException, Client, Models, Payload } from "
|
2
|
-
import { ServiceClient } from "
|
1
|
+
import { AppcondaException, Client, Models, Payload } from "../../client";
|
2
|
+
import { ServiceClient } from "../../service-client";
|
3
3
|
|
4
4
|
export type TenantSimple = {
|
5
5
|
id: string;
|
@@ -11,9 +11,8 @@ export type TenantSimple = {
|
|
11
11
|
active: boolean;
|
12
12
|
};
|
13
13
|
|
14
|
-
export class
|
14
|
+
export class TenantService extends ServiceClient{
|
15
15
|
|
16
|
-
|
17
16
|
public getServiceName(): string {
|
18
17
|
return 'com.appconda.service.tenant';
|
19
18
|
}
|
package/tsconfig.json
CHANGED
@@ -6,7 +6,8 @@
|
|
6
6
|
"allowSyntheticDefaultImports": true,
|
7
7
|
"declaration": true,
|
8
8
|
"esModuleInterop": true,
|
9
|
-
"inlineSourceMap":
|
9
|
+
"inlineSourceMap": true,
|
10
|
+
"inlineSources": true,
|
10
11
|
"lib": ["ESNext", "DOM"],
|
11
12
|
"listEmittedFiles": false,
|
12
13
|
"listFiles": false,
|
@@ -18,6 +19,8 @@
|
|
18
19
|
"traceResolution": false,
|
19
20
|
"experimentalDecorators": true,
|
20
21
|
"emitDecoratorMetadata": true,
|
22
|
+
"strictNullChecks": true,
|
23
|
+
"exactOptionalPropertyTypes": true,
|
21
24
|
"outDir": "./dist",
|
22
25
|
"paths": {
|
23
26
|
"next-safe-action": ["./node_modules/next-safe-action/index.d.ts"]
|
package/dist/actions/nodes.d.ts
DELETED
package/dist/actions/nodes.js
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
'use server';
|
2
|
-
import { actionClient } from "./actionClient";
|
3
|
-
import { getSDKForCurrentUser } from '../getSDKForCurrentUser';
|
4
|
-
export const getAllNodesAction = actionClient
|
5
|
-
// .schema(listModelsSchema)
|
6
|
-
.action(async ({ parsedInput }) => {
|
7
|
-
try {
|
8
|
-
const { node } = await getSDKForCurrentUser();
|
9
|
-
return await node.GetAllNodes();
|
10
|
-
}
|
11
|
-
catch (error) {
|
12
|
-
console.error('Error in getAllNodesAction:', error);
|
13
|
-
throw new Error('Failed to fetch nodes');
|
14
|
-
}
|
15
|
-
});
|
@@ -1,7 +0,0 @@
|
|
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 = {}));
|
@@ -1,41 +0,0 @@
|
|
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
|
-
}
|
@@ -1,42 +0,0 @@
|
|
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 = {}));
|