@emilgroup/document-sdk 1.12.2 → 1.16.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 (157) hide show
  1. package/README.md +2 -2
  2. package/api/product-documents-api.ts +8 -206
  3. package/dist/api/default-api.d.ts +66 -0
  4. package/dist/api/default-api.js +196 -0
  5. package/dist/api/document-templates-api.d.ts +385 -0
  6. package/dist/api/document-templates-api.js +636 -0
  7. package/dist/api/documents-api.d.ts +488 -0
  8. package/dist/api/documents-api.js +817 -0
  9. package/dist/api/docx-templates-api.d.ts +432 -0
  10. package/dist/api/docx-templates-api.js +722 -0
  11. package/dist/api/layouts-api.d.ts +385 -0
  12. package/dist/api/layouts-api.js +638 -0
  13. package/dist/api/product-documents-api.d.ts +401 -0
  14. package/dist/api/product-documents-api.js +647 -0
  15. package/dist/api/search-keywords-api.d.ts +96 -0
  16. package/dist/api/search-keywords-api.js +225 -0
  17. package/dist/api/searchable-document-owners-api.d.ts +141 -0
  18. package/dist/api/searchable-document-owners-api.js +254 -0
  19. package/dist/api/searchable-documents-api.d.ts +114 -0
  20. package/dist/api/searchable-documents-api.js +239 -0
  21. package/dist/api.d.ts +20 -0
  22. package/dist/api.js +38 -0
  23. package/dist/base.d.ts +74 -0
  24. package/dist/base.js +298 -0
  25. package/dist/common.d.ts +91 -0
  26. package/dist/common.js +276 -0
  27. package/dist/configuration.d.ts +83 -0
  28. package/dist/configuration.js +44 -0
  29. package/dist/index.d.ts +15 -0
  30. package/dist/index.js +36 -0
  31. package/dist/models/create-doc-template-request-dto.d.ts +55 -0
  32. package/dist/models/create-doc-template-request-dto.js +15 -0
  33. package/dist/models/create-doc-template-response-class.d.ts +25 -0
  34. package/dist/models/create-doc-template-response-class.js +15 -0
  35. package/dist/models/create-document-request-dto.d.ts +162 -0
  36. package/dist/models/create-document-request-dto.js +60 -0
  37. package/dist/models/create-document-sync-response-class.d.ts +25 -0
  38. package/dist/models/create-document-sync-response-class.js +15 -0
  39. package/dist/models/create-html-template-dto.d.ts +24 -0
  40. package/dist/models/create-html-template-dto.js +15 -0
  41. package/dist/models/create-layout-request-dto.d.ts +49 -0
  42. package/dist/models/create-layout-request-dto.js +15 -0
  43. package/dist/models/create-layout-response-class.d.ts +25 -0
  44. package/dist/models/create-layout-response-class.js +15 -0
  45. package/dist/models/create-presigned-post-request-dto.d.ts +134 -0
  46. package/dist/models/create-presigned-post-request-dto.js +52 -0
  47. package/dist/models/create-presigned-post-response-class.d.ts +30 -0
  48. package/dist/models/create-presigned-post-response-class.js +15 -0
  49. package/dist/models/delete-layout-request-dto.d.ts +24 -0
  50. package/dist/models/delete-layout-request-dto.js +15 -0
  51. package/dist/models/delete-product-document-request-dto.d.ts +30 -0
  52. package/dist/models/delete-product-document-request-dto.js +15 -0
  53. package/dist/models/delete-request-dto.d.ts +24 -0
  54. package/dist/models/delete-request-dto.js +15 -0
  55. package/dist/models/delete-response-class.d.ts +24 -0
  56. package/dist/models/delete-response-class.js +15 -0
  57. package/dist/models/doc-template-class.d.ts +92 -0
  58. package/dist/models/doc-template-class.js +15 -0
  59. package/dist/models/document-class.d.ts +158 -0
  60. package/dist/models/document-class.js +52 -0
  61. package/dist/models/docx-template-class.d.ts +90 -0
  62. package/dist/models/docx-template-class.js +15 -0
  63. package/dist/models/download-document-request-dto.d.ts +30 -0
  64. package/dist/models/download-document-request-dto.js +15 -0
  65. package/dist/models/get-doc-template-request-dto.d.ts +30 -0
  66. package/dist/models/get-doc-template-request-dto.js +15 -0
  67. package/dist/models/get-doc-template-response-class.d.ts +25 -0
  68. package/dist/models/get-doc-template-response-class.js +15 -0
  69. package/dist/models/get-document-download-url-response-class.d.ts +24 -0
  70. package/dist/models/get-document-download-url-response-class.js +15 -0
  71. package/dist/models/get-docx-template-download-url-response-class.d.ts +24 -0
  72. package/dist/models/get-docx-template-download-url-response-class.js +15 -0
  73. package/dist/models/get-docx-template-response-class.d.ts +25 -0
  74. package/dist/models/get-docx-template-response-class.js +15 -0
  75. package/dist/models/get-layout-request-dto.d.ts +24 -0
  76. package/dist/models/get-layout-request-dto.js +15 -0
  77. package/dist/models/get-layout-response-class.d.ts +25 -0
  78. package/dist/models/get-layout-response-class.js +15 -0
  79. package/dist/models/get-product-document-download-url-response-class.d.ts +24 -0
  80. package/dist/models/get-product-document-download-url-response-class.js +15 -0
  81. package/dist/models/get-product-document-response-class.d.ts +25 -0
  82. package/dist/models/get-product-document-response-class.js +15 -0
  83. package/dist/models/get-signed-s3-key-url-response-class.d.ts +24 -0
  84. package/dist/models/get-signed-s3-key-url-response-class.js +15 -0
  85. package/dist/models/grpc-create-doc-template-request-dto.d.ts +55 -0
  86. package/dist/models/grpc-create-doc-template-request-dto.js +15 -0
  87. package/dist/models/grpc-update-doc-template-request-dto.d.ts +61 -0
  88. package/dist/models/grpc-update-doc-template-request-dto.js +15 -0
  89. package/dist/models/html-template-class.d.ts +66 -0
  90. package/dist/models/html-template-class.js +21 -0
  91. package/dist/models/index.d.ts +60 -0
  92. package/dist/models/index.js +76 -0
  93. package/dist/models/inline-response200.d.ts +54 -0
  94. package/dist/models/inline-response200.js +15 -0
  95. package/dist/models/inline-response503.d.ts +54 -0
  96. package/dist/models/inline-response503.js +15 -0
  97. package/dist/models/layout-class.d.ts +79 -0
  98. package/dist/models/layout-class.js +15 -0
  99. package/dist/models/list-doc-template-request-dto.d.ts +54 -0
  100. package/dist/models/list-doc-template-request-dto.js +15 -0
  101. package/dist/models/list-doc-templates-response-class.d.ts +31 -0
  102. package/dist/models/list-doc-templates-response-class.js +15 -0
  103. package/dist/models/list-documents-response-class.d.ts +31 -0
  104. package/dist/models/list-documents-response-class.js +15 -0
  105. package/dist/models/list-docx-templates-response-class.d.ts +31 -0
  106. package/dist/models/list-docx-templates-response-class.js +15 -0
  107. package/dist/models/list-layouts-response-class.d.ts +31 -0
  108. package/dist/models/list-layouts-response-class.js +15 -0
  109. package/dist/models/list-product-documents-response-class.d.ts +31 -0
  110. package/dist/models/list-product-documents-response-class.js +15 -0
  111. package/dist/models/list-request-dto.d.ts +54 -0
  112. package/dist/models/list-request-dto.js +15 -0
  113. package/dist/models/list-search-keywords-request-dto.d.ts +24 -0
  114. package/dist/models/list-search-keywords-request-dto.js +15 -0
  115. package/dist/models/list-search-keywords-response-class.d.ts +24 -0
  116. package/dist/models/list-search-keywords-response-class.js +15 -0
  117. package/dist/models/list-searchable-document-owners-request-dto.d.ts +31 -0
  118. package/dist/models/list-searchable-document-owners-request-dto.js +22 -0
  119. package/dist/models/list-searchable-document-owners-response-class.d.ts +25 -0
  120. package/dist/models/list-searchable-document-owners-response-class.js +15 -0
  121. package/dist/models/list-searchable-documents-request-dto.d.ts +43 -0
  122. package/dist/models/list-searchable-documents-request-dto.js +22 -0
  123. package/dist/models/list-searchable-documents-response-class.d.ts +31 -0
  124. package/dist/models/list-searchable-documents-response-class.js +15 -0
  125. package/dist/models/product-document-class.d.ts +117 -0
  126. package/dist/models/product-document-class.js +24 -0
  127. package/dist/models/searchable-document-class.d.ts +66 -0
  128. package/dist/models/searchable-document-class.js +15 -0
  129. package/dist/models/searchable-document-owner-class.d.ts +30 -0
  130. package/dist/models/searchable-document-owner-class.js +15 -0
  131. package/dist/models/shared-update-docx-template-request-dto.d.ts +36 -0
  132. package/dist/models/shared-update-docx-template-request-dto.js +15 -0
  133. package/dist/models/update-doc-template-request-dto.d.ts +61 -0
  134. package/dist/models/update-doc-template-request-dto.js +15 -0
  135. package/dist/models/update-doc-template-response-class.d.ts +25 -0
  136. package/dist/models/update-doc-template-response-class.js +15 -0
  137. package/dist/models/update-document-request-dto.d.ts +54 -0
  138. package/dist/models/update-document-request-dto.js +15 -0
  139. package/dist/models/update-document-response-class.d.ts +25 -0
  140. package/dist/models/update-document-response-class.js +15 -0
  141. package/dist/models/update-docx-template-response-class.d.ts +25 -0
  142. package/dist/models/update-docx-template-response-class.js +15 -0
  143. package/dist/models/update-html-template-dto.d.ts +42 -0
  144. package/dist/models/update-html-template-dto.js +21 -0
  145. package/dist/models/update-layout-request-dto.d.ts +55 -0
  146. package/dist/models/update-layout-request-dto.js +15 -0
  147. package/dist/models/update-layout-response-class.d.ts +25 -0
  148. package/dist/models/update-layout-response-class.js +15 -0
  149. package/dist/models/upload-docx-template-request-dto.d.ts +54 -0
  150. package/dist/models/upload-docx-template-request-dto.js +15 -0
  151. package/dist/models/upload-product-document-request-dto.d.ts +75 -0
  152. package/dist/models/upload-product-document-request-dto.js +24 -0
  153. package/models/docx-template-class.ts +1 -1
  154. package/models/inline-response200.ts +6 -6
  155. package/models/inline-response503.ts +6 -6
  156. package/models/product-document-class.ts +1 -1
  157. package/package.json +1 -1
