@emilgroup/document-sdk 1.0.0 → 1.2.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 (186) hide show
  1. package/.openapi-generator/FILES +7 -0
  2. package/README.md +2 -2
  3. package/api/document-templates-api.ts +1 -1
  4. package/api/documents-api.ts +1 -1
  5. package/api/layouts-api.ts +1 -1
  6. package/api/product-documents-api.ts +599 -0
  7. package/api/search-keywords-api.ts +1 -1
  8. package/api/searchable-document-owners-api.ts +1 -1
  9. package/api/searchable-documents-api.ts +21 -7
  10. package/api.ts +3 -1
  11. package/base.ts +1 -1
  12. package/common.ts +2 -2
  13. package/configuration.ts +1 -1
  14. package/dist/api/document-templates-api.d.ts +1 -1
  15. package/dist/api/document-templates-api.js +1 -1
  16. package/dist/api/documents-api.d.ts +1 -1
  17. package/dist/api/documents-api.js +1 -1
  18. package/dist/api/layouts-api.d.ts +1 -1
  19. package/dist/api/layouts-api.js +1 -1
  20. package/dist/api/product-documents-api.d.ts +345 -0
  21. package/dist/api/product-documents-api.js +558 -0
  22. package/dist/api/search-keywords-api.d.ts +1 -1
  23. package/dist/api/search-keywords-api.js +1 -1
  24. package/dist/api/searchable-document-owners-api.d.ts +1 -1
  25. package/dist/api/searchable-document-owners-api.js +1 -1
  26. package/dist/api/searchable-documents-api.d.ts +13 -4
  27. package/dist/api/searchable-documents-api.js +13 -7
  28. package/dist/api.d.ts +2 -1
  29. package/dist/api.js +2 -1
  30. package/dist/base.d.ts +1 -1
  31. package/dist/base.js +1 -1
  32. package/dist/common.d.ts +2 -2
  33. package/dist/common.js +1 -1
  34. package/dist/configuration.d.ts +1 -1
  35. package/dist/configuration.js +1 -1
  36. package/dist/index.d.ts +1 -1
  37. package/dist/index.js +1 -1
  38. package/dist/models/create-doc-template-request-dto.d.ts +1 -1
  39. package/dist/models/create-doc-template-request-dto.js +1 -1
  40. package/dist/models/create-doc-template-response-class.d.ts +1 -1
  41. package/dist/models/create-doc-template-response-class.js +1 -1
  42. package/dist/models/create-document-request-dto.d.ts +2 -1
  43. package/dist/models/create-document-request-dto.js +3 -2
  44. package/dist/models/create-document-sync-response-class.d.ts +1 -1
  45. package/dist/models/create-document-sync-response-class.js +1 -1
  46. package/dist/models/create-html-template-dto.d.ts +1 -1
  47. package/dist/models/create-html-template-dto.js +1 -1
  48. package/dist/models/create-layout-request-dto.d.ts +1 -1
  49. package/dist/models/create-layout-request-dto.js +1 -1
  50. package/dist/models/create-layout-response-class.d.ts +1 -1
  51. package/dist/models/create-layout-response-class.js +1 -1
  52. package/dist/models/create-presigned-post-request-dto.d.ts +2 -1
  53. package/dist/models/create-presigned-post-request-dto.js +3 -2
  54. package/dist/models/create-presigned-post-response-class.d.ts +1 -1
  55. package/dist/models/create-presigned-post-response-class.js +1 -1
  56. package/dist/models/delete-layout-request-dto.d.ts +1 -1
  57. package/dist/models/delete-layout-request-dto.js +1 -1
  58. package/dist/models/delete-product-document-request-dto.d.ts +30 -0
  59. package/dist/models/delete-product-document-request-dto.js +15 -0
  60. package/dist/models/delete-request-dto.d.ts +1 -1
  61. package/dist/models/delete-request-dto.js +1 -1
  62. package/dist/models/delete-response-class.d.ts +1 -1
  63. package/dist/models/delete-response-class.js +1 -1
  64. package/dist/models/doc-template-class.d.ts +1 -1
  65. package/dist/models/doc-template-class.js +1 -1
  66. package/dist/models/document-class.d.ts +2 -1
  67. package/dist/models/document-class.js +3 -2
  68. package/dist/models/download-document-request-dto.d.ts +1 -1
  69. package/dist/models/download-document-request-dto.js +1 -1
  70. package/dist/models/get-doc-template-request-dto.d.ts +1 -1
  71. package/dist/models/get-doc-template-request-dto.js +1 -1
  72. package/dist/models/get-doc-template-response-class.d.ts +1 -1
  73. package/dist/models/get-doc-template-response-class.js +1 -1
  74. package/dist/models/get-document-download-url-response-class.d.ts +1 -1
  75. package/dist/models/get-document-download-url-response-class.js +1 -1
  76. package/dist/models/get-layout-request-dto.d.ts +1 -1
  77. package/dist/models/get-layout-request-dto.js +1 -1
  78. package/dist/models/get-layout-response-class.d.ts +1 -1
  79. package/dist/models/get-layout-response-class.js +1 -1
  80. package/dist/models/get-product-document-response-class.d.ts +25 -0
  81. package/dist/models/get-product-document-response-class.js +15 -0
  82. package/dist/models/get-signed-s3-key-url-response-class.d.ts +1 -1
  83. package/dist/models/get-signed-s3-key-url-response-class.js +1 -1
  84. package/dist/models/html-template-class.d.ts +1 -1
  85. package/dist/models/html-template-class.js +1 -1
  86. package/dist/models/index.d.ts +6 -0
  87. package/dist/models/index.js +6 -0
  88. package/dist/models/layout-class.d.ts +1 -1
  89. package/dist/models/layout-class.js +1 -1
  90. package/dist/models/list-doc-template-request-dto.d.ts +1 -1
  91. package/dist/models/list-doc-template-request-dto.js +1 -1
  92. package/dist/models/list-doc-templates-response-class.d.ts +1 -1
  93. package/dist/models/list-doc-templates-response-class.js +1 -1
  94. package/dist/models/list-documents-response-class.d.ts +1 -1
  95. package/dist/models/list-documents-response-class.js +1 -1
  96. package/dist/models/list-layouts-response-class.d.ts +1 -1
  97. package/dist/models/list-layouts-response-class.js +1 -1
  98. package/dist/models/list-product-documents-response-class.d.ts +31 -0
  99. package/dist/models/list-product-documents-response-class.js +15 -0
  100. package/dist/models/list-request-dto.d.ts +1 -1
  101. package/dist/models/list-request-dto.js +1 -1
  102. package/dist/models/list-search-keywords-request-dto.d.ts +1 -1
  103. package/dist/models/list-search-keywords-request-dto.js +1 -1
  104. package/dist/models/list-search-keywords-response-class.d.ts +1 -1
  105. package/dist/models/list-search-keywords-response-class.js +1 -1
  106. package/dist/models/list-searchable-document-owners-request-dto.d.ts +31 -0
  107. package/dist/models/list-searchable-document-owners-request-dto.js +22 -0
  108. package/dist/models/list-searchable-document-owners-response-class.d.ts +1 -1
  109. package/dist/models/list-searchable-document-owners-response-class.js +1 -1
  110. package/dist/models/list-searchable-documents-request-dto.d.ts +14 -1
  111. package/dist/models/list-searchable-documents-request-dto.js +8 -1
  112. package/dist/models/list-searchable-documents-response-class.d.ts +1 -1
  113. package/dist/models/list-searchable-documents-response-class.js +1 -1
  114. package/dist/models/product-document-class.d.ts +99 -0
  115. package/dist/models/product-document-class.js +36 -0
  116. package/dist/models/searchable-document-class.d.ts +1 -1
  117. package/dist/models/searchable-document-class.js +1 -1
  118. package/dist/models/searchable-document-owner-class.d.ts +1 -1
  119. package/dist/models/searchable-document-owner-class.js +1 -1
  120. package/dist/models/update-doc-template-request-dto.d.ts +1 -1
  121. package/dist/models/update-doc-template-request-dto.js +1 -1
  122. package/dist/models/update-doc-template-response-class.d.ts +1 -1
  123. package/dist/models/update-doc-template-response-class.js +1 -1
  124. package/dist/models/update-document-request-dto.d.ts +1 -1
  125. package/dist/models/update-document-request-dto.js +1 -1
  126. package/dist/models/update-document-response-class.d.ts +1 -1
  127. package/dist/models/update-document-response-class.js +1 -1
  128. package/dist/models/update-html-template-dto.d.ts +1 -1
  129. package/dist/models/update-html-template-dto.js +1 -1
  130. package/dist/models/update-layout-request-dto.d.ts +1 -1
  131. package/dist/models/update-layout-request-dto.js +1 -1
  132. package/dist/models/update-layout-response-class.d.ts +1 -1
  133. package/dist/models/update-layout-response-class.js +1 -1
  134. package/dist/models/upload-product-document-request-dto.d.ts +63 -0
  135. package/dist/models/upload-product-document-request-dto.js +24 -0
  136. package/index.ts +1 -1
  137. package/models/create-doc-template-request-dto.ts +1 -1
  138. package/models/create-doc-template-response-class.ts +1 -1
  139. package/models/create-document-request-dto.ts +3 -2
  140. package/models/create-document-sync-response-class.ts +1 -1
  141. package/models/create-html-template-dto.ts +1 -1
  142. package/models/create-layout-request-dto.ts +1 -1
  143. package/models/create-layout-response-class.ts +1 -1
  144. package/models/create-presigned-post-request-dto.ts +3 -2
  145. package/models/create-presigned-post-response-class.ts +1 -1
  146. package/models/delete-layout-request-dto.ts +1 -1
  147. package/models/delete-product-document-request-dto.ts +36 -0
  148. package/models/delete-request-dto.ts +1 -1
  149. package/models/delete-response-class.ts +1 -1
  150. package/models/doc-template-class.ts +1 -1
  151. package/models/document-class.ts +3 -2
  152. package/models/download-document-request-dto.ts +1 -1
  153. package/models/get-doc-template-request-dto.ts +1 -1
  154. package/models/get-doc-template-response-class.ts +1 -1
  155. package/models/get-document-download-url-response-class.ts +1 -1
  156. package/models/get-layout-request-dto.ts +1 -1
  157. package/models/get-layout-response-class.ts +1 -1
  158. package/models/get-product-document-response-class.ts +31 -0
  159. package/models/get-signed-s3-key-url-response-class.ts +1 -1
  160. package/models/html-template-class.ts +1 -1
  161. package/models/index.ts +6 -0
  162. package/models/layout-class.ts +1 -1
  163. package/models/list-doc-template-request-dto.ts +1 -1
  164. package/models/list-doc-templates-response-class.ts +1 -1
  165. package/models/list-documents-response-class.ts +1 -1
  166. package/models/list-layouts-response-class.ts +1 -1
  167. package/models/list-product-documents-response-class.ts +37 -0
  168. package/models/list-request-dto.ts +1 -1
  169. package/models/list-search-keywords-request-dto.ts +1 -1
  170. package/models/list-search-keywords-response-class.ts +1 -1
  171. package/models/list-searchable-document-owners-request-dto.ts +40 -0
  172. package/models/list-searchable-document-owners-response-class.ts +1 -1
  173. package/models/list-searchable-documents-request-dto.ts +17 -1
  174. package/models/list-searchable-documents-response-class.ts +1 -1
  175. package/models/product-document-class.ts +108 -0
  176. package/models/searchable-document-class.ts +1 -1
  177. package/models/searchable-document-owner-class.ts +1 -1
  178. package/models/update-doc-template-request-dto.ts +1 -1
  179. package/models/update-doc-template-response-class.ts +1 -1
  180. package/models/update-document-request-dto.ts +1 -1
  181. package/models/update-document-response-class.ts +1 -1
  182. package/models/update-html-template-dto.ts +1 -1
  183. package/models/update-layout-request-dto.ts +1 -1
  184. package/models/update-layout-response-class.ts +1 -1
  185. package/models/upload-product-document-request-dto.ts +72 -0
  186. 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
