@marcoappio/marco-config 2.0.414 → 2.0.416

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.
Files changed (106) hide show
  1. package/dist/index.d.ts +3 -3
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +2 -2
  4. package/dist/marcoPublicConfig.d.ts +14 -0
  5. package/dist/marcoPublicConfig.d.ts.map +1 -1
  6. package/dist/marcoPublicConfig.js +30 -0
  7. package/dist/schemas/app.d.ts +1 -1
  8. package/dist/schemas/app.d.ts.map +1 -1
  9. package/dist/schemas/app.js +2 -1
  10. package/dist/schemas/emailAccount.d.ts +1 -1
  11. package/dist/schemas/index.d.ts +3 -3
  12. package/dist/schemas/oauth.d.ts +1 -1
  13. package/dist/schemas/oauth.d.ts.map +1 -1
  14. package/dist/schemas/oauth.js +2 -1
  15. package/dist/sdk/endpoints/index.d.ts +186 -0
  16. package/dist/sdk/endpoints/index.d.ts.map +1 -1
  17. package/dist/sdk/endpoints/index.js +2 -0
  18. package/dist/sdk/endpoints/private/emailMessage/getEmailMessageAttachment.d.ts +21 -0
  19. package/dist/sdk/endpoints/private/emailMessage/getEmailMessageAttachment.d.ts.map +1 -0
  20. package/dist/sdk/endpoints/private/emailMessage/getEmailMessageAttachment.js +16 -0
  21. package/dist/sdk/endpoints/private/emailMessage/getEmailMessageHTML.d.ts +19 -0
  22. package/dist/sdk/endpoints/private/emailMessage/getEmailMessageHTML.d.ts.map +1 -0
  23. package/dist/sdk/endpoints/private/emailMessage/getEmailMessageHTML.js +19 -0
  24. package/dist/sdk/endpoints/private/emailMessage/index.d.ts +39 -0
  25. package/dist/sdk/endpoints/private/emailMessage/index.d.ts.map +1 -0
  26. package/dist/sdk/endpoints/private/emailMessage/index.js +6 -0
  27. package/dist/sdk/endpoints/private/index.d.ts +51 -0
  28. package/dist/sdk/endpoints/private/index.d.ts.map +1 -0
  29. package/dist/sdk/endpoints/private/index.js +6 -0
  30. package/dist/sdk/endpoints/private/user/deleteUser.d.ts +10 -0
  31. package/dist/sdk/endpoints/private/user/deleteUser.d.ts.map +1 -0
  32. package/dist/sdk/endpoints/private/user/deleteUser.js +13 -0
  33. package/dist/sdk/endpoints/private/user/index.d.ts +11 -0
  34. package/dist/sdk/endpoints/private/user/index.d.ts.map +1 -0
  35. package/dist/sdk/endpoints/private/user/index.js +4 -0
  36. package/dist/sdk/endpoints/public/auth/index.d.ts +137 -0
  37. package/dist/sdk/endpoints/public/auth/index.d.ts.map +1 -0
  38. package/dist/sdk/endpoints/public/auth/index.js +8 -0
  39. package/dist/sdk/endpoints/public/auth/refreshAuth.d.ts +41 -0
  40. package/dist/sdk/endpoints/public/auth/refreshAuth.d.ts.map +1 -0
  41. package/dist/sdk/endpoints/public/auth/refreshAuth.js +33 -0
  42. package/dist/sdk/endpoints/public/auth/sendAuthCode.d.ts +27 -0
  43. package/dist/sdk/endpoints/public/auth/sendAuthCode.d.ts.map +1 -0
  44. package/dist/sdk/endpoints/public/auth/sendAuthCode.js +19 -0
  45. package/dist/sdk/endpoints/public/auth/verifyAuthCode.d.ts +72 -0
  46. package/dist/sdk/endpoints/public/auth/verifyAuthCode.d.ts.map +1 -0
  47. package/dist/sdk/endpoints/public/auth/verifyAuthCode.js +37 -0
  48. package/dist/sdk/endpoints/public/index.d.ts +136 -0
  49. package/dist/sdk/endpoints/public/index.d.ts.map +1 -1
  50. package/dist/sdk/endpoints/public/index.js +2 -0
  51. package/dist/sdk/index.d.ts +186 -0
  52. package/dist/sdk/index.d.ts.map +1 -1
  53. package/dist/types/Endpoint.d.ts +2 -1
  54. package/dist/types/Endpoint.d.ts.map +1 -1
  55. package/dist/types/MarcoPlatform.d.ts +3 -0
  56. package/dist/types/MarcoPlatform.d.ts.map +1 -0
  57. package/dist/types/MarcoPlatform.js +1 -0
  58. package/dist/types/OAuthProvider.d.ts +3 -0
  59. package/dist/types/OAuthProvider.d.ts.map +1 -0
  60. package/dist/types/OAuthProvider.js +1 -0
  61. package/dist/types/SDKError.d.ts +4 -0
  62. package/dist/types/SDKError.d.ts.map +1 -0
  63. package/dist/types/SDKError.js +1 -0
  64. package/dist/types/index.d.ts +3 -0
  65. package/dist/types/index.d.ts.map +1 -1
  66. package/dist/types/index.js +3 -0
  67. package/dist/utils/index.d.ts +1 -0
  68. package/dist/utils/index.d.ts.map +1 -1
  69. package/dist/utils/index.js +1 -0
  70. package/dist/utils/labels/index.d.ts +4 -0
  71. package/dist/utils/labels/index.d.ts.map +1 -0
  72. package/dist/utils/labels/index.js +4 -0
  73. package/dist/zero/index.d.ts +1448 -0
  74. package/dist/zero/index.d.ts.map +1 -0
  75. package/dist/zero/index.js +13 -0
  76. package/dist/zero/mutators/account.d.ts +109 -0
  77. package/dist/zero/mutators/account.d.ts.map +1 -0
  78. package/dist/zero/mutators/account.js +69 -0
  79. package/dist/zero/mutators/draft.d.ts +162 -0
  80. package/dist/zero/mutators/draft.d.ts.map +1 -0
  81. package/dist/zero/mutators/draft.js +114 -0
  82. package/dist/zero/mutators/thread.d.ts +78 -0
  83. package/dist/zero/mutators/thread.d.ts.map +1 -0
  84. package/dist/zero/mutators/thread.js +76 -0
  85. package/dist/zero/mutators/user.d.ts +32 -0
  86. package/dist/zero/mutators/user.d.ts.map +1 -0
  87. package/dist/zero/mutators/user.js +33 -0
  88. package/dist/zero/mutators.d.ts +412 -0
  89. package/dist/zero/mutators.d.ts.map +1 -0
  90. package/dist/zero/mutators.js +44 -0
  91. package/dist/zero/mutators.test.d.ts +2 -0
  92. package/dist/zero/mutators.test.d.ts.map +1 -0
  93. package/dist/zero/mutators.test.js +33 -0
  94. package/dist/zero/schema.d.ts +1438 -0
  95. package/dist/zero/schema.d.ts.map +1 -0
  96. package/dist/zero/schema.js +430 -0
  97. package/package.json +2 -2
  98. package/dist/instantDB/index.d.ts +0 -3
  99. package/dist/instantDB/index.d.ts.map +0 -1
  100. package/dist/instantDB/index.js +0 -2
  101. package/dist/instantDB/instant.perms.d.ts +0 -134
  102. package/dist/instantDB/instant.perms.d.ts.map +0 -1
  103. package/dist/instantDB/instant.perms.js +0 -133
  104. package/dist/instantDB/instant.schema.d.ts +0 -338
  105. package/dist/instantDB/instant.schema.d.ts.map +0 -1
  106. package/dist/instantDB/instant.schema.js +0 -180
