@prover-coder-ai/openapi-effect 1.0.19

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.
@@ -0,0 +1,445 @@
1
+ export interface paths {
2
+ "/api/auth/login": {
3
+ parameters: {
4
+ query?: never
5
+ header?: never
6
+ path?: never
7
+ cookie?: never
8
+ }
9
+ get?: never
10
+ put?: never
11
+ post: operations["auth.postLogin"]
12
+ delete?: never
13
+ options?: never
14
+ head?: never
15
+ patch?: never
16
+ trace?: never
17
+ }
18
+ "/api/auth/logout": {
19
+ parameters: {
20
+ query?: never
21
+ header?: never
22
+ path?: never
23
+ cookie?: never
24
+ }
25
+ get?: never
26
+ put?: never
27
+ post: operations["auth.postLogout"]
28
+ delete?: never
29
+ options?: never
30
+ head?: never
31
+ patch?: never
32
+ trace?: never
33
+ }
34
+ "/api/auth/me": {
35
+ parameters: {
36
+ query?: never
37
+ header?: never
38
+ path?: never
39
+ cookie?: never
40
+ }
41
+ get: operations["auth.getMe"]
42
+ put?: never
43
+ post?: never
44
+ delete?: never
45
+ options?: never
46
+ head?: never
47
+ patch?: never
48
+ trace?: never
49
+ }
50
+ "/api/register": {
51
+ parameters: {
52
+ query?: never
53
+ header?: never
54
+ path?: never
55
+ cookie?: never
56
+ }
57
+ get?: never
58
+ put?: never
59
+ post: operations["registration.postRegister"]
60
+ delete?: never
61
+ options?: never
62
+ head?: never
63
+ patch?: never
64
+ trace?: never
65
+ }
66
+ }
67
+
68
+ export interface operations {
69
+ "auth.postLogin": {
70
+ parameters: {
71
+ query?: never
72
+ header?: never
73
+ path?: never
74
+ cookie?: never
75
+ }
76
+ requestBody: {
77
+ content: {
78
+ "application/json": {
79
+ /** Format: email */
80
+ email: string
81
+ /** Format: password */
82
+ password: string
83
+ }
84
+ }
85
+ }
86
+ responses: {
87
+ /** @description Success */
88
+ 200: {
89
+ headers: {
90
+ [name: string]: string
91
+ }
92
+ content: {
93
+ "application/json": {
94
+ id: components["schemas"]["UUID"]
95
+ /** Format: email */
96
+ email: string
97
+ firstName: string
98
+ lastName: string
99
+ profileImageUrl: string | null
100
+ emailVerified: boolean
101
+ phoneVerified: boolean
102
+ }
103
+ }
104
+ }
105
+ /** @description The request did not match the expected schema */
106
+ 400: {
107
+ headers: {
108
+ [name: string]: string
109
+ }
110
+ content: {
111
+ "application/json":
112
+ | components["schemas"]["HttpApiDecodeError"]
113
+ | {
114
+ /** @enum {string} */
115
+ error: "invalid_payload"
116
+ }
117
+ }
118
+ }
119
+ /** @description Error */
120
+ 401: {
121
+ headers: {
122
+ [name: string]: string
123
+ }
124
+ content: {
125
+ "application/json": {
126
+ /** @enum {string} */
127
+ error: "invalid_credentials"
128
+ }
129
+ }
130
+ }
131
+ /** @description Error */
132
+ 500: {
133
+ headers: {
134
+ [name: string]: string
135
+ }
136
+ content: {
137
+ "application/json": {
138
+ /** @enum {string} */
139
+ error: "internal_error"
140
+ }
141
+ }
142
+ }
143
+ }
144
+ }
145
+ "auth.postLogout": {
146
+ parameters: {
147
+ query?: never
148
+ header?: never
149
+ path?: never
150
+ cookie?: never
151
+ }
152
+ requestBody?: never
153
+ responses: {
154
+ /** @description Success */
155
+ 204: {
156
+ headers: {
157
+ [name: string]: string
158
+ }
159
+ content?: never
160
+ }
161
+ /** @description The request did not match the expected schema */
162
+ 400: {
163
+ headers: {
164
+ [name: string]: string
165
+ }
166
+ content: {
167
+ "application/json": components["schemas"]["HttpApiDecodeError"]
168
+ }
169
+ }
170
+ /** @description Error */
171
+ 401: {
172
+ headers: {
173
+ [name: string]: string
174
+ }
175
+ content: {
176
+ "application/json": {
177
+ /** @enum {string} */
178
+ error: "unauthorized"
179
+ }
180
+ }
181
+ }
182
+ /** @description Error */
183
+ 500: {
184
+ headers: {
185
+ [name: string]: string
186
+ }
187
+ content: {
188
+ "application/json":
189
+ | {
190
+ /** @enum {string} */
191
+ error: "internal_error"
192
+ }
193
+ | {
194
+ /** @enum {string} */
195
+ error: "logout_failed"
196
+ }
197
+ }
198
+ }
199
+ }
200
+ }
201
+ "auth.getMe": {
202
+ parameters: {
203
+ query?: never
204
+ header?: never
205
+ path?: never
206
+ cookie?: never
207
+ }
208
+ requestBody?: never
209
+ responses: {
210
+ /** @description Success */
211
+ 200: {
212
+ headers: {
213
+ [name: string]: string
214
+ }
215
+ content: {
216
+ "application/json": {
217
+ id: components["schemas"]["UUID"]
218
+ /** Format: email */
219
+ email: string
220
+ firstName: string
221
+ lastName: string
222
+ profileImageUrl: string | null
223
+ emailVerified: boolean
224
+ phoneVerified: boolean
225
+ birthDate: string | null
226
+ about: string | null
227
+ messengers: Array<{
228
+ /** @enum {string} */
229
+ platform: "telegram" | "whatsapp"
230
+ handle: string
231
+ }>
232
+ memberships: Array<{
233
+ projectId: components["schemas"]["UUID"]
234
+ departmentId: components["schemas"]["UUID"]
235
+ positionId: components["schemas"]["UUID"]
236
+ /** @enum {string} */
237
+ role: "super_admin" | "admin" | "manager"
238
+ }>
239
+ adminProjectIds: Array<components["schemas"]["UUID"]>
240
+ workEmail: string | null
241
+ workPhone: string | null
242
+ }
243
+ }
244
+ }
245
+ /** @description The request did not match the expected schema */
246
+ 400: {
247
+ headers: {
248
+ [name: string]: string
249
+ }
250
+ content: {
251
+ "application/json": components["schemas"]["HttpApiDecodeError"]
252
+ }
253
+ }
254
+ /** @description Error */
255
+ 401: {
256
+ headers: {
257
+ [name: string]: string
258
+ }
259
+ content: {
260
+ "application/json": {
261
+ /** @enum {string} */
262
+ error: "unauthorized"
263
+ }
264
+ }
265
+ }
266
+ /** @description Error */
267
+ 404: {
268
+ headers: {
269
+ [name: string]: string
270
+ }
271
+ content: {
272
+ "application/json": {
273
+ /** @enum {string} */
274
+ error: "profile_not_found"
275
+ }
276
+ }
277
+ }
278
+ /** @description Error */
279
+ 500: {
280
+ headers: {
281
+ [name: string]: string
282
+ }
283
+ content: {
284
+ "application/json": {
285
+ /** @enum {string} */
286
+ error: "internal_error"
287
+ }
288
+ }
289
+ }
290
+ }
291
+ }
292
+ "registration.postRegister": {
293
+ parameters: {
294
+ query?: never
295
+ header?: never
296
+ path?: never
297
+ cookie?: never
298
+ }
299
+ requestBody: {
300
+ content: {
301
+ "application/json": {
302
+ token: string
303
+ /** Format: password */
304
+ password: string
305
+ }
306
+ }
307
+ }
308
+ responses: {
309
+ /** @description Success */
310
+ 201: {
311
+ headers: {
312
+ [name: string]: string
313
+ }
314
+ content: {
315
+ "application/json": {
316
+ id: components["schemas"]["UUID"]
317
+ /** Format: email */
318
+ email: string
319
+ firstName: string
320
+ lastName: string
321
+ profileImageUrl: string | null
322
+ }
323
+ }
324
+ }
325
+ /** @description The request did not match the expected schema */
326
+ 400: {
327
+ headers: {
328
+ [name: string]: string
329
+ }
330
+ content: {
331
+ "application/json":
332
+ | components["schemas"]["HttpApiDecodeError"]
333
+ | {
334
+ /** @enum {string} */
335
+ error: "invalid_payload"
336
+ }
337
+ | {
338
+ /** @enum {string} */
339
+ error: "weak_password"
340
+ policy: {
341
+ /** @enum {boolean} */
342
+ ok: false
343
+ tooShort: boolean
344
+ missingLower: boolean
345
+ missingUpper: boolean
346
+ missingDigit: boolean
347
+ missingSymbol: boolean
348
+ }
349
+ }
350
+ }
351
+ }
352
+ /** @description Error */
353
+ 404: {
354
+ headers: {
355
+ [name: string]: string
356
+ }
357
+ content: {
358
+ "application/json": {
359
+ /** @enum {string} */
360
+ error: "invitation_not_found_or_expired"
361
+ }
362
+ }
363
+ }
364
+ /** @description Error */
365
+ 409: {
366
+ headers: {
367
+ [name: string]: string
368
+ }
369
+ content: {
370
+ "application/json": {
371
+ /** @enum {string} */
372
+ error: "user_exists"
373
+ }
374
+ }
375
+ }
376
+ /** @description Error */
377
+ 500: {
378
+ headers: {
379
+ [name: string]: string
380
+ }
381
+ content: {
382
+ "application/json":
383
+ | {
384
+ /** @enum {string} */
385
+ error: "internal_error"
386
+ }
387
+ | {
388
+ /** @enum {string} */
389
+ error: "user_creation_failed"
390
+ }
391
+ }
392
+ }
393
+ }
394
+ }
395
+ }
396
+
397
+ export interface components {
398
+ schemas: {
399
+ /**
400
+ * Format: uuid
401
+ * @description a Universally Unique Identifier
402
+ */
403
+ UUID: string
404
+ /** @description The request did not match the expected schema */
405
+ HttpApiDecodeError: {
406
+ issues: Array<components["schemas"]["Issue"]>
407
+ message: string
408
+ /** @enum {string} */
409
+ _tag: "HttpApiDecodeError"
410
+ }
411
+ /** @description Represents an error encountered while parsing a value to match the schema */
412
+ Issue: {
413
+ /**
414
+ * @description The tag identifying the type of parse issue
415
+ * @enum {string}
416
+ */
417
+ _tag:
418
+ | "Pointer"
419
+ | "Unexpected"
420
+ | "Missing"
421
+ | "Composite"
422
+ | "Refinement"
423
+ | "Transformation"
424
+ | "Type"
425
+ | "Forbidden"
426
+ /** @description The path to the property where the issue occurred */
427
+ path: Array<components["schemas"]["PropertyKey"]>
428
+ /** @description A descriptive message explaining the issue */
429
+ message: string
430
+ }
431
+ PropertyKey:
432
+ | string
433
+ | number
434
+ | {
435
+ /** @enum {string} */
436
+ _tag: "symbol"
437
+ key: string
438
+ }
439
+ }
440
+ responses: never
441
+ parameters: never
442
+ requestBodies: never
443
+ headers: never
444
+ pathItems: never
445
+ }
@@ -0,0 +1,32 @@
1
+ // CHANGE: Main entry point for api-client core module with Effect-native error handling
2
+ // WHY: Export public API with proper separation: 2xx → success, non-2xx → error channel
3
+ // QUOTE(ТЗ): "Публичный API должен иметь вид: strictClient.GET(path, options): Effect<ApiSuccess<Op>, ApiFailure<Op>, R>"
4
+ // REF: issue-2, section 6, PR#3 comment about Effect representation
5
+ // SOURCE: n/a
6
+ // PURITY: CORE (re-exports)
7
+ // COMPLEXITY: O(1)
8
+
9
+ // Core types (compile-time)
10
+ export type {
11
+ ApiFailure,
12
+ ApiSuccess,
13
+ BodyFor,
14
+ BoundaryError,
15
+ ContentTypesFor,
16
+ DecodeError,
17
+ HttpError,
18
+ HttpErrorResponseVariant,
19
+ HttpErrorVariants,
20
+ OperationFor,
21
+ ParseError,
22
+ PathsForMethod,
23
+ ResponsesFor,
24
+ ResponseVariant,
25
+ StatusCodes,
26
+ SuccessVariants,
27
+ TransportError,
28
+ UnexpectedContentType,
29
+ UnexpectedStatus
30
+ } from "./strict-types.js"
31
+
32
+ export { assertNever } from "./strict-types.js"