@middlewr/contracts 0.0.4 → 0.0.5
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 +2 -2
- package/esm/index.d.ts +40 -32
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +2 -2
- 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,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,9 +252,9 @@ 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),
|
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,9 +197,9 @@ 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),
|