@marcoappio/marco-config 2.0.136 → 2.0.137

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 (39) hide show
  1. package/dist/sdk/endpoints/index.d.ts +18 -29
  2. package/dist/sdk/endpoints/index.d.ts.map +1 -1
  3. package/dist/sdk/endpoints/private/index.d.ts +6 -6
  4. package/dist/sdk/endpoints/private/sync/index.d.ts +5 -5
  5. package/dist/sdk/endpoints/private/sync/pull/account.d.ts +1 -1
  6. package/dist/sdk/endpoints/private/sync/pull/account.js +1 -1
  7. package/dist/sdk/endpoints/private/sync/pull/contact.d.ts +1 -1
  8. package/dist/sdk/endpoints/private/sync/pull/contact.js +1 -1
  9. package/dist/sdk/endpoints/private/sync/pull/index.d.ts +3 -3
  10. package/dist/sdk/endpoints/private/sync/pull/thread.d.ts +1 -1
  11. package/dist/sdk/endpoints/private/sync/pull/thread.js +1 -1
  12. package/dist/sdk/endpoints/private/sync/push/account.d.ts +1 -1
  13. package/dist/sdk/endpoints/private/sync/push/account.js +1 -1
  14. package/dist/sdk/endpoints/private/sync/push/index.d.ts +2 -2
  15. package/dist/sdk/endpoints/private/sync/push/thread.d.ts +1 -1
  16. package/dist/sdk/endpoints/private/sync/push/thread.js +1 -1
  17. package/dist/sdk/endpoints/private/user/deleteUser.d.ts +1 -1
  18. package/dist/sdk/endpoints/private/user/deleteUser.js +2 -2
  19. package/dist/sdk/endpoints/private/user/index.d.ts +1 -1
  20. package/dist/sdk/endpoints/public/auth/index.d.ts +12 -23
  21. package/dist/sdk/endpoints/public/auth/index.d.ts.map +1 -1
  22. package/dist/sdk/endpoints/public/auth/index.js +0 -2
  23. package/dist/sdk/endpoints/public/auth/sendAuthCode.d.ts +3 -0
  24. package/dist/sdk/endpoints/public/auth/sendAuthCode.d.ts.map +1 -1
  25. package/dist/sdk/endpoints/public/auth/sendAuthCode.js +1 -0
  26. package/dist/sdk/endpoints/public/auth/verifyAuthCode.d.ts +9 -5
  27. package/dist/sdk/endpoints/public/auth/verifyAuthCode.d.ts.map +1 -1
  28. package/dist/sdk/endpoints/public/auth/verifyAuthCode.js +4 -3
  29. package/dist/sdk/endpoints/public/index.d.ts +12 -23
  30. package/dist/sdk/endpoints/public/index.d.ts.map +1 -1
  31. package/dist/sdk/index.d.ts +18 -29
  32. package/dist/sdk/index.d.ts.map +1 -1
  33. package/dist/sdk/validation/errors.d.ts +27 -13
  34. package/dist/sdk/validation/errors.d.ts.map +1 -1
  35. package/dist/sdk/validation/errors.js +17 -8
  36. package/package.json +1 -1
  37. package/dist/sdk/endpoints/public/auth/refreshAuth.d.ts +0 -20
  38. package/dist/sdk/endpoints/public/auth/refreshAuth.d.ts.map +0 -1
  39. package/dist/sdk/endpoints/public/auth/refreshAuth.js +0 -23
