@metad/contracts 3.6.2 → 3.6.7

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 (287) hide show
  1. package/.babelrc +5 -0
  2. package/.eslintrc.json +18 -0
  3. package/babel.config.json +1 -0
  4. package/index.cjs.js +5 -4233
  5. package/jest.config.ts +16 -0
  6. package/package.json +2 -2
  7. package/project.json +53 -0
  8. package/src/agent/{ai-model.d.ts → ai-model.ts} +2 -2
  9. package/src/agent/graph.ts +275 -0
  10. package/src/agent/index.ts +5 -0
  11. package/src/agent/token.ts +23 -0
  12. package/src/agent/utils.spec.ts +283 -0
  13. package/src/agent/utils.ts +122 -0
  14. package/src/agent/variables.ts +66 -0
  15. package/src/ai/ai-model.model.ts +232 -0
  16. package/src/ai/ai-provider.model.ts +53 -0
  17. package/src/ai/ai.model.ts +87 -0
  18. package/src/ai/chat-message-feedback.model.ts +31 -0
  19. package/src/ai/chat-message.model.ts +277 -0
  20. package/src/ai/chat.model.ts +207 -0
  21. package/src/ai/copilot-checkpoint.model.ts +25 -0
  22. package/src/ai/copilot-example.model.ts +23 -0
  23. package/src/ai/copilot-model.model.ts +31 -0
  24. package/src/ai/copilot-organization.model.ts +21 -0
  25. package/src/ai/copilot-provider.model.ts +46 -0
  26. package/src/ai/copilot-role.model.ts +48 -0
  27. package/src/ai/copilot-store.model.ts +34 -0
  28. package/src/ai/copilot-user.model.ts +24 -0
  29. package/src/ai/copilot.model.ts +47 -0
  30. package/src/ai/{environment.model.d.ts → environment.model.ts} +12 -10
  31. package/src/ai/feature.model.ts +6 -0
  32. package/src/ai/index.ts +40 -0
  33. package/src/ai/knowledge-doc-chunk.model.ts +123 -0
  34. package/src/ai/knowledge-doc-chunk.spec.ts +47 -0
  35. package/src/ai/knowledge-doc-page.model.ts +20 -0
  36. package/src/ai/knowledge-doc.model.ts +364 -0
  37. package/src/ai/knowledge-pipeline.ts +138 -0
  38. package/src/ai/knowledge-retrieval-log.model.ts +19 -0
  39. package/src/ai/knowledgebase-task.model.ts +46 -0
  40. package/src/ai/knowledgebase.model.ts +205 -0
  41. package/src/ai/rag-web.ts +54 -0
  42. package/src/ai/rag.ts +24 -0
  43. package/src/ai/role-permissions.ts +13 -0
  44. package/src/ai/types.ts +83 -0
  45. package/src/ai/xpert-agent-execution.model.ts +115 -0
  46. package/src/ai/xpert-agent.model.ts +264 -0
  47. package/src/ai/xpert-project.model.ts +103 -0
  48. package/src/ai/xpert-table.model.ts +100 -0
  49. package/src/ai/xpert-task.model.ts +32 -0
  50. package/src/ai/xpert-template.model.ts +53 -0
  51. package/src/ai/xpert-tool-mcp.model.ts +77 -0
  52. package/src/ai/xpert-tool.model.ts +216 -0
  53. package/src/ai/xpert-toolset.model.ts +220 -0
  54. package/src/ai/xpert-workflow-task.prompt.ts +71 -0
  55. package/src/ai/xpert-workflow.model.ts +502 -0
  56. package/src/ai/xpert-workspace.model.ts +42 -0
  57. package/src/ai/xpert.model.ts +637 -0
  58. package/src/ai/xpert.utils.ts +214 -0
  59. package/src/analytics/ai.ts +79 -0
  60. package/src/analytics/approval-policy.model.ts +40 -0
  61. package/src/analytics/business-area-user.model.ts +43 -0
  62. package/src/analytics/business-area.ts +20 -0
  63. package/src/analytics/certification.model.ts +12 -0
  64. package/src/analytics/chatbi-conversation.model.ts +16 -0
  65. package/src/analytics/chatbi-model.model.ts +22 -0
  66. package/src/analytics/collection.model.ts +8 -0
  67. package/src/analytics/comment.model.ts +14 -0
  68. package/src/analytics/data-source-type.ts +19 -0
  69. package/src/analytics/data-source.ts +72 -0
  70. package/src/analytics/favorite.ts +18 -0
  71. package/src/analytics/features.ts +19 -0
  72. package/src/analytics/feed-model.ts +15 -0
  73. package/src/analytics/gateway.ts +31 -0
  74. package/src/analytics/index.ts +39 -0
  75. package/src/analytics/indicator-app.ts +49 -0
  76. package/src/analytics/{indicator-market.d.ts → indicator-market.ts} +6 -2
  77. package/src/analytics/indicator.ts +143 -0
  78. package/src/analytics/model-query-log.model.ts +45 -0
  79. package/src/analytics/model-query.ts +22 -0
  80. package/src/analytics/{notification-destination.d.ts → notification-destination.ts} +9 -5
  81. package/src/analytics/{permission-approval-user.model.d.ts → permission-approval-user.model.ts} +10 -8
  82. package/src/analytics/permission-approval.model.ts +58 -0
  83. package/src/analytics/project.model.ts +56 -0
  84. package/src/analytics/role-permissions.ts +36 -0
  85. package/src/analytics/schema.ts +300 -0
  86. package/src/analytics/screenshot.model.ts +28 -0
  87. package/src/analytics/semantic-model-entity.ts +50 -0
  88. package/src/analytics/semantic-model-member.ts +49 -0
  89. package/src/analytics/semantic-model.ts +237 -0
  90. package/src/analytics/{story-point.d.ts → story-point.ts} +11 -6
  91. package/src/analytics/story-template.model.ts +34 -0
  92. package/src/analytics/story-widget.ts +15 -0
  93. package/src/analytics/story.ts +109 -0
  94. package/src/analytics/subscription.ts +43 -0
  95. package/src/analytics/visit.model.ts +39 -0
  96. package/src/analytics/webSocket.ts +53 -0
  97. package/src/api-key.model.ts +11 -0
  98. package/src/base-entity.model.ts +34 -0
  99. package/src/contact.model.ts +45 -0
  100. package/src/core.model.ts +103 -0
  101. package/src/{country.model.d.ts → country.model.ts} +3 -2
  102. package/src/currency.model.ts +582 -0
  103. package/src/{custom-smtp.model.d.ts → custom-smtp.model.ts} +21 -17
  104. package/src/date-picker.model.ts +5 -0
  105. package/src/email-template.model.ts +50 -0
  106. package/src/email.model.ts +46 -0
  107. package/src/employee.model.ts +199 -0
  108. package/src/entity-with-members.model.ts +16 -0
  109. package/src/feature.model.ts +108 -0
  110. package/src/file-provider.ts +37 -0
  111. package/src/help-center-article.model.ts +35 -0
  112. package/src/help-center.model.ts +33 -0
  113. package/src/http-status.enum.ts +58 -0
  114. package/src/import-export.model.ts +42 -0
  115. package/src/index.ts +60 -0
  116. package/src/integration/dify.ts +31 -0
  117. package/src/integration/dingtalk.ts +16 -0
  118. package/src/integration/fastgpt.ts +32 -0
  119. package/src/integration/firecrawl.ts +46 -0
  120. package/src/integration/github.ts +149 -0
  121. package/src/integration/index.ts +15 -0
  122. package/src/integration/lark.ts +79 -0
  123. package/src/integration/wecom.ts +16 -0
  124. package/src/integration.model.ts +119 -0
  125. package/src/invite.model.ts +144 -0
  126. package/src/language.model.ts +22 -0
  127. package/src/organization-contact.model.ts +84 -0
  128. package/src/{organization-department.model.d.ts → organization-department.model.ts} +16 -10
  129. package/src/organization-language.model.ts +24 -0
  130. package/src/organization-projects.model.ts +99 -0
  131. package/src/organization-team-employee-model.ts +14 -0
  132. package/src/organization-team-model.ts +25 -0
  133. package/src/organization.model.ts +266 -0
  134. package/src/{password-reset.model.d.ts → password-reset.model.ts} +14 -10
  135. package/src/{plain-object.model.d.ts → plain-object.model.ts} +1 -1
  136. package/src/plugin.ts +15 -0
  137. package/src/role-permission.model.ts +123 -0
  138. package/src/role.model.ts +31 -0
  139. package/src/schedule.ts +71 -0
  140. package/src/secret-token.model.ts +15 -0
  141. package/src/seed.model.ts +50 -0
  142. package/src/storage-file.model.ts +46 -0
  143. package/src/tag-entity.model.ts +23 -0
  144. package/src/tenant.model.ts +52 -0
  145. package/src/tools/index.ts +1 -0
  146. package/src/tools/sandbox.ts +5 -0
  147. package/src/translation.model.ts +37 -0
  148. package/src/types.ts +277 -0
  149. package/src/user-organization.model.ts +31 -0
  150. package/src/user.model.ts +151 -0
  151. package/src/visibility.model.ts +6 -0
  152. package/tsconfig.json +22 -0
  153. package/tsconfig.lib.json +10 -0
  154. package/tsconfig.spec.json +9 -0
  155. package/index.cjs.d.ts +0 -1
  156. package/index.esm.d.ts +0 -1
  157. package/index.esm.js +0 -4129
  158. package/src/agent/graph.d.ts +0 -148
  159. package/src/agent/index.d.ts +0 -5
  160. package/src/agent/token.d.ts +0 -21
  161. package/src/agent/utils.d.ts +0 -19
  162. package/src/agent/variables.d.ts +0 -14
  163. package/src/ai/ai-model.model.d.ts +0 -198
  164. package/src/ai/ai-provider.model.d.ts +0 -43
  165. package/src/ai/ai.model.d.ts +0 -82
  166. package/src/ai/chat-message-feedback.model.d.ts +0 -24
  167. package/src/ai/chat-message.model.d.ts +0 -222
  168. package/src/ai/chat.model.d.ts +0 -189
  169. package/src/ai/copilot-checkpoint.model.d.ts +0 -23
  170. package/src/ai/copilot-example.model.d.ts +0 -19
  171. package/src/ai/copilot-model.model.d.ts +0 -26
  172. package/src/ai/copilot-organization.model.d.ts +0 -17
  173. package/src/ai/copilot-provider.model.d.ts +0 -31
  174. package/src/ai/copilot-role.model.d.ts +0 -43
  175. package/src/ai/copilot-store.model.d.ts +0 -29
  176. package/src/ai/copilot-user.model.d.ts +0 -20
  177. package/src/ai/copilot.model.d.ts +0 -36
  178. package/src/ai/feature.model.d.ts +0 -6
  179. package/src/ai/index.d.ts +0 -39
  180. package/src/ai/knowledge-doc-chunk.model.d.ts +0 -60
  181. package/src/ai/knowledge-doc-page.model.d.ts +0 -15
  182. package/src/ai/knowledge-doc.model.d.ts +0 -192
  183. package/src/ai/knowledge-pipeline.d.ts +0 -107
  184. package/src/ai/knowledge-retrieval-log.model.d.ts +0 -10
  185. package/src/ai/knowledgebase-task.model.d.ts +0 -39
  186. package/src/ai/knowledgebase.model.d.ts +0 -162
  187. package/src/ai/rag-web.d.ts +0 -26
  188. package/src/ai/rag.d.ts +0 -24
  189. package/src/ai/role-permissions.d.ts +0 -13
  190. package/src/ai/types.d.ts +0 -39
  191. package/src/ai/xpert-agent-execution.model.d.ts +0 -96
  192. package/src/ai/xpert-agent.model.d.ts +0 -192
  193. package/src/ai/xpert-project.model.d.ts +0 -86
  194. package/src/ai/xpert-task.model.d.ts +0 -26
  195. package/src/ai/xpert-template.model.d.ts +0 -47
  196. package/src/ai/xpert-tool-mcp.model.d.ts +0 -67
  197. package/src/ai/xpert-tool.model.d.ts +0 -147
  198. package/src/ai/xpert-toolset.model.d.ts +0 -200
  199. package/src/ai/xpert-workflow-task.prompt.d.ts +0 -2
  200. package/src/ai/xpert-workflow.model.d.ts +0 -366
  201. package/src/ai/xpert-workspace.model.d.ts +0 -32
  202. package/src/ai/xpert.model.d.ts +0 -529
  203. package/src/ai/xpert.utils.d.ts +0 -80
  204. package/src/analytics/ai.d.ts +0 -73
  205. package/src/analytics/approval-policy.model.d.ts +0 -30
  206. package/src/analytics/business-area-user.model.d.ts +0 -35
  207. package/src/analytics/business-area.d.ts +0 -17
  208. package/src/analytics/certification.model.d.ts +0 -11
  209. package/src/analytics/chatbi-conversation.model.d.ts +0 -15
  210. package/src/analytics/chatbi-model.model.d.ts +0 -18
  211. package/src/analytics/collection.model.d.ts +0 -6
  212. package/src/analytics/comment.model.d.ts +0 -10
  213. package/src/analytics/data-source-type.d.ts +0 -16
  214. package/src/analytics/data-source.d.ts +0 -62
  215. package/src/analytics/favorite.d.ts +0 -14
  216. package/src/analytics/features.d.ts +0 -19
  217. package/src/analytics/feed-model.d.ts +0 -13
  218. package/src/analytics/gateway.d.ts +0 -27
  219. package/src/analytics/index.d.ts +0 -38
  220. package/src/analytics/indicator-app.d.ts +0 -44
  221. package/src/analytics/indicator.d.ts +0 -106
  222. package/src/analytics/model-query-log.model.d.ts +0 -41
  223. package/src/analytics/model-query.d.ts +0 -21
  224. package/src/analytics/permission-approval.model.d.ts +0 -47
  225. package/src/analytics/project.model.d.ts +0 -50
  226. package/src/analytics/role-permissions.d.ts +0 -25
  227. package/src/analytics/schema.d.ts +0 -262
  228. package/src/analytics/screenshot.model.d.ts +0 -25
  229. package/src/analytics/semantic-model-entity.d.ts +0 -37
  230. package/src/analytics/semantic-model-member.d.ts +0 -24
  231. package/src/analytics/semantic-model.d.ts +0 -175
  232. package/src/analytics/story-template.model.d.ts +0 -28
  233. package/src/analytics/story-widget.d.ts +0 -12
  234. package/src/analytics/story.d.ts +0 -93
  235. package/src/analytics/subscription.d.ts +0 -38
  236. package/src/analytics/visit.model.d.ts +0 -34
  237. package/src/analytics/webSocket.d.ts +0 -48
  238. package/src/api-key.model.d.ts +0 -10
  239. package/src/base-entity.model.d.ts +0 -27
  240. package/src/contact.model.d.ts +0 -41
  241. package/src/core.model.d.ts +0 -97
  242. package/src/currency.model.d.ts +0 -579
  243. package/src/date-picker.model.d.ts +0 -5
  244. package/src/email-template.model.d.ts +0 -39
  245. package/src/email.model.d.ts +0 -36
  246. package/src/employee.model.d.ts +0 -128
  247. package/src/entity-with-members.model.d.ts +0 -13
  248. package/src/feature.model.d.ts +0 -93
  249. package/src/file-provider.d.ts +0 -33
  250. package/src/help-center-article.model.d.ts +0 -0
  251. package/src/help-center.model.d.ts +0 -0
  252. package/src/http-status.enum.d.ts +0 -57
  253. package/src/import-export.model.d.ts +0 -36
  254. package/src/index.d.ts +0 -48
  255. package/src/integration/dify.d.ts +0 -0
  256. package/src/integration/dingtalk.d.ts +0 -2
  257. package/src/integration/fastgpt.d.ts +0 -0
  258. package/src/integration/firecrawl.d.ts +0 -2
  259. package/src/integration/github.d.ts +0 -69
  260. package/src/integration/index.d.ts +0 -4
  261. package/src/integration/lark.d.ts +0 -11
  262. package/src/integration/wecom.d.ts +0 -2
  263. package/src/integration.model.d.ts +0 -90
  264. package/src/invite.model.d.ts +0 -123
  265. package/src/language.model.d.ts +0 -19
  266. package/src/organization-contact.model.d.ts +0 -73
  267. package/src/organization-language.model.d.ts +0 -18
  268. package/src/organization-projects.model.d.ts +0 -80
  269. package/src/organization-team-employee-model.d.ts +0 -12
  270. package/src/organization-team-model.d.ts +0 -19
  271. package/src/organization.model.d.ts +0 -239
  272. package/src/plugin.d.ts +0 -13
  273. package/src/role-permission.model.d.ts +0 -61
  274. package/src/role.model.d.ts +0 -26
  275. package/src/schedule.d.ts +0 -27
  276. package/src/secret-token.model.d.ts +0 -11
  277. package/src/seed.model.d.ts +0 -37
  278. package/src/storage-file.model.d.ts +0 -40
  279. package/src/tag-entity.model.d.ts +0 -20
  280. package/src/tenant.model.d.ts +0 -40
  281. package/src/tools/index.d.ts +0 -1
  282. package/src/tools/sandbox.d.ts +0 -5
  283. package/src/translation.model.d.ts +0 -26
  284. package/src/types.d.ts +0 -241
  285. package/src/user-organization.model.d.ts +0 -24
  286. package/src/user.model.d.ts +0 -131
  287. package/src/visibility.model.d.ts +0 -6
