Skip to content

Commit 7425977

Browse files
authored
Generate @bufbuild/connect-query query services for TypeScript (#128)
1 parent 06a3a65 commit 7425977

28 files changed

Lines changed: 2039 additions & 5 deletions

buf.gen.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,9 @@ plugins:
6060

6161
out: gen/typescript
6262

63+
- remote: buf.build/bufbuild/connect-query:v0.4.1
64+
include_imports: true
65+
out: gen/typescript
66+
6367
inputs:
6468
- directory: proto
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// @generated by protoc-gen-connect-query v0.4.1
2+
// @generated from file qdrant/cloud/account/v1/account.proto (package qdrant.cloud.account.v1, syntax proto3)
3+
/* eslint-disable */
4+
// @ts-nocheck
5+
6+
import { UnaryHooks } from "@bufbuild/connect-query";
7+
import { AcceptAccountInviteRequest, AcceptAccountInviteResponse, CreateAccountInviteRequest, CreateAccountInviteResponse, CreateAccountRequest, CreateAccountResponse, DeleteAccountInviteRequest, DeleteAccountInviteResponse, DeleteAccountMemberRequest, DeleteAccountMemberResponse, DeleteAccountRequest, DeleteAccountResponse, GetAccountInviteRequest, GetAccountInviteResponse, GetAccountMemberRequest, GetAccountMemberResponse, GetAccountRequest, GetAccountResponse, ListAccountInvitesRequest, ListAccountInvitesResponse, ListAccountMembersRequest, ListAccountMembersResponse, ListAccountsRequest, ListAccountsResponse, ListReceivedAccountInvitesRequest, ListReceivedAccountInvitesResponse, RejectAccountInviteRequest, RejectAccountInviteResponse, UpdateAccountRequest, UpdateAccountResponse } from "./account_pb.js";
8+
9+
export const listAccounts: UnaryHooks<ListAccountsRequest, ListAccountsResponse>;
10+
export const getAccount: UnaryHooks<GetAccountRequest, GetAccountResponse>;
11+
export const createAccount: UnaryHooks<CreateAccountRequest, CreateAccountResponse>;
12+
export const updateAccount: UnaryHooks<UpdateAccountRequest, UpdateAccountResponse>;
13+
export const deleteAccount: UnaryHooks<DeleteAccountRequest, DeleteAccountResponse>;
14+
export const listAccountInvites: UnaryHooks<ListAccountInvitesRequest, ListAccountInvitesResponse>;
15+
export const listReceivedAccountInvites: UnaryHooks<ListReceivedAccountInvitesRequest, ListReceivedAccountInvitesResponse>;
16+
export const getAccountInvite: UnaryHooks<GetAccountInviteRequest, GetAccountInviteResponse>;
17+
export const createAccountInvite: UnaryHooks<CreateAccountInviteRequest, CreateAccountInviteResponse>;
18+
export const deleteAccountInvite: UnaryHooks<DeleteAccountInviteRequest, DeleteAccountInviteResponse>;
19+
export const acceptAccountInvite: UnaryHooks<AcceptAccountInviteRequest, AcceptAccountInviteResponse>;
20+
export const rejectAccountInvite: UnaryHooks<RejectAccountInviteRequest, RejectAccountInviteResponse>;
21+
export const listAccountMembers: UnaryHooks<ListAccountMembersRequest, ListAccountMembersResponse>;
22+
export const getAccountMember: UnaryHooks<GetAccountMemberRequest, GetAccountMemberResponse>;
23+
export const deleteAccountMember: UnaryHooks<DeleteAccountMemberRequest, DeleteAccountMemberResponse>;
Lines changed: 333 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,333 @@
1+
// @generated by protoc-gen-connect-query v0.4.1
2+
// @generated from file qdrant/cloud/account/v1/account.proto (package qdrant.cloud.account.v1, syntax proto3)
3+
/* eslint-disable */
4+
// @ts-nocheck
5+
6+
import { createQueryService } from "@bufbuild/connect-query";
7+
import { MethodKind } from "@bufbuild/protobuf";
8+
import { AcceptAccountInviteRequest, AcceptAccountInviteResponse, CreateAccountInviteRequest, CreateAccountInviteResponse, CreateAccountRequest, CreateAccountResponse, DeleteAccountInviteRequest, DeleteAccountInviteResponse, DeleteAccountMemberRequest, DeleteAccountMemberResponse, DeleteAccountRequest, DeleteAccountResponse, GetAccountInviteRequest, GetAccountInviteResponse, GetAccountMemberRequest, GetAccountMemberResponse, GetAccountRequest, GetAccountResponse, ListAccountInvitesRequest, ListAccountInvitesResponse, ListAccountMembersRequest, ListAccountMembersResponse, ListAccountsRequest, ListAccountsResponse, ListReceivedAccountInvitesRequest, ListReceivedAccountInvitesResponse, RejectAccountInviteRequest, RejectAccountInviteResponse, UpdateAccountRequest, UpdateAccountResponse } from "./account_pb.js";
9+
10+
export const typeName = "qdrant.cloud.account.v1.AccountService";
11+
12+
/**
13+
* Lists all accounts associated with the authenticated actor, where the actor has the specified permission.
14+
* Required permissions:
15+
* - read:accounts
16+
*
17+
* @generated from rpc qdrant.cloud.account.v1.AccountService.ListAccounts
18+
*/
19+
export const listAccounts = createQueryService({
20+
service: {
21+
methods: {
22+
listAccounts: {
23+
name: "ListAccounts",
24+
kind: MethodKind.Unary,
25+
I: ListAccountsRequest,
26+
O: ListAccountsResponse,
27+
},
28+
},
29+
typeName: "qdrant.cloud.account.v1.AccountService",
30+
},
31+
}).listAccounts;
32+
33+
/**
34+
* Gets an account identified by the given ID.
35+
* Required permissions:
36+
* - read:account
37+
*
38+
* @generated from rpc qdrant.cloud.account.v1.AccountService.GetAccount
39+
*/
40+
export const getAccount = createQueryService({
41+
service: {
42+
methods: {
43+
getAccount: {
44+
name: "GetAccount",
45+
kind: MethodKind.Unary,
46+
I: GetAccountRequest,
47+
O: GetAccountResponse,
48+
},
49+
},
50+
typeName: "qdrant.cloud.account.v1.AccountService",
51+
},
52+
}).getAccount;
53+
54+
/**
55+
* Creates an account for the authenticated user.
56+
* Required permissions:
57+
* - None (authenticated only)
58+
*
59+
* @generated from rpc qdrant.cloud.account.v1.AccountService.CreateAccount
60+
*/
61+
export const createAccount = createQueryService({
62+
service: {
63+
methods: {
64+
createAccount: {
65+
name: "CreateAccount",
66+
kind: MethodKind.Unary,
67+
I: CreateAccountRequest,
68+
O: CreateAccountResponse,
69+
},
70+
},
71+
typeName: "qdrant.cloud.account.v1.AccountService",
72+
},
73+
}).createAccount;
74+
75+
/**
76+
* Updates an account identified by the given ID.
77+
* Required permissions:
78+
* - write:account
79+
*
80+
* @generated from rpc qdrant.cloud.account.v1.AccountService.UpdateAccount
81+
*/
82+
export const updateAccount = createQueryService({
83+
service: {
84+
methods: {
85+
updateAccount: {
86+
name: "UpdateAccount",
87+
kind: MethodKind.Unary,
88+
I: UpdateAccountRequest,
89+
O: UpdateAccountResponse,
90+
},
91+
},
92+
typeName: "qdrant.cloud.account.v1.AccountService",
93+
},
94+
}).updateAccount;
95+
96+
/**
97+
* Deletes an account identified by the given ID.
98+
* Required permissions:
99+
* - delete:account
100+
*
101+
* @generated from rpc qdrant.cloud.account.v1.AccountService.DeleteAccount
102+
*/
103+
export const deleteAccount = createQueryService({
104+
service: {
105+
methods: {
106+
deleteAccount: {
107+
name: "DeleteAccount",
108+
kind: MethodKind.Unary,
109+
I: DeleteAccountRequest,
110+
O: DeleteAccountResponse,
111+
},
112+
},
113+
typeName: "qdrant.cloud.account.v1.AccountService",
114+
},
115+
}).deleteAccount;
116+
117+
/**
118+
* Lists all account invites in the account identified by the given account ID.
119+
* Required permissions:
120+
* - read:invites
121+
*
122+
* @generated from rpc qdrant.cloud.account.v1.AccountService.ListAccountInvites
123+
*/
124+
export const listAccountInvites = createQueryService({
125+
service: {
126+
methods: {
127+
listAccountInvites: {
128+
name: "ListAccountInvites",
129+
kind: MethodKind.Unary,
130+
I: ListAccountInvitesRequest,
131+
O: ListAccountInvitesResponse,
132+
},
133+
},
134+
typeName: "qdrant.cloud.account.v1.AccountService",
135+
},
136+
}).listAccountInvites;
137+
138+
/**
139+
* Lists all account invites for the authenticated user (across all accounts).
140+
* These are the invites the user has received, not the ones they have sent.
141+
* Required permissions:
142+
* - None (authenticated only)
143+
*
144+
* @generated from rpc qdrant.cloud.account.v1.AccountService.ListReceivedAccountInvites
145+
*/
146+
export const listReceivedAccountInvites = createQueryService({
147+
service: {
148+
methods: {
149+
listReceivedAccountInvites: {
150+
name: "ListReceivedAccountInvites",
151+
kind: MethodKind.Unary,
152+
I: ListReceivedAccountInvitesRequest,
153+
O: ListReceivedAccountInvitesResponse,
154+
},
155+
},
156+
typeName: "qdrant.cloud.account.v1.AccountService",
157+
},
158+
}).listReceivedAccountInvites;
159+
160+
/**
161+
* Gets an account invite identified by the given account ID and invite ID.
162+
* Required permissions:
163+
* - read:invites
164+
*
165+
* @generated from rpc qdrant.cloud.account.v1.AccountService.GetAccountInvite
166+
*/
167+
export const getAccountInvite = createQueryService({
168+
service: {
169+
methods: {
170+
getAccountInvite: {
171+
name: "GetAccountInvite",
172+
kind: MethodKind.Unary,
173+
I: GetAccountInviteRequest,
174+
O: GetAccountInviteResponse,
175+
},
176+
},
177+
typeName: "qdrant.cloud.account.v1.AccountService",
178+
},
179+
}).getAccountInvite;
180+
181+
/**
182+
* Creates a new account invite.
183+
* Required permissions:
184+
* - write:invites
185+
*
186+
* @generated from rpc qdrant.cloud.account.v1.AccountService.CreateAccountInvite
187+
*/
188+
export const createAccountInvite = createQueryService({
189+
service: {
190+
methods: {
191+
createAccountInvite: {
192+
name: "CreateAccountInvite",
193+
kind: MethodKind.Unary,
194+
I: CreateAccountInviteRequest,
195+
O: CreateAccountInviteResponse,
196+
},
197+
},
198+
typeName: "qdrant.cloud.account.v1.AccountService",
199+
},
200+
}).createAccountInvite;
201+
202+
/**
203+
* Deletes an account invite.
204+
* Required permissions:
205+
* - delete:invites
206+
*
207+
* @generated from rpc qdrant.cloud.account.v1.AccountService.DeleteAccountInvite
208+
*/
209+
export const deleteAccountInvite = createQueryService({
210+
service: {
211+
methods: {
212+
deleteAccountInvite: {
213+
name: "DeleteAccountInvite",
214+
kind: MethodKind.Unary,
215+
I: DeleteAccountInviteRequest,
216+
O: DeleteAccountInviteResponse,
217+
},
218+
},
219+
typeName: "qdrant.cloud.account.v1.AccountService",
220+
},
221+
}).deleteAccountInvite;
222+
223+
/**
224+
* Accepts an account invite.
225+
* The authenticated user's email address must match the email address specified in
226+
* the invite.
227+
* Required permissions:
228+
* - None (authenticated only)
229+
*
230+
* @generated from rpc qdrant.cloud.account.v1.AccountService.AcceptAccountInvite
231+
*/
232+
export const acceptAccountInvite = createQueryService({
233+
service: {
234+
methods: {
235+
acceptAccountInvite: {
236+
name: "AcceptAccountInvite",
237+
kind: MethodKind.Unary,
238+
I: AcceptAccountInviteRequest,
239+
O: AcceptAccountInviteResponse,
240+
},
241+
},
242+
typeName: "qdrant.cloud.account.v1.AccountService",
243+
},
244+
}).acceptAccountInvite;
245+
246+
/**
247+
* Rejects an account invite.
248+
* The authenticated user's email address must match the email address specified in
249+
* the invite.
250+
* Required permissions:
251+
* - None (authenticated only)
252+
*
253+
* @generated from rpc qdrant.cloud.account.v1.AccountService.RejectAccountInvite
254+
*/
255+
export const rejectAccountInvite = createQueryService({
256+
service: {
257+
methods: {
258+
rejectAccountInvite: {
259+
name: "RejectAccountInvite",
260+
kind: MethodKind.Unary,
261+
I: RejectAccountInviteRequest,
262+
O: RejectAccountInviteResponse,
263+
},
264+
},
265+
typeName: "qdrant.cloud.account.v1.AccountService",
266+
},
267+
}).rejectAccountInvite;
268+
269+
/**
270+
* Lists all account members in the account identified by the given account ID.
271+
* The authenticated actor must be a member of the account identified by the given account ID.
272+
* Required permissions:
273+
* - read:users
274+
*
275+
* @generated from rpc qdrant.cloud.account.v1.AccountService.ListAccountMembers
276+
*/
277+
export const listAccountMembers = createQueryService({
278+
service: {
279+
methods: {
280+
listAccountMembers: {
281+
name: "ListAccountMembers",
282+
kind: MethodKind.Unary,
283+
I: ListAccountMembersRequest,
284+
O: ListAccountMembersResponse,
285+
},
286+
},
287+
typeName: "qdrant.cloud.account.v1.AccountService",
288+
},
289+
}).listAccountMembers;
290+
291+
/**
292+
* Gets an account member by ID.
293+
* The authenticated actor must be a member of the same account as the member being fetch.
294+
* Required permissions:
295+
* - read:users
296+
*
297+
* @generated from rpc qdrant.cloud.account.v1.AccountService.GetAccountMember
298+
*/
299+
export const getAccountMember = createQueryService({
300+
service: {
301+
methods: {
302+
getAccountMember: {
303+
name: "GetAccountMember",
304+
kind: MethodKind.Unary,
305+
I: GetAccountMemberRequest,
306+
O: GetAccountMemberResponse,
307+
},
308+
},
309+
typeName: "qdrant.cloud.account.v1.AccountService",
310+
},
311+
}).getAccountMember;
312+
313+
/**
314+
* Deletes an account member.
315+
* The authenticated actor must be a member of the account from which the the member is being removed.
316+
* Required permissions:
317+
* - delete:users
318+
*
319+
* @generated from rpc qdrant.cloud.account.v1.AccountService.DeleteAccountMember
320+
*/
321+
export const deleteAccountMember = createQueryService({
322+
service: {
323+
methods: {
324+
deleteAccountMember: {
325+
name: "DeleteAccountMember",
326+
kind: MethodKind.Unary,
327+
I: DeleteAccountMemberRequest,
328+
O: DeleteAccountMemberResponse,
329+
},
330+
},
331+
typeName: "qdrant.cloud.account.v1.AccountService",
332+
},
333+
}).deleteAccountMember;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// @generated by protoc-gen-connect-query v0.4.1
2+
// @generated from file qdrant/cloud/auth/v1/auth.proto (package qdrant.cloud.auth.v1, syntax proto3)
3+
/* eslint-disable */
4+
// @ts-nocheck
5+
6+
import { UnaryHooks } from "@bufbuild/connect-query";
7+
import { CreateManagementKeyRequest, CreateManagementKeyResponse, DeleteManagementKeyRequest, DeleteManagementKeyResponse, ListManagementKeysRequest, ListManagementKeysResponse } from "./auth_pb.js";
8+
9+
export const listManagementKeys: UnaryHooks<ListManagementKeysRequest, ListManagementKeysResponse>;
10+
export const createManagementKey: UnaryHooks<CreateManagementKeyRequest, CreateManagementKeyResponse>;
11+
export const deleteManagementKey: UnaryHooks<DeleteManagementKeyRequest, DeleteManagementKeyResponse>;

0 commit comments

Comments
 (0)