@@ -11,7 +11,7 @@ export declare const endpoints: {
11
11
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
12
12
  readonly status: import("valibot").LiteralSchema<400, undefined>;
13
13
  }, undefined>, import("valibot").ObjectSchema<{
14
- readonly code: import("valibot").LiteralSchema<"NOT_AUTHENTICATED", undefined>;
14
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
15
15
  readonly status: import("valibot").LiteralSchema<401, undefined>;
16
16
  }, undefined>, import("valibot").ObjectSchema<{
17
17
  readonly data: import("valibot").ObjectSchema<{
@@ -56,7 +56,7 @@ export declare const endpoints: {
56
56
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
57
57
  readonly status: import("valibot").LiteralSchema<400, undefined>;
58
58
  }, undefined>, import("valibot").ObjectSchema<{
59
- readonly code: import("valibot").LiteralSchema<"NOT_AUTHENTICATED", undefined>;
59
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
60
60
  readonly status: import("valibot").LiteralSchema<401, undefined>;
61
61
  }, undefined>, import("valibot").ObjectSchema<{
62
62
  readonly data: import("valibot").ObjectSchema<{
@@ -90,7 +90,7 @@ export declare const endpoints: {
90
90
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
91
91
  readonly status: import("valibot").LiteralSchema<400, undefined>;
92
92
  }, undefined>, import("valibot").ObjectSchema<{
93
- readonly code: import("valibot").LiteralSchema<"NOT_AUTHENTICATED", undefined>;
93
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
94
94
  readonly status: import("valibot").LiteralSchema<401, undefined>;
95
95
  }, undefined>, import("valibot").ObjectSchema<{
96
96
  readonly data: import("valibot").ObjectSchema<{
@@ -175,7 +175,7 @@ export declare const endpoints: {
175
175
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
176
176
  readonly status: import("valibot").LiteralSchema<400, undefined>;
177
177
  }, undefined>, import("valibot").ObjectSchema<{
178
- readonly code: import("valibot").LiteralSchema<"NOT_AUTHENTICATED", undefined>;
178
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
179
179
  readonly status: import("valibot").LiteralSchema<401, undefined>;
180
180
  }, undefined>, import("valibot").ObjectSchema<{
181
181
  readonly status: import("valibot").LiteralSchema<200, undefined>;
@@ -196,7 +196,7 @@ export declare const endpoints: {
196
196
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
197
197
  readonly status: import("valibot").LiteralSchema<400, undefined>;
198
198
  }, undefined>, import("valibot").ObjectSchema<{
199
- readonly code: import("valibot").LiteralSchema<"NOT_AUTHENTICATED", undefined>;
199
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
200
200
  readonly status: import("valibot").LiteralSchema<401, undefined>;
201
201
  }, undefined>, import("valibot").ObjectSchema<{
202
202
  readonly code: import("valibot").LiteralSchema<"MESSAGE_NOT_FOUND", undefined>;
@@ -208,7 +208,7 @@ export declare const endpoints: {
208
208
  };
209
209
  user: {
210
210
  deleteUser: EndpointConfig<"/v1/pv/user", GenericSchema<unknown, unknown, import("valibot").BaseIssue<unknown>> | undefined, GenericSchema<unknown, unknown, import("valibot").BaseIssue<unknown>> | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
211
- readonly code: import("valibot").LiteralSchema<"NOT_AUTHENTICATED", undefined>;
211
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
212
212
  readonly status: import("valibot").LiteralSchema<401, undefined>;
213
213
  }, undefined>, import("valibot").ObjectSchema<{
214
214
  readonly status: import("valibot").LiteralSchema<204, undefined>;
@@ -217,29 +217,14 @@ export declare const endpoints: {
217
217
  };
218
218
  public: {
219
219
  auth: {
220
- refreshAuth: EndpointConfig<"/v1/pb/auth/refresh", import("valibot").ObjectSchema<{
221
- readonly refreshToken: import("valibot").StringSchema<undefined>;
222
- }, undefined>, GenericSchema<unknown, unknown, import("valibot").BaseIssue<unknown>> | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
223
- readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
224
- readonly status: import("valibot").LiteralSchema<400, undefined>;
225
- }, undefined>, import("valibot").ObjectSchema<{
226
- readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
227
- readonly details: import("valibot").StringSchema<undefined>;
228
- readonly status: import("valibot").LiteralSchema<400, undefined>;
229
- }, undefined>, import("valibot").ObjectSchema<{
230
- readonly data: import("valibot").ObjectSchema<{
231
- readonly accessToken: import("valibot").StringSchema<undefined>;
232
- readonly expiresIn: import("valibot").NumberSchema<undefined>;
233
- readonly idToken: import("valibot").StringSchema<undefined>;
234
- readonly refreshToken: import("valibot").StringSchema<undefined>;
235
- }, undefined>;
236
- readonly status: import("valibot").LiteralSchema<200, undefined>;
237
- }, undefined>], undefined>>;
238
220
  sendAuthCode: EndpointConfig<"/v1/pb/auth/send-code", import("valibot").ObjectSchema<{
239
221
  readonly email: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").EmailAction<string, undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
240
222
  }, undefined>, GenericSchema<unknown, unknown, import("valibot").BaseIssue<unknown>> | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
241
223
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
242
224
  readonly status: import("valibot").LiteralSchema<400, undefined>;
225
+ }, undefined>, import("valibot").ObjectSchema<{
226
+ readonly code: import("valibot").LiteralSchema<"AUTH_SERVER_RESPONSE_UNEXPECTED", undefined>;
227
+ readonly status: import("valibot").LiteralSchema<502, undefined>;
243
228
  }, undefined>, import("valibot").ObjectSchema<{
244
229
  readonly status: import("valibot").LiteralSchema<200, undefined>;
245
230
  }, undefined>], undefined>>;
@@ -250,15 +235,19 @@ export declare const endpoints: {
250
235
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
251
236
  readonly status: import("valibot").LiteralSchema<400, undefined>;
252
237
  }, undefined>, import("valibot").ObjectSchema<{
253
- readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
254
- readonly details: import("valibot").StringSchema<undefined>;
255
- readonly status: import("valibot").LiteralSchema<400, undefined>;
238
+ readonly code: import("valibot").LiteralSchema<"AUTH_CODE_EXPIRED", undefined>;
239
+ readonly status: import("valibot").LiteralSchema<401, undefined>;
240
+ }, undefined>, import("valibot").ObjectSchema<{
241
+ readonly code: import("valibot").LiteralSchema<"AUTH_CODE_PREVIOUSLY_USED", undefined>;
242
+ readonly status: import("valibot").LiteralSchema<401, undefined>;
243
+ }, undefined>, import("valibot").ObjectSchema<{
244
+ readonly code: import("valibot").LiteralSchema<"AUTH_SERVER_RESPONSE_UNEXPECTED", undefined>;
245
+ readonly status: import("valibot").LiteralSchema<502, undefined>;
256
246
  }, undefined>, import("valibot").ObjectSchema<{
257
247
  readonly data: import("valibot").ObjectSchema<{
258
248
  readonly accessToken: import("valibot").StringSchema<undefined>;
259
- readonly expiresIn: import("valibot").NumberSchema<undefined>;
260
- readonly idToken: import("valibot").StringSchema<undefined>;
261
249
  readonly refreshToken: import("valibot").StringSchema<undefined>;
250
+ readonly userId: import("valibot").StringSchema<undefined>;
262
251
  }, undefined>;
263
252
  readonly status: import("valibot").LiteralSchema<200, undefined>;
264
253
  }, undefined>], undefined>>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sdk/endpoints/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAEvC,OAAO,EAAE,cAAc,EAAoB,MAAM,qBAAqB,CAAA;AActE,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGM,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sdk/endpoints/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAEvC,OAAO,EAAE,cAAc,EAAoB,MAAM,qBAAqB,CAAA;AActE,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGM,CAAA"}
@@ -8,7 +8,7 @@ export declare const privateGroup: {
8
8
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
9
9
  readonly status: import("valibot").LiteralSchema<400, undefined>;
10
10
  }, undefined>, import("valibot").ObjectSchema<{
11
- readonly code: import("valibot").LiteralSchema<"NOT_AUTHENTICATED", undefined>;
11
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
12
12
  readonly status: import("valibot").LiteralSchema<401, undefined>;
13
13
  }, undefined>, import("valibot").ObjectSchema<{
14
14
  readonly data: import("valibot").ObjectSchema<{
@@ -53,7 +53,7 @@ export declare const privateGroup: {
53
53
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
54
54
  readonly status: import("valibot").LiteralSchema<400, undefined>;
55
55
  }, undefined>, import("valibot").ObjectSchema<{
56
- readonly code: import("valibot").LiteralSchema<"NOT_AUTHENTICATED", undefined>;
56
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
57
57
  readonly status: import("valibot").LiteralSchema<401, undefined>;
58
58
  }, undefined>, import("valibot").ObjectSchema<{
59
59
  readonly data: import("valibot").ObjectSchema<{
@@ -87,7 +87,7 @@ export declare const privateGroup: {
87
87
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
88
88
  readonly status: import("valibot").LiteralSchema<400, undefined>;
89
89
  }, undefined>, import("valibot").ObjectSchema<{
90
- readonly code: import("valibot").LiteralSchema<"NOT_AUTHENTICATED", undefined>;
90
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
91
91
  readonly status: import("valibot").LiteralSchema<401, undefined>;
92
92
  }, undefined>, import("valibot").ObjectSchema<{
93
93
  readonly data: import("valibot").ObjectSchema<{
@@ -172,7 +172,7 @@ export declare const privateGroup: {
172
172
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
173
173
  readonly status: import("valibot").LiteralSchema<400, undefined>;
174
174
  }, undefined>, import("valibot").ObjectSchema<{
175
- readonly code: import("valibot").LiteralSchema<"NOT_AUTHENTICATED", undefined>;
175
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
176
176
  readonly status: import("valibot").LiteralSchema<401, undefined>;
177
177
  }, undefined>, import("valibot").ObjectSchema<{
178
178
  readonly status: import("valibot").LiteralSchema<200, undefined>;
@@ -193,7 +193,7 @@ export declare const privateGroup: {
193
193
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
194
194
  readonly status: import("valibot").LiteralSchema<400, undefined>;
195
195
  }, undefined>, import("valibot").ObjectSchema<{
196
- readonly code: import("valibot").LiteralSchema<"NOT_AUTHENTICATED", undefined>;
196
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
197
197
  readonly status: import("valibot").LiteralSchema<401, undefined>;
198
198
  }, undefined>, import("valibot").ObjectSchema<{
199
199
  readonly code: import("valibot").LiteralSchema<"MESSAGE_NOT_FOUND", undefined>;
@@ -205,7 +205,7 @@ export declare const privateGroup: {
205
205
  };
206
206
  user: {
207
207
  deleteUser: import("../../..").EndpointConfig<"/v1/pv/user", import("valibot").GenericSchema<unknown, unknown, import("valibot").BaseIssue<unknown>> | undefined, import("valibot").GenericSchema<unknown, unknown, import("valibot").BaseIssue<unknown>> | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
208
- readonly code: import("valibot").LiteralSchema<"NOT_AUTHENTICATED", undefined>;
208
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
209
209
  readonly status: import("valibot").LiteralSchema<401, undefined>;
210
210
  }, undefined>, import("valibot").ObjectSchema<{
211
211
  readonly status: import("valibot").LiteralSchema<204, undefined>;
@@ -7,7 +7,7 @@ export declare const sync: {
7
7
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
8
8
  readonly status: import("valibot").LiteralSchema<400, undefined>;
9
9
  }, undefined>, import("valibot").ObjectSchema<{
10
- readonly code: import("valibot").LiteralSchema<"NOT_AUTHENTICATED", undefined>;
10
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
11
11
  readonly status: import("valibot").LiteralSchema<401, undefined>;
12
12
  }, undefined>, import("valibot").ObjectSchema<{
13
13
  readonly data: import("valibot").ObjectSchema<{
@@ -52,7 +52,7 @@ export declare const sync: {
52
52
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
53
53
  readonly status: import("valibot").LiteralSchema<400, undefined>;
54
54
  }, undefined>, import("valibot").ObjectSchema<{
55
- readonly code: import("valibot").LiteralSchema<"NOT_AUTHENTICATED", undefined>;
55
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
56
56
  readonly status: import("valibot").LiteralSchema<401, undefined>;
57
57
  }, undefined>, import("valibot").ObjectSchema<{
58
58
  readonly data: import("valibot").ObjectSchema<{
@@ -86,7 +86,7 @@ export declare const sync: {
86
86
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
87
87
  readonly status: import("valibot").LiteralSchema<400, undefined>;
88
88
  }, undefined>, import("valibot").ObjectSchema<{
89
- readonly code: import("valibot").LiteralSchema<"NOT_AUTHENTICATED", undefined>;
89
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
90
90
  readonly status: import("valibot").LiteralSchema<401, undefined>;
91
91
  }, undefined>, import("valibot").ObjectSchema<{
92
92
  readonly data: import("valibot").ObjectSchema<{
@@ -171,7 +171,7 @@ export declare const sync: {
171
171
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
172
172
  readonly status: import("valibot").LiteralSchema<400, undefined>;
173
173
  }, undefined>, import("valibot").ObjectSchema<{
174
- readonly code: import("valibot").LiteralSchema<"NOT_AUTHENTICATED", undefined>;
174
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
175
175
  readonly status: import("valibot").LiteralSchema<401, undefined>;
176
176
  }, undefined>, import("valibot").ObjectSchema<{
177
177
  readonly status: import("valibot").LiteralSchema<200, undefined>;
@@ -192,7 +192,7 @@ export declare const sync: {
192
192
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
193
193
  readonly status: import("valibot").LiteralSchema<400, undefined>;
194
194
  }, undefined>, import("valibot").ObjectSchema<{
195
- readonly code: import("valibot").LiteralSchema<"NOT_AUTHENTICATED", undefined>;
195
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
196
196
  readonly status: import("valibot").LiteralSchema<401, undefined>;
197
197
  }, undefined>, import("valibot").ObjectSchema<{
198
198
  readonly code: import("valibot").LiteralSchema<"MESSAGE_NOT_FOUND", undefined>;
@@ -6,7 +6,7 @@ export declare const syncPullAccount: import("../../../../..").EndpointConfig<"/
6
6
  readonly code: v.LiteralSchema<"VALIDATION_FAILED", undefined>;
7
7
  readonly status: v.LiteralSchema<400, undefined>;
8
8
  }, undefined>, v.ObjectSchema<{
9
- readonly code: v.LiteralSchema<"NOT_AUTHENTICATED", undefined>;
9
+ readonly code: v.LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
10
10
  readonly status: v.LiteralSchema<401, undefined>;
11
11
  }, undefined>, v.ObjectSchema<{
12
12
  readonly data: v.ObjectSchema<{
@@ -11,7 +11,7 @@ export const syncPullAccount = createEndpoint({
11
11
  path: account.pullURL,
12
12
  response: v.union([
13
13
  errorManifest.validationFailedErrorSchema,
14
- errorManifest.notAuthenticatedErrorSchema,
14
+ errorManifest.authenticationFailedErrorSchema,
15
15
  v.object({
16
16
  data: v.object({
17
17
  cookie: v.number(),
@@ -6,7 +6,7 @@ export declare const syncPullContact: import("../../../../..").EndpointConfig<"/
6
6
  readonly code: v.LiteralSchema<"VALIDATION_FAILED", undefined>;
7
7
  readonly status: v.LiteralSchema<400, undefined>;
8
8
  }, undefined>, v.ObjectSchema<{
9
- readonly code: v.LiteralSchema<"NOT_AUTHENTICATED", undefined>;
9
+ readonly code: v.LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
10
10
  readonly status: v.LiteralSchema<401, undefined>;
11
11
  }, undefined>, v.ObjectSchema<{
12
12
  readonly data: v.ObjectSchema<{
@@ -11,7 +11,7 @@ export const syncPullContact = createEndpoint({
11
11
  path: contact.pullURL,
12
12
  response: v.union([
13
13
  errorManifest.validationFailedErrorSchema,
14
- errorManifest.notAuthenticatedErrorSchema,
14
+ errorManifest.authenticationFailedErrorSchema,
15
15
  v.object({
16
16
  data: v.object({
17
17
  cookie: v.number(),
@@ -6,7 +6,7 @@ export declare const pull: {
6
6
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
7
7
  readonly status: import("valibot").LiteralSchema<400, undefined>;
8
8
  }, undefined>, import("valibot").ObjectSchema<{
9
- readonly code: import("valibot").LiteralSchema<"NOT_AUTHENTICATED", undefined>;
9
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
10
10
  readonly status: import("valibot").LiteralSchema<401, undefined>;
11
11
  }, undefined>, import("valibot").ObjectSchema<{
12
12
  readonly data: import("valibot").ObjectSchema<{
@@ -51,7 +51,7 @@ export declare const pull: {
51
51
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
52
52
  readonly status: import("valibot").LiteralSchema<400, undefined>;
53
53
  }, undefined>, import("valibot").ObjectSchema<{
54
- readonly code: import("valibot").LiteralSchema<"NOT_AUTHENTICATED", undefined>;
54
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
55
55
  readonly status: import("valibot").LiteralSchema<401, undefined>;
56
56
  }, undefined>, import("valibot").ObjectSchema<{
57
57
  readonly data: import("valibot").ObjectSchema<{
@@ -85,7 +85,7 @@ export declare const pull: {
85
85
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
86
86
  readonly status: import("valibot").LiteralSchema<400, undefined>;
87
87
  }, undefined>, import("valibot").ObjectSchema<{
88
- readonly code: import("valibot").LiteralSchema<"NOT_AUTHENTICATED", undefined>;
88
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
89
89
  readonly status: import("valibot").LiteralSchema<401, undefined>;
90
90
  }, undefined>, import("valibot").ObjectSchema<{
91
91
  readonly data: import("valibot").ObjectSchema<{
@@ -10,7 +10,7 @@ export declare const syncPullThread: import("../../../../..").EndpointConfig<"/v
10
10
  readonly code: v.LiteralSchema<"VALIDATION_FAILED", undefined>;
11
11
  readonly status: v.LiteralSchema<400, undefined>;
12
12
  }, undefined>, v.ObjectSchema<{
13
- readonly code: v.LiteralSchema<"NOT_AUTHENTICATED", undefined>;
13
+ readonly code: v.LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
14
14
  readonly status: v.LiteralSchema<401, undefined>;
15
15
  }, undefined>, v.ObjectSchema<{
16
16
  readonly data: v.ObjectSchema<{
@@ -15,7 +15,7 @@ export const syncPullThread = createEndpoint({
15
15
  path: thread.pullURL,
16
16
  response: v.union([
17
17
  errorManifest.validationFailedErrorSchema,
18
- errorManifest.notAuthenticatedErrorSchema,
18
+ errorManifest.authenticationFailedErrorSchema,
19
19
  v.object({
20
20
  data: v.object({
21
21
  cookie: v.object({
@@ -26,7 +26,7 @@ export declare const syncPushAccount: import("../../../../..").EndpointConfig<"/
26
26
  readonly code: v.LiteralSchema<"VALIDATION_FAILED", undefined>;
27
27
  readonly status: v.LiteralSchema<400, undefined>;
28
28
  }, undefined>, v.ObjectSchema<{
29
- readonly code: v.LiteralSchema<"NOT_AUTHENTICATED", undefined>;
29
+ readonly code: v.LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
30
30
  readonly status: v.LiteralSchema<401, undefined>;
31
31
  }, undefined>, v.ObjectSchema<{
32
32
  readonly status: v.LiteralSchema<200, undefined>;
@@ -24,7 +24,7 @@ export const syncPushAccount = createEndpoint({
24
24
  path: account.pushURL,
25
25
  response: v.union([
26
26
  errorManifest.validationFailedErrorSchema,
27
- errorManifest.notAuthenticatedErrorSchema,
27
+ errorManifest.authenticationFailedErrorSchema,
28
28
  v.object({ status: v.literal(200) }),
29
29
  ]),
30
30
  });
@@ -26,7 +26,7 @@ export declare const push: {
26
26
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
27
27
  readonly status: import("valibot").LiteralSchema<400, undefined>;
28
28
  }, undefined>, import("valibot").ObjectSchema<{
29
- readonly code: import("valibot").LiteralSchema<"NOT_AUTHENTICATED", undefined>;
29
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
30
30
  readonly status: import("valibot").LiteralSchema<401, undefined>;
31
31
  }, undefined>, import("valibot").ObjectSchema<{
32
32
  readonly status: import("valibot").LiteralSchema<200, undefined>;
@@ -47,7 +47,7 @@ export declare const push: {
47
47
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
48
48
  readonly status: import("valibot").LiteralSchema<400, undefined>;
49
49
  }, undefined>, import("valibot").ObjectSchema<{
50
- readonly code: import("valibot").LiteralSchema<"NOT_AUTHENTICATED", undefined>;
50
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
51
51
  readonly status: import("valibot").LiteralSchema<401, undefined>;
52
52
  }, undefined>, import("valibot").ObjectSchema<{
53
53
  readonly code: import("valibot").LiteralSchema<"MESSAGE_NOT_FOUND", undefined>;
@@ -15,7 +15,7 @@ export declare const syncPushThread: import("../../../../..").EndpointConfig<"/v
15
15
  readonly code: v.LiteralSchema<"VALIDATION_FAILED", undefined>;
16
16
  readonly status: v.LiteralSchema<400, undefined>;
17
17
  }, undefined>, v.ObjectSchema<{
18
- readonly code: v.LiteralSchema<"NOT_AUTHENTICATED", undefined>;
18
+ readonly code: v.LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
19
19
  readonly status: v.LiteralSchema<401, undefined>;
20
20
  }, undefined>, v.ObjectSchema<{
21
21
  readonly code: v.LiteralSchema<"MESSAGE_NOT_FOUND", undefined>;
@@ -18,7 +18,7 @@ export const syncPushThread = createEndpoint({
18
18
  path: thread.pushURL,
19
19
  response: v.union([
20
20
  errorManifest.validationFailedErrorSchema,
21
- errorManifest.notAuthenticatedErrorSchema,
21
+ errorManifest.authenticationFailedErrorSchema,
22
22
  errorManifest.messageNotFoundErrorSchema,
23
23
  v.object({ status: v.literal(200) }),
24
24
  ]),
@@ -1,6 +1,6 @@
1
1
  import * as v from 'valibot';
2
2
  export declare const deleteUser: import("../../../..").EndpointConfig<"/v1/pv/user", v.GenericSchema<unknown, unknown, v.BaseIssue<unknown>> | undefined, v.GenericSchema<unknown, unknown, v.BaseIssue<unknown>> | undefined, v.UnionSchema<[v.ObjectSchema<{
3
- readonly code: v.LiteralSchema<"NOT_AUTHENTICATED", undefined>;
3
+ readonly code: v.LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
4
4
  readonly status: v.LiteralSchema<401, undefined>;
5
5
  }, undefined>, v.ObjectSchema<{
6
6
  readonly status: v.LiteralSchema<204, undefined>;
@@ -1,11 +1,11 @@
1
1
  import * as v from 'valibot';
2
2
  import { createEndpoint } from '../../../../sdk/endpoints/createEndpointConfig';
3
- import { notAuthenticatedErrorSchema } from '../../../../sdk/validation/errors';
3
+ import { authenticationFailedErrorSchema } from '../../../../sdk/validation/errors';
4
4
  export const deleteUser = createEndpoint({
5
5
  method: 'DELETE',
6
6
  path: '/v1/pv/user',
7
7
  response: v.union([
8
- notAuthenticatedErrorSchema,
8
+ authenticationFailedErrorSchema,
9
9
  v.object({
10
10
  status: v.literal(204),
11
11
  }),
@@ -1,6 +1,6 @@
1
1
  export declare const user: {
2
2
  deleteUser: import("../../../..").EndpointConfig<"/v1/pv/user", import("valibot").GenericSchema<unknown, unknown, import("valibot").BaseIssue<unknown>> | undefined, import("valibot").GenericSchema<unknown, unknown, import("valibot").BaseIssue<unknown>> | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
3
- readonly code: import("valibot").LiteralSchema<"NOT_AUTHENTICATED", undefined>;
3
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
4
4
  readonly status: import("valibot").LiteralSchema<401, undefined>;
5
5
  }, undefined>, import("valibot").ObjectSchema<{
6
6
  readonly status: import("valibot").LiteralSchema<204, undefined>;
@@ -1,27 +1,12 @@
1
1
  export declare const auth: {
2
- refreshAuth: import("../../../..").EndpointConfig<"/v1/pb/auth/refresh", import("valibot").ObjectSchema<{
3
- readonly refreshToken: import("valibot").StringSchema<undefined>;
4
- }, undefined>, import("valibot").GenericSchema<unknown, unknown, import("valibot").BaseIssue<unknown>> | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
5
- readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
6
- readonly status: import("valibot").LiteralSchema<400, undefined>;
7
- }, undefined>, import("valibot").ObjectSchema<{
8
- readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
9
- readonly details: import("valibot").StringSchema<undefined>;
10
- readonly status: import("valibot").LiteralSchema<400, undefined>;
11
- }, undefined>, import("valibot").ObjectSchema<{
12
- readonly data: import("valibot").ObjectSchema<{
13
- readonly accessToken: import("valibot").StringSchema<undefined>;
14
- readonly expiresIn: import("valibot").NumberSchema<undefined>;
15
- readonly idToken: import("valibot").StringSchema<undefined>;
16
- readonly refreshToken: import("valibot").StringSchema<undefined>;
17
- }, undefined>;
18
- readonly status: import("valibot").LiteralSchema<200, undefined>;
19
- }, undefined>], undefined>>;
20
2
  sendAuthCode: import("../../../..").EndpointConfig<"/v1/pb/auth/send-code", import("valibot").ObjectSchema<{
21
3
  readonly email: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").EmailAction<string, undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
22
4
  }, undefined>, import("valibot").GenericSchema<unknown, unknown, import("valibot").BaseIssue<unknown>> | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
23
5
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
24
6
  readonly status: import("valibot").LiteralSchema<400, undefined>;
7
+ }, undefined>, import("valibot").ObjectSchema<{
8
+ readonly code: import("valibot").LiteralSchema<"AUTH_SERVER_RESPONSE_UNEXPECTED", undefined>;
9
+ readonly status: import("valibot").LiteralSchema<502, undefined>;
25
10
  }, undefined>, import("valibot").ObjectSchema<{
26
11
  readonly status: import("valibot").LiteralSchema<200, undefined>;
27
12
  }, undefined>], undefined>>;
@@ -32,15 +17,19 @@ export declare const auth: {
32
17
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
33
18
  readonly status: import("valibot").LiteralSchema<400, undefined>;
34
19
  }, undefined>, import("valibot").ObjectSchema<{
35
- readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
36
- readonly details: import("valibot").StringSchema<undefined>;
37
- readonly status: import("valibot").LiteralSchema<400, undefined>;
20
+ readonly code: import("valibot").LiteralSchema<"AUTH_CODE_EXPIRED", undefined>;
21
+ readonly status: import("valibot").LiteralSchema<401, undefined>;
22
+ }, undefined>, import("valibot").ObjectSchema<{
23
+ readonly code: import("valibot").LiteralSchema<"AUTH_CODE_PREVIOUSLY_USED", undefined>;
24
+ readonly status: import("valibot").LiteralSchema<401, undefined>;
25
+ }, undefined>, import("valibot").ObjectSchema<{
26
+ readonly code: import("valibot").LiteralSchema<"AUTH_SERVER_RESPONSE_UNEXPECTED", undefined>;
27
+ readonly status: import("valibot").LiteralSchema<502, undefined>;
38
28
  }, undefined>, import("valibot").ObjectSchema<{
39
29
  readonly data: import("valibot").ObjectSchema<{
40
30
  readonly accessToken: import("valibot").StringSchema<undefined>;
41
- readonly expiresIn: import("valibot").NumberSchema<undefined>;
42
- readonly idToken: import("valibot").StringSchema<undefined>;
43
31
  readonly refreshToken: import("valibot").StringSchema<undefined>;
32
+ readonly userId: import("valibot").StringSchema<undefined>;
44
33
  }, undefined>;
45
34
  readonly status: import("valibot").LiteralSchema<200, undefined>;
46
35
  }, undefined>], undefined>>;
@@ -1 +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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/endpoints/public/auth/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGhB,CAAA"}
@@ -1,8 +1,6 @@
1
- import { refreshAuth } from './refreshAuth';
2
1
  import { sendAuthCode } from './sendAuthCode';
3
2
  import { verifyAuthCode } from './verifyAuthCode';
4
3
  export const auth = {
5
- refreshAuth,
6
4
  sendAuthCode,
7
5
  verifyAuthCode,
8
6
  };
@@ -4,6 +4,9 @@ export declare const sendAuthCode: import("../../../..").EndpointConfig<"/v1/pb/
4
4
  }, undefined>, v.GenericSchema<unknown, unknown, v.BaseIssue<unknown>> | undefined, v.UnionSchema<[v.ObjectSchema<{
5
5
  readonly code: v.LiteralSchema<"VALIDATION_FAILED", undefined>;
6
6
  readonly status: v.LiteralSchema<400, undefined>;
7
+ }, undefined>, v.ObjectSchema<{
8
+ readonly code: v.LiteralSchema<"AUTH_SERVER_RESPONSE_UNEXPECTED", undefined>;
9
+ readonly status: v.LiteralSchema<502, undefined>;
7
10
  }, undefined>, v.ObjectSchema<{
8
11
  readonly status: v.LiteralSchema<200, undefined>;
9
12
  }, undefined>], undefined>>;
@@ -1 +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;;;;;;;2BAYvB,CAAA"}
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;;;;;;;;;;2BAavB,CAAA"}
@@ -10,6 +10,7 @@ export const sendAuthCode = createEndpoint({
10
10
  path: '/v1/pb/auth/send-code',
11
11
  response: v.union([
12
12
  errorManifest.validationFailedErrorSchema,
13
+ errorManifest.authServerResponseUnexpectedErrorSchema,
13
14
  v.object({
14
15
  status: v.literal(200),
15
16
  }),
@@ -6,15 +6,19 @@ export declare const verifyAuthCode: import("../../../..").EndpointConfig<"/v1/p
6
6
  readonly code: v.LiteralSchema<"VALIDATION_FAILED", undefined>;
7
7
  readonly status: v.LiteralSchema<400, undefined>;
8
8
  }, undefined>, v.ObjectSchema<{
9
- readonly code: v.LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
10
- readonly details: v.StringSchema<undefined>;
11
- readonly status: v.LiteralSchema<400, undefined>;
9
+ readonly code: v.LiteralSchema<"AUTH_CODE_EXPIRED", undefined>;
10
+ readonly status: v.LiteralSchema<401, undefined>;
11
+ }, undefined>, v.ObjectSchema<{
12
+ readonly code: v.LiteralSchema<"AUTH_CODE_PREVIOUSLY_USED", undefined>;
13
+ readonly status: v.LiteralSchema<401, undefined>;
14
+ }, undefined>, v.ObjectSchema<{
15
+ readonly code: v.LiteralSchema<"AUTH_SERVER_RESPONSE_UNEXPECTED", undefined>;
16
+ readonly status: v.LiteralSchema<502, undefined>;
12
17
  }, undefined>, v.ObjectSchema<{
13
18
  readonly data: v.ObjectSchema<{
14
19
  readonly accessToken: v.StringSchema<undefined>;
15
- readonly expiresIn: v.NumberSchema<undefined>;
16
- readonly idToken: v.StringSchema<undefined>;
17
20
  readonly refreshToken: v.StringSchema<undefined>;
21
+ readonly userId: v.StringSchema<undefined>;
18
22
  }, undefined>;
19
23
  readonly status: v.LiteralSchema<200, undefined>;
20
24
  }, 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;AAM5B,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;2BAoBzB,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;AAM5B,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;2BAqBzB,CAAA"}
@@ -11,13 +11,14 @@ export const verifyAuthCode = createEndpoint({
11
11
  path: '/v1/pb/auth/verify-code',
12
12
  response: v.union([
13
13
  errorManifest.validationFailedErrorSchema,
14
- errorManifest.authenticationFailedErrorSchema,
14
+ errorManifest.authCodeExpiredErrorSchema,
15
+ errorManifest.authCodePreviouslyUsedErrorSchema,
16
+ errorManifest.authServerResponseUnexpectedErrorSchema,
15
17
  v.object({
16
18
  data: v.object({
17
19
  accessToken: v.string(),
18
- expiresIn: v.number(),
19
- idToken: v.string(),
20
20
  refreshToken: v.string(),
21
+ userId: v.string(),
21
22
  }),
22
23
  status: v.literal(200),
23
24
  }),
@@ -1,28 +1,13 @@
1
1
  export declare const publicGroup: {
2
2
  auth: {
3
- refreshAuth: import("../../..").EndpointConfig<"/v1/pb/auth/refresh", import("valibot").ObjectSchema<{
4
- readonly refreshToken: import("valibot").StringSchema<undefined>;
5
- }, undefined>, import("valibot").GenericSchema<unknown, unknown, import("valibot").BaseIssue<unknown>> | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
6
- readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
7
- readonly status: import("valibot").LiteralSchema<400, undefined>;
8
- }, undefined>, import("valibot").ObjectSchema<{
9
- readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
10
- readonly details: import("valibot").StringSchema<undefined>;
11
- readonly status: import("valibot").LiteralSchema<400, undefined>;
12
- }, undefined>, import("valibot").ObjectSchema<{
13
- readonly data: import("valibot").ObjectSchema<{
14
- readonly accessToken: import("valibot").StringSchema<undefined>;
15
- readonly expiresIn: import("valibot").NumberSchema<undefined>;
16
- readonly idToken: import("valibot").StringSchema<undefined>;
17
- readonly refreshToken: import("valibot").StringSchema<undefined>;
18
- }, undefined>;
19
- readonly status: import("valibot").LiteralSchema<200, undefined>;
20
- }, undefined>], undefined>>;
21
3
  sendAuthCode: import("../../..").EndpointConfig<"/v1/pb/auth/send-code", import("valibot").ObjectSchema<{
22
4
  readonly email: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").EmailAction<string, undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
23
5
  }, undefined>, import("valibot").GenericSchema<unknown, unknown, import("valibot").BaseIssue<unknown>> | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
24
6
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
25
7
  readonly status: import("valibot").LiteralSchema<400, undefined>;
8
+ }, undefined>, import("valibot").ObjectSchema<{
9
+ readonly code: import("valibot").LiteralSchema<"AUTH_SERVER_RESPONSE_UNEXPECTED", undefined>;
10
+ readonly status: import("valibot").LiteralSchema<502, undefined>;
26
11
  }, undefined>, import("valibot").ObjectSchema<{
27
12
  readonly status: import("valibot").LiteralSchema<200, undefined>;
28
13
  }, undefined>], undefined>>;
@@ -33,15 +18,19 @@ export declare const publicGroup: {
33
18
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
34
19
  readonly status: import("valibot").LiteralSchema<400, undefined>;
35
20
  }, undefined>, import("valibot").ObjectSchema<{
36
- readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
37
- readonly details: import("valibot").StringSchema<undefined>;
38
- readonly status: import("valibot").LiteralSchema<400, undefined>;
21
+ readonly code: import("valibot").LiteralSchema<"AUTH_CODE_EXPIRED", undefined>;
22
+ readonly status: import("valibot").LiteralSchema<401, undefined>;
23
+ }, undefined>, import("valibot").ObjectSchema<{
24
+ readonly code: import("valibot").LiteralSchema<"AUTH_CODE_PREVIOUSLY_USED", undefined>;
25
+ readonly status: import("valibot").LiteralSchema<401, undefined>;
26
+ }, undefined>, import("valibot").ObjectSchema<{
27
+ readonly code: import("valibot").LiteralSchema<"AUTH_SERVER_RESPONSE_UNEXPECTED", undefined>;
28
+ readonly status: import("valibot").LiteralSchema<502, undefined>;
39
29
  }, undefined>, import("valibot").ObjectSchema<{
40
30
  readonly data: import("valibot").ObjectSchema<{
41
31
  readonly accessToken: import("valibot").StringSchema<undefined>;
42
- readonly expiresIn: import("valibot").NumberSchema<undefined>;
43
- readonly idToken: import("valibot").StringSchema<undefined>;
44
32
  readonly refreshToken: import("valibot").StringSchema<undefined>;
33
+ readonly userId: import("valibot").StringSchema<undefined>;
45
34
  }, undefined>;
46
35
  readonly status: import("valibot").LiteralSchema<200, undefined>;
47
36
  }, undefined>], undefined>>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sdk/endpoints/public/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGvB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sdk/endpoints/public/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGvB,CAAA"}
@@ -10,7 +10,7 @@ export declare const marcoSDK: {
10
10
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
11
11
  readonly status: import("valibot").LiteralSchema<400, undefined>;
12
12
  }, undefined>, import("valibot").ObjectSchema<{
13
- readonly code: import("valibot").LiteralSchema<"NOT_AUTHENTICATED", undefined>;
13
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
14
14
  readonly status: import("valibot").LiteralSchema<401, undefined>;
15
15
  }, undefined>, import("valibot").ObjectSchema<{
16
16
  readonly data: import("valibot").ObjectSchema<{
@@ -55,7 +55,7 @@ export declare const marcoSDK: {
55
55
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
56
56
  readonly status: import("valibot").LiteralSchema<400, undefined>;
57
57
  }, undefined>, import("valibot").ObjectSchema<{
58
- readonly code: import("valibot").LiteralSchema<"NOT_AUTHENTICATED", undefined>;
58
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
59
59
  readonly status: import("valibot").LiteralSchema<401, undefined>;
60
60
  }, undefined>, import("valibot").ObjectSchema<{
61
61
  readonly data: import("valibot").ObjectSchema<{
@@ -89,7 +89,7 @@ export declare const marcoSDK: {
89
89
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
90
90
  readonly status: import("valibot").LiteralSchema<400, undefined>;
91
91
  }, undefined>, import("valibot").ObjectSchema<{
92
- readonly code: import("valibot").LiteralSchema<"NOT_AUTHENTICATED", undefined>;
92
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
93
93
  readonly status: import("valibot").LiteralSchema<401, undefined>;
94
94
  }, undefined>, import("valibot").ObjectSchema<{
95
95
  readonly data: import("valibot").ObjectSchema<{
@@ -174,7 +174,7 @@ export declare const marcoSDK: {
174
174
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
175
175
  readonly status: import("valibot").LiteralSchema<400, undefined>;
176
176
  }, undefined>, import("valibot").ObjectSchema<{
177
- readonly code: import("valibot").LiteralSchema<"NOT_AUTHENTICATED", undefined>;
177
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
178
178
  readonly status: import("valibot").LiteralSchema<401, undefined>;
179
179
  }, undefined>, import("valibot").ObjectSchema<{
180
180
  readonly status: import("valibot").LiteralSchema<200, undefined>;
@@ -195,7 +195,7 @@ export declare const marcoSDK: {
195
195
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
196
196
  readonly status: import("valibot").LiteralSchema<400, undefined>;
197
197
  }, undefined>, import("valibot").ObjectSchema<{
198
- readonly code: import("valibot").LiteralSchema<"NOT_AUTHENTICATED", undefined>;
198
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
199
199
  readonly status: import("valibot").LiteralSchema<401, undefined>;
200
200
  }, undefined>, import("valibot").ObjectSchema<{
201
201
  readonly code: import("valibot").LiteralSchema<"MESSAGE_NOT_FOUND", undefined>;
@@ -207,7 +207,7 @@ export declare const marcoSDK: {
207
207
  };
208
208
  user: {
209
209
  deleteUser: import("..").EndpointConfig<"/v1/pv/user", import("valibot").GenericSchema<unknown, unknown, import("valibot").BaseIssue<unknown>> | undefined, import("valibot").GenericSchema<unknown, unknown, import("valibot").BaseIssue<unknown>> | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
210
- readonly code: import("valibot").LiteralSchema<"NOT_AUTHENTICATED", undefined>;
210
+ readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
211
211
  readonly status: import("valibot").LiteralSchema<401, undefined>;
212
212
  }, undefined>, import("valibot").ObjectSchema<{
213
213
  readonly status: import("valibot").LiteralSchema<204, undefined>;
@@ -216,29 +216,14 @@ export declare const marcoSDK: {
216
216
  };
217
217
  public: {
218
218
  auth: {
219
- refreshAuth: import("..").EndpointConfig<"/v1/pb/auth/refresh", import("valibot").ObjectSchema<{
220
- readonly refreshToken: import("valibot").StringSchema<undefined>;
221
- }, undefined>, import("valibot").GenericSchema<unknown, unknown, import("valibot").BaseIssue<unknown>> | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
222
- readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
223
- readonly status: import("valibot").LiteralSchema<400, undefined>;
224
- }, undefined>, import("valibot").ObjectSchema<{
225
- readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
226
- readonly details: import("valibot").StringSchema<undefined>;
227
- readonly status: import("valibot").LiteralSchema<400, undefined>;
228
- }, undefined>, import("valibot").ObjectSchema<{
229
- readonly data: import("valibot").ObjectSchema<{
230
- readonly accessToken: import("valibot").StringSchema<undefined>;
231
- readonly expiresIn: import("valibot").NumberSchema<undefined>;
232
- readonly idToken: import("valibot").StringSchema<undefined>;
233
- readonly refreshToken: import("valibot").StringSchema<undefined>;
234
- }, undefined>;
235
- readonly status: import("valibot").LiteralSchema<200, undefined>;
236
- }, undefined>], undefined>>;
237
219
  sendAuthCode: import("..").EndpointConfig<"/v1/pb/auth/send-code", import("valibot").ObjectSchema<{
238
220
  readonly email: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<[import("valibot").StringSchema<undefined>, import("valibot").EmailAction<string, undefined>, import("valibot").MaxLengthAction<string, 255, undefined>]>, undefined>;
239
221
  }, undefined>, import("valibot").GenericSchema<unknown, unknown, import("valibot").BaseIssue<unknown>> | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
240
222
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
241
223
  readonly status: import("valibot").LiteralSchema<400, undefined>;
224
+ }, undefined>, import("valibot").ObjectSchema<{
225
+ readonly code: import("valibot").LiteralSchema<"AUTH_SERVER_RESPONSE_UNEXPECTED", undefined>;
226
+ readonly status: import("valibot").LiteralSchema<502, undefined>;
242
227
  }, undefined>, import("valibot").ObjectSchema<{
243
228
  readonly status: import("valibot").LiteralSchema<200, undefined>;
244
229
  }, undefined>], undefined>>;
@@ -249,15 +234,19 @@ export declare const marcoSDK: {
249
234
  readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
250
235
  readonly status: import("valibot").LiteralSchema<400, undefined>;
251
236
  }, undefined>, import("valibot").ObjectSchema<{
252
- readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
253
- readonly details: import("valibot").StringSchema<undefined>;
254
- readonly status: import("valibot").LiteralSchema<400, undefined>;
237
+ readonly code: import("valibot").LiteralSchema<"AUTH_CODE_EXPIRED", undefined>;
238
+ readonly status: import("valibot").LiteralSchema<401, undefined>;
239
+ }, undefined>, import("valibot").ObjectSchema<{
240
+ readonly code: import("valibot").LiteralSchema<"AUTH_CODE_PREVIOUSLY_USED", undefined>;
241
+ readonly status: import("valibot").LiteralSchema<401, undefined>;
242
+ }, undefined>, import("valibot").ObjectSchema<{
243
+ readonly code: import("valibot").LiteralSchema<"AUTH_SERVER_RESPONSE_UNEXPECTED", undefined>;
244
+ readonly status: import("valibot").LiteralSchema<502, undefined>;
255
245
  }, undefined>, import("valibot").ObjectSchema<{
256
246
  readonly data: import("valibot").ObjectSchema<{
257
247
  readonly accessToken: import("valibot").StringSchema<undefined>;
258
- readonly expiresIn: import("valibot").NumberSchema<undefined>;
259
- readonly idToken: import("valibot").StringSchema<undefined>;
260
248
  readonly refreshToken: import("valibot").StringSchema<undefined>;
249
+ readonly userId: import("valibot").StringSchema<undefined>;
261
250
  }, undefined>;
262
251
  readonly status: import("valibot").LiteralSchema<200, undefined>;
263
252
  }, undefined>], undefined>>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGpB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGpB,CAAA"}
@@ -1,35 +1,49 @@
1
1
  import * as v from 'valibot';
2
- export declare const validationFailedErrorSchema: v.ObjectSchema<{
3
- readonly code: v.LiteralSchema<"VALIDATION_FAILED", undefined>;
4
- readonly status: v.LiteralSchema<400, undefined>;
2
+ export declare const authCodeExpiredErrorSchema: v.ObjectSchema<{
3
+ readonly code: v.LiteralSchema<"AUTH_CODE_EXPIRED", undefined>;
4
+ readonly status: v.LiteralSchema<401, undefined>;
5
5
  }, undefined>;
6
- export declare const notAuthenticatedErrorSchema: v.ObjectSchema<{
7
- readonly code: v.LiteralSchema<"NOT_AUTHENTICATED", undefined>;
6
+ export declare const authCodePreviouslyUsedErrorSchema: v.ObjectSchema<{
7
+ readonly code: v.LiteralSchema<"AUTH_CODE_PREVIOUSLY_USED", undefined>;
8
8
  readonly status: v.LiteralSchema<401, undefined>;
9
9
  }, undefined>;
10
+ export declare const authServerResponseUnexpectedErrorSchema: v.ObjectSchema<{
11
+ readonly code: v.LiteralSchema<"AUTH_SERVER_RESPONSE_UNEXPECTED", undefined>;
12
+ readonly status: v.LiteralSchema<502, undefined>;
13
+ }, undefined>;
10
14
  export declare const authenticationFailedErrorSchema: v.ObjectSchema<{
11
15
  readonly code: v.LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
12
- readonly details: v.StringSchema<undefined>;
13
- readonly status: v.LiteralSchema<400, undefined>;
16
+ readonly status: v.LiteralSchema<401, undefined>;
14
17
  }, undefined>;
15
18
  export declare const messageNotFoundErrorSchema: v.ObjectSchema<{
16
19
  readonly code: v.LiteralSchema<"MESSAGE_NOT_FOUND", undefined>;
17
20
  readonly status: v.LiteralSchema<404, undefined>;
18
21
  }, undefined>;
22
+ export declare const validationFailedErrorSchema: v.ObjectSchema<{
23
+ readonly code: v.LiteralSchema<"VALIDATION_FAILED", undefined>;
24
+ readonly status: v.LiteralSchema<400, undefined>;
25
+ }, undefined>;
19
26
  export declare const errorManifest: {
27
+ authCodeExpiredErrorSchema: v.ObjectSchema<{
28
+ readonly code: v.LiteralSchema<"AUTH_CODE_EXPIRED", undefined>;
29
+ readonly status: v.LiteralSchema<401, undefined>;
30
+ }, undefined>;
31
+ authCodePreviouslyUsedErrorSchema: v.ObjectSchema<{
32
+ readonly code: v.LiteralSchema<"AUTH_CODE_PREVIOUSLY_USED", undefined>;
33
+ readonly status: v.LiteralSchema<401, undefined>;
34
+ }, undefined>;
35
+ authServerResponseUnexpectedErrorSchema: v.ObjectSchema<{
36
+ readonly code: v.LiteralSchema<"AUTH_SERVER_RESPONSE_UNEXPECTED", undefined>;
37
+ readonly status: v.LiteralSchema<502, undefined>;
38
+ }, undefined>;
20
39
  authenticationFailedErrorSchema: v.ObjectSchema<{
21
40
  readonly code: v.LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
22
- readonly details: v.StringSchema<undefined>;
23
- readonly status: v.LiteralSchema<400, undefined>;
41
+ readonly status: v.LiteralSchema<401, undefined>;
24
42
  }, undefined>;
25
43
  messageNotFoundErrorSchema: v.ObjectSchema<{
26
44
  readonly code: v.LiteralSchema<"MESSAGE_NOT_FOUND", undefined>;
27
45
  readonly status: v.LiteralSchema<404, undefined>;
28
46
  }, undefined>;
29
- notAuthenticatedErrorSchema: v.ObjectSchema<{
30
- readonly code: v.LiteralSchema<"NOT_AUTHENTICATED", undefined>;
31
- readonly status: v.LiteralSchema<401, undefined>;
32
- }, undefined>;
33
47
  validationFailedErrorSchema: v.ObjectSchema<{
34
48
  readonly code: v.LiteralSchema<"VALIDATION_FAILED", undefined>;
35
49
  readonly status: v.LiteralSchema<400, undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/sdk/validation/errors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAQ5B,eAAO,MAAM,2BAA2B;;;aAGtC,CAAA;AAEF,eAAO,MAAM,2BAA2B;;;aAGtC,CAAA;AAEF,eAAO,MAAM,+BAA+B;;;;aAI1C,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;aAGrC,CAAA;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;CAKD,CAAA"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/sdk/validation/errors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAQ5B,eAAO,MAAM,0BAA0B;;;aAGrC,CAAA;AAEF,eAAO,MAAM,iCAAiC;;;aAG5C,CAAA;AAEF,eAAO,MAAM,uCAAuC;;;aAGlD,CAAA;AAEF,eAAO,MAAM,+BAA+B;;;aAG1C,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;aAGrC,CAAA;AAEF,eAAO,MAAM,2BAA2B;;;aAGtC,CAAA;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;CAOD,CAAA"}
@@ -1,24 +1,33 @@
1
1
  import * as v from 'valibot';
2
- export const validationFailedErrorSchema = v.object({
3
- code: v.literal('VALIDATION_FAILED'),
4
- status: v.literal(400),
2
+ export const authCodeExpiredErrorSchema = v.object({
3
+ code: v.literal('AUTH_CODE_EXPIRED'),
4
+ status: v.literal(401),
5
5
  });
6
- export const notAuthenticatedErrorSchema = v.object({
7
- code: v.literal('NOT_AUTHENTICATED'),
6
+ export const authCodePreviouslyUsedErrorSchema = v.object({
7
+ code: v.literal('AUTH_CODE_PREVIOUSLY_USED'),
8
8
  status: v.literal(401),
9
9
  });
10
+ export const authServerResponseUnexpectedErrorSchema = v.object({
11
+ code: v.literal('AUTH_SERVER_RESPONSE_UNEXPECTED'),
12
+ status: v.literal(502),
13
+ });
10
14
  export const authenticationFailedErrorSchema = v.object({
11
15
  code: v.literal('AUTHENTICATION_FAILED'),
12
- details: v.string(),
13
- status: v.literal(400),
16
+ status: v.literal(401),
14
17
  });
15
18
  export const messageNotFoundErrorSchema = v.object({
16
19
  code: v.literal('MESSAGE_NOT_FOUND'),
17
20
  status: v.literal(404),
18
21
  });
22
+ export const validationFailedErrorSchema = v.object({
23
+ code: v.literal('VALIDATION_FAILED'),
24
+ status: v.literal(400),
25
+ });
19
26
  export const errorManifest = {
27
+ authCodeExpiredErrorSchema,
28
+ authCodePreviouslyUsedErrorSchema,
29
+ authServerResponseUnexpectedErrorSchema,
20
30
  authenticationFailedErrorSchema,
21
31
  messageNotFoundErrorSchema,
22
- notAuthenticatedErrorSchema,
23
32
  validationFailedErrorSchema,
24
33
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marcoappio/marco-config",
3
- "version": "2.0.136",
3
+ "version": "2.0.137",
4
4
  "author": "team@marcoapp.io",
5
5
  "main": "dist/index.js",
6
6
  "repository": "git@github.com:marcoappio/marco-config.git",
@@ -1,20 +0,0 @@
1
- import * as v from 'valibot';
2
- export declare const refreshAuth: import("../../../..").EndpointConfig<"/v1/pb/auth/refresh", v.ObjectSchema<{
3
- readonly refreshToken: v.StringSchema<undefined>;
4
- }, undefined>, v.GenericSchema<unknown, unknown, v.BaseIssue<unknown>> | undefined, v.UnionSchema<[v.ObjectSchema<{
5
- readonly code: v.LiteralSchema<"VALIDATION_FAILED", undefined>;
6
- readonly status: v.LiteralSchema<400, undefined>;
7
- }, undefined>, v.ObjectSchema<{
8
- readonly code: v.LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
9
- readonly details: v.StringSchema<undefined>;
10
- readonly status: v.LiteralSchema<400, undefined>;
11
- }, undefined>, v.ObjectSchema<{
12
- readonly data: v.ObjectSchema<{
13
- readonly accessToken: v.StringSchema<undefined>;
14
- readonly expiresIn: v.NumberSchema<undefined>;
15
- readonly idToken: v.StringSchema<undefined>;
16
- readonly refreshToken: v.StringSchema<undefined>;
17
- }, undefined>;
18
- readonly status: v.LiteralSchema<200, undefined>;
19
- }, undefined>], undefined>>;
20
- //# sourceMappingURL=refreshAuth.d.ts.map
@@ -1 +0,0 @@
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;AAK5B,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;2BAmBtB,CAAA"}
@@ -1,23 +0,0 @@
1
- import * as v from 'valibot';
2
- import { createEndpoint } from '../../../../sdk/endpoints/createEndpointConfig';
3
- import { errorManifest } from '../../../../sdk/validation/errors';
4
- export const refreshAuth = createEndpoint({
5
- body: v.object({
6
- refreshToken: v.string(),
7
- }),
8
- method: 'POST',
9
- path: '/v1/pb/auth/refresh',
10
- response: v.union([
11
- errorManifest.validationFailedErrorSchema,
12
- errorManifest.authenticationFailedErrorSchema,
13
- v.object({
14
- data: v.object({
15
- accessToken: v.string(),
16
- expiresIn: v.number(),
17
- idToken: v.string(),
18
- refreshToken: v.string(),
19
- }),
20
- status: v.literal(200),
21
- }),
22
- ]),
23
- });