@@ -0,0 +1,46 @@
1
+ import { IBasePerTenantAndOrganizationEntityModel } from './base-entity.model';
2
+ import {
3
+ IEmailTemplate,
4
+ IEmailTemplateFindInput
5
+ } from './email-template.model';
6
+ import { IUser } from './user.model';
7
+
8
+ export interface IEmail
9
+ extends IBasePerTenantAndOrganizationEntityModel {
10
+ name: string;
11
+ content: string;
12
+ email: string;
13
+ isArchived?: boolean;
14
+ user?: IUser;
15
+ userId?: string;
16
+ emailTemplate: IEmailTemplate;
17
+ emailTemplateId: string;
18
+ }
19
+
20
+ export interface IEmailUpdateInput
21
+ extends IBasePerTenantAndOrganizationEntityModel {
22
+ name?: string;
23
+ content?: string;
24
+ email?: string;
25
+ emailTemplate?: IEmailTemplate;
26
+ emailTemplateId?: string;
27
+ user?: IUser;
28
+ userId?: string;
29
+ isArchived?: boolean;
30
+ }
31
+
32
+ export interface IEmailFindInput
33
+ extends IBasePerTenantAndOrganizationEntityModel {
34
+ emailTemplate?: IEmailTemplateFindInput;
35
+ emailTemplateId?: string;
36
+ user?: IUser;
37
+ userId?: string;
38
+ email?: string;
39
+ isArchived?: boolean;
40
+ }
41
+
42
+ export interface DisplayEmail {
43
+ from: string;
44
+ to: string;
45
+ date: string;
46
+ }
@@ -0,0 +1,199 @@
1
+ import { IBasePerTenantAndOrganizationEntityModel } from './base-entity.model';
2
+ import { IContact } from './contact.model';
3
+ // import { IEmployeeJobsStatistics } from './employee-job.model';
4
+ // import { IOrganizationDepartment } from './organization-department.model';
5
+ // import { IOrganizationEmploymentType } from './organization-employment-type.model';
6
+ import { CrudActionEnum, IOrganizationFindInput } from './organization.model';
7
+ // import { IOrganizationPosition } from './organization-positions.model';
8
+ import { IOrganizationTeam } from './organization-team-model';
9
+ // import { IRequestApprovalEmployee } from './request-approval-employee.model';
10
+ // import { ISkill } from './skill-entity.model';
11
+ import { ITag } from './tag-entity.model';
12
+ import { IUser, IUserFindInput } from './user.model';
13
+ // import { IOrganizationContact } from './organization-contact.model';
14
+ // import { IOrganizationProject } from './organization-projects.model';
15
+ // import { IEmployeeSetting } from './employee-settings.model';
16
+ // import { IExpense } from './expense.model';
17
+ // import { ITimesheet } from './timesheet.model';
18
+
19
+ export interface IEmployee extends IBasePerTenantAndOrganizationEntityModel {
20
+ [x: string]: any;
21
+ endWork?: any;
22
+ startedWorkOn?: any;
23
+ user: IUser;
24
+ userId: string;
25
+ valueDate?: Date;
26
+ isActive: boolean;
27
+ short_description?: string;
28
+ description?: string;
29
+ teams?: IOrganizationTeam[];
30
+ payPeriod?: string;
31
+ billRateValue?: number;
32
+ billRateCurrency?: string;
33
+ reWeeklyLimit?: number;
34
+ // organizationDepartments?: IOrganizationDepartment[];
35
+ // organizationContacts?: IOrganizationContact[];
36
+ // projects?: IOrganizationProject[];
37
+ // organizationPosition?: IOrganizationPosition;
38
+ tags: ITag[];
39
+ // skills: ISkill[];
40
+ offerDate?: Date;
41
+ acceptDate?: Date;
42
+ rejectDate?: Date;
43
+ employeeLevel?: string;
44
+ anonymousBonus?: boolean;
45
+ // organizationEmploymentTypes?: IOrganizationEmploymentType[];
46
+ // requestApprovalEmployee?: IRequestApprovalEmployee[];
47
+ // settings?: IEmployeeSetting[];
48
+ // expenses?: IExpense[];
49
+ // timesheets?: ITimesheet[];
50
+ // contact: IContact;
51
+ // averageIncome?: number;
52
+ // totalWorkHours?: number;
53
+ // averageExpenses?: number;
54
+ // averageBonus?: number;
55
+ // show_anonymous_bonus?: boolean;
56
+ // show_average_bonus?: boolean;
57
+ // show_average_expenses?: boolean;
58
+ // show_average_income?: boolean;
59
+ // show_billrate?: boolean;
60
+ // show_payperiod?: boolean;
61
+ // isJobSearchActive?: boolean;
62
+ // linkedInUrl?: string;
63
+ // facebookUrl?: string;
64
+ // instagramUrl?: string;
65
+ // twitterUrl?: string;
66
+ // githubUrl?: string;
67
+ // gitlabUrl?: string;
68
+ // upworkUrl?: string;
69
+ // jobSuccess?: number;
70
+ // isVerified?: boolean;
71
+ // isVetted?: boolean;
72
+ // totalJobs?: number;
73
+ // fullName?: string;
74
+ }
75
+
76
+ // export type IEmployeeJobsStatisticsResponse = IEmployee &
77
+ // IEmployeeJobsStatistics;
78
+
79
+ export interface UpdateEmployeeJobsStatistics {
80
+ isJobSearchActive?: boolean;
81
+ }
82
+
83
+ export interface IEmployeeFindInput {
84
+ id?: string;
85
+ organization?: IOrganizationFindInput;
86
+ user?: IUserFindInput;
87
+ valueDate?: Date;
88
+ organizationId?: string;
89
+ tenantId?: string;
90
+ tags?: ITag[];
91
+ // skills?: ISkill[];
92
+ }
93
+
94
+ export interface IEmployeeUpdateInput
95
+ extends IBasePerTenantAndOrganizationEntityModel {
96
+ payPeriod?: string;
97
+ billRateValue?: number;
98
+ billRateCurrency?: string;
99
+ reWeeklyLimit?: number;
100
+ // organizationDepartment?: IOrganizationDepartment;
101
+ // organizationPosition?: IOrganizationPosition;
102
+ offerDate?: Date;
103
+ acceptDate?: Date;
104
+ rejectDate?: Date;
105
+ short_description?: string;
106
+ description?: string;
107
+ averageIncome?: number;
108
+ averageExpenses?: number;
109
+ averageBonus?: number;
110
+ // skills?: ISkill[];
111
+ isJobSearchActive?: boolean;
112
+ contact?: IContact;
113
+ linkedInUrl?: string;
114
+ facebookUrl?: string;
115
+ instagramUrl?: string;
116
+ twitterUrl?: string;
117
+ githubUrl?: string;
118
+ gitlabUrl?: string;
119
+ upworkUrl?: string;
120
+ }
121
+
122
+ export interface IEmployeeCreateInput
123
+ extends IBasePerTenantAndOrganizationEntityModel {
124
+ user: IUser;
125
+ password?: string;
126
+ offerDate?: Date;
127
+ acceptDate?: Date;
128
+ rejectDate?: Date;
129
+ members?: IEmployee[];
130
+ tags?: ITag[];
131
+ // skills?: ISkill[];
132
+ startedWorkOn?: any;
133
+ short_description?: string;
134
+ description?: string;
135
+ originalUrl?: string;
136
+ isActive?: boolean;
137
+ }
138
+
139
+ export interface ISelectedEmployee {
140
+ id: string;
141
+ firstName: string;
142
+ lastName: string;
143
+ fullName?: string;
144
+ imageUrl: string;
145
+ defaultType?: DEFAULT_TYPE;
146
+ tags?: ITag[];
147
+ // skills?: ISkill[];
148
+ }
149
+
150
+ export enum DEFAULT_TYPE {
151
+ ALL_EMPLOYEE = 'ALL_EMPLOYEE',
152
+ NO_EMPLOYEE = 'NO_EMPLOYEE'
153
+ }
154
+
155
+ export enum PayPeriodEnum {
156
+ NONE = 'NONE',
157
+ BI_WEEKLY = 'BI_WEEKLY',
158
+ WEEKLY = 'WEEKLY',
159
+ TWICE_PER_MONTH = 'TWICE_PER_MONTH',
160
+ MONTHLY = 'MONTHLY'
161
+ }
162
+ export interface IEmployeeLevel
163
+ extends IBasePerTenantAndOrganizationEntityModel {
164
+ level: string;
165
+ tag?: ITag[];
166
+ // skills?: ISkill[];
167
+ }
168
+
169
+ export interface IEmployeeLevelInput
170
+ extends IBasePerTenantAndOrganizationEntityModel {
171
+ level: string;
172
+ tags?: ITag[];
173
+ // skills?: ISkill[];
174
+ }
175
+
176
+ export interface IEmployeeLevelFindInput {
177
+ organizationId?: string;
178
+ tenantId: string;
179
+ }
180
+ export interface EmployeeViewModel {
181
+ fullName: string;
182
+ email: string;
183
+ bonus?: number;
184
+ endWork?: any;
185
+ id: string;
186
+ imageUrl?: string;
187
+ averageIncome?: number;
188
+ averageExpenses?: number;
189
+ averageBonus?: number;
190
+ workStatus?: string;
191
+ startedWorkOn?: string;
192
+ isActive?: boolean;
193
+ tags?: ITag[];
194
+ }
195
+
196
+ export interface IEmployeeStoreState {
197
+ employee: IEmployee | IEmployee[];
198
+ action: CrudActionEnum;
199
+ }
@@ -0,0 +1,16 @@
1
+ import { IEmployee } from './employee.model';
2
+ import { IBasePerTenantAndOrganizationEntityModel } from './base-entity.model';
3
+ import { ITag } from './tag-entity.model';
4
+
5
+ export interface IBaseEntityWithMembers
6
+ extends IBasePerTenantAndOrganizationEntityModel {
7
+ members?: IEmployee[];
8
+ name?: string;
9
+ tags?: ITag[];
10
+ }
11
+
12
+ export interface IEditEntityByMemberInput {
13
+ addedEntityIds?: string[];
14
+ removedEntityIds?: string[];
15
+ member: IEmployee;
16
+ }
@@ -0,0 +1,108 @@
1
+ import { IBasePerTenantAndOrganizationEntityModel } from './base-entity.model';
2
+
3
+ export interface IFeature extends IBasePerTenantAndOrganizationEntityModel {
4
+ code: string;
5
+ description: string;
6
+ featureOrganizations?: IFeatureOrganization[];
7
+ image?: string;
8
+ readonly imageUrl?: string;
9
+ link: string;
10
+ name: string;
11
+ status: string;
12
+ icon: string;
13
+ isEnabled?: boolean;
14
+ isPaid?: boolean;
15
+ readonly parentId?: string;
16
+ parent?: IFeature;
17
+ children?: IFeature[];
18
+ }
19
+ export interface IFeatureCreateInput extends IFeature {
20
+ isEnabled: boolean;
21
+ }
22
+
23
+ export interface IFeatureOrganization
24
+ extends IBasePerTenantAndOrganizationEntityModel {
25
+ feature: IFeature;
26
+ featureId?: string;
27
+ isEnabled: boolean;
28
+ }
29
+
30
+ export interface IFeatureOrganizationUpdateInput
31
+ extends IBasePerTenantAndOrganizationEntityModel {
32
+ featureId: string;
33
+ isEnabled: boolean;
34
+ }
35
+
36
+ export interface IFeatureOrganizationFindInput
37
+ extends IBasePerTenantAndOrganizationEntityModel {
38
+ featureId?: string;
39
+ }
40
+
41
+ export enum FeatureStatusEnum {
42
+ INFO = 'info',
43
+ PRIMARY = 'primary',
44
+ SUCCESS = 'success',
45
+ WARNING = 'warning'
46
+ }
47
+
48
+ export enum IFeatureToggleTypeEnum {
49
+ RELEASE = 'release',
50
+ KILL_SWITCH = 'kill-switch',
51
+ EXPERIMENT = 'experiment',
52
+ OPERATIONAL = 'operational',
53
+ PERMISSION = 'permission'
54
+ }
55
+
56
+ export interface IFeatureToggleVariant {
57
+ name?: string;
58
+ weight?: number;
59
+ weightType?: string;
60
+ payload?: IFeatureTogglePayload;
61
+ overrides?: IFeatureToggleOverride[];
62
+ }
63
+
64
+ export interface IFeatureToggleOverride {
65
+ contextName?: string;
66
+ values?: string[];
67
+ }
68
+
69
+ export interface IFeatureTogglePayload {
70
+ type?: string;
71
+ value?: string;
72
+ }
73
+
74
+ export interface IFeatureToggle {
75
+ name: string;
76
+ description?: string;
77
+ type: IFeatureToggleTypeEnum;
78
+ project?: string;
79
+ enabled: boolean;
80
+ stale?: boolean;
81
+ strategies?: any;
82
+ variants?: IFeatureToggleVariant[];
83
+ createdAt?: string;
84
+ lastSeenAt?: string | null;
85
+ }
86
+
87
+ export enum FeatureEnum {
88
+ FEATURE_HOME = 'FEATURE_HOME',
89
+ FEATURE_DASHBOARD = 'FEATURE_DASHBOARD',
90
+ FEATURE_JOB = 'FEATURE_JOB',
91
+ FEATURE_EMPLOYEES = 'FEATURE_EMPLOYEES',
92
+ FEATURE_MANAGE_INVITE = 'FEATURE_MANAGE_INVITE',
93
+ FEATURE_ORGANIZATION = 'FEATURE_ORGANIZATION',
94
+ FEATURE_ORGANIZATION_TAG = 'FEATURE_ORGANIZATION_TAG',
95
+ FEATURE_ORGANIZATION_PROJECT = 'FEATURE_ORGANIZATION_PROJECT',
96
+ FEATURE_CONTACT = 'FEATURE_CONTACT',
97
+ FEATURE_USER = 'FEATURE_USER',
98
+ FEATURE_ORGANIZATIONS = 'FEATURE_ORGANIZATIONS',
99
+ // FEATURE_APP_INTEGRATION = 'FEATURE_APP_INTEGRATION',
100
+ FEATURE_SETTING = 'FEATURE_SETTING',
101
+ FEATURE_EMAIL_HISTORY = 'FEATURE_EMAIL_HISTORY',
102
+ FEATURE_EMAIL_TEMPLATE = 'FEATURE_EMAIL_TEMPLATE',
103
+ FEATURE_FILE_STORAGE = 'FEATURE_FILE_STORAGE',
104
+ FEATURE_SMS_GATEWAY = 'FEATURE_SMS_GATEWAY',
105
+ FEATURE_SMTP = 'FEATURE_SMTP',
106
+ FEATURE_ROLES_PERMISSION = 'FEATURE_ROLES_PERMISSION',
107
+ FEATURE_INTEGRATION = 'FEATURE_INTEGRATION',
108
+ }
@@ -0,0 +1,37 @@
1
+ export interface FileStorageOption {
2
+ dest: string | CallableFunction;
3
+ provider?: FileStorageProviderEnum;
4
+ prefix?: string;
5
+ filename?: string | CallableFunction;
6
+ }
7
+
8
+ export interface FileSystem {
9
+ rootPath: string;
10
+ baseUrl?: string;
11
+ }
12
+
13
+ export enum FileStorageProviderEnum {
14
+ LOCAL = 'LOCAL',
15
+ S3 = 'S3',
16
+ WASABI = 'WASABI',
17
+ OSS = 'OSS', // 阿里云对象存储 OSS(Object Storage Service)
18
+ }
19
+
20
+ export interface UploadedFile {
21
+ fieldname: string;
22
+ key: string; // path of the file in storage
23
+ originalname: string; // orignal file name
24
+ size: number; // files in bytes
25
+ encoding?: string;
26
+ mimetype?: string;
27
+ filename: string;
28
+ url: string; // file public url
29
+ path: string; // Full path of the file
30
+ }
31
+
32
+ export interface S3FileStorageProviderConfig {
33
+ aws_access_key_id?: string;
34
+ aws_secret_access_key?: string;
35
+ aws_default_region?: string;
36
+ aws_bucket?: string;
37
+ }
@@ -0,0 +1,35 @@
1
+ // import { IBasePerTenantAndOrganizationEntityModel } from './base-entity.model';
2
+ // import { IEmployee } from './employee.model';
3
+
4
+ // export interface IHelpCenterArticle
5
+ // extends IBasePerTenantAndOrganizationEntityModel {
6
+ // name: string;
7
+ // description: string;
8
+ // data: string;
9
+ // index: number;
10
+ // draft: boolean;
11
+ // privacy: boolean;
12
+ // categoryId: string;
13
+ // employees?: IEmployee[];
14
+ // authors?: IHelpCenterAuthor[];
15
+ // }
16
+
17
+ // export interface IHelpCenterAuthor
18
+ // extends IBasePerTenantAndOrganizationEntityModel {
19
+ // articleId: string;
20
+ // article?: IHelpCenterArticle;
21
+ // employeeId: string;
22
+ // employee?: IEmployee;
23
+ // articles?: IHelpCenterArticle[];
24
+ // }
25
+
26
+ // export interface IHelpCenterAuthorCreate
27
+ // extends IBasePerTenantAndOrganizationEntityModel {
28
+ // articleId: string;
29
+ // employeeIds: string[];
30
+ // }
31
+
32
+ // export interface IHelpCenterAuthorFind
33
+ // extends IBasePerTenantAndOrganizationEntityModel {
34
+ // id?: string;
35
+ // }
@@ -0,0 +1,33 @@
1
+ // import { IHelpCenterArticle } from './help-center-article.model';
2
+ // import { IBasePerTenantAndOrganizationEntityModel } from './base-entity.model';
3
+
4
+ // export interface IHelpCenter extends IBasePerTenantAndOrganizationEntityModel {
5
+ // name: string;
6
+ // icon: string;
7
+ // flag: string;
8
+ // privacy: string;
9
+ // language: string;
10
+ // color: string;
11
+ // description?: string;
12
+ // data?: string;
13
+ // index: number;
14
+ // children?: IHelpCenter[];
15
+ // parent?: IHelpCenter;
16
+ // article?: IHelpCenterArticle[];
17
+ // parentId?: string;
18
+ // }
19
+
20
+ // export interface IHelpCenterFind
21
+ // extends IBasePerTenantAndOrganizationEntityModel {
22
+ // id?: string;
23
+ // }
24
+
25
+ // export enum HelpCenterActionEnum {
26
+ // ADD = 'add',
27
+ // EDIT = 'edit'
28
+ // }
29
+
30
+ // export enum HelpCenterFlagEnum {
31
+ // BASE = 'base',
32
+ // CATEGORY = 'category'
33
+ // }
@@ -0,0 +1,58 @@
1
+ export enum HttpStatus {
2
+ CONTINUE = 100,
3
+ SWITCHING_PROTOCOLS = 101,
4
+ PROCESSING = 102,
5
+ OK = 200,
6
+ CREATED = 201,
7
+ ACCEPTED = 202,
8
+ NON_AUTHORITATIVE_INFORMATION = 203,
9
+ NO_CONTENT = 204,
10
+ RESET_CONTENT = 205,
11
+ PARTIAL_CONTENT = 206,
12
+ AMBIGUOUS = 300,
13
+ MOVED_PERMANENTLY = 301,
14
+ FOUND = 302,
15
+ SEE_OTHER = 303,
16
+ NOT_MODIFIED = 304,
17
+ TEMPORARY_REDIRECT = 307,
18
+ PERMANENT_REDIRECT = 308,
19
+ BAD_REQUEST = 400,
20
+ UNAUTHORIZED = 401,
21
+ PAYMENT_REQUIRED = 402,
22
+ FORBIDDEN = 403,
23
+ NOT_FOUND = 404,
24
+ METHOD_NOT_ALLOWED = 405,
25
+ NOT_ACCEPTABLE = 406,
26
+ PROXY_AUTHENTICATION_REQUIRED = 407,
27
+ REQUEST_TIMEOUT = 408,
28
+ CONFLICT = 409,
29
+ GONE = 410,
30
+ LENGTH_REQUIRED = 411,
31
+ PRECONDITION_FAILED = 412,
32
+ PAYLOAD_TOO_LARGE = 413,
33
+ URI_TOO_LONG = 414,
34
+ UNSUPPORTED_MEDIA_TYPE = 415,
35
+ REQUESTED_RANGE_NOT_SATISFIABLE = 416,
36
+ EXPECTATION_FAILED = 417,
37
+ I_AM_A_TEAPOT = 418,
38
+ UNPROCESSABLE_ENTITY = 422,
39
+ FAILED_DEPENDENCY = 424,
40
+ TOO_MANY_REQUESTS = 429,
41
+ INTERNAL_SERVER_ERROR = 500,
42
+ NOT_IMPLEMENTED = 501,
43
+ BAD_GATEWAY = 502,
44
+ SERVICE_UNAVAILABLE = 503,
45
+ GATEWAY_TIMEOUT = 504,
46
+ HTTP_VERSION_NOT_SUPPORTED = 505
47
+ }
48
+
49
+ export enum RequestMethodEnum {
50
+ GET = 'GET',
51
+ POST = 'POST',
52
+ PUT = 'PUT',
53
+ DELETE = 'DELETE',
54
+ PATCH = 'PATCH',
55
+ ALL = 'ALL',
56
+ OPTIONS = 'OPTIONS',
57
+ HEAD = 'HEAD'
58
+ }
@@ -0,0 +1,42 @@
1
+ import { IBasePerTenantEntityModel } from "./base-entity.model";
2
+
3
+ export interface IImportRecord extends IBasePerTenantEntityModel {
4
+ entityType?: string;
5
+ sourceId?: string;
6
+ destinationId?: string;
7
+ importDate?: Date;
8
+ wasCreated?: boolean;
9
+ }
10
+
11
+ export interface IImportRecordFind extends IBasePerTenantEntityModel {
12
+ entityType?: string;
13
+ sourceId?: string;
14
+ destinationId?: string;
15
+ }
16
+
17
+ export interface IImportHistory extends IBasePerTenantEntityModel {
18
+ file: string;
19
+ path: string;
20
+ size: number;
21
+ status: string;
22
+ importDate?: Date;
23
+ }
24
+
25
+ export interface IEntityModel {
26
+ name: string;
27
+ value: string;
28
+ checked: boolean;
29
+ isGroup: boolean;
30
+ entities: IEntityModel[];
31
+ }
32
+
33
+ export enum ImportTypeEnum {
34
+ MERGE = 'merge',
35
+ CLEAN = 'clean',
36
+ }
37
+
38
+ export enum ImportHistoryStatusEnum {
39
+ SUCCESS = 'Success',
40
+ FAILED = 'Failed',
41
+ CANCELLED = 'Cancelled'
42
+ }
package/src/index.ts ADDED
@@ -0,0 +1,60 @@
1
+ export * from './types'
2
+ export * from './contact.model'
3
+ export * from './core.model'
4
+ export * from './country.model'
5
+ export * from './currency.model'
6
+
7
+ export * from './email-template.model'
8
+ export * from './email.model'
9
+
10
+ export * from './employee.model'
11
+ export * from './entity-with-members.model'
12
+
13
+ export * from './feature.model'
14
+ export * from './file-provider'
15
+
16
+ export * from './http-status.enum'
17
+
18
+ export * from './import-export.model'
19
+
20
+ export * from './language.model'
21
+ export * from './organization-contact.model'
22
+ export * from './organization-department.model'
23
+ export * from './organization-language.model'
24
+
25
+ export * from './organization-team-employee-model'
26
+ export * from './organization-team-model'
27
+ export * from './organization.model'
28
+
29
+ export * from './role-permission.model'
30
+ export * from './seed.model'
31
+
32
+ export * from './tag-entity.model'
33
+ export * from './tenant.model'
34
+
35
+ export * from './translation.model'
36
+
37
+ export type { IBasePerTenantAndOrganizationEntityModel, IBasePerTenantEntityModel, IBaseRelationsEntityModel } from './base-entity.model'
38
+ export type { IBaseEntityModel as BaseEntityModel } from './base-entity.model'
39
+ export * from './role.model'
40
+ export * from './user-organization.model'
41
+ export * from './user.model'
42
+
43
+ export * from './analytics/index'
44
+ export * from './custom-smtp.model'
45
+ export * from './date-picker.model'
46
+ export * from './integration.model'
47
+ export * from './invite.model'
48
+ export * from './organization-projects.model'
49
+ export * from './password-reset.model'
50
+ export * from './secret-token.model'
51
+ export * from './storage-file.model'
52
+ export * from './visibility.model'
53
+ export * from './integration/index'
54
+ export * from './ai/index'
55
+ export * from './agent/index'
56
+ export * from './api-key.model'
57
+ export * from './schedule'
58
+ export * from './tools/index'
59
+ export * from './plain-object.model'
60
+ export * from './plugin'
@@ -0,0 +1,31 @@
1
+ // import { IntegrationEnum, IntegrationFeatureEnum, TIntegrationProvider } from '../integration.model'
2
+
3
+ // export const IntegrationDifyProvider: TIntegrationProvider = {
4
+ // name: IntegrationEnum.Dify,
5
+ // label: {
6
+ // en_US: 'Dify',
7
+ // zh_Hans: 'Dify'
8
+ // },
9
+ // description: {
10
+ // en_US:
11
+ // 'Dify’s Knowledge feature visualizes each stage of the RAG pipeline, developers can upload internal company documents, FAQs, and standard working guides, then process them into structured data that large language models (LLMs) can query.',
12
+ // zh_Hans:
13
+ // 'Dify 的知识功能将 RAG 管道的每个阶段可视化,开发人员可以上传公司内部文档、常见问题解答和标准工作指南,然后将它们处理成大型语言模型 (LLM) 可以查询的结构化数据。'
14
+ // },
15
+ // avatar: 'dify.svg',
16
+ // schema: {
17
+ // type: 'object',
18
+ // properties: {
19
+ // url: {
20
+ // type: 'string',
21
+ // description: 'The url of Dify server',
22
+ // },
23
+ // apiKey: {
24
+ // type: 'string',
25
+ // description: 'The API Key of the Dify server'
26
+ // }
27
+ // }
28
+ // },
29
+ // features: [IntegrationFeatureEnum.KNOWLEDGE],
30
+ // helpUrl: 'https://docs.dify.ai/en/guides/knowledge-base/readme'
31
+ // }
@@ -0,0 +1,16 @@
1
+ import { IntegrationEnum, TIntegrationProvider } from '../integration.model'
2
+
3
+ export const IntegrationDingTalkProvider: TIntegrationProvider = {
4
+ name: IntegrationEnum.DINGTALK,
5
+ label: {
6
+ en_US: 'DingTalk',
7
+ zh_Hans: '钉钉'
8
+ },
9
+ avatar: 'dingtalk.svg',
10
+ webhook: true,
11
+ schema: {
12
+ type: 'object',
13
+ properties: {}
14
+ },
15
+ pro: true
16
+ }