weave-typescript 0.37.0 → 0.39.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 +42 -0
- package/dist/weaveapi/auth/v1/service.pb.d.ts +22 -0
- package/dist/weaveapi/auth/v1/service.pb.js +28 -2
- package/dist/weaveapi/consolidation/v1/consolidation.pb.d.ts +1 -0
- package/dist/weaveapi/consolidation/v1/consolidation.pb.js +6 -0
- package/dist/weaveapi/ingestion/v1/ingestion.pb.d.ts +92 -0
- package/dist/weaveapi/ingestion/v1/ingestion.pb.js +1512 -127
- package/dist/weaveapi/ingestion/v1/service.pb.d.ts +71 -1
- package/dist/weaveapi/ingestion/v1/service.pb.js +410 -0
- package/dist/weaveapi/retrieval/v1/retrieval.pb.d.ts +3 -1
- package/dist/weaveapi/retrieval/v1/retrieval.pb.js +62 -16
- package/dist/weavesql/weavedb/auth_identity_sql.d.ts +23 -2
- package/dist/weavesql/weavedb/auth_identity_sql.js +60 -11
- package/dist/weavesql/weavedb/consolidation_sql.d.ts +2 -2
- package/dist/weavesql/weavedb/consolidation_sql.js +15 -5
- package/dist/weavesql/weavedb/document_security_sql.d.ts +197 -46
- package/dist/weavesql/weavedb/document_security_sql.js +432 -134
- package/dist/weavesql/weavedb/ingestion_sql.d.ts +9 -18
- package/dist/weavesql/weavedb/ingestion_sql.js +124 -101
- package/dist/weavesql/weavedb/retrieval_sql.d.ts +6 -7
- package/dist/weavesql/weavedb/retrieval_sql.js +136 -51
- package/package.json +2 -2
|
@@ -2,10 +2,9 @@ import { QueryArrayConfig, QueryArrayResult } from "pg";
|
|
|
2
2
|
interface Client {
|
|
3
3
|
query: (config: QueryArrayConfig) => Promise<QueryArrayResult>;
|
|
4
4
|
}
|
|
5
|
-
export declare const setDocumentSecurityQuery = "-- name: SetDocumentSecurity :one\nUPDATE weave.documents\nSET\n scope = $1,\n
|
|
5
|
+
export declare const setDocumentSecurityQuery = "-- name: SetDocumentSecurity :one\nUPDATE weave.documents\nSET\n scope = $1,\n updated_at = now()\nWHERE organization_id = $2\n AND id = $3\nRETURNING\n id,\n organization_id,\n filename,\n mime_type,\n parser_name,\n fingerprint,\n storage_ref,\n status,\n scope,\n uploaded_by_user_id,\n uploaded_at,\n updated_at,\n page_count,\n char_count,\n metadata";
|
|
6
6
|
export interface SetDocumentSecurityArgs {
|
|
7
7
|
scope: string;
|
|
8
|
-
sensitivityTags: string[];
|
|
9
8
|
organizationId: string;
|
|
10
9
|
documentId: string;
|
|
11
10
|
}
|
|
@@ -19,7 +18,6 @@ export interface SetDocumentSecurityRow {
|
|
|
19
18
|
storageRef: string;
|
|
20
19
|
status: string;
|
|
21
20
|
scope: string;
|
|
22
|
-
sensitivityTags: string[];
|
|
23
21
|
uploadedByUserId: string;
|
|
24
22
|
uploadedAt: Date;
|
|
25
23
|
updatedAt: Date;
|
|
@@ -28,101 +26,254 @@ export interface SetDocumentSecurityRow {
|
|
|
28
26
|
metadata: any;
|
|
29
27
|
}
|
|
30
28
|
export declare function setDocumentSecurity(client: Client, args: SetDocumentSecurityArgs): Promise<SetDocumentSecurityRow | null>;
|
|
31
|
-
export declare const
|
|
32
|
-
export interface
|
|
29
|
+
export declare const listRestrictedGroupsQuery = "-- name: ListRestrictedGroups :many\nSELECT\n id,\n organization_id,\n slug,\n name,\n description,\n active,\n created_at,\n updated_at\nFROM weave.restricted_groups\nWHERE organization_id = $1\nORDER BY name ASC, slug ASC";
|
|
30
|
+
export interface ListRestrictedGroupsArgs {
|
|
31
|
+
organizationId: string;
|
|
32
|
+
}
|
|
33
|
+
export interface ListRestrictedGroupsRow {
|
|
34
|
+
id: string;
|
|
33
35
|
organizationId: string;
|
|
34
36
|
slug: string;
|
|
35
|
-
|
|
37
|
+
name: string;
|
|
36
38
|
description: string;
|
|
37
|
-
extractionHint: string;
|
|
38
39
|
active: boolean;
|
|
40
|
+
createdAt: Date;
|
|
41
|
+
updatedAt: Date;
|
|
39
42
|
}
|
|
40
|
-
export
|
|
43
|
+
export declare function listRestrictedGroups(client: Client, args: ListRestrictedGroupsArgs): Promise<ListRestrictedGroupsRow[]>;
|
|
44
|
+
export declare const getRestrictedGroupQuery = "-- name: GetRestrictedGroup :one\nSELECT\n id,\n organization_id,\n slug,\n name,\n description,\n active,\n created_at,\n updated_at\nFROM weave.restricted_groups\nWHERE organization_id = $1\n AND id = $2";
|
|
45
|
+
export interface GetRestrictedGroupArgs {
|
|
46
|
+
organizationId: string;
|
|
47
|
+
restrictedGroupId: string;
|
|
48
|
+
}
|
|
49
|
+
export interface GetRestrictedGroupRow {
|
|
50
|
+
id: string;
|
|
41
51
|
organizationId: string;
|
|
42
52
|
slug: string;
|
|
43
|
-
|
|
53
|
+
name: string;
|
|
44
54
|
description: string;
|
|
45
|
-
extractionHint: string;
|
|
46
55
|
active: boolean;
|
|
47
56
|
createdAt: Date;
|
|
48
57
|
updatedAt: Date;
|
|
49
58
|
}
|
|
50
|
-
export declare function
|
|
51
|
-
export declare const
|
|
52
|
-
export interface
|
|
59
|
+
export declare function getRestrictedGroup(client: Client, args: GetRestrictedGroupArgs): Promise<GetRestrictedGroupRow | null>;
|
|
60
|
+
export declare const getRestrictedGroupBySlugQuery = "-- name: GetRestrictedGroupBySlug :one\nSELECT\n id,\n organization_id,\n slug,\n name,\n description,\n active,\n created_at,\n updated_at\nFROM weave.restricted_groups\nWHERE organization_id = $1\n AND slug = $2";
|
|
61
|
+
export interface GetRestrictedGroupBySlugArgs {
|
|
53
62
|
organizationId: string;
|
|
63
|
+
slug: string;
|
|
54
64
|
}
|
|
55
|
-
export interface
|
|
65
|
+
export interface GetRestrictedGroupBySlugRow {
|
|
66
|
+
id: string;
|
|
56
67
|
organizationId: string;
|
|
57
68
|
slug: string;
|
|
58
|
-
|
|
69
|
+
name: string;
|
|
59
70
|
description: string;
|
|
60
|
-
extractionHint: string;
|
|
61
71
|
active: boolean;
|
|
62
72
|
createdAt: Date;
|
|
63
73
|
updatedAt: Date;
|
|
64
74
|
}
|
|
65
|
-
export declare function
|
|
66
|
-
export declare const
|
|
67
|
-
export interface
|
|
75
|
+
export declare function getRestrictedGroupBySlug(client: Client, args: GetRestrictedGroupBySlugArgs): Promise<GetRestrictedGroupBySlugRow | null>;
|
|
76
|
+
export declare const upsertRestrictedGroupQuery = "-- name: UpsertRestrictedGroup :one\nINSERT INTO weave.restricted_groups (\n id,\n organization_id,\n slug,\n name,\n description,\n active\n) VALUES (\n $1,\n $2,\n $3,\n $4,\n $5,\n $6\n)\nON CONFLICT (organization_id, slug) DO UPDATE\nSET\n name = EXCLUDED.name,\n description = EXCLUDED.description,\n active = EXCLUDED.active,\n updated_at = now()\nRETURNING\n id,\n organization_id,\n slug,\n name,\n description,\n active,\n created_at,\n updated_at";
|
|
77
|
+
export interface UpsertRestrictedGroupArgs {
|
|
78
|
+
id: string;
|
|
68
79
|
organizationId: string;
|
|
80
|
+
slug: string;
|
|
81
|
+
name: string;
|
|
82
|
+
description: string;
|
|
83
|
+
active: boolean;
|
|
69
84
|
}
|
|
70
|
-
export interface
|
|
85
|
+
export interface UpsertRestrictedGroupRow {
|
|
86
|
+
id: string;
|
|
71
87
|
organizationId: string;
|
|
72
88
|
slug: string;
|
|
73
|
-
|
|
89
|
+
name: string;
|
|
74
90
|
description: string;
|
|
75
|
-
extractionHint: string;
|
|
76
91
|
active: boolean;
|
|
77
92
|
createdAt: Date;
|
|
78
93
|
updatedAt: Date;
|
|
79
94
|
}
|
|
80
|
-
export declare function
|
|
81
|
-
export declare const
|
|
82
|
-
export interface
|
|
83
|
-
organizationId: string;
|
|
95
|
+
export declare function upsertRestrictedGroup(client: Client, args: UpsertRestrictedGroupArgs): Promise<UpsertRestrictedGroupRow | null>;
|
|
96
|
+
export declare const updateRestrictedGroupQuery = "-- name: UpdateRestrictedGroup :one\nUPDATE weave.restricted_groups\nSET\n slug = $1,\n name = $2,\n description = $3,\n active = $4,\n updated_at = now()\nWHERE organization_id = $5\n AND id = $6\nRETURNING\n id,\n organization_id,\n slug,\n name,\n description,\n active,\n created_at,\n updated_at";
|
|
97
|
+
export interface UpdateRestrictedGroupArgs {
|
|
84
98
|
slug: string;
|
|
99
|
+
name: string;
|
|
100
|
+
description: string;
|
|
101
|
+
active: boolean;
|
|
102
|
+
organizationId: string;
|
|
103
|
+
restrictedGroupId: string;
|
|
85
104
|
}
|
|
86
|
-
export interface
|
|
105
|
+
export interface UpdateRestrictedGroupRow {
|
|
106
|
+
id: string;
|
|
87
107
|
organizationId: string;
|
|
88
108
|
slug: string;
|
|
89
|
-
|
|
109
|
+
name: string;
|
|
90
110
|
description: string;
|
|
91
|
-
extractionHint: string;
|
|
92
111
|
active: boolean;
|
|
93
112
|
createdAt: Date;
|
|
94
113
|
updatedAt: Date;
|
|
95
114
|
}
|
|
96
|
-
export declare function
|
|
97
|
-
export declare const
|
|
98
|
-
export interface
|
|
115
|
+
export declare function updateRestrictedGroup(client: Client, args: UpdateRestrictedGroupArgs): Promise<UpdateRestrictedGroupRow | null>;
|
|
116
|
+
export declare const deleteRestrictedGroupQuery = "-- name: DeleteRestrictedGroup :execrows\nDELETE FROM weave.restricted_groups\nWHERE organization_id = $1\n AND id = $2";
|
|
117
|
+
export interface DeleteRestrictedGroupArgs {
|
|
99
118
|
organizationId: string;
|
|
100
|
-
|
|
101
|
-
sensitivityTagSlug: string;
|
|
119
|
+
restrictedGroupId: string;
|
|
102
120
|
}
|
|
103
|
-
export
|
|
121
|
+
export declare const countRestrictedGroupDocumentsQuery = "-- name: CountRestrictedGroupDocuments :one\nSELECT COUNT(DISTINCT document_id)::int AS document_count\nFROM weave.document_restricted_groups\nWHERE organization_id = $1\n AND restricted_group_id = $2";
|
|
122
|
+
export interface CountRestrictedGroupDocumentsArgs {
|
|
104
123
|
organizationId: string;
|
|
124
|
+
restrictedGroupId: string;
|
|
125
|
+
}
|
|
126
|
+
export interface CountRestrictedGroupDocumentsRow {
|
|
127
|
+
documentCount: number;
|
|
128
|
+
}
|
|
129
|
+
export declare function countRestrictedGroupDocuments(client: Client, args: CountRestrictedGroupDocumentsArgs): Promise<CountRestrictedGroupDocumentsRow | null>;
|
|
130
|
+
export declare const countRestrictedGroupUsersQuery = "-- name: CountRestrictedGroupUsers :one\nSELECT COUNT(*)::int AS user_count\nFROM weave.restricted_group_user_memberships\nWHERE organization_id = $1\n AND restricted_group_id = $2";
|
|
131
|
+
export interface CountRestrictedGroupUsersArgs {
|
|
132
|
+
organizationId: string;
|
|
133
|
+
restrictedGroupId: string;
|
|
134
|
+
}
|
|
135
|
+
export interface CountRestrictedGroupUsersRow {
|
|
136
|
+
userCount: number;
|
|
137
|
+
}
|
|
138
|
+
export declare function countRestrictedGroupUsers(client: Client, args: CountRestrictedGroupUsersArgs): Promise<CountRestrictedGroupUsersRow | null>;
|
|
139
|
+
export declare const countRestrictedGroupTeamsQuery = "-- name: CountRestrictedGroupTeams :one\nSELECT COUNT(*)::int AS team_count\nFROM weave.restricted_group_team_memberships\nWHERE organization_id = $1\n AND restricted_group_id = $2";
|
|
140
|
+
export interface CountRestrictedGroupTeamsArgs {
|
|
141
|
+
organizationId: string;
|
|
142
|
+
restrictedGroupId: string;
|
|
143
|
+
}
|
|
144
|
+
export interface CountRestrictedGroupTeamsRow {
|
|
145
|
+
teamCount: number;
|
|
146
|
+
}
|
|
147
|
+
export declare function countRestrictedGroupTeams(client: Client, args: CountRestrictedGroupTeamsArgs): Promise<CountRestrictedGroupTeamsRow | null>;
|
|
148
|
+
export declare const listRestrictedGroupUserMembershipsQuery = "-- name: ListRestrictedGroupUserMemberships :many\nSELECT\n organization_id,\n restricted_group_id,\n user_id,\n created_at\nFROM weave.restricted_group_user_memberships\nWHERE organization_id = $1\n AND restricted_group_id = $2\nORDER BY created_at ASC, user_id ASC";
|
|
149
|
+
export interface ListRestrictedGroupUserMembershipsArgs {
|
|
150
|
+
organizationId: string;
|
|
151
|
+
restrictedGroupId: string;
|
|
152
|
+
}
|
|
153
|
+
export interface ListRestrictedGroupUserMembershipsRow {
|
|
154
|
+
organizationId: string;
|
|
155
|
+
restrictedGroupId: string;
|
|
105
156
|
userId: string;
|
|
106
|
-
sensitivityTagSlug: string;
|
|
107
157
|
createdAt: Date;
|
|
108
158
|
}
|
|
109
|
-
export declare function
|
|
110
|
-
export declare const
|
|
111
|
-
export interface
|
|
159
|
+
export declare function listRestrictedGroupUserMemberships(client: Client, args: ListRestrictedGroupUserMembershipsArgs): Promise<ListRestrictedGroupUserMembershipsRow[]>;
|
|
160
|
+
export declare const deleteRestrictedGroupUserMembershipsQuery = "-- name: DeleteRestrictedGroupUserMemberships :execrows\nDELETE FROM weave.restricted_group_user_memberships\nWHERE organization_id = $1\n AND restricted_group_id = $2";
|
|
161
|
+
export interface DeleteRestrictedGroupUserMembershipsArgs {
|
|
112
162
|
organizationId: string;
|
|
113
|
-
|
|
114
|
-
sensitivityTagSlug: string;
|
|
163
|
+
restrictedGroupId: string;
|
|
115
164
|
}
|
|
116
|
-
export declare const
|
|
117
|
-
export interface
|
|
165
|
+
export declare const addRestrictedGroupUserMembershipQuery = "-- name: AddRestrictedGroupUserMembership :one\nINSERT INTO weave.restricted_group_user_memberships (\n organization_id,\n restricted_group_id,\n user_id\n) VALUES (\n $1,\n $2,\n $3\n)\nON CONFLICT DO NOTHING\nRETURNING organization_id, restricted_group_id, user_id, created_at";
|
|
166
|
+
export interface AddRestrictedGroupUserMembershipArgs {
|
|
118
167
|
organizationId: string;
|
|
168
|
+
restrictedGroupId: string;
|
|
119
169
|
userId: string;
|
|
120
170
|
}
|
|
121
|
-
export interface
|
|
171
|
+
export interface AddRestrictedGroupUserMembershipRow {
|
|
122
172
|
organizationId: string;
|
|
173
|
+
restrictedGroupId: string;
|
|
123
174
|
userId: string;
|
|
124
|
-
sensitivityTagSlug: string;
|
|
125
175
|
createdAt: Date;
|
|
126
176
|
}
|
|
127
|
-
export declare function
|
|
177
|
+
export declare function addRestrictedGroupUserMembership(client: Client, args: AddRestrictedGroupUserMembershipArgs): Promise<AddRestrictedGroupUserMembershipRow | null>;
|
|
178
|
+
export declare const listRestrictedGroupTeamMembershipsQuery = "-- name: ListRestrictedGroupTeamMemberships :many\nSELECT\n organization_id,\n restricted_group_id,\n org_team_id,\n created_at\nFROM weave.restricted_group_team_memberships\nWHERE organization_id = $1\n AND restricted_group_id = $2\nORDER BY created_at ASC, org_team_id ASC";
|
|
179
|
+
export interface ListRestrictedGroupTeamMembershipsArgs {
|
|
180
|
+
organizationId: string;
|
|
181
|
+
restrictedGroupId: string;
|
|
182
|
+
}
|
|
183
|
+
export interface ListRestrictedGroupTeamMembershipsRow {
|
|
184
|
+
organizationId: string;
|
|
185
|
+
restrictedGroupId: string;
|
|
186
|
+
orgTeamId: string;
|
|
187
|
+
createdAt: Date;
|
|
188
|
+
}
|
|
189
|
+
export declare function listRestrictedGroupTeamMemberships(client: Client, args: ListRestrictedGroupTeamMembershipsArgs): Promise<ListRestrictedGroupTeamMembershipsRow[]>;
|
|
190
|
+
export declare const deleteRestrictedGroupTeamMembershipsQuery = "-- name: DeleteRestrictedGroupTeamMemberships :execrows\nDELETE FROM weave.restricted_group_team_memberships\nWHERE organization_id = $1\n AND restricted_group_id = $2";
|
|
191
|
+
export interface DeleteRestrictedGroupTeamMembershipsArgs {
|
|
192
|
+
organizationId: string;
|
|
193
|
+
restrictedGroupId: string;
|
|
194
|
+
}
|
|
195
|
+
export declare const addRestrictedGroupTeamMembershipQuery = "-- name: AddRestrictedGroupTeamMembership :one\nINSERT INTO weave.restricted_group_team_memberships (\n organization_id,\n restricted_group_id,\n org_team_id\n) VALUES (\n $1,\n $2,\n $3\n)\nON CONFLICT DO NOTHING\nRETURNING organization_id, restricted_group_id, org_team_id, created_at";
|
|
196
|
+
export interface AddRestrictedGroupTeamMembershipArgs {
|
|
197
|
+
organizationId: string;
|
|
198
|
+
restrictedGroupId: string;
|
|
199
|
+
orgTeamId: string;
|
|
200
|
+
}
|
|
201
|
+
export interface AddRestrictedGroupTeamMembershipRow {
|
|
202
|
+
organizationId: string;
|
|
203
|
+
restrictedGroupId: string;
|
|
204
|
+
orgTeamId: string;
|
|
205
|
+
createdAt: Date;
|
|
206
|
+
}
|
|
207
|
+
export declare function addRestrictedGroupTeamMembership(client: Client, args: AddRestrictedGroupTeamMembershipArgs): Promise<AddRestrictedGroupTeamMembershipRow | null>;
|
|
208
|
+
export declare const listDocumentRestrictedGroupsQuery = "-- name: ListDocumentRestrictedGroups :many\nSELECT\n rg.id,\n rg.organization_id,\n rg.slug,\n rg.name,\n rg.description,\n rg.active,\n rg.created_at,\n rg.updated_at\nFROM weave.document_restricted_groups drg\nJOIN weave.restricted_groups rg\n ON rg.organization_id = drg.organization_id\n AND rg.id = drg.restricted_group_id\nWHERE drg.organization_id = $1\n AND drg.document_id = $2\nORDER BY rg.name ASC, rg.slug ASC";
|
|
209
|
+
export interface ListDocumentRestrictedGroupsArgs {
|
|
210
|
+
organizationId: string;
|
|
211
|
+
documentId: string;
|
|
212
|
+
}
|
|
213
|
+
export interface ListDocumentRestrictedGroupsRow {
|
|
214
|
+
id: string;
|
|
215
|
+
organizationId: string;
|
|
216
|
+
slug: string;
|
|
217
|
+
name: string;
|
|
218
|
+
description: string;
|
|
219
|
+
active: boolean;
|
|
220
|
+
createdAt: Date;
|
|
221
|
+
updatedAt: Date;
|
|
222
|
+
}
|
|
223
|
+
export declare function listDocumentRestrictedGroups(client: Client, args: ListDocumentRestrictedGroupsArgs): Promise<ListDocumentRestrictedGroupsRow[]>;
|
|
224
|
+
export declare const listDocumentRestrictedGroupsByDocumentIDsQuery = "-- name: ListDocumentRestrictedGroupsByDocumentIDs :many\nSELECT\n drg.document_id,\n rg.id,\n rg.organization_id,\n rg.slug,\n rg.name,\n rg.description,\n rg.active,\n rg.created_at,\n rg.updated_at\nFROM weave.document_restricted_groups drg\nJOIN weave.restricted_groups rg\n ON rg.organization_id = drg.organization_id\n AND rg.id = drg.restricted_group_id\nWHERE drg.organization_id = $1\n AND drg.document_id = ANY($2::uuid[])\nORDER BY drg.document_id ASC, rg.name ASC, rg.slug ASC";
|
|
225
|
+
export interface ListDocumentRestrictedGroupsByDocumentIDsArgs {
|
|
226
|
+
organizationId: string;
|
|
227
|
+
documentIds: string[];
|
|
228
|
+
}
|
|
229
|
+
export interface ListDocumentRestrictedGroupsByDocumentIDsRow {
|
|
230
|
+
documentId: string;
|
|
231
|
+
id: string;
|
|
232
|
+
organizationId: string;
|
|
233
|
+
slug: string;
|
|
234
|
+
name: string;
|
|
235
|
+
description: string;
|
|
236
|
+
active: boolean;
|
|
237
|
+
createdAt: Date;
|
|
238
|
+
updatedAt: Date;
|
|
239
|
+
}
|
|
240
|
+
export declare function listDocumentRestrictedGroupsByDocumentIDs(client: Client, args: ListDocumentRestrictedGroupsByDocumentIDsArgs): Promise<ListDocumentRestrictedGroupsByDocumentIDsRow[]>;
|
|
241
|
+
export declare const deleteDocumentRestrictedGroupsQuery = "-- name: DeleteDocumentRestrictedGroups :execrows\nDELETE FROM weave.document_restricted_groups\nWHERE organization_id = $1\n AND document_id = $2";
|
|
242
|
+
export interface DeleteDocumentRestrictedGroupsArgs {
|
|
243
|
+
organizationId: string;
|
|
244
|
+
documentId: string;
|
|
245
|
+
}
|
|
246
|
+
export declare const deleteDocumentRestrictedGroupsByGroupQuery = "-- name: DeleteDocumentRestrictedGroupsByGroup :execrows\nDELETE FROM weave.document_restricted_groups\nWHERE organization_id = $1\n AND restricted_group_id = $2";
|
|
247
|
+
export interface DeleteDocumentRestrictedGroupsByGroupArgs {
|
|
248
|
+
organizationId: string;
|
|
249
|
+
restrictedGroupId: string;
|
|
250
|
+
}
|
|
251
|
+
export declare const addDocumentRestrictedGroupQuery = "-- name: AddDocumentRestrictedGroup :one\nINSERT INTO weave.document_restricted_groups (\n organization_id,\n document_id,\n restricted_group_id\n) VALUES (\n $1,\n $2,\n $3\n)\nON CONFLICT DO NOTHING\nRETURNING organization_id, document_id, restricted_group_id, created_at";
|
|
252
|
+
export interface AddDocumentRestrictedGroupArgs {
|
|
253
|
+
organizationId: string;
|
|
254
|
+
documentId: string;
|
|
255
|
+
restrictedGroupId: string;
|
|
256
|
+
}
|
|
257
|
+
export interface AddDocumentRestrictedGroupRow {
|
|
258
|
+
organizationId: string;
|
|
259
|
+
documentId: string;
|
|
260
|
+
restrictedGroupId: string;
|
|
261
|
+
createdAt: Date;
|
|
262
|
+
}
|
|
263
|
+
export declare function addDocumentRestrictedGroup(client: Client, args: AddDocumentRestrictedGroupArgs): Promise<AddDocumentRestrictedGroupRow | null>;
|
|
264
|
+
export declare const addDocumentRestrictedGroupsForDocumentsQuery = "-- name: AddDocumentRestrictedGroupsForDocuments :execrows\nINSERT INTO weave.document_restricted_groups (\n organization_id,\n document_id,\n restricted_group_id\n)\nSELECT\n $1,\n document_id,\n restricted_group_id\nFROM unnest($2::uuid[]) AS document_id\nCROSS JOIN unnest($3::uuid[]) AS restricted_group_id\nON CONFLICT DO NOTHING";
|
|
265
|
+
export interface AddDocumentRestrictedGroupsForDocumentsArgs {
|
|
266
|
+
organizationId: string;
|
|
267
|
+
documentIds: string[];
|
|
268
|
+
restrictedGroupIds: string[];
|
|
269
|
+
}
|
|
270
|
+
export declare const listDocumentIDsByRestrictedGroupQuery = "-- name: ListDocumentIDsByRestrictedGroup :many\nSELECT DISTINCT document_id\nFROM weave.document_restricted_groups\nWHERE organization_id = $1\n AND restricted_group_id = $2\nORDER BY document_id ASC";
|
|
271
|
+
export interface ListDocumentIDsByRestrictedGroupArgs {
|
|
272
|
+
organizationId: string;
|
|
273
|
+
restrictedGroupId: string;
|
|
274
|
+
}
|
|
275
|
+
export interface ListDocumentIDsByRestrictedGroupRow {
|
|
276
|
+
documentId: string;
|
|
277
|
+
}
|
|
278
|
+
export declare function listDocumentIDsByRestrictedGroup(client: Client, args: ListDocumentIDsByRestrictedGroupArgs): Promise<ListDocumentIDsByRestrictedGroupRow[]>;
|
|
128
279
|
export {};
|