@appconda/nextjs 1.0.404 → 1.0.406
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/getSDKForService.d.ts +2 -1
- package/dist/getSDKForService.js +4 -2
- package/dist/modules/builder/action.js +17 -17
- package/dist/modules/emploid/action.d.ts +6 -2
- package/dist/modules/emploid/action.js +57 -1
- package/dist/modules/emploid/schema.d.ts +27 -0
- package/dist/modules/emploid/schema.js +22 -1
- package/dist/modules/emploid/service.d.ts +6 -2
- package/dist/modules/emploid/service.js +13 -1
- package/dist/modules/emploid/types.d.ts +7 -0
- package/dist/modules/emploid/types.js +1 -1
- package/package.json +1 -1
- package/src/getSDKForService.ts +3 -1
- package/src/modules/builder/action.ts +16 -15
- package/src/modules/emploid/action.ts +62 -2
- package/src/modules/emploid/schema.ts +25 -0
- package/src/modules/emploid/service.ts +18 -2
- package/src/modules/emploid/types.ts +8 -0
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
import { z } from 'zod';
|
4
4
|
import { AppcondaException } from '../../client';
|
5
|
-
import { CreateAgentFlowSchema, CreateAssistantSchema, CreateCompetencySchema, CreateEmploidSchema, CreateExtensionSchema, CreateInputSchema, CreateJobDefinitionSchema, CreateOccupationSchema, CreateScopeSchema, CreateSkillSchema, CreateStreamIdSchema, CreateTeamSchema, CreateWorkerSchema, DeleteAssistantSchema, DeleteChatByIdSchema, DeleteCompetencySchema, DeleteDocumentsByIdAfterTimestampSchema, DeleteEmploidSchema, DeleteInputSchema, DeleteJobDefinitionSchema, DeleteMessagesByChatIdAfterTimestampSchema, DeleteOccupationSchema, DeleteScopeSchema, DeleteSkillSchema, DeleteTeamSchema, DeleteWorkerSchema, GetChatByIdSchema, GetChatsByUserIdSchema, GetDocumentByIdSchema, GetDocumentsByIdSchema, GetMessageByIdSchema, GetMessageCountByUserIdSchema, GetMessagesByChatIdSchema, GetStreamIdsByChatIdSchema, GetSuggestionsByDocumentIdSchema, GetVotesByChatIdSchema, ListAgentFlowsSchema, ListAssistantsSchema, ListCompetenciesSchema, ListEmploidsPaginatedSchema, ListEmploidsSchema, ListExtensionsSchema, ListInputSchema, ListJobDefinitionSchema, ListOccupationsSchema, ListScopesSchema, ListSkillsSchema, ListTeamsSchema, ListWorkersSchema, SaveChatSchema, SaveDocumentSchema, SaveMessagesSchema, SaveSuggestionsSchema, UpdateAssistantSchema, UpdateChatLastContextByIdSchema, UpdateChatVisiblityByIdSchema, UpdateCompetencySchema, UpdateEmploidSchema, UpdateInputSchema, UpdateJobDefinitionSchema, UpdateOccupationSchema, UpdateScopeSchema, UpdateSkillSchema, UpdateTeamSchema, UpdateWorkerSchema, VoteMessageSchema } from './schema';
|
6
|
-
import { TEmploid } from './types';
|
5
|
+
import { CreateAgentFlowSchema, CreateAssistantSchema, CreateCompetencySchema, CreateEmploidSchema, CreateExtensionSchema, CreateInputSchema, CreateInstructionSchema, CreateJobDefinitionSchema, CreateOccupationSchema, CreateScopeSchema, CreateSkillSchema, CreateStreamIdSchema, CreateTeamSchema, CreateWorkerSchema, DeleteAssistantSchema, DeleteChatByIdSchema, DeleteCompetencySchema, DeleteDocumentsByIdAfterTimestampSchema, DeleteEmploidSchema, DeleteInputSchema, DeleteInstructionSchema, DeleteJobDefinitionSchema, DeleteMessagesByChatIdAfterTimestampSchema, DeleteOccupationSchema, DeleteScopeSchema, DeleteSkillSchema, DeleteTeamSchema, DeleteWorkerSchema, GetChatByIdSchema, GetChatsByUserIdSchema, GetDocumentByIdSchema, GetDocumentsByIdSchema, GetMessageByIdSchema, GetMessageCountByUserIdSchema, GetMessagesByChatIdSchema, GetStreamIdsByChatIdSchema, GetSuggestionsByDocumentIdSchema, GetVotesByChatIdSchema, ListAgentFlowsSchema, ListAssistantsSchema, ListCompetenciesSchema, ListEmploidsPaginatedSchema, ListEmploidsSchema, ListExtensionsSchema, ListInputSchema, ListInstructionsSchema, ListJobDefinitionSchema, ListOccupationsSchema, ListScopesSchema, ListSkillsSchema, ListTeamsSchema, ListWorkersSchema, SaveChatSchema, SaveDocumentSchema, SaveMessagesSchema, SaveSuggestionsSchema, UpdateAssistantSchema, UpdateChatLastContextByIdSchema, UpdateChatVisiblityByIdSchema, UpdateCompetencySchema, UpdateEmploidSchema, UpdateInputSchema, UpdateInstructionSchema, UpdateJobDefinitionSchema, UpdateOccupationSchema, UpdateScopeSchema, UpdateSkillSchema, UpdateTeamSchema, UpdateWorkerSchema, VoteMessageSchema } from './schema';
|
6
|
+
import { TEmploid, TInstruction } from './types';
|
7
7
|
import { getSDKForService } from '../../getSDKForService';
|
8
8
|
|
9
9
|
export async function CreateEmploid(parsedInput: z.infer<typeof CreateEmploidSchema>): Promise<TEmploid> {
|
@@ -52,6 +52,66 @@ export const DeleteEmploid = async (parsedInput: z.infer<typeof DeleteEmploidSch
|
|
52
52
|
}
|
53
53
|
}
|
54
54
|
|
55
|
+
export const CreateInstruction = async (parsedInput: z.infer<typeof CreateInstructionSchema>): Promise<TInstruction> => {
|
56
|
+
try {
|
57
|
+
const { emploid } = await getSDKForService();
|
58
|
+
//@ts-ignore
|
59
|
+
const app = await emploid.CreateInstruction(parsedInput);
|
60
|
+
return app;
|
61
|
+
} catch (error) {
|
62
|
+
if (error instanceof AppcondaException) {
|
63
|
+
throw new Error(error.message);
|
64
|
+
}
|
65
|
+
|
66
|
+
throw error;
|
67
|
+
}
|
68
|
+
}
|
69
|
+
|
70
|
+
export const UpdateInstruction = async (parsedInput: z.infer<typeof UpdateInstructionSchema>): Promise<TInstruction> => {
|
71
|
+
try {
|
72
|
+
const { emploid } = await getSDKForService();
|
73
|
+
//@ts-ignore
|
74
|
+
const app = await emploid.UpdateInstruction(parsedInput);
|
75
|
+
return app;
|
76
|
+
} catch (error) {
|
77
|
+
if (error instanceof AppcondaException) {
|
78
|
+
throw new Error(error.message);
|
79
|
+
}
|
80
|
+
|
81
|
+
throw error;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
85
|
+
export const ListInstructions = async (parsedInput: z.infer<typeof ListInstructionsSchema>): Promise<TInstruction[]> => {
|
86
|
+
try {
|
87
|
+
const { emploid } = await getSDKForService();
|
88
|
+
//@ts-ignore
|
89
|
+
const app = await emploid.ListInstructions(parsedInput);
|
90
|
+
return app;
|
91
|
+
} catch (error) {
|
92
|
+
if (error instanceof AppcondaException) {
|
93
|
+
throw new Error(error.message);
|
94
|
+
}
|
95
|
+
|
96
|
+
throw error;
|
97
|
+
}
|
98
|
+
}
|
99
|
+
|
100
|
+
export const DeleteInstruction = async (parsedInput: z.infer<typeof DeleteInstructionSchema>): Promise<TInstruction> => {
|
101
|
+
try {
|
102
|
+
const { emploid } = await getSDKForService();
|
103
|
+
//@ts-ignore
|
104
|
+
const app = await emploid.DeleteInstruction(parsedInput);
|
105
|
+
return app;
|
106
|
+
} catch (error) {
|
107
|
+
if (error instanceof AppcondaException) {
|
108
|
+
throw new Error(error.message);
|
109
|
+
}
|
110
|
+
|
111
|
+
throw error;
|
112
|
+
}
|
113
|
+
}
|
114
|
+
|
55
115
|
|
56
116
|
export const ListEmploids = async (parsedInput: z.infer<typeof ListEmploidsSchema>) => {
|
57
117
|
try {
|
@@ -377,4 +377,29 @@ export const UpdateSkillSchema = z.object({
|
|
377
377
|
|
378
378
|
export const DeleteSkillSchema = z.object({
|
379
379
|
id: z.string(),
|
380
|
+
});
|
381
|
+
|
382
|
+
export const CreateInstructionSchema = z.object({
|
383
|
+
emploidId: z.string(),
|
384
|
+
content: z.string(),
|
385
|
+
type: z.enum(['USER', 'SYSTEM']),
|
386
|
+
active: z.boolean(),
|
387
|
+
});
|
388
|
+
|
389
|
+
export const ListInstructionsSchema = z.object({
|
390
|
+
type: z.string().optional(),
|
391
|
+
searchText: z.string().optional(),
|
392
|
+
active: z.boolean().optional(),
|
393
|
+
emploidId: z.string().optional()
|
394
|
+
});
|
395
|
+
|
396
|
+
export const UpdateInstructionSchema = z.object({
|
397
|
+
id: z.string(),
|
398
|
+
type: z.enum(['USER', 'SYSTEM']).optional(),
|
399
|
+
content: z.string().optional(),
|
400
|
+
active: z.boolean().optional(),
|
401
|
+
});
|
402
|
+
|
403
|
+
export const DeleteInstructionSchema = z.object({
|
404
|
+
id: z.string(),
|
380
405
|
});
|
@@ -3,8 +3,8 @@ import z from "zod";
|
|
3
3
|
import { ServiceClient } from "../../service-client";
|
4
4
|
|
5
5
|
|
6
|
-
import { CreateAgentFlowSchema, CreateAssistantSchema, CreateCompetencySchema, CreateEmploidSchema, CreateExtensionSchema, CreateInputSchema, CreateJobDefinitionSchema, CreateOccupationSchema, CreateScopeSchema, CreateSkillSchema, CreateStreamIdSchema, CreateTeamSchema, CreateWorkerSchema, DeleteAssistantSchema, DeleteChatByIdSchema, DeleteCompetencySchema, DeleteDocumentsByIdAfterTimestampSchema, DeleteEmploidSchema, DeleteInputSchema, DeleteJobDefinitionSchema, DeleteMessagesByChatIdAfterTimestampSchema, DeleteOccupationSchema, DeleteScopeSchema, DeleteSkillSchema, DeleteTeamSchema, DeleteWorkerSchema, GetChatByIdSchema, GetChatsByUserIdSchema, GetDocumentByIdSchema, GetDocumentsByIdSchema, GetMessageByIdSchema, GetMessageCountByUserIdSchema, GetMessagesByChatIdSchema, GetStreamIdsByChatIdSchema, GetSuggestionsByDocumentIdSchema, GetVotesByChatIdSchema, ListAgentFlowsSchema, ListAssistantsSchema, ListCompetenciesSchema, ListEmploidsPaginatedSchema, ListEmploidsSchema, ListExtensionsSchema, ListInputSchema, ListJobDefinitionSchema, ListOccupationsSchema, ListScopesSchema, ListSkillsSchema, ListTeamsSchema, ListWorkersSchema, SaveChatSchema, SaveDocumentSchema, SaveMessagesSchema, SaveSuggestionsSchema, UpdateAssistantSchema, UpdateChatLastContextByIdSchema, UpdateChatVisiblityByIdSchema, UpdateCompetencySchema, UpdateEmploidSchema, UpdateInputSchema, UpdateJobDefinitionSchema, UpdateOccupationSchema, UpdateScopeSchema, UpdateSkillSchema, UpdateTeamSchema, UpdateWorkerSchema, VoteMessageSchema } from "./schema";
|
7
|
-
import { TAgentFlow, TAssistant, TChat, TCompetency, TDocument, TEmploid, TExtension, TInput, TJobDefinition, TOccupation, TPaginatedEmploidsResult, TScope, TSkill, TStreamId, TTeam, TWorker } from "./types";
|
6
|
+
import { CreateAgentFlowSchema, CreateAssistantSchema, CreateCompetencySchema, CreateEmploidSchema, CreateExtensionSchema, CreateInputSchema, CreateInstructionSchema, CreateJobDefinitionSchema, CreateOccupationSchema, CreateScopeSchema, CreateSkillSchema, CreateStreamIdSchema, CreateTeamSchema, CreateWorkerSchema, DeleteAssistantSchema, DeleteChatByIdSchema, DeleteCompetencySchema, DeleteDocumentsByIdAfterTimestampSchema, DeleteEmploidSchema, DeleteInputSchema, DeleteInstructionSchema, DeleteJobDefinitionSchema, DeleteMessagesByChatIdAfterTimestampSchema, DeleteOccupationSchema, DeleteScopeSchema, DeleteSkillSchema, DeleteTeamSchema, DeleteWorkerSchema, GetChatByIdSchema, GetChatsByUserIdSchema, GetDocumentByIdSchema, GetDocumentsByIdSchema, GetMessageByIdSchema, GetMessageCountByUserIdSchema, GetMessagesByChatIdSchema, GetStreamIdsByChatIdSchema, GetSuggestionsByDocumentIdSchema, GetVotesByChatIdSchema, ListAgentFlowsSchema, ListAssistantsSchema, ListCompetenciesSchema, ListEmploidsPaginatedSchema, ListEmploidsSchema, ListExtensionsSchema, ListInputSchema, ListInstructionsSchema, ListJobDefinitionSchema, ListOccupationsSchema, ListScopesSchema, ListSkillsSchema, ListTeamsSchema, ListWorkersSchema, SaveChatSchema, SaveDocumentSchema, SaveMessagesSchema, SaveSuggestionsSchema, UpdateAssistantSchema, UpdateChatLastContextByIdSchema, UpdateChatVisiblityByIdSchema, UpdateCompetencySchema, UpdateEmploidSchema, UpdateInputSchema, UpdateInstructionSchema, UpdateJobDefinitionSchema, UpdateOccupationSchema, UpdateScopeSchema, UpdateSkillSchema, UpdateTeamSchema, UpdateWorkerSchema, VoteMessageSchema } from "./schema";
|
7
|
+
import { TAgentFlow, TAssistant, TChat, TCompetency, TDocument, TEmploid, TExtension, TInput, TInstruction, TJobDefinition, TOccupation, TPaginatedEmploidsResult, TScope, TSkill, TStreamId, TTeam, TWorker } from "./types";
|
8
8
|
|
9
9
|
export class EmploidService extends ServiceClient {
|
10
10
|
protected getServiceName(): string {
|
@@ -31,6 +31,22 @@ export class EmploidService extends ServiceClient {
|
|
31
31
|
return await this.actionCall('emploid', 'ListEmploidsPaginated', payload);
|
32
32
|
}
|
33
33
|
|
34
|
+
public async CreateInstruction(payload: z.infer<typeof CreateInstructionSchema>): Promise<TInstruction> {
|
35
|
+
return await this.actionCall('emploid', 'CreateInstruction', payload);
|
36
|
+
}
|
37
|
+
|
38
|
+
public async ListInstructions(payload: z.infer<typeof ListInstructionsSchema>): Promise<TInstruction[]> {
|
39
|
+
return await this.actionCall('emploid', 'ListInstructions', payload);
|
40
|
+
}
|
41
|
+
|
42
|
+
public async UpdateInstruction(payload: z.infer<typeof UpdateInstructionSchema>): Promise<TInstruction> {
|
43
|
+
return await this.actionCall('emploid', 'UpdateInstruction', payload);
|
44
|
+
}
|
45
|
+
|
46
|
+
public async DeleteInstruction(payload: z.infer<typeof DeleteInstructionSchema>): Promise<TInstruction> {
|
47
|
+
return await this.actionCall('emploid', 'DeleteInstruction', payload);
|
48
|
+
}
|
49
|
+
|
34
50
|
public async ListScopes(payload: z.infer<typeof ListScopesSchema>): Promise<TScope[]> {
|
35
51
|
return await this.actionCall('emploid', 'ListScopes', payload);
|
36
52
|
}
|