Skip to content

Commit b28d3e0

Browse files
ivandotvgithub-actions[bot]
authored andcommitted
Generate docs
1 parent 5ef1256 commit b28d3e0

File tree

4 files changed

+34
-33
lines changed

4 files changed

+34
-33
lines changed

lib/koa-api/docs/api/README.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ nextjs-koa-api
2222

2323
### Functions
2424

25+
- [attachRouter](README.md#attachrouter)
2526
- [withKoaApi](README.md#withkoaapi)
2627

2728
## Type aliases
@@ -43,7 +44,7 @@ Koa API options
4344

4445
#### Defined in
4546

46-
[lib/koa-api/src/koa-api.ts:33](https://github.com/ivandotv/nextjs-koa-api/blob/6436201/lib/koa-api/src/koa-api.ts#L33)
47+
[lib/koa-api/src/koa-api.ts:33](https://github.com/ivandotv/nextjs-koa-api/blob/5ef1256/lib/koa-api/src/koa-api.ts#L33)
4748

4849
---
4950

@@ -64,10 +65,34 @@ Koa API options
6465

6566
#### Defined in
6667

67-
[lib/koa-api/src/koa-api.ts:17](https://github.com/ivandotv/nextjs-koa-api/blob/6436201/lib/koa-api/src/koa-api.ts#L17)
68+
[lib/koa-api/src/koa-api.ts:17](https://github.com/ivandotv/nextjs-koa-api/blob/5ef1256/lib/koa-api/src/koa-api.ts#L17)
6869

6970
## Functions
7071

72+
### attachRouter
73+
74+
**attachRouter**(`path`, `app`, `router`): `void`
75+
76+
Attaches router to a particular path. Internally it setups a prefix on the router, and calls `router.routes()` and `router.allowedMethods()`
77+
78+
#### Parameters
79+
80+
| Name | Type | Description |
81+
| :------- | :------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------- |
82+
| `path` | `string` | path to attach the router to |
83+
| `app` | [`KoaApi`](classes/KoaApi.md)<[`DefaultState`](interfaces/Koa.DefaultState.md), [`DefaultContext`](interfaces/Koa.DefaultContext.md)\> | - |
84+
| `router` | [`Router`](classes/Router.md)<[`DefaultState`](interfaces/Koa.DefaultState.md), [`DefaultContext`](interfaces/Koa.DefaultContext.md)\> | router to attach |
85+
86+
#### Returns
87+
88+
`void`
89+
90+
#### Defined in
91+
92+
[lib/koa-api/src/koa-api.ts:108](https://github.com/ivandotv/nextjs-koa-api/blob/5ef1256/lib/koa-api/src/koa-api.ts#L108)
93+
94+
---
95+
7196
### withKoaApi
7297

7398
**withKoaApi**(`koa`): (`req`: `NextApiRequest`, `res`: `NextApiResponse`<`any`\>) => `Promise`<`unknown`\>
@@ -100,4 +125,4 @@ It should be used as default export from the Next.js api route file
100125

101126
#### Defined in
102127

103-
[lib/koa-api/src/koa-api.ts:110](https://github.com/ivandotv/nextjs-koa-api/blob/6436201/lib/koa-api/src/koa-api.ts#L110)
128+
[lib/koa-api/src/koa-api.ts:99](https://github.com/ivandotv/nextjs-koa-api/blob/5ef1256/lib/koa-api/src/koa-api.ts#L99)

lib/koa-api/docs/api/classes/KoaApi.md

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
### Methods
4444

4545
- [addListener](KoaApi.md#addlistener)
46-
- [attachRouter](KoaApi.md#attachrouter)
4746
- [callback](KoaApi.md#callback)
4847
- [createContext](KoaApi.md#createcontext)
4948
- [emit](KoaApi.md#emit)
@@ -97,7 +96,7 @@
9796

9897
#### Defined in
9998

100-
[lib/koa-api/src/koa-api.ts:54](https://github.com/ivandotv/nextjs-koa-api/blob/6436201/lib/koa-api/src/koa-api.ts#L54)
99+
[lib/koa-api/src/koa-api.ts:54](https://github.com/ivandotv/nextjs-koa-api/blob/5ef1256/lib/koa-api/src/koa-api.ts#L54)
101100

102101
## Properties
103102

@@ -233,7 +232,7 @@ node_modules/.pnpm/@types+koa@2.13.4/node_modules/@types/koa/index.d.ts:456
233232

234233
#### Defined in
235234

236-
[lib/koa-api/src/koa-api.ts:48](https://github.com/ivandotv/nextjs-koa-api/blob/6436201/lib/koa-api/src/koa-api.ts#L48)
235+
[lib/koa-api/src/koa-api.ts:48](https://github.com/ivandotv/nextjs-koa-api/blob/5ef1256/lib/koa-api/src/koa-api.ts#L48)
237236

238237
---
239238

@@ -360,29 +359,6 @@ node_modules/.pnpm/@types+node@17.0.31/node_modules/@types/node/events.d.ts:327
360359

361360
---
362361

363-
### attachRouter
364-
365-
**attachRouter**(`path`, `router`): [`KoaApi`](KoaApi.md)<`TState`, `TContext`\>
366-
367-
Attaches router to a particular path. Internally it setups a prefix on the router, and calls `router.routes()` and `router.allowedMethods()`
368-
369-
#### Parameters
370-
371-
| Name | Type | Description |
372-
| :------- | :----------------------------------------------------------------------------------------------------------------------------------- | :--------------------------- |
373-
| `path` | `string` | path to attach the router to |
374-
| `router` | [`Router`](Router.md)<[`DefaultState`](../interfaces/Koa.DefaultState.md), [`DefaultContext`](../interfaces/Koa.DefaultContext.md)\> | router to attach |
375-
376-
#### Returns
377-
378-
[`KoaApi`](KoaApi.md)<`TState`, `TContext`\>
379-
380-
#### Defined in
381-
382-
[lib/koa-api/src/koa-api.ts:78](https://github.com/ivandotv/nextjs-koa-api/blob/6436201/lib/koa-api/src/koa-api.ts#L78)
383-
384-
---
385-
386362
### callback
387363

388364
**callback**(): (`req`: `IncomingMessage` \| `Http2ServerRequest`, `res`: `ServerResponse` \| `Http2ServerResponse`) => `void`
@@ -1316,7 +1292,7 @@ Run koa api with request and response objects
13161292

13171293
#### Defined in
13181294

1319-
[lib/koa-api/src/koa-api.ts:89](https://github.com/ivandotv/nextjs-koa-api/blob/6436201/lib/koa-api/src/koa-api.ts#L89)
1295+
[lib/koa-api/src/koa-api.ts:78](https://github.com/ivandotv/nextjs-koa-api/blob/5ef1256/lib/koa-api/src/koa-api.ts#L78)
13201296

13211297
---
13221298

lib/koa-api/docs/api/interfaces/Koa.Request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ node_modules/.pnpm/@types+koa@2.13.4/node_modules/@types/koa/index.d.ts:703
105105

106106
#### Defined in
107107

108-
[lib/koa-api/src/koa-api.ts:10](https://github.com/ivandotv/nextjs-koa-api/blob/6436201/lib/koa-api/src/koa-api.ts#L10)
108+
[lib/koa-api/src/koa-api.ts:10](https://github.com/ivandotv/nextjs-koa-api/blob/5ef1256/lib/koa-api/src/koa-api.ts#L10)
109109

110110
---
111111

lib/koa-api/docs/api/modules/Koa.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ node_modules/.pnpm/@types+koa@2.13.4/node_modules/@types/koa/index.d.ts:541
5858

5959
#### Defined in
6060

61-
[lib/koa-api/src/koa-api.ts:7](https://github.com/ivandotv/nextjs-koa-api/blob/6436201/lib/koa-api/src/koa-api.ts#L7)
61+
[lib/koa-api/src/koa-api.ts:7](https://github.com/ivandotv/nextjs-koa-api/blob/5ef1256/lib/koa-api/src/koa-api.ts#L7)
6262

6363
---
6464

@@ -122,7 +122,7 @@ node_modules/.pnpm/@types+koa@2.13.4/node_modules/@types/koa/index.d.ts:736
122122

123123
#### Defined in
124124

125-
[lib/koa-api/src/koa-api.ts:8](https://github.com/ivandotv/nextjs-koa-api/blob/6436201/lib/koa-api/src/koa-api.ts#L8)
125+
[lib/koa-api/src/koa-api.ts:8](https://github.com/ivandotv/nextjs-koa-api/blob/5ef1256/lib/koa-api/src/koa-api.ts#L8)
126126

127127
## Variables
128128

0 commit comments

Comments
 (0)