@memberjunction/server 2.7.1 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config.d.ts +30 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +4 -0
- package/dist/config.js.map +1 -1
- package/dist/entitySubclasses/userViewEntity.server.d.ts.map +1 -1
- package/dist/entitySubclasses/userViewEntity.server.js +5 -4
- package/dist/entitySubclasses/userViewEntity.server.js.map +1 -1
- package/dist/generated/generated.d.ts +119 -4
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +751 -30
- package/dist/generated/generated.js.map +1 -1
- package/dist/resolvers/AskSkipResolver.d.ts.map +1 -1
- package/dist/resolvers/AskSkipResolver.js +31 -5
- package/dist/resolvers/AskSkipResolver.js.map +1 -1
- package/package.json +22 -22
- package/src/config.ts +4 -0
- package/src/entitySubclasses/userViewEntity.server.ts +5 -4
- package/src/generated/generated.ts +472 -24
- package/src/resolvers/AskSkipResolver.ts +58 -18
|
@@ -2014,8 +2014,8 @@ let AIPromptCategory_ = class AIPromptCategory_ {
|
|
|
2014
2014
|
_mj__CreatedAt;
|
|
2015
2015
|
_mj__UpdatedAt;
|
|
2016
2016
|
Parent;
|
|
2017
|
-
AIPrompts_CategoryIDArray;
|
|
2018
2017
|
AIPromptCategories_ParentIDArray;
|
|
2018
|
+
AIPrompts_CategoryIDArray;
|
|
2019
2019
|
};
|
|
2020
2020
|
__decorate([
|
|
2021
2021
|
Field(),
|
|
@@ -2051,14 +2051,14 @@ __decorate([
|
|
|
2051
2051
|
MaxLength(510),
|
|
2052
2052
|
__metadata("design:type", String)
|
|
2053
2053
|
], AIPromptCategory_.prototype, "Parent", void 0);
|
|
2054
|
-
__decorate([
|
|
2055
|
-
Field(() => [AIPrompt_]),
|
|
2056
|
-
__metadata("design:type", Array)
|
|
2057
|
-
], AIPromptCategory_.prototype, "AIPrompts_CategoryIDArray", void 0);
|
|
2058
2054
|
__decorate([
|
|
2059
2055
|
Field(() => [AIPromptCategory_]),
|
|
2060
2056
|
__metadata("design:type", Array)
|
|
2061
2057
|
], AIPromptCategory_.prototype, "AIPromptCategories_ParentIDArray", void 0);
|
|
2058
|
+
__decorate([
|
|
2059
|
+
Field(() => [AIPrompt_]),
|
|
2060
|
+
__metadata("design:type", Array)
|
|
2061
|
+
], AIPromptCategory_.prototype, "AIPrompts_CategoryIDArray", void 0);
|
|
2062
2062
|
AIPromptCategory_ = __decorate([
|
|
2063
2063
|
ObjectType({ description: 'Categories for organizing AI prompts in a hierarchical structure.' })
|
|
2064
2064
|
], AIPromptCategory_);
|
|
@@ -2173,18 +2173,18 @@ let AIPromptCategoryResolver = class AIPromptCategoryResolver extends ResolverBa
|
|
|
2173
2173
|
const result = this.MapFieldNamesToCodeNames('AI Prompt Categories', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
|
|
2174
2174
|
return result;
|
|
2175
2175
|
}
|
|
2176
|
-
async AIPrompts_CategoryIDArray(aipromptcategory_, { dataSource, userPayload }, pubSub) {
|
|
2177
|
-
this.CheckUserReadPermissions('AI Prompts', userPayload);
|
|
2178
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPrompts] WHERE [CategoryID]='${aipromptcategory_.ID}' ` + this.getRowLevelSecurityWhereClause('AI Prompts', userPayload, EntityPermissionType.Read, 'AND');
|
|
2179
|
-
const result = this.ArrayMapFieldNamesToCodeNames('AI Prompts', await dataSource.query(sSQL));
|
|
2180
|
-
return result;
|
|
2181
|
-
}
|
|
2182
2176
|
async AIPromptCategories_ParentIDArray(aipromptcategory_, { dataSource, userPayload }, pubSub) {
|
|
2183
2177
|
this.CheckUserReadPermissions('AI Prompt Categories', userPayload);
|
|
2184
2178
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptCategories] WHERE [ParentID]='${aipromptcategory_.ID}' ` + this.getRowLevelSecurityWhereClause('AI Prompt Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
2185
2179
|
const result = this.ArrayMapFieldNamesToCodeNames('AI Prompt Categories', await dataSource.query(sSQL));
|
|
2186
2180
|
return result;
|
|
2187
2181
|
}
|
|
2182
|
+
async AIPrompts_CategoryIDArray(aipromptcategory_, { dataSource, userPayload }, pubSub) {
|
|
2183
|
+
this.CheckUserReadPermissions('AI Prompts', userPayload);
|
|
2184
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPrompts] WHERE [CategoryID]='${aipromptcategory_.ID}' ` + this.getRowLevelSecurityWhereClause('AI Prompts', userPayload, EntityPermissionType.Read, 'AND');
|
|
2185
|
+
const result = this.ArrayMapFieldNamesToCodeNames('AI Prompts', await dataSource.query(sSQL));
|
|
2186
|
+
return result;
|
|
2187
|
+
}
|
|
2188
2188
|
async CreateAIPromptCategory(input, { dataSource, userPayload }, pubSub) {
|
|
2189
2189
|
return this.CreateRecord('AI Prompt Categories', input, dataSource, userPayload, pubSub);
|
|
2190
2190
|
}
|
|
@@ -2233,23 +2233,23 @@ __decorate([
|
|
|
2233
2233
|
__metadata("design:returntype", Promise)
|
|
2234
2234
|
], AIPromptCategoryResolver.prototype, "AIPromptCategory", null);
|
|
2235
2235
|
__decorate([
|
|
2236
|
-
FieldResolver(() => [
|
|
2236
|
+
FieldResolver(() => [AIPromptCategory_]),
|
|
2237
2237
|
__param(0, Root()),
|
|
2238
2238
|
__param(1, Ctx()),
|
|
2239
2239
|
__param(2, PubSub()),
|
|
2240
2240
|
__metadata("design:type", Function),
|
|
2241
2241
|
__metadata("design:paramtypes", [AIPromptCategory_, Object, PubSubEngine]),
|
|
2242
2242
|
__metadata("design:returntype", Promise)
|
|
2243
|
-
], AIPromptCategoryResolver.prototype, "
|
|
2243
|
+
], AIPromptCategoryResolver.prototype, "AIPromptCategories_ParentIDArray", null);
|
|
2244
2244
|
__decorate([
|
|
2245
|
-
FieldResolver(() => [
|
|
2245
|
+
FieldResolver(() => [AIPrompt_]),
|
|
2246
2246
|
__param(0, Root()),
|
|
2247
2247
|
__param(1, Ctx()),
|
|
2248
2248
|
__param(2, PubSub()),
|
|
2249
2249
|
__metadata("design:type", Function),
|
|
2250
2250
|
__metadata("design:paramtypes", [AIPromptCategory_, Object, PubSubEngine]),
|
|
2251
2251
|
__metadata("design:returntype", Promise)
|
|
2252
|
-
], AIPromptCategoryResolver.prototype, "
|
|
2252
|
+
], AIPromptCategoryResolver.prototype, "AIPrompts_CategoryIDArray", null);
|
|
2253
2253
|
__decorate([
|
|
2254
2254
|
Mutation(() => AIPromptCategory_),
|
|
2255
2255
|
__param(0, Arg('input', () => CreateAIPromptCategoryInput)),
|
|
@@ -4127,6 +4127,7 @@ let Role_ = class Role_ {
|
|
|
4127
4127
|
EntityPermissions_RoleNameArray;
|
|
4128
4128
|
QueryPermissions_RoleNameArray;
|
|
4129
4129
|
EmployeeRoles_RoleIDArray;
|
|
4130
|
+
ResourcePermissions_RoleIDArray;
|
|
4130
4131
|
};
|
|
4131
4132
|
__decorate([
|
|
4132
4133
|
Field(),
|
|
@@ -4182,6 +4183,10 @@ __decorate([
|
|
|
4182
4183
|
Field(() => [EmployeeRole_]),
|
|
4183
4184
|
__metadata("design:type", Array)
|
|
4184
4185
|
], Role_.prototype, "EmployeeRoles_RoleIDArray", void 0);
|
|
4186
|
+
__decorate([
|
|
4187
|
+
Field(() => [ResourcePermission_]),
|
|
4188
|
+
__metadata("design:type", Array)
|
|
4189
|
+
], Role_.prototype, "ResourcePermissions_RoleIDArray", void 0);
|
|
4185
4190
|
Role_ = __decorate([
|
|
4186
4191
|
ObjectType({ description: 'Roles are used for security administration and can have zero to many Users as members' })
|
|
4187
4192
|
], Role_);
|
|
@@ -4342,6 +4347,12 @@ let RoleResolver = class RoleResolver extends ResolverBase {
|
|
|
4342
4347
|
const result = this.ArrayMapFieldNamesToCodeNames('Employee Roles', await dataSource.query(sSQL));
|
|
4343
4348
|
return result;
|
|
4344
4349
|
}
|
|
4350
|
+
async ResourcePermissions_RoleIDArray(role_, { dataSource, userPayload }, pubSub) {
|
|
4351
|
+
this.CheckUserReadPermissions('Resource Permissions', userPayload);
|
|
4352
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwResourcePermissions] WHERE [RoleID]='${role_.ID}' ` + this.getRowLevelSecurityWhereClause('Resource Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
4353
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Resource Permissions', await dataSource.query(sSQL));
|
|
4354
|
+
return result;
|
|
4355
|
+
}
|
|
4345
4356
|
async CreateRole(input, { dataSource, userPayload }, pubSub) {
|
|
4346
4357
|
return this.CreateRecord('Roles', input, dataSource, userPayload, pubSub);
|
|
4347
4358
|
}
|
|
@@ -4442,6 +4453,15 @@ __decorate([
|
|
|
4442
4453
|
__metadata("design:paramtypes", [Role_, Object, PubSubEngine]),
|
|
4443
4454
|
__metadata("design:returntype", Promise)
|
|
4444
4455
|
], RoleResolver.prototype, "EmployeeRoles_RoleIDArray", null);
|
|
4456
|
+
__decorate([
|
|
4457
|
+
FieldResolver(() => [ResourcePermission_]),
|
|
4458
|
+
__param(0, Root()),
|
|
4459
|
+
__param(1, Ctx()),
|
|
4460
|
+
__param(2, PubSub()),
|
|
4461
|
+
__metadata("design:type", Function),
|
|
4462
|
+
__metadata("design:paramtypes", [Role_, Object, PubSubEngine]),
|
|
4463
|
+
__metadata("design:returntype", Promise)
|
|
4464
|
+
], RoleResolver.prototype, "ResourcePermissions_RoleIDArray", null);
|
|
4445
4465
|
__decorate([
|
|
4446
4466
|
Mutation(() => Role_),
|
|
4447
4467
|
__param(0, Arg('input', () => CreateRoleInput)),
|
|
@@ -7986,6 +8006,8 @@ let User_ = class User_ {
|
|
|
7986
8006
|
UserFavorites_UserIDArray;
|
|
7987
8007
|
ListCategories_UserIDArray;
|
|
7988
8008
|
ScheduledActions_CreatedByUserIDArray;
|
|
8009
|
+
ResourceLinks_UserIDArray;
|
|
8010
|
+
ResourcePermissions_UserIDArray;
|
|
7989
8011
|
};
|
|
7990
8012
|
__decorate([
|
|
7991
8013
|
Field(),
|
|
@@ -8214,6 +8236,14 @@ __decorate([
|
|
|
8214
8236
|
Field(() => [ScheduledAction_]),
|
|
8215
8237
|
__metadata("design:type", Array)
|
|
8216
8238
|
], User_.prototype, "ScheduledActions_CreatedByUserIDArray", void 0);
|
|
8239
|
+
__decorate([
|
|
8240
|
+
Field(() => [ResourceLink_]),
|
|
8241
|
+
__metadata("design:type", Array)
|
|
8242
|
+
], User_.prototype, "ResourceLinks_UserIDArray", void 0);
|
|
8243
|
+
__decorate([
|
|
8244
|
+
Field(() => [ResourcePermission_]),
|
|
8245
|
+
__metadata("design:type", Array)
|
|
8246
|
+
], User_.prototype, "ResourcePermissions_UserIDArray", void 0);
|
|
8217
8247
|
User_ = __decorate([
|
|
8218
8248
|
ObjectType({ description: 'A list of all users who have or had access to the system' })
|
|
8219
8249
|
], User_);
|
|
@@ -8606,6 +8636,18 @@ let UserResolverBase = class UserResolverBase extends ResolverBase {
|
|
|
8606
8636
|
const result = this.ArrayMapFieldNamesToCodeNames('Scheduled Actions', await dataSource.query(sSQL));
|
|
8607
8637
|
return result;
|
|
8608
8638
|
}
|
|
8639
|
+
async ResourceLinks_UserIDArray(user_, { dataSource, userPayload }, pubSub) {
|
|
8640
|
+
this.CheckUserReadPermissions('Resource Links', userPayload);
|
|
8641
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwResourceLinks] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause('Resource Links', userPayload, EntityPermissionType.Read, 'AND');
|
|
8642
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Resource Links', await dataSource.query(sSQL));
|
|
8643
|
+
return result;
|
|
8644
|
+
}
|
|
8645
|
+
async ResourcePermissions_UserIDArray(user_, { dataSource, userPayload }, pubSub) {
|
|
8646
|
+
this.CheckUserReadPermissions('Resource Permissions', userPayload);
|
|
8647
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwResourcePermissions] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause('Resource Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
8648
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Resource Permissions', await dataSource.query(sSQL));
|
|
8649
|
+
return result;
|
|
8650
|
+
}
|
|
8609
8651
|
async CreateUser(input, { dataSource, userPayload }, pubSub) {
|
|
8610
8652
|
return this.CreateRecord('Users', input, dataSource, userPayload, pubSub);
|
|
8611
8653
|
}
|
|
@@ -8949,6 +8991,24 @@ __decorate([
|
|
|
8949
8991
|
__metadata("design:paramtypes", [User_, Object, PubSubEngine]),
|
|
8950
8992
|
__metadata("design:returntype", Promise)
|
|
8951
8993
|
], UserResolverBase.prototype, "ScheduledActions_CreatedByUserIDArray", null);
|
|
8994
|
+
__decorate([
|
|
8995
|
+
FieldResolver(() => [ResourceLink_]),
|
|
8996
|
+
__param(0, Root()),
|
|
8997
|
+
__param(1, Ctx()),
|
|
8998
|
+
__param(2, PubSub()),
|
|
8999
|
+
__metadata("design:type", Function),
|
|
9000
|
+
__metadata("design:paramtypes", [User_, Object, PubSubEngine]),
|
|
9001
|
+
__metadata("design:returntype", Promise)
|
|
9002
|
+
], UserResolverBase.prototype, "ResourceLinks_UserIDArray", null);
|
|
9003
|
+
__decorate([
|
|
9004
|
+
FieldResolver(() => [ResourcePermission_]),
|
|
9005
|
+
__param(0, Root()),
|
|
9006
|
+
__param(1, Ctx()),
|
|
9007
|
+
__param(2, PubSub()),
|
|
9008
|
+
__metadata("design:type", Function),
|
|
9009
|
+
__metadata("design:paramtypes", [User_, Object, PubSubEngine]),
|
|
9010
|
+
__metadata("design:returntype", Promise)
|
|
9011
|
+
], UserResolverBase.prototype, "ResourcePermissions_UserIDArray", null);
|
|
8952
9012
|
__decorate([
|
|
8953
9013
|
Mutation(() => User_),
|
|
8954
9014
|
__param(0, Arg('input', () => CreateUserInput)),
|
|
@@ -16858,8 +16918,8 @@ let AIModel_ = class AIModel_ {
|
|
|
16858
16918
|
AIModelActions_AIModelIDArray;
|
|
16859
16919
|
VectorIndexes_EmbeddingModelIDArray;
|
|
16860
16920
|
ContentTypes_AIModelIDArray;
|
|
16861
|
-
AIResultCache_AIModelIDArray;
|
|
16862
16921
|
EntityAIActions_AIModelIDArray;
|
|
16922
|
+
AIResultCache_AIModelIDArray;
|
|
16863
16923
|
};
|
|
16864
16924
|
__decorate([
|
|
16865
16925
|
Field(),
|
|
@@ -16959,14 +17019,14 @@ __decorate([
|
|
|
16959
17019
|
Field(() => [ContentType_]),
|
|
16960
17020
|
__metadata("design:type", Array)
|
|
16961
17021
|
], AIModel_.prototype, "ContentTypes_AIModelIDArray", void 0);
|
|
16962
|
-
__decorate([
|
|
16963
|
-
Field(() => [AIResultCache_]),
|
|
16964
|
-
__metadata("design:type", Array)
|
|
16965
|
-
], AIModel_.prototype, "AIResultCache_AIModelIDArray", void 0);
|
|
16966
17022
|
__decorate([
|
|
16967
17023
|
Field(() => [EntityAIAction_]),
|
|
16968
17024
|
__metadata("design:type", Array)
|
|
16969
17025
|
], AIModel_.prototype, "EntityAIActions_AIModelIDArray", void 0);
|
|
17026
|
+
__decorate([
|
|
17027
|
+
Field(() => [AIResultCache_]),
|
|
17028
|
+
__metadata("design:type", Array)
|
|
17029
|
+
], AIModel_.prototype, "AIResultCache_AIModelIDArray", void 0);
|
|
16970
17030
|
AIModel_ = __decorate([
|
|
16971
17031
|
ObjectType({ description: 'Catalog of all AI Models configured in the system' })
|
|
16972
17032
|
], AIModel_);
|
|
@@ -17217,18 +17277,18 @@ let AIModelResolver = class AIModelResolver extends ResolverBase {
|
|
|
17217
17277
|
const result = this.ArrayMapFieldNamesToCodeNames('Content Types', await dataSource.query(sSQL));
|
|
17218
17278
|
return result;
|
|
17219
17279
|
}
|
|
17220
|
-
async AIResultCache_AIModelIDArray(aimodel_, { dataSource, userPayload }, pubSub) {
|
|
17221
|
-
this.CheckUserReadPermissions('AI Result Cache', userPayload);
|
|
17222
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIResultCaches] WHERE [AIModelID]='${aimodel_.ID}' ` + this.getRowLevelSecurityWhereClause('AI Result Cache', userPayload, EntityPermissionType.Read, 'AND');
|
|
17223
|
-
const result = this.ArrayMapFieldNamesToCodeNames('AI Result Cache', await dataSource.query(sSQL));
|
|
17224
|
-
return result;
|
|
17225
|
-
}
|
|
17226
17280
|
async EntityAIActions_AIModelIDArray(aimodel_, { dataSource, userPayload }, pubSub) {
|
|
17227
17281
|
this.CheckUserReadPermissions('Entity AI Actions', userPayload);
|
|
17228
17282
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityAIActions] WHERE [AIModelID]='${aimodel_.ID}' ` + this.getRowLevelSecurityWhereClause('Entity AI Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
17229
17283
|
const result = this.ArrayMapFieldNamesToCodeNames('Entity AI Actions', await dataSource.query(sSQL));
|
|
17230
17284
|
return result;
|
|
17231
17285
|
}
|
|
17286
|
+
async AIResultCache_AIModelIDArray(aimodel_, { dataSource, userPayload }, pubSub) {
|
|
17287
|
+
this.CheckUserReadPermissions('AI Result Cache', userPayload);
|
|
17288
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIResultCaches] WHERE [AIModelID]='${aimodel_.ID}' ` + this.getRowLevelSecurityWhereClause('AI Result Cache', userPayload, EntityPermissionType.Read, 'AND');
|
|
17289
|
+
const result = this.ArrayMapFieldNamesToCodeNames('AI Result Cache', await dataSource.query(sSQL));
|
|
17290
|
+
return result;
|
|
17291
|
+
}
|
|
17232
17292
|
async CreateAIModel(input, { dataSource, userPayload }, pubSub) {
|
|
17233
17293
|
return this.CreateRecord('AI Models', input, dataSource, userPayload, pubSub);
|
|
17234
17294
|
}
|
|
@@ -17330,23 +17390,23 @@ __decorate([
|
|
|
17330
17390
|
__metadata("design:returntype", Promise)
|
|
17331
17391
|
], AIModelResolver.prototype, "ContentTypes_AIModelIDArray", null);
|
|
17332
17392
|
__decorate([
|
|
17333
|
-
FieldResolver(() => [
|
|
17393
|
+
FieldResolver(() => [EntityAIAction_]),
|
|
17334
17394
|
__param(0, Root()),
|
|
17335
17395
|
__param(1, Ctx()),
|
|
17336
17396
|
__param(2, PubSub()),
|
|
17337
17397
|
__metadata("design:type", Function),
|
|
17338
17398
|
__metadata("design:paramtypes", [AIModel_, Object, PubSubEngine]),
|
|
17339
17399
|
__metadata("design:returntype", Promise)
|
|
17340
|
-
], AIModelResolver.prototype, "
|
|
17400
|
+
], AIModelResolver.prototype, "EntityAIActions_AIModelIDArray", null);
|
|
17341
17401
|
__decorate([
|
|
17342
|
-
FieldResolver(() => [
|
|
17402
|
+
FieldResolver(() => [AIResultCache_]),
|
|
17343
17403
|
__param(0, Root()),
|
|
17344
17404
|
__param(1, Ctx()),
|
|
17345
17405
|
__param(2, PubSub()),
|
|
17346
17406
|
__metadata("design:type", Function),
|
|
17347
17407
|
__metadata("design:paramtypes", [AIModel_, Object, PubSubEngine]),
|
|
17348
17408
|
__metadata("design:returntype", Promise)
|
|
17349
|
-
], AIModelResolver.prototype, "
|
|
17409
|
+
], AIModelResolver.prototype, "AIResultCache_AIModelIDArray", null);
|
|
17350
17410
|
__decorate([
|
|
17351
17411
|
Mutation(() => AIModel_),
|
|
17352
17412
|
__param(0, Arg('input', () => CreateAIModelInput)),
|
|
@@ -21025,9 +21085,13 @@ let ResourceType_ = class ResourceType_ {
|
|
|
21025
21085
|
EntityID;
|
|
21026
21086
|
_mj__CreatedAt;
|
|
21027
21087
|
_mj__UpdatedAt;
|
|
21088
|
+
CategoryEntityID;
|
|
21028
21089
|
Entity;
|
|
21090
|
+
CategoryEntity;
|
|
21029
21091
|
WorkspaceItems_ResourceTypeIDArray;
|
|
21030
21092
|
UserNotifications_ResourceTypeIDArray;
|
|
21093
|
+
ResourceLinks_ResourceTypeIDArray;
|
|
21094
|
+
ResourcePermissions_ResourceTypeIDArray;
|
|
21031
21095
|
};
|
|
21032
21096
|
__decorate([
|
|
21033
21097
|
Field(),
|
|
@@ -21068,11 +21132,21 @@ __decorate([
|
|
|
21068
21132
|
MaxLength(10),
|
|
21069
21133
|
__metadata("design:type", Date)
|
|
21070
21134
|
], ResourceType_.prototype, "_mj__UpdatedAt", void 0);
|
|
21135
|
+
__decorate([
|
|
21136
|
+
Field({ nullable: true, description: 'Nullable foreign key to the ID column in Entities entity, representing the category entity. ASSUMPTION: If provided, the assumption is there is a self-referencing/recursive foreign key establishing a hierarchy within the Category Entity, commonly called ParentID, but it can be named anything.' }),
|
|
21137
|
+
MaxLength(16),
|
|
21138
|
+
__metadata("design:type", String)
|
|
21139
|
+
], ResourceType_.prototype, "CategoryEntityID", void 0);
|
|
21071
21140
|
__decorate([
|
|
21072
21141
|
Field({ nullable: true }),
|
|
21073
21142
|
MaxLength(510),
|
|
21074
21143
|
__metadata("design:type", String)
|
|
21075
21144
|
], ResourceType_.prototype, "Entity", void 0);
|
|
21145
|
+
__decorate([
|
|
21146
|
+
Field({ nullable: true }),
|
|
21147
|
+
MaxLength(510),
|
|
21148
|
+
__metadata("design:type", String)
|
|
21149
|
+
], ResourceType_.prototype, "CategoryEntity", void 0);
|
|
21076
21150
|
__decorate([
|
|
21077
21151
|
Field(() => [WorkspaceItem_]),
|
|
21078
21152
|
__metadata("design:type", Array)
|
|
@@ -21081,6 +21155,14 @@ __decorate([
|
|
|
21081
21155
|
Field(() => [UserNotification_]),
|
|
21082
21156
|
__metadata("design:type", Array)
|
|
21083
21157
|
], ResourceType_.prototype, "UserNotifications_ResourceTypeIDArray", void 0);
|
|
21158
|
+
__decorate([
|
|
21159
|
+
Field(() => [ResourceLink_]),
|
|
21160
|
+
__metadata("design:type", Array)
|
|
21161
|
+
], ResourceType_.prototype, "ResourceLinks_ResourceTypeIDArray", void 0);
|
|
21162
|
+
__decorate([
|
|
21163
|
+
Field(() => [ResourcePermission_]),
|
|
21164
|
+
__metadata("design:type", Array)
|
|
21165
|
+
], ResourceType_.prototype, "ResourcePermissions_ResourceTypeIDArray", void 0);
|
|
21084
21166
|
ResourceType_ = __decorate([
|
|
21085
21167
|
ObjectType()
|
|
21086
21168
|
], ResourceType_);
|
|
@@ -21155,6 +21237,18 @@ let ResourceTypeResolver = class ResourceTypeResolver extends ResolverBase {
|
|
|
21155
21237
|
const result = this.ArrayMapFieldNamesToCodeNames('User Notifications', await dataSource.query(sSQL));
|
|
21156
21238
|
return result;
|
|
21157
21239
|
}
|
|
21240
|
+
async ResourceLinks_ResourceTypeIDArray(resourcetype_, { dataSource, userPayload }, pubSub) {
|
|
21241
|
+
this.CheckUserReadPermissions('Resource Links', userPayload);
|
|
21242
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwResourceLinks] WHERE [ResourceTypeID]='${resourcetype_.ID}' ` + this.getRowLevelSecurityWhereClause('Resource Links', userPayload, EntityPermissionType.Read, 'AND');
|
|
21243
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Resource Links', await dataSource.query(sSQL));
|
|
21244
|
+
return result;
|
|
21245
|
+
}
|
|
21246
|
+
async ResourcePermissions_ResourceTypeIDArray(resourcetype_, { dataSource, userPayload }, pubSub) {
|
|
21247
|
+
this.CheckUserReadPermissions('Resource Permissions', userPayload);
|
|
21248
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwResourcePermissions] WHERE [ResourceTypeID]='${resourcetype_.ID}' ` + this.getRowLevelSecurityWhereClause('Resource Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
21249
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Resource Permissions', await dataSource.query(sSQL));
|
|
21250
|
+
return result;
|
|
21251
|
+
}
|
|
21158
21252
|
};
|
|
21159
21253
|
__decorate([
|
|
21160
21254
|
Query(() => RunResourceTypeViewResult),
|
|
@@ -21210,6 +21304,24 @@ __decorate([
|
|
|
21210
21304
|
__metadata("design:paramtypes", [ResourceType_, Object, PubSubEngine]),
|
|
21211
21305
|
__metadata("design:returntype", Promise)
|
|
21212
21306
|
], ResourceTypeResolver.prototype, "UserNotifications_ResourceTypeIDArray", null);
|
|
21307
|
+
__decorate([
|
|
21308
|
+
FieldResolver(() => [ResourceLink_]),
|
|
21309
|
+
__param(0, Root()),
|
|
21310
|
+
__param(1, Ctx()),
|
|
21311
|
+
__param(2, PubSub()),
|
|
21312
|
+
__metadata("design:type", Function),
|
|
21313
|
+
__metadata("design:paramtypes", [ResourceType_, Object, PubSubEngine]),
|
|
21314
|
+
__metadata("design:returntype", Promise)
|
|
21315
|
+
], ResourceTypeResolver.prototype, "ResourceLinks_ResourceTypeIDArray", null);
|
|
21316
|
+
__decorate([
|
|
21317
|
+
FieldResolver(() => [ResourcePermission_]),
|
|
21318
|
+
__param(0, Root()),
|
|
21319
|
+
__param(1, Ctx()),
|
|
21320
|
+
__param(2, PubSub()),
|
|
21321
|
+
__metadata("design:type", Function),
|
|
21322
|
+
__metadata("design:paramtypes", [ResourceType_, Object, PubSubEngine]),
|
|
21323
|
+
__metadata("design:returntype", Promise)
|
|
21324
|
+
], ResourceTypeResolver.prototype, "ResourcePermissions_ResourceTypeIDArray", null);
|
|
21213
21325
|
ResourceTypeResolver = __decorate([
|
|
21214
21326
|
Resolver(ResourceType_)
|
|
21215
21327
|
], ResourceTypeResolver);
|
|
@@ -22284,6 +22396,7 @@ let DatasetItem_ = class DatasetItem_ {
|
|
|
22284
22396
|
Description;
|
|
22285
22397
|
_mj__CreatedAt;
|
|
22286
22398
|
_mj__UpdatedAt;
|
|
22399
|
+
Columns;
|
|
22287
22400
|
Dataset;
|
|
22288
22401
|
Entity;
|
|
22289
22402
|
};
|
|
@@ -22334,6 +22447,10 @@ __decorate([
|
|
|
22334
22447
|
MaxLength(10),
|
|
22335
22448
|
__metadata("design:type", Date)
|
|
22336
22449
|
], DatasetItem_.prototype, "_mj__UpdatedAt", void 0);
|
|
22450
|
+
__decorate([
|
|
22451
|
+
Field({ nullable: true, description: 'Optional column to store a comma-delimited list of columns for the DatasetItem' }),
|
|
22452
|
+
__metadata("design:type", String)
|
|
22453
|
+
], DatasetItem_.prototype, "Columns", void 0);
|
|
22337
22454
|
__decorate([
|
|
22338
22455
|
Field(),
|
|
22339
22456
|
MaxLength(200),
|
|
@@ -42339,6 +42456,610 @@ EntityActionParamResolver = __decorate([
|
|
|
42339
42456
|
Resolver(EntityActionParam_)
|
|
42340
42457
|
], EntityActionParamResolver);
|
|
42341
42458
|
export { EntityActionParamResolver };
|
|
42459
|
+
let ResourcePermission_ = class ResourcePermission_ {
|
|
42460
|
+
ID;
|
|
42461
|
+
ResourceTypeID;
|
|
42462
|
+
ResourceRecordID;
|
|
42463
|
+
Type;
|
|
42464
|
+
StartSharingAt;
|
|
42465
|
+
EndSharingAt;
|
|
42466
|
+
RoleID;
|
|
42467
|
+
UserID;
|
|
42468
|
+
PermissionLevel;
|
|
42469
|
+
_mj__CreatedAt;
|
|
42470
|
+
_mj__UpdatedAt;
|
|
42471
|
+
Status;
|
|
42472
|
+
ResourceType;
|
|
42473
|
+
Role;
|
|
42474
|
+
User;
|
|
42475
|
+
};
|
|
42476
|
+
__decorate([
|
|
42477
|
+
Field(),
|
|
42478
|
+
MaxLength(16),
|
|
42479
|
+
__metadata("design:type", String)
|
|
42480
|
+
], ResourcePermission_.prototype, "ID", void 0);
|
|
42481
|
+
__decorate([
|
|
42482
|
+
Field({ description: 'Reference to the type of resource being shared (View, Dashboard, Report, etc.)' }),
|
|
42483
|
+
MaxLength(16),
|
|
42484
|
+
__metadata("design:type", String)
|
|
42485
|
+
], ResourcePermission_.prototype, "ResourceTypeID", void 0);
|
|
42486
|
+
__decorate([
|
|
42487
|
+
Field({ description: 'ID of the specific resource being shared' }),
|
|
42488
|
+
MaxLength(510),
|
|
42489
|
+
__metadata("design:type", String)
|
|
42490
|
+
], ResourcePermission_.prototype, "ResourceRecordID", void 0);
|
|
42491
|
+
__decorate([
|
|
42492
|
+
Field({ description: 'The level of sharing either Role or User' }),
|
|
42493
|
+
MaxLength(20),
|
|
42494
|
+
__metadata("design:type", String)
|
|
42495
|
+
], ResourcePermission_.prototype, "Type", void 0);
|
|
42496
|
+
__decorate([
|
|
42497
|
+
Field({ nullable: true, description: 'Optional: Date when sharing starts' }),
|
|
42498
|
+
MaxLength(10),
|
|
42499
|
+
__metadata("design:type", Date)
|
|
42500
|
+
], ResourcePermission_.prototype, "StartSharingAt", void 0);
|
|
42501
|
+
__decorate([
|
|
42502
|
+
Field({ nullable: true, description: 'Optional: Date when sharing ends' }),
|
|
42503
|
+
MaxLength(10),
|
|
42504
|
+
__metadata("design:type", Date)
|
|
42505
|
+
], ResourcePermission_.prototype, "EndSharingAt", void 0);
|
|
42506
|
+
__decorate([
|
|
42507
|
+
Field({ nullable: true }),
|
|
42508
|
+
MaxLength(16),
|
|
42509
|
+
__metadata("design:type", String)
|
|
42510
|
+
], ResourcePermission_.prototype, "RoleID", void 0);
|
|
42511
|
+
__decorate([
|
|
42512
|
+
Field({ nullable: true }),
|
|
42513
|
+
MaxLength(16),
|
|
42514
|
+
__metadata("design:type", String)
|
|
42515
|
+
], ResourcePermission_.prototype, "UserID", void 0);
|
|
42516
|
+
__decorate([
|
|
42517
|
+
Field({ nullable: true, description: 'Permission level defining the type of access (View, Edit, Owner)' }),
|
|
42518
|
+
MaxLength(40),
|
|
42519
|
+
__metadata("design:type", String)
|
|
42520
|
+
], ResourcePermission_.prototype, "PermissionLevel", void 0);
|
|
42521
|
+
__decorate([
|
|
42522
|
+
Field(),
|
|
42523
|
+
MaxLength(10),
|
|
42524
|
+
__metadata("design:type", Date)
|
|
42525
|
+
], ResourcePermission_.prototype, "_mj__CreatedAt", void 0);
|
|
42526
|
+
__decorate([
|
|
42527
|
+
Field(),
|
|
42528
|
+
MaxLength(10),
|
|
42529
|
+
__metadata("design:type", Date)
|
|
42530
|
+
], ResourcePermission_.prototype, "_mj__UpdatedAt", void 0);
|
|
42531
|
+
__decorate([
|
|
42532
|
+
Field({ description: 'Status of the resource permission request. Possible values are Requested, Approved, Rejected, or Revoked.' }),
|
|
42533
|
+
MaxLength(40),
|
|
42534
|
+
__metadata("design:type", String)
|
|
42535
|
+
], ResourcePermission_.prototype, "Status", void 0);
|
|
42536
|
+
__decorate([
|
|
42537
|
+
Field(),
|
|
42538
|
+
MaxLength(510),
|
|
42539
|
+
__metadata("design:type", String)
|
|
42540
|
+
], ResourcePermission_.prototype, "ResourceType", void 0);
|
|
42541
|
+
__decorate([
|
|
42542
|
+
Field({ nullable: true }),
|
|
42543
|
+
MaxLength(100),
|
|
42544
|
+
__metadata("design:type", String)
|
|
42545
|
+
], ResourcePermission_.prototype, "Role", void 0);
|
|
42546
|
+
__decorate([
|
|
42547
|
+
Field({ nullable: true }),
|
|
42548
|
+
MaxLength(200),
|
|
42549
|
+
__metadata("design:type", String)
|
|
42550
|
+
], ResourcePermission_.prototype, "User", void 0);
|
|
42551
|
+
ResourcePermission_ = __decorate([
|
|
42552
|
+
ObjectType({ description: 'Table for managing sharing of resources to users or roles with time constraints and permission levels' })
|
|
42553
|
+
], ResourcePermission_);
|
|
42554
|
+
export { ResourcePermission_ };
|
|
42555
|
+
let CreateResourcePermissionInput = class CreateResourcePermissionInput {
|
|
42556
|
+
ResourceTypeID;
|
|
42557
|
+
ResourceRecordID;
|
|
42558
|
+
Type;
|
|
42559
|
+
StartSharingAt;
|
|
42560
|
+
EndSharingAt;
|
|
42561
|
+
RoleID;
|
|
42562
|
+
UserID;
|
|
42563
|
+
PermissionLevel;
|
|
42564
|
+
Status;
|
|
42565
|
+
};
|
|
42566
|
+
__decorate([
|
|
42567
|
+
Field(),
|
|
42568
|
+
__metadata("design:type", String)
|
|
42569
|
+
], CreateResourcePermissionInput.prototype, "ResourceTypeID", void 0);
|
|
42570
|
+
__decorate([
|
|
42571
|
+
Field(),
|
|
42572
|
+
__metadata("design:type", String)
|
|
42573
|
+
], CreateResourcePermissionInput.prototype, "ResourceRecordID", void 0);
|
|
42574
|
+
__decorate([
|
|
42575
|
+
Field(),
|
|
42576
|
+
__metadata("design:type", String)
|
|
42577
|
+
], CreateResourcePermissionInput.prototype, "Type", void 0);
|
|
42578
|
+
__decorate([
|
|
42579
|
+
Field({ nullable: true }),
|
|
42580
|
+
__metadata("design:type", Date)
|
|
42581
|
+
], CreateResourcePermissionInput.prototype, "StartSharingAt", void 0);
|
|
42582
|
+
__decorate([
|
|
42583
|
+
Field({ nullable: true }),
|
|
42584
|
+
__metadata("design:type", Date)
|
|
42585
|
+
], CreateResourcePermissionInput.prototype, "EndSharingAt", void 0);
|
|
42586
|
+
__decorate([
|
|
42587
|
+
Field({ nullable: true }),
|
|
42588
|
+
__metadata("design:type", String)
|
|
42589
|
+
], CreateResourcePermissionInput.prototype, "RoleID", void 0);
|
|
42590
|
+
__decorate([
|
|
42591
|
+
Field({ nullable: true }),
|
|
42592
|
+
__metadata("design:type", String)
|
|
42593
|
+
], CreateResourcePermissionInput.prototype, "UserID", void 0);
|
|
42594
|
+
__decorate([
|
|
42595
|
+
Field({ nullable: true }),
|
|
42596
|
+
__metadata("design:type", String)
|
|
42597
|
+
], CreateResourcePermissionInput.prototype, "PermissionLevel", void 0);
|
|
42598
|
+
__decorate([
|
|
42599
|
+
Field(),
|
|
42600
|
+
__metadata("design:type", String)
|
|
42601
|
+
], CreateResourcePermissionInput.prototype, "Status", void 0);
|
|
42602
|
+
CreateResourcePermissionInput = __decorate([
|
|
42603
|
+
InputType()
|
|
42604
|
+
], CreateResourcePermissionInput);
|
|
42605
|
+
export { CreateResourcePermissionInput };
|
|
42606
|
+
let UpdateResourcePermissionInput = class UpdateResourcePermissionInput {
|
|
42607
|
+
ID;
|
|
42608
|
+
ResourceTypeID;
|
|
42609
|
+
ResourceRecordID;
|
|
42610
|
+
Type;
|
|
42611
|
+
StartSharingAt;
|
|
42612
|
+
EndSharingAt;
|
|
42613
|
+
RoleID;
|
|
42614
|
+
UserID;
|
|
42615
|
+
PermissionLevel;
|
|
42616
|
+
Status;
|
|
42617
|
+
OldValues___;
|
|
42618
|
+
};
|
|
42619
|
+
__decorate([
|
|
42620
|
+
Field(),
|
|
42621
|
+
__metadata("design:type", String)
|
|
42622
|
+
], UpdateResourcePermissionInput.prototype, "ID", void 0);
|
|
42623
|
+
__decorate([
|
|
42624
|
+
Field(),
|
|
42625
|
+
__metadata("design:type", String)
|
|
42626
|
+
], UpdateResourcePermissionInput.prototype, "ResourceTypeID", void 0);
|
|
42627
|
+
__decorate([
|
|
42628
|
+
Field(),
|
|
42629
|
+
__metadata("design:type", String)
|
|
42630
|
+
], UpdateResourcePermissionInput.prototype, "ResourceRecordID", void 0);
|
|
42631
|
+
__decorate([
|
|
42632
|
+
Field(),
|
|
42633
|
+
__metadata("design:type", String)
|
|
42634
|
+
], UpdateResourcePermissionInput.prototype, "Type", void 0);
|
|
42635
|
+
__decorate([
|
|
42636
|
+
Field({ nullable: true }),
|
|
42637
|
+
__metadata("design:type", Date)
|
|
42638
|
+
], UpdateResourcePermissionInput.prototype, "StartSharingAt", void 0);
|
|
42639
|
+
__decorate([
|
|
42640
|
+
Field({ nullable: true }),
|
|
42641
|
+
__metadata("design:type", Date)
|
|
42642
|
+
], UpdateResourcePermissionInput.prototype, "EndSharingAt", void 0);
|
|
42643
|
+
__decorate([
|
|
42644
|
+
Field({ nullable: true }),
|
|
42645
|
+
__metadata("design:type", String)
|
|
42646
|
+
], UpdateResourcePermissionInput.prototype, "RoleID", void 0);
|
|
42647
|
+
__decorate([
|
|
42648
|
+
Field({ nullable: true }),
|
|
42649
|
+
__metadata("design:type", String)
|
|
42650
|
+
], UpdateResourcePermissionInput.prototype, "UserID", void 0);
|
|
42651
|
+
__decorate([
|
|
42652
|
+
Field({ nullable: true }),
|
|
42653
|
+
__metadata("design:type", String)
|
|
42654
|
+
], UpdateResourcePermissionInput.prototype, "PermissionLevel", void 0);
|
|
42655
|
+
__decorate([
|
|
42656
|
+
Field(),
|
|
42657
|
+
__metadata("design:type", String)
|
|
42658
|
+
], UpdateResourcePermissionInput.prototype, "Status", void 0);
|
|
42659
|
+
__decorate([
|
|
42660
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
42661
|
+
__metadata("design:type", Array)
|
|
42662
|
+
], UpdateResourcePermissionInput.prototype, "OldValues___", void 0);
|
|
42663
|
+
UpdateResourcePermissionInput = __decorate([
|
|
42664
|
+
InputType()
|
|
42665
|
+
], UpdateResourcePermissionInput);
|
|
42666
|
+
export { UpdateResourcePermissionInput };
|
|
42667
|
+
let RunResourcePermissionViewResult = class RunResourcePermissionViewResult {
|
|
42668
|
+
Results;
|
|
42669
|
+
UserViewRunID;
|
|
42670
|
+
RowCount;
|
|
42671
|
+
TotalRowCount;
|
|
42672
|
+
ExecutionTime;
|
|
42673
|
+
ErrorMessage;
|
|
42674
|
+
Success;
|
|
42675
|
+
};
|
|
42676
|
+
__decorate([
|
|
42677
|
+
Field(() => [ResourcePermission_]),
|
|
42678
|
+
__metadata("design:type", Array)
|
|
42679
|
+
], RunResourcePermissionViewResult.prototype, "Results", void 0);
|
|
42680
|
+
__decorate([
|
|
42681
|
+
Field(() => String, { nullable: true }),
|
|
42682
|
+
__metadata("design:type", String)
|
|
42683
|
+
], RunResourcePermissionViewResult.prototype, "UserViewRunID", void 0);
|
|
42684
|
+
__decorate([
|
|
42685
|
+
Field(() => Int, { nullable: true }),
|
|
42686
|
+
__metadata("design:type", Number)
|
|
42687
|
+
], RunResourcePermissionViewResult.prototype, "RowCount", void 0);
|
|
42688
|
+
__decorate([
|
|
42689
|
+
Field(() => Int, { nullable: true }),
|
|
42690
|
+
__metadata("design:type", Number)
|
|
42691
|
+
], RunResourcePermissionViewResult.prototype, "TotalRowCount", void 0);
|
|
42692
|
+
__decorate([
|
|
42693
|
+
Field(() => Int, { nullable: true }),
|
|
42694
|
+
__metadata("design:type", Number)
|
|
42695
|
+
], RunResourcePermissionViewResult.prototype, "ExecutionTime", void 0);
|
|
42696
|
+
__decorate([
|
|
42697
|
+
Field({ nullable: true }),
|
|
42698
|
+
__metadata("design:type", String)
|
|
42699
|
+
], RunResourcePermissionViewResult.prototype, "ErrorMessage", void 0);
|
|
42700
|
+
__decorate([
|
|
42701
|
+
Field(() => Boolean, { nullable: false }),
|
|
42702
|
+
__metadata("design:type", Boolean)
|
|
42703
|
+
], RunResourcePermissionViewResult.prototype, "Success", void 0);
|
|
42704
|
+
RunResourcePermissionViewResult = __decorate([
|
|
42705
|
+
ObjectType()
|
|
42706
|
+
], RunResourcePermissionViewResult);
|
|
42707
|
+
export { RunResourcePermissionViewResult };
|
|
42708
|
+
let ResourcePermissionResolver = class ResourcePermissionResolver extends ResolverBase {
|
|
42709
|
+
async RunResourcePermissionViewByID(input, { dataSource, userPayload }, pubSub) {
|
|
42710
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
42711
|
+
}
|
|
42712
|
+
async RunResourcePermissionViewByName(input, { dataSource, userPayload }, pubSub) {
|
|
42713
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
42714
|
+
}
|
|
42715
|
+
async RunResourcePermissionDynamicView(input, { dataSource, userPayload }, pubSub) {
|
|
42716
|
+
input.EntityName = 'Resource Permissions';
|
|
42717
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
42718
|
+
}
|
|
42719
|
+
async ResourcePermission(ID, { dataSource, userPayload }, pubSub) {
|
|
42720
|
+
this.CheckUserReadPermissions('Resource Permissions', userPayload);
|
|
42721
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwResourcePermissions] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('Resource Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
42722
|
+
const result = this.MapFieldNamesToCodeNames('Resource Permissions', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
|
|
42723
|
+
return result;
|
|
42724
|
+
}
|
|
42725
|
+
async CreateResourcePermission(input, { dataSource, userPayload }, pubSub) {
|
|
42726
|
+
return this.CreateRecord('Resource Permissions', input, dataSource, userPayload, pubSub);
|
|
42727
|
+
}
|
|
42728
|
+
async UpdateResourcePermission(input, { dataSource, userPayload }, pubSub) {
|
|
42729
|
+
return this.UpdateRecord('Resource Permissions', input, dataSource, userPayload, pubSub);
|
|
42730
|
+
}
|
|
42731
|
+
async DeleteResourcePermission(ID, options, { dataSource, userPayload }, pubSub) {
|
|
42732
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
42733
|
+
return this.DeleteRecord('Resource Permissions', key, options, dataSource, userPayload, pubSub);
|
|
42734
|
+
}
|
|
42735
|
+
};
|
|
42736
|
+
__decorate([
|
|
42737
|
+
Query(() => RunResourcePermissionViewResult),
|
|
42738
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
42739
|
+
__param(1, Ctx()),
|
|
42740
|
+
__param(2, PubSub()),
|
|
42741
|
+
__metadata("design:type", Function),
|
|
42742
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
42743
|
+
__metadata("design:returntype", Promise)
|
|
42744
|
+
], ResourcePermissionResolver.prototype, "RunResourcePermissionViewByID", null);
|
|
42745
|
+
__decorate([
|
|
42746
|
+
Query(() => RunResourcePermissionViewResult),
|
|
42747
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
42748
|
+
__param(1, Ctx()),
|
|
42749
|
+
__param(2, PubSub()),
|
|
42750
|
+
__metadata("design:type", Function),
|
|
42751
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
42752
|
+
__metadata("design:returntype", Promise)
|
|
42753
|
+
], ResourcePermissionResolver.prototype, "RunResourcePermissionViewByName", null);
|
|
42754
|
+
__decorate([
|
|
42755
|
+
Query(() => RunResourcePermissionViewResult),
|
|
42756
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
42757
|
+
__param(1, Ctx()),
|
|
42758
|
+
__param(2, PubSub()),
|
|
42759
|
+
__metadata("design:type", Function),
|
|
42760
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
42761
|
+
__metadata("design:returntype", Promise)
|
|
42762
|
+
], ResourcePermissionResolver.prototype, "RunResourcePermissionDynamicView", null);
|
|
42763
|
+
__decorate([
|
|
42764
|
+
Query(() => ResourcePermission_, { nullable: true }),
|
|
42765
|
+
__param(0, Arg('ID', () => String)),
|
|
42766
|
+
__param(1, Ctx()),
|
|
42767
|
+
__param(2, PubSub()),
|
|
42768
|
+
__metadata("design:type", Function),
|
|
42769
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
42770
|
+
__metadata("design:returntype", Promise)
|
|
42771
|
+
], ResourcePermissionResolver.prototype, "ResourcePermission", null);
|
|
42772
|
+
__decorate([
|
|
42773
|
+
Mutation(() => ResourcePermission_),
|
|
42774
|
+
__param(0, Arg('input', () => CreateResourcePermissionInput)),
|
|
42775
|
+
__param(1, Ctx()),
|
|
42776
|
+
__param(2, PubSub()),
|
|
42777
|
+
__metadata("design:type", Function),
|
|
42778
|
+
__metadata("design:paramtypes", [CreateResourcePermissionInput, Object, PubSubEngine]),
|
|
42779
|
+
__metadata("design:returntype", Promise)
|
|
42780
|
+
], ResourcePermissionResolver.prototype, "CreateResourcePermission", null);
|
|
42781
|
+
__decorate([
|
|
42782
|
+
Mutation(() => ResourcePermission_),
|
|
42783
|
+
__param(0, Arg('input', () => UpdateResourcePermissionInput)),
|
|
42784
|
+
__param(1, Ctx()),
|
|
42785
|
+
__param(2, PubSub()),
|
|
42786
|
+
__metadata("design:type", Function),
|
|
42787
|
+
__metadata("design:paramtypes", [UpdateResourcePermissionInput, Object, PubSubEngine]),
|
|
42788
|
+
__metadata("design:returntype", Promise)
|
|
42789
|
+
], ResourcePermissionResolver.prototype, "UpdateResourcePermission", null);
|
|
42790
|
+
__decorate([
|
|
42791
|
+
Mutation(() => ResourcePermission_),
|
|
42792
|
+
__param(0, Arg('ID', () => String)),
|
|
42793
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
42794
|
+
__param(2, Ctx()),
|
|
42795
|
+
__param(3, PubSub()),
|
|
42796
|
+
__metadata("design:type", Function),
|
|
42797
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
42798
|
+
__metadata("design:returntype", Promise)
|
|
42799
|
+
], ResourcePermissionResolver.prototype, "DeleteResourcePermission", null);
|
|
42800
|
+
ResourcePermissionResolver = __decorate([
|
|
42801
|
+
Resolver(ResourcePermission_)
|
|
42802
|
+
], ResourcePermissionResolver);
|
|
42803
|
+
export { ResourcePermissionResolver };
|
|
42804
|
+
let ResourceLink_ = class ResourceLink_ {
|
|
42805
|
+
ID;
|
|
42806
|
+
UserID;
|
|
42807
|
+
ResourceTypeID;
|
|
42808
|
+
ResourceRecordID;
|
|
42809
|
+
FolderID;
|
|
42810
|
+
_mj__CreatedAt;
|
|
42811
|
+
_mj__UpdatedAt;
|
|
42812
|
+
User;
|
|
42813
|
+
ResourceType;
|
|
42814
|
+
};
|
|
42815
|
+
__decorate([
|
|
42816
|
+
Field({ description: 'Unique identifier for each resource link' }),
|
|
42817
|
+
MaxLength(16),
|
|
42818
|
+
__metadata("design:type", String)
|
|
42819
|
+
], ResourceLink_.prototype, "ID", void 0);
|
|
42820
|
+
__decorate([
|
|
42821
|
+
Field({ description: 'Foreign key to the user linking the resource' }),
|
|
42822
|
+
MaxLength(16),
|
|
42823
|
+
__metadata("design:type", String)
|
|
42824
|
+
], ResourceLink_.prototype, "UserID", void 0);
|
|
42825
|
+
__decorate([
|
|
42826
|
+
Field({ description: 'Foreign key to the resource type (view, dashboard, etc.)' }),
|
|
42827
|
+
MaxLength(16),
|
|
42828
|
+
__metadata("design:type", String)
|
|
42829
|
+
], ResourceLink_.prototype, "ResourceTypeID", void 0);
|
|
42830
|
+
__decorate([
|
|
42831
|
+
Field({ description: 'ID of the specific resource being linked' }),
|
|
42832
|
+
MaxLength(510),
|
|
42833
|
+
__metadata("design:type", String)
|
|
42834
|
+
], ResourceLink_.prototype, "ResourceRecordID", void 0);
|
|
42835
|
+
__decorate([
|
|
42836
|
+
Field({ nullable: true, description: 'Optional folder where the user organizes the linked resource' }),
|
|
42837
|
+
MaxLength(510),
|
|
42838
|
+
__metadata("design:type", String)
|
|
42839
|
+
], ResourceLink_.prototype, "FolderID", void 0);
|
|
42840
|
+
__decorate([
|
|
42841
|
+
Field(),
|
|
42842
|
+
MaxLength(10),
|
|
42843
|
+
__metadata("design:type", Date)
|
|
42844
|
+
], ResourceLink_.prototype, "_mj__CreatedAt", void 0);
|
|
42845
|
+
__decorate([
|
|
42846
|
+
Field(),
|
|
42847
|
+
MaxLength(10),
|
|
42848
|
+
__metadata("design:type", Date)
|
|
42849
|
+
], ResourceLink_.prototype, "_mj__UpdatedAt", void 0);
|
|
42850
|
+
__decorate([
|
|
42851
|
+
Field(),
|
|
42852
|
+
MaxLength(200),
|
|
42853
|
+
__metadata("design:type", String)
|
|
42854
|
+
], ResourceLink_.prototype, "User", void 0);
|
|
42855
|
+
__decorate([
|
|
42856
|
+
Field(),
|
|
42857
|
+
MaxLength(510),
|
|
42858
|
+
__metadata("design:type", String)
|
|
42859
|
+
], ResourceLink_.prototype, "ResourceType", void 0);
|
|
42860
|
+
ResourceLink_ = __decorate([
|
|
42861
|
+
ObjectType({ description: 'Table to track user links to shared resources such as views, dashboards, etc.' })
|
|
42862
|
+
], ResourceLink_);
|
|
42863
|
+
export { ResourceLink_ };
|
|
42864
|
+
let CreateResourceLinkInput = class CreateResourceLinkInput {
|
|
42865
|
+
UserID;
|
|
42866
|
+
ResourceTypeID;
|
|
42867
|
+
ResourceRecordID;
|
|
42868
|
+
FolderID;
|
|
42869
|
+
};
|
|
42870
|
+
__decorate([
|
|
42871
|
+
Field(),
|
|
42872
|
+
__metadata("design:type", String)
|
|
42873
|
+
], CreateResourceLinkInput.prototype, "UserID", void 0);
|
|
42874
|
+
__decorate([
|
|
42875
|
+
Field(),
|
|
42876
|
+
__metadata("design:type", String)
|
|
42877
|
+
], CreateResourceLinkInput.prototype, "ResourceTypeID", void 0);
|
|
42878
|
+
__decorate([
|
|
42879
|
+
Field(),
|
|
42880
|
+
__metadata("design:type", String)
|
|
42881
|
+
], CreateResourceLinkInput.prototype, "ResourceRecordID", void 0);
|
|
42882
|
+
__decorate([
|
|
42883
|
+
Field({ nullable: true }),
|
|
42884
|
+
__metadata("design:type", String)
|
|
42885
|
+
], CreateResourceLinkInput.prototype, "FolderID", void 0);
|
|
42886
|
+
CreateResourceLinkInput = __decorate([
|
|
42887
|
+
InputType()
|
|
42888
|
+
], CreateResourceLinkInput);
|
|
42889
|
+
export { CreateResourceLinkInput };
|
|
42890
|
+
let UpdateResourceLinkInput = class UpdateResourceLinkInput {
|
|
42891
|
+
ID;
|
|
42892
|
+
UserID;
|
|
42893
|
+
ResourceTypeID;
|
|
42894
|
+
ResourceRecordID;
|
|
42895
|
+
FolderID;
|
|
42896
|
+
OldValues___;
|
|
42897
|
+
};
|
|
42898
|
+
__decorate([
|
|
42899
|
+
Field(),
|
|
42900
|
+
__metadata("design:type", String)
|
|
42901
|
+
], UpdateResourceLinkInput.prototype, "ID", void 0);
|
|
42902
|
+
__decorate([
|
|
42903
|
+
Field(),
|
|
42904
|
+
__metadata("design:type", String)
|
|
42905
|
+
], UpdateResourceLinkInput.prototype, "UserID", void 0);
|
|
42906
|
+
__decorate([
|
|
42907
|
+
Field(),
|
|
42908
|
+
__metadata("design:type", String)
|
|
42909
|
+
], UpdateResourceLinkInput.prototype, "ResourceTypeID", void 0);
|
|
42910
|
+
__decorate([
|
|
42911
|
+
Field(),
|
|
42912
|
+
__metadata("design:type", String)
|
|
42913
|
+
], UpdateResourceLinkInput.prototype, "ResourceRecordID", void 0);
|
|
42914
|
+
__decorate([
|
|
42915
|
+
Field({ nullable: true }),
|
|
42916
|
+
__metadata("design:type", String)
|
|
42917
|
+
], UpdateResourceLinkInput.prototype, "FolderID", void 0);
|
|
42918
|
+
__decorate([
|
|
42919
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
42920
|
+
__metadata("design:type", Array)
|
|
42921
|
+
], UpdateResourceLinkInput.prototype, "OldValues___", void 0);
|
|
42922
|
+
UpdateResourceLinkInput = __decorate([
|
|
42923
|
+
InputType()
|
|
42924
|
+
], UpdateResourceLinkInput);
|
|
42925
|
+
export { UpdateResourceLinkInput };
|
|
42926
|
+
let RunResourceLinkViewResult = class RunResourceLinkViewResult {
|
|
42927
|
+
Results;
|
|
42928
|
+
UserViewRunID;
|
|
42929
|
+
RowCount;
|
|
42930
|
+
TotalRowCount;
|
|
42931
|
+
ExecutionTime;
|
|
42932
|
+
ErrorMessage;
|
|
42933
|
+
Success;
|
|
42934
|
+
};
|
|
42935
|
+
__decorate([
|
|
42936
|
+
Field(() => [ResourceLink_]),
|
|
42937
|
+
__metadata("design:type", Array)
|
|
42938
|
+
], RunResourceLinkViewResult.prototype, "Results", void 0);
|
|
42939
|
+
__decorate([
|
|
42940
|
+
Field(() => String, { nullable: true }),
|
|
42941
|
+
__metadata("design:type", String)
|
|
42942
|
+
], RunResourceLinkViewResult.prototype, "UserViewRunID", void 0);
|
|
42943
|
+
__decorate([
|
|
42944
|
+
Field(() => Int, { nullable: true }),
|
|
42945
|
+
__metadata("design:type", Number)
|
|
42946
|
+
], RunResourceLinkViewResult.prototype, "RowCount", void 0);
|
|
42947
|
+
__decorate([
|
|
42948
|
+
Field(() => Int, { nullable: true }),
|
|
42949
|
+
__metadata("design:type", Number)
|
|
42950
|
+
], RunResourceLinkViewResult.prototype, "TotalRowCount", void 0);
|
|
42951
|
+
__decorate([
|
|
42952
|
+
Field(() => Int, { nullable: true }),
|
|
42953
|
+
__metadata("design:type", Number)
|
|
42954
|
+
], RunResourceLinkViewResult.prototype, "ExecutionTime", void 0);
|
|
42955
|
+
__decorate([
|
|
42956
|
+
Field({ nullable: true }),
|
|
42957
|
+
__metadata("design:type", String)
|
|
42958
|
+
], RunResourceLinkViewResult.prototype, "ErrorMessage", void 0);
|
|
42959
|
+
__decorate([
|
|
42960
|
+
Field(() => Boolean, { nullable: false }),
|
|
42961
|
+
__metadata("design:type", Boolean)
|
|
42962
|
+
], RunResourceLinkViewResult.prototype, "Success", void 0);
|
|
42963
|
+
RunResourceLinkViewResult = __decorate([
|
|
42964
|
+
ObjectType()
|
|
42965
|
+
], RunResourceLinkViewResult);
|
|
42966
|
+
export { RunResourceLinkViewResult };
|
|
42967
|
+
let ResourceLinkResolver = class ResourceLinkResolver extends ResolverBase {
|
|
42968
|
+
async RunResourceLinkViewByID(input, { dataSource, userPayload }, pubSub) {
|
|
42969
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
42970
|
+
}
|
|
42971
|
+
async RunResourceLinkViewByName(input, { dataSource, userPayload }, pubSub) {
|
|
42972
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
42973
|
+
}
|
|
42974
|
+
async RunResourceLinkDynamicView(input, { dataSource, userPayload }, pubSub) {
|
|
42975
|
+
input.EntityName = 'Resource Links';
|
|
42976
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
42977
|
+
}
|
|
42978
|
+
async ResourceLink(ID, { dataSource, userPayload }, pubSub) {
|
|
42979
|
+
this.CheckUserReadPermissions('Resource Links', userPayload);
|
|
42980
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwResourceLinks] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('Resource Links', userPayload, EntityPermissionType.Read, 'AND');
|
|
42981
|
+
const result = this.MapFieldNamesToCodeNames('Resource Links', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
|
|
42982
|
+
return result;
|
|
42983
|
+
}
|
|
42984
|
+
async CreateResourceLink(input, { dataSource, userPayload }, pubSub) {
|
|
42985
|
+
return this.CreateRecord('Resource Links', input, dataSource, userPayload, pubSub);
|
|
42986
|
+
}
|
|
42987
|
+
async UpdateResourceLink(input, { dataSource, userPayload }, pubSub) {
|
|
42988
|
+
return this.UpdateRecord('Resource Links', input, dataSource, userPayload, pubSub);
|
|
42989
|
+
}
|
|
42990
|
+
async DeleteResourceLink(ID, options, { dataSource, userPayload }, pubSub) {
|
|
42991
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
42992
|
+
return this.DeleteRecord('Resource Links', key, options, dataSource, userPayload, pubSub);
|
|
42993
|
+
}
|
|
42994
|
+
};
|
|
42995
|
+
__decorate([
|
|
42996
|
+
Query(() => RunResourceLinkViewResult),
|
|
42997
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
42998
|
+
__param(1, Ctx()),
|
|
42999
|
+
__param(2, PubSub()),
|
|
43000
|
+
__metadata("design:type", Function),
|
|
43001
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
43002
|
+
__metadata("design:returntype", Promise)
|
|
43003
|
+
], ResourceLinkResolver.prototype, "RunResourceLinkViewByID", null);
|
|
43004
|
+
__decorate([
|
|
43005
|
+
Query(() => RunResourceLinkViewResult),
|
|
43006
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
43007
|
+
__param(1, Ctx()),
|
|
43008
|
+
__param(2, PubSub()),
|
|
43009
|
+
__metadata("design:type", Function),
|
|
43010
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
43011
|
+
__metadata("design:returntype", Promise)
|
|
43012
|
+
], ResourceLinkResolver.prototype, "RunResourceLinkViewByName", null);
|
|
43013
|
+
__decorate([
|
|
43014
|
+
Query(() => RunResourceLinkViewResult),
|
|
43015
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
43016
|
+
__param(1, Ctx()),
|
|
43017
|
+
__param(2, PubSub()),
|
|
43018
|
+
__metadata("design:type", Function),
|
|
43019
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
43020
|
+
__metadata("design:returntype", Promise)
|
|
43021
|
+
], ResourceLinkResolver.prototype, "RunResourceLinkDynamicView", null);
|
|
43022
|
+
__decorate([
|
|
43023
|
+
Query(() => ResourceLink_, { nullable: true }),
|
|
43024
|
+
__param(0, Arg('ID', () => String)),
|
|
43025
|
+
__param(1, Ctx()),
|
|
43026
|
+
__param(2, PubSub()),
|
|
43027
|
+
__metadata("design:type", Function),
|
|
43028
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
43029
|
+
__metadata("design:returntype", Promise)
|
|
43030
|
+
], ResourceLinkResolver.prototype, "ResourceLink", null);
|
|
43031
|
+
__decorate([
|
|
43032
|
+
Mutation(() => ResourceLink_),
|
|
43033
|
+
__param(0, Arg('input', () => CreateResourceLinkInput)),
|
|
43034
|
+
__param(1, Ctx()),
|
|
43035
|
+
__param(2, PubSub()),
|
|
43036
|
+
__metadata("design:type", Function),
|
|
43037
|
+
__metadata("design:paramtypes", [CreateResourceLinkInput, Object, PubSubEngine]),
|
|
43038
|
+
__metadata("design:returntype", Promise)
|
|
43039
|
+
], ResourceLinkResolver.prototype, "CreateResourceLink", null);
|
|
43040
|
+
__decorate([
|
|
43041
|
+
Mutation(() => ResourceLink_),
|
|
43042
|
+
__param(0, Arg('input', () => UpdateResourceLinkInput)),
|
|
43043
|
+
__param(1, Ctx()),
|
|
43044
|
+
__param(2, PubSub()),
|
|
43045
|
+
__metadata("design:type", Function),
|
|
43046
|
+
__metadata("design:paramtypes", [UpdateResourceLinkInput, Object, PubSubEngine]),
|
|
43047
|
+
__metadata("design:returntype", Promise)
|
|
43048
|
+
], ResourceLinkResolver.prototype, "UpdateResourceLink", null);
|
|
43049
|
+
__decorate([
|
|
43050
|
+
Mutation(() => ResourceLink_),
|
|
43051
|
+
__param(0, Arg('ID', () => String)),
|
|
43052
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
43053
|
+
__param(2, Ctx()),
|
|
43054
|
+
__param(3, PubSub()),
|
|
43055
|
+
__metadata("design:type", Function),
|
|
43056
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
43057
|
+
__metadata("design:returntype", Promise)
|
|
43058
|
+
], ResourceLinkResolver.prototype, "DeleteResourceLink", null);
|
|
43059
|
+
ResourceLinkResolver = __decorate([
|
|
43060
|
+
Resolver(ResourceLink_)
|
|
43061
|
+
], ResourceLinkResolver);
|
|
43062
|
+
export { ResourceLinkResolver };
|
|
42342
43063
|
let ContentProcessRun_ = class ContentProcessRun_ {
|
|
42343
43064
|
ID;
|
|
42344
43065
|
SourceID;
|