Skip to content

Commit

Permalink
Merge pull request #89 from mbti-nf-team/feat/nf-team-fetch
Browse files Browse the repository at this point in the history
feat(@nf-team/fetch): v1 fetch api 공통 패키지 구현
  • Loading branch information
saseungmin authored Sep 20, 2024
2 parents 6841359 + 4580a3c commit ec1fc3d
Show file tree
Hide file tree
Showing 32 changed files with 467 additions and 34 deletions.
6 changes: 6 additions & 0 deletions .changeset/flat-cars-yell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"docs": major
"@nf-team/fetch": major
---

feat(@nf-team/fetch): v1 fetch api 공통 패키지 구현
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
8 changes: 8 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,12 @@ enableGlobalCache: false

nodeLinker: node-modules

supportedArchitectures:
os:
- darwin
- linux
cpu:
- x64
- arm64

yarnPath: .yarn/releases/yarn-4.4.0.cjs
16 changes: 8 additions & 8 deletions apps/docs/docs/core/modules.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: "modules"
title: "@nf-team/core - v2.0.2"
title: "@nf-team/core - v2.1.0"
sidebar_label: "Exports"
sidebar_position: 0.5
custom_edit_url: null
Expand Down Expand Up @@ -30,7 +30,7 @@ custom_edit_url: null

#### Defined in

