@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.
Files changed (170) hide show
  1. package/.openapi-generator/FILES +57 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +95 -0
  5. package/api/oauth-api.ts +127 -0
  6. package/api/partner-v1-api.ts +191 -0
  7. package/api/partner-v1-legacy-api.ts +178 -0
  8. package/api/partner-v2-api.ts +285 -0
  9. package/api.ts +21 -0
  10. package/base.ts +62 -0
  11. package/common.ts +127 -0
  12. package/configuration.ts +121 -0
  13. package/dist/api/oauth-api.d.ts +68 -0
  14. package/dist/api/oauth-api.js +130 -0
  15. package/dist/api/partner-v1-api.d.ts +96 -0
  16. package/dist/api/partner-v1-api.js +191 -0
  17. package/dist/api/partner-v1-legacy-api.d.ts +91 -0
  18. package/dist/api/partner-v1-legacy-api.js +181 -0
  19. package/dist/api/partner-v2-api.d.ts +136 -0
  20. package/dist/api/partner-v2-api.js +273 -0
  21. package/dist/api.d.ts +15 -0
  22. package/dist/api.js +33 -0
  23. package/dist/base.d.ts +42 -0
  24. package/dist/base.js +46 -0
  25. package/dist/common.d.ts +34 -0
  26. package/dist/common.js +139 -0
  27. package/dist/configuration.d.ts +98 -0
  28. package/dist/configuration.js +44 -0
  29. package/dist/esm/api/oauth-api.d.ts +68 -0
  30. package/dist/esm/api/oauth-api.js +123 -0
  31. package/dist/esm/api/partner-v1-api.d.ts +96 -0
  32. package/dist/esm/api/partner-v1-api.js +184 -0
  33. package/dist/esm/api/partner-v1-legacy-api.d.ts +91 -0
  34. package/dist/esm/api/partner-v1-legacy-api.js +174 -0
  35. package/dist/esm/api/partner-v2-api.d.ts +136 -0
  36. package/dist/esm/api/partner-v2-api.js +266 -0
  37. package/dist/esm/api.d.ts +15 -0
  38. package/dist/esm/api.js +17 -0
  39. package/dist/esm/base.d.ts +42 -0
  40. package/dist/esm/base.js +41 -0
  41. package/dist/esm/common.d.ts +34 -0
  42. package/dist/esm/common.js +126 -0
  43. package/dist/esm/configuration.d.ts +98 -0
  44. package/dist/esm/configuration.js +40 -0
  45. package/dist/esm/index.d.ts +14 -0
  46. package/dist/esm/index.js +16 -0
  47. package/dist/esm/models/award-registered-response-dto.d.ts +25 -0
  48. package/dist/esm/models/award-registered-response-dto.js +14 -0
  49. package/dist/esm/models/bid-bond-dto.d.ts +27 -0
  50. package/dist/esm/models/bid-bond-dto.js +18 -0
  51. package/dist/esm/models/bid-created-response-dto.d.ts +17 -0
  52. package/dist/esm/models/bid-created-response-dto.js +14 -0
  53. package/dist/esm/models/bid-document-dto.d.ts +25 -0
  54. package/dist/esm/models/bid-document-dto.js +14 -0
  55. package/dist/esm/models/bid-item-dto.d.ts +41 -0
  56. package/dist/esm/models/bid-item-dto.js +14 -0
  57. package/dist/esm/models/bid-manager-dto.d.ts +25 -0
  58. package/dist/esm/models/bid-manager-dto.js +14 -0
  59. package/dist/esm/models/bid-status.d.ts +23 -0
  60. package/dist/esm/models/bid-status.js +24 -0
  61. package/dist/esm/models/bid-summary-response-dto.d.ts +30 -0
  62. package/dist/esm/models/bid-summary-response-dto.js +14 -0
  63. package/dist/esm/models/create-bid-request-dto.d.ts +278 -0
  64. package/dist/esm/models/create-bid-request-dto.js +101 -0
  65. package/dist/esm/models/file-uploaded-response-dto.d.ts +17 -0
  66. package/dist/esm/models/file-uploaded-response-dto.js +14 -0
  67. package/dist/esm/models/health-response-dto.d.ts +21 -0
  68. package/dist/esm/models/health-response-dto.js +14 -0
  69. package/dist/esm/models/hierarchical-region-dto.d.ts +21 -0
  70. package/dist/esm/models/hierarchical-region-dto.js +14 -0
  71. package/dist/esm/models/index.d.ts +18 -0
  72. package/dist/esm/models/index.js +18 -0
  73. package/dist/esm/models/legacy-envelope-dto.d.ts +25 -0
  74. package/dist/esm/models/legacy-envelope-dto.js +14 -0
  75. package/dist/esm/models/preconditions-dto.d.ts +88 -0
  76. package/dist/esm/models/preconditions-dto.js +44 -0
  77. package/dist/esm/models/register-award-request-dto.d.ts +25 -0
  78. package/dist/esm/models/register-award-request-dto.js +14 -0
  79. package/dist/esm/models/token-request-dto.d.ts +33 -0
  80. package/dist/esm/models/token-request-dto.js +16 -0
  81. package/dist/esm/models/token-response-dto.d.ts +29 -0
  82. package/dist/esm/models/token-response-dto.js +14 -0
  83. package/dist/esm/models/upload-file-request-dto.d.ts +25 -0
  84. package/dist/esm/models/upload-file-request-dto.js +14 -0
  85. package/dist/index.d.ts +14 -0
  86. package/dist/index.js +32 -0
  87. package/dist/models/award-registered-response-dto.d.ts +25 -0
  88. package/dist/models/award-registered-response-dto.js +15 -0
  89. package/dist/models/bid-bond-dto.d.ts +27 -0
  90. package/dist/models/bid-bond-dto.js +21 -0
  91. package/dist/models/bid-created-response-dto.d.ts +17 -0
  92. package/dist/models/bid-created-response-dto.js +15 -0
  93. package/dist/models/bid-document-dto.d.ts +25 -0
  94. package/dist/models/bid-document-dto.js +15 -0
  95. package/dist/models/bid-item-dto.d.ts +41 -0
  96. package/dist/models/bid-item-dto.js +15 -0
  97. package/dist/models/bid-manager-dto.d.ts +25 -0
  98. package/dist/models/bid-manager-dto.js +15 -0
  99. package/dist/models/bid-status.d.ts +23 -0
  100. package/dist/models/bid-status.js +27 -0
  101. package/dist/models/bid-summary-response-dto.d.ts +30 -0
  102. package/dist/models/bid-summary-response-dto.js +15 -0
  103. package/dist/models/create-bid-request-dto.d.ts +278 -0
  104. package/dist/models/create-bid-request-dto.js +104 -0
  105. package/dist/models/file-uploaded-response-dto.d.ts +17 -0
  106. package/dist/models/file-uploaded-response-dto.js +15 -0
  107. package/dist/models/health-response-dto.d.ts +21 -0
  108. package/dist/models/health-response-dto.js +15 -0
  109. package/dist/models/hierarchical-region-dto.d.ts +21 -0
  110. package/dist/models/hierarchical-region-dto.js +15 -0
  111. package/dist/models/index.d.ts +18 -0
  112. package/dist/models/index.js +34 -0
  113. package/dist/models/legacy-envelope-dto.d.ts +25 -0
  114. package/dist/models/legacy-envelope-dto.js +15 -0
  115. package/dist/models/preconditions-dto.d.ts +88 -0
  116. package/dist/models/preconditions-dto.js +47 -0
  117. package/dist/models/register-award-request-dto.d.ts +25 -0
  118. package/dist/models/register-award-request-dto.js +15 -0
  119. package/dist/models/token-request-dto.d.ts +33 -0
  120. package/dist/models/token-request-dto.js +19 -0
  121. package/dist/models/token-response-dto.d.ts +29 -0
  122. package/dist/models/token-response-dto.js +15 -0
  123. package/dist/models/upload-file-request-dto.d.ts +25 -0
  124. package/dist/models/upload-file-request-dto.js +15 -0
  125. package/docs/AwardRegisteredResponseDto.md +24 -0
  126. package/docs/BidBondDto.md +22 -0
  127. package/docs/BidCreatedResponseDto.md +20 -0
  128. package/docs/BidDocumentDto.md +24 -0
  129. package/docs/BidItemDto.md +32 -0
  130. package/docs/BidManagerDto.md +24 -0
  131. package/docs/BidStatus.md +19 -0
  132. package/docs/BidSummaryResponseDto.md +26 -0
  133. package/docs/CreateBidRequestDto.md +96 -0
  134. package/docs/FileUploadedResponseDto.md +20 -0
  135. package/docs/HealthResponseDto.md +22 -0
  136. package/docs/HierarchicalRegionDto.md +22 -0
  137. package/docs/LegacyEnvelopeDto.md +24 -0
  138. package/docs/OauthApi.md +61 -0
  139. package/docs/PartnerV1Api.md +105 -0
  140. package/docs/PartnerV1LegacyApi.md +97 -0
  141. package/docs/PartnerV2Api.md +166 -0
  142. package/docs/PreconditionsDto.md +38 -0
  143. package/docs/RegisterAwardRequestDto.md +24 -0
  144. package/docs/TokenRequestDto.md +26 -0
  145. package/docs/TokenResponseDto.md +26 -0
  146. package/docs/UploadFileRequestDto.md +24 -0
  147. package/git_push.sh +57 -0
  148. package/index.ts +18 -0
  149. package/models/award-registered-response-dto.ts +31 -0
  150. package/models/bid-bond-dto.ts +36 -0
  151. package/models/bid-created-response-dto.ts +23 -0
  152. package/models/bid-document-dto.ts +31 -0
  153. package/models/bid-item-dto.ts +47 -0
  154. package/models/bid-manager-dto.ts +31 -0
  155. package/models/bid-status.ts +33 -0
  156. package/models/bid-summary-response-dto.ts +40 -0
  157. package/models/create-bid-request-dto.ts +312 -0
  158. package/models/file-uploaded-response-dto.ts +23 -0
  159. package/models/health-response-dto.ts +27 -0
  160. package/models/hierarchical-region-dto.ts +27 -0
  161. package/models/index.ts +18 -0
  162. package/models/legacy-envelope-dto.ts +31 -0
  163. package/models/preconditions-dto.ts +101 -0
  164. package/models/register-award-request-dto.ts +31 -0
  165. package/models/token-request-dto.ts +42 -0
  166. package/models/token-response-dto.ts +35 -0
  167. package/models/upload-file-request-dto.ts +31 -0
  168. package/package.json +33 -0
  169. package/tsconfig.esm.json +7 -0
  170. package/tsconfig.json +18 -0
