weave-typescript 0.14.0 → 0.16.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/atc/v1/service.pb.d.ts +24 -0
- package/dist/weaveapi/atc/v1/service.pb.js +163 -1
- package/dist/weaveapi/project/v1/project.pb.d.ts +2 -0
- package/dist/weaveapi/project/v1/project.pb.js +27 -1
- package/dist/weaveapi/provider/v1/provider.pb.d.ts +123 -0
- package/dist/weaveapi/provider/v1/provider.pb.js +914 -0
- package/dist/weaveapi/provider/v1/service.pb.d.ts +198 -0
- package/dist/weaveapi/provider/v1/service.pb.js +1569 -0
- package/dist/weaveapi/task/v1/service.pb.d.ts +1 -0
- package/dist/weaveapi/task/v1/service.pb.js +21 -1
- package/dist/weaveapi/task/v1/task.pb.d.ts +1 -0
- package/dist/weaveapi/task/v1/task.pb.js +21 -1
- package/dist/weavesql/atcdb/event_sql.d.ts +68 -0
- package/dist/weavesql/atcdb/event_sql.js +143 -1
- package/dist/weavesql/atcdb/run_template_sql.d.ts +122 -0
- package/dist/weavesql/atcdb/run_template_sql.js +197 -0
- package/dist/weavesql/atcdb/snapshot_sql.d.ts +58 -0
- package/dist/weavesql/atcdb/snapshot_sql.js +124 -0
- package/dist/weavesql/atcdb/team_sql.d.ts +111 -0
- package/dist/weavesql/atcdb/team_sql.js +235 -0
- package/dist/weavesql/atcdb/workflow_template_sql.d.ts +122 -0
- package/dist/weavesql/atcdb/workflow_template_sql.js +197 -0
- package/dist/weavesql/weavedb/project_sql.d.ts +53 -5
- package/dist/weavesql/weavedb/project_sql.js +114 -11
- package/dist/weavesql/weavedb/provider_sql.d.ts +162 -0
- package/dist/weavesql/weavedb/provider_sql.js +358 -0
- package/dist/weavesql/weavedb/task_sql.d.ts +51 -4
- package/dist/weavesql/weavedb/task_sql.js +115 -13
- package/package.json +2 -2
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.listProjectActivityQuery = exports.listProjectPermissionsQuery = exports.updateProjectBySlugQuery = exports.listProjectsQuery = exports.getProjectBySlugQuery = exports.getProjectByIDQuery = exports.createProjectQuery = void 0;
|
|
3
|
+
exports.createProjectActivityQuery = exports.listProjectActivityQuery = exports.listProjectPermissionsQuery = exports.updateProjectLifecycleByIDQuery = exports.updateProjectBySlugQuery = exports.listProjectsQuery = exports.getProjectBySlugQuery = exports.getProjectByIDQuery = exports.createProjectQuery = void 0;
|
|
4
4
|
exports.createProject = createProject;
|
|
5
5
|
exports.getProjectByID = getProjectByID;
|
|
6
6
|
exports.getProjectBySlug = getProjectBySlug;
|
|
7
7
|
exports.listProjects = listProjects;
|
|
8
8
|
exports.updateProjectBySlug = updateProjectBySlug;
|
|
9
|
+
exports.updateProjectLifecycleByID = updateProjectLifecycleByID;
|
|
9
10
|
exports.listProjectPermissions = listProjectPermissions;
|
|
10
11
|
exports.listProjectActivity = listProjectActivity;
|
|
12
|
+
exports.createProjectActivity = createProjectActivity;
|
|
11
13
|
exports.createProjectQuery = `-- name: CreateProject :one
|
|
12
14
|
INSERT INTO weave.projects (
|
|
13
15
|
id,
|
|
@@ -62,7 +64,8 @@ RETURNING
|
|
|
62
64
|
source_id,
|
|
63
65
|
source_metadata,
|
|
64
66
|
created_at,
|
|
65
|
-
updated_at
|
|
67
|
+
updated_at,
|
|
68
|
+
first_task_started_at`;
|
|
66
69
|
async function createProject(client, args) {
|
|
67
70
|
const result = await client.query({
|
|
68
71
|
text: exports.createProjectQuery,
|
|
@@ -91,7 +94,8 @@ async function createProject(client, args) {
|
|
|
91
94
|
sourceId: row[14],
|
|
92
95
|
sourceMetadata: row[15],
|
|
93
96
|
createdAt: row[16],
|
|
94
|
-
updatedAt: row[17]
|
|
97
|
+
updatedAt: row[17],
|
|
98
|
+
firstTaskStartedAt: row[18]
|
|
95
99
|
};
|
|
96
100
|
}
|
|
97
101
|
exports.getProjectByIDQuery = `-- name: GetProjectByID :one
|
|
@@ -113,7 +117,8 @@ SELECT
|
|
|
113
117
|
source_id,
|
|
114
118
|
source_metadata,
|
|
115
119
|
created_at,
|
|
116
|
-
updated_at
|
|
120
|
+
updated_at,
|
|
121
|
+
first_task_started_at
|
|
117
122
|
FROM weave.projects
|
|
118
123
|
WHERE organization_id = $1
|
|
119
124
|
AND id = $2`;
|
|
@@ -145,7 +150,8 @@ async function getProjectByID(client, args) {
|
|
|
145
150
|
sourceId: row[14],
|
|
146
151
|
sourceMetadata: row[15],
|
|
147
152
|
createdAt: row[16],
|
|
148
|
-
updatedAt: row[17]
|
|
153
|
+
updatedAt: row[17],
|
|
154
|
+
firstTaskStartedAt: row[18]
|
|
149
155
|
};
|
|
150
156
|
}
|
|
151
157
|
exports.getProjectBySlugQuery = `-- name: GetProjectBySlug :one
|
|
@@ -167,7 +173,8 @@ SELECT
|
|
|
167
173
|
source_id,
|
|
168
174
|
source_metadata,
|
|
169
175
|
created_at,
|
|
170
|
-
updated_at
|
|
176
|
+
updated_at,
|
|
177
|
+
first_task_started_at
|
|
171
178
|
FROM weave.projects
|
|
172
179
|
WHERE organization_id = $1
|
|
173
180
|
AND slug = $2`;
|
|
@@ -199,7 +206,8 @@ async function getProjectBySlug(client, args) {
|
|
|
199
206
|
sourceId: row[14],
|
|
200
207
|
sourceMetadata: row[15],
|
|
201
208
|
createdAt: row[16],
|
|
202
|
-
updatedAt: row[17]
|
|
209
|
+
updatedAt: row[17],
|
|
210
|
+
firstTaskStartedAt: row[18]
|
|
203
211
|
};
|
|
204
212
|
}
|
|
205
213
|
exports.listProjectsQuery = `-- name: ListProjects :many
|
|
@@ -221,7 +229,8 @@ SELECT
|
|
|
221
229
|
source_id,
|
|
222
230
|
source_metadata,
|
|
223
231
|
created_at,
|
|
224
|
-
updated_at
|
|
232
|
+
updated_at,
|
|
233
|
+
first_task_started_at
|
|
225
234
|
FROM weave.projects
|
|
226
235
|
WHERE organization_id = $1
|
|
227
236
|
ORDER BY updated_at DESC, created_at DESC`;
|
|
@@ -250,7 +259,8 @@ async function listProjects(client, args) {
|
|
|
250
259
|
sourceId: row[14],
|
|
251
260
|
sourceMetadata: row[15],
|
|
252
261
|
createdAt: row[16],
|
|
253
|
-
updatedAt: row[17]
|
|
262
|
+
updatedAt: row[17],
|
|
263
|
+
firstTaskStartedAt: row[18]
|
|
254
264
|
};
|
|
255
265
|
});
|
|
256
266
|
}
|
|
@@ -289,7 +299,8 @@ RETURNING
|
|
|
289
299
|
source_id,
|
|
290
300
|
source_metadata,
|
|
291
301
|
created_at,
|
|
292
|
-
updated_at
|
|
302
|
+
updated_at,
|
|
303
|
+
first_task_started_at`;
|
|
293
304
|
async function updateProjectBySlug(client, args) {
|
|
294
305
|
const result = await client.query({
|
|
295
306
|
text: exports.updateProjectBySlugQuery,
|
|
@@ -318,7 +329,68 @@ async function updateProjectBySlug(client, args) {
|
|
|
318
329
|
sourceId: row[14],
|
|
319
330
|
sourceMetadata: row[15],
|
|
320
331
|
createdAt: row[16],
|
|
321
|
-
updatedAt: row[17]
|
|
332
|
+
updatedAt: row[17],
|
|
333
|
+
firstTaskStartedAt: row[18]
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
exports.updateProjectLifecycleByIDQuery = `-- name: UpdateProjectLifecycleByID :one
|
|
337
|
+
UPDATE weave.projects
|
|
338
|
+
SET
|
|
339
|
+
status = $1,
|
|
340
|
+
first_task_started_at = COALESCE(first_task_started_at, $2),
|
|
341
|
+
updated_at = now()
|
|
342
|
+
WHERE organization_id = $3
|
|
343
|
+
AND id = $4
|
|
344
|
+
RETURNING
|
|
345
|
+
id,
|
|
346
|
+
organization_id,
|
|
347
|
+
slug,
|
|
348
|
+
name,
|
|
349
|
+
summary,
|
|
350
|
+
description,
|
|
351
|
+
status,
|
|
352
|
+
owner_user_id,
|
|
353
|
+
creator_user_id,
|
|
354
|
+
workspace_id,
|
|
355
|
+
git_repository,
|
|
356
|
+
start_date,
|
|
357
|
+
target_date,
|
|
358
|
+
source_system,
|
|
359
|
+
source_id,
|
|
360
|
+
source_metadata,
|
|
361
|
+
created_at,
|
|
362
|
+
updated_at,
|
|
363
|
+
first_task_started_at`;
|
|
364
|
+
async function updateProjectLifecycleByID(client, args) {
|
|
365
|
+
const result = await client.query({
|
|
366
|
+
text: exports.updateProjectLifecycleByIDQuery,
|
|
367
|
+
values: [args.status, args.firstTaskStartedAt, args.organizationId, args.projectId],
|
|
368
|
+
rowMode: "array"
|
|
369
|
+
});
|
|
370
|
+
if (result.rows.length !== 1) {
|
|
371
|
+
return null;
|
|
372
|
+
}
|
|
373
|
+
const row = result.rows[0];
|
|
374
|
+
return {
|
|
375
|
+
id: row[0],
|
|
376
|
+
organizationId: row[1],
|
|
377
|
+
slug: row[2],
|
|
378
|
+
name: row[3],
|
|
379
|
+
summary: row[4],
|
|
380
|
+
description: row[5],
|
|
381
|
+
status: row[6],
|
|
382
|
+
ownerUserId: row[7],
|
|
383
|
+
creatorUserId: row[8],
|
|
384
|
+
workspaceId: row[9],
|
|
385
|
+
gitRepository: row[10],
|
|
386
|
+
startDate: row[11],
|
|
387
|
+
targetDate: row[12],
|
|
388
|
+
sourceSystem: row[13],
|
|
389
|
+
sourceId: row[14],
|
|
390
|
+
sourceMetadata: row[15],
|
|
391
|
+
createdAt: row[16],
|
|
392
|
+
updatedAt: row[17],
|
|
393
|
+
firstTaskStartedAt: row[18]
|
|
322
394
|
};
|
|
323
395
|
}
|
|
324
396
|
exports.listProjectPermissionsQuery = `-- name: ListProjectPermissions :many
|
|
@@ -392,3 +464,34 @@ async function listProjectActivity(client, args) {
|
|
|
392
464
|
};
|
|
393
465
|
});
|
|
394
466
|
}
|
|
467
|
+
exports.createProjectActivityQuery = `-- name: CreateProjectActivity :exec
|
|
468
|
+
INSERT INTO weave.project_activity (
|
|
469
|
+
id,
|
|
470
|
+
organization_id,
|
|
471
|
+
project_id,
|
|
472
|
+
task_id,
|
|
473
|
+
event_type,
|
|
474
|
+
actor_id,
|
|
475
|
+
actor_slug,
|
|
476
|
+
actor_label,
|
|
477
|
+
description,
|
|
478
|
+
metadata
|
|
479
|
+
) VALUES (
|
|
480
|
+
$1,
|
|
481
|
+
$2,
|
|
482
|
+
$3,
|
|
483
|
+
$4,
|
|
484
|
+
$5,
|
|
485
|
+
$6,
|
|
486
|
+
$7,
|
|
487
|
+
$8,
|
|
488
|
+
$9,
|
|
489
|
+
$10
|
|
490
|
+
)`;
|
|
491
|
+
async function createProjectActivity(client, args) {
|
|
492
|
+
await client.query({
|
|
493
|
+
text: exports.createProjectActivityQuery,
|
|
494
|
+
values: [args.id, args.organizationId, args.projectId, args.taskId, args.eventType, args.actorId, args.actorSlug, args.actorLabel, args.description, args.metadata],
|
|
495
|
+
rowMode: "array"
|
|
496
|
+
});
|
|
497
|
+
}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { QueryArrayConfig, QueryArrayResult } from "pg";
|
|
2
|
+
interface Client {
|
|
3
|
+
query: (config: QueryArrayConfig) => Promise<QueryArrayResult>;
|
|
4
|
+
}
|
|
5
|
+
export declare const createProviderConfigurationQuery = "-- name: CreateProviderConfiguration :one\nINSERT INTO weave.llm_provider_configurations (\n id,\n organization_id,\n provider_kind,\n display_name,\n base_url,\n status,\n created_by_user_id,\n updated_by_user_id\n) VALUES (\n $1,\n $2,\n $3,\n $4,\n $5,\n $6,\n $7,\n $8\n)\nRETURNING\n id,\n organization_id,\n provider_kind,\n display_name,\n base_url,\n status,\n created_by_user_id,\n updated_by_user_id,\n created_at,\n updated_at";
|
|
6
|
+
export interface CreateProviderConfigurationArgs {
|
|
7
|
+
id: string;
|
|
8
|
+
organizationId: string;
|
|
9
|
+
providerKind: string;
|
|
10
|
+
displayName: string;
|
|
11
|
+
baseUrl: string | null;
|
|
12
|
+
status: string;
|
|
13
|
+
createdByUserId: string;
|
|
14
|
+
updatedByUserId: string;
|
|
15
|
+
}
|
|
16
|
+
export interface CreateProviderConfigurationRow {
|
|
17
|
+
id: string;
|
|
18
|
+
organizationId: string;
|
|
19
|
+
providerKind: string;
|
|
20
|
+
displayName: string;
|
|
21
|
+
baseUrl: string | null;
|
|
22
|
+
status: string;
|
|
23
|
+
createdByUserId: string;
|
|
24
|
+
updatedByUserId: string;
|
|
25
|
+
createdAt: Date;
|
|
26
|
+
updatedAt: Date;
|
|
27
|
+
}
|
|
28
|
+
export declare function createProviderConfiguration(client: Client, args: CreateProviderConfigurationArgs): Promise<CreateProviderConfigurationRow | null>;
|
|
29
|
+
export declare const getProviderConfigurationByIDQuery = "-- name: GetProviderConfigurationByID :one\nSELECT\n id,\n organization_id,\n provider_kind,\n display_name,\n base_url,\n status,\n created_by_user_id,\n updated_by_user_id,\n created_at,\n updated_at\nFROM weave.llm_provider_configurations\nWHERE organization_id = $1\n AND id = $2";
|
|
30
|
+
export interface GetProviderConfigurationByIDArgs {
|
|
31
|
+
organizationId: string;
|
|
32
|
+
id: string;
|
|
33
|
+
}
|
|
34
|
+
export interface GetProviderConfigurationByIDRow {
|
|
35
|
+
id: string;
|
|
36
|
+
organizationId: string;
|
|
37
|
+
providerKind: string;
|
|
38
|
+
displayName: string;
|
|
39
|
+
baseUrl: string | null;
|
|
40
|
+
status: string;
|
|
41
|
+
createdByUserId: string;
|
|
42
|
+
updatedByUserId: string;
|
|
43
|
+
createdAt: Date;
|
|
44
|
+
updatedAt: Date;
|
|
45
|
+
}
|
|
46
|
+
export declare function getProviderConfigurationByID(client: Client, args: GetProviderConfigurationByIDArgs): Promise<GetProviderConfigurationByIDRow | null>;
|
|
47
|
+
export declare const getProviderConfigurationByKindQuery = "-- name: GetProviderConfigurationByKind :one\nSELECT\n id,\n organization_id,\n provider_kind,\n display_name,\n base_url,\n status,\n created_by_user_id,\n updated_by_user_id,\n created_at,\n updated_at\nFROM weave.llm_provider_configurations\nWHERE organization_id = $1\n AND provider_kind = $2";
|
|
48
|
+
export interface GetProviderConfigurationByKindArgs {
|
|
49
|
+
organizationId: string;
|
|
50
|
+
providerKind: string;
|
|
51
|
+
}
|
|
52
|
+
export interface GetProviderConfigurationByKindRow {
|
|
53
|
+
id: string;
|
|
54
|
+
organizationId: string;
|
|
55
|
+
providerKind: string;
|
|
56
|
+
displayName: string;
|
|
57
|
+
baseUrl: string | null;
|
|
58
|
+
status: string;
|
|
59
|
+
createdByUserId: string;
|
|
60
|
+
updatedByUserId: string;
|
|
61
|
+
createdAt: Date;
|
|
62
|
+
updatedAt: Date;
|
|
63
|
+
}
|
|
64
|
+
export declare function getProviderConfigurationByKind(client: Client, args: GetProviderConfigurationByKindArgs): Promise<GetProviderConfigurationByKindRow | null>;
|
|
65
|
+
export declare const listProviderConfigurationsQuery = "-- name: ListProviderConfigurations :many\nSELECT\n id,\n organization_id,\n provider_kind,\n display_name,\n base_url,\n status,\n created_by_user_id,\n updated_by_user_id,\n created_at,\n updated_at\nFROM weave.llm_provider_configurations\nWHERE organization_id = $1\nORDER BY updated_at DESC, created_at DESC";
|
|
66
|
+
export interface ListProviderConfigurationsArgs {
|
|
67
|
+
organizationId: string;
|
|
68
|
+
}
|
|
69
|
+
export interface ListProviderConfigurationsRow {
|
|
70
|
+
id: string;
|
|
71
|
+
organizationId: string;
|
|
72
|
+
providerKind: string;
|
|
73
|
+
displayName: string;
|
|
74
|
+
baseUrl: string | null;
|
|
75
|
+
status: string;
|
|
76
|
+
createdByUserId: string;
|
|
77
|
+
updatedByUserId: string;
|
|
78
|
+
createdAt: Date;
|
|
79
|
+
updatedAt: Date;
|
|
80
|
+
}
|
|
81
|
+
export declare function listProviderConfigurations(client: Client, args: ListProviderConfigurationsArgs): Promise<ListProviderConfigurationsRow[]>;
|
|
82
|
+
export declare const updateProviderConfigurationByIDQuery = "-- name: UpdateProviderConfigurationByID :one\nUPDATE weave.llm_provider_configurations\nSET\n display_name = $1,\n base_url = $2,\n status = $3,\n updated_by_user_id = $4,\n updated_at = now()\nWHERE organization_id = $5\n AND id = $6\nRETURNING\n id,\n organization_id,\n provider_kind,\n display_name,\n base_url,\n status,\n created_by_user_id,\n updated_by_user_id,\n created_at,\n updated_at";
|
|
83
|
+
export interface UpdateProviderConfigurationByIDArgs {
|
|
84
|
+
displayName: string;
|
|
85
|
+
baseUrl: string | null;
|
|
86
|
+
status: string;
|
|
87
|
+
updatedByUserId: string;
|
|
88
|
+
organizationId: string;
|
|
89
|
+
id: string;
|
|
90
|
+
}
|
|
91
|
+
export interface UpdateProviderConfigurationByIDRow {
|
|
92
|
+
id: string;
|
|
93
|
+
organizationId: string;
|
|
94
|
+
providerKind: string;
|
|
95
|
+
displayName: string;
|
|
96
|
+
baseUrl: string | null;
|
|
97
|
+
status: string;
|
|
98
|
+
createdByUserId: string;
|
|
99
|
+
updatedByUserId: string;
|
|
100
|
+
createdAt: Date;
|
|
101
|
+
updatedAt: Date;
|
|
102
|
+
}
|
|
103
|
+
export declare function updateProviderConfigurationByID(client: Client, args: UpdateProviderConfigurationByIDArgs): Promise<UpdateProviderConfigurationByIDRow | null>;
|
|
104
|
+
export declare const disableProviderConfigurationByIDQuery = "-- name: DisableProviderConfigurationByID :one\nUPDATE weave.llm_provider_configurations\nSET\n status = 'PROVIDER_CONFIGURATION_STATUS_DISABLED',\n updated_by_user_id = $1,\n updated_at = now()\nWHERE organization_id = $2\n AND id = $3\nRETURNING\n id,\n organization_id,\n provider_kind,\n display_name,\n base_url,\n status,\n created_by_user_id,\n updated_by_user_id,\n created_at,\n updated_at";
|
|
105
|
+
export interface DisableProviderConfigurationByIDArgs {
|
|
106
|
+
updatedByUserId: string;
|
|
107
|
+
organizationId: string;
|
|
108
|
+
id: string;
|
|
109
|
+
}
|
|
110
|
+
export interface DisableProviderConfigurationByIDRow {
|
|
111
|
+
id: string;
|
|
112
|
+
organizationId: string;
|
|
113
|
+
providerKind: string;
|
|
114
|
+
displayName: string;
|
|
115
|
+
baseUrl: string | null;
|
|
116
|
+
status: string;
|
|
117
|
+
createdByUserId: string;
|
|
118
|
+
updatedByUserId: string;
|
|
119
|
+
createdAt: Date;
|
|
120
|
+
updatedAt: Date;
|
|
121
|
+
}
|
|
122
|
+
export declare function disableProviderConfigurationByID(client: Client, args: DisableProviderConfigurationByIDArgs): Promise<DisableProviderConfigurationByIDRow | null>;
|
|
123
|
+
export declare const upsertProviderCredentialQuery = "-- name: UpsertProviderCredential :one\nINSERT INTO weave.llm_provider_credentials (\n provider_configuration_id,\n organization_id,\n encrypted_credentials,\n credential_hint,\n credential_status,\n key_version,\n last_rotated_at\n) VALUES (\n $1,\n $2,\n $3,\n $4,\n $5,\n $6,\n $7\n)\nON CONFLICT (provider_configuration_id) DO UPDATE\nSET\n organization_id = EXCLUDED.organization_id,\n encrypted_credentials = EXCLUDED.encrypted_credentials,\n credential_hint = EXCLUDED.credential_hint,\n credential_status = EXCLUDED.credential_status,\n key_version = EXCLUDED.key_version,\n last_rotated_at = EXCLUDED.last_rotated_at,\n updated_at = now()\nRETURNING\n provider_configuration_id,\n organization_id,\n encrypted_credentials,\n credential_hint,\n credential_status,\n key_version,\n last_rotated_at,\n created_at,\n updated_at";
|
|
124
|
+
export interface UpsertProviderCredentialArgs {
|
|
125
|
+
providerConfigurationId: string;
|
|
126
|
+
organizationId: string;
|
|
127
|
+
encryptedCredentials: Buffer;
|
|
128
|
+
credentialHint: string;
|
|
129
|
+
credentialStatus: string;
|
|
130
|
+
keyVersion: string | null;
|
|
131
|
+
lastRotatedAt: Date;
|
|
132
|
+
}
|
|
133
|
+
export interface UpsertProviderCredentialRow {
|
|
134
|
+
providerConfigurationId: string;
|
|
135
|
+
organizationId: string;
|
|
136
|
+
encryptedCredentials: Buffer;
|
|
137
|
+
credentialHint: string;
|
|
138
|
+
credentialStatus: string;
|
|
139
|
+
keyVersion: string | null;
|
|
140
|
+
lastRotatedAt: Date;
|
|
141
|
+
createdAt: Date;
|
|
142
|
+
updatedAt: Date;
|
|
143
|
+
}
|
|
144
|
+
export declare function upsertProviderCredential(client: Client, args: UpsertProviderCredentialArgs): Promise<UpsertProviderCredentialRow | null>;
|
|
145
|
+
export declare const getProviderCredentialByProviderIDQuery = "-- name: GetProviderCredentialByProviderID :one\nSELECT\n provider_configuration_id,\n organization_id,\n encrypted_credentials,\n credential_hint,\n credential_status,\n key_version,\n last_rotated_at,\n created_at,\n updated_at\nFROM weave.llm_provider_credentials\nWHERE organization_id = $1\n AND provider_configuration_id = $2";
|
|
146
|
+
export interface GetProviderCredentialByProviderIDArgs {
|
|
147
|
+
organizationId: string;
|
|
148
|
+
providerConfigurationId: string;
|
|
149
|
+
}
|
|
150
|
+
export interface GetProviderCredentialByProviderIDRow {
|
|
151
|
+
providerConfigurationId: string;
|
|
152
|
+
organizationId: string;
|
|
153
|
+
encryptedCredentials: Buffer;
|
|
154
|
+
credentialHint: string;
|
|
155
|
+
credentialStatus: string;
|
|
156
|
+
keyVersion: string | null;
|
|
157
|
+
lastRotatedAt: Date;
|
|
158
|
+
createdAt: Date;
|
|
159
|
+
updatedAt: Date;
|
|
160
|
+
}
|
|
161
|
+
export declare function getProviderCredentialByProviderID(client: Client, args: GetProviderCredentialByProviderIDArgs): Promise<GetProviderCredentialByProviderIDRow | null>;
|
|
162
|
+
export {};
|