@memberjunction/server 5.35.0 → 5.36.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/generated/generated.d.ts +29 -5
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +137 -15
- package/dist/generated/generated.js.map +1 -1
- package/dist/resolvers/AdhocQueryResolver.d.ts +2 -0
- package/dist/resolvers/AdhocQueryResolver.d.ts.map +1 -1
- package/dist/resolvers/AdhocQueryResolver.js +42 -8
- package/dist/resolvers/AdhocQueryResolver.js.map +1 -1
- package/dist/resolvers/ListOperationsResolver.d.ts +175 -0
- package/dist/resolvers/ListOperationsResolver.d.ts.map +1 -0
- package/dist/resolvers/ListOperationsResolver.js +930 -0
- package/dist/resolvers/ListOperationsResolver.js.map +1 -0
- package/package.json +70 -68
- package/src/__tests__/ListOperationsResolver.test.ts +182 -0
- package/src/generated/generated.ts +101 -15
- package/src/resolvers/AdhocQueryResolver.ts +41 -8
- package/src/resolvers/ListOperationsResolver.ts +607 -0
|
@@ -31688,9 +31688,8 @@ __decorate([
|
|
|
31688
31688
|
__metadata("design:type", Date)
|
|
31689
31689
|
], MJArtifactUse_.prototype, "_mj__UpdatedAt", void 0);
|
|
31690
31690
|
__decorate([
|
|
31691
|
-
Field(
|
|
31692
|
-
|
|
31693
|
-
__metadata("design:type", String)
|
|
31691
|
+
Field(() => Int),
|
|
31692
|
+
__metadata("design:type", Number)
|
|
31694
31693
|
], MJArtifactUse_.prototype, "ArtifactVersion", void 0);
|
|
31695
31694
|
__decorate([
|
|
31696
31695
|
Field(),
|
|
@@ -31955,9 +31954,8 @@ __decorate([
|
|
|
31955
31954
|
__metadata("design:type", Date)
|
|
31956
31955
|
], MJArtifactVersionAttribute_.prototype, "_mj__UpdatedAt", void 0);
|
|
31957
31956
|
__decorate([
|
|
31958
|
-
Field(
|
|
31959
|
-
|
|
31960
|
-
__metadata("design:type", String)
|
|
31957
|
+
Field(() => Int),
|
|
31958
|
+
__metadata("design:type", Number)
|
|
31961
31959
|
], MJArtifactVersionAttribute_.prototype, "ArtifactVersion", void 0);
|
|
31962
31960
|
MJArtifactVersionAttribute_ = __decorate([
|
|
31963
31961
|
ObjectType({ description: `Stores extracted attribute values from artifact content based on ArtifactType ExtractRules. Prevents re-running extraction logic on every access.` })
|
|
@@ -34384,9 +34382,8 @@ __decorate([
|
|
|
34384
34382
|
__metadata("design:type", String)
|
|
34385
34383
|
], MJCollectionArtifact_.prototype, "Collection", void 0);
|
|
34386
34384
|
__decorate([
|
|
34387
|
-
Field(
|
|
34388
|
-
|
|
34389
|
-
__metadata("design:type", String)
|
|
34385
|
+
Field(() => Int),
|
|
34386
|
+
__metadata("design:type", Number)
|
|
34390
34387
|
], MJCollectionArtifact_.prototype, "ArtifactVersion", void 0);
|
|
34391
34388
|
MJCollectionArtifact_ = __decorate([
|
|
34392
34389
|
ObjectType({ description: `Links collections to specific artifact versions. Each collection can contain multiple versions of the same artifact.` })
|
|
@@ -47490,9 +47487,8 @@ __decorate([
|
|
|
47490
47487
|
__metadata("design:type", String)
|
|
47491
47488
|
], MJConversationDetailArtifact_.prototype, "ConversationDetail", void 0);
|
|
47492
47489
|
__decorate([
|
|
47493
|
-
Field(
|
|
47494
|
-
|
|
47495
|
-
__metadata("design:type", String)
|
|
47490
|
+
Field(() => Int),
|
|
47491
|
+
__metadata("design:type", Number)
|
|
47496
47492
|
], MJConversationDetailArtifact_.prototype, "ArtifactVersion", void 0);
|
|
47497
47493
|
MJConversationDetailArtifact_ = __decorate([
|
|
47498
47494
|
ObjectType({ description: `Junction table tracking many-to-many relationship between conversation messages and artifact versions, with directionality tracking` })
|
|
@@ -47796,9 +47792,8 @@ __decorate([
|
|
|
47796
47792
|
__metadata("design:type", String)
|
|
47797
47793
|
], MJConversationDetailAttachment_.prototype, "File", void 0);
|
|
47798
47794
|
__decorate([
|
|
47799
|
-
Field({ nullable: true }),
|
|
47800
|
-
|
|
47801
|
-
__metadata("design:type", String)
|
|
47795
|
+
Field(() => Int, { nullable: true }),
|
|
47796
|
+
__metadata("design:type", Number)
|
|
47802
47797
|
], MJConversationDetailAttachment_.prototype, "ArtifactVersion", void 0);
|
|
47803
47798
|
MJConversationDetailAttachment_ = __decorate([
|
|
47804
47799
|
ObjectType({ description: `Stores attachments (images, videos, audio, documents) for conversation messages. Supports both inline base64 storage for small files and reference to MJStorage for large files.` })
|
|
@@ -75630,6 +75625,33 @@ __decorate([
|
|
|
75630
75625
|
Field(),
|
|
75631
75626
|
__metadata("design:type", Date)
|
|
75632
75627
|
], MJList_.prototype, "_mj__UpdatedAt", void 0);
|
|
75628
|
+
__decorate([
|
|
75629
|
+
Field({ nullable: true, description: `Optional ID of the User View this list was materialized from. NULL for hand-built lists. When set, the list can be refreshed against this view via ListOperations.RefreshFromSource.` }),
|
|
75630
|
+
MaxLength(36),
|
|
75631
|
+
__metadata("design:type", String)
|
|
75632
|
+
], MJList_.prototype, "SourceViewID", void 0);
|
|
75633
|
+
__decorate([
|
|
75634
|
+
Field({ nullable: true, description: `JSON snapshot of the source filter at materialization time. When UseSnapshot=1, refreshes re-apply this snapshot rather than re-reading the live source view. Null when no snapshot was captured.` }),
|
|
75635
|
+
__metadata("design:type", String)
|
|
75636
|
+
], MJList_.prototype, "SourceFilterSnapshot", void 0);
|
|
75637
|
+
__decorate([
|
|
75638
|
+
Field({ nullable: true, description: `Timestamp (UTC) of the most recent successful RefreshFromSource. Null when the list has never been refreshed.` }),
|
|
75639
|
+
__metadata("design:type", Date)
|
|
75640
|
+
], MJList_.prototype, "LastRefreshedAt", void 0);
|
|
75641
|
+
__decorate([
|
|
75642
|
+
Field({ nullable: true, description: `User who triggered the most recent successful RefreshFromSource. Null when the list has never been refreshed.` }),
|
|
75643
|
+
MaxLength(36),
|
|
75644
|
+
__metadata("design:type", String)
|
|
75645
|
+
], MJList_.prototype, "LastRefreshedByUserID", void 0);
|
|
75646
|
+
__decorate([
|
|
75647
|
+
Field({ description: `Default refresh mode for this list. Additive only adds new members; Sync reconciles in both directions (may remove members no longer in the source — requires explicit drop-confirmation).` }),
|
|
75648
|
+
MaxLength(20),
|
|
75649
|
+
__metadata("design:type", String)
|
|
75650
|
+
], MJList_.prototype, "RefreshMode", void 0);
|
|
75651
|
+
__decorate([
|
|
75652
|
+
Field(() => Boolean, { description: `When 1, RefreshFromSource uses SourceFilterSnapshot as the source. When 0 (default), it re-reads the live SourceView.` }),
|
|
75653
|
+
__metadata("design:type", Boolean)
|
|
75654
|
+
], MJList_.prototype, "UseSnapshot", void 0);
|
|
75633
75655
|
__decorate([
|
|
75634
75656
|
Field(),
|
|
75635
75657
|
MaxLength(255),
|
|
@@ -75650,6 +75672,16 @@ __decorate([
|
|
|
75650
75672
|
MaxLength(255),
|
|
75651
75673
|
__metadata("design:type", String)
|
|
75652
75674
|
], MJList_.prototype, "CompanyIntegration", void 0);
|
|
75675
|
+
__decorate([
|
|
75676
|
+
Field({ nullable: true }),
|
|
75677
|
+
MaxLength(100),
|
|
75678
|
+
__metadata("design:type", String)
|
|
75679
|
+
], MJList_.prototype, "SourceView", void 0);
|
|
75680
|
+
__decorate([
|
|
75681
|
+
Field({ nullable: true }),
|
|
75682
|
+
MaxLength(100),
|
|
75683
|
+
__metadata("design:type", String)
|
|
75684
|
+
], MJList_.prototype, "LastRefreshedByUser", void 0);
|
|
75653
75685
|
__decorate([
|
|
75654
75686
|
Field(() => [MJDuplicateRun_]),
|
|
75655
75687
|
__metadata("design:type", Array)
|
|
@@ -75707,6 +75739,30 @@ __decorate([
|
|
|
75707
75739
|
Field({ nullable: true }),
|
|
75708
75740
|
__metadata("design:type", String)
|
|
75709
75741
|
], CreateMJListInput.prototype, "CompanyIntegrationID", void 0);
|
|
75742
|
+
__decorate([
|
|
75743
|
+
Field({ nullable: true }),
|
|
75744
|
+
__metadata("design:type", String)
|
|
75745
|
+
], CreateMJListInput.prototype, "SourceViewID", void 0);
|
|
75746
|
+
__decorate([
|
|
75747
|
+
Field({ nullable: true }),
|
|
75748
|
+
__metadata("design:type", String)
|
|
75749
|
+
], CreateMJListInput.prototype, "SourceFilterSnapshot", void 0);
|
|
75750
|
+
__decorate([
|
|
75751
|
+
Field({ nullable: true }),
|
|
75752
|
+
__metadata("design:type", Date)
|
|
75753
|
+
], CreateMJListInput.prototype, "LastRefreshedAt", void 0);
|
|
75754
|
+
__decorate([
|
|
75755
|
+
Field({ nullable: true }),
|
|
75756
|
+
__metadata("design:type", String)
|
|
75757
|
+
], CreateMJListInput.prototype, "LastRefreshedByUserID", void 0);
|
|
75758
|
+
__decorate([
|
|
75759
|
+
Field({ nullable: true }),
|
|
75760
|
+
__metadata("design:type", String)
|
|
75761
|
+
], CreateMJListInput.prototype, "RefreshMode", void 0);
|
|
75762
|
+
__decorate([
|
|
75763
|
+
Field(() => Boolean, { nullable: true }),
|
|
75764
|
+
__metadata("design:type", Boolean)
|
|
75765
|
+
], CreateMJListInput.prototype, "UseSnapshot", void 0);
|
|
75710
75766
|
__decorate([
|
|
75711
75767
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
75712
75768
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -75752,6 +75808,30 @@ __decorate([
|
|
|
75752
75808
|
Field({ nullable: true }),
|
|
75753
75809
|
__metadata("design:type", String)
|
|
75754
75810
|
], UpdateMJListInput.prototype, "CompanyIntegrationID", void 0);
|
|
75811
|
+
__decorate([
|
|
75812
|
+
Field({ nullable: true }),
|
|
75813
|
+
__metadata("design:type", String)
|
|
75814
|
+
], UpdateMJListInput.prototype, "SourceViewID", void 0);
|
|
75815
|
+
__decorate([
|
|
75816
|
+
Field({ nullable: true }),
|
|
75817
|
+
__metadata("design:type", String)
|
|
75818
|
+
], UpdateMJListInput.prototype, "SourceFilterSnapshot", void 0);
|
|
75819
|
+
__decorate([
|
|
75820
|
+
Field({ nullable: true }),
|
|
75821
|
+
__metadata("design:type", Date)
|
|
75822
|
+
], UpdateMJListInput.prototype, "LastRefreshedAt", void 0);
|
|
75823
|
+
__decorate([
|
|
75824
|
+
Field({ nullable: true }),
|
|
75825
|
+
__metadata("design:type", String)
|
|
75826
|
+
], UpdateMJListInput.prototype, "LastRefreshedByUserID", void 0);
|
|
75827
|
+
__decorate([
|
|
75828
|
+
Field({ nullable: true }),
|
|
75829
|
+
__metadata("design:type", String)
|
|
75830
|
+
], UpdateMJListInput.prototype, "RefreshMode", void 0);
|
|
75831
|
+
__decorate([
|
|
75832
|
+
Field(() => Boolean, { nullable: true }),
|
|
75833
|
+
__metadata("design:type", Boolean)
|
|
75834
|
+
], UpdateMJListInput.prototype, "UseSnapshot", void 0);
|
|
75755
75835
|
__decorate([
|
|
75756
75836
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
75757
75837
|
__metadata("design:type", Array)
|
|
@@ -112048,6 +112128,10 @@ __decorate([
|
|
|
112048
112128
|
Field(() => [MJUserViewRun_]),
|
|
112049
112129
|
__metadata("design:type", Array)
|
|
112050
112130
|
], MJUserView_.prototype, "MJUserViewRuns_UserViewIDArray", void 0);
|
|
112131
|
+
__decorate([
|
|
112132
|
+
Field(() => [MJList_]),
|
|
112133
|
+
__metadata("design:type", Array)
|
|
112134
|
+
], MJUserView_.prototype, "MJLists_SourceViewIDArray", void 0);
|
|
112051
112135
|
MJUserView_ = __decorate([
|
|
112052
112136
|
ObjectType({ description: `Views are sets of records within a given entity defined by filtering rules. Views can be used programatically to retrieve dynamic sets of data and in user interfaces like MJ Explorer for end-user consumption.` })
|
|
112053
112137
|
], MJUserView_);
|
|
@@ -112341,6 +112425,14 @@ let MJUserViewResolverBase = class MJUserViewResolverBase extends ResolverBase {
|
|
|
112341
112425
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: User View Runs', rows, this.GetUserFromPayload(userPayload));
|
|
112342
112426
|
return result;
|
|
112343
112427
|
}
|
|
112428
|
+
async MJLists_SourceViewIDArray(mjuserview_, { userPayload, providers }, pubSub) {
|
|
112429
|
+
this.CheckUserReadPermissions('MJ: Lists', userPayload);
|
|
112430
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
112431
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwLists')} WHERE ${provider.QuoteIdentifier('SourceViewID')}='${mjuserview_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Lists', userPayload, EntityPermissionType.Read, 'AND');
|
|
112432
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
112433
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Lists', rows, this.GetUserFromPayload(userPayload));
|
|
112434
|
+
return result;
|
|
112435
|
+
}
|
|
112344
112436
|
async CreateMJUserView(input, { providers, userPayload }, pubSub) {
|
|
112345
112437
|
const provider = GetReadWriteProvider(providers);
|
|
112346
112438
|
return this.CreateRecord('MJ: User Views', input, provider, userPayload, pubSub);
|
|
@@ -112426,6 +112518,15 @@ __decorate([
|
|
|
112426
112518
|
__metadata("design:paramtypes", [MJUserView_, Object, PubSubEngine]),
|
|
112427
112519
|
__metadata("design:returntype", Promise)
|
|
112428
112520
|
], MJUserViewResolverBase.prototype, "MJUserViewRuns_UserViewIDArray", null);
|
|
112521
|
+
__decorate([
|
|
112522
|
+
FieldResolver(() => [MJList_]),
|
|
112523
|
+
__param(0, Root()),
|
|
112524
|
+
__param(1, Ctx()),
|
|
112525
|
+
__param(2, PubSub()),
|
|
112526
|
+
__metadata("design:type", Function),
|
|
112527
|
+
__metadata("design:paramtypes", [MJUserView_, Object, PubSubEngine]),
|
|
112528
|
+
__metadata("design:returntype", Promise)
|
|
112529
|
+
], MJUserViewResolverBase.prototype, "MJLists_SourceViewIDArray", null);
|
|
112429
112530
|
__decorate([
|
|
112430
112531
|
Mutation(() => MJUserView_),
|
|
112431
112532
|
__param(0, Arg('input', () => CreateMJUserViewInput)),
|
|
@@ -112953,6 +113054,10 @@ __decorate([
|
|
|
112953
113054
|
Field(() => [MJAIAgent_]),
|
|
112954
113055
|
__metadata("design:type", Array)
|
|
112955
113056
|
], MJUser_.prototype, "MJAIAgents_OwnerUserIDArray", void 0);
|
|
113057
|
+
__decorate([
|
|
113058
|
+
Field(() => [MJList_]),
|
|
113059
|
+
__metadata("design:type", Array)
|
|
113060
|
+
], MJUser_.prototype, "MJLists_LastRefreshedByUserIDArray", void 0);
|
|
112956
113061
|
MJUser_ = __decorate([
|
|
112957
113062
|
ObjectType({ description: `A list of all users who have or had access to the system` })
|
|
112958
113063
|
], MJUser_);
|
|
@@ -113934,6 +114039,14 @@ let MJUserResolverBase = class MJUserResolverBase extends ResolverBase {
|
|
|
113934
114039
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agents', rows, this.GetUserFromPayload(userPayload));
|
|
113935
114040
|
return result;
|
|
113936
114041
|
}
|
|
114042
|
+
async MJLists_LastRefreshedByUserIDArray(mjuser_, { userPayload, providers }, pubSub) {
|
|
114043
|
+
this.CheckUserReadPermissions('MJ: Lists', userPayload);
|
|
114044
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
114045
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwLists')} WHERE ${provider.QuoteIdentifier('LastRefreshedByUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Lists', userPayload, EntityPermissionType.Read, 'AND');
|
|
114046
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
114047
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Lists', rows, this.GetUserFromPayload(userPayload));
|
|
114048
|
+
return result;
|
|
114049
|
+
}
|
|
113937
114050
|
async CreateMJUser(input, { providers, userPayload }, pubSub) {
|
|
113938
114051
|
const provider = GetReadWriteProvider(providers);
|
|
113939
114052
|
return this.CreateRecord('MJ: Users', input, provider, userPayload, pubSub);
|
|
@@ -114856,6 +114969,15 @@ __decorate([
|
|
|
114856
114969
|
__metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
|
|
114857
114970
|
__metadata("design:returntype", Promise)
|
|
114858
114971
|
], MJUserResolverBase.prototype, "MJAIAgents_OwnerUserIDArray", null);
|
|
114972
|
+
__decorate([
|
|
114973
|
+
FieldResolver(() => [MJList_]),
|
|
114974
|
+
__param(0, Root()),
|
|
114975
|
+
__param(1, Ctx()),
|
|
114976
|
+
__param(2, PubSub()),
|
|
114977
|
+
__metadata("design:type", Function),
|
|
114978
|
+
__metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
|
|
114979
|
+
__metadata("design:returntype", Promise)
|
|
114980
|
+
], MJUserResolverBase.prototype, "MJLists_LastRefreshedByUserIDArray", null);
|
|
114859
114981
|
__decorate([
|
|
114860
114982
|
Mutation(() => MJUser_),
|
|
114861
114983
|
__param(0, Arg('input', () => CreateMJUserInput)),
|