@@ -0,0 +1,136 @@
1
+ /**
2
+ * CMARKET V6 Partner API
3
+ * 외부 ERP 연동용 RESTful API. V5 17개 엔드포인트의 V6 후속.
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { Configuration } from '../configuration';
13
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
+ import { type RequestArgs, BaseAPI } from '../base';
15
+ import type { AwardRegisteredResponseDto } from '../models';
16
+ import type { BidCreatedResponseDto } from '../models';
17
+ import type { CreateBidRequestDto } from '../models';
18
+ import type { FileUploadedResponseDto } from '../models';
19
+ import type { RegisterAwardRequestDto } from '../models';
20
+ import type { UploadFileRequestDto } from '../models';
21
+ /**
22
+ * PartnerV2Api - axios parameter creator
23
+ */
24
+ export declare const PartnerV2ApiAxiosParamCreator: (configuration?: Configuration) => {
25
+ /**
26
+ * V5 /scsbidSend 후속. 스코프 `awards:write` + `Idempotency-Key` 헤더 필수.
27
+ * @summary 낙찰 결과 전송
28
+ * @param {RegisterAwardRequestDto} registerAwardRequestDto
29
+ * @param {*} [options] Override http request option.
30
+ * @throws {RequiredError}
31
+ */
32
+ registerAward: (registerAwardRequestDto: RegisterAwardRequestDto, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
33
+ /**
34
+ * V5 /bidsend 후속. 스코프 `bids:write` + `Idempotency-Key` 헤더 필수.
35
+ * @summary 입찰 정보 전송(등록)
36
+ * @param {CreateBidRequestDto} createBidRequestDto
37
+ * @param {*} [options] Override http request option.
38
+ * @throws {RequiredError}
39
+ */
40
+ registerBid: (createBidRequestDto: CreateBidRequestDto, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
41
+ /**
42
+ * 스코프 `files:write` 필수. base64 또는 url 중 하나를 제출한다.
43
+ * @summary 입찰 첨부파일 업로드(base64 또는 url) → fileKey
44
+ * @param {UploadFileRequestDto} uploadFileRequestDto
45
+ * @param {*} [options] Override http request option.
46
+ * @throws {RequiredError}
47
+ */
48
+ uploadFile: (uploadFileRequestDto: UploadFileRequestDto, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
49
+ };
50
+ /**
51
+ * PartnerV2Api - functional programming interface
52
+ */
53
+ export declare const PartnerV2ApiFp: (configuration?: Configuration) => {
54
+ /**
55
+ * V5 /scsbidSend 후속. 스코프 `awards:write` + `Idempotency-Key` 헤더 필수.
56
+ * @summary 낙찰 결과 전송
57
+ * @param {RegisterAwardRequestDto} registerAwardRequestDto
58
+ * @param {*} [options] Override http request option.
59
+ * @throws {RequiredError}
60
+ */
61
+ registerAward(registerAwardRequestDto: RegisterAwardRequestDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AwardRegisteredResponseDto>>;
62
+ /**
63
+ * V5 /bidsend 후속. 스코프 `bids:write` + `Idempotency-Key` 헤더 필수.
64
+ * @summary 입찰 정보 전송(등록)
65
+ * @param {CreateBidRequestDto} createBidRequestDto
66
+ * @param {*} [options] Override http request option.
67
+ * @throws {RequiredError}
68
+ */
69
+ registerBid(createBidRequestDto: CreateBidRequestDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BidCreatedResponseDto>>;
70
+ /**
71
+ * 스코프 `files:write` 필수. base64 또는 url 중 하나를 제출한다.
72
+ * @summary 입찰 첨부파일 업로드(base64 또는 url) → fileKey
73
+ * @param {UploadFileRequestDto} uploadFileRequestDto
74
+ * @param {*} [options] Override http request option.
75
+ * @throws {RequiredError}
76
+ */
77
+ uploadFile(uploadFileRequestDto: UploadFileRequestDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FileUploadedResponseDto>>;
78
+ };
79
+ /**
80
+ * PartnerV2Api - factory interface
81
+ */
82
+ export declare const PartnerV2ApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
83
+ /**
84
+ * V5 /scsbidSend 후속. 스코프 `awards:write` + `Idempotency-Key` 헤더 필수.
85
+ * @summary 낙찰 결과 전송
86
+ * @param {RegisterAwardRequestDto} registerAwardRequestDto
87
+ * @param {*} [options] Override http request option.
88
+ * @throws {RequiredError}
89
+ */
90
+ registerAward(registerAwardRequestDto: RegisterAwardRequestDto, options?: RawAxiosRequestConfig): AxiosPromise<AwardRegisteredResponseDto>;
91
+ /**
92
+ * V5 /bidsend 후속. 스코프 `bids:write` + `Idempotency-Key` 헤더 필수.
93
+ * @summary 입찰 정보 전송(등록)
94
+ * @param {CreateBidRequestDto} createBidRequestDto
95
+ * @param {*} [options] Override http request option.
96
+ * @throws {RequiredError}
97
+ */
98
+ registerBid(createBidRequestDto: CreateBidRequestDto, options?: RawAxiosRequestConfig): AxiosPromise<BidCreatedResponseDto>;
99
+ /**
100
+ * 스코프 `files:write` 필수. base64 또는 url 중 하나를 제출한다.
101
+ * @summary 입찰 첨부파일 업로드(base64 또는 url) → fileKey
102
+ * @param {UploadFileRequestDto} uploadFileRequestDto
103
+ * @param {*} [options] Override http request option.
104
+ * @throws {RequiredError}
105
+ */
106
+ uploadFile(uploadFileRequestDto: UploadFileRequestDto, options?: RawAxiosRequestConfig): AxiosPromise<FileUploadedResponseDto>;
107
+ };
108
+ /**
109
+ * PartnerV2Api - object-oriented interface
110
+ */
111
+ export declare class PartnerV2Api extends BaseAPI {
112
+ /**
113
+ * V5 /scsbidSend 후속. 스코프 `awards:write` + `Idempotency-Key` 헤더 필수.
114
+ * @summary 낙찰 결과 전송
115
+ * @param {RegisterAwardRequestDto} registerAwardRequestDto
116
+ * @param {*} [options] Override http request option.
117
+ * @throws {RequiredError}
118
+ */
119
+ registerAward(registerAwardRequestDto: RegisterAwardRequestDto, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AwardRegisteredResponseDto, any, {}>>;
120
+ /**
121
+ * V5 /bidsend 후속. 스코프 `bids:write` + `Idempotency-Key` 헤더 필수.
122
+ * @summary 입찰 정보 전송(등록)
123
+ * @param {CreateBidRequestDto} createBidRequestDto
124
+ * @param {*} [options] Override http request option.
125
+ * @throws {RequiredError}
126
+ */
127
+ registerBid(createBidRequestDto: CreateBidRequestDto, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<BidCreatedResponseDto, any, {}>>;
128
+ /**
129
+ * 스코프 `files:write` 필수. base64 또는 url 중 하나를 제출한다.
130
+ * @summary 입찰 첨부파일 업로드(base64 또는 url) → fileKey
131
+ * @param {UploadFileRequestDto} uploadFileRequestDto
132
+ * @param {*} [options] Override http request option.
133
+ * @throws {RequiredError}
134
+ */
135
+ uploadFile(uploadFileRequestDto: UploadFileRequestDto, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<FileUploadedResponseDto, any, {}>>;
136
+ }
@@ -0,0 +1,266 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import globalAxios from 'axios';
24
+ // Some imports not used depending on template conditions
25
+ // @ts-ignore
26
+ import { DUMMY_BASE_URL, assertParamExists, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
27
+ // @ts-ignore
28
+ import { BASE_PATH, BaseAPI, operationServerMap } from '../base';
29
+ /**
30
+ * PartnerV2Api - axios parameter creator
31
+ */
32
+ export const PartnerV2ApiAxiosParamCreator = function (configuration) {
33
+ return {
34
+ /**
35
+ * V5 /scsbidSend 후속. 스코프 `awards:write` + `Idempotency-Key` 헤더 필수.
36
+ * @summary 낙찰 결과 전송
37
+ * @param {RegisterAwardRequestDto} registerAwardRequestDto
38
+ * @param {*} [options] Override http request option.
39
+ * @throws {RequiredError}
40
+ */
41
+ registerAward: (registerAwardRequestDto_1, ...args_1) => __awaiter(this, [registerAwardRequestDto_1, ...args_1], void 0, function* (registerAwardRequestDto, options = {}) {
42
+ // verify required parameter 'registerAwardRequestDto' is not null or undefined
43
+ assertParamExists('registerAward', 'registerAwardRequestDto', registerAwardRequestDto);
44
+ const localVarPath = `/v2/awards`;
45
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
46
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
47
+ let baseOptions;
48
+ if (configuration) {
49
+ baseOptions = configuration.baseOptions;
50
+ }
51
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
52
+ const localVarHeaderParameter = {};
53
+ const localVarQueryParameter = {};
54
+ // authentication partner-oauth2 required
55
+ // http bearer authentication required
56
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
57
+ localVarHeaderParameter['Content-Type'] = 'application/json';
58
+ localVarHeaderParameter['Accept'] = 'application/json';
59
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
60
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
61
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
62
+ localVarRequestOptions.data = serializeDataIfNeeded(registerAwardRequestDto, localVarRequestOptions, configuration);
63
+ return {
64
+ url: toPathString(localVarUrlObj),
65
+ options: localVarRequestOptions,
66
+ };
67
+ }),
68
+ /**
69
+ * V5 /bidsend 후속. 스코프 `bids:write` + `Idempotency-Key` 헤더 필수.
70
+ * @summary 입찰 정보 전송(등록)
71
+ * @param {CreateBidRequestDto} createBidRequestDto
72
+ * @param {*} [options] Override http request option.
73
+ * @throws {RequiredError}
74
+ */
75
+ registerBid: (createBidRequestDto_1, ...args_1) => __awaiter(this, [createBidRequestDto_1, ...args_1], void 0, function* (createBidRequestDto, options = {}) {
76
+ // verify required parameter 'createBidRequestDto' is not null or undefined
77
+ assertParamExists('registerBid', 'createBidRequestDto', createBidRequestDto);
78
+ const localVarPath = `/v2/bids`;
79
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
80
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
81
+ let baseOptions;
82
+ if (configuration) {
83
+ baseOptions = configuration.baseOptions;
84
+ }
85
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
86
+ const localVarHeaderParameter = {};
87
+ const localVarQueryParameter = {};
88
+ // authentication partner-oauth2 required
89
+ // http bearer authentication required
90
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
91
+ localVarHeaderParameter['Content-Type'] = 'application/json';
92
+ localVarHeaderParameter['Accept'] = 'application/json';
93
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
94
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
95
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
96
+ localVarRequestOptions.data = serializeDataIfNeeded(createBidRequestDto, localVarRequestOptions, configuration);
97
+ return {
98
+ url: toPathString(localVarUrlObj),
99
+ options: localVarRequestOptions,
100
+ };
101
+ }),
102
+ /**
103
+ * 스코프 `files:write` 필수. base64 또는 url 중 하나를 제출한다.
104
+ * @summary 입찰 첨부파일 업로드(base64 또는 url) → fileKey
105
+ * @param {UploadFileRequestDto} uploadFileRequestDto
106
+ * @param {*} [options] Override http request option.
107
+ * @throws {RequiredError}
108
+ */
109
+ uploadFile: (uploadFileRequestDto_1, ...args_1) => __awaiter(this, [uploadFileRequestDto_1, ...args_1], void 0, function* (uploadFileRequestDto, options = {}) {
110
+ // verify required parameter 'uploadFileRequestDto' is not null or undefined
111
+ assertParamExists('uploadFile', 'uploadFileRequestDto', uploadFileRequestDto);
112
+ const localVarPath = `/v2/files`;
113
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
114
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
115
+ let baseOptions;
116
+ if (configuration) {
117
+ baseOptions = configuration.baseOptions;
118
+ }
119
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
120
+ const localVarHeaderParameter = {};
121
+ const localVarQueryParameter = {};
122
+ // authentication partner-oauth2 required
123
+ // http bearer authentication required
124
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
125
+ localVarHeaderParameter['Content-Type'] = 'application/json';
126
+ localVarHeaderParameter['Accept'] = 'application/json';
127
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
128
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
129
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
130
+ localVarRequestOptions.data = serializeDataIfNeeded(uploadFileRequestDto, localVarRequestOptions, configuration);
131
+ return {
132
+ url: toPathString(localVarUrlObj),
133
+ options: localVarRequestOptions,
134
+ };
135
+ }),
136
+ };
137
+ };
138
+ /**
139
+ * PartnerV2Api - functional programming interface
140
+ */
141
+ export const PartnerV2ApiFp = function (configuration) {
142
+ const localVarAxiosParamCreator = PartnerV2ApiAxiosParamCreator(configuration);
143
+ return {
144
+ /**
145
+ * V5 /scsbidSend 후속. 스코프 `awards:write` + `Idempotency-Key` 헤더 필수.
146
+ * @summary 낙찰 결과 전송
147
+ * @param {RegisterAwardRequestDto} registerAwardRequestDto
148
+ * @param {*} [options] Override http request option.
149
+ * @throws {RequiredError}
150
+ */
151
+ registerAward(registerAwardRequestDto, options) {
152
+ return __awaiter(this, void 0, void 0, function* () {
153
+ var _a, _b, _c;
154
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.registerAward(registerAwardRequestDto, options);
155
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
156
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PartnerV2Api.registerAward']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
157
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
158
+ });
159
+ },
160
+ /**
161
+ * V5 /bidsend 후속. 스코프 `bids:write` + `Idempotency-Key` 헤더 필수.
162
+ * @summary 입찰 정보 전송(등록)
163
+ * @param {CreateBidRequestDto} createBidRequestDto
164
+ * @param {*} [options] Override http request option.
165
+ * @throws {RequiredError}
166
+ */
167
+ registerBid(createBidRequestDto, options) {
168
+ return __awaiter(this, void 0, void 0, function* () {
169
+ var _a, _b, _c;
170
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.registerBid(createBidRequestDto, options);
171
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
172
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PartnerV2Api.registerBid']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
173
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
174
+ });
175
+ },
176
+ /**
177
+ * 스코프 `files:write` 필수. base64 또는 url 중 하나를 제출한다.
178
+ * @summary 입찰 첨부파일 업로드(base64 또는 url) → fileKey
179
+ * @param {UploadFileRequestDto} uploadFileRequestDto
180
+ * @param {*} [options] Override http request option.
181
+ * @throws {RequiredError}
182
+ */
183
+ uploadFile(uploadFileRequestDto, options) {
184
+ return __awaiter(this, void 0, void 0, function* () {
185
+ var _a, _b, _c;
186
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.uploadFile(uploadFileRequestDto, options);
187
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
188
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PartnerV2Api.uploadFile']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
189
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
190
+ });
191
+ },
192
+ };
193
+ };
194
+ /**
195
+ * PartnerV2Api - factory interface
196
+ */
197
+ export const PartnerV2ApiFactory = function (configuration, basePath, axios) {
198
+ const localVarFp = PartnerV2ApiFp(configuration);
199
+ return {
200
+ /**
201
+ * V5 /scsbidSend 후속. 스코프 `awards:write` + `Idempotency-Key` 헤더 필수.
202
+ * @summary 낙찰 결과 전송
203
+ * @param {RegisterAwardRequestDto} registerAwardRequestDto
204
+ * @param {*} [options] Override http request option.
205
+ * @throws {RequiredError}
206
+ */
207
+ registerAward(registerAwardRequestDto, options) {
208
+ return localVarFp.registerAward(registerAwardRequestDto, options).then((request) => request(axios, basePath));
209
+ },
210
+ /**
211
+ * V5 /bidsend 후속. 스코프 `bids:write` + `Idempotency-Key` 헤더 필수.
212
+ * @summary 입찰 정보 전송(등록)
213
+ * @param {CreateBidRequestDto} createBidRequestDto
214
+ * @param {*} [options] Override http request option.
215
+ * @throws {RequiredError}
216
+ */
217
+ registerBid(createBidRequestDto, options) {
218
+ return localVarFp.registerBid(createBidRequestDto, options).then((request) => request(axios, basePath));
219
+ },
220
+ /**
221
+ * 스코프 `files:write` 필수. base64 또는 url 중 하나를 제출한다.
222
+ * @summary 입찰 첨부파일 업로드(base64 또는 url) → fileKey
223
+ * @param {UploadFileRequestDto} uploadFileRequestDto
224
+ * @param {*} [options] Override http request option.
225
+ * @throws {RequiredError}
226
+ */
227
+ uploadFile(uploadFileRequestDto, options) {
228
+ return localVarFp.uploadFile(uploadFileRequestDto, options).then((request) => request(axios, basePath));
229
+ },
230
+ };
231
+ };
232
+ /**
233
+ * PartnerV2Api - object-oriented interface
234
+ */
235
+ export class PartnerV2Api extends BaseAPI {
236
+ /**
237
+ * V5 /scsbidSend 후속. 스코프 `awards:write` + `Idempotency-Key` 헤더 필수.
238
+ * @summary 낙찰 결과 전송
239
+ * @param {RegisterAwardRequestDto} registerAwardRequestDto
240
+ * @param {*} [options] Override http request option.
241
+ * @throws {RequiredError}
242
+ */
243
+ registerAward(registerAwardRequestDto, options) {
244
+ return PartnerV2ApiFp(this.configuration).registerAward(registerAwardRequestDto, options).then((request) => request(this.axios, this.basePath));
245
+ }
246
+ /**
247
+ * V5 /bidsend 후속. 스코프 `bids:write` + `Idempotency-Key` 헤더 필수.
248
+ * @summary 입찰 정보 전송(등록)
249
+ * @param {CreateBidRequestDto} createBidRequestDto
250
+ * @param {*} [options] Override http request option.
251
+ * @throws {RequiredError}
252
+ */
253
+ registerBid(createBidRequestDto, options) {
254
+ return PartnerV2ApiFp(this.configuration).registerBid(createBidRequestDto, options).then((request) => request(this.axios, this.basePath));
255
+ }
256
+ /**
257
+ * 스코프 `files:write` 필수. base64 또는 url 중 하나를 제출한다.
258
+ * @summary 입찰 첨부파일 업로드(base64 또는 url) → fileKey
259
+ * @param {UploadFileRequestDto} uploadFileRequestDto
260
+ * @param {*} [options] Override http request option.
261
+ * @throws {RequiredError}
262
+ */
263
+ uploadFile(uploadFileRequestDto, options) {
264
+ return PartnerV2ApiFp(this.configuration).uploadFile(uploadFileRequestDto, options).then((request) => request(this.axios, this.basePath));
265
+ }
266
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * CMARKET V6 Partner API
3
+ * 외부 ERP 연동용 RESTful API. V5 17개 엔드포인트의 V6 후속.
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ export * from './api/oauth-api';
13
+ export * from './api/partner-v1-api';
14
+ export * from './api/partner-v1-legacy-api';
15
+ export * from './api/partner-v2-api';
@@ -0,0 +1,17 @@
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
+ export * from './api/oauth-api';
15
+ export * from './api/partner-v1-api';
16
+ export * from './api/partner-v1-legacy-api';
17
+ export * from './api/partner-v2-api';
@@ -0,0 +1,42 @@
1
+ /**
2
+ * CMARKET V6 Partner API
3
+ * 외부 ERP 연동용 RESTful API. V5 17개 엔드포인트의 V6 후속.
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { Configuration } from './configuration';
13
+ import type { AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
+ export declare const BASE_PATH: string;
15
+ export declare const COLLECTION_FORMATS: {
16
+ csv: string;
17
+ ssv: string;
18
+ tsv: string;
19
+ pipes: string;
20
+ };
21
+ export interface RequestArgs {
22
+ url: string;
23
+ options: RawAxiosRequestConfig;
24
+ }
25
+ export declare class BaseAPI {
26
+ protected basePath: string;
27
+ protected axios: AxiosInstance;
28
+ protected configuration: Configuration | undefined;
29
+ constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
30
+ }
31
+ export declare class RequiredError extends Error {
32
+ field: string;
33
+ constructor(field: string, msg?: string);
34
+ }
35
+ interface ServerMap {
36
+ [key: string]: {
37
+ url: string;
38
+ description: string;
39
+ }[];
40
+ }
41
+ export declare const operationServerMap: ServerMap;
42
+ export {};
@@ -0,0 +1,41 @@
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
+ import globalAxios from 'axios';
15
+ export const BASE_PATH = "http://localhost".replace(/\/+$/, "");
16
+ export const COLLECTION_FORMATS = {
17
+ csv: ",",
18
+ ssv: " ",
19
+ tsv: "\t",
20
+ pipes: "|",
21
+ };
22
+ export class BaseAPI {
23
+ constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
24
+ var _a;
25
+ this.basePath = basePath;
26
+ this.axios = axios;
27
+ if (configuration) {
28
+ this.configuration = configuration;
29
+ this.basePath = (_a = configuration.basePath) !== null && _a !== void 0 ? _a : basePath;
30
+ }
31
+ }
32
+ }
33
+ ;
34
+ export class RequiredError extends Error {
35
+ constructor(field, msg) {
36
+ super(msg);
37
+ this.field = field;
38
+ this.name = "RequiredError";
39
+ }
40
+ }
41
+ export const operationServerMap = {};
@@ -0,0 +1,34 @@
1
+ /**
2
+ * CMARKET V6 Partner API
3
+ * 외부 ERP 연동용 RESTful API. V5 17개 엔드포인트의 V6 후속.
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { Configuration } from "./configuration";
13
+ import type { RequestArgs } from "./base";
14
+ import type { AxiosInstance, AxiosResponse } from 'axios';
15
+ export declare const DUMMY_BASE_URL = "https://example.com";
16
+ /**
17
+ *
18
+ * @throws {RequiredError}
19
+ */
20
+ export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
21
+ export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
22
+ export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
23
+ export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
24
+ export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
25
+ export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
26
+ /**
27
+ * JSON serialization helper function which replaces instances of unserializable types with serializable ones.
28
+ * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
29
+ * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
30
+ */
31
+ export declare const replaceWithSerializableTypeIfNeeded: (key: string, value: any) => any;
32
+ export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
33
+ export declare const toPathString: (url: URL) => string;
34
+ export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;