@memberjunction/server 5.34.1 → 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 +49 -4
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +236 -14
- package/dist/generated/generated.js.map +1 -1
- package/dist/generic/ResolverBase.d.ts +1 -1
- package/dist/generic/ResolverBase.d.ts.map +1 -1
- package/dist/generic/ResolverBase.js +7 -4
- package/dist/generic/ResolverBase.js.map +1 -1
- package/dist/generic/RunViewResolver.d.ts +4 -0
- package/dist/generic/RunViewResolver.d.ts.map +1 -1
- package/dist/generic/RunViewResolver.js +28 -0
- package/dist/generic/RunViewResolver.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/dist/resolvers/RunAIAgentResolver.d.ts.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.js +111 -58
- package/dist/resolvers/RunAIAgentResolver.js.map +1 -1
- package/dist/resolvers/artifact-routing.d.ts +39 -0
- package/dist/resolvers/artifact-routing.d.ts.map +1 -0
- package/dist/resolvers/artifact-routing.js +40 -0
- package/dist/resolvers/artifact-routing.js.map +1 -0
- package/dist/types.d.ts +6 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +70 -68
- package/src/__tests__/ListOperationsResolver.test.ts +182 -0
- package/src/generated/generated.ts +173 -14
- package/src/generic/ResolverBase.ts +13 -4
- package/src/generic/RunViewResolver.ts +28 -0
- package/src/resolvers/AdhocQueryResolver.ts +41 -8
- package/src/resolvers/ListOperationsResolver.ts +607 -0
- package/src/resolvers/RunAIAgentResolver.ts +119 -61
- package/src/resolvers/__tests__/artifact-routing.test.ts +88 -0
- package/src/resolvers/artifact-routing.ts +80 -0
- package/src/types.ts +6 -0
|
@@ -10270,7 +10270,7 @@ __decorate([
|
|
|
10270
10270
|
__metadata("design:type", Number)
|
|
10271
10271
|
], MJAIAgentRunStep_.prototype, "StepNumber", void 0);
|
|
10272
10272
|
__decorate([
|
|
10273
|
-
Field({ description: `Type of execution step: Prompt, Actions, Sub-Agent, Decision, Chat, Validation` }),
|
|
10273
|
+
Field({ description: `Type of execution step: Prompt, Actions, Sub-Agent, Decision, Chat, Validation, ForEach, While, Tool` }),
|
|
10274
10274
|
MaxLength(50),
|
|
10275
10275
|
__metadata("design:type", String)
|
|
10276
10276
|
], MJAIAgentRunStep_.prototype, "StepType", void 0);
|
|
@@ -13586,6 +13586,10 @@ __decorate([
|
|
|
13586
13586
|
MaxLength(20),
|
|
13587
13587
|
__metadata("design:type", String)
|
|
13588
13588
|
], MJAIAgent_.prototype, "SearchScopeAccess", void 0);
|
|
13589
|
+
__decorate([
|
|
13590
|
+
Field(() => Boolean, { description: `Per-agent opt-in to a Generic Binary fallback for file uploads whose MIME type does not match any registered Artifact Type. When false (default), unrecognized uploads are rejected at upload time with an actionable error. When true, unrecognized uploads resolve to the Generic Binary artifact type, exposing only get_full and get_metadata tools. Scoped per agent — there is no system-wide global flag.` }),
|
|
13591
|
+
__metadata("design:type", Boolean)
|
|
13592
|
+
], MJAIAgent_.prototype, "AcceptUnregisteredFiles", void 0);
|
|
13589
13593
|
__decorate([
|
|
13590
13594
|
Field({ nullable: true }),
|
|
13591
13595
|
MaxLength(255),
|
|
@@ -13996,6 +14000,10 @@ __decorate([
|
|
|
13996
14000
|
Field({ nullable: true }),
|
|
13997
14001
|
__metadata("design:type", String)
|
|
13998
14002
|
], CreateMJAIAgentInput.prototype, "SearchScopeAccess", void 0);
|
|
14003
|
+
__decorate([
|
|
14004
|
+
Field(() => Boolean, { nullable: true }),
|
|
14005
|
+
__metadata("design:type", Boolean)
|
|
14006
|
+
], CreateMJAIAgentInput.prototype, "AcceptUnregisteredFiles", void 0);
|
|
13999
14007
|
__decorate([
|
|
14000
14008
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
14001
14009
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -14261,6 +14269,10 @@ __decorate([
|
|
|
14261
14269
|
Field({ nullable: true }),
|
|
14262
14270
|
__metadata("design:type", String)
|
|
14263
14271
|
], UpdateMJAIAgentInput.prototype, "SearchScopeAccess", void 0);
|
|
14272
|
+
__decorate([
|
|
14273
|
+
Field(() => Boolean, { nullable: true }),
|
|
14274
|
+
__metadata("design:type", Boolean)
|
|
14275
|
+
], UpdateMJAIAgentInput.prototype, "AcceptUnregisteredFiles", void 0);
|
|
14264
14276
|
__decorate([
|
|
14265
14277
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
14266
14278
|
__metadata("design:type", Array)
|
|
@@ -31223,6 +31235,19 @@ __decorate([
|
|
|
31223
31235
|
MaxLength(100),
|
|
31224
31236
|
__metadata("design:type", String)
|
|
31225
31237
|
], MJArtifactType_.prototype, "ToolLibraryClass", void 0);
|
|
31238
|
+
__decorate([
|
|
31239
|
+
Field(() => Int, { description: `Deterministic tiebreaker when multiple Artifact Types match the same MIME pattern. Higher values win. Within a specificity tier (exact > subtype-wildcard), the resolver sorts by Priority desc, then SystemSupplied = false beats SystemSupplied = true, then lowest ID wins.` }),
|
|
31240
|
+
__metadata("design:type", Number)
|
|
31241
|
+
], MJArtifactType_.prototype, "Priority", void 0);
|
|
31242
|
+
__decorate([
|
|
31243
|
+
Field({ description: `How artifacts of this type are delivered to the LLM by default. Inline: emitted as an inline content block (image_url, audio_url, small text, etc.) when the model supports the modality and the size is under the inline cap. ToolsOnly: never inlined; the agent reaches the bytes only through tool calls (get_full, library-specific tools). Per-instance override is one-way via ConversationArtifactVersion.ForceToolsOnly — an instance can opt out of inline but never opt in when the type default is ToolsOnly.` }),
|
|
31244
|
+
MaxLength(20),
|
|
31245
|
+
__metadata("design:type", String)
|
|
31246
|
+
], MJArtifactType_.prototype, "DefaultDeliveryMode", void 0);
|
|
31247
|
+
__decorate([
|
|
31248
|
+
Field(() => Boolean, { description: `True for Artifact Types shipped as part of the MemberJunction default registry (JSON, PDF, Office variants, Image/Audio/Video, Generic Text, Generic Binary). False for user/org-supplied customizations. Used as a tiebreaker in MIME pattern resolution: user customizations win over shipped defaults at equal Priority.` }),
|
|
31249
|
+
__metadata("design:type", Boolean)
|
|
31250
|
+
], MJArtifactType_.prototype, "SystemSupplied", void 0);
|
|
31226
31251
|
__decorate([
|
|
31227
31252
|
Field({ nullable: true }),
|
|
31228
31253
|
MaxLength(100),
|
|
@@ -31306,6 +31331,18 @@ __decorate([
|
|
|
31306
31331
|
Field({ nullable: true }),
|
|
31307
31332
|
__metadata("design:type", String)
|
|
31308
31333
|
], CreateMJArtifactTypeInput.prototype, "ToolLibraryClass", void 0);
|
|
31334
|
+
__decorate([
|
|
31335
|
+
Field(() => Int, { nullable: true }),
|
|
31336
|
+
__metadata("design:type", Number)
|
|
31337
|
+
], CreateMJArtifactTypeInput.prototype, "Priority", void 0);
|
|
31338
|
+
__decorate([
|
|
31339
|
+
Field({ nullable: true }),
|
|
31340
|
+
__metadata("design:type", String)
|
|
31341
|
+
], CreateMJArtifactTypeInput.prototype, "DefaultDeliveryMode", void 0);
|
|
31342
|
+
__decorate([
|
|
31343
|
+
Field(() => Boolean, { nullable: true }),
|
|
31344
|
+
__metadata("design:type", Boolean)
|
|
31345
|
+
], CreateMJArtifactTypeInput.prototype, "SystemSupplied", void 0);
|
|
31309
31346
|
__decorate([
|
|
31310
31347
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
31311
31348
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -31363,6 +31400,18 @@ __decorate([
|
|
|
31363
31400
|
Field({ nullable: true }),
|
|
31364
31401
|
__metadata("design:type", String)
|
|
31365
31402
|
], UpdateMJArtifactTypeInput.prototype, "ToolLibraryClass", void 0);
|
|
31403
|
+
__decorate([
|
|
31404
|
+
Field(() => Int, { nullable: true }),
|
|
31405
|
+
__metadata("design:type", Number)
|
|
31406
|
+
], UpdateMJArtifactTypeInput.prototype, "Priority", void 0);
|
|
31407
|
+
__decorate([
|
|
31408
|
+
Field({ nullable: true }),
|
|
31409
|
+
__metadata("design:type", String)
|
|
31410
|
+
], UpdateMJArtifactTypeInput.prototype, "DefaultDeliveryMode", void 0);
|
|
31411
|
+
__decorate([
|
|
31412
|
+
Field(() => Boolean, { nullable: true }),
|
|
31413
|
+
__metadata("design:type", Boolean)
|
|
31414
|
+
], UpdateMJArtifactTypeInput.prototype, "SystemSupplied", void 0);
|
|
31366
31415
|
__decorate([
|
|
31367
31416
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
31368
31417
|
__metadata("design:type", Array)
|
|
@@ -31639,9 +31688,8 @@ __decorate([
|
|
|
31639
31688
|
__metadata("design:type", Date)
|
|
31640
31689
|
], MJArtifactUse_.prototype, "_mj__UpdatedAt", void 0);
|
|
31641
31690
|
__decorate([
|
|
31642
|
-
Field(
|
|
31643
|
-
|
|
31644
|
-
__metadata("design:type", String)
|
|
31691
|
+
Field(() => Int),
|
|
31692
|
+
__metadata("design:type", Number)
|
|
31645
31693
|
], MJArtifactUse_.prototype, "ArtifactVersion", void 0);
|
|
31646
31694
|
__decorate([
|
|
31647
31695
|
Field(),
|
|
@@ -31906,9 +31954,8 @@ __decorate([
|
|
|
31906
31954
|
__metadata("design:type", Date)
|
|
31907
31955
|
], MJArtifactVersionAttribute_.prototype, "_mj__UpdatedAt", void 0);
|
|
31908
31956
|
__decorate([
|
|
31909
|
-
Field(
|
|
31910
|
-
|
|
31911
|
-
__metadata("design:type", String)
|
|
31957
|
+
Field(() => Int),
|
|
31958
|
+
__metadata("design:type", Number)
|
|
31912
31959
|
], MJArtifactVersionAttribute_.prototype, "ArtifactVersion", void 0);
|
|
31913
31960
|
MJArtifactVersionAttribute_ = __decorate([
|
|
31914
31961
|
ObjectType({ description: `Stores extracted attribute values from artifact content based on ArtifactType ExtractRules. Prevents re-running extraction logic on every access.` })
|
|
@@ -32215,6 +32262,10 @@ __decorate([
|
|
|
32215
32262
|
Field(() => Int, { nullable: true, description: `Size of the stored file in bytes. Denormalized for display without loading the file. Only populated when ContentMode is 'File'.` }),
|
|
32216
32263
|
__metadata("design:type", Number)
|
|
32217
32264
|
], MJArtifactVersion_.prototype, "ContentSizeBytes", void 0);
|
|
32265
|
+
__decorate([
|
|
32266
|
+
Field(() => Boolean, { description: `One-way override that forces this artifact version to be delivered via tools regardless of the Artifact Type's DefaultDeliveryMode. When true, the resolver never emits an inline content block for this version. There is no inverse override — an instance cannot be widened from ToolsOnly to Inline. Default false.` }),
|
|
32267
|
+
__metadata("design:type", Boolean)
|
|
32268
|
+
], MJArtifactVersion_.prototype, "ForceToolsOnly", void 0);
|
|
32218
32269
|
__decorate([
|
|
32219
32270
|
Field(),
|
|
32220
32271
|
MaxLength(255),
|
|
@@ -32246,6 +32297,10 @@ __decorate([
|
|
|
32246
32297
|
Field(() => [MJConversationDetailArtifact_]),
|
|
32247
32298
|
__metadata("design:type", Array)
|
|
32248
32299
|
], MJArtifactVersion_.prototype, "MJConversationDetailArtifacts_ArtifactVersionIDArray", void 0);
|
|
32300
|
+
__decorate([
|
|
32301
|
+
Field(() => [MJConversationDetailAttachment_]),
|
|
32302
|
+
__metadata("design:type", Array)
|
|
32303
|
+
], MJArtifactVersion_.prototype, "MJConversationDetailAttachments_ArtifactVersionIDArray", void 0);
|
|
32249
32304
|
MJArtifactVersion_ = __decorate([
|
|
32250
32305
|
ObjectType({ description: `Version history for artifacts, tracking all changes over time` })
|
|
32251
32306
|
], MJArtifactVersion_);
|
|
@@ -32315,6 +32370,10 @@ __decorate([
|
|
|
32315
32370
|
Field(() => Int, { nullable: true }),
|
|
32316
32371
|
__metadata("design:type", Number)
|
|
32317
32372
|
], CreateMJArtifactVersionInput.prototype, "ContentSizeBytes", void 0);
|
|
32373
|
+
__decorate([
|
|
32374
|
+
Field(() => Boolean, { nullable: true }),
|
|
32375
|
+
__metadata("design:type", Boolean)
|
|
32376
|
+
], CreateMJArtifactVersionInput.prototype, "ForceToolsOnly", void 0);
|
|
32318
32377
|
__decorate([
|
|
32319
32378
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
32320
32379
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -32388,6 +32447,10 @@ __decorate([
|
|
|
32388
32447
|
Field(() => Int, { nullable: true }),
|
|
32389
32448
|
__metadata("design:type", Number)
|
|
32390
32449
|
], UpdateMJArtifactVersionInput.prototype, "ContentSizeBytes", void 0);
|
|
32450
|
+
__decorate([
|
|
32451
|
+
Field(() => Boolean, { nullable: true }),
|
|
32452
|
+
__metadata("design:type", Boolean)
|
|
32453
|
+
], UpdateMJArtifactVersionInput.prototype, "ForceToolsOnly", void 0);
|
|
32391
32454
|
__decorate([
|
|
32392
32455
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
32393
32456
|
__metadata("design:type", Array)
|
|
@@ -32491,6 +32554,14 @@ let MJArtifactVersionResolver = class MJArtifactVersionResolver extends Resolver
|
|
|
32491
32554
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Detail Artifacts', rows, this.GetUserFromPayload(userPayload));
|
|
32492
32555
|
return result;
|
|
32493
32556
|
}
|
|
32557
|
+
async MJConversationDetailAttachments_ArtifactVersionIDArray(mjartifactversion_, { userPayload, providers }, pubSub) {
|
|
32558
|
+
this.CheckUserReadPermissions('MJ: Conversation Detail Attachments', userPayload);
|
|
32559
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
32560
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwConversationDetailAttachments')} WHERE ${provider.QuoteIdentifier('ArtifactVersionID')}='${mjartifactversion_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Detail Attachments', userPayload, EntityPermissionType.Read, 'AND');
|
|
32561
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
32562
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Detail Attachments', rows, this.GetUserFromPayload(userPayload));
|
|
32563
|
+
return result;
|
|
32564
|
+
}
|
|
32494
32565
|
async CreateMJArtifactVersion(input, { providers, userPayload }, pubSub) {
|
|
32495
32566
|
const provider = GetReadWriteProvider(providers);
|
|
32496
32567
|
return this.CreateRecord('MJ: Artifact Versions', input, provider, userPayload, pubSub);
|
|
@@ -32577,6 +32648,15 @@ __decorate([
|
|
|
32577
32648
|
__metadata("design:paramtypes", [MJArtifactVersion_, Object, PubSubEngine]),
|
|
32578
32649
|
__metadata("design:returntype", Promise)
|
|
32579
32650
|
], MJArtifactVersionResolver.prototype, "MJConversationDetailArtifacts_ArtifactVersionIDArray", null);
|
|
32651
|
+
__decorate([
|
|
32652
|
+
FieldResolver(() => [MJConversationDetailAttachment_]),
|
|
32653
|
+
__param(0, Root()),
|
|
32654
|
+
__param(1, Ctx()),
|
|
32655
|
+
__param(2, PubSub()),
|
|
32656
|
+
__metadata("design:type", Function),
|
|
32657
|
+
__metadata("design:paramtypes", [MJArtifactVersion_, Object, PubSubEngine]),
|
|
32658
|
+
__metadata("design:returntype", Promise)
|
|
32659
|
+
], MJArtifactVersionResolver.prototype, "MJConversationDetailAttachments_ArtifactVersionIDArray", null);
|
|
32580
32660
|
__decorate([
|
|
32581
32661
|
Mutation(() => MJArtifactVersion_),
|
|
32582
32662
|
__param(0, Arg('input', () => CreateMJArtifactVersionInput)),
|
|
@@ -34302,9 +34382,8 @@ __decorate([
|
|
|
34302
34382
|
__metadata("design:type", String)
|
|
34303
34383
|
], MJCollectionArtifact_.prototype, "Collection", void 0);
|
|
34304
34384
|
__decorate([
|
|
34305
|
-
Field(
|
|
34306
|
-
|
|
34307
|
-
__metadata("design:type", String)
|
|
34385
|
+
Field(() => Int),
|
|
34386
|
+
__metadata("design:type", Number)
|
|
34308
34387
|
], MJCollectionArtifact_.prototype, "ArtifactVersion", void 0);
|
|
34309
34388
|
MJCollectionArtifact_ = __decorate([
|
|
34310
34389
|
ObjectType({ description: `Links collections to specific artifact versions. Each collection can contain multiple versions of the same artifact.` })
|
|
@@ -47408,9 +47487,8 @@ __decorate([
|
|
|
47408
47487
|
__metadata("design:type", String)
|
|
47409
47488
|
], MJConversationDetailArtifact_.prototype, "ConversationDetail", void 0);
|
|
47410
47489
|
__decorate([
|
|
47411
|
-
Field(
|
|
47412
|
-
|
|
47413
|
-
__metadata("design:type", String)
|
|
47490
|
+
Field(() => Int),
|
|
47491
|
+
__metadata("design:type", Number)
|
|
47414
47492
|
], MJConversationDetailArtifact_.prototype, "ArtifactVersion", void 0);
|
|
47415
47493
|
MJConversationDetailArtifact_ = __decorate([
|
|
47416
47494
|
ObjectType({ description: `Junction table tracking many-to-many relationship between conversation messages and artifact versions, with directionality tracking` })
|
|
@@ -47694,6 +47772,11 @@ __decorate([
|
|
|
47694
47772
|
Field({ nullable: true, description: `Description of the attachment providing context about its content and purpose.` }),
|
|
47695
47773
|
__metadata("design:type", String)
|
|
47696
47774
|
], MJConversationDetailAttachment_.prototype, "Description", void 0);
|
|
47775
|
+
__decorate([
|
|
47776
|
+
Field({ nullable: true, description: `Foreign key to the ArtifactVersion created alongside this attachment by the storage-unification path. When set, the agent resolver routes via the artifact path (manifest + tool dispatch) and skips inline embedding of the attachment to avoid double-processing. NULL for pre-v5.35 attachment rows authored before storage unification.` }),
|
|
47777
|
+
MaxLength(36),
|
|
47778
|
+
__metadata("design:type", String)
|
|
47779
|
+
], MJConversationDetailAttachment_.prototype, "ArtifactVersionID", void 0);
|
|
47697
47780
|
__decorate([
|
|
47698
47781
|
Field(),
|
|
47699
47782
|
__metadata("design:type", String)
|
|
@@ -47708,6 +47791,10 @@ __decorate([
|
|
|
47708
47791
|
MaxLength(500),
|
|
47709
47792
|
__metadata("design:type", String)
|
|
47710
47793
|
], MJConversationDetailAttachment_.prototype, "File", void 0);
|
|
47794
|
+
__decorate([
|
|
47795
|
+
Field(() => Int, { nullable: true }),
|
|
47796
|
+
__metadata("design:type", Number)
|
|
47797
|
+
], MJConversationDetailAttachment_.prototype, "ArtifactVersion", void 0);
|
|
47711
47798
|
MJConversationDetailAttachment_ = __decorate([
|
|
47712
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.` })
|
|
47713
47800
|
], MJConversationDetailAttachment_);
|
|
@@ -47773,6 +47860,10 @@ __decorate([
|
|
|
47773
47860
|
Field({ nullable: true }),
|
|
47774
47861
|
__metadata("design:type", String)
|
|
47775
47862
|
], CreateMJConversationDetailAttachmentInput.prototype, "Description", void 0);
|
|
47863
|
+
__decorate([
|
|
47864
|
+
Field({ nullable: true }),
|
|
47865
|
+
__metadata("design:type", String)
|
|
47866
|
+
], CreateMJConversationDetailAttachmentInput.prototype, "ArtifactVersionID", void 0);
|
|
47776
47867
|
__decorate([
|
|
47777
47868
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
47778
47869
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -47842,6 +47933,10 @@ __decorate([
|
|
|
47842
47933
|
Field({ nullable: true }),
|
|
47843
47934
|
__metadata("design:type", String)
|
|
47844
47935
|
], UpdateMJConversationDetailAttachmentInput.prototype, "Description", void 0);
|
|
47936
|
+
__decorate([
|
|
47937
|
+
Field({ nullable: true }),
|
|
47938
|
+
__metadata("design:type", String)
|
|
47939
|
+
], UpdateMJConversationDetailAttachmentInput.prototype, "ArtifactVersionID", void 0);
|
|
47845
47940
|
__decorate([
|
|
47846
47941
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
47847
47942
|
__metadata("design:type", Array)
|
|
@@ -75530,6 +75625,33 @@ __decorate([
|
|
|
75530
75625
|
Field(),
|
|
75531
75626
|
__metadata("design:type", Date)
|
|
75532
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);
|
|
75533
75655
|
__decorate([
|
|
75534
75656
|
Field(),
|
|
75535
75657
|
MaxLength(255),
|
|
@@ -75550,6 +75672,16 @@ __decorate([
|
|
|
75550
75672
|
MaxLength(255),
|
|
75551
75673
|
__metadata("design:type", String)
|
|
75552
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);
|
|
75553
75685
|
__decorate([
|
|
75554
75686
|
Field(() => [MJDuplicateRun_]),
|
|
75555
75687
|
__metadata("design:type", Array)
|
|
@@ -75607,6 +75739,30 @@ __decorate([
|
|
|
75607
75739
|
Field({ nullable: true }),
|
|
75608
75740
|
__metadata("design:type", String)
|
|
75609
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);
|
|
75610
75766
|
__decorate([
|
|
75611
75767
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
75612
75768
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -75652,6 +75808,30 @@ __decorate([
|
|
|
75652
75808
|
Field({ nullable: true }),
|
|
75653
75809
|
__metadata("design:type", String)
|
|
75654
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);
|
|
75655
75835
|
__decorate([
|
|
75656
75836
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
75657
75837
|
__metadata("design:type", Array)
|
|
@@ -88654,7 +88834,7 @@ __decorate([
|
|
|
88654
88834
|
__metadata("design:type", Date)
|
|
88655
88835
|
], MJRecordGeoCode_.prototype, "GeocodedAt", void 0);
|
|
88656
88836
|
__decorate([
|
|
88657
|
-
Field({ nullable: true, description: `
|
|
88837
|
+
Field({ nullable: true, description: `Source that produced this geocode. One of: google, geocodio, here, reference_data, manual, ip_geolocation, native, reverse.` }),
|
|
88658
88838
|
MaxLength(30),
|
|
88659
88839
|
__metadata("design:type", String)
|
|
88660
88840
|
], MJRecordGeoCode_.prototype, "GeocodingSource", void 0);
|
|
@@ -111948,6 +112128,10 @@ __decorate([
|
|
|
111948
112128
|
Field(() => [MJUserViewRun_]),
|
|
111949
112129
|
__metadata("design:type", Array)
|
|
111950
112130
|
], MJUserView_.prototype, "MJUserViewRuns_UserViewIDArray", void 0);
|
|
112131
|
+
__decorate([
|
|
112132
|
+
Field(() => [MJList_]),
|
|
112133
|
+
__metadata("design:type", Array)
|
|
112134
|
+
], MJUserView_.prototype, "MJLists_SourceViewIDArray", void 0);
|
|
111951
112135
|
MJUserView_ = __decorate([
|
|
111952
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.` })
|
|
111953
112137
|
], MJUserView_);
|
|
@@ -112241,6 +112425,14 @@ let MJUserViewResolverBase = class MJUserViewResolverBase extends ResolverBase {
|
|
|
112241
112425
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: User View Runs', rows, this.GetUserFromPayload(userPayload));
|
|
112242
112426
|
return result;
|
|
112243
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
|
+
}
|
|
112244
112436
|
async CreateMJUserView(input, { providers, userPayload }, pubSub) {
|
|
112245
112437
|
const provider = GetReadWriteProvider(providers);
|
|
112246
112438
|
return this.CreateRecord('MJ: User Views', input, provider, userPayload, pubSub);
|
|
@@ -112326,6 +112518,15 @@ __decorate([
|
|
|
112326
112518
|
__metadata("design:paramtypes", [MJUserView_, Object, PubSubEngine]),
|
|
112327
112519
|
__metadata("design:returntype", Promise)
|
|
112328
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);
|
|
112329
112530
|
__decorate([
|
|
112330
112531
|
Mutation(() => MJUserView_),
|
|
112331
112532
|
__param(0, Arg('input', () => CreateMJUserViewInput)),
|
|
@@ -112853,6 +113054,10 @@ __decorate([
|
|
|
112853
113054
|
Field(() => [MJAIAgent_]),
|
|
112854
113055
|
__metadata("design:type", Array)
|
|
112855
113056
|
], MJUser_.prototype, "MJAIAgents_OwnerUserIDArray", void 0);
|
|
113057
|
+
__decorate([
|
|
113058
|
+
Field(() => [MJList_]),
|
|
113059
|
+
__metadata("design:type", Array)
|
|
113060
|
+
], MJUser_.prototype, "MJLists_LastRefreshedByUserIDArray", void 0);
|
|
112856
113061
|
MJUser_ = __decorate([
|
|
112857
113062
|
ObjectType({ description: `A list of all users who have or had access to the system` })
|
|
112858
113063
|
], MJUser_);
|
|
@@ -113834,6 +114039,14 @@ let MJUserResolverBase = class MJUserResolverBase extends ResolverBase {
|
|
|
113834
114039
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agents', rows, this.GetUserFromPayload(userPayload));
|
|
113835
114040
|
return result;
|
|
113836
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
|
+
}
|
|
113837
114050
|
async CreateMJUser(input, { providers, userPayload }, pubSub) {
|
|
113838
114051
|
const provider = GetReadWriteProvider(providers);
|
|
113839
114052
|
return this.CreateRecord('MJ: Users', input, provider, userPayload, pubSub);
|
|
@@ -114756,6 +114969,15 @@ __decorate([
|
|
|
114756
114969
|
__metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
|
|
114757
114970
|
__metadata("design:returntype", Promise)
|
|
114758
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);
|
|
114759
114981
|
__decorate([
|
|
114760
114982
|
Mutation(() => MJUser_),
|
|
114761
114983
|
__param(0, Arg('input', () => CreateMJUserInput)),
|