@kl1/contracts 1.0.96 → 1.0.98
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.js +34 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +34 -3
- package/dist/index.mjs.map +1 -1
- package/dist/src/contract.d.ts +466 -3
- package/dist/src/contract.d.ts.map +1 -1
- package/dist/src/user/index.d.ts +468 -4
- package/dist/src/user/index.d.ts.map +1 -1
- package/dist/src/user/validation.d.ts +7 -0
- package/dist/src/user/validation.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -5998,6 +5998,9 @@ var CreateUserSchema = z82.object({
|
|
5998
5998
|
var UpdateUserSchema = CreateUserSchema.extend({
|
5999
5999
|
newPassword: z82.string()
|
6000
6000
|
});
|
6001
|
+
var UpdateUserProfileSchema = z82.object({
|
6002
|
+
password: z82.string()
|
6003
|
+
});
|
6001
6004
|
|
6002
6005
|
// src/user/index.ts
|
6003
6006
|
var userContract = initContract31().router(
|
@@ -6014,7 +6017,10 @@ var userContract = initContract31().router(
|
|
6014
6017
|
400: z83.object({
|
6015
6018
|
message: z83.string()
|
6016
6019
|
}),
|
6017
|
-
401: DefaultUnauthorizedSchema
|
6020
|
+
401: DefaultUnauthorizedSchema,
|
6021
|
+
404: DefaultNotFoundSchema,
|
6022
|
+
422: DefaultUnprocessibleSchema,
|
6023
|
+
500: DefaultErrorResponseSchema
|
6018
6024
|
},
|
6019
6025
|
summary: "Create a user."
|
6020
6026
|
},
|
@@ -6060,15 +6066,38 @@ var userContract = initContract31().router(
|
|
6060
6066
|
body: UpdateUserSchema,
|
6061
6067
|
responses: {
|
6062
6068
|
201: DefaultSuccessResponseSchema.extend({
|
6063
|
-
|
6069
|
+
user: UserSchema
|
6064
6070
|
}),
|
6065
6071
|
400: z83.object({
|
6066
6072
|
message: z83.string()
|
6067
6073
|
}),
|
6068
|
-
401: DefaultUnauthorizedSchema
|
6074
|
+
401: DefaultUnauthorizedSchema,
|
6075
|
+
404: DefaultNotFoundSchema,
|
6076
|
+
422: DefaultUnprocessibleSchema,
|
6077
|
+
500: DefaultErrorResponseSchema
|
6069
6078
|
},
|
6070
6079
|
summary: "Update a user."
|
6071
6080
|
},
|
6081
|
+
updateUserProfile: {
|
6082
|
+
method: "PATCH",
|
6083
|
+
path: "/profile/:id",
|
6084
|
+
pathParams: z83.object({ id: z83.string() }),
|
6085
|
+
headers: DefaultHeaderSchema,
|
6086
|
+
body: UpdateUserProfileSchema,
|
6087
|
+
responses: {
|
6088
|
+
201: DefaultSuccessResponseSchema.extend({
|
6089
|
+
user: UserSchema
|
6090
|
+
}),
|
6091
|
+
400: z83.object({
|
6092
|
+
message: z83.string()
|
6093
|
+
}),
|
6094
|
+
401: DefaultUnauthorizedSchema,
|
6095
|
+
404: DefaultNotFoundSchema,
|
6096
|
+
422: DefaultUnprocessibleSchema,
|
6097
|
+
500: DefaultErrorResponseSchema
|
6098
|
+
},
|
6099
|
+
summary: "Update a user profile."
|
6100
|
+
},
|
6072
6101
|
deleteUser: {
|
6073
6102
|
method: "DELETE",
|
6074
6103
|
path: "/:id",
|
@@ -6077,6 +6106,8 @@ var userContract = initContract31().router(
|
|
6077
6106
|
body: null,
|
6078
6107
|
responses: {
|
6079
6108
|
200: DefaultSuccessResponseSchema.extend({ message: z83.string() }),
|
6109
|
+
404: DefaultNotFoundSchema,
|
6110
|
+
422: DefaultUnprocessibleSchema,
|
6080
6111
|
500: DefaultErrorResponseSchema
|
6081
6112
|
},
|
6082
6113
|
summary: "Delete a user."
|