@memberjunction/server 5.8.0 → 5.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/README.md +1 -0
  2. package/dist/agents/skip-agent.d.ts.map +1 -1
  3. package/dist/agents/skip-agent.js +1 -0
  4. package/dist/agents/skip-agent.js.map +1 -1
  5. package/dist/agents/skip-sdk.d.ts +6 -0
  6. package/dist/agents/skip-sdk.d.ts.map +1 -1
  7. package/dist/agents/skip-sdk.js +5 -3
  8. package/dist/agents/skip-sdk.js.map +1 -1
  9. package/dist/apolloServer/index.d.ts +10 -2
  10. package/dist/apolloServer/index.d.ts.map +1 -1
  11. package/dist/apolloServer/index.js +22 -8
  12. package/dist/apolloServer/index.js.map +1 -1
  13. package/dist/config.d.ts +125 -0
  14. package/dist/config.d.ts.map +1 -1
  15. package/dist/config.js +23 -0
  16. package/dist/config.js.map +1 -1
  17. package/dist/context.d.ts +17 -0
  18. package/dist/context.d.ts.map +1 -1
  19. package/dist/context.js +144 -62
  20. package/dist/context.js.map +1 -1
  21. package/dist/generated/generated.d.ts +210 -0
  22. package/dist/generated/generated.d.ts.map +1 -1
  23. package/dist/generated/generated.js +1049 -0
  24. package/dist/generated/generated.js.map +1 -1
  25. package/dist/generic/CacheInvalidationResolver.d.ts +32 -0
  26. package/dist/generic/CacheInvalidationResolver.d.ts.map +1 -0
  27. package/dist/generic/CacheInvalidationResolver.js +80 -0
  28. package/dist/generic/CacheInvalidationResolver.js.map +1 -0
  29. package/dist/generic/PubSubManager.d.ts +27 -0
  30. package/dist/generic/PubSubManager.d.ts.map +1 -0
  31. package/dist/generic/PubSubManager.js +41 -0
  32. package/dist/generic/PubSubManager.js.map +1 -0
  33. package/dist/generic/ResolverBase.d.ts +14 -0
  34. package/dist/generic/ResolverBase.d.ts.map +1 -1
  35. package/dist/generic/ResolverBase.js +66 -4
  36. package/dist/generic/ResolverBase.js.map +1 -1
  37. package/dist/hooks.d.ts +65 -0
  38. package/dist/hooks.d.ts.map +1 -0
  39. package/dist/hooks.js +14 -0
  40. package/dist/hooks.js.map +1 -0
  41. package/dist/index.d.ts +7 -1
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +173 -45
  44. package/dist/index.js.map +1 -1
  45. package/dist/multiTenancy/index.d.ts +47 -0
  46. package/dist/multiTenancy/index.d.ts.map +1 -0
  47. package/dist/multiTenancy/index.js +152 -0
  48. package/dist/multiTenancy/index.js.map +1 -0
  49. package/dist/resolvers/CurrentUserContextResolver.d.ts +18 -0
  50. package/dist/resolvers/CurrentUserContextResolver.d.ts.map +1 -0
  51. package/dist/resolvers/CurrentUserContextResolver.js +54 -0
  52. package/dist/resolvers/CurrentUserContextResolver.js.map +1 -0
  53. package/dist/resolvers/IntegrationDiscoveryResolver.d.ts +123 -0
  54. package/dist/resolvers/IntegrationDiscoveryResolver.d.ts.map +1 -0
  55. package/dist/resolvers/IntegrationDiscoveryResolver.js +624 -0
  56. package/dist/resolvers/IntegrationDiscoveryResolver.js.map +1 -0
  57. package/dist/rest/RESTEndpointHandler.d.ts +3 -1
  58. package/dist/rest/RESTEndpointHandler.d.ts.map +1 -1
  59. package/dist/rest/RESTEndpointHandler.js +14 -33
  60. package/dist/rest/RESTEndpointHandler.js.map +1 -1
  61. package/dist/test-dynamic-plugin.d.ts +6 -0
  62. package/dist/test-dynamic-plugin.d.ts.map +1 -0
  63. package/dist/test-dynamic-plugin.js +18 -0
  64. package/dist/test-dynamic-plugin.js.map +1 -0
  65. package/dist/types.d.ts +9 -0
  66. package/dist/types.d.ts.map +1 -1
  67. package/dist/types.js.map +1 -1
  68. package/package.json +61 -57
  69. package/src/__tests__/bcsaas-integration.test.ts +455 -0
  70. package/src/__tests__/middleware-integration.test.ts +877 -0
  71. package/src/__tests__/mjapi-bootstrap.test.ts +29 -0
  72. package/src/__tests__/multiTenancy.security.test.ts +334 -0
  73. package/src/__tests__/multiTenancy.test.ts +225 -0
  74. package/src/__tests__/unifiedAuth.test.ts +416 -0
  75. package/src/agents/skip-agent.ts +1 -0
  76. package/src/agents/skip-sdk.ts +13 -3
  77. package/src/apolloServer/index.ts +32 -16
  78. package/src/config.ts +25 -0
  79. package/src/context.ts +205 -98
  80. package/src/generated/generated.ts +746 -1
  81. package/src/generic/CacheInvalidationResolver.ts +66 -0
  82. package/src/generic/PubSubManager.ts +46 -0
  83. package/src/generic/ResolverBase.ts +70 -4
  84. package/src/hooks.ts +77 -0
  85. package/src/index.ts +199 -49
  86. package/src/multiTenancy/index.ts +183 -0
  87. package/src/resolvers/CurrentUserContextResolver.ts +39 -0
  88. package/src/resolvers/IntegrationDiscoveryResolver.ts +584 -0
  89. package/src/rest/RESTEndpointHandler.ts +23 -42
  90. package/src/test-dynamic-plugin.ts +36 -0
  91. package/src/types.ts +10 -0
@@ -18,7 +18,7 @@ import { mj_core_schema } from '../config.js';
18
18
 
19
19
 
20
20
 
