@darco2903/auth-api 2.1.4 → 2.2.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/client.js CHANGED
@@ -1,8 +1,9 @@
1
1
  import { Second } from "@darco2903/secondthought";
2
- export * from "./common.js";
3
2
  import { initClient } from "@ts-rest/core";
4
3
  import contract from "./contract/index.js";
5
4
  import { UserRole } from "./roles.js";
5
+ export * from "./common.js";
6
+ export { generateOTP } from "./otp.js";
6
7
  export function createClient(origin) {
7
8
  return initClient(contract, {
8
9
  baseUrl: origin,
@@ -167,7 +167,7 @@ declare const _default: {
167
167
  authorization: string;
168
168
  }>;
169
169
  responses: {
170
- 200: typeof import("@ts-rest/core").ContractNoBody;
170
+ 204: typeof import("@ts-rest/core").ContractNoBody;
171
171
  400: z.ZodObject<{
172
172
  name: z.ZodLiteral<"ZodError">;
173
173
  issues: z.ZodArray<z.ZodObject<{
@@ -323,7 +323,7 @@ declare const _default: {
323
323
  authorization: string;
324
324
  }>;
325
325
  responses: {
326
- 200: typeof import("@ts-rest/core").ContractNoBody;
326
+ 204: typeof import("@ts-rest/core").ContractNoBody;
327
327
  401: z.ZodObject<{
328
328
  code: z.ZodType<"UNAUTHORIZED", z.ZodTypeDef, "UNAUTHORIZED">;
329
329
  error: z.ZodType<"Unauthorized", z.ZodTypeDef, "Unauthorized">;
@@ -25,7 +25,7 @@ export default c.router({
25
25
  headers: cdnFeedbackHeaderSchema,
26
26
  body: c.noBody(),
27
27
  responses: {
28
- 200: apiSuccess(c.noBody()),
28
+ 204: apiSuccess(c.noBody()),
29
29
  400: ZodErrorSchema,
30
30
  401: apiError(z.literal("UNAUTHORIZED"), z.literal("Unauthorized")),
31
31
  500: apiError(z.literal("INTERNAL_SERVER_ERROR"), z.string()),
@@ -37,7 +37,7 @@ export default c.router({
37
37
  description: "Delete user avatar picture",
38
38
  headers: cdnFeedbackHeaderSchema,
39
39
  responses: {
40
- 200: apiSuccess(c.noBody()),
40
+ 204: apiSuccess(c.noBody()),
41
41
  401: apiError(z.literal("UNAUTHORIZED"), z.literal("Unauthorized")),
42
42
  500: apiError(z.literal("INTERNAL_SERVER_ERROR"), z.string()),
43
43
  },