@appconda/sdk 1.0.628 → 1.0.629
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/modules/emploid/schema.d.ts +14 -0
- package/dist/modules/emploid/schema.js +15 -1
- package/dist/modules/emploid/service.d.ts +4 -1
- package/dist/modules/emploid/service.js +28 -1
- package/package.json +1 -1
- package/src/modules/emploid/schema.ts +16 -0
- package/src/modules/emploid/service.ts +45 -1
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@appconda/sdk",
|
|
3
3
|
"homepage": "https://appconda.io/support",
|
|
4
4
|
"description": "Appconda is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.629",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
@@ -824,6 +824,9 @@ export const ListCollectionsSchema = z.object({
|
|
|
824
824
|
dataModelId: z.string().optional(),
|
|
825
825
|
});
|
|
826
826
|
|
|
827
|
+
export const GetCollectionByIdSchema = z.object({
|
|
828
|
+
id: z.string(),
|
|
829
|
+
});
|
|
827
830
|
|
|
828
831
|
export const CreateRecordSchema = z.object({
|
|
829
832
|
tenantId: z.string(),
|
|
@@ -831,6 +834,19 @@ export const CreateRecordSchema = z.object({
|
|
|
831
834
|
data: z.object({}).catchall(z.any()),
|
|
832
835
|
});
|
|
833
836
|
|
|
837
|
+
export const UploadCollectionFileSchema = z.object({
|
|
838
|
+
tenantId: z.string(),
|
|
839
|
+
name: z.string(),
|
|
840
|
+
base64: z.string(),
|
|
841
|
+
mimeType: z.string().optional(),
|
|
842
|
+
collectionId: z.string().optional(),
|
|
843
|
+
itemId: z.string().optional(),
|
|
844
|
+
});
|
|
845
|
+
|
|
846
|
+
export const ResolveCollectionFileViewSchema = z.object({
|
|
847
|
+
itemId: z.string(),
|
|
848
|
+
});
|
|
849
|
+
|
|
834
850
|
export const GetRecordByIdSchema = z.object({
|
|
835
851
|
tenantId: z.string(),
|
|
836
852
|
collectionId: z.string(),
|
|
@@ -3,7 +3,7 @@ import z from "zod";
|
|
|
3
3
|
import { ServiceClient } from "../../service-client";
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
import { AggregateRecordsSchema, BulkCreateRecordsSchema, BulkDeleteRecordsSchema, BulkUpdateRecordsSchema, ChangeAgentflowProjectSchema, CheckRecordPermissionSchema, ConnectTrelloImportCredentialSchema, CountRecordsSchema, CreateAgentFlowFolderSchema, CreateAgentFlowSchema, CreateAssistantChannelSchema, CreateAssistantConstraintSchema, CreateAssistantDatasourceSchema, CreateAssistantInstructionSchema, CreateAssistantSchema, CreateAssistantSkillSchema, CreateChannelSchema, CreateCollectionAutomationRuleSchema, CreateCollectionButtonSchema, CreateCollectionFieldSchema, CreateCollectionRelationSchema, CreateCollectionSchema, CreateCollectionViewSchema, CreateCommandSchema, CreateCompetencySchema, CreateConstraintSchema, CreateDataModelSchema, CreateDatasourceSchema, CreateDomainTopicSchema, CreateDriveFolderSchema, CreateEmploidSchema, CreateExtensionSchema, CreateInputSchema, CreateInstructionSchema, CreateJobDefinitionSchema, CreateKnowledgeSchema, CreateOccupationSchema, CreateRecordSchema, CreateScopeSchema, CreateSkillSchema, CreateStreamIdSchema, CreateTaskTemplateSchema, CreateTeamSchema, CreateTopicSchema, CreateWikiCommentSchema, CreateWikiPageSchema, CreateWikiRevisionSchema, CreateWorkerSchema, CreateWorkerTopicSchema, DeleteAgentFlowFolderSchema, DeleteAgentFlowSchema, DeleteAssistantChannelSchema, DeleteAssistantDatasourceSchema, DeleteAssistantSchema, DeleteAssistantSkillSchema, DeleteChannelSchema, DeleteChatByIdSchema, DeleteCollectionAutomationRuleSchema, DeleteCollectionButtonSchema, DeleteCollectionFieldSchema, DeleteCollectionRelationSchema, DeleteCollectionViewSchema, DeleteCommandSchema, DeleteCompetencySchema, DeleteConstraintSchema, DeleteDataModelSchema, DeleteDatasourceSchema, DeleteDocumentsByIdAfterTimestampSchema, DeleteDomainTopicSchema, DeleteDriveItemSchema, DeleteEmploidSchema, DeleteExtensionSchema, DeleteInputSchema, DeleteInstructionSchema, DeleteJobDefinitionSchema, DeleteKnowledgeSchema, DeleteMessagesByChatIdAfterTimestampSchema, DeleteOccupationSchema, DeleteRecordSchema, DeleteScopeSchema, DeleteSkillSchema, DeleteTaskTemplateSchema, DeleteTeamSchema, DeleteTopicSchema, DeleteWikiCommentSchema, DeleteWikiPageSchema, DeleteWorkerSchema, DeleteWorkerTopicSchema, DistinctFieldValuesSchema, DuplicateAgentFlowSchema, DuplicateRecordSchema, EnhanceTopicSchema, EnsureAirtableImportCredentialSchema, EnsureGmailImportCredentialSchema, EnsureGithubImportCredentialSchema, EnsureJiraImportCredentialSchema, EnsureLinearImportCredentialSchema, EnsureNotionImportCredentialSchema, EnsureTrelloImportCredentialSchema, ExecuteCollectionAiFieldSchema, ExecuteCollectionButtonSchema, GetChatByIdSchema, GetChatsByUserIdSchema, GetCollectionSchemaSchema, GetDataModelByIdSchema, GetDocumentByIdSchema, GetDocumentsByIdSchema, GetDriveDeleteImpactSchema, GetLatestWikiRevisionSchema, GetMarketStoreItemSchema, GetMessageByIdSchema, GetMessageCountByUserIdSchema, GetMessagesByChatIdSchema, GetRecordByIdSchema, GetRecordRelationsSchema, GetScopeByTypeSchema, GetStreamIdsByChatIdSchema, GetSuggestionsByDocumentIdSchema, GetVotesByChatIdSchema, GetWikiPageByIdSchema, GetWikiPageBySlugSchema, GetWikiRevisionByIdSchema, GetWikiTreeSchema, GrantRecordPermissionSchema, GroupRecordsSchema, HardDeleteDataModelSchema, ListAgentFlowFoldersSchema, ListAgentFlowsSchema, ListAirtableImportSourcesSchema, ListAssistantChannelsSchema, ListAssistantConstraintsSchema, ListAssistantDatasourcesSchema, ListAssistantInstructionsSchema, ListAssistantSkillsSchema, ListAssistantsSchema, ListChannelsSchema, ListChatHistorySchema, ListCollectionAutomationRulesSchema, ListCollectionButtonsSchema, ListCollectionRelationsSchema, ListCollectionsSchema, ListCollectionViewsSchema, ListCommandsSchema, ListCompetenciesSchema, ListConstraintsSchema, ListDataModelsSchema, ListDatasourcesSchema, ListDomainTopicsSchema, ListDriveItemsSchema, ListDriveTreeSchema, ListEmploidsPaginatedSchema, ListEmploidsSchema, ListExtensionsSchema, ListGmailImportSourcesSchema, ListGithubImportSourcesSchema, ListInputSchema, ListInstructionsSchema, ListJiraImportSourcesSchema, ListJobDefinitionSchema, ListKnowledgesSchema, ListLinearImportSourcesSchema, ListMarketStoreItemsSchema, ListNotionImportSourcesSchema, ListOccupationsSchema, ListRecordPermissionsSchema, ListRecordsSchema, ListRelationCandidatesSchema, ListScopesSchema, ListSkillsSchema, ListTaskTemplatesSchema, ListTeamsSchema, ListTopicsSchema, ListTrelloImportSourcesSchema, ListWikiCommentsSchema, ListWikiPagesSchema, ListWorkersSchema, ListWorkerTopicsSchema, MoveDriveItemSchema, PrepareDriveUploadSchema, PreviewAirtableImportSchema, PreviewCsvImportSchema, PreviewGmailImportSchema, PreviewGithubImportSchema, PreviewJiraImportSchema, PreviewLinearImportSchema, PreviewNotionImportSchema, PreviewTrelloImportSchema, PreviewValidationErrorsSchema, PublishDomainSchema, PublishEmploidSchema, PublishWorkerToMarketStoreSchema, QueryRecordsSchema, RenameDriveItemSchema, ReorderCollectionFieldsSchema, ResolveDriveDownloadSchema, ResolveScopeFileViewSchema, ResolveWikiFileViewSchema, RestoreDataModelSchema, RestoreRecordSchema, RestoreWikiPageSchema, RevokeRecordPermissionSchema, RunAirtableImportSchema, RunCsvImportSchema, RunGmailImportSchema, RunGithubImportSchema, RunJiraImportSchema, RunLinearImportSchema, RunNotionImportSchema, RunTrelloImportSchema, SaveChatSchema, SaveDocumentSchema, SaveMessagesSchema, SaveSuggestionsSchema, SearchDriveItemsSchema, SearchRecordsSchema, UpdateAgentFlowFolderSchema, UpdateAgentFlowSchema, UpdateAssistantChannelSchema, UpdateAssistantDatasourceSchema, UpdateAssistantSchema, UpdateAssistantSkillSchema, UpdateChannelSchema, UpdateChatLastContextByIdSchema, UpdateChatVisiblityByIdSchema, UpdateCollectionAutomationRuleSchema, UpdateCollectionButtonSchema, UpdateCollectionFieldSchema, UpdateCollectionRelationSchema, UpdateCollectionViewSchema, UpdateCommandSchema, UpdateCompetencySchema, UpdateConstraintSchema, UpdateDataModelSchema, UpdateDatasourceSchema, UpdateDomainTopicSchema, UpdateEmploidSchema, UpdateInputSchema, UpdateInstructionSchema, UpdateJobDefinitionSchema, UpdateKnowledgeSchema, UpdateOccupationSchema, UpdateRecordSchema, UpdateScopeSchema, UpdateSkillSchema, UpdateTaskTemplateSchema, UpdateTeamSchema, UpdateTopicSchema, UpdateWikiCommentSchema, UpdateWikiPageSchema, UpdateWorkerSchema, UpdateWorkerTopicSchema, UploadEditorFileSchema, UpsertRecordSchema, ValidateRecordSchema, VoteMessageSchema } from "./schema";
|
|
6
|
+
import { AggregateRecordsSchema, BulkCreateRecordsSchema, BulkDeleteRecordsSchema, BulkUpdateRecordsSchema, ChangeAgentflowProjectSchema, CheckRecordPermissionSchema, ConnectTrelloImportCredentialSchema, CountRecordsSchema, CreateAgentFlowFolderSchema, CreateAgentFlowSchema, CreateAssistantChannelSchema, CreateAssistantConstraintSchema, CreateAssistantDatasourceSchema, CreateAssistantInstructionSchema, CreateAssistantSchema, CreateAssistantSkillSchema, CreateChannelSchema, CreateCollectionAutomationRuleSchema, CreateCollectionButtonSchema, CreateCollectionFieldSchema, CreateCollectionRelationSchema, CreateCollectionSchema, CreateCollectionViewSchema, CreateCommandSchema, CreateCompetencySchema, CreateConstraintSchema, CreateDataModelSchema, CreateDatasourceSchema, CreateDomainTopicSchema, CreateDriveFolderSchema, CreateEmploidSchema, CreateExtensionSchema, CreateInputSchema, CreateInstructionSchema, CreateJobDefinitionSchema, CreateKnowledgeSchema, CreateOccupationSchema, CreateRecordSchema, CreateScopeSchema, CreateSkillSchema, CreateStreamIdSchema, CreateTaskTemplateSchema, CreateTeamSchema, CreateTopicSchema, CreateWikiCommentSchema, CreateWikiPageSchema, CreateWikiRevisionSchema, CreateWorkerSchema, CreateWorkerTopicSchema, DeleteAgentFlowFolderSchema, DeleteAgentFlowSchema, DeleteAssistantChannelSchema, DeleteAssistantDatasourceSchema, DeleteAssistantSchema, DeleteAssistantSkillSchema, DeleteChannelSchema, DeleteChatByIdSchema, DeleteCollectionAutomationRuleSchema, DeleteCollectionButtonSchema, DeleteCollectionFieldSchema, DeleteCollectionRelationSchema, DeleteCollectionViewSchema, DeleteCommandSchema, DeleteCompetencySchema, DeleteConstraintSchema, DeleteDataModelSchema, DeleteDatasourceSchema, DeleteDocumentsByIdAfterTimestampSchema, DeleteDomainTopicSchema, DeleteDriveItemSchema, DeleteEmploidSchema, DeleteExtensionSchema, DeleteInputSchema, DeleteInstructionSchema, DeleteJobDefinitionSchema, DeleteKnowledgeSchema, DeleteMessagesByChatIdAfterTimestampSchema, DeleteOccupationSchema, DeleteRecordSchema, DeleteScopeSchema, DeleteSkillSchema, DeleteTaskTemplateSchema, DeleteTeamSchema, DeleteTopicSchema, DeleteWikiCommentSchema, DeleteWikiPageSchema, DeleteWorkerSchema, DeleteWorkerTopicSchema, DistinctFieldValuesSchema, DuplicateAgentFlowSchema, DuplicateRecordSchema, EnhanceTopicSchema, EnsureAirtableImportCredentialSchema, EnsureGmailImportCredentialSchema, EnsureGithubImportCredentialSchema, EnsureJiraImportCredentialSchema, EnsureLinearImportCredentialSchema, EnsureNotionImportCredentialSchema, EnsureTrelloImportCredentialSchema, ExecuteCollectionAiFieldSchema, ExecuteCollectionButtonSchema, GetChatByIdSchema, GetChatsByUserIdSchema, GetCollectionByIdSchema, GetCollectionSchemaSchema, GetDataModelByIdSchema, GetDocumentByIdSchema, GetDocumentsByIdSchema, GetDriveDeleteImpactSchema, GetLatestWikiRevisionSchema, GetMarketStoreItemSchema, GetMessageByIdSchema, GetMessageCountByUserIdSchema, GetMessagesByChatIdSchema, GetRecordByIdSchema, GetRecordRelationsSchema, GetScopeByTypeSchema, GetStreamIdsByChatIdSchema, GetSuggestionsByDocumentIdSchema, GetVotesByChatIdSchema, GetWikiPageByIdSchema, GetWikiPageBySlugSchema, GetWikiRevisionByIdSchema, GetWikiTreeSchema, GrantRecordPermissionSchema, GroupRecordsSchema, HardDeleteDataModelSchema, ListAgentFlowFoldersSchema, ListAgentFlowsSchema, ListAirtableImportSourcesSchema, ListAssistantChannelsSchema, ListAssistantConstraintsSchema, ListAssistantDatasourcesSchema, ListAssistantInstructionsSchema, ListAssistantSkillsSchema, ListAssistantsSchema, ListChannelsSchema, ListChatHistorySchema, ListCollectionAutomationRulesSchema, ListCollectionButtonsSchema, ListCollectionRelationsSchema, ListCollectionsSchema, ListCollectionViewsSchema, ListCommandsSchema, ListCompetenciesSchema, ListConstraintsSchema, ListDataModelsSchema, ListDatasourcesSchema, ListDomainTopicsSchema, ListDriveItemsSchema, ListDriveTreeSchema, ListEmploidsPaginatedSchema, ListEmploidsSchema, ListExtensionsSchema, ListGmailImportSourcesSchema, ListGithubImportSourcesSchema, ListInputSchema, ListInstructionsSchema, ListJiraImportSourcesSchema, ListJobDefinitionSchema, ListKnowledgesSchema, ListLinearImportSourcesSchema, ListMarketStoreItemsSchema, ListNotionImportSourcesSchema, ListOccupationsSchema, ListRecordPermissionsSchema, ListRecordsSchema, ListRelationCandidatesSchema, ListScopesSchema, ListSkillsSchema, ListTaskTemplatesSchema, ListTeamsSchema, ListTopicsSchema, ListTrelloImportSourcesSchema, ListWikiCommentsSchema, ListWikiPagesSchema, ListWorkersSchema, ListWorkerTopicsSchema, MoveDriveItemSchema, PrepareDriveUploadSchema, PreviewAirtableImportSchema, PreviewCsvImportSchema, PreviewGmailImportSchema, PreviewGithubImportSchema, PreviewJiraImportSchema, PreviewLinearImportSchema, PreviewNotionImportSchema, PreviewTrelloImportSchema, PreviewValidationErrorsSchema, PublishDomainSchema, PublishEmploidSchema, PublishWorkerToMarketStoreSchema, QueryRecordsSchema, RenameDriveItemSchema, ReorderCollectionFieldsSchema, ResolveCollectionFileViewSchema, ResolveDriveDownloadSchema, ResolveScopeFileViewSchema, ResolveWikiFileViewSchema, RestoreDataModelSchema, RestoreRecordSchema, RestoreWikiPageSchema, RevokeRecordPermissionSchema, RunAirtableImportSchema, RunCsvImportSchema, RunGmailImportSchema, RunGithubImportSchema, RunJiraImportSchema, RunLinearImportSchema, RunNotionImportSchema, RunTrelloImportSchema, SaveChatSchema, SaveDocumentSchema, SaveMessagesSchema, SaveSuggestionsSchema, SearchDriveItemsSchema, SearchRecordsSchema, UpdateAgentFlowFolderSchema, UpdateAgentFlowSchema, UpdateAssistantChannelSchema, UpdateAssistantDatasourceSchema, UpdateAssistantSchema, UpdateAssistantSkillSchema, UpdateChannelSchema, UpdateChatLastContextByIdSchema, UpdateChatVisiblityByIdSchema, UpdateCollectionAutomationRuleSchema, UpdateCollectionButtonSchema, UpdateCollectionFieldSchema, UpdateCollectionRelationSchema, UpdateCollectionViewSchema, UpdateCommandSchema, UpdateCompetencySchema, UpdateConstraintSchema, UpdateDataModelSchema, UpdateDatasourceSchema, UpdateDomainTopicSchema, UpdateEmploidSchema, UpdateInputSchema, UpdateInstructionSchema, UpdateJobDefinitionSchema, UpdateKnowledgeSchema, UpdateOccupationSchema, UpdateRecordSchema, UpdateScopeSchema, UpdateSkillSchema, UpdateTaskTemplateSchema, UpdateTeamSchema, UpdateTopicSchema, UpdateWikiCommentSchema, UpdateWikiPageSchema, UpdateWorkerSchema, UpdateWorkerTopicSchema, UploadCollectionFileSchema, UploadEditorFileSchema, UpsertRecordSchema, ValidateRecordSchema, VoteMessageSchema } from "./schema";
|
|
7
7
|
import { TAgentFlow, TAgentFlowFolder, TAssistant, TAssistantChannel, TAssistantConstraint, TAssistantDatasource, TAssistantInstruction, TAssistantSkill, TChannel, TChat, TCollectionAutomationRule, TCollectionButton, TCollectionRelation, TCollectionView, TCommand, TCompetency, TConstraint, TDatasource, TDeleteAgentFlowResult, TDocument, TDomainTopic, TDriveDeleteImpact, TDriveItem, TDriveTreeNode, TEmploid, TEnhanceTopic, TExtension, TInput, TInstruction, TJobDefinition, TKnowledge, TMarketStoreItem, TOccupation, TPaginatedEmploidsResult, TPreparedDriveUpload, TPublishEmploid, TPublishWorkerToMarketStore, TRelationRecordOption, TScope, TSkill, TStreamId, TTaskTemplate, TTeam, TTopic, TUploadedFile, TWikiComment, TWikiCommentPagination, TWikiFileViewResolution, TWorker, TWorkerTopic } from "./types";
|
|
8
8
|
|
|
9
9
|
export class EmploidService extends ServiceClient {
|
|
@@ -862,6 +862,16 @@ export class EmploidService extends ServiceClient {
|
|
|
862
862
|
);
|
|
863
863
|
}
|
|
864
864
|
|
|
865
|
+
public async GetCollectionById(
|
|
866
|
+
payload: z.infer<typeof GetCollectionByIdSchema>
|
|
867
|
+
): Promise<any> {
|
|
868
|
+
return await this.actionCall(
|
|
869
|
+
"collection",
|
|
870
|
+
"GetCollectionById",
|
|
871
|
+
payload
|
|
872
|
+
);
|
|
873
|
+
}
|
|
874
|
+
|
|
865
875
|
|
|
866
876
|
public async CreateRecord(
|
|
867
877
|
payload: z.infer<typeof CreateRecordSchema>
|
|
@@ -873,6 +883,40 @@ export class EmploidService extends ServiceClient {
|
|
|
873
883
|
);
|
|
874
884
|
}
|
|
875
885
|
|
|
886
|
+
public async UploadCollectionFile(
|
|
887
|
+
payload: z.infer<typeof UploadCollectionFileSchema>
|
|
888
|
+
): Promise<TUploadedFile> {
|
|
889
|
+
const result = await this.actionCall<any>("collection", "UploadCollectionFile", payload);
|
|
890
|
+
const storagePath =
|
|
891
|
+
this.normalizeStoragePath(String(result?.path || result?.filePath || result?.url || ""));
|
|
892
|
+
const resolvedUrl = this.resolveStorageViewUrl(storagePath);
|
|
893
|
+
|
|
894
|
+
return {
|
|
895
|
+
...result,
|
|
896
|
+
fileId: String(result?.itemId || result?.fileId || result?.id || payload.itemId || ""),
|
|
897
|
+
path: storagePath,
|
|
898
|
+
filePath: resolvedUrl || storagePath,
|
|
899
|
+
url: resolvedUrl || storagePath,
|
|
900
|
+
};
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
public async ResolveCollectionFileView(
|
|
904
|
+
payload: z.infer<typeof ResolveCollectionFileViewSchema>
|
|
905
|
+
): Promise<TWikiFileViewResolution> {
|
|
906
|
+
const result = await this.actionCall<any>("collection", "ResolveCollectionFileView", payload);
|
|
907
|
+
const storagePath =
|
|
908
|
+
this.normalizeStoragePath(String(result?.path || result?.filePath || result?.url || ""));
|
|
909
|
+
const resolvedUrl = this.resolveStorageViewUrl(storagePath);
|
|
910
|
+
|
|
911
|
+
return {
|
|
912
|
+
...result,
|
|
913
|
+
fileId: String(result?.fileId || result?.itemId || payload.itemId || ""),
|
|
914
|
+
path: storagePath,
|
|
915
|
+
filePath: resolvedUrl || storagePath,
|
|
916
|
+
url: resolvedUrl || storagePath,
|
|
917
|
+
};
|
|
918
|
+
}
|
|
919
|
+
|
|
876
920
|
public async GetRecordById(
|
|
877
921
|
payload: z.infer<typeof GetRecordByIdSchema>
|
|
878
922
|
): Promise<any> {
|