sales-frontend-api 0.0.1

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.
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # api
2
+
3
+ - Backend API 통신에 필요한 Http Client 객체, 메서드들 제공
package/dist/index.cjs ADDED
@@ -0,0 +1,29 @@
1
+ 'use strict';
2
+
3
+ var axios = require('axios');
4
+
5
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
6
+
7
+ var axios__default = /*#__PURE__*/_interopDefault(axios);
8
+
9
+ // src/http-client/http-client.ts
10
+ var createHttpClient = () => {
11
+ return axios__default.default;
12
+ };
13
+
14
+ // src/http-methods/sample/sample.ts
15
+ var getListSomething = async () => {
16
+ await new Promise((resolve) => setTimeout(resolve, 1e3));
17
+ return [
18
+ { id: 1, name: "\uC544\uC774\uD15C 1", description: "\uCCAB \uBC88\uC9F8 \uC544\uC774\uD15C" },
19
+ { id: 2, name: "\uC544\uC774\uD15C 2", description: "\uB450 \uBC88\uC9F8 \uC544\uC774\uD15C" },
20
+ { id: 3, name: "\uC544\uC774\uD15C 3", description: "\uC138 \uBC88\uC9F8 \uC544\uC774\uD15C" },
21
+ { id: 4, name: "\uC544\uC774\uD15C 4", description: "\uB124 \uBC88\uC9F8 \uC544\uC774\uD15C" },
22
+ { id: 5, name: "\uC544\uC774\uD15C 5", description: "\uB2E4\uC12F \uBC88\uC9F8 \uC544\uC774\uD15C" }
23
+ ];
24
+ };
25
+
26
+ exports.createHttpClient = createHttpClient;
27
+ exports.getListSomething = getListSomething;
28
+ //# sourceMappingURL=index.cjs.map
29
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/http-client/http-client.ts","../src/http-methods/sample/sample.ts"],"names":["axios"],"mappings":";;;;;;;;;AAEO,IAAM,mBAAmB,MAAM;AACpC,EAAO,OAAAA,sBAAA;AACT;;;ACCO,IAAM,mBAAmB,YAA0C;AAExE,EAAA,MAAM,IAAI,OAAQ,CAAA,CAAC,YAAY,UAAW,CAAA,OAAA,EAAS,GAAI,CAAC,CAAA;AAGxD,EAAO,OAAA;AAAA,IACL,EAAE,EAAI,EAAA,CAAA,EAAG,IAAM,EAAA,sBAAA,EAAS,aAAa,wCAAW,EAAA;AAAA,IAChD,EAAE,EAAI,EAAA,CAAA,EAAG,IAAM,EAAA,sBAAA,EAAS,aAAa,wCAAW,EAAA;AAAA,IAChD,EAAE,EAAI,EAAA,CAAA,EAAG,IAAM,EAAA,sBAAA,EAAS,aAAa,wCAAW,EAAA;AAAA,IAChD,EAAE,EAAI,EAAA,CAAA,EAAG,IAAM,EAAA,sBAAA,EAAS,aAAa,wCAAW,EAAA;AAAA,IAChD,EAAE,EAAI,EAAA,CAAA,EAAG,IAAM,EAAA,sBAAA,EAAS,aAAa,8CAAY;AAAA,GACnD;AACF","file":"index.cjs","sourcesContent":["import axios from 'axios';\n\nexport const createHttpClient = () => {\n return axios;\n};\n","import { createHttpClient } from '../../http-client/http-client';\nimport { TestResponse } from './sample.types';\n/**\n *\n */\nexport const getListSomething = async (): Promise<Array<TestResponse>> => {\n // 1초 지연\n await new Promise((resolve) => setTimeout(resolve, 1000));\n\n // 샘플 데이터 반환\n return [\n { id: 1, name: '아이템 1', description: '첫 번째 아이템' },\n { id: 2, name: '아이템 2', description: '두 번째 아이템' },\n { id: 3, name: '아이템 3', description: '세 번째 아이템' },\n { id: 4, name: '아이템 4', description: '네 번째 아이템' },\n { id: 5, name: '아이템 5', description: '다섯 번째 아이템' }\n ];\n};\n"]}
@@ -0,0 +1,19 @@
1
+ import * as axios from 'axios';
2
+
3
+ declare const createHttpClient: () => axios.AxiosStatic;
4
+
5
+ interface TestRequest {
6
+ test: string;
7
+ }
8
+ interface TestResponse {
9
+ id: number;
10
+ name: string;
11
+ description: string;
12
+ }
13
+
14
+ /**
15
+ *
16
+ */
17
+ declare const getListSomething: () => Promise<Array<TestResponse>>;
18
+
19
+ export { type TestRequest, type TestResponse, createHttpClient, getListSomething };
@@ -0,0 +1,19 @@
1
+ import * as axios from 'axios';
2
+
3
+ declare const createHttpClient: () => axios.AxiosStatic;
4
+
5
+ interface TestRequest {
6
+ test: string;
7
+ }
8
+ interface TestResponse {
9
+ id: number;
10
+ name: string;
11
+ description: string;
12
+ }
13
+
14
+ /**
15
+ *
16
+ */
17
+ declare const getListSomething: () => Promise<Array<TestResponse>>;
18
+
19
+ export { type TestRequest, type TestResponse, createHttpClient, getListSomething };
package/dist/index.js ADDED
@@ -0,0 +1,22 @@
1
+ import axios from 'axios';
2
+
3
+ // src/http-client/http-client.ts
4
+ var createHttpClient = () => {
5
+ return axios;
6
+ };
7
+
8
+ // src/http-methods/sample/sample.ts
9
+ var getListSomething = async () => {
10
+ await new Promise((resolve) => setTimeout(resolve, 1e3));
11
+ return [
12
+ { id: 1, name: "\uC544\uC774\uD15C 1", description: "\uCCAB \uBC88\uC9F8 \uC544\uC774\uD15C" },
13
+ { id: 2, name: "\uC544\uC774\uD15C 2", description: "\uB450 \uBC88\uC9F8 \uC544\uC774\uD15C" },
14
+ { id: 3, name: "\uC544\uC774\uD15C 3", description: "\uC138 \uBC88\uC9F8 \uC544\uC774\uD15C" },
15
+ { id: 4, name: "\uC544\uC774\uD15C 4", description: "\uB124 \uBC88\uC9F8 \uC544\uC774\uD15C" },
16
+ { id: 5, name: "\uC544\uC774\uD15C 5", description: "\uB2E4\uC12F \uBC88\uC9F8 \uC544\uC774\uD15C" }
17
+ ];
18
+ };
19
+
20
+ export { createHttpClient, getListSomething };
21
+ //# sourceMappingURL=index.js.map
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/http-client/http-client.ts","../src/http-methods/sample/sample.ts"],"names":[],"mappings":";;;AAEO,IAAM,mBAAmB,MAAM;AACpC,EAAO,OAAA,KAAA;AACT;;;ACCO,IAAM,mBAAmB,YAA0C;AAExE,EAAA,MAAM,IAAI,OAAQ,CAAA,CAAC,YAAY,UAAW,CAAA,OAAA,EAAS,GAAI,CAAC,CAAA;AAGxD,EAAO,OAAA;AAAA,IACL,EAAE,EAAI,EAAA,CAAA,EAAG,IAAM,EAAA,sBAAA,EAAS,aAAa,wCAAW,EAAA;AAAA,IAChD,EAAE,EAAI,EAAA,CAAA,EAAG,IAAM,EAAA,sBAAA,EAAS,aAAa,wCAAW,EAAA;AAAA,IAChD,EAAE,EAAI,EAAA,CAAA,EAAG,IAAM,EAAA,sBAAA,EAAS,aAAa,wCAAW,EAAA;AAAA,IAChD,EAAE,EAAI,EAAA,CAAA,EAAG,IAAM,EAAA,sBAAA,EAAS,aAAa,wCAAW,EAAA;AAAA,IAChD,EAAE,EAAI,EAAA,CAAA,EAAG,IAAM,EAAA,sBAAA,EAAS,aAAa,8CAAY;AAAA,GACnD;AACF","file":"index.js","sourcesContent":["import axios from 'axios';\n\nexport const createHttpClient = () => {\n return axios;\n};\n","import { createHttpClient } from '../../http-client/http-client';\nimport { TestResponse } from './sample.types';\n/**\n *\n */\nexport const getListSomething = async (): Promise<Array<TestResponse>> => {\n // 1초 지연\n await new Promise((resolve) => setTimeout(resolve, 1000));\n\n // 샘플 데이터 반환\n return [\n { id: 1, name: '아이템 1', description: '첫 번째 아이템' },\n { id: 2, name: '아이템 2', description: '두 번째 아이템' },\n { id: 3, name: '아이템 3', description: '세 번째 아이템' },\n { id: 4, name: '아이템 4', description: '네 번째 아이템' },\n { id: 5, name: '아이템 5', description: '다섯 번째 아이템' }\n ];\n};\n"]}
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "sales-frontend-api",
3
+ "version": "0.0.1",
4
+ "private": false,
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "exports": {
12
+ ".": {
13
+ "import": {
14
+ "types": "./dist/index.d.ts",
15
+ "default": "./dist/index.js"
16
+ },
17
+ "require": {
18
+ "types": "./dist/index.d.ts",
19
+ "default": "./dist/index.cjs.js"
20
+ }
21
+ }
22
+ },
23
+ "devDependencies": {
24
+ "@types/node": "^22.14.0",
25
+ "tsup": "^8.4.0",
26
+ "typescript": "5.8.2",
27
+ "sales-frontend-stores": "0.0.1",
28
+ "sales-frontend-bridge": "0.0.5",
29
+ "sales-frontend-typescript-config": "0.0.2",
30
+ "eslint-config-sales-frontend-eslint-config-v8": "^0.0.5"
31
+ },
32
+ "dependencies": {
33
+ "axios": "^1.10.0"
34
+ },
35
+ "peerDependencies": {
36
+ "sales-frontend-bridge": "0.0.5",
37
+ "sales-frontend-stores": "0.0.1"
38
+ },
39
+ "scripts": {
40
+ "lint": "eslint . --max-warnings 0",
41
+ "generate:component": "turbo gen react-component",
42
+ "check-types": "tsc --noEmit",
43
+ "storybook": "tsup --watch",
44
+ "build": "tsup",
45
+ "release": "pnpm publish"
46
+ }
47
+ }