weave-typescript 0.13.0 → 0.15.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/index.d.ts +9 -16
- package/dist/index.js +13 -21
- package/dist/weaveapi/project/v1/project.pb.d.ts +69 -5
- package/dist/weaveapi/project/v1/project.pb.js +787 -62
- package/dist/weaveapi/project/v1/service.pb.d.ts +110 -69
- package/dist/weaveapi/project/v1/service.pb.js +1056 -392
- package/dist/weaveapi/task/v1/service.pb.d.ts +172 -0
- package/dist/weaveapi/task/v1/service.pb.js +1436 -0
- package/dist/weaveapi/task/v1/task.pb.d.ts +85 -0
- package/dist/weaveapi/task/v1/task.pb.js +802 -0
- package/dist/weavesql/atcdb/event_sql.d.ts +10 -0
- package/dist/weavesql/atcdb/event_sql.js +11 -1
- package/dist/weavesql/atcdb/mailbox_sql.d.ts +2 -2
- package/dist/weavesql/atcdb/mailbox_sql.js +1 -1
- package/dist/weavesql/weavedb/project_sql.d.ts +164 -41
- package/dist/weavesql/weavedb/project_sql.js +398 -103
- package/dist/weavesql/weavedb/task_sql.d.ts +210 -0
- package/dist/weavesql/weavedb/task_sql.js +430 -0
- package/package.json +2 -2
- package/dist/weaveapi/auth/v1/service.pb.d.ts +0 -709
- package/dist/weaveapi/auth/v1/service.pb.js +0 -5058
- package/dist/weaveapi/auth/v1/session.pb.d.ts +0 -43
- package/dist/weaveapi/auth/v1/session.pb.js +0 -308
- package/dist/weaveapi/auth/v1/usage.pb.d.ts +0 -76
- package/dist/weaveapi/auth/v1/usage.pb.js +0 -849
- package/dist/weaveapi/auth/v1/user.pb.d.ts +0 -141
- package/dist/weaveapi/auth/v1/user.pb.js +0 -1625
- package/dist/weaveapi/data/v1/data.pb.d.ts +0 -54
- package/dist/weaveapi/data/v1/data.pb.js +0 -411
- package/dist/weaveapi/data/v1/service.pb.d.ts +0 -296
- package/dist/weaveapi/data/v1/service.pb.js +0 -2777
- package/dist/weaveapi/generate/v1/configuration.pb.d.ts +0 -122
- package/dist/weaveapi/generate/v1/configuration.pb.js +0 -877
- package/dist/weaveapi/generate/v1/generate.pb.d.ts +0 -48
- package/dist/weaveapi/generate/v1/generate.pb.js +0 -367
- package/dist/weaveapi/generate/v1/service.pb.d.ts +0 -173
- package/dist/weaveapi/generate/v1/service.pb.js +0 -1207
- package/dist/weaveapi/input/v1/input.pb.d.ts +0 -77
- package/dist/weaveapi/input/v1/input.pb.js +0 -632
- package/dist/weaveapi/input/v1/service.pb.d.ts +0 -390
- package/dist/weaveapi/input/v1/service.pb.js +0 -3610
- package/dist/weaveapi/integration/v1/integration.pb.d.ts +0 -67
- package/dist/weaveapi/integration/v1/integration.pb.js +0 -486
- package/dist/weaveapi/integration/v1/service.pb.d.ts +0 -318
- package/dist/weaveapi/integration/v1/service.pb.js +0 -2992
- package/dist/weaveapi/llmx/v1/architecture.pb.d.ts +0 -665
- package/dist/weaveapi/llmx/v1/architecture.pb.js +0 -3028
- package/dist/weaveapi/llmx/v1/capabilities.pb.d.ts +0 -709
- package/dist/weaveapi/llmx/v1/capabilities.pb.js +0 -3458
- package/dist/weaveapi/llmx/v1/model.pb.d.ts +0 -375
- package/dist/weaveapi/llmx/v1/model.pb.js +0 -1472
- package/dist/weaveapi/llmx/v1/pricing.pb.d.ts +0 -340
- package/dist/weaveapi/llmx/v1/pricing.pb.js +0 -974
- package/dist/weaveapi/llmx/v1/provider.pb.d.ts +0 -72
- package/dist/weaveapi/llmx/v1/provider.pb.js +0 -218
- package/dist/weaveapi/llmx/v1/service.pb.d.ts +0 -683
- package/dist/weaveapi/llmx/v1/service.pb.js +0 -5311
- package/dist/weaveapi/mcpregistry/v1/server.pb.d.ts +0 -54
- package/dist/weaveapi/mcpregistry/v1/server.pb.js +0 -436
- package/dist/weaveapi/mcpregistry/v1/service.pb.d.ts +0 -171
- package/dist/weaveapi/mcpregistry/v1/service.pb.js +0 -963
- package/dist/weaveapi/payment/v1/invoice.pb.d.ts +0 -92
- package/dist/weaveapi/payment/v1/invoice.pb.js +0 -998
- package/dist/weaveapi/payment/v1/service.pb.d.ts +0 -662
- package/dist/weaveapi/payment/v1/service.pb.js +0 -5395
- package/dist/weaveapi/payment/v1/subscription.pb.d.ts +0 -165
- package/dist/weaveapi/payment/v1/subscription.pb.js +0 -1930
- package/dist/weaveapi/report/v1/report.pb.d.ts +0 -81
- package/dist/weaveapi/report/v1/report.pb.js +0 -678
- package/dist/weaveapi/report/v1/service.pb.d.ts +0 -194
- package/dist/weaveapi/report/v1/service.pb.js +0 -1923
- package/dist/weaveapi/requirement/v1/requirement.pb.d.ts +0 -70
- package/dist/weaveapi/requirement/v1/requirement.pb.js +0 -570
- package/dist/weaveapi/requirement/v1/service.pb.d.ts +0 -390
- package/dist/weaveapi/requirement/v1/service.pb.js +0 -3636
- package/dist/weaveapi/run/v1/run.pb.d.ts +0 -117
- package/dist/weaveapi/run/v1/run.pb.js +0 -1155
- package/dist/weaveapi/run/v1/service.pb.d.ts +0 -229
- package/dist/weaveapi/run/v1/service.pb.js +0 -2426
- package/dist/weaveapi/script/v1/script.pb.d.ts +0 -102
- package/dist/weaveapi/script/v1/script.pb.js +0 -1025
- package/dist/weaveapi/script/v1/service.pb.d.ts +0 -502
- package/dist/weaveapi/script/v1/service.pb.js +0 -4871
- package/dist/weaveapi/storage/v1/auth.pb.d.ts +0 -27
- package/dist/weaveapi/storage/v1/auth.pb.js +0 -110
- package/dist/weaveapi/storage/v1/nosql_database.pb.d.ts +0 -91
- package/dist/weaveapi/storage/v1/nosql_database.pb.js +0 -1056
- package/dist/weaveapi/storage/v1/object_store.pb.d.ts +0 -49
- package/dist/weaveapi/storage/v1/object_store.pb.js +0 -441
- package/dist/weaveapi/storage/v1/service.pb.d.ts +0 -245
- package/dist/weaveapi/storage/v1/service.pb.js +0 -1339
- package/dist/weaveapi/storage/v1/sql_database.pb.d.ts +0 -98
- package/dist/weaveapi/storage/v1/sql_database.pb.js +0 -1184
- package/dist/weaveapi/storage/v1/storage.pb.d.ts +0 -35
- package/dist/weaveapi/storage/v1/storage.pb.js +0 -198
- package/dist/weaveapi/storage/v1/vcs.pb.d.ts +0 -75
- package/dist/weaveapi/storage/v1/vcs.pb.js +0 -864
- package/dist/weaveapi/suite/v1/service.pb.d.ts +0 -539
- package/dist/weaveapi/suite/v1/service.pb.js +0 -5279
- package/dist/weaveapi/suite/v1/suite.pb.d.ts +0 -92
- package/dist/weaveapi/suite/v1/suite.pb.js +0 -876
- package/dist/weaveapi/synthesize/v1/dataset.pb.d.ts +0 -68
- package/dist/weaveapi/synthesize/v1/dataset.pb.js +0 -460
- package/dist/weaveapi/synthesize/v1/inline_data.pb.d.ts +0 -45
- package/dist/weaveapi/synthesize/v1/inline_data.pb.js +0 -166
- package/dist/weaveapi/synthesize/v1/relationship.pb.d.ts +0 -58
- package/dist/weaveapi/synthesize/v1/relationship.pb.js +0 -253
- package/dist/weaveapi/synthesize/v1/service.pb.d.ts +0 -144
- package/dist/weaveapi/synthesize/v1/service.pb.js +0 -937
- package/dist/weaveapi/synthesize/v1/training.pb.d.ts +0 -58
- package/dist/weaveapi/synthesize/v1/training.pb.js +0 -386
- package/dist/weaveapi/testcase/v1/service.pb.d.ts +0 -498
- package/dist/weaveapi/testcase/v1/service.pb.js +0 -4728
- package/dist/weaveapi/testcase/v1/testcase.pb.d.ts +0 -91
- package/dist/weaveapi/testcase/v1/testcase.pb.js +0 -794
- package/dist/weaveapi/workflow/v1/service.pb.d.ts +0 -261
- package/dist/weaveapi/workflow/v1/service.pb.js +0 -2120
- package/dist/weaveapi/workflow/v1/workflow.pb.d.ts +0 -77
- package/dist/weaveapi/workflow/v1/workflow.pb.js +0 -555
- package/dist/weaveapi/workflowdata/v1/service.pb.d.ts +0 -295
- package/dist/weaveapi/workflowdata/v1/service.pb.js +0 -2612
|
@@ -88,4 +88,14 @@ export interface ListEventsByTypeRow {
|
|
|
88
88
|
occurredAt: Date;
|
|
89
89
|
}
|
|
90
90
|
export declare function listEventsByType(client: Client, args: ListEventsByTypeArgs): Promise<ListEventsByTypeRow[]>;
|
|
91
|
+
export declare const lockRunQuery = "-- name: LockRun :exec\nSELECT pg_advisory_xact_lock($1::int, hashtext($2::text || ':' || $3::text))";
|
|
92
|
+
export interface LockRunArgs {
|
|
93
|
+
lockNamespace: number;
|
|
94
|
+
tenantId: string;
|
|
95
|
+
runId: string;
|
|
96
|
+
}
|
|
97
|
+
export interface LockRunRow {
|
|
98
|
+
pgAdvisoryXactLock: string;
|
|
99
|
+
}
|
|
100
|
+
export declare function lockRun(client: Client, args: LockRunArgs): Promise<void>;
|
|
91
101
|
export {};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.listEventsByTypeQuery = exports.loadAllEventsQuery = exports.loadEventsQuery = exports.getCurrentVersionQuery = exports.insertEventQuery = void 0;
|
|
3
|
+
exports.lockRunQuery = exports.listEventsByTypeQuery = exports.loadAllEventsQuery = exports.loadEventsQuery = exports.getCurrentVersionQuery = exports.insertEventQuery = void 0;
|
|
4
4
|
exports.insertEvent = insertEvent;
|
|
5
5
|
exports.getCurrentVersion = getCurrentVersion;
|
|
6
6
|
exports.loadEvents = loadEvents;
|
|
7
7
|
exports.loadAllEvents = loadAllEvents;
|
|
8
8
|
exports.listEventsByType = listEventsByType;
|
|
9
|
+
exports.lockRun = lockRun;
|
|
9
10
|
exports.insertEventQuery = `-- name: InsertEvent :one
|
|
10
11
|
INSERT INTO atc.events (
|
|
11
12
|
id,
|
|
@@ -179,3 +180,12 @@ async function listEventsByType(client, args) {
|
|
|
179
180
|
};
|
|
180
181
|
});
|
|
181
182
|
}
|
|
183
|
+
exports.lockRunQuery = `-- name: LockRun :exec
|
|
184
|
+
SELECT pg_advisory_xact_lock($1::int, hashtext($2::text || ':' || $3::text))`;
|
|
185
|
+
async function lockRun(client, args) {
|
|
186
|
+
await client.query({
|
|
187
|
+
text: exports.lockRunQuery,
|
|
188
|
+
values: [args.lockNamespace, args.tenantId, args.runId],
|
|
189
|
+
rowMode: "array"
|
|
190
|
+
});
|
|
191
|
+
}
|
|
@@ -18,10 +18,10 @@ export interface LockMailboxCursorRow {
|
|
|
18
18
|
lastProcessedTransactionId: string;
|
|
19
19
|
}
|
|
20
20
|
export declare function lockMailboxCursor(client: Client, args: LockMailboxCursorArgs): Promise<LockMailboxCursorRow | null>;
|
|
21
|
-
export declare const readMailboxQuery = "-- name: ReadMailbox :many\nSELECT\n sequence,\n transaction_id::text AS transaction_id,\n data\nFROM atc.events\nWHERE tenant_id = $1\n AND data->>'to' = $2\n AND data->>'category' IN ('protocol', 'semantic')\n AND (\n sequence > $3\n OR (sequence = $3 AND transaction_id > $4::xid8)\n )\n AND transaction_id < pg_snapshot_xmin(pg_current_snapshot())\nORDER BY sequence ASC\nLIMIT $5";
|
|
21
|
+
export declare const readMailboxQuery = "-- name: ReadMailbox :many\nSELECT\n sequence,\n transaction_id::text AS transaction_id,\n data\nFROM atc.events\nWHERE tenant_id = $1\n AND data->>'to' = $2::text\n AND data->>'category' IN ('protocol', 'semantic')\n AND (\n sequence > $3\n OR (sequence = $3 AND transaction_id > $4::xid8)\n )\n AND transaction_id < pg_snapshot_xmin(pg_current_snapshot())\nORDER BY sequence ASC\nLIMIT $5";
|
|
22
22
|
export interface ReadMailboxArgs {
|
|
23
23
|
tenantId: string;
|
|
24
|
-
processId:
|
|
24
|
+
processId: string;
|
|
25
25
|
afterSequence: string;
|
|
26
26
|
afterTransactionId: string;
|
|
27
27
|
batchLimit: string;
|
|
@@ -2,118 +2,241 @@ import { QueryArrayConfig, QueryArrayResult } from "pg";
|
|
|
2
2
|
interface Client {
|
|
3
3
|
query: (config: QueryArrayConfig) => Promise<QueryArrayResult>;
|
|
4
4
|
}
|
|
5
|
-
export declare const createProjectQuery = "-- name: CreateProject :one\nINSERT INTO
|
|
5
|
+
export declare const createProjectQuery = "-- name: CreateProject :one\nINSERT INTO weave.projects (\n id,\n organization_id,\n slug,\n name,\n summary,\n description,\n status,\n owner_user_id,\n creator_user_id,\n workspace_id,\n git_repository,\n start_date,\n target_date,\n source_system,\n source_id,\n source_metadata\n) VALUES (\n $1,\n $2,\n $3,\n $4,\n $5,\n $6,\n $7,\n $8,\n $9,\n $10,\n $11,\n $12,\n $13,\n $14,\n $15,\n $16\n)\nRETURNING\n id,\n organization_id,\n slug,\n name,\n summary,\n description,\n status,\n owner_user_id,\n creator_user_id,\n workspace_id,\n git_repository,\n start_date,\n target_date,\n source_system,\n source_id,\n source_metadata,\n created_at,\n updated_at,\n first_task_started_at";
|
|
6
6
|
export interface CreateProjectArgs {
|
|
7
7
|
id: string;
|
|
8
8
|
organizationId: string;
|
|
9
|
-
name: string;
|
|
10
9
|
slug: string;
|
|
10
|
+
name: string;
|
|
11
|
+
summary: string;
|
|
11
12
|
description: string;
|
|
12
13
|
status: string;
|
|
14
|
+
ownerUserId: string;
|
|
15
|
+
creatorUserId: string;
|
|
16
|
+
workspaceId: string;
|
|
17
|
+
gitRepository: string | null;
|
|
18
|
+
startDate: Date | null;
|
|
19
|
+
targetDate: Date | null;
|
|
20
|
+
sourceSystem: string | null;
|
|
21
|
+
sourceId: string | null;
|
|
22
|
+
sourceMetadata: any | null;
|
|
13
23
|
}
|
|
14
24
|
export interface CreateProjectRow {
|
|
15
25
|
id: string;
|
|
16
26
|
organizationId: string;
|
|
17
|
-
name: string;
|
|
18
27
|
slug: string;
|
|
28
|
+
name: string;
|
|
29
|
+
summary: string;
|
|
19
30
|
description: string;
|
|
20
31
|
status: string;
|
|
32
|
+
ownerUserId: string;
|
|
33
|
+
creatorUserId: string;
|
|
34
|
+
workspaceId: string;
|
|
35
|
+
gitRepository: string | null;
|
|
36
|
+
startDate: Date | null;
|
|
37
|
+
targetDate: Date | null;
|
|
38
|
+
sourceSystem: string | null;
|
|
39
|
+
sourceId: string | null;
|
|
40
|
+
sourceMetadata: any | null;
|
|
21
41
|
createdAt: Date;
|
|
22
42
|
updatedAt: Date;
|
|
23
|
-
|
|
43
|
+
firstTaskStartedAt: Date | null;
|
|
24
44
|
}
|
|
25
45
|
export declare function createProject(client: Client, args: CreateProjectArgs): Promise<CreateProjectRow | null>;
|
|
26
|
-
export declare const
|
|
27
|
-
export interface
|
|
46
|
+
export declare const getProjectByIDQuery = "-- name: GetProjectByID :one\nSELECT\n id,\n organization_id,\n slug,\n name,\n summary,\n description,\n status,\n owner_user_id,\n creator_user_id,\n workspace_id,\n git_repository,\n start_date,\n target_date,\n source_system,\n source_id,\n source_metadata,\n created_at,\n updated_at,\n first_task_started_at\nFROM weave.projects\nWHERE organization_id = $1\n AND id = $2";
|
|
47
|
+
export interface GetProjectByIDArgs {
|
|
48
|
+
organizationId: string;
|
|
28
49
|
id: string;
|
|
29
50
|
}
|
|
30
|
-
export interface
|
|
51
|
+
export interface GetProjectByIDRow {
|
|
31
52
|
id: string;
|
|
32
53
|
organizationId: string;
|
|
33
|
-
name: string;
|
|
34
54
|
slug: string;
|
|
55
|
+
name: string;
|
|
56
|
+
summary: string;
|
|
35
57
|
description: string;
|
|
36
58
|
status: string;
|
|
59
|
+
ownerUserId: string;
|
|
60
|
+
creatorUserId: string;
|
|
61
|
+
workspaceId: string;
|
|
62
|
+
gitRepository: string | null;
|
|
63
|
+
startDate: Date | null;
|
|
64
|
+
targetDate: Date | null;
|
|
65
|
+
sourceSystem: string | null;
|
|
66
|
+
sourceId: string | null;
|
|
67
|
+
sourceMetadata: any | null;
|
|
37
68
|
createdAt: Date;
|
|
38
69
|
updatedAt: Date;
|
|
39
|
-
|
|
70
|
+
firstTaskStartedAt: Date | null;
|
|
40
71
|
}
|
|
41
|
-
export declare function
|
|
42
|
-
export declare const getProjectBySlugQuery = "-- name: GetProjectBySlug :one\nSELECT
|
|
72
|
+
export declare function getProjectByID(client: Client, args: GetProjectByIDArgs): Promise<GetProjectByIDRow | null>;
|
|
73
|
+
export declare const getProjectBySlugQuery = "-- name: GetProjectBySlug :one\nSELECT\n id,\n organization_id,\n slug,\n name,\n summary,\n description,\n status,\n owner_user_id,\n creator_user_id,\n workspace_id,\n git_repository,\n start_date,\n target_date,\n source_system,\n source_id,\n source_metadata,\n created_at,\n updated_at,\n first_task_started_at\nFROM weave.projects\nWHERE organization_id = $1\n AND slug = $2";
|
|
43
74
|
export interface GetProjectBySlugArgs {
|
|
44
75
|
organizationId: string;
|
|
45
|
-
|
|
76
|
+
projectSlug: string;
|
|
46
77
|
}
|
|
47
78
|
export interface GetProjectBySlugRow {
|
|
48
79
|
id: string;
|
|
49
80
|
organizationId: string;
|
|
50
|
-
name: string;
|
|
51
81
|
slug: string;
|
|
82
|
+
name: string;
|
|
83
|
+
summary: string;
|
|
52
84
|
description: string;
|
|
53
85
|
status: string;
|
|
86
|
+
ownerUserId: string;
|
|
87
|
+
creatorUserId: string;
|
|
88
|
+
workspaceId: string;
|
|
89
|
+
gitRepository: string | null;
|
|
90
|
+
startDate: Date | null;
|
|
91
|
+
targetDate: Date | null;
|
|
92
|
+
sourceSystem: string | null;
|
|
93
|
+
sourceId: string | null;
|
|
94
|
+
sourceMetadata: any | null;
|
|
54
95
|
createdAt: Date;
|
|
55
96
|
updatedAt: Date;
|
|
56
|
-
|
|
97
|
+
firstTaskStartedAt: Date | null;
|
|
57
98
|
}
|
|
58
99
|
export declare function getProjectBySlug(client: Client, args: GetProjectBySlugArgs): Promise<GetProjectBySlugRow | null>;
|
|
59
|
-
export declare const
|
|
60
|
-
export interface
|
|
100
|
+
export declare const listProjectsQuery = "-- name: ListProjects :many\nSELECT\n id,\n organization_id,\n slug,\n name,\n summary,\n description,\n status,\n owner_user_id,\n creator_user_id,\n workspace_id,\n git_repository,\n start_date,\n target_date,\n source_system,\n source_id,\n source_metadata,\n created_at,\n updated_at,\n first_task_started_at\nFROM weave.projects\nWHERE organization_id = $1\nORDER BY updated_at DESC, created_at DESC";
|
|
101
|
+
export interface ListProjectsArgs {
|
|
61
102
|
organizationId: string;
|
|
62
|
-
includeArchived: boolean;
|
|
63
|
-
pageOffset: string;
|
|
64
|
-
pageSize: string;
|
|
65
103
|
}
|
|
66
|
-
export interface
|
|
104
|
+
export interface ListProjectsRow {
|
|
67
105
|
id: string;
|
|
68
106
|
organizationId: string;
|
|
69
|
-
name: string;
|
|
70
107
|
slug: string;
|
|
108
|
+
name: string;
|
|
109
|
+
summary: string;
|
|
71
110
|
description: string;
|
|
72
111
|
status: string;
|
|
112
|
+
ownerUserId: string;
|
|
113
|
+
creatorUserId: string;
|
|
114
|
+
workspaceId: string;
|
|
115
|
+
gitRepository: string | null;
|
|
116
|
+
startDate: Date | null;
|
|
117
|
+
targetDate: Date | null;
|
|
118
|
+
sourceSystem: string | null;
|
|
119
|
+
sourceId: string | null;
|
|
120
|
+
sourceMetadata: any | null;
|
|
73
121
|
createdAt: Date;
|
|
74
122
|
updatedAt: Date;
|
|
75
|
-
|
|
123
|
+
firstTaskStartedAt: Date | null;
|
|
76
124
|
}
|
|
77
|
-
export declare function
|
|
78
|
-
export declare const
|
|
79
|
-
export interface
|
|
125
|
+
export declare function listProjects(client: Client, args: ListProjectsArgs): Promise<ListProjectsRow[]>;
|
|
126
|
+
export declare const updateProjectBySlugQuery = "-- name: UpdateProjectBySlug :one\nUPDATE weave.projects\nSET\n name = $1,\n summary = $2,\n description = $3,\n status = $4,\n workspace_id = $5,\n git_repository = $6,\n start_date = $7,\n target_date = $8,\n source_system = $9,\n source_id = $10,\n source_metadata = $11,\n updated_at = now()\nWHERE organization_id = $12\n AND slug = $13\nRETURNING\n id,\n organization_id,\n slug,\n name,\n summary,\n description,\n status,\n owner_user_id,\n creator_user_id,\n workspace_id,\n git_repository,\n start_date,\n target_date,\n source_system,\n source_id,\n source_metadata,\n created_at,\n updated_at,\n first_task_started_at";
|
|
127
|
+
export interface UpdateProjectBySlugArgs {
|
|
80
128
|
name: string;
|
|
81
|
-
|
|
129
|
+
summary: string;
|
|
82
130
|
description: string;
|
|
83
131
|
status: string;
|
|
84
|
-
|
|
132
|
+
workspaceId: string;
|
|
133
|
+
gitRepository: string | null;
|
|
134
|
+
startDate: Date | null;
|
|
135
|
+
targetDate: Date | null;
|
|
136
|
+
sourceSystem: string | null;
|
|
137
|
+
sourceId: string | null;
|
|
138
|
+
sourceMetadata: any | null;
|
|
139
|
+
organizationId: string;
|
|
140
|
+
projectSlug: string;
|
|
85
141
|
}
|
|
86
|
-
export interface
|
|
142
|
+
export interface UpdateProjectBySlugRow {
|
|
87
143
|
id: string;
|
|
88
144
|
organizationId: string;
|
|
89
|
-
name: string;
|
|
90
145
|
slug: string;
|
|
146
|
+
name: string;
|
|
147
|
+
summary: string;
|
|
91
148
|
description: string;
|
|
92
149
|
status: string;
|
|
150
|
+
ownerUserId: string;
|
|
151
|
+
creatorUserId: string;
|
|
152
|
+
workspaceId: string;
|
|
153
|
+
gitRepository: string | null;
|
|
154
|
+
startDate: Date | null;
|
|
155
|
+
targetDate: Date | null;
|
|
156
|
+
sourceSystem: string | null;
|
|
157
|
+
sourceId: string | null;
|
|
158
|
+
sourceMetadata: any | null;
|
|
93
159
|
createdAt: Date;
|
|
94
160
|
updatedAt: Date;
|
|
95
|
-
|
|
161
|
+
firstTaskStartedAt: Date | null;
|
|
96
162
|
}
|
|
97
|
-
export declare function
|
|
98
|
-
export declare const
|
|
99
|
-
export interface
|
|
100
|
-
|
|
163
|
+
export declare function updateProjectBySlug(client: Client, args: UpdateProjectBySlugArgs): Promise<UpdateProjectBySlugRow | null>;
|
|
164
|
+
export declare const updateProjectLifecycleByIDQuery = "-- name: UpdateProjectLifecycleByID :one\nUPDATE weave.projects\nSET\n status = $1,\n first_task_started_at = COALESCE(first_task_started_at, $2),\n updated_at = now()\nWHERE organization_id = $3\n AND id = $4\nRETURNING\n id,\n organization_id,\n slug,\n name,\n summary,\n description,\n status,\n owner_user_id,\n creator_user_id,\n workspace_id,\n git_repository,\n start_date,\n target_date,\n source_system,\n source_id,\n source_metadata,\n created_at,\n updated_at,\n first_task_started_at";
|
|
165
|
+
export interface UpdateProjectLifecycleByIDArgs {
|
|
166
|
+
status: string;
|
|
167
|
+
firstTaskStartedAt: Date | null;
|
|
168
|
+
organizationId: string;
|
|
169
|
+
projectId: string;
|
|
101
170
|
}
|
|
102
|
-
export interface
|
|
171
|
+
export interface UpdateProjectLifecycleByIDRow {
|
|
103
172
|
id: string;
|
|
104
173
|
organizationId: string;
|
|
105
|
-
name: string;
|
|
106
174
|
slug: string;
|
|
175
|
+
name: string;
|
|
176
|
+
summary: string;
|
|
107
177
|
description: string;
|
|
108
178
|
status: string;
|
|
179
|
+
ownerUserId: string;
|
|
180
|
+
creatorUserId: string;
|
|
181
|
+
workspaceId: string;
|
|
182
|
+
gitRepository: string | null;
|
|
183
|
+
startDate: Date | null;
|
|
184
|
+
targetDate: Date | null;
|
|
185
|
+
sourceSystem: string | null;
|
|
186
|
+
sourceId: string | null;
|
|
187
|
+
sourceMetadata: any | null;
|
|
109
188
|
createdAt: Date;
|
|
110
189
|
updatedAt: Date;
|
|
111
|
-
|
|
190
|
+
firstTaskStartedAt: Date | null;
|
|
112
191
|
}
|
|
113
|
-
export declare function
|
|
114
|
-
export declare const
|
|
115
|
-
export interface
|
|
192
|
+
export declare function updateProjectLifecycleByID(client: Client, args: UpdateProjectLifecycleByIDArgs): Promise<UpdateProjectLifecycleByIDRow | null>;
|
|
193
|
+
export declare const listProjectPermissionsQuery = "-- name: ListProjectPermissions :many\nSELECT\n id,\n project_id,\n principal_kind,\n principal_id,\n principal_slug,\n principal_display_name,\n permission_level,\n created_at\nFROM weave.project_shares\nWHERE organization_id = $1\n AND project_id = $2\nORDER BY principal_kind ASC, principal_display_name ASC";
|
|
194
|
+
export interface ListProjectPermissionsArgs {
|
|
195
|
+
organizationId: string;
|
|
196
|
+
projectId: string;
|
|
197
|
+
}
|
|
198
|
+
export interface ListProjectPermissionsRow {
|
|
116
199
|
id: string;
|
|
200
|
+
projectId: string;
|
|
201
|
+
principalKind: string;
|
|
202
|
+
principalId: string;
|
|
203
|
+
principalSlug: string;
|
|
204
|
+
principalDisplayName: string;
|
|
205
|
+
permissionLevel: string;
|
|
206
|
+
createdAt: Date;
|
|
207
|
+
}
|
|
208
|
+
export declare function listProjectPermissions(client: Client, args: ListProjectPermissionsArgs): Promise<ListProjectPermissionsRow[]>;
|
|
209
|
+
export declare const listProjectActivityQuery = "-- name: ListProjectActivity :many\nSELECT\n id,\n project_id,\n task_id,\n event_type,\n actor_id,\n actor_slug,\n actor_label,\n description,\n metadata,\n created_at\nFROM weave.project_activity\nWHERE organization_id = $1\n AND project_id = $2\nORDER BY created_at DESC\nLIMIT $3";
|
|
210
|
+
export interface ListProjectActivityArgs {
|
|
211
|
+
organizationId: string;
|
|
212
|
+
projectId: string;
|
|
213
|
+
pageLimit: string;
|
|
214
|
+
}
|
|
215
|
+
export interface ListProjectActivityRow {
|
|
216
|
+
id: string;
|
|
217
|
+
projectId: string;
|
|
218
|
+
taskId: string | null;
|
|
219
|
+
eventType: string;
|
|
220
|
+
actorId: string | null;
|
|
221
|
+
actorSlug: string | null;
|
|
222
|
+
actorLabel: string;
|
|
223
|
+
description: string;
|
|
224
|
+
metadata: any | null;
|
|
225
|
+
createdAt: Date;
|
|
226
|
+
}
|
|
227
|
+
export declare function listProjectActivity(client: Client, args: ListProjectActivityArgs): Promise<ListProjectActivityRow[]>;
|
|
228
|
+
export declare const createProjectActivityQuery = "-- name: CreateProjectActivity :exec\nINSERT INTO weave.project_activity (\n id,\n organization_id,\n project_id,\n task_id,\n event_type,\n actor_id,\n actor_slug,\n actor_label,\n description,\n metadata\n) VALUES (\n $1,\n $2,\n $3,\n $4,\n $5,\n $6,\n $7,\n $8,\n $9,\n $10\n)";
|
|
229
|
+
export interface CreateProjectActivityArgs {
|
|
230
|
+
id: string;
|
|
231
|
+
organizationId: string;
|
|
232
|
+
projectId: string;
|
|
233
|
+
taskId: string | null;
|
|
234
|
+
eventType: string;
|
|
235
|
+
actorId: string | null;
|
|
236
|
+
actorSlug: string | null;
|
|
237
|
+
actorLabel: string;
|
|
238
|
+
description: string;
|
|
239
|
+
metadata: any | null;
|
|
117
240
|
}
|
|
118
|
-
export declare function
|
|
241
|
+
export declare function createProjectActivity(client: Client, args: CreateProjectActivityArgs): Promise<void>;
|
|
119
242
|
export {};
|