@memberjunction/server 2.36.1 → 2.37.1
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/config.d.ts +5 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +8 -1
- package/dist/config.js.map +1 -1
- package/dist/generated/generated.d.ts +23 -15
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +138 -73
- package/dist/generated/generated.js.map +1 -1
- package/dist/generic/ResolverBase.d.ts.map +1 -1
- package/dist/generic/ResolverBase.js +24 -1
- package/dist/generic/ResolverBase.js.map +1 -1
- package/dist/resolvers/AskSkipResolver.d.ts +18 -16
- package/dist/resolvers/AskSkipResolver.d.ts.map +1 -1
- package/dist/resolvers/AskSkipResolver.js +169 -19
- package/dist/resolvers/AskSkipResolver.js.map +1 -1
- package/dist/scheduler/LearningCycleScheduler.d.ts.map +1 -1
- package/dist/scheduler/LearningCycleScheduler.js +3 -4
- package/dist/scheduler/LearningCycleScheduler.js.map +1 -1
- package/package.json +22 -22
- package/src/config.ts +8 -0
- package/src/generated/generated.ts +92 -53
- package/src/generic/ResolverBase.ts +25 -1
- package/src/resolvers/AskSkipResolver.ts +233 -25
- package/src/scheduler/LearningCycleScheduler.ts +7 -10
|
@@ -1402,13 +1402,13 @@ export class AIAgentNote_ {
|
|
|
1402
1402
|
@MaxLength(16)
|
|
1403
1403
|
ID: string;
|
|
1404
1404
|
|
|
1405
|
-
@Field()
|
|
1405
|
+
@Field({nullable: true})
|
|
1406
1406
|
@MaxLength(16)
|
|
1407
|
-
AgentID
|
|
1407
|
+
AgentID?: string;
|
|
1408
1408
|
|
|
1409
|
-
@Field()
|
|
1409
|
+
@Field({nullable: true})
|
|
1410
1410
|
@MaxLength(16)
|
|
1411
|
-
AgentNoteTypeID
|
|
1411
|
+
AgentNoteTypeID?: string;
|
|
1412
1412
|
|
|
1413
1413
|
@Field({nullable: true})
|
|
1414
1414
|
Note?: string;
|
|
@@ -1449,10 +1449,10 @@ export class AIAgentNote_ {
|
|
|
1449
1449
|
@InputType()
|
|
1450
1450
|
export class CreateAIAgentNoteInput {
|
|
1451
1451
|
@Field({ nullable: true })
|
|
1452
|
-
AgentID
|
|
1452
|
+
AgentID: string | null;
|
|
1453
1453
|
|
|
1454
1454
|
@Field({ nullable: true })
|
|
1455
|
-
AgentNoteTypeID
|
|
1455
|
+
AgentNoteTypeID: string | null;
|
|
1456
1456
|
|
|
1457
1457
|
@Field({ nullable: true })
|
|
1458
1458
|
Note: string | null;
|
|
@@ -1474,10 +1474,10 @@ export class UpdateAIAgentNoteInput {
|
|
|
1474
1474
|
ID: string;
|
|
1475
1475
|
|
|
1476
1476
|
@Field({ nullable: true })
|
|
1477
|
-
AgentID?: string;
|
|
1477
|
+
AgentID?: string | null;
|
|
1478
1478
|
|
|
1479
1479
|
@Field({ nullable: true })
|
|
1480
|
-
AgentNoteTypeID?: string;
|
|
1480
|
+
AgentNoteTypeID?: string | null;
|
|
1481
1481
|
|
|
1482
1482
|
@Field({ nullable: true })
|
|
1483
1483
|
Note?: string | null;
|
|
@@ -6271,6 +6271,9 @@ export class User_ {
|
|
|
6271
6271
|
@Field(() => [UserFavorite_])
|
|
6272
6272
|
UserFavorites_UserIDArray: UserFavorite_[]; // Link to UserFavorites
|
|
6273
6273
|
|
|
6274
|
+
@Field(() => [ResourceLink_])
|
|
6275
|
+
ResourceLinks_UserIDArray: ResourceLink_[]; // Link to ResourceLinks
|
|
6276
|
+
|
|
6274
6277
|
@Field(() => [ListCategory_])
|
|
6275
6278
|
ListCategories_UserIDArray: ListCategory_[]; // Link to ListCategories
|
|
6276
6279
|
|
|
@@ -6280,24 +6283,21 @@ export class User_ {
|
|
|
6280
6283
|
@Field(() => [AIAgentRequest_])
|
|
6281
6284
|
AIAgentRequests_ResponseByUserIDArray: AIAgentRequest_[]; // Link to AIAgentRequests
|
|
6282
6285
|
|
|
6283
|
-
@Field(() => [ResourceLink_])
|
|
6284
|
-
ResourceLinks_UserIDArray: ResourceLink_[]; // Link to ResourceLinks
|
|
6285
|
-
|
|
6286
6286
|
@Field(() => [ReportUserState_])
|
|
6287
6287
|
MJ_ReportUserStates_UserIDArray: ReportUserState_[]; // Link to MJ_ReportUserStates
|
|
6288
6288
|
|
|
6289
6289
|
@Field(() => [AIAgentNote_])
|
|
6290
6290
|
AIAgentNotes_UserIDArray: AIAgentNote_[]; // Link to AIAgentNotes
|
|
6291
6291
|
|
|
6292
|
+
@Field(() => [ResourcePermission_])
|
|
6293
|
+
ResourcePermissions_UserIDArray: ResourcePermission_[]; // Link to ResourcePermissions
|
|
6294
|
+
|
|
6292
6295
|
@Field(() => [AIAgentRequest_])
|
|
6293
6296
|
AIAgentRequests_RequestForUserIDArray: AIAgentRequest_[]; // Link to AIAgentRequests
|
|
6294
6297
|
|
|
6295
6298
|
@Field(() => [ConversationDetail_])
|
|
6296
6299
|
ConversationDetails_UserIDArray: ConversationDetail_[]; // Link to ConversationDetails
|
|
6297
6300
|
|
|
6298
|
-
@Field(() => [ResourcePermission_])
|
|
6299
|
-
ResourcePermissions_UserIDArray: ResourcePermission_[]; // Link to ResourcePermissions
|
|
6300
|
-
|
|
6301
6301
|
}
|
|
6302
6302
|
|
|
6303
6303
|
//****************************************************************************
|
|
@@ -6720,6 +6720,15 @@ export class UserResolverBase extends ResolverBase {
|
|
|
6720
6720
|
return result;
|
|
6721
6721
|
}
|
|
6722
6722
|
|
|
6723
|
+
@FieldResolver(() => [ResourceLink_])
|
|
6724
|
+
async ResourceLinks_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6725
|
+
this.CheckUserReadPermissions('Resource Links', userPayload);
|
|
6726
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
6727
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwResourceLinks] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause('Resource Links', userPayload, EntityPermissionType.Read, 'AND');
|
|
6728
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Resource Links', await dataSource.query(sSQL));
|
|
6729
|
+
return result;
|
|
6730
|
+
}
|
|
6731
|
+
|
|
6723
6732
|
@FieldResolver(() => [ListCategory_])
|
|
6724
6733
|
async ListCategories_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6725
6734
|
this.CheckUserReadPermissions('List Categories', userPayload);
|
|
@@ -6747,15 +6756,6 @@ export class UserResolverBase extends ResolverBase {
|
|
|
6747
6756
|
return result;
|
|
6748
6757
|
}
|
|
6749
6758
|
|
|
6750
|
-
@FieldResolver(() => [ResourceLink_])
|
|
6751
|
-
async ResourceLinks_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6752
|
-
this.CheckUserReadPermissions('Resource Links', userPayload);
|
|
6753
|
-
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
6754
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwResourceLinks] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause('Resource Links', userPayload, EntityPermissionType.Read, 'AND');
|
|
6755
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Resource Links', await dataSource.query(sSQL));
|
|
6756
|
-
return result;
|
|
6757
|
-
}
|
|
6758
|
-
|
|
6759
6759
|
@FieldResolver(() => [ReportUserState_])
|
|
6760
6760
|
async MJ_ReportUserStates_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6761
6761
|
this.CheckUserReadPermissions('MJ: Report User States', userPayload);
|
|
@@ -6774,6 +6774,15 @@ export class UserResolverBase extends ResolverBase {
|
|
|
6774
6774
|
return result;
|
|
6775
6775
|
}
|
|
6776
6776
|
|
|
6777
|
+
@FieldResolver(() => [ResourcePermission_])
|
|
6778
|
+
async ResourcePermissions_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6779
|
+
this.CheckUserReadPermissions('Resource Permissions', userPayload);
|
|
6780
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
6781
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwResourcePermissions] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause('Resource Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
6782
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Resource Permissions', await dataSource.query(sSQL));
|
|
6783
|
+
return result;
|
|
6784
|
+
}
|
|
6785
|
+
|
|
6777
6786
|
@FieldResolver(() => [AIAgentRequest_])
|
|
6778
6787
|
async AIAgentRequests_RequestForUserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6779
6788
|
this.CheckUserReadPermissions('AI Agent Requests', userPayload);
|
|
@@ -6792,15 +6801,6 @@ export class UserResolverBase extends ResolverBase {
|
|
|
6792
6801
|
return result;
|
|
6793
6802
|
}
|
|
6794
6803
|
|
|
6795
|
-
@FieldResolver(() => [ResourcePermission_])
|
|
6796
|
-
async ResourcePermissions_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6797
|
-
this.CheckUserReadPermissions('Resource Permissions', userPayload);
|
|
6798
|
-
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
6799
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwResourcePermissions] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause('Resource Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
6800
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Resource Permissions', await dataSource.query(sSQL));
|
|
6801
|
-
return result;
|
|
6802
|
-
}
|
|
6803
|
-
|
|
6804
6804
|
@Mutation(() => User_)
|
|
6805
6805
|
async CreateUser(
|
|
6806
6806
|
@Arg('input', () => CreateUserInput) input: CreateUserInput,
|
|
@@ -12023,9 +12023,6 @@ export class AIModel_ {
|
|
|
12023
12023
|
@MaxLength(200)
|
|
12024
12024
|
SupportedResponseFormats: string;
|
|
12025
12025
|
|
|
12026
|
-
@Field(() => Boolean, {description: `Specifies if the model supports the concept of an effort level. For example, for a reasoning model, the options often include low, medium, and high.`})
|
|
12027
|
-
SupportsEffortLevel: boolean;
|
|
12028
|
-
|
|
12029
12026
|
@Field()
|
|
12030
12027
|
@MaxLength(100)
|
|
12031
12028
|
AIModelType: string;
|
|
@@ -12042,15 +12039,15 @@ export class AIModel_ {
|
|
|
12042
12039
|
@Field(() => [VectorIndex_])
|
|
12043
12040
|
VectorIndexes_EmbeddingModelIDArray: VectorIndex_[]; // Link to VectorIndexes
|
|
12044
12041
|
|
|
12042
|
+
@Field(() => [ContentType_])
|
|
12043
|
+
ContentTypes_AIModelIDArray: ContentType_[]; // Link to ContentTypes
|
|
12044
|
+
|
|
12045
12045
|
@Field(() => [AIResultCache_])
|
|
12046
12046
|
AIResultCache_AIModelIDArray: AIResultCache_[]; // Link to AIResultCache
|
|
12047
12047
|
|
|
12048
12048
|
@Field(() => [EntityAIAction_])
|
|
12049
12049
|
EntityAIActions_AIModelIDArray: EntityAIAction_[]; // Link to EntityAIActions
|
|
12050
12050
|
|
|
12051
|
-
@Field(() => [ContentType_])
|
|
12052
|
-
ContentTypes_AIModelIDArray: ContentType_[]; // Link to ContentTypes
|
|
12053
|
-
|
|
12054
12051
|
@Field(() => [AIAgentModel_])
|
|
12055
12052
|
AIAgentModels_ModelIDArray: AIAgentModel_[]; // Link to AIAgentModels
|
|
12056
12053
|
|
|
@@ -12105,9 +12102,6 @@ export class CreateAIModelInput {
|
|
|
12105
12102
|
|
|
12106
12103
|
@Field({ nullable: true })
|
|
12107
12104
|
SupportedResponseFormats?: string;
|
|
12108
|
-
|
|
12109
|
-
@Field(() => Boolean, { nullable: true })
|
|
12110
|
-
SupportsEffortLevel?: boolean;
|
|
12111
12105
|
}
|
|
12112
12106
|
|
|
12113
12107
|
|
|
@@ -12161,9 +12155,6 @@ export class UpdateAIModelInput {
|
|
|
12161
12155
|
@Field({ nullable: true })
|
|
12162
12156
|
SupportedResponseFormats?: string;
|
|
12163
12157
|
|
|
12164
|
-
@Field(() => Boolean, { nullable: true })
|
|
12165
|
-
SupportsEffortLevel?: boolean;
|
|
12166
|
-
|
|
12167
12158
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
12168
12159
|
OldValues___?: KeyValuePairInput[];
|
|
12169
12160
|
}
|
|
@@ -12269,6 +12260,15 @@ export class AIModelResolver extends ResolverBase {
|
|
|
12269
12260
|
return result;
|
|
12270
12261
|
}
|
|
12271
12262
|
|
|
12263
|
+
@FieldResolver(() => [ContentType_])
|
|
12264
|
+
async ContentTypes_AIModelIDArray(@Root() aimodel_: AIModel_, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12265
|
+
this.CheckUserReadPermissions('Content Types', userPayload);
|
|
12266
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
12267
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwContentTypes] WHERE [AIModelID]='${aimodel_.ID}' ` + this.getRowLevelSecurityWhereClause('Content Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
12268
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Content Types', await dataSource.query(sSQL));
|
|
12269
|
+
return result;
|
|
12270
|
+
}
|
|
12271
|
+
|
|
12272
12272
|
@FieldResolver(() => [AIResultCache_])
|
|
12273
12273
|
async AIResultCache_AIModelIDArray(@Root() aimodel_: AIModel_, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12274
12274
|
this.CheckUserReadPermissions('AI Result Cache', userPayload);
|
|
@@ -12287,15 +12287,6 @@ export class AIModelResolver extends ResolverBase {
|
|
|
12287
12287
|
return result;
|
|
12288
12288
|
}
|
|
12289
12289
|
|
|
12290
|
-
@FieldResolver(() => [ContentType_])
|
|
12291
|
-
async ContentTypes_AIModelIDArray(@Root() aimodel_: AIModel_, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12292
|
-
this.CheckUserReadPermissions('Content Types', userPayload);
|
|
12293
|
-
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
12294
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwContentTypes] WHERE [AIModelID]='${aimodel_.ID}' ` + this.getRowLevelSecurityWhereClause('Content Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
12295
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Content Types', await dataSource.query(sSQL));
|
|
12296
|
-
return result;
|
|
12297
|
-
}
|
|
12298
|
-
|
|
12299
12290
|
@FieldResolver(() => [AIAgentModel_])
|
|
12300
12291
|
async AIAgentModels_ModelIDArray(@Root() aimodel_: AIModel_, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12301
12292
|
this.CheckUserReadPermissions('AI Agent Models', userPayload);
|
|
@@ -15709,6 +15700,14 @@ export class ConversationDetail_ {
|
|
|
15709
15700
|
@MaxLength(16)
|
|
15710
15701
|
UserID?: string;
|
|
15711
15702
|
|
|
15703
|
+
@Field({nullable: true, description: `Optional reference to a conversation artifact associated with this conversation detail`})
|
|
15704
|
+
@MaxLength(16)
|
|
15705
|
+
ArtifactID?: string;
|
|
15706
|
+
|
|
15707
|
+
@Field({nullable: true, description: `Optional reference to a specific version of a conversation artifact associated with this conversation detail`})
|
|
15708
|
+
@MaxLength(16)
|
|
15709
|
+
ArtifactVersionID?: string;
|
|
15710
|
+
|
|
15712
15711
|
@Field({nullable: true})
|
|
15713
15712
|
@MaxLength(510)
|
|
15714
15713
|
Conversation?: string;
|
|
@@ -15717,6 +15716,10 @@ export class ConversationDetail_ {
|
|
|
15717
15716
|
@MaxLength(200)
|
|
15718
15717
|
User?: string;
|
|
15719
15718
|
|
|
15719
|
+
@Field({nullable: true})
|
|
15720
|
+
@MaxLength(510)
|
|
15721
|
+
Artifact?: string;
|
|
15722
|
+
|
|
15720
15723
|
@Field(() => [Report_])
|
|
15721
15724
|
Reports_ConversationDetailIDArray: Report_[]; // Link to Reports
|
|
15722
15725
|
|
|
@@ -15759,6 +15762,12 @@ export class CreateConversationDetailInput {
|
|
|
15759
15762
|
|
|
15760
15763
|
@Field({ nullable: true })
|
|
15761
15764
|
UserID: string | null;
|
|
15765
|
+
|
|
15766
|
+
@Field({ nullable: true })
|
|
15767
|
+
ArtifactID: string | null;
|
|
15768
|
+
|
|
15769
|
+
@Field({ nullable: true })
|
|
15770
|
+
ArtifactVersionID: string | null;
|
|
15762
15771
|
}
|
|
15763
15772
|
|
|
15764
15773
|
|
|
@@ -15803,6 +15812,12 @@ export class UpdateConversationDetailInput {
|
|
|
15803
15812
|
@Field({ nullable: true })
|
|
15804
15813
|
UserID?: string | null;
|
|
15805
15814
|
|
|
15815
|
+
@Field({ nullable: true })
|
|
15816
|
+
ArtifactID?: string | null;
|
|
15817
|
+
|
|
15818
|
+
@Field({ nullable: true })
|
|
15819
|
+
ArtifactVersionID?: string | null;
|
|
15820
|
+
|
|
15806
15821
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
15807
15822
|
OldValues___?: KeyValuePairInput[];
|
|
15808
15823
|
}
|
|
@@ -29399,6 +29414,9 @@ export class ConversationArtifactVersion_ {
|
|
|
29399
29414
|
@MaxLength(510)
|
|
29400
29415
|
ConversationArtifact: string;
|
|
29401
29416
|
|
|
29417
|
+
@Field(() => [ConversationDetail_])
|
|
29418
|
+
ConversationDetails_ArtifactVersionIDArray: ConversationDetail_[]; // Link to ConversationDetails
|
|
29419
|
+
|
|
29402
29420
|
}
|
|
29403
29421
|
|
|
29404
29422
|
//****************************************************************************
|
|
@@ -29506,6 +29524,15 @@ export class ConversationArtifactVersionResolver extends ResolverBase {
|
|
|
29506
29524
|
return result;
|
|
29507
29525
|
}
|
|
29508
29526
|
|
|
29527
|
+
@FieldResolver(() => [ConversationDetail_])
|
|
29528
|
+
async ConversationDetails_ArtifactVersionIDArray(@Root() conversationartifactversion_: ConversationArtifactVersion_, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
29529
|
+
this.CheckUserReadPermissions('Conversation Details', userPayload);
|
|
29530
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
29531
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationDetails] WHERE [ArtifactVersionID]='${conversationartifactversion_.ID}' ` + this.getRowLevelSecurityWhereClause('Conversation Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
29532
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Conversation Details', await dataSource.query(sSQL));
|
|
29533
|
+
return result;
|
|
29534
|
+
}
|
|
29535
|
+
|
|
29509
29536
|
@Mutation(() => ConversationArtifactVersion_)
|
|
29510
29537
|
async CreateConversationArtifactVersion(
|
|
29511
29538
|
@Arg('input', () => CreateConversationArtifactVersionInput) input: CreateConversationArtifactVersionInput,
|
|
@@ -30294,6 +30321,9 @@ export class ConversationArtifact_ {
|
|
|
30294
30321
|
@Field(() => [ConversationArtifactVersion_])
|
|
30295
30322
|
MJ_ConversationArtifactVersions_ConversationArtifactIDArray: ConversationArtifactVersion_[]; // Link to MJ_ConversationArtifactVersions
|
|
30296
30323
|
|
|
30324
|
+
@Field(() => [ConversationDetail_])
|
|
30325
|
+
ConversationDetails_ArtifactIDArray: ConversationDetail_[]; // Link to ConversationDetails
|
|
30326
|
+
|
|
30297
30327
|
}
|
|
30298
30328
|
|
|
30299
30329
|
//****************************************************************************
|
|
@@ -30425,6 +30455,15 @@ export class ConversationArtifactResolver extends ResolverBase {
|
|
|
30425
30455
|
return result;
|
|
30426
30456
|
}
|
|
30427
30457
|
|
|
30458
|
+
@FieldResolver(() => [ConversationDetail_])
|
|
30459
|
+
async ConversationDetails_ArtifactIDArray(@Root() conversationartifact_: ConversationArtifact_, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30460
|
+
this.CheckUserReadPermissions('Conversation Details', userPayload);
|
|
30461
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
30462
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationDetails] WHERE [ArtifactID]='${conversationartifact_.ID}' ` + this.getRowLevelSecurityWhereClause('Conversation Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
30463
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Conversation Details', await dataSource.query(sSQL));
|
|
30464
|
+
return result;
|
|
30465
|
+
}
|
|
30466
|
+
|
|
30428
30467
|
@Mutation(() => ConversationArtifact_)
|
|
30429
30468
|
async CreateConversationArtifact(
|
|
30430
30469
|
@Arg('input', () => CreateConversationArtifactInput) input: CreateConversationArtifactInput,
|
|
@@ -775,7 +775,31 @@ export class ResolverBase {
|
|
|
775
775
|
if (field) {
|
|
776
776
|
switch (field.TSType) {
|
|
777
777
|
case EntityFieldTSType.Number:
|
|
778
|
-
|
|
778
|
+
if (val == null && val == undefined) {
|
|
779
|
+
val = null;
|
|
780
|
+
}
|
|
781
|
+
else {
|
|
782
|
+
let typeLowered = (field.Type as string).toLowerCase();
|
|
783
|
+
|
|
784
|
+
switch (typeLowered) {
|
|
785
|
+
case 'int':
|
|
786
|
+
case 'smallint':
|
|
787
|
+
case 'bigint':
|
|
788
|
+
case 'tinyint':
|
|
789
|
+
val = parseInt(val);
|
|
790
|
+
break;
|
|
791
|
+
case 'money':
|
|
792
|
+
case 'smallmoney':
|
|
793
|
+
case 'decimal':
|
|
794
|
+
case 'numeric':
|
|
795
|
+
case 'float':
|
|
796
|
+
val = parseFloat(val);
|
|
797
|
+
break;
|
|
798
|
+
default:
|
|
799
|
+
val = parseFloat(val);
|
|
800
|
+
break;
|
|
801
|
+
}
|
|
802
|
+
}
|
|
779
803
|
break;
|
|
780
804
|
case EntityFieldTSType.Boolean:
|
|
781
805
|
val = val === null || val === undefined || val === 'false' || val === '0' || parseInt(val) === 0 ? false : true;
|