weave-typescript 0.50.0 → 0.51.1

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 (27) hide show
  1. package/dist/index.d.ts +23 -0
  2. package/dist/index.js +35 -1
  3. package/dist/weaveapi/consolidation/v1/consolidation.pb.d.ts +13 -14
  4. package/dist/weaveapi/consolidation/v1/consolidation.pb.js +62 -74
  5. package/dist/weaveapi/ingestion/v1/ingestion.pb.d.ts +82 -50
  6. package/dist/weaveapi/ingestion/v1/ingestion.pb.js +708 -216
  7. package/dist/weaveapi/ingestion/v1/service.pb.d.ts +50 -7
  8. package/dist/weaveapi/ingestion/v1/service.pb.js +279 -16
  9. package/dist/weaveapi/ingestion/v1/table.pb.d.ts +121 -0
  10. package/dist/weaveapi/ingestion/v1/table.pb.js +1478 -0
  11. package/dist/weaveapi/model/v1/model.pb.d.ts +3 -3
  12. package/dist/weaveapi/model/v1/model.pb.js +33 -33
  13. package/dist/weaveapi/model/v1/service.pb.d.ts +3 -3
  14. package/dist/weaveapi/model/v1/service.pb.js +33 -33
  15. package/dist/weaveapi/retrieval/v1/retrieval.pb.d.ts +123 -0
  16. package/dist/weaveapi/retrieval/v1/retrieval.pb.js +2096 -113
  17. package/dist/weaveapi/retrieval/v1/service.pb.d.ts +29 -1
  18. package/dist/weaveapi/retrieval/v1/service.pb.js +142 -0
  19. package/dist/weavesql/weavedb/consolidation_sql.d.ts +33 -33
  20. package/dist/weavesql/weavedb/consolidation_sql.js +56 -56
  21. package/dist/weavesql/weavedb/document_table_sql.d.ts +533 -0
  22. package/dist/weavesql/weavedb/document_table_sql.js +1352 -0
  23. package/dist/weavesql/weavedb/ingestion_sql.d.ts +67 -34
  24. package/dist/weavesql/weavedb/ingestion_sql.js +169 -73
  25. package/dist/weavesql/weavedb/retrieval_sql.d.ts +11 -11
  26. package/dist/weavesql/weavedb/retrieval_sql.js +13 -13
  27. package/package.json +1 -1
@@ -624,8 +624,8 @@ exports.searchLeafConceptClustersBySimilarityQuery = `-- name: SearchLeafConcept
624
624
  SELECT
625
625
  cc.id,
626
626
  cc.organization_id,
627
- cc.realm_kind,
628
- cc.realm_key,
627
+ cc.scope_kind,
628
+ cc.scope_key,
629
629
  cc.name,
630
630
  cc.description,
631
631
  cc.knowledge_type,
@@ -645,8 +645,8 @@ CROSS JOIN LATERAL (
645
645
  ) AS score
646
646
  ) similarity
647
647
  WHERE cc.organization_id = $2
648
- AND cc.realm_kind = $3
649
- AND cc.realm_key = $4
648
+ AND cc.scope_kind = $3
649
+ AND cc.scope_key = $4
650
650
  AND cc.level = 0
651
651
  AND cc.embedding IS NOT NULL
652
652
  AND similarity.score >= $5::double precision
@@ -655,15 +655,15 @@ LIMIT $6`;
655
655
  async function searchLeafConceptClustersBySimilarity(client, args) {
656
656
  const result = await client.query({
657
657
  text: exports.searchLeafConceptClustersBySimilarityQuery,
658
- values: [args.queryEmbedding, args.organizationId, args.realmKind, args.realmKey, args.minSimilarity, args.resultLimit],
658
+ values: [args.queryEmbedding, args.organizationId, args.scopeKind, args.scopeKey, args.minSimilarity, args.resultLimit],
659
659
  rowMode: "array"
660
660
  });
661
661
  return result.rows.map(row => {
662
662
  return {
663
663
  id: row[0],
664
664
  organizationId: row[1],
665
- realmKind: row[2],
666
- realmKey: row[3],
665
+ scopeKind: row[2],
666
+ scopeKey: row[3],
667
667
  name: row[4],
668
668
  description: row[5],
669
669
  knowledgeType: row[6],
@@ -711,8 +711,8 @@ LEFT JOIN LATERAL (
711
711
  WHERE te.thread_id = t.id
712
712
  ) entity_data ON TRUE
713
713
  WHERE cc.organization_id = $2
714
- AND cc.realm_kind = $3
715
- AND cc.realm_key = $4
714
+ AND cc.scope_kind = $3
715
+ AND cc.scope_key = $4
716
716
  AND cc.level = 0
717
717
  AND cc.embedding IS NOT NULL
718
718
  AND t.retrieval_status = 'THREAD_RETRIEVAL_STATUS_APPROVED'
@@ -722,7 +722,7 @@ LIMIT $6`;
722
722
  async function searchConceptClusterThreadsBySimilarity(client, args) {
723
723
  const result = await client.query({
724
724
  text: exports.searchConceptClusterThreadsBySimilarityQuery,
725
- values: [args.queryEmbedding, args.organizationId, args.realmKind, args.realmKey, args.minSimilarity, args.resultLimit],
725
+ values: [args.queryEmbedding, args.organizationId, args.scopeKind, args.scopeKey, args.minSimilarity, args.resultLimit],
726
726
  rowMode: "array"
727
727
  });
728
728
  return result.rows.map(row => {
@@ -778,8 +778,8 @@ LEFT JOIN LATERAL (
778
778
  WHERE te.thread_id = t.id
779
779
  ) entity_data ON TRUE
780
780
  WHERE cc.organization_id = $2
781
- AND cc.realm_kind = $3
782
- AND cc.realm_key = $4
781
+ AND cc.scope_kind = $3
782
+ AND cc.scope_key = $4
783
783
  AND cc.level = 0
784
784
  AND cc.embedding IS NOT NULL
785
785
  AND t.retrieval_status = 'THREAD_RETRIEVAL_STATUS_APPROVED'
@@ -819,7 +819,7 @@ LIMIT $7`;
819
819
  async function searchConceptClusterThreadsBySimilarityAndUserPermissions(client, args) {
820
820
  const result = await client.query({
821
821
  text: exports.searchConceptClusterThreadsBySimilarityAndUserPermissionsQuery,
822
- values: [args.queryEmbedding, args.organizationId, args.realmKind, args.realmKey, args.minSimilarity, args.actingUserId, args.resultLimit],
822
+ values: [args.queryEmbedding, args.organizationId, args.scopeKind, args.scopeKey, args.minSimilarity, args.actingUserId, args.resultLimit],
823
823
  rowMode: "array"
824
824
  });
825
825
  return result.rows.map(row => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "weave-typescript",
3
- "version": "0.50.0",
3
+ "version": "0.51.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [