@memberjunction/server 1.5.2 → 1.5.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/CHANGELOG.json +202 -1
- package/CHANGELOG.md +41 -2
- package/dist/apolloServer/index.d.ts.map +1 -1
- package/dist/context.d.ts.map +1 -1
- package/dist/entitySubclasses/EntityBehavior.server.js +1 -1
- package/dist/entitySubclasses/EntityBehavior.server.js.map +1 -1
- package/dist/entitySubclasses/userViewEntity.server.js +2 -2
- package/dist/entitySubclasses/userViewEntity.server.js.map +1 -1
- package/dist/generated/generated.d.ts +557 -43
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +2992 -241
- package/dist/generated/generated.js.map +1 -1
- package/dist/generic/ResolverBase.d.ts.map +1 -1
- package/dist/generic/ResolverBase.js +16 -6
- package/dist/generic/ResolverBase.js.map +1 -1
- package/dist/resolvers/AskSkipResolver.d.ts.map +1 -1
- package/dist/resolvers/AskSkipResolver.js +52 -13
- package/dist/resolvers/AskSkipResolver.js.map +1 -1
- package/dist/resolvers/EntityCommunicationsResolver.d.ts +49 -0
- package/dist/resolvers/EntityCommunicationsResolver.d.ts.map +1 -0
- package/dist/resolvers/EntityCommunicationsResolver.js +218 -0
- package/dist/resolvers/EntityCommunicationsResolver.js.map +1 -0
- package/dist/resolvers/EntityRecordNameResolver.d.ts.map +1 -1
- package/dist/resolvers/EntityRecordNameResolver.js.map +1 -1
- package/dist/resolvers/UserFavoriteResolver.d.ts +2 -0
- package/dist/resolvers/UserFavoriteResolver.d.ts.map +1 -1
- package/dist/resolvers/UserFavoriteResolver.js +82 -0
- package/dist/resolvers/UserFavoriteResolver.js.map +1 -1
- package/package.json +36 -43
- package/src/entitySubclasses/EntityBehavior.server.ts +1 -1
- package/src/entitySubclasses/userViewEntity.server.ts +2 -2
- package/src/generated/generated.ts +2146 -205
- package/src/generic/ResolverBase.ts +18 -8
- package/src/resolvers/AskSkipResolver.ts +55 -16
- package/src/resolvers/EntityCommunicationsResolver.ts +184 -0
- package/src/resolvers/EntityRecordNameResolver.ts +1 -38
- package/src/resolvers/UserFavoriteResolver.ts +101 -2
- package/.eslintignore +0 -5
- package/.eslintrc +0 -24
|
@@ -38,14 +38,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
38
38
|
exports.UpdateEntityFieldInput = exports.CreateEntityFieldInput = exports.EntityField_ = exports.CompanyIntegrationResolver = exports.RunCompanyIntegrationViewResult = exports.UpdateCompanyIntegrationInput = exports.CompanyIntegration_ = exports.IntegrationResolver = exports.RunIntegrationViewResult = exports.UpdateIntegrationInput = exports.Integration_ = exports.IntegrationURLFormatResolver = exports.RunIntegrationURLFormatViewResult = exports.UpdateIntegrationURLFormatInput = exports.IntegrationURLFormat_ = exports.SkillResolver = exports.RunSkillViewResult = exports.Skill_ = exports.RoleResolver = exports.RunRoleViewResult = exports.UpdateRoleInput = exports.CreateRoleInput = exports.Role_ = exports.EmployeeSkillResolver = exports.RunEmployeeSkillViewResult = exports.UpdateEmployeeSkillInput = exports.EmployeeSkill_ = exports.EmployeeRoleResolver = exports.RunEmployeeRoleViewResult = exports.UpdateEmployeeRoleInput = exports.EmployeeRole_ = exports.EmployeeCompanyIntegrationResolver = exports.RunEmployeeCompanyIntegrationViewResult = exports.UpdateEmployeeCompanyIntegrationInput = exports.EmployeeCompanyIntegration_ = exports.UserFavoriteResolverBase = exports.RunUserFavoriteViewResult = exports.UpdateUserFavoriteInput = exports.CreateUserFavoriteInput = exports.UserFavorite_ = exports.EmployeeResolver = exports.RunEmployeeViewResult = exports.UpdateEmployeeInput = exports.CreateEmployeeInput = exports.Employee_ = exports.CompanyResolver = exports.RunCompanyViewResult = exports.UpdateCompanyInput = exports.CreateCompanyInput = exports.Company_ = void 0;
|
|
39
39
|
exports.CreateEntityPermissionInput = exports.EntityPermission_ = exports.ApplicationEntityResolver = exports.RunApplicationEntityViewResult = exports.UpdateApplicationEntityInput = exports.CreateApplicationEntityInput = exports.ApplicationEntity_ = exports.ApplicationResolver = exports.RunApplicationViewResult = exports.UpdateApplicationInput = exports.CreateApplicationInput = exports.Application_ = exports.ErrorLogResolver = exports.RunErrorLogViewResult = exports.UpdateErrorLogInput = exports.ErrorLog_ = exports.CompanyIntegrationRunDetailResolver = exports.RunCompanyIntegrationRunDetailViewResult = exports.UpdateCompanyIntegrationRunDetailInput = exports.CompanyIntegrationRunDetail_ = exports.CompanyIntegrationRunResolver = exports.RunCompanyIntegrationRunViewResult = exports.UpdateCompanyIntegrationRunInput = exports.CompanyIntegrationRun_ = exports.UserViewResolverBase = exports.RunUserViewViewResult = exports.UpdateUserViewInput = exports.CreateUserViewInput = exports.UserView_ = exports.UserRecordLogResolver = exports.RunUserRecordLogViewResult = exports.UpdateUserRecordLogInput = exports.UserRecordLog_ = exports.EntityRelationshipResolver = exports.RunEntityRelationshipViewResult = exports.UpdateEntityRelationshipInput = exports.CreateEntityRelationshipInput = exports.EntityRelationship_ = exports.UserResolverBase = exports.RunUserViewResult = exports.UpdateUserInput = exports.CreateUserInput = exports.User_ = exports.EntityResolverBase = exports.RunEntityViewResult = exports.UpdateEntityInput = exports.CreateEntityInput = exports.Entity_ = exports.EntityFieldResolver = exports.RunEntityFieldViewResult = void 0;
|
|
40
40
|
exports.CreateRecordChangeInput = exports.RecordChange_ = exports.WorkflowEngineResolver = exports.RunWorkflowEngineViewResult = exports.UpdateWorkflowEngineInput = exports.WorkflowEngine_ = exports.WorkflowResolver = exports.RunWorkflowViewResult = exports.UpdateWorkflowInput = exports.Workflow_ = exports.WorkflowRunResolver = exports.RunWorkflowRunViewResult = exports.UpdateWorkflowRunInput = exports.WorkflowRun_ = exports.UserViewRunDetailResolver = exports.RunUserViewRunDetailViewResult = exports.UpdateUserViewRunDetailInput = exports.CreateUserViewRunDetailInput = exports.UserViewRunDetail_ = exports.UserViewRunResolver = exports.RunUserViewRunViewResult = exports.UpdateUserViewRunInput = exports.CreateUserViewRunInput = exports.UserViewRun_ = exports.ListDetailResolver = exports.RunListDetailViewResult = exports.UpdateListDetailInput = exports.CreateListDetailInput = exports.ListDetail_ = exports.ListResolver = exports.RunListViewResult = exports.UpdateListInput = exports.CreateListInput = exports.List_ = exports.CompanyIntegrationRunAPILogResolver = exports.RunCompanyIntegrationRunAPILogViewResult = exports.UpdateCompanyIntegrationRunAPILogInput = exports.CompanyIntegrationRunAPILog_ = exports.UserApplicationResolver = exports.RunUserApplicationViewResult = exports.UpdateUserApplicationInput = exports.UserApplication_ = exports.UserApplicationEntityResolver = exports.RunUserApplicationEntityViewResult = exports.UpdateUserApplicationEntityInput = exports.CreateUserApplicationEntityInput = exports.UserApplicationEntity_ = exports.EntityPermissionResolver = exports.RunEntityPermissionViewResult = exports.UpdateEntityPermissionInput = void 0;
|
|
41
|
-
exports.
|
|
42
|
-
exports.
|
|
43
|
-
exports.
|
|
44
|
-
exports.
|
|
45
|
-
exports.
|
|
46
|
-
exports.
|
|
47
|
-
exports.
|
|
48
|
-
exports.CommunicationBaseMessageTypeResolver = exports.RunCommunicationBaseMessageTypeViewResult = exports.UpdateCommunicationBaseMessageTypeInput = exports.CreateCommunicationBaseMessageTypeInput = exports.CommunicationBaseMessageType_ = exports.CommunicationLogResolver = exports.RunCommunicationLogViewResult = exports.UpdateCommunicationLogInput = exports.CreateCommunicationLogInput = exports.CommunicationLog_ = exports.CommunicationProviderMessageTypeResolver = exports.RunCommunicationProviderMessageTypeViewResult = exports.UpdateCommunicationProviderMessageTypeInput = exports.CreateCommunicationProviderMessageTypeInput = exports.CommunicationProviderMessageType_ = exports.CommunicationRunResolver = exports.RunCommunicationRunViewResult = exports.UpdateCommunicationRunInput = exports.CreateCommunicationRunInput = exports.CommunicationRun_ = exports.CommunicationProviderResolver = exports.RunCommunicationProviderViewResult = exports.UpdateCommunicationProviderInput = exports.CreateCommunicationProviderInput = exports.CommunicationProvider_ = exports.
|
|
41
|
+
exports.RunAIModelTypeViewResult = exports.UpdateAIModelTypeInput = exports.CreateAIModelTypeInput = exports.AIModelType_ = exports.EntityAIActionResolver = exports.RunEntityAIActionViewResult = exports.UpdateEntityAIActionInput = exports.CreateEntityAIActionInput = exports.EntityAIAction_ = exports.AIModelActionResolver = exports.RunAIModelActionViewResult = exports.UpdateAIModelActionInput = exports.CreateAIModelActionInput = exports.AIModelAction_ = exports.AIActionResolver = exports.RunAIActionViewResult = exports.UpdateAIActionInput = exports.CreateAIActionInput = exports.AIAction_ = exports.AIModelResolver = exports.RunAIModelViewResult = exports.UpdateAIModelInput = exports.CreateAIModelInput = exports.AIModel_ = exports.EntityFieldValueResolver = exports.RunEntityFieldValueViewResult = exports.EntityFieldValue_ = exports.AuditLogTypeResolver = exports.RunAuditLogTypeViewResult = exports.AuditLogType_ = exports.AuthorizationRoleResolver = exports.RunAuthorizationRoleViewResult = exports.AuthorizationRole_ = exports.AuthorizationResolver = exports.RunAuthorizationViewResult = exports.Authorization_ = exports.AuditLogResolver = exports.RunAuditLogViewResult = exports.UpdateAuditLogInput = exports.CreateAuditLogInput = exports.AuditLog_ = exports.RowLevelSecurityFilterResolver = exports.RunRowLevelSecurityFilterViewResult = exports.RowLevelSecurityFilter_ = exports.UserRoleResolver = exports.RunUserRoleViewResult = exports.CreateUserRoleInput = exports.UserRole_ = exports.RecordChangeResolver = exports.RunRecordChangeViewResult = void 0;
|
|
42
|
+
exports.UpdateWorkspaceInput = exports.CreateWorkspaceInput = exports.Workspace_ = exports.TaggedItemResolver = exports.RunTaggedItemViewResult = exports.TaggedItem_ = exports.TagResolver = exports.RunTagViewResult = exports.Tag_ = exports.ResourceTypeResolver = exports.RunResourceTypeViewResult = exports.ResourceType_ = exports.ReportSnapshotResolver = exports.RunReportSnapshotViewResult = exports.UpdateReportSnapshotInput = exports.CreateReportSnapshotInput = exports.ReportSnapshot_ = exports.ReportResolver = exports.RunReportViewResult = exports.UpdateReportInput = exports.CreateReportInput = exports.Report_ = exports.OutputDeliveryTypeResolver = exports.RunOutputDeliveryTypeViewResult = exports.OutputDeliveryType_ = exports.OutputFormatTypeResolver = exports.RunOutputFormatTypeViewResult = exports.OutputFormatType_ = exports.OutputTriggerTypeResolver = exports.RunOutputTriggerTypeViewResult = exports.OutputTriggerType_ = exports.DashboardResolver = exports.RunDashboardViewResult = exports.UpdateDashboardInput = exports.CreateDashboardInput = exports.Dashboard_ = exports.QueueTaskResolver = exports.RunQueueTaskViewResult = exports.UpdateQueueTaskInput = exports.CreateQueueTaskInput = exports.QueueTask_ = exports.QueueResolver = exports.RunQueueViewResult = exports.UpdateQueueInput = exports.CreateQueueInput = exports.Queue_ = exports.QueueTypeResolver = exports.RunQueueTypeViewResult = exports.QueueType_ = exports.AIModelTypeResolver = void 0;
|
|
43
|
+
exports.CreateQueryFieldInput = exports.QueryField_ = exports.RecordMergeDeletionLogResolver = exports.RunRecordMergeDeletionLogViewResult = exports.UpdateRecordMergeDeletionLogInput = exports.CreateRecordMergeDeletionLogInput = exports.RecordMergeDeletionLog_ = exports.RecordMergeLogResolver = exports.RunRecordMergeLogViewResult = exports.UpdateRecordMergeLogInput = exports.CreateRecordMergeLogInput = exports.RecordMergeLog_ = exports.CompanyIntegrationRecordMapResolver = exports.RunCompanyIntegrationRecordMapViewResult = exports.UpdateCompanyIntegrationRecordMapInput = exports.CreateCompanyIntegrationRecordMapInput = exports.CompanyIntegrationRecordMap_ = exports.SchemaInfoResolver = exports.RunSchemaInfoViewResult = exports.UpdateSchemaInfoInput = exports.CreateSchemaInfoInput = exports.SchemaInfo_ = exports.UserNotificationResolver = exports.RunUserNotificationViewResult = exports.UpdateUserNotificationInput = exports.CreateUserNotificationInput = exports.UserNotification_ = exports.ConversationResolver = exports.RunConversationViewResult = exports.UpdateConversationInput = exports.CreateConversationInput = exports.Conversation_ = exports.ConversationDetailResolver = exports.RunConversationDetailViewResult = exports.UpdateConversationDetailInput = exports.CreateConversationDetailInput = exports.ConversationDetail_ = exports.DatasetItemResolver = exports.RunDatasetItemViewResult = exports.DatasetItem_ = exports.DatasetResolver = exports.RunDatasetViewResult = exports.Dataset_ = exports.WorkspaceItemResolver = exports.RunWorkspaceItemViewResult = exports.UpdateWorkspaceItemInput = exports.CreateWorkspaceItemInput = exports.WorkspaceItem_ = exports.WorkspaceResolver = exports.RunWorkspaceViewResult = void 0;
|
|
44
|
+
exports.CreateDataContextItemInput = exports.DataContextItem_ = exports.EntityDocumentResolver = exports.RunEntityDocumentViewResult = exports.UpdateEntityDocumentInput = exports.CreateEntityDocumentInput = exports.EntityDocument_ = exports.EntityRecordDocumentResolver = exports.RunEntityRecordDocumentViewResult = exports.UpdateEntityRecordDocumentInput = exports.CreateEntityRecordDocumentInput = exports.EntityRecordDocument_ = exports.VectorDatabaseResolver = exports.RunVectorDatabaseViewResult = exports.UpdateVectorDatabaseInput = exports.CreateVectorDatabaseInput = exports.VectorDatabase_ = exports.EntityDocumentRunResolver = exports.RunEntityDocumentRunViewResult = exports.UpdateEntityDocumentRunInput = exports.CreateEntityDocumentRunInput = exports.EntityDocumentRun_ = exports.EntityDocumentTypeResolver = exports.RunEntityDocumentTypeViewResult = exports.UpdateEntityDocumentTypeInput = exports.CreateEntityDocumentTypeInput = exports.EntityDocumentType_ = exports.VectorIndexResolver = exports.RunVectorIndexViewResult = exports.UpdateVectorIndexInput = exports.CreateVectorIndexInput = exports.VectorIndex_ = exports.QueryPermissionResolver = exports.RunQueryPermissionViewResult = exports.UpdateQueryPermissionInput = exports.CreateQueryPermissionInput = exports.QueryPermission_ = exports.QueryResolver = exports.RunQueryViewResult = exports.UpdateQueryInput = exports.CreateQueryInput = exports.Query_ = exports.QueryCategoryResolver = exports.RunQueryCategoryViewResult = exports.UpdateQueryCategoryInput = exports.CreateQueryCategoryInput = exports.QueryCategory_ = exports.QueryFieldResolver = exports.RunQueryFieldViewResult = exports.UpdateQueryFieldInput = void 0;
|
|
45
|
+
exports.CreateDuplicateRunDetailMatchInput = exports.DuplicateRunDetailMatch_ = exports.VersionInstallationResolver = exports.RunVersionInstallationViewResult = exports.UpdateVersionInstallationInput = exports.CreateVersionInstallationInput = exports.VersionInstallation_ = exports.FileEntityRecordLinkResolver = exports.RunFileEntityRecordLinkViewResult = exports.UpdateFileEntityRecordLinkInput = exports.CreateFileEntityRecordLinkInput = exports.FileEntityRecordLink_ = exports.FileCategoryResolver = exports.RunFileCategoryViewResult = exports.UpdateFileCategoryInput = exports.CreateFileCategoryInput = exports.FileCategory_ = exports.FileResolver = exports.RunFileViewResult = exports.UpdateFileInput = exports.CreateFileInput = exports.File_ = exports.FileStorageProviderResolver = exports.RunFileStorageProviderViewResult = exports.UpdateFileStorageProviderInput = exports.CreateFileStorageProviderInput = exports.FileStorageProvider_ = exports.ReportCategoryResolver = exports.RunReportCategoryViewResult = exports.UpdateReportCategoryInput = exports.CreateReportCategoryInput = exports.ReportCategory_ = exports.DashboardCategoryResolver = exports.RunDashboardCategoryViewResult = exports.UpdateDashboardCategoryInput = exports.CreateDashboardCategoryInput = exports.DashboardCategory_ = exports.UserViewCategoryResolver = exports.RunUserViewCategoryViewResult = exports.UpdateUserViewCategoryInput = exports.CreateUserViewCategoryInput = exports.UserViewCategory_ = exports.DataContextResolver = exports.RunDataContextViewResult = exports.UpdateDataContextInput = exports.CreateDataContextInput = exports.DataContext_ = exports.DataContextItemResolver = exports.RunDataContextItemViewResult = exports.UpdateDataContextItemInput = void 0;
|
|
46
|
+
exports.CreateEntityActionInvocationInput = exports.EntityActionInvocation_ = exports.EntityActionResolver = exports.RunEntityActionViewResult = exports.UpdateEntityActionInput = exports.CreateEntityActionInput = exports.EntityAction_ = exports.ActionCategoryResolver = exports.RunActionCategoryViewResult = exports.UpdateActionCategoryInput = exports.CreateActionCategoryInput = exports.ActionCategory_ = exports.ApplicationSettingResolver = exports.RunApplicationSettingViewResult = exports.UpdateApplicationSettingInput = exports.CreateApplicationSettingInput = exports.ApplicationSetting_ = exports.EntityBehaviorTypeResolver = exports.RunEntityBehaviorTypeViewResult = exports.UpdateEntityBehaviorTypeInput = exports.CreateEntityBehaviorTypeInput = exports.EntityBehaviorType_ = exports.EntityBehaviorResolver = exports.RunEntityBehaviorViewResult = exports.UpdateEntityBehaviorInput = exports.CreateEntityBehaviorInput = exports.EntityBehavior_ = exports.DuplicateRunDetailResolver = exports.RunDuplicateRunDetailViewResult = exports.UpdateDuplicateRunDetailInput = exports.CreateDuplicateRunDetailInput = exports.DuplicateRunDetail_ = exports.DuplicateRunResolver = exports.RunDuplicateRunViewResult = exports.UpdateDuplicateRunInput = exports.CreateDuplicateRunInput = exports.DuplicateRun_ = exports.EntitySettingResolver = exports.RunEntitySettingViewResult = exports.UpdateEntitySettingInput = exports.CreateEntitySettingInput = exports.EntitySetting_ = exports.EntityDocumentSettingResolver = exports.RunEntityDocumentSettingViewResult = exports.UpdateEntityDocumentSettingInput = exports.CreateEntityDocumentSettingInput = exports.EntityDocumentSetting_ = exports.DuplicateRunDetailMatchResolver = exports.RunDuplicateRunDetailMatchViewResult = exports.UpdateDuplicateRunDetailMatchInput = void 0;
|
|
47
|
+
exports.CreateActionParamInput = exports.ActionParam_ = exports.ActionExecutionLogResolver = exports.RunActionExecutionLogViewResult = exports.UpdateActionExecutionLogInput = exports.CreateActionExecutionLogInput = exports.ActionExecutionLog_ = exports.ActionContextResolver = exports.RunActionContextViewResult = exports.UpdateActionContextInput = exports.CreateActionContextInput = exports.ActionContext_ = exports.ActionResultCodeResolver = exports.RunActionResultCodeViewResult = exports.UpdateActionResultCodeInput = exports.CreateActionResultCodeInput = exports.ActionResultCode_ = exports.ActionContextTypeResolver = exports.RunActionContextTypeViewResult = exports.UpdateActionContextTypeInput = exports.CreateActionContextTypeInput = exports.ActionContextType_ = exports.ActionFilterResolver = exports.RunActionFilterViewResult = exports.UpdateActionFilterInput = exports.CreateActionFilterInput = exports.ActionFilter_ = exports.EntityActionFilterResolver = exports.RunEntityActionFilterViewResult = exports.UpdateEntityActionFilterInput = exports.CreateEntityActionFilterInput = exports.EntityActionFilter_ = exports.ActionResolver = exports.RunActionViewResult = exports.UpdateActionInput = exports.CreateActionInput = exports.Action_ = exports.EntityActionInvocationTypeResolver = exports.RunEntityActionInvocationTypeViewResult = exports.UpdateEntityActionInvocationTypeInput = exports.CreateEntityActionInvocationTypeInput = exports.EntityActionInvocationType_ = exports.ActionAuthorizationResolver = exports.RunActionAuthorizationViewResult = exports.UpdateActionAuthorizationInput = exports.CreateActionAuthorizationInput = exports.ActionAuthorization_ = exports.EntityActionInvocationResolver = exports.RunEntityActionInvocationViewResult = exports.UpdateEntityActionInvocationInput = void 0;
|
|
48
|
+
exports.CreateTemplateCategoryInput = exports.TemplateCategory_ = exports.TemplateResolver = exports.RunTemplateViewResult = exports.UpdateTemplateInput = exports.CreateTemplateInput = exports.Template_ = exports.CommunicationBaseMessageTypeResolver = exports.RunCommunicationBaseMessageTypeViewResult = exports.UpdateCommunicationBaseMessageTypeInput = exports.CreateCommunicationBaseMessageTypeInput = exports.CommunicationBaseMessageType_ = exports.CommunicationLogResolver = exports.RunCommunicationLogViewResult = exports.UpdateCommunicationLogInput = exports.CreateCommunicationLogInput = exports.CommunicationLog_ = exports.CommunicationProviderMessageTypeResolver = exports.RunCommunicationProviderMessageTypeViewResult = exports.UpdateCommunicationProviderMessageTypeInput = exports.CreateCommunicationProviderMessageTypeInput = exports.CommunicationProviderMessageType_ = exports.CommunicationRunResolver = exports.RunCommunicationRunViewResult = exports.UpdateCommunicationRunInput = exports.CreateCommunicationRunInput = exports.CommunicationRun_ = exports.CommunicationProviderResolver = exports.RunCommunicationProviderViewResult = exports.UpdateCommunicationProviderInput = exports.CreateCommunicationProviderInput = exports.CommunicationProvider_ = exports.ListCategoryResolver = exports.RunListCategoryViewResult = exports.UpdateListCategoryInput = exports.CreateListCategoryInput = exports.ListCategory_ = exports.LibraryResolver = exports.RunLibraryViewResult = exports.UpdateLibraryInput = exports.CreateLibraryInput = exports.Library_ = exports.ActionLibraryResolver = exports.RunActionLibraryViewResult = exports.UpdateActionLibraryInput = exports.CreateActionLibraryInput = exports.ActionLibrary_ = exports.ActionParamResolver = exports.RunActionParamViewResult = exports.UpdateActionParamInput = void 0;
|
|
49
|
+
exports.EntityCommunicationFieldResolver = exports.RunEntityCommunicationFieldViewResult = exports.UpdateEntityCommunicationFieldInput = exports.CreateEntityCommunicationFieldInput = exports.EntityCommunicationField_ = exports.EntityCommunicationMessageTypeResolver = exports.RunEntityCommunicationMessageTypeViewResult = exports.UpdateEntityCommunicationMessageTypeInput = exports.CreateEntityCommunicationMessageTypeInput = exports.EntityCommunicationMessageType_ = exports.RecommendationItemResolver = exports.RunRecommendationItemViewResult = exports.UpdateRecommendationItemInput = exports.CreateRecommendationItemInput = exports.RecommendationItem_ = exports.RecommendationRunResolver = exports.RunRecommendationRunViewResult = exports.UpdateRecommendationRunInput = exports.CreateRecommendationRunInput = exports.RecommendationRun_ = exports.RecommendationProviderResolver = exports.RunRecommendationProviderViewResult = exports.UpdateRecommendationProviderInput = exports.CreateRecommendationProviderInput = exports.RecommendationProvider_ = exports.RecommendationResolver = exports.RunRecommendationViewResult = exports.UpdateRecommendationInput = exports.CreateRecommendationInput = exports.Recommendation_ = exports.TemplateContentTypeResolver = exports.RunTemplateContentTypeViewResult = exports.UpdateTemplateContentTypeInput = exports.CreateTemplateContentTypeInput = exports.TemplateContentType_ = exports.TemplateParamResolver = exports.RunTemplateParamViewResult = exports.UpdateTemplateParamInput = exports.CreateTemplateParamInput = exports.TemplateParam_ = exports.TemplateContentResolver = exports.RunTemplateContentViewResult = exports.UpdateTemplateContentInput = exports.CreateTemplateContentInput = exports.TemplateContent_ = exports.TemplateCategoryResolver = exports.RunTemplateCategoryViewResult = exports.UpdateTemplateCategoryInput = void 0;
|
|
49
50
|
const server_1 = require("@memberjunction/server");
|
|
50
51
|
const core_1 = require("@memberjunction/core");
|
|
51
52
|
const class_validator_1 = require("class-validator");
|
|
@@ -3575,6 +3576,11 @@ __decorate([
|
|
|
3575
3576
|
(0, class_validator_1.MaxLength)(8),
|
|
3576
3577
|
__metadata("design:type", Date)
|
|
3577
3578
|
], Entity_.prototype, "UpdatedAt", void 0);
|
|
3579
|
+
__decorate([
|
|
3580
|
+
(0, server_1.Field)({ nullable: true, description: 'Used to specify a field within the entity that in turn contains the field name that will be used for record-level communication preferences. For example in a hypothetical entity called Contacts, say there is a field called PreferredComm and that field had possible values of Email1, SMS, and Phone, and those value in turn corresponded to field names in the entity. Each record in the Contacts entity could have a specific preference for which field would be used for communication. The MJ Communication Framework will use this information when available, as a priority ahead of the data in the Entity Communication Fields entity which is entity-level and not record-level.' }),
|
|
3581
|
+
(0, class_validator_1.MaxLength)(510),
|
|
3582
|
+
__metadata("design:type", String)
|
|
3583
|
+
], Entity_.prototype, "PreferredCommunicationField", void 0);
|
|
3578
3584
|
__decorate([
|
|
3579
3585
|
(0, server_1.Field)({ nullable: true }),
|
|
3580
3586
|
__metadata("design:type", String)
|
|
@@ -3730,6 +3736,22 @@ __decorate([
|
|
|
3730
3736
|
(0, server_1.Field)(() => [mj_core_schema_server_object_types.EntityAction_]),
|
|
3731
3737
|
__metadata("design:type", Array)
|
|
3732
3738
|
], Entity_.prototype, "EntityActionsArray", void 0);
|
|
3739
|
+
__decorate([
|
|
3740
|
+
(0, server_1.Field)(() => [mj_core_schema_server_object_types.TemplateParam_]),
|
|
3741
|
+
__metadata("design:type", Array)
|
|
3742
|
+
], Entity_.prototype, "TemplateParamsArray", void 0);
|
|
3743
|
+
__decorate([
|
|
3744
|
+
(0, server_1.Field)(() => [mj_core_schema_server_object_types.Recommendation_]),
|
|
3745
|
+
__metadata("design:type", Array)
|
|
3746
|
+
], Entity_.prototype, "RecommendationsArray", void 0);
|
|
3747
|
+
__decorate([
|
|
3748
|
+
(0, server_1.Field)(() => [mj_core_schema_server_object_types.RecommendationItem_]),
|
|
3749
|
+
__metadata("design:type", Array)
|
|
3750
|
+
], Entity_.prototype, "RecommendationItemsArray", void 0);
|
|
3751
|
+
__decorate([
|
|
3752
|
+
(0, server_1.Field)(() => [mj_core_schema_server_object_types.EntityCommunicationMessageType_]),
|
|
3753
|
+
__metadata("design:type", Array)
|
|
3754
|
+
], Entity_.prototype, "EntityCommunicationMessageTypesArray", void 0);
|
|
3733
3755
|
exports.Entity_ = Entity_ = __decorate([
|
|
3734
3756
|
(0, server_1.ObjectType)({ description: 'Catalog of all entities across all schemas' })
|
|
3735
3757
|
], Entity_);
|
|
@@ -3888,6 +3910,10 @@ __decorate([
|
|
|
3888
3910
|
(0, server_1.Field)({ nullable: true }),
|
|
3889
3911
|
__metadata("design:type", String)
|
|
3890
3912
|
], CreateEntityInput.prototype, "EntityObjectSubclassImport", void 0);
|
|
3913
|
+
__decorate([
|
|
3914
|
+
(0, server_1.Field)({ nullable: true }),
|
|
3915
|
+
__metadata("design:type", String)
|
|
3916
|
+
], CreateEntityInput.prototype, "PreferredCommunicationField", void 0);
|
|
3891
3917
|
exports.CreateEntityInput = CreateEntityInput = __decorate([
|
|
3892
3918
|
(0, server_1.InputType)()
|
|
3893
3919
|
], CreateEntityInput);
|
|
@@ -4046,6 +4072,10 @@ __decorate([
|
|
|
4046
4072
|
(0, server_1.Field)({ nullable: true }),
|
|
4047
4073
|
__metadata("design:type", String)
|
|
4048
4074
|
], UpdateEntityInput.prototype, "EntityObjectSubclassImport", void 0);
|
|
4075
|
+
__decorate([
|
|
4076
|
+
(0, server_1.Field)({ nullable: true }),
|
|
4077
|
+
__metadata("design:type", String)
|
|
4078
|
+
], UpdateEntityInput.prototype, "PreferredCommunicationField", void 0);
|
|
4049
4079
|
__decorate([
|
|
4050
4080
|
(0, server_1.Field)(() => [server_1.KeyValuePairInput], { nullable: true }),
|
|
4051
4081
|
__metadata("design:type", Array)
|
|
@@ -4302,6 +4332,30 @@ let EntityResolverBase = class EntityResolverBase extends server_1.ResolverBase
|
|
|
4302
4332
|
const result = this.ArrayMapFieldNamesToCodeNames('Entity Actions', await dataSource.query(sSQL));
|
|
4303
4333
|
return result;
|
|
4304
4334
|
}
|
|
4335
|
+
async TemplateParamsArray(entity_, { dataSource, userPayload }, pubSub) {
|
|
4336
|
+
this.CheckUserReadPermissions('Template Params', userPayload);
|
|
4337
|
+
const sSQL = `SELECT * FROM [${core_1.Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTemplateParams] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Template Params', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
4338
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Template Params', await dataSource.query(sSQL));
|
|
4339
|
+
return result;
|
|
4340
|
+
}
|
|
4341
|
+
async RecommendationsArray(entity_, { dataSource, userPayload }, pubSub) {
|
|
4342
|
+
this.CheckUserReadPermissions('Recommendations', userPayload);
|
|
4343
|
+
const sSQL = `SELECT * FROM [${core_1.Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecommendations] WHERE [SourceEntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Recommendations', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
4344
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Recommendations', await dataSource.query(sSQL));
|
|
4345
|
+
return result;
|
|
4346
|
+
}
|
|
4347
|
+
async RecommendationItemsArray(entity_, { dataSource, userPayload }, pubSub) {
|
|
4348
|
+
this.CheckUserReadPermissions('Recommendation Items', userPayload);
|
|
4349
|
+
const sSQL = `SELECT * FROM [${core_1.Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecommendationItems] WHERE [DestinationEntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Recommendation Items', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
4350
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Recommendation Items', await dataSource.query(sSQL));
|
|
4351
|
+
return result;
|
|
4352
|
+
}
|
|
4353
|
+
async EntityCommunicationMessageTypesArray(entity_, { dataSource, userPayload }, pubSub) {
|
|
4354
|
+
this.CheckUserReadPermissions('Entity Communication Message Types', userPayload);
|
|
4355
|
+
const sSQL = `SELECT * FROM [${core_1.Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityCommunicationMessageTypes] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Communication Message Types', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
4356
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Communication Message Types', await dataSource.query(sSQL));
|
|
4357
|
+
return result;
|
|
4358
|
+
}
|
|
4305
4359
|
async CreateEntity(input, { dataSource, userPayload }, pubSub) {
|
|
4306
4360
|
return this.CreateRecord('Entities', input, dataSource, userPayload, pubSub);
|
|
4307
4361
|
}
|
|
@@ -4646,6 +4700,42 @@ __decorate([
|
|
|
4646
4700
|
__metadata("design:paramtypes", [Entity_, Object, server_1.PubSubEngine]),
|
|
4647
4701
|
__metadata("design:returntype", Promise)
|
|
4648
4702
|
], EntityResolverBase.prototype, "EntityActionsArray", null);
|
|
4703
|
+
__decorate([
|
|
4704
|
+
(0, server_1.FieldResolver)(() => [mj_core_schema_server_object_types.TemplateParam_]),
|
|
4705
|
+
__param(0, (0, server_1.Root)()),
|
|
4706
|
+
__param(1, (0, server_1.Ctx)()),
|
|
4707
|
+
__param(2, (0, server_1.PubSub)()),
|
|
4708
|
+
__metadata("design:type", Function),
|
|
4709
|
+
__metadata("design:paramtypes", [Entity_, Object, server_1.PubSubEngine]),
|
|
4710
|
+
__metadata("design:returntype", Promise)
|
|
4711
|
+
], EntityResolverBase.prototype, "TemplateParamsArray", null);
|
|
4712
|
+
__decorate([
|
|
4713
|
+
(0, server_1.FieldResolver)(() => [mj_core_schema_server_object_types.Recommendation_]),
|
|
4714
|
+
__param(0, (0, server_1.Root)()),
|
|
4715
|
+
__param(1, (0, server_1.Ctx)()),
|
|
4716
|
+
__param(2, (0, server_1.PubSub)()),
|
|
4717
|
+
__metadata("design:type", Function),
|
|
4718
|
+
__metadata("design:paramtypes", [Entity_, Object, server_1.PubSubEngine]),
|
|
4719
|
+
__metadata("design:returntype", Promise)
|
|
4720
|
+
], EntityResolverBase.prototype, "RecommendationsArray", null);
|
|
4721
|
+
__decorate([
|
|
4722
|
+
(0, server_1.FieldResolver)(() => [mj_core_schema_server_object_types.RecommendationItem_]),
|
|
4723
|
+
__param(0, (0, server_1.Root)()),
|
|
4724
|
+
__param(1, (0, server_1.Ctx)()),
|
|
4725
|
+
__param(2, (0, server_1.PubSub)()),
|
|
4726
|
+
__metadata("design:type", Function),
|
|
4727
|
+
__metadata("design:paramtypes", [Entity_, Object, server_1.PubSubEngine]),
|
|
4728
|
+
__metadata("design:returntype", Promise)
|
|
4729
|
+
], EntityResolverBase.prototype, "RecommendationItemsArray", null);
|
|
4730
|
+
__decorate([
|
|
4731
|
+
(0, server_1.FieldResolver)(() => [mj_core_schema_server_object_types.EntityCommunicationMessageType_]),
|
|
4732
|
+
__param(0, (0, server_1.Root)()),
|
|
4733
|
+
__param(1, (0, server_1.Ctx)()),
|
|
4734
|
+
__param(2, (0, server_1.PubSub)()),
|
|
4735
|
+
__metadata("design:type", Function),
|
|
4736
|
+
__metadata("design:paramtypes", [Entity_, Object, server_1.PubSubEngine]),
|
|
4737
|
+
__metadata("design:returntype", Promise)
|
|
4738
|
+
], EntityResolverBase.prototype, "EntityCommunicationMessageTypesArray", null);
|
|
4649
4739
|
__decorate([
|
|
4650
4740
|
(0, server_1.Mutation)(() => Entity_),
|
|
4651
4741
|
__param(0, (0, server_1.Arg)('input', () => CreateEntityInput)),
|
|
@@ -4879,6 +4969,18 @@ __decorate([
|
|
|
4879
4969
|
(0, server_1.Field)(() => [mj_core_schema_server_object_types.CommunicationRun_]),
|
|
4880
4970
|
__metadata("design:type", Array)
|
|
4881
4971
|
], User_.prototype, "CommunicationRunsArray", void 0);
|
|
4972
|
+
__decorate([
|
|
4973
|
+
(0, server_1.Field)(() => [mj_core_schema_server_object_types.Template_]),
|
|
4974
|
+
__metadata("design:type", Array)
|
|
4975
|
+
], User_.prototype, "TemplatesArray", void 0);
|
|
4976
|
+
__decorate([
|
|
4977
|
+
(0, server_1.Field)(() => [mj_core_schema_server_object_types.TemplateCategory_]),
|
|
4978
|
+
__metadata("design:type", Array)
|
|
4979
|
+
], User_.prototype, "TemplateCategoriesArray", void 0);
|
|
4980
|
+
__decorate([
|
|
4981
|
+
(0, server_1.Field)(() => [mj_core_schema_server_object_types.RecommendationRun_]),
|
|
4982
|
+
__metadata("design:type", Array)
|
|
4983
|
+
], User_.prototype, "RecommendationRunsArray", void 0);
|
|
4882
4984
|
exports.User_ = User_ = __decorate([
|
|
4883
4985
|
(0, server_1.ObjectType)({ description: 'A list of all users who have or had access to the system' })
|
|
4884
4986
|
], User_);
|
|
@@ -5203,6 +5305,24 @@ let UserResolverBase = class UserResolverBase extends server_1.ResolverBase {
|
|
|
5203
5305
|
const result = this.ArrayMapFieldNamesToCodeNames('Communication Runs', await dataSource.query(sSQL));
|
|
5204
5306
|
return result;
|
|
5205
5307
|
}
|
|
5308
|
+
async TemplatesArray(user_, { dataSource, userPayload }, pubSub) {
|
|
5309
|
+
this.CheckUserReadPermissions('Templates', userPayload);
|
|
5310
|
+
const sSQL = `SELECT * FROM [${core_1.Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTemplates] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('Templates', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
5311
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Templates', await dataSource.query(sSQL));
|
|
5312
|
+
return result;
|
|
5313
|
+
}
|
|
5314
|
+
async TemplateCategoriesArray(user_, { dataSource, userPayload }, pubSub) {
|
|
5315
|
+
this.CheckUserReadPermissions('Template Categories', userPayload);
|
|
5316
|
+
const sSQL = `SELECT * FROM [${core_1.Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTemplateCategories] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('Template Categories', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
5317
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Template Categories', await dataSource.query(sSQL));
|
|
5318
|
+
return result;
|
|
5319
|
+
}
|
|
5320
|
+
async RecommendationRunsArray(user_, { dataSource, userPayload }, pubSub) {
|
|
5321
|
+
this.CheckUserReadPermissions('Recommendation Runs', userPayload);
|
|
5322
|
+
const sSQL = `SELECT * FROM [${core_1.Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecommendationRuns] WHERE [RunByUserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('Recommendation Runs', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
5323
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Recommendation Runs', await dataSource.query(sSQL));
|
|
5324
|
+
return result;
|
|
5325
|
+
}
|
|
5206
5326
|
async CreateUser(input, { dataSource, userPayload }, pubSub) {
|
|
5207
5327
|
return this.CreateRecord('Users', input, dataSource, userPayload, pubSub);
|
|
5208
5328
|
}
|
|
@@ -5493,6 +5613,33 @@ __decorate([
|
|
|
5493
5613
|
__metadata("design:paramtypes", [User_, Object, server_1.PubSubEngine]),
|
|
5494
5614
|
__metadata("design:returntype", Promise)
|
|
5495
5615
|
], UserResolverBase.prototype, "CommunicationRunsArray", null);
|
|
5616
|
+
__decorate([
|
|
5617
|
+
(0, server_1.FieldResolver)(() => [mj_core_schema_server_object_types.Template_]),
|
|
5618
|
+
__param(0, (0, server_1.Root)()),
|
|
5619
|
+
__param(1, (0, server_1.Ctx)()),
|
|
5620
|
+
__param(2, (0, server_1.PubSub)()),
|
|
5621
|
+
__metadata("design:type", Function),
|
|
5622
|
+
__metadata("design:paramtypes", [User_, Object, server_1.PubSubEngine]),
|
|
5623
|
+
__metadata("design:returntype", Promise)
|
|
5624
|
+
], UserResolverBase.prototype, "TemplatesArray", null);
|
|
5625
|
+
__decorate([
|
|
5626
|
+
(0, server_1.FieldResolver)(() => [mj_core_schema_server_object_types.TemplateCategory_]),
|
|
5627
|
+
__param(0, (0, server_1.Root)()),
|
|
5628
|
+
__param(1, (0, server_1.Ctx)()),
|
|
5629
|
+
__param(2, (0, server_1.PubSub)()),
|
|
5630
|
+
__metadata("design:type", Function),
|
|
5631
|
+
__metadata("design:paramtypes", [User_, Object, server_1.PubSubEngine]),
|
|
5632
|
+
__metadata("design:returntype", Promise)
|
|
5633
|
+
], UserResolverBase.prototype, "TemplateCategoriesArray", null);
|
|
5634
|
+
__decorate([
|
|
5635
|
+
(0, server_1.FieldResolver)(() => [mj_core_schema_server_object_types.RecommendationRun_]),
|
|
5636
|
+
__param(0, (0, server_1.Root)()),
|
|
5637
|
+
__param(1, (0, server_1.Ctx)()),
|
|
5638
|
+
__param(2, (0, server_1.PubSub)()),
|
|
5639
|
+
__metadata("design:type", Function),
|
|
5640
|
+
__metadata("design:paramtypes", [User_, Object, server_1.PubSubEngine]),
|
|
5641
|
+
__metadata("design:returntype", Promise)
|
|
5642
|
+
], UserResolverBase.prototype, "RecommendationRunsArray", null);
|
|
5496
5643
|
__decorate([
|
|
5497
5644
|
(0, server_1.Mutation)(() => User_),
|
|
5498
5645
|
__param(0, (0, server_1.Arg)('input', () => CreateUserInput)),
|
|
@@ -11881,6 +12028,48 @@ __decorate([
|
|
|
11881
12028
|
exports.AIModel_ = AIModel_ = __decorate([
|
|
11882
12029
|
(0, server_1.ObjectType)({ description: 'Catalog of all AI Models configured in the system' })
|
|
11883
12030
|
], AIModel_);
|
|
12031
|
+
let CreateAIModelInput = class CreateAIModelInput {
|
|
12032
|
+
};
|
|
12033
|
+
exports.CreateAIModelInput = CreateAIModelInput;
|
|
12034
|
+
__decorate([
|
|
12035
|
+
(0, server_1.Field)(),
|
|
12036
|
+
__metadata("design:type", String)
|
|
12037
|
+
], CreateAIModelInput.prototype, "Name", void 0);
|
|
12038
|
+
__decorate([
|
|
12039
|
+
(0, server_1.Field)({ nullable: true }),
|
|
12040
|
+
__metadata("design:type", String)
|
|
12041
|
+
], CreateAIModelInput.prototype, "Vendor", void 0);
|
|
12042
|
+
__decorate([
|
|
12043
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
12044
|
+
__metadata("design:type", Number)
|
|
12045
|
+
], CreateAIModelInput.prototype, "AIModelTypeID", void 0);
|
|
12046
|
+
__decorate([
|
|
12047
|
+
(0, server_1.Field)(() => Boolean),
|
|
12048
|
+
__metadata("design:type", Boolean)
|
|
12049
|
+
], CreateAIModelInput.prototype, "IsActive", void 0);
|
|
12050
|
+
__decorate([
|
|
12051
|
+
(0, server_1.Field)({ nullable: true }),
|
|
12052
|
+
__metadata("design:type", String)
|
|
12053
|
+
], CreateAIModelInput.prototype, "Description", void 0);
|
|
12054
|
+
__decorate([
|
|
12055
|
+
(0, server_1.Field)({ nullable: true }),
|
|
12056
|
+
__metadata("design:type", String)
|
|
12057
|
+
], CreateAIModelInput.prototype, "DriverClass", void 0);
|
|
12058
|
+
__decorate([
|
|
12059
|
+
(0, server_1.Field)({ nullable: true }),
|
|
12060
|
+
__metadata("design:type", String)
|
|
12061
|
+
], CreateAIModelInput.prototype, "DriverImportPath", void 0);
|
|
12062
|
+
__decorate([
|
|
12063
|
+
(0, server_1.Field)({ nullable: true }),
|
|
12064
|
+
__metadata("design:type", String)
|
|
12065
|
+
], CreateAIModelInput.prototype, "APIName", void 0);
|
|
12066
|
+
__decorate([
|
|
12067
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
12068
|
+
__metadata("design:type", Number)
|
|
12069
|
+
], CreateAIModelInput.prototype, "PowerRank", void 0);
|
|
12070
|
+
exports.CreateAIModelInput = CreateAIModelInput = __decorate([
|
|
12071
|
+
(0, server_1.InputType)()
|
|
12072
|
+
], CreateAIModelInput);
|
|
11884
12073
|
let UpdateAIModelInput = class UpdateAIModelInput {
|
|
11885
12074
|
};
|
|
11886
12075
|
exports.UpdateAIModelInput = UpdateAIModelInput;
|
|
@@ -12018,9 +12207,16 @@ let AIModelResolver = class AIModelResolver extends server_1.ResolverBase {
|
|
|
12018
12207
|
const result = this.ArrayMapFieldNamesToCodeNames('Entity Documents', await dataSource.query(sSQL));
|
|
12019
12208
|
return result;
|
|
12020
12209
|
}
|
|
12210
|
+
async CreateAIModel(input, { dataSource, userPayload }, pubSub) {
|
|
12211
|
+
return this.CreateRecord('AI Models', input, dataSource, userPayload, pubSub);
|
|
12212
|
+
}
|
|
12021
12213
|
async UpdateAIModel(input, { dataSource, userPayload }, pubSub) {
|
|
12022
12214
|
return this.UpdateRecord('AI Models', input, dataSource, userPayload, pubSub);
|
|
12023
12215
|
}
|
|
12216
|
+
async DeleteAIModel(ID, options, { dataSource, userPayload }, pubSub) {
|
|
12217
|
+
const key = new core_1.CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
12218
|
+
return this.DeleteRecord('AI Models', key, options, dataSource, userPayload, pubSub);
|
|
12219
|
+
}
|
|
12024
12220
|
};
|
|
12025
12221
|
exports.AIModelResolver = AIModelResolver;
|
|
12026
12222
|
__decorate([
|
|
@@ -12112,6 +12308,15 @@ __decorate([
|
|
|
12112
12308
|
__metadata("design:paramtypes", [AIModel_, Object, server_1.PubSubEngine]),
|
|
12113
12309
|
__metadata("design:returntype", Promise)
|
|
12114
12310
|
], AIModelResolver.prototype, "EntityDocumentsArray", null);
|
|
12311
|
+
__decorate([
|
|
12312
|
+
(0, server_1.Mutation)(() => AIModel_),
|
|
12313
|
+
__param(0, (0, server_1.Arg)('input', () => CreateAIModelInput)),
|
|
12314
|
+
__param(1, (0, server_1.Ctx)()),
|
|
12315
|
+
__param(2, (0, server_1.PubSub)()),
|
|
12316
|
+
__metadata("design:type", Function),
|
|
12317
|
+
__metadata("design:paramtypes", [CreateAIModelInput, Object, server_1.PubSubEngine]),
|
|
12318
|
+
__metadata("design:returntype", Promise)
|
|
12319
|
+
], AIModelResolver.prototype, "CreateAIModel", null);
|
|
12115
12320
|
__decorate([
|
|
12116
12321
|
(0, server_1.Mutation)(() => AIModel_),
|
|
12117
12322
|
__param(0, (0, server_1.Arg)('input', () => UpdateAIModelInput)),
|
|
@@ -12121,6 +12326,16 @@ __decorate([
|
|
|
12121
12326
|
__metadata("design:paramtypes", [UpdateAIModelInput, Object, server_1.PubSubEngine]),
|
|
12122
12327
|
__metadata("design:returntype", Promise)
|
|
12123
12328
|
], AIModelResolver.prototype, "UpdateAIModel", null);
|
|
12329
|
+
__decorate([
|
|
12330
|
+
(0, server_1.Mutation)(() => AIModel_),
|
|
12331
|
+
__param(0, (0, server_1.Arg)('ID', () => server_1.Int)),
|
|
12332
|
+
__param(1, (0, server_1.Arg)('options___', () => server_1.DeleteOptionsInput)),
|
|
12333
|
+
__param(2, (0, server_1.Ctx)()),
|
|
12334
|
+
__param(3, (0, server_1.PubSub)()),
|
|
12335
|
+
__metadata("design:type", Function),
|
|
12336
|
+
__metadata("design:paramtypes", [Number, server_1.DeleteOptionsInput, Object, server_1.PubSubEngine]),
|
|
12337
|
+
__metadata("design:returntype", Promise)
|
|
12338
|
+
], AIModelResolver.prototype, "DeleteAIModel", null);
|
|
12124
12339
|
exports.AIModelResolver = AIModelResolver = __decorate([
|
|
12125
12340
|
(0, server_1.Resolver)(AIModel_)
|
|
12126
12341
|
], AIModelResolver);
|
|
@@ -12178,6 +12393,32 @@ __decorate([
|
|
|
12178
12393
|
exports.AIAction_ = AIAction_ = __decorate([
|
|
12179
12394
|
(0, server_1.ObjectType)({ description: 'List of all actions that are possible across all AI Models' })
|
|
12180
12395
|
], AIAction_);
|
|
12396
|
+
let CreateAIActionInput = class CreateAIActionInput {
|
|
12397
|
+
};
|
|
12398
|
+
exports.CreateAIActionInput = CreateAIActionInput;
|
|
12399
|
+
__decorate([
|
|
12400
|
+
(0, server_1.Field)(),
|
|
12401
|
+
__metadata("design:type", String)
|
|
12402
|
+
], CreateAIActionInput.prototype, "Name", void 0);
|
|
12403
|
+
__decorate([
|
|
12404
|
+
(0, server_1.Field)({ nullable: true }),
|
|
12405
|
+
__metadata("design:type", String)
|
|
12406
|
+
], CreateAIActionInput.prototype, "Description", void 0);
|
|
12407
|
+
__decorate([
|
|
12408
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
12409
|
+
__metadata("design:type", Number)
|
|
12410
|
+
], CreateAIActionInput.prototype, "DefaultModelID", void 0);
|
|
12411
|
+
__decorate([
|
|
12412
|
+
(0, server_1.Field)({ nullable: true }),
|
|
12413
|
+
__metadata("design:type", String)
|
|
12414
|
+
], CreateAIActionInput.prototype, "DefaultPrompt", void 0);
|
|
12415
|
+
__decorate([
|
|
12416
|
+
(0, server_1.Field)(() => Boolean),
|
|
12417
|
+
__metadata("design:type", Boolean)
|
|
12418
|
+
], CreateAIActionInput.prototype, "IsActive", void 0);
|
|
12419
|
+
exports.CreateAIActionInput = CreateAIActionInput = __decorate([
|
|
12420
|
+
(0, server_1.InputType)()
|
|
12421
|
+
], CreateAIActionInput);
|
|
12181
12422
|
let UpdateAIActionInput = class UpdateAIActionInput {
|
|
12182
12423
|
};
|
|
12183
12424
|
exports.UpdateAIActionInput = UpdateAIActionInput;
|
|
@@ -12281,6 +12522,9 @@ let AIActionResolver = class AIActionResolver extends server_1.ResolverBase {
|
|
|
12281
12522
|
const result = this.ArrayMapFieldNamesToCodeNames('Entity AI Actions', await dataSource.query(sSQL));
|
|
12282
12523
|
return result;
|
|
12283
12524
|
}
|
|
12525
|
+
async CreateAIAction(input, { dataSource, userPayload }, pubSub) {
|
|
12526
|
+
return this.CreateRecord('AI Actions', input, dataSource, userPayload, pubSub);
|
|
12527
|
+
}
|
|
12284
12528
|
async UpdateAIAction(input, { dataSource, userPayload }, pubSub) {
|
|
12285
12529
|
return this.UpdateRecord('AI Actions', input, dataSource, userPayload, pubSub);
|
|
12286
12530
|
}
|
|
@@ -12352,6 +12596,15 @@ __decorate([
|
|
|
12352
12596
|
__metadata("design:paramtypes", [AIAction_, Object, server_1.PubSubEngine]),
|
|
12353
12597
|
__metadata("design:returntype", Promise)
|
|
12354
12598
|
], AIActionResolver.prototype, "EntityAIActionsArray", null);
|
|
12599
|
+
__decorate([
|
|
12600
|
+
(0, server_1.Mutation)(() => AIAction_),
|
|
12601
|
+
__param(0, (0, server_1.Arg)('input', () => CreateAIActionInput)),
|
|
12602
|
+
__param(1, (0, server_1.Ctx)()),
|
|
12603
|
+
__param(2, (0, server_1.PubSub)()),
|
|
12604
|
+
__metadata("design:type", Function),
|
|
12605
|
+
__metadata("design:paramtypes", [CreateAIActionInput, Object, server_1.PubSubEngine]),
|
|
12606
|
+
__metadata("design:returntype", Promise)
|
|
12607
|
+
], AIActionResolver.prototype, "CreateAIAction", null);
|
|
12355
12608
|
__decorate([
|
|
12356
12609
|
(0, server_1.Mutation)(() => AIAction_),
|
|
12357
12610
|
__param(0, (0, server_1.Arg)('input', () => UpdateAIActionInput)),
|
|
@@ -12416,6 +12669,24 @@ __decorate([
|
|
|
12416
12669
|
exports.AIModelAction_ = AIModelAction_ = __decorate([
|
|
12417
12670
|
(0, server_1.ObjectType)({ description: 'Tracks the actions supported by each AI Model' })
|
|
12418
12671
|
], AIModelAction_);
|
|
12672
|
+
let CreateAIModelActionInput = class CreateAIModelActionInput {
|
|
12673
|
+
};
|
|
12674
|
+
exports.CreateAIModelActionInput = CreateAIModelActionInput;
|
|
12675
|
+
__decorate([
|
|
12676
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
12677
|
+
__metadata("design:type", Number)
|
|
12678
|
+
], CreateAIModelActionInput.prototype, "AIModelID", void 0);
|
|
12679
|
+
__decorate([
|
|
12680
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
12681
|
+
__metadata("design:type", Number)
|
|
12682
|
+
], CreateAIModelActionInput.prototype, "AIActionID", void 0);
|
|
12683
|
+
__decorate([
|
|
12684
|
+
(0, server_1.Field)(() => Boolean),
|
|
12685
|
+
__metadata("design:type", Boolean)
|
|
12686
|
+
], CreateAIModelActionInput.prototype, "IsActive", void 0);
|
|
12687
|
+
exports.CreateAIModelActionInput = CreateAIModelActionInput = __decorate([
|
|
12688
|
+
(0, server_1.InputType)()
|
|
12689
|
+
], CreateAIModelActionInput);
|
|
12419
12690
|
let UpdateAIModelActionInput = class UpdateAIModelActionInput {
|
|
12420
12691
|
};
|
|
12421
12692
|
exports.UpdateAIModelActionInput = UpdateAIModelActionInput;
|
|
@@ -12499,6 +12770,9 @@ let AIModelActionResolver = class AIModelActionResolver extends server_1.Resolve
|
|
|
12499
12770
|
const result = this.ArrayMapFieldNamesToCodeNames('AI Model Actions', await dataSource.query(sSQL));
|
|
12500
12771
|
return result;
|
|
12501
12772
|
}
|
|
12773
|
+
async CreateAIModelAction(input, { dataSource, userPayload }, pubSub) {
|
|
12774
|
+
return this.CreateRecord('AI Model Actions', input, dataSource, userPayload, pubSub);
|
|
12775
|
+
}
|
|
12502
12776
|
async UpdateAIModelAction(input, { dataSource, userPayload }, pubSub) {
|
|
12503
12777
|
return this.UpdateRecord('AI Model Actions', input, dataSource, userPayload, pubSub);
|
|
12504
12778
|
}
|
|
@@ -12552,6 +12826,15 @@ __decorate([
|
|
|
12552
12826
|
__metadata("design:paramtypes", [Object, server_1.PubSubEngine]),
|
|
12553
12827
|
__metadata("design:returntype", Promise)
|
|
12554
12828
|
], AIModelActionResolver.prototype, "AllAIModelActions", null);
|
|
12829
|
+
__decorate([
|
|
12830
|
+
(0, server_1.Mutation)(() => AIModelAction_),
|
|
12831
|
+
__param(0, (0, server_1.Arg)('input', () => CreateAIModelActionInput)),
|
|
12832
|
+
__param(1, (0, server_1.Ctx)()),
|
|
12833
|
+
__param(2, (0, server_1.PubSub)()),
|
|
12834
|
+
__metadata("design:type", Function),
|
|
12835
|
+
__metadata("design:paramtypes", [CreateAIModelActionInput, Object, server_1.PubSubEngine]),
|
|
12836
|
+
__metadata("design:returntype", Promise)
|
|
12837
|
+
], AIModelActionResolver.prototype, "CreateAIModelAction", null);
|
|
12555
12838
|
__decorate([
|
|
12556
12839
|
(0, server_1.Mutation)(() => AIModelAction_),
|
|
12557
12840
|
__param(0, (0, server_1.Arg)('input', () => UpdateAIModelActionInput)),
|
|
@@ -12656,6 +12939,60 @@ __decorate([
|
|
|
12656
12939
|
exports.EntityAIAction_ = EntityAIAction_ = __decorate([
|
|
12657
12940
|
(0, server_1.ObjectType)({ description: 'Tracks the AI actions that should be invoked based on changes to records within a given entity.' })
|
|
12658
12941
|
], EntityAIAction_);
|
|
12942
|
+
let CreateEntityAIActionInput = class CreateEntityAIActionInput {
|
|
12943
|
+
};
|
|
12944
|
+
exports.CreateEntityAIActionInput = CreateEntityAIActionInput;
|
|
12945
|
+
__decorate([
|
|
12946
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
12947
|
+
__metadata("design:type", Number)
|
|
12948
|
+
], CreateEntityAIActionInput.prototype, "EntityID", void 0);
|
|
12949
|
+
__decorate([
|
|
12950
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
12951
|
+
__metadata("design:type", Number)
|
|
12952
|
+
], CreateEntityAIActionInput.prototype, "AIActionID", void 0);
|
|
12953
|
+
__decorate([
|
|
12954
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
12955
|
+
__metadata("design:type", Number)
|
|
12956
|
+
], CreateEntityAIActionInput.prototype, "AIModelID", void 0);
|
|
12957
|
+
__decorate([
|
|
12958
|
+
(0, server_1.Field)(),
|
|
12959
|
+
__metadata("design:type", String)
|
|
12960
|
+
], CreateEntityAIActionInput.prototype, "Name", void 0);
|
|
12961
|
+
__decorate([
|
|
12962
|
+
(0, server_1.Field)({ nullable: true }),
|
|
12963
|
+
__metadata("design:type", String)
|
|
12964
|
+
], CreateEntityAIActionInput.prototype, "Prompt", void 0);
|
|
12965
|
+
__decorate([
|
|
12966
|
+
(0, server_1.Field)(),
|
|
12967
|
+
__metadata("design:type", String)
|
|
12968
|
+
], CreateEntityAIActionInput.prototype, "TriggerEvent", void 0);
|
|
12969
|
+
__decorate([
|
|
12970
|
+
(0, server_1.Field)(),
|
|
12971
|
+
__metadata("design:type", String)
|
|
12972
|
+
], CreateEntityAIActionInput.prototype, "UserMessage", void 0);
|
|
12973
|
+
__decorate([
|
|
12974
|
+
(0, server_1.Field)(),
|
|
12975
|
+
__metadata("design:type", String)
|
|
12976
|
+
], CreateEntityAIActionInput.prototype, "OutputType", void 0);
|
|
12977
|
+
__decorate([
|
|
12978
|
+
(0, server_1.Field)({ nullable: true }),
|
|
12979
|
+
__metadata("design:type", String)
|
|
12980
|
+
], CreateEntityAIActionInput.prototype, "OutputField", void 0);
|
|
12981
|
+
__decorate([
|
|
12982
|
+
(0, server_1.Field)(() => Boolean),
|
|
12983
|
+
__metadata("design:type", Boolean)
|
|
12984
|
+
], CreateEntityAIActionInput.prototype, "SkipIfOutputFieldNotEmpty", void 0);
|
|
12985
|
+
__decorate([
|
|
12986
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
12987
|
+
__metadata("design:type", Number)
|
|
12988
|
+
], CreateEntityAIActionInput.prototype, "OutputEntityID", void 0);
|
|
12989
|
+
__decorate([
|
|
12990
|
+
(0, server_1.Field)({ nullable: true }),
|
|
12991
|
+
__metadata("design:type", String)
|
|
12992
|
+
], CreateEntityAIActionInput.prototype, "Comments", void 0);
|
|
12993
|
+
exports.CreateEntityAIActionInput = CreateEntityAIActionInput = __decorate([
|
|
12994
|
+
(0, server_1.InputType)()
|
|
12995
|
+
], CreateEntityAIActionInput);
|
|
12659
12996
|
let UpdateEntityAIActionInput = class UpdateEntityAIActionInput {
|
|
12660
12997
|
};
|
|
12661
12998
|
exports.UpdateEntityAIActionInput = UpdateEntityAIActionInput;
|
|
@@ -12775,6 +13112,9 @@ let EntityAIActionResolver = class EntityAIActionResolver extends server_1.Resol
|
|
|
12775
13112
|
const result = this.ArrayMapFieldNamesToCodeNames('Entity AI Actions', await dataSource.query(sSQL));
|
|
12776
13113
|
return result;
|
|
12777
13114
|
}
|
|
13115
|
+
async CreateEntityAIAction(input, { dataSource, userPayload }, pubSub) {
|
|
13116
|
+
return this.CreateRecord('Entity AI Actions', input, dataSource, userPayload, pubSub);
|
|
13117
|
+
}
|
|
12778
13118
|
async UpdateEntityAIAction(input, { dataSource, userPayload }, pubSub) {
|
|
12779
13119
|
return this.UpdateRecord('Entity AI Actions', input, dataSource, userPayload, pubSub);
|
|
12780
13120
|
}
|
|
@@ -12828,6 +13168,15 @@ __decorate([
|
|
|
12828
13168
|
__metadata("design:paramtypes", [Object, server_1.PubSubEngine]),
|
|
12829
13169
|
__metadata("design:returntype", Promise)
|
|
12830
13170
|
], EntityAIActionResolver.prototype, "AllEntityAIActions", null);
|
|
13171
|
+
__decorate([
|
|
13172
|
+
(0, server_1.Mutation)(() => EntityAIAction_),
|
|
13173
|
+
__param(0, (0, server_1.Arg)('input', () => CreateEntityAIActionInput)),
|
|
13174
|
+
__param(1, (0, server_1.Ctx)()),
|
|
13175
|
+
__param(2, (0, server_1.PubSub)()),
|
|
13176
|
+
__metadata("design:type", Function),
|
|
13177
|
+
__metadata("design:paramtypes", [CreateEntityAIActionInput, Object, server_1.PubSubEngine]),
|
|
13178
|
+
__metadata("design:returntype", Promise)
|
|
13179
|
+
], EntityAIActionResolver.prototype, "CreateEntityAIAction", null);
|
|
12831
13180
|
__decorate([
|
|
12832
13181
|
(0, server_1.Mutation)(() => EntityAIAction_),
|
|
12833
13182
|
__param(0, (0, server_1.Arg)('input', () => UpdateEntityAIActionInput)),
|
|
@@ -12873,6 +13222,20 @@ __decorate([
|
|
|
12873
13222
|
exports.AIModelType_ = AIModelType_ = __decorate([
|
|
12874
13223
|
(0, server_1.ObjectType)({ description: 'Types of AI Models' })
|
|
12875
13224
|
], AIModelType_);
|
|
13225
|
+
let CreateAIModelTypeInput = class CreateAIModelTypeInput {
|
|
13226
|
+
};
|
|
13227
|
+
exports.CreateAIModelTypeInput = CreateAIModelTypeInput;
|
|
13228
|
+
__decorate([
|
|
13229
|
+
(0, server_1.Field)(),
|
|
13230
|
+
__metadata("design:type", String)
|
|
13231
|
+
], CreateAIModelTypeInput.prototype, "Name", void 0);
|
|
13232
|
+
__decorate([
|
|
13233
|
+
(0, server_1.Field)({ nullable: true }),
|
|
13234
|
+
__metadata("design:type", String)
|
|
13235
|
+
], CreateAIModelTypeInput.prototype, "Description", void 0);
|
|
13236
|
+
exports.CreateAIModelTypeInput = CreateAIModelTypeInput = __decorate([
|
|
13237
|
+
(0, server_1.InputType)()
|
|
13238
|
+
], CreateAIModelTypeInput);
|
|
12876
13239
|
let UpdateAIModelTypeInput = class UpdateAIModelTypeInput {
|
|
12877
13240
|
};
|
|
12878
13241
|
exports.UpdateAIModelTypeInput = UpdateAIModelTypeInput;
|
|
@@ -12958,9 +13321,16 @@ let AIModelTypeResolver = class AIModelTypeResolver extends server_1.ResolverBas
|
|
|
12958
13321
|
const result = this.ArrayMapFieldNamesToCodeNames('AI Models', await dataSource.query(sSQL));
|
|
12959
13322
|
return result;
|
|
12960
13323
|
}
|
|
13324
|
+
async CreateAIModelType(input, { dataSource, userPayload }, pubSub) {
|
|
13325
|
+
return this.CreateRecord('AI Model Types', input, dataSource, userPayload, pubSub);
|
|
13326
|
+
}
|
|
12961
13327
|
async UpdateAIModelType(input, { dataSource, userPayload }, pubSub) {
|
|
12962
13328
|
return this.UpdateRecord('AI Model Types', input, dataSource, userPayload, pubSub);
|
|
12963
13329
|
}
|
|
13330
|
+
async DeleteAIModelType(ID, options, { dataSource, userPayload }, pubSub) {
|
|
13331
|
+
const key = new core_1.CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
13332
|
+
return this.DeleteRecord('AI Model Types', key, options, dataSource, userPayload, pubSub);
|
|
13333
|
+
}
|
|
12964
13334
|
};
|
|
12965
13335
|
exports.AIModelTypeResolver = AIModelTypeResolver;
|
|
12966
13336
|
__decorate([
|
|
@@ -13016,6 +13386,15 @@ __decorate([
|
|
|
13016
13386
|
__metadata("design:paramtypes", [AIModelType_, Object, server_1.PubSubEngine]),
|
|
13017
13387
|
__metadata("design:returntype", Promise)
|
|
13018
13388
|
], AIModelTypeResolver.prototype, "AIModelsArray", null);
|
|
13389
|
+
__decorate([
|
|
13390
|
+
(0, server_1.Mutation)(() => AIModelType_),
|
|
13391
|
+
__param(0, (0, server_1.Arg)('input', () => CreateAIModelTypeInput)),
|
|
13392
|
+
__param(1, (0, server_1.Ctx)()),
|
|
13393
|
+
__param(2, (0, server_1.PubSub)()),
|
|
13394
|
+
__metadata("design:type", Function),
|
|
13395
|
+
__metadata("design:paramtypes", [CreateAIModelTypeInput, Object, server_1.PubSubEngine]),
|
|
13396
|
+
__metadata("design:returntype", Promise)
|
|
13397
|
+
], AIModelTypeResolver.prototype, "CreateAIModelType", null);
|
|
13019
13398
|
__decorate([
|
|
13020
13399
|
(0, server_1.Mutation)(() => AIModelType_),
|
|
13021
13400
|
__param(0, (0, server_1.Arg)('input', () => UpdateAIModelTypeInput)),
|
|
@@ -13025,6 +13404,16 @@ __decorate([
|
|
|
13025
13404
|
__metadata("design:paramtypes", [UpdateAIModelTypeInput, Object, server_1.PubSubEngine]),
|
|
13026
13405
|
__metadata("design:returntype", Promise)
|
|
13027
13406
|
], AIModelTypeResolver.prototype, "UpdateAIModelType", null);
|
|
13407
|
+
__decorate([
|
|
13408
|
+
(0, server_1.Mutation)(() => AIModelType_),
|
|
13409
|
+
__param(0, (0, server_1.Arg)('ID', () => server_1.Int)),
|
|
13410
|
+
__param(1, (0, server_1.Arg)('options___', () => server_1.DeleteOptionsInput)),
|
|
13411
|
+
__param(2, (0, server_1.Ctx)()),
|
|
13412
|
+
__param(3, (0, server_1.PubSub)()),
|
|
13413
|
+
__metadata("design:type", Function),
|
|
13414
|
+
__metadata("design:paramtypes", [Number, server_1.DeleteOptionsInput, Object, server_1.PubSubEngine]),
|
|
13415
|
+
__metadata("design:returntype", Promise)
|
|
13416
|
+
], AIModelTypeResolver.prototype, "DeleteAIModelType", null);
|
|
13028
13417
|
exports.AIModelTypeResolver = AIModelTypeResolver = __decorate([
|
|
13029
13418
|
(0, server_1.Resolver)(AIModelType_)
|
|
13030
13419
|
], AIModelTypeResolver);
|
|
@@ -29212,247 +29601,18 @@ __decorate([
|
|
|
29212
29601
|
exports.ListCategoryResolver = ListCategoryResolver = __decorate([
|
|
29213
29602
|
(0, server_1.Resolver)(ListCategory_)
|
|
29214
29603
|
], ListCategoryResolver);
|
|
29215
|
-
let
|
|
29604
|
+
let CommunicationProvider_ = class CommunicationProvider_ {
|
|
29216
29605
|
};
|
|
29217
|
-
exports.
|
|
29606
|
+
exports.CommunicationProvider_ = CommunicationProvider_;
|
|
29218
29607
|
__decorate([
|
|
29219
29608
|
(0, server_1.Field)(() => server_1.Int),
|
|
29220
29609
|
__metadata("design:type", Number)
|
|
29221
|
-
],
|
|
29610
|
+
], CommunicationProvider_.prototype, "ID", void 0);
|
|
29222
29611
|
__decorate([
|
|
29223
29612
|
(0, server_1.Field)(),
|
|
29224
29613
|
(0, class_validator_1.MaxLength)(510),
|
|
29225
29614
|
__metadata("design:type", String)
|
|
29226
|
-
],
|
|
29227
|
-
__decorate([
|
|
29228
|
-
(0, server_1.Field)(),
|
|
29229
|
-
__metadata("design:type", String)
|
|
29230
|
-
], CommunicationTemplate_.prototype, "Content", void 0);
|
|
29231
|
-
__decorate([
|
|
29232
|
-
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
29233
|
-
__metadata("design:type", Number)
|
|
29234
|
-
], CommunicationTemplate_.prototype, "ParentID", void 0);
|
|
29235
|
-
__decorate([
|
|
29236
|
-
(0, server_1.Field)({ nullable: true }),
|
|
29237
|
-
__metadata("design:type", String)
|
|
29238
|
-
], CommunicationTemplate_.prototype, "Comments", void 0);
|
|
29239
|
-
__decorate([
|
|
29240
|
-
(0, server_1.Field)(),
|
|
29241
|
-
(0, class_validator_1.MaxLength)(8),
|
|
29242
|
-
__metadata("design:type", Date)
|
|
29243
|
-
], CommunicationTemplate_.prototype, "CreatedAt", void 0);
|
|
29244
|
-
__decorate([
|
|
29245
|
-
(0, server_1.Field)(),
|
|
29246
|
-
(0, class_validator_1.MaxLength)(8),
|
|
29247
|
-
__metadata("design:type", Date)
|
|
29248
|
-
], CommunicationTemplate_.prototype, "UpdatedAt", void 0);
|
|
29249
|
-
__decorate([
|
|
29250
|
-
(0, server_1.Field)({ nullable: true }),
|
|
29251
|
-
(0, class_validator_1.MaxLength)(510),
|
|
29252
|
-
__metadata("design:type", String)
|
|
29253
|
-
], CommunicationTemplate_.prototype, "Parent", void 0);
|
|
29254
|
-
__decorate([
|
|
29255
|
-
(0, server_1.Field)(() => [mj_core_schema_server_object_types.CommunicationTemplate_]),
|
|
29256
|
-
__metadata("design:type", Array)
|
|
29257
|
-
], CommunicationTemplate_.prototype, "CommunicationTemplatesArray", void 0);
|
|
29258
|
-
exports.CommunicationTemplate_ = CommunicationTemplate_ = __decorate([
|
|
29259
|
-
(0, server_1.ObjectType)({ description: 'Reusable templates for communication.' })
|
|
29260
|
-
], CommunicationTemplate_);
|
|
29261
|
-
let CreateCommunicationTemplateInput = class CreateCommunicationTemplateInput {
|
|
29262
|
-
};
|
|
29263
|
-
exports.CreateCommunicationTemplateInput = CreateCommunicationTemplateInput;
|
|
29264
|
-
__decorate([
|
|
29265
|
-
(0, server_1.Field)(),
|
|
29266
|
-
__metadata("design:type", String)
|
|
29267
|
-
], CreateCommunicationTemplateInput.prototype, "Name", void 0);
|
|
29268
|
-
__decorate([
|
|
29269
|
-
(0, server_1.Field)(),
|
|
29270
|
-
__metadata("design:type", String)
|
|
29271
|
-
], CreateCommunicationTemplateInput.prototype, "Content", void 0);
|
|
29272
|
-
__decorate([
|
|
29273
|
-
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
29274
|
-
__metadata("design:type", Number)
|
|
29275
|
-
], CreateCommunicationTemplateInput.prototype, "ParentID", void 0);
|
|
29276
|
-
__decorate([
|
|
29277
|
-
(0, server_1.Field)({ nullable: true }),
|
|
29278
|
-
__metadata("design:type", String)
|
|
29279
|
-
], CreateCommunicationTemplateInput.prototype, "Comments", void 0);
|
|
29280
|
-
exports.CreateCommunicationTemplateInput = CreateCommunicationTemplateInput = __decorate([
|
|
29281
|
-
(0, server_1.InputType)()
|
|
29282
|
-
], CreateCommunicationTemplateInput);
|
|
29283
|
-
let UpdateCommunicationTemplateInput = class UpdateCommunicationTemplateInput {
|
|
29284
|
-
};
|
|
29285
|
-
exports.UpdateCommunicationTemplateInput = UpdateCommunicationTemplateInput;
|
|
29286
|
-
__decorate([
|
|
29287
|
-
(0, server_1.Field)(() => server_1.Int),
|
|
29288
|
-
__metadata("design:type", Number)
|
|
29289
|
-
], UpdateCommunicationTemplateInput.prototype, "ID", void 0);
|
|
29290
|
-
__decorate([
|
|
29291
|
-
(0, server_1.Field)(),
|
|
29292
|
-
__metadata("design:type", String)
|
|
29293
|
-
], UpdateCommunicationTemplateInput.prototype, "Name", void 0);
|
|
29294
|
-
__decorate([
|
|
29295
|
-
(0, server_1.Field)(),
|
|
29296
|
-
__metadata("design:type", String)
|
|
29297
|
-
], UpdateCommunicationTemplateInput.prototype, "Content", void 0);
|
|
29298
|
-
__decorate([
|
|
29299
|
-
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
29300
|
-
__metadata("design:type", Number)
|
|
29301
|
-
], UpdateCommunicationTemplateInput.prototype, "ParentID", void 0);
|
|
29302
|
-
__decorate([
|
|
29303
|
-
(0, server_1.Field)({ nullable: true }),
|
|
29304
|
-
__metadata("design:type", String)
|
|
29305
|
-
], UpdateCommunicationTemplateInput.prototype, "Comments", void 0);
|
|
29306
|
-
__decorate([
|
|
29307
|
-
(0, server_1.Field)(() => [server_1.KeyValuePairInput], { nullable: true }),
|
|
29308
|
-
__metadata("design:type", Array)
|
|
29309
|
-
], UpdateCommunicationTemplateInput.prototype, "OldValues___", void 0);
|
|
29310
|
-
exports.UpdateCommunicationTemplateInput = UpdateCommunicationTemplateInput = __decorate([
|
|
29311
|
-
(0, server_1.InputType)()
|
|
29312
|
-
], UpdateCommunicationTemplateInput);
|
|
29313
|
-
let RunCommunicationTemplateViewResult = class RunCommunicationTemplateViewResult {
|
|
29314
|
-
};
|
|
29315
|
-
exports.RunCommunicationTemplateViewResult = RunCommunicationTemplateViewResult;
|
|
29316
|
-
__decorate([
|
|
29317
|
-
(0, server_1.Field)(() => [CommunicationTemplate_]),
|
|
29318
|
-
__metadata("design:type", Array)
|
|
29319
|
-
], RunCommunicationTemplateViewResult.prototype, "Results", void 0);
|
|
29320
|
-
__decorate([
|
|
29321
|
-
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
29322
|
-
__metadata("design:type", Number)
|
|
29323
|
-
], RunCommunicationTemplateViewResult.prototype, "UserViewRunID", void 0);
|
|
29324
|
-
__decorate([
|
|
29325
|
-
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
29326
|
-
__metadata("design:type", Number)
|
|
29327
|
-
], RunCommunicationTemplateViewResult.prototype, "RowCount", void 0);
|
|
29328
|
-
__decorate([
|
|
29329
|
-
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
29330
|
-
__metadata("design:type", Number)
|
|
29331
|
-
], RunCommunicationTemplateViewResult.prototype, "TotalRowCount", void 0);
|
|
29332
|
-
__decorate([
|
|
29333
|
-
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
29334
|
-
__metadata("design:type", Number)
|
|
29335
|
-
], RunCommunicationTemplateViewResult.prototype, "ExecutionTime", void 0);
|
|
29336
|
-
__decorate([
|
|
29337
|
-
(0, server_1.Field)({ nullable: true }),
|
|
29338
|
-
__metadata("design:type", String)
|
|
29339
|
-
], RunCommunicationTemplateViewResult.prototype, "ErrorMessage", void 0);
|
|
29340
|
-
__decorate([
|
|
29341
|
-
(0, server_1.Field)(() => Boolean, { nullable: false }),
|
|
29342
|
-
__metadata("design:type", Boolean)
|
|
29343
|
-
], RunCommunicationTemplateViewResult.prototype, "Success", void 0);
|
|
29344
|
-
exports.RunCommunicationTemplateViewResult = RunCommunicationTemplateViewResult = __decorate([
|
|
29345
|
-
(0, server_1.ObjectType)()
|
|
29346
|
-
], RunCommunicationTemplateViewResult);
|
|
29347
|
-
let CommunicationTemplateResolver = class CommunicationTemplateResolver extends server_1.ResolverBase {
|
|
29348
|
-
async RunCommunicationTemplateViewByID(input, { dataSource, userPayload }, pubSub) {
|
|
29349
|
-
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
29350
|
-
}
|
|
29351
|
-
async RunCommunicationTemplateViewByName(input, { dataSource, userPayload }, pubSub) {
|
|
29352
|
-
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
29353
|
-
}
|
|
29354
|
-
async RunCommunicationTemplateDynamicView(input, { dataSource, userPayload }, pubSub) {
|
|
29355
|
-
input.EntityName = 'Communication Templates';
|
|
29356
|
-
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
29357
|
-
}
|
|
29358
|
-
async CommunicationTemplate(ID, { dataSource, userPayload }, pubSub) {
|
|
29359
|
-
this.CheckUserReadPermissions('Communication Templates', userPayload);
|
|
29360
|
-
const sSQL = `SELECT * FROM [${core_1.Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCommunicationTemplates] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Communication Templates', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
29361
|
-
const result = this.MapFieldNamesToCodeNames('Communication Templates', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
|
|
29362
|
-
return result;
|
|
29363
|
-
}
|
|
29364
|
-
async CommunicationTemplatesArray(communicationtemplate_, { dataSource, userPayload }, pubSub) {
|
|
29365
|
-
this.CheckUserReadPermissions('Communication Templates', userPayload);
|
|
29366
|
-
const sSQL = `SELECT * FROM [${core_1.Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCommunicationTemplates] WHERE [ParentID]=${communicationtemplate_.ID} ` + this.getRowLevelSecurityWhereClause('Communication Templates', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
29367
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Communication Templates', await dataSource.query(sSQL));
|
|
29368
|
-
return result;
|
|
29369
|
-
}
|
|
29370
|
-
async CreateCommunicationTemplate(input, { dataSource, userPayload }, pubSub) {
|
|
29371
|
-
return this.CreateRecord('Communication Templates', input, dataSource, userPayload, pubSub);
|
|
29372
|
-
}
|
|
29373
|
-
async UpdateCommunicationTemplate(input, { dataSource, userPayload }, pubSub) {
|
|
29374
|
-
return this.UpdateRecord('Communication Templates', input, dataSource, userPayload, pubSub);
|
|
29375
|
-
}
|
|
29376
|
-
};
|
|
29377
|
-
exports.CommunicationTemplateResolver = CommunicationTemplateResolver;
|
|
29378
|
-
__decorate([
|
|
29379
|
-
(0, server_1.Query)(() => RunCommunicationTemplateViewResult),
|
|
29380
|
-
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByIDInput)),
|
|
29381
|
-
__param(1, (0, server_1.Ctx)()),
|
|
29382
|
-
__param(2, (0, server_1.PubSub)()),
|
|
29383
|
-
__metadata("design:type", Function),
|
|
29384
|
-
__metadata("design:paramtypes", [server_1.RunViewByIDInput, Object, server_1.PubSubEngine]),
|
|
29385
|
-
__metadata("design:returntype", Promise)
|
|
29386
|
-
], CommunicationTemplateResolver.prototype, "RunCommunicationTemplateViewByID", null);
|
|
29387
|
-
__decorate([
|
|
29388
|
-
(0, server_1.Query)(() => RunCommunicationTemplateViewResult),
|
|
29389
|
-
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByNameInput)),
|
|
29390
|
-
__param(1, (0, server_1.Ctx)()),
|
|
29391
|
-
__param(2, (0, server_1.PubSub)()),
|
|
29392
|
-
__metadata("design:type", Function),
|
|
29393
|
-
__metadata("design:paramtypes", [server_1.RunViewByNameInput, Object, server_1.PubSubEngine]),
|
|
29394
|
-
__metadata("design:returntype", Promise)
|
|
29395
|
-
], CommunicationTemplateResolver.prototype, "RunCommunicationTemplateViewByName", null);
|
|
29396
|
-
__decorate([
|
|
29397
|
-
(0, server_1.Query)(() => RunCommunicationTemplateViewResult),
|
|
29398
|
-
__param(0, (0, server_1.Arg)('input', () => server_1.RunDynamicViewInput)),
|
|
29399
|
-
__param(1, (0, server_1.Ctx)()),
|
|
29400
|
-
__param(2, (0, server_1.PubSub)()),
|
|
29401
|
-
__metadata("design:type", Function),
|
|
29402
|
-
__metadata("design:paramtypes", [server_1.RunDynamicViewInput, Object, server_1.PubSubEngine]),
|
|
29403
|
-
__metadata("design:returntype", Promise)
|
|
29404
|
-
], CommunicationTemplateResolver.prototype, "RunCommunicationTemplateDynamicView", null);
|
|
29405
|
-
__decorate([
|
|
29406
|
-
(0, server_1.Query)(() => CommunicationTemplate_, { nullable: true }),
|
|
29407
|
-
__param(0, (0, server_1.Arg)('ID', () => server_1.Int)),
|
|
29408
|
-
__param(1, (0, server_1.Ctx)()),
|
|
29409
|
-
__param(2, (0, server_1.PubSub)()),
|
|
29410
|
-
__metadata("design:type", Function),
|
|
29411
|
-
__metadata("design:paramtypes", [Number, Object, server_1.PubSubEngine]),
|
|
29412
|
-
__metadata("design:returntype", Promise)
|
|
29413
|
-
], CommunicationTemplateResolver.prototype, "CommunicationTemplate", null);
|
|
29414
|
-
__decorate([
|
|
29415
|
-
(0, server_1.FieldResolver)(() => [mj_core_schema_server_object_types.CommunicationTemplate_]),
|
|
29416
|
-
__param(0, (0, server_1.Root)()),
|
|
29417
|
-
__param(1, (0, server_1.Ctx)()),
|
|
29418
|
-
__param(2, (0, server_1.PubSub)()),
|
|
29419
|
-
__metadata("design:type", Function),
|
|
29420
|
-
__metadata("design:paramtypes", [CommunicationTemplate_, Object, server_1.PubSubEngine]),
|
|
29421
|
-
__metadata("design:returntype", Promise)
|
|
29422
|
-
], CommunicationTemplateResolver.prototype, "CommunicationTemplatesArray", null);
|
|
29423
|
-
__decorate([
|
|
29424
|
-
(0, server_1.Mutation)(() => CommunicationTemplate_),
|
|
29425
|
-
__param(0, (0, server_1.Arg)('input', () => CreateCommunicationTemplateInput)),
|
|
29426
|
-
__param(1, (0, server_1.Ctx)()),
|
|
29427
|
-
__param(2, (0, server_1.PubSub)()),
|
|
29428
|
-
__metadata("design:type", Function),
|
|
29429
|
-
__metadata("design:paramtypes", [CreateCommunicationTemplateInput, Object, server_1.PubSubEngine]),
|
|
29430
|
-
__metadata("design:returntype", Promise)
|
|
29431
|
-
], CommunicationTemplateResolver.prototype, "CreateCommunicationTemplate", null);
|
|
29432
|
-
__decorate([
|
|
29433
|
-
(0, server_1.Mutation)(() => CommunicationTemplate_),
|
|
29434
|
-
__param(0, (0, server_1.Arg)('input', () => UpdateCommunicationTemplateInput)),
|
|
29435
|
-
__param(1, (0, server_1.Ctx)()),
|
|
29436
|
-
__param(2, (0, server_1.PubSub)()),
|
|
29437
|
-
__metadata("design:type", Function),
|
|
29438
|
-
__metadata("design:paramtypes", [UpdateCommunicationTemplateInput, Object, server_1.PubSubEngine]),
|
|
29439
|
-
__metadata("design:returntype", Promise)
|
|
29440
|
-
], CommunicationTemplateResolver.prototype, "UpdateCommunicationTemplate", null);
|
|
29441
|
-
exports.CommunicationTemplateResolver = CommunicationTemplateResolver = __decorate([
|
|
29442
|
-
(0, server_1.Resolver)(CommunicationTemplate_)
|
|
29443
|
-
], CommunicationTemplateResolver);
|
|
29444
|
-
let CommunicationProvider_ = class CommunicationProvider_ {
|
|
29445
|
-
};
|
|
29446
|
-
exports.CommunicationProvider_ = CommunicationProvider_;
|
|
29447
|
-
__decorate([
|
|
29448
|
-
(0, server_1.Field)(() => server_1.Int),
|
|
29449
|
-
__metadata("design:type", Number)
|
|
29450
|
-
], CommunicationProvider_.prototype, "ID", void 0);
|
|
29451
|
-
__decorate([
|
|
29452
|
-
(0, server_1.Field)(),
|
|
29453
|
-
(0, class_validator_1.MaxLength)(510),
|
|
29454
|
-
__metadata("design:type", String)
|
|
29455
|
-
], CommunicationProvider_.prototype, "Name", void 0);
|
|
29615
|
+
], CommunicationProvider_.prototype, "Name", void 0);
|
|
29456
29616
|
__decorate([
|
|
29457
29617
|
(0, server_1.Field)({ nullable: true }),
|
|
29458
29618
|
__metadata("design:type", String)
|
|
@@ -29718,6 +29878,16 @@ __decorate([
|
|
|
29718
29878
|
(0, class_validator_1.MaxLength)(40),
|
|
29719
29879
|
__metadata("design:type", String)
|
|
29720
29880
|
], CommunicationRun_.prototype, "Status", void 0);
|
|
29881
|
+
__decorate([
|
|
29882
|
+
(0, server_1.Field)({ nullable: true }),
|
|
29883
|
+
(0, class_validator_1.MaxLength)(8),
|
|
29884
|
+
__metadata("design:type", Date)
|
|
29885
|
+
], CommunicationRun_.prototype, "StartedAt", void 0);
|
|
29886
|
+
__decorate([
|
|
29887
|
+
(0, server_1.Field)({ nullable: true }),
|
|
29888
|
+
(0, class_validator_1.MaxLength)(8),
|
|
29889
|
+
__metadata("design:type", Date)
|
|
29890
|
+
], CommunicationRun_.prototype, "EndedAt", void 0);
|
|
29721
29891
|
__decorate([
|
|
29722
29892
|
(0, server_1.Field)({ nullable: true }),
|
|
29723
29893
|
__metadata("design:type", String)
|
|
@@ -29763,6 +29933,14 @@ __decorate([
|
|
|
29763
29933
|
(0, server_1.Field)(),
|
|
29764
29934
|
__metadata("design:type", String)
|
|
29765
29935
|
], CreateCommunicationRunInput.prototype, "Status", void 0);
|
|
29936
|
+
__decorate([
|
|
29937
|
+
(0, server_1.Field)({ nullable: true }),
|
|
29938
|
+
__metadata("design:type", Date)
|
|
29939
|
+
], CreateCommunicationRunInput.prototype, "StartedAt", void 0);
|
|
29940
|
+
__decorate([
|
|
29941
|
+
(0, server_1.Field)({ nullable: true }),
|
|
29942
|
+
__metadata("design:type", Date)
|
|
29943
|
+
], CreateCommunicationRunInput.prototype, "EndedAt", void 0);
|
|
29766
29944
|
__decorate([
|
|
29767
29945
|
(0, server_1.Field)({ nullable: true }),
|
|
29768
29946
|
__metadata("design:type", String)
|
|
@@ -29793,6 +29971,14 @@ __decorate([
|
|
|
29793
29971
|
(0, server_1.Field)(),
|
|
29794
29972
|
__metadata("design:type", String)
|
|
29795
29973
|
], UpdateCommunicationRunInput.prototype, "Status", void 0);
|
|
29974
|
+
__decorate([
|
|
29975
|
+
(0, server_1.Field)({ nullable: true }),
|
|
29976
|
+
__metadata("design:type", Date)
|
|
29977
|
+
], UpdateCommunicationRunInput.prototype, "StartedAt", void 0);
|
|
29978
|
+
__decorate([
|
|
29979
|
+
(0, server_1.Field)({ nullable: true }),
|
|
29980
|
+
__metadata("design:type", Date)
|
|
29981
|
+
], UpdateCommunicationRunInput.prototype, "EndedAt", void 0);
|
|
29796
29982
|
__decorate([
|
|
29797
29983
|
(0, server_1.Field)({ nullable: true }),
|
|
29798
29984
|
__metadata("design:type", String)
|
|
@@ -30493,6 +30679,10 @@ __decorate([
|
|
|
30493
30679
|
(0, server_1.Field)(() => [mj_core_schema_server_object_types.CommunicationProviderMessageType_]),
|
|
30494
30680
|
__metadata("design:type", Array)
|
|
30495
30681
|
], CommunicationBaseMessageType_.prototype, "CommunicationProviderMessageTypesArray", void 0);
|
|
30682
|
+
__decorate([
|
|
30683
|
+
(0, server_1.Field)(() => [mj_core_schema_server_object_types.EntityCommunicationMessageType_]),
|
|
30684
|
+
__metadata("design:type", Array)
|
|
30685
|
+
], CommunicationBaseMessageType_.prototype, "EntityCommunicationMessageTypesArray", void 0);
|
|
30496
30686
|
exports.CommunicationBaseMessageType_ = CommunicationBaseMessageType_ = __decorate([
|
|
30497
30687
|
(0, server_1.ObjectType)({ description: 'Base message types and their supported functionalities.' })
|
|
30498
30688
|
], CommunicationBaseMessageType_);
|
|
@@ -30613,6 +30803,12 @@ let CommunicationBaseMessageTypeResolver = class CommunicationBaseMessageTypeRes
|
|
|
30613
30803
|
const result = this.ArrayMapFieldNamesToCodeNames('Communication Provider Message Types', await dataSource.query(sSQL));
|
|
30614
30804
|
return result;
|
|
30615
30805
|
}
|
|
30806
|
+
async EntityCommunicationMessageTypesArray(communicationbasemessagetype_, { dataSource, userPayload }, pubSub) {
|
|
30807
|
+
this.CheckUserReadPermissions('Entity Communication Message Types', userPayload);
|
|
30808
|
+
const sSQL = `SELECT * FROM [${core_1.Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityCommunicationMessageTypes] WHERE [BaseMessageTypeID]=${communicationbasemessagetype_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Communication Message Types', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
30809
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Communication Message Types', await dataSource.query(sSQL));
|
|
30810
|
+
return result;
|
|
30811
|
+
}
|
|
30616
30812
|
async CreateCommunicationBaseMessageType(input, { dataSource, userPayload }, pubSub) {
|
|
30617
30813
|
return this.CreateRecord('Communication Base Message Types', input, dataSource, userPayload, pubSub);
|
|
30618
30814
|
}
|
|
@@ -30666,6 +30862,15 @@ __decorate([
|
|
|
30666
30862
|
__metadata("design:paramtypes", [CommunicationBaseMessageType_, Object, server_1.PubSubEngine]),
|
|
30667
30863
|
__metadata("design:returntype", Promise)
|
|
30668
30864
|
], CommunicationBaseMessageTypeResolver.prototype, "CommunicationProviderMessageTypesArray", null);
|
|
30865
|
+
__decorate([
|
|
30866
|
+
(0, server_1.FieldResolver)(() => [mj_core_schema_server_object_types.EntityCommunicationMessageType_]),
|
|
30867
|
+
__param(0, (0, server_1.Root)()),
|
|
30868
|
+
__param(1, (0, server_1.Ctx)()),
|
|
30869
|
+
__param(2, (0, server_1.PubSub)()),
|
|
30870
|
+
__metadata("design:type", Function),
|
|
30871
|
+
__metadata("design:paramtypes", [CommunicationBaseMessageType_, Object, server_1.PubSubEngine]),
|
|
30872
|
+
__metadata("design:returntype", Promise)
|
|
30873
|
+
], CommunicationBaseMessageTypeResolver.prototype, "EntityCommunicationMessageTypesArray", null);
|
|
30669
30874
|
__decorate([
|
|
30670
30875
|
(0, server_1.Mutation)(() => CommunicationBaseMessageType_),
|
|
30671
30876
|
__param(0, (0, server_1.Arg)('input', () => CreateCommunicationBaseMessageTypeInput)),
|
|
@@ -30687,4 +30892,2550 @@ __decorate([
|
|
|
30687
30892
|
exports.CommunicationBaseMessageTypeResolver = CommunicationBaseMessageTypeResolver = __decorate([
|
|
30688
30893
|
(0, server_1.Resolver)(CommunicationBaseMessageType_)
|
|
30689
30894
|
], CommunicationBaseMessageTypeResolver);
|
|
30895
|
+
let Template_ = class Template_ {
|
|
30896
|
+
};
|
|
30897
|
+
exports.Template_ = Template_;
|
|
30898
|
+
__decorate([
|
|
30899
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
30900
|
+
__metadata("design:type", Number)
|
|
30901
|
+
], Template_.prototype, "ID", void 0);
|
|
30902
|
+
__decorate([
|
|
30903
|
+
(0, server_1.Field)({ description: 'Name of the template' }),
|
|
30904
|
+
(0, class_validator_1.MaxLength)(510),
|
|
30905
|
+
__metadata("design:type", String)
|
|
30906
|
+
], Template_.prototype, "Name", void 0);
|
|
30907
|
+
__decorate([
|
|
30908
|
+
(0, server_1.Field)({ nullable: true, description: 'Description of the template' }),
|
|
30909
|
+
__metadata("design:type", String)
|
|
30910
|
+
], Template_.prototype, "Description", void 0);
|
|
30911
|
+
__decorate([
|
|
30912
|
+
(0, server_1.Field)({ nullable: true, description: 'This prompt will be used by the AI to generate template content as requested by the user.' }),
|
|
30913
|
+
__metadata("design:type", String)
|
|
30914
|
+
], Template_.prototype, "UserPrompt", void 0);
|
|
30915
|
+
__decorate([
|
|
30916
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true, description: 'Optional, Category that this template is part of' }),
|
|
30917
|
+
__metadata("design:type", Number)
|
|
30918
|
+
], Template_.prototype, "CategoryID", void 0);
|
|
30919
|
+
__decorate([
|
|
30920
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
30921
|
+
__metadata("design:type", Number)
|
|
30922
|
+
], Template_.prototype, "UserID", void 0);
|
|
30923
|
+
__decorate([
|
|
30924
|
+
(0, server_1.Field)({ nullable: true, description: 'Optional, if provided, this template will not be available for use until the specified date. Requires IsActive to be set to 1' }),
|
|
30925
|
+
(0, class_validator_1.MaxLength)(8),
|
|
30926
|
+
__metadata("design:type", Date)
|
|
30927
|
+
], Template_.prototype, "ActiveAt", void 0);
|
|
30928
|
+
__decorate([
|
|
30929
|
+
(0, server_1.Field)({ nullable: true, description: 'Optional, if provided, this template will not be available for use after the specified date. If IsActive=0, this has no effect.' }),
|
|
30930
|
+
(0, class_validator_1.MaxLength)(8),
|
|
30931
|
+
__metadata("design:type", Date)
|
|
30932
|
+
], Template_.prototype, "DisabledAt", void 0);
|
|
30933
|
+
__decorate([
|
|
30934
|
+
(0, server_1.Field)(() => Boolean, { description: 'If set to 0, the template will be disabled regardless of the values in ActiveAt/DisabledAt. ' }),
|
|
30935
|
+
__metadata("design:type", Boolean)
|
|
30936
|
+
], Template_.prototype, "IsActive", void 0);
|
|
30937
|
+
__decorate([
|
|
30938
|
+
(0, server_1.Field)(),
|
|
30939
|
+
(0, class_validator_1.MaxLength)(8),
|
|
30940
|
+
__metadata("design:type", Date)
|
|
30941
|
+
], Template_.prototype, "CreatedAt", void 0);
|
|
30942
|
+
__decorate([
|
|
30943
|
+
(0, server_1.Field)(),
|
|
30944
|
+
(0, class_validator_1.MaxLength)(8),
|
|
30945
|
+
__metadata("design:type", Date)
|
|
30946
|
+
], Template_.prototype, "UpdatedAt", void 0);
|
|
30947
|
+
__decorate([
|
|
30948
|
+
(0, server_1.Field)({ nullable: true }),
|
|
30949
|
+
(0, class_validator_1.MaxLength)(510),
|
|
30950
|
+
__metadata("design:type", String)
|
|
30951
|
+
], Template_.prototype, "Category", void 0);
|
|
30952
|
+
__decorate([
|
|
30953
|
+
(0, server_1.Field)(),
|
|
30954
|
+
(0, class_validator_1.MaxLength)(200),
|
|
30955
|
+
__metadata("design:type", String)
|
|
30956
|
+
], Template_.prototype, "User", void 0);
|
|
30957
|
+
__decorate([
|
|
30958
|
+
(0, server_1.Field)(() => [mj_core_schema_server_object_types.TemplateParam_]),
|
|
30959
|
+
__metadata("design:type", Array)
|
|
30960
|
+
], Template_.prototype, "TemplateParamsArray", void 0);
|
|
30961
|
+
__decorate([
|
|
30962
|
+
(0, server_1.Field)(() => [mj_core_schema_server_object_types.TemplateContent_]),
|
|
30963
|
+
__metadata("design:type", Array)
|
|
30964
|
+
], Template_.prototype, "TemplateContentsArray", void 0);
|
|
30965
|
+
exports.Template_ = Template_ = __decorate([
|
|
30966
|
+
(0, server_1.ObjectType)({ description: 'Templates are used for dynamic expansion of a static template with data from a given context. Templates can be used to create documents, messages and anything else that requires dynamic document creation merging together static text, data and lightweight logic' })
|
|
30967
|
+
], Template_);
|
|
30968
|
+
let CreateTemplateInput = class CreateTemplateInput {
|
|
30969
|
+
};
|
|
30970
|
+
exports.CreateTemplateInput = CreateTemplateInput;
|
|
30971
|
+
__decorate([
|
|
30972
|
+
(0, server_1.Field)(),
|
|
30973
|
+
__metadata("design:type", String)
|
|
30974
|
+
], CreateTemplateInput.prototype, "Name", void 0);
|
|
30975
|
+
__decorate([
|
|
30976
|
+
(0, server_1.Field)({ nullable: true }),
|
|
30977
|
+
__metadata("design:type", String)
|
|
30978
|
+
], CreateTemplateInput.prototype, "Description", void 0);
|
|
30979
|
+
__decorate([
|
|
30980
|
+
(0, server_1.Field)({ nullable: true }),
|
|
30981
|
+
__metadata("design:type", String)
|
|
30982
|
+
], CreateTemplateInput.prototype, "UserPrompt", void 0);
|
|
30983
|
+
__decorate([
|
|
30984
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
30985
|
+
__metadata("design:type", Number)
|
|
30986
|
+
], CreateTemplateInput.prototype, "CategoryID", void 0);
|
|
30987
|
+
__decorate([
|
|
30988
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
30989
|
+
__metadata("design:type", Number)
|
|
30990
|
+
], CreateTemplateInput.prototype, "UserID", void 0);
|
|
30991
|
+
__decorate([
|
|
30992
|
+
(0, server_1.Field)({ nullable: true }),
|
|
30993
|
+
__metadata("design:type", Date)
|
|
30994
|
+
], CreateTemplateInput.prototype, "ActiveAt", void 0);
|
|
30995
|
+
__decorate([
|
|
30996
|
+
(0, server_1.Field)({ nullable: true }),
|
|
30997
|
+
__metadata("design:type", Date)
|
|
30998
|
+
], CreateTemplateInput.prototype, "DisabledAt", void 0);
|
|
30999
|
+
__decorate([
|
|
31000
|
+
(0, server_1.Field)(() => Boolean),
|
|
31001
|
+
__metadata("design:type", Boolean)
|
|
31002
|
+
], CreateTemplateInput.prototype, "IsActive", void 0);
|
|
31003
|
+
exports.CreateTemplateInput = CreateTemplateInput = __decorate([
|
|
31004
|
+
(0, server_1.InputType)()
|
|
31005
|
+
], CreateTemplateInput);
|
|
31006
|
+
let UpdateTemplateInput = class UpdateTemplateInput {
|
|
31007
|
+
};
|
|
31008
|
+
exports.UpdateTemplateInput = UpdateTemplateInput;
|
|
31009
|
+
__decorate([
|
|
31010
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
31011
|
+
__metadata("design:type", Number)
|
|
31012
|
+
], UpdateTemplateInput.prototype, "ID", void 0);
|
|
31013
|
+
__decorate([
|
|
31014
|
+
(0, server_1.Field)(),
|
|
31015
|
+
__metadata("design:type", String)
|
|
31016
|
+
], UpdateTemplateInput.prototype, "Name", void 0);
|
|
31017
|
+
__decorate([
|
|
31018
|
+
(0, server_1.Field)({ nullable: true }),
|
|
31019
|
+
__metadata("design:type", String)
|
|
31020
|
+
], UpdateTemplateInput.prototype, "Description", void 0);
|
|
31021
|
+
__decorate([
|
|
31022
|
+
(0, server_1.Field)({ nullable: true }),
|
|
31023
|
+
__metadata("design:type", String)
|
|
31024
|
+
], UpdateTemplateInput.prototype, "UserPrompt", void 0);
|
|
31025
|
+
__decorate([
|
|
31026
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
31027
|
+
__metadata("design:type", Number)
|
|
31028
|
+
], UpdateTemplateInput.prototype, "CategoryID", void 0);
|
|
31029
|
+
__decorate([
|
|
31030
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
31031
|
+
__metadata("design:type", Number)
|
|
31032
|
+
], UpdateTemplateInput.prototype, "UserID", void 0);
|
|
31033
|
+
__decorate([
|
|
31034
|
+
(0, server_1.Field)({ nullable: true }),
|
|
31035
|
+
__metadata("design:type", Date)
|
|
31036
|
+
], UpdateTemplateInput.prototype, "ActiveAt", void 0);
|
|
31037
|
+
__decorate([
|
|
31038
|
+
(0, server_1.Field)({ nullable: true }),
|
|
31039
|
+
__metadata("design:type", Date)
|
|
31040
|
+
], UpdateTemplateInput.prototype, "DisabledAt", void 0);
|
|
31041
|
+
__decorate([
|
|
31042
|
+
(0, server_1.Field)(() => Boolean),
|
|
31043
|
+
__metadata("design:type", Boolean)
|
|
31044
|
+
], UpdateTemplateInput.prototype, "IsActive", void 0);
|
|
31045
|
+
__decorate([
|
|
31046
|
+
(0, server_1.Field)(() => [server_1.KeyValuePairInput], { nullable: true }),
|
|
31047
|
+
__metadata("design:type", Array)
|
|
31048
|
+
], UpdateTemplateInput.prototype, "OldValues___", void 0);
|
|
31049
|
+
exports.UpdateTemplateInput = UpdateTemplateInput = __decorate([
|
|
31050
|
+
(0, server_1.InputType)()
|
|
31051
|
+
], UpdateTemplateInput);
|
|
31052
|
+
let RunTemplateViewResult = class RunTemplateViewResult {
|
|
31053
|
+
};
|
|
31054
|
+
exports.RunTemplateViewResult = RunTemplateViewResult;
|
|
31055
|
+
__decorate([
|
|
31056
|
+
(0, server_1.Field)(() => [Template_]),
|
|
31057
|
+
__metadata("design:type", Array)
|
|
31058
|
+
], RunTemplateViewResult.prototype, "Results", void 0);
|
|
31059
|
+
__decorate([
|
|
31060
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
31061
|
+
__metadata("design:type", Number)
|
|
31062
|
+
], RunTemplateViewResult.prototype, "UserViewRunID", void 0);
|
|
31063
|
+
__decorate([
|
|
31064
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
31065
|
+
__metadata("design:type", Number)
|
|
31066
|
+
], RunTemplateViewResult.prototype, "RowCount", void 0);
|
|
31067
|
+
__decorate([
|
|
31068
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
31069
|
+
__metadata("design:type", Number)
|
|
31070
|
+
], RunTemplateViewResult.prototype, "TotalRowCount", void 0);
|
|
31071
|
+
__decorate([
|
|
31072
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
31073
|
+
__metadata("design:type", Number)
|
|
31074
|
+
], RunTemplateViewResult.prototype, "ExecutionTime", void 0);
|
|
31075
|
+
__decorate([
|
|
31076
|
+
(0, server_1.Field)({ nullable: true }),
|
|
31077
|
+
__metadata("design:type", String)
|
|
31078
|
+
], RunTemplateViewResult.prototype, "ErrorMessage", void 0);
|
|
31079
|
+
__decorate([
|
|
31080
|
+
(0, server_1.Field)(() => Boolean, { nullable: false }),
|
|
31081
|
+
__metadata("design:type", Boolean)
|
|
31082
|
+
], RunTemplateViewResult.prototype, "Success", void 0);
|
|
31083
|
+
exports.RunTemplateViewResult = RunTemplateViewResult = __decorate([
|
|
31084
|
+
(0, server_1.ObjectType)()
|
|
31085
|
+
], RunTemplateViewResult);
|
|
31086
|
+
let TemplateResolver = class TemplateResolver extends server_1.ResolverBase {
|
|
31087
|
+
async RunTemplateViewByID(input, { dataSource, userPayload }, pubSub) {
|
|
31088
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
31089
|
+
}
|
|
31090
|
+
async RunTemplateViewByName(input, { dataSource, userPayload }, pubSub) {
|
|
31091
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
31092
|
+
}
|
|
31093
|
+
async RunTemplateDynamicView(input, { dataSource, userPayload }, pubSub) {
|
|
31094
|
+
input.EntityName = 'Templates';
|
|
31095
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
31096
|
+
}
|
|
31097
|
+
async Template(ID, { dataSource, userPayload }, pubSub) {
|
|
31098
|
+
this.CheckUserReadPermissions('Templates', userPayload);
|
|
31099
|
+
const sSQL = `SELECT * FROM [${core_1.Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTemplates] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Templates', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
31100
|
+
const result = this.MapFieldNamesToCodeNames('Templates', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
|
|
31101
|
+
return result;
|
|
31102
|
+
}
|
|
31103
|
+
async TemplateParamsArray(template_, { dataSource, userPayload }, pubSub) {
|
|
31104
|
+
this.CheckUserReadPermissions('Template Params', userPayload);
|
|
31105
|
+
const sSQL = `SELECT * FROM [${core_1.Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTemplateParams] WHERE [TemplateID]=${template_.ID} ` + this.getRowLevelSecurityWhereClause('Template Params', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
31106
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Template Params', await dataSource.query(sSQL));
|
|
31107
|
+
return result;
|
|
31108
|
+
}
|
|
31109
|
+
async TemplateContentsArray(template_, { dataSource, userPayload }, pubSub) {
|
|
31110
|
+
this.CheckUserReadPermissions('Template Contents', userPayload);
|
|
31111
|
+
const sSQL = `SELECT * FROM [${core_1.Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTemplateContents] WHERE [TemplateID]=${template_.ID} ` + this.getRowLevelSecurityWhereClause('Template Contents', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
31112
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Template Contents', await dataSource.query(sSQL));
|
|
31113
|
+
return result;
|
|
31114
|
+
}
|
|
31115
|
+
async CreateTemplate(input, { dataSource, userPayload }, pubSub) {
|
|
31116
|
+
return this.CreateRecord('Templates', input, dataSource, userPayload, pubSub);
|
|
31117
|
+
}
|
|
31118
|
+
async UpdateTemplate(input, { dataSource, userPayload }, pubSub) {
|
|
31119
|
+
return this.UpdateRecord('Templates', input, dataSource, userPayload, pubSub);
|
|
31120
|
+
}
|
|
31121
|
+
};
|
|
31122
|
+
exports.TemplateResolver = TemplateResolver;
|
|
31123
|
+
__decorate([
|
|
31124
|
+
(0, server_1.Query)(() => RunTemplateViewResult),
|
|
31125
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByIDInput)),
|
|
31126
|
+
__param(1, (0, server_1.Ctx)()),
|
|
31127
|
+
__param(2, (0, server_1.PubSub)()),
|
|
31128
|
+
__metadata("design:type", Function),
|
|
31129
|
+
__metadata("design:paramtypes", [server_1.RunViewByIDInput, Object, server_1.PubSubEngine]),
|
|
31130
|
+
__metadata("design:returntype", Promise)
|
|
31131
|
+
], TemplateResolver.prototype, "RunTemplateViewByID", null);
|
|
31132
|
+
__decorate([
|
|
31133
|
+
(0, server_1.Query)(() => RunTemplateViewResult),
|
|
31134
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByNameInput)),
|
|
31135
|
+
__param(1, (0, server_1.Ctx)()),
|
|
31136
|
+
__param(2, (0, server_1.PubSub)()),
|
|
31137
|
+
__metadata("design:type", Function),
|
|
31138
|
+
__metadata("design:paramtypes", [server_1.RunViewByNameInput, Object, server_1.PubSubEngine]),
|
|
31139
|
+
__metadata("design:returntype", Promise)
|
|
31140
|
+
], TemplateResolver.prototype, "RunTemplateViewByName", null);
|
|
31141
|
+
__decorate([
|
|
31142
|
+
(0, server_1.Query)(() => RunTemplateViewResult),
|
|
31143
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunDynamicViewInput)),
|
|
31144
|
+
__param(1, (0, server_1.Ctx)()),
|
|
31145
|
+
__param(2, (0, server_1.PubSub)()),
|
|
31146
|
+
__metadata("design:type", Function),
|
|
31147
|
+
__metadata("design:paramtypes", [server_1.RunDynamicViewInput, Object, server_1.PubSubEngine]),
|
|
31148
|
+
__metadata("design:returntype", Promise)
|
|
31149
|
+
], TemplateResolver.prototype, "RunTemplateDynamicView", null);
|
|
31150
|
+
__decorate([
|
|
31151
|
+
(0, server_1.Query)(() => Template_, { nullable: true }),
|
|
31152
|
+
__param(0, (0, server_1.Arg)('ID', () => server_1.Int)),
|
|
31153
|
+
__param(1, (0, server_1.Ctx)()),
|
|
31154
|
+
__param(2, (0, server_1.PubSub)()),
|
|
31155
|
+
__metadata("design:type", Function),
|
|
31156
|
+
__metadata("design:paramtypes", [Number, Object, server_1.PubSubEngine]),
|
|
31157
|
+
__metadata("design:returntype", Promise)
|
|
31158
|
+
], TemplateResolver.prototype, "Template", null);
|
|
31159
|
+
__decorate([
|
|
31160
|
+
(0, server_1.FieldResolver)(() => [mj_core_schema_server_object_types.TemplateParam_]),
|
|
31161
|
+
__param(0, (0, server_1.Root)()),
|
|
31162
|
+
__param(1, (0, server_1.Ctx)()),
|
|
31163
|
+
__param(2, (0, server_1.PubSub)()),
|
|
31164
|
+
__metadata("design:type", Function),
|
|
31165
|
+
__metadata("design:paramtypes", [Template_, Object, server_1.PubSubEngine]),
|
|
31166
|
+
__metadata("design:returntype", Promise)
|
|
31167
|
+
], TemplateResolver.prototype, "TemplateParamsArray", null);
|
|
31168
|
+
__decorate([
|
|
31169
|
+
(0, server_1.FieldResolver)(() => [mj_core_schema_server_object_types.TemplateContent_]),
|
|
31170
|
+
__param(0, (0, server_1.Root)()),
|
|
31171
|
+
__param(1, (0, server_1.Ctx)()),
|
|
31172
|
+
__param(2, (0, server_1.PubSub)()),
|
|
31173
|
+
__metadata("design:type", Function),
|
|
31174
|
+
__metadata("design:paramtypes", [Template_, Object, server_1.PubSubEngine]),
|
|
31175
|
+
__metadata("design:returntype", Promise)
|
|
31176
|
+
], TemplateResolver.prototype, "TemplateContentsArray", null);
|
|
31177
|
+
__decorate([
|
|
31178
|
+
(0, server_1.Mutation)(() => Template_),
|
|
31179
|
+
__param(0, (0, server_1.Arg)('input', () => CreateTemplateInput)),
|
|
31180
|
+
__param(1, (0, server_1.Ctx)()),
|
|
31181
|
+
__param(2, (0, server_1.PubSub)()),
|
|
31182
|
+
__metadata("design:type", Function),
|
|
31183
|
+
__metadata("design:paramtypes", [CreateTemplateInput, Object, server_1.PubSubEngine]),
|
|
31184
|
+
__metadata("design:returntype", Promise)
|
|
31185
|
+
], TemplateResolver.prototype, "CreateTemplate", null);
|
|
31186
|
+
__decorate([
|
|
31187
|
+
(0, server_1.Mutation)(() => Template_),
|
|
31188
|
+
__param(0, (0, server_1.Arg)('input', () => UpdateTemplateInput)),
|
|
31189
|
+
__param(1, (0, server_1.Ctx)()),
|
|
31190
|
+
__param(2, (0, server_1.PubSub)()),
|
|
31191
|
+
__metadata("design:type", Function),
|
|
31192
|
+
__metadata("design:paramtypes", [UpdateTemplateInput, Object, server_1.PubSubEngine]),
|
|
31193
|
+
__metadata("design:returntype", Promise)
|
|
31194
|
+
], TemplateResolver.prototype, "UpdateTemplate", null);
|
|
31195
|
+
exports.TemplateResolver = TemplateResolver = __decorate([
|
|
31196
|
+
(0, server_1.Resolver)(Template_)
|
|
31197
|
+
], TemplateResolver);
|
|
31198
|
+
let TemplateCategory_ = class TemplateCategory_ {
|
|
31199
|
+
};
|
|
31200
|
+
exports.TemplateCategory_ = TemplateCategory_;
|
|
31201
|
+
__decorate([
|
|
31202
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
31203
|
+
__metadata("design:type", Number)
|
|
31204
|
+
], TemplateCategory_.prototype, "ID", void 0);
|
|
31205
|
+
__decorate([
|
|
31206
|
+
(0, server_1.Field)({ description: 'Name of the template category' }),
|
|
31207
|
+
(0, class_validator_1.MaxLength)(510),
|
|
31208
|
+
__metadata("design:type", String)
|
|
31209
|
+
], TemplateCategory_.prototype, "Name", void 0);
|
|
31210
|
+
__decorate([
|
|
31211
|
+
(0, server_1.Field)({ nullable: true, description: 'Description of the template category' }),
|
|
31212
|
+
__metadata("design:type", String)
|
|
31213
|
+
], TemplateCategory_.prototype, "Description", void 0);
|
|
31214
|
+
__decorate([
|
|
31215
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
31216
|
+
__metadata("design:type", Number)
|
|
31217
|
+
], TemplateCategory_.prototype, "ParentID", void 0);
|
|
31218
|
+
__decorate([
|
|
31219
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
31220
|
+
__metadata("design:type", Number)
|
|
31221
|
+
], TemplateCategory_.prototype, "UserID", void 0);
|
|
31222
|
+
__decorate([
|
|
31223
|
+
(0, server_1.Field)(),
|
|
31224
|
+
(0, class_validator_1.MaxLength)(8),
|
|
31225
|
+
__metadata("design:type", Date)
|
|
31226
|
+
], TemplateCategory_.prototype, "CreatedAt", void 0);
|
|
31227
|
+
__decorate([
|
|
31228
|
+
(0, server_1.Field)(),
|
|
31229
|
+
(0, class_validator_1.MaxLength)(8),
|
|
31230
|
+
__metadata("design:type", Date)
|
|
31231
|
+
], TemplateCategory_.prototype, "UpdatedAt", void 0);
|
|
31232
|
+
__decorate([
|
|
31233
|
+
(0, server_1.Field)({ nullable: true }),
|
|
31234
|
+
(0, class_validator_1.MaxLength)(510),
|
|
31235
|
+
__metadata("design:type", String)
|
|
31236
|
+
], TemplateCategory_.prototype, "Parent", void 0);
|
|
31237
|
+
__decorate([
|
|
31238
|
+
(0, server_1.Field)(),
|
|
31239
|
+
(0, class_validator_1.MaxLength)(200),
|
|
31240
|
+
__metadata("design:type", String)
|
|
31241
|
+
], TemplateCategory_.prototype, "User", void 0);
|
|
31242
|
+
__decorate([
|
|
31243
|
+
(0, server_1.Field)(() => [mj_core_schema_server_object_types.Template_]),
|
|
31244
|
+
__metadata("design:type", Array)
|
|
31245
|
+
], TemplateCategory_.prototype, "TemplatesArray", void 0);
|
|
31246
|
+
__decorate([
|
|
31247
|
+
(0, server_1.Field)(() => [mj_core_schema_server_object_types.TemplateCategory_]),
|
|
31248
|
+
__metadata("design:type", Array)
|
|
31249
|
+
], TemplateCategory_.prototype, "TemplateCategoriesArray", void 0);
|
|
31250
|
+
exports.TemplateCategory_ = TemplateCategory_ = __decorate([
|
|
31251
|
+
(0, server_1.ObjectType)({ description: 'Template categories for organizing templates' })
|
|
31252
|
+
], TemplateCategory_);
|
|
31253
|
+
let CreateTemplateCategoryInput = class CreateTemplateCategoryInput {
|
|
31254
|
+
};
|
|
31255
|
+
exports.CreateTemplateCategoryInput = CreateTemplateCategoryInput;
|
|
31256
|
+
__decorate([
|
|
31257
|
+
(0, server_1.Field)(),
|
|
31258
|
+
__metadata("design:type", String)
|
|
31259
|
+
], CreateTemplateCategoryInput.prototype, "Name", void 0);
|
|
31260
|
+
__decorate([
|
|
31261
|
+
(0, server_1.Field)({ nullable: true }),
|
|
31262
|
+
__metadata("design:type", String)
|
|
31263
|
+
], CreateTemplateCategoryInput.prototype, "Description", void 0);
|
|
31264
|
+
__decorate([
|
|
31265
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
31266
|
+
__metadata("design:type", Number)
|
|
31267
|
+
], CreateTemplateCategoryInput.prototype, "ParentID", void 0);
|
|
31268
|
+
__decorate([
|
|
31269
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
31270
|
+
__metadata("design:type", Number)
|
|
31271
|
+
], CreateTemplateCategoryInput.prototype, "UserID", void 0);
|
|
31272
|
+
exports.CreateTemplateCategoryInput = CreateTemplateCategoryInput = __decorate([
|
|
31273
|
+
(0, server_1.InputType)()
|
|
31274
|
+
], CreateTemplateCategoryInput);
|
|
31275
|
+
let UpdateTemplateCategoryInput = class UpdateTemplateCategoryInput {
|
|
31276
|
+
};
|
|
31277
|
+
exports.UpdateTemplateCategoryInput = UpdateTemplateCategoryInput;
|
|
31278
|
+
__decorate([
|
|
31279
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
31280
|
+
__metadata("design:type", Number)
|
|
31281
|
+
], UpdateTemplateCategoryInput.prototype, "ID", void 0);
|
|
31282
|
+
__decorate([
|
|
31283
|
+
(0, server_1.Field)(),
|
|
31284
|
+
__metadata("design:type", String)
|
|
31285
|
+
], UpdateTemplateCategoryInput.prototype, "Name", void 0);
|
|
31286
|
+
__decorate([
|
|
31287
|
+
(0, server_1.Field)({ nullable: true }),
|
|
31288
|
+
__metadata("design:type", String)
|
|
31289
|
+
], UpdateTemplateCategoryInput.prototype, "Description", void 0);
|
|
31290
|
+
__decorate([
|
|
31291
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
31292
|
+
__metadata("design:type", Number)
|
|
31293
|
+
], UpdateTemplateCategoryInput.prototype, "ParentID", void 0);
|
|
31294
|
+
__decorate([
|
|
31295
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
31296
|
+
__metadata("design:type", Number)
|
|
31297
|
+
], UpdateTemplateCategoryInput.prototype, "UserID", void 0);
|
|
31298
|
+
__decorate([
|
|
31299
|
+
(0, server_1.Field)(() => [server_1.KeyValuePairInput], { nullable: true }),
|
|
31300
|
+
__metadata("design:type", Array)
|
|
31301
|
+
], UpdateTemplateCategoryInput.prototype, "OldValues___", void 0);
|
|
31302
|
+
exports.UpdateTemplateCategoryInput = UpdateTemplateCategoryInput = __decorate([
|
|
31303
|
+
(0, server_1.InputType)()
|
|
31304
|
+
], UpdateTemplateCategoryInput);
|
|
31305
|
+
let RunTemplateCategoryViewResult = class RunTemplateCategoryViewResult {
|
|
31306
|
+
};
|
|
31307
|
+
exports.RunTemplateCategoryViewResult = RunTemplateCategoryViewResult;
|
|
31308
|
+
__decorate([
|
|
31309
|
+
(0, server_1.Field)(() => [TemplateCategory_]),
|
|
31310
|
+
__metadata("design:type", Array)
|
|
31311
|
+
], RunTemplateCategoryViewResult.prototype, "Results", void 0);
|
|
31312
|
+
__decorate([
|
|
31313
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
31314
|
+
__metadata("design:type", Number)
|
|
31315
|
+
], RunTemplateCategoryViewResult.prototype, "UserViewRunID", void 0);
|
|
31316
|
+
__decorate([
|
|
31317
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
31318
|
+
__metadata("design:type", Number)
|
|
31319
|
+
], RunTemplateCategoryViewResult.prototype, "RowCount", void 0);
|
|
31320
|
+
__decorate([
|
|
31321
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
31322
|
+
__metadata("design:type", Number)
|
|
31323
|
+
], RunTemplateCategoryViewResult.prototype, "TotalRowCount", void 0);
|
|
31324
|
+
__decorate([
|
|
31325
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
31326
|
+
__metadata("design:type", Number)
|
|
31327
|
+
], RunTemplateCategoryViewResult.prototype, "ExecutionTime", void 0);
|
|
31328
|
+
__decorate([
|
|
31329
|
+
(0, server_1.Field)({ nullable: true }),
|
|
31330
|
+
__metadata("design:type", String)
|
|
31331
|
+
], RunTemplateCategoryViewResult.prototype, "ErrorMessage", void 0);
|
|
31332
|
+
__decorate([
|
|
31333
|
+
(0, server_1.Field)(() => Boolean, { nullable: false }),
|
|
31334
|
+
__metadata("design:type", Boolean)
|
|
31335
|
+
], RunTemplateCategoryViewResult.prototype, "Success", void 0);
|
|
31336
|
+
exports.RunTemplateCategoryViewResult = RunTemplateCategoryViewResult = __decorate([
|
|
31337
|
+
(0, server_1.ObjectType)()
|
|
31338
|
+
], RunTemplateCategoryViewResult);
|
|
31339
|
+
let TemplateCategoryResolver = class TemplateCategoryResolver extends server_1.ResolverBase {
|
|
31340
|
+
async RunTemplateCategoryViewByID(input, { dataSource, userPayload }, pubSub) {
|
|
31341
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
31342
|
+
}
|
|
31343
|
+
async RunTemplateCategoryViewByName(input, { dataSource, userPayload }, pubSub) {
|
|
31344
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
31345
|
+
}
|
|
31346
|
+
async RunTemplateCategoryDynamicView(input, { dataSource, userPayload }, pubSub) {
|
|
31347
|
+
input.EntityName = 'Template Categories';
|
|
31348
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
31349
|
+
}
|
|
31350
|
+
async TemplateCategory(ID, { dataSource, userPayload }, pubSub) {
|
|
31351
|
+
this.CheckUserReadPermissions('Template Categories', userPayload);
|
|
31352
|
+
const sSQL = `SELECT * FROM [${core_1.Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTemplateCategories] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Template Categories', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
31353
|
+
const result = this.MapFieldNamesToCodeNames('Template Categories', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
|
|
31354
|
+
return result;
|
|
31355
|
+
}
|
|
31356
|
+
async TemplatesArray(templatecategory_, { dataSource, userPayload }, pubSub) {
|
|
31357
|
+
this.CheckUserReadPermissions('Templates', userPayload);
|
|
31358
|
+
const sSQL = `SELECT * FROM [${core_1.Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTemplates] WHERE [CategoryID]=${templatecategory_.ID} ` + this.getRowLevelSecurityWhereClause('Templates', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
31359
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Templates', await dataSource.query(sSQL));
|
|
31360
|
+
return result;
|
|
31361
|
+
}
|
|
31362
|
+
async TemplateCategoriesArray(templatecategory_, { dataSource, userPayload }, pubSub) {
|
|
31363
|
+
this.CheckUserReadPermissions('Template Categories', userPayload);
|
|
31364
|
+
const sSQL = `SELECT * FROM [${core_1.Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTemplateCategories] WHERE [ParentID]=${templatecategory_.ID} ` + this.getRowLevelSecurityWhereClause('Template Categories', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
31365
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Template Categories', await dataSource.query(sSQL));
|
|
31366
|
+
return result;
|
|
31367
|
+
}
|
|
31368
|
+
async CreateTemplateCategory(input, { dataSource, userPayload }, pubSub) {
|
|
31369
|
+
return this.CreateRecord('Template Categories', input, dataSource, userPayload, pubSub);
|
|
31370
|
+
}
|
|
31371
|
+
async UpdateTemplateCategory(input, { dataSource, userPayload }, pubSub) {
|
|
31372
|
+
return this.UpdateRecord('Template Categories', input, dataSource, userPayload, pubSub);
|
|
31373
|
+
}
|
|
31374
|
+
};
|
|
31375
|
+
exports.TemplateCategoryResolver = TemplateCategoryResolver;
|
|
31376
|
+
__decorate([
|
|
31377
|
+
(0, server_1.Query)(() => RunTemplateCategoryViewResult),
|
|
31378
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByIDInput)),
|
|
31379
|
+
__param(1, (0, server_1.Ctx)()),
|
|
31380
|
+
__param(2, (0, server_1.PubSub)()),
|
|
31381
|
+
__metadata("design:type", Function),
|
|
31382
|
+
__metadata("design:paramtypes", [server_1.RunViewByIDInput, Object, server_1.PubSubEngine]),
|
|
31383
|
+
__metadata("design:returntype", Promise)
|
|
31384
|
+
], TemplateCategoryResolver.prototype, "RunTemplateCategoryViewByID", null);
|
|
31385
|
+
__decorate([
|
|
31386
|
+
(0, server_1.Query)(() => RunTemplateCategoryViewResult),
|
|
31387
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByNameInput)),
|
|
31388
|
+
__param(1, (0, server_1.Ctx)()),
|
|
31389
|
+
__param(2, (0, server_1.PubSub)()),
|
|
31390
|
+
__metadata("design:type", Function),
|
|
31391
|
+
__metadata("design:paramtypes", [server_1.RunViewByNameInput, Object, server_1.PubSubEngine]),
|
|
31392
|
+
__metadata("design:returntype", Promise)
|
|
31393
|
+
], TemplateCategoryResolver.prototype, "RunTemplateCategoryViewByName", null);
|
|
31394
|
+
__decorate([
|
|
31395
|
+
(0, server_1.Query)(() => RunTemplateCategoryViewResult),
|
|
31396
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunDynamicViewInput)),
|
|
31397
|
+
__param(1, (0, server_1.Ctx)()),
|
|
31398
|
+
__param(2, (0, server_1.PubSub)()),
|
|
31399
|
+
__metadata("design:type", Function),
|
|
31400
|
+
__metadata("design:paramtypes", [server_1.RunDynamicViewInput, Object, server_1.PubSubEngine]),
|
|
31401
|
+
__metadata("design:returntype", Promise)
|
|
31402
|
+
], TemplateCategoryResolver.prototype, "RunTemplateCategoryDynamicView", null);
|
|
31403
|
+
__decorate([
|
|
31404
|
+
(0, server_1.Query)(() => TemplateCategory_, { nullable: true }),
|
|
31405
|
+
__param(0, (0, server_1.Arg)('ID', () => server_1.Int)),
|
|
31406
|
+
__param(1, (0, server_1.Ctx)()),
|
|
31407
|
+
__param(2, (0, server_1.PubSub)()),
|
|
31408
|
+
__metadata("design:type", Function),
|
|
31409
|
+
__metadata("design:paramtypes", [Number, Object, server_1.PubSubEngine]),
|
|
31410
|
+
__metadata("design:returntype", Promise)
|
|
31411
|
+
], TemplateCategoryResolver.prototype, "TemplateCategory", null);
|
|
31412
|
+
__decorate([
|
|
31413
|
+
(0, server_1.FieldResolver)(() => [mj_core_schema_server_object_types.Template_]),
|
|
31414
|
+
__param(0, (0, server_1.Root)()),
|
|
31415
|
+
__param(1, (0, server_1.Ctx)()),
|
|
31416
|
+
__param(2, (0, server_1.PubSub)()),
|
|
31417
|
+
__metadata("design:type", Function),
|
|
31418
|
+
__metadata("design:paramtypes", [TemplateCategory_, Object, server_1.PubSubEngine]),
|
|
31419
|
+
__metadata("design:returntype", Promise)
|
|
31420
|
+
], TemplateCategoryResolver.prototype, "TemplatesArray", null);
|
|
31421
|
+
__decorate([
|
|
31422
|
+
(0, server_1.FieldResolver)(() => [mj_core_schema_server_object_types.TemplateCategory_]),
|
|
31423
|
+
__param(0, (0, server_1.Root)()),
|
|
31424
|
+
__param(1, (0, server_1.Ctx)()),
|
|
31425
|
+
__param(2, (0, server_1.PubSub)()),
|
|
31426
|
+
__metadata("design:type", Function),
|
|
31427
|
+
__metadata("design:paramtypes", [TemplateCategory_, Object, server_1.PubSubEngine]),
|
|
31428
|
+
__metadata("design:returntype", Promise)
|
|
31429
|
+
], TemplateCategoryResolver.prototype, "TemplateCategoriesArray", null);
|
|
31430
|
+
__decorate([
|
|
31431
|
+
(0, server_1.Mutation)(() => TemplateCategory_),
|
|
31432
|
+
__param(0, (0, server_1.Arg)('input', () => CreateTemplateCategoryInput)),
|
|
31433
|
+
__param(1, (0, server_1.Ctx)()),
|
|
31434
|
+
__param(2, (0, server_1.PubSub)()),
|
|
31435
|
+
__metadata("design:type", Function),
|
|
31436
|
+
__metadata("design:paramtypes", [CreateTemplateCategoryInput, Object, server_1.PubSubEngine]),
|
|
31437
|
+
__metadata("design:returntype", Promise)
|
|
31438
|
+
], TemplateCategoryResolver.prototype, "CreateTemplateCategory", null);
|
|
31439
|
+
__decorate([
|
|
31440
|
+
(0, server_1.Mutation)(() => TemplateCategory_),
|
|
31441
|
+
__param(0, (0, server_1.Arg)('input', () => UpdateTemplateCategoryInput)),
|
|
31442
|
+
__param(1, (0, server_1.Ctx)()),
|
|
31443
|
+
__param(2, (0, server_1.PubSub)()),
|
|
31444
|
+
__metadata("design:type", Function),
|
|
31445
|
+
__metadata("design:paramtypes", [UpdateTemplateCategoryInput, Object, server_1.PubSubEngine]),
|
|
31446
|
+
__metadata("design:returntype", Promise)
|
|
31447
|
+
], TemplateCategoryResolver.prototype, "UpdateTemplateCategory", null);
|
|
31448
|
+
exports.TemplateCategoryResolver = TemplateCategoryResolver = __decorate([
|
|
31449
|
+
(0, server_1.Resolver)(TemplateCategory_)
|
|
31450
|
+
], TemplateCategoryResolver);
|
|
31451
|
+
let TemplateContent_ = class TemplateContent_ {
|
|
31452
|
+
};
|
|
31453
|
+
exports.TemplateContent_ = TemplateContent_;
|
|
31454
|
+
__decorate([
|
|
31455
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
31456
|
+
__metadata("design:type", Number)
|
|
31457
|
+
], TemplateContent_.prototype, "ID", void 0);
|
|
31458
|
+
__decorate([
|
|
31459
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
31460
|
+
__metadata("design:type", Number)
|
|
31461
|
+
], TemplateContent_.prototype, "TemplateID", void 0);
|
|
31462
|
+
__decorate([
|
|
31463
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
31464
|
+
__metadata("design:type", Number)
|
|
31465
|
+
], TemplateContent_.prototype, "TypeID", void 0);
|
|
31466
|
+
__decorate([
|
|
31467
|
+
(0, server_1.Field)({ nullable: true, description: 'The actual text content for the template' }),
|
|
31468
|
+
__metadata("design:type", String)
|
|
31469
|
+
], TemplateContent_.prototype, "TemplateText", void 0);
|
|
31470
|
+
__decorate([
|
|
31471
|
+
(0, server_1.Field)(() => server_1.Int, { description: 'Priority of the content version, higher priority versions will be used ahead of lower priority versions for a given Type' }),
|
|
31472
|
+
__metadata("design:type", Number)
|
|
31473
|
+
], TemplateContent_.prototype, "Priority", void 0);
|
|
31474
|
+
__decorate([
|
|
31475
|
+
(0, server_1.Field)(() => Boolean, { description: 'Indicates whether the content is active or not. Use this to disable a particular Template Content item without having to remove it' }),
|
|
31476
|
+
__metadata("design:type", Boolean)
|
|
31477
|
+
], TemplateContent_.prototype, "IsActive", void 0);
|
|
31478
|
+
__decorate([
|
|
31479
|
+
(0, server_1.Field)(),
|
|
31480
|
+
(0, class_validator_1.MaxLength)(8),
|
|
31481
|
+
__metadata("design:type", Date)
|
|
31482
|
+
], TemplateContent_.prototype, "CreatedAt", void 0);
|
|
31483
|
+
__decorate([
|
|
31484
|
+
(0, server_1.Field)(),
|
|
31485
|
+
(0, class_validator_1.MaxLength)(8),
|
|
31486
|
+
__metadata("design:type", Date)
|
|
31487
|
+
], TemplateContent_.prototype, "UpdatedAt", void 0);
|
|
31488
|
+
__decorate([
|
|
31489
|
+
(0, server_1.Field)(),
|
|
31490
|
+
(0, class_validator_1.MaxLength)(510),
|
|
31491
|
+
__metadata("design:type", String)
|
|
31492
|
+
], TemplateContent_.prototype, "Template", void 0);
|
|
31493
|
+
__decorate([
|
|
31494
|
+
(0, server_1.Field)(),
|
|
31495
|
+
(0, class_validator_1.MaxLength)(510),
|
|
31496
|
+
__metadata("design:type", String)
|
|
31497
|
+
], TemplateContent_.prototype, "Type", void 0);
|
|
31498
|
+
exports.TemplateContent_ = TemplateContent_ = __decorate([
|
|
31499
|
+
(0, server_1.ObjectType)({ description: 'Template content for different versions of a template for purposes like HTML/Text/etc' })
|
|
31500
|
+
], TemplateContent_);
|
|
31501
|
+
let CreateTemplateContentInput = class CreateTemplateContentInput {
|
|
31502
|
+
};
|
|
31503
|
+
exports.CreateTemplateContentInput = CreateTemplateContentInput;
|
|
31504
|
+
__decorate([
|
|
31505
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
31506
|
+
__metadata("design:type", Number)
|
|
31507
|
+
], CreateTemplateContentInput.prototype, "TemplateID", void 0);
|
|
31508
|
+
__decorate([
|
|
31509
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
31510
|
+
__metadata("design:type", Number)
|
|
31511
|
+
], CreateTemplateContentInput.prototype, "TypeID", void 0);
|
|
31512
|
+
__decorate([
|
|
31513
|
+
(0, server_1.Field)({ nullable: true }),
|
|
31514
|
+
__metadata("design:type", String)
|
|
31515
|
+
], CreateTemplateContentInput.prototype, "TemplateText", void 0);
|
|
31516
|
+
__decorate([
|
|
31517
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
31518
|
+
__metadata("design:type", Number)
|
|
31519
|
+
], CreateTemplateContentInput.prototype, "Priority", void 0);
|
|
31520
|
+
__decorate([
|
|
31521
|
+
(0, server_1.Field)(() => Boolean),
|
|
31522
|
+
__metadata("design:type", Boolean)
|
|
31523
|
+
], CreateTemplateContentInput.prototype, "IsActive", void 0);
|
|
31524
|
+
exports.CreateTemplateContentInput = CreateTemplateContentInput = __decorate([
|
|
31525
|
+
(0, server_1.InputType)()
|
|
31526
|
+
], CreateTemplateContentInput);
|
|
31527
|
+
let UpdateTemplateContentInput = class UpdateTemplateContentInput {
|
|
31528
|
+
};
|
|
31529
|
+
exports.UpdateTemplateContentInput = UpdateTemplateContentInput;
|
|
31530
|
+
__decorate([
|
|
31531
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
31532
|
+
__metadata("design:type", Number)
|
|
31533
|
+
], UpdateTemplateContentInput.prototype, "ID", void 0);
|
|
31534
|
+
__decorate([
|
|
31535
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
31536
|
+
__metadata("design:type", Number)
|
|
31537
|
+
], UpdateTemplateContentInput.prototype, "TemplateID", void 0);
|
|
31538
|
+
__decorate([
|
|
31539
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
31540
|
+
__metadata("design:type", Number)
|
|
31541
|
+
], UpdateTemplateContentInput.prototype, "TypeID", void 0);
|
|
31542
|
+
__decorate([
|
|
31543
|
+
(0, server_1.Field)({ nullable: true }),
|
|
31544
|
+
__metadata("design:type", String)
|
|
31545
|
+
], UpdateTemplateContentInput.prototype, "TemplateText", void 0);
|
|
31546
|
+
__decorate([
|
|
31547
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
31548
|
+
__metadata("design:type", Number)
|
|
31549
|
+
], UpdateTemplateContentInput.prototype, "Priority", void 0);
|
|
31550
|
+
__decorate([
|
|
31551
|
+
(0, server_1.Field)(() => Boolean),
|
|
31552
|
+
__metadata("design:type", Boolean)
|
|
31553
|
+
], UpdateTemplateContentInput.prototype, "IsActive", void 0);
|
|
31554
|
+
__decorate([
|
|
31555
|
+
(0, server_1.Field)(() => [server_1.KeyValuePairInput], { nullable: true }),
|
|
31556
|
+
__metadata("design:type", Array)
|
|
31557
|
+
], UpdateTemplateContentInput.prototype, "OldValues___", void 0);
|
|
31558
|
+
exports.UpdateTemplateContentInput = UpdateTemplateContentInput = __decorate([
|
|
31559
|
+
(0, server_1.InputType)()
|
|
31560
|
+
], UpdateTemplateContentInput);
|
|
31561
|
+
let RunTemplateContentViewResult = class RunTemplateContentViewResult {
|
|
31562
|
+
};
|
|
31563
|
+
exports.RunTemplateContentViewResult = RunTemplateContentViewResult;
|
|
31564
|
+
__decorate([
|
|
31565
|
+
(0, server_1.Field)(() => [TemplateContent_]),
|
|
31566
|
+
__metadata("design:type", Array)
|
|
31567
|
+
], RunTemplateContentViewResult.prototype, "Results", void 0);
|
|
31568
|
+
__decorate([
|
|
31569
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
31570
|
+
__metadata("design:type", Number)
|
|
31571
|
+
], RunTemplateContentViewResult.prototype, "UserViewRunID", void 0);
|
|
31572
|
+
__decorate([
|
|
31573
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
31574
|
+
__metadata("design:type", Number)
|
|
31575
|
+
], RunTemplateContentViewResult.prototype, "RowCount", void 0);
|
|
31576
|
+
__decorate([
|
|
31577
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
31578
|
+
__metadata("design:type", Number)
|
|
31579
|
+
], RunTemplateContentViewResult.prototype, "TotalRowCount", void 0);
|
|
31580
|
+
__decorate([
|
|
31581
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
31582
|
+
__metadata("design:type", Number)
|
|
31583
|
+
], RunTemplateContentViewResult.prototype, "ExecutionTime", void 0);
|
|
31584
|
+
__decorate([
|
|
31585
|
+
(0, server_1.Field)({ nullable: true }),
|
|
31586
|
+
__metadata("design:type", String)
|
|
31587
|
+
], RunTemplateContentViewResult.prototype, "ErrorMessage", void 0);
|
|
31588
|
+
__decorate([
|
|
31589
|
+
(0, server_1.Field)(() => Boolean, { nullable: false }),
|
|
31590
|
+
__metadata("design:type", Boolean)
|
|
31591
|
+
], RunTemplateContentViewResult.prototype, "Success", void 0);
|
|
31592
|
+
exports.RunTemplateContentViewResult = RunTemplateContentViewResult = __decorate([
|
|
31593
|
+
(0, server_1.ObjectType)()
|
|
31594
|
+
], RunTemplateContentViewResult);
|
|
31595
|
+
let TemplateContentResolver = class TemplateContentResolver extends server_1.ResolverBase {
|
|
31596
|
+
async RunTemplateContentViewByID(input, { dataSource, userPayload }, pubSub) {
|
|
31597
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
31598
|
+
}
|
|
31599
|
+
async RunTemplateContentViewByName(input, { dataSource, userPayload }, pubSub) {
|
|
31600
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
31601
|
+
}
|
|
31602
|
+
async RunTemplateContentDynamicView(input, { dataSource, userPayload }, pubSub) {
|
|
31603
|
+
input.EntityName = 'Template Contents';
|
|
31604
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
31605
|
+
}
|
|
31606
|
+
async TemplateContent(ID, { dataSource, userPayload }, pubSub) {
|
|
31607
|
+
this.CheckUserReadPermissions('Template Contents', userPayload);
|
|
31608
|
+
const sSQL = `SELECT * FROM [${core_1.Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTemplateContents] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Template Contents', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
31609
|
+
const result = this.MapFieldNamesToCodeNames('Template Contents', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
|
|
31610
|
+
return result;
|
|
31611
|
+
}
|
|
31612
|
+
async CreateTemplateContent(input, { dataSource, userPayload }, pubSub) {
|
|
31613
|
+
return this.CreateRecord('Template Contents', input, dataSource, userPayload, pubSub);
|
|
31614
|
+
}
|
|
31615
|
+
async UpdateTemplateContent(input, { dataSource, userPayload }, pubSub) {
|
|
31616
|
+
return this.UpdateRecord('Template Contents', input, dataSource, userPayload, pubSub);
|
|
31617
|
+
}
|
|
31618
|
+
};
|
|
31619
|
+
exports.TemplateContentResolver = TemplateContentResolver;
|
|
31620
|
+
__decorate([
|
|
31621
|
+
(0, server_1.Query)(() => RunTemplateContentViewResult),
|
|
31622
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByIDInput)),
|
|
31623
|
+
__param(1, (0, server_1.Ctx)()),
|
|
31624
|
+
__param(2, (0, server_1.PubSub)()),
|
|
31625
|
+
__metadata("design:type", Function),
|
|
31626
|
+
__metadata("design:paramtypes", [server_1.RunViewByIDInput, Object, server_1.PubSubEngine]),
|
|
31627
|
+
__metadata("design:returntype", Promise)
|
|
31628
|
+
], TemplateContentResolver.prototype, "RunTemplateContentViewByID", null);
|
|
31629
|
+
__decorate([
|
|
31630
|
+
(0, server_1.Query)(() => RunTemplateContentViewResult),
|
|
31631
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByNameInput)),
|
|
31632
|
+
__param(1, (0, server_1.Ctx)()),
|
|
31633
|
+
__param(2, (0, server_1.PubSub)()),
|
|
31634
|
+
__metadata("design:type", Function),
|
|
31635
|
+
__metadata("design:paramtypes", [server_1.RunViewByNameInput, Object, server_1.PubSubEngine]),
|
|
31636
|
+
__metadata("design:returntype", Promise)
|
|
31637
|
+
], TemplateContentResolver.prototype, "RunTemplateContentViewByName", null);
|
|
31638
|
+
__decorate([
|
|
31639
|
+
(0, server_1.Query)(() => RunTemplateContentViewResult),
|
|
31640
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunDynamicViewInput)),
|
|
31641
|
+
__param(1, (0, server_1.Ctx)()),
|
|
31642
|
+
__param(2, (0, server_1.PubSub)()),
|
|
31643
|
+
__metadata("design:type", Function),
|
|
31644
|
+
__metadata("design:paramtypes", [server_1.RunDynamicViewInput, Object, server_1.PubSubEngine]),
|
|
31645
|
+
__metadata("design:returntype", Promise)
|
|
31646
|
+
], TemplateContentResolver.prototype, "RunTemplateContentDynamicView", null);
|
|
31647
|
+
__decorate([
|
|
31648
|
+
(0, server_1.Query)(() => TemplateContent_, { nullable: true }),
|
|
31649
|
+
__param(0, (0, server_1.Arg)('ID', () => server_1.Int)),
|
|
31650
|
+
__param(1, (0, server_1.Ctx)()),
|
|
31651
|
+
__param(2, (0, server_1.PubSub)()),
|
|
31652
|
+
__metadata("design:type", Function),
|
|
31653
|
+
__metadata("design:paramtypes", [Number, Object, server_1.PubSubEngine]),
|
|
31654
|
+
__metadata("design:returntype", Promise)
|
|
31655
|
+
], TemplateContentResolver.prototype, "TemplateContent", null);
|
|
31656
|
+
__decorate([
|
|
31657
|
+
(0, server_1.Mutation)(() => TemplateContent_),
|
|
31658
|
+
__param(0, (0, server_1.Arg)('input', () => CreateTemplateContentInput)),
|
|
31659
|
+
__param(1, (0, server_1.Ctx)()),
|
|
31660
|
+
__param(2, (0, server_1.PubSub)()),
|
|
31661
|
+
__metadata("design:type", Function),
|
|
31662
|
+
__metadata("design:paramtypes", [CreateTemplateContentInput, Object, server_1.PubSubEngine]),
|
|
31663
|
+
__metadata("design:returntype", Promise)
|
|
31664
|
+
], TemplateContentResolver.prototype, "CreateTemplateContent", null);
|
|
31665
|
+
__decorate([
|
|
31666
|
+
(0, server_1.Mutation)(() => TemplateContent_),
|
|
31667
|
+
__param(0, (0, server_1.Arg)('input', () => UpdateTemplateContentInput)),
|
|
31668
|
+
__param(1, (0, server_1.Ctx)()),
|
|
31669
|
+
__param(2, (0, server_1.PubSub)()),
|
|
31670
|
+
__metadata("design:type", Function),
|
|
31671
|
+
__metadata("design:paramtypes", [UpdateTemplateContentInput, Object, server_1.PubSubEngine]),
|
|
31672
|
+
__metadata("design:returntype", Promise)
|
|
31673
|
+
], TemplateContentResolver.prototype, "UpdateTemplateContent", null);
|
|
31674
|
+
exports.TemplateContentResolver = TemplateContentResolver = __decorate([
|
|
31675
|
+
(0, server_1.Resolver)(TemplateContent_)
|
|
31676
|
+
], TemplateContentResolver);
|
|
31677
|
+
let TemplateParam_ = class TemplateParam_ {
|
|
31678
|
+
};
|
|
31679
|
+
exports.TemplateParam_ = TemplateParam_;
|
|
31680
|
+
__decorate([
|
|
31681
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
31682
|
+
__metadata("design:type", Number)
|
|
31683
|
+
], TemplateParam_.prototype, "ID", void 0);
|
|
31684
|
+
__decorate([
|
|
31685
|
+
(0, server_1.Field)(() => server_1.Int, { description: 'ID of the template this parameter belongs to' }),
|
|
31686
|
+
__metadata("design:type", Number)
|
|
31687
|
+
], TemplateParam_.prototype, "TemplateID", void 0);
|
|
31688
|
+
__decorate([
|
|
31689
|
+
(0, server_1.Field)({ description: 'Name of the parameter' }),
|
|
31690
|
+
(0, class_validator_1.MaxLength)(510),
|
|
31691
|
+
__metadata("design:type", String)
|
|
31692
|
+
], TemplateParam_.prototype, "Name", void 0);
|
|
31693
|
+
__decorate([
|
|
31694
|
+
(0, server_1.Field)({ nullable: true, description: 'Description of the parameter' }),
|
|
31695
|
+
__metadata("design:type", String)
|
|
31696
|
+
], TemplateParam_.prototype, "Description", void 0);
|
|
31697
|
+
__decorate([
|
|
31698
|
+
(0, server_1.Field)({ description: 'Type of the parameter' }),
|
|
31699
|
+
(0, class_validator_1.MaxLength)(40),
|
|
31700
|
+
__metadata("design:type", String)
|
|
31701
|
+
], TemplateParam_.prototype, "Type", void 0);
|
|
31702
|
+
__decorate([
|
|
31703
|
+
(0, server_1.Field)({ nullable: true, description: 'Default value of the parameter' }),
|
|
31704
|
+
__metadata("design:type", String)
|
|
31705
|
+
], TemplateParam_.prototype, "DefaultValue", void 0);
|
|
31706
|
+
__decorate([
|
|
31707
|
+
(0, server_1.Field)(() => Boolean),
|
|
31708
|
+
__metadata("design:type", Boolean)
|
|
31709
|
+
], TemplateParam_.prototype, "IsRequired", void 0);
|
|
31710
|
+
__decorate([
|
|
31711
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true, description: 'Entity ID, used only when Type is Record' }),
|
|
31712
|
+
__metadata("design:type", Number)
|
|
31713
|
+
], TemplateParam_.prototype, "EntityID", void 0);
|
|
31714
|
+
__decorate([
|
|
31715
|
+
(0, server_1.Field)({ nullable: true, description: 'Record ID, used only when Type is Record' }),
|
|
31716
|
+
(0, class_validator_1.MaxLength)(4000),
|
|
31717
|
+
__metadata("design:type", String)
|
|
31718
|
+
], TemplateParam_.prototype, "RecordID", void 0);
|
|
31719
|
+
__decorate([
|
|
31720
|
+
(0, server_1.Field)(),
|
|
31721
|
+
(0, class_validator_1.MaxLength)(8),
|
|
31722
|
+
__metadata("design:type", Date)
|
|
31723
|
+
], TemplateParam_.prototype, "CreatedAt", void 0);
|
|
31724
|
+
__decorate([
|
|
31725
|
+
(0, server_1.Field)(),
|
|
31726
|
+
(0, class_validator_1.MaxLength)(8),
|
|
31727
|
+
__metadata("design:type", Date)
|
|
31728
|
+
], TemplateParam_.prototype, "UpdatedAt", void 0);
|
|
31729
|
+
__decorate([
|
|
31730
|
+
(0, server_1.Field)(),
|
|
31731
|
+
(0, class_validator_1.MaxLength)(510),
|
|
31732
|
+
__metadata("design:type", String)
|
|
31733
|
+
], TemplateParam_.prototype, "Template", void 0);
|
|
31734
|
+
__decorate([
|
|
31735
|
+
(0, server_1.Field)({ nullable: true }),
|
|
31736
|
+
(0, class_validator_1.MaxLength)(510),
|
|
31737
|
+
__metadata("design:type", String)
|
|
31738
|
+
], TemplateParam_.prototype, "Entity", void 0);
|
|
31739
|
+
exports.TemplateParam_ = TemplateParam_ = __decorate([
|
|
31740
|
+
(0, server_1.ObjectType)({ description: 'Parameters allowed for use inside the template' })
|
|
31741
|
+
], TemplateParam_);
|
|
31742
|
+
let CreateTemplateParamInput = class CreateTemplateParamInput {
|
|
31743
|
+
};
|
|
31744
|
+
exports.CreateTemplateParamInput = CreateTemplateParamInput;
|
|
31745
|
+
__decorate([
|
|
31746
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
31747
|
+
__metadata("design:type", Number)
|
|
31748
|
+
], CreateTemplateParamInput.prototype, "TemplateID", void 0);
|
|
31749
|
+
__decorate([
|
|
31750
|
+
(0, server_1.Field)(),
|
|
31751
|
+
__metadata("design:type", String)
|
|
31752
|
+
], CreateTemplateParamInput.prototype, "Name", void 0);
|
|
31753
|
+
__decorate([
|
|
31754
|
+
(0, server_1.Field)({ nullable: true }),
|
|
31755
|
+
__metadata("design:type", String)
|
|
31756
|
+
], CreateTemplateParamInput.prototype, "Description", void 0);
|
|
31757
|
+
__decorate([
|
|
31758
|
+
(0, server_1.Field)(),
|
|
31759
|
+
__metadata("design:type", String)
|
|
31760
|
+
], CreateTemplateParamInput.prototype, "Type", void 0);
|
|
31761
|
+
__decorate([
|
|
31762
|
+
(0, server_1.Field)({ nullable: true }),
|
|
31763
|
+
__metadata("design:type", String)
|
|
31764
|
+
], CreateTemplateParamInput.prototype, "DefaultValue", void 0);
|
|
31765
|
+
__decorate([
|
|
31766
|
+
(0, server_1.Field)(() => Boolean),
|
|
31767
|
+
__metadata("design:type", Boolean)
|
|
31768
|
+
], CreateTemplateParamInput.prototype, "IsRequired", void 0);
|
|
31769
|
+
__decorate([
|
|
31770
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
31771
|
+
__metadata("design:type", Number)
|
|
31772
|
+
], CreateTemplateParamInput.prototype, "EntityID", void 0);
|
|
31773
|
+
__decorate([
|
|
31774
|
+
(0, server_1.Field)({ nullable: true }),
|
|
31775
|
+
__metadata("design:type", String)
|
|
31776
|
+
], CreateTemplateParamInput.prototype, "RecordID", void 0);
|
|
31777
|
+
exports.CreateTemplateParamInput = CreateTemplateParamInput = __decorate([
|
|
31778
|
+
(0, server_1.InputType)()
|
|
31779
|
+
], CreateTemplateParamInput);
|
|
31780
|
+
let UpdateTemplateParamInput = class UpdateTemplateParamInput {
|
|
31781
|
+
};
|
|
31782
|
+
exports.UpdateTemplateParamInput = UpdateTemplateParamInput;
|
|
31783
|
+
__decorate([
|
|
31784
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
31785
|
+
__metadata("design:type", Number)
|
|
31786
|
+
], UpdateTemplateParamInput.prototype, "ID", void 0);
|
|
31787
|
+
__decorate([
|
|
31788
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
31789
|
+
__metadata("design:type", Number)
|
|
31790
|
+
], UpdateTemplateParamInput.prototype, "TemplateID", void 0);
|
|
31791
|
+
__decorate([
|
|
31792
|
+
(0, server_1.Field)(),
|
|
31793
|
+
__metadata("design:type", String)
|
|
31794
|
+
], UpdateTemplateParamInput.prototype, "Name", void 0);
|
|
31795
|
+
__decorate([
|
|
31796
|
+
(0, server_1.Field)({ nullable: true }),
|
|
31797
|
+
__metadata("design:type", String)
|
|
31798
|
+
], UpdateTemplateParamInput.prototype, "Description", void 0);
|
|
31799
|
+
__decorate([
|
|
31800
|
+
(0, server_1.Field)(),
|
|
31801
|
+
__metadata("design:type", String)
|
|
31802
|
+
], UpdateTemplateParamInput.prototype, "Type", void 0);
|
|
31803
|
+
__decorate([
|
|
31804
|
+
(0, server_1.Field)({ nullable: true }),
|
|
31805
|
+
__metadata("design:type", String)
|
|
31806
|
+
], UpdateTemplateParamInput.prototype, "DefaultValue", void 0);
|
|
31807
|
+
__decorate([
|
|
31808
|
+
(0, server_1.Field)(() => Boolean),
|
|
31809
|
+
__metadata("design:type", Boolean)
|
|
31810
|
+
], UpdateTemplateParamInput.prototype, "IsRequired", void 0);
|
|
31811
|
+
__decorate([
|
|
31812
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
31813
|
+
__metadata("design:type", Number)
|
|
31814
|
+
], UpdateTemplateParamInput.prototype, "EntityID", void 0);
|
|
31815
|
+
__decorate([
|
|
31816
|
+
(0, server_1.Field)({ nullable: true }),
|
|
31817
|
+
__metadata("design:type", String)
|
|
31818
|
+
], UpdateTemplateParamInput.prototype, "RecordID", void 0);
|
|
31819
|
+
__decorate([
|
|
31820
|
+
(0, server_1.Field)(() => [server_1.KeyValuePairInput], { nullable: true }),
|
|
31821
|
+
__metadata("design:type", Array)
|
|
31822
|
+
], UpdateTemplateParamInput.prototype, "OldValues___", void 0);
|
|
31823
|
+
exports.UpdateTemplateParamInput = UpdateTemplateParamInput = __decorate([
|
|
31824
|
+
(0, server_1.InputType)()
|
|
31825
|
+
], UpdateTemplateParamInput);
|
|
31826
|
+
let RunTemplateParamViewResult = class RunTemplateParamViewResult {
|
|
31827
|
+
};
|
|
31828
|
+
exports.RunTemplateParamViewResult = RunTemplateParamViewResult;
|
|
31829
|
+
__decorate([
|
|
31830
|
+
(0, server_1.Field)(() => [TemplateParam_]),
|
|
31831
|
+
__metadata("design:type", Array)
|
|
31832
|
+
], RunTemplateParamViewResult.prototype, "Results", void 0);
|
|
31833
|
+
__decorate([
|
|
31834
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
31835
|
+
__metadata("design:type", Number)
|
|
31836
|
+
], RunTemplateParamViewResult.prototype, "UserViewRunID", void 0);
|
|
31837
|
+
__decorate([
|
|
31838
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
31839
|
+
__metadata("design:type", Number)
|
|
31840
|
+
], RunTemplateParamViewResult.prototype, "RowCount", void 0);
|
|
31841
|
+
__decorate([
|
|
31842
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
31843
|
+
__metadata("design:type", Number)
|
|
31844
|
+
], RunTemplateParamViewResult.prototype, "TotalRowCount", void 0);
|
|
31845
|
+
__decorate([
|
|
31846
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
31847
|
+
__metadata("design:type", Number)
|
|
31848
|
+
], RunTemplateParamViewResult.prototype, "ExecutionTime", void 0);
|
|
31849
|
+
__decorate([
|
|
31850
|
+
(0, server_1.Field)({ nullable: true }),
|
|
31851
|
+
__metadata("design:type", String)
|
|
31852
|
+
], RunTemplateParamViewResult.prototype, "ErrorMessage", void 0);
|
|
31853
|
+
__decorate([
|
|
31854
|
+
(0, server_1.Field)(() => Boolean, { nullable: false }),
|
|
31855
|
+
__metadata("design:type", Boolean)
|
|
31856
|
+
], RunTemplateParamViewResult.prototype, "Success", void 0);
|
|
31857
|
+
exports.RunTemplateParamViewResult = RunTemplateParamViewResult = __decorate([
|
|
31858
|
+
(0, server_1.ObjectType)()
|
|
31859
|
+
], RunTemplateParamViewResult);
|
|
31860
|
+
let TemplateParamResolver = class TemplateParamResolver extends server_1.ResolverBase {
|
|
31861
|
+
async RunTemplateParamViewByID(input, { dataSource, userPayload }, pubSub) {
|
|
31862
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
31863
|
+
}
|
|
31864
|
+
async RunTemplateParamViewByName(input, { dataSource, userPayload }, pubSub) {
|
|
31865
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
31866
|
+
}
|
|
31867
|
+
async RunTemplateParamDynamicView(input, { dataSource, userPayload }, pubSub) {
|
|
31868
|
+
input.EntityName = 'Template Params';
|
|
31869
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
31870
|
+
}
|
|
31871
|
+
async TemplateParam(ID, { dataSource, userPayload }, pubSub) {
|
|
31872
|
+
this.CheckUserReadPermissions('Template Params', userPayload);
|
|
31873
|
+
const sSQL = `SELECT * FROM [${core_1.Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTemplateParams] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Template Params', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
31874
|
+
const result = this.MapFieldNamesToCodeNames('Template Params', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
|
|
31875
|
+
return result;
|
|
31876
|
+
}
|
|
31877
|
+
async CreateTemplateParam(input, { dataSource, userPayload }, pubSub) {
|
|
31878
|
+
return this.CreateRecord('Template Params', input, dataSource, userPayload, pubSub);
|
|
31879
|
+
}
|
|
31880
|
+
async UpdateTemplateParam(input, { dataSource, userPayload }, pubSub) {
|
|
31881
|
+
return this.UpdateRecord('Template Params', input, dataSource, userPayload, pubSub);
|
|
31882
|
+
}
|
|
31883
|
+
};
|
|
31884
|
+
exports.TemplateParamResolver = TemplateParamResolver;
|
|
31885
|
+
__decorate([
|
|
31886
|
+
(0, server_1.Query)(() => RunTemplateParamViewResult),
|
|
31887
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByIDInput)),
|
|
31888
|
+
__param(1, (0, server_1.Ctx)()),
|
|
31889
|
+
__param(2, (0, server_1.PubSub)()),
|
|
31890
|
+
__metadata("design:type", Function),
|
|
31891
|
+
__metadata("design:paramtypes", [server_1.RunViewByIDInput, Object, server_1.PubSubEngine]),
|
|
31892
|
+
__metadata("design:returntype", Promise)
|
|
31893
|
+
], TemplateParamResolver.prototype, "RunTemplateParamViewByID", null);
|
|
31894
|
+
__decorate([
|
|
31895
|
+
(0, server_1.Query)(() => RunTemplateParamViewResult),
|
|
31896
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByNameInput)),
|
|
31897
|
+
__param(1, (0, server_1.Ctx)()),
|
|
31898
|
+
__param(2, (0, server_1.PubSub)()),
|
|
31899
|
+
__metadata("design:type", Function),
|
|
31900
|
+
__metadata("design:paramtypes", [server_1.RunViewByNameInput, Object, server_1.PubSubEngine]),
|
|
31901
|
+
__metadata("design:returntype", Promise)
|
|
31902
|
+
], TemplateParamResolver.prototype, "RunTemplateParamViewByName", null);
|
|
31903
|
+
__decorate([
|
|
31904
|
+
(0, server_1.Query)(() => RunTemplateParamViewResult),
|
|
31905
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunDynamicViewInput)),
|
|
31906
|
+
__param(1, (0, server_1.Ctx)()),
|
|
31907
|
+
__param(2, (0, server_1.PubSub)()),
|
|
31908
|
+
__metadata("design:type", Function),
|
|
31909
|
+
__metadata("design:paramtypes", [server_1.RunDynamicViewInput, Object, server_1.PubSubEngine]),
|
|
31910
|
+
__metadata("design:returntype", Promise)
|
|
31911
|
+
], TemplateParamResolver.prototype, "RunTemplateParamDynamicView", null);
|
|
31912
|
+
__decorate([
|
|
31913
|
+
(0, server_1.Query)(() => TemplateParam_, { nullable: true }),
|
|
31914
|
+
__param(0, (0, server_1.Arg)('ID', () => server_1.Int)),
|
|
31915
|
+
__param(1, (0, server_1.Ctx)()),
|
|
31916
|
+
__param(2, (0, server_1.PubSub)()),
|
|
31917
|
+
__metadata("design:type", Function),
|
|
31918
|
+
__metadata("design:paramtypes", [Number, Object, server_1.PubSubEngine]),
|
|
31919
|
+
__metadata("design:returntype", Promise)
|
|
31920
|
+
], TemplateParamResolver.prototype, "TemplateParam", null);
|
|
31921
|
+
__decorate([
|
|
31922
|
+
(0, server_1.Mutation)(() => TemplateParam_),
|
|
31923
|
+
__param(0, (0, server_1.Arg)('input', () => CreateTemplateParamInput)),
|
|
31924
|
+
__param(1, (0, server_1.Ctx)()),
|
|
31925
|
+
__param(2, (0, server_1.PubSub)()),
|
|
31926
|
+
__metadata("design:type", Function),
|
|
31927
|
+
__metadata("design:paramtypes", [CreateTemplateParamInput, Object, server_1.PubSubEngine]),
|
|
31928
|
+
__metadata("design:returntype", Promise)
|
|
31929
|
+
], TemplateParamResolver.prototype, "CreateTemplateParam", null);
|
|
31930
|
+
__decorate([
|
|
31931
|
+
(0, server_1.Mutation)(() => TemplateParam_),
|
|
31932
|
+
__param(0, (0, server_1.Arg)('input', () => UpdateTemplateParamInput)),
|
|
31933
|
+
__param(1, (0, server_1.Ctx)()),
|
|
31934
|
+
__param(2, (0, server_1.PubSub)()),
|
|
31935
|
+
__metadata("design:type", Function),
|
|
31936
|
+
__metadata("design:paramtypes", [UpdateTemplateParamInput, Object, server_1.PubSubEngine]),
|
|
31937
|
+
__metadata("design:returntype", Promise)
|
|
31938
|
+
], TemplateParamResolver.prototype, "UpdateTemplateParam", null);
|
|
31939
|
+
exports.TemplateParamResolver = TemplateParamResolver = __decorate([
|
|
31940
|
+
(0, server_1.Resolver)(TemplateParam_)
|
|
31941
|
+
], TemplateParamResolver);
|
|
31942
|
+
let TemplateContentType_ = class TemplateContentType_ {
|
|
31943
|
+
};
|
|
31944
|
+
exports.TemplateContentType_ = TemplateContentType_;
|
|
31945
|
+
__decorate([
|
|
31946
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
31947
|
+
__metadata("design:type", Number)
|
|
31948
|
+
], TemplateContentType_.prototype, "ID", void 0);
|
|
31949
|
+
__decorate([
|
|
31950
|
+
(0, server_1.Field)({ description: 'Name of the template content type' }),
|
|
31951
|
+
(0, class_validator_1.MaxLength)(510),
|
|
31952
|
+
__metadata("design:type", String)
|
|
31953
|
+
], TemplateContentType_.prototype, "Name", void 0);
|
|
31954
|
+
__decorate([
|
|
31955
|
+
(0, server_1.Field)({ nullable: true, description: 'Description of the template content type' }),
|
|
31956
|
+
__metadata("design:type", String)
|
|
31957
|
+
], TemplateContentType_.prototype, "Description", void 0);
|
|
31958
|
+
__decorate([
|
|
31959
|
+
(0, server_1.Field)(),
|
|
31960
|
+
(0, class_validator_1.MaxLength)(8),
|
|
31961
|
+
__metadata("design:type", Date)
|
|
31962
|
+
], TemplateContentType_.prototype, "CreatedAt", void 0);
|
|
31963
|
+
__decorate([
|
|
31964
|
+
(0, server_1.Field)(),
|
|
31965
|
+
(0, class_validator_1.MaxLength)(8),
|
|
31966
|
+
__metadata("design:type", Date)
|
|
31967
|
+
], TemplateContentType_.prototype, "UpdatedAt", void 0);
|
|
31968
|
+
__decorate([
|
|
31969
|
+
(0, server_1.Field)(() => [mj_core_schema_server_object_types.TemplateContent_]),
|
|
31970
|
+
__metadata("design:type", Array)
|
|
31971
|
+
], TemplateContentType_.prototype, "TemplateContentsArray", void 0);
|
|
31972
|
+
exports.TemplateContentType_ = TemplateContentType_ = __decorate([
|
|
31973
|
+
(0, server_1.ObjectType)({ description: 'Template content types for categorizing content within templates' })
|
|
31974
|
+
], TemplateContentType_);
|
|
31975
|
+
let CreateTemplateContentTypeInput = class CreateTemplateContentTypeInput {
|
|
31976
|
+
};
|
|
31977
|
+
exports.CreateTemplateContentTypeInput = CreateTemplateContentTypeInput;
|
|
31978
|
+
__decorate([
|
|
31979
|
+
(0, server_1.Field)(),
|
|
31980
|
+
__metadata("design:type", String)
|
|
31981
|
+
], CreateTemplateContentTypeInput.prototype, "Name", void 0);
|
|
31982
|
+
__decorate([
|
|
31983
|
+
(0, server_1.Field)({ nullable: true }),
|
|
31984
|
+
__metadata("design:type", String)
|
|
31985
|
+
], CreateTemplateContentTypeInput.prototype, "Description", void 0);
|
|
31986
|
+
exports.CreateTemplateContentTypeInput = CreateTemplateContentTypeInput = __decorate([
|
|
31987
|
+
(0, server_1.InputType)()
|
|
31988
|
+
], CreateTemplateContentTypeInput);
|
|
31989
|
+
let UpdateTemplateContentTypeInput = class UpdateTemplateContentTypeInput {
|
|
31990
|
+
};
|
|
31991
|
+
exports.UpdateTemplateContentTypeInput = UpdateTemplateContentTypeInput;
|
|
31992
|
+
__decorate([
|
|
31993
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
31994
|
+
__metadata("design:type", Number)
|
|
31995
|
+
], UpdateTemplateContentTypeInput.prototype, "ID", void 0);
|
|
31996
|
+
__decorate([
|
|
31997
|
+
(0, server_1.Field)(),
|
|
31998
|
+
__metadata("design:type", String)
|
|
31999
|
+
], UpdateTemplateContentTypeInput.prototype, "Name", void 0);
|
|
32000
|
+
__decorate([
|
|
32001
|
+
(0, server_1.Field)({ nullable: true }),
|
|
32002
|
+
__metadata("design:type", String)
|
|
32003
|
+
], UpdateTemplateContentTypeInput.prototype, "Description", void 0);
|
|
32004
|
+
__decorate([
|
|
32005
|
+
(0, server_1.Field)(() => [server_1.KeyValuePairInput], { nullable: true }),
|
|
32006
|
+
__metadata("design:type", Array)
|
|
32007
|
+
], UpdateTemplateContentTypeInput.prototype, "OldValues___", void 0);
|
|
32008
|
+
exports.UpdateTemplateContentTypeInput = UpdateTemplateContentTypeInput = __decorate([
|
|
32009
|
+
(0, server_1.InputType)()
|
|
32010
|
+
], UpdateTemplateContentTypeInput);
|
|
32011
|
+
let RunTemplateContentTypeViewResult = class RunTemplateContentTypeViewResult {
|
|
32012
|
+
};
|
|
32013
|
+
exports.RunTemplateContentTypeViewResult = RunTemplateContentTypeViewResult;
|
|
32014
|
+
__decorate([
|
|
32015
|
+
(0, server_1.Field)(() => [TemplateContentType_]),
|
|
32016
|
+
__metadata("design:type", Array)
|
|
32017
|
+
], RunTemplateContentTypeViewResult.prototype, "Results", void 0);
|
|
32018
|
+
__decorate([
|
|
32019
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
32020
|
+
__metadata("design:type", Number)
|
|
32021
|
+
], RunTemplateContentTypeViewResult.prototype, "UserViewRunID", void 0);
|
|
32022
|
+
__decorate([
|
|
32023
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
32024
|
+
__metadata("design:type", Number)
|
|
32025
|
+
], RunTemplateContentTypeViewResult.prototype, "RowCount", void 0);
|
|
32026
|
+
__decorate([
|
|
32027
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
32028
|
+
__metadata("design:type", Number)
|
|
32029
|
+
], RunTemplateContentTypeViewResult.prototype, "TotalRowCount", void 0);
|
|
32030
|
+
__decorate([
|
|
32031
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
32032
|
+
__metadata("design:type", Number)
|
|
32033
|
+
], RunTemplateContentTypeViewResult.prototype, "ExecutionTime", void 0);
|
|
32034
|
+
__decorate([
|
|
32035
|
+
(0, server_1.Field)({ nullable: true }),
|
|
32036
|
+
__metadata("design:type", String)
|
|
32037
|
+
], RunTemplateContentTypeViewResult.prototype, "ErrorMessage", void 0);
|
|
32038
|
+
__decorate([
|
|
32039
|
+
(0, server_1.Field)(() => Boolean, { nullable: false }),
|
|
32040
|
+
__metadata("design:type", Boolean)
|
|
32041
|
+
], RunTemplateContentTypeViewResult.prototype, "Success", void 0);
|
|
32042
|
+
exports.RunTemplateContentTypeViewResult = RunTemplateContentTypeViewResult = __decorate([
|
|
32043
|
+
(0, server_1.ObjectType)()
|
|
32044
|
+
], RunTemplateContentTypeViewResult);
|
|
32045
|
+
let TemplateContentTypeResolver = class TemplateContentTypeResolver extends server_1.ResolverBase {
|
|
32046
|
+
async RunTemplateContentTypeViewByID(input, { dataSource, userPayload }, pubSub) {
|
|
32047
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
32048
|
+
}
|
|
32049
|
+
async RunTemplateContentTypeViewByName(input, { dataSource, userPayload }, pubSub) {
|
|
32050
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
32051
|
+
}
|
|
32052
|
+
async RunTemplateContentTypeDynamicView(input, { dataSource, userPayload }, pubSub) {
|
|
32053
|
+
input.EntityName = 'Template Content Types';
|
|
32054
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
32055
|
+
}
|
|
32056
|
+
async TemplateContentType(ID, { dataSource, userPayload }, pubSub) {
|
|
32057
|
+
this.CheckUserReadPermissions('Template Content Types', userPayload);
|
|
32058
|
+
const sSQL = `SELECT * FROM [${core_1.Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTemplateContentTypes] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Template Content Types', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
32059
|
+
const result = this.MapFieldNamesToCodeNames('Template Content Types', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
|
|
32060
|
+
return result;
|
|
32061
|
+
}
|
|
32062
|
+
async TemplateContentsArray(templatecontenttype_, { dataSource, userPayload }, pubSub) {
|
|
32063
|
+
this.CheckUserReadPermissions('Template Contents', userPayload);
|
|
32064
|
+
const sSQL = `SELECT * FROM [${core_1.Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTemplateContents] WHERE [TypeID]=${templatecontenttype_.ID} ` + this.getRowLevelSecurityWhereClause('Template Contents', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
32065
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Template Contents', await dataSource.query(sSQL));
|
|
32066
|
+
return result;
|
|
32067
|
+
}
|
|
32068
|
+
async CreateTemplateContentType(input, { dataSource, userPayload }, pubSub) {
|
|
32069
|
+
return this.CreateRecord('Template Content Types', input, dataSource, userPayload, pubSub);
|
|
32070
|
+
}
|
|
32071
|
+
async UpdateTemplateContentType(input, { dataSource, userPayload }, pubSub) {
|
|
32072
|
+
return this.UpdateRecord('Template Content Types', input, dataSource, userPayload, pubSub);
|
|
32073
|
+
}
|
|
32074
|
+
};
|
|
32075
|
+
exports.TemplateContentTypeResolver = TemplateContentTypeResolver;
|
|
32076
|
+
__decorate([
|
|
32077
|
+
(0, server_1.Query)(() => RunTemplateContentTypeViewResult),
|
|
32078
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByIDInput)),
|
|
32079
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32080
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32081
|
+
__metadata("design:type", Function),
|
|
32082
|
+
__metadata("design:paramtypes", [server_1.RunViewByIDInput, Object, server_1.PubSubEngine]),
|
|
32083
|
+
__metadata("design:returntype", Promise)
|
|
32084
|
+
], TemplateContentTypeResolver.prototype, "RunTemplateContentTypeViewByID", null);
|
|
32085
|
+
__decorate([
|
|
32086
|
+
(0, server_1.Query)(() => RunTemplateContentTypeViewResult),
|
|
32087
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByNameInput)),
|
|
32088
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32089
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32090
|
+
__metadata("design:type", Function),
|
|
32091
|
+
__metadata("design:paramtypes", [server_1.RunViewByNameInput, Object, server_1.PubSubEngine]),
|
|
32092
|
+
__metadata("design:returntype", Promise)
|
|
32093
|
+
], TemplateContentTypeResolver.prototype, "RunTemplateContentTypeViewByName", null);
|
|
32094
|
+
__decorate([
|
|
32095
|
+
(0, server_1.Query)(() => RunTemplateContentTypeViewResult),
|
|
32096
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunDynamicViewInput)),
|
|
32097
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32098
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32099
|
+
__metadata("design:type", Function),
|
|
32100
|
+
__metadata("design:paramtypes", [server_1.RunDynamicViewInput, Object, server_1.PubSubEngine]),
|
|
32101
|
+
__metadata("design:returntype", Promise)
|
|
32102
|
+
], TemplateContentTypeResolver.prototype, "RunTemplateContentTypeDynamicView", null);
|
|
32103
|
+
__decorate([
|
|
32104
|
+
(0, server_1.Query)(() => TemplateContentType_, { nullable: true }),
|
|
32105
|
+
__param(0, (0, server_1.Arg)('ID', () => server_1.Int)),
|
|
32106
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32107
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32108
|
+
__metadata("design:type", Function),
|
|
32109
|
+
__metadata("design:paramtypes", [Number, Object, server_1.PubSubEngine]),
|
|
32110
|
+
__metadata("design:returntype", Promise)
|
|
32111
|
+
], TemplateContentTypeResolver.prototype, "TemplateContentType", null);
|
|
32112
|
+
__decorate([
|
|
32113
|
+
(0, server_1.FieldResolver)(() => [mj_core_schema_server_object_types.TemplateContent_]),
|
|
32114
|
+
__param(0, (0, server_1.Root)()),
|
|
32115
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32116
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32117
|
+
__metadata("design:type", Function),
|
|
32118
|
+
__metadata("design:paramtypes", [TemplateContentType_, Object, server_1.PubSubEngine]),
|
|
32119
|
+
__metadata("design:returntype", Promise)
|
|
32120
|
+
], TemplateContentTypeResolver.prototype, "TemplateContentsArray", null);
|
|
32121
|
+
__decorate([
|
|
32122
|
+
(0, server_1.Mutation)(() => TemplateContentType_),
|
|
32123
|
+
__param(0, (0, server_1.Arg)('input', () => CreateTemplateContentTypeInput)),
|
|
32124
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32125
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32126
|
+
__metadata("design:type", Function),
|
|
32127
|
+
__metadata("design:paramtypes", [CreateTemplateContentTypeInput, Object, server_1.PubSubEngine]),
|
|
32128
|
+
__metadata("design:returntype", Promise)
|
|
32129
|
+
], TemplateContentTypeResolver.prototype, "CreateTemplateContentType", null);
|
|
32130
|
+
__decorate([
|
|
32131
|
+
(0, server_1.Mutation)(() => TemplateContentType_),
|
|
32132
|
+
__param(0, (0, server_1.Arg)('input', () => UpdateTemplateContentTypeInput)),
|
|
32133
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32134
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32135
|
+
__metadata("design:type", Function),
|
|
32136
|
+
__metadata("design:paramtypes", [UpdateTemplateContentTypeInput, Object, server_1.PubSubEngine]),
|
|
32137
|
+
__metadata("design:returntype", Promise)
|
|
32138
|
+
], TemplateContentTypeResolver.prototype, "UpdateTemplateContentType", null);
|
|
32139
|
+
exports.TemplateContentTypeResolver = TemplateContentTypeResolver = __decorate([
|
|
32140
|
+
(0, server_1.Resolver)(TemplateContentType_)
|
|
32141
|
+
], TemplateContentTypeResolver);
|
|
32142
|
+
let Recommendation_ = class Recommendation_ {
|
|
32143
|
+
};
|
|
32144
|
+
exports.Recommendation_ = Recommendation_;
|
|
32145
|
+
__decorate([
|
|
32146
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
32147
|
+
__metadata("design:type", Number)
|
|
32148
|
+
], Recommendation_.prototype, "ID", void 0);
|
|
32149
|
+
__decorate([
|
|
32150
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
32151
|
+
__metadata("design:type", Number)
|
|
32152
|
+
], Recommendation_.prototype, "RecommendationRunID", void 0);
|
|
32153
|
+
__decorate([
|
|
32154
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
32155
|
+
__metadata("design:type", Number)
|
|
32156
|
+
], Recommendation_.prototype, "SourceEntityID", void 0);
|
|
32157
|
+
__decorate([
|
|
32158
|
+
(0, server_1.Field)({ description: 'The record ID of the source entity' }),
|
|
32159
|
+
__metadata("design:type", String)
|
|
32160
|
+
], Recommendation_.prototype, "SourceEntityRecordID", void 0);
|
|
32161
|
+
__decorate([
|
|
32162
|
+
(0, server_1.Field)({ nullable: true }),
|
|
32163
|
+
(0, class_validator_1.MaxLength)(8),
|
|
32164
|
+
__metadata("design:type", Date)
|
|
32165
|
+
], Recommendation_.prototype, "CreatedAt", void 0);
|
|
32166
|
+
__decorate([
|
|
32167
|
+
(0, server_1.Field)({ nullable: true }),
|
|
32168
|
+
(0, class_validator_1.MaxLength)(8),
|
|
32169
|
+
__metadata("design:type", Date)
|
|
32170
|
+
], Recommendation_.prototype, "UpdatedAt", void 0);
|
|
32171
|
+
__decorate([
|
|
32172
|
+
(0, server_1.Field)(),
|
|
32173
|
+
(0, class_validator_1.MaxLength)(510),
|
|
32174
|
+
__metadata("design:type", String)
|
|
32175
|
+
], Recommendation_.prototype, "SourceEntity", void 0);
|
|
32176
|
+
__decorate([
|
|
32177
|
+
(0, server_1.Field)(() => [mj_core_schema_server_object_types.RecommendationItem_]),
|
|
32178
|
+
__metadata("design:type", Array)
|
|
32179
|
+
], Recommendation_.prototype, "RecommendationItemsArray", void 0);
|
|
32180
|
+
exports.Recommendation_ = Recommendation_ = __decorate([
|
|
32181
|
+
(0, server_1.ObjectType)({ description: 'Recommendation headers that store the left side of the recommendation which we track in the SourceEntityID/SourceEntityRecordID' })
|
|
32182
|
+
], Recommendation_);
|
|
32183
|
+
let CreateRecommendationInput = class CreateRecommendationInput {
|
|
32184
|
+
};
|
|
32185
|
+
exports.CreateRecommendationInput = CreateRecommendationInput;
|
|
32186
|
+
__decorate([
|
|
32187
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
32188
|
+
__metadata("design:type", Number)
|
|
32189
|
+
], CreateRecommendationInput.prototype, "RecommendationRunID", void 0);
|
|
32190
|
+
__decorate([
|
|
32191
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
32192
|
+
__metadata("design:type", Number)
|
|
32193
|
+
], CreateRecommendationInput.prototype, "SourceEntityID", void 0);
|
|
32194
|
+
__decorate([
|
|
32195
|
+
(0, server_1.Field)(),
|
|
32196
|
+
__metadata("design:type", String)
|
|
32197
|
+
], CreateRecommendationInput.prototype, "SourceEntityRecordID", void 0);
|
|
32198
|
+
exports.CreateRecommendationInput = CreateRecommendationInput = __decorate([
|
|
32199
|
+
(0, server_1.InputType)()
|
|
32200
|
+
], CreateRecommendationInput);
|
|
32201
|
+
let UpdateRecommendationInput = class UpdateRecommendationInput {
|
|
32202
|
+
};
|
|
32203
|
+
exports.UpdateRecommendationInput = UpdateRecommendationInput;
|
|
32204
|
+
__decorate([
|
|
32205
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
32206
|
+
__metadata("design:type", Number)
|
|
32207
|
+
], UpdateRecommendationInput.prototype, "ID", void 0);
|
|
32208
|
+
__decorate([
|
|
32209
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
32210
|
+
__metadata("design:type", Number)
|
|
32211
|
+
], UpdateRecommendationInput.prototype, "RecommendationRunID", void 0);
|
|
32212
|
+
__decorate([
|
|
32213
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
32214
|
+
__metadata("design:type", Number)
|
|
32215
|
+
], UpdateRecommendationInput.prototype, "SourceEntityID", void 0);
|
|
32216
|
+
__decorate([
|
|
32217
|
+
(0, server_1.Field)(),
|
|
32218
|
+
__metadata("design:type", String)
|
|
32219
|
+
], UpdateRecommendationInput.prototype, "SourceEntityRecordID", void 0);
|
|
32220
|
+
__decorate([
|
|
32221
|
+
(0, server_1.Field)(() => [server_1.KeyValuePairInput], { nullable: true }),
|
|
32222
|
+
__metadata("design:type", Array)
|
|
32223
|
+
], UpdateRecommendationInput.prototype, "OldValues___", void 0);
|
|
32224
|
+
exports.UpdateRecommendationInput = UpdateRecommendationInput = __decorate([
|
|
32225
|
+
(0, server_1.InputType)()
|
|
32226
|
+
], UpdateRecommendationInput);
|
|
32227
|
+
let RunRecommendationViewResult = class RunRecommendationViewResult {
|
|
32228
|
+
};
|
|
32229
|
+
exports.RunRecommendationViewResult = RunRecommendationViewResult;
|
|
32230
|
+
__decorate([
|
|
32231
|
+
(0, server_1.Field)(() => [Recommendation_]),
|
|
32232
|
+
__metadata("design:type", Array)
|
|
32233
|
+
], RunRecommendationViewResult.prototype, "Results", void 0);
|
|
32234
|
+
__decorate([
|
|
32235
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
32236
|
+
__metadata("design:type", Number)
|
|
32237
|
+
], RunRecommendationViewResult.prototype, "UserViewRunID", void 0);
|
|
32238
|
+
__decorate([
|
|
32239
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
32240
|
+
__metadata("design:type", Number)
|
|
32241
|
+
], RunRecommendationViewResult.prototype, "RowCount", void 0);
|
|
32242
|
+
__decorate([
|
|
32243
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
32244
|
+
__metadata("design:type", Number)
|
|
32245
|
+
], RunRecommendationViewResult.prototype, "TotalRowCount", void 0);
|
|
32246
|
+
__decorate([
|
|
32247
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
32248
|
+
__metadata("design:type", Number)
|
|
32249
|
+
], RunRecommendationViewResult.prototype, "ExecutionTime", void 0);
|
|
32250
|
+
__decorate([
|
|
32251
|
+
(0, server_1.Field)({ nullable: true }),
|
|
32252
|
+
__metadata("design:type", String)
|
|
32253
|
+
], RunRecommendationViewResult.prototype, "ErrorMessage", void 0);
|
|
32254
|
+
__decorate([
|
|
32255
|
+
(0, server_1.Field)(() => Boolean, { nullable: false }),
|
|
32256
|
+
__metadata("design:type", Boolean)
|
|
32257
|
+
], RunRecommendationViewResult.prototype, "Success", void 0);
|
|
32258
|
+
exports.RunRecommendationViewResult = RunRecommendationViewResult = __decorate([
|
|
32259
|
+
(0, server_1.ObjectType)()
|
|
32260
|
+
], RunRecommendationViewResult);
|
|
32261
|
+
let RecommendationResolver = class RecommendationResolver extends server_1.ResolverBase {
|
|
32262
|
+
async RunRecommendationViewByID(input, { dataSource, userPayload }, pubSub) {
|
|
32263
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
32264
|
+
}
|
|
32265
|
+
async RunRecommendationViewByName(input, { dataSource, userPayload }, pubSub) {
|
|
32266
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
32267
|
+
}
|
|
32268
|
+
async RunRecommendationDynamicView(input, { dataSource, userPayload }, pubSub) {
|
|
32269
|
+
input.EntityName = 'Recommendations';
|
|
32270
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
32271
|
+
}
|
|
32272
|
+
async Recommendation(ID, { dataSource, userPayload }, pubSub) {
|
|
32273
|
+
this.CheckUserReadPermissions('Recommendations', userPayload);
|
|
32274
|
+
const sSQL = `SELECT * FROM [${core_1.Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecommendations] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Recommendations', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
32275
|
+
const result = this.MapFieldNamesToCodeNames('Recommendations', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
|
|
32276
|
+
return result;
|
|
32277
|
+
}
|
|
32278
|
+
async RecommendationItemsArray(recommendation_, { dataSource, userPayload }, pubSub) {
|
|
32279
|
+
this.CheckUserReadPermissions('Recommendation Items', userPayload);
|
|
32280
|
+
const sSQL = `SELECT * FROM [${core_1.Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecommendationItems] WHERE [RecommendationID]=${recommendation_.ID} ` + this.getRowLevelSecurityWhereClause('Recommendation Items', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
32281
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Recommendation Items', await dataSource.query(sSQL));
|
|
32282
|
+
return result;
|
|
32283
|
+
}
|
|
32284
|
+
async CreateRecommendation(input, { dataSource, userPayload }, pubSub) {
|
|
32285
|
+
return this.CreateRecord('Recommendations', input, dataSource, userPayload, pubSub);
|
|
32286
|
+
}
|
|
32287
|
+
async UpdateRecommendation(input, { dataSource, userPayload }, pubSub) {
|
|
32288
|
+
return this.UpdateRecord('Recommendations', input, dataSource, userPayload, pubSub);
|
|
32289
|
+
}
|
|
32290
|
+
};
|
|
32291
|
+
exports.RecommendationResolver = RecommendationResolver;
|
|
32292
|
+
__decorate([
|
|
32293
|
+
(0, server_1.Query)(() => RunRecommendationViewResult),
|
|
32294
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByIDInput)),
|
|
32295
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32296
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32297
|
+
__metadata("design:type", Function),
|
|
32298
|
+
__metadata("design:paramtypes", [server_1.RunViewByIDInput, Object, server_1.PubSubEngine]),
|
|
32299
|
+
__metadata("design:returntype", Promise)
|
|
32300
|
+
], RecommendationResolver.prototype, "RunRecommendationViewByID", null);
|
|
32301
|
+
__decorate([
|
|
32302
|
+
(0, server_1.Query)(() => RunRecommendationViewResult),
|
|
32303
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByNameInput)),
|
|
32304
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32305
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32306
|
+
__metadata("design:type", Function),
|
|
32307
|
+
__metadata("design:paramtypes", [server_1.RunViewByNameInput, Object, server_1.PubSubEngine]),
|
|
32308
|
+
__metadata("design:returntype", Promise)
|
|
32309
|
+
], RecommendationResolver.prototype, "RunRecommendationViewByName", null);
|
|
32310
|
+
__decorate([
|
|
32311
|
+
(0, server_1.Query)(() => RunRecommendationViewResult),
|
|
32312
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunDynamicViewInput)),
|
|
32313
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32314
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32315
|
+
__metadata("design:type", Function),
|
|
32316
|
+
__metadata("design:paramtypes", [server_1.RunDynamicViewInput, Object, server_1.PubSubEngine]),
|
|
32317
|
+
__metadata("design:returntype", Promise)
|
|
32318
|
+
], RecommendationResolver.prototype, "RunRecommendationDynamicView", null);
|
|
32319
|
+
__decorate([
|
|
32320
|
+
(0, server_1.Query)(() => Recommendation_, { nullable: true }),
|
|
32321
|
+
__param(0, (0, server_1.Arg)('ID', () => server_1.Int)),
|
|
32322
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32323
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32324
|
+
__metadata("design:type", Function),
|
|
32325
|
+
__metadata("design:paramtypes", [Number, Object, server_1.PubSubEngine]),
|
|
32326
|
+
__metadata("design:returntype", Promise)
|
|
32327
|
+
], RecommendationResolver.prototype, "Recommendation", null);
|
|
32328
|
+
__decorate([
|
|
32329
|
+
(0, server_1.FieldResolver)(() => [mj_core_schema_server_object_types.RecommendationItem_]),
|
|
32330
|
+
__param(0, (0, server_1.Root)()),
|
|
32331
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32332
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32333
|
+
__metadata("design:type", Function),
|
|
32334
|
+
__metadata("design:paramtypes", [Recommendation_, Object, server_1.PubSubEngine]),
|
|
32335
|
+
__metadata("design:returntype", Promise)
|
|
32336
|
+
], RecommendationResolver.prototype, "RecommendationItemsArray", null);
|
|
32337
|
+
__decorate([
|
|
32338
|
+
(0, server_1.Mutation)(() => Recommendation_),
|
|
32339
|
+
__param(0, (0, server_1.Arg)('input', () => CreateRecommendationInput)),
|
|
32340
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32341
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32342
|
+
__metadata("design:type", Function),
|
|
32343
|
+
__metadata("design:paramtypes", [CreateRecommendationInput, Object, server_1.PubSubEngine]),
|
|
32344
|
+
__metadata("design:returntype", Promise)
|
|
32345
|
+
], RecommendationResolver.prototype, "CreateRecommendation", null);
|
|
32346
|
+
__decorate([
|
|
32347
|
+
(0, server_1.Mutation)(() => Recommendation_),
|
|
32348
|
+
__param(0, (0, server_1.Arg)('input', () => UpdateRecommendationInput)),
|
|
32349
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32350
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32351
|
+
__metadata("design:type", Function),
|
|
32352
|
+
__metadata("design:paramtypes", [UpdateRecommendationInput, Object, server_1.PubSubEngine]),
|
|
32353
|
+
__metadata("design:returntype", Promise)
|
|
32354
|
+
], RecommendationResolver.prototype, "UpdateRecommendation", null);
|
|
32355
|
+
exports.RecommendationResolver = RecommendationResolver = __decorate([
|
|
32356
|
+
(0, server_1.Resolver)(Recommendation_)
|
|
32357
|
+
], RecommendationResolver);
|
|
32358
|
+
let RecommendationProvider_ = class RecommendationProvider_ {
|
|
32359
|
+
};
|
|
32360
|
+
exports.RecommendationProvider_ = RecommendationProvider_;
|
|
32361
|
+
__decorate([
|
|
32362
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
32363
|
+
__metadata("design:type", Number)
|
|
32364
|
+
], RecommendationProvider_.prototype, "ID", void 0);
|
|
32365
|
+
__decorate([
|
|
32366
|
+
(0, server_1.Field)(),
|
|
32367
|
+
(0, class_validator_1.MaxLength)(510),
|
|
32368
|
+
__metadata("design:type", String)
|
|
32369
|
+
], RecommendationProvider_.prototype, "Name", void 0);
|
|
32370
|
+
__decorate([
|
|
32371
|
+
(0, server_1.Field)({ nullable: true }),
|
|
32372
|
+
__metadata("design:type", String)
|
|
32373
|
+
], RecommendationProvider_.prototype, "Description", void 0);
|
|
32374
|
+
__decorate([
|
|
32375
|
+
(0, server_1.Field)({ nullable: true }),
|
|
32376
|
+
(0, class_validator_1.MaxLength)(8),
|
|
32377
|
+
__metadata("design:type", Date)
|
|
32378
|
+
], RecommendationProvider_.prototype, "CreatedAt", void 0);
|
|
32379
|
+
__decorate([
|
|
32380
|
+
(0, server_1.Field)({ nullable: true }),
|
|
32381
|
+
(0, class_validator_1.MaxLength)(8),
|
|
32382
|
+
__metadata("design:type", Date)
|
|
32383
|
+
], RecommendationProvider_.prototype, "UpdatedAt", void 0);
|
|
32384
|
+
__decorate([
|
|
32385
|
+
(0, server_1.Field)(() => [mj_core_schema_server_object_types.RecommendationRun_]),
|
|
32386
|
+
__metadata("design:type", Array)
|
|
32387
|
+
], RecommendationProvider_.prototype, "RecommendationRunsArray", void 0);
|
|
32388
|
+
exports.RecommendationProvider_ = RecommendationProvider_ = __decorate([
|
|
32389
|
+
(0, server_1.ObjectType)({ description: 'Recommendation providers details' })
|
|
32390
|
+
], RecommendationProvider_);
|
|
32391
|
+
let CreateRecommendationProviderInput = class CreateRecommendationProviderInput {
|
|
32392
|
+
};
|
|
32393
|
+
exports.CreateRecommendationProviderInput = CreateRecommendationProviderInput;
|
|
32394
|
+
__decorate([
|
|
32395
|
+
(0, server_1.Field)(),
|
|
32396
|
+
__metadata("design:type", String)
|
|
32397
|
+
], CreateRecommendationProviderInput.prototype, "Name", void 0);
|
|
32398
|
+
__decorate([
|
|
32399
|
+
(0, server_1.Field)({ nullable: true }),
|
|
32400
|
+
__metadata("design:type", String)
|
|
32401
|
+
], CreateRecommendationProviderInput.prototype, "Description", void 0);
|
|
32402
|
+
exports.CreateRecommendationProviderInput = CreateRecommendationProviderInput = __decorate([
|
|
32403
|
+
(0, server_1.InputType)()
|
|
32404
|
+
], CreateRecommendationProviderInput);
|
|
32405
|
+
let UpdateRecommendationProviderInput = class UpdateRecommendationProviderInput {
|
|
32406
|
+
};
|
|
32407
|
+
exports.UpdateRecommendationProviderInput = UpdateRecommendationProviderInput;
|
|
32408
|
+
__decorate([
|
|
32409
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
32410
|
+
__metadata("design:type", Number)
|
|
32411
|
+
], UpdateRecommendationProviderInput.prototype, "ID", void 0);
|
|
32412
|
+
__decorate([
|
|
32413
|
+
(0, server_1.Field)(),
|
|
32414
|
+
__metadata("design:type", String)
|
|
32415
|
+
], UpdateRecommendationProviderInput.prototype, "Name", void 0);
|
|
32416
|
+
__decorate([
|
|
32417
|
+
(0, server_1.Field)({ nullable: true }),
|
|
32418
|
+
__metadata("design:type", String)
|
|
32419
|
+
], UpdateRecommendationProviderInput.prototype, "Description", void 0);
|
|
32420
|
+
__decorate([
|
|
32421
|
+
(0, server_1.Field)(() => [server_1.KeyValuePairInput], { nullable: true }),
|
|
32422
|
+
__metadata("design:type", Array)
|
|
32423
|
+
], UpdateRecommendationProviderInput.prototype, "OldValues___", void 0);
|
|
32424
|
+
exports.UpdateRecommendationProviderInput = UpdateRecommendationProviderInput = __decorate([
|
|
32425
|
+
(0, server_1.InputType)()
|
|
32426
|
+
], UpdateRecommendationProviderInput);
|
|
32427
|
+
let RunRecommendationProviderViewResult = class RunRecommendationProviderViewResult {
|
|
32428
|
+
};
|
|
32429
|
+
exports.RunRecommendationProviderViewResult = RunRecommendationProviderViewResult;
|
|
32430
|
+
__decorate([
|
|
32431
|
+
(0, server_1.Field)(() => [RecommendationProvider_]),
|
|
32432
|
+
__metadata("design:type", Array)
|
|
32433
|
+
], RunRecommendationProviderViewResult.prototype, "Results", void 0);
|
|
32434
|
+
__decorate([
|
|
32435
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
32436
|
+
__metadata("design:type", Number)
|
|
32437
|
+
], RunRecommendationProviderViewResult.prototype, "UserViewRunID", void 0);
|
|
32438
|
+
__decorate([
|
|
32439
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
32440
|
+
__metadata("design:type", Number)
|
|
32441
|
+
], RunRecommendationProviderViewResult.prototype, "RowCount", void 0);
|
|
32442
|
+
__decorate([
|
|
32443
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
32444
|
+
__metadata("design:type", Number)
|
|
32445
|
+
], RunRecommendationProviderViewResult.prototype, "TotalRowCount", void 0);
|
|
32446
|
+
__decorate([
|
|
32447
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
32448
|
+
__metadata("design:type", Number)
|
|
32449
|
+
], RunRecommendationProviderViewResult.prototype, "ExecutionTime", void 0);
|
|
32450
|
+
__decorate([
|
|
32451
|
+
(0, server_1.Field)({ nullable: true }),
|
|
32452
|
+
__metadata("design:type", String)
|
|
32453
|
+
], RunRecommendationProviderViewResult.prototype, "ErrorMessage", void 0);
|
|
32454
|
+
__decorate([
|
|
32455
|
+
(0, server_1.Field)(() => Boolean, { nullable: false }),
|
|
32456
|
+
__metadata("design:type", Boolean)
|
|
32457
|
+
], RunRecommendationProviderViewResult.prototype, "Success", void 0);
|
|
32458
|
+
exports.RunRecommendationProviderViewResult = RunRecommendationProviderViewResult = __decorate([
|
|
32459
|
+
(0, server_1.ObjectType)()
|
|
32460
|
+
], RunRecommendationProviderViewResult);
|
|
32461
|
+
let RecommendationProviderResolver = class RecommendationProviderResolver extends server_1.ResolverBase {
|
|
32462
|
+
async RunRecommendationProviderViewByID(input, { dataSource, userPayload }, pubSub) {
|
|
32463
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
32464
|
+
}
|
|
32465
|
+
async RunRecommendationProviderViewByName(input, { dataSource, userPayload }, pubSub) {
|
|
32466
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
32467
|
+
}
|
|
32468
|
+
async RunRecommendationProviderDynamicView(input, { dataSource, userPayload }, pubSub) {
|
|
32469
|
+
input.EntityName = 'Recommendation Providers';
|
|
32470
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
32471
|
+
}
|
|
32472
|
+
async RecommendationProvider(ID, { dataSource, userPayload }, pubSub) {
|
|
32473
|
+
this.CheckUserReadPermissions('Recommendation Providers', userPayload);
|
|
32474
|
+
const sSQL = `SELECT * FROM [${core_1.Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecommendationProviders] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Recommendation Providers', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
32475
|
+
const result = this.MapFieldNamesToCodeNames('Recommendation Providers', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
|
|
32476
|
+
return result;
|
|
32477
|
+
}
|
|
32478
|
+
async RecommendationRunsArray(recommendationprovider_, { dataSource, userPayload }, pubSub) {
|
|
32479
|
+
this.CheckUserReadPermissions('Recommendation Runs', userPayload);
|
|
32480
|
+
const sSQL = `SELECT * FROM [${core_1.Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecommendationRuns] WHERE [RecommendationProviderID]=${recommendationprovider_.ID} ` + this.getRowLevelSecurityWhereClause('Recommendation Runs', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
32481
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Recommendation Runs', await dataSource.query(sSQL));
|
|
32482
|
+
return result;
|
|
32483
|
+
}
|
|
32484
|
+
async CreateRecommendationProvider(input, { dataSource, userPayload }, pubSub) {
|
|
32485
|
+
return this.CreateRecord('Recommendation Providers', input, dataSource, userPayload, pubSub);
|
|
32486
|
+
}
|
|
32487
|
+
async UpdateRecommendationProvider(input, { dataSource, userPayload }, pubSub) {
|
|
32488
|
+
return this.UpdateRecord('Recommendation Providers', input, dataSource, userPayload, pubSub);
|
|
32489
|
+
}
|
|
32490
|
+
};
|
|
32491
|
+
exports.RecommendationProviderResolver = RecommendationProviderResolver;
|
|
32492
|
+
__decorate([
|
|
32493
|
+
(0, server_1.Query)(() => RunRecommendationProviderViewResult),
|
|
32494
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByIDInput)),
|
|
32495
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32496
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32497
|
+
__metadata("design:type", Function),
|
|
32498
|
+
__metadata("design:paramtypes", [server_1.RunViewByIDInput, Object, server_1.PubSubEngine]),
|
|
32499
|
+
__metadata("design:returntype", Promise)
|
|
32500
|
+
], RecommendationProviderResolver.prototype, "RunRecommendationProviderViewByID", null);
|
|
32501
|
+
__decorate([
|
|
32502
|
+
(0, server_1.Query)(() => RunRecommendationProviderViewResult),
|
|
32503
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByNameInput)),
|
|
32504
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32505
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32506
|
+
__metadata("design:type", Function),
|
|
32507
|
+
__metadata("design:paramtypes", [server_1.RunViewByNameInput, Object, server_1.PubSubEngine]),
|
|
32508
|
+
__metadata("design:returntype", Promise)
|
|
32509
|
+
], RecommendationProviderResolver.prototype, "RunRecommendationProviderViewByName", null);
|
|
32510
|
+
__decorate([
|
|
32511
|
+
(0, server_1.Query)(() => RunRecommendationProviderViewResult),
|
|
32512
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunDynamicViewInput)),
|
|
32513
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32514
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32515
|
+
__metadata("design:type", Function),
|
|
32516
|
+
__metadata("design:paramtypes", [server_1.RunDynamicViewInput, Object, server_1.PubSubEngine]),
|
|
32517
|
+
__metadata("design:returntype", Promise)
|
|
32518
|
+
], RecommendationProviderResolver.prototype, "RunRecommendationProviderDynamicView", null);
|
|
32519
|
+
__decorate([
|
|
32520
|
+
(0, server_1.Query)(() => RecommendationProvider_, { nullable: true }),
|
|
32521
|
+
__param(0, (0, server_1.Arg)('ID', () => server_1.Int)),
|
|
32522
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32523
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32524
|
+
__metadata("design:type", Function),
|
|
32525
|
+
__metadata("design:paramtypes", [Number, Object, server_1.PubSubEngine]),
|
|
32526
|
+
__metadata("design:returntype", Promise)
|
|
32527
|
+
], RecommendationProviderResolver.prototype, "RecommendationProvider", null);
|
|
32528
|
+
__decorate([
|
|
32529
|
+
(0, server_1.FieldResolver)(() => [mj_core_schema_server_object_types.RecommendationRun_]),
|
|
32530
|
+
__param(0, (0, server_1.Root)()),
|
|
32531
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32532
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32533
|
+
__metadata("design:type", Function),
|
|
32534
|
+
__metadata("design:paramtypes", [RecommendationProvider_, Object, server_1.PubSubEngine]),
|
|
32535
|
+
__metadata("design:returntype", Promise)
|
|
32536
|
+
], RecommendationProviderResolver.prototype, "RecommendationRunsArray", null);
|
|
32537
|
+
__decorate([
|
|
32538
|
+
(0, server_1.Mutation)(() => RecommendationProvider_),
|
|
32539
|
+
__param(0, (0, server_1.Arg)('input', () => CreateRecommendationProviderInput)),
|
|
32540
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32541
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32542
|
+
__metadata("design:type", Function),
|
|
32543
|
+
__metadata("design:paramtypes", [CreateRecommendationProviderInput, Object, server_1.PubSubEngine]),
|
|
32544
|
+
__metadata("design:returntype", Promise)
|
|
32545
|
+
], RecommendationProviderResolver.prototype, "CreateRecommendationProvider", null);
|
|
32546
|
+
__decorate([
|
|
32547
|
+
(0, server_1.Mutation)(() => RecommendationProvider_),
|
|
32548
|
+
__param(0, (0, server_1.Arg)('input', () => UpdateRecommendationProviderInput)),
|
|
32549
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32550
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32551
|
+
__metadata("design:type", Function),
|
|
32552
|
+
__metadata("design:paramtypes", [UpdateRecommendationProviderInput, Object, server_1.PubSubEngine]),
|
|
32553
|
+
__metadata("design:returntype", Promise)
|
|
32554
|
+
], RecommendationProviderResolver.prototype, "UpdateRecommendationProvider", null);
|
|
32555
|
+
exports.RecommendationProviderResolver = RecommendationProviderResolver = __decorate([
|
|
32556
|
+
(0, server_1.Resolver)(RecommendationProvider_)
|
|
32557
|
+
], RecommendationProviderResolver);
|
|
32558
|
+
let RecommendationRun_ = class RecommendationRun_ {
|
|
32559
|
+
};
|
|
32560
|
+
exports.RecommendationRun_ = RecommendationRun_;
|
|
32561
|
+
__decorate([
|
|
32562
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
32563
|
+
__metadata("design:type", Number)
|
|
32564
|
+
], RecommendationRun_.prototype, "ID", void 0);
|
|
32565
|
+
__decorate([
|
|
32566
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
32567
|
+
__metadata("design:type", Number)
|
|
32568
|
+
], RecommendationRun_.prototype, "RecommendationProviderID", void 0);
|
|
32569
|
+
__decorate([
|
|
32570
|
+
(0, server_1.Field)({ description: 'The start date of the recommendation run' }),
|
|
32571
|
+
(0, class_validator_1.MaxLength)(8),
|
|
32572
|
+
__metadata("design:type", Date)
|
|
32573
|
+
], RecommendationRun_.prototype, "StartDate", void 0);
|
|
32574
|
+
__decorate([
|
|
32575
|
+
(0, server_1.Field)({ nullable: true, description: 'The end date of the recommendation run' }),
|
|
32576
|
+
(0, class_validator_1.MaxLength)(8),
|
|
32577
|
+
__metadata("design:type", Date)
|
|
32578
|
+
], RecommendationRun_.prototype, "EndDate", void 0);
|
|
32579
|
+
__decorate([
|
|
32580
|
+
(0, server_1.Field)({ description: 'The status of the recommendation run' }),
|
|
32581
|
+
(0, class_validator_1.MaxLength)(100),
|
|
32582
|
+
__metadata("design:type", String)
|
|
32583
|
+
], RecommendationRun_.prototype, "Status", void 0);
|
|
32584
|
+
__decorate([
|
|
32585
|
+
(0, server_1.Field)({ nullable: true }),
|
|
32586
|
+
__metadata("design:type", String)
|
|
32587
|
+
], RecommendationRun_.prototype, "Description", void 0);
|
|
32588
|
+
__decorate([
|
|
32589
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
32590
|
+
__metadata("design:type", Number)
|
|
32591
|
+
], RecommendationRun_.prototype, "RunByUserID", void 0);
|
|
32592
|
+
__decorate([
|
|
32593
|
+
(0, server_1.Field)({ nullable: true }),
|
|
32594
|
+
(0, class_validator_1.MaxLength)(8),
|
|
32595
|
+
__metadata("design:type", Date)
|
|
32596
|
+
], RecommendationRun_.prototype, "CreatedAt", void 0);
|
|
32597
|
+
__decorate([
|
|
32598
|
+
(0, server_1.Field)({ nullable: true }),
|
|
32599
|
+
(0, class_validator_1.MaxLength)(8),
|
|
32600
|
+
__metadata("design:type", Date)
|
|
32601
|
+
], RecommendationRun_.prototype, "UpdatedAt", void 0);
|
|
32602
|
+
__decorate([
|
|
32603
|
+
(0, server_1.Field)(),
|
|
32604
|
+
(0, class_validator_1.MaxLength)(510),
|
|
32605
|
+
__metadata("design:type", String)
|
|
32606
|
+
], RecommendationRun_.prototype, "RecommendationProvider", void 0);
|
|
32607
|
+
__decorate([
|
|
32608
|
+
(0, server_1.Field)(),
|
|
32609
|
+
(0, class_validator_1.MaxLength)(200),
|
|
32610
|
+
__metadata("design:type", String)
|
|
32611
|
+
], RecommendationRun_.prototype, "RunByUser", void 0);
|
|
32612
|
+
__decorate([
|
|
32613
|
+
(0, server_1.Field)(() => [mj_core_schema_server_object_types.Recommendation_]),
|
|
32614
|
+
__metadata("design:type", Array)
|
|
32615
|
+
], RecommendationRun_.prototype, "RecommendationsArray", void 0);
|
|
32616
|
+
exports.RecommendationRun_ = RecommendationRun_ = __decorate([
|
|
32617
|
+
(0, server_1.ObjectType)({ description: 'Recommendation runs log each time a provider is requested to provide recommendations' })
|
|
32618
|
+
], RecommendationRun_);
|
|
32619
|
+
let CreateRecommendationRunInput = class CreateRecommendationRunInput {
|
|
32620
|
+
};
|
|
32621
|
+
exports.CreateRecommendationRunInput = CreateRecommendationRunInput;
|
|
32622
|
+
__decorate([
|
|
32623
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
32624
|
+
__metadata("design:type", Number)
|
|
32625
|
+
], CreateRecommendationRunInput.prototype, "RecommendationProviderID", void 0);
|
|
32626
|
+
__decorate([
|
|
32627
|
+
(0, server_1.Field)(),
|
|
32628
|
+
__metadata("design:type", Date)
|
|
32629
|
+
], CreateRecommendationRunInput.prototype, "StartDate", void 0);
|
|
32630
|
+
__decorate([
|
|
32631
|
+
(0, server_1.Field)({ nullable: true }),
|
|
32632
|
+
__metadata("design:type", Date)
|
|
32633
|
+
], CreateRecommendationRunInput.prototype, "EndDate", void 0);
|
|
32634
|
+
__decorate([
|
|
32635
|
+
(0, server_1.Field)(),
|
|
32636
|
+
__metadata("design:type", String)
|
|
32637
|
+
], CreateRecommendationRunInput.prototype, "Status", void 0);
|
|
32638
|
+
__decorate([
|
|
32639
|
+
(0, server_1.Field)({ nullable: true }),
|
|
32640
|
+
__metadata("design:type", String)
|
|
32641
|
+
], CreateRecommendationRunInput.prototype, "Description", void 0);
|
|
32642
|
+
__decorate([
|
|
32643
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
32644
|
+
__metadata("design:type", Number)
|
|
32645
|
+
], CreateRecommendationRunInput.prototype, "RunByUserID", void 0);
|
|
32646
|
+
exports.CreateRecommendationRunInput = CreateRecommendationRunInput = __decorate([
|
|
32647
|
+
(0, server_1.InputType)()
|
|
32648
|
+
], CreateRecommendationRunInput);
|
|
32649
|
+
let UpdateRecommendationRunInput = class UpdateRecommendationRunInput {
|
|
32650
|
+
};
|
|
32651
|
+
exports.UpdateRecommendationRunInput = UpdateRecommendationRunInput;
|
|
32652
|
+
__decorate([
|
|
32653
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
32654
|
+
__metadata("design:type", Number)
|
|
32655
|
+
], UpdateRecommendationRunInput.prototype, "ID", void 0);
|
|
32656
|
+
__decorate([
|
|
32657
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
32658
|
+
__metadata("design:type", Number)
|
|
32659
|
+
], UpdateRecommendationRunInput.prototype, "RecommendationProviderID", void 0);
|
|
32660
|
+
__decorate([
|
|
32661
|
+
(0, server_1.Field)(),
|
|
32662
|
+
__metadata("design:type", Date)
|
|
32663
|
+
], UpdateRecommendationRunInput.prototype, "StartDate", void 0);
|
|
32664
|
+
__decorate([
|
|
32665
|
+
(0, server_1.Field)({ nullable: true }),
|
|
32666
|
+
__metadata("design:type", Date)
|
|
32667
|
+
], UpdateRecommendationRunInput.prototype, "EndDate", void 0);
|
|
32668
|
+
__decorate([
|
|
32669
|
+
(0, server_1.Field)(),
|
|
32670
|
+
__metadata("design:type", String)
|
|
32671
|
+
], UpdateRecommendationRunInput.prototype, "Status", void 0);
|
|
32672
|
+
__decorate([
|
|
32673
|
+
(0, server_1.Field)({ nullable: true }),
|
|
32674
|
+
__metadata("design:type", String)
|
|
32675
|
+
], UpdateRecommendationRunInput.prototype, "Description", void 0);
|
|
32676
|
+
__decorate([
|
|
32677
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
32678
|
+
__metadata("design:type", Number)
|
|
32679
|
+
], UpdateRecommendationRunInput.prototype, "RunByUserID", void 0);
|
|
32680
|
+
__decorate([
|
|
32681
|
+
(0, server_1.Field)(() => [server_1.KeyValuePairInput], { nullable: true }),
|
|
32682
|
+
__metadata("design:type", Array)
|
|
32683
|
+
], UpdateRecommendationRunInput.prototype, "OldValues___", void 0);
|
|
32684
|
+
exports.UpdateRecommendationRunInput = UpdateRecommendationRunInput = __decorate([
|
|
32685
|
+
(0, server_1.InputType)()
|
|
32686
|
+
], UpdateRecommendationRunInput);
|
|
32687
|
+
let RunRecommendationRunViewResult = class RunRecommendationRunViewResult {
|
|
32688
|
+
};
|
|
32689
|
+
exports.RunRecommendationRunViewResult = RunRecommendationRunViewResult;
|
|
32690
|
+
__decorate([
|
|
32691
|
+
(0, server_1.Field)(() => [RecommendationRun_]),
|
|
32692
|
+
__metadata("design:type", Array)
|
|
32693
|
+
], RunRecommendationRunViewResult.prototype, "Results", void 0);
|
|
32694
|
+
__decorate([
|
|
32695
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
32696
|
+
__metadata("design:type", Number)
|
|
32697
|
+
], RunRecommendationRunViewResult.prototype, "UserViewRunID", void 0);
|
|
32698
|
+
__decorate([
|
|
32699
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
32700
|
+
__metadata("design:type", Number)
|
|
32701
|
+
], RunRecommendationRunViewResult.prototype, "RowCount", void 0);
|
|
32702
|
+
__decorate([
|
|
32703
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
32704
|
+
__metadata("design:type", Number)
|
|
32705
|
+
], RunRecommendationRunViewResult.prototype, "TotalRowCount", void 0);
|
|
32706
|
+
__decorate([
|
|
32707
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
32708
|
+
__metadata("design:type", Number)
|
|
32709
|
+
], RunRecommendationRunViewResult.prototype, "ExecutionTime", void 0);
|
|
32710
|
+
__decorate([
|
|
32711
|
+
(0, server_1.Field)({ nullable: true }),
|
|
32712
|
+
__metadata("design:type", String)
|
|
32713
|
+
], RunRecommendationRunViewResult.prototype, "ErrorMessage", void 0);
|
|
32714
|
+
__decorate([
|
|
32715
|
+
(0, server_1.Field)(() => Boolean, { nullable: false }),
|
|
32716
|
+
__metadata("design:type", Boolean)
|
|
32717
|
+
], RunRecommendationRunViewResult.prototype, "Success", void 0);
|
|
32718
|
+
exports.RunRecommendationRunViewResult = RunRecommendationRunViewResult = __decorate([
|
|
32719
|
+
(0, server_1.ObjectType)()
|
|
32720
|
+
], RunRecommendationRunViewResult);
|
|
32721
|
+
let RecommendationRunResolver = class RecommendationRunResolver extends server_1.ResolverBase {
|
|
32722
|
+
async RunRecommendationRunViewByID(input, { dataSource, userPayload }, pubSub) {
|
|
32723
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
32724
|
+
}
|
|
32725
|
+
async RunRecommendationRunViewByName(input, { dataSource, userPayload }, pubSub) {
|
|
32726
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
32727
|
+
}
|
|
32728
|
+
async RunRecommendationRunDynamicView(input, { dataSource, userPayload }, pubSub) {
|
|
32729
|
+
input.EntityName = 'Recommendation Runs';
|
|
32730
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
32731
|
+
}
|
|
32732
|
+
async RecommendationRun(ID, { dataSource, userPayload }, pubSub) {
|
|
32733
|
+
this.CheckUserReadPermissions('Recommendation Runs', userPayload);
|
|
32734
|
+
const sSQL = `SELECT * FROM [${core_1.Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecommendationRuns] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Recommendation Runs', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
32735
|
+
const result = this.MapFieldNamesToCodeNames('Recommendation Runs', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
|
|
32736
|
+
return result;
|
|
32737
|
+
}
|
|
32738
|
+
async RecommendationsArray(recommendationrun_, { dataSource, userPayload }, pubSub) {
|
|
32739
|
+
this.CheckUserReadPermissions('Recommendations', userPayload);
|
|
32740
|
+
const sSQL = `SELECT * FROM [${core_1.Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecommendations] WHERE [RecommendationRunID]=${recommendationrun_.ID} ` + this.getRowLevelSecurityWhereClause('Recommendations', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
32741
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Recommendations', await dataSource.query(sSQL));
|
|
32742
|
+
return result;
|
|
32743
|
+
}
|
|
32744
|
+
async CreateRecommendationRun(input, { dataSource, userPayload }, pubSub) {
|
|
32745
|
+
return this.CreateRecord('Recommendation Runs', input, dataSource, userPayload, pubSub);
|
|
32746
|
+
}
|
|
32747
|
+
async UpdateRecommendationRun(input, { dataSource, userPayload }, pubSub) {
|
|
32748
|
+
return this.UpdateRecord('Recommendation Runs', input, dataSource, userPayload, pubSub);
|
|
32749
|
+
}
|
|
32750
|
+
};
|
|
32751
|
+
exports.RecommendationRunResolver = RecommendationRunResolver;
|
|
32752
|
+
__decorate([
|
|
32753
|
+
(0, server_1.Query)(() => RunRecommendationRunViewResult),
|
|
32754
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByIDInput)),
|
|
32755
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32756
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32757
|
+
__metadata("design:type", Function),
|
|
32758
|
+
__metadata("design:paramtypes", [server_1.RunViewByIDInput, Object, server_1.PubSubEngine]),
|
|
32759
|
+
__metadata("design:returntype", Promise)
|
|
32760
|
+
], RecommendationRunResolver.prototype, "RunRecommendationRunViewByID", null);
|
|
32761
|
+
__decorate([
|
|
32762
|
+
(0, server_1.Query)(() => RunRecommendationRunViewResult),
|
|
32763
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByNameInput)),
|
|
32764
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32765
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32766
|
+
__metadata("design:type", Function),
|
|
32767
|
+
__metadata("design:paramtypes", [server_1.RunViewByNameInput, Object, server_1.PubSubEngine]),
|
|
32768
|
+
__metadata("design:returntype", Promise)
|
|
32769
|
+
], RecommendationRunResolver.prototype, "RunRecommendationRunViewByName", null);
|
|
32770
|
+
__decorate([
|
|
32771
|
+
(0, server_1.Query)(() => RunRecommendationRunViewResult),
|
|
32772
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunDynamicViewInput)),
|
|
32773
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32774
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32775
|
+
__metadata("design:type", Function),
|
|
32776
|
+
__metadata("design:paramtypes", [server_1.RunDynamicViewInput, Object, server_1.PubSubEngine]),
|
|
32777
|
+
__metadata("design:returntype", Promise)
|
|
32778
|
+
], RecommendationRunResolver.prototype, "RunRecommendationRunDynamicView", null);
|
|
32779
|
+
__decorate([
|
|
32780
|
+
(0, server_1.Query)(() => RecommendationRun_, { nullable: true }),
|
|
32781
|
+
__param(0, (0, server_1.Arg)('ID', () => server_1.Int)),
|
|
32782
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32783
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32784
|
+
__metadata("design:type", Function),
|
|
32785
|
+
__metadata("design:paramtypes", [Number, Object, server_1.PubSubEngine]),
|
|
32786
|
+
__metadata("design:returntype", Promise)
|
|
32787
|
+
], RecommendationRunResolver.prototype, "RecommendationRun", null);
|
|
32788
|
+
__decorate([
|
|
32789
|
+
(0, server_1.FieldResolver)(() => [mj_core_schema_server_object_types.Recommendation_]),
|
|
32790
|
+
__param(0, (0, server_1.Root)()),
|
|
32791
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32792
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32793
|
+
__metadata("design:type", Function),
|
|
32794
|
+
__metadata("design:paramtypes", [RecommendationRun_, Object, server_1.PubSubEngine]),
|
|
32795
|
+
__metadata("design:returntype", Promise)
|
|
32796
|
+
], RecommendationRunResolver.prototype, "RecommendationsArray", null);
|
|
32797
|
+
__decorate([
|
|
32798
|
+
(0, server_1.Mutation)(() => RecommendationRun_),
|
|
32799
|
+
__param(0, (0, server_1.Arg)('input', () => CreateRecommendationRunInput)),
|
|
32800
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32801
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32802
|
+
__metadata("design:type", Function),
|
|
32803
|
+
__metadata("design:paramtypes", [CreateRecommendationRunInput, Object, server_1.PubSubEngine]),
|
|
32804
|
+
__metadata("design:returntype", Promise)
|
|
32805
|
+
], RecommendationRunResolver.prototype, "CreateRecommendationRun", null);
|
|
32806
|
+
__decorate([
|
|
32807
|
+
(0, server_1.Mutation)(() => RecommendationRun_),
|
|
32808
|
+
__param(0, (0, server_1.Arg)('input', () => UpdateRecommendationRunInput)),
|
|
32809
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32810
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32811
|
+
__metadata("design:type", Function),
|
|
32812
|
+
__metadata("design:paramtypes", [UpdateRecommendationRunInput, Object, server_1.PubSubEngine]),
|
|
32813
|
+
__metadata("design:returntype", Promise)
|
|
32814
|
+
], RecommendationRunResolver.prototype, "UpdateRecommendationRun", null);
|
|
32815
|
+
exports.RecommendationRunResolver = RecommendationRunResolver = __decorate([
|
|
32816
|
+
(0, server_1.Resolver)(RecommendationRun_)
|
|
32817
|
+
], RecommendationRunResolver);
|
|
32818
|
+
let RecommendationItem_ = class RecommendationItem_ {
|
|
32819
|
+
};
|
|
32820
|
+
exports.RecommendationItem_ = RecommendationItem_;
|
|
32821
|
+
__decorate([
|
|
32822
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
32823
|
+
__metadata("design:type", Number)
|
|
32824
|
+
], RecommendationItem_.prototype, "ID", void 0);
|
|
32825
|
+
__decorate([
|
|
32826
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
32827
|
+
__metadata("design:type", Number)
|
|
32828
|
+
], RecommendationItem_.prototype, "RecommendationID", void 0);
|
|
32829
|
+
__decorate([
|
|
32830
|
+
(0, server_1.Field)(() => server_1.Int, { description: 'The ID of the destination entity' }),
|
|
32831
|
+
__metadata("design:type", Number)
|
|
32832
|
+
], RecommendationItem_.prototype, "DestinationEntityID", void 0);
|
|
32833
|
+
__decorate([
|
|
32834
|
+
(0, server_1.Field)({ description: 'The record ID of the destination entity' }),
|
|
32835
|
+
__metadata("design:type", String)
|
|
32836
|
+
], RecommendationItem_.prototype, "DestinationEntityRecordID", void 0);
|
|
32837
|
+
__decorate([
|
|
32838
|
+
(0, server_1.Field)(() => server_1.Float, { nullable: true, description: 'A value between 0 and 1 indicating the probability of the match, higher numbers indicating a more certain match/recommendation.' }),
|
|
32839
|
+
__metadata("design:type", Number)
|
|
32840
|
+
], RecommendationItem_.prototype, "MatchProbability", void 0);
|
|
32841
|
+
__decorate([
|
|
32842
|
+
(0, server_1.Field)({ nullable: true }),
|
|
32843
|
+
(0, class_validator_1.MaxLength)(8),
|
|
32844
|
+
__metadata("design:type", Date)
|
|
32845
|
+
], RecommendationItem_.prototype, "CreatedAt", void 0);
|
|
32846
|
+
__decorate([
|
|
32847
|
+
(0, server_1.Field)({ nullable: true }),
|
|
32848
|
+
(0, class_validator_1.MaxLength)(8),
|
|
32849
|
+
__metadata("design:type", Date)
|
|
32850
|
+
], RecommendationItem_.prototype, "UpdatedAt", void 0);
|
|
32851
|
+
__decorate([
|
|
32852
|
+
(0, server_1.Field)(),
|
|
32853
|
+
(0, class_validator_1.MaxLength)(510),
|
|
32854
|
+
__metadata("design:type", String)
|
|
32855
|
+
], RecommendationItem_.prototype, "DestinationEntity", void 0);
|
|
32856
|
+
exports.RecommendationItem_ = RecommendationItem_ = __decorate([
|
|
32857
|
+
(0, server_1.ObjectType)({ description: 'Table to store individual recommendation items that are the right side of the recommendation which we track in the DestinationEntityID/DestinationEntityRecordID' })
|
|
32858
|
+
], RecommendationItem_);
|
|
32859
|
+
let CreateRecommendationItemInput = class CreateRecommendationItemInput {
|
|
32860
|
+
};
|
|
32861
|
+
exports.CreateRecommendationItemInput = CreateRecommendationItemInput;
|
|
32862
|
+
__decorate([
|
|
32863
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
32864
|
+
__metadata("design:type", Number)
|
|
32865
|
+
], CreateRecommendationItemInput.prototype, "RecommendationID", void 0);
|
|
32866
|
+
__decorate([
|
|
32867
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
32868
|
+
__metadata("design:type", Number)
|
|
32869
|
+
], CreateRecommendationItemInput.prototype, "DestinationEntityID", void 0);
|
|
32870
|
+
__decorate([
|
|
32871
|
+
(0, server_1.Field)(),
|
|
32872
|
+
__metadata("design:type", String)
|
|
32873
|
+
], CreateRecommendationItemInput.prototype, "DestinationEntityRecordID", void 0);
|
|
32874
|
+
__decorate([
|
|
32875
|
+
(0, server_1.Field)(() => server_1.Float, { nullable: true }),
|
|
32876
|
+
__metadata("design:type", Number)
|
|
32877
|
+
], CreateRecommendationItemInput.prototype, "MatchProbability", void 0);
|
|
32878
|
+
exports.CreateRecommendationItemInput = CreateRecommendationItemInput = __decorate([
|
|
32879
|
+
(0, server_1.InputType)()
|
|
32880
|
+
], CreateRecommendationItemInput);
|
|
32881
|
+
let UpdateRecommendationItemInput = class UpdateRecommendationItemInput {
|
|
32882
|
+
};
|
|
32883
|
+
exports.UpdateRecommendationItemInput = UpdateRecommendationItemInput;
|
|
32884
|
+
__decorate([
|
|
32885
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
32886
|
+
__metadata("design:type", Number)
|
|
32887
|
+
], UpdateRecommendationItemInput.prototype, "ID", void 0);
|
|
32888
|
+
__decorate([
|
|
32889
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
32890
|
+
__metadata("design:type", Number)
|
|
32891
|
+
], UpdateRecommendationItemInput.prototype, "RecommendationID", void 0);
|
|
32892
|
+
__decorate([
|
|
32893
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
32894
|
+
__metadata("design:type", Number)
|
|
32895
|
+
], UpdateRecommendationItemInput.prototype, "DestinationEntityID", void 0);
|
|
32896
|
+
__decorate([
|
|
32897
|
+
(0, server_1.Field)(),
|
|
32898
|
+
__metadata("design:type", String)
|
|
32899
|
+
], UpdateRecommendationItemInput.prototype, "DestinationEntityRecordID", void 0);
|
|
32900
|
+
__decorate([
|
|
32901
|
+
(0, server_1.Field)(() => server_1.Float, { nullable: true }),
|
|
32902
|
+
__metadata("design:type", Number)
|
|
32903
|
+
], UpdateRecommendationItemInput.prototype, "MatchProbability", void 0);
|
|
32904
|
+
__decorate([
|
|
32905
|
+
(0, server_1.Field)(() => [server_1.KeyValuePairInput], { nullable: true }),
|
|
32906
|
+
__metadata("design:type", Array)
|
|
32907
|
+
], UpdateRecommendationItemInput.prototype, "OldValues___", void 0);
|
|
32908
|
+
exports.UpdateRecommendationItemInput = UpdateRecommendationItemInput = __decorate([
|
|
32909
|
+
(0, server_1.InputType)()
|
|
32910
|
+
], UpdateRecommendationItemInput);
|
|
32911
|
+
let RunRecommendationItemViewResult = class RunRecommendationItemViewResult {
|
|
32912
|
+
};
|
|
32913
|
+
exports.RunRecommendationItemViewResult = RunRecommendationItemViewResult;
|
|
32914
|
+
__decorate([
|
|
32915
|
+
(0, server_1.Field)(() => [RecommendationItem_]),
|
|
32916
|
+
__metadata("design:type", Array)
|
|
32917
|
+
], RunRecommendationItemViewResult.prototype, "Results", void 0);
|
|
32918
|
+
__decorate([
|
|
32919
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
32920
|
+
__metadata("design:type", Number)
|
|
32921
|
+
], RunRecommendationItemViewResult.prototype, "UserViewRunID", void 0);
|
|
32922
|
+
__decorate([
|
|
32923
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
32924
|
+
__metadata("design:type", Number)
|
|
32925
|
+
], RunRecommendationItemViewResult.prototype, "RowCount", void 0);
|
|
32926
|
+
__decorate([
|
|
32927
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
32928
|
+
__metadata("design:type", Number)
|
|
32929
|
+
], RunRecommendationItemViewResult.prototype, "TotalRowCount", void 0);
|
|
32930
|
+
__decorate([
|
|
32931
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
32932
|
+
__metadata("design:type", Number)
|
|
32933
|
+
], RunRecommendationItemViewResult.prototype, "ExecutionTime", void 0);
|
|
32934
|
+
__decorate([
|
|
32935
|
+
(0, server_1.Field)({ nullable: true }),
|
|
32936
|
+
__metadata("design:type", String)
|
|
32937
|
+
], RunRecommendationItemViewResult.prototype, "ErrorMessage", void 0);
|
|
32938
|
+
__decorate([
|
|
32939
|
+
(0, server_1.Field)(() => Boolean, { nullable: false }),
|
|
32940
|
+
__metadata("design:type", Boolean)
|
|
32941
|
+
], RunRecommendationItemViewResult.prototype, "Success", void 0);
|
|
32942
|
+
exports.RunRecommendationItemViewResult = RunRecommendationItemViewResult = __decorate([
|
|
32943
|
+
(0, server_1.ObjectType)()
|
|
32944
|
+
], RunRecommendationItemViewResult);
|
|
32945
|
+
let RecommendationItemResolver = class RecommendationItemResolver extends server_1.ResolverBase {
|
|
32946
|
+
async RunRecommendationItemViewByID(input, { dataSource, userPayload }, pubSub) {
|
|
32947
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
32948
|
+
}
|
|
32949
|
+
async RunRecommendationItemViewByName(input, { dataSource, userPayload }, pubSub) {
|
|
32950
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
32951
|
+
}
|
|
32952
|
+
async RunRecommendationItemDynamicView(input, { dataSource, userPayload }, pubSub) {
|
|
32953
|
+
input.EntityName = 'Recommendation Items';
|
|
32954
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
32955
|
+
}
|
|
32956
|
+
async RecommendationItem(ID, { dataSource, userPayload }, pubSub) {
|
|
32957
|
+
this.CheckUserReadPermissions('Recommendation Items', userPayload);
|
|
32958
|
+
const sSQL = `SELECT * FROM [${core_1.Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecommendationItems] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Recommendation Items', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
32959
|
+
const result = this.MapFieldNamesToCodeNames('Recommendation Items', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
|
|
32960
|
+
return result;
|
|
32961
|
+
}
|
|
32962
|
+
async CreateRecommendationItem(input, { dataSource, userPayload }, pubSub) {
|
|
32963
|
+
return this.CreateRecord('Recommendation Items', input, dataSource, userPayload, pubSub);
|
|
32964
|
+
}
|
|
32965
|
+
async UpdateRecommendationItem(input, { dataSource, userPayload }, pubSub) {
|
|
32966
|
+
return this.UpdateRecord('Recommendation Items', input, dataSource, userPayload, pubSub);
|
|
32967
|
+
}
|
|
32968
|
+
};
|
|
32969
|
+
exports.RecommendationItemResolver = RecommendationItemResolver;
|
|
32970
|
+
__decorate([
|
|
32971
|
+
(0, server_1.Query)(() => RunRecommendationItemViewResult),
|
|
32972
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByIDInput)),
|
|
32973
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32974
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32975
|
+
__metadata("design:type", Function),
|
|
32976
|
+
__metadata("design:paramtypes", [server_1.RunViewByIDInput, Object, server_1.PubSubEngine]),
|
|
32977
|
+
__metadata("design:returntype", Promise)
|
|
32978
|
+
], RecommendationItemResolver.prototype, "RunRecommendationItemViewByID", null);
|
|
32979
|
+
__decorate([
|
|
32980
|
+
(0, server_1.Query)(() => RunRecommendationItemViewResult),
|
|
32981
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByNameInput)),
|
|
32982
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32983
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32984
|
+
__metadata("design:type", Function),
|
|
32985
|
+
__metadata("design:paramtypes", [server_1.RunViewByNameInput, Object, server_1.PubSubEngine]),
|
|
32986
|
+
__metadata("design:returntype", Promise)
|
|
32987
|
+
], RecommendationItemResolver.prototype, "RunRecommendationItemViewByName", null);
|
|
32988
|
+
__decorate([
|
|
32989
|
+
(0, server_1.Query)(() => RunRecommendationItemViewResult),
|
|
32990
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunDynamicViewInput)),
|
|
32991
|
+
__param(1, (0, server_1.Ctx)()),
|
|
32992
|
+
__param(2, (0, server_1.PubSub)()),
|
|
32993
|
+
__metadata("design:type", Function),
|
|
32994
|
+
__metadata("design:paramtypes", [server_1.RunDynamicViewInput, Object, server_1.PubSubEngine]),
|
|
32995
|
+
__metadata("design:returntype", Promise)
|
|
32996
|
+
], RecommendationItemResolver.prototype, "RunRecommendationItemDynamicView", null);
|
|
32997
|
+
__decorate([
|
|
32998
|
+
(0, server_1.Query)(() => RecommendationItem_, { nullable: true }),
|
|
32999
|
+
__param(0, (0, server_1.Arg)('ID', () => server_1.Int)),
|
|
33000
|
+
__param(1, (0, server_1.Ctx)()),
|
|
33001
|
+
__param(2, (0, server_1.PubSub)()),
|
|
33002
|
+
__metadata("design:type", Function),
|
|
33003
|
+
__metadata("design:paramtypes", [Number, Object, server_1.PubSubEngine]),
|
|
33004
|
+
__metadata("design:returntype", Promise)
|
|
33005
|
+
], RecommendationItemResolver.prototype, "RecommendationItem", null);
|
|
33006
|
+
__decorate([
|
|
33007
|
+
(0, server_1.Mutation)(() => RecommendationItem_),
|
|
33008
|
+
__param(0, (0, server_1.Arg)('input', () => CreateRecommendationItemInput)),
|
|
33009
|
+
__param(1, (0, server_1.Ctx)()),
|
|
33010
|
+
__param(2, (0, server_1.PubSub)()),
|
|
33011
|
+
__metadata("design:type", Function),
|
|
33012
|
+
__metadata("design:paramtypes", [CreateRecommendationItemInput, Object, server_1.PubSubEngine]),
|
|
33013
|
+
__metadata("design:returntype", Promise)
|
|
33014
|
+
], RecommendationItemResolver.prototype, "CreateRecommendationItem", null);
|
|
33015
|
+
__decorate([
|
|
33016
|
+
(0, server_1.Mutation)(() => RecommendationItem_),
|
|
33017
|
+
__param(0, (0, server_1.Arg)('input', () => UpdateRecommendationItemInput)),
|
|
33018
|
+
__param(1, (0, server_1.Ctx)()),
|
|
33019
|
+
__param(2, (0, server_1.PubSub)()),
|
|
33020
|
+
__metadata("design:type", Function),
|
|
33021
|
+
__metadata("design:paramtypes", [UpdateRecommendationItemInput, Object, server_1.PubSubEngine]),
|
|
33022
|
+
__metadata("design:returntype", Promise)
|
|
33023
|
+
], RecommendationItemResolver.prototype, "UpdateRecommendationItem", null);
|
|
33024
|
+
exports.RecommendationItemResolver = RecommendationItemResolver = __decorate([
|
|
33025
|
+
(0, server_1.Resolver)(RecommendationItem_)
|
|
33026
|
+
], RecommendationItemResolver);
|
|
33027
|
+
let EntityCommunicationMessageType_ = class EntityCommunicationMessageType_ {
|
|
33028
|
+
};
|
|
33029
|
+
exports.EntityCommunicationMessageType_ = EntityCommunicationMessageType_;
|
|
33030
|
+
__decorate([
|
|
33031
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
33032
|
+
__metadata("design:type", Number)
|
|
33033
|
+
], EntityCommunicationMessageType_.prototype, "ID", void 0);
|
|
33034
|
+
__decorate([
|
|
33035
|
+
(0, server_1.Field)(() => server_1.Int, { description: 'ID of the entity' }),
|
|
33036
|
+
__metadata("design:type", Number)
|
|
33037
|
+
], EntityCommunicationMessageType_.prototype, "EntityID", void 0);
|
|
33038
|
+
__decorate([
|
|
33039
|
+
(0, server_1.Field)(() => server_1.Int, { description: 'ID of the communication base message type' }),
|
|
33040
|
+
__metadata("design:type", Number)
|
|
33041
|
+
], EntityCommunicationMessageType_.prototype, "BaseMessageTypeID", void 0);
|
|
33042
|
+
__decorate([
|
|
33043
|
+
(0, server_1.Field)(() => Boolean, { description: 'Indicates whether the message type is active' }),
|
|
33044
|
+
__metadata("design:type", Boolean)
|
|
33045
|
+
], EntityCommunicationMessageType_.prototype, "IsActive", void 0);
|
|
33046
|
+
__decorate([
|
|
33047
|
+
(0, server_1.Field)(),
|
|
33048
|
+
(0, class_validator_1.MaxLength)(8),
|
|
33049
|
+
__metadata("design:type", Date)
|
|
33050
|
+
], EntityCommunicationMessageType_.prototype, "CreatedAt", void 0);
|
|
33051
|
+
__decorate([
|
|
33052
|
+
(0, server_1.Field)(),
|
|
33053
|
+
(0, class_validator_1.MaxLength)(8),
|
|
33054
|
+
__metadata("design:type", Date)
|
|
33055
|
+
], EntityCommunicationMessageType_.prototype, "UpdatedAt", void 0);
|
|
33056
|
+
__decorate([
|
|
33057
|
+
(0, server_1.Field)(),
|
|
33058
|
+
(0, class_validator_1.MaxLength)(510),
|
|
33059
|
+
__metadata("design:type", String)
|
|
33060
|
+
], EntityCommunicationMessageType_.prototype, "Entity", void 0);
|
|
33061
|
+
__decorate([
|
|
33062
|
+
(0, server_1.Field)(),
|
|
33063
|
+
(0, class_validator_1.MaxLength)(200),
|
|
33064
|
+
__metadata("design:type", String)
|
|
33065
|
+
], EntityCommunicationMessageType_.prototype, "BaseMessageType", void 0);
|
|
33066
|
+
__decorate([
|
|
33067
|
+
(0, server_1.Field)(() => [mj_core_schema_server_object_types.EntityCommunicationField_]),
|
|
33068
|
+
__metadata("design:type", Array)
|
|
33069
|
+
], EntityCommunicationMessageType_.prototype, "EntityCommunicationFieldsArray", void 0);
|
|
33070
|
+
exports.EntityCommunicationMessageType_ = EntityCommunicationMessageType_ = __decorate([
|
|
33071
|
+
(0, server_1.ObjectType)({ description: 'Mapping between entities and communication base message types' })
|
|
33072
|
+
], EntityCommunicationMessageType_);
|
|
33073
|
+
let CreateEntityCommunicationMessageTypeInput = class CreateEntityCommunicationMessageTypeInput {
|
|
33074
|
+
};
|
|
33075
|
+
exports.CreateEntityCommunicationMessageTypeInput = CreateEntityCommunicationMessageTypeInput;
|
|
33076
|
+
__decorate([
|
|
33077
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
33078
|
+
__metadata("design:type", Number)
|
|
33079
|
+
], CreateEntityCommunicationMessageTypeInput.prototype, "EntityID", void 0);
|
|
33080
|
+
__decorate([
|
|
33081
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
33082
|
+
__metadata("design:type", Number)
|
|
33083
|
+
], CreateEntityCommunicationMessageTypeInput.prototype, "BaseMessageTypeID", void 0);
|
|
33084
|
+
__decorate([
|
|
33085
|
+
(0, server_1.Field)(() => Boolean),
|
|
33086
|
+
__metadata("design:type", Boolean)
|
|
33087
|
+
], CreateEntityCommunicationMessageTypeInput.prototype, "IsActive", void 0);
|
|
33088
|
+
exports.CreateEntityCommunicationMessageTypeInput = CreateEntityCommunicationMessageTypeInput = __decorate([
|
|
33089
|
+
(0, server_1.InputType)()
|
|
33090
|
+
], CreateEntityCommunicationMessageTypeInput);
|
|
33091
|
+
let UpdateEntityCommunicationMessageTypeInput = class UpdateEntityCommunicationMessageTypeInput {
|
|
33092
|
+
};
|
|
33093
|
+
exports.UpdateEntityCommunicationMessageTypeInput = UpdateEntityCommunicationMessageTypeInput;
|
|
33094
|
+
__decorate([
|
|
33095
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
33096
|
+
__metadata("design:type", Number)
|
|
33097
|
+
], UpdateEntityCommunicationMessageTypeInput.prototype, "ID", void 0);
|
|
33098
|
+
__decorate([
|
|
33099
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
33100
|
+
__metadata("design:type", Number)
|
|
33101
|
+
], UpdateEntityCommunicationMessageTypeInput.prototype, "EntityID", void 0);
|
|
33102
|
+
__decorate([
|
|
33103
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
33104
|
+
__metadata("design:type", Number)
|
|
33105
|
+
], UpdateEntityCommunicationMessageTypeInput.prototype, "BaseMessageTypeID", void 0);
|
|
33106
|
+
__decorate([
|
|
33107
|
+
(0, server_1.Field)(() => Boolean),
|
|
33108
|
+
__metadata("design:type", Boolean)
|
|
33109
|
+
], UpdateEntityCommunicationMessageTypeInput.prototype, "IsActive", void 0);
|
|
33110
|
+
__decorate([
|
|
33111
|
+
(0, server_1.Field)(() => [server_1.KeyValuePairInput], { nullable: true }),
|
|
33112
|
+
__metadata("design:type", Array)
|
|
33113
|
+
], UpdateEntityCommunicationMessageTypeInput.prototype, "OldValues___", void 0);
|
|
33114
|
+
exports.UpdateEntityCommunicationMessageTypeInput = UpdateEntityCommunicationMessageTypeInput = __decorate([
|
|
33115
|
+
(0, server_1.InputType)()
|
|
33116
|
+
], UpdateEntityCommunicationMessageTypeInput);
|
|
33117
|
+
let RunEntityCommunicationMessageTypeViewResult = class RunEntityCommunicationMessageTypeViewResult {
|
|
33118
|
+
};
|
|
33119
|
+
exports.RunEntityCommunicationMessageTypeViewResult = RunEntityCommunicationMessageTypeViewResult;
|
|
33120
|
+
__decorate([
|
|
33121
|
+
(0, server_1.Field)(() => [EntityCommunicationMessageType_]),
|
|
33122
|
+
__metadata("design:type", Array)
|
|
33123
|
+
], RunEntityCommunicationMessageTypeViewResult.prototype, "Results", void 0);
|
|
33124
|
+
__decorate([
|
|
33125
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
33126
|
+
__metadata("design:type", Number)
|
|
33127
|
+
], RunEntityCommunicationMessageTypeViewResult.prototype, "UserViewRunID", void 0);
|
|
33128
|
+
__decorate([
|
|
33129
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
33130
|
+
__metadata("design:type", Number)
|
|
33131
|
+
], RunEntityCommunicationMessageTypeViewResult.prototype, "RowCount", void 0);
|
|
33132
|
+
__decorate([
|
|
33133
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
33134
|
+
__metadata("design:type", Number)
|
|
33135
|
+
], RunEntityCommunicationMessageTypeViewResult.prototype, "TotalRowCount", void 0);
|
|
33136
|
+
__decorate([
|
|
33137
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
33138
|
+
__metadata("design:type", Number)
|
|
33139
|
+
], RunEntityCommunicationMessageTypeViewResult.prototype, "ExecutionTime", void 0);
|
|
33140
|
+
__decorate([
|
|
33141
|
+
(0, server_1.Field)({ nullable: true }),
|
|
33142
|
+
__metadata("design:type", String)
|
|
33143
|
+
], RunEntityCommunicationMessageTypeViewResult.prototype, "ErrorMessage", void 0);
|
|
33144
|
+
__decorate([
|
|
33145
|
+
(0, server_1.Field)(() => Boolean, { nullable: false }),
|
|
33146
|
+
__metadata("design:type", Boolean)
|
|
33147
|
+
], RunEntityCommunicationMessageTypeViewResult.prototype, "Success", void 0);
|
|
33148
|
+
exports.RunEntityCommunicationMessageTypeViewResult = RunEntityCommunicationMessageTypeViewResult = __decorate([
|
|
33149
|
+
(0, server_1.ObjectType)()
|
|
33150
|
+
], RunEntityCommunicationMessageTypeViewResult);
|
|
33151
|
+
let EntityCommunicationMessageTypeResolver = class EntityCommunicationMessageTypeResolver extends server_1.ResolverBase {
|
|
33152
|
+
async RunEntityCommunicationMessageTypeViewByID(input, { dataSource, userPayload }, pubSub) {
|
|
33153
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
33154
|
+
}
|
|
33155
|
+
async RunEntityCommunicationMessageTypeViewByName(input, { dataSource, userPayload }, pubSub) {
|
|
33156
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
33157
|
+
}
|
|
33158
|
+
async RunEntityCommunicationMessageTypeDynamicView(input, { dataSource, userPayload }, pubSub) {
|
|
33159
|
+
input.EntityName = 'Entity Communication Message Types';
|
|
33160
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
33161
|
+
}
|
|
33162
|
+
async EntityCommunicationMessageType(ID, { dataSource, userPayload }, pubSub) {
|
|
33163
|
+
this.CheckUserReadPermissions('Entity Communication Message Types', userPayload);
|
|
33164
|
+
const sSQL = `SELECT * FROM [${core_1.Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityCommunicationMessageTypes] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Entity Communication Message Types', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
33165
|
+
const result = this.MapFieldNamesToCodeNames('Entity Communication Message Types', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
|
|
33166
|
+
return result;
|
|
33167
|
+
}
|
|
33168
|
+
async EntityCommunicationFieldsArray(entitycommunicationmessagetype_, { dataSource, userPayload }, pubSub) {
|
|
33169
|
+
this.CheckUserReadPermissions('Entity Communication Fields', userPayload);
|
|
33170
|
+
const sSQL = `SELECT * FROM [${core_1.Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityCommunicationFields] WHERE [EntityCommunicationMessageTypeID]=${entitycommunicationmessagetype_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Communication Fields', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
33171
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Communication Fields', await dataSource.query(sSQL));
|
|
33172
|
+
return result;
|
|
33173
|
+
}
|
|
33174
|
+
async CreateEntityCommunicationMessageType(input, { dataSource, userPayload }, pubSub) {
|
|
33175
|
+
return this.CreateRecord('Entity Communication Message Types', input, dataSource, userPayload, pubSub);
|
|
33176
|
+
}
|
|
33177
|
+
async UpdateEntityCommunicationMessageType(input, { dataSource, userPayload }, pubSub) {
|
|
33178
|
+
return this.UpdateRecord('Entity Communication Message Types', input, dataSource, userPayload, pubSub);
|
|
33179
|
+
}
|
|
33180
|
+
};
|
|
33181
|
+
exports.EntityCommunicationMessageTypeResolver = EntityCommunicationMessageTypeResolver;
|
|
33182
|
+
__decorate([
|
|
33183
|
+
(0, server_1.Query)(() => RunEntityCommunicationMessageTypeViewResult),
|
|
33184
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByIDInput)),
|
|
33185
|
+
__param(1, (0, server_1.Ctx)()),
|
|
33186
|
+
__param(2, (0, server_1.PubSub)()),
|
|
33187
|
+
__metadata("design:type", Function),
|
|
33188
|
+
__metadata("design:paramtypes", [server_1.RunViewByIDInput, Object, server_1.PubSubEngine]),
|
|
33189
|
+
__metadata("design:returntype", Promise)
|
|
33190
|
+
], EntityCommunicationMessageTypeResolver.prototype, "RunEntityCommunicationMessageTypeViewByID", null);
|
|
33191
|
+
__decorate([
|
|
33192
|
+
(0, server_1.Query)(() => RunEntityCommunicationMessageTypeViewResult),
|
|
33193
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByNameInput)),
|
|
33194
|
+
__param(1, (0, server_1.Ctx)()),
|
|
33195
|
+
__param(2, (0, server_1.PubSub)()),
|
|
33196
|
+
__metadata("design:type", Function),
|
|
33197
|
+
__metadata("design:paramtypes", [server_1.RunViewByNameInput, Object, server_1.PubSubEngine]),
|
|
33198
|
+
__metadata("design:returntype", Promise)
|
|
33199
|
+
], EntityCommunicationMessageTypeResolver.prototype, "RunEntityCommunicationMessageTypeViewByName", null);
|
|
33200
|
+
__decorate([
|
|
33201
|
+
(0, server_1.Query)(() => RunEntityCommunicationMessageTypeViewResult),
|
|
33202
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunDynamicViewInput)),
|
|
33203
|
+
__param(1, (0, server_1.Ctx)()),
|
|
33204
|
+
__param(2, (0, server_1.PubSub)()),
|
|
33205
|
+
__metadata("design:type", Function),
|
|
33206
|
+
__metadata("design:paramtypes", [server_1.RunDynamicViewInput, Object, server_1.PubSubEngine]),
|
|
33207
|
+
__metadata("design:returntype", Promise)
|
|
33208
|
+
], EntityCommunicationMessageTypeResolver.prototype, "RunEntityCommunicationMessageTypeDynamicView", null);
|
|
33209
|
+
__decorate([
|
|
33210
|
+
(0, server_1.Query)(() => EntityCommunicationMessageType_, { nullable: true }),
|
|
33211
|
+
__param(0, (0, server_1.Arg)('ID', () => server_1.Int)),
|
|
33212
|
+
__param(1, (0, server_1.Ctx)()),
|
|
33213
|
+
__param(2, (0, server_1.PubSub)()),
|
|
33214
|
+
__metadata("design:type", Function),
|
|
33215
|
+
__metadata("design:paramtypes", [Number, Object, server_1.PubSubEngine]),
|
|
33216
|
+
__metadata("design:returntype", Promise)
|
|
33217
|
+
], EntityCommunicationMessageTypeResolver.prototype, "EntityCommunicationMessageType", null);
|
|
33218
|
+
__decorate([
|
|
33219
|
+
(0, server_1.FieldResolver)(() => [mj_core_schema_server_object_types.EntityCommunicationField_]),
|
|
33220
|
+
__param(0, (0, server_1.Root)()),
|
|
33221
|
+
__param(1, (0, server_1.Ctx)()),
|
|
33222
|
+
__param(2, (0, server_1.PubSub)()),
|
|
33223
|
+
__metadata("design:type", Function),
|
|
33224
|
+
__metadata("design:paramtypes", [EntityCommunicationMessageType_, Object, server_1.PubSubEngine]),
|
|
33225
|
+
__metadata("design:returntype", Promise)
|
|
33226
|
+
], EntityCommunicationMessageTypeResolver.prototype, "EntityCommunicationFieldsArray", null);
|
|
33227
|
+
__decorate([
|
|
33228
|
+
(0, server_1.Mutation)(() => EntityCommunicationMessageType_),
|
|
33229
|
+
__param(0, (0, server_1.Arg)('input', () => CreateEntityCommunicationMessageTypeInput)),
|
|
33230
|
+
__param(1, (0, server_1.Ctx)()),
|
|
33231
|
+
__param(2, (0, server_1.PubSub)()),
|
|
33232
|
+
__metadata("design:type", Function),
|
|
33233
|
+
__metadata("design:paramtypes", [CreateEntityCommunicationMessageTypeInput, Object, server_1.PubSubEngine]),
|
|
33234
|
+
__metadata("design:returntype", Promise)
|
|
33235
|
+
], EntityCommunicationMessageTypeResolver.prototype, "CreateEntityCommunicationMessageType", null);
|
|
33236
|
+
__decorate([
|
|
33237
|
+
(0, server_1.Mutation)(() => EntityCommunicationMessageType_),
|
|
33238
|
+
__param(0, (0, server_1.Arg)('input', () => UpdateEntityCommunicationMessageTypeInput)),
|
|
33239
|
+
__param(1, (0, server_1.Ctx)()),
|
|
33240
|
+
__param(2, (0, server_1.PubSub)()),
|
|
33241
|
+
__metadata("design:type", Function),
|
|
33242
|
+
__metadata("design:paramtypes", [UpdateEntityCommunicationMessageTypeInput, Object, server_1.PubSubEngine]),
|
|
33243
|
+
__metadata("design:returntype", Promise)
|
|
33244
|
+
], EntityCommunicationMessageTypeResolver.prototype, "UpdateEntityCommunicationMessageType", null);
|
|
33245
|
+
exports.EntityCommunicationMessageTypeResolver = EntityCommunicationMessageTypeResolver = __decorate([
|
|
33246
|
+
(0, server_1.Resolver)(EntityCommunicationMessageType_)
|
|
33247
|
+
], EntityCommunicationMessageTypeResolver);
|
|
33248
|
+
let EntityCommunicationField_ = class EntityCommunicationField_ {
|
|
33249
|
+
};
|
|
33250
|
+
exports.EntityCommunicationField_ = EntityCommunicationField_;
|
|
33251
|
+
__decorate([
|
|
33252
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
33253
|
+
__metadata("design:type", Number)
|
|
33254
|
+
], EntityCommunicationField_.prototype, "ID", void 0);
|
|
33255
|
+
__decorate([
|
|
33256
|
+
(0, server_1.Field)(() => server_1.Int, { description: 'ID of the entity communication message type' }),
|
|
33257
|
+
__metadata("design:type", Number)
|
|
33258
|
+
], EntityCommunicationField_.prototype, "EntityCommunicationMessageTypeID", void 0);
|
|
33259
|
+
__decorate([
|
|
33260
|
+
(0, server_1.Field)({ description: 'Name of the field in the entity that maps to the communication base message type' }),
|
|
33261
|
+
(0, class_validator_1.MaxLength)(1000),
|
|
33262
|
+
__metadata("design:type", String)
|
|
33263
|
+
], EntityCommunicationField_.prototype, "FieldName", void 0);
|
|
33264
|
+
__decorate([
|
|
33265
|
+
(0, server_1.Field)(() => server_1.Int, { description: 'Priority of the field for the communication base message type' }),
|
|
33266
|
+
__metadata("design:type", Number)
|
|
33267
|
+
], EntityCommunicationField_.prototype, "Priority", void 0);
|
|
33268
|
+
__decorate([
|
|
33269
|
+
(0, server_1.Field)(),
|
|
33270
|
+
(0, class_validator_1.MaxLength)(8),
|
|
33271
|
+
__metadata("design:type", Date)
|
|
33272
|
+
], EntityCommunicationField_.prototype, "CreatedAt", void 0);
|
|
33273
|
+
__decorate([
|
|
33274
|
+
(0, server_1.Field)(),
|
|
33275
|
+
(0, class_validator_1.MaxLength)(8),
|
|
33276
|
+
__metadata("design:type", Date)
|
|
33277
|
+
], EntityCommunicationField_.prototype, "UpdatedAt", void 0);
|
|
33278
|
+
exports.EntityCommunicationField_ = EntityCommunicationField_ = __decorate([
|
|
33279
|
+
(0, server_1.ObjectType)({ description: 'Mapping between entity fields and communication base message types with priority' })
|
|
33280
|
+
], EntityCommunicationField_);
|
|
33281
|
+
let CreateEntityCommunicationFieldInput = class CreateEntityCommunicationFieldInput {
|
|
33282
|
+
};
|
|
33283
|
+
exports.CreateEntityCommunicationFieldInput = CreateEntityCommunicationFieldInput;
|
|
33284
|
+
__decorate([
|
|
33285
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
33286
|
+
__metadata("design:type", Number)
|
|
33287
|
+
], CreateEntityCommunicationFieldInput.prototype, "EntityCommunicationMessageTypeID", void 0);
|
|
33288
|
+
__decorate([
|
|
33289
|
+
(0, server_1.Field)(),
|
|
33290
|
+
__metadata("design:type", String)
|
|
33291
|
+
], CreateEntityCommunicationFieldInput.prototype, "FieldName", void 0);
|
|
33292
|
+
__decorate([
|
|
33293
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
33294
|
+
__metadata("design:type", Number)
|
|
33295
|
+
], CreateEntityCommunicationFieldInput.prototype, "Priority", void 0);
|
|
33296
|
+
exports.CreateEntityCommunicationFieldInput = CreateEntityCommunicationFieldInput = __decorate([
|
|
33297
|
+
(0, server_1.InputType)()
|
|
33298
|
+
], CreateEntityCommunicationFieldInput);
|
|
33299
|
+
let UpdateEntityCommunicationFieldInput = class UpdateEntityCommunicationFieldInput {
|
|
33300
|
+
};
|
|
33301
|
+
exports.UpdateEntityCommunicationFieldInput = UpdateEntityCommunicationFieldInput;
|
|
33302
|
+
__decorate([
|
|
33303
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
33304
|
+
__metadata("design:type", Number)
|
|
33305
|
+
], UpdateEntityCommunicationFieldInput.prototype, "ID", void 0);
|
|
33306
|
+
__decorate([
|
|
33307
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
33308
|
+
__metadata("design:type", Number)
|
|
33309
|
+
], UpdateEntityCommunicationFieldInput.prototype, "EntityCommunicationMessageTypeID", void 0);
|
|
33310
|
+
__decorate([
|
|
33311
|
+
(0, server_1.Field)(),
|
|
33312
|
+
__metadata("design:type", String)
|
|
33313
|
+
], UpdateEntityCommunicationFieldInput.prototype, "FieldName", void 0);
|
|
33314
|
+
__decorate([
|
|
33315
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
33316
|
+
__metadata("design:type", Number)
|
|
33317
|
+
], UpdateEntityCommunicationFieldInput.prototype, "Priority", void 0);
|
|
33318
|
+
__decorate([
|
|
33319
|
+
(0, server_1.Field)(() => [server_1.KeyValuePairInput], { nullable: true }),
|
|
33320
|
+
__metadata("design:type", Array)
|
|
33321
|
+
], UpdateEntityCommunicationFieldInput.prototype, "OldValues___", void 0);
|
|
33322
|
+
exports.UpdateEntityCommunicationFieldInput = UpdateEntityCommunicationFieldInput = __decorate([
|
|
33323
|
+
(0, server_1.InputType)()
|
|
33324
|
+
], UpdateEntityCommunicationFieldInput);
|
|
33325
|
+
let RunEntityCommunicationFieldViewResult = class RunEntityCommunicationFieldViewResult {
|
|
33326
|
+
};
|
|
33327
|
+
exports.RunEntityCommunicationFieldViewResult = RunEntityCommunicationFieldViewResult;
|
|
33328
|
+
__decorate([
|
|
33329
|
+
(0, server_1.Field)(() => [EntityCommunicationField_]),
|
|
33330
|
+
__metadata("design:type", Array)
|
|
33331
|
+
], RunEntityCommunicationFieldViewResult.prototype, "Results", void 0);
|
|
33332
|
+
__decorate([
|
|
33333
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
33334
|
+
__metadata("design:type", Number)
|
|
33335
|
+
], RunEntityCommunicationFieldViewResult.prototype, "UserViewRunID", void 0);
|
|
33336
|
+
__decorate([
|
|
33337
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
33338
|
+
__metadata("design:type", Number)
|
|
33339
|
+
], RunEntityCommunicationFieldViewResult.prototype, "RowCount", void 0);
|
|
33340
|
+
__decorate([
|
|
33341
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
33342
|
+
__metadata("design:type", Number)
|
|
33343
|
+
], RunEntityCommunicationFieldViewResult.prototype, "TotalRowCount", void 0);
|
|
33344
|
+
__decorate([
|
|
33345
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
33346
|
+
__metadata("design:type", Number)
|
|
33347
|
+
], RunEntityCommunicationFieldViewResult.prototype, "ExecutionTime", void 0);
|
|
33348
|
+
__decorate([
|
|
33349
|
+
(0, server_1.Field)({ nullable: true }),
|
|
33350
|
+
__metadata("design:type", String)
|
|
33351
|
+
], RunEntityCommunicationFieldViewResult.prototype, "ErrorMessage", void 0);
|
|
33352
|
+
__decorate([
|
|
33353
|
+
(0, server_1.Field)(() => Boolean, { nullable: false }),
|
|
33354
|
+
__metadata("design:type", Boolean)
|
|
33355
|
+
], RunEntityCommunicationFieldViewResult.prototype, "Success", void 0);
|
|
33356
|
+
exports.RunEntityCommunicationFieldViewResult = RunEntityCommunicationFieldViewResult = __decorate([
|
|
33357
|
+
(0, server_1.ObjectType)()
|
|
33358
|
+
], RunEntityCommunicationFieldViewResult);
|
|
33359
|
+
let EntityCommunicationFieldResolver = class EntityCommunicationFieldResolver extends server_1.ResolverBase {
|
|
33360
|
+
async RunEntityCommunicationFieldViewByID(input, { dataSource, userPayload }, pubSub) {
|
|
33361
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
33362
|
+
}
|
|
33363
|
+
async RunEntityCommunicationFieldViewByName(input, { dataSource, userPayload }, pubSub) {
|
|
33364
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
33365
|
+
}
|
|
33366
|
+
async RunEntityCommunicationFieldDynamicView(input, { dataSource, userPayload }, pubSub) {
|
|
33367
|
+
input.EntityName = 'Entity Communication Fields';
|
|
33368
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
33369
|
+
}
|
|
33370
|
+
async EntityCommunicationField(ID, { dataSource, userPayload }, pubSub) {
|
|
33371
|
+
this.CheckUserReadPermissions('Entity Communication Fields', userPayload);
|
|
33372
|
+
const sSQL = `SELECT * FROM [${core_1.Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityCommunicationFields] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Entity Communication Fields', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
33373
|
+
const result = this.MapFieldNamesToCodeNames('Entity Communication Fields', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
|
|
33374
|
+
return result;
|
|
33375
|
+
}
|
|
33376
|
+
async CreateEntityCommunicationField(input, { dataSource, userPayload }, pubSub) {
|
|
33377
|
+
return this.CreateRecord('Entity Communication Fields', input, dataSource, userPayload, pubSub);
|
|
33378
|
+
}
|
|
33379
|
+
async UpdateEntityCommunicationField(input, { dataSource, userPayload }, pubSub) {
|
|
33380
|
+
return this.UpdateRecord('Entity Communication Fields', input, dataSource, userPayload, pubSub);
|
|
33381
|
+
}
|
|
33382
|
+
};
|
|
33383
|
+
exports.EntityCommunicationFieldResolver = EntityCommunicationFieldResolver;
|
|
33384
|
+
__decorate([
|
|
33385
|
+
(0, server_1.Query)(() => RunEntityCommunicationFieldViewResult),
|
|
33386
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByIDInput)),
|
|
33387
|
+
__param(1, (0, server_1.Ctx)()),
|
|
33388
|
+
__param(2, (0, server_1.PubSub)()),
|
|
33389
|
+
__metadata("design:type", Function),
|
|
33390
|
+
__metadata("design:paramtypes", [server_1.RunViewByIDInput, Object, server_1.PubSubEngine]),
|
|
33391
|
+
__metadata("design:returntype", Promise)
|
|
33392
|
+
], EntityCommunicationFieldResolver.prototype, "RunEntityCommunicationFieldViewByID", null);
|
|
33393
|
+
__decorate([
|
|
33394
|
+
(0, server_1.Query)(() => RunEntityCommunicationFieldViewResult),
|
|
33395
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByNameInput)),
|
|
33396
|
+
__param(1, (0, server_1.Ctx)()),
|
|
33397
|
+
__param(2, (0, server_1.PubSub)()),
|
|
33398
|
+
__metadata("design:type", Function),
|
|
33399
|
+
__metadata("design:paramtypes", [server_1.RunViewByNameInput, Object, server_1.PubSubEngine]),
|
|
33400
|
+
__metadata("design:returntype", Promise)
|
|
33401
|
+
], EntityCommunicationFieldResolver.prototype, "RunEntityCommunicationFieldViewByName", null);
|
|
33402
|
+
__decorate([
|
|
33403
|
+
(0, server_1.Query)(() => RunEntityCommunicationFieldViewResult),
|
|
33404
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunDynamicViewInput)),
|
|
33405
|
+
__param(1, (0, server_1.Ctx)()),
|
|
33406
|
+
__param(2, (0, server_1.PubSub)()),
|
|
33407
|
+
__metadata("design:type", Function),
|
|
33408
|
+
__metadata("design:paramtypes", [server_1.RunDynamicViewInput, Object, server_1.PubSubEngine]),
|
|
33409
|
+
__metadata("design:returntype", Promise)
|
|
33410
|
+
], EntityCommunicationFieldResolver.prototype, "RunEntityCommunicationFieldDynamicView", null);
|
|
33411
|
+
__decorate([
|
|
33412
|
+
(0, server_1.Query)(() => EntityCommunicationField_, { nullable: true }),
|
|
33413
|
+
__param(0, (0, server_1.Arg)('ID', () => server_1.Int)),
|
|
33414
|
+
__param(1, (0, server_1.Ctx)()),
|
|
33415
|
+
__param(2, (0, server_1.PubSub)()),
|
|
33416
|
+
__metadata("design:type", Function),
|
|
33417
|
+
__metadata("design:paramtypes", [Number, Object, server_1.PubSubEngine]),
|
|
33418
|
+
__metadata("design:returntype", Promise)
|
|
33419
|
+
], EntityCommunicationFieldResolver.prototype, "EntityCommunicationField", null);
|
|
33420
|
+
__decorate([
|
|
33421
|
+
(0, server_1.Mutation)(() => EntityCommunicationField_),
|
|
33422
|
+
__param(0, (0, server_1.Arg)('input', () => CreateEntityCommunicationFieldInput)),
|
|
33423
|
+
__param(1, (0, server_1.Ctx)()),
|
|
33424
|
+
__param(2, (0, server_1.PubSub)()),
|
|
33425
|
+
__metadata("design:type", Function),
|
|
33426
|
+
__metadata("design:paramtypes", [CreateEntityCommunicationFieldInput, Object, server_1.PubSubEngine]),
|
|
33427
|
+
__metadata("design:returntype", Promise)
|
|
33428
|
+
], EntityCommunicationFieldResolver.prototype, "CreateEntityCommunicationField", null);
|
|
33429
|
+
__decorate([
|
|
33430
|
+
(0, server_1.Mutation)(() => EntityCommunicationField_),
|
|
33431
|
+
__param(0, (0, server_1.Arg)('input', () => UpdateEntityCommunicationFieldInput)),
|
|
33432
|
+
__param(1, (0, server_1.Ctx)()),
|
|
33433
|
+
__param(2, (0, server_1.PubSub)()),
|
|
33434
|
+
__metadata("design:type", Function),
|
|
33435
|
+
__metadata("design:paramtypes", [UpdateEntityCommunicationFieldInput, Object, server_1.PubSubEngine]),
|
|
33436
|
+
__metadata("design:returntype", Promise)
|
|
33437
|
+
], EntityCommunicationFieldResolver.prototype, "UpdateEntityCommunicationField", null);
|
|
33438
|
+
exports.EntityCommunicationFieldResolver = EntityCommunicationFieldResolver = __decorate([
|
|
33439
|
+
(0, server_1.Resolver)(EntityCommunicationField_)
|
|
33440
|
+
], EntityCommunicationFieldResolver);
|
|
30690
33441
|
//# sourceMappingURL=generated.js.map
|