@@ -0,0 +1,647 @@
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
+ * Contact: kontakt@emil.de
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
+ /**
89
+ * ProductDocumentsApi - axios parameter creator
90
+ * @export
91
+ */
92
+ var ProductDocumentsApiAxiosParamCreator = function (configuration) {
93
+ var _this = this;
94
+ return {
95
+ /**
96
+ * Permanently deletes the product document. Supply the unique code that was returned when you created the product document and this will delete it.
97
+ * @summary Delete the product document
98
+ * @param {string} code
99
+ * @param {string} productSlug
100
+ * @param {string} [authorization] Bearer Token
101
+ * @param {*} [options] Override http request option.
102
+ * @throws {RequiredError}
103
+ */
104
+ deleteProductDocument: function (code, productSlug, authorization, options) {
105
+ if (options === void 0) { options = {}; }
106
+ return __awaiter(_this, void 0, void 0, function () {
107
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
108
+ return __generator(this, function (_a) {
109
+ switch (_a.label) {
110
+ case 0:
111
+ // verify required parameter 'code' is not null or undefined
112
+ (0, common_1.assertParamExists)('deleteProductDocument', 'code', code);
113
+ // verify required parameter 'productSlug' is not null or undefined
114
+ (0, common_1.assertParamExists)('deleteProductDocument', 'productSlug', productSlug);
115
+ localVarPath = "/documentservice/v1/documents/product/{productSlug}/{code}"
116
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)))
117
+ .replace("{".concat("productSlug", "}"), encodeURIComponent(String(productSlug)));
118
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
119
+ if (configuration) {
120
+ baseOptions = configuration.baseOptions;
121
+ baseAccessToken = configuration.accessToken;
122
+ }
123
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
124
+ localVarHeaderParameter = {};
125
+ localVarQueryParameter = {};
126
+ // authentication bearer required
127
+ // http bearer authentication required
128
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
129
+ case 1:
130
+ // authentication bearer required
131
+ // http bearer authentication required
132
+ _a.sent();
133
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
134
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
135
+ }
136
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
137
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
138
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
139
+ return [2 /*return*/, {
140
+ url: (0, common_1.toPathString)(localVarUrlObj),
141
+ options: localVarRequestOptions,
142
+ }];
143
+ }
144
+ });
145
+ });
146
+ },
147
+ /**
148
+ * Get a pre-signed download url for the given product document.
149
+ * @summary Get pre-signed url for downloading product document
150
+ * @param {string} productSlug
151
+ * @param {string} code
152
+ * @param {string} [authorization] Bearer Token
153
+ * @param {*} [options] Override http request option.
154
+ * @throws {RequiredError}
155
+ */
156
+ downloadProductDocument: function (productSlug, code, authorization, options) {
157
+ if (options === void 0) { options = {}; }
158
+ return __awaiter(_this, void 0, void 0, function () {
159
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
160
+ return __generator(this, function (_a) {
161
+ switch (_a.label) {
162
+ case 0:
163
+ // verify required parameter 'productSlug' is not null or undefined
164
+ (0, common_1.assertParamExists)('downloadProductDocument', 'productSlug', productSlug);
165
+ // verify required parameter 'code' is not null or undefined
166
+ (0, common_1.assertParamExists)('downloadProductDocument', 'code', code);
167
+ localVarPath = "/documentservice/v1/documents/product/{productSlug}/{code}/download-url"
168
+ .replace("{".concat("productSlug", "}"), encodeURIComponent(String(productSlug)))
169
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
170
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
171
+ if (configuration) {
172
+ baseOptions = configuration.baseOptions;
173
+ baseAccessToken = configuration.accessToken;
174
+ }
175
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
176
+ localVarHeaderParameter = {};
177
+ localVarQueryParameter = {};
178
+ // authentication bearer required
179
+ // http bearer authentication required
180
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
181
+ case 1:
182
+ // authentication bearer required
183
+ // http bearer authentication required
184
+ _a.sent();
185
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
186
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
187
+ }
188
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
189
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
190
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
191
+ return [2 /*return*/, {
192
+ url: (0, common_1.toPathString)(localVarUrlObj),
193
+ options: localVarRequestOptions,
194
+ }];
195
+ }
196
+ });
197
+ });
198
+ },
199
+ /**
200
+ * Get a product document.
201
+ * @summary Retrieve the product document
202
+ * @param {string} productSlug
203
+ * @param {string} code
204
+ * @param {string} [authorization] Bearer Token
205
+ * @param {*} [options] Override http request option.
206
+ * @throws {RequiredError}
207
+ */
208
+ getProductDocument: function (productSlug, code, authorization, options) {
209
+ if (options === void 0) { options = {}; }
210
+ return __awaiter(_this, void 0, void 0, function () {
211
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
212
+ return __generator(this, function (_a) {
213
+ switch (_a.label) {
214
+ case 0:
215
+ // verify required parameter 'productSlug' is not null or undefined
216
+ (0, common_1.assertParamExists)('getProductDocument', 'productSlug', productSlug);
217
+ // verify required parameter 'code' is not null or undefined
218
+ (0, common_1.assertParamExists)('getProductDocument', 'code', code);
219
+ localVarPath = "/documentservice/v1/documents/product/{productSlug}/{code}"
220
+ .replace("{".concat("productSlug", "}"), encodeURIComponent(String(productSlug)))
221
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
222
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
223
+ if (configuration) {
224
+ baseOptions = configuration.baseOptions;
225
+ baseAccessToken = configuration.accessToken;
226
+ }
227
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
228
+ localVarHeaderParameter = {};
229
+ localVarQueryParameter = {};
230
+ // authentication bearer required
231
+ // http bearer authentication required
232
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
233
+ case 1:
234
+ // authentication bearer required
235
+ // http bearer authentication required
236
+ _a.sent();
237
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
238
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
239
+ }
240
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
241
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
242
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
243
+ return [2 /*return*/, {
244
+ url: (0, common_1.toPathString)(localVarUrlObj),
245
+ options: localVarRequestOptions,
246
+ }];
247
+ }
248
+ });
249
+ });
250
+ },
251
+ /**
252
+ * 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.
253
+ * @summary List product documents
254
+ * @param {string} [authorization] Bearer Token
255
+ * @param {number} [pageSize] Page size
256
+ * @param {string} [pageToken] Page token
257
+ * @param {string} [filter] List filter
258
+ * @param {string} [search] Search query
259
+ * @param {string} [order] Ordering criteria
260
+ * @param {string} [expand] Extra fields to fetch
261
+ * @param {*} [options] Override http request option.
262
+ * @throws {RequiredError}
263
+ */
264
+ listProductDocuments: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
265
+ if (options === void 0) { options = {}; }
266
+ return __awaiter(_this, void 0, void 0, function () {
267
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
268
+ return __generator(this, function (_a) {
269
+ switch (_a.label) {
270
+ case 0:
271
+ localVarPath = "/documentservice/v1/documents/product";
272
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
273
+ if (configuration) {
274
+ baseOptions = configuration.baseOptions;
275
+ baseAccessToken = configuration.accessToken;
276
+ }
277
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
278
+ localVarHeaderParameter = {};
279
+ localVarQueryParameter = {};
280
+ // authentication bearer required
281
+ // http bearer authentication required
282
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
283
+ case 1:
284
+ // authentication bearer required
285
+ // http bearer authentication required
286
+ _a.sent();
287
+ if (pageSize !== undefined) {
288
+ localVarQueryParameter['pageSize'] = pageSize;
289
+ }
290
+ if (pageToken !== undefined) {
291
+ localVarQueryParameter['pageToken'] = pageToken;
292
+ }
293
+ if (filter !== undefined) {
294
+ localVarQueryParameter['filter'] = filter;
295
+ }
296
+ if (search !== undefined) {
297
+ localVarQueryParameter['search'] = search;
298
+ }
299
+ if (order !== undefined) {
300
+ localVarQueryParameter['order'] = order;
301
+ }
302
+ if (expand !== undefined) {
303
+ localVarQueryParameter['expand'] = expand;
304
+ }
305
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
306
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
307
+ }
308
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
309
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
310
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
311
+ return [2 /*return*/, {
312
+ url: (0, common_1.toPathString)(localVarUrlObj),
313
+ options: localVarRequestOptions,
314
+ }];
315
+ }
316
+ });
317
+ });
318
+ },
319
+ /**
320
+ * Upload a product document.
321
+ * @summary Create the product document
322
+ * @param {string} productSlug
323
+ * @param {UploadProductDocumentRequestDto} uploadProductDocumentRequestDto
324
+ * @param {string} [authorization] Bearer Token
325
+ * @param {*} [options] Override http request option.
326
+ * @throws {RequiredError}
327
+ */
328
+ uploadProductDocument: function (productSlug, uploadProductDocumentRequestDto, authorization, options) {
329
+ if (options === void 0) { options = {}; }
330
+ return __awaiter(_this, void 0, void 0, function () {
331
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
332
+ return __generator(this, function (_a) {
333
+ switch (_a.label) {
334
+ case 0:
335
+ // verify required parameter 'productSlug' is not null or undefined
336
+ (0, common_1.assertParamExists)('uploadProductDocument', 'productSlug', productSlug);
337
+ // verify required parameter 'uploadProductDocumentRequestDto' is not null or undefined
338
+ (0, common_1.assertParamExists)('uploadProductDocument', 'uploadProductDocumentRequestDto', uploadProductDocumentRequestDto);
339
+ localVarPath = "/documentservice/v1/documents/product/{productSlug}"
340
+ .replace("{".concat("productSlug", "}"), encodeURIComponent(String(productSlug)));
341
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
342
+ if (configuration) {
343
+ baseOptions = configuration.baseOptions;
344
+ baseAccessToken = configuration.accessToken;
345
+ }
346
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
347
+ localVarHeaderParameter = {};
348
+ localVarQueryParameter = {};
349
+ // authentication bearer required
350
+ // http bearer authentication required
351
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
352
+ case 1:
353
+ // authentication bearer required
354
+ // http bearer authentication required
355
+ _a.sent();
356
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
357
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
358
+ }
359
+ localVarHeaderParameter['Content-Type'] = 'application/json';
360
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
361
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
362
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
363
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(uploadProductDocumentRequestDto, localVarRequestOptions, configuration);
364
+ return [2 /*return*/, {
365
+ url: (0, common_1.toPathString)(localVarUrlObj),
366
+ options: localVarRequestOptions,
367
+ }];
368
+ }
369
+ });
370
+ });
371
+ },
372
+ };
373
+ };
374
+ exports.ProductDocumentsApiAxiosParamCreator = ProductDocumentsApiAxiosParamCreator;
375
+ /**
376
+ * ProductDocumentsApi - functional programming interface
377
+ * @export
378
+ */
379
+ var ProductDocumentsApiFp = function (configuration) {
380
+ var localVarAxiosParamCreator = (0, exports.ProductDocumentsApiAxiosParamCreator)(configuration);
381
+ return {
382
+ /**
383
+ * Permanently deletes the product document. Supply the unique code that was returned when you created the product document and this will delete it.
384
+ * @summary Delete the product document
385
+ * @param {string} code
386
+ * @param {string} productSlug
387
+ * @param {string} [authorization] Bearer Token
388
+ * @param {*} [options] Override http request option.
389
+ * @throws {RequiredError}
390
+ */
391
+ deleteProductDocument: function (code, productSlug, authorization, options) {
392
+ return __awaiter(this, void 0, void 0, function () {
393
+ var localVarAxiosArgs;
394
+ return __generator(this, function (_a) {
395
+ switch (_a.label) {
396
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteProductDocument(code, productSlug, authorization, options)];
397
+ case 1:
398
+ localVarAxiosArgs = _a.sent();
399
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
400
+ }
401
+ });
402
+ });
403
+ },
404
+ /**
405
+ * Get a pre-signed download url for the given product document.
406
+ * @summary Get pre-signed url for downloading product document
407
+ * @param {string} productSlug
408
+ * @param {string} code
409
+ * @param {string} [authorization] Bearer Token
410
+ * @param {*} [options] Override http request option.
411
+ * @throws {RequiredError}
412
+ */
413
+ downloadProductDocument: function (productSlug, code, authorization, options) {
414
+ return __awaiter(this, void 0, void 0, function () {
415
+ var localVarAxiosArgs;
416
+ return __generator(this, function (_a) {
417
+ switch (_a.label) {
418
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.downloadProductDocument(productSlug, code, authorization, options)];
419
+ case 1:
420
+ localVarAxiosArgs = _a.sent();
421
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
422
+ }
423
+ });
424
+ });
425
+ },
426
+ /**
427
+ * Get a product document.
428
+ * @summary Retrieve the product document
429
+ * @param {string} productSlug
430
+ * @param {string} code
431
+ * @param {string} [authorization] Bearer Token
432
+ * @param {*} [options] Override http request option.
433
+ * @throws {RequiredError}
434
+ */
435
+ getProductDocument: function (productSlug, code, authorization, options) {
436
+ return __awaiter(this, void 0, void 0, function () {
437
+ var localVarAxiosArgs;
438
+ return __generator(this, function (_a) {
439
+ switch (_a.label) {
440
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getProductDocument(productSlug, code, authorization, options)];
441
+ case 1:
442
+ localVarAxiosArgs = _a.sent();
443
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
444
+ }
445
+ });
446
+ });
447
+ },
448
+ /**
449
+ * 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.
450
+ * @summary List product documents
451
+ * @param {string} [authorization] Bearer Token
452
+ * @param {number} [pageSize] Page size
453
+ * @param {string} [pageToken] Page token
454
+ * @param {string} [filter] List filter
455
+ * @param {string} [search] Search query
456
+ * @param {string} [order] Ordering criteria
457
+ * @param {string} [expand] Extra fields to fetch
458
+ * @param {*} [options] Override http request option.
459
+ * @throws {RequiredError}
460
+ */
461
+ listProductDocuments: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
462
+ return __awaiter(this, void 0, void 0, function () {
463
+ var localVarAxiosArgs;
464
+ return __generator(this, function (_a) {
465
+ switch (_a.label) {
466
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listProductDocuments(authorization, pageSize, pageToken, filter, search, order, expand, options)];
467
+ case 1:
468
+ localVarAxiosArgs = _a.sent();
469
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
470
+ }
471
+ });
472
+ });
473
+ },
474
+ /**
475
+ * Upload a product document.
476
+ * @summary Create the product document
477
+ * @param {string} productSlug
478
+ * @param {UploadProductDocumentRequestDto} uploadProductDocumentRequestDto
479
+ * @param {string} [authorization] Bearer Token
480
+ * @param {*} [options] Override http request option.
481
+ * @throws {RequiredError}
482
+ */
483
+ uploadProductDocument: function (productSlug, uploadProductDocumentRequestDto, authorization, options) {
484
+ return __awaiter(this, void 0, void 0, function () {
485
+ var localVarAxiosArgs;
486
+ return __generator(this, function (_a) {
487
+ switch (_a.label) {
488
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.uploadProductDocument(productSlug, uploadProductDocumentRequestDto, authorization, options)];
489
+ case 1:
490
+ localVarAxiosArgs = _a.sent();
491
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
492
+ }
493
+ });
494
+ });
495
+ },
496
+ };
497
+ };
498
+ exports.ProductDocumentsApiFp = ProductDocumentsApiFp;
499
+ /**
500
+ * ProductDocumentsApi - factory interface
501
+ * @export
502
+ */
503
+ var ProductDocumentsApiFactory = function (configuration, basePath, axios) {
504
+ var localVarFp = (0, exports.ProductDocumentsApiFp)(configuration);
505
+ return {
506
+ /**
507
+ * Permanently deletes the product document. Supply the unique code that was returned when you created the product document and this will delete it.
508
+ * @summary Delete the product document
509
+ * @param {string} code
510
+ * @param {string} productSlug
511
+ * @param {string} [authorization] Bearer Token
512
+ * @param {*} [options] Override http request option.
513
+ * @throws {RequiredError}
514
+ */
515
+ deleteProductDocument: function (code, productSlug, authorization, options) {
516
+ return localVarFp.deleteProductDocument(code, productSlug, authorization, options).then(function (request) { return request(axios, basePath); });
517
+ },
518
+ /**
519
+ * Get a pre-signed download url for the given product document.
520
+ * @summary Get pre-signed url for downloading product document
521
+ * @param {string} productSlug
522
+ * @param {string} code
523
+ * @param {string} [authorization] Bearer Token
524
+ * @param {*} [options] Override http request option.
525
+ * @throws {RequiredError}
526
+ */
527
+ downloadProductDocument: function (productSlug, code, authorization, options) {
528
+ return localVarFp.downloadProductDocument(productSlug, code, authorization, options).then(function (request) { return request(axios, basePath); });
529
+ },
530
+ /**
531
+ * Get a product document.
532
+ * @summary Retrieve the product document
533
+ * @param {string} productSlug
534
+ * @param {string} code
535
+ * @param {string} [authorization] Bearer Token
536
+ * @param {*} [options] Override http request option.
537
+ * @throws {RequiredError}
538
+ */
539
+ getProductDocument: function (productSlug, code, authorization, options) {
540
+ return localVarFp.getProductDocument(productSlug, code, authorization, options).then(function (request) { return request(axios, basePath); });
541
+ },
542
+ /**
543
+ * 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.
544
+ * @summary List product documents
545
+ * @param {string} [authorization] Bearer Token
546
+ * @param {number} [pageSize] Page size
547
+ * @param {string} [pageToken] Page token
548
+ * @param {string} [filter] List filter
549
+ * @param {string} [search] Search query
550
+ * @param {string} [order] Ordering criteria
551
+ * @param {string} [expand] Extra fields to fetch
552
+ * @param {*} [options] Override http request option.
553
+ * @throws {RequiredError}
554
+ */
555
+ listProductDocuments: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
556
+ return localVarFp.listProductDocuments(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
557
+ },
558
+ /**
559
+ * Upload a product document.
560
+ * @summary Create the product document
561
+ * @param {string} productSlug
562
+ * @param {UploadProductDocumentRequestDto} uploadProductDocumentRequestDto
563
+ * @param {string} [authorization] Bearer Token
564
+ * @param {*} [options] Override http request option.
565
+ * @throws {RequiredError}
566
+ */
567
+ uploadProductDocument: function (productSlug, uploadProductDocumentRequestDto, authorization, options) {
568
+ return localVarFp.uploadProductDocument(productSlug, uploadProductDocumentRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
569
+ },
570
+ };
571
+ };
572
+ exports.ProductDocumentsApiFactory = ProductDocumentsApiFactory;
573
+ /**
574
+ * ProductDocumentsApi - object-oriented interface
575
+ * @export
576
+ * @class ProductDocumentsApi
577
+ * @extends {BaseAPI}
578
+ */
579
+ var ProductDocumentsApi = /** @class */ (function (_super) {
580
+ __extends(ProductDocumentsApi, _super);
581
+ function ProductDocumentsApi() {
582
+ return _super !== null && _super.apply(this, arguments) || this;
583
+ }
584
+ /**
585
+ * Permanently deletes the product document. Supply the unique code that was returned when you created the product document and this will delete it.
586
+ * @summary Delete the product document
587
+ * @param {ProductDocumentsApiDeleteProductDocumentRequest} requestParameters Request parameters.
588
+ * @param {*} [options] Override http request option.
589
+ * @throws {RequiredError}
590
+ * @memberof ProductDocumentsApi
591
+ */
592
+ ProductDocumentsApi.prototype.deleteProductDocument = function (requestParameters, options) {
593
+ var _this = this;
594
+ return (0, exports.ProductDocumentsApiFp)(this.configuration).deleteProductDocument(requestParameters.code, requestParameters.productSlug, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
595
+ };
596
+ /**
597
+ * Get a pre-signed download url for the given product document.
598
+ * @summary Get pre-signed url for downloading product document
599
+ * @param {ProductDocumentsApiDownloadProductDocumentRequest} requestParameters Request parameters.
600
+ * @param {*} [options] Override http request option.
601
+ * @throws {RequiredError}
602
+ * @memberof ProductDocumentsApi
603
+ */
604
+ ProductDocumentsApi.prototype.downloadProductDocument = function (requestParameters, options) {
605
+ var _this = this;
606
+ return (0, exports.ProductDocumentsApiFp)(this.configuration).downloadProductDocument(requestParameters.productSlug, requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
607
+ };
608
+ /**
609
+ * Get a product document.
610
+ * @summary Retrieve the product document
611
+ * @param {ProductDocumentsApiGetProductDocumentRequest} requestParameters Request parameters.
612
+ * @param {*} [options] Override http request option.
613
+ * @throws {RequiredError}
614
+ * @memberof ProductDocumentsApi
615
+ */
616
+ ProductDocumentsApi.prototype.getProductDocument = function (requestParameters, options) {
617
+ var _this = this;
618
+ return (0, exports.ProductDocumentsApiFp)(this.configuration).getProductDocument(requestParameters.productSlug, requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
619
+ };
620
+ /**
621
+ * 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.
622
+ * @summary List product documents
623
+ * @param {ProductDocumentsApiListProductDocumentsRequest} requestParameters Request parameters.
624
+ * @param {*} [options] Override http request option.
625
+ * @throws {RequiredError}
626
+ * @memberof ProductDocumentsApi
627
+ */
628
+ ProductDocumentsApi.prototype.listProductDocuments = function (requestParameters, options) {
629
+ var _this = this;
630
+ if (requestParameters === void 0) { requestParameters = {}; }
631
+ return (0, exports.ProductDocumentsApiFp)(this.configuration).listProductDocuments(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
632
+ };
633
+ /**
634
+ * Upload a product document.
635
+ * @summary Create the product document
636
+ * @param {ProductDocumentsApiUploadProductDocumentRequest} requestParameters Request parameters.
637
+ * @param {*} [options] Override http request option.
638
+ * @throws {RequiredError}
639
+ * @memberof ProductDocumentsApi
640
+ */
641
+ ProductDocumentsApi.prototype.uploadProductDocument = function (requestParameters, options) {
642
+ var _this = this;
643
+ return (0, exports.ProductDocumentsApiFp)(this.configuration).uploadProductDocument(requestParameters.productSlug, requestParameters.uploadProductDocumentRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
644
+ };
645
+ return ProductDocumentsApi;
646
+ }(base_1.BaseAPI));
647
+ exports.ProductDocumentsApi = ProductDocumentsApi;