@memberjunction/server 2.29.1 → 2.30.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.
- package/dist/generated/generated.d.ts +112 -0
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +707 -0
- package/dist/generated/generated.js.map +1 -1
- package/dist/resolvers/QueryResolver.d.ts +2 -2
- package/dist/resolvers/QueryResolver.d.ts.map +1 -1
- package/dist/resolvers/QueryResolver.js +18 -6
- package/dist/resolvers/QueryResolver.js.map +1 -1
- package/package.json +22 -22
- package/src/generated/generated.ts +446 -1
- package/src/resolvers/QueryResolver.ts +24 -4
|
@@ -9,7 +9,7 @@ export declare class RunQueryResultType {
|
|
|
9
9
|
ErrorMessage: string;
|
|
10
10
|
}
|
|
11
11
|
export declare class ReportResolver {
|
|
12
|
-
GetQueryData(QueryID: string,
|
|
13
|
-
GetQueryDataByName(QueryName: string,
|
|
12
|
+
GetQueryData(QueryID: string, context: AppContext, CategoryID?: string, CategoryName?: string): Promise<RunQueryResultType>;
|
|
13
|
+
GetQueryDataByName(QueryName: string, context: AppContext, CategoryID?: string, CategoryName?: string): Promise<RunQueryResultType>;
|
|
14
14
|
}
|
|
15
15
|
//# sourceMappingURL=QueryResolver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryResolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/QueryResolver.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,qBACa,kBAAkB;IAE7B,OAAO,EAAE,MAAM,CAAC;IAGhB,SAAS,EAAE,MAAM,CAAC;IAGlB,OAAO,EAAE,OAAO,CAAC;IAGjB,OAAO,EAAE,MAAM,CAAC;IAGhB,QAAQ,EAAE,MAAM,CAAC;IAGjB,aAAa,EAAE,MAAM,CAAC;IAGtB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,qBACa,cAAc;IAEnB,YAAY,CAA+B,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"QueryResolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/QueryResolver.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,qBACa,kBAAkB;IAE7B,OAAO,EAAE,MAAM,CAAC;IAGhB,SAAS,EAAE,MAAM,CAAC;IAGlB,OAAO,EAAE,OAAO,CAAC;IAGjB,OAAO,EAAE,MAAM,CAAC;IAGhB,QAAQ,EAAE,MAAM,CAAC;IAGjB,aAAa,EAAE,MAAM,CAAC;IAGtB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,qBACa,cAAc;IAEnB,YAAY,CAA+B,OAAO,EAAE,MAAM,EACtC,OAAO,EAAE,UAAU,EACyB,UAAU,CAAC,EAAE,MAAM,EACjB,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAsBrH,kBAAkB,CAAiC,SAAS,EAAE,MAAM,EAC1C,OAAO,EAAE,UAAU,EACyB,UAAU,CAAC,EAAE,MAAM,EACjB,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAoBlI"}
|
|
@@ -54,9 +54,13 @@ RunQueryResultType = __decorate([
|
|
|
54
54
|
], RunQueryResultType);
|
|
55
55
|
export { RunQueryResultType };
|
|
56
56
|
let ReportResolver = class ReportResolver {
|
|
57
|
-
async GetQueryData(QueryID,
|
|
57
|
+
async GetQueryData(QueryID, context, CategoryID, CategoryName) {
|
|
58
58
|
const runQuery = new RunQuery();
|
|
59
|
-
const result = await runQuery.RunQuery({
|
|
59
|
+
const result = await runQuery.RunQuery({
|
|
60
|
+
QueryID: QueryID,
|
|
61
|
+
CategoryID: CategoryID,
|
|
62
|
+
CategoryName: CategoryName
|
|
63
|
+
}, context.userPayload.userRecord);
|
|
60
64
|
return {
|
|
61
65
|
QueryID: QueryID,
|
|
62
66
|
QueryName: result.QueryName,
|
|
@@ -67,9 +71,13 @@ let ReportResolver = class ReportResolver {
|
|
|
67
71
|
ErrorMessage: result.ErrorMessage,
|
|
68
72
|
};
|
|
69
73
|
}
|
|
70
|
-
async GetQueryDataByName(QueryName,
|
|
74
|
+
async GetQueryDataByName(QueryName, context, CategoryID, CategoryName) {
|
|
71
75
|
const runQuery = new RunQuery();
|
|
72
|
-
const result = await runQuery.RunQuery({
|
|
76
|
+
const result = await runQuery.RunQuery({
|
|
77
|
+
QueryName: QueryName,
|
|
78
|
+
CategoryID: CategoryID,
|
|
79
|
+
CategoryName: CategoryName
|
|
80
|
+
}, context.userPayload.userRecord);
|
|
73
81
|
return {
|
|
74
82
|
QueryID: result.QueryID,
|
|
75
83
|
QueryName: QueryName,
|
|
@@ -85,16 +93,20 @@ __decorate([
|
|
|
85
93
|
Query(() => RunQueryResultType),
|
|
86
94
|
__param(0, Arg('QueryID', () => String)),
|
|
87
95
|
__param(1, Ctx()),
|
|
96
|
+
__param(2, Arg('CategoryID', () => String, { nullable: true })),
|
|
97
|
+
__param(3, Arg('CategoryName', () => String, { nullable: true })),
|
|
88
98
|
__metadata("design:type", Function),
|
|
89
|
-
__metadata("design:paramtypes", [String, Object]),
|
|
99
|
+
__metadata("design:paramtypes", [String, Object, String, String]),
|
|
90
100
|
__metadata("design:returntype", Promise)
|
|
91
101
|
], ReportResolver.prototype, "GetQueryData", null);
|
|
92
102
|
__decorate([
|
|
93
103
|
Query(() => RunQueryResultType),
|
|
94
104
|
__param(0, Arg('QueryName', () => String)),
|
|
95
105
|
__param(1, Ctx()),
|
|
106
|
+
__param(2, Arg('CategoryID', () => String, { nullable: true })),
|
|
107
|
+
__param(3, Arg('CategoryName', () => String, { nullable: true })),
|
|
96
108
|
__metadata("design:type", Function),
|
|
97
|
-
__metadata("design:paramtypes", [String, Object]),
|
|
109
|
+
__metadata("design:paramtypes", [String, Object, String, String]),
|
|
98
110
|
__metadata("design:returntype", Promise)
|
|
99
111
|
], ReportResolver.prototype, "GetQueryDataByName", null);
|
|
100
112
|
ReportResolver = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryResolver.js","sourceRoot":"","sources":["../../src/resolvers/QueryResolver.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAO,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAI1E,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAE7B,OAAO,CAAS;IAGhB,SAAS,CAAS;IAGlB,OAAO,CAAU;IAGjB,OAAO,CAAS;IAGhB,QAAQ,CAAS;IAGjB,aAAa,CAAS;IAGtB,YAAY,CAAS;CACtB,CAAA;AAnBC;IADC,KAAK,EAAE;;mDACQ;AAGhB;IADC,KAAK,EAAE;;qDACU;AAGlB;IADC,KAAK,EAAE;;mDACS;AAGjB;IADC,KAAK,EAAE;;mDACQ;AAGhB;IADC,KAAK,EAAE;;oDACS;AAGjB;IADC,KAAK,EAAE;;yDACc;AAGtB;IADC,KAAK,EAAE;;wDACa;AApBV,kBAAkB;IAD9B,UAAU,EAAE;GACA,kBAAkB,CAqB9B;;AAGM,IAAM,cAAc,GAApB,MAAM,cAAc;IAEnB,AAAN,KAAK,CAAC,YAAY,CAA+B,OAAe,
|
|
1
|
+
{"version":3,"file":"QueryResolver.js","sourceRoot":"","sources":["../../src/resolvers/QueryResolver.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.30.0",
|
|
4
4
|
"description": "MemberJunction: This project provides API access via GraphQL to the common data store.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -22,27 +22,27 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@apollo/server": "^4.9.1",
|
|
24
24
|
"@graphql-tools/utils": "^10.0.1",
|
|
25
|
-
"@memberjunction/actions": "2.
|
|
26
|
-
"@memberjunction/ai": "2.
|
|
27
|
-
"@memberjunction/ai-mistral": "2.
|
|
28
|
-
"@memberjunction/ai-openai": "2.
|
|
29
|
-
"@memberjunction/ai-vectors-pinecone": "2.
|
|
30
|
-
"@memberjunction/aiengine": "2.
|
|
31
|
-
"@memberjunction/core": "2.
|
|
32
|
-
"@memberjunction/core-actions": "2.
|
|
33
|
-
"@memberjunction/core-entities": "2.
|
|
34
|
-
"@memberjunction/data-context": "2.
|
|
35
|
-
"@memberjunction/data-context-server": "2.
|
|
36
|
-
"@memberjunction/doc-utils": "2.
|
|
37
|
-
"@memberjunction/entity-communications-server": "2.
|
|
38
|
-
"@memberjunction/external-change-detection": "2.
|
|
39
|
-
"@memberjunction/global": "2.
|
|
40
|
-
"@memberjunction/graphql-dataprovider": "2.
|
|
41
|
-
"@memberjunction/queue": "2.
|
|
42
|
-
"@memberjunction/skip-types": "2.
|
|
43
|
-
"@memberjunction/sqlserver-dataprovider": "2.
|
|
44
|
-
"@memberjunction/storage": "2.
|
|
45
|
-
"@memberjunction/templates": "2.
|
|
25
|
+
"@memberjunction/actions": "2.30.0",
|
|
26
|
+
"@memberjunction/ai": "2.30.0",
|
|
27
|
+
"@memberjunction/ai-mistral": "2.30.0",
|
|
28
|
+
"@memberjunction/ai-openai": "2.30.0",
|
|
29
|
+
"@memberjunction/ai-vectors-pinecone": "2.30.0",
|
|
30
|
+
"@memberjunction/aiengine": "2.30.0",
|
|
31
|
+
"@memberjunction/core": "2.30.0",
|
|
32
|
+
"@memberjunction/core-actions": "2.30.0",
|
|
33
|
+
"@memberjunction/core-entities": "2.30.0",
|
|
34
|
+
"@memberjunction/data-context": "2.30.0",
|
|
35
|
+
"@memberjunction/data-context-server": "2.30.0",
|
|
36
|
+
"@memberjunction/doc-utils": "2.30.0",
|
|
37
|
+
"@memberjunction/entity-communications-server": "2.30.0",
|
|
38
|
+
"@memberjunction/external-change-detection": "2.30.0",
|
|
39
|
+
"@memberjunction/global": "2.30.0",
|
|
40
|
+
"@memberjunction/graphql-dataprovider": "2.30.0",
|
|
41
|
+
"@memberjunction/queue": "2.30.0",
|
|
42
|
+
"@memberjunction/skip-types": "2.30.0",
|
|
43
|
+
"@memberjunction/sqlserver-dataprovider": "2.30.0",
|
|
44
|
+
"@memberjunction/storage": "2.30.0",
|
|
45
|
+
"@memberjunction/templates": "2.30.0",
|
|
46
46
|
"@types/cors": "^2.8.13",
|
|
47
47
|
"@types/jsonwebtoken": "9.0.6",
|
|
48
48
|
"@types/node": "20.14.2",
|
|
@@ -19,7 +19,7 @@ import { mj_core_schema } from '../config.js';
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
import { ScheduledActionEntity, ScheduledActionParamEntity, ExplorerNavigationItemEntity, AIAgentModelEntity, AIAgentNoteTypeEntity, AIAgentEntity, AIAgentNoteEntity, AIAgentActionEntity, AIPromptEntity, AIResultCacheEntity, AIPromptCategoryEntity, AIPromptTypeEntity, CompanyEntity, EmployeeEntity, UserFavoriteEntity, EmployeeCompanyIntegrationEntity, EmployeeRoleEntity, EmployeeSkillEntity, RoleEntity, SkillEntity, IntegrationURLFormatEntity, IntegrationEntity, CompanyIntegrationEntity, EntityFieldEntity, EntityEntity, UserEntity, EntityRelationshipEntity, UserRecordLogEntity, UserViewEntity, CompanyIntegrationRunEntity, CompanyIntegrationRunDetailEntity, ErrorLogEntity, ApplicationEntity, ApplicationEntityEntity, EntityPermissionEntity, UserApplicationEntityEntity, UserApplicationEntity, CompanyIntegrationRunAPILogEntity, ListEntity, ListDetailEntity, UserViewRunEntity, UserViewRunDetailEntity, WorkflowRunEntity, WorkflowEntity, WorkflowEngineEntity, RecordChangeEntity, UserRoleEntity, RowLevelSecurityFilterEntity, AuditLogEntity, AuthorizationEntity, AuthorizationRoleEntity, AuditLogTypeEntity, EntityFieldValueEntity, AIModelEntity, AIActionEntity, AIModelActionEntity, EntityAIActionEntity, AIModelTypeEntity, QueueTypeEntity, QueueEntity, QueueTaskEntity, DashboardEntity, OutputTriggerTypeEntity, OutputFormatTypeEntity, OutputDeliveryTypeEntity, ReportEntity, ReportSnapshotEntity, ResourceTypeEntity, TagEntity, TaggedItemEntity, WorkspaceEntity, WorkspaceItemEntity, DatasetEntity, DatasetItemEntity, ConversationDetailEntity, ConversationEntity, UserNotificationEntity, SchemaInfoEntity, CompanyIntegrationRecordMapEntity, RecordMergeLogEntity, RecordMergeDeletionLogEntity, QueryFieldEntity, QueryCategoryEntity, QueryEntity, QueryPermissionEntity, VectorIndexEntity, EntityDocumentTypeEntity, EntityDocumentRunEntity, VectorDatabaseEntity, EntityRecordDocumentEntity, EntityDocumentEntity, DataContextItemEntity, DataContextEntity, UserViewCategoryEntity, DashboardCategoryEntity, ReportCategoryEntity, FileStorageProviderEntity, FileEntity, FileCategoryEntity, FileEntityRecordLinkEntity, VersionInstallationEntity, DuplicateRunDetailMatchEntity, EntityDocumentSettingEntity, EntitySettingEntity, DuplicateRunEntity, DuplicateRunDetailEntity, ApplicationSettingEntity, ActionCategoryEntity, EntityActionEntity, EntityActionInvocationEntity, ActionAuthorizationEntity, EntityActionInvocationTypeEntity, ActionEntity, EntityActionFilterEntity, ActionFilterEntity, ActionContextTypeEntity, ActionResultCodeEntity, ActionContextEntity, ActionExecutionLogEntity, ActionParamEntity, ActionLibraryEntity, LibraryEntity, ListCategoryEntity, CommunicationProviderEntity, CommunicationRunEntity, CommunicationProviderMessageTypeEntity, CommunicationLogEntity, CommunicationBaseMessageTypeEntity, TemplateEntity, TemplateCategoryEntity, TemplateContentEntity, TemplateParamEntity, TemplateContentTypeEntity, RecommendationEntity, RecommendationProviderEntity, RecommendationRunEntity, RecommendationItemEntity, EntityCommunicationMessageTypeEntity, EntityCommunicationFieldEntity, RecordChangeReplayRunEntity, LibraryItemEntity, EntityRelationshipDisplayComponentEntity, EntityActionParamEntity, ResourcePermissionEntity, ResourceLinkEntity, AIAgentRequestEntity, QueryEntityEntity, ContentProcessRunEntity, ContentSourceEntity, ContentSourceParamEntity, ContentSourceTypeEntity, ContentSourceTypeParamEntity, ContentTypeEntity, ContentTypeAttributeEntity, ContentFileTypeEntity, ContentItemEntity, ContentItemAttributeEntity, ContentItemTagEntity, AIAgentLearningCycleEntity } from '@memberjunction/core-entities';
|
|
22
|
+
import { ScheduledActionEntity, ScheduledActionParamEntity, ExplorerNavigationItemEntity, GeneratedCodeCategoryEntity, AIAgentModelEntity, AIAgentNoteTypeEntity, AIAgentEntity, AIAgentNoteEntity, AIAgentActionEntity, AIPromptEntity, AIResultCacheEntity, AIPromptCategoryEntity, AIPromptTypeEntity, CompanyEntity, EmployeeEntity, UserFavoriteEntity, EmployeeCompanyIntegrationEntity, EmployeeRoleEntity, EmployeeSkillEntity, RoleEntity, SkillEntity, IntegrationURLFormatEntity, IntegrationEntity, CompanyIntegrationEntity, EntityFieldEntity, EntityEntity, UserEntity, EntityRelationshipEntity, UserRecordLogEntity, UserViewEntity, CompanyIntegrationRunEntity, CompanyIntegrationRunDetailEntity, ErrorLogEntity, ApplicationEntity, ApplicationEntityEntity, EntityPermissionEntity, UserApplicationEntityEntity, UserApplicationEntity, CompanyIntegrationRunAPILogEntity, ListEntity, ListDetailEntity, UserViewRunEntity, UserViewRunDetailEntity, WorkflowRunEntity, WorkflowEntity, WorkflowEngineEntity, RecordChangeEntity, UserRoleEntity, RowLevelSecurityFilterEntity, AuditLogEntity, AuthorizationEntity, AuthorizationRoleEntity, AuditLogTypeEntity, EntityFieldValueEntity, AIModelEntity, AIActionEntity, AIModelActionEntity, EntityAIActionEntity, AIModelTypeEntity, QueueTypeEntity, QueueEntity, QueueTaskEntity, DashboardEntity, OutputTriggerTypeEntity, OutputFormatTypeEntity, OutputDeliveryTypeEntity, ReportEntity, ReportSnapshotEntity, ResourceTypeEntity, TagEntity, TaggedItemEntity, WorkspaceEntity, WorkspaceItemEntity, DatasetEntity, DatasetItemEntity, ConversationDetailEntity, ConversationEntity, UserNotificationEntity, SchemaInfoEntity, CompanyIntegrationRecordMapEntity, RecordMergeLogEntity, RecordMergeDeletionLogEntity, QueryFieldEntity, QueryCategoryEntity, QueryEntity, QueryPermissionEntity, VectorIndexEntity, EntityDocumentTypeEntity, EntityDocumentRunEntity, VectorDatabaseEntity, EntityRecordDocumentEntity, EntityDocumentEntity, DataContextItemEntity, DataContextEntity, UserViewCategoryEntity, DashboardCategoryEntity, ReportCategoryEntity, FileStorageProviderEntity, FileEntity, FileCategoryEntity, FileEntityRecordLinkEntity, VersionInstallationEntity, DuplicateRunDetailMatchEntity, EntityDocumentSettingEntity, EntitySettingEntity, DuplicateRunEntity, DuplicateRunDetailEntity, ApplicationSettingEntity, ActionCategoryEntity, EntityActionEntity, EntityActionInvocationEntity, ActionAuthorizationEntity, EntityActionInvocationTypeEntity, ActionEntity, EntityActionFilterEntity, ActionFilterEntity, ActionContextTypeEntity, ActionResultCodeEntity, ActionContextEntity, ActionExecutionLogEntity, ActionParamEntity, ActionLibraryEntity, LibraryEntity, ListCategoryEntity, CommunicationProviderEntity, CommunicationRunEntity, CommunicationProviderMessageTypeEntity, CommunicationLogEntity, CommunicationBaseMessageTypeEntity, TemplateEntity, TemplateCategoryEntity, TemplateContentEntity, TemplateParamEntity, TemplateContentTypeEntity, RecommendationEntity, RecommendationProviderEntity, RecommendationRunEntity, RecommendationItemEntity, EntityCommunicationMessageTypeEntity, EntityCommunicationFieldEntity, RecordChangeReplayRunEntity, LibraryItemEntity, EntityRelationshipDisplayComponentEntity, EntityActionParamEntity, ResourcePermissionEntity, ResourceLinkEntity, AIAgentRequestEntity, QueryEntityEntity, ContentProcessRunEntity, ContentSourceEntity, ContentSourceParamEntity, ContentSourceTypeEntity, ContentSourceTypeParamEntity, ContentTypeEntity, ContentTypeAttributeEntity, ContentFileTypeEntity, ContentItemEntity, ContentItemAttributeEntity, ContentItemTagEntity, GeneratedCodeEntity, AIAgentLearningCycleEntity } from '@memberjunction/core-entities';
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
//****************************************************************************
|
|
@@ -678,6 +678,186 @@ export class ExplorerNavigationItemResolver extends ResolverBase {
|
|
|
678
678
|
|
|
679
679
|
}
|
|
680
680
|
|
|
681
|
+
//****************************************************************************
|
|
682
|
+
// ENTITY CLASS for Generated Code Categories
|
|
683
|
+
//****************************************************************************
|
|
684
|
+
@ObjectType()
|
|
685
|
+
export class GeneratedCodeCategory_ {
|
|
686
|
+
@Field()
|
|
687
|
+
@MaxLength(16)
|
|
688
|
+
ID: string;
|
|
689
|
+
|
|
690
|
+
@Field()
|
|
691
|
+
@MaxLength(510)
|
|
692
|
+
Name: string;
|
|
693
|
+
|
|
694
|
+
@Field({nullable: true})
|
|
695
|
+
Description?: string;
|
|
696
|
+
|
|
697
|
+
@Field({nullable: true, description: `Parent category ID, allowing for hierarchical categorization.`})
|
|
698
|
+
@MaxLength(16)
|
|
699
|
+
ParentID?: string;
|
|
700
|
+
|
|
701
|
+
@Field()
|
|
702
|
+
@MaxLength(10)
|
|
703
|
+
_mj__CreatedAt: Date;
|
|
704
|
+
|
|
705
|
+
@Field()
|
|
706
|
+
@MaxLength(10)
|
|
707
|
+
_mj__UpdatedAt: Date;
|
|
708
|
+
|
|
709
|
+
@Field({nullable: true})
|
|
710
|
+
@MaxLength(510)
|
|
711
|
+
Parent?: string;
|
|
712
|
+
|
|
713
|
+
@Field(() => [GeneratedCodeCategory_])
|
|
714
|
+
GeneratedCodeCategories_ParentIDArray: GeneratedCodeCategory_[]; // Link to GeneratedCodeCategories
|
|
715
|
+
|
|
716
|
+
@Field(() => [GeneratedCode_])
|
|
717
|
+
GeneratedCodes_CategoryIDArray: GeneratedCode_[]; // Link to GeneratedCodes
|
|
718
|
+
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
//****************************************************************************
|
|
722
|
+
// INPUT TYPE for Generated Code Categories
|
|
723
|
+
//****************************************************************************
|
|
724
|
+
@InputType()
|
|
725
|
+
export class CreateGeneratedCodeCategoryInput {
|
|
726
|
+
@Field({ nullable: true })
|
|
727
|
+
Name?: string;
|
|
728
|
+
|
|
729
|
+
@Field({ nullable: true })
|
|
730
|
+
Description: string | null;
|
|
731
|
+
|
|
732
|
+
@Field({ nullable: true })
|
|
733
|
+
ParentID: string | null;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
|
|
737
|
+
//****************************************************************************
|
|
738
|
+
// INPUT TYPE for Generated Code Categories
|
|
739
|
+
//****************************************************************************
|
|
740
|
+
@InputType()
|
|
741
|
+
export class UpdateGeneratedCodeCategoryInput {
|
|
742
|
+
@Field()
|
|
743
|
+
ID: string;
|
|
744
|
+
|
|
745
|
+
@Field({ nullable: true })
|
|
746
|
+
Name?: string;
|
|
747
|
+
|
|
748
|
+
@Field({ nullable: true })
|
|
749
|
+
Description?: string | null;
|
|
750
|
+
|
|
751
|
+
@Field({ nullable: true })
|
|
752
|
+
ParentID?: string | null;
|
|
753
|
+
|
|
754
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
755
|
+
OldValues___?: KeyValuePairInput[];
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
//****************************************************************************
|
|
759
|
+
// RESOLVER for Generated Code Categories
|
|
760
|
+
//****************************************************************************
|
|
761
|
+
@ObjectType()
|
|
762
|
+
export class RunGeneratedCodeCategoryViewResult {
|
|
763
|
+
@Field(() => [GeneratedCodeCategory_])
|
|
764
|
+
Results: GeneratedCodeCategory_[];
|
|
765
|
+
|
|
766
|
+
@Field(() => String, {nullable: true})
|
|
767
|
+
UserViewRunID?: string;
|
|
768
|
+
|
|
769
|
+
@Field(() => Int, {nullable: true})
|
|
770
|
+
RowCount: number;
|
|
771
|
+
|
|
772
|
+
@Field(() => Int, {nullable: true})
|
|
773
|
+
TotalRowCount: number;
|
|
774
|
+
|
|
775
|
+
@Field(() => Int, {nullable: true})
|
|
776
|
+
ExecutionTime: number;
|
|
777
|
+
|
|
778
|
+
@Field({nullable: true})
|
|
779
|
+
ErrorMessage?: string;
|
|
780
|
+
|
|
781
|
+
@Field(() => Boolean, {nullable: false})
|
|
782
|
+
Success: boolean;
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
@Resolver(GeneratedCodeCategory_)
|
|
786
|
+
export class GeneratedCodeCategoryResolver extends ResolverBase {
|
|
787
|
+
@Query(() => RunGeneratedCodeCategoryViewResult)
|
|
788
|
+
async RunGeneratedCodeCategoryViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
789
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
790
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
@Query(() => RunGeneratedCodeCategoryViewResult)
|
|
794
|
+
async RunGeneratedCodeCategoryViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
795
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
796
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
@Query(() => RunGeneratedCodeCategoryViewResult)
|
|
800
|
+
async RunGeneratedCodeCategoryDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
801
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
802
|
+
input.EntityName = 'Generated Code Categories';
|
|
803
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
804
|
+
}
|
|
805
|
+
@Query(() => GeneratedCodeCategory_, { nullable: true })
|
|
806
|
+
async GeneratedCodeCategory(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<GeneratedCodeCategory_ | null> {
|
|
807
|
+
this.CheckUserReadPermissions('Generated Code Categories', userPayload);
|
|
808
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
809
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwGeneratedCodeCategories] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('Generated Code Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
810
|
+
const result = this.MapFieldNamesToCodeNames('Generated Code Categories', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
811
|
+
return result;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
@FieldResolver(() => [GeneratedCodeCategory_])
|
|
815
|
+
async GeneratedCodeCategories_ParentIDArray(@Root() generatedcodecategory_: GeneratedCodeCategory_, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
816
|
+
this.CheckUserReadPermissions('Generated Code Categories', userPayload);
|
|
817
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
818
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwGeneratedCodeCategories] WHERE [ParentID]='${generatedcodecategory_.ID}' ` + this.getRowLevelSecurityWhereClause('Generated Code Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
819
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Generated Code Categories', await dataSource.query(sSQL));
|
|
820
|
+
return result;
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
@FieldResolver(() => [GeneratedCode_])
|
|
824
|
+
async GeneratedCodes_CategoryIDArray(@Root() generatedcodecategory_: GeneratedCodeCategory_, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
825
|
+
this.CheckUserReadPermissions('Generated Codes', userPayload);
|
|
826
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
827
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwGeneratedCodes] WHERE [CategoryID]='${generatedcodecategory_.ID}' ` + this.getRowLevelSecurityWhereClause('Generated Codes', userPayload, EntityPermissionType.Read, 'AND');
|
|
828
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Generated Codes', await dataSource.query(sSQL));
|
|
829
|
+
return result;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
@Mutation(() => GeneratedCodeCategory_)
|
|
833
|
+
async CreateGeneratedCodeCategory(
|
|
834
|
+
@Arg('input', () => CreateGeneratedCodeCategoryInput) input: CreateGeneratedCodeCategoryInput,
|
|
835
|
+
@Ctx() { dataSources, userPayload }: AppContext,
|
|
836
|
+
@PubSub() pubSub: PubSubEngine
|
|
837
|
+
) {
|
|
838
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
839
|
+
return this.CreateRecord('Generated Code Categories', input, dataSource, userPayload, pubSub)
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
@Mutation(() => GeneratedCodeCategory_)
|
|
843
|
+
async UpdateGeneratedCodeCategory(
|
|
844
|
+
@Arg('input', () => UpdateGeneratedCodeCategoryInput) input: UpdateGeneratedCodeCategoryInput,
|
|
845
|
+
@Ctx() { dataSources, userPayload }: AppContext,
|
|
846
|
+
@PubSub() pubSub: PubSubEngine
|
|
847
|
+
) {
|
|
848
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
849
|
+
return this.UpdateRecord('Generated Code Categories', input, dataSource, userPayload, pubSub);
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
@Mutation(() => GeneratedCodeCategory_)
|
|
853
|
+
async DeleteGeneratedCodeCategory(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
854
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
855
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
856
|
+
return this.DeleteRecord('Generated Code Categories', key, options, dataSource, userPayload, pubSub);
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
}
|
|
860
|
+
|
|
681
861
|
//****************************************************************************
|
|
682
862
|
// ENTITY CLASS for AI Agent Models
|
|
683
863
|
//****************************************************************************
|
|
@@ -5221,6 +5401,9 @@ export class Entity_ {
|
|
|
5221
5401
|
@Field(() => [QueryEntity_])
|
|
5222
5402
|
QueryEntities_EntityIDArray: QueryEntity_[]; // Link to QueryEntities
|
|
5223
5403
|
|
|
5404
|
+
@Field(() => [GeneratedCode_])
|
|
5405
|
+
GeneratedCodes_LinkedEntityIDArray: GeneratedCode_[]; // Link to GeneratedCodes
|
|
5406
|
+
|
|
5224
5407
|
}
|
|
5225
5408
|
|
|
5226
5409
|
//****************************************************************************
|
|
@@ -5913,6 +6096,15 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
5913
6096
|
return result;
|
|
5914
6097
|
}
|
|
5915
6098
|
|
|
6099
|
+
@FieldResolver(() => [GeneratedCode_])
|
|
6100
|
+
async GeneratedCodes_LinkedEntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6101
|
+
this.CheckUserReadPermissions('Generated Codes', userPayload);
|
|
6102
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
6103
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwGeneratedCodes] WHERE [LinkedEntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause('Generated Codes', userPayload, EntityPermissionType.Read, 'AND');
|
|
6104
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Generated Codes', await dataSource.query(sSQL));
|
|
6105
|
+
return result;
|
|
6106
|
+
}
|
|
6107
|
+
|
|
5916
6108
|
@Mutation(() => Entity_)
|
|
5917
6109
|
async CreateEntity(
|
|
5918
6110
|
@Arg('input', () => CreateEntityInput) input: CreateEntityInput,
|
|
@@ -11884,6 +12076,9 @@ export class AIModel_ {
|
|
|
11884
12076
|
@Field(() => [AIAgentModel_])
|
|
11885
12077
|
AIAgentModels_ModelIDArray: AIAgentModel_[]; // Link to AIAgentModels
|
|
11886
12078
|
|
|
12079
|
+
@Field(() => [GeneratedCode_])
|
|
12080
|
+
GeneratedCodes_GeneratedByModelIDArray: GeneratedCode_[]; // Link to GeneratedCodes
|
|
12081
|
+
|
|
11887
12082
|
}
|
|
11888
12083
|
|
|
11889
12084
|
//****************************************************************************
|
|
@@ -12126,6 +12321,15 @@ export class AIModelResolver extends ResolverBase {
|
|
|
12126
12321
|
return result;
|
|
12127
12322
|
}
|
|
12128
12323
|
|
|
12324
|
+
@FieldResolver(() => [GeneratedCode_])
|
|
12325
|
+
async GeneratedCodes_GeneratedByModelIDArray(@Root() aimodel_: AIModel_, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12326
|
+
this.CheckUserReadPermissions('Generated Codes', userPayload);
|
|
12327
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
12328
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwGeneratedCodes] WHERE [GeneratedByModelID]='${aimodel_.ID}' ` + this.getRowLevelSecurityWhereClause('Generated Codes', userPayload, EntityPermissionType.Read, 'AND');
|
|
12329
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Generated Codes', await dataSource.query(sSQL));
|
|
12330
|
+
return result;
|
|
12331
|
+
}
|
|
12332
|
+
|
|
12129
12333
|
@Mutation(() => AIModel_)
|
|
12130
12334
|
async CreateAIModel(
|
|
12131
12335
|
@Arg('input', () => CreateAIModelInput) input: CreateAIModelInput,
|
|
@@ -31481,6 +31685,247 @@ export class ContentItemTagResolver extends ResolverBase {
|
|
|
31481
31685
|
|
|
31482
31686
|
}
|
|
31483
31687
|
|
|
31688
|
+
//****************************************************************************
|
|
31689
|
+
// ENTITY CLASS for Generated Codes
|
|
31690
|
+
//****************************************************************************
|
|
31691
|
+
@ObjectType()
|
|
31692
|
+
export class GeneratedCode_ {
|
|
31693
|
+
@Field()
|
|
31694
|
+
@MaxLength(16)
|
|
31695
|
+
ID: string;
|
|
31696
|
+
|
|
31697
|
+
@Field({description: `When the code was generated.`})
|
|
31698
|
+
@MaxLength(10)
|
|
31699
|
+
GeneratedAt: Date;
|
|
31700
|
+
|
|
31701
|
+
@Field({description: `Reference to the category of generated code.`})
|
|
31702
|
+
@MaxLength(16)
|
|
31703
|
+
CategoryID: string;
|
|
31704
|
+
|
|
31705
|
+
@Field({description: `AI model responsible for generating this code.`})
|
|
31706
|
+
@MaxLength(16)
|
|
31707
|
+
GeneratedByModelID: string;
|
|
31708
|
+
|
|
31709
|
+
@Field({description: `Descriptive name of the generated code.`})
|
|
31710
|
+
@MaxLength(510)
|
|
31711
|
+
Name: string;
|
|
31712
|
+
|
|
31713
|
+
@Field({nullable: true, description: `Optional description of the generated code.`})
|
|
31714
|
+
Description?: string;
|
|
31715
|
+
|
|
31716
|
+
@Field({description: `The actual generated code.`})
|
|
31717
|
+
Code: string;
|
|
31718
|
+
|
|
31719
|
+
@Field({description: `Source material used to generate the code, e.g., a SQL CHECK constraint.`})
|
|
31720
|
+
Source: string;
|
|
31721
|
+
|
|
31722
|
+
@Field({nullable: true})
|
|
31723
|
+
@MaxLength(16)
|
|
31724
|
+
LinkedEntityID?: string;
|
|
31725
|
+
|
|
31726
|
+
@Field({nullable: true})
|
|
31727
|
+
LinkedRecordPrimaryKey?: string;
|
|
31728
|
+
|
|
31729
|
+
@Field({description: `Status of the generated code, e.g., Pending, Approved, or Rejected.`})
|
|
31730
|
+
@MaxLength(40)
|
|
31731
|
+
Status: string;
|
|
31732
|
+
|
|
31733
|
+
@Field({description: `Programming language of the generated code (TypeScript, SQL, HTML, CSS, JavaScript, Python, or Other).`})
|
|
31734
|
+
@MaxLength(100)
|
|
31735
|
+
Language: string;
|
|
31736
|
+
|
|
31737
|
+
@Field()
|
|
31738
|
+
@MaxLength(10)
|
|
31739
|
+
_mj__CreatedAt: Date;
|
|
31740
|
+
|
|
31741
|
+
@Field()
|
|
31742
|
+
@MaxLength(10)
|
|
31743
|
+
_mj__UpdatedAt: Date;
|
|
31744
|
+
|
|
31745
|
+
@Field()
|
|
31746
|
+
@MaxLength(510)
|
|
31747
|
+
Category: string;
|
|
31748
|
+
|
|
31749
|
+
@Field()
|
|
31750
|
+
@MaxLength(100)
|
|
31751
|
+
GeneratedByModel: string;
|
|
31752
|
+
|
|
31753
|
+
@Field({nullable: true})
|
|
31754
|
+
@MaxLength(510)
|
|
31755
|
+
LinkedEntity?: string;
|
|
31756
|
+
|
|
31757
|
+
}
|
|
31758
|
+
|
|
31759
|
+
//****************************************************************************
|
|
31760
|
+
// INPUT TYPE for Generated Codes
|
|
31761
|
+
//****************************************************************************
|
|
31762
|
+
@InputType()
|
|
31763
|
+
export class CreateGeneratedCodeInput {
|
|
31764
|
+
@Field({ nullable: true })
|
|
31765
|
+
GeneratedAt?: Date;
|
|
31766
|
+
|
|
31767
|
+
@Field({ nullable: true })
|
|
31768
|
+
CategoryID?: string;
|
|
31769
|
+
|
|
31770
|
+
@Field({ nullable: true })
|
|
31771
|
+
GeneratedByModelID?: string;
|
|
31772
|
+
|
|
31773
|
+
@Field({ nullable: true })
|
|
31774
|
+
Name?: string;
|
|
31775
|
+
|
|
31776
|
+
@Field({ nullable: true })
|
|
31777
|
+
Description: string | null;
|
|
31778
|
+
|
|
31779
|
+
@Field({ nullable: true })
|
|
31780
|
+
Code?: string;
|
|
31781
|
+
|
|
31782
|
+
@Field({ nullable: true })
|
|
31783
|
+
Source?: string;
|
|
31784
|
+
|
|
31785
|
+
@Field({ nullable: true })
|
|
31786
|
+
LinkedEntityID: string | null;
|
|
31787
|
+
|
|
31788
|
+
@Field({ nullable: true })
|
|
31789
|
+
LinkedRecordPrimaryKey: string | null;
|
|
31790
|
+
|
|
31791
|
+
@Field({ nullable: true })
|
|
31792
|
+
Status?: string;
|
|
31793
|
+
|
|
31794
|
+
@Field({ nullable: true })
|
|
31795
|
+
Language?: string;
|
|
31796
|
+
}
|
|
31797
|
+
|
|
31798
|
+
|
|
31799
|
+
//****************************************************************************
|
|
31800
|
+
// INPUT TYPE for Generated Codes
|
|
31801
|
+
//****************************************************************************
|
|
31802
|
+
@InputType()
|
|
31803
|
+
export class UpdateGeneratedCodeInput {
|
|
31804
|
+
@Field()
|
|
31805
|
+
ID: string;
|
|
31806
|
+
|
|
31807
|
+
@Field({ nullable: true })
|
|
31808
|
+
GeneratedAt?: Date;
|
|
31809
|
+
|
|
31810
|
+
@Field({ nullable: true })
|
|
31811
|
+
CategoryID?: string;
|
|
31812
|
+
|
|
31813
|
+
@Field({ nullable: true })
|
|
31814
|
+
GeneratedByModelID?: string;
|
|
31815
|
+
|
|
31816
|
+
@Field({ nullable: true })
|
|
31817
|
+
Name?: string;
|
|
31818
|
+
|
|
31819
|
+
@Field({ nullable: true })
|
|
31820
|
+
Description?: string | null;
|
|
31821
|
+
|
|
31822
|
+
@Field({ nullable: true })
|
|
31823
|
+
Code?: string;
|
|
31824
|
+
|
|
31825
|
+
@Field({ nullable: true })
|
|
31826
|
+
Source?: string;
|
|
31827
|
+
|
|
31828
|
+
@Field({ nullable: true })
|
|
31829
|
+
LinkedEntityID?: string | null;
|
|
31830
|
+
|
|
31831
|
+
@Field({ nullable: true })
|
|
31832
|
+
LinkedRecordPrimaryKey?: string | null;
|
|
31833
|
+
|
|
31834
|
+
@Field({ nullable: true })
|
|
31835
|
+
Status?: string;
|
|
31836
|
+
|
|
31837
|
+
@Field({ nullable: true })
|
|
31838
|
+
Language?: string;
|
|
31839
|
+
|
|
31840
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
31841
|
+
OldValues___?: KeyValuePairInput[];
|
|
31842
|
+
}
|
|
31843
|
+
|
|
31844
|
+
//****************************************************************************
|
|
31845
|
+
// RESOLVER for Generated Codes
|
|
31846
|
+
//****************************************************************************
|
|
31847
|
+
@ObjectType()
|
|
31848
|
+
export class RunGeneratedCodeViewResult {
|
|
31849
|
+
@Field(() => [GeneratedCode_])
|
|
31850
|
+
Results: GeneratedCode_[];
|
|
31851
|
+
|
|
31852
|
+
@Field(() => String, {nullable: true})
|
|
31853
|
+
UserViewRunID?: string;
|
|
31854
|
+
|
|
31855
|
+
@Field(() => Int, {nullable: true})
|
|
31856
|
+
RowCount: number;
|
|
31857
|
+
|
|
31858
|
+
@Field(() => Int, {nullable: true})
|
|
31859
|
+
TotalRowCount: number;
|
|
31860
|
+
|
|
31861
|
+
@Field(() => Int, {nullable: true})
|
|
31862
|
+
ExecutionTime: number;
|
|
31863
|
+
|
|
31864
|
+
@Field({nullable: true})
|
|
31865
|
+
ErrorMessage?: string;
|
|
31866
|
+
|
|
31867
|
+
@Field(() => Boolean, {nullable: false})
|
|
31868
|
+
Success: boolean;
|
|
31869
|
+
}
|
|
31870
|
+
|
|
31871
|
+
@Resolver(GeneratedCode_)
|
|
31872
|
+
export class GeneratedCodeResolver extends ResolverBase {
|
|
31873
|
+
@Query(() => RunGeneratedCodeViewResult)
|
|
31874
|
+
async RunGeneratedCodeViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
31875
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
31876
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
31877
|
+
}
|
|
31878
|
+
|
|
31879
|
+
@Query(() => RunGeneratedCodeViewResult)
|
|
31880
|
+
async RunGeneratedCodeViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
31881
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
31882
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
31883
|
+
}
|
|
31884
|
+
|
|
31885
|
+
@Query(() => RunGeneratedCodeViewResult)
|
|
31886
|
+
async RunGeneratedCodeDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
31887
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
31888
|
+
input.EntityName = 'Generated Codes';
|
|
31889
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
31890
|
+
}
|
|
31891
|
+
@Query(() => GeneratedCode_, { nullable: true })
|
|
31892
|
+
async GeneratedCode(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<GeneratedCode_ | null> {
|
|
31893
|
+
this.CheckUserReadPermissions('Generated Codes', userPayload);
|
|
31894
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
31895
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwGeneratedCodes] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('Generated Codes', userPayload, EntityPermissionType.Read, 'AND');
|
|
31896
|
+
const result = this.MapFieldNamesToCodeNames('Generated Codes', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
31897
|
+
return result;
|
|
31898
|
+
}
|
|
31899
|
+
|
|
31900
|
+
@Mutation(() => GeneratedCode_)
|
|
31901
|
+
async CreateGeneratedCode(
|
|
31902
|
+
@Arg('input', () => CreateGeneratedCodeInput) input: CreateGeneratedCodeInput,
|
|
31903
|
+
@Ctx() { dataSources, userPayload }: AppContext,
|
|
31904
|
+
@PubSub() pubSub: PubSubEngine
|
|
31905
|
+
) {
|
|
31906
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
31907
|
+
return this.CreateRecord('Generated Codes', input, dataSource, userPayload, pubSub)
|
|
31908
|
+
}
|
|
31909
|
+
|
|
31910
|
+
@Mutation(() => GeneratedCode_)
|
|
31911
|
+
async UpdateGeneratedCode(
|
|
31912
|
+
@Arg('input', () => UpdateGeneratedCodeInput) input: UpdateGeneratedCodeInput,
|
|
31913
|
+
@Ctx() { dataSources, userPayload }: AppContext,
|
|
31914
|
+
@PubSub() pubSub: PubSubEngine
|
|
31915
|
+
) {
|
|
31916
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
31917
|
+
return this.UpdateRecord('Generated Codes', input, dataSource, userPayload, pubSub);
|
|
31918
|
+
}
|
|
31919
|
+
|
|
31920
|
+
@Mutation(() => GeneratedCode_)
|
|
31921
|
+
async DeleteGeneratedCode(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
31922
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
31923
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
31924
|
+
return this.DeleteRecord('Generated Codes', key, options, dataSource, userPayload, pubSub);
|
|
31925
|
+
}
|
|
31926
|
+
|
|
31927
|
+
}
|
|
31928
|
+
|
|
31484
31929
|
//****************************************************************************
|
|
31485
31930
|
// ENTITY CLASS for AI Agent Learning Cycles
|
|
31486
31931
|
//****************************************************************************
|