@memberjunction/server 5.21.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 +24 -0
  6. package/dist/generated/generated.d.ts.map +1 -1
  7. package/dist/generated/generated.js +113 -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 +83 -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
@@ -56678,6 +56678,15 @@ __decorate([
56678
56678
  Field(),
56679
56679
  __metadata("design:type", Date)
56680
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);
56681
56690
  __decorate([
56682
56691
  Field(),
56683
56692
  MaxLength(100),
@@ -56703,6 +56712,11 @@ __decorate([
56703
56712
  MaxLength(50),
56704
56713
  __metadata("design:type", String)
56705
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);
56706
56720
  __decorate([
56707
56721
  Field(() => [MJEntityDocumentRun_]),
56708
56722
  __metadata("design:type", Array)
@@ -56764,6 +56778,14 @@ __decorate([
56764
56778
  Field(() => Float, { nullable: true }),
56765
56779
  __metadata("design:type", Number)
56766
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);
56767
56789
  CreateMJEntityDocumentInput = __decorate([
56768
56790
  InputType()
56769
56791
  ], CreateMJEntityDocumentInput);
@@ -56813,6 +56835,14 @@ __decorate([
56813
56835
  Field(() => Float, { nullable: true }),
56814
56836
  __metadata("design:type", Number)
56815
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);
56816
56846
  __decorate([
56817
56847
  Field(() => [KeyValuePairInput], { nullable: true }),
56818
56848
  __metadata("design:type", Array)
@@ -99376,6 +99406,10 @@ __decorate([
99376
99406
  Field(),
99377
99407
  __metadata("design:type", Date)
99378
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);
99379
99413
  __decorate([
99380
99414
  Field(() => [MJVectorIndex_]),
99381
99415
  __metadata("design:type", Array)
@@ -99413,6 +99447,10 @@ __decorate([
99413
99447
  Field({ nullable: true }),
99414
99448
  __metadata("design:type", String)
99415
99449
  ], CreateMJVectorDatabaseInput.prototype, "ClassKey", void 0);
99450
+ __decorate([
99451
+ Field({ nullable: true }),
99452
+ __metadata("design:type", String)
99453
+ ], CreateMJVectorDatabaseInput.prototype, "Configuration", void 0);
99416
99454
  CreateMJVectorDatabaseInput = __decorate([
99417
99455
  InputType()
99418
99456
  ], CreateMJVectorDatabaseInput);
@@ -99442,6 +99480,10 @@ __decorate([
99442
99480
  Field({ nullable: true }),
99443
99481
  __metadata("design:type", String)
99444
99482
  ], UpdateMJVectorDatabaseInput.prototype, "ClassKey", void 0);
99483
+ __decorate([
99484
+ Field({ nullable: true }),
99485
+ __metadata("design:type", String)
99486
+ ], UpdateMJVectorDatabaseInput.prototype, "Configuration", void 0);
99445
99487
  __decorate([
99446
99488
  Field(() => [KeyValuePairInput], { nullable: true }),
99447
99489
  __metadata("design:type", Array)
@@ -99662,6 +99704,24 @@ __decorate([
99662
99704
  Field(),
99663
99705
  __metadata("design:type", Date)
99664
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);
99665
99725
  __decorate([
99666
99726
  Field(),
99667
99727
  MaxLength(100),
@@ -99676,6 +99736,10 @@ __decorate([
99676
99736
  Field(() => [MJEntityRecordDocument_]),
99677
99737
  __metadata("design:type", Array)
99678
99738
  ], MJVectorIndex_.prototype, "MJEntityRecordDocuments_VectorIndexIDArray", void 0);
99739
+ __decorate([
99740
+ Field(() => [MJEntityDocument_]),
99741
+ __metadata("design:type", Array)
99742
+ ], MJVectorIndex_.prototype, "MJEntityDocuments_VectorIndexIDArray", void 0);
99679
99743
  MJVectorIndex_ = __decorate([
99680
99744
  ObjectType({ description: `Defines vector indexes within a given Vector Database.` })
99681
99745
  ], MJVectorIndex_);
@@ -99705,6 +99769,22 @@ __decorate([
99705
99769
  Field({ nullable: true }),
99706
99770
  __metadata("design:type", String)
99707
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);
99708
99788
  CreateMJVectorIndexInput = __decorate([
99709
99789
  InputType()
99710
99790
  ], CreateMJVectorIndexInput);
@@ -99734,6 +99814,22 @@ __decorate([
99734
99814
  Field({ nullable: true }),
99735
99815
  __metadata("design:type", String)
99736
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);
99737
99833
  __decorate([
99738
99834
  Field(() => [KeyValuePairInput], { nullable: true }),
99739
99835
  __metadata("design:type", Array)
@@ -99809,6 +99905,14 @@ let MJVectorIndexResolver = class MJVectorIndexResolver extends ResolverBase {
99809
99905
  const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Record Documents', rows, this.GetUserFromPayload(userPayload));
99810
99906
  return result;
99811
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
+ }
99812
99916
  async CreateMJVectorIndex(input, { providers, userPayload }, pubSub) {
99813
99917
  const provider = GetReadWriteProvider(providers);
99814
99918
  return this.CreateRecord('MJ: Vector Indexes', input, provider, userPayload, pubSub);
@@ -99868,6 +99972,15 @@ __decorate([
99868
99972
  __metadata("design:paramtypes", [MJVectorIndex_, Object, PubSubEngine]),
99869
99973
  __metadata("design:returntype", Promise)
99870
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);
99871
99984
  __decorate([
99872
99985
  Mutation(() => MJVectorIndex_),
99873
99986
  __param(0, Arg('input', () => CreateMJVectorIndexInput)),