21
- import { MJAccessControlRuleEntity, MJActionAuthorizationEntity, MJActionCategoryEntity, MJActionContextTypeEntity, MJActionContextEntity, MJActionExecutionLogEntity, MJActionFilterEntity, MJActionLibraryEntity, MJActionParamEntity, MJActionResultCodeEntity, MJActionEntity, MJAIActionEntity, MJAIAgentActionEntity, MJAIAgentArtifactTypeEntity, MJAIAgentConfigurationEntity, MJAIAgentDataSourceEntity, MJAIAgentExampleEntity, MJAIAgentLearningCycleEntity, MJAIAgentModalityEntity, MJAIAgentModelEntity, MJAIAgentNoteTypeEntity, MJAIAgentNoteEntity, MJAIAgentPermissionEntity, MJAIAgentPromptEntity, MJAIAgentRelationshipEntity, MJAIAgentRequestEntity, MJAIAgentRunMediaEntity, MJAIAgentRunStepEntity, MJAIAgentRunEntity, MJAIAgentStepPathEntity, MJAIAgentStepEntity, MJAIAgentTypeEntity, MJAIAgentEntity, MJAIArchitectureEntity, MJAIConfigurationParamEntity, MJAIConfigurationEntity, MJAICredentialBindingEntity, MJAIModalityEntity, MJAIModelActionEntity, MJAIModelArchitectureEntity, MJAIModelCostEntity, MJAIModelModalityEntity, MJAIModelPriceTypeEntity, MJAIModelPriceUnitTypeEntity, MJAIModelTypeEntity, MJAIModelVendorEntity, MJAIModelEntity, MJAIPromptCategoryEntity, MJAIPromptModelEntity, MJAIPromptRunMediaEntity, MJAIPromptRunEntity, MJAIPromptTypeEntity, MJAIPromptEntity, MJAIResultCacheEntity, MJAIVendorTypeDefinitionEntity, MJAIVendorTypeEntity, MJAIVendorEntity, MJAPIApplicationScopeEntity, MJAPIApplicationEntity, MJAPIKeyApplicationEntity, MJAPIKeyScopeEntity, MJAPIKeyUsageLogEntity, MJAPIKeyEntity, MJAPIScopeEntity, MJApplicationEntityEntity, MJApplicationSettingEntity, MJApplicationEntity, MJArtifactPermissionEntity, MJArtifactTypeEntity, MJArtifactUseEntity, MJArtifactVersionAttributeEntity, MJArtifactVersionEntity, MJArtifactEntity, MJAuditLogTypeEntity, MJAuditLogEntity, MJAuthorizationRoleEntity, MJAuthorizationEntity, MJCollectionArtifactEntity, MJCollectionPermissionEntity, MJCollectionEntity, MJCommunicationBaseMessageTypeEntity, MJCommunicationLogEntity, MJCommunicationProviderMessageTypeEntity, MJCommunicationProviderEntity, MJCommunicationRunEntity, MJCompanyEntity, MJCompanyIntegrationEntityMapEntity, MJCompanyIntegrationFieldMapEntity, MJCompanyIntegrationRecordMapEntity, MJCompanyIntegrationRunAPILogEntity, MJCompanyIntegrationRunDetailEntity, MJCompanyIntegrationRunEntity, MJCompanyIntegrationSyncWatermarkEntity, MJCompanyIntegrationEntity, MJComponentDependencyEntity, MJComponentLibraryEntity, MJComponentLibraryLinkEntity, MJComponentRegistryEntity, MJComponentEntity, MJContentFileTypeEntity, MJContentItemAttributeEntity, MJContentItemTagEntity, MJContentItemEntity, MJContentProcessRunEntity, MJContentSourceParamEntity, MJContentSourceTypeParamEntity, MJContentSourceTypeEntity, MJContentSourceEntity, MJContentTypeAttributeEntity, MJContentTypeEntity, MJConversationArtifactPermissionEntity, MJConversationArtifactVersionEntity, MJConversationArtifactEntity, MJConversationDetailArtifactEntity, MJConversationDetailAttachmentEntity, MJConversationDetailRatingEntity, MJConversationDetailEntity, MJConversationEntity, MJCredentialCategoryEntity, MJCredentialTypeEntity, MJCredentialEntity, MJDashboardCategoryEntity, MJDashboardCategoryLinkEntity, MJDashboardCategoryPermissionEntity, MJDashboardPartTypeEntity, MJDashboardPermissionEntity, MJDashboardUserPreferenceEntity, MJDashboardUserStateEntity, MJDashboardEntity, MJDataContextItemEntity, MJDataContextEntity, MJDatasetItemEntity, MJDatasetEntity, MJDuplicateRunDetailMatchEntity, MJDuplicateRunDetailEntity, MJDuplicateRunEntity, MJEmployeeCompanyIntegrationEntity, MJEmployeeRoleEntity, MJEmployeeSkillEntity, MJEmployeeEntity, MJEncryptionAlgorithmEntity, MJEncryptionKeySourceEntity, MJEncryptionKeyEntity, MJEntityEntity, MJEntityActionFilterEntity, MJEntityActionInvocationTypeEntity, MJEntityActionInvocationEntity, MJEntityActionParamEntity, MJEntityActionEntity, MJEntityAIActionEntity, MJEntityCommunicationFieldEntity, MJEntityCommunicationMessageTypeEntity, MJEntityDocumentRunEntity, MJEntityDocumentSettingEntity, MJEntityDocumentTypeEntity, MJEntityDocumentEntity, MJEntityFieldValueEntity, MJEntityFieldEntity, MJEntityPermissionEntity, MJEntityRecordDocumentEntity, MJEntityRelationshipDisplayComponentEntity, MJEntityRelationshipEntity, MJEntitySettingEntity, MJEnvironmentEntity, MJErrorLogEntity, MJExplorerNavigationItemEntity, MJFileCategoryEntity, MJFileEntityRecordLinkEntity, MJFileStorageAccountEntity, MJFileStorageProviderEntity, MJFileEntity, MJGeneratedCodeCategoryEntity, MJGeneratedCodeEntity, MJIntegrationSourceTypeEntity, MJIntegrationURLFormatEntity, MJIntegrationEntity, MJLibraryEntity, MJLibraryItemEntity, MJListCategoryEntity, MJListDetailEntity, MJListInvitationEntity, MJListShareEntity, MJListEntity, MJMCPServerConnectionPermissionEntity, MJMCPServerConnectionToolEntity, MJMCPServerConnectionEntity, MJMCPServerToolEntity, MJMCPServerEntity, MJMCPToolExecutionLogEntity, MJOAuthAuthServerMetadataCacheEntity, MJOAuthAuthorizationStateEntity, MJOAuthClientRegistrationEntity, MJOAuthTokenEntity, MJOpenAppDependencyEntity, MJOpenAppInstallHistoryEntity, MJOpenAppEntity, MJOutputDeliveryTypeEntity, MJOutputFormatTypeEntity, MJOutputTriggerTypeEntity, MJProjectEntity, MJPublicLinkEntity, MJQueryEntity, MJQueryCategoryEntity, MJQueryEntityEntity, MJQueryFieldEntity, MJQueryParameterEntity, MJQueryPermissionEntity, MJQuerySQLEntity, MJQueueTaskEntity, MJQueueTypeEntity, MJQueueEntity, MJRecommendationItemEntity, MJRecommendationProviderEntity, MJRecommendationRunEntity, MJRecommendationEntity, MJRecordChangeReplayRunEntity, MJRecordChangeEntity, MJRecordLinkEntity, MJRecordMergeDeletionLogEntity, MJRecordMergeLogEntity, MJReportCategoryEntity, MJReportSnapshotEntity, MJReportUserStateEntity, MJReportVersionEntity, MJReportEntity, MJResourceLinkEntity, MJResourcePermissionEntity, MJResourceTypeEntity, MJRoleEntity, MJRowLevelSecurityFilterEntity, MJScheduledActionParamEntity, MJScheduledActionEntity, MJScheduledJobRunEntity, MJScheduledJobTypeEntity, MJScheduledJobEntity, MJSchemaInfoEntity, MJSkillEntity, MJSQLDialectEntity, MJTaggedItemEntity, MJTagEntity, MJTaskDependencyEntity, MJTaskTypeEntity, MJTaskEntity, MJTemplateCategoryEntity, MJTemplateContentTypeEntity, MJTemplateContentEntity, MJTemplateParamEntity, MJTemplateEntity, MJTestRubricEntity, MJTestRunFeedbackEntity, MJTestRunOutputTypeEntity, MJTestRunOutputEntity, MJTestRunEntity, MJTestSuiteRunEntity, MJTestSuiteTestEntity, MJTestSuiteEntity, MJTestTypeEntity, MJTestEntity, MJUserApplicationEntityEntity, MJUserApplicationEntity, MJUserFavoriteEntity, MJUserNotificationPreferenceEntity, MJUserNotificationTypeEntity, MJUserNotificationEntity, MJUserRecordLogEntity, MJUserRoleEntity, MJUserSettingEntity, MJUserViewCategoryEntity, MJUserViewRunDetailEntity, MJUserViewRunEntity, MJUserViewEntity, MJUserEntity, MJVectorDatabaseEntity, MJVectorIndexEntity, MJVersionInstallationEntity, MJVersionLabelItemEntity, MJVersionLabelRestoreEntity, MJVersionLabelEntity, MJWorkflowEngineEntity, MJWorkflowRunEntity, MJWorkflowEntity, MJWorkspaceItemEntity, MJWorkspaceEntity } from '@memberjunction/core-entities';
21
+ import { MJAccessControlRuleEntity, MJActionAuthorizationEntity, MJActionCategoryEntity, MJActionContextTypeEntity, MJActionContextEntity, MJActionExecutionLogEntity, MJActionFilterEntity, MJActionLibraryEntity, MJActionParamEntity, MJActionResultCodeEntity, MJActionEntity, MJAIActionEntity, MJAIAgentActionEntity, MJAIAgentArtifactTypeEntity, MJAIAgentConfigurationEntity, MJAIAgentDataSourceEntity, MJAIAgentExampleEntity, MJAIAgentLearningCycleEntity, MJAIAgentModalityEntity, MJAIAgentModelEntity, MJAIAgentNoteTypeEntity, MJAIAgentNoteEntity, MJAIAgentPermissionEntity, MJAIAgentPromptEntity, MJAIAgentRelationshipEntity, MJAIAgentRequestEntity, MJAIAgentRunMediaEntity, MJAIAgentRunStepEntity, MJAIAgentRunEntity, MJAIAgentStepPathEntity, MJAIAgentStepEntity, MJAIAgentTypeEntity, MJAIAgentEntity, MJAIArchitectureEntity, MJAIConfigurationParamEntity, MJAIConfigurationEntity, MJAICredentialBindingEntity, MJAIModalityEntity, MJAIModelActionEntity, MJAIModelArchitectureEntity, MJAIModelCostEntity, MJAIModelModalityEntity, MJAIModelPriceTypeEntity, MJAIModelPriceUnitTypeEntity, MJAIModelTypeEntity, MJAIModelVendorEntity, MJAIModelEntity, MJAIPromptCategoryEntity, MJAIPromptModelEntity, MJAIPromptRunMediaEntity, MJAIPromptRunEntity, MJAIPromptTypeEntity, MJAIPromptEntity, MJAIResultCacheEntity, MJAIVendorTypeDefinitionEntity, MJAIVendorTypeEntity, MJAIVendorEntity, MJAPIApplicationScopeEntity, MJAPIApplicationEntity, MJAPIKeyApplicationEntity, MJAPIKeyScopeEntity, MJAPIKeyUsageLogEntity, MJAPIKeyEntity, MJAPIScopeEntity, MJApplicationEntityEntity, MJApplicationSettingEntity, MJApplicationEntity, MJArtifactPermissionEntity, MJArtifactTypeEntity, MJArtifactUseEntity, MJArtifactVersionAttributeEntity, MJArtifactVersionEntity, MJArtifactEntity, MJAuditLogTypeEntity, MJAuditLogEntity, MJAuthorizationRoleEntity, MJAuthorizationEntity, MJCollectionArtifactEntity, MJCollectionPermissionEntity, MJCollectionEntity, MJCommunicationBaseMessageTypeEntity, MJCommunicationLogEntity, MJCommunicationProviderMessageTypeEntity, MJCommunicationProviderEntity, MJCommunicationRunEntity, MJCompanyEntity, MJCompanyIntegrationEntityMapEntity, MJCompanyIntegrationFieldMapEntity, MJCompanyIntegrationRecordMapEntity, MJCompanyIntegrationRunAPILogEntity, MJCompanyIntegrationRunDetailEntity, MJCompanyIntegrationRunEntity, MJCompanyIntegrationSyncWatermarkEntity, MJCompanyIntegrationEntity, MJComponentDependencyEntity, MJComponentLibraryEntity, MJComponentLibraryLinkEntity, MJComponentRegistryEntity, MJComponentEntity, MJContentFileTypeEntity, MJContentItemAttributeEntity, MJContentItemTagEntity, MJContentItemEntity, MJContentProcessRunEntity, MJContentSourceParamEntity, MJContentSourceTypeParamEntity, MJContentSourceTypeEntity, MJContentSourceEntity, MJContentTypeAttributeEntity, MJContentTypeEntity, MJConversationArtifactPermissionEntity, MJConversationArtifactVersionEntity, MJConversationArtifactEntity, MJConversationDetailArtifactEntity, MJConversationDetailAttachmentEntity, MJConversationDetailRatingEntity, MJConversationDetailEntity, MJConversationEntity, MJCredentialCategoryEntity, MJCredentialTypeEntity, MJCredentialEntity, MJDashboardCategoryEntity, MJDashboardCategoryLinkEntity, MJDashboardCategoryPermissionEntity, MJDashboardPartTypeEntity, MJDashboardPermissionEntity, MJDashboardUserPreferenceEntity, MJDashboardUserStateEntity, MJDashboardEntity, MJDataContextItemEntity, MJDataContextEntity, MJDatasetItemEntity, MJDatasetEntity, MJDuplicateRunDetailMatchEntity, MJDuplicateRunDetailEntity, MJDuplicateRunEntity, MJEmployeeCompanyIntegrationEntity, MJEmployeeRoleEntity, MJEmployeeSkillEntity, MJEmployeeEntity, MJEncryptionAlgorithmEntity, MJEncryptionKeySourceEntity, MJEncryptionKeyEntity, MJEntityEntity, MJEntityActionFilterEntity, MJEntityActionInvocationTypeEntity, MJEntityActionInvocationEntity, MJEntityActionParamEntity, MJEntityActionEntity, MJEntityAIActionEntity, MJEntityCommunicationFieldEntity, MJEntityCommunicationMessageTypeEntity, MJEntityDocumentRunEntity, MJEntityDocumentSettingEntity, MJEntityDocumentTypeEntity, MJEntityDocumentEntity, MJEntityFieldValueEntity, MJEntityFieldEntity, MJEntityPermissionEntity, MJEntityRecordDocumentEntity, MJEntityRelationshipDisplayComponentEntity, MJEntityRelationshipEntity, MJEntitySettingEntity, MJEnvironmentEntity, MJErrorLogEntity, MJExplorerNavigationItemEntity, MJFileCategoryEntity, MJFileEntityRecordLinkEntity, MJFileStorageAccountEntity, MJFileStorageProviderEntity, MJFileEntity, MJGeneratedCodeCategoryEntity, MJGeneratedCodeEntity, MJIntegrationObjectFieldEntity, MJIntegrationObjectEntity, MJIntegrationSourceTypeEntity, MJIntegrationURLFormatEntity, MJIntegrationEntity, MJLibraryEntity, MJLibraryItemEntity, MJListCategoryEntity, MJListDetailEntity, MJListInvitationEntity, MJListShareEntity, MJListEntity, MJMCPServerConnectionPermissionEntity, MJMCPServerConnectionToolEntity, MJMCPServerConnectionEntity, MJMCPServerToolEntity, MJMCPServerEntity, MJMCPToolExecutionLogEntity, MJOAuthAuthServerMetadataCacheEntity, MJOAuthAuthorizationStateEntity, MJOAuthClientRegistrationEntity, MJOAuthTokenEntity, MJOpenAppDependencyEntity, MJOpenAppInstallHistoryEntity, MJOpenAppEntity, MJOutputDeliveryTypeEntity, MJOutputFormatTypeEntity, MJOutputTriggerTypeEntity, MJProjectEntity, MJPublicLinkEntity, MJQueryEntity, MJQueryCategoryEntity, MJQueryEntityEntity, MJQueryFieldEntity, MJQueryParameterEntity, MJQueryPermissionEntity, MJQuerySQLEntity, MJQueueTaskEntity, MJQueueTypeEntity, MJQueueEntity, MJRecommendationItemEntity, MJRecommendationProviderEntity, MJRecommendationRunEntity, MJRecommendationEntity, MJRecordChangeReplayRunEntity, MJRecordChangeEntity, MJRecordLinkEntity, MJRecordMergeDeletionLogEntity, MJRecordMergeLogEntity, MJReportCategoryEntity, MJReportSnapshotEntity, MJReportUserStateEntity, MJReportVersionEntity, MJReportEntity, MJResourceLinkEntity, MJResourcePermissionEntity, MJResourceTypeEntity, MJRoleEntity, MJRowLevelSecurityFilterEntity, MJScheduledActionParamEntity, MJScheduledActionEntity, MJScheduledJobRunEntity, MJScheduledJobTypeEntity, MJScheduledJobEntity, MJSchemaInfoEntity, MJSkillEntity, MJSQLDialectEntity, MJTaggedItemEntity, MJTagEntity, MJTaskDependencyEntity, MJTaskTypeEntity, MJTaskEntity, MJTemplateCategoryEntity, MJTemplateContentTypeEntity, MJTemplateContentEntity, MJTemplateParamEntity, MJTemplateEntity, MJTestRubricEntity, MJTestRunFeedbackEntity, MJTestRunOutputTypeEntity, MJTestRunOutputEntity, MJTestRunEntity, MJTestSuiteRunEntity, MJTestSuiteTestEntity, MJTestSuiteEntity, MJTestTypeEntity, MJTestEntity, MJUserApplicationEntityEntity, MJUserApplicationEntity, MJUserFavoriteEntity, MJUserNotificationPreferenceEntity, MJUserNotificationTypeEntity, MJUserNotificationEntity, MJUserRecordLogEntity, MJUserRoleEntity, MJUserSettingEntity, MJUserViewCategoryEntity, MJUserViewRunDetailEntity, MJUserViewRunEntity, MJUserViewEntity, MJUserEntity, MJVectorDatabaseEntity, MJVectorIndexEntity, MJVersionInstallationEntity, MJVersionLabelItemEntity, MJVersionLabelRestoreEntity, MJVersionLabelEntity, MJWorkflowEngineEntity, MJWorkflowRunEntity, MJWorkflowEntity, MJWorkspaceItemEntity, MJWorkspaceEntity } from '@memberjunction/core-entities';
22
22
 
