@emilgroup/document-sdk 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +6 -0
- package/README.md +2 -2
- package/api/product-documents-api.ts +599 -0
- package/api.ts +2 -0
- package/dist/api/product-documents-api.d.ts +345 -0
- package/dist/api/product-documents-api.js +558 -0
- package/dist/api.d.ts +1 -0
- package/dist/api.js +1 -0
- package/dist/models/create-document-request-dto.d.ts +1 -0
- package/dist/models/create-document-request-dto.js +2 -1
- package/dist/models/create-presigned-post-request-dto.d.ts +1 -0
- package/dist/models/create-presigned-post-request-dto.js +2 -1
- package/dist/models/delete-product-document-request-dto.d.ts +30 -0
- package/dist/models/delete-product-document-request-dto.js +15 -0
- package/dist/models/document-class.d.ts +1 -0
- package/dist/models/document-class.js +2 -1
- package/dist/models/get-product-document-response-class.d.ts +25 -0
- package/dist/models/get-product-document-response-class.js +15 -0
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.js +5 -0
- package/dist/models/list-product-documents-response-class.d.ts +31 -0
- package/dist/models/list-product-documents-response-class.js +15 -0
- package/dist/models/product-document-class.d.ts +99 -0
- package/dist/models/product-document-class.js +36 -0
- package/dist/models/upload-product-document-request-dto.d.ts +63 -0
- package/dist/models/upload-product-document-request-dto.js +24 -0
- package/models/create-document-request-dto.ts +2 -1
- package/models/create-presigned-post-request-dto.ts +2 -1
- package/models/delete-product-document-request-dto.ts +36 -0
- package/models/document-class.ts +2 -1
- package/models/get-product-document-response-class.ts +31 -0
- package/models/index.ts +5 -0
- package/models/list-product-documents-response-class.ts +37 -0
- package/models/product-document-class.ts +108 -0
- package/models/upload-product-document-request-dto.ts +72 -0
- package/package.json +1 -1
|
@@ -0,0 +1,558 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* EMIL DocumentService
|
|
6
|
+
* The EMIL DocumentService API description
|
|
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 __extends = (this && this.__extends) || (function () {
|
|
16
|
+
var extendStatics = function (d, b) {
|
|
17
|
+
extendStatics = Object.setPrototypeOf ||
|
|
18
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
+
return extendStatics(d, b);
|
|
21
|
+
};
|
|
22
|
+
return function (d, b) {
|
|
23
|
+
if (typeof b !== "function" && b !== null)
|
|
24
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
+
extendStatics(d, b);
|
|
26
|
+
function __() { this.constructor = d; }
|
|
27
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
+
};
|
|
29
|
+
})();
|
|
30
|
+
var __assign = (this && this.__assign) || function () {
|
|
31
|
+
__assign = Object.assign || function(t) {
|
|
32
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
33
|
+
s = arguments[i];
|
|
34
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
35
|
+
t[p] = s[p];
|
|
36
|
+
}
|
|
37
|
+
return t;
|
|
38
|
+
};
|
|
39
|
+
return __assign.apply(this, arguments);
|
|
40
|
+
};
|
|
41
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
42
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
43
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
44
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
45
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
46
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
47
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
51
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
52
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
53
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
54
|
+
function step(op) {
|
|
55
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
56
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
57
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
58
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
59
|
+
switch (op[0]) {
|
|
60
|
+
case 0: case 1: t = op; break;
|
|
61
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
62
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
63
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
64
|
+
default:
|
|
65
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
66
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
67
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
68
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
69
|
+
if (t[2]) _.ops.pop();
|
|
70
|
+
_.trys.pop(); continue;
|
|
71
|
+
}
|
|
72
|
+
op = body.call(thisArg, _);
|
|
73
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
74
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
78
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
79
|
+
};
|
|
80
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
81
|
+
exports.ProductDocumentsApi = exports.ProductDocumentsApiFactory = exports.ProductDocumentsApiFp = exports.ProductDocumentsApiAxiosParamCreator = void 0;
|
|
82
|
+
var axios_1 = __importDefault(require("axios"));
|
|
83
|
+
// Some imports not used depending on template conditions
|
|
84
|
+
// @ts-ignore
|
|
85
|
+
var common_1 = require("../common");
|
|
86
|
+
// @ts-ignore
|
|
87
|
+
var base_1 = require("../base");
|
|
88
|
+
// URLSearchParams not necessarily used
|
|
89
|
+
// @ts-ignore
|
|
90
|
+
var url_1 = require("url");
|
|
91
|
+
var FormData = require('form-data');
|
|
92
|
+
/**
|
|
93
|
+
* ProductDocumentsApi - axios parameter creator
|
|
94
|
+
* @export
|
|
95
|
+
*/
|
|
96
|
+
var ProductDocumentsApiAxiosParamCreator = function (configuration) {
|
|
97
|
+
var _this = this;
|
|
98
|
+
return {
|
|
99
|
+
/**
|
|
100
|
+
* Permanently deletes the product document. Supply the unique code that was returned when you created the product document and this will delete it.
|
|
101
|
+
* @summary Delete the product document
|
|
102
|
+
* @param {string} code
|
|
103
|
+
* @param {string} productSlug
|
|
104
|
+
* @param {string} [authorization] Bearer Token
|
|
105
|
+
* @param {*} [options] Override http request option.
|
|
106
|
+
* @throws {RequiredError}
|
|
107
|
+
*/
|
|
108
|
+
deleteProductDocument: function (code, productSlug, authorization, options) {
|
|
109
|
+
if (options === void 0) { options = {}; }
|
|
110
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
111
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
112
|
+
return __generator(this, function (_a) {
|
|
113
|
+
switch (_a.label) {
|
|
114
|
+
case 0:
|
|
115
|
+
// verify required parameter 'code' is not null or undefined
|
|
116
|
+
(0, common_1.assertParamExists)('deleteProductDocument', 'code', code);
|
|
117
|
+
// verify required parameter 'productSlug' is not null or undefined
|
|
118
|
+
(0, common_1.assertParamExists)('deleteProductDocument', 'productSlug', productSlug);
|
|
119
|
+
localVarPath = "/documentservice/v1/documents/product/{productSlug}/{code}"
|
|
120
|
+
.replace("{".concat("code", "}"), encodeURIComponent(String(code)))
|
|
121
|
+
.replace("{".concat("productSlug", "}"), encodeURIComponent(String(productSlug)));
|
|
122
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
123
|
+
if (configuration) {
|
|
124
|
+
baseOptions = configuration.baseOptions;
|
|
125
|
+
baseAccessToken = configuration.accessToken;
|
|
126
|
+
}
|
|
127
|
+
localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
|
|
128
|
+
localVarHeaderParameter = {};
|
|
129
|
+
localVarQueryParameter = {};
|
|
130
|
+
// authentication bearer required
|
|
131
|
+
// http bearer authentication required
|
|
132
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
133
|
+
case 1:
|
|
134
|
+
// authentication bearer required
|
|
135
|
+
// http bearer authentication required
|
|
136
|
+
_a.sent();
|
|
137
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
138
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
139
|
+
}
|
|
140
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
141
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
142
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
143
|
+
return [2 /*return*/, {
|
|
144
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
145
|
+
options: localVarRequestOptions,
|
|
146
|
+
}];
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
},
|
|
151
|
+
/**
|
|
152
|
+
* Get a product document.
|
|
153
|
+
* @summary Retrieve the product document
|
|
154
|
+
* @param {string} productSlug
|
|
155
|
+
* @param {string} code
|
|
156
|
+
* @param {string} [authorization] Bearer Token
|
|
157
|
+
* @param {*} [options] Override http request option.
|
|
158
|
+
* @throws {RequiredError}
|
|
159
|
+
*/
|
|
160
|
+
getProductDocument: function (productSlug, code, authorization, options) {
|
|
161
|
+
if (options === void 0) { options = {}; }
|
|
162
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
163
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
164
|
+
return __generator(this, function (_a) {
|
|
165
|
+
switch (_a.label) {
|
|
166
|
+
case 0:
|
|
167
|
+
// verify required parameter 'productSlug' is not null or undefined
|
|
168
|
+
(0, common_1.assertParamExists)('getProductDocument', 'productSlug', productSlug);
|
|
169
|
+
// verify required parameter 'code' is not null or undefined
|
|
170
|
+
(0, common_1.assertParamExists)('getProductDocument', 'code', code);
|
|
171
|
+
localVarPath = "/documentservice/v1/documents/product/{productSlug}/{code}"
|
|
172
|
+
.replace("{".concat("productSlug", "}"), encodeURIComponent(String(productSlug)))
|
|
173
|
+
.replace("{".concat("code", "}"), encodeURIComponent(String(code)));
|
|
174
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
175
|
+
if (configuration) {
|
|
176
|
+
baseOptions = configuration.baseOptions;
|
|
177
|
+
baseAccessToken = configuration.accessToken;
|
|
178
|
+
}
|
|
179
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
180
|
+
localVarHeaderParameter = {};
|
|
181
|
+
localVarQueryParameter = {};
|
|
182
|
+
// authentication bearer required
|
|
183
|
+
// http bearer authentication required
|
|
184
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
185
|
+
case 1:
|
|
186
|
+
// authentication bearer required
|
|
187
|
+
// http bearer authentication required
|
|
188
|
+
_a.sent();
|
|
189
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
190
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
191
|
+
}
|
|
192
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
193
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
194
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
195
|
+
return [2 /*return*/, {
|
|
196
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
197
|
+
options: localVarRequestOptions,
|
|
198
|
+
}];
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
});
|
|
202
|
+
},
|
|
203
|
+
/**
|
|
204
|
+
* Returns a list of product documents you have previously created. The product documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
205
|
+
* @summary List product documents
|
|
206
|
+
* @param {string} productSlug
|
|
207
|
+
* @param {string} [authorization] Bearer Token
|
|
208
|
+
* @param {number} [pageSize] Page size
|
|
209
|
+
* @param {string} [pageToken] Page token
|
|
210
|
+
* @param {string} [filter] List filter
|
|
211
|
+
* @param {string} [search] Search query
|
|
212
|
+
* @param {string} [order] Ordering criteria
|
|
213
|
+
* @param {string} [expand] Extra fields to fetch
|
|
214
|
+
* @param {*} [options] Override http request option.
|
|
215
|
+
* @throws {RequiredError}
|
|
216
|
+
*/
|
|
217
|
+
listProductDocuments: function (productSlug, authorization, pageSize, pageToken, filter, search, order, expand, options) {
|
|
218
|
+
if (options === void 0) { options = {}; }
|
|
219
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
220
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
221
|
+
return __generator(this, function (_a) {
|
|
222
|
+
switch (_a.label) {
|
|
223
|
+
case 0:
|
|
224
|
+
// verify required parameter 'productSlug' is not null or undefined
|
|
225
|
+
(0, common_1.assertParamExists)('listProductDocuments', 'productSlug', productSlug);
|
|
226
|
+
localVarPath = "/documentservice/v1/documents/product/{productSlug}"
|
|
227
|
+
.replace("{".concat("productSlug", "}"), encodeURIComponent(String(productSlug)));
|
|
228
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
229
|
+
if (configuration) {
|
|
230
|
+
baseOptions = configuration.baseOptions;
|
|
231
|
+
baseAccessToken = configuration.accessToken;
|
|
232
|
+
}
|
|
233
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
234
|
+
localVarHeaderParameter = {};
|
|
235
|
+
localVarQueryParameter = {};
|
|
236
|
+
// authentication bearer required
|
|
237
|
+
// http bearer authentication required
|
|
238
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
239
|
+
case 1:
|
|
240
|
+
// authentication bearer required
|
|
241
|
+
// http bearer authentication required
|
|
242
|
+
_a.sent();
|
|
243
|
+
if (pageSize !== undefined) {
|
|
244
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
245
|
+
}
|
|
246
|
+
if (pageToken !== undefined) {
|
|
247
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
248
|
+
}
|
|
249
|
+
if (filter !== undefined) {
|
|
250
|
+
localVarQueryParameter['filter'] = filter;
|
|
251
|
+
}
|
|
252
|
+
if (search !== undefined) {
|
|
253
|
+
localVarQueryParameter['search'] = search;
|
|
254
|
+
}
|
|
255
|
+
if (order !== undefined) {
|
|
256
|
+
localVarQueryParameter['order'] = order;
|
|
257
|
+
}
|
|
258
|
+
if (expand !== undefined) {
|
|
259
|
+
localVarQueryParameter['expand'] = expand;
|
|
260
|
+
}
|
|
261
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
262
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
263
|
+
}
|
|
264
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
265
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
266
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
267
|
+
return [2 /*return*/, {
|
|
268
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
269
|
+
options: localVarRequestOptions,
|
|
270
|
+
}];
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
});
|
|
274
|
+
},
|
|
275
|
+
/**
|
|
276
|
+
* Upload a product document.
|
|
277
|
+
* @summary Create the product document
|
|
278
|
+
* @param {string} productSlug
|
|
279
|
+
* @param {UploadProductDocumentRequestDto} uploadProductDocumentRequestDto
|
|
280
|
+
* @param {string} [authorization] Bearer Token
|
|
281
|
+
* @param {*} [options] Override http request option.
|
|
282
|
+
* @throws {RequiredError}
|
|
283
|
+
*/
|
|
284
|
+
uploadProductDocument: function (productSlug, uploadProductDocumentRequestDto, authorization, options) {
|
|
285
|
+
if (options === void 0) { options = {}; }
|
|
286
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
287
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
288
|
+
return __generator(this, function (_a) {
|
|
289
|
+
switch (_a.label) {
|
|
290
|
+
case 0:
|
|
291
|
+
// verify required parameter 'productSlug' is not null or undefined
|
|
292
|
+
(0, common_1.assertParamExists)('uploadProductDocument', 'productSlug', productSlug);
|
|
293
|
+
// verify required parameter 'uploadProductDocumentRequestDto' is not null or undefined
|
|
294
|
+
(0, common_1.assertParamExists)('uploadProductDocument', 'uploadProductDocumentRequestDto', uploadProductDocumentRequestDto);
|
|
295
|
+
localVarPath = "/documentservice/v1/documents/product/{productSlug}"
|
|
296
|
+
.replace("{".concat("productSlug", "}"), encodeURIComponent(String(productSlug)));
|
|
297
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
298
|
+
if (configuration) {
|
|
299
|
+
baseOptions = configuration.baseOptions;
|
|
300
|
+
baseAccessToken = configuration.accessToken;
|
|
301
|
+
}
|
|
302
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
303
|
+
localVarHeaderParameter = {};
|
|
304
|
+
localVarQueryParameter = {};
|
|
305
|
+
// authentication bearer required
|
|
306
|
+
// http bearer authentication required
|
|
307
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
308
|
+
case 1:
|
|
309
|
+
// authentication bearer required
|
|
310
|
+
// http bearer authentication required
|
|
311
|
+
_a.sent();
|
|
312
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
313
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
314
|
+
}
|
|
315
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
316
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
317
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
318
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
319
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(uploadProductDocumentRequestDto, localVarRequestOptions, configuration);
|
|
320
|
+
return [2 /*return*/, {
|
|
321
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
322
|
+
options: localVarRequestOptions,
|
|
323
|
+
}];
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
});
|
|
327
|
+
},
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
exports.ProductDocumentsApiAxiosParamCreator = ProductDocumentsApiAxiosParamCreator;
|
|
331
|
+
/**
|
|
332
|
+
* ProductDocumentsApi - functional programming interface
|
|
333
|
+
* @export
|
|
334
|
+
*/
|
|
335
|
+
var ProductDocumentsApiFp = function (configuration) {
|
|
336
|
+
var localVarAxiosParamCreator = (0, exports.ProductDocumentsApiAxiosParamCreator)(configuration);
|
|
337
|
+
return {
|
|
338
|
+
/**
|
|
339
|
+
* Permanently deletes the product document. Supply the unique code that was returned when you created the product document and this will delete it.
|
|
340
|
+
* @summary Delete the product document
|
|
341
|
+
* @param {string} code
|
|
342
|
+
* @param {string} productSlug
|
|
343
|
+
* @param {string} [authorization] Bearer Token
|
|
344
|
+
* @param {*} [options] Override http request option.
|
|
345
|
+
* @throws {RequiredError}
|
|
346
|
+
*/
|
|
347
|
+
deleteProductDocument: function (code, productSlug, authorization, options) {
|
|
348
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
349
|
+
var localVarAxiosArgs;
|
|
350
|
+
return __generator(this, function (_a) {
|
|
351
|
+
switch (_a.label) {
|
|
352
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteProductDocument(code, productSlug, authorization, options)];
|
|
353
|
+
case 1:
|
|
354
|
+
localVarAxiosArgs = _a.sent();
|
|
355
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
356
|
+
}
|
|
357
|
+
});
|
|
358
|
+
});
|
|
359
|
+
},
|
|
360
|
+
/**
|
|
361
|
+
* Get a product document.
|
|
362
|
+
* @summary Retrieve the product document
|
|
363
|
+
* @param {string} productSlug
|
|
364
|
+
* @param {string} code
|
|
365
|
+
* @param {string} [authorization] Bearer Token
|
|
366
|
+
* @param {*} [options] Override http request option.
|
|
367
|
+
* @throws {RequiredError}
|
|
368
|
+
*/
|
|
369
|
+
getProductDocument: function (productSlug, code, authorization, options) {
|
|
370
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
371
|
+
var localVarAxiosArgs;
|
|
372
|
+
return __generator(this, function (_a) {
|
|
373
|
+
switch (_a.label) {
|
|
374
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getProductDocument(productSlug, code, authorization, options)];
|
|
375
|
+
case 1:
|
|
376
|
+
localVarAxiosArgs = _a.sent();
|
|
377
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
378
|
+
}
|
|
379
|
+
});
|
|
380
|
+
});
|
|
381
|
+
},
|
|
382
|
+
/**
|
|
383
|
+
* Returns a list of product documents you have previously created. The product documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
384
|
+
* @summary List product documents
|
|
385
|
+
* @param {string} productSlug
|
|
386
|
+
* @param {string} [authorization] Bearer Token
|
|
387
|
+
* @param {number} [pageSize] Page size
|
|
388
|
+
* @param {string} [pageToken] Page token
|
|
389
|
+
* @param {string} [filter] List filter
|
|
390
|
+
* @param {string} [search] Search query
|
|
391
|
+
* @param {string} [order] Ordering criteria
|
|
392
|
+
* @param {string} [expand] Extra fields to fetch
|
|
393
|
+
* @param {*} [options] Override http request option.
|
|
394
|
+
* @throws {RequiredError}
|
|
395
|
+
*/
|
|
396
|
+
listProductDocuments: function (productSlug, authorization, pageSize, pageToken, filter, search, order, expand, options) {
|
|
397
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
398
|
+
var localVarAxiosArgs;
|
|
399
|
+
return __generator(this, function (_a) {
|
|
400
|
+
switch (_a.label) {
|
|
401
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listProductDocuments(productSlug, authorization, pageSize, pageToken, filter, search, order, expand, options)];
|
|
402
|
+
case 1:
|
|
403
|
+
localVarAxiosArgs = _a.sent();
|
|
404
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
405
|
+
}
|
|
406
|
+
});
|
|
407
|
+
});
|
|
408
|
+
},
|
|
409
|
+
/**
|
|
410
|
+
* Upload a product document.
|
|
411
|
+
* @summary Create the product document
|
|
412
|
+
* @param {string} productSlug
|
|
413
|
+
* @param {UploadProductDocumentRequestDto} uploadProductDocumentRequestDto
|
|
414
|
+
* @param {string} [authorization] Bearer Token
|
|
415
|
+
* @param {*} [options] Override http request option.
|
|
416
|
+
* @throws {RequiredError}
|
|
417
|
+
*/
|
|
418
|
+
uploadProductDocument: function (productSlug, uploadProductDocumentRequestDto, authorization, options) {
|
|
419
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
420
|
+
var localVarAxiosArgs;
|
|
421
|
+
return __generator(this, function (_a) {
|
|
422
|
+
switch (_a.label) {
|
|
423
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.uploadProductDocument(productSlug, uploadProductDocumentRequestDto, authorization, options)];
|
|
424
|
+
case 1:
|
|
425
|
+
localVarAxiosArgs = _a.sent();
|
|
426
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
427
|
+
}
|
|
428
|
+
});
|
|
429
|
+
});
|
|
430
|
+
},
|
|
431
|
+
};
|
|
432
|
+
};
|
|
433
|
+
exports.ProductDocumentsApiFp = ProductDocumentsApiFp;
|
|
434
|
+
/**
|
|
435
|
+
* ProductDocumentsApi - factory interface
|
|
436
|
+
* @export
|
|
437
|
+
*/
|
|
438
|
+
var ProductDocumentsApiFactory = function (configuration, basePath, axios) {
|
|
439
|
+
var localVarFp = (0, exports.ProductDocumentsApiFp)(configuration);
|
|
440
|
+
return {
|
|
441
|
+
/**
|
|
442
|
+
* Permanently deletes the product document. Supply the unique code that was returned when you created the product document and this will delete it.
|
|
443
|
+
* @summary Delete the product document
|
|
444
|
+
* @param {string} code
|
|
445
|
+
* @param {string} productSlug
|
|
446
|
+
* @param {string} [authorization] Bearer Token
|
|
447
|
+
* @param {*} [options] Override http request option.
|
|
448
|
+
* @throws {RequiredError}
|
|
449
|
+
*/
|
|
450
|
+
deleteProductDocument: function (code, productSlug, authorization, options) {
|
|
451
|
+
return localVarFp.deleteProductDocument(code, productSlug, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
452
|
+
},
|
|
453
|
+
/**
|
|
454
|
+
* Get a product document.
|
|
455
|
+
* @summary Retrieve the product document
|
|
456
|
+
* @param {string} productSlug
|
|
457
|
+
* @param {string} code
|
|
458
|
+
* @param {string} [authorization] Bearer Token
|
|
459
|
+
* @param {*} [options] Override http request option.
|
|
460
|
+
* @throws {RequiredError}
|
|
461
|
+
*/
|
|
462
|
+
getProductDocument: function (productSlug, code, authorization, options) {
|
|
463
|
+
return localVarFp.getProductDocument(productSlug, code, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
464
|
+
},
|
|
465
|
+
/**
|
|
466
|
+
* Returns a list of product documents you have previously created. The product documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
467
|
+
* @summary List product documents
|
|
468
|
+
* @param {string} productSlug
|
|
469
|
+
* @param {string} [authorization] Bearer Token
|
|
470
|
+
* @param {number} [pageSize] Page size
|
|
471
|
+
* @param {string} [pageToken] Page token
|
|
472
|
+
* @param {string} [filter] List filter
|
|
473
|
+
* @param {string} [search] Search query
|
|
474
|
+
* @param {string} [order] Ordering criteria
|
|
475
|
+
* @param {string} [expand] Extra fields to fetch
|
|
476
|
+
* @param {*} [options] Override http request option.
|
|
477
|
+
* @throws {RequiredError}
|
|
478
|
+
*/
|
|
479
|
+
listProductDocuments: function (productSlug, authorization, pageSize, pageToken, filter, search, order, expand, options) {
|
|
480
|
+
return localVarFp.listProductDocuments(productSlug, authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
|
|
481
|
+
},
|
|
482
|
+
/**
|
|
483
|
+
* Upload a product document.
|
|
484
|
+
* @summary Create the product document
|
|
485
|
+
* @param {string} productSlug
|
|
486
|
+
* @param {UploadProductDocumentRequestDto} uploadProductDocumentRequestDto
|
|
487
|
+
* @param {string} [authorization] Bearer Token
|
|
488
|
+
* @param {*} [options] Override http request option.
|
|
489
|
+
* @throws {RequiredError}
|
|
490
|
+
*/
|
|
491
|
+
uploadProductDocument: function (productSlug, uploadProductDocumentRequestDto, authorization, options) {
|
|
492
|
+
return localVarFp.uploadProductDocument(productSlug, uploadProductDocumentRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
493
|
+
},
|
|
494
|
+
};
|
|
495
|
+
};
|
|
496
|
+
exports.ProductDocumentsApiFactory = ProductDocumentsApiFactory;
|
|
497
|
+
/**
|
|
498
|
+
* ProductDocumentsApi - object-oriented interface
|
|
499
|
+
* @export
|
|
500
|
+
* @class ProductDocumentsApi
|
|
501
|
+
* @extends {BaseAPI}
|
|
502
|
+
*/
|
|
503
|
+
var ProductDocumentsApi = /** @class */ (function (_super) {
|
|
504
|
+
__extends(ProductDocumentsApi, _super);
|
|
505
|
+
function ProductDocumentsApi() {
|
|
506
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
507
|
+
}
|
|
508
|
+
/**
|
|
509
|
+
* Permanently deletes the product document. Supply the unique code that was returned when you created the product document and this will delete it.
|
|
510
|
+
* @summary Delete the product document
|
|
511
|
+
* @param {ProductDocumentsApiDeleteProductDocumentRequest} requestParameters Request parameters.
|
|
512
|
+
* @param {*} [options] Override http request option.
|
|
513
|
+
* @throws {RequiredError}
|
|
514
|
+
* @memberof ProductDocumentsApi
|
|
515
|
+
*/
|
|
516
|
+
ProductDocumentsApi.prototype.deleteProductDocument = function (requestParameters, options) {
|
|
517
|
+
var _this = this;
|
|
518
|
+
return (0, exports.ProductDocumentsApiFp)(this.configuration).deleteProductDocument(requestParameters.code, requestParameters.productSlug, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
519
|
+
};
|
|
520
|
+
/**
|
|
521
|
+
* Get a product document.
|
|
522
|
+
* @summary Retrieve the product document
|
|
523
|
+
* @param {ProductDocumentsApiGetProductDocumentRequest} requestParameters Request parameters.
|
|
524
|
+
* @param {*} [options] Override http request option.
|
|
525
|
+
* @throws {RequiredError}
|
|
526
|
+
* @memberof ProductDocumentsApi
|
|
527
|
+
*/
|
|
528
|
+
ProductDocumentsApi.prototype.getProductDocument = function (requestParameters, options) {
|
|
529
|
+
var _this = this;
|
|
530
|
+
return (0, exports.ProductDocumentsApiFp)(this.configuration).getProductDocument(requestParameters.productSlug, requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
531
|
+
};
|
|
532
|
+
/**
|
|
533
|
+
* Returns a list of product documents you have previously created. The product documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
534
|
+
* @summary List product documents
|
|
535
|
+
* @param {ProductDocumentsApiListProductDocumentsRequest} requestParameters Request parameters.
|
|
536
|
+
* @param {*} [options] Override http request option.
|
|
537
|
+
* @throws {RequiredError}
|
|
538
|
+
* @memberof ProductDocumentsApi
|
|
539
|
+
*/
|
|
540
|
+
ProductDocumentsApi.prototype.listProductDocuments = function (requestParameters, options) {
|
|
541
|
+
var _this = this;
|
|
542
|
+
return (0, exports.ProductDocumentsApiFp)(this.configuration).listProductDocuments(requestParameters.productSlug, requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
543
|
+
};
|
|
544
|
+
/**
|
|
545
|
+
* Upload a product document.
|
|
546
|
+
* @summary Create the product document
|
|
547
|
+
* @param {ProductDocumentsApiUploadProductDocumentRequest} requestParameters Request parameters.
|
|
548
|
+
* @param {*} [options] Override http request option.
|
|
549
|
+
* @throws {RequiredError}
|
|
550
|
+
* @memberof ProductDocumentsApi
|
|
551
|
+
*/
|
|
552
|
+
ProductDocumentsApi.prototype.uploadProductDocument = function (requestParameters, options) {
|
|
553
|
+
var _this = this;
|
|
554
|
+
return (0, exports.ProductDocumentsApiFp)(this.configuration).uploadProductDocument(requestParameters.productSlug, requestParameters.uploadProductDocumentRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
555
|
+
};
|
|
556
|
+
return ProductDocumentsApi;
|
|
557
|
+
}(base_1.BaseAPI));
|
|
558
|
+
exports.ProductDocumentsApi = ProductDocumentsApi;
|
package/dist/api.d.ts
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
export * from './api/document-templates-api';
|
|
13
13
|
export * from './api/documents-api';
|
|
14
14
|
export * from './api/layouts-api';
|
|
15
|
+
export * from './api/product-documents-api';
|
|
15
16
|
export * from './api/search-keywords-api';
|
|
16
17
|
export * from './api/searchable-document-owners-api';
|
|
17
18
|
export * from './api/searchable-documents-api';
|
package/dist/api.js
CHANGED
|
@@ -30,6 +30,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
30
30
|
__exportStar(require("./api/document-templates-api"), exports);
|
|
31
31
|
__exportStar(require("./api/documents-api"), exports);
|
|
32
32
|
__exportStar(require("./api/layouts-api"), exports);
|
|
33
|
+
__exportStar(require("./api/product-documents-api"), exports);
|
|
33
34
|
__exportStar(require("./api/search-keywords-api"), exports);
|
|
34
35
|
__exportStar(require("./api/searchable-document-owners-api"), exports);
|
|
35
36
|
__exportStar(require("./api/searchable-documents-api"), exports);
|
|
@@ -130,6 +130,7 @@ export declare const CreateDocumentRequestDtoRequesterEnum: {
|
|
|
130
130
|
readonly Paymentservice: "paymentservice";
|
|
131
131
|
readonly Processmanager: "processmanager";
|
|
132
132
|
readonly Gdvservice: "gdvservice";
|
|
133
|
+
readonly Documentservice: "documentservice";
|
|
133
134
|
};
|
|
134
135
|
export type CreateDocumentRequestDtoRequesterEnum = typeof CreateDocumentRequestDtoRequesterEnum[keyof typeof CreateDocumentRequestDtoRequesterEnum];
|
|
135
136
|
export declare const CreateDocumentRequestDtoContentTypeEnum: {
|
|
@@ -41,7 +41,8 @@ exports.CreateDocumentRequestDtoRequesterEnum = {
|
|
|
41
41
|
Notificationservice: 'notificationservice',
|
|
42
42
|
Paymentservice: 'paymentservice',
|
|
43
43
|
Processmanager: 'processmanager',
|
|
44
|
-
Gdvservice: 'gdvservice'
|
|
44
|
+
Gdvservice: 'gdvservice',
|
|
45
|
+
Documentservice: 'documentservice'
|
|
45
46
|
};
|
|
46
47
|
exports.CreateDocumentRequestDtoContentTypeEnum = {
|
|
47
48
|
Pdf: 'pdf',
|
|
@@ -102,6 +102,7 @@ export declare const CreatePresignedPostRequestDtoRequesterEnum: {
|
|
|
102
102
|
readonly Paymentservice: "paymentservice";
|
|
103
103
|
readonly Processmanager: "processmanager";
|
|
104
104
|
readonly Gdvservice: "gdvservice";
|
|
105
|
+
readonly Documentservice: "documentservice";
|
|
105
106
|
};
|
|
106
107
|
export type CreatePresignedPostRequestDtoRequesterEnum = typeof CreatePresignedPostRequestDtoRequesterEnum[keyof typeof CreatePresignedPostRequestDtoRequesterEnum];
|
|
107
108
|
export declare const CreatePresignedPostRequestDtoContentTypeEnum: {
|
|
@@ -27,7 +27,8 @@ exports.CreatePresignedPostRequestDtoRequesterEnum = {
|
|
|
27
27
|
Notificationservice: 'notificationservice',
|
|
28
28
|
Paymentservice: 'paymentservice',
|
|
29
29
|
Processmanager: 'processmanager',
|
|
30
|
-
Gdvservice: 'gdvservice'
|
|
30
|
+
Gdvservice: 'gdvservice',
|
|
31
|
+
Documentservice: 'documentservice'
|
|
31
32
|
};
|
|
32
33
|
exports.CreatePresignedPostRequestDtoContentTypeEnum = {
|
|
33
34
|
Pdf: 'pdf',
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EMIL DocumentService
|
|
3
|
+
* The EMIL DocumentService API description
|
|
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
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface DeleteProductDocumentRequestDto
|
|
16
|
+
*/
|
|
17
|
+
export interface DeleteProductDocumentRequestDto {
|
|
18
|
+
/**
|
|
19
|
+
* Unique identifier for the object.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof DeleteProductDocumentRequestDto
|
|
22
|
+
*/
|
|
23
|
+
'code': string;
|
|
24
|
+
/**
|
|
25
|
+
* A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof DeleteProductDocumentRequestDto
|
|
28
|
+
*/
|
|
29
|
+
'productSlug': string;
|
|
30
|
+
}
|