@@ -48,173 +48,183 @@ export interface Api<E extends ApiEndpoint.ApiEndpoint.Any> extends Pipeable.Pip
4848}
4949
5050/**
51+ * @category models
5152 * @since 1.0.0
5253 */
5354export declare namespace Api {
5455 /**
5556 * Any api with `Endpoint = Endpoint.Any`
5657 *
58+ * @category models
5759 * @since 1.0.0
5860 */
5961 export type Any = Api < ApiEndpoint . ApiEndpoint . Any >
6062
6163 /**
6264 * Default api group spec.
6365 *
66+ * @category models
6467 * @since 1.0.0
6568 */
6669 export type Empty = Api < never >
6770
6871 /**
72+ * @category models
6973 * @since 1.0.0
7074 */
7175 export type Requirements < A > = A extends Api < infer E > ? ApiEndpoint . ApiEndpoint . Requirements < E >
7276 : never
7377
7478 /**
79+ * @category models
7580 * @since 1.0.0
7681 */
7782 export type Endpoints < A extends Any > = [ A ] extends [ Api < infer E > ] ? E
7883 : never
7984
8085 /**
86+ * @category models
8187 * @since 1.0.0
8288 */
8389 export type EndpointById < A extends Any , Id extends ApiEndpoint . ApiEndpoint . AnyId > = [ A ] extends [ Api < infer E > ]
8490 ? E extends ApiEndpoint . ApiEndpoint < Id , any , any , any > ? E : never
8591 : never
8692
8793 /**
94+ * @category models
8895 * @since 1.0.0
8996 */
9097 export type Ids < A extends Any > = [ Endpoints < A > ] extends [ ApiEndpoint . ApiEndpoint < infer Id , any , any , any > ] ? Id
9198 : never
9299}
93100
94101/**
95- * @category api
102+ * @category constructors
96103 * @since 1.0.0
97104 */
98105export const make : ( options ?: Partial < ApiOptions > ) => Api . Empty = internal . make
99106
100107/**
108+ * @category modifications
101109 * @since 1.0.0
102110 */
103111export const addEndpoint : < E2 extends ApiEndpoint . ApiEndpoint . Any > (
104112 endpoint : E2
105113) => < E1 extends ApiEndpoint . ApiEndpoint . Any > ( api : Api < E1 > ) => Api < E1 | E2 > = internal . addEndpoint
106114
107115/**
116+ * @category modifications
108117 * @since 1.0.0
109118 */
110119export const addGroup : < E2 extends ApiEndpoint . ApiEndpoint . Any > (
111120 group : ApiGroup . ApiGroup < E2 >
112121) => < E1 extends ApiEndpoint . ApiEndpoint . Any > ( api : Api < E1 > ) => Api < E1 | E2 > = internal . addGroup
113122
114123/**
124+ * @category getters
115125 * @since 1.0.0
116126 */
117127export const getEndpoint : < A extends Api . Any , Id extends Api . Ids < A > > ( api : A , id : Id ) => Api . EndpointById < A , Id > =
118128 internal . getEndpoint
119129
120130export {
121131 /**
122- * @category reexported
132+ * @category modifications
123133 * @since 1.0.0
124134 */
125135 addResponse ,
126136 /**
127- * @category reexported
137+ * @category modifications
128138 * @since 1.0.0
129139 */
130140 addSecurity ,
131141 /**
132- * @category reexported
142+ * @category constructors
133143 * @since 1.0.0
134144 */
135145 delete ,
136146 /**
137- * @category reexported
147+ * @category constructors
138148 * @since 1.0.0
139149 */
140150 get ,
141151 /**
142- * @category reexported
152+ * @category constructors
143153 * @since 1.0.0
144154 */
145155 make as endpoint ,
146156 /**
147- * @category reexported
157+ * @category constructors
148158 * @since 1.0.0
149159 */
150160 patch ,
151161 /**
152- * @category reexported
162+ * @category constructors
153163 * @since 1.0.0
154164 */
155165 post ,
156166 /**
157- * @category reexported
167+ * @category constructors
158168 * @since 1.0.0
159169 */
160170 put ,
161171 /**
162- * @category reexported
172+ * @category constructors
163173 * @since 1.0.0
164174 */
165175 setRequest ,
166176 /**
167- * @category reexported
177+ * @category modifications
168178 * @since 1.0.0
169179 */
170180 setRequestBody ,
171181 /**
172- * @category reexported
182+ * @category modifications
173183 * @since 1.0.0
174184 */
175185 setRequestHeaders ,
176186 /**
177- * @category reexported
187+ * @category modifications
178188 * @since 1.0.0
179189 */
180190 setRequestPath ,
181191 /**
182- * @category reexported
192+ * @category modifications
183193 * @since 1.0.0
184194 */
185195 setRequestQuery ,
186196 /**
187- * @category reexported
197+ * @category modifications
188198 * @since 1.0.0
189199 */
190200 setResponse ,
191201 /**
192- * @category reexported
202+ * @category modifications
193203 * @since 1.0.0
194204 */
195205 setResponseBody ,
196206 /**
197- * @category reexported
207+ * @category modifications
198208 * @since 1.0.0
199209 */
200210 setResponseHeaders ,
201211 /**
202- * @category reexported
212+ * @category modifications
203213 * @since 1.0.0
204214 */
205215 setResponseRepresentations ,
206216 /**
207- * @category reexported
217+ * @category modifications
208218 * @since 1.0.0
209219 */
210220 setResponseStatus ,
211221 /**
212- * @category reexported
222+ * @category modifications
213223 * @since 1.0.0
214224 */
215225 setSecurity
216226 /**
217- * @category reexported
227+ * @category modifications
218228 * @since 1.0.0
219229 */
220230} from "./ApiEndpoint.js"
0 commit comments