@memberjunction/server 0.9.251 → 0.9.253

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.
@@ -3726,7 +3726,7 @@ __decorate([
3726
3726
  __metadata("design:type", String)
3727
3727
  ], Entity_.prototype, "BaseView", void 0);
3728
3728
  __decorate([
3729
- (0, server_1.Field)(() => Boolean),
3729
+ (0, server_1.Field)(() => Boolean, { description: 'When set to 0, CodeGen no longer generates a base view for the entity.' }),
3730
3730
  __metadata("design:type", Boolean)
3731
3731
  ], Entity_.prototype, "BaseViewGenerated", void 0);
3732
3732
  __decorate([
@@ -3739,43 +3739,43 @@ __decorate([
3739
3739
  __metadata("design:type", Boolean)
3740
3740
  ], Entity_.prototype, "VirtualEntity", void 0);
3741
3741
  __decorate([
3742
- (0, server_1.Field)(() => Boolean),
3742
+ (0, server_1.Field)(() => Boolean, { description: 'When set to 1, changes made via the MemberJunction architecture will result in tracking records being created in the RecordChange table' }),
3743
3743
  __metadata("design:type", Boolean)
3744
3744
  ], Entity_.prototype, "TrackRecordChanges", void 0);
3745
3745
  __decorate([
3746
- (0, server_1.Field)(() => Boolean),
3746
+ (0, server_1.Field)(() => Boolean, { description: 'When set to 1, accessing a record by an end-user will result in an Audit Log record being created' }),
3747
3747
  __metadata("design:type", Boolean)
3748
3748
  ], Entity_.prototype, "AuditRecordAccess", void 0);
3749
3749
  __decorate([
3750
- (0, server_1.Field)(() => Boolean),
3750
+ (0, server_1.Field)(() => Boolean, { description: 'When set to 1, users running a view against this entity will result in an Audit Log record being created.' }),
3751
3751
  __metadata("design:type", Boolean)
3752
3752
  ], Entity_.prototype, "AuditViewRuns", void 0);
3753
3753
  __decorate([
3754
- (0, server_1.Field)(() => Boolean),
3754
+ (0, server_1.Field)(() => Boolean, { description: 'If set to 0, the entity will not be available at all in the GraphQL API or the object model.' }),
3755
3755
  __metadata("design:type", Boolean)
3756
3756
  ], Entity_.prototype, "IncludeInAPI", void 0);
3757
3757
  __decorate([
3758
- (0, server_1.Field)(() => Boolean),
3758
+ (0, server_1.Field)(() => Boolean, { description: 'If set to 1, a GraphQL query will be enabled that allows access to all rows in the entity.' }),
3759
3759
  __metadata("design:type", Boolean)
3760
3760
  ], Entity_.prototype, "AllowAllRowsAPI", void 0);
3761
3761
  __decorate([
3762
- (0, server_1.Field)(() => Boolean),
3762
+ (0, server_1.Field)(() => Boolean, { description: 'Global flag controlling if updates are allowed for any user, or not. If set to 1, a GraqhQL mutation and stored procedure are created. Permissions are still required to perform the action but if this flag is set to 0, no user will be able to perform the action.' }),
3763
3763
  __metadata("design:type", Boolean)
3764
3764
  ], Entity_.prototype, "AllowUpdateAPI", void 0);
3765
3765
  __decorate([
3766
- (0, server_1.Field)(() => Boolean),
3766
+ (0, server_1.Field)(() => Boolean, { description: 'Global flag controlling if creates are allowed for any user, or not. If set to 1, a GraqhQL mutation and stored procedure are created. Permissions are still required to perform the action but if this flag is set to 0, no user will be able to perform the action.' }),
3767
3767
  __metadata("design:type", Boolean)
3768
3768
  ], Entity_.prototype, "AllowCreateAPI", void 0);
3769
3769
  __decorate([
3770
- (0, server_1.Field)(() => Boolean),
3770
+ (0, server_1.Field)(() => Boolean, { description: 'Global flag controlling if deletes are allowed for any user, or not. If set to 1, a GraqhQL mutation and stored procedure are created. Permissions are still required to perform the action but if this flag is set to 0, no user will be able to perform the action.' }),
3771
3771
  __metadata("design:type", Boolean)
3772
3772
  ], Entity_.prototype, "AllowDeleteAPI", void 0);
3773
3773
  __decorate([
3774
- (0, server_1.Field)(() => Boolean),
3774
+ (0, server_1.Field)(() => Boolean, { description: 'Set to 1 if a custom resolver has been created for the entity.' }),
3775
3775
  __metadata("design:type", Boolean)
3776
3776
  ], Entity_.prototype, "CustomResolverAPI", void 0);
3777
3777
  __decorate([
3778
- (0, server_1.Field)(() => Boolean),
3778
+ (0, server_1.Field)(() => Boolean, { description: 'Enabling this bit will result in search being possible at the API and UI layers' }),
3779
3779
  __metadata("design:type", Boolean)
3780
3780
  ], Entity_.prototype, "AllowUserSearchAPI", void 0);
3781
3781
  __decorate([
@@ -4006,6 +4006,10 @@ __decorate([
4006
4006
  (0, server_1.Field)(() => [mj_core_schema_server_object_types.FileEntityRecordLink_]),
4007
4007
  __metadata("design:type", Array)
4008
4008
  ], Entity_.prototype, "FileEntityRecordLinksArray", void 0);
4009
+ __decorate([
4010
+ (0, server_1.Field)(() => [mj_core_schema_server_object_types.UserViewCategory_]),
4011
+ __metadata("design:type", Array)
4012
+ ], Entity_.prototype, "UserViewCategoriesArray", void 0);
4009
4013
  exports.Entity_ = Entity_ = __decorate([
4010
4014
  (0, server_1.ObjectType)({ description: 'Catalog of all entities across all schemas' })
4011
4015
  ], Entity_);
@@ -4536,6 +4540,12 @@ let EntityResolverBase = class EntityResolverBase extends server_1.ResolverBase
4536
4540
  const result = this.ArrayMapFieldNamesToCodeNames('File Entity Record Links', await dataSource.query(sSQL));
4537
4541
  return result;
4538
4542
  }
4543
+ async UserViewCategoriesArray(entity_, { dataSource, userPayload }, pubSub) {
4544
+ this.CheckUserReadPermissions('User View Categories', userPayload);
4545
+ const sSQL = `SELECT * FROM [${config_1.mj_core_schema}].[vwUserViewCategories] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('User View Categories', userPayload, core_1.EntityPermissionType.Read, 'AND');
4546
+ const result = this.ArrayMapFieldNamesToCodeNames('User View Categories', await dataSource.query(sSQL));
4547
+ return result;
4548
+ }
4539
4549
  async CreateEntity(input, { dataSource, userPayload }, pubSub) {
4540
4550
  if (await this.BeforeCreate(dataSource, input)) {
4541
4551
  const entityObject = await new core_1.Metadata().GetEntityObject('Entities', this.GetUserFromPayload(userPayload));
@@ -4888,6 +4898,15 @@ __decorate([
4888
4898
  __metadata("design:paramtypes", [Entity_, Object, server_1.PubSubEngine]),
4889
4899
  __metadata("design:returntype", Promise)
4890
4900
  ], EntityResolverBase.prototype, "FileEntityRecordLinksArray", null);
4901
+ __decorate([
4902
+ (0, server_1.FieldResolver)(() => [mj_core_schema_server_object_types.UserViewCategory_]),
4903
+ __param(0, (0, server_1.Root)()),
4904
+ __param(1, (0, server_1.Ctx)()),
4905
+ __param(2, (0, server_1.PubSub)()),
4906
+ __metadata("design:type", Function),
4907
+ __metadata("design:paramtypes", [Entity_, Object, server_1.PubSubEngine]),
4908
+ __metadata("design:returntype", Promise)
4909
+ ], EntityResolverBase.prototype, "UserViewCategoriesArray", null);
4891
4910
  __decorate([
4892
4911
  (0, server_1.Mutation)(() => Entity_),
4893
4912
  __param(0, (0, server_1.Arg)('input', () => CreateEntityInput)),