@memberjunction/server 5.20.0 → 5.22.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.
Files changed (34) hide show
  1. package/README.md +9 -0
  2. package/dist/agents/skip-sdk.d.ts.map +1 -1
  3. package/dist/agents/skip-sdk.js +32 -2
  4. package/dist/agents/skip-sdk.js.map +1 -1
  5. package/dist/generated/generated.d.ts +27 -0
  6. package/dist/generated/generated.d.ts.map +1 -1
  7. package/dist/generated/generated.js +125 -0
  8. package/dist/generated/generated.js.map +1 -1
  9. package/dist/index.d.ts +3 -0
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +3 -0
  12. package/dist/index.js.map +1 -1
  13. package/dist/resolvers/PipelineProgressResolver.d.ts +33 -0
  14. package/dist/resolvers/PipelineProgressResolver.d.ts.map +1 -0
  15. package/dist/resolvers/PipelineProgressResolver.js +138 -0
  16. package/dist/resolvers/PipelineProgressResolver.js.map +1 -0
  17. package/dist/resolvers/RunAIAgentResolver.js +4 -4
  18. package/dist/resolvers/RunAIAgentResolver.js.map +1 -1
  19. package/dist/resolvers/SearchKnowledgeResolver.d.ts +85 -0
  20. package/dist/resolvers/SearchKnowledgeResolver.d.ts.map +1 -0
  21. package/dist/resolvers/SearchKnowledgeResolver.js +587 -0
  22. package/dist/resolvers/SearchKnowledgeResolver.js.map +1 -0
  23. package/dist/resolvers/VectorizeEntityResolver.d.ts +21 -0
  24. package/dist/resolvers/VectorizeEntityResolver.d.ts.map +1 -0
  25. package/dist/resolvers/VectorizeEntityResolver.js +134 -0
  26. package/dist/resolvers/VectorizeEntityResolver.js.map +1 -0
  27. package/package.json +63 -62
  28. package/src/agents/skip-sdk.ts +31 -2
  29. package/src/generated/generated.ts +92 -0
  30. package/src/index.ts +3 -0
  31. package/src/resolvers/PipelineProgressResolver.ts +107 -0
  32. package/src/resolvers/RunAIAgentResolver.ts +4 -4
  33. package/src/resolvers/SearchKnowledgeResolver.ts +614 -0
  34. package/src/resolvers/VectorizeEntityResolver.ts +123 -0
@@ -21732,6 +21732,10 @@ __decorate([
21732
21732
  MaxLength(20),
21733
21733
  __metadata("design:type", String)
21734
21734
  ], MJAIPrompt_.prototype, "PrefillFallbackMode", void 0);
