@appconda/sdk 1.0.618 → 1.0.619

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/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.618",
5
+ "version": "1.0.619",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "dist/index.js",
8
8
  "types": "dist/index.d.ts",
@@ -956,6 +956,21 @@ export const EnsureGithubImportCredentialSchema = z.object({
956
956
  tenantId: z.string(),
957
957
  });
958
958
 
959
+ export const PreviewCsvImportSchema = z.object({
960
+ tenantId: z.string(),
961
+ fileName: z.string(),
962
+ headersEnabled: z.boolean().optional(),
963
+ columns: z.array(
964
+ z.object({
965
+ fieldId: z.string(),
966
+ name: z.string(),
967
+ displayName: z.string(),
968
+ index: z.number().int(),
969
+ })
970
+ ).min(1),
971
+ rows: z.array(z.object({}).catchall(z.any())).optional(),
972
+ });
973
+
959
974
  export const ListGmailImportSourcesSchema = z.object({
960
975
  tenantId: z.string(),
961
976
  });
@@ -978,6 +993,37 @@ export const PreviewGithubImportSchema = z.object({
978
993
  collections: z.array(z.enum(["issues", "pullRequests"])).min(1),
979
994
  });
980
995
 
996
+ export const RunCsvImportSchema = z.object({
997
+ tenantId: z.string(),
998
+ fileName: z.string(),
999
+ headersEnabled: z.boolean().optional(),
1000
+ columns: z.array(
1001
+ z.object({
1002
+ fieldId: z.string(),
1003
+ name: z.string(),
1004
+ displayName: z.string(),
1005
+ index: z.number().int(),
1006
+ })
1007
+ ).min(1),
1008
+ rows: z.array(z.object({}).catchall(z.any())),
1009
+ collection: z.object({
1010
+ collectionKey: z.literal("rows"),
1011
+ collectionName: z.string(),
1012
+ collectionDisplayName: z.string(),
1013
+ fields: z.array(
1014
+ z.object({
1015
+ fieldId: z.string(),
1016
+ type: z.string(),
1017
+ displayName: z.string(),
1018
+ name: z.string(),
1019
+ required: z.boolean().optional(),
1020
+ config: z.object({}).catchall(z.any()).optional(),
1021
+ fallbackReason: z.string().optional(),
1022
+ })
1023
+ ).min(1),
1024
+ }),
1025
+ });
1026
+
981
1027
  export const RunGmailImportSchema = z.object({
982
1028
  tenantId: z.string(),
983
1029
  collections: z.array(z.enum(["email", "contact"])).min(1),
@@ -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, CreateEmploidSchema, CreateExtensionSchema, CreateInputSchema, CreateInstructionSchema, CreateJobDefinitionSchema, CreateKnowledgeSchema, CreateOccupationSchema, CreateRecordSchema, CreateScopeSchema, CreateSkillSchema, CreateStreamIdSchema, CreateTaskTemplateSchema, CreateTeamSchema, CreateTopicSchema, CreateWikiCommentSchema, CreateWikiPageSchema, CreateWikiRevisionSchema, CreateWorkerSchema, CreateWorkerTopicSchema, DeleteAgentFlowFolderSchema, DeleteAssistantChannelSchema, DeleteAssistantDatasourceSchema, DeleteAssistantSchema, DeleteAssistantSkillSchema, DeleteChannelSchema, DeleteChatByIdSchema, DeleteCollectionAutomationRuleSchema, DeleteCollectionButtonSchema, DeleteCollectionFieldSchema, DeleteCollectionRelationSchema, DeleteCollectionViewSchema, DeleteCommandSchema, DeleteCompetencySchema, DeleteConstraintSchema, DeleteDataModelSchema, DeleteDatasourceSchema, DeleteDocumentsByIdAfterTimestampSchema, DeleteDomainTopicSchema, DeleteEmploidSchema, DeleteExtensionSchema, DeleteInputSchema, DeleteInstructionSchema, DeleteJobDefinitionSchema, DeleteKnowledgeSchema, DeleteMessagesByChatIdAfterTimestampSchema, DeleteOccupationSchema, DeleteRecordSchema, DeleteScopeSchema, DeleteSkillSchema, DeleteTaskTemplateSchema, DeleteTeamSchema, DeleteTopicSchema, DeleteWikiCommentSchema, DeleteWikiPageSchema, DeleteWorkerSchema, DeleteWorkerTopicSchema, DistinctFieldValuesSchema, DuplicateRecordSchema, EnhanceTopicSchema, EnsureAirtableImportCredentialSchema, EnsureGmailImportCredentialSchema, EnsureGithubImportCredentialSchema, EnsureJiraImportCredentialSchema, EnsureLinearImportCredentialSchema, EnsureNotionImportCredentialSchema, EnsureTrelloImportCredentialSchema, ExecuteCollectionButtonSchema, GetChatByIdSchema, GetChatsByUserIdSchema, GetCollectionSchemaSchema, GetDataModelByIdSchema, GetDocumentByIdSchema, GetDocumentsByIdSchema, 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, 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, PreviewAirtableImportSchema, PreviewGmailImportSchema, PreviewGithubImportSchema, PreviewJiraImportSchema, PreviewLinearImportSchema, PreviewNotionImportSchema, PreviewTrelloImportSchema, PreviewValidationErrorsSchema, PublishDomainSchema, PublishEmploidSchema, PublishWorkerToMarketStoreSchema, QueryRecordsSchema, ReorderCollectionFieldsSchema, ResolveScopeFileViewSchema, ResolveWikiFileViewSchema, RestoreDataModelSchema, RestoreRecordSchema, RestoreWikiPageSchema, RevokeRecordPermissionSchema, RunAirtableImportSchema, RunGmailImportSchema, RunGithubImportSchema, RunJiraImportSchema, RunLinearImportSchema, RunNotionImportSchema, RunTrelloImportSchema, SaveChatSchema, SaveDocumentSchema, SaveMessagesSchema, SaveSuggestionsSchema, 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, CreateEmploidSchema, CreateExtensionSchema, CreateInputSchema, CreateInstructionSchema, CreateJobDefinitionSchema, CreateKnowledgeSchema, CreateOccupationSchema, CreateRecordSchema, CreateScopeSchema, CreateSkillSchema, CreateStreamIdSchema, CreateTaskTemplateSchema, CreateTeamSchema, CreateTopicSchema, CreateWikiCommentSchema, CreateWikiPageSchema, CreateWikiRevisionSchema, CreateWorkerSchema, CreateWorkerTopicSchema, DeleteAgentFlowFolderSchema, DeleteAssistantChannelSchema, DeleteAssistantDatasourceSchema, DeleteAssistantSchema, DeleteAssistantSkillSchema, DeleteChannelSchema, DeleteChatByIdSchema, DeleteCollectionAutomationRuleSchema, DeleteCollectionButtonSchema, DeleteCollectionFieldSchema, DeleteCollectionRelationSchema, DeleteCollectionViewSchema, DeleteCommandSchema, DeleteCompetencySchema, DeleteConstraintSchema, DeleteDataModelSchema, DeleteDatasourceSchema, DeleteDocumentsByIdAfterTimestampSchema, DeleteDomainTopicSchema, DeleteEmploidSchema, DeleteExtensionSchema, DeleteInputSchema, DeleteInstructionSchema, DeleteJobDefinitionSchema, DeleteKnowledgeSchema, DeleteMessagesByChatIdAfterTimestampSchema, DeleteOccupationSchema, DeleteRecordSchema, DeleteScopeSchema, DeleteSkillSchema, DeleteTaskTemplateSchema, DeleteTeamSchema, DeleteTopicSchema, DeleteWikiCommentSchema, DeleteWikiPageSchema, DeleteWorkerSchema, DeleteWorkerTopicSchema, DistinctFieldValuesSchema, DuplicateRecordSchema, EnhanceTopicSchema, EnsureAirtableImportCredentialSchema, EnsureGmailImportCredentialSchema, EnsureGithubImportCredentialSchema, EnsureJiraImportCredentialSchema, EnsureLinearImportCredentialSchema, EnsureNotionImportCredentialSchema, EnsureTrelloImportCredentialSchema, ExecuteCollectionButtonSchema, GetChatByIdSchema, GetChatsByUserIdSchema, GetCollectionSchemaSchema, GetDataModelByIdSchema, GetDocumentByIdSchema, GetDocumentsByIdSchema, 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, 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, PreviewAirtableImportSchema, PreviewCsvImportSchema, PreviewGmailImportSchema, PreviewGithubImportSchema, PreviewJiraImportSchema, PreviewLinearImportSchema, PreviewNotionImportSchema, PreviewTrelloImportSchema, PreviewValidationErrorsSchema, PublishDomainSchema, PublishEmploidSchema, PublishWorkerToMarketStoreSchema, QueryRecordsSchema, ReorderCollectionFieldsSchema, ResolveScopeFileViewSchema, ResolveWikiFileViewSchema, RestoreDataModelSchema, RestoreRecordSchema, RestoreWikiPageSchema, RevokeRecordPermissionSchema, RunAirtableImportSchema, RunCsvImportSchema, RunGmailImportSchema, RunGithubImportSchema, RunJiraImportSchema, RunLinearImportSchema, RunNotionImportSchema, RunTrelloImportSchema, SaveChatSchema, SaveDocumentSchema, SaveMessagesSchema, SaveSuggestionsSchema, 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";
7
7
  import { TAgentFlow, TAgentFlowFolder, TAssistant, TAssistantChannel, TAssistantConstraint, TAssistantDatasource, TAssistantInstruction, TAssistantSkill, TChannel, TChat, TCollectionAutomationRule, TCollectionButton, TCollectionRelation, TCollectionView, TCommand, TCompetency, TConstraint, TDatasource, TDocument, TDomainTopic, TEmploid, TEnhanceTopic, TExtension, TInput, TInstruction, TJobDefinition, TKnowledge, TMarketStoreItem, TOccupation, TPaginatedEmploidsResult, 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 {
@@ -999,6 +999,16 @@ export class EmploidService extends ServiceClient {
999
999
  );
1000
1000
  }
1001
1001
 
1002
+ public async PreviewCsvImport(
1003
+ payload: z.infer<typeof PreviewCsvImportSchema>
1004
+ ): Promise<any> {
1005
+ return await this.actionCall(
1006
+ "collection",
1007
+ "PreviewCsvImport",
1008
+ payload
1009
+ );
1010
+ }
1011
+
1002
1012
  public async PreviewGithubImport(
1003
1013
  payload: z.infer<typeof PreviewGithubImportSchema>
1004
1014
  ): Promise<any> {
@@ -1019,6 +1029,16 @@ export class EmploidService extends ServiceClient {
1019
1029
  );
1020
1030
  }
1021
1031
 
1032
+ public async RunCsvImport(
1033
+ payload: z.infer<typeof RunCsvImportSchema>
1034
+ ): Promise<any> {
1035
+ return await this.actionCall(
1036
+ "collection",
1037
+ "RunCsvImport",
1038
+ payload
1039
+ );
1040
+ }
1041
+
1022
1042
  public async RunGithubImport(
1023
1043
  payload: z.infer<typeof RunGithubImportSchema>
1024
1044
  ): Promise<any> {