@cmarket/partner-sdk 0.1.0
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/.openapi-generator/FILES +57 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +95 -0
- package/api/oauth-api.ts +127 -0
- package/api/partner-v1-api.ts +191 -0
- package/api/partner-v1-legacy-api.ts +178 -0
- package/api/partner-v2-api.ts +285 -0
- package/api.ts +21 -0
- package/base.ts +62 -0
- package/common.ts +127 -0
- package/configuration.ts +121 -0
- package/dist/api/oauth-api.d.ts +68 -0
- package/dist/api/oauth-api.js +130 -0
- package/dist/api/partner-v1-api.d.ts +96 -0
- package/dist/api/partner-v1-api.js +191 -0
- package/dist/api/partner-v1-legacy-api.d.ts +91 -0
- package/dist/api/partner-v1-legacy-api.js +181 -0
- package/dist/api/partner-v2-api.d.ts +136 -0
- package/dist/api/partner-v2-api.js +273 -0
- package/dist/api.d.ts +15 -0
- package/dist/api.js +33 -0
- package/dist/base.d.ts +42 -0
- package/dist/base.js +46 -0
- package/dist/common.d.ts +34 -0
- package/dist/common.js +139 -0
- package/dist/configuration.d.ts +98 -0
- package/dist/configuration.js +44 -0
- package/dist/esm/api/oauth-api.d.ts +68 -0
- package/dist/esm/api/oauth-api.js +123 -0
- package/dist/esm/api/partner-v1-api.d.ts +96 -0
- package/dist/esm/api/partner-v1-api.js +184 -0
- package/dist/esm/api/partner-v1-legacy-api.d.ts +91 -0
- package/dist/esm/api/partner-v1-legacy-api.js +174 -0
- package/dist/esm/api/partner-v2-api.d.ts +136 -0
- package/dist/esm/api/partner-v2-api.js +266 -0
- package/dist/esm/api.d.ts +15 -0
- package/dist/esm/api.js +17 -0
- package/dist/esm/base.d.ts +42 -0
- package/dist/esm/base.js +41 -0
- package/dist/esm/common.d.ts +34 -0
- package/dist/esm/common.js +126 -0
- package/dist/esm/configuration.d.ts +98 -0
- package/dist/esm/configuration.js +40 -0
- package/dist/esm/index.d.ts +14 -0
- package/dist/esm/index.js +16 -0
- package/dist/esm/models/award-registered-response-dto.d.ts +25 -0
- package/dist/esm/models/award-registered-response-dto.js +14 -0
- package/dist/esm/models/bid-bond-dto.d.ts +27 -0
- package/dist/esm/models/bid-bond-dto.js +18 -0
- package/dist/esm/models/bid-created-response-dto.d.ts +17 -0
- package/dist/esm/models/bid-created-response-dto.js +14 -0
- package/dist/esm/models/bid-document-dto.d.ts +25 -0
- package/dist/esm/models/bid-document-dto.js +14 -0
- package/dist/esm/models/bid-item-dto.d.ts +41 -0
- package/dist/esm/models/bid-item-dto.js +14 -0
- package/dist/esm/models/bid-manager-dto.d.ts +25 -0
- package/dist/esm/models/bid-manager-dto.js +14 -0
- package/dist/esm/models/bid-status.d.ts +23 -0
- package/dist/esm/models/bid-status.js +24 -0
- package/dist/esm/models/bid-summary-response-dto.d.ts +30 -0
- package/dist/esm/models/bid-summary-response-dto.js +14 -0
- package/dist/esm/models/create-bid-request-dto.d.ts +278 -0
- package/dist/esm/models/create-bid-request-dto.js +101 -0
- package/dist/esm/models/file-uploaded-response-dto.d.ts +17 -0
- package/dist/esm/models/file-uploaded-response-dto.js +14 -0
- package/dist/esm/models/health-response-dto.d.ts +21 -0
- package/dist/esm/models/health-response-dto.js +14 -0
- package/dist/esm/models/hierarchical-region-dto.d.ts +21 -0
- package/dist/esm/models/hierarchical-region-dto.js +14 -0
- package/dist/esm/models/index.d.ts +18 -0
- package/dist/esm/models/index.js +18 -0
- package/dist/esm/models/legacy-envelope-dto.d.ts +25 -0
- package/dist/esm/models/legacy-envelope-dto.js +14 -0
- package/dist/esm/models/preconditions-dto.d.ts +88 -0
- package/dist/esm/models/preconditions-dto.js +44 -0
- package/dist/esm/models/register-award-request-dto.d.ts +25 -0
- package/dist/esm/models/register-award-request-dto.js +14 -0
- package/dist/esm/models/token-request-dto.d.ts +33 -0
- package/dist/esm/models/token-request-dto.js +16 -0
- package/dist/esm/models/token-response-dto.d.ts +29 -0
- package/dist/esm/models/token-response-dto.js +14 -0
- package/dist/esm/models/upload-file-request-dto.d.ts +25 -0
- package/dist/esm/models/upload-file-request-dto.js +14 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +32 -0
- package/dist/models/award-registered-response-dto.d.ts +25 -0
- package/dist/models/award-registered-response-dto.js +15 -0
- package/dist/models/bid-bond-dto.d.ts +27 -0
- package/dist/models/bid-bond-dto.js +21 -0
- package/dist/models/bid-created-response-dto.d.ts +17 -0
- package/dist/models/bid-created-response-dto.js +15 -0
- package/dist/models/bid-document-dto.d.ts +25 -0
- package/dist/models/bid-document-dto.js +15 -0
- package/dist/models/bid-item-dto.d.ts +41 -0
- package/dist/models/bid-item-dto.js +15 -0
- package/dist/models/bid-manager-dto.d.ts +25 -0
- package/dist/models/bid-manager-dto.js +15 -0
- package/dist/models/bid-status.d.ts +23 -0
- package/dist/models/bid-status.js +27 -0
- package/dist/models/bid-summary-response-dto.d.ts +30 -0
- package/dist/models/bid-summary-response-dto.js +15 -0
- package/dist/models/create-bid-request-dto.d.ts +278 -0
- package/dist/models/create-bid-request-dto.js +104 -0
- package/dist/models/file-uploaded-response-dto.d.ts +17 -0
- package/dist/models/file-uploaded-response-dto.js +15 -0
- package/dist/models/health-response-dto.d.ts +21 -0
- package/dist/models/health-response-dto.js +15 -0
- package/dist/models/hierarchical-region-dto.d.ts +21 -0
- package/dist/models/hierarchical-region-dto.js +15 -0
- package/dist/models/index.d.ts +18 -0
- package/dist/models/index.js +34 -0
- package/dist/models/legacy-envelope-dto.d.ts +25 -0
- package/dist/models/legacy-envelope-dto.js +15 -0
- package/dist/models/preconditions-dto.d.ts +88 -0
- package/dist/models/preconditions-dto.js +47 -0
- package/dist/models/register-award-request-dto.d.ts +25 -0
- package/dist/models/register-award-request-dto.js +15 -0
- package/dist/models/token-request-dto.d.ts +33 -0
- package/dist/models/token-request-dto.js +19 -0
- package/dist/models/token-response-dto.d.ts +29 -0
- package/dist/models/token-response-dto.js +15 -0
- package/dist/models/upload-file-request-dto.d.ts +25 -0
- package/dist/models/upload-file-request-dto.js +15 -0
- package/docs/AwardRegisteredResponseDto.md +24 -0
- package/docs/BidBondDto.md +22 -0
- package/docs/BidCreatedResponseDto.md +20 -0
- package/docs/BidDocumentDto.md +24 -0
- package/docs/BidItemDto.md +32 -0
- package/docs/BidManagerDto.md +24 -0
- package/docs/BidStatus.md +19 -0
- package/docs/BidSummaryResponseDto.md +26 -0
- package/docs/CreateBidRequestDto.md +96 -0
- package/docs/FileUploadedResponseDto.md +20 -0
- package/docs/HealthResponseDto.md +22 -0
- package/docs/HierarchicalRegionDto.md +22 -0
- package/docs/LegacyEnvelopeDto.md +24 -0
- package/docs/OauthApi.md +61 -0
- package/docs/PartnerV1Api.md +105 -0
- package/docs/PartnerV1LegacyApi.md +97 -0
- package/docs/PartnerV2Api.md +166 -0
- package/docs/PreconditionsDto.md +38 -0
- package/docs/RegisterAwardRequestDto.md +24 -0
- package/docs/TokenRequestDto.md +26 -0
- package/docs/TokenResponseDto.md +26 -0
- package/docs/UploadFileRequestDto.md +24 -0
- package/git_push.sh +57 -0
- package/index.ts +18 -0
- package/models/award-registered-response-dto.ts +31 -0
- package/models/bid-bond-dto.ts +36 -0
- package/models/bid-created-response-dto.ts +23 -0
- package/models/bid-document-dto.ts +31 -0
- package/models/bid-item-dto.ts +47 -0
- package/models/bid-manager-dto.ts +31 -0
- package/models/bid-status.ts +33 -0
- package/models/bid-summary-response-dto.ts +40 -0
- package/models/create-bid-request-dto.ts +312 -0
- package/models/file-uploaded-response-dto.ts +23 -0
- package/models/health-response-dto.ts +27 -0
- package/models/hierarchical-region-dto.ts +27 -0
- package/models/index.ts +18 -0
- package/models/legacy-envelope-dto.ts +31 -0
- package/models/preconditions-dto.ts +101 -0
- package/models/register-award-request-dto.ts +31 -0
- package/models/token-request-dto.ts +42 -0
- package/models/token-response-dto.ts +35 -0
- package/models/upload-file-request-dto.ts +31 -0
- package/package.json +33 -0
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +18 -0
package/docs/OauthApi.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# OauthApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost*
|
|
4
|
+
|
|
5
|
+
|Method | HTTP request | Description|
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
|[**token**](#token) | **POST** /v1/oauth/token | OAuth 2.0 access token 발급 (client_credentials)|
|
|
8
|
+
|
|
9
|
+
# **token**
|
|
10
|
+
> TokenResponseDto token(tokenRequestDto)
|
|
11
|
+
|
|
12
|
+
파트너 ERP 가 client_id/secret 로 단명 JWT access token 을 발급받습니다 (TTL 15분). 이후 모든 보호 endpoint 는 Authorization: Bearer <token> 헤더로 호출합니다.
|
|
13
|
+
|
|
14
|
+
### Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import {
|
|
18
|
+
OauthApi,
|
|
19
|
+
Configuration,
|
|
20
|
+
TokenRequestDto
|
|
21
|
+
} from '@cmarket/partner-sdk';
|
|
22
|
+
|
|
23
|
+
const configuration = new Configuration();
|
|
24
|
+
const apiInstance = new OauthApi(configuration);
|
|
25
|
+
|
|
26
|
+
let tokenRequestDto: TokenRequestDto; //
|
|
27
|
+
|
|
28
|
+
const { status, data } = await apiInstance.token(
|
|
29
|
+
tokenRequestDto
|
|
30
|
+
);
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Parameters
|
|
34
|
+
|
|
35
|
+
|Name | Type | Description | Notes|
|
|
36
|
+
|------------- | ------------- | ------------- | -------------|
|
|
37
|
+
| **tokenRequestDto** | **TokenRequestDto**| | |
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### Return type
|
|
41
|
+
|
|
42
|
+
**TokenResponseDto**
|
|
43
|
+
|
|
44
|
+
### Authorization
|
|
45
|
+
|
|
46
|
+
No authorization required
|
|
47
|
+
|
|
48
|
+
### HTTP request headers
|
|
49
|
+
|
|
50
|
+
- **Content-Type**: application/json
|
|
51
|
+
- **Accept**: application/json
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
### HTTP response details
|
|
55
|
+
| Status code | Description | Response headers |
|
|
56
|
+
|-------------|-------------|------------------|
|
|
57
|
+
|**200** | | - |
|
|
58
|
+
|**401** | invalid_client 또는 invalid_scope | - |
|
|
59
|
+
|
|
60
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
61
|
+
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# PartnerV1Api
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost*
|
|
4
|
+
|
|
5
|
+
|Method | HTTP request | Description|
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
|[**bidsControllerFindOne**](#bidscontrollerfindone) | **GET** /v1/bids/{bidId} | 공고 단건 조회|
|
|
8
|
+
|[**healthControllerCheck**](#healthcontrollercheck) | **GET** /v1/health | Partner API 헬스체크 (V5 /check 후속)|
|
|
9
|
+
|
|
10
|
+
# **bidsControllerFindOne**
|
|
11
|
+
> BidSummaryResponseDto bidsControllerFindOne()
|
|
12
|
+
|
|
13
|
+
V5 `GET /api/bid/{buyIdx}` 의 V6 후속. ERP 가 공고 정보를 조회합니다. 인증 필요 (스코프 `bids:read`).
|
|
14
|
+
|
|
15
|
+
### Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import {
|
|
19
|
+
PartnerV1Api,
|
|
20
|
+
Configuration
|
|
21
|
+
} from '@cmarket/partner-sdk';
|
|
22
|
+
|
|
23
|
+
const configuration = new Configuration();
|
|
24
|
+
const apiInstance = new PartnerV1Api(configuration);
|
|
25
|
+
|
|
26
|
+
let bidId: string; // (default to undefined)
|
|
27
|
+
|
|
28
|
+
const { status, data } = await apiInstance.bidsControllerFindOne(
|
|
29
|
+
bidId
|
|
30
|
+
);
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Parameters
|
|
34
|
+
|
|
35
|
+
|Name | Type | Description | Notes|
|
|
36
|
+
|------------- | ------------- | ------------- | -------------|
|
|
37
|
+
| **bidId** | [**string**] | | defaults to undefined|
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### Return type
|
|
41
|
+
|
|
42
|
+
**BidSummaryResponseDto**
|
|
43
|
+
|
|
44
|
+
### Authorization
|
|
45
|
+
|
|
46
|
+
[partner-oauth2](../README.md#partner-oauth2)
|
|
47
|
+
|
|
48
|
+
### HTTP request headers
|
|
49
|
+
|
|
50
|
+
- **Content-Type**: Not defined
|
|
51
|
+
- **Accept**: application/json
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
### HTTP response details
|
|
55
|
+
| Status code | Description | Response headers |
|
|
56
|
+
|-------------|-------------|------------------|
|
|
57
|
+
|**200** | | - |
|
|
58
|
+
|**401** | invalid_token / insufficient_scope / ip_not_allowed | - |
|
|
59
|
+
|
|
60
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
61
|
+
|
|
62
|
+
# **healthControllerCheck**
|
|
63
|
+
> HealthResponseDto healthControllerCheck()
|
|
64
|
+
|
|
65
|
+
V5 ApiController#check 의 V6 대체. ERP 연동 직전 회선·인증 endpoint 동작 확인용.
|
|
66
|
+
|
|
67
|
+
### Example
|
|
68
|
+
|
|
69
|
+
```typescript
|
|
70
|
+
import {
|
|
71
|
+
PartnerV1Api,
|
|
72
|
+
Configuration
|
|
73
|
+
} from '@cmarket/partner-sdk';
|
|
74
|
+
|
|
75
|
+
const configuration = new Configuration();
|
|
76
|
+
const apiInstance = new PartnerV1Api(configuration);
|
|
77
|
+
|
|
78
|
+
const { status, data } = await apiInstance.healthControllerCheck();
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Parameters
|
|
82
|
+
This endpoint does not have any parameters.
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
### Return type
|
|
86
|
+
|
|
87
|
+
**HealthResponseDto**
|
|
88
|
+
|
|
89
|
+
### Authorization
|
|
90
|
+
|
|
91
|
+
No authorization required
|
|
92
|
+
|
|
93
|
+
### HTTP request headers
|
|
94
|
+
|
|
95
|
+
- **Content-Type**: Not defined
|
|
96
|
+
- **Accept**: application/json
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
### HTTP response details
|
|
100
|
+
| Status code | Description | Response headers |
|
|
101
|
+
|-------------|-------------|------------------|
|
|
102
|
+
|**200** | | - |
|
|
103
|
+
|
|
104
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
105
|
+
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# PartnerV1LegacyApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost*
|
|
4
|
+
|
|
5
|
+
|Method | HTTP request | Description|
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
|[**legacyControllerCheckGet**](#legacycontrollercheckget) | **GET** /v1-legacy/check | V5 /check 호환 헬스체크 (deprecated)|
|
|
8
|
+
|[**legacyControllerCheckPost**](#legacycontrollercheckpost) | **POST** /v1-legacy/check | V5 /check 호환 헬스체크 — POST (deprecated)|
|
|
9
|
+
|
|
10
|
+
# **legacyControllerCheckGet**
|
|
11
|
+
> LegacyEnvelopeDto legacyControllerCheckGet()
|
|
12
|
+
|
|
13
|
+
V5 ApiController#check 응답 envelope 그대로. Sunset 헤더 부착.
|
|
14
|
+
|
|
15
|
+
### Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import {
|
|
19
|
+
PartnerV1LegacyApi,
|
|
20
|
+
Configuration
|
|
21
|
+
} from '@cmarket/partner-sdk';
|
|
22
|
+
|
|
23
|
+
const configuration = new Configuration();
|
|
24
|
+
const apiInstance = new PartnerV1LegacyApi(configuration);
|
|
25
|
+
|
|
26
|
+
const { status, data } = await apiInstance.legacyControllerCheckGet();
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Parameters
|
|
30
|
+
This endpoint does not have any parameters.
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Return type
|
|
34
|
+
|
|
35
|
+
**LegacyEnvelopeDto**
|
|
36
|
+
|
|
37
|
+
### Authorization
|
|
38
|
+
|
|
39
|
+
No authorization required
|
|
40
|
+
|
|
41
|
+
### HTTP request headers
|
|
42
|
+
|
|
43
|
+
- **Content-Type**: Not defined
|
|
44
|
+
- **Accept**: application/json
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
### HTTP response details
|
|
48
|
+
| Status code | Description | Response headers |
|
|
49
|
+
|-------------|-------------|------------------|
|
|
50
|
+
|**200** | | - |
|
|
51
|
+
|
|
52
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
53
|
+
|
|
54
|
+
# **legacyControllerCheckPost**
|
|
55
|
+
> LegacyEnvelopeDto legacyControllerCheckPost()
|
|
56
|
+
|
|
57
|
+
V5 는 GET·POST 모두 받음. 동일 응답.
|
|
58
|
+
|
|
59
|
+
### Example
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
import {
|
|
63
|
+
PartnerV1LegacyApi,
|
|
64
|
+
Configuration
|
|
65
|
+
} from '@cmarket/partner-sdk';
|
|
66
|
+
|
|
67
|
+
const configuration = new Configuration();
|
|
68
|
+
const apiInstance = new PartnerV1LegacyApi(configuration);
|
|
69
|
+
|
|
70
|
+
const { status, data } = await apiInstance.legacyControllerCheckPost();
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Parameters
|
|
74
|
+
This endpoint does not have any parameters.
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
### Return type
|
|
78
|
+
|
|
79
|
+
**LegacyEnvelopeDto**
|
|
80
|
+
|
|
81
|
+
### Authorization
|
|
82
|
+
|
|
83
|
+
No authorization required
|
|
84
|
+
|
|
85
|
+
### HTTP request headers
|
|
86
|
+
|
|
87
|
+
- **Content-Type**: Not defined
|
|
88
|
+
- **Accept**: application/json
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
### HTTP response details
|
|
92
|
+
| Status code | Description | Response headers |
|
|
93
|
+
|-------------|-------------|------------------|
|
|
94
|
+
|**200** | | - |
|
|
95
|
+
|
|
96
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
97
|
+
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# PartnerV2Api
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost*
|
|
4
|
+
|
|
5
|
+
|Method | HTTP request | Description|
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
|[**registerAward**](#registeraward) | **POST** /v2/awards | 낙찰 결과 전송|
|
|
8
|
+
|[**registerBid**](#registerbid) | **POST** /v2/bids | 입찰 정보 전송(등록)|
|
|
9
|
+
|[**uploadFile**](#uploadfile) | **POST** /v2/files | 입찰 첨부파일 업로드(base64 또는 url) → fileKey|
|
|
10
|
+
|
|
11
|
+
# **registerAward**
|
|
12
|
+
> AwardRegisteredResponseDto registerAward(registerAwardRequestDto)
|
|
13
|
+
|
|
14
|
+
V5 /scsbidSend 후속. 스코프 `awards:write` + `Idempotency-Key` 헤더 필수.
|
|
15
|
+
|
|
16
|
+
### Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import {
|
|
20
|
+
PartnerV2Api,
|
|
21
|
+
Configuration,
|
|
22
|
+
RegisterAwardRequestDto
|
|
23
|
+
} from '@cmarket/partner-sdk';
|
|
24
|
+
|
|
25
|
+
const configuration = new Configuration();
|
|
26
|
+
const apiInstance = new PartnerV2Api(configuration);
|
|
27
|
+
|
|
28
|
+
let registerAwardRequestDto: RegisterAwardRequestDto; //
|
|
29
|
+
|
|
30
|
+
const { status, data } = await apiInstance.registerAward(
|
|
31
|
+
registerAwardRequestDto
|
|
32
|
+
);
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Parameters
|
|
36
|
+
|
|
37
|
+
|Name | Type | Description | Notes|
|
|
38
|
+
|------------- | ------------- | ------------- | -------------|
|
|
39
|
+
| **registerAwardRequestDto** | **RegisterAwardRequestDto**| | |
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Return type
|
|
43
|
+
|
|
44
|
+
**AwardRegisteredResponseDto**
|
|
45
|
+
|
|
46
|
+
### Authorization
|
|
47
|
+
|
|
48
|
+
[partner-oauth2](../README.md#partner-oauth2)
|
|
49
|
+
|
|
50
|
+
### HTTP request headers
|
|
51
|
+
|
|
52
|
+
- **Content-Type**: application/json
|
|
53
|
+
- **Accept**: application/json
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### HTTP response details
|
|
57
|
+
| Status code | Description | Response headers |
|
|
58
|
+
|-------------|-------------|------------------|
|
|
59
|
+
|**201** | | - |
|
|
60
|
+
|
|
61
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
62
|
+
|
|
63
|
+
# **registerBid**
|
|
64
|
+
> BidCreatedResponseDto registerBid(createBidRequestDto)
|
|
65
|
+
|
|
66
|
+
V5 /bidsend 후속. 스코프 `bids:write` + `Idempotency-Key` 헤더 필수.
|
|
67
|
+
|
|
68
|
+
### Example
|
|
69
|
+
|
|
70
|
+
```typescript
|
|
71
|
+
import {
|
|
72
|
+
PartnerV2Api,
|
|
73
|
+
Configuration,
|
|
74
|
+
CreateBidRequestDto
|
|
75
|
+
} from '@cmarket/partner-sdk';
|
|
76
|
+
|
|
77
|
+
const configuration = new Configuration();
|
|
78
|
+
const apiInstance = new PartnerV2Api(configuration);
|
|
79
|
+
|
|
80
|
+
let createBidRequestDto: CreateBidRequestDto; //
|
|
81
|
+
|
|
82
|
+
const { status, data } = await apiInstance.registerBid(
|
|
83
|
+
createBidRequestDto
|
|
84
|
+
);
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Parameters
|
|
88
|
+
|
|
89
|
+
|Name | Type | Description | Notes|
|
|
90
|
+
|------------- | ------------- | ------------- | -------------|
|
|
91
|
+
| **createBidRequestDto** | **CreateBidRequestDto**| | |
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
### Return type
|
|
95
|
+
|
|
96
|
+
**BidCreatedResponseDto**
|
|
97
|
+
|
|
98
|
+
### Authorization
|
|
99
|
+
|
|
100
|
+
[partner-oauth2](../README.md#partner-oauth2)
|
|
101
|
+
|
|
102
|
+
### HTTP request headers
|
|
103
|
+
|
|
104
|
+
- **Content-Type**: application/json
|
|
105
|
+
- **Accept**: application/json
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
### HTTP response details
|
|
109
|
+
| Status code | Description | Response headers |
|
|
110
|
+
|-------------|-------------|------------------|
|
|
111
|
+
|**201** | | - |
|
|
112
|
+
|
|
113
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
114
|
+
|
|
115
|
+
# **uploadFile**
|
|
116
|
+
> FileUploadedResponseDto uploadFile(uploadFileRequestDto)
|
|
117
|
+
|
|
118
|
+
스코프 `files:write` 필수. base64 또는 url 중 하나를 제출한다.
|
|
119
|
+
|
|
120
|
+
### Example
|
|
121
|
+
|
|
122
|
+
```typescript
|
|
123
|
+
import {
|
|
124
|
+
PartnerV2Api,
|
|
125
|
+
Configuration,
|
|
126
|
+
UploadFileRequestDto
|
|
127
|
+
} from '@cmarket/partner-sdk';
|
|
128
|
+
|
|
129
|
+
const configuration = new Configuration();
|
|
130
|
+
const apiInstance = new PartnerV2Api(configuration);
|
|
131
|
+
|
|
132
|
+
let uploadFileRequestDto: UploadFileRequestDto; //
|
|
133
|
+
|
|
134
|
+
const { status, data } = await apiInstance.uploadFile(
|
|
135
|
+
uploadFileRequestDto
|
|
136
|
+
);
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Parameters
|
|
140
|
+
|
|
141
|
+
|Name | Type | Description | Notes|
|
|
142
|
+
|------------- | ------------- | ------------- | -------------|
|
|
143
|
+
| **uploadFileRequestDto** | **UploadFileRequestDto**| | |
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
### Return type
|
|
147
|
+
|
|
148
|
+
**FileUploadedResponseDto**
|
|
149
|
+
|
|
150
|
+
### Authorization
|
|
151
|
+
|
|
152
|
+
[partner-oauth2](../README.md#partner-oauth2)
|
|
153
|
+
|
|
154
|
+
### HTTP request headers
|
|
155
|
+
|
|
156
|
+
- **Content-Type**: application/json
|
|
157
|
+
- **Accept**: application/json
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
### HTTP response details
|
|
161
|
+
| Status code | Description | Response headers |
|
|
162
|
+
|-------------|-------------|------------------|
|
|
163
|
+
|**201** | | - |
|
|
164
|
+
|
|
165
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
166
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# PreconditionsDto
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**bidBond** | [**BidBondDto**](BidBondDto.md) | 입찰보증금 설정 (A 토큰 계열). | [optional] [default to undefined]
|
|
9
|
+
**businessRegistered** | **boolean** | B: 사업자등록증 납부 관련업체. | [optional] [default to undefined]
|
|
10
|
+
**distributor** | **boolean** | C: 총판/대리점. | [optional] [default to undefined]
|
|
11
|
+
**manufacturer** | **boolean** | D: 제조사. | [optional] [default to undefined]
|
|
12
|
+
**directProduction** | **boolean** | E: 직접생산확인증명. | [optional] [default to undefined]
|
|
13
|
+
**legalMandatory** | **Array<string>** | 법적의무구매(XX 우산). I/J/K/L/O1/O2/O3 | [optional] [default to undefined]
|
|
14
|
+
**excellentProcurement** | **Array<string>** | 기술개발제품(XX 우산). P0/P101-P113 | [optional] [default to undefined]
|
|
15
|
+
**greenProduct** | **Array<string>** | 녹색제품(XX 우산). Q0/Q101/Q102/Q103 | [optional] [default to undefined]
|
|
16
|
+
**startup** | **boolean** | R: 창업기업 (XX 우산). | [optional] [default to undefined]
|
|
17
|
+
**social** | **boolean** | S: 사회적기업 (XX 우산). | [optional] [default to undefined]
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { PreconditionsDto } from '@cmarket/partner-sdk';
|
|
23
|
+
|
|
24
|
+
const instance: PreconditionsDto = {
|
|
25
|
+
bidBond,
|
|
26
|
+
businessRegistered,
|
|
27
|
+
distributor,
|
|
28
|
+
manufacturer,
|
|
29
|
+
directProduction,
|
|
30
|
+
legalMandatory,
|
|
31
|
+
excellentProcurement,
|
|
32
|
+
greenProduct,
|
|
33
|
+
startup,
|
|
34
|
+
social,
|
|
35
|
+
};
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# RegisterAwardRequestDto
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**buyerId** | **string** | 공고 명의 회원 ID(b2b_member.member_id) = 낙찰 확정 actor. V5 bid_branch_id. | [default to undefined]
|
|
9
|
+
**bidNo** | **string** | 공고 구매번호(등록 응답의 bidNo). | [default to undefined]
|
|
10
|
+
**winnerMemberId** | **string** | 낙찰자(공급사) memberId. | [default to undefined]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { RegisterAwardRequestDto } from '@cmarket/partner-sdk';
|
|
16
|
+
|
|
17
|
+
const instance: RegisterAwardRequestDto = {
|
|
18
|
+
buyerId,
|
|
19
|
+
bidNo,
|
|
20
|
+
winnerMemberId,
|
|
21
|
+
};
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# TokenRequestDto
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**grant_type** | **string** | OAuth 2.0 grant type. 현재 client_credentials 만 지원. | [default to undefined]
|
|
9
|
+
**client_id** | **string** | 파트너 client_id (대소문자 무시). | [default to undefined]
|
|
10
|
+
**client_secret** | **string** | 파트너 client_secret. | [default to undefined]
|
|
11
|
+
**scope** | **string** | space-separated 요청 스코프. 미지정 시 client 의 전체 스코프 발급. | [optional] [default to undefined]
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { TokenRequestDto } from '@cmarket/partner-sdk';
|
|
17
|
+
|
|
18
|
+
const instance: TokenRequestDto = {
|
|
19
|
+
grant_type,
|
|
20
|
+
client_id,
|
|
21
|
+
client_secret,
|
|
22
|
+
scope,
|
|
23
|
+
};
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# TokenResponseDto
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**access_token** | **string** | 발급된 JWT access token. | [default to undefined]
|
|
9
|
+
**token_type** | **string** | Bearer 고정. | [default to undefined]
|
|
10
|
+
**expires_in** | **number** | 유효 기간 (초). | [default to undefined]
|
|
11
|
+
**scope** | **string** | 발급된 스코프 (space-separated). | [default to undefined]
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { TokenResponseDto } from '@cmarket/partner-sdk';
|
|
17
|
+
|
|
18
|
+
const instance: TokenResponseDto = {
|
|
19
|
+
access_token,
|
|
20
|
+
token_type,
|
|
21
|
+
expires_in,
|
|
22
|
+
scope,
|
|
23
|
+
};
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# UploadFileRequestDto
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**fileName** | **string** | 파일명 (확장자 포함). 최대 255자. | [default to undefined]
|
|
9
|
+
**base64** | **string** | Base64 인코딩된 파일 데이터. url 이 없을 때 필수. | [optional] [default to undefined]
|
|
10
|
+
**url** | **string** | 다운로드 가능한 파일 URL. base64 가 없을 때 필수. | [optional] [default to undefined]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { UploadFileRequestDto } from '@cmarket/partner-sdk';
|
|
16
|
+
|
|
17
|
+
const instance: UploadFileRequestDto = {
|
|
18
|
+
fileName,
|
|
19
|
+
base64,
|
|
20
|
+
url,
|
|
21
|
+
};
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
package/git_push.sh
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
|
3
|
+
#
|
|
4
|
+
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
|
|
5
|
+
|
|
6
|
+
git_user_id=$1
|
|
7
|
+
git_repo_id=$2
|
|
8
|
+
release_note=$3
|
|
9
|
+
git_host=$4
|
|
10
|
+
|
|
11
|
+
if [ "$git_host" = "" ]; then
|
|
12
|
+
git_host="github.com"
|
|
13
|
+
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
|
14
|
+
fi
|
|
15
|
+
|
|
16
|
+
if [ "$git_user_id" = "" ]; then
|
|
17
|
+
git_user_id="GIT_USER_ID"
|
|
18
|
+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
|
19
|
+
fi
|
|
20
|
+
|
|
21
|
+
if [ "$git_repo_id" = "" ]; then
|
|
22
|
+
git_repo_id="GIT_REPO_ID"
|
|
23
|
+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
if [ "$release_note" = "" ]; then
|
|
27
|
+
release_note="Minor update"
|
|
28
|
+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
# Initialize the local directory as a Git repository
|
|
32
|
+
git init
|
|
33
|
+
|
|
34
|
+
# Adds the files in the local repository and stages them for commit.
|
|
35
|
+
git add .
|
|
36
|
+
|
|
37
|
+
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
|
38
|
+
git commit -m "$release_note"
|
|
39
|
+
|
|
40
|
+
# Sets the new remote
|
|
41
|
+
git_remote=$(git remote)
|
|
42
|
+
if [ "$git_remote" = "" ]; then # git remote not defined
|
|
43
|
+
|
|
44
|
+
if [ "$GIT_TOKEN" = "" ]; then
|
|
45
|
+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
|
46
|
+
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
|
47
|
+
else
|
|
48
|
+
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
|
|
49
|
+
fi
|
|
50
|
+
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
git pull origin master
|
|
54
|
+
|
|
55
|
+
# Pushes (Forces) the changes in the local repository up to the remote repository
|
|
56
|
+
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
|
57
|
+
git push origin master 2>&1 | grep -v 'To https'
|
package/index.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* CMARKET V6 Partner API
|
|
5
|
+
* 외부 ERP 연동용 RESTful API. V5 17개 엔드포인트의 V6 후속.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
export * from "./api";
|
|
17
|
+
export * from "./configuration";
|
|
18
|
+
export * from "./models";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* CMARKET V6 Partner API
|
|
5
|
+
* 외부 ERP 연동용 RESTful API. V5 17개 엔드포인트의 V6 후속.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
export interface AwardRegisteredResponseDto {
|
|
18
|
+
/**
|
|
19
|
+
* 공고 구매번호.
|
|
20
|
+
*/
|
|
21
|
+
'bidNo': string;
|
|
22
|
+
/**
|
|
23
|
+
* 낙찰자 memberId.
|
|
24
|
+
*/
|
|
25
|
+
'winnerMemberId': string;
|
|
26
|
+
/**
|
|
27
|
+
* 처리 상태.
|
|
28
|
+
*/
|
|
29
|
+
'status': string;
|
|
30
|
+
}
|
|
31
|
+
|