21735
+ __decorate([
21736
+ Field(() => Boolean, { description: `Only applies when SelectionStrategy is Specific. When 0 (default), if none of the explicitly configured AIPromptModel entries have valid API credentials the system automatically falls back to Default/ByPower model selection across all active models matching the prompt AIModelTypeID. When 1, the system will hard-fail with an error instead of falling back, ensuring only the explicitly configured models are ever used.` }),
21737
+ __metadata("design:type", Boolean)
21738
+ ], MJAIPrompt_.prototype, "RequireSpecificModels", void 0);
21735
21739
  __decorate([
21736
21740
  Field(),
21737
21741
  MaxLength(255),
@@ -22031,6 +22035,10 @@ __decorate([
22031
22035
  Field({ nullable: true }),
22032
22036
  __metadata("design:type", String)
22033
22037
  ], CreateMJAIPromptInput.prototype, "PrefillFallbackMode", void 0);
22038
+ __decorate([
22039
+ Field(() => Boolean, { nullable: true }),
22040
+ __metadata("design:type", Boolean)
22041
+ ], CreateMJAIPromptInput.prototype, "RequireSpecificModels", void 0);
22034
22042
  CreateMJAIPromptInput = __decorate([
22035
22043
  InputType()
22036
22044
  ], CreateMJAIPromptInput);
@@ -22244,6 +22252,10 @@ __decorate([
22244
22252
  Field({ nullable: true }),
22245
22253
  __metadata("design:type", String)
22246
22254
  ], UpdateMJAIPromptInput.prototype, "PrefillFallbackMode", void 0);
22255
+ __decorate([
22256
+ Field(() => Boolean, { nullable: true }),
22257
+ __metadata("design:type", Boolean)
22258
+ ], UpdateMJAIPromptInput.prototype, "RequireSpecificModels", void 0);
22247
22259
  __decorate([
22248
22260
  Field(() => [KeyValuePairInput], { nullable: true }),
22249
22261
  __metadata("design:type", Array)
@@ -56666,6 +56678,15 @@ __decorate([
56666
56678
  Field(),
56667
56679
  __metadata("design:type", Date)
56668
56680
  ], MJEntityDocument_.prototype, "_mj__UpdatedAt", void 0);
56681
+ __decorate([
56682
+ Field({ nullable: true, description: `Optional foreign key to the specific Vector Index where this entity document's embeddings should be stored. When specified, the vectorization pipeline will upsert vectors directly to this index rather than auto-creating or looking up an index based on VectorDatabaseID + AIModelID. This enables explicit control over which Pinecone/Weaviate/etc. index is used per entity document, supporting multi-index architectures and shared indexes across entity types.` }),
56683
+ MaxLength(36),
56684
+ __metadata("design:type", String)
56685
+ ], MJEntityDocument_.prototype, "VectorIndexID", void 0);
56686
+ __decorate([
56687
+ Field({ nullable: true, description: `JSON configuration settings for this entity document. Controls vector metadata field inclusion (which fields get stored in the vector index for search result display), large field truncation limits, and future settings like sync scheduling and threshold overrides. NULL means use system defaults.` }),
56688
+ __metadata("design:type", String)
56689
+ ], MJEntityDocument_.prototype, "Configuration", void 0);
56669
56690
  __decorate([
56670
56691
  Field(),
56671
56692
  MaxLength(100),
@@ -56691,6 +56712,11 @@ __decorate([
56691
56712
  MaxLength(50),
56692
56713
  __metadata("design:type", String)
56693
56714
  ], MJEntityDocument_.prototype, "AIModel", void 0);
56715
+ __decorate([
56716
+ Field({ nullable: true }),
56717
+ MaxLength(255),
56718
+ __metadata("design:type", String)
56719
+ ], MJEntityDocument_.prototype, "VectorIndex", void 0);
56694
56720
  __decorate([
56695
56721
  Field(() => [MJEntityDocumentRun_]),
56696
56722
  __metadata("design:type", Array)
@@ -56752,6 +56778,14 @@ __decorate([
56752
56778
  Field(() => Float, { nullable: true }),
56753
56779
  __metadata("design:type", Number)
56754
56780
  ], CreateMJEntityDocumentInput.prototype, "AbsoluteMatchThreshold", void 0);
56781
+ __decorate([
56782
+ Field({ nullable: true }),
56783
+ __metadata("design:type", String)
56784
+ ], CreateMJEntityDocumentInput.prototype, "VectorIndexID", void 0);
56785
+ __decorate([
56786
+ Field({ nullable: true }),
56787
+ __metadata("design:type", String)
56788
+ ], CreateMJEntityDocumentInput.prototype, "Configuration", void 0);
56755
56789
  CreateMJEntityDocumentInput = __decorate([
56756
56790
  InputType()
56757
56791
  ], CreateMJEntityDocumentInput);
@@ -56801,6 +56835,14 @@ __decorate([
56801
56835
  Field(() => Float, { nullable: true }),
56802
56836
  __metadata("design:type", Number)
56803
56837
  ], UpdateMJEntityDocumentInput.prototype, "AbsoluteMatchThreshold", void 0);
56838
+ __decorate([
56839
+ Field({ nullable: true }),
56840
+ __metadata("design:type", String)
56841
+ ], UpdateMJEntityDocumentInput.prototype, "VectorIndexID", void 0);
56842
+ __decorate([
56843
+ Field({ nullable: true }),
56844
+ __metadata("design:type", String)
56845
+ ], UpdateMJEntityDocumentInput.prototype, "Configuration", void 0);
56804
56846
  __decorate([
56805
56847
  Field(() => [KeyValuePairInput], { nullable: true }),
56806
56848
  __metadata("design:type", Array)
@@ -99364,6 +99406,10 @@ __decorate([
99364
99406
  Field(),
99365
99407
  __metadata("design:type", Date)
99366
99408
  ], MJVectorDatabase_.prototype, "_mj__UpdatedAt", void 0);
99409
+ __decorate([
99410
+ Field({ nullable: true, description: `JSON configuration settings for this vector database provider. Stores provider-specific connection settings like custom host URLs, authentication configuration, timeouts, retry policies, and batch size limits. NULL means use defaults from environment variables or provider defaults.` }),
99411
+ __metadata("design:type", String)
99412
+ ], MJVectorDatabase_.prototype, "Configuration", void 0);
99367
99413
  __decorate([
99368
99414
  Field(() => [MJVectorIndex_]),
99369
99415
  __metadata("design:type", Array)
@@ -99401,6 +99447,10 @@ __decorate([
99401
99447
  Field({ nullable: true }),
99402
99448
  __metadata("design:type", String)
99403
99449
  ], CreateMJVectorDatabaseInput.prototype, "ClassKey", void 0);
99450
+ __decorate([
99451
+ Field({ nullable: true }),
99452
+ __metadata("design:type", String)
99453
+ ], CreateMJVectorDatabaseInput.prototype, "Configuration", void 0);
99404
99454
  CreateMJVectorDatabaseInput = __decorate([
99405
99455
  InputType()
99406
99456
  ], CreateMJVectorDatabaseInput);
@@ -99430,6 +99480,10 @@ __decorate([
99430
99480
  Field({ nullable: true }),
99431
99481
  __metadata("design:type", String)
99432
99482
  ], UpdateMJVectorDatabaseInput.prototype, "ClassKey", void 0);
99483
+ __decorate([
99484
+ Field({ nullable: true }),
99485
+ __metadata("design:type", String)
99486
+ ], UpdateMJVectorDatabaseInput.prototype, "Configuration", void 0);
99433
99487
  __decorate([
99434
99488
  Field(() => [KeyValuePairInput], { nullable: true }),
99435
99489
  __metadata("design:type", Array)
@@ -99650,6 +99704,24 @@ __decorate([
99650
99704
  Field(),
99651
99705
  __metadata("design:type", Date)
99652
99706
  ], MJVectorIndex_.prototype, "_mj__UpdatedAt", void 0);
99707
+ __decorate([
99708
+ Field({ nullable: true, description: `The provider's native identifier for this index. For Pinecone this is the index name; for other providers it may be a separate UUID or identifier. Used for syncing operations between MJ metadata and the remote vector database.` }),
99709
+ MaxLength(500),
99710
+ __metadata("design:type", String)
99711
+ ], MJVectorIndex_.prototype, "ExternalID", void 0);
99712
+ __decorate([
99713
+ Field(() => Int, { nullable: true, description: `The number of dimensions for vectors stored in this index. Determined by the embedding model (e.g., 1536 for text-embedding-3-small, 768 for all-mpnet-base-v2). Set automatically when the index is created via the vector database provider.` }),
99714
+ __metadata("design:type", Number)
99715
+ ], MJVectorIndex_.prototype, "Dimensions", void 0);
99716
+ __decorate([
99717
+ Field({ nullable: true, description: `The distance metric used for similarity calculations in this index. Common values: cosine (default, measures angular similarity), euclidean (L2 distance), dotproduct (inner product). Must match what the vector database provider was configured with.` }),
99718
+ MaxLength(50),
99719
+ __metadata("design:type", String)
99720
+ ], MJVectorIndex_.prototype, "Metric", void 0);
99721
+ __decorate([
99722
+ Field({ nullable: true, description: `JSON object containing provider-specific configuration for this index. For Pinecone serverless: {"cloud":"aws","region":"us-east-1"}. For pod-based: {"environment":"us-east1-gcp","podType":"p1.x1","replicas":1}. Stored as a flexible JSON bag to support any provider without schema changes.` }),
99723
+ __metadata("design:type", String)
99724
+ ], MJVectorIndex_.prototype, "ProviderConfig", void 0);
99653
99725
  __decorate([
99654
99726
  Field(),
99655
99727
  MaxLength(100),
@@ -99664,6 +99736,10 @@ __decorate([
99664
99736
  Field(() => [MJEntityRecordDocument_]),
99665
99737
  __metadata("design:type", Array)
99666
99738
  ], MJVectorIndex_.prototype, "MJEntityRecordDocuments_VectorIndexIDArray", void 0);
99739
+ __decorate([
99740
+ Field(() => [MJEntityDocument_]),
99741
+ __metadata("design:type", Array)
99742
+ ], MJVectorIndex_.prototype, "MJEntityDocuments_VectorIndexIDArray", void 0);
99667
99743
  MJVectorIndex_ = __decorate([
99668
99744
  ObjectType({ description: `Defines vector indexes within a given Vector Database.` })
99669
99745
  ], MJVectorIndex_);
@@ -99693,6 +99769,22 @@ __decorate([
99693
99769
  Field({ nullable: true }),
99694
99770
  __metadata("design:type", String)
99695
99771
  ], CreateMJVectorIndexInput.prototype, "EmbeddingModelID", void 0);
99772
+ __decorate([
99773
+ Field({ nullable: true }),
99774
+ __metadata("design:type", String)
99775
+ ], CreateMJVectorIndexInput.prototype, "ExternalID", void 0);
99776
+ __decorate([
99777
+ Field(() => Int, { nullable: true }),
99778
+ __metadata("design:type", Number)
99779
+ ], CreateMJVectorIndexInput.prototype, "Dimensions", void 0);
99780
+ __decorate([
99781
+ Field({ nullable: true }),
99782
+ __metadata("design:type", String)
99783
+ ], CreateMJVectorIndexInput.prototype, "Metric", void 0);
99784
+ __decorate([
99785
+ Field({ nullable: true }),
99786
+ __metadata("design:type", String)
99787
+ ], CreateMJVectorIndexInput.prototype, "ProviderConfig", void 0);
99696
99788
  CreateMJVectorIndexInput = __decorate([
99697
99789
  InputType()
99698
99790
  ], CreateMJVectorIndexInput);
@@ -99722,6 +99814,22 @@ __decorate([
99722
99814
  Field({ nullable: true }),
99723
99815
  __metadata("design:type", String)
99724
99816
  ], UpdateMJVectorIndexInput.prototype, "EmbeddingModelID", void 0);
99817
+ __decorate([
99818
+ Field({ nullable: true }),
99819
+ __metadata("design:type", String)
99820
+ ], UpdateMJVectorIndexInput.prototype, "ExternalID", void 0);
99821
+ __decorate([
99822
+ Field(() => Int, { nullable: true }),
99823
+ __metadata("design:type", Number)
99824
+ ], UpdateMJVectorIndexInput.prototype, "Dimensions", void 0);
99825
+ __decorate([
99826
+ Field({ nullable: true }),
99827
+ __metadata("design:type", String)
99828
+ ], UpdateMJVectorIndexInput.prototype, "Metric", void 0);
99829
+ __decorate([
99830
+ Field({ nullable: true }),
99831
+ __metadata("design:type", String)
99832
+ ], UpdateMJVectorIndexInput.prototype, "ProviderConfig", void 0);
99725
99833
  __decorate([
99726
99834
  Field(() => [KeyValuePairInput], { nullable: true }),
99727
99835
  __metadata("design:type", Array)
@@ -99797,6 +99905,14 @@ let MJVectorIndexResolver = class MJVectorIndexResolver extends ResolverBase {
99797
99905
  const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Record Documents', rows, this.GetUserFromPayload(userPayload));
99798
99906
  return result;
99799
99907
  }
99908
+ async MJEntityDocuments_VectorIndexIDArray(mjvectorindex_, { userPayload, providers }, pubSub) {
99909
+ this.CheckUserReadPermissions('MJ: Entity Documents', userPayload);
99910
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
99911
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityDocuments')} WHERE ${provider.QuoteIdentifier('VectorIndexID')}='${mjvectorindex_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Documents', userPayload, EntityPermissionType.Read, 'AND');
99912
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
99913
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Documents', rows, this.GetUserFromPayload(userPayload));
99914
+ return result;
99915
+ }
99800
99916
  async CreateMJVectorIndex(input, { providers, userPayload }, pubSub) {
99801
99917
  const provider = GetReadWriteProvider(providers);
99802
99918
  return this.CreateRecord('MJ: Vector Indexes', input, provider, userPayload, pubSub);
@@ -99856,6 +99972,15 @@ __decorate([
99856
99972
  __metadata("design:paramtypes", [MJVectorIndex_, Object, PubSubEngine]),
99857
99973
  __metadata("design:returntype", Promise)
99858
99974
  ], MJVectorIndexResolver.prototype, "MJEntityRecordDocuments_VectorIndexIDArray", null);
99975
+ __decorate([
99976
+ FieldResolver(() => [MJEntityDocument_]),
99977
+ __param(0, Root()),
99978
+ __param(1, Ctx()),
99979
+ __param(2, PubSub()),
99980
+ __metadata("design:type", Function),
99981
+ __metadata("design:paramtypes", [MJVectorIndex_, Object, PubSubEngine]),
99982
+ __metadata("design:returntype", Promise)
99983
+ ], MJVectorIndexResolver.prototype, "MJEntityDocuments_VectorIndexIDArray", null);
99859
99984
  __decorate([
99860
99985
  Mutation(() => MJVectorIndex_),
99861
99986
  __param(0, Arg('input', () => CreateMJVectorIndexInput)),