@memberjunction/server 0.9.235 → 0.9.237
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/build.log.json +6 -0
- package/dist/apolloServer/TransactionPlugin.d.ts +4 -0
- package/dist/apolloServer/TransactionPlugin.d.ts.map +1 -0
- package/dist/apolloServer/index.d.ts +11 -0
- package/dist/apolloServer/index.d.ts.map +1 -0
- package/dist/auth/exampleNewUserSubClass.d.ts +6 -0
- package/dist/auth/exampleNewUserSubClass.d.ts.map +1 -0
- package/dist/auth/index.d.ts +30 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/newUsers.d.ts +5 -0
- package/dist/auth/newUsers.d.ts.map +1 -0
- package/dist/auth/tokenExpiredError.d.ts +5 -0
- package/dist/auth/tokenExpiredError.d.ts.map +1 -0
- package/dist/cache.d.ts +3 -0
- package/dist/cache.d.ts.map +1 -0
- package/dist/config.d.ts +193 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/context.d.ts +17 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/directives/Public.d.ts +4 -0
- package/dist/directives/Public.d.ts.map +1 -0
- package/dist/directives/index.d.ts +2 -0
- package/dist/directives/index.d.ts.map +1 -0
- package/dist/entitySubclasses/userViewEntity.server.d.ts +12 -0
- package/dist/entitySubclasses/userViewEntity.server.d.ts.map +1 -0
- package/dist/generated/generated.d.ts +4293 -0
- package/dist/generated/generated.d.ts.map +1 -0
- package/dist/generated/generated.js +1261 -33
- package/dist/generated/generated.js.map +1 -1
- package/dist/generic/PushStatusResolver.d.ts +14 -0
- package/dist/generic/PushStatusResolver.d.ts.map +1 -0
- package/dist/generic/ResolverBase.d.ts +25 -0
- package/dist/generic/ResolverBase.d.ts.map +1 -0
- package/dist/generic/RunViewResolver.d.ts +82 -0
- package/dist/generic/RunViewResolver.d.ts.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/orm.d.ts +4 -0
- package/dist/orm.d.ts.map +1 -0
- package/dist/resolvers/AskSkipResolver.d.ts +57 -0
- package/dist/resolvers/AskSkipResolver.d.ts.map +1 -0
- package/dist/resolvers/ColorResolver.d.ts +22 -0
- package/dist/resolvers/ColorResolver.d.ts.map +1 -0
- package/dist/resolvers/DatasetResolver.d.ts +42 -0
- package/dist/resolvers/DatasetResolver.d.ts.map +1 -0
- package/dist/resolvers/EntityRecordNameResolver.d.ts +20 -0
- package/dist/resolvers/EntityRecordNameResolver.d.ts.map +1 -0
- package/dist/resolvers/EntityResolver.d.ts +6 -0
- package/dist/resolvers/EntityResolver.d.ts.map +1 -0
- package/dist/resolvers/MergeRecordsResolver.d.ts +66 -0
- package/dist/resolvers/MergeRecordsResolver.d.ts.map +1 -0
- package/dist/resolvers/PotentialDuplicateRecordResolver.d.ts +22 -0
- package/dist/resolvers/PotentialDuplicateRecordResolver.d.ts.map +1 -0
- package/dist/resolvers/QueryResolver.d.ts +13 -0
- package/dist/resolvers/QueryResolver.d.ts.map +1 -0
- package/dist/resolvers/ReportResolver.d.ts +20 -0
- package/dist/resolvers/ReportResolver.d.ts.map +1 -0
- package/dist/resolvers/UserFavoriteResolver.d.ts +41 -0
- package/dist/resolvers/UserFavoriteResolver.d.ts.map +1 -0
- package/dist/resolvers/UserResolver.d.ts +10 -0
- package/dist/resolvers/UserResolver.d.ts.map +1 -0
- package/dist/resolvers/UserViewResolver.d.ts +13 -0
- package/dist/resolvers/UserViewResolver.d.ts.map +1 -0
- package/dist/types.d.ts +17 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/util.d.ts +4 -0
- package/dist/util.d.ts.map +1 -0
- package/package.json +11 -11
- package/src/generated/generated.ts +1301 -344
- package/tsconfig.json +31 -28
|
@@ -42,7 +42,7 @@ exports.UpdateQueueInput = exports.CreateQueueInput = exports.Queue_ = exports.Q
|
|
|
42
42
|
exports.WorkspaceItemResolver = exports.RunWorkspaceItemViewResult = exports.UpdateWorkspaceItemInput = exports.CreateWorkspaceItemInput = exports.WorkspaceItem_ = exports.WorkspaceResolver = exports.RunWorkspaceViewResult = exports.UpdateWorkspaceInput = exports.CreateWorkspaceInput = exports.Workspace_ = exports.TaggedItemResolver = exports.RunTaggedItemViewResult = exports.TaggedItem_ = exports.TagResolver = exports.RunTagViewResult = exports.Tag_ = exports.ResourceTypeResolver = exports.RunResourceTypeViewResult = exports.ResourceType_ = exports.ReportSnapshotResolver = exports.RunReportSnapshotViewResult = exports.UpdateReportSnapshotInput = exports.CreateReportSnapshotInput = exports.ReportSnapshot_ = exports.ReportResolver = exports.RunReportViewResult = exports.UpdateReportInput = exports.CreateReportInput = exports.Report_ = exports.OutputDeliveryTypeResolver = exports.RunOutputDeliveryTypeViewResult = exports.OutputDeliveryType_ = exports.OutputFormatTypeResolver = exports.RunOutputFormatTypeViewResult = exports.OutputFormatType_ = exports.OutputTriggerTypeResolver = exports.RunOutputTriggerTypeViewResult = exports.OutputTriggerType_ = exports.DashboardResolver = exports.RunDashboardViewResult = exports.UpdateDashboardInput = exports.CreateDashboardInput = exports.Dashboard_ = exports.QueueTaskResolver = exports.RunQueueTaskViewResult = exports.UpdateQueueTaskInput = exports.CreateQueueTaskInput = exports.QueueTask_ = exports.QueueResolver = exports.RunQueueViewResult = void 0;
|
|
43
43
|
exports.RunQueryCategoryViewResult = exports.UpdateQueryCategoryInput = exports.CreateQueryCategoryInput = exports.QueryCategory_ = exports.QueryFieldResolver = exports.RunQueryFieldViewResult = exports.UpdateQueryFieldInput = exports.CreateQueryFieldInput = exports.QueryField_ = exports.RecordMergeDeletionLogResolver = exports.RunRecordMergeDeletionLogViewResult = exports.UpdateRecordMergeDeletionLogInput = exports.CreateRecordMergeDeletionLogInput = exports.RecordMergeDeletionLog_ = exports.RecordMergeLogResolver = exports.RunRecordMergeLogViewResult = exports.UpdateRecordMergeLogInput = exports.CreateRecordMergeLogInput = exports.RecordMergeLog_ = exports.CompanyIntegrationRecordMapResolver = exports.RunCompanyIntegrationRecordMapViewResult = exports.UpdateCompanyIntegrationRecordMapInput = exports.CreateCompanyIntegrationRecordMapInput = exports.CompanyIntegrationRecordMap_ = exports.SchemaInfoResolver = exports.RunSchemaInfoViewResult = exports.UpdateSchemaInfoInput = exports.CreateSchemaInfoInput = exports.SchemaInfo_ = exports.UserNotificationResolver = exports.RunUserNotificationViewResult = exports.UpdateUserNotificationInput = exports.CreateUserNotificationInput = exports.UserNotification_ = exports.ConversationResolver = exports.RunConversationViewResult = exports.UpdateConversationInput = exports.CreateConversationInput = exports.Conversation_ = exports.ConversationDetailResolver = exports.RunConversationDetailViewResult = exports.UpdateConversationDetailInput = exports.CreateConversationDetailInput = exports.ConversationDetail_ = exports.DatasetItemResolver = exports.RunDatasetItemViewResult = exports.DatasetItem_ = exports.DatasetResolver = exports.RunDatasetViewResult = exports.Dataset_ = void 0;
|
|
44
44
|
exports.RunDataContextViewResult = exports.UpdateDataContextInput = exports.CreateDataContextInput = exports.DataContext_ = exports.DataContextItemResolver = exports.RunDataContextItemViewResult = exports.UpdateDataContextItemInput = exports.CreateDataContextItemInput = exports.DataContextItem_ = exports.EntityDocumentResolver = exports.RunEntityDocumentViewResult = exports.UpdateEntityDocumentInput = exports.CreateEntityDocumentInput = exports.EntityDocument_ = exports.EntityRecordDocumentResolver = exports.RunEntityRecordDocumentViewResult = exports.UpdateEntityRecordDocumentInput = exports.CreateEntityRecordDocumentInput = exports.EntityRecordDocument_ = exports.VectorDatabaseResolver = exports.RunVectorDatabaseViewResult = exports.UpdateVectorDatabaseInput = exports.CreateVectorDatabaseInput = exports.VectorDatabase_ = exports.EntityDocumentRunResolver = exports.RunEntityDocumentRunViewResult = exports.UpdateEntityDocumentRunInput = exports.CreateEntityDocumentRunInput = exports.EntityDocumentRun_ = exports.EntityDocumentTypeResolver = exports.RunEntityDocumentTypeViewResult = exports.UpdateEntityDocumentTypeInput = exports.CreateEntityDocumentTypeInput = exports.EntityDocumentType_ = exports.VectorIndexResolver = exports.RunVectorIndexViewResult = exports.UpdateVectorIndexInput = exports.CreateVectorIndexInput = exports.VectorIndex_ = exports.QueryPermissionResolver = exports.RunQueryPermissionViewResult = exports.UpdateQueryPermissionInput = exports.CreateQueryPermissionInput = exports.QueryPermission_ = exports.QueryResolver = exports.RunQueryViewResult = exports.UpdateQueryInput = exports.CreateQueryInput = exports.Query_ = exports.QueryCategoryResolver = void 0;
|
|
45
|
-
exports.ReportCategoryResolver = exports.RunReportCategoryViewResult = exports.UpdateReportCategoryInput = exports.CreateReportCategoryInput = exports.ReportCategory_ = exports.DashboardCategoryResolver = exports.RunDashboardCategoryViewResult = exports.UpdateDashboardCategoryInput = exports.CreateDashboardCategoryInput = exports.DashboardCategory_ = exports.UserViewCategoryResolver = exports.RunUserViewCategoryViewResult = exports.UpdateUserViewCategoryInput = exports.CreateUserViewCategoryInput = exports.UserViewCategory_ = exports.DataContextResolver = void 0;
|
|
45
|
+
exports.FileEntityRecordLinkResolver = exports.RunFileEntityRecordLinkViewResult = exports.UpdateFileEntityRecordLinkInput = exports.CreateFileEntityRecordLinkInput = exports.FileEntityRecordLink_ = exports.FileCategoryResolver = exports.RunFileCategoryViewResult = exports.UpdateFileCategoryInput = exports.CreateFileCategoryInput = exports.FileCategory_ = exports.FileResolver = exports.RunFileViewResult = exports.UpdateFileInput = exports.CreateFileInput = exports.File_ = exports.FileStorageProviderResolver = exports.RunFileStorageProviderViewResult = exports.UpdateFileStorageProviderInput = exports.CreateFileStorageProviderInput = exports.FileStorageProvider_ = exports.ReportCategoryResolver = exports.RunReportCategoryViewResult = exports.UpdateReportCategoryInput = exports.CreateReportCategoryInput = exports.ReportCategory_ = exports.DashboardCategoryResolver = exports.RunDashboardCategoryViewResult = exports.UpdateDashboardCategoryInput = exports.CreateDashboardCategoryInput = exports.DashboardCategory_ = exports.UserViewCategoryResolver = exports.RunUserViewCategoryViewResult = exports.UpdateUserViewCategoryInput = exports.CreateUserViewCategoryInput = exports.UserViewCategory_ = exports.DataContextResolver = void 0;
|
|
46
46
|
const server_1 = require("@memberjunction/server");
|
|
47
47
|
const core_1 = require("@memberjunction/core");
|
|
48
48
|
const class_validator_1 = require("class-validator");
|
|
@@ -3921,6 +3921,10 @@ __decorate([
|
|
|
3921
3921
|
(0, server_1.Field)(() => [mj_core_schema_server_object_types.EntityRecordDocument_]),
|
|
3922
3922
|
__metadata("design:type", Array)
|
|
3923
3923
|
], Entity_.prototype, "EntityRecordDocumentsArray", void 0);
|
|
3924
|
+
__decorate([
|
|
3925
|
+
(0, server_1.Field)(() => [mj_core_schema_server_object_types.FileEntityRecordLink_]),
|
|
3926
|
+
__metadata("design:type", Array)
|
|
3927
|
+
], Entity_.prototype, "FileEntityRecordLinksArray", void 0);
|
|
3924
3928
|
exports.Entity_ = Entity_ = __decorate([
|
|
3925
3929
|
(0, server_1.ObjectType)()
|
|
3926
3930
|
], Entity_);
|
|
@@ -4445,6 +4449,12 @@ let EntityResolverBase = class EntityResolverBase extends server_1.ResolverBase
|
|
|
4445
4449
|
const result = this.ArrayMapFieldNamesToCodeNames('Entity Record Documents', await dataSource.query(sSQL));
|
|
4446
4450
|
return result;
|
|
4447
4451
|
}
|
|
4452
|
+
async FileEntityRecordLinksArray(entity_, { dataSource, userPayload }, pubSub) {
|
|
4453
|
+
this.CheckUserReadPermissions('File Entity Record Links', userPayload);
|
|
4454
|
+
const sSQL = `SELECT * FROM [${config_1.mj_core_schema}].[vwFileEntityRecordLinks] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('File Entity Record Links', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
4455
|
+
const result = this.ArrayMapFieldNamesToCodeNames('File Entity Record Links', await dataSource.query(sSQL));
|
|
4456
|
+
return result;
|
|
4457
|
+
}
|
|
4448
4458
|
async CreateEntity(input, { dataSource, userPayload }, pubSub) {
|
|
4449
4459
|
if (await this.BeforeCreate(dataSource, input)) {
|
|
4450
4460
|
const entityObject = await new core_1.Metadata().GetEntityObject('Entities', this.GetUserFromPayload(userPayload));
|
|
@@ -4788,6 +4798,15 @@ __decorate([
|
|
|
4788
4798
|
__metadata("design:paramtypes", [Entity_, Object, server_1.PubSubEngine]),
|
|
4789
4799
|
__metadata("design:returntype", Promise)
|
|
4790
4800
|
], EntityResolverBase.prototype, "EntityRecordDocumentsArray", null);
|
|
4801
|
+
__decorate([
|
|
4802
|
+
(0, server_1.FieldResolver)(() => [mj_core_schema_server_object_types.FileEntityRecordLink_]),
|
|
4803
|
+
__param(0, (0, server_1.Root)()),
|
|
4804
|
+
__param(1, (0, server_1.Ctx)()),
|
|
4805
|
+
__param(2, (0, server_1.PubSub)()),
|
|
4806
|
+
__metadata("design:type", Function),
|
|
4807
|
+
__metadata("design:paramtypes", [Entity_, Object, server_1.PubSubEngine]),
|
|
4808
|
+
__metadata("design:returntype", Promise)
|
|
4809
|
+
], EntityResolverBase.prototype, "FileEntityRecordLinksArray", null);
|
|
4791
4810
|
__decorate([
|
|
4792
4811
|
(0, server_1.Mutation)(() => Entity_),
|
|
4793
4812
|
__param(0, (0, server_1.Arg)('input', () => CreateEntityInput)),
|
|
@@ -5302,6 +5321,28 @@ let UserResolverBase = class UserResolverBase extends server_1.ResolverBase {
|
|
|
5302
5321
|
async AfterUpdate(dataSource, input) {
|
|
5303
5322
|
const i = input, d = dataSource;
|
|
5304
5323
|
}
|
|
5324
|
+
async DeleteUser(ID, { dataSource, userPayload }, pubSub) {
|
|
5325
|
+
if (await this.BeforeDelete(dataSource, ID)) {
|
|
5326
|
+
const entityObject = await new core_1.Metadata().GetEntityObject('Users', this.GetUserFromPayload(userPayload));
|
|
5327
|
+
await entityObject.Load(ID);
|
|
5328
|
+
const returnValue = entityObject.GetAll();
|
|
5329
|
+
if (await entityObject.Delete()) {
|
|
5330
|
+
await this.AfterDelete(dataSource, ID);
|
|
5331
|
+
return returnValue;
|
|
5332
|
+
}
|
|
5333
|
+
else
|
|
5334
|
+
return null;
|
|
5335
|
+
}
|
|
5336
|
+
else
|
|
5337
|
+
return null;
|
|
5338
|
+
}
|
|
5339
|
+
async BeforeDelete(dataSource, ID) {
|
|
5340
|
+
const i = ID, d = dataSource;
|
|
5341
|
+
return true;
|
|
5342
|
+
}
|
|
5343
|
+
async AfterDelete(dataSource, ID) {
|
|
5344
|
+
const i = ID, d = dataSource;
|
|
5345
|
+
}
|
|
5305
5346
|
};
|
|
5306
5347
|
exports.UserResolverBase = UserResolverBase;
|
|
5307
5348
|
__decorate([
|
|
@@ -5528,6 +5569,15 @@ __decorate([
|
|
|
5528
5569
|
__metadata("design:paramtypes", [UpdateUserInput, Object, server_1.PubSubEngine]),
|
|
5529
5570
|
__metadata("design:returntype", Promise)
|
|
5530
5571
|
], UserResolverBase.prototype, "UpdateUser", null);
|
|
5572
|
+
__decorate([
|
|
5573
|
+
(0, server_1.Mutation)(() => User_),
|
|
5574
|
+
__param(0, (0, server_1.Arg)('ID', () => server_1.Int)),
|
|
5575
|
+
__param(1, (0, server_1.Ctx)()),
|
|
5576
|
+
__param(2, (0, server_1.PubSub)()),
|
|
5577
|
+
__metadata("design:type", Function),
|
|
5578
|
+
__metadata("design:paramtypes", [Number, Object, server_1.PubSubEngine]),
|
|
5579
|
+
__metadata("design:returntype", Promise)
|
|
5580
|
+
], UserResolverBase.prototype, "DeleteUser", null);
|
|
5531
5581
|
exports.UserResolverBase = UserResolverBase = __decorate([
|
|
5532
5582
|
(0, server_1.Resolver)(User_)
|
|
5533
5583
|
], UserResolverBase);
|
|
@@ -7714,10 +7764,6 @@ exports.ApplicationEntity_ = ApplicationEntity_ = __decorate([
|
|
|
7714
7764
|
let CreateApplicationEntityInput = class CreateApplicationEntityInput {
|
|
7715
7765
|
};
|
|
7716
7766
|
exports.CreateApplicationEntityInput = CreateApplicationEntityInput;
|
|
7717
|
-
__decorate([
|
|
7718
|
-
(0, server_1.Field)(() => server_1.Int),
|
|
7719
|
-
__metadata("design:type", Number)
|
|
7720
|
-
], CreateApplicationEntityInput.prototype, "ID", void 0);
|
|
7721
7767
|
__decorate([
|
|
7722
7768
|
(0, server_1.Field)({ nullable: true }),
|
|
7723
7769
|
__metadata("design:type", String)
|
|
@@ -8039,10 +8085,6 @@ exports.EntityPermission_ = EntityPermission_ = __decorate([
|
|
|
8039
8085
|
let CreateEntityPermissionInput = class CreateEntityPermissionInput {
|
|
8040
8086
|
};
|
|
8041
8087
|
exports.CreateEntityPermissionInput = CreateEntityPermissionInput;
|
|
8042
|
-
__decorate([
|
|
8043
|
-
(0, server_1.Field)(() => server_1.Int),
|
|
8044
|
-
__metadata("design:type", Number)
|
|
8045
|
-
], CreateEntityPermissionInput.prototype, "ID", void 0);
|
|
8046
8088
|
__decorate([
|
|
8047
8089
|
(0, server_1.Field)(() => server_1.Int),
|
|
8048
8090
|
__metadata("design:type", Number)
|
|
@@ -8372,10 +8414,6 @@ exports.UserApplicationEntity_ = UserApplicationEntity_ = __decorate([
|
|
|
8372
8414
|
let CreateUserApplicationEntityInput = class CreateUserApplicationEntityInput {
|
|
8373
8415
|
};
|
|
8374
8416
|
exports.CreateUserApplicationEntityInput = CreateUserApplicationEntityInput;
|
|
8375
|
-
__decorate([
|
|
8376
|
-
(0, server_1.Field)(() => server_1.Int),
|
|
8377
|
-
__metadata("design:type", Number)
|
|
8378
|
-
], CreateUserApplicationEntityInput.prototype, "ID", void 0);
|
|
8379
8417
|
__decorate([
|
|
8380
8418
|
(0, server_1.Field)(() => server_1.Int),
|
|
8381
8419
|
__metadata("design:type", Number)
|
|
@@ -8739,6 +8777,28 @@ let UserApplicationResolver = class UserApplicationResolver extends server_1.Res
|
|
|
8739
8777
|
async AfterUpdate(dataSource, input) {
|
|
8740
8778
|
const i = input, d = dataSource;
|
|
8741
8779
|
}
|
|
8780
|
+
async DeleteUserApplication(ID, { dataSource, userPayload }, pubSub) {
|
|
8781
|
+
if (await this.BeforeDelete(dataSource, ID)) {
|
|
8782
|
+
const entityObject = await new core_1.Metadata().GetEntityObject('User Applications', this.GetUserFromPayload(userPayload));
|
|
8783
|
+
await entityObject.Load(ID);
|
|
8784
|
+
const returnValue = entityObject.GetAll();
|
|
8785
|
+
if (await entityObject.Delete()) {
|
|
8786
|
+
await this.AfterDelete(dataSource, ID);
|
|
8787
|
+
return returnValue;
|
|
8788
|
+
}
|
|
8789
|
+
else
|
|
8790
|
+
return null;
|
|
8791
|
+
}
|
|
8792
|
+
else
|
|
8793
|
+
return null;
|
|
8794
|
+
}
|
|
8795
|
+
async BeforeDelete(dataSource, ID) {
|
|
8796
|
+
const i = ID, d = dataSource;
|
|
8797
|
+
return true;
|
|
8798
|
+
}
|
|
8799
|
+
async AfterDelete(dataSource, ID) {
|
|
8800
|
+
const i = ID, d = dataSource;
|
|
8801
|
+
}
|
|
8742
8802
|
};
|
|
8743
8803
|
exports.UserApplicationResolver = UserApplicationResolver;
|
|
8744
8804
|
__decorate([
|
|
@@ -8795,6 +8855,15 @@ __decorate([
|
|
|
8795
8855
|
__metadata("design:paramtypes", [UpdateUserApplicationInput, Object, server_1.PubSubEngine]),
|
|
8796
8856
|
__metadata("design:returntype", Promise)
|
|
8797
8857
|
], UserApplicationResolver.prototype, "UpdateUserApplication", null);
|
|
8858
|
+
__decorate([
|
|
8859
|
+
(0, server_1.Mutation)(() => UserApplication_),
|
|
8860
|
+
__param(0, (0, server_1.Arg)('ID', () => server_1.Int)),
|
|
8861
|
+
__param(1, (0, server_1.Ctx)()),
|
|
8862
|
+
__param(2, (0, server_1.PubSub)()),
|
|
8863
|
+
__metadata("design:type", Function),
|
|
8864
|
+
__metadata("design:paramtypes", [Number, Object, server_1.PubSubEngine]),
|
|
8865
|
+
__metadata("design:returntype", Promise)
|
|
8866
|
+
], UserApplicationResolver.prototype, "DeleteUserApplication", null);
|
|
8798
8867
|
exports.UserApplicationResolver = UserApplicationResolver = __decorate([
|
|
8799
8868
|
(0, server_1.Resolver)(UserApplication_)
|
|
8800
8869
|
], UserApplicationResolver);
|
|
@@ -9053,10 +9122,6 @@ exports.List_ = List_ = __decorate([
|
|
|
9053
9122
|
let CreateListInput = class CreateListInput {
|
|
9054
9123
|
};
|
|
9055
9124
|
exports.CreateListInput = CreateListInput;
|
|
9056
|
-
__decorate([
|
|
9057
|
-
(0, server_1.Field)(() => server_1.Int),
|
|
9058
|
-
__metadata("design:type", Number)
|
|
9059
|
-
], CreateListInput.prototype, "ID", void 0);
|
|
9060
9125
|
__decorate([
|
|
9061
9126
|
(0, server_1.Field)(),
|
|
9062
9127
|
__metadata("design:type", String)
|
|
@@ -9341,10 +9406,6 @@ exports.ListDetail_ = ListDetail_ = __decorate([
|
|
|
9341
9406
|
let CreateListDetailInput = class CreateListDetailInput {
|
|
9342
9407
|
};
|
|
9343
9408
|
exports.CreateListDetailInput = CreateListDetailInput;
|
|
9344
|
-
__decorate([
|
|
9345
|
-
(0, server_1.Field)(() => server_1.Int),
|
|
9346
|
-
__metadata("design:type", Number)
|
|
9347
|
-
], CreateListDetailInput.prototype, "ID", void 0);
|
|
9348
9409
|
__decorate([
|
|
9349
9410
|
(0, server_1.Field)(() => server_1.Int),
|
|
9350
9411
|
__metadata("design:type", Number)
|
|
@@ -9604,10 +9665,6 @@ exports.UserViewRun_ = UserViewRun_ = __decorate([
|
|
|
9604
9665
|
let CreateUserViewRunInput = class CreateUserViewRunInput {
|
|
9605
9666
|
};
|
|
9606
9667
|
exports.CreateUserViewRunInput = CreateUserViewRunInput;
|
|
9607
|
-
__decorate([
|
|
9608
|
-
(0, server_1.Field)(() => server_1.Int),
|
|
9609
|
-
__metadata("design:type", Number)
|
|
9610
|
-
], CreateUserViewRunInput.prototype, "ID", void 0);
|
|
9611
9668
|
__decorate([
|
|
9612
9669
|
(0, server_1.Field)(() => server_1.Int),
|
|
9613
9670
|
__metadata("design:type", Number)
|
|
@@ -9841,10 +9898,6 @@ exports.UserViewRunDetail_ = UserViewRunDetail_ = __decorate([
|
|
|
9841
9898
|
let CreateUserViewRunDetailInput = class CreateUserViewRunDetailInput {
|
|
9842
9899
|
};
|
|
9843
9900
|
exports.CreateUserViewRunDetailInput = CreateUserViewRunDetailInput;
|
|
9844
|
-
__decorate([
|
|
9845
|
-
(0, server_1.Field)(() => server_1.Int),
|
|
9846
|
-
__metadata("design:type", Number)
|
|
9847
|
-
], CreateUserViewRunDetailInput.prototype, "ID", void 0);
|
|
9848
9901
|
__decorate([
|
|
9849
9902
|
(0, server_1.Field)(() => server_1.Int),
|
|
9850
9903
|
__metadata("design:type", Number)
|
|
@@ -11017,6 +11070,28 @@ let UserRoleResolver = class UserRoleResolver extends server_1.ResolverBase {
|
|
|
11017
11070
|
}
|
|
11018
11071
|
async AfterCreate(dataSource, input) {
|
|
11019
11072
|
}
|
|
11073
|
+
async DeleteUserRole(ID, { dataSource, userPayload }, pubSub) {
|
|
11074
|
+
if (await this.BeforeDelete(dataSource, ID)) {
|
|
11075
|
+
const entityObject = await new core_1.Metadata().GetEntityObject('User Roles', this.GetUserFromPayload(userPayload));
|
|
11076
|
+
await entityObject.Load(ID);
|
|
11077
|
+
const returnValue = entityObject.GetAll();
|
|
11078
|
+
if (await entityObject.Delete()) {
|
|
11079
|
+
await this.AfterDelete(dataSource, ID);
|
|
11080
|
+
return returnValue;
|
|
11081
|
+
}
|
|
11082
|
+
else
|
|
11083
|
+
return null;
|
|
11084
|
+
}
|
|
11085
|
+
else
|
|
11086
|
+
return null;
|
|
11087
|
+
}
|
|
11088
|
+
async BeforeDelete(dataSource, ID) {
|
|
11089
|
+
const i = ID, d = dataSource;
|
|
11090
|
+
return true;
|
|
11091
|
+
}
|
|
11092
|
+
async AfterDelete(dataSource, ID) {
|
|
11093
|
+
const i = ID, d = dataSource;
|
|
11094
|
+
}
|
|
11020
11095
|
};
|
|
11021
11096
|
exports.UserRoleResolver = UserRoleResolver;
|
|
11022
11097
|
__decorate([
|
|
@@ -11072,6 +11147,15 @@ __decorate([
|
|
|
11072
11147
|
__metadata("design:paramtypes", [CreateUserRoleInput, Object, server_1.PubSubEngine]),
|
|
11073
11148
|
__metadata("design:returntype", Promise)
|
|
11074
11149
|
], UserRoleResolver.prototype, "CreateUserRole", null);
|
|
11150
|
+
__decorate([
|
|
11151
|
+
(0, server_1.Mutation)(() => UserRole_),
|
|
11152
|
+
__param(0, (0, server_1.Arg)('ID', () => server_1.Int)),
|
|
11153
|
+
__param(1, (0, server_1.Ctx)()),
|
|
11154
|
+
__param(2, (0, server_1.PubSub)()),
|
|
11155
|
+
__metadata("design:type", Function),
|
|
11156
|
+
__metadata("design:paramtypes", [Number, Object, server_1.PubSubEngine]),
|
|
11157
|
+
__metadata("design:returntype", Promise)
|
|
11158
|
+
], UserRoleResolver.prototype, "DeleteUserRole", null);
|
|
11075
11159
|
exports.UserRoleResolver = UserRoleResolver = __decorate([
|
|
11076
11160
|
(0, server_1.Resolver)(UserRole_)
|
|
11077
11161
|
], UserRoleResolver);
|
|
@@ -17952,6 +18036,28 @@ let UserNotificationResolver = class UserNotificationResolver extends server_1.R
|
|
|
17952
18036
|
async AfterUpdate(dataSource, input) {
|
|
17953
18037
|
const i = input, d = dataSource;
|
|
17954
18038
|
}
|
|
18039
|
+
async DeleteUserNotification(ID, { dataSource, userPayload }, pubSub) {
|
|
18040
|
+
if (await this.BeforeDelete(dataSource, ID)) {
|
|
18041
|
+
const entityObject = await new core_1.Metadata().GetEntityObject('User Notifications', this.GetUserFromPayload(userPayload));
|
|
18042
|
+
await entityObject.Load(ID);
|
|
18043
|
+
const returnValue = entityObject.GetAll();
|
|
18044
|
+
if (await entityObject.Delete()) {
|
|
18045
|
+
await this.AfterDelete(dataSource, ID);
|
|
18046
|
+
return returnValue;
|
|
18047
|
+
}
|
|
18048
|
+
else
|
|
18049
|
+
return null;
|
|
18050
|
+
}
|
|
18051
|
+
else
|
|
18052
|
+
return null;
|
|
18053
|
+
}
|
|
18054
|
+
async BeforeDelete(dataSource, ID) {
|
|
18055
|
+
const i = ID, d = dataSource;
|
|
18056
|
+
return true;
|
|
18057
|
+
}
|
|
18058
|
+
async AfterDelete(dataSource, ID) {
|
|
18059
|
+
const i = ID, d = dataSource;
|
|
18060
|
+
}
|
|
17955
18061
|
};
|
|
17956
18062
|
exports.UserNotificationResolver = UserNotificationResolver;
|
|
17957
18063
|
__decorate([
|
|
@@ -18008,6 +18114,15 @@ __decorate([
|
|
|
18008
18114
|
__metadata("design:paramtypes", [UpdateUserNotificationInput, Object, server_1.PubSubEngine]),
|
|
18009
18115
|
__metadata("design:returntype", Promise)
|
|
18010
18116
|
], UserNotificationResolver.prototype, "UpdateUserNotification", null);
|
|
18117
|
+
__decorate([
|
|
18118
|
+
(0, server_1.Mutation)(() => UserNotification_),
|
|
18119
|
+
__param(0, (0, server_1.Arg)('ID', () => server_1.Int)),
|
|
18120
|
+
__param(1, (0, server_1.Ctx)()),
|
|
18121
|
+
__param(2, (0, server_1.PubSub)()),
|
|
18122
|
+
__metadata("design:type", Function),
|
|
18123
|
+
__metadata("design:paramtypes", [Number, Object, server_1.PubSubEngine]),
|
|
18124
|
+
__metadata("design:returntype", Promise)
|
|
18125
|
+
], UserNotificationResolver.prototype, "DeleteUserNotification", null);
|
|
18011
18126
|
exports.UserNotificationResolver = UserNotificationResolver = __decorate([
|
|
18012
18127
|
(0, server_1.Resolver)(UserNotification_)
|
|
18013
18128
|
], UserNotificationResolver);
|
|
@@ -22555,6 +22670,28 @@ let UserViewCategoryResolver = class UserViewCategoryResolver extends server_1.R
|
|
|
22555
22670
|
async AfterUpdate(dataSource, input) {
|
|
22556
22671
|
const i = input, d = dataSource;
|
|
22557
22672
|
}
|
|
22673
|
+
async DeleteUserViewCategory(ID, { dataSource, userPayload }, pubSub) {
|
|
22674
|
+
if (await this.BeforeDelete(dataSource, ID)) {
|
|
22675
|
+
const entityObject = await new core_1.Metadata().GetEntityObject('User View Categories', this.GetUserFromPayload(userPayload));
|
|
22676
|
+
await entityObject.Load(ID);
|
|
22677
|
+
const returnValue = entityObject.GetAll();
|
|
22678
|
+
if (await entityObject.Delete()) {
|
|
22679
|
+
await this.AfterDelete(dataSource, ID);
|
|
22680
|
+
return returnValue;
|
|
22681
|
+
}
|
|
22682
|
+
else
|
|
22683
|
+
return null;
|
|
22684
|
+
}
|
|
22685
|
+
else
|
|
22686
|
+
return null;
|
|
22687
|
+
}
|
|
22688
|
+
async BeforeDelete(dataSource, ID) {
|
|
22689
|
+
const i = ID, d = dataSource;
|
|
22690
|
+
return true;
|
|
22691
|
+
}
|
|
22692
|
+
async AfterDelete(dataSource, ID) {
|
|
22693
|
+
const i = ID, d = dataSource;
|
|
22694
|
+
}
|
|
22558
22695
|
};
|
|
22559
22696
|
exports.UserViewCategoryResolver = UserViewCategoryResolver;
|
|
22560
22697
|
__decorate([
|
|
@@ -22629,6 +22766,15 @@ __decorate([
|
|
|
22629
22766
|
__metadata("design:paramtypes", [UpdateUserViewCategoryInput, Object, server_1.PubSubEngine]),
|
|
22630
22767
|
__metadata("design:returntype", Promise)
|
|
22631
22768
|
], UserViewCategoryResolver.prototype, "UpdateUserViewCategory", null);
|
|
22769
|
+
__decorate([
|
|
22770
|
+
(0, server_1.Mutation)(() => UserViewCategory_),
|
|
22771
|
+
__param(0, (0, server_1.Arg)('ID', () => server_1.Int)),
|
|
22772
|
+
__param(1, (0, server_1.Ctx)()),
|
|
22773
|
+
__param(2, (0, server_1.PubSub)()),
|
|
22774
|
+
__metadata("design:type", Function),
|
|
22775
|
+
__metadata("design:paramtypes", [Number, Object, server_1.PubSubEngine]),
|
|
22776
|
+
__metadata("design:returntype", Promise)
|
|
22777
|
+
], UserViewCategoryResolver.prototype, "DeleteUserViewCategory", null);
|
|
22632
22778
|
exports.UserViewCategoryResolver = UserViewCategoryResolver = __decorate([
|
|
22633
22779
|
(0, server_1.Resolver)(UserViewCategory_)
|
|
22634
22780
|
], UserViewCategoryResolver);
|
|
@@ -22681,10 +22827,6 @@ exports.DashboardCategory_ = DashboardCategory_ = __decorate([
|
|
|
22681
22827
|
let CreateDashboardCategoryInput = class CreateDashboardCategoryInput {
|
|
22682
22828
|
};
|
|
22683
22829
|
exports.CreateDashboardCategoryInput = CreateDashboardCategoryInput;
|
|
22684
|
-
__decorate([
|
|
22685
|
-
(0, server_1.Field)(() => server_1.Int),
|
|
22686
|
-
__metadata("design:type", Number)
|
|
22687
|
-
], CreateDashboardCategoryInput.prototype, "ID", void 0);
|
|
22688
22830
|
__decorate([
|
|
22689
22831
|
(0, server_1.Field)(),
|
|
22690
22832
|
__metadata("design:type", String)
|
|
@@ -23170,4 +23312,1090 @@ __decorate([
|
|
|
23170
23312
|
exports.ReportCategoryResolver = ReportCategoryResolver = __decorate([
|
|
23171
23313
|
(0, server_1.Resolver)(ReportCategory_)
|
|
23172
23314
|
], ReportCategoryResolver);
|
|
23315
|
+
let FileStorageProvider_ = class FileStorageProvider_ {
|
|
23316
|
+
};
|
|
23317
|
+
exports.FileStorageProvider_ = FileStorageProvider_;
|
|
23318
|
+
__decorate([
|
|
23319
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
23320
|
+
__metadata("design:type", Number)
|
|
23321
|
+
], FileStorageProvider_.prototype, "ID", void 0);
|
|
23322
|
+
__decorate([
|
|
23323
|
+
(0, server_1.Field)(),
|
|
23324
|
+
(0, class_validator_1.MaxLength)(100),
|
|
23325
|
+
__metadata("design:type", String)
|
|
23326
|
+
], FileStorageProvider_.prototype, "Name", void 0);
|
|
23327
|
+
__decorate([
|
|
23328
|
+
(0, server_1.Field)({ nullable: true }),
|
|
23329
|
+
__metadata("design:type", String)
|
|
23330
|
+
], FileStorageProvider_.prototype, "Description", void 0);
|
|
23331
|
+
__decorate([
|
|
23332
|
+
(0, server_1.Field)(),
|
|
23333
|
+
(0, class_validator_1.MaxLength)(200),
|
|
23334
|
+
__metadata("design:type", String)
|
|
23335
|
+
], FileStorageProvider_.prototype, "ServerDriverKey", void 0);
|
|
23336
|
+
__decorate([
|
|
23337
|
+
(0, server_1.Field)(),
|
|
23338
|
+
(0, class_validator_1.MaxLength)(200),
|
|
23339
|
+
__metadata("design:type", String)
|
|
23340
|
+
], FileStorageProvider_.prototype, "ClientDriverKey", void 0);
|
|
23341
|
+
__decorate([
|
|
23342
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
23343
|
+
__metadata("design:type", Number)
|
|
23344
|
+
], FileStorageProvider_.prototype, "Priority", void 0);
|
|
23345
|
+
__decorate([
|
|
23346
|
+
(0, server_1.Field)(() => Boolean),
|
|
23347
|
+
__metadata("design:type", Boolean)
|
|
23348
|
+
], FileStorageProvider_.prototype, "IsActive", void 0);
|
|
23349
|
+
__decorate([
|
|
23350
|
+
(0, server_1.Field)(),
|
|
23351
|
+
(0, class_validator_1.MaxLength)(8),
|
|
23352
|
+
__metadata("design:type", Date)
|
|
23353
|
+
], FileStorageProvider_.prototype, "CreatedAt", void 0);
|
|
23354
|
+
__decorate([
|
|
23355
|
+
(0, server_1.Field)(),
|
|
23356
|
+
(0, class_validator_1.MaxLength)(8),
|
|
23357
|
+
__metadata("design:type", Date)
|
|
23358
|
+
], FileStorageProvider_.prototype, "UpdatedAt", void 0);
|
|
23359
|
+
__decorate([
|
|
23360
|
+
(0, server_1.Field)(() => [mj_core_schema_server_object_types.File_]),
|
|
23361
|
+
__metadata("design:type", Array)
|
|
23362
|
+
], FileStorageProvider_.prototype, "FilesArray", void 0);
|
|
23363
|
+
exports.FileStorageProvider_ = FileStorageProvider_ = __decorate([
|
|
23364
|
+
(0, server_1.ObjectType)()
|
|
23365
|
+
], FileStorageProvider_);
|
|
23366
|
+
let CreateFileStorageProviderInput = class CreateFileStorageProviderInput {
|
|
23367
|
+
};
|
|
23368
|
+
exports.CreateFileStorageProviderInput = CreateFileStorageProviderInput;
|
|
23369
|
+
__decorate([
|
|
23370
|
+
(0, server_1.Field)(),
|
|
23371
|
+
__metadata("design:type", String)
|
|
23372
|
+
], CreateFileStorageProviderInput.prototype, "Name", void 0);
|
|
23373
|
+
__decorate([
|
|
23374
|
+
(0, server_1.Field)({ nullable: true }),
|
|
23375
|
+
__metadata("design:type", String)
|
|
23376
|
+
], CreateFileStorageProviderInput.prototype, "Description", void 0);
|
|
23377
|
+
__decorate([
|
|
23378
|
+
(0, server_1.Field)(),
|
|
23379
|
+
__metadata("design:type", String)
|
|
23380
|
+
], CreateFileStorageProviderInput.prototype, "ServerDriverKey", void 0);
|
|
23381
|
+
__decorate([
|
|
23382
|
+
(0, server_1.Field)(),
|
|
23383
|
+
__metadata("design:type", String)
|
|
23384
|
+
], CreateFileStorageProviderInput.prototype, "ClientDriverKey", void 0);
|
|
23385
|
+
__decorate([
|
|
23386
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
23387
|
+
__metadata("design:type", Number)
|
|
23388
|
+
], CreateFileStorageProviderInput.prototype, "Priority", void 0);
|
|
23389
|
+
__decorate([
|
|
23390
|
+
(0, server_1.Field)(() => Boolean),
|
|
23391
|
+
__metadata("design:type", Boolean)
|
|
23392
|
+
], CreateFileStorageProviderInput.prototype, "IsActive", void 0);
|
|
23393
|
+
exports.CreateFileStorageProviderInput = CreateFileStorageProviderInput = __decorate([
|
|
23394
|
+
(0, server_1.InputType)()
|
|
23395
|
+
], CreateFileStorageProviderInput);
|
|
23396
|
+
let UpdateFileStorageProviderInput = class UpdateFileStorageProviderInput {
|
|
23397
|
+
};
|
|
23398
|
+
exports.UpdateFileStorageProviderInput = UpdateFileStorageProviderInput;
|
|
23399
|
+
__decorate([
|
|
23400
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
23401
|
+
__metadata("design:type", Number)
|
|
23402
|
+
], UpdateFileStorageProviderInput.prototype, "ID", void 0);
|
|
23403
|
+
__decorate([
|
|
23404
|
+
(0, server_1.Field)(),
|
|
23405
|
+
__metadata("design:type", String)
|
|
23406
|
+
], UpdateFileStorageProviderInput.prototype, "Name", void 0);
|
|
23407
|
+
__decorate([
|
|
23408
|
+
(0, server_1.Field)({ nullable: true }),
|
|
23409
|
+
__metadata("design:type", String)
|
|
23410
|
+
], UpdateFileStorageProviderInput.prototype, "Description", void 0);
|
|
23411
|
+
__decorate([
|
|
23412
|
+
(0, server_1.Field)(),
|
|
23413
|
+
__metadata("design:type", String)
|
|
23414
|
+
], UpdateFileStorageProviderInput.prototype, "ServerDriverKey", void 0);
|
|
23415
|
+
__decorate([
|
|
23416
|
+
(0, server_1.Field)(),
|
|
23417
|
+
__metadata("design:type", String)
|
|
23418
|
+
], UpdateFileStorageProviderInput.prototype, "ClientDriverKey", void 0);
|
|
23419
|
+
__decorate([
|
|
23420
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
23421
|
+
__metadata("design:type", Number)
|
|
23422
|
+
], UpdateFileStorageProviderInput.prototype, "Priority", void 0);
|
|
23423
|
+
__decorate([
|
|
23424
|
+
(0, server_1.Field)(() => Boolean),
|
|
23425
|
+
__metadata("design:type", Boolean)
|
|
23426
|
+
], UpdateFileStorageProviderInput.prototype, "IsActive", void 0);
|
|
23427
|
+
exports.UpdateFileStorageProviderInput = UpdateFileStorageProviderInput = __decorate([
|
|
23428
|
+
(0, server_1.InputType)()
|
|
23429
|
+
], UpdateFileStorageProviderInput);
|
|
23430
|
+
let RunFileStorageProviderViewResult = class RunFileStorageProviderViewResult {
|
|
23431
|
+
};
|
|
23432
|
+
exports.RunFileStorageProviderViewResult = RunFileStorageProviderViewResult;
|
|
23433
|
+
__decorate([
|
|
23434
|
+
(0, server_1.Field)(() => [FileStorageProvider_]),
|
|
23435
|
+
__metadata("design:type", Array)
|
|
23436
|
+
], RunFileStorageProviderViewResult.prototype, "Results", void 0);
|
|
23437
|
+
__decorate([
|
|
23438
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
23439
|
+
__metadata("design:type", Number)
|
|
23440
|
+
], RunFileStorageProviderViewResult.prototype, "UserViewRunID", void 0);
|
|
23441
|
+
__decorate([
|
|
23442
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
23443
|
+
__metadata("design:type", Number)
|
|
23444
|
+
], RunFileStorageProviderViewResult.prototype, "RowCount", void 0);
|
|
23445
|
+
__decorate([
|
|
23446
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
23447
|
+
__metadata("design:type", Number)
|
|
23448
|
+
], RunFileStorageProviderViewResult.prototype, "TotalRowCount", void 0);
|
|
23449
|
+
__decorate([
|
|
23450
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
23451
|
+
__metadata("design:type", Number)
|
|
23452
|
+
], RunFileStorageProviderViewResult.prototype, "ExecutionTime", void 0);
|
|
23453
|
+
__decorate([
|
|
23454
|
+
(0, server_1.Field)({ nullable: true }),
|
|
23455
|
+
__metadata("design:type", String)
|
|
23456
|
+
], RunFileStorageProviderViewResult.prototype, "ErrorMessage", void 0);
|
|
23457
|
+
__decorate([
|
|
23458
|
+
(0, server_1.Field)(() => Boolean, { nullable: false }),
|
|
23459
|
+
__metadata("design:type", Boolean)
|
|
23460
|
+
], RunFileStorageProviderViewResult.prototype, "Success", void 0);
|
|
23461
|
+
exports.RunFileStorageProviderViewResult = RunFileStorageProviderViewResult = __decorate([
|
|
23462
|
+
(0, server_1.ObjectType)()
|
|
23463
|
+
], RunFileStorageProviderViewResult);
|
|
23464
|
+
let FileStorageProviderResolver = class FileStorageProviderResolver extends server_1.ResolverBase {
|
|
23465
|
+
async RunFileStorageProviderViewByID(input, { dataSource, userPayload }, pubSub) {
|
|
23466
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
23467
|
+
}
|
|
23468
|
+
async RunFileStorageProviderViewByName(input, { dataSource, userPayload }, pubSub) {
|
|
23469
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
23470
|
+
}
|
|
23471
|
+
async RunFileStorageProviderDynamicView(input, { dataSource, userPayload }, pubSub) {
|
|
23472
|
+
input.EntityName = 'File Storage Providers';
|
|
23473
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
23474
|
+
}
|
|
23475
|
+
async FileStorageProvider(ID, { dataSource, userPayload }, pubSub) {
|
|
23476
|
+
this.CheckUserReadPermissions('File Storage Providers', userPayload);
|
|
23477
|
+
const sSQL = `SELECT * FROM [${config_1.mj_core_schema}].[vwFileStorageProviders] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('File Storage Providers', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
23478
|
+
const result = this.MapFieldNamesToCodeNames('File Storage Providers', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
|
|
23479
|
+
return result;
|
|
23480
|
+
}
|
|
23481
|
+
async FilesArray(filestorageprovider_, { dataSource, userPayload }, pubSub) {
|
|
23482
|
+
this.CheckUserReadPermissions('Files', userPayload);
|
|
23483
|
+
const sSQL = `SELECT * FROM [${config_1.mj_core_schema}].[vwFiles] WHERE [ProviderID]=${filestorageprovider_.ID} ` + this.getRowLevelSecurityWhereClause('Files', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
23484
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Files', await dataSource.query(sSQL));
|
|
23485
|
+
return result;
|
|
23486
|
+
}
|
|
23487
|
+
async CreateFileStorageProvider(input, { dataSource, userPayload }, pubSub) {
|
|
23488
|
+
if (await this.BeforeCreate(dataSource, input)) {
|
|
23489
|
+
const entityObject = await new core_1.Metadata().GetEntityObject('File Storage Providers', this.GetUserFromPayload(userPayload));
|
|
23490
|
+
await entityObject.NewRecord();
|
|
23491
|
+
entityObject.SetMany(input);
|
|
23492
|
+
if (await entityObject.Save()) {
|
|
23493
|
+
await this.AfterCreate(dataSource, input);
|
|
23494
|
+
return entityObject.GetAll();
|
|
23495
|
+
}
|
|
23496
|
+
else
|
|
23497
|
+
return null;
|
|
23498
|
+
}
|
|
23499
|
+
else
|
|
23500
|
+
return null;
|
|
23501
|
+
}
|
|
23502
|
+
async BeforeCreate(dataSource, input) {
|
|
23503
|
+
return true;
|
|
23504
|
+
}
|
|
23505
|
+
async AfterCreate(dataSource, input) {
|
|
23506
|
+
}
|
|
23507
|
+
async UpdateFileStorageProvider(input, { dataSource, userPayload }, pubSub) {
|
|
23508
|
+
if (await this.BeforeUpdate(dataSource, input)) {
|
|
23509
|
+
const entityObject = await new core_1.Metadata().GetEntityObject('File Storage Providers', this.GetUserFromPayload(userPayload));
|
|
23510
|
+
entityObject.LoadFromData(input);
|
|
23511
|
+
if (await entityObject.Save({ IgnoreDirtyState: true })) {
|
|
23512
|
+
await this.AfterUpdate(dataSource, input);
|
|
23513
|
+
return entityObject.GetAll();
|
|
23514
|
+
}
|
|
23515
|
+
else
|
|
23516
|
+
return null;
|
|
23517
|
+
}
|
|
23518
|
+
else
|
|
23519
|
+
return null;
|
|
23520
|
+
}
|
|
23521
|
+
async BeforeUpdate(dataSource, input) {
|
|
23522
|
+
const i = input, d = dataSource;
|
|
23523
|
+
return true;
|
|
23524
|
+
}
|
|
23525
|
+
async AfterUpdate(dataSource, input) {
|
|
23526
|
+
const i = input, d = dataSource;
|
|
23527
|
+
}
|
|
23528
|
+
};
|
|
23529
|
+
exports.FileStorageProviderResolver = FileStorageProviderResolver;
|
|
23530
|
+
__decorate([
|
|
23531
|
+
(0, server_1.Query)(() => RunFileStorageProviderViewResult),
|
|
23532
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByIDInput)),
|
|
23533
|
+
__param(1, (0, server_1.Ctx)()),
|
|
23534
|
+
__param(2, (0, server_1.PubSub)()),
|
|
23535
|
+
__metadata("design:type", Function),
|
|
23536
|
+
__metadata("design:paramtypes", [server_1.RunViewByIDInput, Object, server_1.PubSubEngine]),
|
|
23537
|
+
__metadata("design:returntype", Promise)
|
|
23538
|
+
], FileStorageProviderResolver.prototype, "RunFileStorageProviderViewByID", null);
|
|
23539
|
+
__decorate([
|
|
23540
|
+
(0, server_1.Query)(() => RunFileStorageProviderViewResult),
|
|
23541
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByNameInput)),
|
|
23542
|
+
__param(1, (0, server_1.Ctx)()),
|
|
23543
|
+
__param(2, (0, server_1.PubSub)()),
|
|
23544
|
+
__metadata("design:type", Function),
|
|
23545
|
+
__metadata("design:paramtypes", [server_1.RunViewByNameInput, Object, server_1.PubSubEngine]),
|
|
23546
|
+
__metadata("design:returntype", Promise)
|
|
23547
|
+
], FileStorageProviderResolver.prototype, "RunFileStorageProviderViewByName", null);
|
|
23548
|
+
__decorate([
|
|
23549
|
+
(0, server_1.Query)(() => RunFileStorageProviderViewResult),
|
|
23550
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunDynamicViewInput)),
|
|
23551
|
+
__param(1, (0, server_1.Ctx)()),
|
|
23552
|
+
__param(2, (0, server_1.PubSub)()),
|
|
23553
|
+
__metadata("design:type", Function),
|
|
23554
|
+
__metadata("design:paramtypes", [server_1.RunDynamicViewInput, Object, server_1.PubSubEngine]),
|
|
23555
|
+
__metadata("design:returntype", Promise)
|
|
23556
|
+
], FileStorageProviderResolver.prototype, "RunFileStorageProviderDynamicView", null);
|
|
23557
|
+
__decorate([
|
|
23558
|
+
(0, server_1.Query)(() => FileStorageProvider_, { nullable: true }),
|
|
23559
|
+
__param(0, (0, server_1.Arg)('ID', () => server_1.Int)),
|
|
23560
|
+
__param(1, (0, server_1.Ctx)()),
|
|
23561
|
+
__param(2, (0, server_1.PubSub)()),
|
|
23562
|
+
__metadata("design:type", Function),
|
|
23563
|
+
__metadata("design:paramtypes", [Number, Object, server_1.PubSubEngine]),
|
|
23564
|
+
__metadata("design:returntype", Promise)
|
|
23565
|
+
], FileStorageProviderResolver.prototype, "FileStorageProvider", null);
|
|
23566
|
+
__decorate([
|
|
23567
|
+
(0, server_1.FieldResolver)(() => [mj_core_schema_server_object_types.File_]),
|
|
23568
|
+
__param(0, (0, server_1.Root)()),
|
|
23569
|
+
__param(1, (0, server_1.Ctx)()),
|
|
23570
|
+
__param(2, (0, server_1.PubSub)()),
|
|
23571
|
+
__metadata("design:type", Function),
|
|
23572
|
+
__metadata("design:paramtypes", [FileStorageProvider_, Object, server_1.PubSubEngine]),
|
|
23573
|
+
__metadata("design:returntype", Promise)
|
|
23574
|
+
], FileStorageProviderResolver.prototype, "FilesArray", null);
|
|
23575
|
+
__decorate([
|
|
23576
|
+
(0, server_1.Mutation)(() => FileStorageProvider_),
|
|
23577
|
+
__param(0, (0, server_1.Arg)('input', () => CreateFileStorageProviderInput)),
|
|
23578
|
+
__param(1, (0, server_1.Ctx)()),
|
|
23579
|
+
__param(2, (0, server_1.PubSub)()),
|
|
23580
|
+
__metadata("design:type", Function),
|
|
23581
|
+
__metadata("design:paramtypes", [CreateFileStorageProviderInput, Object, server_1.PubSubEngine]),
|
|
23582
|
+
__metadata("design:returntype", Promise)
|
|
23583
|
+
], FileStorageProviderResolver.prototype, "CreateFileStorageProvider", null);
|
|
23584
|
+
__decorate([
|
|
23585
|
+
(0, server_1.Mutation)(() => FileStorageProvider_),
|
|
23586
|
+
__param(0, (0, server_1.Arg)('input', () => UpdateFileStorageProviderInput)),
|
|
23587
|
+
__param(1, (0, server_1.Ctx)()),
|
|
23588
|
+
__param(2, (0, server_1.PubSub)()),
|
|
23589
|
+
__metadata("design:type", Function),
|
|
23590
|
+
__metadata("design:paramtypes", [UpdateFileStorageProviderInput, Object, server_1.PubSubEngine]),
|
|
23591
|
+
__metadata("design:returntype", Promise)
|
|
23592
|
+
], FileStorageProviderResolver.prototype, "UpdateFileStorageProvider", null);
|
|
23593
|
+
exports.FileStorageProviderResolver = FileStorageProviderResolver = __decorate([
|
|
23594
|
+
(0, server_1.Resolver)(FileStorageProvider_)
|
|
23595
|
+
], FileStorageProviderResolver);
|
|
23596
|
+
let File_ = class File_ {
|
|
23597
|
+
};
|
|
23598
|
+
exports.File_ = File_;
|
|
23599
|
+
__decorate([
|
|
23600
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
23601
|
+
__metadata("design:type", Number)
|
|
23602
|
+
], File_.prototype, "ID", void 0);
|
|
23603
|
+
__decorate([
|
|
23604
|
+
(0, server_1.Field)(),
|
|
23605
|
+
(0, class_validator_1.MaxLength)(1000),
|
|
23606
|
+
__metadata("design:type", String)
|
|
23607
|
+
], File_.prototype, "Name", void 0);
|
|
23608
|
+
__decorate([
|
|
23609
|
+
(0, server_1.Field)({ nullable: true }),
|
|
23610
|
+
__metadata("design:type", String)
|
|
23611
|
+
], File_.prototype, "Description", void 0);
|
|
23612
|
+
__decorate([
|
|
23613
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
23614
|
+
__metadata("design:type", Number)
|
|
23615
|
+
], File_.prototype, "ProviderID", void 0);
|
|
23616
|
+
__decorate([
|
|
23617
|
+
(0, server_1.Field)({ nullable: true }),
|
|
23618
|
+
(0, class_validator_1.MaxLength)(100),
|
|
23619
|
+
__metadata("design:type", String)
|
|
23620
|
+
], File_.prototype, "ContentType", void 0);
|
|
23621
|
+
__decorate([
|
|
23622
|
+
(0, server_1.Field)({ nullable: true }),
|
|
23623
|
+
(0, class_validator_1.MaxLength)(1000),
|
|
23624
|
+
__metadata("design:type", String)
|
|
23625
|
+
], File_.prototype, "ProviderKey", void 0);
|
|
23626
|
+
__decorate([
|
|
23627
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
23628
|
+
__metadata("design:type", Number)
|
|
23629
|
+
], File_.prototype, "CategoryID", void 0);
|
|
23630
|
+
__decorate([
|
|
23631
|
+
(0, server_1.Field)({ description: 'Pending, Uploading, Uploaded, Deleting, Deleted' }),
|
|
23632
|
+
(0, class_validator_1.MaxLength)(40),
|
|
23633
|
+
__metadata("design:type", String)
|
|
23634
|
+
], File_.prototype, "Status", void 0);
|
|
23635
|
+
__decorate([
|
|
23636
|
+
(0, server_1.Field)(),
|
|
23637
|
+
(0, class_validator_1.MaxLength)(8),
|
|
23638
|
+
__metadata("design:type", Date)
|
|
23639
|
+
], File_.prototype, "CreatedAt", void 0);
|
|
23640
|
+
__decorate([
|
|
23641
|
+
(0, server_1.Field)(),
|
|
23642
|
+
(0, class_validator_1.MaxLength)(8),
|
|
23643
|
+
__metadata("design:type", Date)
|
|
23644
|
+
], File_.prototype, "UpdatedAt", void 0);
|
|
23645
|
+
__decorate([
|
|
23646
|
+
(0, server_1.Field)(),
|
|
23647
|
+
(0, class_validator_1.MaxLength)(100),
|
|
23648
|
+
__metadata("design:type", String)
|
|
23649
|
+
], File_.prototype, "Provider", void 0);
|
|
23650
|
+
__decorate([
|
|
23651
|
+
(0, server_1.Field)({ nullable: true }),
|
|
23652
|
+
(0, class_validator_1.MaxLength)(510),
|
|
23653
|
+
__metadata("design:type", String)
|
|
23654
|
+
], File_.prototype, "Category", void 0);
|
|
23655
|
+
__decorate([
|
|
23656
|
+
(0, server_1.Field)(() => [mj_core_schema_server_object_types.FileEntityRecordLink_]),
|
|
23657
|
+
__metadata("design:type", Array)
|
|
23658
|
+
], File_.prototype, "FileEntityRecordLinksArray", void 0);
|
|
23659
|
+
exports.File_ = File_ = __decorate([
|
|
23660
|
+
(0, server_1.ObjectType)()
|
|
23661
|
+
], File_);
|
|
23662
|
+
let CreateFileInput = class CreateFileInput {
|
|
23663
|
+
};
|
|
23664
|
+
exports.CreateFileInput = CreateFileInput;
|
|
23665
|
+
__decorate([
|
|
23666
|
+
(0, server_1.Field)(),
|
|
23667
|
+
__metadata("design:type", String)
|
|
23668
|
+
], CreateFileInput.prototype, "Name", void 0);
|
|
23669
|
+
__decorate([
|
|
23670
|
+
(0, server_1.Field)({ nullable: true }),
|
|
23671
|
+
__metadata("design:type", String)
|
|
23672
|
+
], CreateFileInput.prototype, "Description", void 0);
|
|
23673
|
+
__decorate([
|
|
23674
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
23675
|
+
__metadata("design:type", Number)
|
|
23676
|
+
], CreateFileInput.prototype, "ProviderID", void 0);
|
|
23677
|
+
__decorate([
|
|
23678
|
+
(0, server_1.Field)({ nullable: true }),
|
|
23679
|
+
__metadata("design:type", String)
|
|
23680
|
+
], CreateFileInput.prototype, "ContentType", void 0);
|
|
23681
|
+
__decorate([
|
|
23682
|
+
(0, server_1.Field)({ nullable: true }),
|
|
23683
|
+
__metadata("design:type", String)
|
|
23684
|
+
], CreateFileInput.prototype, "ProviderKey", void 0);
|
|
23685
|
+
__decorate([
|
|
23686
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
23687
|
+
__metadata("design:type", Number)
|
|
23688
|
+
], CreateFileInput.prototype, "CategoryID", void 0);
|
|
23689
|
+
__decorate([
|
|
23690
|
+
(0, server_1.Field)(),
|
|
23691
|
+
__metadata("design:type", String)
|
|
23692
|
+
], CreateFileInput.prototype, "Status", void 0);
|
|
23693
|
+
exports.CreateFileInput = CreateFileInput = __decorate([
|
|
23694
|
+
(0, server_1.InputType)()
|
|
23695
|
+
], CreateFileInput);
|
|
23696
|
+
let UpdateFileInput = class UpdateFileInput {
|
|
23697
|
+
};
|
|
23698
|
+
exports.UpdateFileInput = UpdateFileInput;
|
|
23699
|
+
__decorate([
|
|
23700
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
23701
|
+
__metadata("design:type", Number)
|
|
23702
|
+
], UpdateFileInput.prototype, "ID", void 0);
|
|
23703
|
+
__decorate([
|
|
23704
|
+
(0, server_1.Field)(),
|
|
23705
|
+
__metadata("design:type", String)
|
|
23706
|
+
], UpdateFileInput.prototype, "Name", void 0);
|
|
23707
|
+
__decorate([
|
|
23708
|
+
(0, server_1.Field)({ nullable: true }),
|
|
23709
|
+
__metadata("design:type", String)
|
|
23710
|
+
], UpdateFileInput.prototype, "Description", void 0);
|
|
23711
|
+
__decorate([
|
|
23712
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
23713
|
+
__metadata("design:type", Number)
|
|
23714
|
+
], UpdateFileInput.prototype, "ProviderID", void 0);
|
|
23715
|
+
__decorate([
|
|
23716
|
+
(0, server_1.Field)({ nullable: true }),
|
|
23717
|
+
__metadata("design:type", String)
|
|
23718
|
+
], UpdateFileInput.prototype, "ContentType", void 0);
|
|
23719
|
+
__decorate([
|
|
23720
|
+
(0, server_1.Field)({ nullable: true }),
|
|
23721
|
+
__metadata("design:type", String)
|
|
23722
|
+
], UpdateFileInput.prototype, "ProviderKey", void 0);
|
|
23723
|
+
__decorate([
|
|
23724
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
23725
|
+
__metadata("design:type", Number)
|
|
23726
|
+
], UpdateFileInput.prototype, "CategoryID", void 0);
|
|
23727
|
+
__decorate([
|
|
23728
|
+
(0, server_1.Field)(),
|
|
23729
|
+
__metadata("design:type", String)
|
|
23730
|
+
], UpdateFileInput.prototype, "Status", void 0);
|
|
23731
|
+
exports.UpdateFileInput = UpdateFileInput = __decorate([
|
|
23732
|
+
(0, server_1.InputType)()
|
|
23733
|
+
], UpdateFileInput);
|
|
23734
|
+
let RunFileViewResult = class RunFileViewResult {
|
|
23735
|
+
};
|
|
23736
|
+
exports.RunFileViewResult = RunFileViewResult;
|
|
23737
|
+
__decorate([
|
|
23738
|
+
(0, server_1.Field)(() => [File_]),
|
|
23739
|
+
__metadata("design:type", Array)
|
|
23740
|
+
], RunFileViewResult.prototype, "Results", void 0);
|
|
23741
|
+
__decorate([
|
|
23742
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
23743
|
+
__metadata("design:type", Number)
|
|
23744
|
+
], RunFileViewResult.prototype, "UserViewRunID", void 0);
|
|
23745
|
+
__decorate([
|
|
23746
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
23747
|
+
__metadata("design:type", Number)
|
|
23748
|
+
], RunFileViewResult.prototype, "RowCount", void 0);
|
|
23749
|
+
__decorate([
|
|
23750
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
23751
|
+
__metadata("design:type", Number)
|
|
23752
|
+
], RunFileViewResult.prototype, "TotalRowCount", void 0);
|
|
23753
|
+
__decorate([
|
|
23754
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
23755
|
+
__metadata("design:type", Number)
|
|
23756
|
+
], RunFileViewResult.prototype, "ExecutionTime", void 0);
|
|
23757
|
+
__decorate([
|
|
23758
|
+
(0, server_1.Field)({ nullable: true }),
|
|
23759
|
+
__metadata("design:type", String)
|
|
23760
|
+
], RunFileViewResult.prototype, "ErrorMessage", void 0);
|
|
23761
|
+
__decorate([
|
|
23762
|
+
(0, server_1.Field)(() => Boolean, { nullable: false }),
|
|
23763
|
+
__metadata("design:type", Boolean)
|
|
23764
|
+
], RunFileViewResult.prototype, "Success", void 0);
|
|
23765
|
+
exports.RunFileViewResult = RunFileViewResult = __decorate([
|
|
23766
|
+
(0, server_1.ObjectType)()
|
|
23767
|
+
], RunFileViewResult);
|
|
23768
|
+
let FileResolver = class FileResolver extends server_1.ResolverBase {
|
|
23769
|
+
async RunFileViewByID(input, { dataSource, userPayload }, pubSub) {
|
|
23770
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
23771
|
+
}
|
|
23772
|
+
async RunFileViewByName(input, { dataSource, userPayload }, pubSub) {
|
|
23773
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
23774
|
+
}
|
|
23775
|
+
async RunFileDynamicView(input, { dataSource, userPayload }, pubSub) {
|
|
23776
|
+
input.EntityName = 'Files';
|
|
23777
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
23778
|
+
}
|
|
23779
|
+
async File(ID, { dataSource, userPayload }, pubSub) {
|
|
23780
|
+
this.CheckUserReadPermissions('Files', userPayload);
|
|
23781
|
+
const sSQL = `SELECT * FROM [${config_1.mj_core_schema}].[vwFiles] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Files', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
23782
|
+
const result = this.MapFieldNamesToCodeNames('Files', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
|
|
23783
|
+
return result;
|
|
23784
|
+
}
|
|
23785
|
+
async FileEntityRecordLinksArray(file_, { dataSource, userPayload }, pubSub) {
|
|
23786
|
+
this.CheckUserReadPermissions('File Entity Record Links', userPayload);
|
|
23787
|
+
const sSQL = `SELECT * FROM [${config_1.mj_core_schema}].[vwFileEntityRecordLinks] WHERE [FileID]=${file_.ID} ` + this.getRowLevelSecurityWhereClause('File Entity Record Links', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
23788
|
+
const result = this.ArrayMapFieldNamesToCodeNames('File Entity Record Links', await dataSource.query(sSQL));
|
|
23789
|
+
return result;
|
|
23790
|
+
}
|
|
23791
|
+
async CreateFile(input, { dataSource, userPayload }, pubSub) {
|
|
23792
|
+
if (await this.BeforeCreate(dataSource, input)) {
|
|
23793
|
+
const entityObject = await new core_1.Metadata().GetEntityObject('Files', this.GetUserFromPayload(userPayload));
|
|
23794
|
+
await entityObject.NewRecord();
|
|
23795
|
+
entityObject.SetMany(input);
|
|
23796
|
+
if (await entityObject.Save()) {
|
|
23797
|
+
await this.AfterCreate(dataSource, input);
|
|
23798
|
+
return entityObject.GetAll();
|
|
23799
|
+
}
|
|
23800
|
+
else
|
|
23801
|
+
return null;
|
|
23802
|
+
}
|
|
23803
|
+
else
|
|
23804
|
+
return null;
|
|
23805
|
+
}
|
|
23806
|
+
async BeforeCreate(dataSource, input) {
|
|
23807
|
+
return true;
|
|
23808
|
+
}
|
|
23809
|
+
async AfterCreate(dataSource, input) {
|
|
23810
|
+
}
|
|
23811
|
+
async UpdateFile(input, { dataSource, userPayload }, pubSub) {
|
|
23812
|
+
if (await this.BeforeUpdate(dataSource, input)) {
|
|
23813
|
+
const entityObject = await new core_1.Metadata().GetEntityObject('Files', this.GetUserFromPayload(userPayload));
|
|
23814
|
+
entityObject.LoadFromData(input);
|
|
23815
|
+
if (await entityObject.Save({ IgnoreDirtyState: true })) {
|
|
23816
|
+
await this.AfterUpdate(dataSource, input);
|
|
23817
|
+
return entityObject.GetAll();
|
|
23818
|
+
}
|
|
23819
|
+
else
|
|
23820
|
+
return null;
|
|
23821
|
+
}
|
|
23822
|
+
else
|
|
23823
|
+
return null;
|
|
23824
|
+
}
|
|
23825
|
+
async BeforeUpdate(dataSource, input) {
|
|
23826
|
+
const i = input, d = dataSource;
|
|
23827
|
+
return true;
|
|
23828
|
+
}
|
|
23829
|
+
async AfterUpdate(dataSource, input) {
|
|
23830
|
+
const i = input, d = dataSource;
|
|
23831
|
+
}
|
|
23832
|
+
};
|
|
23833
|
+
exports.FileResolver = FileResolver;
|
|
23834
|
+
__decorate([
|
|
23835
|
+
(0, server_1.Query)(() => RunFileViewResult),
|
|
23836
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByIDInput)),
|
|
23837
|
+
__param(1, (0, server_1.Ctx)()),
|
|
23838
|
+
__param(2, (0, server_1.PubSub)()),
|
|
23839
|
+
__metadata("design:type", Function),
|
|
23840
|
+
__metadata("design:paramtypes", [server_1.RunViewByIDInput, Object, server_1.PubSubEngine]),
|
|
23841
|
+
__metadata("design:returntype", Promise)
|
|
23842
|
+
], FileResolver.prototype, "RunFileViewByID", null);
|
|
23843
|
+
__decorate([
|
|
23844
|
+
(0, server_1.Query)(() => RunFileViewResult),
|
|
23845
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByNameInput)),
|
|
23846
|
+
__param(1, (0, server_1.Ctx)()),
|
|
23847
|
+
__param(2, (0, server_1.PubSub)()),
|
|
23848
|
+
__metadata("design:type", Function),
|
|
23849
|
+
__metadata("design:paramtypes", [server_1.RunViewByNameInput, Object, server_1.PubSubEngine]),
|
|
23850
|
+
__metadata("design:returntype", Promise)
|
|
23851
|
+
], FileResolver.prototype, "RunFileViewByName", null);
|
|
23852
|
+
__decorate([
|
|
23853
|
+
(0, server_1.Query)(() => RunFileViewResult),
|
|
23854
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunDynamicViewInput)),
|
|
23855
|
+
__param(1, (0, server_1.Ctx)()),
|
|
23856
|
+
__param(2, (0, server_1.PubSub)()),
|
|
23857
|
+
__metadata("design:type", Function),
|
|
23858
|
+
__metadata("design:paramtypes", [server_1.RunDynamicViewInput, Object, server_1.PubSubEngine]),
|
|
23859
|
+
__metadata("design:returntype", Promise)
|
|
23860
|
+
], FileResolver.prototype, "RunFileDynamicView", null);
|
|
23861
|
+
__decorate([
|
|
23862
|
+
(0, server_1.Query)(() => File_, { nullable: true }),
|
|
23863
|
+
__param(0, (0, server_1.Arg)('ID', () => server_1.Int)),
|
|
23864
|
+
__param(1, (0, server_1.Ctx)()),
|
|
23865
|
+
__param(2, (0, server_1.PubSub)()),
|
|
23866
|
+
__metadata("design:type", Function),
|
|
23867
|
+
__metadata("design:paramtypes", [Number, Object, server_1.PubSubEngine]),
|
|
23868
|
+
__metadata("design:returntype", Promise)
|
|
23869
|
+
], FileResolver.prototype, "File", null);
|
|
23870
|
+
__decorate([
|
|
23871
|
+
(0, server_1.FieldResolver)(() => [mj_core_schema_server_object_types.FileEntityRecordLink_]),
|
|
23872
|
+
__param(0, (0, server_1.Root)()),
|
|
23873
|
+
__param(1, (0, server_1.Ctx)()),
|
|
23874
|
+
__param(2, (0, server_1.PubSub)()),
|
|
23875
|
+
__metadata("design:type", Function),
|
|
23876
|
+
__metadata("design:paramtypes", [File_, Object, server_1.PubSubEngine]),
|
|
23877
|
+
__metadata("design:returntype", Promise)
|
|
23878
|
+
], FileResolver.prototype, "FileEntityRecordLinksArray", null);
|
|
23879
|
+
__decorate([
|
|
23880
|
+
(0, server_1.Mutation)(() => File_),
|
|
23881
|
+
__param(0, (0, server_1.Arg)('input', () => CreateFileInput)),
|
|
23882
|
+
__param(1, (0, server_1.Ctx)()),
|
|
23883
|
+
__param(2, (0, server_1.PubSub)()),
|
|
23884
|
+
__metadata("design:type", Function),
|
|
23885
|
+
__metadata("design:paramtypes", [CreateFileInput, Object, server_1.PubSubEngine]),
|
|
23886
|
+
__metadata("design:returntype", Promise)
|
|
23887
|
+
], FileResolver.prototype, "CreateFile", null);
|
|
23888
|
+
__decorate([
|
|
23889
|
+
(0, server_1.Mutation)(() => File_),
|
|
23890
|
+
__param(0, (0, server_1.Arg)('input', () => UpdateFileInput)),
|
|
23891
|
+
__param(1, (0, server_1.Ctx)()),
|
|
23892
|
+
__param(2, (0, server_1.PubSub)()),
|
|
23893
|
+
__metadata("design:type", Function),
|
|
23894
|
+
__metadata("design:paramtypes", [UpdateFileInput, Object, server_1.PubSubEngine]),
|
|
23895
|
+
__metadata("design:returntype", Promise)
|
|
23896
|
+
], FileResolver.prototype, "UpdateFile", null);
|
|
23897
|
+
exports.FileResolver = FileResolver = __decorate([
|
|
23898
|
+
(0, server_1.Resolver)(File_)
|
|
23899
|
+
], FileResolver);
|
|
23900
|
+
let FileCategory_ = class FileCategory_ {
|
|
23901
|
+
};
|
|
23902
|
+
exports.FileCategory_ = FileCategory_;
|
|
23903
|
+
__decorate([
|
|
23904
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
23905
|
+
__metadata("design:type", Number)
|
|
23906
|
+
], FileCategory_.prototype, "ID", void 0);
|
|
23907
|
+
__decorate([
|
|
23908
|
+
(0, server_1.Field)(),
|
|
23909
|
+
(0, class_validator_1.MaxLength)(510),
|
|
23910
|
+
__metadata("design:type", String)
|
|
23911
|
+
], FileCategory_.prototype, "Name", void 0);
|
|
23912
|
+
__decorate([
|
|
23913
|
+
(0, server_1.Field)({ nullable: true }),
|
|
23914
|
+
__metadata("design:type", String)
|
|
23915
|
+
], FileCategory_.prototype, "Description", void 0);
|
|
23916
|
+
__decorate([
|
|
23917
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
23918
|
+
__metadata("design:type", Number)
|
|
23919
|
+
], FileCategory_.prototype, "ParentID", void 0);
|
|
23920
|
+
__decorate([
|
|
23921
|
+
(0, server_1.Field)(),
|
|
23922
|
+
(0, class_validator_1.MaxLength)(8),
|
|
23923
|
+
__metadata("design:type", Date)
|
|
23924
|
+
], FileCategory_.prototype, "CreatedAt", void 0);
|
|
23925
|
+
__decorate([
|
|
23926
|
+
(0, server_1.Field)(),
|
|
23927
|
+
(0, class_validator_1.MaxLength)(8),
|
|
23928
|
+
__metadata("design:type", Date)
|
|
23929
|
+
], FileCategory_.prototype, "UpdatedAt", void 0);
|
|
23930
|
+
__decorate([
|
|
23931
|
+
(0, server_1.Field)({ nullable: true }),
|
|
23932
|
+
(0, class_validator_1.MaxLength)(510),
|
|
23933
|
+
__metadata("design:type", String)
|
|
23934
|
+
], FileCategory_.prototype, "Parent", void 0);
|
|
23935
|
+
__decorate([
|
|
23936
|
+
(0, server_1.Field)(() => [mj_core_schema_server_object_types.File_]),
|
|
23937
|
+
__metadata("design:type", Array)
|
|
23938
|
+
], FileCategory_.prototype, "FilesArray", void 0);
|
|
23939
|
+
__decorate([
|
|
23940
|
+
(0, server_1.Field)(() => [mj_core_schema_server_object_types.FileCategory_]),
|
|
23941
|
+
__metadata("design:type", Array)
|
|
23942
|
+
], FileCategory_.prototype, "FileCategoriesArray", void 0);
|
|
23943
|
+
exports.FileCategory_ = FileCategory_ = __decorate([
|
|
23944
|
+
(0, server_1.ObjectType)()
|
|
23945
|
+
], FileCategory_);
|
|
23946
|
+
let CreateFileCategoryInput = class CreateFileCategoryInput {
|
|
23947
|
+
};
|
|
23948
|
+
exports.CreateFileCategoryInput = CreateFileCategoryInput;
|
|
23949
|
+
__decorate([
|
|
23950
|
+
(0, server_1.Field)(),
|
|
23951
|
+
__metadata("design:type", String)
|
|
23952
|
+
], CreateFileCategoryInput.prototype, "Name", void 0);
|
|
23953
|
+
__decorate([
|
|
23954
|
+
(0, server_1.Field)({ nullable: true }),
|
|
23955
|
+
__metadata("design:type", String)
|
|
23956
|
+
], CreateFileCategoryInput.prototype, "Description", void 0);
|
|
23957
|
+
__decorate([
|
|
23958
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
23959
|
+
__metadata("design:type", Number)
|
|
23960
|
+
], CreateFileCategoryInput.prototype, "ParentID", void 0);
|
|
23961
|
+
exports.CreateFileCategoryInput = CreateFileCategoryInput = __decorate([
|
|
23962
|
+
(0, server_1.InputType)()
|
|
23963
|
+
], CreateFileCategoryInput);
|
|
23964
|
+
let UpdateFileCategoryInput = class UpdateFileCategoryInput {
|
|
23965
|
+
};
|
|
23966
|
+
exports.UpdateFileCategoryInput = UpdateFileCategoryInput;
|
|
23967
|
+
__decorate([
|
|
23968
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
23969
|
+
__metadata("design:type", Number)
|
|
23970
|
+
], UpdateFileCategoryInput.prototype, "ID", void 0);
|
|
23971
|
+
__decorate([
|
|
23972
|
+
(0, server_1.Field)(),
|
|
23973
|
+
__metadata("design:type", String)
|
|
23974
|
+
], UpdateFileCategoryInput.prototype, "Name", void 0);
|
|
23975
|
+
__decorate([
|
|
23976
|
+
(0, server_1.Field)({ nullable: true }),
|
|
23977
|
+
__metadata("design:type", String)
|
|
23978
|
+
], UpdateFileCategoryInput.prototype, "Description", void 0);
|
|
23979
|
+
__decorate([
|
|
23980
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
23981
|
+
__metadata("design:type", Number)
|
|
23982
|
+
], UpdateFileCategoryInput.prototype, "ParentID", void 0);
|
|
23983
|
+
exports.UpdateFileCategoryInput = UpdateFileCategoryInput = __decorate([
|
|
23984
|
+
(0, server_1.InputType)()
|
|
23985
|
+
], UpdateFileCategoryInput);
|
|
23986
|
+
let RunFileCategoryViewResult = class RunFileCategoryViewResult {
|
|
23987
|
+
};
|
|
23988
|
+
exports.RunFileCategoryViewResult = RunFileCategoryViewResult;
|
|
23989
|
+
__decorate([
|
|
23990
|
+
(0, server_1.Field)(() => [FileCategory_]),
|
|
23991
|
+
__metadata("design:type", Array)
|
|
23992
|
+
], RunFileCategoryViewResult.prototype, "Results", void 0);
|
|
23993
|
+
__decorate([
|
|
23994
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
23995
|
+
__metadata("design:type", Number)
|
|
23996
|
+
], RunFileCategoryViewResult.prototype, "UserViewRunID", void 0);
|
|
23997
|
+
__decorate([
|
|
23998
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
23999
|
+
__metadata("design:type", Number)
|
|
24000
|
+
], RunFileCategoryViewResult.prototype, "RowCount", void 0);
|
|
24001
|
+
__decorate([
|
|
24002
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
24003
|
+
__metadata("design:type", Number)
|
|
24004
|
+
], RunFileCategoryViewResult.prototype, "TotalRowCount", void 0);
|
|
24005
|
+
__decorate([
|
|
24006
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
24007
|
+
__metadata("design:type", Number)
|
|
24008
|
+
], RunFileCategoryViewResult.prototype, "ExecutionTime", void 0);
|
|
24009
|
+
__decorate([
|
|
24010
|
+
(0, server_1.Field)({ nullable: true }),
|
|
24011
|
+
__metadata("design:type", String)
|
|
24012
|
+
], RunFileCategoryViewResult.prototype, "ErrorMessage", void 0);
|
|
24013
|
+
__decorate([
|
|
24014
|
+
(0, server_1.Field)(() => Boolean, { nullable: false }),
|
|
24015
|
+
__metadata("design:type", Boolean)
|
|
24016
|
+
], RunFileCategoryViewResult.prototype, "Success", void 0);
|
|
24017
|
+
exports.RunFileCategoryViewResult = RunFileCategoryViewResult = __decorate([
|
|
24018
|
+
(0, server_1.ObjectType)()
|
|
24019
|
+
], RunFileCategoryViewResult);
|
|
24020
|
+
let FileCategoryResolver = class FileCategoryResolver extends server_1.ResolverBase {
|
|
24021
|
+
async RunFileCategoryViewByID(input, { dataSource, userPayload }, pubSub) {
|
|
24022
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
24023
|
+
}
|
|
24024
|
+
async RunFileCategoryViewByName(input, { dataSource, userPayload }, pubSub) {
|
|
24025
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
24026
|
+
}
|
|
24027
|
+
async RunFileCategoryDynamicView(input, { dataSource, userPayload }, pubSub) {
|
|
24028
|
+
input.EntityName = 'File Categories';
|
|
24029
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
24030
|
+
}
|
|
24031
|
+
async FileCategory(ID, { dataSource, userPayload }, pubSub) {
|
|
24032
|
+
this.CheckUserReadPermissions('File Categories', userPayload);
|
|
24033
|
+
const sSQL = `SELECT * FROM [${config_1.mj_core_schema}].[vwFileCategories] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('File Categories', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
24034
|
+
const result = this.MapFieldNamesToCodeNames('File Categories', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
|
|
24035
|
+
return result;
|
|
24036
|
+
}
|
|
24037
|
+
async FilesArray(filecategory_, { dataSource, userPayload }, pubSub) {
|
|
24038
|
+
this.CheckUserReadPermissions('Files', userPayload);
|
|
24039
|
+
const sSQL = `SELECT * FROM [${config_1.mj_core_schema}].[vwFiles] WHERE [CategoryID]=${filecategory_.ID} ` + this.getRowLevelSecurityWhereClause('Files', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
24040
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Files', await dataSource.query(sSQL));
|
|
24041
|
+
return result;
|
|
24042
|
+
}
|
|
24043
|
+
async FileCategoriesArray(filecategory_, { dataSource, userPayload }, pubSub) {
|
|
24044
|
+
this.CheckUserReadPermissions('File Categories', userPayload);
|
|
24045
|
+
const sSQL = `SELECT * FROM [${config_1.mj_core_schema}].[vwFileCategories] WHERE [ParentID]=${filecategory_.ID} ` + this.getRowLevelSecurityWhereClause('File Categories', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
24046
|
+
const result = this.ArrayMapFieldNamesToCodeNames('File Categories', await dataSource.query(sSQL));
|
|
24047
|
+
return result;
|
|
24048
|
+
}
|
|
24049
|
+
async CreateFileCategory(input, { dataSource, userPayload }, pubSub) {
|
|
24050
|
+
if (await this.BeforeCreate(dataSource, input)) {
|
|
24051
|
+
const entityObject = await new core_1.Metadata().GetEntityObject('File Categories', this.GetUserFromPayload(userPayload));
|
|
24052
|
+
await entityObject.NewRecord();
|
|
24053
|
+
entityObject.SetMany(input);
|
|
24054
|
+
if (await entityObject.Save()) {
|
|
24055
|
+
await this.AfterCreate(dataSource, input);
|
|
24056
|
+
return entityObject.GetAll();
|
|
24057
|
+
}
|
|
24058
|
+
else
|
|
24059
|
+
return null;
|
|
24060
|
+
}
|
|
24061
|
+
else
|
|
24062
|
+
return null;
|
|
24063
|
+
}
|
|
24064
|
+
async BeforeCreate(dataSource, input) {
|
|
24065
|
+
return true;
|
|
24066
|
+
}
|
|
24067
|
+
async AfterCreate(dataSource, input) {
|
|
24068
|
+
}
|
|
24069
|
+
async UpdateFileCategory(input, { dataSource, userPayload }, pubSub) {
|
|
24070
|
+
if (await this.BeforeUpdate(dataSource, input)) {
|
|
24071
|
+
const entityObject = await new core_1.Metadata().GetEntityObject('File Categories', this.GetUserFromPayload(userPayload));
|
|
24072
|
+
entityObject.LoadFromData(input);
|
|
24073
|
+
if (await entityObject.Save({ IgnoreDirtyState: true })) {
|
|
24074
|
+
await this.AfterUpdate(dataSource, input);
|
|
24075
|
+
return entityObject.GetAll();
|
|
24076
|
+
}
|
|
24077
|
+
else
|
|
24078
|
+
return null;
|
|
24079
|
+
}
|
|
24080
|
+
else
|
|
24081
|
+
return null;
|
|
24082
|
+
}
|
|
24083
|
+
async BeforeUpdate(dataSource, input) {
|
|
24084
|
+
const i = input, d = dataSource;
|
|
24085
|
+
return true;
|
|
24086
|
+
}
|
|
24087
|
+
async AfterUpdate(dataSource, input) {
|
|
24088
|
+
const i = input, d = dataSource;
|
|
24089
|
+
}
|
|
24090
|
+
};
|
|
24091
|
+
exports.FileCategoryResolver = FileCategoryResolver;
|
|
24092
|
+
__decorate([
|
|
24093
|
+
(0, server_1.Query)(() => RunFileCategoryViewResult),
|
|
24094
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByIDInput)),
|
|
24095
|
+
__param(1, (0, server_1.Ctx)()),
|
|
24096
|
+
__param(2, (0, server_1.PubSub)()),
|
|
24097
|
+
__metadata("design:type", Function),
|
|
24098
|
+
__metadata("design:paramtypes", [server_1.RunViewByIDInput, Object, server_1.PubSubEngine]),
|
|
24099
|
+
__metadata("design:returntype", Promise)
|
|
24100
|
+
], FileCategoryResolver.prototype, "RunFileCategoryViewByID", null);
|
|
24101
|
+
__decorate([
|
|
24102
|
+
(0, server_1.Query)(() => RunFileCategoryViewResult),
|
|
24103
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByNameInput)),
|
|
24104
|
+
__param(1, (0, server_1.Ctx)()),
|
|
24105
|
+
__param(2, (0, server_1.PubSub)()),
|
|
24106
|
+
__metadata("design:type", Function),
|
|
24107
|
+
__metadata("design:paramtypes", [server_1.RunViewByNameInput, Object, server_1.PubSubEngine]),
|
|
24108
|
+
__metadata("design:returntype", Promise)
|
|
24109
|
+
], FileCategoryResolver.prototype, "RunFileCategoryViewByName", null);
|
|
24110
|
+
__decorate([
|
|
24111
|
+
(0, server_1.Query)(() => RunFileCategoryViewResult),
|
|
24112
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunDynamicViewInput)),
|
|
24113
|
+
__param(1, (0, server_1.Ctx)()),
|
|
24114
|
+
__param(2, (0, server_1.PubSub)()),
|
|
24115
|
+
__metadata("design:type", Function),
|
|
24116
|
+
__metadata("design:paramtypes", [server_1.RunDynamicViewInput, Object, server_1.PubSubEngine]),
|
|
24117
|
+
__metadata("design:returntype", Promise)
|
|
24118
|
+
], FileCategoryResolver.prototype, "RunFileCategoryDynamicView", null);
|
|
24119
|
+
__decorate([
|
|
24120
|
+
(0, server_1.Query)(() => FileCategory_, { nullable: true }),
|
|
24121
|
+
__param(0, (0, server_1.Arg)('ID', () => server_1.Int)),
|
|
24122
|
+
__param(1, (0, server_1.Ctx)()),
|
|
24123
|
+
__param(2, (0, server_1.PubSub)()),
|
|
24124
|
+
__metadata("design:type", Function),
|
|
24125
|
+
__metadata("design:paramtypes", [Number, Object, server_1.PubSubEngine]),
|
|
24126
|
+
__metadata("design:returntype", Promise)
|
|
24127
|
+
], FileCategoryResolver.prototype, "FileCategory", null);
|
|
24128
|
+
__decorate([
|
|
24129
|
+
(0, server_1.FieldResolver)(() => [mj_core_schema_server_object_types.File_]),
|
|
24130
|
+
__param(0, (0, server_1.Root)()),
|
|
24131
|
+
__param(1, (0, server_1.Ctx)()),
|
|
24132
|
+
__param(2, (0, server_1.PubSub)()),
|
|
24133
|
+
__metadata("design:type", Function),
|
|
24134
|
+
__metadata("design:paramtypes", [FileCategory_, Object, server_1.PubSubEngine]),
|
|
24135
|
+
__metadata("design:returntype", Promise)
|
|
24136
|
+
], FileCategoryResolver.prototype, "FilesArray", null);
|
|
24137
|
+
__decorate([
|
|
24138
|
+
(0, server_1.FieldResolver)(() => [mj_core_schema_server_object_types.FileCategory_]),
|
|
24139
|
+
__param(0, (0, server_1.Root)()),
|
|
24140
|
+
__param(1, (0, server_1.Ctx)()),
|
|
24141
|
+
__param(2, (0, server_1.PubSub)()),
|
|
24142
|
+
__metadata("design:type", Function),
|
|
24143
|
+
__metadata("design:paramtypes", [FileCategory_, Object, server_1.PubSubEngine]),
|
|
24144
|
+
__metadata("design:returntype", Promise)
|
|
24145
|
+
], FileCategoryResolver.prototype, "FileCategoriesArray", null);
|
|
24146
|
+
__decorate([
|
|
24147
|
+
(0, server_1.Mutation)(() => FileCategory_),
|
|
24148
|
+
__param(0, (0, server_1.Arg)('input', () => CreateFileCategoryInput)),
|
|
24149
|
+
__param(1, (0, server_1.Ctx)()),
|
|
24150
|
+
__param(2, (0, server_1.PubSub)()),
|
|
24151
|
+
__metadata("design:type", Function),
|
|
24152
|
+
__metadata("design:paramtypes", [CreateFileCategoryInput, Object, server_1.PubSubEngine]),
|
|
24153
|
+
__metadata("design:returntype", Promise)
|
|
24154
|
+
], FileCategoryResolver.prototype, "CreateFileCategory", null);
|
|
24155
|
+
__decorate([
|
|
24156
|
+
(0, server_1.Mutation)(() => FileCategory_),
|
|
24157
|
+
__param(0, (0, server_1.Arg)('input', () => UpdateFileCategoryInput)),
|
|
24158
|
+
__param(1, (0, server_1.Ctx)()),
|
|
24159
|
+
__param(2, (0, server_1.PubSub)()),
|
|
24160
|
+
__metadata("design:type", Function),
|
|
24161
|
+
__metadata("design:paramtypes", [UpdateFileCategoryInput, Object, server_1.PubSubEngine]),
|
|
24162
|
+
__metadata("design:returntype", Promise)
|
|
24163
|
+
], FileCategoryResolver.prototype, "UpdateFileCategory", null);
|
|
24164
|
+
exports.FileCategoryResolver = FileCategoryResolver = __decorate([
|
|
24165
|
+
(0, server_1.Resolver)(FileCategory_)
|
|
24166
|
+
], FileCategoryResolver);
|
|
24167
|
+
let FileEntityRecordLink_ = class FileEntityRecordLink_ {
|
|
24168
|
+
};
|
|
24169
|
+
exports.FileEntityRecordLink_ = FileEntityRecordLink_;
|
|
24170
|
+
__decorate([
|
|
24171
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
24172
|
+
__metadata("design:type", Number)
|
|
24173
|
+
], FileEntityRecordLink_.prototype, "ID", void 0);
|
|
24174
|
+
__decorate([
|
|
24175
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
24176
|
+
__metadata("design:type", Number)
|
|
24177
|
+
], FileEntityRecordLink_.prototype, "FileID", void 0);
|
|
24178
|
+
__decorate([
|
|
24179
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
24180
|
+
__metadata("design:type", Number)
|
|
24181
|
+
], FileEntityRecordLink_.prototype, "EntityID", void 0);
|
|
24182
|
+
__decorate([
|
|
24183
|
+
(0, server_1.Field)(),
|
|
24184
|
+
(0, class_validator_1.MaxLength)(510),
|
|
24185
|
+
__metadata("design:type", String)
|
|
24186
|
+
], FileEntityRecordLink_.prototype, "RecordID", void 0);
|
|
24187
|
+
__decorate([
|
|
24188
|
+
(0, server_1.Field)(),
|
|
24189
|
+
(0, class_validator_1.MaxLength)(8),
|
|
24190
|
+
__metadata("design:type", Date)
|
|
24191
|
+
], FileEntityRecordLink_.prototype, "CreatedAt", void 0);
|
|
24192
|
+
__decorate([
|
|
24193
|
+
(0, server_1.Field)(),
|
|
24194
|
+
(0, class_validator_1.MaxLength)(8),
|
|
24195
|
+
__metadata("design:type", Date)
|
|
24196
|
+
], FileEntityRecordLink_.prototype, "UpdatedAt", void 0);
|
|
24197
|
+
__decorate([
|
|
24198
|
+
(0, server_1.Field)(),
|
|
24199
|
+
(0, class_validator_1.MaxLength)(1000),
|
|
24200
|
+
__metadata("design:type", String)
|
|
24201
|
+
], FileEntityRecordLink_.prototype, "File", void 0);
|
|
24202
|
+
__decorate([
|
|
24203
|
+
(0, server_1.Field)(),
|
|
24204
|
+
(0, class_validator_1.MaxLength)(510),
|
|
24205
|
+
__metadata("design:type", String)
|
|
24206
|
+
], FileEntityRecordLink_.prototype, "Entity", void 0);
|
|
24207
|
+
exports.FileEntityRecordLink_ = FileEntityRecordLink_ = __decorate([
|
|
24208
|
+
(0, server_1.ObjectType)()
|
|
24209
|
+
], FileEntityRecordLink_);
|
|
24210
|
+
let CreateFileEntityRecordLinkInput = class CreateFileEntityRecordLinkInput {
|
|
24211
|
+
};
|
|
24212
|
+
exports.CreateFileEntityRecordLinkInput = CreateFileEntityRecordLinkInput;
|
|
24213
|
+
__decorate([
|
|
24214
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
24215
|
+
__metadata("design:type", Number)
|
|
24216
|
+
], CreateFileEntityRecordLinkInput.prototype, "FileID", void 0);
|
|
24217
|
+
__decorate([
|
|
24218
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
24219
|
+
__metadata("design:type", Number)
|
|
24220
|
+
], CreateFileEntityRecordLinkInput.prototype, "EntityID", void 0);
|
|
24221
|
+
__decorate([
|
|
24222
|
+
(0, server_1.Field)(),
|
|
24223
|
+
__metadata("design:type", String)
|
|
24224
|
+
], CreateFileEntityRecordLinkInput.prototype, "RecordID", void 0);
|
|
24225
|
+
exports.CreateFileEntityRecordLinkInput = CreateFileEntityRecordLinkInput = __decorate([
|
|
24226
|
+
(0, server_1.InputType)()
|
|
24227
|
+
], CreateFileEntityRecordLinkInput);
|
|
24228
|
+
let UpdateFileEntityRecordLinkInput = class UpdateFileEntityRecordLinkInput {
|
|
24229
|
+
};
|
|
24230
|
+
exports.UpdateFileEntityRecordLinkInput = UpdateFileEntityRecordLinkInput;
|
|
24231
|
+
__decorate([
|
|
24232
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
24233
|
+
__metadata("design:type", Number)
|
|
24234
|
+
], UpdateFileEntityRecordLinkInput.prototype, "ID", void 0);
|
|
24235
|
+
__decorate([
|
|
24236
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
24237
|
+
__metadata("design:type", Number)
|
|
24238
|
+
], UpdateFileEntityRecordLinkInput.prototype, "FileID", void 0);
|
|
24239
|
+
__decorate([
|
|
24240
|
+
(0, server_1.Field)(() => server_1.Int),
|
|
24241
|
+
__metadata("design:type", Number)
|
|
24242
|
+
], UpdateFileEntityRecordLinkInput.prototype, "EntityID", void 0);
|
|
24243
|
+
__decorate([
|
|
24244
|
+
(0, server_1.Field)(),
|
|
24245
|
+
__metadata("design:type", String)
|
|
24246
|
+
], UpdateFileEntityRecordLinkInput.prototype, "RecordID", void 0);
|
|
24247
|
+
exports.UpdateFileEntityRecordLinkInput = UpdateFileEntityRecordLinkInput = __decorate([
|
|
24248
|
+
(0, server_1.InputType)()
|
|
24249
|
+
], UpdateFileEntityRecordLinkInput);
|
|
24250
|
+
let RunFileEntityRecordLinkViewResult = class RunFileEntityRecordLinkViewResult {
|
|
24251
|
+
};
|
|
24252
|
+
exports.RunFileEntityRecordLinkViewResult = RunFileEntityRecordLinkViewResult;
|
|
24253
|
+
__decorate([
|
|
24254
|
+
(0, server_1.Field)(() => [FileEntityRecordLink_]),
|
|
24255
|
+
__metadata("design:type", Array)
|
|
24256
|
+
], RunFileEntityRecordLinkViewResult.prototype, "Results", void 0);
|
|
24257
|
+
__decorate([
|
|
24258
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
24259
|
+
__metadata("design:type", Number)
|
|
24260
|
+
], RunFileEntityRecordLinkViewResult.prototype, "UserViewRunID", void 0);
|
|
24261
|
+
__decorate([
|
|
24262
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
24263
|
+
__metadata("design:type", Number)
|
|
24264
|
+
], RunFileEntityRecordLinkViewResult.prototype, "RowCount", void 0);
|
|
24265
|
+
__decorate([
|
|
24266
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
24267
|
+
__metadata("design:type", Number)
|
|
24268
|
+
], RunFileEntityRecordLinkViewResult.prototype, "TotalRowCount", void 0);
|
|
24269
|
+
__decorate([
|
|
24270
|
+
(0, server_1.Field)(() => server_1.Int, { nullable: true }),
|
|
24271
|
+
__metadata("design:type", Number)
|
|
24272
|
+
], RunFileEntityRecordLinkViewResult.prototype, "ExecutionTime", void 0);
|
|
24273
|
+
__decorate([
|
|
24274
|
+
(0, server_1.Field)({ nullable: true }),
|
|
24275
|
+
__metadata("design:type", String)
|
|
24276
|
+
], RunFileEntityRecordLinkViewResult.prototype, "ErrorMessage", void 0);
|
|
24277
|
+
__decorate([
|
|
24278
|
+
(0, server_1.Field)(() => Boolean, { nullable: false }),
|
|
24279
|
+
__metadata("design:type", Boolean)
|
|
24280
|
+
], RunFileEntityRecordLinkViewResult.prototype, "Success", void 0);
|
|
24281
|
+
exports.RunFileEntityRecordLinkViewResult = RunFileEntityRecordLinkViewResult = __decorate([
|
|
24282
|
+
(0, server_1.ObjectType)()
|
|
24283
|
+
], RunFileEntityRecordLinkViewResult);
|
|
24284
|
+
let FileEntityRecordLinkResolver = class FileEntityRecordLinkResolver extends server_1.ResolverBase {
|
|
24285
|
+
async RunFileEntityRecordLinkViewByID(input, { dataSource, userPayload }, pubSub) {
|
|
24286
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
24287
|
+
}
|
|
24288
|
+
async RunFileEntityRecordLinkViewByName(input, { dataSource, userPayload }, pubSub) {
|
|
24289
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
24290
|
+
}
|
|
24291
|
+
async RunFileEntityRecordLinkDynamicView(input, { dataSource, userPayload }, pubSub) {
|
|
24292
|
+
input.EntityName = 'File Entity Record Links';
|
|
24293
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
24294
|
+
}
|
|
24295
|
+
async FileEntityRecordLink(ID, { dataSource, userPayload }, pubSub) {
|
|
24296
|
+
this.CheckUserReadPermissions('File Entity Record Links', userPayload);
|
|
24297
|
+
const sSQL = `SELECT * FROM [${config_1.mj_core_schema}].[vwFileEntityRecordLinks] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('File Entity Record Links', userPayload, core_1.EntityPermissionType.Read, 'AND');
|
|
24298
|
+
const result = this.MapFieldNamesToCodeNames('File Entity Record Links', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
|
|
24299
|
+
return result;
|
|
24300
|
+
}
|
|
24301
|
+
async CreateFileEntityRecordLink(input, { dataSource, userPayload }, pubSub) {
|
|
24302
|
+
if (await this.BeforeCreate(dataSource, input)) {
|
|
24303
|
+
const entityObject = await new core_1.Metadata().GetEntityObject('File Entity Record Links', this.GetUserFromPayload(userPayload));
|
|
24304
|
+
await entityObject.NewRecord();
|
|
24305
|
+
entityObject.SetMany(input);
|
|
24306
|
+
if (await entityObject.Save()) {
|
|
24307
|
+
await this.AfterCreate(dataSource, input);
|
|
24308
|
+
return entityObject.GetAll();
|
|
24309
|
+
}
|
|
24310
|
+
else
|
|
24311
|
+
return null;
|
|
24312
|
+
}
|
|
24313
|
+
else
|
|
24314
|
+
return null;
|
|
24315
|
+
}
|
|
24316
|
+
async BeforeCreate(dataSource, input) {
|
|
24317
|
+
return true;
|
|
24318
|
+
}
|
|
24319
|
+
async AfterCreate(dataSource, input) {
|
|
24320
|
+
}
|
|
24321
|
+
async UpdateFileEntityRecordLink(input, { dataSource, userPayload }, pubSub) {
|
|
24322
|
+
if (await this.BeforeUpdate(dataSource, input)) {
|
|
24323
|
+
const entityObject = await new core_1.Metadata().GetEntityObject('File Entity Record Links', this.GetUserFromPayload(userPayload));
|
|
24324
|
+
entityObject.LoadFromData(input);
|
|
24325
|
+
if (await entityObject.Save({ IgnoreDirtyState: true })) {
|
|
24326
|
+
await this.AfterUpdate(dataSource, input);
|
|
24327
|
+
return entityObject.GetAll();
|
|
24328
|
+
}
|
|
24329
|
+
else
|
|
24330
|
+
return null;
|
|
24331
|
+
}
|
|
24332
|
+
else
|
|
24333
|
+
return null;
|
|
24334
|
+
}
|
|
24335
|
+
async BeforeUpdate(dataSource, input) {
|
|
24336
|
+
const i = input, d = dataSource;
|
|
24337
|
+
return true;
|
|
24338
|
+
}
|
|
24339
|
+
async AfterUpdate(dataSource, input) {
|
|
24340
|
+
const i = input, d = dataSource;
|
|
24341
|
+
}
|
|
24342
|
+
};
|
|
24343
|
+
exports.FileEntityRecordLinkResolver = FileEntityRecordLinkResolver;
|
|
24344
|
+
__decorate([
|
|
24345
|
+
(0, server_1.Query)(() => RunFileEntityRecordLinkViewResult),
|
|
24346
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByIDInput)),
|
|
24347
|
+
__param(1, (0, server_1.Ctx)()),
|
|
24348
|
+
__param(2, (0, server_1.PubSub)()),
|
|
24349
|
+
__metadata("design:type", Function),
|
|
24350
|
+
__metadata("design:paramtypes", [server_1.RunViewByIDInput, Object, server_1.PubSubEngine]),
|
|
24351
|
+
__metadata("design:returntype", Promise)
|
|
24352
|
+
], FileEntityRecordLinkResolver.prototype, "RunFileEntityRecordLinkViewByID", null);
|
|
24353
|
+
__decorate([
|
|
24354
|
+
(0, server_1.Query)(() => RunFileEntityRecordLinkViewResult),
|
|
24355
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunViewByNameInput)),
|
|
24356
|
+
__param(1, (0, server_1.Ctx)()),
|
|
24357
|
+
__param(2, (0, server_1.PubSub)()),
|
|
24358
|
+
__metadata("design:type", Function),
|
|
24359
|
+
__metadata("design:paramtypes", [server_1.RunViewByNameInput, Object, server_1.PubSubEngine]),
|
|
24360
|
+
__metadata("design:returntype", Promise)
|
|
24361
|
+
], FileEntityRecordLinkResolver.prototype, "RunFileEntityRecordLinkViewByName", null);
|
|
24362
|
+
__decorate([
|
|
24363
|
+
(0, server_1.Query)(() => RunFileEntityRecordLinkViewResult),
|
|
24364
|
+
__param(0, (0, server_1.Arg)('input', () => server_1.RunDynamicViewInput)),
|
|
24365
|
+
__param(1, (0, server_1.Ctx)()),
|
|
24366
|
+
__param(2, (0, server_1.PubSub)()),
|
|
24367
|
+
__metadata("design:type", Function),
|
|
24368
|
+
__metadata("design:paramtypes", [server_1.RunDynamicViewInput, Object, server_1.PubSubEngine]),
|
|
24369
|
+
__metadata("design:returntype", Promise)
|
|
24370
|
+
], FileEntityRecordLinkResolver.prototype, "RunFileEntityRecordLinkDynamicView", null);
|
|
24371
|
+
__decorate([
|
|
24372
|
+
(0, server_1.Query)(() => FileEntityRecordLink_, { nullable: true }),
|
|
24373
|
+
__param(0, (0, server_1.Arg)('ID', () => server_1.Int)),
|
|
24374
|
+
__param(1, (0, server_1.Ctx)()),
|
|
24375
|
+
__param(2, (0, server_1.PubSub)()),
|
|
24376
|
+
__metadata("design:type", Function),
|
|
24377
|
+
__metadata("design:paramtypes", [Number, Object, server_1.PubSubEngine]),
|
|
24378
|
+
__metadata("design:returntype", Promise)
|
|
24379
|
+
], FileEntityRecordLinkResolver.prototype, "FileEntityRecordLink", null);
|
|
24380
|
+
__decorate([
|
|
24381
|
+
(0, server_1.Mutation)(() => FileEntityRecordLink_),
|
|
24382
|
+
__param(0, (0, server_1.Arg)('input', () => CreateFileEntityRecordLinkInput)),
|
|
24383
|
+
__param(1, (0, server_1.Ctx)()),
|
|
24384
|
+
__param(2, (0, server_1.PubSub)()),
|
|
24385
|
+
__metadata("design:type", Function),
|
|
24386
|
+
__metadata("design:paramtypes", [CreateFileEntityRecordLinkInput, Object, server_1.PubSubEngine]),
|
|
24387
|
+
__metadata("design:returntype", Promise)
|
|
24388
|
+
], FileEntityRecordLinkResolver.prototype, "CreateFileEntityRecordLink", null);
|
|
24389
|
+
__decorate([
|
|
24390
|
+
(0, server_1.Mutation)(() => FileEntityRecordLink_),
|
|
24391
|
+
__param(0, (0, server_1.Arg)('input', () => UpdateFileEntityRecordLinkInput)),
|
|
24392
|
+
__param(1, (0, server_1.Ctx)()),
|
|
24393
|
+
__param(2, (0, server_1.PubSub)()),
|
|
24394
|
+
__metadata("design:type", Function),
|
|
24395
|
+
__metadata("design:paramtypes", [UpdateFileEntityRecordLinkInput, Object, server_1.PubSubEngine]),
|
|
24396
|
+
__metadata("design:returntype", Promise)
|
|
24397
|
+
], FileEntityRecordLinkResolver.prototype, "UpdateFileEntityRecordLink", null);
|
|
24398
|
+
exports.FileEntityRecordLinkResolver = FileEntityRecordLinkResolver = __decorate([
|
|
24399
|
+
(0, server_1.Resolver)(FileEntityRecordLink_)
|
|
24400
|
+
], FileEntityRecordLinkResolver);
|
|
23173
24401
|
//# sourceMappingURL=generated.js.map
|