weave-typescript 0.29.0 → 0.31.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/weaveapi/auth/v1/auth.pb.d.ts +260 -0
- package/dist/weaveapi/auth/v1/auth.pb.js +3175 -0
- package/dist/weaveapi/auth/v1/service.pb.d.ts +761 -0
- package/dist/weaveapi/auth/v1/service.pb.js +6196 -0
- package/dist/weaveapi/chat/v1/chat.pb.d.ts +11 -0
- package/dist/weaveapi/chat/v1/chat.pb.js +181 -9
- package/dist/weavesql/weavedb/auth_identity_sql.d.ts +295 -0
- package/dist/weavesql/weavedb/auth_identity_sql.js +690 -0
- package/dist/weavesql/weavedb/chat_sql.d.ts +25 -3
- package/dist/weavesql/weavedb/chat_sql.js +36 -7
- package/package.json +2 -2
|
@@ -424,7 +424,7 @@ export interface GetChatArtifactRow {
|
|
|
424
424
|
updatedAt: Date;
|
|
425
425
|
}
|
|
426
426
|
export declare function getChatArtifact(client: Client, args: GetChatArtifactArgs): Promise<GetChatArtifactRow | null>;
|
|
427
|
-
export declare const insertChatArtifactVersionQuery = "-- name: InsertChatArtifactVersion :one\nINSERT INTO weave.chat_artifact_versions (\n id, artifact_id, version, content, created_by_message_id\n) VALUES ($1, $2, $3, $4, $5)\nRETURNING id, artifact_id, version, content, created_by_message_id, created_at";
|
|
427
|
+
export declare const insertChatArtifactVersionQuery = "-- name: InsertChatArtifactVersion :one\nINSERT INTO weave.chat_artifact_versions (\n id, artifact_id, version, content, created_by_message_id\n) VALUES ($1, $2, $3, $4, $5)\nRETURNING id, artifact_id, version, content, created_by_message_id, created_at, document_references";
|
|
428
428
|
export interface InsertChatArtifactVersionArgs {
|
|
429
429
|
id: string;
|
|
430
430
|
artifactId: string;
|
|
@@ -439,9 +439,29 @@ export interface InsertChatArtifactVersionRow {
|
|
|
439
439
|
content: string;
|
|
440
440
|
createdByMessageId: string;
|
|
441
441
|
createdAt: Date;
|
|
442
|
+
documentReferences: any;
|
|
442
443
|
}
|
|
443
444
|
export declare function insertChatArtifactVersion(client: Client, args: InsertChatArtifactVersionArgs): Promise<InsertChatArtifactVersionRow | null>;
|
|
444
|
-
export declare const
|
|
445
|
+
export declare const insertChatArtifactVersionWithDocumentReferencesQuery = "-- name: InsertChatArtifactVersionWithDocumentReferences :one\nINSERT INTO weave.chat_artifact_versions (\n id, artifact_id, version, content, created_by_message_id, document_references\n) VALUES ($1, $2, $3, $4, $5, $6)\nRETURNING id, artifact_id, version, content, created_by_message_id, created_at, document_references";
|
|
446
|
+
export interface InsertChatArtifactVersionWithDocumentReferencesArgs {
|
|
447
|
+
id: string;
|
|
448
|
+
artifactId: string;
|
|
449
|
+
version: number;
|
|
450
|
+
content: string;
|
|
451
|
+
createdByMessageId: string;
|
|
452
|
+
documentReferences: any;
|
|
453
|
+
}
|
|
454
|
+
export interface InsertChatArtifactVersionWithDocumentReferencesRow {
|
|
455
|
+
id: string;
|
|
456
|
+
artifactId: string;
|
|
457
|
+
version: number;
|
|
458
|
+
content: string;
|
|
459
|
+
createdByMessageId: string;
|
|
460
|
+
createdAt: Date;
|
|
461
|
+
documentReferences: any;
|
|
462
|
+
}
|
|
463
|
+
export declare function insertChatArtifactVersionWithDocumentReferences(client: Client, args: InsertChatArtifactVersionWithDocumentReferencesArgs): Promise<InsertChatArtifactVersionWithDocumentReferencesRow | null>;
|
|
464
|
+
export declare const getChatArtifactVersionQuery = "-- name: GetChatArtifactVersion :one\nSELECT id, artifact_id, version, content, created_by_message_id, created_at, document_references FROM weave.chat_artifact_versions\nWHERE artifact_id = $1 AND version = $2";
|
|
445
465
|
export interface GetChatArtifactVersionArgs {
|
|
446
466
|
artifactId: string;
|
|
447
467
|
version: number;
|
|
@@ -453,9 +473,10 @@ export interface GetChatArtifactVersionRow {
|
|
|
453
473
|
content: string;
|
|
454
474
|
createdByMessageId: string;
|
|
455
475
|
createdAt: Date;
|
|
476
|
+
documentReferences: any;
|
|
456
477
|
}
|
|
457
478
|
export declare function getChatArtifactVersion(client: Client, args: GetChatArtifactVersionArgs): Promise<GetChatArtifactVersionRow | null>;
|
|
458
|
-
export declare const listChatArtifactVersionsQuery = "-- name: ListChatArtifactVersions :many\nSELECT id, artifact_id, version, content, created_by_message_id, created_at FROM weave.chat_artifact_versions\nWHERE artifact_id = $1\nORDER BY version";
|
|
479
|
+
export declare const listChatArtifactVersionsQuery = "-- name: ListChatArtifactVersions :many\nSELECT id, artifact_id, version, content, created_by_message_id, created_at, document_references FROM weave.chat_artifact_versions\nWHERE artifact_id = $1\nORDER BY version";
|
|
459
480
|
export interface ListChatArtifactVersionsArgs {
|
|
460
481
|
artifactId: string;
|
|
461
482
|
}
|
|
@@ -466,6 +487,7 @@ export interface ListChatArtifactVersionsRow {
|
|
|
466
487
|
content: string;
|
|
467
488
|
createdByMessageId: string;
|
|
468
489
|
createdAt: Date;
|
|
490
|
+
documentReferences: any;
|
|
469
491
|
}
|
|
470
492
|
export declare function listChatArtifactVersions(client: Client, args: ListChatArtifactVersionsArgs): Promise<ListChatArtifactVersionsRow[]>;
|
|
471
493
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.listChatArtifactVersionsQuery = exports.getChatArtifactVersionQuery = exports.insertChatArtifactVersionQuery = exports.getChatArtifactQuery = exports.listChatArtifactsForSessionQuery = exports.bumpChatArtifactVersionQuery = exports.createChatArtifactQuery = exports.clearOrganizationChatSettingsDefaultIfMatchesQuery = exports.getOrganizationChatSettingsQuery = exports.upsertOrganizationChatSettingsQuery = exports.getOrganizationApprovedModelQuery = exports.listOrganizationApprovedModelsQuery = exports.deleteOrganizationApprovedModelQuery = exports.createOrganizationApprovedModelQuery = exports.completeChatMessageQuery = exports.updateChatMessageToolCallStateQuery = exports.listChatMessagesForSessionQuery = exports.getChatMessageQuery = exports.insertChatMessageQuery = exports.listProjectsForChatSessionQuery = exports.detachProjectFromChatSessionQuery = exports.attachProjectToChatSessionQuery = exports.softDeleteChatSessionQuery = exports.touchChatSessionLastMessageQuery = exports.updateChatSessionTitleQuery = exports.updateChatSessionModelQuery = exports.listChatSessionsForUserByProjectQuery = exports.listChatSessionsForUserQuery = exports.getChatSessionQuery = exports.createChatSessionQuery = void 0;
|
|
3
|
+
exports.listChatArtifactVersionsQuery = exports.getChatArtifactVersionQuery = exports.insertChatArtifactVersionWithDocumentReferencesQuery = exports.insertChatArtifactVersionQuery = exports.getChatArtifactQuery = exports.listChatArtifactsForSessionQuery = exports.bumpChatArtifactVersionQuery = exports.createChatArtifactQuery = exports.clearOrganizationChatSettingsDefaultIfMatchesQuery = exports.getOrganizationChatSettingsQuery = exports.upsertOrganizationChatSettingsQuery = exports.getOrganizationApprovedModelQuery = exports.listOrganizationApprovedModelsQuery = exports.deleteOrganizationApprovedModelQuery = exports.createOrganizationApprovedModelQuery = exports.completeChatMessageQuery = exports.updateChatMessageToolCallStateQuery = exports.listChatMessagesForSessionQuery = exports.getChatMessageQuery = exports.insertChatMessageQuery = exports.listProjectsForChatSessionQuery = exports.detachProjectFromChatSessionQuery = exports.attachProjectToChatSessionQuery = exports.softDeleteChatSessionQuery = exports.touchChatSessionLastMessageQuery = exports.updateChatSessionTitleQuery = exports.updateChatSessionModelQuery = exports.listChatSessionsForUserByProjectQuery = exports.listChatSessionsForUserQuery = exports.getChatSessionQuery = exports.createChatSessionQuery = void 0;
|
|
4
4
|
exports.createChatSession = createChatSession;
|
|
5
5
|
exports.getChatSession = getChatSession;
|
|
6
6
|
exports.listChatSessionsForUser = listChatSessionsForUser;
|
|
@@ -29,6 +29,7 @@ exports.bumpChatArtifactVersion = bumpChatArtifactVersion;
|
|
|
29
29
|
exports.listChatArtifactsForSession = listChatArtifactsForSession;
|
|
30
30
|
exports.getChatArtifact = getChatArtifact;
|
|
31
31
|
exports.insertChatArtifactVersion = insertChatArtifactVersion;
|
|
32
|
+
exports.insertChatArtifactVersionWithDocumentReferences = insertChatArtifactVersionWithDocumentReferences;
|
|
32
33
|
exports.getChatArtifactVersion = getChatArtifactVersion;
|
|
33
34
|
exports.listChatArtifactVersions = listChatArtifactVersions;
|
|
34
35
|
exports.createChatSessionQuery = `-- name: CreateChatSession :one
|
|
@@ -677,7 +678,7 @@ exports.insertChatArtifactVersionQuery = `-- name: InsertChatArtifactVersion :on
|
|
|
677
678
|
INSERT INTO weave.chat_artifact_versions (
|
|
678
679
|
id, artifact_id, version, content, created_by_message_id
|
|
679
680
|
) VALUES ($1, $2, $3, $4, $5)
|
|
680
|
-
RETURNING id, artifact_id, version, content, created_by_message_id, created_at`;
|
|
681
|
+
RETURNING id, artifact_id, version, content, created_by_message_id, created_at, document_references`;
|
|
681
682
|
async function insertChatArtifactVersion(client, args) {
|
|
682
683
|
const result = await client.query({
|
|
683
684
|
text: exports.insertChatArtifactVersionQuery,
|
|
@@ -694,11 +695,37 @@ async function insertChatArtifactVersion(client, args) {
|
|
|
694
695
|
version: row[2],
|
|
695
696
|
content: row[3],
|
|
696
697
|
createdByMessageId: row[4],
|
|
697
|
-
createdAt: row[5]
|
|
698
|
+
createdAt: row[5],
|
|
699
|
+
documentReferences: row[6]
|
|
700
|
+
};
|
|
701
|
+
}
|
|
702
|
+
exports.insertChatArtifactVersionWithDocumentReferencesQuery = `-- name: InsertChatArtifactVersionWithDocumentReferences :one
|
|
703
|
+
INSERT INTO weave.chat_artifact_versions (
|
|
704
|
+
id, artifact_id, version, content, created_by_message_id, document_references
|
|
705
|
+
) VALUES ($1, $2, $3, $4, $5, $6)
|
|
706
|
+
RETURNING id, artifact_id, version, content, created_by_message_id, created_at, document_references`;
|
|
707
|
+
async function insertChatArtifactVersionWithDocumentReferences(client, args) {
|
|
708
|
+
const result = await client.query({
|
|
709
|
+
text: exports.insertChatArtifactVersionWithDocumentReferencesQuery,
|
|
710
|
+
values: [args.id, args.artifactId, args.version, args.content, args.createdByMessageId, args.documentReferences],
|
|
711
|
+
rowMode: "array"
|
|
712
|
+
});
|
|
713
|
+
if (result.rows.length !== 1) {
|
|
714
|
+
return null;
|
|
715
|
+
}
|
|
716
|
+
const row = result.rows[0];
|
|
717
|
+
return {
|
|
718
|
+
id: row[0],
|
|
719
|
+
artifactId: row[1],
|
|
720
|
+
version: row[2],
|
|
721
|
+
content: row[3],
|
|
722
|
+
createdByMessageId: row[4],
|
|
723
|
+
createdAt: row[5],
|
|
724
|
+
documentReferences: row[6]
|
|
698
725
|
};
|
|
699
726
|
}
|
|
700
727
|
exports.getChatArtifactVersionQuery = `-- name: GetChatArtifactVersion :one
|
|
701
|
-
SELECT id, artifact_id, version, content, created_by_message_id, created_at FROM weave.chat_artifact_versions
|
|
728
|
+
SELECT id, artifact_id, version, content, created_by_message_id, created_at, document_references FROM weave.chat_artifact_versions
|
|
702
729
|
WHERE artifact_id = $1 AND version = $2`;
|
|
703
730
|
async function getChatArtifactVersion(client, args) {
|
|
704
731
|
const result = await client.query({
|
|
@@ -716,11 +743,12 @@ async function getChatArtifactVersion(client, args) {
|
|
|
716
743
|
version: row[2],
|
|
717
744
|
content: row[3],
|
|
718
745
|
createdByMessageId: row[4],
|
|
719
|
-
createdAt: row[5]
|
|
746
|
+
createdAt: row[5],
|
|
747
|
+
documentReferences: row[6]
|
|
720
748
|
};
|
|
721
749
|
}
|
|
722
750
|
exports.listChatArtifactVersionsQuery = `-- name: ListChatArtifactVersions :many
|
|
723
|
-
SELECT id, artifact_id, version, content, created_by_message_id, created_at FROM weave.chat_artifact_versions
|
|
751
|
+
SELECT id, artifact_id, version, content, created_by_message_id, created_at, document_references FROM weave.chat_artifact_versions
|
|
724
752
|
WHERE artifact_id = $1
|
|
725
753
|
ORDER BY version`;
|
|
726
754
|
async function listChatArtifactVersions(client, args) {
|
|
@@ -736,7 +764,8 @@ async function listChatArtifactVersions(client, args) {
|
|
|
736
764
|
version: row[2],
|
|
737
765
|
content: row[3],
|
|
738
766
|
createdByMessageId: row[4],
|
|
739
|
-
createdAt: row[5]
|
|
767
|
+
createdAt: row[5],
|
|
768
|
+
documentReferences: row[6]
|
|
740
769
|
};
|
|
741
770
|
});
|
|
742
771
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weave-typescript",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^25.2.0",
|
|
33
33
|
"@types/pg": "^8.15.5",
|
|
34
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
34
|
+
"@typescript/native-preview": "7.0.0-dev.20260426.1"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"test": "node tools/sqlcgen.test.js",
|