23
23
 
24
24
  //****************************************************************************
@@ -6581,6 +6581,10 @@ each time the agent processes a prompt step.`})
6581
6581
  @Field({nullable: true, description: `JSON object containing additional scope dimensions beyond the primary scope. Example: {"ContactID":"abc-123","TeamID":"team-456"}`})
6582
6582
  SecondaryScopes?: string;
6583
6583
 
6584
+ @Field({nullable: true, description: `Optional reference ID from an external system that initiated this agent run. Enables correlation between the caller's agent run and this execution. For example, when Skip SaaS is called via SkipProxyAgent, this stores the MJ-side Agent Run ID.`})
6585
+ @MaxLength(200)
6586
+ ExternalReferenceID?: string;
6587
+
6584
6588
  @Field({nullable: true})
6585
6589
  @MaxLength(255)
6586
6590
  Agent?: string;
@@ -6789,6 +6793,9 @@ export class CreateMJAIAgentRunInput {
6789
6793
 
6790
6794
  @Field({ nullable: true })
6791
6795
  SecondaryScopes: string | null;
6796
+
6797
+ @Field({ nullable: true })
6798
+ ExternalReferenceID: string | null;
6792
6799
  }
6793
6800
 
6794
6801
 
@@ -6923,6 +6930,9 @@ export class UpdateMJAIAgentRunInput {
6923
6930
  @Field({ nullable: true })
6924
6931
  SecondaryScopes?: string | null;
6925
6932
 
6933
+ @Field({ nullable: true })
6934
+ ExternalReferenceID?: string | null;
6935
+
6926
6936
  @Field(() => [KeyValuePairInput], { nullable: true })
6927
6937
  OldValues___?: KeyValuePairInput[];
6928
6938
  }
