@marcoappio/marco-config 7.0.0 → 8.0.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/schemas/index.d.ts +2 -59
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +1 -2
- package/dist/schemas/models/index.d.ts +1 -1
- package/dist/schemas/models/index.d.ts.map +1 -1
- package/dist/schemas/models/index.js +1 -1
- package/dist/schemas/models/thread.d.ts +3 -60
- package/dist/schemas/models/thread.d.ts.map +1 -1
- package/dist/schemas/models/thread.js +1 -7
- package/dist/sdk/endpoints/index.d.ts +124 -2
- package/dist/sdk/endpoints/index.d.ts.map +1 -1
- package/dist/sdk/endpoints/private/models/thread/getThread.d.ts +17 -42
- package/dist/sdk/endpoints/private/models/thread/getThread.d.ts.map +1 -1
- package/dist/sdk/endpoints/private/models/thread/getThread.js +1 -1
- package/dist/sdk/endpoints/private/models/thread/getThreadByMessageId.d.ts +17 -42
- package/dist/sdk/endpoints/private/models/thread/getThreadByMessageId.d.ts.map +1 -1
- package/dist/sdk/endpoints/private/models/thread/getThreadByMessageId.js +1 -1
- package/dist/sdk/endpoints/private/models/thread/getThreadList.d.ts +1 -1
- package/dist/sdk/endpoints/private/models/thread/getThreadMessageAttachments.d.ts +43 -0
- package/dist/sdk/endpoints/private/models/thread/getThreadMessageAttachments.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/models/thread/getThreadMessageAttachments.js +21 -0
- package/dist/sdk/endpoints/private/models/thread/getThreadMessageRecipients.d.ts +43 -0
- package/dist/sdk/endpoints/private/models/thread/getThreadMessageRecipients.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/models/thread/getThreadMessageRecipients.js +21 -0
- package/dist/sdk/endpoints/private/models/thread/getThreadMessages.d.ts +47 -0
- package/dist/sdk/endpoints/private/models/thread/getThreadMessages.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/models/thread/getThreadMessages.js +21 -0
- package/dist/sdk/endpoints/private/models/thread/index.d.ts +3 -1
- package/dist/sdk/endpoints/private/models/thread/index.d.ts.map +1 -1
- package/dist/sdk/endpoints/private/models/thread/index.js +3 -1
- package/dist/sdk/endpoints/private/models/thread/threadDetailPagination.d.ts +6 -0
- package/dist/sdk/endpoints/private/models/thread/threadDetailPagination.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/models/thread/threadDetailPagination.js +7 -0
- package/dist/sdk/endpoints/public/auth/browser/deleteSession.d.ts +17 -0
- package/dist/sdk/endpoints/public/auth/browser/deleteSession.d.ts.map +1 -0
- package/dist/sdk/endpoints/public/auth/browser/deleteSession.js +14 -0
- package/dist/sdk/endpoints/public/auth/browser/index.d.ts +123 -0
- package/dist/sdk/endpoints/public/auth/browser/index.d.ts.map +1 -0
- package/dist/sdk/endpoints/public/auth/browser/index.js +8 -0
- package/dist/sdk/endpoints/public/auth/browser/refreshAuth.d.ts +40 -0
- package/dist/sdk/endpoints/public/auth/browser/refreshAuth.d.ts.map +1 -0
- package/dist/sdk/endpoints/public/auth/browser/refreshAuth.js +14 -0
- package/dist/sdk/endpoints/public/auth/browser/schemas.d.ts +82 -0
- package/dist/sdk/endpoints/public/auth/browser/schemas.d.ts.map +1 -0
- package/dist/sdk/endpoints/public/auth/browser/schemas.js +25 -0
- package/dist/sdk/endpoints/public/auth/browser/verifyAuthCode.d.ts +69 -0
- package/dist/sdk/endpoints/public/auth/browser/verifyAuthCode.d.ts.map +1 -0
- package/dist/sdk/endpoints/public/auth/browser/verifyAuthCode.js +21 -0
- package/dist/sdk/endpoints/public/auth/index.d.ts +124 -2
- package/dist/sdk/endpoints/public/auth/index.d.ts.map +1 -1
- package/dist/sdk/endpoints/public/auth/index.js +2 -0
- package/dist/sdk/endpoints/public/auth/refreshAuth.d.ts +1 -1
- package/dist/sdk/endpoints/public/auth/refreshAuth.d.ts.map +1 -1
- package/dist/sdk/endpoints/public/auth/refreshAuth.js +2 -14
- package/dist/sdk/endpoints/public/auth/schemas.d.ts +39 -0
- package/dist/sdk/endpoints/public/auth/schemas.d.ts.map +1 -0
- package/dist/sdk/endpoints/public/auth/schemas.js +20 -0
- package/dist/sdk/endpoints/public/auth/verifyAuthCode.d.ts +1 -1
- package/dist/sdk/endpoints/public/auth/verifyAuthCode.d.ts.map +1 -1
- package/dist/sdk/endpoints/public/auth/verifyAuthCode.js +2 -14
- package/dist/sdk/endpoints/public/index.d.ts +124 -2
- package/dist/sdk/endpoints/public/index.d.ts.map +1 -1
- package/dist/sdk/index.d.ts +124 -2
- package/dist/sdk/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/sdk/endpoints/private/models/thread/getThreads.d.ts +0 -83
- package/dist/sdk/endpoints/private/models/thread/getThreads.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/models/thread/getThreads.js +0 -36
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refreshAuth.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/public/auth/browser/refreshAuth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAS5B,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAUtB,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
import { createEndpoint } from '../../../../../sdk/endpoints/createEndpointConfig';
|
|
3
|
+
import { browserAuthQuerySchema, browserAuthSuccessResponseSchema, browserErrorSchemas, } from '../../../../../sdk/endpoints/public/auth/browser/schemas';
|
|
4
|
+
export const refreshAuth = createEndpoint({
|
|
5
|
+
method: 'POST',
|
|
6
|
+
path: '/v1/pb/auth/browser/refresh',
|
|
7
|
+
query: browserAuthQuerySchema,
|
|
8
|
+
response: v.union([
|
|
9
|
+
browserErrorSchemas.validationFailed,
|
|
10
|
+
browserErrorSchemas.authRefreshTokenInvalid,
|
|
11
|
+
browserErrorSchemas.authServerResponseUnexpected,
|
|
12
|
+
browserAuthSuccessResponseSchema,
|
|
13
|
+
]),
|
|
14
|
+
});
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const browserAuthQuerySchema: v.StrictObjectSchema<{
|
|
3
|
+
readonly sessionGeneration: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
4
|
+
}, undefined>;
|
|
5
|
+
export declare const browserAuthSuccessResponseSchema: v.StrictObjectSchema<{
|
|
6
|
+
readonly data: v.StrictObjectSchema<{
|
|
7
|
+
accessToken: v.StringSchema<undefined>;
|
|
8
|
+
user: v.ObjectSchema<{
|
|
9
|
+
readonly createdAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
10
|
+
readonly email: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>;
|
|
11
|
+
readonly emailVerified: v.BooleanSchema<undefined>;
|
|
12
|
+
readonly firstName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
13
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
14
|
+
readonly lastName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
15
|
+
readonly profilePictureUrl: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
16
|
+
readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
17
|
+
}, undefined>;
|
|
18
|
+
}, undefined>;
|
|
19
|
+
readonly status: v.LiteralSchema<200, undefined>;
|
|
20
|
+
}, undefined>;
|
|
21
|
+
export declare const browserErrorSchemas: {
|
|
22
|
+
readonly authCodeExpired: v.StrictObjectSchema<{
|
|
23
|
+
readonly data: v.StrictObjectSchema<{
|
|
24
|
+
readonly code: v.LiteralSchema<"AUTH_CODE_EXPIRED", undefined>;
|
|
25
|
+
}, undefined>;
|
|
26
|
+
readonly status: v.LiteralSchema<401, undefined>;
|
|
27
|
+
}, undefined>;
|
|
28
|
+
readonly authCodeInvalid: v.StrictObjectSchema<{
|
|
29
|
+
readonly data: v.StrictObjectSchema<{
|
|
30
|
+
readonly code: v.LiteralSchema<"AUTH_CODE_INVALID", undefined>;
|
|
31
|
+
}, undefined>;
|
|
32
|
+
readonly status: v.LiteralSchema<401, undefined>;
|
|
33
|
+
}, undefined>;
|
|
34
|
+
readonly authCodePreviouslyUsed: v.StrictObjectSchema<{
|
|
35
|
+
readonly data: v.StrictObjectSchema<{
|
|
36
|
+
readonly code: v.LiteralSchema<"AUTH_CODE_PREVIOUSLY_USED", undefined>;
|
|
37
|
+
}, undefined>;
|
|
38
|
+
readonly status: v.LiteralSchema<401, undefined>;
|
|
39
|
+
}, undefined>;
|
|
40
|
+
readonly authRefreshTokenInvalid: v.StrictObjectSchema<{
|
|
41
|
+
readonly data: v.StrictObjectSchema<{
|
|
42
|
+
readonly code: v.LiteralSchema<"AUTH_REFRESH_TOKEN_INVALID", undefined>;
|
|
43
|
+
}, undefined>;
|
|
44
|
+
readonly status: v.LiteralSchema<401, undefined>;
|
|
45
|
+
}, undefined>;
|
|
46
|
+
readonly authServerResponseUnexpected: v.StrictObjectSchema<{
|
|
47
|
+
readonly data: v.StrictObjectSchema<{
|
|
48
|
+
readonly code: v.LiteralSchema<"AUTH_SERVER_RESPONSE_UNEXPECTED", undefined>;
|
|
49
|
+
}, undefined>;
|
|
50
|
+
readonly status: v.LiteralSchema<502, undefined>;
|
|
51
|
+
}, undefined>;
|
|
52
|
+
readonly authTooManyAttempts: v.StrictObjectSchema<{
|
|
53
|
+
readonly data: v.StrictObjectSchema<{
|
|
54
|
+
readonly code: v.LiteralSchema<"AUTH_TOO_MANY_ATTEMPTS", undefined>;
|
|
55
|
+
}, undefined>;
|
|
56
|
+
readonly status: v.LiteralSchema<401, undefined>;
|
|
57
|
+
}, undefined>;
|
|
58
|
+
readonly userMarkedForDeletion: v.StrictObjectSchema<{
|
|
59
|
+
readonly data: v.StrictObjectSchema<{
|
|
60
|
+
readonly code: v.LiteralSchema<"USER_MARKED_FOR_DELETION", undefined>;
|
|
61
|
+
}, undefined>;
|
|
62
|
+
readonly status: v.LiteralSchema<409, undefined>;
|
|
63
|
+
}, undefined>;
|
|
64
|
+
readonly userNotFound: v.StrictObjectSchema<{
|
|
65
|
+
readonly data: v.StrictObjectSchema<{
|
|
66
|
+
readonly code: v.LiteralSchema<"USER_NOT_FOUND", undefined>;
|
|
67
|
+
}, undefined>;
|
|
68
|
+
readonly status: v.LiteralSchema<404, undefined>;
|
|
69
|
+
}, undefined>;
|
|
70
|
+
readonly validationFailed: v.StrictObjectSchema<{
|
|
71
|
+
readonly data: v.StrictObjectSchema<{
|
|
72
|
+
readonly code: v.LiteralSchema<"VALIDATION_FAILED", undefined>;
|
|
73
|
+
readonly issues: v.ObjectSchema<{
|
|
74
|
+
readonly nested: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, undefined>, undefined>;
|
|
75
|
+
readonly other: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
76
|
+
readonly root: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
77
|
+
}, undefined>;
|
|
78
|
+
}, undefined>;
|
|
79
|
+
readonly status: v.LiteralSchema<400, undefined>;
|
|
80
|
+
}, undefined>;
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/public/auth/browser/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAkB5B,eAAO,MAAM,sBAAsB;;aAEjC,CAAA;AAEF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;aAG3C,CAAA;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCtB,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
import { authResponseDataEntries } from '../../../../../sdk/endpoints/public/auth/schemas';
|
|
3
|
+
import { errors } from '../../../../../sdk/validation/errors';
|
|
4
|
+
const createBrowserErrorResponseSchema = (data, status) => v.strictObject({
|
|
5
|
+
data: v.strictObject(data.entries),
|
|
6
|
+
status,
|
|
7
|
+
});
|
|
8
|
+
export const browserAuthQuerySchema = v.strictObject({
|
|
9
|
+
sessionGeneration: v.pipe(v.string(), v.uuid()),
|
|
10
|
+
});
|
|
11
|
+
export const browserAuthSuccessResponseSchema = v.strictObject({
|
|
12
|
+
data: v.strictObject(authResponseDataEntries),
|
|
13
|
+
status: v.literal(200),
|
|
14
|
+
});
|
|
15
|
+
export const browserErrorSchemas = {
|
|
16
|
+
authCodeExpired: createBrowserErrorResponseSchema(errors.authCodeExpiredErrorSchema.entries.data, errors.authCodeExpiredErrorSchema.entries.status),
|
|
17
|
+
authCodeInvalid: createBrowserErrorResponseSchema(errors.authCodeInvalidErrorSchema.entries.data, errors.authCodeInvalidErrorSchema.entries.status),
|
|
18
|
+
authCodePreviouslyUsed: createBrowserErrorResponseSchema(errors.authCodePreviouslyUsedErrorSchema.entries.data, errors.authCodePreviouslyUsedErrorSchema.entries.status),
|
|
19
|
+
authRefreshTokenInvalid: createBrowserErrorResponseSchema(errors.authRefreshTokenInvalid.entries.data, errors.authRefreshTokenInvalid.entries.status),
|
|
20
|
+
authServerResponseUnexpected: createBrowserErrorResponseSchema(errors.authServerResponseUnexpectedErrorSchema.entries.data, errors.authServerResponseUnexpectedErrorSchema.entries.status),
|
|
21
|
+
authTooManyAttempts: createBrowserErrorResponseSchema(errors.authTooManyAttemptsErrorSchema.entries.data, errors.authTooManyAttemptsErrorSchema.entries.status),
|
|
22
|
+
userMarkedForDeletion: createBrowserErrorResponseSchema(errors.userMarkedForDeletionErrorSchema.entries.data, errors.userMarkedForDeletionErrorSchema.entries.status),
|
|
23
|
+
userNotFound: createBrowserErrorResponseSchema(errors.userNotFoundErrorSchema.entries.data, errors.userNotFoundErrorSchema.entries.status),
|
|
24
|
+
validationFailed: createBrowserErrorResponseSchema(errors.validationFailedErrorSchema.entries.data, errors.validationFailedErrorSchema.entries.status),
|
|
25
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const verifyAuthCode: import("../../../../..").EndpointConfig<"/v1/pb/auth/browser/verify-code", v.ObjectSchema<{
|
|
3
|
+
readonly authType: v.LiteralSchema<"CODE", undefined>;
|
|
4
|
+
readonly code: v.StringSchema<undefined>;
|
|
5
|
+
readonly email: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>;
|
|
6
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
7
|
+
readonly sessionGeneration: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
8
|
+
}, undefined>, v.UnionSchema<[v.StrictObjectSchema<{
|
|
9
|
+
readonly data: v.StrictObjectSchema<{
|
|
10
|
+
readonly code: v.LiteralSchema<"VALIDATION_FAILED", undefined>;
|
|
11
|
+
readonly issues: v.ObjectSchema<{
|
|
12
|
+
readonly nested: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, undefined>, undefined>;
|
|
13
|
+
readonly other: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
14
|
+
readonly root: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
15
|
+
}, undefined>;
|
|
16
|
+
}, undefined>;
|
|
17
|
+
readonly status: v.LiteralSchema<400, undefined>;
|
|
18
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
19
|
+
readonly data: v.StrictObjectSchema<{
|
|
20
|
+
readonly code: v.LiteralSchema<"AUTH_CODE_EXPIRED", undefined>;
|
|
21
|
+
}, undefined>;
|
|
22
|
+
readonly status: v.LiteralSchema<401, undefined>;
|
|
23
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
24
|
+
readonly data: v.StrictObjectSchema<{
|
|
25
|
+
readonly code: v.LiteralSchema<"AUTH_CODE_INVALID", undefined>;
|
|
26
|
+
}, undefined>;
|
|
27
|
+
readonly status: v.LiteralSchema<401, undefined>;
|
|
28
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
29
|
+
readonly data: v.StrictObjectSchema<{
|
|
30
|
+
readonly code: v.LiteralSchema<"AUTH_CODE_PREVIOUSLY_USED", undefined>;
|
|
31
|
+
}, undefined>;
|
|
32
|
+
readonly status: v.LiteralSchema<401, undefined>;
|
|
33
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
34
|
+
readonly data: v.StrictObjectSchema<{
|
|
35
|
+
readonly code: v.LiteralSchema<"AUTH_TOO_MANY_ATTEMPTS", undefined>;
|
|
36
|
+
}, undefined>;
|
|
37
|
+
readonly status: v.LiteralSchema<401, undefined>;
|
|
38
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
39
|
+
readonly data: v.StrictObjectSchema<{
|
|
40
|
+
readonly code: v.LiteralSchema<"AUTH_SERVER_RESPONSE_UNEXPECTED", undefined>;
|
|
41
|
+
}, undefined>;
|
|
42
|
+
readonly status: v.LiteralSchema<502, undefined>;
|
|
43
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
44
|
+
readonly data: v.StrictObjectSchema<{
|
|
45
|
+
readonly code: v.LiteralSchema<"USER_NOT_FOUND", undefined>;
|
|
46
|
+
}, undefined>;
|
|
47
|
+
readonly status: v.LiteralSchema<404, undefined>;
|
|
48
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
49
|
+
readonly data: v.StrictObjectSchema<{
|
|
50
|
+
readonly code: v.LiteralSchema<"USER_MARKED_FOR_DELETION", undefined>;
|
|
51
|
+
}, undefined>;
|
|
52
|
+
readonly status: v.LiteralSchema<409, undefined>;
|
|
53
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
54
|
+
readonly data: v.StrictObjectSchema<{
|
|
55
|
+
accessToken: v.StringSchema<undefined>;
|
|
56
|
+
user: v.ObjectSchema<{
|
|
57
|
+
readonly createdAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
58
|
+
readonly email: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>;
|
|
59
|
+
readonly emailVerified: v.BooleanSchema<undefined>;
|
|
60
|
+
readonly firstName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
61
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
62
|
+
readonly lastName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
63
|
+
readonly profilePictureUrl: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
64
|
+
readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
65
|
+
}, undefined>;
|
|
66
|
+
}, undefined>;
|
|
67
|
+
readonly status: v.LiteralSchema<200, undefined>;
|
|
68
|
+
}, undefined>], undefined>>;
|
|
69
|
+
//# sourceMappingURL=verifyAuthCode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyAuthCode.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/public/auth/browser/verifyAuthCode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAU5B,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAgBzB,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
import { marcoSchemas } from '../../../../../schemas';
|
|
3
|
+
import { createEndpoint } from '../../../../../sdk/endpoints/createEndpointConfig';
|
|
4
|
+
import { browserAuthQuerySchema, browserAuthSuccessResponseSchema, browserErrorSchemas, } from '../../../../../sdk/endpoints/public/auth/browser/schemas';
|
|
5
|
+
export const verifyAuthCode = createEndpoint({
|
|
6
|
+
body: marcoSchemas.auth.code,
|
|
7
|
+
method: 'POST',
|
|
8
|
+
path: '/v1/pb/auth/browser/verify-code',
|
|
9
|
+
query: browserAuthQuerySchema,
|
|
10
|
+
response: v.union([
|
|
11
|
+
browserErrorSchemas.validationFailed,
|
|
12
|
+
browserErrorSchemas.authCodeExpired,
|
|
13
|
+
browserErrorSchemas.authCodeInvalid,
|
|
14
|
+
browserErrorSchemas.authCodePreviouslyUsed,
|
|
15
|
+
browserErrorSchemas.authTooManyAttempts,
|
|
16
|
+
browserErrorSchemas.authServerResponseUnexpected,
|
|
17
|
+
browserErrorSchemas.userNotFound,
|
|
18
|
+
browserErrorSchemas.userMarkedForDeletion,
|
|
19
|
+
browserAuthSuccessResponseSchema,
|
|
20
|
+
]),
|
|
21
|
+
});
|
|
@@ -1,4 +1,126 @@
|
|
|
1
1
|
export declare const auth: {
|
|
2
|
+
browser: {
|
|
3
|
+
deleteSession: import("../../../..").EndpointConfig<"/v1/pb/auth/browser/session", import("valibot").GenericSchema | undefined, import("valibot").StrictObjectSchema<{
|
|
4
|
+
readonly sessionGeneration: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").UuidAction<string, undefined>]>;
|
|
5
|
+
}, undefined>, import("valibot").UnionSchema<[import("valibot").StrictObjectSchema<{
|
|
6
|
+
readonly data: import("valibot").StrictObjectSchema<{
|
|
7
|
+
readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
|
|
8
|
+
readonly issues: import("valibot").ObjectSchema<{
|
|
9
|
+
readonly nested: import("valibot").OptionalSchema<import("valibot").RecordSchema<import("valibot").StringSchema<undefined>, import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>, undefined>, undefined>, undefined>;
|
|
10
|
+
readonly other: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
|
|
11
|
+
readonly root: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
|
|
12
|
+
}, undefined>;
|
|
13
|
+
}, undefined>;
|
|
14
|
+
readonly status: import("valibot").LiteralSchema<400, undefined>;
|
|
15
|
+
}, undefined>, import("valibot").StrictObjectSchema<{
|
|
16
|
+
readonly status: import("valibot").LiteralSchema<204, undefined>;
|
|
17
|
+
}, undefined>], undefined>>;
|
|
18
|
+
refreshAuth: import("../../../..").EndpointConfig<"/v1/pb/auth/browser/refresh", import("valibot").GenericSchema | undefined, import("valibot").StrictObjectSchema<{
|
|
19
|
+
readonly sessionGeneration: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").UuidAction<string, undefined>]>;
|
|
20
|
+
}, undefined>, import("valibot").UnionSchema<[import("valibot").StrictObjectSchema<{
|
|
21
|
+
readonly data: import("valibot").StrictObjectSchema<{
|
|
22
|
+
readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
|
|
23
|
+
readonly issues: import("valibot").ObjectSchema<{
|
|
24
|
+
readonly nested: import("valibot").OptionalSchema<import("valibot").RecordSchema<import("valibot").StringSchema<undefined>, import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>, undefined>, undefined>, undefined>;
|
|
25
|
+
readonly other: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
|
|
26
|
+
readonly root: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
|
|
27
|
+
}, undefined>;
|
|
28
|
+
}, undefined>;
|
|
29
|
+
readonly status: import("valibot").LiteralSchema<400, undefined>;
|
|
30
|
+
}, undefined>, import("valibot").StrictObjectSchema<{
|
|
31
|
+
readonly data: import("valibot").StrictObjectSchema<{
|
|
32
|
+
readonly code: import("valibot").LiteralSchema<"AUTH_REFRESH_TOKEN_INVALID", undefined>;
|
|
33
|
+
}, undefined>;
|
|
34
|
+
readonly status: import("valibot").LiteralSchema<401, undefined>;
|
|
35
|
+
}, undefined>, import("valibot").StrictObjectSchema<{
|
|
36
|
+
readonly data: import("valibot").StrictObjectSchema<{
|
|
37
|
+
readonly code: import("valibot").LiteralSchema<"AUTH_SERVER_RESPONSE_UNEXPECTED", undefined>;
|
|
38
|
+
}, undefined>;
|
|
39
|
+
readonly status: import("valibot").LiteralSchema<502, undefined>;
|
|
40
|
+
}, undefined>, import("valibot").StrictObjectSchema<{
|
|
41
|
+
readonly data: import("valibot").StrictObjectSchema<{
|
|
42
|
+
accessToken: import("valibot").StringSchema<undefined>;
|
|
43
|
+
user: import("valibot").ObjectSchema<{
|
|
44
|
+
readonly createdAt: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
45
|
+
readonly email: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").RfcEmailAction<string, undefined>]>, undefined>;
|
|
46
|
+
readonly emailVerified: import("valibot").BooleanSchema<undefined>;
|
|
47
|
+
readonly firstName: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
48
|
+
readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
49
|
+
readonly lastName: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
50
|
+
readonly profilePictureUrl: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
51
|
+
readonly updatedAt: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
52
|
+
}, undefined>;
|
|
53
|
+
}, undefined>;
|
|
54
|
+
readonly status: import("valibot").LiteralSchema<200, undefined>;
|
|
55
|
+
}, undefined>], undefined>>;
|
|
56
|
+
verifyAuthCode: import("../../../..").EndpointConfig<"/v1/pb/auth/browser/verify-code", import("valibot").ObjectSchema<{
|
|
57
|
+
readonly authType: import("valibot").LiteralSchema<"CODE", undefined>;
|
|
58
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
59
|
+
readonly email: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").RfcEmailAction<string, undefined>]>, undefined>;
|
|
60
|
+
}, undefined>, import("valibot").StrictObjectSchema<{
|
|
61
|
+
readonly sessionGeneration: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").UuidAction<string, undefined>]>;
|
|
62
|
+
}, undefined>, import("valibot").UnionSchema<[import("valibot").StrictObjectSchema<{
|
|
63
|
+
readonly data: import("valibot").StrictObjectSchema<{
|
|
64
|
+
readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
|
|
65
|
+
readonly issues: import("valibot").ObjectSchema<{
|
|
66
|
+
readonly nested: import("valibot").OptionalSchema<import("valibot").RecordSchema<import("valibot").StringSchema<undefined>, import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>, undefined>, undefined>, undefined>;
|
|
67
|
+
readonly other: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
|
|
68
|
+
readonly root: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
|
|
69
|
+
}, undefined>;
|
|
70
|
+
}, undefined>;
|
|
71
|
+
readonly status: import("valibot").LiteralSchema<400, undefined>;
|
|
72
|
+
}, undefined>, import("valibot").StrictObjectSchema<{
|
|
73
|
+
readonly data: import("valibot").StrictObjectSchema<{
|
|
74
|
+
readonly code: import("valibot").LiteralSchema<"AUTH_CODE_EXPIRED", undefined>;
|
|
75
|
+
}, undefined>;
|
|
76
|
+
readonly status: import("valibot").LiteralSchema<401, undefined>;
|
|
77
|
+
}, undefined>, import("valibot").StrictObjectSchema<{
|
|
78
|
+
readonly data: import("valibot").StrictObjectSchema<{
|
|
79
|
+
readonly code: import("valibot").LiteralSchema<"AUTH_CODE_INVALID", undefined>;
|
|
80
|
+
}, undefined>;
|
|
81
|
+
readonly status: import("valibot").LiteralSchema<401, undefined>;
|
|
82
|
+
}, undefined>, import("valibot").StrictObjectSchema<{
|
|
83
|
+
readonly data: import("valibot").StrictObjectSchema<{
|
|
84
|
+
readonly code: import("valibot").LiteralSchema<"AUTH_CODE_PREVIOUSLY_USED", undefined>;
|
|
85
|
+
}, undefined>;
|
|
86
|
+
readonly status: import("valibot").LiteralSchema<401, undefined>;
|
|
87
|
+
}, undefined>, import("valibot").StrictObjectSchema<{
|
|
88
|
+
readonly data: import("valibot").StrictObjectSchema<{
|
|
89
|
+
readonly code: import("valibot").LiteralSchema<"AUTH_TOO_MANY_ATTEMPTS", undefined>;
|
|
90
|
+
}, undefined>;
|
|
91
|
+
readonly status: import("valibot").LiteralSchema<401, undefined>;
|
|
92
|
+
}, undefined>, import("valibot").StrictObjectSchema<{
|
|
93
|
+
readonly data: import("valibot").StrictObjectSchema<{
|
|
94
|
+
readonly code: import("valibot").LiteralSchema<"AUTH_SERVER_RESPONSE_UNEXPECTED", undefined>;
|
|
95
|
+
}, undefined>;
|
|
96
|
+
readonly status: import("valibot").LiteralSchema<502, undefined>;
|
|
97
|
+
}, undefined>, import("valibot").StrictObjectSchema<{
|
|
98
|
+
readonly data: import("valibot").StrictObjectSchema<{
|
|
99
|
+
readonly code: import("valibot").LiteralSchema<"USER_NOT_FOUND", undefined>;
|
|
100
|
+
}, undefined>;
|
|
101
|
+
readonly status: import("valibot").LiteralSchema<404, undefined>;
|
|
102
|
+
}, undefined>, import("valibot").StrictObjectSchema<{
|
|
103
|
+
readonly data: import("valibot").StrictObjectSchema<{
|
|
104
|
+
readonly code: import("valibot").LiteralSchema<"USER_MARKED_FOR_DELETION", undefined>;
|
|
105
|
+
}, undefined>;
|
|
106
|
+
readonly status: import("valibot").LiteralSchema<409, undefined>;
|
|
107
|
+
}, undefined>, import("valibot").StrictObjectSchema<{
|
|
108
|
+
readonly data: import("valibot").StrictObjectSchema<{
|
|
109
|
+
accessToken: import("valibot").StringSchema<undefined>;
|
|
110
|
+
user: import("valibot").ObjectSchema<{
|
|
111
|
+
readonly createdAt: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
112
|
+
readonly email: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").RfcEmailAction<string, undefined>]>, undefined>;
|
|
113
|
+
readonly emailVerified: import("valibot").BooleanSchema<undefined>;
|
|
114
|
+
readonly firstName: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
115
|
+
readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
116
|
+
readonly lastName: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
117
|
+
readonly profilePictureUrl: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
118
|
+
readonly updatedAt: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
119
|
+
}, undefined>;
|
|
120
|
+
}, undefined>;
|
|
121
|
+
readonly status: import("valibot").LiteralSchema<200, undefined>;
|
|
122
|
+
}, undefined>], undefined>>;
|
|
123
|
+
};
|
|
2
124
|
refreshAuth: import("../../../..").EndpointConfig<"/v1/pb/auth/refresh", import("valibot").ObjectSchema<{
|
|
3
125
|
readonly refreshToken: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
4
126
|
}, undefined>, import("valibot").GenericSchema | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
|
|
@@ -23,8 +145,8 @@ export declare const auth: {
|
|
|
23
145
|
readonly status: import("valibot").LiteralSchema<502, undefined>;
|
|
24
146
|
}, undefined>, import("valibot").ObjectSchema<{
|
|
25
147
|
readonly data: import("valibot").ObjectSchema<{
|
|
26
|
-
readonly accessToken: import("valibot").StringSchema<undefined>;
|
|
27
148
|
readonly refreshToken: import("valibot").StringSchema<undefined>;
|
|
149
|
+
readonly accessToken: import("valibot").StringSchema<undefined>;
|
|
28
150
|
readonly user: import("valibot").ObjectSchema<{
|
|
29
151
|
readonly createdAt: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
30
152
|
readonly email: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").RfcEmailAction<string, undefined>]>, undefined>;
|
|
@@ -114,8 +236,8 @@ export declare const auth: {
|
|
|
114
236
|
readonly status: import("valibot").LiteralSchema<409, undefined>;
|
|
115
237
|
}, undefined>, import("valibot").ObjectSchema<{
|
|
116
238
|
readonly data: import("valibot").ObjectSchema<{
|
|
117
|
-
readonly accessToken: import("valibot").StringSchema<undefined>;
|
|
118
239
|
readonly refreshToken: import("valibot").StringSchema<undefined>;
|
|
240
|
+
readonly accessToken: import("valibot").StringSchema<undefined>;
|
|
119
241
|
readonly user: import("valibot").ObjectSchema<{
|
|
120
242
|
readonly createdAt: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
121
243
|
readonly email: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").RfcEmailAction<string, undefined>]>, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/endpoints/public/auth/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/endpoints/public/auth/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKhB,CAAA"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { browser } from './browser';
|
|
1
2
|
import { refreshAuth } from './refreshAuth';
|
|
2
3
|
import { sendAuthCode } from './sendAuthCode';
|
|
3
4
|
import { verifyAuthCode } from './verifyAuthCode';
|
|
4
5
|
export const auth = {
|
|
6
|
+
browser,
|
|
5
7
|
refreshAuth,
|
|
6
8
|
sendAuthCode,
|
|
7
9
|
verifyAuthCode,
|
|
@@ -23,8 +23,8 @@ export declare const refreshAuth: import("../../../..").EndpointConfig<"/v1/pb/a
|
|
|
23
23
|
readonly status: v.LiteralSchema<502, undefined>;
|
|
24
24
|
}, undefined>, v.ObjectSchema<{
|
|
25
25
|
readonly data: v.ObjectSchema<{
|
|
26
|
-
readonly accessToken: v.StringSchema<undefined>;
|
|
27
26
|
readonly refreshToken: v.StringSchema<undefined>;
|
|
27
|
+
readonly accessToken: v.StringSchema<undefined>;
|
|
28
28
|
readonly user: v.ObjectSchema<{
|
|
29
29
|
readonly createdAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
30
30
|
readonly email: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refreshAuth.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/endpoints/public/auth/refreshAuth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"refreshAuth.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/endpoints/public/auth/refreshAuth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAO5B,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAetB,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
import { marcoSchemas } from '../../../../schemas';
|
|
3
3
|
import { createEndpoint } from '../../../../sdk/endpoints/createEndpointConfig';
|
|
4
|
+
import { legacyAuthResponseDataSchema } from '../../../../sdk/endpoints/public/auth/schemas';
|
|
4
5
|
import { errors } from '../../../../sdk/validation/errors';
|
|
5
6
|
export const refreshAuth = createEndpoint({
|
|
6
7
|
body: v.object({
|
|
@@ -13,20 +14,7 @@ export const refreshAuth = createEndpoint({
|
|
|
13
14
|
errors.authRefreshTokenInvalid,
|
|
14
15
|
errors.authServerResponseUnexpectedErrorSchema,
|
|
15
16
|
v.object({
|
|
16
|
-
data:
|
|
17
|
-
accessToken: v.string(),
|
|
18
|
-
refreshToken: v.string(),
|
|
19
|
-
user: v.object({
|
|
20
|
-
createdAt: marcoSchemas.string.required(),
|
|
21
|
-
email: marcoSchemas.string.email(),
|
|
22
|
-
emailVerified: v.boolean(),
|
|
23
|
-
firstName: marcoSchemas.string.nullable(),
|
|
24
|
-
id: marcoSchemas.string.required(),
|
|
25
|
-
lastName: marcoSchemas.string.nullable(),
|
|
26
|
-
profilePictureUrl: marcoSchemas.string.nullable(),
|
|
27
|
-
updatedAt: marcoSchemas.string.required(),
|
|
28
|
-
}),
|
|
29
|
-
}),
|
|
17
|
+
data: legacyAuthResponseDataSchema,
|
|
30
18
|
status: v.literal(200),
|
|
31
19
|
}),
|
|
32
20
|
]),
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const authUserSchema: v.ObjectSchema<{
|
|
3
|
+
readonly createdAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
4
|
+
readonly email: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>;
|
|
5
|
+
readonly emailVerified: v.BooleanSchema<undefined>;
|
|
6
|
+
readonly firstName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
7
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
8
|
+
readonly lastName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
9
|
+
readonly profilePictureUrl: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
10
|
+
readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
11
|
+
}, undefined>;
|
|
12
|
+
export declare const authResponseDataEntries: {
|
|
13
|
+
accessToken: v.StringSchema<undefined>;
|
|
14
|
+
user: v.ObjectSchema<{
|
|
15
|
+
readonly createdAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
16
|
+
readonly email: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>;
|
|
17
|
+
readonly emailVerified: v.BooleanSchema<undefined>;
|
|
18
|
+
readonly firstName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
19
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
20
|
+
readonly lastName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
21
|
+
readonly profilePictureUrl: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
22
|
+
readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
23
|
+
}, undefined>;
|
|
24
|
+
};
|
|
25
|
+
export declare const legacyAuthResponseDataSchema: v.ObjectSchema<{
|
|
26
|
+
readonly refreshToken: v.StringSchema<undefined>;
|
|
27
|
+
readonly accessToken: v.StringSchema<undefined>;
|
|
28
|
+
readonly user: v.ObjectSchema<{
|
|
29
|
+
readonly createdAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
30
|
+
readonly email: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>;
|
|
31
|
+
readonly emailVerified: v.BooleanSchema<undefined>;
|
|
32
|
+
readonly firstName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
33
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
34
|
+
readonly lastName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
35
|
+
readonly profilePictureUrl: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
36
|
+
readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
37
|
+
}, undefined>;
|
|
38
|
+
}, undefined>;
|
|
39
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/endpoints/public/auth/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAI5B,eAAO,MAAM,cAAc;;;;;;;;;aASzB,CAAA;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;CAGnC,CAAA;AAED,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;aAGvC,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
import { marcoSchemas } from '../../../../schemas';
|
|
3
|
+
export const authUserSchema = v.object({
|
|
4
|
+
createdAt: marcoSchemas.string.required(),
|
|
5
|
+
email: marcoSchemas.string.email(),
|
|
6
|
+
emailVerified: v.boolean(),
|
|
7
|
+
firstName: marcoSchemas.string.nullable(),
|
|
8
|
+
id: marcoSchemas.string.required(),
|
|
9
|
+
lastName: marcoSchemas.string.nullable(),
|
|
10
|
+
profilePictureUrl: marcoSchemas.string.nullable(),
|
|
11
|
+
updatedAt: marcoSchemas.string.required(),
|
|
12
|
+
});
|
|
13
|
+
export const authResponseDataEntries = {
|
|
14
|
+
accessToken: v.string(),
|
|
15
|
+
user: authUserSchema,
|
|
16
|
+
};
|
|
17
|
+
export const legacyAuthResponseDataSchema = v.object({
|
|
18
|
+
...authResponseDataEntries,
|
|
19
|
+
refreshToken: v.string(),
|
|
20
|
+
});
|
|
@@ -50,8 +50,8 @@ export declare const verifyAuthCode: import("../../../..").EndpointConfig<"/v1/p
|
|
|
50
50
|
readonly status: v.LiteralSchema<409, undefined>;
|
|
51
51
|
}, undefined>, v.ObjectSchema<{
|
|
52
52
|
readonly data: v.ObjectSchema<{
|
|
53
|
-
readonly accessToken: v.StringSchema<undefined>;
|
|
54
53
|
readonly refreshToken: v.StringSchema<undefined>;
|
|
54
|
+
readonly accessToken: v.StringSchema<undefined>;
|
|
55
55
|
readonly user: v.ObjectSchema<{
|
|
56
56
|
readonly createdAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
57
57
|
readonly email: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifyAuthCode.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/endpoints/public/auth/verifyAuthCode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"verifyAuthCode.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/endpoints/public/auth/verifyAuthCode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAO5B,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAkBzB,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
import { marcoSchemas } from '../../../../schemas';
|
|
3
3
|
import { createEndpoint } from '../../../../sdk/endpoints/createEndpointConfig';
|
|
4
|
+
import { legacyAuthResponseDataSchema } from '../../../../sdk/endpoints/public/auth/schemas';
|
|
4
5
|
import { errors } from '../../../../sdk/validation/errors';
|
|
5
6
|
export const verifyAuthCode = createEndpoint({
|
|
6
7
|
body: marcoSchemas.auth.code,
|
|
@@ -16,20 +17,7 @@ export const verifyAuthCode = createEndpoint({
|
|
|
16
17
|
errors.userNotFoundErrorSchema,
|
|
17
18
|
errors.userMarkedForDeletionErrorSchema,
|
|
18
19
|
v.object({
|
|
19
|
-
data:
|
|
20
|
-
accessToken: v.string(),
|
|
21
|
-
refreshToken: v.string(),
|
|
22
|
-
user: v.object({
|
|
23
|
-
createdAt: marcoSchemas.string.required(),
|
|
24
|
-
email: marcoSchemas.string.email(),
|
|
25
|
-
emailVerified: v.boolean(),
|
|
26
|
-
firstName: marcoSchemas.string.nullable(),
|
|
27
|
-
id: marcoSchemas.string.required(),
|
|
28
|
-
lastName: marcoSchemas.string.nullable(),
|
|
29
|
-
profilePictureUrl: marcoSchemas.string.nullable(),
|
|
30
|
-
updatedAt: marcoSchemas.string.required(),
|
|
31
|
-
}),
|
|
32
|
-
}),
|
|
20
|
+
data: legacyAuthResponseDataSchema,
|
|
33
21
|
status: v.literal(200),
|
|
34
22
|
}),
|
|
35
23
|
]),
|