@memberjunction/server 0.9.261 → 0.9.263

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": "0.9.261",
3
+ "version": "0.9.263",
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",
@@ -21,17 +21,17 @@
21
21
  "dependencies": {
22
22
  "@apollo/server": "^4.9.1",
23
23
  "@graphql-tools/utils": "^10.0.1",
24
- "@memberjunction/ai": "^0.9.170",
25
- "@memberjunction/aiengine": "^0.9.82",
26
- "@memberjunction/core": "^0.9.185",
27
- "@memberjunction/core-entities": "^0.9.181",
28
- "@memberjunction/data-context": "^0.9.68",
29
- "@memberjunction/data-context-server": "^0.9.64",
30
- "@memberjunction/global": "^0.9.167",
31
- "@memberjunction/storage": "^0.9.26",
32
- "@memberjunction/queue": "^0.9.204",
33
- "@memberjunction/sqlserver-dataprovider": "^0.9.218",
34
- "@memberjunction/skip-types": "^0.9.93",
24
+ "@memberjunction/ai": "^0.9.171",
25
+ "@memberjunction/aiengine": "^0.9.84",
26
+ "@memberjunction/core": "^0.9.186",
27
+ "@memberjunction/core-entities": "^0.9.183",
28
+ "@memberjunction/data-context": "^0.9.70",
29
+ "@memberjunction/data-context-server": "^0.9.66",
30
+ "@memberjunction/global": "^0.9.168",
31
+ "@memberjunction/storage": "^0.9.28",
32
+ "@memberjunction/queue": "^0.9.206",
33
+ "@memberjunction/sqlserver-dataprovider": "^0.9.220",
34
+ "@memberjunction/skip-types": "^0.9.95",
35
35
  "@types/cors": "^2.8.13",
36
36
  "@types/jsonwebtoken": "^8.5.9",
37
37
  "@types/node": "^18.11.14",
@@ -2,7 +2,7 @@
2
2
  * ALL ENTITIES - TypeGraphQL Type Class Definition - AUTO GENERATED FILE
3
3
  * Generated Entities and Resolvers for Server
4
4
  *
5
- * GENERATED: 4/3/2024, 4:18:53 PM
5
+ * GENERATED: 4/3/2024, 5:30:40 PM
6
6
  *
7
7
  * >>> DO NOT MODIFY THIS FILE!!!!!!!!!!!!
8
8
  * >>> YOUR CHANGES WILL BE OVERWRITTEN
@@ -3709,6 +3709,18 @@ export class User_ {
3709
3709
  @Field(() => [mj_core_schema_server_object_types.DataContext_])
3710
3710
  DataContextsArray: mj_core_schema_server_object_types.DataContext_[]; // Link to DataContexts
3711
3711
 
3712
+ @Field(() => [mj_core_schema_server_object_types.ReportCategory_])
3713
+ ReportCategoriesArray: mj_core_schema_server_object_types.ReportCategory_[]; // Link to ReportCategories
3714
+
3715
+ @Field(() => [mj_core_schema_server_object_types.UserViewCategory_])
3716
+ UserViewCategoriesArray: mj_core_schema_server_object_types.UserViewCategory_[]; // Link to UserViewCategories
3717
+
3718
+ @Field(() => [mj_core_schema_server_object_types.DashboardCategory_])
3719
+ DashboardCategoriesArray: mj_core_schema_server_object_types.DashboardCategory_[]; // Link to DashboardCategories
3720
+
3721
+ @Field(() => [mj_core_schema_server_object_types.QueryCategory_])
3722
+ QueryCategoriesArray: mj_core_schema_server_object_types.QueryCategory_[]; // Link to QueryCategories
3723
+
3712
3724
  }
3713
3725
 
3714
3726
  //****************************************************************************
@@ -3996,6 +4008,38 @@ export class UserResolverBase extends ResolverBase {
3996
4008
  const result = this.ArrayMapFieldNamesToCodeNames('Data Contexts', await dataSource.query(sSQL));
3997
4009
  return result;
3998
4010
  }
4011
+
4012
+ @FieldResolver(() => [mj_core_schema_server_object_types.ReportCategory_])
4013
+ async ReportCategoriesArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
4014
+ this.CheckUserReadPermissions('Report Categories', userPayload);
4015
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwReportCategories] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('Report Categories', userPayload, EntityPermissionType.Read, 'AND');
4016
+ const result = this.ArrayMapFieldNamesToCodeNames('Report Categories', await dataSource.query(sSQL));
4017
+ return result;
4018
+ }
4019
+
4020
+ @FieldResolver(() => [mj_core_schema_server_object_types.UserViewCategory_])
4021
+ async UserViewCategoriesArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
4022
+ this.CheckUserReadPermissions('User View Categories', userPayload);
4023
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserViewCategories] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('User View Categories', userPayload, EntityPermissionType.Read, 'AND');
4024
+ const result = this.ArrayMapFieldNamesToCodeNames('User View Categories', await dataSource.query(sSQL));
4025
+ return result;
4026
+ }
4027
+
4028
+ @FieldResolver(() => [mj_core_schema_server_object_types.DashboardCategory_])
4029
+ async DashboardCategoriesArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
4030
+ this.CheckUserReadPermissions('Dashboard Categories', userPayload);
4031
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboardCategories] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('Dashboard Categories', userPayload, EntityPermissionType.Read, 'AND');
4032
+ const result = this.ArrayMapFieldNamesToCodeNames('Dashboard Categories', await dataSource.query(sSQL));
4033
+ return result;
4034
+ }
4035
+
4036
+ @FieldResolver(() => [mj_core_schema_server_object_types.QueryCategory_])
4037
+ async QueryCategoriesArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
4038
+ this.CheckUserReadPermissions('Query Categories', userPayload);
4039
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwQueryCategories] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('Query Categories', userPayload, EntityPermissionType.Read, 'AND');
4040
+ const result = this.ArrayMapFieldNamesToCodeNames('Query Categories', await dataSource.query(sSQL));
4041
+ return result;
4042
+ }
3999
4043
 
