@memberjunction/server 2.102.0 → 2.103.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.
@@ -8448,6 +8448,262 @@ TaskDependencyResolver = __decorate([
8448
8448
  Resolver(TaskDependency_)
8449
8449
  ], TaskDependencyResolver);
8450
8450
  export { TaskDependencyResolver };
8451
+ let CollectionArtifact_ = class CollectionArtifact_ {
8452
+ ID;
8453
+ CollectionID;
8454
+ ArtifactID;
8455
+ Sequence;
8456
+ _mj__CreatedAt;
8457
+ _mj__UpdatedAt;
8458
+ Collection;
8459
+ Artifact;
8460
+ };
8461
+ __decorate([
8462
+ Field(),
8463
+ MaxLength(16),
8464
+ __metadata("design:type", String)
8465
+ ], CollectionArtifact_.prototype, "ID", void 0);
8466
+ __decorate([
8467
+ Field(),
8468
+ MaxLength(16),
8469
+ __metadata("design:type", String)
8470
+ ], CollectionArtifact_.prototype, "CollectionID", void 0);
8471
+ __decorate([
8472
+ Field(),
8473
+ MaxLength(16),
8474
+ __metadata("design:type", String)
8475
+ ], CollectionArtifact_.prototype, "ArtifactID", void 0);
8476
+ __decorate([
8477
+ Field(() => Int, { description: `Sequence number for ordering artifacts within a collection` }),
8478
+ __metadata("design:type", Number)
8479
+ ], CollectionArtifact_.prototype, "Sequence", void 0);
8480
+ __decorate([
8481
+ Field(),
8482
+ MaxLength(10),
8483
+ __metadata("design:type", Date)
8484
+ ], CollectionArtifact_.prototype, "_mj__CreatedAt", void 0);
8485
+ __decorate([
8486
+ Field(),
8487
+ MaxLength(10),
8488
+ __metadata("design:type", Date)
8489
+ ], CollectionArtifact_.prototype, "_mj__UpdatedAt", void 0);
8490
+ __decorate([
8491
+ Field(),
8492
+ MaxLength(510),
8493
+ __metadata("design:type", String)
8494
+ ], CollectionArtifact_.prototype, "Collection", void 0);
8495
+ __decorate([
8496
+ Field(),
8497
+ MaxLength(510),
8498
+ __metadata("design:type", String)
8499
+ ], CollectionArtifact_.prototype, "Artifact", void 0);
8500
+ CollectionArtifact_ = __decorate([
8501
+ ObjectType({ description: `Join table that establishes many-to-many relationships between Collections and Artifacts, allowing artifacts to be organized within collections` })
8502
+ ], CollectionArtifact_);
8503
+ export { CollectionArtifact_ };
8504
+ let CreateCollectionArtifactInput = class CreateCollectionArtifactInput {
8505
+ ID;
8506
+ CollectionID;
8507
+ ArtifactID;
8508
+ Sequence;
8509
+ };
8510
+ __decorate([
8511
+ Field({ nullable: true }),
8512
+ __metadata("design:type", String)
8513
+ ], CreateCollectionArtifactInput.prototype, "ID", void 0);
8514
+ __decorate([
8515
+ Field({ nullable: true }),
8516
+ __metadata("design:type", String)
8517
+ ], CreateCollectionArtifactInput.prototype, "CollectionID", void 0);
8518
+ __decorate([
8519
+ Field({ nullable: true }),
8520
+ __metadata("design:type", String)
8521
+ ], CreateCollectionArtifactInput.prototype, "ArtifactID", void 0);
8522
+ __decorate([
8523
+ Field(() => Int, { nullable: true }),
8524
+ __metadata("design:type", Number)
8525
+ ], CreateCollectionArtifactInput.prototype, "Sequence", void 0);
8526
+ CreateCollectionArtifactInput = __decorate([
8527
+ InputType()
8528
+ ], CreateCollectionArtifactInput);
8529
+ export { CreateCollectionArtifactInput };
8530
+ let UpdateCollectionArtifactInput = class UpdateCollectionArtifactInput {
8531
+ ID;
8532
+ CollectionID;
8533
+ ArtifactID;
8534
+ Sequence;
8535
+ OldValues___;
8536
+ };
8537
+ __decorate([
8538
+ Field(),
8539
+ __metadata("design:type", String)
8540
+ ], UpdateCollectionArtifactInput.prototype, "ID", void 0);
8541
+ __decorate([
8542
+ Field({ nullable: true }),
8543
+ __metadata("design:type", String)
8544
+ ], UpdateCollectionArtifactInput.prototype, "CollectionID", void 0);
8545
+ __decorate([
8546
+ Field({ nullable: true }),
8547
+ __metadata("design:type", String)
8548
+ ], UpdateCollectionArtifactInput.prototype, "ArtifactID", void 0);
8549
+ __decorate([
8550
+ Field(() => Int, { nullable: true }),
8551
+ __metadata("design:type", Number)
8552
+ ], UpdateCollectionArtifactInput.prototype, "Sequence", void 0);
8553
+ __decorate([
8554
+ Field(() => [KeyValuePairInput], { nullable: true }),
8555
+ __metadata("design:type", Array)
8556
+ ], UpdateCollectionArtifactInput.prototype, "OldValues___", void 0);
8557
+ UpdateCollectionArtifactInput = __decorate([
8558
+ InputType()
8559
+ ], UpdateCollectionArtifactInput);
8560
+ export { UpdateCollectionArtifactInput };
8561
+ let RunCollectionArtifactViewResult = class RunCollectionArtifactViewResult {
8562
+ Results;
8563
+ UserViewRunID;
8564
+ RowCount;
8565
+ TotalRowCount;
8566
+ ExecutionTime;
8567
+ ErrorMessage;
8568
+ Success;
8569
+ };
8570
+ __decorate([
8571
+ Field(() => [CollectionArtifact_]),
8572
+ __metadata("design:type", Array)
8573
+ ], RunCollectionArtifactViewResult.prototype, "Results", void 0);
8574
+ __decorate([
8575
+ Field(() => String, { nullable: true }),
8576
+ __metadata("design:type", String)
8577
+ ], RunCollectionArtifactViewResult.prototype, "UserViewRunID", void 0);
8578
+ __decorate([
8579
+ Field(() => Int, { nullable: true }),
8580
+ __metadata("design:type", Number)
8581
+ ], RunCollectionArtifactViewResult.prototype, "RowCount", void 0);
8582
+ __decorate([
8583
+ Field(() => Int, { nullable: true }),
8584
+ __metadata("design:type", Number)
8585
+ ], RunCollectionArtifactViewResult.prototype, "TotalRowCount", void 0);
8586
+ __decorate([
8587
+ Field(() => Int, { nullable: true }),
8588
+ __metadata("design:type", Number)
8589
+ ], RunCollectionArtifactViewResult.prototype, "ExecutionTime", void 0);
8590
+ __decorate([
8591
+ Field({ nullable: true }),
8592
+ __metadata("design:type", String)
8593
+ ], RunCollectionArtifactViewResult.prototype, "ErrorMessage", void 0);
8594
+ __decorate([
8595
+ Field(() => Boolean, { nullable: false }),
8596
+ __metadata("design:type", Boolean)
8597
+ ], RunCollectionArtifactViewResult.prototype, "Success", void 0);
8598
+ RunCollectionArtifactViewResult = __decorate([
8599
+ ObjectType()
8600
+ ], RunCollectionArtifactViewResult);
8601
+ export { RunCollectionArtifactViewResult };
8602
+ let CollectionArtifactResolver = class CollectionArtifactResolver extends ResolverBase {
8603
+ async RunCollectionArtifactViewByID(input, { providers, userPayload }, pubSub) {
8604
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
8605
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
8606
+ }
8607
+ async RunCollectionArtifactViewByName(input, { providers, userPayload }, pubSub) {
8608
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
8609
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
8610
+ }
8611
+ async RunCollectionArtifactDynamicView(input, { providers, userPayload }, pubSub) {
8612
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
8613
+ input.EntityName = 'MJ: Collection Artifacts';
8614
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
8615
+ }
8616
+ async CollectionArtifact(ID, { dataSources, userPayload, providers }, pubSub) {
8617
+ this.CheckUserReadPermissions('MJ: Collection Artifacts', userPayload);
8618
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
8619
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
8620
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCollectionArtifacts] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Collection Artifacts', userPayload, EntityPermissionType.Read, 'AND');
8621
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
8622
+ const result = this.MapFieldNamesToCodeNames('MJ: Collection Artifacts', rows && rows.length > 0 ? rows[0] : {});
8623
+ return result;
8624
+ }
8625
+ async CreateCollectionArtifact(input, { providers, userPayload }, pubSub) {
8626
+ const provider = GetReadWriteProvider(providers);
8627
+ return this.CreateRecord('MJ: Collection Artifacts', input, provider, userPayload, pubSub);
8628
+ }
8629
+ async UpdateCollectionArtifact(input, { providers, userPayload }, pubSub) {
8630
+ const provider = GetReadWriteProvider(providers);
8631
+ return this.UpdateRecord('MJ: Collection Artifacts', input, provider, userPayload, pubSub);
8632
+ }
8633
+ async DeleteCollectionArtifact(ID, options, { providers, userPayload }, pubSub) {
8634
+ const provider = GetReadWriteProvider(providers);
8635
+ const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
8636
+ return this.DeleteRecord('MJ: Collection Artifacts', key, options, provider, userPayload, pubSub);
8637
+ }
8638
+ };
8639
+ __decorate([
8640
+ Query(() => RunCollectionArtifactViewResult),
8641
+ __param(0, Arg('input', () => RunViewByIDInput)),
8642
+ __param(1, Ctx()),
8643
+ __param(2, PubSub()),
8644
+ __metadata("design:type", Function),
8645
+ __metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
8646
+ __metadata("design:returntype", Promise)
8647
+ ], CollectionArtifactResolver.prototype, "RunCollectionArtifactViewByID", null);
8648
+ __decorate([
8649
+ Query(() => RunCollectionArtifactViewResult),
8650
+ __param(0, Arg('input', () => RunViewByNameInput)),
8651
+ __param(1, Ctx()),
8652
+ __param(2, PubSub()),
8653
+ __metadata("design:type", Function),
8654
+ __metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
8655
+ __metadata("design:returntype", Promise)
8656
+ ], CollectionArtifactResolver.prototype, "RunCollectionArtifactViewByName", null);
8657
+ __decorate([
8658
+ Query(() => RunCollectionArtifactViewResult),
8659
+ __param(0, Arg('input', () => RunDynamicViewInput)),
8660
+ __param(1, Ctx()),
8661
+ __param(2, PubSub()),
8662
+ __metadata("design:type", Function),
8663
+ __metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
8664
+ __metadata("design:returntype", Promise)
8665
+ ], CollectionArtifactResolver.prototype, "RunCollectionArtifactDynamicView", null);
8666
+ __decorate([
8667
+ Query(() => CollectionArtifact_, { nullable: true }),
8668
+ __param(0, Arg('ID', () => String)),
8669
+ __param(1, Ctx()),
8670
+ __param(2, PubSub()),
8671
+ __metadata("design:type", Function),
8672
+ __metadata("design:paramtypes", [String, Object, PubSubEngine]),
8673
+ __metadata("design:returntype", Promise)
8674
+ ], CollectionArtifactResolver.prototype, "CollectionArtifact", null);
8675
+ __decorate([
8676
+ Mutation(() => CollectionArtifact_),
8677
+ __param(0, Arg('input', () => CreateCollectionArtifactInput)),
8678
+ __param(1, Ctx()),
8679
+ __param(2, PubSub()),
8680
+ __metadata("design:type", Function),
8681
+ __metadata("design:paramtypes", [CreateCollectionArtifactInput, Object, PubSubEngine]),
8682
+ __metadata("design:returntype", Promise)
8683
+ ], CollectionArtifactResolver.prototype, "CreateCollectionArtifact", null);
8684
+ __decorate([
8685
+ Mutation(() => CollectionArtifact_),
8686
+ __param(0, Arg('input', () => UpdateCollectionArtifactInput)),
8687
+ __param(1, Ctx()),
8688
+ __param(2, PubSub()),
8689
+ __metadata("design:type", Function),
8690
+ __metadata("design:paramtypes", [UpdateCollectionArtifactInput, Object, PubSubEngine]),
8691
+ __metadata("design:returntype", Promise)
8692
+ ], CollectionArtifactResolver.prototype, "UpdateCollectionArtifact", null);
8693
+ __decorate([
8694
+ Mutation(() => CollectionArtifact_),
8695
+ __param(0, Arg('ID', () => String)),
8696
+ __param(1, Arg('options___', () => DeleteOptionsInput)),
8697
+ __param(2, Ctx()),
8698
+ __param(3, PubSub()),
8699
+ __metadata("design:type", Function),
8700
+ __metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
8701
+ __metadata("design:returntype", Promise)
8702
+ ], CollectionArtifactResolver.prototype, "DeleteCollectionArtifact", null);
8703
+ CollectionArtifactResolver = __decorate([
8704
+ Resolver(CollectionArtifact_)
8705
+ ], CollectionArtifactResolver);
8706
+ export { CollectionArtifactResolver };
8451
8707
  let AIModelPriceType_ = class AIModelPriceType_ {
8452
8708
  ID;
8453
8709
  Name;
@@ -8712,6 +8968,7 @@ let Collection_ = class Collection_ {
8712
8968
  _mj__UpdatedAt;
8713
8969
  Environment;
8714
8970
  Parent;
8971
+ MJ_CollectionArtifacts_CollectionIDArray;
8715
8972
  MJ_Collections_ParentIDArray;
8716
8973
  };
8717
8974
  __decorate([
@@ -8772,6 +9029,10 @@ __decorate([
8772
9029
  MaxLength(510),
8773
9030
  __metadata("design:type", String)
8774
9031
  ], Collection_.prototype, "Parent", void 0);
9032
+ __decorate([
9033
+ Field(() => [CollectionArtifact_]),
9034
+ __metadata("design:type", Array)
9035
+ ], Collection_.prototype, "MJ_CollectionArtifacts_CollectionIDArray", void 0);
8775
9036
  __decorate([
8776
9037
  Field(() => [Collection_]),
8777
9038
  __metadata("design:type", Array)
@@ -8941,6 +9202,15 @@ let CollectionResolver = class CollectionResolver extends ResolverBase {
8941
9202
  const result = this.MapFieldNamesToCodeNames('MJ: Collections', rows && rows.length > 0 ? rows[0] : {});
8942
9203
  return result;
8943
9204
  }
9205
+ async MJ_CollectionArtifacts_CollectionIDArray(collection_, { dataSources, userPayload, providers }, pubSub) {
9206
+ this.CheckUserReadPermissions('MJ: Collection Artifacts', userPayload);
9207
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
9208
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
9209
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCollectionArtifacts] WHERE [CollectionID]='${collection_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Collection Artifacts', userPayload, EntityPermissionType.Read, 'AND');
9210
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
9211
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: Collection Artifacts', rows);
9212
+ return result;
9213
+ }
8944
9214
  async MJ_Collections_ParentIDArray(collection_, { dataSources, userPayload, providers }, pubSub) {
8945
9215
  this.CheckUserReadPermissions('MJ: Collections', userPayload);
8946
9216
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
@@ -9000,6 +9270,15 @@ __decorate([
9000
9270
  __metadata("design:paramtypes", [String, Object, PubSubEngine]),
9001
9271
  __metadata("design:returntype", Promise)
9002
9272
  ], CollectionResolver.prototype, "Collection", null);
9273
+ __decorate([
9274
+ FieldResolver(() => [CollectionArtifact_]),
9275
+ __param(0, Root()),
9276
+ __param(1, Ctx()),
9277
+ __param(2, PubSub()),
9278
+ __metadata("design:type", Function),
9279
+ __metadata("design:paramtypes", [Collection_, Object, PubSubEngine]),
9280
+ __metadata("design:returntype", Promise)
9281
+ ], CollectionResolver.prototype, "MJ_CollectionArtifacts_CollectionIDArray", null);
9003
9282
  __decorate([
9004
9283
  FieldResolver(() => [Collection_]),
9005
9284
  __param(0, Root()),
@@ -63564,6 +63843,7 @@ let Artifact_ = class Artifact_ {
63564
63843
  Type;
63565
63844
  User;
63566
63845
  MJ_ArtifactVersions_ArtifactIDArray;
63846
+ MJ_CollectionArtifacts_ArtifactIDArray;
63567
63847
  };
63568
63848
  __decorate([
63569
63849
  Field(),
@@ -63627,6 +63907,10 @@ __decorate([
63627
63907
  Field(() => [ArtifactVersion_]),
63628
63908
  __metadata("design:type", Array)
63629
63909
  ], Artifact_.prototype, "MJ_ArtifactVersions_ArtifactIDArray", void 0);
63910
+ __decorate([
63911
+ Field(() => [CollectionArtifact_]),
63912
+ __metadata("design:type", Array)
63913
+ ], Artifact_.prototype, "MJ_CollectionArtifacts_ArtifactIDArray", void 0);
63630
63914
  Artifact_ = __decorate([
63631
63915
  ObjectType({ description: `Independent content items (code, documents, charts) that can be linked to multiple conversations and collections. Supports versioning and sharing.` })
63632
63916
  ], Artifact_);
@@ -63791,6 +64075,15 @@ let ArtifactResolver = class ArtifactResolver extends ResolverBase {
63791
64075
  const result = this.ArrayMapFieldNamesToCodeNames('MJ: Artifact Versions', rows);
63792
64076
  return result;
63793
64077
  }
64078
+ async MJ_CollectionArtifacts_ArtifactIDArray(artifact_, { dataSources, userPayload, providers }, pubSub) {
64079
+ this.CheckUserReadPermissions('MJ: Collection Artifacts', userPayload);
64080
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
64081
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
64082
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCollectionArtifacts] WHERE [ArtifactID]='${artifact_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Collection Artifacts', userPayload, EntityPermissionType.Read, 'AND');
64083
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
64084
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: Collection Artifacts', rows);
64085
+ return result;
64086
+ }
63794
64087
  async CreateArtifact(input, { providers, userPayload }, pubSub) {
63795
64088
  const provider = GetReadWriteProvider(providers);
63796
64089
  return this.CreateRecord('MJ: Artifacts', input, provider, userPayload, pubSub);
@@ -63850,6 +64143,15 @@ __decorate([
63850
64143
  __metadata("design:paramtypes", [Artifact_, Object, PubSubEngine]),
63851
64144
  __metadata("design:returntype", Promise)
63852
64145
  ], ArtifactResolver.prototype, "MJ_ArtifactVersions_ArtifactIDArray", null);
64146
+ __decorate([
64147
+ FieldResolver(() => [CollectionArtifact_]),
64148
+ __param(0, Root()),
64149
+ __param(1, Ctx()),
64150
+ __param(2, PubSub()),
64151
+ __metadata("design:type", Function),
64152
+ __metadata("design:paramtypes", [Artifact_, Object, PubSubEngine]),
64153
+ __metadata("design:returntype", Promise)
64154
+ ], ArtifactResolver.prototype, "MJ_CollectionArtifacts_ArtifactIDArray", null);
63853
64155
  __decorate([
63854
64156
  Mutation(() => Artifact_),
63855
64157
  __param(0, Arg('input', () => CreateArtifactInput)),