Skip to content

Commit 76d6fe9

Browse files
authored
docs: update docstrings (#486)
1 parent e1531c7 commit 76d6fe9

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

packages/effect-http/src/ApiEndpoint.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,19 +559,22 @@ export interface Security<A> {
559559
}
560560

561561
/**
562+
* @category models
562563
* @since 1.0.0
563564
*/
564565
export declare namespace ApiSecurity {
565566
/**
566567
* Any endpoint with `Request = Request.Any` and `Response = Response.Any`.
567568
*
569+
* @category models
568570
* @since 1.0.0
569571
*/
570572
export type Any = Security<any>
571573

572574
/**
573575
* Default security spec = no security scheme.
574576
*
577+
* @category models
575578
* @since 1.0.0
576579
*/
577580
export type Empty = {}

packages/effect-http/src/ApiResponse.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,12 @@ export interface ApiResponse<S extends ApiResponse.AnyStatus, B, H, R>
3232
{}
3333

3434
/**
35+
* @category models
3536
* @since 1.0.0
3637
*/
3738
export declare namespace ApiResponse {
3839
/**
40+
* @category models
3941
* @since 1.0.0
4042
*/
4143
export interface Variance<S, B, H, R> {
@@ -48,50 +50,58 @@ export declare namespace ApiResponse {
4850
}
4951

5052
/**
53+
* @category models
5154
* @since 1.0.0
5255
*/
5356
export type AnyStatus = number
5457

5558
/**
5659
* Any request with all `Body`, `Path`, `Query` and `Headers` set to `Schema.Schema.Any`.
5760
*
61+
* @category models
5862
* @since 1.0.0
5963
*/
6064
export type Any = ApiResponse<AnyStatus, any, any, unknown>
6165

6266
/**
6367
* Default response.
6468
*
69+
* @category models
6570
* @since 1.0.0
6671
*/
6772
export type Default = ApiResponse<200, ApiSchema.Ignored, ApiSchema.Ignored, never>
6873

6974
/**
75+
* @category models
7076
* @since 1.0.0
7177
*/
7278
export type Status<Request> = [Request] extends [ApiResponse<infer S, any, any, any>] ? S
7379
: never
7480

7581
/**
82+
* @category models
7683
* @since 1.0.0
7784
*/
7885
export type Body<Request> = [Request] extends [ApiResponse<any, infer B, any, any>] ? B
7986
: never
8087

8188
/**
89+
* @category models
8290
* @since 1.0.0
8391
*/
8492
export type Headers<Request> = [Request] extends [ApiResponse<any, any, infer H, any>] ? H
8593
: never
8694

8795
/**
96+
* @category models
8897
* @since 1.0.0
8998
*/
9099
export type Requirements<Request> = [Request] extends [ApiResponse<any, any, any, infer R>] ? R
91100
: never
92101
}
93102

94103
/**
104+
* @category refinements
95105
* @since 1.0.0
96106
*/
97107
export const isApiResponse: (u: unknown) => u is ApiResponse.Any = internal.isApiResponse

packages/effect-http/src/ApiSchema.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type * as Schema from "@effect/schema/Schema"
55
import * as internal from "./internal/api-schema.js"
66

77
/**
8-
* @category schemas
8+
* @category type id
99
* @since 1.0.0
1010
*/
1111
export const IgnoredId: unique symbol = internal.IgnoredId
@@ -17,21 +17,21 @@ export const IgnoredId: unique symbol = internal.IgnoredId
1717
export type IgnoredId = typeof IgnoredId
1818

1919
/**
20-
* @category schemas
20+
* @category type id
2121
* @since 1.0.0
2222
*/
2323
export const Ignored: Ignored = internal.Ignored
2424

2525
/**
26-
* @category models
26+
* @category type id
2727
* @since 1.0.0
2828
*/
2929
export interface Ignored {
3030
readonly [IgnoredId]: IgnoredId
3131
}
3232

3333
/**
34-
* @category schemas
34+
* @category refinements
3535
* @since 1.0.0
3636
*/
3737
export const isIgnored = (u: unknown): u is Ignored => (u as Ignored)?.[IgnoredId] === IgnoredId

0 commit comments

Comments
 (0)