@memberjunction/core-entities 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.
@@ -2008,6 +2008,7 @@ export declare const DatasetItemSchema: z.ZodObject<{
2008
2008
  Description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2009
2009
  __mj_CreatedAt: z.ZodDate;
2010
2010
  __mj_UpdatedAt: z.ZodDate;
2011
+ Columns: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2011
2012
  Dataset: z.ZodString;
2012
2013
  Entity: z.ZodString;
2013
2014
  }, "strip", z.ZodTypeAny, {
@@ -2022,6 +2023,7 @@ export declare const DatasetItemSchema: z.ZodObject<{
2022
2023
  DatasetID?: string;
2023
2024
  WhereClause?: string;
2024
2025
  DateFieldToCheck?: string;
2026
+ Columns?: string;
2025
2027
  Dataset?: string;
2026
2028
  }, {
2027
2029
  ID?: string;
@@ -2035,6 +2037,7 @@ export declare const DatasetItemSchema: z.ZodObject<{
2035
2037
  DatasetID?: string;
2036
2038
  WhereClause?: string;
2037
2039
  DateFieldToCheck?: string;
2040
+ Columns?: string;
2038
2041
  Dataset?: string;
2039
2042
  }>;
2040
2043
  export type DatasetItemEntityType = z.infer<typeof DatasetItemSchema>;
@@ -4798,6 +4801,94 @@ export declare const ReportSchema: z.ZodObject<{
4798
4801
  OutputWorkflow?: string;
4799
4802
  }>;
4800
4803
  export type ReportEntityType = z.infer<typeof ReportSchema>;
4804
+ /**
4805
+ * zod schema definition for the entity Resource Links
4806
+ */
4807
+ export declare const ResourceLinkSchema: z.ZodObject<{
4808
+ ID: z.ZodString;
4809
+ UserID: z.ZodString;
4810
+ ResourceTypeID: z.ZodString;
4811
+ ResourceRecordID: z.ZodString;
4812
+ FolderID: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4813
+ __mj_CreatedAt: z.ZodDate;
4814
+ __mj_UpdatedAt: z.ZodDate;
4815
+ User: z.ZodString;
4816
+ ResourceType: z.ZodString;
4817
+ }, "strip", z.ZodTypeAny, {
4818
+ ID?: string;
4819
+ __mj_CreatedAt?: Date;
4820
+ __mj_UpdatedAt?: Date;
4821
+ UserID?: string;
4822
+ User?: string;
4823
+ ResourceTypeID?: string;
4824
+ ResourceRecordID?: string;
4825
+ FolderID?: string;
4826
+ ResourceType?: string;
4827
+ }, {
4828
+ ID?: string;
4829
+ __mj_CreatedAt?: Date;
4830
+ __mj_UpdatedAt?: Date;
4831
+ UserID?: string;
4832
+ User?: string;
4833
+ ResourceTypeID?: string;
4834
+ ResourceRecordID?: string;
4835
+ FolderID?: string;
4836
+ ResourceType?: string;
4837
+ }>;
4838
+ export type ResourceLinkEntityType = z.infer<typeof ResourceLinkSchema>;
4839
+ /**
4840
+ * zod schema definition for the entity Resource Permissions
4841
+ */
4842
+ export declare const ResourcePermissionSchema: z.ZodObject<{
4843
+ ID: z.ZodString;
4844
+ ResourceTypeID: z.ZodString;
4845
+ ResourceRecordID: z.ZodString;
4846
+ Type: z.ZodUnion<[z.ZodLiteral<"Role">, z.ZodLiteral<"User">]>;
4847
+ StartSharingAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
4848
+ EndSharingAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
4849
+ RoleID: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4850
+ UserID: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4851
+ PermissionLevel: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"View">, z.ZodLiteral<"Edit">, z.ZodLiteral<"Owner">]>>>;
4852
+ __mj_CreatedAt: z.ZodDate;
4853
+ __mj_UpdatedAt: z.ZodDate;
4854
+ Status: z.ZodUnion<[z.ZodLiteral<"Approved">, z.ZodLiteral<"Rejected">, z.ZodLiteral<"Revoked">, z.ZodLiteral<"Requested">]>;
4855
+ ResourceType: z.ZodString;
4856
+ Role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4857
+ User: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4858
+ }, "strip", z.ZodTypeAny, {
4859
+ ID?: string;
4860
+ __mj_CreatedAt?: Date;
4861
+ __mj_UpdatedAt?: Date;
4862
+ Status?: "Approved" | "Rejected" | "Revoked" | "Requested";
4863
+ UserID?: string;
4864
+ User?: string;
4865
+ Type?: "User" | "Role";
4866
+ RoleID?: string;
4867
+ Role?: string;
4868
+ ResourceTypeID?: string;
4869
+ ResourceRecordID?: string;
4870
+ ResourceType?: string;
4871
+ StartSharingAt?: Date;
4872
+ EndSharingAt?: Date;
4873
+ PermissionLevel?: "View" | "Edit" | "Owner";
4874
+ }, {
4875
+ ID?: string;
4876
+ __mj_CreatedAt?: Date;
4877
+ __mj_UpdatedAt?: Date;
4878
+ Status?: "Approved" | "Rejected" | "Revoked" | "Requested";
4879
+ UserID?: string;
4880
+ User?: string;
4881
+ Type?: "User" | "Role";
4882
+ RoleID?: string;
4883
+ Role?: string;
4884
+ ResourceTypeID?: string;
4885
+ ResourceRecordID?: string;
4886
+ ResourceType?: string;
4887
+ StartSharingAt?: Date;
4888
+ EndSharingAt?: Date;
4889
+ PermissionLevel?: "View" | "Edit" | "Owner";
4890
+ }>;
4891
+ export type ResourcePermissionEntityType = z.infer<typeof ResourcePermissionSchema>;
4801
4892
  /**
4802
4893
  * zod schema definition for the entity Resource Types
4803
4894
  */
@@ -4810,7 +4901,9 @@ export declare const ResourceTypeSchema: z.ZodObject<{
4810
4901
  EntityID: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4811
4902
  __mj_CreatedAt: z.ZodDate;
4812
4903
  __mj_UpdatedAt: z.ZodDate;
4904
+ CategoryEntityID: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4813
4905
  Entity: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4906
+ CategoryEntity: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4814
4907
  }, "strip", z.ZodTypeAny, {
4815
4908
  ID?: string;
4816
4909
  __mj_CreatedAt?: Date;
@@ -4821,6 +4914,8 @@ export declare const ResourceTypeSchema: z.ZodObject<{
4821
4914
  Entity?: string;
4822
4915
  Icon?: string;
4823
4916
  DisplayName?: string;
4917
+ CategoryEntityID?: string;
4918
+ CategoryEntity?: string;
4824
4919
  }, {
4825
4920
  ID?: string;
4826
4921
  __mj_CreatedAt?: Date;
@@ -4831,6 +4926,8 @@ export declare const ResourceTypeSchema: z.ZodObject<{
4831
4926
  Entity?: string;
4832
4927
  Icon?: string;
4833
4928
  DisplayName?: string;
4929
+ CategoryEntityID?: string;
4930
+ CategoryEntity?: string;
4834
4931
  }>;
4835
4932
  export type ResourceTypeEntityType = z.infer<typeof ResourceTypeSchema>;
4836
4933
  /**
@@ -5443,11 +5540,11 @@ export declare const UserNotificationSchema: z.ZodObject<{
5443
5540
  Message?: string;
5444
5541
  Title?: string;
5445
5542
  ResourceTypeID?: string;
5543
+ ResourceRecordID?: string;
5544
+ ResourceType?: string;
5446
5545
  ResourceConfiguration?: string;
5447
5546
  Unread?: boolean;
5448
5547
  ReadAt?: Date;
5449
- ResourceRecordID?: string;
5450
- ResourceType?: string;
5451
5548
  }, {
5452
5549
  ID?: string;
5453
5550
  __mj_CreatedAt?: Date;
@@ -5457,11 +5554,11 @@ export declare const UserNotificationSchema: z.ZodObject<{
5457
5554
  Message?: string;
5458
5555
  Title?: string;
5459
5556
  ResourceTypeID?: string;
5557
+ ResourceRecordID?: string;
5558
+ ResourceType?: string;
5460
5559
  ResourceConfiguration?: string;
5461
5560
  Unread?: boolean;
5462
5561
  ReadAt?: Date;
5463
- ResourceRecordID?: string;
5464
- ResourceType?: string;
5465
5562
  }>;
5466
5563
  export type UserNotificationEntityType = z.infer<typeof UserNotificationSchema>;
5467
5564
  /**
@@ -11502,6 +11599,14 @@ export declare class DatasetItemEntity extends BaseEntity<DatasetItemEntityType>
11502
11599
  */
11503
11600
  get __mj_UpdatedAt(): Date;
11504
11601
  /**
11602
+ * * Field Name: Columns
11603
+ * * Display Name: Columns
11604
+ * * SQL Data Type: nvarchar(MAX)
11605
+ * * Description: Optional column to store a comma-delimited list of columns for the DatasetItem
11606
+ */
11607
+ get Columns(): string | null;
11608
+ set Columns(value: string | null);
11609
+ /**
11505
11610
  * * Field Name: Dataset
11506
11611
  * * Display Name: Dataset
11507
11612
  * * SQL Data Type: nvarchar(100)
@@ -19122,6 +19227,252 @@ export declare class ReportEntity extends BaseEntity<ReportEntityType> {
19122
19227
  */
19123
19228
  get OutputWorkflow(): string | null;
19124
19229
  }
19230
+ /**
19231
+ * Resource Links - strongly typed entity sub-class
19232
+ * * Schema: __mj
19233
+ * * Base Table: ResourceLink
19234
+ * * Base View: vwResourceLinks
19235
+ * * @description Table to track user links to shared resources such as views, dashboards, etc.
19236
+ * * Primary Key: ID
19237
+ * @extends {BaseEntity}
19238
+ * @class
19239
+ * @public
19240
+ */
19241
+ export declare class ResourceLinkEntity extends BaseEntity<ResourceLinkEntityType> {
19242
+ /**
19243
+ * Loads the Resource Links record from the database
19244
+ * @param ID: string - primary key value to load the Resource Links record.
19245
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
19246
+ * @returns {Promise<boolean>} - true if successful, false otherwise
19247
+ * @public
19248
+ * @async
19249
+ * @memberof ResourceLinkEntity
19250
+ * @method
19251
+ * @override
19252
+ */
19253
+ Load(ID: string, EntityRelationshipsToLoad?: string[]): Promise<boolean>;
19254
+ /**
19255
+ * * Field Name: ID
19256
+ * * Display Name: ID
19257
+ * * SQL Data Type: uniqueidentifier
19258
+ * * Default Value: newsequentialid()
19259
+ * * Description: Unique identifier for each resource link
19260
+ */
19261
+ get ID(): string;
19262
+ /**
19263
+ * * Field Name: UserID
19264
+ * * Display Name: User ID
19265
+ * * SQL Data Type: uniqueidentifier
19266
+ * * Related Entity/Foreign Key: Users (vwUsers.ID)
19267
+ * * Description: Foreign key to the user linking the resource
19268
+ */
19269
+ get UserID(): string;
19270
+ set UserID(value: string);
19271
+ /**
19272
+ * * Field Name: ResourceTypeID
19273
+ * * Display Name: Resource Type ID
19274
+ * * SQL Data Type: uniqueidentifier
19275
+ * * Related Entity/Foreign Key: Resource Types (vwResourceTypes.ID)
19276
+ * * Description: Foreign key to the resource type (view, dashboard, etc.)
19277
+ */
19278
+ get ResourceTypeID(): string;
19279
+ set ResourceTypeID(value: string);
19280
+ /**
19281
+ * * Field Name: ResourceRecordID
19282
+ * * Display Name: Resource Record ID
19283
+ * * SQL Data Type: nvarchar(255)
19284
+ * * Description: ID of the specific resource being linked
19285
+ */
19286
+ get ResourceRecordID(): string;
19287
+ set ResourceRecordID(value: string);
19288
+ /**
19289
+ * * Field Name: FolderID
19290
+ * * Display Name: Folder ID
19291
+ * * SQL Data Type: nvarchar(255)
19292
+ * * Description: Optional folder where the user organizes the linked resource
19293
+ */
19294
+ get FolderID(): string | null;
19295
+ set FolderID(value: string | null);
19296
+ /**
19297
+ * * Field Name: __mj_CreatedAt
19298
+ * * Display Name: Created At
19299
+ * * SQL Data Type: datetimeoffset
19300
+ * * Default Value: getutcdate()
19301
+ */
19302
+ get __mj_CreatedAt(): Date;
19303
+ /**
19304
+ * * Field Name: __mj_UpdatedAt
19305
+ * * Display Name: Updated At
19306
+ * * SQL Data Type: datetimeoffset
19307
+ * * Default Value: getutcdate()
19308
+ */
19309
+ get __mj_UpdatedAt(): Date;
19310
+ /**
19311
+ * * Field Name: User
19312
+ * * Display Name: User
19313
+ * * SQL Data Type: nvarchar(100)
19314
+ */
19315
+ get User(): string;
19316
+ /**
19317
+ * * Field Name: ResourceType
19318
+ * * Display Name: Resource Type
19319
+ * * SQL Data Type: nvarchar(255)
19320
+ */
19321
+ get ResourceType(): string;
19322
+ }
19323
+ /**
19324
+ * Resource Permissions - strongly typed entity sub-class
19325
+ * * Schema: __mj
19326
+ * * Base Table: ResourcePermission
19327
+ * * Base View: vwResourcePermissions
19328
+ * * @description Table for managing sharing of resources to users or roles with time constraints and permission levels
19329
+ * * Primary Key: ID
19330
+ * @extends {BaseEntity}
19331
+ * @class
19332
+ * @public
19333
+ */
19334
+ export declare class ResourcePermissionEntity extends BaseEntity<ResourcePermissionEntityType> {
19335
+ /**
19336
+ * Loads the Resource Permissions record from the database
19337
+ * @param ID: string - primary key value to load the Resource Permissions record.
19338
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
19339
+ * @returns {Promise<boolean>} - true if successful, false otherwise
19340
+ * @public
19341
+ * @async
19342
+ * @memberof ResourcePermissionEntity
19343
+ * @method
19344
+ * @override
19345
+ */
19346
+ Load(ID: string, EntityRelationshipsToLoad?: string[]): Promise<boolean>;
19347
+ /**
19348
+ * * Field Name: ID
19349
+ * * Display Name: ID
19350
+ * * SQL Data Type: uniqueidentifier
19351
+ * * Default Value: newsequentialid()
19352
+ */
19353
+ get ID(): string;
19354
+ /**
19355
+ * * Field Name: ResourceTypeID
19356
+ * * Display Name: Resource Type ID
19357
+ * * SQL Data Type: uniqueidentifier
19358
+ * * Related Entity/Foreign Key: Resource Types (vwResourceTypes.ID)
19359
+ * * Description: Reference to the type of resource being shared (View, Dashboard, Report, etc.)
19360
+ */
19361
+ get ResourceTypeID(): string;
19362
+ set ResourceTypeID(value: string);
19363
+ /**
19364
+ * * Field Name: ResourceRecordID
19365
+ * * Display Name: Resource Record ID
19366
+ * * SQL Data Type: nvarchar(255)
19367
+ * * Description: ID of the specific resource being shared
19368
+ */
19369
+ get ResourceRecordID(): string;
19370
+ set ResourceRecordID(value: string);
19371
+ /**
19372
+ * * Field Name: Type
19373
+ * * Display Name: Type
19374
+ * * SQL Data Type: nvarchar(10)
19375
+ * * Value List Type: List
19376
+ * * Possible Values
19377
+ * * Role
19378
+ * * User
19379
+ * * Description: The level of sharing either Role or User
19380
+ */
19381
+ get Type(): 'Role' | 'User';
19382
+ set Type(value: 'Role' | 'User');
19383
+ /**
19384
+ * * Field Name: StartSharingAt
19385
+ * * Display Name: Start Sharing At
19386
+ * * SQL Data Type: datetimeoffset
19387
+ * * Description: Optional: Date when sharing starts
19388
+ */
19389
+ get StartSharingAt(): Date | null;
19390
+ set StartSharingAt(value: Date | null);
19391
+ /**
19392
+ * * Field Name: EndSharingAt
19393
+ * * Display Name: End Sharing At
19394
+ * * SQL Data Type: datetimeoffset
19395
+ * * Description: Optional: Date when sharing ends
19396
+ */
19397
+ get EndSharingAt(): Date | null;
19398
+ set EndSharingAt(value: Date | null);
19399
+ /**
19400
+ * * Field Name: RoleID
19401
+ * * Display Name: Role ID
19402
+ * * SQL Data Type: uniqueidentifier
19403
+ * * Related Entity/Foreign Key: Roles (vwRoles.ID)
19404
+ */
19405
+ get RoleID(): string | null;
19406
+ set RoleID(value: string | null);
19407
+ /**
19408
+ * * Field Name: UserID
19409
+ * * Display Name: User ID
19410
+ * * SQL Data Type: uniqueidentifier
19411
+ * * Related Entity/Foreign Key: Users (vwUsers.ID)
19412
+ */
19413
+ get UserID(): string | null;
19414
+ set UserID(value: string | null);
19415
+ /**
19416
+ * * Field Name: PermissionLevel
19417
+ * * Display Name: Permission Level
19418
+ * * SQL Data Type: nvarchar(20)
19419
+ * * Value List Type: List
19420
+ * * Possible Values
19421
+ * * View
19422
+ * * Edit
19423
+ * * Owner
19424
+ * * Description: Permission level defining the type of access (View, Edit, Owner)
19425
+ */
19426
+ get PermissionLevel(): 'View' | 'Edit' | 'Owner' | null;
19427
+ set PermissionLevel(value: 'View' | 'Edit' | 'Owner' | null);
19428
+ /**
19429
+ * * Field Name: __mj_CreatedAt
19430
+ * * Display Name: Created At
19431
+ * * SQL Data Type: datetimeoffset
19432
+ * * Default Value: getutcdate()
19433
+ */
19434
+ get __mj_CreatedAt(): Date;
19435
+ /**
19436
+ * * Field Name: __mj_UpdatedAt
19437
+ * * Display Name: Updated At
19438
+ * * SQL Data Type: datetimeoffset
19439
+ * * Default Value: getutcdate()
19440
+ */
19441
+ get __mj_UpdatedAt(): Date;
19442
+ /**
19443
+ * * Field Name: Status
19444
+ * * Display Name: Status
19445
+ * * SQL Data Type: nvarchar(20)
19446
+ * * Default Value: Requested
19447
+ * * Value List Type: List
19448
+ * * Possible Values
19449
+ * * Approved
19450
+ * * Rejected
19451
+ * * Revoked
19452
+ * * Requested
19453
+ * * Description: Status of the resource permission request. Possible values are Pending, Approved, Rejected, Revoked, or Requested.
19454
+ */
19455
+ get Status(): 'Approved' | 'Rejected' | 'Revoked' | 'Requested';
19456
+ set Status(value: 'Approved' | 'Rejected' | 'Revoked' | 'Requested');
19457
+ /**
19458
+ * * Field Name: ResourceType
19459
+ * * Display Name: Resource Type
19460
+ * * SQL Data Type: nvarchar(255)
19461
+ */
19462
+ get ResourceType(): string;
19463
+ /**
19464
+ * * Field Name: Role
19465
+ * * Display Name: Role
19466
+ * * SQL Data Type: nvarchar(50)
19467
+ */
19468
+ get Role(): string | null;
19469
+ /**
19470
+ * * Field Name: User
19471
+ * * Display Name: User
19472
+ * * SQL Data Type: nvarchar(100)
19473
+ */
19474
+ get User(): string | null;
19475
+ }
19125
19476
  /**
19126
19477
  * Resource Types - strongly typed entity sub-class
19127
19478
  * * Schema: __mj
@@ -19221,11 +19572,26 @@ export declare class ResourceTypeEntity extends BaseEntity<ResourceTypeEntityTyp
19221
19572
  */
19222
19573
  get __mj_UpdatedAt(): Date;
19223
19574
  /**
19575
+ * * Field Name: CategoryEntityID
19576
+ * * Display Name: Category Entity ID
19577
+ * * SQL Data Type: uniqueidentifier
19578
+ * * Related Entity/Foreign Key: Entities (vwEntities.ID)
19579
+ * * 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.
19580
+ */
19581
+ get CategoryEntityID(): string | null;
19582
+ set CategoryEntityID(value: string | null);
19583
+ /**
19224
19584
  * * Field Name: Entity
19225
19585
  * * Display Name: Entity
19226
19586
  * * SQL Data Type: nvarchar(255)
19227
19587
  */
19228
19588
  get Entity(): string | null;
19589
+ /**
19590
+ * * Field Name: CategoryEntity
19591
+ * * Display Name: Category Entity
19592
+ * * SQL Data Type: nvarchar(255)
19593
+ */
19594
+ get CategoryEntity(): string | null;
19229
19595
  }
19230
19596
  /**
19231
19597
  * Roles - strongly typed entity sub-class