expo-backend-types 0.30.0-EXPO-308-auth.7 → 0.30.0-EXPO-308-auth.9
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.
@@ -15,19 +15,143 @@ declare const SendOtpDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<z.ZodO
|
|
15
15
|
}>>;
|
16
16
|
export declare class SendOtpDto extends SendOtpDto_base {
|
17
17
|
}
|
18
|
+
export declare const discriminatedResponseSchema: z.ZodDiscriminatedUnion<"success", [z.ZodObject<z.objectUtil.extendShape<{
|
19
|
+
hasVerified: z.ZodBoolean;
|
20
|
+
hasUsername: z.ZodBoolean;
|
21
|
+
}, {
|
22
|
+
success: z.ZodLiteral<true>;
|
23
|
+
}>, "strip", z.ZodTypeAny, {
|
24
|
+
success: true;
|
25
|
+
hasVerified: boolean;
|
26
|
+
hasUsername: boolean;
|
27
|
+
}, {
|
28
|
+
success: true;
|
29
|
+
hasVerified: boolean;
|
30
|
+
hasUsername: boolean;
|
31
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
32
|
+
hasVerified: z.ZodBoolean;
|
33
|
+
hasUsername: z.ZodBoolean;
|
34
|
+
}, {
|
35
|
+
success: z.ZodLiteral<false>;
|
36
|
+
message: z.ZodString;
|
37
|
+
}>, "strip", z.ZodTypeAny, {
|
38
|
+
message: string;
|
39
|
+
success: false;
|
40
|
+
hasVerified: boolean;
|
41
|
+
hasUsername: boolean;
|
42
|
+
}, {
|
43
|
+
message: string;
|
44
|
+
success: false;
|
45
|
+
hasVerified: boolean;
|
46
|
+
hasUsername: boolean;
|
47
|
+
}>]>;
|
18
48
|
export declare const sendOtpResponseSchema: z.ZodObject<{
|
19
|
-
|
49
|
+
response: z.ZodDiscriminatedUnion<"success", [z.ZodObject<z.objectUtil.extendShape<{
|
50
|
+
hasVerified: z.ZodBoolean;
|
51
|
+
hasUsername: z.ZodBoolean;
|
52
|
+
}, {
|
53
|
+
success: z.ZodLiteral<true>;
|
54
|
+
}>, "strip", z.ZodTypeAny, {
|
55
|
+
success: true;
|
56
|
+
hasVerified: boolean;
|
57
|
+
hasUsername: boolean;
|
58
|
+
}, {
|
59
|
+
success: true;
|
60
|
+
hasVerified: boolean;
|
61
|
+
hasUsername: boolean;
|
62
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
63
|
+
hasVerified: z.ZodBoolean;
|
64
|
+
hasUsername: z.ZodBoolean;
|
65
|
+
}, {
|
66
|
+
success: z.ZodLiteral<false>;
|
67
|
+
message: z.ZodString;
|
68
|
+
}>, "strip", z.ZodTypeAny, {
|
69
|
+
message: string;
|
70
|
+
success: false;
|
71
|
+
hasVerified: boolean;
|
72
|
+
hasUsername: boolean;
|
73
|
+
}, {
|
74
|
+
message: string;
|
75
|
+
success: false;
|
76
|
+
hasVerified: boolean;
|
77
|
+
hasUsername: boolean;
|
78
|
+
}>]>;
|
20
79
|
}, "strip", z.ZodTypeAny, {
|
21
|
-
|
80
|
+
response: {
|
81
|
+
success: true;
|
82
|
+
hasVerified: boolean;
|
83
|
+
hasUsername: boolean;
|
84
|
+
} | {
|
85
|
+
message: string;
|
86
|
+
success: false;
|
87
|
+
hasVerified: boolean;
|
88
|
+
hasUsername: boolean;
|
89
|
+
};
|
22
90
|
}, {
|
23
|
-
|
91
|
+
response: {
|
92
|
+
success: true;
|
93
|
+
hasVerified: boolean;
|
94
|
+
hasUsername: boolean;
|
95
|
+
} | {
|
96
|
+
message: string;
|
97
|
+
success: false;
|
98
|
+
hasVerified: boolean;
|
99
|
+
hasUsername: boolean;
|
100
|
+
};
|
24
101
|
}>;
|
25
102
|
declare const SendOtpResponseDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<z.ZodObject<{
|
26
|
-
|
103
|
+
response: z.ZodDiscriminatedUnion<"success", [z.ZodObject<z.objectUtil.extendShape<{
|
104
|
+
hasVerified: z.ZodBoolean;
|
105
|
+
hasUsername: z.ZodBoolean;
|
106
|
+
}, {
|
107
|
+
success: z.ZodLiteral<true>;
|
108
|
+
}>, "strip", z.ZodTypeAny, {
|
109
|
+
success: true;
|
110
|
+
hasVerified: boolean;
|
111
|
+
hasUsername: boolean;
|
112
|
+
}, {
|
113
|
+
success: true;
|
114
|
+
hasVerified: boolean;
|
115
|
+
hasUsername: boolean;
|
116
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
117
|
+
hasVerified: z.ZodBoolean;
|
118
|
+
hasUsername: z.ZodBoolean;
|
119
|
+
}, {
|
120
|
+
success: z.ZodLiteral<false>;
|
121
|
+
message: z.ZodString;
|
122
|
+
}>, "strip", z.ZodTypeAny, {
|
123
|
+
message: string;
|
124
|
+
success: false;
|
125
|
+
hasVerified: boolean;
|
126
|
+
hasUsername: boolean;
|
127
|
+
}, {
|
128
|
+
message: string;
|
129
|
+
success: false;
|
130
|
+
hasVerified: boolean;
|
131
|
+
hasUsername: boolean;
|
132
|
+
}>]>;
|
27
133
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
28
|
-
|
134
|
+
response: {
|
135
|
+
success: true;
|
136
|
+
hasVerified: boolean;
|
137
|
+
hasUsername: boolean;
|
138
|
+
} | {
|
139
|
+
message: string;
|
140
|
+
success: false;
|
141
|
+
hasVerified: boolean;
|
142
|
+
hasUsername: boolean;
|
143
|
+
};
|
29
144
|
}, {
|
30
|
-
|
145
|
+
response: {
|
146
|
+
success: true;
|
147
|
+
hasVerified: boolean;
|
148
|
+
hasUsername: boolean;
|
149
|
+
} | {
|
150
|
+
message: string;
|
151
|
+
success: false;
|
152
|
+
hasVerified: boolean;
|
153
|
+
hasUsername: boolean;
|
154
|
+
};
|
31
155
|
}>>;
|
32
156
|
export declare class SendOtpResponseDto extends SendOtpResponseDto_base {
|
33
157
|
}
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.SendOtpResponseDto = exports.sendOtpResponseSchema = exports.SendOtpDto = exports.sendOtpSchema = void 0;
|
6
|
+
exports.SendOtpResponseDto = exports.sendOtpResponseSchema = exports.discriminatedResponseSchema = exports.SendOtpDto = exports.sendOtpSchema = void 0;
|
7
7
|
const profile_dto_1 = require("../../profile/dto/profile.dto");
|
8
8
|
const create_zod_dto_without_date_1 = require("../../shared/dto-modification/create-zod-dto-without-date");
|
9
9
|
const zod_1 = __importDefault(require("zod"));
|
@@ -13,8 +13,21 @@ exports.sendOtpSchema = zod_1.default.object({
|
|
13
13
|
class SendOtpDto extends (0, create_zod_dto_without_date_1.createZodDtoWithoutDate)(exports.sendOtpSchema) {
|
14
14
|
}
|
15
15
|
exports.SendOtpDto = SendOtpDto;
|
16
|
+
const baseResponseSchema = zod_1.default.object({
|
17
|
+
hasVerified: zod_1.default.boolean(),
|
18
|
+
hasUsername: zod_1.default.boolean(),
|
19
|
+
});
|
20
|
+
exports.discriminatedResponseSchema = zod_1.default.discriminatedUnion('success', [
|
21
|
+
baseResponseSchema.merge(zod_1.default.object({
|
22
|
+
success: zod_1.default.literal(true),
|
23
|
+
})),
|
24
|
+
baseResponseSchema.merge(zod_1.default.object({
|
25
|
+
success: zod_1.default.literal(false),
|
26
|
+
message: zod_1.default.string(),
|
27
|
+
})),
|
28
|
+
]);
|
16
29
|
exports.sendOtpResponseSchema = zod_1.default.object({
|
17
|
-
|
30
|
+
response: exports.discriminatedResponseSchema,
|
18
31
|
});
|
19
32
|
class SendOtpResponseDto extends (0, create_zod_dto_without_date_1.createZodDtoWithoutDate)(exports.sendOtpResponseSchema) {
|
20
33
|
}
|
package/dist/types/schema.d.ts
CHANGED
@@ -2278,7 +2278,16 @@ export interface components {
|
|
2278
2278
|
phoneNumber: string;
|
2279
2279
|
};
|
2280
2280
|
SendOtpResponseDto: {
|
2281
|
-
|
2281
|
+
response: {
|
2282
|
+
hasVerified: boolean;
|
2283
|
+
hasUsername: boolean;
|
2284
|
+
success: true;
|
2285
|
+
} | {
|
2286
|
+
hasVerified: boolean;
|
2287
|
+
hasUsername: boolean;
|
2288
|
+
success: false;
|
2289
|
+
message: string;
|
2290
|
+
};
|
2282
2291
|
};
|
2283
2292
|
VerifyOtpDto: {
|
2284
2293
|
phoneNumber: string;
|