@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,130 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * CMARKET V6 Partner API
6
+ * 외부 ERP 연동용 RESTful API. V5 17개 엔드포인트의 V6 후속.
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.OauthApi = exports.OauthApiFactory = exports.OauthApiFp = exports.OauthApiAxiosParamCreator = void 0;
26
+ const axios_1 = require("axios");
27
+ // Some imports not used depending on template conditions
28
+ // @ts-ignore
29
+ const common_1 = require("../common");
30
+ // @ts-ignore
31
+ const base_1 = require("../base");
32
+ /**
33
+ * OauthApi - axios parameter creator
34
+ */
35
+ const OauthApiAxiosParamCreator = function (configuration) {
36
+ return {
37
+ /**
38
+ * 파트너 ERP 가 client_id/secret 로 단명 JWT access token 을 발급받습니다 (TTL 15분). 이후 모든 보호 endpoint 는 Authorization: Bearer <token> 헤더로 호출합니다.
39
+ * @summary OAuth 2.0 access token 발급 (client_credentials)
40
+ * @param {TokenRequestDto} tokenRequestDto
41
+ * @param {*} [options] Override http request option.
42
+ * @throws {RequiredError}
43
+ */
44
+ token: (tokenRequestDto_1, ...args_1) => __awaiter(this, [tokenRequestDto_1, ...args_1], void 0, function* (tokenRequestDto, options = {}) {
45
+ // verify required parameter 'tokenRequestDto' is not null or undefined
46
+ (0, common_1.assertParamExists)('token', 'tokenRequestDto', tokenRequestDto);
47
+ const localVarPath = `/v1/oauth/token`;
48
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
49
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
50
+ let baseOptions;
51
+ if (configuration) {
52
+ baseOptions = configuration.baseOptions;
53
+ }
54
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
55
+ const localVarHeaderParameter = {};
56
+ const localVarQueryParameter = {};
57
+ localVarHeaderParameter['Content-Type'] = 'application/json';
58
+ localVarHeaderParameter['Accept'] = 'application/json';
59
+ (0, common_1.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 = (0, common_1.serializeDataIfNeeded)(tokenRequestDto, localVarRequestOptions, configuration);
63
+ return {
64
+ url: (0, common_1.toPathString)(localVarUrlObj),
65
+ options: localVarRequestOptions,
66
+ };
67
+ }),
68
+ };
69
+ };
70
+ exports.OauthApiAxiosParamCreator = OauthApiAxiosParamCreator;
71
+ /**
72
+ * OauthApi - functional programming interface
73
+ */
74
+ const OauthApiFp = function (configuration) {
75
+ const localVarAxiosParamCreator = (0, exports.OauthApiAxiosParamCreator)(configuration);
76
+ return {
77
+ /**
78
+ * 파트너 ERP 가 client_id/secret 로 단명 JWT access token 을 발급받습니다 (TTL 15분). 이후 모든 보호 endpoint 는 Authorization: Bearer <token> 헤더로 호출합니다.
79
+ * @summary OAuth 2.0 access token 발급 (client_credentials)
80
+ * @param {TokenRequestDto} tokenRequestDto
81
+ * @param {*} [options] Override http request option.
82
+ * @throws {RequiredError}
83
+ */
84
+ token(tokenRequestDto, options) {
85
+ return __awaiter(this, void 0, void 0, function* () {
86
+ var _a, _b, _c;
87
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.token(tokenRequestDto, options);
88
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
89
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OauthApi.token']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
90
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
91
+ });
92
+ },
93
+ };
94
+ };
95
+ exports.OauthApiFp = OauthApiFp;
96
+ /**
97
+ * OauthApi - factory interface
98
+ */
99
+ const OauthApiFactory = function (configuration, basePath, axios) {
100
+ const localVarFp = (0, exports.OauthApiFp)(configuration);
101
+ return {
102
+ /**
103
+ * 파트너 ERP 가 client_id/secret 로 단명 JWT access token 을 발급받습니다 (TTL 15분). 이후 모든 보호 endpoint 는 Authorization: Bearer <token> 헤더로 호출합니다.
104
+ * @summary OAuth 2.0 access token 발급 (client_credentials)
105
+ * @param {TokenRequestDto} tokenRequestDto
106
+ * @param {*} [options] Override http request option.
107
+ * @throws {RequiredError}
108
+ */
109
+ token(tokenRequestDto, options) {
110
+ return localVarFp.token(tokenRequestDto, options).then((request) => request(axios, basePath));
111
+ },
112
+ };
113
+ };
114
+ exports.OauthApiFactory = OauthApiFactory;
115
+ /**
116
+ * OauthApi - object-oriented interface
117
+ */
118
+ class OauthApi extends base_1.BaseAPI {
119
+ /**
120
+ * 파트너 ERP 가 client_id/secret 로 단명 JWT access token 을 발급받습니다 (TTL 15분). 이후 모든 보호 endpoint 는 Authorization: Bearer <token> 헤더로 호출합니다.
121
+ * @summary OAuth 2.0 access token 발급 (client_credentials)
122
+ * @param {TokenRequestDto} tokenRequestDto
123
+ * @param {*} [options] Override http request option.
124
+ * @throws {RequiredError}
125
+ */
126
+ token(tokenRequestDto, options) {
127
+ return (0, exports.OauthApiFp)(this.configuration).token(tokenRequestDto, options).then((request) => request(this.axios, this.basePath));
128
+ }
129
+ }
130
+ exports.OauthApi = OauthApi;
@@ -0,0 +1,96 @@
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 { BidSummaryResponseDto } from '../models';
16
+ import type { HealthResponseDto } from '../models';
17
+ /**
18
+ * PartnerV1Api - axios parameter creator
19
+ */
20
+ export declare const PartnerV1ApiAxiosParamCreator: (configuration?: Configuration) => {
21
+ /**
22
+ * V5 `GET /api/bid/{buyIdx}` 의 V6 후속. ERP 가 공고 정보를 조회합니다. 인증 필요 (스코프 `bids:read`).
23
+ * @summary 공고 단건 조회
24
+ * @param {string} bidId
25
+ * @param {*} [options] Override http request option.
26
+ * @throws {RequiredError}
27
+ */
28
+ bidsControllerFindOne: (bidId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
29
+ /**
30
+ * V5 ApiController#check 의 V6 대체. ERP 연동 직전 회선·인증 endpoint 동작 확인용.
31
+ * @summary Partner API 헬스체크 (V5 /check 후속)
32
+ * @param {*} [options] Override http request option.
33
+ * @throws {RequiredError}
34
+ */
35
+ healthControllerCheck: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
36
+ };
37
+ /**
38
+ * PartnerV1Api - functional programming interface
39
+ */
40
+ export declare const PartnerV1ApiFp: (configuration?: Configuration) => {
41
+ /**
42
+ * V5 `GET /api/bid/{buyIdx}` 의 V6 후속. ERP 가 공고 정보를 조회합니다. 인증 필요 (스코프 `bids:read`).
43
+ * @summary 공고 단건 조회
44
+ * @param {string} bidId
45
+ * @param {*} [options] Override http request option.
46
+ * @throws {RequiredError}
47
+ */
48
+ bidsControllerFindOne(bidId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BidSummaryResponseDto>>;
49
+ /**
50
+ * V5 ApiController#check 의 V6 대체. ERP 연동 직전 회선·인증 endpoint 동작 확인용.
51
+ * @summary Partner API 헬스체크 (V5 /check 후속)
52
+ * @param {*} [options] Override http request option.
53
+ * @throws {RequiredError}
54
+ */
55
+ healthControllerCheck(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<HealthResponseDto>>;
56
+ };
57
+ /**
58
+ * PartnerV1Api - factory interface
59
+ */
60
+ export declare const PartnerV1ApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
61
+ /**
62
+ * V5 `GET /api/bid/{buyIdx}` 의 V6 후속. ERP 가 공고 정보를 조회합니다. 인증 필요 (스코프 `bids:read`).
63
+ * @summary 공고 단건 조회
64
+ * @param {string} bidId
65
+ * @param {*} [options] Override http request option.
66
+ * @throws {RequiredError}
67
+ */
68
+ bidsControllerFindOne(bidId: string, options?: RawAxiosRequestConfig): AxiosPromise<BidSummaryResponseDto>;
69
+ /**
70
+ * V5 ApiController#check 의 V6 대체. ERP 연동 직전 회선·인증 endpoint 동작 확인용.
71
+ * @summary Partner API 헬스체크 (V5 /check 후속)
72
+ * @param {*} [options] Override http request option.
73
+ * @throws {RequiredError}
74
+ */
75
+ healthControllerCheck(options?: RawAxiosRequestConfig): AxiosPromise<HealthResponseDto>;
76
+ };
77
+ /**
78
+ * PartnerV1Api - object-oriented interface
79
+ */
80
+ export declare class PartnerV1Api extends BaseAPI {
81
+ /**
82
+ * V5 `GET /api/bid/{buyIdx}` 의 V6 후속. ERP 가 공고 정보를 조회합니다. 인증 필요 (스코프 `bids:read`).
83
+ * @summary 공고 단건 조회
84
+ * @param {string} bidId
85
+ * @param {*} [options] Override http request option.
86
+ * @throws {RequiredError}
87
+ */
88
+ bidsControllerFindOne(bidId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<BidSummaryResponseDto, any, {}>>;
89
+ /**
90
+ * V5 ApiController#check 의 V6 대체. ERP 연동 직전 회선·인증 endpoint 동작 확인용.
91
+ * @summary Partner API 헬스체크 (V5 /check 후속)
92
+ * @param {*} [options] Override http request option.
93
+ * @throws {RequiredError}
94
+ */
95
+ healthControllerCheck(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<HealthResponseDto, any, {}>>;
96
+ }
@@ -0,0 +1,191 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * CMARKET V6 Partner API
6
+ * 외부 ERP 연동용 RESTful API. V5 17개 엔드포인트의 V6 후속.
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.PartnerV1Api = exports.PartnerV1ApiFactory = exports.PartnerV1ApiFp = exports.PartnerV1ApiAxiosParamCreator = void 0;
26
+ const axios_1 = require("axios");
27
+ // Some imports not used depending on template conditions
28
+ // @ts-ignore
29
+ const common_1 = require("../common");
30
+ // @ts-ignore
31
+ const base_1 = require("../base");
32
+ /**
33
+ * PartnerV1Api - axios parameter creator
34
+ */
35
+ const PartnerV1ApiAxiosParamCreator = function (configuration) {
36
+ return {
37
+ /**
38
+ * V5 `GET /api/bid/{buyIdx}` 의 V6 후속. ERP 가 공고 정보를 조회합니다. 인증 필요 (스코프 `bids:read`).
39
+ * @summary 공고 단건 조회
40
+ * @param {string} bidId
41
+ * @param {*} [options] Override http request option.
42
+ * @throws {RequiredError}
43
+ */
44
+ bidsControllerFindOne: (bidId_1, ...args_1) => __awaiter(this, [bidId_1, ...args_1], void 0, function* (bidId, options = {}) {
45
+ // verify required parameter 'bidId' is not null or undefined
46
+ (0, common_1.assertParamExists)('bidsControllerFindOne', 'bidId', bidId);
47
+ const localVarPath = `/v1/bids/{bidId}`
48
+ .replace('{bidId}', encodeURIComponent(String(bidId)));
49
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
50
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
51
+ let baseOptions;
52
+ if (configuration) {
53
+ baseOptions = configuration.baseOptions;
54
+ }
55
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
56
+ const localVarHeaderParameter = {};
57
+ const localVarQueryParameter = {};
58
+ // authentication partner-oauth2 required
59
+ // http bearer authentication required
60
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
61
+ localVarHeaderParameter['Accept'] = 'application/json';
62
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
63
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
64
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
65
+ return {
66
+ url: (0, common_1.toPathString)(localVarUrlObj),
67
+ options: localVarRequestOptions,
68
+ };
69
+ }),
70
+ /**
71
+ * V5 ApiController#check 의 V6 대체. ERP 연동 직전 회선·인증 endpoint 동작 확인용.
72
+ * @summary Partner API 헬스체크 (V5 /check 후속)
73
+ * @param {*} [options] Override http request option.
74
+ * @throws {RequiredError}
75
+ */
76
+ healthControllerCheck: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
77
+ const localVarPath = `/v1/health`;
78
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
79
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
80
+ let baseOptions;
81
+ if (configuration) {
82
+ baseOptions = configuration.baseOptions;
83
+ }
84
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
85
+ const localVarHeaderParameter = {};
86
+ const localVarQueryParameter = {};
87
+ localVarHeaderParameter['Accept'] = 'application/json';
88
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
89
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
90
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
91
+ return {
92
+ url: (0, common_1.toPathString)(localVarUrlObj),
93
+ options: localVarRequestOptions,
94
+ };
95
+ }),
96
+ };
97
+ };
98
+ exports.PartnerV1ApiAxiosParamCreator = PartnerV1ApiAxiosParamCreator;
99
+ /**
100
+ * PartnerV1Api - functional programming interface
101
+ */
102
+ const PartnerV1ApiFp = function (configuration) {
103
+ const localVarAxiosParamCreator = (0, exports.PartnerV1ApiAxiosParamCreator)(configuration);
104
+ return {
105
+ /**
106
+ * V5 `GET /api/bid/{buyIdx}` 의 V6 후속. ERP 가 공고 정보를 조회합니다. 인증 필요 (스코프 `bids:read`).
107
+ * @summary 공고 단건 조회
108
+ * @param {string} bidId
109
+ * @param {*} [options] Override http request option.
110
+ * @throws {RequiredError}
111
+ */
112
+ bidsControllerFindOne(bidId, options) {
113
+ return __awaiter(this, void 0, void 0, function* () {
114
+ var _a, _b, _c;
115
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.bidsControllerFindOne(bidId, options);
116
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
117
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PartnerV1Api.bidsControllerFindOne']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
118
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
119
+ });
120
+ },
121
+ /**
122
+ * V5 ApiController#check 의 V6 대체. ERP 연동 직전 회선·인증 endpoint 동작 확인용.
123
+ * @summary Partner API 헬스체크 (V5 /check 후속)
124
+ * @param {*} [options] Override http request option.
125
+ * @throws {RequiredError}
126
+ */
127
+ healthControllerCheck(options) {
128
+ return __awaiter(this, void 0, void 0, function* () {
129
+ var _a, _b, _c;
130
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.healthControllerCheck(options);
131
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
132
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PartnerV1Api.healthControllerCheck']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
133
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
134
+ });
135
+ },
136
+ };
137
+ };
138
+ exports.PartnerV1ApiFp = PartnerV1ApiFp;
139
+ /**
140
+ * PartnerV1Api - factory interface
141
+ */
142
+ const PartnerV1ApiFactory = function (configuration, basePath, axios) {
143
+ const localVarFp = (0, exports.PartnerV1ApiFp)(configuration);
144
+ return {
145
+ /**
146
+ * V5 `GET /api/bid/{buyIdx}` 의 V6 후속. ERP 가 공고 정보를 조회합니다. 인증 필요 (스코프 `bids:read`).
147
+ * @summary 공고 단건 조회
148
+ * @param {string} bidId
149
+ * @param {*} [options] Override http request option.
150
+ * @throws {RequiredError}
151
+ */
152
+ bidsControllerFindOne(bidId, options) {
153
+ return localVarFp.bidsControllerFindOne(bidId, options).then((request) => request(axios, basePath));
154
+ },
155
+ /**
156
+ * V5 ApiController#check 의 V6 대체. ERP 연동 직전 회선·인증 endpoint 동작 확인용.
157
+ * @summary Partner API 헬스체크 (V5 /check 후속)
158
+ * @param {*} [options] Override http request option.
159
+ * @throws {RequiredError}
160
+ */
161
+ healthControllerCheck(options) {
162
+ return localVarFp.healthControllerCheck(options).then((request) => request(axios, basePath));
163
+ },
164
+ };
165
+ };
166
+ exports.PartnerV1ApiFactory = PartnerV1ApiFactory;
167
+ /**
168
+ * PartnerV1Api - object-oriented interface
169
+ */
170
+ class PartnerV1Api extends base_1.BaseAPI {
171
+ /**
172
+ * V5 `GET /api/bid/{buyIdx}` 의 V6 후속. ERP 가 공고 정보를 조회합니다. 인증 필요 (스코프 `bids:read`).
173
+ * @summary 공고 단건 조회
174
+ * @param {string} bidId
175
+ * @param {*} [options] Override http request option.
176
+ * @throws {RequiredError}
177
+ */
178
+ bidsControllerFindOne(bidId, options) {
179
+ return (0, exports.PartnerV1ApiFp)(this.configuration).bidsControllerFindOne(bidId, options).then((request) => request(this.axios, this.basePath));
180
+ }
181
+ /**
182
+ * V5 ApiController#check 의 V6 대체. ERP 연동 직전 회선·인증 endpoint 동작 확인용.
183
+ * @summary Partner API 헬스체크 (V5 /check 후속)
184
+ * @param {*} [options] Override http request option.
185
+ * @throws {RequiredError}
186
+ */
187
+ healthControllerCheck(options) {
188
+ return (0, exports.PartnerV1ApiFp)(this.configuration).healthControllerCheck(options).then((request) => request(this.axios, this.basePath));
189
+ }
190
+ }
191
+ exports.PartnerV1Api = PartnerV1Api;
@@ -0,0 +1,91 @@
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 { LegacyEnvelopeDto } from '../models';
16
+ /**
17
+ * PartnerV1LegacyApi - axios parameter creator
18
+ */
19
+ export declare const PartnerV1LegacyApiAxiosParamCreator: (configuration?: Configuration) => {
20
+ /**
21
+ * V5 ApiController#check 응답 envelope 그대로. Sunset 헤더 부착.
22
+ * @summary V5 /check 호환 헬스체크 (deprecated)
23
+ * @param {*} [options] Override http request option.
24
+ * @throws {RequiredError}
25
+ */
26
+ legacyControllerCheckGet: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
27
+ /**
28
+ * V5 는 GET·POST 모두 받음. 동일 응답.
29
+ * @summary V5 /check 호환 헬스체크 — POST (deprecated)
30
+ * @param {*} [options] Override http request option.
31
+ * @throws {RequiredError}
32
+ */
33
+ legacyControllerCheckPost: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
34
+ };
35
+ /**
36
+ * PartnerV1LegacyApi - functional programming interface
37
+ */
38
+ export declare const PartnerV1LegacyApiFp: (configuration?: Configuration) => {
39
+ /**
40
+ * V5 ApiController#check 응답 envelope 그대로. Sunset 헤더 부착.
41
+ * @summary V5 /check 호환 헬스체크 (deprecated)
42
+ * @param {*} [options] Override http request option.
43
+ * @throws {RequiredError}
44
+ */
45
+ legacyControllerCheckGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LegacyEnvelopeDto>>;
46
+ /**
47
+ * V5 는 GET·POST 모두 받음. 동일 응답.
48
+ * @summary V5 /check 호환 헬스체크 — POST (deprecated)
49
+ * @param {*} [options] Override http request option.
50
+ * @throws {RequiredError}
51
+ */
52
+ legacyControllerCheckPost(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LegacyEnvelopeDto>>;
53
+ };
54
+ /**
55
+ * PartnerV1LegacyApi - factory interface
56
+ */
57
+ export declare const PartnerV1LegacyApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
58
+ /**
59
+ * V5 ApiController#check 응답 envelope 그대로. Sunset 헤더 부착.
60
+ * @summary V5 /check 호환 헬스체크 (deprecated)
61
+ * @param {*} [options] Override http request option.
62
+ * @throws {RequiredError}
63
+ */
64
+ legacyControllerCheckGet(options?: RawAxiosRequestConfig): AxiosPromise<LegacyEnvelopeDto>;
65
+ /**
66
+ * V5 는 GET·POST 모두 받음. 동일 응답.
67
+ * @summary V5 /check 호환 헬스체크 — POST (deprecated)
68
+ * @param {*} [options] Override http request option.
69
+ * @throws {RequiredError}
70
+ */
71
+ legacyControllerCheckPost(options?: RawAxiosRequestConfig): AxiosPromise<LegacyEnvelopeDto>;
72
+ };
73
+ /**
74
+ * PartnerV1LegacyApi - object-oriented interface
75
+ */
76
+ export declare class PartnerV1LegacyApi extends BaseAPI {
77
+ /**
78
+ * V5 ApiController#check 응답 envelope 그대로. Sunset 헤더 부착.
79
+ * @summary V5 /check 호환 헬스체크 (deprecated)
80
+ * @param {*} [options] Override http request option.
81
+ * @throws {RequiredError}
82
+ */
83
+ legacyControllerCheckGet(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<LegacyEnvelopeDto, any, {}>>;
84
+ /**
85
+ * V5 는 GET·POST 모두 받음. 동일 응답.
86
+ * @summary V5 /check 호환 헬스체크 — POST (deprecated)
87
+ * @param {*} [options] Override http request option.
88
+ * @throws {RequiredError}
89
+ */
90
+ legacyControllerCheckPost(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<LegacyEnvelopeDto, any, {}>>;
91
+ }