4000
4044
  @Mutation(() => User_)
4001
4045
  async CreateUser(
@@ -14597,9 +14641,16 @@ export class QueryCategory_ {
14597
14641
  @MaxLength(8)
14598
14642
  UpdatedAt: Date;
14599
14643
 
14644
+ @Field(() => Int)
14645
+ UserID: number;
14646
+
14600
14647
  @Field({nullable: true})
14601
14648
  @MaxLength(100)
14602
14649
  Parent?: string;
14650
+
14651
+ @Field()
14652
+ @MaxLength(200)
14653
+ User: string;
14603
14654
 
14604
14655
  @Field(() => [mj_core_schema_server_object_types.QueryCategory_])
14605
14656
  QueryCategoriesArray: mj_core_schema_server_object_types.QueryCategory_[]; // Link to QueryCategories
@@ -14622,6 +14673,9 @@ export class CreateQueryCategoryInput {
14622
14673
 
14623
14674
  @Field({ nullable: true })
14624
14675
  Description: string;
14676
+
14677
+ @Field(() => Int)
14678
+ UserID: number;
14625
14679
  }
14626
14680
 
14627
14681
 
@@ -14641,6 +14695,9 @@ export class UpdateQueryCategoryInput {
14641
14695
 
14642
14696
  @Field({ nullable: true })
14643
14697
  Description: string;
14698
+
14699
+ @Field(() => Int)
14700
+ UserID: number;
14644
14701
  }
14645
14702
 
14646
14703
  //****************************************************************************
@@ -16913,9 +16970,16 @@ export class UserViewCategory_ {
16913
16970
  @Field(() => Int)
16914
16971
  EntityID: number;
16915
16972
 
16973
+ @Field(() => Int)
16974
+ UserID: number;
16975
+
16916
16976
  @Field({nullable: true})
16917
16977
  @MaxLength(200)
16918
16978
  Parent?: string;
16979
+
16980
+ @Field()
16981
+ @MaxLength(200)
16982
+ User: string;
16919
16983
 
16920
16984
  @Field(() => [mj_core_schema_server_object_types.UserViewCategory_])
16921
16985
  UserViewCategoriesArray: mj_core_schema_server_object_types.UserViewCategory_[]; // Link to UserViewCategories
@@ -16941,6 +17005,9 @@ export class CreateUserViewCategoryInput {
16941
17005
 
16942
17006
  @Field(() => Int)
16943
17007
  EntityID: number;
17008
+
17009
+ @Field(() => Int)
17010
+ UserID: number;
16944
17011
  }
16945
17012
 
16946
17013
 
@@ -16963,6 +17030,9 @@ export class UpdateUserViewCategoryInput {
16963
17030
 
16964
17031
  @Field(() => Int)
16965
17032
  EntityID: number;
17033
+
17034
+ @Field(() => Int)
17035
+ UserID: number;
16966
17036
  }
16967
17037
 
16968
17038
  //****************************************************************************
@@ -17148,9 +17218,16 @@ export class DashboardCategory_ {
17148
17218
  @MaxLength(8)
17149
17219
  UpdatedAt: Date;
17150
17220
 
17221
+ @Field(() => Int)
17222
+ UserID: number;
17223
+
17151
17224
  @Field({nullable: true})
17152
17225
  @MaxLength(200)
17153
17226
  Parent?: string;
17227
+
17228
+ @Field()
17229
+ @MaxLength(200)
17230
+ User: string;
17154
17231
 
17155
17232
  @Field(() => [mj_core_schema_server_object_types.Dashboard_])
17156
17233
  DashboardsArray: mj_core_schema_server_object_types.Dashboard_[]; // Link to Dashboards
@@ -17173,6 +17250,9 @@ export class CreateDashboardCategoryInput {
17173
17250
 
17174
17251
  @Field(() => Int, { nullable: true })
17175
17252
  ParentID: number;
17253
+
17254
+ @Field(() => Int)
17255
+ UserID: number;
17176
17256
  }
17177
17257
 
17178
17258
 
@@ -17192,6 +17272,9 @@ export class UpdateDashboardCategoryInput {
17192
17272
 
17193
17273
  @Field(() => Int, { nullable: true })
17194
17274
  ParentID: number;
17275
+
17276
+ @Field(() => Int)
17277
+ UserID: number;
17195
17278
  }
17196
17279
 
17197
17280
  //****************************************************************************
@@ -17377,9 +17460,16 @@ export class ReportCategory_ {
17377
17460
  @MaxLength(8)
17378
17461
  UpdatedAt: Date;
17379
17462
 
17463
+ @Field(() => Int)
17464
+ UserID: number;
17465
+
17380
17466
  @Field({nullable: true})
17381
17467
  @MaxLength(200)
17382
17468
  Parent?: string;
17469
+
17470
+ @Field()
17471
+ @MaxLength(200)
17472
+ User: string;
17383
17473
 
17384
17474
  @Field(() => [mj_core_schema_server_object_types.ReportCategory_])
17385
17475
  ReportCategoriesArray: mj_core_schema_server_object_types.ReportCategory_[]; // Link to ReportCategories
@@ -17402,6 +17492,9 @@ export class CreateReportCategoryInput {
17402
17492
 
17403
17493
  @Field(() => Int, { nullable: true })
17404
17494
  ParentID: number;
17495
+
17496
+ @Field(() => Int)
17497
+ UserID: number;
17405
17498
  }
17406
17499
 
17407
17500
 
@@ -17421,6 +17514,9 @@ export class UpdateReportCategoryInput {
17421
17514
 
17422
17515
  @Field(() => Int, { nullable: true })
17423
17516
  ParentID: number;
17517
+
17518
+ @Field(() => Int)
17519
+ UserID: number;
17424
17520
  }
17425
17521
 
17426
17522
  //****************************************************************************