@@ -23744,6 +23754,39 @@ export class MJCompanyIntegration_ {
23744
23754
  @MaxLength(36)
23745
23755
  CredentialID?: string;
23746
23756
 
23757
+ @Field(() => Boolean, {description: `Whether automatic sync scheduling is enabled for this integration`})
23758
+ ScheduleEnabled: boolean;
23759
+
23760
+ @Field({description: `Type of schedule: Manual (no auto-sync), Interval (every N minutes), Cron (cron expression)`})
23761
+ @MaxLength(20)
23762
+ ScheduleType: string;
23763
+
23764
+ @Field(() => Int, {nullable: true, description: `Interval in minutes for Interval schedule type`})
23765
+ ScheduleIntervalMinutes?: number;
23766
+
23767
+ @Field({nullable: true, description: `Cron expression for Cron schedule type (e.g., "0 */6 * * *" for every 6 hours)`})
23768
+ @MaxLength(200)
23769
+ CronExpression?: string;
23770
+
23771
+ @Field({nullable: true, description: `When the next scheduled sync should run. Updated after each run based on schedule config.`})
23772
+ NextScheduledRunAt?: Date;
23773
+
23774
+ @Field({nullable: true, description: `When the last scheduled sync was initiated`})
23775
+ LastScheduledRunAt?: Date;
23776
+
23777
+ @Field(() => Boolean, {description: `Whether a sync is currently locked/running for this integration`})
23778
+ IsLocked: boolean;
23779
+
23780
+ @Field({nullable: true, description: `When the lock was acquired`})
23781
+ LockedAt?: Date;
23782
+
23783
+ @Field({nullable: true, description: `Server instance identifier that holds the lock (hostname-pid)`})
23784
+ @MaxLength(200)
23785
+ LockedByInstance?: string;
23786
+
23787
+ @Field({nullable: true, description: `When the lock should be considered stale and eligible for cleanup`})
23788
+ LockExpiresAt?: Date;
23789
+
23747
23790
  @Field()
23748
23791
  @MaxLength(50)
23749
23792
  Company: string;
@@ -23842,6 +23885,36 @@ export class CreateMJCompanyIntegrationInput {
23842
23885
 
23843
23886
  @Field({ nullable: true })
23844
23887
  CredentialID: string | null;
23888
+
23889
+ @Field(() => Boolean, { nullable: true })
23890
+ ScheduleEnabled?: boolean;
23891
+
23892
+ @Field({ nullable: true })
23893
+ ScheduleType?: string;
23894
+
23895
+ @Field(() => Int, { nullable: true })
23896
+ ScheduleIntervalMinutes: number | null;
23897
+
23898
+ @Field({ nullable: true })
23899
+ CronExpression: string | null;
23900
+
23901
+ @Field({ nullable: true })
23902
+ NextScheduledRunAt: Date | null;
23903
+
23904
+ @Field({ nullable: true })
23905
+ LastScheduledRunAt: Date | null;
23906
+
23907
+ @Field(() => Boolean, { nullable: true })
23908
+ IsLocked?: boolean;
23909
+
23910
+ @Field({ nullable: true })
23911
+ LockedAt: Date | null;
23912
+
23913
+ @Field({ nullable: true })
23914
+ LockedByInstance: string | null;
23915
+
23916
+ @Field({ nullable: true })
23917
+ LockExpiresAt: Date | null;
23845
23918
  }
23846
23919
 
23847
23920
 
@@ -23901,6 +23974,36 @@ export class UpdateMJCompanyIntegrationInput {
23901
23974
  @Field({ nullable: true })
23902
23975
  CredentialID?: string | null;
23903
23976
 
23977
+ @Field(() => Boolean, { nullable: true })
23978
+ ScheduleEnabled?: boolean;
23979
+
23980
+ @Field({ nullable: true })
23981
+ ScheduleType?: string;
23982
+
23983
+ @Field(() => Int, { nullable: true })
23984
+ ScheduleIntervalMinutes?: number | null;
23985
+
23986
+ @Field({ nullable: true })
23987
+ CronExpression?: string | null;
23988
+
23989
+ @Field({ nullable: true })
23990
+ NextScheduledRunAt?: Date | null;
23991
+
23992
+ @Field({ nullable: true })
23993
+ LastScheduledRunAt?: Date | null;
23994
+
23995
+ @Field(() => Boolean, { nullable: true })
23996
+ IsLocked?: boolean;
23997
+
23998
+ @Field({ nullable: true })
23999
+ LockedAt?: Date | null;
24000
+
24001
+ @Field({ nullable: true })
24002
+ LockedByInstance?: string | null;
24003
+
24004
+ @Field({ nullable: true })
24005
+ LockExpiresAt?: Date | null;
24006
+
23904
24007
  @Field(() => [KeyValuePairInput], { nullable: true })
23905
24008
  OldValues___?: KeyValuePairInput[];
23906
24009
  }
@@ -42332,6 +42435,635 @@ export class MJGeneratedCodeResolver extends ResolverBase {
42332
42435
 
42333
42436
  }
42334
42437
 
42438
+ //****************************************************************************
42439
+ // ENTITY CLASS for MJ: Integration Object Fields
42440
+ //****************************************************************************
42441
+ @ObjectType({ description: `Describes a field on an integration object, mirroring EntityField column patterns for type compatibility` })
42442
+ export class MJIntegrationObjectField_ {
42443
+ @Field({description: `Primary key`})
42444
+ @MaxLength(36)
42445
+ ID: string;
42446
+
42447
+ @Field({description: `Foreign key to the IntegrationObject this field belongs to`})
42448
+ @MaxLength(36)
42449
+ IntegrationObjectID: string;
42450
+
42451
+ @Field({description: `Field name as returned by the external API`})
42452
+ @MaxLength(255)
42453
+ Name: string;
42454
+
42455
+ @Field({nullable: true, description: `Human-friendly display label for the field`})
42456
+ @MaxLength(255)
42457
+ DisplayName?: string;
42458
+
42459
+ @Field({nullable: true, description: `Description of what this field represents`})
42460
+ Description?: string;
42461
+
42462
+ @Field({nullable: true, description: `UI grouping category within the object`})
42463
+ @MaxLength(100)
42464
+ Category?: string;
42465
+
42466
+ @Field({description: `Data type of the field (e.g., nvarchar, int, datetime, decimal, bit). Uses same type vocabulary as EntityField.`})
42467
+ @MaxLength(100)
42468
+ Type: string;
42469
+
42470
+ @Field(() => Int, {nullable: true, description: `Maximum length for string types`})
42471
+ Length?: number;
42472
+
42473
+ @Field(() => Int, {nullable: true, description: `Numeric precision`})
42474
+ Precision?: number;
42475
+
42476
+ @Field(() => Int, {nullable: true, description: `Numeric scale`})
42477
+ Scale?: number;
42478
+
42479
+ @Field(() => Boolean, {description: `Whether the field can contain NULL values`})
42480
+ AllowsNull: boolean;
42481
+
42482
+ @Field({nullable: true, description: `Default value from the source system`})
42483
+ @MaxLength(255)
42484
+ DefaultValue?: string;
42485
+
42486
+ @Field(() => Boolean, {description: `Whether this field is part of the object primary key`})
42487
+ IsPrimaryKey: boolean;
42488
+
42489
+ @Field(() => Boolean, {description: `Whether values must be unique across all records`})
42490
+ IsUniqueKey: boolean;
42491
+
42492
+ @Field(() => Boolean, {description: `Whether this field cannot be written back to the source system`})
42493
+ IsReadOnly: boolean;
42494
+
42495
+ @Field(() => Boolean, {description: `Whether this field is required for create/update operations`})
42496
+ IsRequired: boolean;
42497
+
42498
+ @Field({nullable: true, description: `Foreign key to another IntegrationObject, establishing a relationship. Used for DAG-based dependency ordering and template variable resolution in parent APIPath patterns.`})
42499
+ @MaxLength(36)
42500
+ RelatedIntegrationObjectID?: string;
42501
+
42502
+ @Field({nullable: true, description: `The field name on the related IntegrationObject that this FK points to (typically the PK field)`})
42503
+ @MaxLength(255)
42504
+ RelatedIntegrationObjectFieldName?: string;
42505
+
42506
+ @Field(() => Int, {description: `Display and processing order within the object. Lower numbers appear first.`})
42507
+ Sequence: number;
42508
+
42509
+ @Field({nullable: true, description: `Freeform JSON for connector-specific field configuration`})
42510
+ Configuration?: string;
42511
+
42512
+ @Field({description: `Active, Deprecated, or Disabled. Mirrors EntityField status values.`})
42513
+ @MaxLength(25)
42514
+ Status: string;
42515
+
42516
+ @Field()
42517
+ _mj__CreatedAt: Date;
42518
+
42519
+ @Field()
42520
+ _mj__UpdatedAt: Date;
42521
+
42522
+ @Field()
42523
+ @MaxLength(255)
42524
+ IntegrationObject: string;
42525
+
42526
+ @Field({nullable: true})
42527
+ @MaxLength(255)
42528
+ RelatedIntegrationObject?: string;
42529
+
42530
+ }
42531
+
42532
+ //****************************************************************************
42533
+ // INPUT TYPE for MJ: Integration Object Fields
42534
+ //****************************************************************************
42535
+ @InputType()
42536
+ export class CreateMJIntegrationObjectFieldInput {
42537
+ @Field({ nullable: true })
42538
+ ID?: string;
42539
+
42540
+ @Field({ nullable: true })
42541
+ IntegrationObjectID?: string;
42542
+
42543
+ @Field({ nullable: true })
42544
+ Name?: string;
42545
+
42546
+ @Field({ nullable: true })
42547
+ DisplayName: string | null;
42548
+
42549
+ @Field({ nullable: true })
42550
+ Description: string | null;
42551
+
42552
+ @Field({ nullable: true })
42553
+ Category: string | null;
42554
+
42555
+ @Field({ nullable: true })
42556
+ Type?: string;
42557
+
42558
+ @Field(() => Int, { nullable: true })
42559
+ Length: number | null;
42560
+
42561
+ @Field(() => Int, { nullable: true })
42562
+ Precision: number | null;
42563
+
42564
+ @Field(() => Int, { nullable: true })
42565
+ Scale: number | null;
42566
+
42567
+ @Field(() => Boolean, { nullable: true })
42568
+ AllowsNull?: boolean;
42569
+
42570
+ @Field({ nullable: true })
42571
+ DefaultValue: string | null;
42572
+
42573
+ @Field(() => Boolean, { nullable: true })
42574
+ IsPrimaryKey?: boolean;
42575
+
42576
+ @Field(() => Boolean, { nullable: true })
42577
+ IsUniqueKey?: boolean;
42578
+
42579
+ @Field(() => Boolean, { nullable: true })
42580
+ IsReadOnly?: boolean;
42581
+
42582
+ @Field(() => Boolean, { nullable: true })
42583
+ IsRequired?: boolean;
42584
+
42585
+ @Field({ nullable: true })
42586
+ RelatedIntegrationObjectID: string | null;
42587
+
42588
+ @Field({ nullable: true })
42589
+ RelatedIntegrationObjectFieldName: string | null;
42590
+
42591
+ @Field(() => Int, { nullable: true })
42592
+ Sequence?: number;
42593
+
42594
+ @Field({ nullable: true })
42595
+ Configuration: string | null;
42596
+
42597
+ @Field({ nullable: true })
42598
+ Status?: string;
42599
+ }
42600
+
42601
+
42602
+ //****************************************************************************
42603
+ // INPUT TYPE for MJ: Integration Object Fields
42604
+ //****************************************************************************
42605
+ @InputType()
42606
+ export class UpdateMJIntegrationObjectFieldInput {
42607
+ @Field()
42608
+ ID: string;
42609
+
42610
+ @Field({ nullable: true })
42611
+ IntegrationObjectID?: string;
42612
+
42613
+ @Field({ nullable: true })
42614
+ Name?: string;
42615
+
42616
+ @Field({ nullable: true })
42617
+ DisplayName?: string | null;
42618
+
42619
+ @Field({ nullable: true })
42620
+ Description?: string | null;
42621
+
42622
+ @Field({ nullable: true })
42623
+ Category?: string | null;
42624
+
42625
+ @Field({ nullable: true })
42626
+ Type?: string;
42627
+
42628
+ @Field(() => Int, { nullable: true })
42629
+ Length?: number | null;
42630
+
42631
+ @Field(() => Int, { nullable: true })
42632
+ Precision?: number | null;
42633
+
42634
+ @Field(() => Int, { nullable: true })
42635
+ Scale?: number | null;
42636
+
42637
+ @Field(() => Boolean, { nullable: true })
42638
+ AllowsNull?: boolean;
42639
+
42640
+ @Field({ nullable: true })
42641
+ DefaultValue?: string | null;
42642
+
42643
+ @Field(() => Boolean, { nullable: true })
42644
+ IsPrimaryKey?: boolean;
42645
+
42646
+ @Field(() => Boolean, { nullable: true })
42647
+ IsUniqueKey?: boolean;
42648
+
42649
+ @Field(() => Boolean, { nullable: true })
42650
+ IsReadOnly?: boolean;
42651
+
42652
+ @Field(() => Boolean, { nullable: true })
42653
+ IsRequired?: boolean;
42654
+
42655
+ @Field({ nullable: true })
42656
+ RelatedIntegrationObjectID?: string | null;
42657
+
42658
+ @Field({ nullable: true })
42659
+ RelatedIntegrationObjectFieldName?: string | null;
42660
+
42661
+ @Field(() => Int, { nullable: true })
42662
+ Sequence?: number;
42663
+
42664
+ @Field({ nullable: true })
42665
+ Configuration?: string | null;
42666
+
42667
+ @Field({ nullable: true })
42668
+ Status?: string;
42669
+
42670
+ @Field(() => [KeyValuePairInput], { nullable: true })
42671
+ OldValues___?: KeyValuePairInput[];
42672
+ }
42673
+
42674
+ //****************************************************************************
42675
+ // RESOLVER for MJ: Integration Object Fields
42676
+ //****************************************************************************
42677
+ @ObjectType()
42678
+ export class RunMJIntegrationObjectFieldViewResult {
42679
+ @Field(() => [MJIntegrationObjectField_])
42680
+ Results: MJIntegrationObjectField_[];
42681
+
42682
+ @Field(() => String, {nullable: true})
42683
+ UserViewRunID?: string;
42684
+
42685
+ @Field(() => Int, {nullable: true})
42686
+ RowCount: number;
42687
+
42688
+ @Field(() => Int, {nullable: true})
42689
+ TotalRowCount: number;
42690
+
42691
+ @Field(() => Int, {nullable: true})
42692
+ ExecutionTime: number;
42693
+
42694
+ @Field({nullable: true})
42695
+ ErrorMessage?: string;
42696
+
42697
+ @Field(() => Boolean, {nullable: false})
42698
+ Success: boolean;
42699
+ }
42700
+
42701
+ @Resolver(MJIntegrationObjectField_)
42702
+ export class MJIntegrationObjectFieldResolver extends ResolverBase {
42703
+ @Query(() => RunMJIntegrationObjectFieldViewResult)
42704
+ async RunMJIntegrationObjectFieldViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
42705
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
42706
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
42707
+ }
42708
+
42709
+ @Query(() => RunMJIntegrationObjectFieldViewResult)
42710
+ async RunMJIntegrationObjectFieldViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
42711
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
42712
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
42713
+ }
42714
+
42715
+ @Query(() => RunMJIntegrationObjectFieldViewResult)
42716
+ async RunMJIntegrationObjectFieldDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
42717
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
42718
+ input.EntityName = 'MJ: Integration Object Fields';
42719
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
42720
+ }
42721
+ @Query(() => MJIntegrationObjectField_, { nullable: true })
42722
+ async MJIntegrationObjectField(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJIntegrationObjectField_ | null> {
42723
+ this.CheckUserReadPermissions('MJ: Integration Object Fields', userPayload);
42724
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
42725
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwIntegrationObjectFields')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Integration Object Fields', userPayload, EntityPermissionType.Read, 'AND');
42726
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
42727
+ const result = await this.MapFieldNamesToCodeNames('MJ: Integration Object Fields', rows && rows.length > 0 ? rows[0] : {}, this.GetUserFromPayload(userPayload));
42728
+ return result;
42729
+ }
42730
+
42731
+ @Mutation(() => MJIntegrationObjectField_)
42732
+ async CreateMJIntegrationObjectField(
42733
+ @Arg('input', () => CreateMJIntegrationObjectFieldInput) input: CreateMJIntegrationObjectFieldInput,
42734
+ @Ctx() { providers, userPayload }: AppContext,
42735
+ @PubSub() pubSub: PubSubEngine
42736
+ ) {
42737
+ const provider = GetReadWriteProvider(providers);
42738
+ return this.CreateRecord('MJ: Integration Object Fields', input, provider, userPayload, pubSub)
42739
+ }
42740
+
42741
+ @Mutation(() => MJIntegrationObjectField_)
42742
+ async UpdateMJIntegrationObjectField(
42743
+ @Arg('input', () => UpdateMJIntegrationObjectFieldInput) input: UpdateMJIntegrationObjectFieldInput,
42744
+ @Ctx() { providers, userPayload }: AppContext,
42745
+ @PubSub() pubSub: PubSubEngine
42746
+ ) {
42747
+ const provider = GetReadWriteProvider(providers);
42748
+ return this.UpdateRecord('MJ: Integration Object Fields', input, provider, userPayload, pubSub);
42749
+ }
42750
+
42751
+ @Mutation(() => MJIntegrationObjectField_)
42752
+ async DeleteMJIntegrationObjectField(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
42753
+ const provider = GetReadWriteProvider(providers);
42754
+ const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
42755
+ return this.DeleteRecord('MJ: Integration Object Fields', key, options, provider, userPayload, pubSub);
42756
+ }
42757
+
42758
+ }
42759
+
42760
+ //****************************************************************************
42761
+ // ENTITY CLASS for MJ: Integration Objects
42762
+ //****************************************************************************
42763
+ @ObjectType({ description: `Describes an external object or endpoint exposed by an integration (e.g., Members, Events, Invoices)` })
42764
+ export class MJIntegrationObject_ {
42765
+ @Field({description: `Primary key`})
42766
+ @MaxLength(36)
42767
+ ID: string;
42768
+
42769
+ @Field({description: `Foreign key to the Integration that owns this object`})
42770
+ @MaxLength(36)
42771
+ IntegrationID: string;
42772
+
42773
+ @Field({description: `Internal/programmatic name of the external object (e.g., Members, Events)`})
42774
+ @MaxLength(255)
42775
+ Name: string;
42776
+
42777
+ @Field({nullable: true, description: `Human-friendly display label`})
42778
+ @MaxLength(255)
42779
+ DisplayName?: string;
42780
+
42781
+ @Field({nullable: true, description: `Description of what this external object represents`})
42782
+ Description?: string;
42783
+
42784
+ @Field({nullable: true, description: `UI grouping category (e.g., Membership, Events, Finance)`})
42785
+ @MaxLength(100)
42786
+ Category?: string;
42787
+
42788
+ @Field({description: `API endpoint path, may include template variables like {ProfileID} that are resolved at runtime from parent object records`})
42789
+ @MaxLength(500)
42790
+ APIPath: string;
42791
+
42792
+ @Field({nullable: true, description: `JSON key used to extract the data array from the API response envelope. NULL means the response is a root-level array.`})
42793
+ @MaxLength(255)
42794
+ ResponseDataKey?: string;
42795
+
42796
+ @Field(() => Int, {description: `Number of records to request per page from the API`})
42797
+ DefaultPageSize: number;
42798
+
42799
+ @Field(() => Boolean, {description: `Whether this endpoint supports paginated fetching`})
42800
+ SupportsPagination: boolean;
42801
+
42802
+ @Field({description: `Pagination strategy: PageNumber (page index), Offset (record offset), Cursor (opaque token), or None`})
42803
+ @MaxLength(20)
42804
+ PaginationType: string;
42805
+
42806
+ @Field(() => Boolean, {description: `Whether this object supports watermark-based incremental sync`})
42807
+ SupportsIncrementalSync: boolean;
42808
+
42809
+ @Field(() => Boolean, {description: `Whether data can be pushed back to this object via the API`})
42810
+ SupportsWrite: boolean;
42811
+
42812
+ @Field({nullable: true, description: `JSON object of default query parameters to include with every API request for this object`})
42813
+ DefaultQueryParams?: string;
42814
+
42815
+ @Field({nullable: true, description: `Freeform JSON for connector-specific configuration not covered by standard columns`})
42816
+ Configuration?: string;
42817
+
42818
+ @Field(() => Int, {description: `Processing and display order. Lower numbers are processed first.`})
42819
+ Sequence: number;
42820
+
42821
+ @Field({description: `Active, Deprecated, or Disabled. Mirrors EntityField status values.`})
42822
+ @MaxLength(25)
42823
+ Status: string;
42824
+
42825
+ @Field()
42826
+ _mj__CreatedAt: Date;
42827
+
42828
+ @Field()
42829
+ _mj__UpdatedAt: Date;
42830
+
42831
+ @Field()
42832
+ @MaxLength(100)
42833
+ Integration: string;
42834
+
42835
+ @Field(() => [MJIntegrationObjectField_])
42836
+ MJIntegrationObjectFields_IntegrationObjectIDArray: MJIntegrationObjectField_[]; // Link to MJIntegrationObjectFields
42837
+
42838
+ @Field(() => [MJIntegrationObjectField_])
42839
+ MJIntegrationObjectFields_RelatedIntegrationObjectIDArray: MJIntegrationObjectField_[]; // Link to MJIntegrationObjectFields
42840
+
42841
+ }
42842
+
42843
+ //****************************************************************************
42844
+ // INPUT TYPE for MJ: Integration Objects
42845
+ //****************************************************************************
42846
+ @InputType()
42847
+ export class CreateMJIntegrationObjectInput {
42848
+ @Field({ nullable: true })
42849
+ ID?: string;
42850
+
42851
+ @Field({ nullable: true })
42852
+ IntegrationID?: string;
42853
+
42854
+ @Field({ nullable: true })
42855
+ Name?: string;
42856
+
42857
+ @Field({ nullable: true })
42858
+ DisplayName: string | null;
42859
+
42860
+ @Field({ nullable: true })
42861
+ Description: string | null;
42862
+
42863
+ @Field({ nullable: true })
42864
+ Category: string | null;
42865
+
42866
+ @Field({ nullable: true })
42867
+ APIPath?: string;
42868
+
42869
+ @Field({ nullable: true })
42870
+ ResponseDataKey: string | null;
42871
+
42872
+ @Field(() => Int, { nullable: true })
42873
+ DefaultPageSize?: number;
42874
+
42875
+ @Field(() => Boolean, { nullable: true })
42876
+ SupportsPagination?: boolean;
42877
+
42878
+ @Field({ nullable: true })
42879
+ PaginationType?: string;
42880
+
42881
+ @Field(() => Boolean, { nullable: true })
42882
+ SupportsIncrementalSync?: boolean;
42883
+
42884
+ @Field(() => Boolean, { nullable: true })
42885
+ SupportsWrite?: boolean;
42886
+
42887
+ @Field({ nullable: true })
42888
+ DefaultQueryParams: string | null;
42889
+
42890
+ @Field({ nullable: true })
42891
+ Configuration: string | null;
42892
+
42893
+ @Field(() => Int, { nullable: true })
42894
+ Sequence?: number;
42895
+
42896
+ @Field({ nullable: true })
42897
+ Status?: string;
42898
+ }
42899
+
42900
+
42901
+ //****************************************************************************
42902
+ // INPUT TYPE for MJ: Integration Objects
42903
+ //****************************************************************************
42904
+ @InputType()
42905
+ export class UpdateMJIntegrationObjectInput {
42906
+ @Field()
42907
+ ID: string;
42908
+
42909
+ @Field({ nullable: true })
42910
+ IntegrationID?: string;
42911
+
42912
+ @Field({ nullable: true })
42913
+ Name?: string;
42914
+
42915
+ @Field({ nullable: true })
42916
+ DisplayName?: string | null;
42917
+
42918
+ @Field({ nullable: true })
42919
+ Description?: string | null;
42920
+
42921
+ @Field({ nullable: true })
42922
+ Category?: string | null;
42923
+
42924
+ @Field({ nullable: true })
42925
+ APIPath?: string;
42926
+
42927
+ @Field({ nullable: true })
42928
+ ResponseDataKey?: string | null;
42929
+
42930
+ @Field(() => Int, { nullable: true })
42931
+ DefaultPageSize?: number;
42932
+
42933
+ @Field(() => Boolean, { nullable: true })
42934
+ SupportsPagination?: boolean;
42935
+
42936
+ @Field({ nullable: true })
42937
+ PaginationType?: string;
42938
+
42939
+ @Field(() => Boolean, { nullable: true })
42940
+ SupportsIncrementalSync?: boolean;
42941
+
42942
+ @Field(() => Boolean, { nullable: true })
42943
+ SupportsWrite?: boolean;
42944
+
42945
+ @Field({ nullable: true })
42946
+ DefaultQueryParams?: string | null;
42947
+
42948
+ @Field({ nullable: true })
42949
+ Configuration?: string | null;
42950
+
42951
+ @Field(() => Int, { nullable: true })
42952
+ Sequence?: number;
42953
+
42954
+ @Field({ nullable: true })
42955
+ Status?: string;
42956
+
42957
+ @Field(() => [KeyValuePairInput], { nullable: true })
42958
+ OldValues___?: KeyValuePairInput[];
42959
+ }
42960
+
42961
+ //****************************************************************************
42962
+ // RESOLVER for MJ: Integration Objects
42963
+ //****************************************************************************
42964
+ @ObjectType()
42965
+ export class RunMJIntegrationObjectViewResult {
42966
+ @Field(() => [MJIntegrationObject_])
42967
+ Results: MJIntegrationObject_[];
42968
+
42969
+ @Field(() => String, {nullable: true})
42970
+ UserViewRunID?: string;
42971
+
42972
+ @Field(() => Int, {nullable: true})
42973
+ RowCount: number;
42974
+
42975
+ @Field(() => Int, {nullable: true})
42976
+ TotalRowCount: number;
42977
+
42978
+ @Field(() => Int, {nullable: true})
42979
+ ExecutionTime: number;
42980
+
42981
+ @Field({nullable: true})
42982
+ ErrorMessage?: string;
42983
+
42984
+ @Field(() => Boolean, {nullable: false})
42985
+ Success: boolean;
42986
+ }
42987
+
42988
+ @Resolver(MJIntegrationObject_)
42989
+ export class MJIntegrationObjectResolver extends ResolverBase {
42990
+ @Query(() => RunMJIntegrationObjectViewResult)
42991
+ async RunMJIntegrationObjectViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
42992
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
42993
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
42994
+ }
42995
+
42996
+ @Query(() => RunMJIntegrationObjectViewResult)
42997
+ async RunMJIntegrationObjectViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
42998
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
42999
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
43000
+ }
43001
+
43002
+ @Query(() => RunMJIntegrationObjectViewResult)
43003
+ async RunMJIntegrationObjectDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
43004
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
43005
+ input.EntityName = 'MJ: Integration Objects';
43006
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
43007
+ }
43008
+ @Query(() => MJIntegrationObject_, { nullable: true })
43009
+ async MJIntegrationObject(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJIntegrationObject_ | null> {
43010
+ this.CheckUserReadPermissions('MJ: Integration Objects', userPayload);
43011
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
43012
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwIntegrationObjects')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Integration Objects', userPayload, EntityPermissionType.Read, 'AND');
43013
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
43014
+ const result = await this.MapFieldNamesToCodeNames('MJ: Integration Objects', rows && rows.length > 0 ? rows[0] : {}, this.GetUserFromPayload(userPayload));
43015
+ return result;
43016
+ }
43017
+
43018
+ @FieldResolver(() => [MJIntegrationObjectField_])
43019
+ async MJIntegrationObjectFields_IntegrationObjectIDArray(@Root() mjintegrationobject_: MJIntegrationObject_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
43020
+ this.CheckUserReadPermissions('MJ: Integration Object Fields', userPayload);
43021
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
43022
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwIntegrationObjectFields')} WHERE ${provider.QuoteIdentifier('IntegrationObjectID')}='${mjintegrationobject_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Integration Object Fields', userPayload, EntityPermissionType.Read, 'AND');
43023
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
43024
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Integration Object Fields', rows, this.GetUserFromPayload(userPayload));
43025
+ return result;
43026
+ }
43027
+
43028
+ @FieldResolver(() => [MJIntegrationObjectField_])
43029
+ async MJIntegrationObjectFields_RelatedIntegrationObjectIDArray(@Root() mjintegrationobject_: MJIntegrationObject_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
43030
+ this.CheckUserReadPermissions('MJ: Integration Object Fields', userPayload);
43031
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
43032
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwIntegrationObjectFields')} WHERE ${provider.QuoteIdentifier('RelatedIntegrationObjectID')}='${mjintegrationobject_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Integration Object Fields', userPayload, EntityPermissionType.Read, 'AND');
43033
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
43034
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Integration Object Fields', rows, this.GetUserFromPayload(userPayload));
43035
+ return result;
43036
+ }
43037
+
43038
+ @Mutation(() => MJIntegrationObject_)
43039
+ async CreateMJIntegrationObject(
43040
+ @Arg('input', () => CreateMJIntegrationObjectInput) input: CreateMJIntegrationObjectInput,
43041
+ @Ctx() { providers, userPayload }: AppContext,
43042
+ @PubSub() pubSub: PubSubEngine
43043
+ ) {
43044
+ const provider = GetReadWriteProvider(providers);
43045
+ return this.CreateRecord('MJ: Integration Objects', input, provider, userPayload, pubSub)
43046
+ }
43047
+
43048
+ @Mutation(() => MJIntegrationObject_)
43049
+ async UpdateMJIntegrationObject(
43050
+ @Arg('input', () => UpdateMJIntegrationObjectInput) input: UpdateMJIntegrationObjectInput,
43051
+ @Ctx() { providers, userPayload }: AppContext,
43052
+ @PubSub() pubSub: PubSubEngine
43053
+ ) {
43054
+ const provider = GetReadWriteProvider(providers);
43055
+ return this.UpdateRecord('MJ: Integration Objects', input, provider, userPayload, pubSub);
43056
+ }
43057
+
43058
+ @Mutation(() => MJIntegrationObject_)
43059
+ async DeleteMJIntegrationObject(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
43060
+ const provider = GetReadWriteProvider(providers);
43061
+ const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
43062
+ return this.DeleteRecord('MJ: Integration Objects', key, options, provider, userPayload, pubSub);
43063
+ }
43064
+
43065
+ }
43066
+
42335
43067
  //****************************************************************************
42336
43068
  // ENTITY CLASS for MJ: Integration Source Types
42337
43069
  //****************************************************************************
@@ -42763,6 +43495,9 @@ export class MJIntegration_ {
42763
43495
  @Field(() => [MJRecordChange_])
42764
43496
  MJRecordChanges_IntegrationIDArray: MJRecordChange_[]; // Link to MJRecordChanges
42765
43497
 
43498
+ @Field(() => [MJIntegrationObject_])
43499
+ MJIntegrationObjects_IntegrationIDArray: MJIntegrationObject_[]; // Link to MJIntegrationObjects
43500
+
42766
43501
  }
42767
43502
 
42768
43503
  //****************************************************************************
@@ -42932,6 +43667,16 @@ export class MJIntegrationResolver extends ResolverBase {
42932
43667
  return result;
42933
43668
  }
42934
43669
 
43670
+ @FieldResolver(() => [MJIntegrationObject_])
43671
+ async MJIntegrationObjects_IntegrationIDArray(@Root() mjintegration_: MJIntegration_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
43672
+ this.CheckUserReadPermissions('MJ: Integration Objects', userPayload);
43673
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
43674
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwIntegrationObjects')} WHERE ${provider.QuoteIdentifier('IntegrationID')}='${mjintegration_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Integration Objects', userPayload, EntityPermissionType.Read, 'AND');
43675
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
43676
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Integration Objects', rows, this.GetUserFromPayload(userPayload));
43677
+ return result;
43678
+ }
43679
+
42935
43680
  @Mutation(() => MJIntegration_)
42936
43681
  async CreateMJIntegration(
42937
43682
  @Arg('input', () => CreateMJIntegrationInput) input: CreateMJIntegrationInput,