+ * 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
+ // 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;
@@ -3,7 +3,7 @@
3
3
  * The EMIL DocumentService API description
4
4
  *
5
5
  * The version of the OpenAPI document: 1.0
6
- *
6
+ * Contact: kontakt@emil.de
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
9
  * https://openapi-generator.tech
@@ -6,7 +6,7 @@
6
6
  * The EMIL DocumentService API description
7
7
  *
8
8
  * The version of the OpenAPI document: 1.0
9
- *
9
+ * Contact: kontakt@emil.de
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
12
  * https://openapi-generator.tech
@@ -3,7 +3,7 @@
3
3
  * The EMIL DocumentService API description
4
4
  *
5
5
  * The version of the OpenAPI document: 1.0
6
- *
6
+ * Contact: kontakt@emil.de
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
9
  * https://openapi-generator.tech
@@ -6,7 +6,7 @@
6
6
  * The EMIL DocumentService API description
7
7
  *
8
8
  * The version of the OpenAPI document: 1.0
9
- *
9
+ * Contact: kontakt@emil.de
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
12
  * https://openapi-generator.tech
@@ -3,7 +3,7 @@
3
3
  * The EMIL DocumentService API description
4
4
  *
5
5
  * The version of the OpenAPI document: 1.0
6
- *
6
+ * Contact: kontakt@emil.de
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
9
  * https://openapi-generator.tech