@@ -0,0 +1,6 @@
1
+ import { emailMessage } from './emailMessage';
2
+ import { user } from './user';
3
+ export const privateGroup = {
4
+ emailMessage,
5
+ user,
6
+ };
@@ -0,0 +1,10 @@
1
+ import * as v from 'valibot';
2
+ export declare const deleteUser: import("../../../..").EndpointConfig<"/v1/pv/user", v.GenericSchema | undefined, v.GenericSchema | undefined, v.UnionSchema<[v.ObjectSchema<{
3
+ readonly data: v.ObjectSchema<{
4
+ readonly code: v.LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
5
+ }, undefined>;
6
+ readonly status: v.LiteralSchema<401, undefined>;
7
+ }, undefined>, v.ObjectSchema<{
8
+ readonly status: v.LiteralSchema<204, undefined>;
9
+ }, undefined>], undefined>>;
10
+ //# sourceMappingURL=deleteUser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deleteUser.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/endpoints/private/user/deleteUser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAK5B,eAAO,MAAM,UAAU;;;;;;;2BASrB,CAAA"}
@@ -0,0 +1,13 @@
1
+ import * as v from 'valibot';
2
+ import { createEndpoint } from '../../../../sdk/endpoints/createEndpointConfig';
3
+ import { authFailedErrorSchema } from '../../../../sdk/validation/errors';
4
+ export const deleteUser = createEndpoint({
5
+ method: 'DELETE',
6
+ path: '/v1/pv/user',
7
+ response: v.union([
8
+ authFailedErrorSchema,
9
+ v.object({
10
+ status: v.literal(204),
11
+ }),
12
+ ]),
13
+ });
@@ -0,0 +1,11 @@
1
+ export declare const user: {
2
+ deleteUser: import("../../../..").EndpointConfig<"/v1/pv/user", import("valibot").GenericSchema | undefined, import("valibot").GenericSchema | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
3
+ readonly data: import("valibot").ObjectSchema<{
4
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
5
+ }, undefined>;
6
+ readonly status: import("valibot").LiteralSchema<401, undefined>;
7
+ }, undefined>, import("valibot").ObjectSchema<{
8
+ readonly status: import("valibot").LiteralSchema<204, undefined>;
9
+ }, undefined>], undefined>>;
10
+ };
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/endpoints/private/user/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI;;;;;;;;;CAEhB,CAAA"}
@@ -0,0 +1,4 @@
1
+ import { deleteUser } from './deleteUser';
2
+ export const user = {
3
+ deleteUser,
4
+ };
@@ -0,0 +1,137 @@
1
+ export declare const auth: {
2
+ refreshAuth: import("../../../..").EndpointConfig<"/v1/pb/auth/refresh", import("valibot").ObjectSchema<{
3
+ 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
+ }, undefined>, import("valibot").GenericSchema | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
5
+ readonly data: import("valibot").ObjectSchema<{
6
+ readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
7
+ readonly issues: import("valibot").ObjectSchema<{
8
+ 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>;
9
+ readonly other: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
10
+ readonly root: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
11
+ }, undefined>;
12
+ }, undefined>;
13
+ readonly status: import("valibot").LiteralSchema<400, undefined>;
14
+ }, undefined>, import("valibot").ObjectSchema<{
15
+ readonly data: import("valibot").ObjectSchema<{
16
+ readonly code: import("valibot").LiteralSchema<"AUTH_REFRESH_TOKEN_INVALID", undefined>;
17
+ }, undefined>;
18
+ readonly status: import("valibot").LiteralSchema<401, undefined>;
19
+ }, undefined>, import("valibot").ObjectSchema<{
20
+ readonly data: import("valibot").ObjectSchema<{
21
+ readonly code: import("valibot").LiteralSchema<"AUTH_SERVER_RESPONSE_UNEXPECTED", undefined>;
22
+ }, undefined>;
23
+ readonly status: import("valibot").LiteralSchema<502, undefined>;
24
+ }, undefined>, import("valibot").ObjectSchema<{
25
+ readonly data: import("valibot").ObjectSchema<{
26
+ readonly accessToken: import("valibot").StringSchema<undefined>;
27
+ readonly refreshToken: import("valibot").StringSchema<undefined>;
28
+ readonly user: import("valibot").ObjectSchema<{
29
+ 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
+ readonly email: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").EmailAction<string, undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
31
+ readonly emailVerified: import("valibot").BooleanSchema<undefined>;
32
+ 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>;
33
+ 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>;
34
+ 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>;
35
+ 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>;
36
+ 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>;
37
+ }, undefined>;
38
+ }, undefined>;
39
+ readonly status: import("valibot").LiteralSchema<200, undefined>;
40
+ }, undefined>], undefined>>;
41
+ sendAuthCode: import("../../../..").EndpointConfig<"/v1/pb/auth/send-code", import("valibot").ObjectSchema<{
42
+ readonly email: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").EmailAction<string, undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
43
+ }, undefined>, import("valibot").GenericSchema | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
44
+ readonly data: import("valibot").ObjectSchema<{
45
+ readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
46
+ readonly issues: import("valibot").ObjectSchema<{
47
+ 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>;
48
+ readonly other: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
49
+ readonly root: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
50
+ }, undefined>;
51
+ }, undefined>;
52
+ readonly status: import("valibot").LiteralSchema<400, undefined>;
53
+ }, undefined>, import("valibot").ObjectSchema<{
54
+ readonly data: import("valibot").ObjectSchema<{
55
+ readonly code: import("valibot").LiteralSchema<"AUTH_SERVER_RESPONSE_UNEXPECTED", undefined>;
56
+ }, undefined>;
57
+ readonly status: import("valibot").LiteralSchema<502, undefined>;
58
+ }, undefined>, import("valibot").ObjectSchema<{
59
+ readonly data: import("valibot").ObjectSchema<{
60
+ readonly code: import("valibot").LiteralSchema<"INVITE_NOT_FOUND", undefined>;
61
+ }, undefined>;
62
+ readonly status: import("valibot").LiteralSchema<404, undefined>;
63
+ }, undefined>, import("valibot").ObjectSchema<{
64
+ readonly status: import("valibot").LiteralSchema<200, undefined>;
65
+ }, undefined>], undefined>>;
66
+ verifyAuthCode: import("../../../..").EndpointConfig<"/v1/pb/auth/verify-code", import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
67
+ readonly authType: import("valibot").LiteralSchema<"CODE", undefined>;
68
+ readonly code: import("valibot").StringSchema<undefined>;
69
+ readonly email: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").EmailAction<string, undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
70
+ }, undefined>, import("valibot").ObjectSchema<{
71
+ readonly authType: import("valibot").LiteralSchema<"PASSWORD", undefined>;
72
+ readonly email: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").EmailAction<string, undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
73
+ readonly password: import("valibot").StringSchema<undefined>;
74
+ }, undefined>], undefined>, import("valibot").GenericSchema | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
75
+ readonly data: import("valibot").ObjectSchema<{
76
+ readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
77
+ readonly issues: import("valibot").ObjectSchema<{
78
+ 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>;
79
+ readonly other: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
80
+ readonly root: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
81
+ }, undefined>;
82
+ }, undefined>;
83
+ readonly status: import("valibot").LiteralSchema<400, undefined>;
84
+ }, undefined>, import("valibot").ObjectSchema<{
85
+ readonly data: import("valibot").ObjectSchema<{
86
+ readonly code: import("valibot").LiteralSchema<"AUTH_CODE_EXPIRED", undefined>;
87
+ }, undefined>;
88
+ readonly status: import("valibot").LiteralSchema<401, undefined>;
89
+ }, undefined>, import("valibot").ObjectSchema<{
90
+ readonly data: import("valibot").ObjectSchema<{
91
+ readonly code: import("valibot").LiteralSchema<"AUTH_CODE_INVALID", undefined>;
92
+ }, undefined>;
93
+ readonly status: import("valibot").LiteralSchema<401, undefined>;
94
+ }, undefined>, import("valibot").ObjectSchema<{
95
+ readonly data: import("valibot").ObjectSchema<{
96
+ readonly code: import("valibot").LiteralSchema<"AUTH_CODE_PREVIOUSLY_USED", undefined>;
97
+ }, undefined>;
98
+ readonly status: import("valibot").LiteralSchema<401, undefined>;
99
+ }, undefined>, import("valibot").ObjectSchema<{
100
+ readonly data: import("valibot").ObjectSchema<{
101
+ readonly code: import("valibot").LiteralSchema<"AUTH_TOO_MANY_ATTEMPTS", undefined>;
102
+ }, undefined>;
103
+ readonly status: import("valibot").LiteralSchema<401, undefined>;
104
+ }, undefined>, import("valibot").ObjectSchema<{
105
+ readonly data: import("valibot").ObjectSchema<{
106
+ readonly code: import("valibot").LiteralSchema<"AUTH_SERVER_RESPONSE_UNEXPECTED", undefined>;
107
+ }, undefined>;
108
+ readonly status: import("valibot").LiteralSchema<502, undefined>;
109
+ }, undefined>, import("valibot").ObjectSchema<{
110
+ readonly data: import("valibot").ObjectSchema<{
111
+ readonly code: import("valibot").LiteralSchema<"USER_NOT_FOUND", undefined>;
112
+ }, undefined>;
113
+ readonly status: import("valibot").LiteralSchema<404, undefined>;
114
+ }, undefined>, import("valibot").ObjectSchema<{
115
+ readonly data: import("valibot").ObjectSchema<{
116
+ readonly code: import("valibot").LiteralSchema<"USER_MARKED_FOR_DELETION", undefined>;
117
+ }, undefined>;
118
+ readonly status: import("valibot").LiteralSchema<409, undefined>;
119
+ }, undefined>, import("valibot").ObjectSchema<{
120
+ readonly data: import("valibot").ObjectSchema<{
121
+ readonly accessToken: import("valibot").StringSchema<undefined>;
122
+ readonly refreshToken: import("valibot").StringSchema<undefined>;
123
+ readonly user: import("valibot").ObjectSchema<{
124
+ 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>;
125
+ readonly email: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").EmailAction<string, undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
126
+ readonly emailVerified: import("valibot").BooleanSchema<undefined>;
127
+ 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>;
128
+ 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>;
129
+ 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>;
130
+ 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>;
131
+ 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>;
132
+ }, undefined>;
133
+ }, undefined>;
134
+ readonly status: import("valibot").LiteralSchema<200, undefined>;
135
+ }, undefined>], undefined>>;
136
+ };
137
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/endpoints/public/auth/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIhB,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { refreshAuth } from './refreshAuth';
2
+ import { sendAuthCode } from './sendAuthCode';
3
+ import { verifyAuthCode } from './verifyAuthCode';
4
+ export const auth = {
5
+ refreshAuth,
6
+ sendAuthCode,
7
+ verifyAuthCode,
8
+ };
@@ -0,0 +1,41 @@
1
+ import * as v from 'valibot';
2
+ export declare const refreshAuth: import("../../../..").EndpointConfig<"/v1/pb/auth/refresh", v.ObjectSchema<{
3
+ readonly refreshToken: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
4
+ }, undefined>, v.GenericSchema | undefined, v.UnionSchema<[v.ObjectSchema<{
5
+ readonly data: v.ObjectSchema<{
6
+ readonly code: v.LiteralSchema<"VALIDATION_FAILED", undefined>;
7
+ readonly issues: v.ObjectSchema<{
8
+ readonly nested: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, undefined>, undefined>;
9
+ readonly other: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
10
+ readonly root: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
11
+ }, undefined>;
12
+ }, undefined>;
13
+ readonly status: v.LiteralSchema<400, undefined>;
14
+ }, undefined>, v.ObjectSchema<{
15
+ readonly data: v.ObjectSchema<{
16
+ readonly code: v.LiteralSchema<"AUTH_REFRESH_TOKEN_INVALID", undefined>;
17
+ }, undefined>;
18
+ readonly status: v.LiteralSchema<401, undefined>;
19
+ }, undefined>, v.ObjectSchema<{
20
+ readonly data: v.ObjectSchema<{
21
+ readonly code: v.LiteralSchema<"AUTH_SERVER_RESPONSE_UNEXPECTED", undefined>;
22
+ }, undefined>;
23
+ readonly status: v.LiteralSchema<502, undefined>;
24
+ }, undefined>, v.ObjectSchema<{
25
+ readonly data: v.ObjectSchema<{
26
+ readonly accessToken: v.StringSchema<undefined>;
27
+ readonly refreshToken: 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.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, 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
+ readonly status: v.LiteralSchema<200, undefined>;
40
+ }, undefined>], undefined>>;
41
+ //# sourceMappingURL=refreshAuth.d.ts.map
@@ -0,0 +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;AAM5B,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BA4BtB,CAAA"}
@@ -0,0 +1,33 @@
1
+ import * as v from 'valibot';
2
+ import { marcoSchemas } from '../../../../schemas';
3
+ import { createEndpoint } from '../../../../sdk/endpoints/createEndpointConfig';
4
+ import { errors } from '../../../../sdk/validation/errors';
5
+ export const refreshAuth = createEndpoint({
6
+ body: v.object({
7
+ refreshToken: marcoSchemas.string.required(),
8
+ }),
9
+ method: 'POST',
10
+ path: '/v1/pb/auth/refresh',
11
+ response: v.union([
12
+ errors.validationFailedErrorSchema,
13
+ errors.authRefreshTokenInvalid,
14
+ errors.authServerResponseUnexpectedErrorSchema,
15
+ v.object({
16
+ data: v.object({
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
+ }),
30
+ status: v.literal(200),
31
+ }),
32
+ ]),
33
+ });
@@ -0,0 +1,27 @@
1
+ import * as v from 'valibot';
2
+ export declare const sendAuthCode: import("../../../..").EndpointConfig<"/v1/pb/auth/send-code", v.ObjectSchema<{
3
+ readonly email: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
4
+ }, undefined>, v.GenericSchema | undefined, v.UnionSchema<[v.ObjectSchema<{
5
+ readonly data: v.ObjectSchema<{
6
+ readonly code: v.LiteralSchema<"VALIDATION_FAILED", undefined>;
7
+ readonly issues: v.ObjectSchema<{
8
+ readonly nested: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, undefined>, undefined>;
9
+ readonly other: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
10
+ readonly root: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
11
+ }, undefined>;
12
+ }, undefined>;
13
+ readonly status: v.LiteralSchema<400, undefined>;
14
+ }, undefined>, v.ObjectSchema<{
15
+ readonly data: v.ObjectSchema<{
16
+ readonly code: v.LiteralSchema<"AUTH_SERVER_RESPONSE_UNEXPECTED", undefined>;
17
+ }, undefined>;
18
+ readonly status: v.LiteralSchema<502, undefined>;
19
+ }, undefined>, v.ObjectSchema<{
20
+ readonly data: v.ObjectSchema<{
21
+ readonly code: v.LiteralSchema<"INVITE_NOT_FOUND", undefined>;
22
+ }, undefined>;
23
+ readonly status: v.LiteralSchema<404, undefined>;
24
+ }, undefined>, v.ObjectSchema<{
25
+ readonly status: v.LiteralSchema<200, undefined>;
26
+ }, undefined>], undefined>>;
27
+ //# sourceMappingURL=sendAuthCode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sendAuthCode.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/endpoints/public/auth/sendAuthCode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAM5B,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;2BAcvB,CAAA"}
@@ -0,0 +1,19 @@
1
+ import * as v from 'valibot';
2
+ import { marcoSchemas } from '../../../../schemas';
3
+ import { createEndpoint } from '../../../../sdk/endpoints/createEndpointConfig';
4
+ import { errors } from '../../../../sdk/validation/errors';
5
+ export const sendAuthCode = createEndpoint({
6
+ body: v.object({
7
+ email: marcoSchemas.string.email(),
8
+ }),
9
+ method: 'POST',
10
+ path: '/v1/pb/auth/send-code',
11
+ response: v.union([
12
+ errors.validationFailedErrorSchema,
13
+ errors.authServerResponseUnexpectedErrorSchema,
14
+ errors.inviteNotFoundErrorSchema,
15
+ v.object({
16
+ status: v.literal(200),
17
+ }),
18
+ ]),
19
+ });
@@ -0,0 +1,72 @@
1
+ import * as v from 'valibot';
2
+ export declare const verifyAuthCode: import("../../../..").EndpointConfig<"/v1/pb/auth/verify-code", v.UnionSchema<[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.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
6
+ }, undefined>, v.ObjectSchema<{
7
+ readonly authType: v.LiteralSchema<"PASSWORD", undefined>;
8
+ readonly email: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
9
+ readonly password: v.StringSchema<undefined>;
10
+ }, undefined>], undefined>, v.GenericSchema | undefined, v.UnionSchema<[v.ObjectSchema<{
11
+ readonly data: v.ObjectSchema<{
12
+ readonly code: v.LiteralSchema<"VALIDATION_FAILED", undefined>;
13
+ readonly issues: v.ObjectSchema<{
14
+ readonly nested: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, undefined>, undefined>;
15
+ readonly other: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
16
+ readonly root: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
17
+ }, undefined>;
18
+ }, undefined>;
19
+ readonly status: v.LiteralSchema<400, undefined>;
20
+ }, undefined>, v.ObjectSchema<{
21
+ readonly data: v.ObjectSchema<{
22
+ readonly code: v.LiteralSchema<"AUTH_CODE_EXPIRED", undefined>;
23
+ }, undefined>;
24
+ readonly status: v.LiteralSchema<401, undefined>;
25
+ }, undefined>, v.ObjectSchema<{
26
+ readonly data: v.ObjectSchema<{
27
+ readonly code: v.LiteralSchema<"AUTH_CODE_INVALID", undefined>;
28
+ }, undefined>;
29
+ readonly status: v.LiteralSchema<401, undefined>;
30
+ }, undefined>, v.ObjectSchema<{
31
+ readonly data: v.ObjectSchema<{
32
+ readonly code: v.LiteralSchema<"AUTH_CODE_PREVIOUSLY_USED", undefined>;
33
+ }, undefined>;
34
+ readonly status: v.LiteralSchema<401, undefined>;
35
+ }, undefined>, v.ObjectSchema<{
36
+ readonly data: v.ObjectSchema<{
37
+ readonly code: v.LiteralSchema<"AUTH_TOO_MANY_ATTEMPTS", undefined>;
38
+ }, undefined>;
39
+ readonly status: v.LiteralSchema<401, undefined>;
40
+ }, undefined>, v.ObjectSchema<{
41
+ readonly data: v.ObjectSchema<{
42
+ readonly code: v.LiteralSchema<"AUTH_SERVER_RESPONSE_UNEXPECTED", undefined>;
43
+ }, undefined>;
44
+ readonly status: v.LiteralSchema<502, undefined>;
45
+ }, undefined>, v.ObjectSchema<{
46
+ readonly data: v.ObjectSchema<{
47
+ readonly code: v.LiteralSchema<"USER_NOT_FOUND", undefined>;
48
+ }, undefined>;
49
+ readonly status: v.LiteralSchema<404, undefined>;
50
+ }, undefined>, v.ObjectSchema<{
51
+ readonly data: v.ObjectSchema<{
52
+ readonly code: v.LiteralSchema<"USER_MARKED_FOR_DELETION", undefined>;
53
+ }, undefined>;
54
+ readonly status: v.LiteralSchema<409, undefined>;
55
+ }, undefined>, v.ObjectSchema<{
56
+ readonly data: v.ObjectSchema<{
57
+ readonly accessToken: v.StringSchema<undefined>;
58
+ readonly refreshToken: v.StringSchema<undefined>;
59
+ readonly user: v.ObjectSchema<{
60
+ readonly createdAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
61
+ readonly email: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
62
+ readonly emailVerified: v.BooleanSchema<undefined>;
63
+ readonly firstName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
64
+ readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
65
+ readonly lastName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
66
+ readonly profilePictureUrl: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
67
+ readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
68
+ }, undefined>;
69
+ }, undefined>;
70
+ readonly status: v.LiteralSchema<200, undefined>;
71
+ }, undefined>], undefined>>;
72
+ //# sourceMappingURL=verifyAuthCode.d.ts.map
@@ -0,0 +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;AAQ5B,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BA+BzB,CAAA"}
@@ -0,0 +1,37 @@
1
+ import * as v from 'valibot';
2
+ import { marcoSchemas } from '../../../../schemas';
3
+ import { createEndpoint } from '../../../../sdk/endpoints/createEndpointConfig';
4
+ import { errors } from '../../../../sdk/validation/errors';
5
+ const verifyAuthCodeBody = v.union([marcoSchemas.auth.code, marcoSchemas.auth.password]);
6
+ export const verifyAuthCode = createEndpoint({
7
+ body: verifyAuthCodeBody,
8
+ method: 'POST',
9
+ path: '/v1/pb/auth/verify-code',
10
+ response: v.union([
11
+ errors.validationFailedErrorSchema,
12
+ errors.authCodeExpiredErrorSchema,
13
+ errors.authCodeInvalidErrorSchema,
14
+ errors.authCodePreviouslyUsedErrorSchema,
15
+ errors.authTooManyAttemptsErrorSchema,
16
+ errors.authServerResponseUnexpectedErrorSchema,
17
+ errors.userNotFoundErrorSchema,
18
+ errors.userMarkedForDeletionErrorSchema,
19
+ v.object({
20
+ data: v.object({
21
+ accessToken: v.string(),
22
+ refreshToken: v.string(),
23
+ user: v.object({
24
+ createdAt: marcoSchemas.string.required(),
25
+ email: marcoSchemas.string.email(),
26
+ emailVerified: v.boolean(),
27
+ firstName: marcoSchemas.string.nullable(),
28
+ id: marcoSchemas.string.required(),
29
+ lastName: marcoSchemas.string.nullable(),
30
+ profilePictureUrl: marcoSchemas.string.nullable(),
31
+ updatedAt: marcoSchemas.string.required(),
32
+ }),
33
+ }),
34
+ status: v.literal(200),
35
+ }),
36
+ ]),
37
+ });