@middlewr/contracts 0.0.4 → 0.0.6
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/cjs/index.d.ts +40 -32
- package/cjs/index.d.ts.map +1 -1
- package/cjs/index.js +22 -22
- package/esm/index.d.ts +40 -32
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +22 -22
- package/package.json +1 -1
package/cjs/index.d.ts
CHANGED
|
@@ -7,14 +7,16 @@ export * from './users.schema';
|
|
|
7
7
|
export * from './workspaces.schema';
|
|
8
8
|
export declare const usersContract: {
|
|
9
9
|
me: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
user: z.ZodObject<{
|
|
11
|
+
id: z.ZodString;
|
|
12
|
+
external_id: z.ZodString;
|
|
13
|
+
email: z.ZodString;
|
|
14
|
+
email_verified_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
15
|
+
first_name: z.ZodNullable<z.ZodString>;
|
|
16
|
+
last_name: z.ZodNullable<z.ZodString>;
|
|
17
|
+
created_at: z.ZodCoercedDate<unknown>;
|
|
18
|
+
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
19
|
+
}, z.core.$strip>;
|
|
18
20
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
19
21
|
signIn: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
20
22
|
first_name: z.ZodOptional<z.ZodString>;
|
|
@@ -39,14 +41,16 @@ export declare const usersContract: {
|
|
|
39
41
|
first_name: z.ZodOptional<z.ZodString>;
|
|
40
42
|
last_name: z.ZodOptional<z.ZodString>;
|
|
41
43
|
}, z.core.$strip>, z.ZodObject<{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
user: z.ZodObject<{
|
|
45
|
+
id: z.ZodString;
|
|
46
|
+
external_id: z.ZodString;
|
|
47
|
+
email: z.ZodString;
|
|
48
|
+
email_verified_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
49
|
+
first_name: z.ZodNullable<z.ZodString>;
|
|
50
|
+
last_name: z.ZodNullable<z.ZodString>;
|
|
51
|
+
created_at: z.ZodCoercedDate<unknown>;
|
|
52
|
+
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
53
|
+
}, z.core.$strip>;
|
|
50
54
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
51
55
|
};
|
|
52
56
|
export declare const workspacesContract: {
|
|
@@ -392,14 +396,16 @@ export declare const tagsContract: {
|
|
|
392
396
|
export declare const contract: {
|
|
393
397
|
users: {
|
|
394
398
|
me: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
399
|
+
user: z.ZodObject<{
|
|
400
|
+
id: z.ZodString;
|
|
401
|
+
external_id: z.ZodString;
|
|
402
|
+
email: z.ZodString;
|
|
403
|
+
email_verified_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
404
|
+
first_name: z.ZodNullable<z.ZodString>;
|
|
405
|
+
last_name: z.ZodNullable<z.ZodString>;
|
|
406
|
+
created_at: z.ZodCoercedDate<unknown>;
|
|
407
|
+
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
408
|
+
}, z.core.$strip>;
|
|
403
409
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
404
410
|
signIn: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
405
411
|
first_name: z.ZodOptional<z.ZodString>;
|
|
@@ -424,14 +430,16 @@ export declare const contract: {
|
|
|
424
430
|
first_name: z.ZodOptional<z.ZodString>;
|
|
425
431
|
last_name: z.ZodOptional<z.ZodString>;
|
|
426
432
|
}, z.core.$strip>, z.ZodObject<{
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
433
|
+
user: z.ZodObject<{
|
|
434
|
+
id: z.ZodString;
|
|
435
|
+
external_id: z.ZodString;
|
|
436
|
+
email: z.ZodString;
|
|
437
|
+
email_verified_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
438
|
+
first_name: z.ZodNullable<z.ZodString>;
|
|
439
|
+
last_name: z.ZodNullable<z.ZodString>;
|
|
440
|
+
created_at: z.ZodCoercedDate<unknown>;
|
|
441
|
+
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
442
|
+
}, z.core.$strip>;
|
|
435
443
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
436
444
|
};
|
|
437
445
|
workspaces: {
|
package/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAyBxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAE9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AAGpC,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAyBxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAE9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AAGpC,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CASzB,CAAC;AAGF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkD9B,CAAC;AAGF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;CAI/B,CAAC;AAGF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmBzB,CAAC;AAGF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBxB,CAAC;AAGF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMpB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC;AACvC,MAAM,MAAM,MAAM,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAC"}
|
package/cjs/index.js
CHANGED
|
@@ -252,43 +252,43 @@ var CreateInvitationInputSchema = import_zod5.z.object({
|
|
|
252
252
|
|
|
253
253
|
// src/contracts/index.ts
|
|
254
254
|
var usersContract = {
|
|
255
|
-
me: import_contract.oc.route({ method: "GET", path: "/api/users/me" }).output(UserSchema),
|
|
255
|
+
me: import_contract.oc.route({ method: "GET", path: "/api/users/me" }).output(import_zod6.z.object({ user: UserSchema })),
|
|
256
256
|
signIn: import_contract.oc.route({ method: "POST", path: "/api/users" }).input(SignInInputSchema).output(import_zod6.z.object({ user: UserSchema, status: import_zod6.z.enum(["created", "existing"]) })),
|
|
257
|
-
update: import_contract.oc.route({ method: "PATCH", path: "/api/users/me" }).input(UpdateUserInputSchema).output(UserSchema)
|
|
257
|
+
update: import_contract.oc.route({ method: "PATCH", path: "/api/users/me" }).input(UpdateUserInputSchema).output(import_zod6.z.object({ user: UserSchema }))
|
|
258
258
|
};
|
|
259
259
|
var workspacesContract = {
|
|
260
260
|
create: import_contract.oc.route({ method: "POST", path: "/api/workspaces" }).input(CreateWorkspaceInputSchema).output(WorkspaceSchema),
|
|
261
261
|
list: import_contract.oc.route({ method: "GET", path: "/api/workspaces" }).output(import_zod6.z.array(WorkspaceWithCountSchema)),
|
|
262
|
-
get: import_contract.oc.route({ method: "GET", path: "/api/workspaces/{
|
|
263
|
-
update: import_contract.oc.route({ method: "PATCH", path: "/api/workspaces/{
|
|
264
|
-
delete: import_contract.oc.route({ method: "DELETE", path: "/api/workspaces/{
|
|
265
|
-
transfer: import_contract.oc.route({ method: "POST", path: "/api/workspaces/{
|
|
262
|
+
get: import_contract.oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}" }).input(WorkspaceIdParamSchema).output(WorkspaceWithCountSchema),
|
|
263
|
+
update: import_contract.oc.route({ method: "PATCH", path: "/api/workspaces/{workspace_id}" }).input(WorkspaceIdParamSchema.merge(UpdateWorkspaceInputSchema)).output(WorkspaceSchema),
|
|
264
|
+
delete: import_contract.oc.route({ method: "DELETE", path: "/api/workspaces/{workspace_id}" }).input(WorkspaceIdParamSchema).output(import_zod6.z.void()),
|
|
265
|
+
transfer: import_contract.oc.route({ method: "POST", path: "/api/workspaces/{workspace_id}/transfer" }).input(WorkspaceIdParamSchema.merge(TransferOwnershipInputSchema)).output(import_zod6.z.void()),
|
|
266
266
|
// Members
|
|
267
|
-
listMembers: import_contract.oc.route({ method: "GET", path: "/api/workspaces/{
|
|
268
|
-
updateMember: import_contract.oc.route({ method: "PATCH", path: "/api/workspaces/{
|
|
269
|
-
removeMember: import_contract.oc.route({ method: "DELETE", path: "/api/workspaces/{
|
|
267
|
+
listMembers: import_contract.oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}/members" }).input(WorkspaceIdParamSchema).output(import_zod6.z.array(WorkspaceMemberSchema)),
|
|
268
|
+
updateMember: import_contract.oc.route({ method: "PATCH", path: "/api/workspaces/{workspace_id}/members/{user_id}" }).input(MemberIdParamSchema.merge(UpdateMemberInputSchema)).output(WorkspaceMemberSchema),
|
|
269
|
+
removeMember: import_contract.oc.route({ method: "DELETE", path: "/api/workspaces/{workspace_id}/members/{user_id}" }).input(MemberIdParamSchema).output(import_zod6.z.void()),
|
|
270
270
|
// Invitations
|
|
271
|
-
listInvitations: import_contract.oc.route({ method: "GET", path: "/api/workspaces/{
|
|
272
|
-
createInvitation: import_contract.oc.route({ method: "POST", path: "/api/workspaces/{
|
|
273
|
-
revokeInvitation: import_contract.oc.route({ method: "DELETE", path: "/api/workspaces/{
|
|
271
|
+
listInvitations: import_contract.oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}/invitations" }).input(WorkspaceIdParamSchema).output(import_zod6.z.array(WorkspaceInvitationSchema)),
|
|
272
|
+
createInvitation: import_contract.oc.route({ method: "POST", path: "/api/workspaces/{workspace_id}/invitations" }).input(WorkspaceIdParamSchema.merge(CreateInvitationInputSchema)).output(WorkspaceInvitationSchema),
|
|
273
|
+
revokeInvitation: import_contract.oc.route({ method: "DELETE", path: "/api/workspaces/{workspace_id}/invitations/{invitation_id}" }).input(InvitationIdParamSchema).output(import_zod6.z.void())
|
|
274
274
|
};
|
|
275
275
|
var invitationsContract = {
|
|
276
276
|
get: import_contract.oc.route({ method: "GET", path: "/api/invitations/{token}" }).input(TokenParamSchema).output(WorkspaceInvitationSchema),
|
|
277
277
|
accept: import_contract.oc.route({ method: "POST", path: "/api/invitations/{token}/accept" }).input(TokenParamSchema).output(WorkspaceMemberSchema)
|
|
278
278
|
};
|
|
279
279
|
var linksContract = {
|
|
280
|
-
create: import_contract.oc.route({ method: "POST", path: "/api/workspaces/{
|
|
281
|
-
list: import_contract.oc.route({ method: "GET", path: "/api/workspaces/{
|
|
282
|
-
get: import_contract.oc.route({ method: "GET", path: "/api/workspaces/{
|
|
283
|
-
update: import_contract.oc.route({ method: "PATCH", path: "/api/workspaces/{
|
|
284
|
-
delete: import_contract.oc.route({ method: "DELETE", path: "/api/workspaces/{
|
|
280
|
+
create: import_contract.oc.route({ method: "POST", path: "/api/workspaces/{workspace_id}/links" }).input(WorkspaceIdParamSchema.merge(CreateLinkInputSchema)).output(LinkSchema),
|
|
281
|
+
list: import_contract.oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}/links" }).input(WorkspaceIdParamSchema.merge(LinkFiltersSchema)).output(PaginatedLinksSchema),
|
|
282
|
+
get: import_contract.oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}/links/{link_id}" }).input(LinkIdParamSchema).output(LinkSchema),
|
|
283
|
+
update: import_contract.oc.route({ method: "PATCH", path: "/api/workspaces/{workspace_id}/links/{link_id}" }).input(LinkIdParamSchema.merge(UpdateLinkInputSchema)).output(LinkSchema),
|
|
284
|
+
delete: import_contract.oc.route({ method: "DELETE", path: "/api/workspaces/{workspace_id}/links/{link_id}" }).input(LinkIdParamSchema).output(import_zod6.z.void())
|
|
285
285
|
};
|
|
286
286
|
var tagsContract = {
|
|
287
|
-
create: import_contract.oc.route({ method: "POST", path: "/api/workspaces/{
|
|
288
|
-
list: import_contract.oc.route({ method: "GET", path: "/api/workspaces/{
|
|
289
|
-
get: import_contract.oc.route({ method: "GET", path: "/api/workspaces/{
|
|
290
|
-
update: import_contract.oc.route({ method: "PATCH", path: "/api/workspaces/{
|
|
291
|
-
delete: import_contract.oc.route({ method: "DELETE", path: "/api/workspaces/{
|
|
287
|
+
create: import_contract.oc.route({ method: "POST", path: "/api/workspaces/{workspace_id}/tags" }).input(WorkspaceIdParamSchema.merge(CreateTagInputSchema)).output(TagSchema),
|
|
288
|
+
list: import_contract.oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}/tags" }).input(WorkspaceIdParamSchema).output(import_zod6.z.array(TagSchema)),
|
|
289
|
+
get: import_contract.oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}/tags/{tag_id}" }).input(TagIdParamSchema).output(TagSchema),
|
|
290
|
+
update: import_contract.oc.route({ method: "PATCH", path: "/api/workspaces/{workspace_id}/tags/{tag_id}" }).input(TagIdParamSchema.merge(UpdateTagInputSchema)).output(TagSchema),
|
|
291
|
+
delete: import_contract.oc.route({ method: "DELETE", path: "/api/workspaces/{workspace_id}/tags/{tag_id}" }).input(TagIdParamSchema).output(import_zod6.z.void())
|
|
292
292
|
};
|
|
293
293
|
var contract = {
|
|
294
294
|
users: usersContract,
|
package/esm/index.d.ts
CHANGED
|
@@ -7,14 +7,16 @@ export * from './users.schema';
|
|
|
7
7
|
export * from './workspaces.schema';
|
|
8
8
|
export declare const usersContract: {
|
|
9
9
|
me: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
user: z.ZodObject<{
|
|
11
|
+
id: z.ZodString;
|
|
12
|
+
external_id: z.ZodString;
|
|
13
|
+
email: z.ZodString;
|
|
14
|
+
email_verified_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
15
|
+
first_name: z.ZodNullable<z.ZodString>;
|
|
16
|
+
last_name: z.ZodNullable<z.ZodString>;
|
|
17
|
+
created_at: z.ZodCoercedDate<unknown>;
|
|
18
|
+
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
19
|
+
}, z.core.$strip>;
|
|
18
20
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
19
21
|
signIn: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
20
22
|
first_name: z.ZodOptional<z.ZodString>;
|
|
@@ -39,14 +41,16 @@ export declare const usersContract: {
|
|
|
39
41
|
first_name: z.ZodOptional<z.ZodString>;
|
|
40
42
|
last_name: z.ZodOptional<z.ZodString>;
|
|
41
43
|
}, z.core.$strip>, z.ZodObject<{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
user: z.ZodObject<{
|
|
45
|
+
id: z.ZodString;
|
|
46
|
+
external_id: z.ZodString;
|
|
47
|
+
email: z.ZodString;
|
|
48
|
+
email_verified_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
49
|
+
first_name: z.ZodNullable<z.ZodString>;
|
|
50
|
+
last_name: z.ZodNullable<z.ZodString>;
|
|
51
|
+
created_at: z.ZodCoercedDate<unknown>;
|
|
52
|
+
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
53
|
+
}, z.core.$strip>;
|
|
50
54
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
51
55
|
};
|
|
52
56
|
export declare const workspacesContract: {
|
|
@@ -392,14 +396,16 @@ export declare const tagsContract: {
|
|
|
392
396
|
export declare const contract: {
|
|
393
397
|
users: {
|
|
394
398
|
me: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
399
|
+
user: z.ZodObject<{
|
|
400
|
+
id: z.ZodString;
|
|
401
|
+
external_id: z.ZodString;
|
|
402
|
+
email: z.ZodString;
|
|
403
|
+
email_verified_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
404
|
+
first_name: z.ZodNullable<z.ZodString>;
|
|
405
|
+
last_name: z.ZodNullable<z.ZodString>;
|
|
406
|
+
created_at: z.ZodCoercedDate<unknown>;
|
|
407
|
+
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
408
|
+
}, z.core.$strip>;
|
|
403
409
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
404
410
|
signIn: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
405
411
|
first_name: z.ZodOptional<z.ZodString>;
|
|
@@ -424,14 +430,16 @@ export declare const contract: {
|
|
|
424
430
|
first_name: z.ZodOptional<z.ZodString>;
|
|
425
431
|
last_name: z.ZodOptional<z.ZodString>;
|
|
426
432
|
}, z.core.$strip>, z.ZodObject<{
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
433
|
+
user: z.ZodObject<{
|
|
434
|
+
id: z.ZodString;
|
|
435
|
+
external_id: z.ZodString;
|
|
436
|
+
email: z.ZodString;
|
|
437
|
+
email_verified_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
438
|
+
first_name: z.ZodNullable<z.ZodString>;
|
|
439
|
+
last_name: z.ZodNullable<z.ZodString>;
|
|
440
|
+
created_at: z.ZodCoercedDate<unknown>;
|
|
441
|
+
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
442
|
+
}, z.core.$strip>;
|
|
435
443
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
436
444
|
};
|
|
437
445
|
workspaces: {
|
package/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAyBxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAE9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AAGpC,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAyBxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAE9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AAGpC,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CASzB,CAAC;AAGF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkD9B,CAAC;AAGF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;CAI/B,CAAC;AAGF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmBzB,CAAC;AAGF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBxB,CAAC;AAGF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMpB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC;AACvC,MAAM,MAAM,MAAM,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAC"}
|
package/esm/index.js
CHANGED
|
@@ -197,43 +197,43 @@ var CreateInvitationInputSchema = z5.object({
|
|
|
197
197
|
|
|
198
198
|
// src/contracts/index.ts
|
|
199
199
|
var usersContract = {
|
|
200
|
-
me: oc.route({ method: "GET", path: "/api/users/me" }).output(UserSchema),
|
|
200
|
+
me: oc.route({ method: "GET", path: "/api/users/me" }).output(z6.object({ user: UserSchema })),
|
|
201
201
|
signIn: oc.route({ method: "POST", path: "/api/users" }).input(SignInInputSchema).output(z6.object({ user: UserSchema, status: z6.enum(["created", "existing"]) })),
|
|
202
|
-
update: oc.route({ method: "PATCH", path: "/api/users/me" }).input(UpdateUserInputSchema).output(UserSchema)
|
|
202
|
+
update: oc.route({ method: "PATCH", path: "/api/users/me" }).input(UpdateUserInputSchema).output(z6.object({ user: UserSchema }))
|
|
203
203
|
};
|
|
204
204
|
var workspacesContract = {
|
|
205
205
|
create: oc.route({ method: "POST", path: "/api/workspaces" }).input(CreateWorkspaceInputSchema).output(WorkspaceSchema),
|
|
206
206
|
list: oc.route({ method: "GET", path: "/api/workspaces" }).output(z6.array(WorkspaceWithCountSchema)),
|
|
207
|
-
get: oc.route({ method: "GET", path: "/api/workspaces/{
|
|
208
|
-
update: oc.route({ method: "PATCH", path: "/api/workspaces/{
|
|
209
|
-
delete: oc.route({ method: "DELETE", path: "/api/workspaces/{
|
|
210
|
-
transfer: oc.route({ method: "POST", path: "/api/workspaces/{
|
|
207
|
+
get: oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}" }).input(WorkspaceIdParamSchema).output(WorkspaceWithCountSchema),
|
|
208
|
+
update: oc.route({ method: "PATCH", path: "/api/workspaces/{workspace_id}" }).input(WorkspaceIdParamSchema.merge(UpdateWorkspaceInputSchema)).output(WorkspaceSchema),
|
|
209
|
+
delete: oc.route({ method: "DELETE", path: "/api/workspaces/{workspace_id}" }).input(WorkspaceIdParamSchema).output(z6.void()),
|
|
210
|
+
transfer: oc.route({ method: "POST", path: "/api/workspaces/{workspace_id}/transfer" }).input(WorkspaceIdParamSchema.merge(TransferOwnershipInputSchema)).output(z6.void()),
|
|
211
211
|
// Members
|
|
212
|
-
listMembers: oc.route({ method: "GET", path: "/api/workspaces/{
|
|
213
|
-
updateMember: oc.route({ method: "PATCH", path: "/api/workspaces/{
|
|
214
|
-
removeMember: oc.route({ method: "DELETE", path: "/api/workspaces/{
|
|
212
|
+
listMembers: oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}/members" }).input(WorkspaceIdParamSchema).output(z6.array(WorkspaceMemberSchema)),
|
|
213
|
+
updateMember: oc.route({ method: "PATCH", path: "/api/workspaces/{workspace_id}/members/{user_id}" }).input(MemberIdParamSchema.merge(UpdateMemberInputSchema)).output(WorkspaceMemberSchema),
|
|
214
|
+
removeMember: oc.route({ method: "DELETE", path: "/api/workspaces/{workspace_id}/members/{user_id}" }).input(MemberIdParamSchema).output(z6.void()),
|
|
215
215
|
// Invitations
|
|
216
|
-
listInvitations: oc.route({ method: "GET", path: "/api/workspaces/{
|
|
217
|
-
createInvitation: oc.route({ method: "POST", path: "/api/workspaces/{
|
|
218
|
-
revokeInvitation: oc.route({ method: "DELETE", path: "/api/workspaces/{
|
|
216
|
+
listInvitations: oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}/invitations" }).input(WorkspaceIdParamSchema).output(z6.array(WorkspaceInvitationSchema)),
|
|
217
|
+
createInvitation: oc.route({ method: "POST", path: "/api/workspaces/{workspace_id}/invitations" }).input(WorkspaceIdParamSchema.merge(CreateInvitationInputSchema)).output(WorkspaceInvitationSchema),
|
|
218
|
+
revokeInvitation: oc.route({ method: "DELETE", path: "/api/workspaces/{workspace_id}/invitations/{invitation_id}" }).input(InvitationIdParamSchema).output(z6.void())
|
|
219
219
|
};
|
|
220
220
|
var invitationsContract = {
|
|
221
221
|
get: oc.route({ method: "GET", path: "/api/invitations/{token}" }).input(TokenParamSchema).output(WorkspaceInvitationSchema),
|
|
222
222
|
accept: oc.route({ method: "POST", path: "/api/invitations/{token}/accept" }).input(TokenParamSchema).output(WorkspaceMemberSchema)
|
|
223
223
|
};
|
|
224
224
|
var linksContract = {
|
|
225
|
-
create: oc.route({ method: "POST", path: "/api/workspaces/{
|
|
226
|
-
list: oc.route({ method: "GET", path: "/api/workspaces/{
|
|
227
|
-
get: oc.route({ method: "GET", path: "/api/workspaces/{
|
|
228
|
-
update: oc.route({ method: "PATCH", path: "/api/workspaces/{
|
|
229
|
-
delete: oc.route({ method: "DELETE", path: "/api/workspaces/{
|
|
225
|
+
create: oc.route({ method: "POST", path: "/api/workspaces/{workspace_id}/links" }).input(WorkspaceIdParamSchema.merge(CreateLinkInputSchema)).output(LinkSchema),
|
|
226
|
+
list: oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}/links" }).input(WorkspaceIdParamSchema.merge(LinkFiltersSchema)).output(PaginatedLinksSchema),
|
|
227
|
+
get: oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}/links/{link_id}" }).input(LinkIdParamSchema).output(LinkSchema),
|
|
228
|
+
update: oc.route({ method: "PATCH", path: "/api/workspaces/{workspace_id}/links/{link_id}" }).input(LinkIdParamSchema.merge(UpdateLinkInputSchema)).output(LinkSchema),
|
|
229
|
+
delete: oc.route({ method: "DELETE", path: "/api/workspaces/{workspace_id}/links/{link_id}" }).input(LinkIdParamSchema).output(z6.void())
|
|
230
230
|
};
|
|
231
231
|
var tagsContract = {
|
|
232
|
-
create: oc.route({ method: "POST", path: "/api/workspaces/{
|
|
233
|
-
list: oc.route({ method: "GET", path: "/api/workspaces/{
|
|
234
|
-
get: oc.route({ method: "GET", path: "/api/workspaces/{
|
|
235
|
-
update: oc.route({ method: "PATCH", path: "/api/workspaces/{
|
|
236
|
-
delete: oc.route({ method: "DELETE", path: "/api/workspaces/{
|
|
232
|
+
create: oc.route({ method: "POST", path: "/api/workspaces/{workspace_id}/tags" }).input(WorkspaceIdParamSchema.merge(CreateTagInputSchema)).output(TagSchema),
|
|
233
|
+
list: oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}/tags" }).input(WorkspaceIdParamSchema).output(z6.array(TagSchema)),
|
|
234
|
+
get: oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}/tags/{tag_id}" }).input(TagIdParamSchema).output(TagSchema),
|
|
235
|
+
update: oc.route({ method: "PATCH", path: "/api/workspaces/{workspace_id}/tags/{tag_id}" }).input(TagIdParamSchema.merge(UpdateTagInputSchema)).output(TagSchema),
|
|
236
|
+
delete: oc.route({ method: "DELETE", path: "/api/workspaces/{workspace_id}/tags/{tag_id}" }).input(TagIdParamSchema).output(z6.void())
|
|
237
237
|
};
|
|
238
238
|
var contract = {
|
|
239
239
|
users: usersContract,
|