[utils.ts:44](https://github.com/mbti-nf-team/frontend-libraries/blob/5614e38/packages/core/src/utils.ts#L44)
[utils.ts:44](https://github.com/mbti-nf-team/frontend-libraries/blob/35d6e12/packages/core/src/utils.ts#L44)

___

Expand All @@ -50,7 +50,7 @@ ___

#### Defined in

[utils.ts:26](https://github.com/mbti-nf-team/frontend-libraries/blob/5614e38/packages/core/src/utils.ts#L26)
[utils.ts:26](https://github.com/mbti-nf-team/frontend-libraries/blob/35d6e12/packages/core/src/utils.ts#L26)

___

Expand All @@ -71,7 +71,7 @@ ___

#### Defined in

[utils.ts:34](https://github.com/mbti-nf-team/frontend-libraries/blob/5614e38/packages/core/src/utils.ts#L34)
[utils.ts:34](https://github.com/mbti-nf-team/frontend-libraries/blob/35d6e12/packages/core/src/utils.ts#L34)

___

Expand All @@ -91,7 +91,7 @@ ___

#### Defined in

[utils.ts:64](https://github.com/mbti-nf-team/frontend-libraries/blob/5614e38/packages/core/src/utils.ts#L64)
[utils.ts:64](https://github.com/mbti-nf-team/frontend-libraries/blob/35d6e12/packages/core/src/utils.ts#L64)

___

Expand All @@ -117,7 +117,7 @@ ___

#### Defined in

[utils.ts:52](https://github.com/mbti-nf-team/frontend-libraries/blob/5614e38/packages/core/src/utils.ts#L52)
[utils.ts:52](https://github.com/mbti-nf-team/frontend-libraries/blob/35d6e12/packages/core/src/utils.ts#L52)

___

Expand Down Expand Up @@ -153,7 +153,7 @@ console.log(result); // 'newValue';

#### Defined in

[utils.ts:14](https://github.com/mbti-nf-team/frontend-libraries/blob/5614e38/packages/core/src/utils.ts#L14)
[utils.ts:14](https://github.com/mbti-nf-team/frontend-libraries/blob/35d6e12/packages/core/src/utils.ts#L14)

___

Expand All @@ -173,4 +173,4 @@ ___

#### Defined in

[utils.ts:36](https://github.com/mbti-nf-team/frontend-libraries/blob/5614e38/packages/core/src/utils.ts#L36)
[utils.ts:36](https://github.com/mbti-nf-team/frontend-libraries/blob/35d6e12/packages/core/src/utils.ts#L36)
2 changes: 2 additions & 0 deletions apps/docs/docs/fetch/_category_.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
label: "@nf-team/fetch"
position: 4
25 changes: 25 additions & 0 deletions apps/docs/docs/fetch/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
id: "index"
title: "@nf-team/fetch"
sidebar_label: "Readme"
sidebar_position: 0
custom_edit_url: null
---

# @nf-team/fetch

<a href="https://github.com/mbti-nf-team/frontend-libraries/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc">
<img src="https://img.shields.io/github/issues/mbti-nf-team/frontend-libraries?style=flat-square" />
</a>

<a href="https://github.com/mbti-nf-team/frontend-libraries/blob/main/LICENSE">
<img src="https://img.shields.io/github/license/mbti-nf-team/frontend-libraries?style=flat-square" />
</a>

[Check out our @nf-team/fetch libraries docs.](https://mbti-nf-team.github.io/frontend-libraries/docs/fetch)

## 🐛 Bug reporting
[Issues](https://github.com/mbti-nf-team/frontend-libraries/issues)

## 🔒 LICENSE
This libraries is [MIT licensed](https://github.com/mbti-nf-team/frontend-libraries/blob/main/packages/fetch/LICENSE).
63 changes: 63 additions & 0 deletions apps/docs/docs/fetch/interfaces/FetchApiRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
id: "FetchApiRequest"
title: "Interface: FetchApiRequest<K>"
sidebar_label: "FetchApiRequest"
sidebar_position: 0
custom_edit_url: null
---

## Type parameters

| Name | Type |
| :------ | :------ |
| `K` | `unknown` |

## Properties

### body

`Optional` **body**: `unknown`

#### Defined in

[fetch.ts:19](https://github.com/mbti-nf-team/frontend-libraries/blob/35d6e12/packages/fetch/src/fetch.ts#L19)

___

### config

`Optional` **config**: `Omit`\<`RequestInit`, ``"method"`` \| ``"body"``\>

#### Defined in

[fetch.ts:20](https://github.com/mbti-nf-team/frontend-libraries/blob/35d6e12/packages/fetch/src/fetch.ts#L20)

___

### method

`Optional` **method**: [`Method`](../modules.md#method)

#### Defined in

[fetch.ts:18](https://github.com/mbti-nf-team/frontend-libraries/blob/35d6e12/packages/fetch/src/fetch.ts#L18)

___

### params

`Optional` **params**: `K`

#### Defined in

[fetch.ts:17](https://github.com/mbti-nf-team/frontend-libraries/blob/35d6e12/packages/fetch/src/fetch.ts#L17)

___

### url

**url**: `string`

#### Defined in

[fetch.ts:16](https://github.com/mbti-nf-team/frontend-libraries/blob/35d6e12/packages/fetch/src/fetch.ts#L16)
2 changes: 2 additions & 0 deletions apps/docs/docs/fetch/interfaces/_category_.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
label: "Interfaces"
position: 4
74 changes: 74 additions & 0 deletions apps/docs/docs/fetch/modules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
id: "modules"
title: "@nf-team/fetch - v0.0.0"
sidebar_label: "Exports"
sidebar_position: 0.5
custom_edit_url: null
---

## Interfaces

- [FetchApiRequest](interfaces/FetchApiRequest.md)

## Type Aliases

### Method

Ƭ **Method**: ``"get"`` \| ``"GET"`` \| ``"delete"`` \| ``"DELETE"`` \| ``"head"`` \| ``"HEAD"`` \| ``"options"`` \| ``"OPTIONS"`` \| ``"post"`` \| ``"POST"`` \| ``"put"`` \| ``"PUT"`` \| ``"patch"`` \| ``"PATCH"`` \| ``"purge"`` \| ``"PURGE"`` \| ``"link"`` \| ``"LINK"`` \| ``"unlink"`` \| ``"UNLINK"``

#### Defined in

[fetch.ts:3](https://github.com/mbti-nf-team/frontend-libraries/blob/35d6e12/packages/fetch/src/fetch.ts#L3)

## Functions

### fetchApi

**fetchApi**\<`T`, `K`\>(`«destructured»`): `Promise`\<`T`\>

#### Type parameters

| Name | Type |
| :------ | :------ |
| `T` | `T` |
| `K` | `unknown` |

#### Parameters

| Name | Type |
| :------ | :------ |
| `«destructured»` | [`FetchApiRequest`](interfaces/FetchApiRequest.md)\<`K`\> |

#### Returns

`Promise`\<`T`\>

#### Defined in

[fetch.ts:28](https://github.com/mbti-nf-team/frontend-libraries/blob/35d6e12/packages/fetch/src/fetch.ts#L28)

___

### paramsSerializer

**paramsSerializer**\<`T`\>(`params`): `string`

#### Type parameters

| Name |
| :------ |
| `T` |

#### Parameters

| Name | Type |
| :------ | :------ |
| `params` | `T` |

#### Returns

`string`

#### Defined in

[fetch.ts:23](https://github.com/mbti-nf-team/frontend-libraries/blob/35d6e12/packages/fetch/src/fetch.ts#L23)
1 change: 1 addition & 0 deletions apps/docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ custom_edit_url: null
- [@nf-team/react](react/index.md)
- [@nf-team/eslint-config](eslint-config/index.md)
- [@nf-team/stylelint-config](stylelint-config/index.md)
- [@nf-team/fetch](fetch/index.md)
2 changes: 1 addition & 1 deletion apps/docs/docs/react/modules.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: "modules"
title: "@nf-team/react - v2.5.0"
title: "@nf-team/react - v2.7.1"
sidebar_label: "Exports"
sidebar_position: 0.5
custom_edit_url: null
Expand Down
6 changes: 3 additions & 3 deletions apps/docs/docs/react/modules/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function ClintOnlyComponent() {

#### Defined in

[packages/react/src/components/ClientOnly.tsx:22](https://github.com/mbti-nf-team/frontend-libraries/blob/5614e38/packages/react/src/components/ClientOnly.tsx#L22)
[packages/react/src/components/ClientOnly.tsx:22](https://github.com/mbti-nf-team/frontend-libraries/blob/35d6e12/packages/react/src/components/ClientOnly.tsx#L22)

___

Expand All @@ -64,7 +64,7 @@ ___

#### Defined in

[packages/react/src/components/DelayRenderComponent.tsx:12](https://github.com/mbti-nf-team/frontend-libraries/blob/5614e38/packages/react/src/components/DelayRenderComponent.tsx#L12)
[packages/react/src/components/DelayRenderComponent.tsx:12](https://github.com/mbti-nf-team/frontend-libraries/blob/35d6e12/packages/react/src/components/DelayRenderComponent.tsx#L12)

___

Expand Down Expand Up @@ -108,4 +108,4 @@ function SampleComponent() {

#### Defined in

[packages/react/src/components/GlobalPortal.tsx:34](https://github.com/mbti-nf-team/frontend-libraries/blob/5614e38/packages/react/src/components/GlobalPortal.tsx#L34)
[packages/react/src/components/GlobalPortal.tsx:34](https://github.com/mbti-nf-team/frontend-libraries/blob/35d6e12/packages/react/src/components/GlobalPortal.tsx#L34)
Loading

0 comments on commit ec1fc3d

Please sign in to comment.