@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,285 @@
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
+ import type { Configuration } from '../configuration';
17
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
18
+ import globalAxios from 'axios';
19
+ // Some imports not used depending on template conditions
20
+ // @ts-ignore
21
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common';
22
+ // @ts-ignore
23
+ import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
24
+ // @ts-ignore
25
+ import type { AwardRegisteredResponseDto } from '../models';
26
+ // @ts-ignore
27
+ import type { BidCreatedResponseDto } from '../models';
28
+ // @ts-ignore
29
+ import type { CreateBidRequestDto } from '../models';
30
+ // @ts-ignore
31
+ import type { FileUploadedResponseDto } from '../models';
32
+ // @ts-ignore
33
+ import type { RegisterAwardRequestDto } from '../models';
34
+ // @ts-ignore
35
+ import type { UploadFileRequestDto } from '../models';
36
+ /**
37
+ * PartnerV2Api - axios parameter creator
38
+ */
39
+ export const PartnerV2ApiAxiosParamCreator = function (configuration?: Configuration) {
40
+ return {
41
+ /**
42
+ * V5 /scsbidSend 후속. 스코프 `awards:write` + `Idempotency-Key` 헤더 필수.
43
+ * @summary 낙찰 결과 전송
44
+ * @param {RegisterAwardRequestDto} registerAwardRequestDto
45
+ * @param {*} [options] Override http request option.
46
+ * @throws {RequiredError}
47
+ */
48
+ registerAward: async (registerAwardRequestDto: RegisterAwardRequestDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
49
+ // verify required parameter 'registerAwardRequestDto' is not null or undefined
50
+ assertParamExists('registerAward', 'registerAwardRequestDto', registerAwardRequestDto)
51
+ const localVarPath = `/v2/awards`;
52
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
53
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
54
+ let baseOptions;
55
+ if (configuration) {
56
+ baseOptions = configuration.baseOptions;
57
+ }
58
+
59
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
60
+ const localVarHeaderParameter = {} as any;
61
+ const localVarQueryParameter = {} as any;
62
+
63
+ // authentication partner-oauth2 required
64
+ // http bearer authentication required
65
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
66
+
67
+ localVarHeaderParameter['Content-Type'] = 'application/json';
68
+ localVarHeaderParameter['Accept'] = 'application/json';
69
+
70
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
71
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
72
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
73
+ localVarRequestOptions.data = serializeDataIfNeeded(registerAwardRequestDto, localVarRequestOptions, configuration)
74
+
75
+ return {
76
+ url: toPathString(localVarUrlObj),
77
+ options: localVarRequestOptions,
78
+ };
79
+ },
80
+ /**
81
+ * V5 /bidsend 후속. 스코프 `bids:write` + `Idempotency-Key` 헤더 필수.
82
+ * @summary 입찰 정보 전송(등록)
83
+ * @param {CreateBidRequestDto} createBidRequestDto
84
+ * @param {*} [options] Override http request option.
85
+ * @throws {RequiredError}
86
+ */
87
+ registerBid: async (createBidRequestDto: CreateBidRequestDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
88
+ // verify required parameter 'createBidRequestDto' is not null or undefined
89
+ assertParamExists('registerBid', 'createBidRequestDto', createBidRequestDto)
90
+ const localVarPath = `/v2/bids`;
91
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
92
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
93
+ let baseOptions;
94
+ if (configuration) {
95
+ baseOptions = configuration.baseOptions;
96
+ }
97
+
98
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
99
+ const localVarHeaderParameter = {} as any;
100
+ const localVarQueryParameter = {} as any;
101
+
102
+ // authentication partner-oauth2 required
103
+ // http bearer authentication required
104
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
105
+
106
+ localVarHeaderParameter['Content-Type'] = 'application/json';
107
+ localVarHeaderParameter['Accept'] = 'application/json';
108
+
109
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
110
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
111
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
112
+ localVarRequestOptions.data = serializeDataIfNeeded(createBidRequestDto, localVarRequestOptions, configuration)
113
+
114
+ return {
115
+ url: toPathString(localVarUrlObj),
116
+ options: localVarRequestOptions,
117
+ };
118
+ },
119
+ /**
120
+ * 스코프 `files:write` 필수. base64 또는 url 중 하나를 제출한다.
121
+ * @summary 입찰 첨부파일 업로드(base64 또는 url) → fileKey
122
+ * @param {UploadFileRequestDto} uploadFileRequestDto
123
+ * @param {*} [options] Override http request option.
124
+ * @throws {RequiredError}
125
+ */
126
+ uploadFile: async (uploadFileRequestDto: UploadFileRequestDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
127
+ // verify required parameter 'uploadFileRequestDto' is not null or undefined
128
+ assertParamExists('uploadFile', 'uploadFileRequestDto', uploadFileRequestDto)
129
+ const localVarPath = `/v2/files`;
130
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
131
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
132
+ let baseOptions;
133
+ if (configuration) {
134
+ baseOptions = configuration.baseOptions;
135
+ }
136
+
137
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
138
+ const localVarHeaderParameter = {} as any;
139
+ const localVarQueryParameter = {} as any;
140
+
141
+ // authentication partner-oauth2 required
142
+ // http bearer authentication required
143
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
144
+
145
+ localVarHeaderParameter['Content-Type'] = 'application/json';
146
+ localVarHeaderParameter['Accept'] = 'application/json';
147
+
148
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
149
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
150
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
151
+ localVarRequestOptions.data = serializeDataIfNeeded(uploadFileRequestDto, localVarRequestOptions, configuration)
152
+
153
+ return {
154
+ url: toPathString(localVarUrlObj),
155
+ options: localVarRequestOptions,
156
+ };
157
+ },
158
+ }
159
+ };
160
+
161
+ /**
162
+ * PartnerV2Api - functional programming interface
163
+ */
164
+ export const PartnerV2ApiFp = function(configuration?: Configuration) {
165
+ const localVarAxiosParamCreator = PartnerV2ApiAxiosParamCreator(configuration)
166
+ return {
167
+ /**
168
+ * V5 /scsbidSend 후속. 스코프 `awards:write` + `Idempotency-Key` 헤더 필수.
169
+ * @summary 낙찰 결과 전송
170
+ * @param {RegisterAwardRequestDto} registerAwardRequestDto
171
+ * @param {*} [options] Override http request option.
172
+ * @throws {RequiredError}
173
+ */
174
+ async registerAward(registerAwardRequestDto: RegisterAwardRequestDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AwardRegisteredResponseDto>> {
175
+ const localVarAxiosArgs = await localVarAxiosParamCreator.registerAward(registerAwardRequestDto, options);
176
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
177
+ const localVarOperationServerBasePath = operationServerMap['PartnerV2Api.registerAward']?.[localVarOperationServerIndex]?.url;
178
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
179
+ },
180
+ /**
181
+ * V5 /bidsend 후속. 스코프 `bids:write` + `Idempotency-Key` 헤더 필수.
182
+ * @summary 입찰 정보 전송(등록)
183
+ * @param {CreateBidRequestDto} createBidRequestDto
184
+ * @param {*} [options] Override http request option.
185
+ * @throws {RequiredError}
186
+ */
187
+ async registerBid(createBidRequestDto: CreateBidRequestDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BidCreatedResponseDto>> {
188
+ const localVarAxiosArgs = await localVarAxiosParamCreator.registerBid(createBidRequestDto, options);
189
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
190
+ const localVarOperationServerBasePath = operationServerMap['PartnerV2Api.registerBid']?.[localVarOperationServerIndex]?.url;
191
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
192
+ },
193
+ /**
194
+ * 스코프 `files:write` 필수. base64 또는 url 중 하나를 제출한다.
195
+ * @summary 입찰 첨부파일 업로드(base64 또는 url) → fileKey
196
+ * @param {UploadFileRequestDto} uploadFileRequestDto
197
+ * @param {*} [options] Override http request option.
198
+ * @throws {RequiredError}
199
+ */
200
+ async uploadFile(uploadFileRequestDto: UploadFileRequestDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FileUploadedResponseDto>> {
201
+ const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(uploadFileRequestDto, options);
202
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
203
+ const localVarOperationServerBasePath = operationServerMap['PartnerV2Api.uploadFile']?.[localVarOperationServerIndex]?.url;
204
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
205
+ },
206
+ }
207
+ };
208
+
209
+ /**
210
+ * PartnerV2Api - factory interface
211
+ */
212
+ export const PartnerV2ApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
213
+ const localVarFp = PartnerV2ApiFp(configuration)
214
+ return {
215
+ /**
216
+ * V5 /scsbidSend 후속. 스코프 `awards:write` + `Idempotency-Key` 헤더 필수.
217
+ * @summary 낙찰 결과 전송
218
+ * @param {RegisterAwardRequestDto} registerAwardRequestDto
219
+ * @param {*} [options] Override http request option.
220
+ * @throws {RequiredError}
221
+ */
222
+ registerAward(registerAwardRequestDto: RegisterAwardRequestDto, options?: RawAxiosRequestConfig): AxiosPromise<AwardRegisteredResponseDto> {
223
+ return localVarFp.registerAward(registerAwardRequestDto, options).then((request) => request(axios, basePath));
224
+ },
225
+ /**
226
+ * V5 /bidsend 후속. 스코프 `bids:write` + `Idempotency-Key` 헤더 필수.
227
+ * @summary 입찰 정보 전송(등록)
228
+ * @param {CreateBidRequestDto} createBidRequestDto
229
+ * @param {*} [options] Override http request option.
230
+ * @throws {RequiredError}
231
+ */
232
+ registerBid(createBidRequestDto: CreateBidRequestDto, options?: RawAxiosRequestConfig): AxiosPromise<BidCreatedResponseDto> {
233
+ return localVarFp.registerBid(createBidRequestDto, options).then((request) => request(axios, basePath));
234
+ },
235
+ /**
236
+ * 스코프 `files:write` 필수. base64 또는 url 중 하나를 제출한다.
237
+ * @summary 입찰 첨부파일 업로드(base64 또는 url) → fileKey
238
+ * @param {UploadFileRequestDto} uploadFileRequestDto
239
+ * @param {*} [options] Override http request option.
240
+ * @throws {RequiredError}
241
+ */
242
+ uploadFile(uploadFileRequestDto: UploadFileRequestDto, options?: RawAxiosRequestConfig): AxiosPromise<FileUploadedResponseDto> {
243
+ return localVarFp.uploadFile(uploadFileRequestDto, options).then((request) => request(axios, basePath));
244
+ },
245
+ };
246
+ };
247
+
248
+ /**
249
+ * PartnerV2Api - object-oriented interface
250
+ */
251
+ export class PartnerV2Api extends BaseAPI {
252
+ /**
253
+ * V5 /scsbidSend 후속. 스코프 `awards:write` + `Idempotency-Key` 헤더 필수.
254
+ * @summary 낙찰 결과 전송
255
+ * @param {RegisterAwardRequestDto} registerAwardRequestDto
256
+ * @param {*} [options] Override http request option.
257
+ * @throws {RequiredError}
258
+ */
259
+ public registerAward(registerAwardRequestDto: RegisterAwardRequestDto, options?: RawAxiosRequestConfig) {
260
+ return PartnerV2ApiFp(this.configuration).registerAward(registerAwardRequestDto, options).then((request) => request(this.axios, this.basePath));
261
+ }
262
+
263
+ /**
264
+ * V5 /bidsend 후속. 스코프 `bids:write` + `Idempotency-Key` 헤더 필수.
265
+ * @summary 입찰 정보 전송(등록)
266
+ * @param {CreateBidRequestDto} createBidRequestDto
267
+ * @param {*} [options] Override http request option.
268
+ * @throws {RequiredError}
269
+ */
270
+ public registerBid(createBidRequestDto: CreateBidRequestDto, options?: RawAxiosRequestConfig) {
271
+ return PartnerV2ApiFp(this.configuration).registerBid(createBidRequestDto, options).then((request) => request(this.axios, this.basePath));
272
+ }
273
+
274
+ /**
275
+ * 스코프 `files:write` 필수. base64 또는 url 중 하나를 제출한다.
276
+ * @summary 입찰 첨부파일 업로드(base64 또는 url) → fileKey
277
+ * @param {UploadFileRequestDto} uploadFileRequestDto
278
+ * @param {*} [options] Override http request option.
279
+ * @throws {RequiredError}
280
+ */
281
+ public uploadFile(uploadFileRequestDto: UploadFileRequestDto, options?: RawAxiosRequestConfig) {
282
+ return PartnerV2ApiFp(this.configuration).uploadFile(uploadFileRequestDto, options).then((request) => request(this.axios, this.basePath));
283
+ }
284
+ }
285
+
package/api.ts ADDED
@@ -0,0 +1,21 @@
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 * from './api/oauth-api';
18
+ export * from './api/partner-v1-api';
19
+ export * from './api/partner-v1-legacy-api';
20
+ export * from './api/partner-v2-api';
21
+
package/base.ts ADDED
@@ -0,0 +1,62 @@
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
+ import type { Configuration } from './configuration';
17
+ // Some imports not used depending on template conditions
18
+ // @ts-ignore
19
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
20
+ import globalAxios from 'axios';
21
+
22
+ export const BASE_PATH = "http://localhost".replace(/\/+$/, "");
23
+
24
+ export const COLLECTION_FORMATS = {
25
+ csv: ",",
26
+ ssv: " ",
27
+ tsv: "\t",
28
+ pipes: "|",
29
+ };
30
+
31
+ export interface RequestArgs {
32
+ url: string;
33
+ options: RawAxiosRequestConfig;
34
+ }
35
+
36
+ export class BaseAPI {
37
+ protected configuration: Configuration | undefined;
38
+
39
+ constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
40
+ if (configuration) {
41
+ this.configuration = configuration;
42
+ this.basePath = configuration.basePath ?? basePath;
43
+ }
44
+ }
45
+ };
46
+
47
+ export class RequiredError extends Error {
48
+ constructor(public field: string, msg?: string) {
49
+ super(msg);
50
+ this.name = "RequiredError"
51
+ }
52
+ }
53
+
54
+ interface ServerMap {
55
+ [key: string]: {
56
+ url: string,
57
+ description: string,
58
+ }[];
59
+ }
60
+
61
+ export const operationServerMap: ServerMap = {
62
+ }
package/common.ts ADDED
@@ -0,0 +1,127 @@
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
+ import type { Configuration } from "./configuration";
16
+ import type { RequestArgs } from "./base";
17
+ import type { AxiosInstance, AxiosResponse } from 'axios';
18
+ import { RequiredError } from "./base";
19
+
20
+ export const DUMMY_BASE_URL = 'https://example.com'
21
+
22
+ /**
23
+ *
24
+ * @throws {RequiredError}
25
+ */
26
+ export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) {
27
+ if (paramValue === null || paramValue === undefined) {
28
+ throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
29
+ }
30
+ }
31
+
32
+ export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) {
33
+ if (configuration && configuration.apiKey) {
34
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
35
+ ? await configuration.apiKey(keyParamName)
36
+ : await configuration.apiKey;
37
+ object[keyParamName] = localVarApiKeyValue;
38
+ }
39
+ }
40
+
41
+ export const setBasicAuthToObject = function (object: any, configuration?: Configuration) {
42
+ if (configuration && (configuration.username || configuration.password)) {
43
+ object["auth"] = { username: configuration.username, password: configuration.password };
44
+ }
45
+ }
46
+
47
+ export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) {
48
+ if (configuration && configuration.accessToken) {
49
+ const accessToken = typeof configuration.accessToken === 'function'
50
+ ? await configuration.accessToken()
51
+ : await configuration.accessToken;
52
+ object["Authorization"] = "Bearer " + accessToken;
53
+ }
54
+ }
55
+
56
+ export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) {
57
+ if (configuration && configuration.accessToken) {
58
+ const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
59
+ ? await configuration.accessToken(name, scopes)
60
+ : await configuration.accessToken;
61
+ object["Authorization"] = "Bearer " + localVarAccessTokenValue;
62
+ }
63
+ }
64
+
65
+
66
+ function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
67
+ if (parameter == null) return;
68
+ if (typeof parameter === "object") {
69
+ if (Array.isArray(parameter) || parameter instanceof Set) {
70
+ (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
71
+ }
72
+ else {
73
+ Object.keys(parameter).forEach(currentKey =>
74
+ setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`)
75
+ );
76
+ }
77
+ }
78
+ else {
79
+ if (urlSearchParams.has(key)) {
80
+ urlSearchParams.append(key, parameter);
81
+ }
82
+ else {
83
+ urlSearchParams.set(key, parameter);
84
+ }
85
+ }
86
+ }
87
+
88
+ export const setSearchParams = function (url: URL, ...objects: any[]) {
89
+ const searchParams = new URLSearchParams(url.search);
90
+ setFlattenedQueryParams(searchParams, objects);
91
+ url.search = searchParams.toString();
92
+ }
93
+
94
+ /**
95
+ * JSON serialization helper function which replaces instances of unserializable types with serializable ones.
96
+ * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
97
+ * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
98
+ */
99
+ // @ts-ignore
100
+ export const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {
101
+ if (value instanceof Set) {
102
+ return Array.from(value);
103
+ } else {
104
+ return value;
105
+ }
106
+ }
107
+
108
+ export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) {
109
+ const nonString = typeof value !== 'string';
110
+ const needsSerialization = nonString && configuration && configuration.isJsonMime
111
+ ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
112
+ : nonString;
113
+ return needsSerialization
114
+ ? JSON.stringify(value !== undefined ? value : {}, replaceWithSerializableTypeIfNeeded)
115
+ : (value || "");
116
+ }
117
+
118
+ export const toPathString = function (url: URL) {
119
+ return url.pathname + url.search + url.hash
120
+ }
121
+
122
+ export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
123
+ return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
124
+ const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url};
125
+ return axios.request<T, R>(axiosRequestArgs);
126
+ };
127
+ }
@@ -0,0 +1,121 @@
1
+ /* tslint:disable */
2
+ /**
3
+ * CMARKET V6 Partner API
4
+ * 외부 ERP 연동용 RESTful API. V5 17개 엔드포인트의 V6 후속.
5
+ *
6
+ * The version of the OpenAPI document: 1.0
7
+ *
8
+ *
9
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
10
+ * https://openapi-generator.tech
11
+ * Do not edit the class manually.
12
+ */
13
+
14
+ interface AWSv4Configuration {
15
+ options?: {
16
+ region?: string
17
+ service?: string
18
+ }
19
+ credentials?: {
20
+ accessKeyId?: string
21
+ secretAccessKey?: string,
22
+ sessionToken?: string
23
+ }
24
+ }
25
+
26
+ export interface ConfigurationParameters {
27
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
28
+ username?: string;
29
+ password?: string;
30
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
31
+ awsv4?: AWSv4Configuration;
32
+ basePath?: string;
33
+ serverIndex?: number;
34
+ baseOptions?: any;
35
+ formDataCtor?: new () => any;
36
+ }
37
+
38
+ export class Configuration {
39
+ /**
40
+ * parameter for apiKey security
41
+ * @param name security name
42
+ */
43
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
44
+ /**
45
+ * parameter for basic security
46
+ */
47
+ username?: string;
48
+ /**
49
+ * parameter for basic security
50
+ */
51
+ password?: string;
52
+ /**
53
+ * parameter for oauth2 security
54
+ * @param name security name
55
+ * @param scopes oauth2 scope
56
+ */
57
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
58
+ /**
59
+ * parameter for aws4 signature security
60
+ * @param {Object} AWS4Signature - AWS4 Signature security
61
+ * @param {string} options.region - aws region
62
+ * @param {string} options.service - name of the service.
63
+ * @param {string} credentials.accessKeyId - aws access key id
64
+ * @param {string} credentials.secretAccessKey - aws access key
65
+ * @param {string} credentials.sessionToken - aws session token
66
+ * @memberof Configuration
67
+ */
68
+ awsv4?: AWSv4Configuration;
69
+ /**
70
+ * override base path
71
+ */
72
+ basePath?: string;
73
+ /**
74
+ * override server index
75
+ */
76
+ serverIndex?: number;
77
+ /**
78
+ * base options for axios calls
79
+ */
80
+ baseOptions?: any;
81
+ /**
82
+ * The FormData constructor that will be used to create multipart form data
83
+ * requests. You can inject this here so that execution environments that
84
+ * do not support the FormData class can still run the generated client.
85
+ *
86
+ * @type {new () => FormData}
87
+ */
88
+ formDataCtor?: new () => any;
89
+
90
+ constructor(param: ConfigurationParameters = {}) {
91
+ this.apiKey = param.apiKey;
92
+ this.username = param.username;
93
+ this.password = param.password;
94
+ this.accessToken = param.accessToken;
95
+ this.awsv4 = param.awsv4;
96
+ this.basePath = param.basePath;
97
+ this.serverIndex = param.serverIndex;
98
+ this.baseOptions = {
99
+ ...param.baseOptions,
100
+ headers: {
101
+ ...param.baseOptions?.headers,
102
+ },
103
+ };
104
+ this.formDataCtor = param.formDataCtor;
105
+ }
106
+
107
+ /**
108
+ * Check if the given MIME is a JSON MIME.
109
+ * JSON MIME examples:
110
+ * application/json
111
+ * application/json; charset=UTF8
112
+ * APPLICATION/JSON
113
+ * application/vnd.company+json
114
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
115
+ * @return True if the given MIME is JSON, false otherwise.
116
+ */
117
+ public isJsonMime(mime: string): boolean {
118
+ const jsonMime: RegExp = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
119
+ return mime !== null && jsonMime.test(mime);
120
+ }
121
+ }
@@ -0,0 +1,68 @@
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 { TokenRequestDto } from '../models';
16
+ import type { TokenResponseDto } from '../models';
17
+ /**
18
+ * OauthApi - axios parameter creator
19
+ */
20
+ export declare const OauthApiAxiosParamCreator: (configuration?: Configuration) => {
21
+ /**
22
+ * 파트너 ERP 가 client_id/secret 로 단명 JWT access token 을 발급받습니다 (TTL 15분). 이후 모든 보호 endpoint 는 Authorization: Bearer <token> 헤더로 호출합니다.
23
+ * @summary OAuth 2.0 access token 발급 (client_credentials)
24
+ * @param {TokenRequestDto} tokenRequestDto
25
+ * @param {*} [options] Override http request option.
26
+ * @throws {RequiredError}
27
+ */
28
+ token: (tokenRequestDto: TokenRequestDto, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
29
+ };
30
+ /**
31
+ * OauthApi - functional programming interface
32
+ */
33
+ export declare const OauthApiFp: (configuration?: Configuration) => {
34
+ /**
35
+ * 파트너 ERP 가 client_id/secret 로 단명 JWT access token 을 발급받습니다 (TTL 15분). 이후 모든 보호 endpoint 는 Authorization: Bearer <token> 헤더로 호출합니다.
36
+ * @summary OAuth 2.0 access token 발급 (client_credentials)
37
+ * @param {TokenRequestDto} tokenRequestDto
38
+ * @param {*} [options] Override http request option.
39
+ * @throws {RequiredError}
40
+ */
41
+ token(tokenRequestDto: TokenRequestDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TokenResponseDto>>;
42
+ };
43
+ /**
44
+ * OauthApi - factory interface
45
+ */
46
+ export declare const OauthApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
47
+ /**
48
+ * 파트너 ERP 가 client_id/secret 로 단명 JWT access token 을 발급받습니다 (TTL 15분). 이후 모든 보호 endpoint 는 Authorization: Bearer <token> 헤더로 호출합니다.
49
+ * @summary OAuth 2.0 access token 발급 (client_credentials)
50
+ * @param {TokenRequestDto} tokenRequestDto
51
+ * @param {*} [options] Override http request option.
52
+ * @throws {RequiredError}
53
+ */
54
+ token(tokenRequestDto: TokenRequestDto, options?: RawAxiosRequestConfig): AxiosPromise<TokenResponseDto>;
55
+ };
56
+ /**
57
+ * OauthApi - object-oriented interface
58
+ */
59
+ export declare class OauthApi extends BaseAPI {
60
+ /**
61
+ * 파트너 ERP 가 client_id/secret 로 단명 JWT access token 을 발급받습니다 (TTL 15분). 이후 모든 보호 endpoint 는 Authorization: Bearer <token> 헤더로 호출합니다.
62
+ * @summary OAuth 2.0 access token 발급 (client_credentials)
63
+ * @param {TokenRequestDto} tokenRequestDto
64
+ * @param {*} [options] Override http request option.
65
+ * @throws {RequiredError}
66
+ */
67
+ token(tokenRequestDto: TokenRequestDto, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<TokenResponseDto, any, {}>>;
68
+ }