@@ -24,10 +24,11 @@ export declare const SearchableDocumentsApiAxiosParamCreator: (configuration?: C
24
24
  * @param {string} searchText Text to search in the documents.
25
25
  * @param {string} ownerIds List of searched document owner IDs separated with | (search in all documents if an \&#39;*\&#39; list provided).
26
26
  * @param {string} [authorization] Bearer Token
27
+ * @param {'car' | 'homeowner' | 'household' | 'privateLiability'} [product] PBM product the documents belongs to.
27
28
  * @param {*} [options] Override http request option.
28
29
  * @throws {RequiredError}
29
30
  */
30
- listSearchableDocuments: (searchText: string, ownerIds: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
31
+ listSearchableDocuments: (searchText: string, ownerIds: string, authorization?: string, product?: 'car' | 'homeowner' | 'household' | 'privateLiability', options?: AxiosRequestConfig) => Promise<RequestArgs>;
31
32
  };
32
33
  /**
33
34
  * SearchableDocumentsApi - functional programming interface
@@ -40,10 +41,11 @@ export declare const SearchableDocumentsApiFp: (configuration?: Configuration) =
40
41
  * @param {string} searchText Text to search in the documents.
41
42
  * @param {string} ownerIds List of searched document owner IDs separated with | (search in all documents if an \&#39;*\&#39; list provided).
42
43
  * @param {string} [authorization] Bearer Token
44
+ * @param {'car' | 'homeowner' | 'household' | 'privateLiability'} [product] PBM product the documents belongs to.
43
45
  * @param {*} [options] Override http request option.
44
46
  * @throws {RequiredError}
45
47
  */
46
- listSearchableDocuments(searchText: string, ownerIds: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListSearchableDocumentsResponseClass>>;
48
+ listSearchableDocuments(searchText: string, ownerIds: string, authorization?: string, product?: 'car' | 'homeowner' | 'household' | 'privateLiability', options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListSearchableDocumentsResponseClass>>;
47
49
  };
48
50
  /**
49
51
  * SearchableDocumentsApi - factory interface
@@ -56,10 +58,11 @@ export declare const SearchableDocumentsApiFactory: (configuration?: Configurati
56
58
  * @param {string} searchText Text to search in the documents.
57
59
  * @param {string} ownerIds List of searched document owner IDs separated with | (search in all documents if an \&#39;*\&#39; list provided).
58
60
  * @param {string} [authorization] Bearer Token
61
+ * @param {'car' | 'homeowner' | 'household' | 'privateLiability'} [product] PBM product the documents belongs to.
59
62
  * @param {*} [options] Override http request option.
60
63
  * @throws {RequiredError}
61
64
  */
62
- listSearchableDocuments(searchText: string, ownerIds: string, authorization?: string, options?: any): AxiosPromise<ListSearchableDocumentsResponseClass>;
65
+ listSearchableDocuments(searchText: string, ownerIds: string, authorization?: string, product?: 'car' | 'homeowner' | 'household' | 'privateLiability', options?: any): AxiosPromise<ListSearchableDocumentsResponseClass>;
63
66
  };
64
67
  /**
65
68
  * Request parameters for listSearchableDocuments operation in SearchableDocumentsApi.
@@ -85,6 +88,12 @@ export interface SearchableDocumentsApiListSearchableDocumentsRequest {
85
88
  * @memberof SearchableDocumentsApiListSearchableDocuments
86
89
  */
87
90
  readonly authorization?: string;
91
+ /**
92
+ * PBM product the documents belongs to.
93
+ * @type {'car' | 'homeowner' | 'household' | 'privateLiability'}
94
+ * @memberof SearchableDocumentsApiListSearchableDocuments
95
+ */
96
+ readonly product?: 'car' | 'homeowner' | 'household' | 'privateLiability';
88
97
  }
89
98
  /**
90
99
  * SearchableDocumentsApi - object-oriented interface