@memberjunction/server 2.52.0 → 2.53.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/server",
3
- "version": "2.52.0",
3
+ "version": "2.53.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,30 +22,30 @@
22
22
  "dependencies": {
23
23
  "@apollo/server": "^4.9.1",
24
24
  "@graphql-tools/utils": "^10.0.1",
25
- "@memberjunction/actions": "2.52.0",
26
- "@memberjunction/ai": "2.52.0",
27
- "@memberjunction/ai-agents": "2.52.0",
28
- "@memberjunction/ai-mistral": "2.52.0",
29
- "@memberjunction/ai-openai": "2.52.0",
30
- "@memberjunction/ai-vectors-pinecone": "2.52.0",
31
- "@memberjunction/aiengine": "2.52.0",
32
- "@memberjunction/ai-prompts": "2.52.0",
33
- "@memberjunction/core": "2.52.0",
34
- "@memberjunction/core-actions": "2.52.0",
35
- "@memberjunction/core-entities": "2.52.0",
36
- "@memberjunction/core-entities-server": "2.52.0",
37
- "@memberjunction/data-context": "2.52.0",
38
- "@memberjunction/data-context-server": "2.52.0",
39
- "@memberjunction/doc-utils": "2.52.0",
40
- "@memberjunction/entity-communications-server": "2.52.0",
41
- "@memberjunction/external-change-detection": "2.52.0",
42
- "@memberjunction/global": "2.52.0",
43
- "@memberjunction/graphql-dataprovider": "2.52.0",
44
- "@memberjunction/queue": "2.52.0",
45
- "@memberjunction/skip-types": "2.52.0",
46
- "@memberjunction/sqlserver-dataprovider": "2.52.0",
47
- "@memberjunction/storage": "2.52.0",
48
- "@memberjunction/templates": "2.52.0",
25
+ "@memberjunction/actions": "2.53.0",
26
+ "@memberjunction/ai": "2.53.0",
27
+ "@memberjunction/ai-agents": "2.53.0",
28
+ "@memberjunction/ai-mistral": "2.53.0",
29
+ "@memberjunction/ai-openai": "2.53.0",
30
+ "@memberjunction/ai-vectors-pinecone": "2.53.0",
31
+ "@memberjunction/aiengine": "2.53.0",
32
+ "@memberjunction/ai-prompts": "2.53.0",
33
+ "@memberjunction/core": "2.53.0",
34
+ "@memberjunction/core-actions": "2.53.0",
35
+ "@memberjunction/core-entities": "2.53.0",
36
+ "@memberjunction/core-entities-server": "2.53.0",
37
+ "@memberjunction/data-context": "2.53.0",
38
+ "@memberjunction/data-context-server": "2.53.0",
39
+ "@memberjunction/doc-utils": "2.53.0",
40
+ "@memberjunction/entity-communications-server": "2.53.0",
41
+ "@memberjunction/external-change-detection": "2.53.0",
42
+ "@memberjunction/global": "2.53.0",
43
+ "@memberjunction/graphql-dataprovider": "2.53.0",
44
+ "@memberjunction/queue": "2.53.0",
45
+ "@memberjunction/skip-types": "2.53.0",
46
+ "@memberjunction/sqlserver-dataprovider": "2.53.0",
47
+ "@memberjunction/storage": "2.53.0",
48
+ "@memberjunction/templates": "2.53.0",
49
49
  "@types/compression": "^1.7.5",
50
50
  "@types/cors": "^2.8.13",
51
51
  "@types/jsonwebtoken": "9.0.6",
@@ -26454,6 +26454,10 @@ export class Action_ {
26454
26454
  @MaxLength(510)
26455
26455
  DriverClass?: string;
26456
26456
 
26457
+ @Field({nullable: true, description: `Optional ID of the parent action this action inherits from. Used for hierarchical action composition where child actions can specialize parent actions.`})
26458
+ @MaxLength(16)
26459
+ ParentID?: string;
26460
+
26457
26461
  @Field({nullable: true})
26458
26462
  @MaxLength(510)
26459
26463
  Category?: string;
@@ -26462,6 +26466,10 @@ export class Action_ {
26462
26466
  @MaxLength(200)
26463
26467
  CodeApprovedByUser?: string;
26464
26468
 
26469
+ @Field({nullable: true})
26470
+ @MaxLength(850)
26471
+ Parent?: string;
26472
+
26465
26473
  @Field(() => [ActionParam_])
26466
26474
  ActionParams_ActionIDArray: ActionParam_[]; // Link to ActionParams
26467
26475
 
@@ -26489,6 +26497,9 @@ export class Action_ {
26489
26497
  @Field(() => [ActionAuthorization_])
26490
26498
  ActionAuthorizations_ActionIDArray: ActionAuthorization_[]; // Link to ActionAuthorizations
26491
26499
 
26500
+ @Field(() => [Action_])
26501
+ Actions_ParentIDArray: Action_[]; // Link to Actions
26502
+
26492
26503
  }
26493
26504
 
26494
26505
  //****************************************************************************
@@ -26549,6 +26560,9 @@ export class CreateActionInput {
26549
26560
 
26550
26561
  @Field({ nullable: true })
26551
26562
  DriverClass: string | null;
26563
+
26564
+ @Field({ nullable: true })
26565
+ ParentID: string | null;
26552
26566
  }
26553
26567
 
26554
26568
 
@@ -26611,6 +26625,9 @@ export class UpdateActionInput {
26611
26625
  @Field({ nullable: true })
26612
26626
  DriverClass?: string | null;
26613
26627
 
26628
+ @Field({ nullable: true })
26629
+ ParentID?: string | null;
26630
+
26614
26631
  @Field(() => [KeyValuePairInput], { nullable: true })
26615
26632
  OldValues___?: KeyValuePairInput[];
26616
26633
  }
@@ -26762,6 +26779,16 @@ export class ActionResolver extends ResolverBase {
26762
26779
  return result;
26763
26780
  }
26764
26781
 
26782
+ @FieldResolver(() => [Action_])
26783
+ async Actions_ParentIDArray(@Root() action_: Action_, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
26784
+ this.CheckUserReadPermissions('Actions', userPayload);
26785
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
26786
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwActions] WHERE [ParentID]='${action_.ID}' ` + this.getRowLevelSecurityWhereClause('Actions', userPayload, EntityPermissionType.Read, 'AND');
26787
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
26788
+ const result = this.ArrayMapFieldNamesToCodeNames('Actions', rows);
26789
+ return result;
26790
+ }
26791
+
26765
26792
  @Mutation(() => Action_)
26766
26793
  async CreateAction(
26767
26794
  @Arg('input', () => CreateActionInput) input: CreateActionInput,
@@ -30175,6 +30202,9 @@ export class TemplateContent_ {
30175
30202
  @MaxLength(510)
30176
30203
  Type: string;
30177
30204
 
30205
+ @Field(() => [TemplateParam_])
30206
+ TemplateParams_TemplateContentIDArray: TemplateParam_[]; // Link to TemplateParams
30207
+
30178
30208
  }
30179
30209
 
30180
30210
  //****************************************************************************
@@ -30286,6 +30316,16 @@ export class TemplateContentResolver extends ResolverBase {
30286
30316
  return result;
30287
30317
  }
30288
30318
 
30319
+ @FieldResolver(() => [TemplateParam_])
30320
+ async TemplateParams_TemplateContentIDArray(@Root() templatecontent_: TemplateContent_, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
30321
+ this.CheckUserReadPermissions('Template Params', userPayload);
30322
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
30323
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTemplateParams] WHERE [TemplateContentID]='${templatecontent_.ID}' ` + this.getRowLevelSecurityWhereClause('Template Params', userPayload, EntityPermissionType.Read, 'AND');
30324
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
30325
+ const result = this.ArrayMapFieldNamesToCodeNames('Template Params', rows);
30326
+ return result;
30327
+ }
30328
+
30289
30329
  @Mutation(() => TemplateContent_)
30290
30330
  async CreateTemplateContent(
30291
30331
  @Arg('input', () => CreateTemplateContentInput) input: CreateTemplateContentInput,
@@ -30375,6 +30415,10 @@ export class TemplateParam_ {
30375
30415
  @Field({nullable: true, description: `This field is used only when the Type of the TemplateParam table is "Entity". It is an optional field used to specify the sorting order for the related entity data that is used in the template for the Entity specified.`})
30376
30416
  OrderBy?: string;
30377
30417
 
30418
+ @Field({nullable: true, description: `Optional reference to a specific template content. When NULL, this parameter applies to all content items within the template. When set, this parameter applies only to the specified template content.`})
30419
+ @MaxLength(16)
30420
+ TemplateContentID?: string;
30421
+
30378
30422
  @Field()
30379
30423
  @MaxLength(510)
30380
30424
  Template: string;
@@ -30428,6 +30472,9 @@ export class CreateTemplateParamInput {
30428
30472
 
30429
30473
  @Field({ nullable: true })
30430
30474
  OrderBy: string | null;
30475
+
30476
+ @Field({ nullable: true })
30477
+ TemplateContentID: string | null;
30431
30478
  }
30432
30479
 
30433
30480
 
@@ -30475,6 +30522,9 @@ export class UpdateTemplateParamInput {
30475
30522
  @Field({ nullable: true })
30476
30523
  OrderBy?: string | null;
30477
30524
 
30525
+ @Field({ nullable: true })
30526
+ TemplateContentID?: string | null;
30527
+
30478
30528
  @Field(() => [KeyValuePairInput], { nullable: true })
30479
30529
  OldValues___?: KeyValuePairInput[];
30480
30530
  }
@@ -740,7 +740,7 @@ export class ResolverBase {
740
740
  input.OldValues___?.forEach((item) => (oldValues[item.Key] = item.Value));
741
741
 
742
742
  // 1) load the old values, this will be the initial state of the object
743
- entityObject.LoadFromData(oldValues);
743
+ await entityObject.LoadFromData(oldValues);
744
744
 
745
745
  // 2) set the new values from the input, not including the OldValues property
746
746
  entityObject.SetMany(clientNewValues);