@emilgroup/document-sdk-node 1.39.1-beta.1 → 1.39.1-beta.3

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/README.md CHANGED
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
17
17
  Navigate to the folder of your consuming project and run one of the following commands:
18
18
 
19
19
  ```
20
- npm install @emilgroup/document-sdk-node@1.39.1-beta.1 --save
20
+ npm install @emilgroup/document-sdk-node@1.39.1-beta.3 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/document-sdk-node@1.39.1-beta.1
24
+ yarn add @emilgroup/document-sdk-node@1.39.1-beta.3
25
25
  ```
26
26
 
27
27
  And then you can import `DocumentsApi`.
package/base.ts CHANGED
@@ -44,6 +44,16 @@ export interface LoginClass {
44
44
  permissions: string;
45
45
  }
46
46
 
47
+ export interface SwitchWorkspaceRequest {
48
+ username: string;
49
+ targetWorkspace: string;
50
+ }
51
+
52
+ export interface SwitchWorkspaceResponseClass {
53
+ accessToken: string;
54
+ permissions: string;
55
+ }
56
+
47
57
  export enum Environment {
48
58
  Production = 'https://apiv2.emil.de',
49
59
  Test = 'https://apiv2-test.emil.de',
@@ -94,13 +104,13 @@ export class BaseAPI {
94
104
  this.attachInterceptor(axios);
95
105
  }
96
106
 
97
- async initialize(env: Environment = Environment.Production) {
107
+ async initialize(env: Environment = Environment.Production, targetWorkspace?: string) {
98
108
  this.configuration.basePath = env;
99
109
 
100
110
  await this.loadCredentials();
101
111
 
102
112
  if (this.username) {
103
- await this.authorize(this.username, this.password);
113
+ await this.authorize(this.username, this.password, targetWorkspace);
104
114
  this.password = null; // to avoid keeping password loaded in memory.
105
115
  }
106
116
  }
@@ -150,7 +160,7 @@ export class BaseAPI {
150
160
  this.configuration.basePath = env;
151
161
  }
152
162
 
153
- async authorize(username: string, password: string): Promise<void> {
163
+ async authorize(username: string, password: string, targetWorkspace?: string): Promise<void> {
154
164
  const options: AxiosRequestConfig = {
155
165
  method: 'POST',
156
166
  url: `${this.configuration.basePath}/authservice/v1/login`,
@@ -170,6 +180,38 @@ export class BaseAPI {
170
180
 
171
181
  const refreshToken = this.extractRefreshToken(response)
172
182
  this.configuration.refreshToken = refreshToken;
183
+
184
+ // Switch workspace if provided
185
+ if (targetWorkspace) {
186
+ await this.switchWorkspace(targetWorkspace);
187
+ }
188
+ }
189
+
190
+ async switchWorkspace(targetWorkspace: string): Promise<void> {
191
+ const options: AxiosRequestConfig = {
192
+ method: 'POST',
193
+ url: `${this.configuration.basePath}/authservice/v1/workspaces/switch`,
194
+ headers: {
195
+ 'Content-Type': 'application/json',
196
+ 'Authorization': `Bearer ${this.configuration.accessToken}`,
197
+ 'Cookie': this.configuration.refreshToken,
198
+ },
199
+ data: {
200
+ username: this.configuration.username,
201
+ targetWorkspace,
202
+ } as SwitchWorkspaceRequest,
203
+ withCredentials: true,
204
+ };
205
+
206
+ const response = await globalAxios.request<SwitchWorkspaceResponseClass>(options);
207
+
208
+ const { data: { accessToken } } = response;
209
+ this.configuration.accessToken = `Bearer ${accessToken}`;
210
+
211
+ const refreshToken = this.extractRefreshToken(response);
212
+ if (refreshToken) {
213
+ this.configuration.refreshToken = refreshToken;
214
+ }
173
215
  }
174
216
 
175
217
  async refreshTokenInternal(): Promise<string> {
@@ -48,8 +48,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
48
48
  });
49
49
  };
50
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 = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
52
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
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
53
  function verb(n) { return function (v) { return step([n, v]); }; }
54
54
  function step(op) {
55
55
  if (f) throw new TypeError("Generator is already executing.");
@@ -74,15 +74,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
74
74
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
75
  }
76
76
  };
77
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
78
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
79
- if (ar || !(i in from)) {
80
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
81
- ar[i] = from[i];
82
- }
83
- }
84
- return to.concat(ar || Array.prototype.slice.call(from));
85
- };
86
77
  var __importDefault = (this && this.__importDefault) || function (mod) {
87
78
  return (mod && mod.__esModule) ? mod : { "default": mod };
88
79
  };
@@ -111,14 +102,10 @@ var DefaultApiAxiosParamCreator = function (configuration) {
111
102
  * @param {*} [options] Override http request option.
112
103
  * @throws {RequiredError}
113
104
  */
114
- check: function () {
115
- var args_1 = [];
116
- for (var _i = 0; _i < arguments.length; _i++) {
117
- args_1[_i] = arguments[_i];
118
- }
119
- return __awaiter(_this, __spreadArray([], args_1, true), void 0, function (options) {
105
+ check: function (options) {
106
+ if (options === void 0) { options = {}; }
107
+ return __awaiter(_this, void 0, void 0, function () {
120
108
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
121
- if (options === void 0) { options = {}; }
122
109
  return __generator(this, function (_a) {
123
110
  localVarPath = "/documentservice/health";
124
111
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -48,8 +48,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
48
48
  });
49
49
  };
50
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 = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
52
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
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
53
  function verb(n) { return function (v) { return step([n, v]); }; }
54
54
  function step(op) {
55
55
  if (f) throw new TypeError("Generator is already executing.");
@@ -74,15 +74,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
74
74
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
75
  }
76
76
  };
77
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
78
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
79
- if (ar || !(i in from)) {
80
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
81
- ar[i] = from[i];
82
- }
83
- }
84
- return to.concat(ar || Array.prototype.slice.call(from));
85
- };
86
77
  var __importDefault = (this && this.__importDefault) || function (mod) {
87
78
  return (mod && mod.__esModule) ? mod : { "default": mod };
88
79
  };
@@ -113,14 +104,10 @@ var DocumentTemplatesApiAxiosParamCreator = function (configuration) {
113
104
  * @param {*} [options] Override http request option.
114
105
  * @throws {RequiredError}
115
106
  */
116
- createDocTemplate: function (createDocTemplateRequestDto_1, authorization_1) {
117
- var args_1 = [];
118
- for (var _i = 2; _i < arguments.length; _i++) {
119
- args_1[_i - 2] = arguments[_i];
120
- }
121
- return __awaiter(_this, __spreadArray([createDocTemplateRequestDto_1, authorization_1], args_1, true), void 0, function (createDocTemplateRequestDto, authorization, options) {
107
+ createDocTemplate: function (createDocTemplateRequestDto, authorization, options) {
108
+ if (options === void 0) { options = {}; }
109
+ return __awaiter(_this, void 0, void 0, function () {
122
110
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
123
- if (options === void 0) { options = {}; }
124
111
  return __generator(this, function (_a) {
125
112
  switch (_a.label) {
126
113
  case 0:
@@ -166,14 +153,10 @@ var DocumentTemplatesApiAxiosParamCreator = function (configuration) {
166
153
  * @param {*} [options] Override http request option.
167
154
  * @throws {RequiredError}
168
155
  */
169
- deleteDocTemplate: function (id_1, authorization_1) {
170
- var args_1 = [];
171
- for (var _i = 2; _i < arguments.length; _i++) {
172
- args_1[_i - 2] = arguments[_i];
173
- }
174
- return __awaiter(_this, __spreadArray([id_1, authorization_1], args_1, true), void 0, function (id, authorization, options) {
156
+ deleteDocTemplate: function (id, authorization, options) {
157
+ if (options === void 0) { options = {}; }
158
+ return __awaiter(_this, void 0, void 0, function () {
175
159
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
176
- if (options === void 0) { options = {}; }
177
160
  return __generator(this, function (_a) {
178
161
  switch (_a.label) {
179
162
  case 0:
@@ -219,14 +202,10 @@ var DocumentTemplatesApiAxiosParamCreator = function (configuration) {
219
202
  * @param {*} [options] Override http request option.
220
203
  * @throws {RequiredError}
221
204
  */
222
- getDocTemplate: function (id_1, authorization_1, expand_1) {
223
- var args_1 = [];
224
- for (var _i = 3; _i < arguments.length; _i++) {
225
- args_1[_i - 3] = arguments[_i];
226
- }
227
- return __awaiter(_this, __spreadArray([id_1, authorization_1, expand_1], args_1, true), void 0, function (id, authorization, expand, options) {
205
+ getDocTemplate: function (id, authorization, expand, options) {
206
+ if (options === void 0) { options = {}; }
207
+ return __awaiter(_this, void 0, void 0, function () {
228
208
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
229
- if (options === void 0) { options = {}; }
230
209
  return __generator(this, function (_a) {
231
210
  switch (_a.label) {
232
211
  case 0:
@@ -279,14 +258,10 @@ var DocumentTemplatesApiAxiosParamCreator = function (configuration) {
279
258
  * @param {*} [options] Override http request option.
280
259
  * @throws {RequiredError}
281
260
  */
282
- listDocTemplates: function (authorization_1, pageSize_1, pageToken_1, filter_1, search_1, order_1, expand_1) {
283
- var args_1 = [];
284
- for (var _i = 7; _i < arguments.length; _i++) {
285
- args_1[_i - 7] = arguments[_i];
286
- }
287
- return __awaiter(_this, __spreadArray([authorization_1, pageSize_1, pageToken_1, filter_1, search_1, order_1, expand_1], args_1, true), void 0, function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
261
+ listDocTemplates: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
262
+ if (options === void 0) { options = {}; }
263
+ return __awaiter(_this, void 0, void 0, function () {
288
264
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
289
- if (options === void 0) { options = {}; }
290
265
  return __generator(this, function (_a) {
291
266
  switch (_a.label) {
292
267
  case 0:
@@ -347,14 +322,10 @@ var DocumentTemplatesApiAxiosParamCreator = function (configuration) {
347
322
  * @param {*} [options] Override http request option.
348
323
  * @throws {RequiredError}
349
324
  */
350
- updateDocTemplate: function (id_1, updateDocTemplateRequestDto_1, authorization_1) {
351
- var args_1 = [];
352
- for (var _i = 3; _i < arguments.length; _i++) {
353
- args_1[_i - 3] = arguments[_i];
354
- }
355
- return __awaiter(_this, __spreadArray([id_1, updateDocTemplateRequestDto_1, authorization_1], args_1, true), void 0, function (id, updateDocTemplateRequestDto, authorization, options) {
325
+ updateDocTemplate: function (id, updateDocTemplateRequestDto, authorization, options) {
326
+ if (options === void 0) { options = {}; }
327
+ return __awaiter(_this, void 0, void 0, function () {
356
328
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
357
- if (options === void 0) { options = {}; }
358
329
  return __generator(this, function (_a) {
359
330
  switch (_a.label) {
360
331
  case 0:
@@ -63,7 +63,7 @@ export declare const DocumentsApiAxiosParamCreator: (configuration?: Configurati
63
63
  * @param {*} [options] Override http request option.
64
64
  * @throws {RequiredError}
65
65
  */
66
- getDocumentDownloadUrl: (code: string, authorization?: string, contentDisposition?: "attachment" | "inline", options?: AxiosRequestConfig) => Promise<RequestArgs>;
66
+ getDocumentDownloadUrl: (code: string, authorization?: string, contentDisposition?: 'attachment' | 'inline', options?: AxiosRequestConfig) => Promise<RequestArgs>;
67
67
  /**
68
68
  * This will return a presigned URL for a random S3 key
69
69
  * @summary Fetches a presigned URL for a S3 key
@@ -73,7 +73,7 @@ export declare const DocumentsApiAxiosParamCreator: (configuration?: Configurati
73
73
  * @param {*} [options] Override http request option.
74
74
  * @throws {RequiredError}
75
75
  */
76
- getSignedS3keyUrl: (s3Key: string, authorization?: string, contentDisposition?: "attachment" | "inline", options?: AxiosRequestConfig) => Promise<RequestArgs>;
76
+ getSignedS3keyUrl: (s3Key: string, authorization?: string, contentDisposition?: 'attachment' | 'inline', options?: AxiosRequestConfig) => Promise<RequestArgs>;
77
77
  /**
78
78
  * Returns a list of documents you have previously created. The documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"document-management.documents.view\"
79
79
  * @summary List documents
@@ -150,7 +150,7 @@ export declare const DocumentsApiFp: (configuration?: Configuration) => {
150
150
  * @param {*} [options] Override http request option.
151
151
  * @throws {RequiredError}
152
152
  */
153
- getDocumentDownloadUrl(code: string, authorization?: string, contentDisposition?: "attachment" | "inline", options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetDocumentDownloadUrlResponseClass>>;
153
+ getDocumentDownloadUrl(code: string, authorization?: string, contentDisposition?: 'attachment' | 'inline', options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetDocumentDownloadUrlResponseClass>>;
154
154
  /**
155
155
  * This will return a presigned URL for a random S3 key
156
156
  * @summary Fetches a presigned URL for a S3 key
@@ -160,7 +160,7 @@ export declare const DocumentsApiFp: (configuration?: Configuration) => {
160
160
  * @param {*} [options] Override http request option.
161
161
  * @throws {RequiredError}
162
162
  */
163
- getSignedS3keyUrl(s3Key: string, authorization?: string, contentDisposition?: "attachment" | "inline", options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetSignedS3KeyUrlResponseClass>>;
163
+ getSignedS3keyUrl(s3Key: string, authorization?: string, contentDisposition?: 'attachment' | 'inline', options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetSignedS3KeyUrlResponseClass>>;
164
164
  /**
165
165
  * Returns a list of documents you have previously created. The documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"document-management.documents.view\"
166
166
  * @summary List documents
@@ -237,7 +237,7 @@ export declare const DocumentsApiFactory: (configuration?: Configuration, basePa
237
237
  * @param {*} [options] Override http request option.
238
238
  * @throws {RequiredError}
239
239
  */
240
- getDocumentDownloadUrl(code: string, authorization?: string, contentDisposition?: "attachment" | "inline", options?: any): AxiosPromise<GetDocumentDownloadUrlResponseClass>;
240
+ getDocumentDownloadUrl(code: string, authorization?: string, contentDisposition?: 'attachment' | 'inline', options?: any): AxiosPromise<GetDocumentDownloadUrlResponseClass>;
241
241
  /**
242
242
  * This will return a presigned URL for a random S3 key
243
243
  * @summary Fetches a presigned URL for a S3 key
@@ -247,7 +247,7 @@ export declare const DocumentsApiFactory: (configuration?: Configuration, basePa
247
247
  * @param {*} [options] Override http request option.
248
248
  * @throws {RequiredError}
249
249
  */
250
- getSignedS3keyUrl(s3Key: string, authorization?: string, contentDisposition?: "attachment" | "inline", options?: any): AxiosPromise<GetSignedS3KeyUrlResponseClass>;
250
+ getSignedS3keyUrl(s3Key: string, authorization?: string, contentDisposition?: 'attachment' | 'inline', options?: any): AxiosPromise<GetSignedS3KeyUrlResponseClass>;
251
251
  /**
252
252
  * Returns a list of documents you have previously created. The documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"document-management.documents.view\"
253
253
  * @summary List documents
@@ -48,8 +48,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
48
48
  });
49
49
  };
50
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 = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
52
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
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
53
  function verb(n) { return function (v) { return step([n, v]); }; }
54
54
  function step(op) {
55
55
  if (f) throw new TypeError("Generator is already executing.");
@@ -74,15 +74,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
74
74
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
75
  }
76
76
  };
77
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
78
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
79
- if (ar || !(i in from)) {
80
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
81
- ar[i] = from[i];
82
- }
83
- }
84
- return to.concat(ar || Array.prototype.slice.call(from));
85
- };
86
77
  var __importDefault = (this && this.__importDefault) || function (mod) {
87
78
  return (mod && mod.__esModule) ? mod : { "default": mod };
88
79
  };
@@ -113,14 +104,10 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
113
104
  * @param {*} [options] Override http request option.
114
105
  * @throws {RequiredError}
115
106
  */
116
- createDocument: function (createDocumentRequestDto_1, authorization_1) {
117
- var args_1 = [];
118
- for (var _i = 2; _i < arguments.length; _i++) {
119
- args_1[_i - 2] = arguments[_i];
120
- }
121
- return __awaiter(_this, __spreadArray([createDocumentRequestDto_1, authorization_1], args_1, true), void 0, function (createDocumentRequestDto, authorization, options) {
107
+ createDocument: function (createDocumentRequestDto, authorization, options) {
108
+ if (options === void 0) { options = {}; }
109
+ return __awaiter(_this, void 0, void 0, function () {
122
110
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
123
- if (options === void 0) { options = {}; }
124
111
  return __generator(this, function (_a) {
125
112
  switch (_a.label) {
126
113
  case 0:
@@ -166,14 +153,10 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
166
153
  * @param {*} [options] Override http request option.
167
154
  * @throws {RequiredError}
168
155
  */
169
- createPresignedPost: function (createPresignedPostRequestDto_1, authorization_1) {
170
- var args_1 = [];
171
- for (var _i = 2; _i < arguments.length; _i++) {
172
- args_1[_i - 2] = arguments[_i];
173
- }
174
- return __awaiter(_this, __spreadArray([createPresignedPostRequestDto_1, authorization_1], args_1, true), void 0, function (createPresignedPostRequestDto, authorization, options) {
156
+ createPresignedPost: function (createPresignedPostRequestDto, authorization, options) {
157
+ if (options === void 0) { options = {}; }
158
+ return __awaiter(_this, void 0, void 0, function () {
175
159
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
176
- if (options === void 0) { options = {}; }
177
160
  return __generator(this, function (_a) {
178
161
  switch (_a.label) {
179
162
  case 0:
@@ -219,14 +202,10 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
219
202
  * @param {*} [options] Override http request option.
220
203
  * @throws {RequiredError}
221
204
  */
222
- deleteDocument: function (code_1, authorization_1) {
223
- var args_1 = [];
224
- for (var _i = 2; _i < arguments.length; _i++) {
225
- args_1[_i - 2] = arguments[_i];
226
- }
227
- return __awaiter(_this, __spreadArray([code_1, authorization_1], args_1, true), void 0, function (code, authorization, options) {
205
+ deleteDocument: function (code, authorization, options) {
206
+ if (options === void 0) { options = {}; }
207
+ return __awaiter(_this, void 0, void 0, function () {
228
208
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
229
- if (options === void 0) { options = {}; }
230
209
  return __generator(this, function (_a) {
231
210
  switch (_a.label) {
232
211
  case 0:
@@ -272,14 +251,10 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
272
251
  * @param {*} [options] Override http request option.
273
252
  * @throws {RequiredError}
274
253
  */
275
- getDocumentDownloadUrl: function (code_1, authorization_1, contentDisposition_1) {
276
- var args_1 = [];
277
- for (var _i = 3; _i < arguments.length; _i++) {
278
- args_1[_i - 3] = arguments[_i];
279
- }
280
- return __awaiter(_this, __spreadArray([code_1, authorization_1, contentDisposition_1], args_1, true), void 0, function (code, authorization, contentDisposition, options) {
254
+ getDocumentDownloadUrl: function (code, authorization, contentDisposition, options) {
255
+ if (options === void 0) { options = {}; }
256
+ return __awaiter(_this, void 0, void 0, function () {
281
257
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
282
- if (options === void 0) { options = {}; }
283
258
  return __generator(this, function (_a) {
284
259
  switch (_a.label) {
285
260
  case 0:
@@ -328,14 +303,10 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
328
303
  * @param {*} [options] Override http request option.
329
304
  * @throws {RequiredError}
330
305
  */
331
- getSignedS3keyUrl: function (s3Key_1, authorization_1, contentDisposition_1) {
332
- var args_1 = [];
333
- for (var _i = 3; _i < arguments.length; _i++) {
334
- args_1[_i - 3] = arguments[_i];
335
- }
336
- return __awaiter(_this, __spreadArray([s3Key_1, authorization_1, contentDisposition_1], args_1, true), void 0, function (s3Key, authorization, contentDisposition, options) {
306
+ getSignedS3keyUrl: function (s3Key, authorization, contentDisposition, options) {
307
+ if (options === void 0) { options = {}; }
308
+ return __awaiter(_this, void 0, void 0, function () {
337
309
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
338
- if (options === void 0) { options = {}; }
339
310
  return __generator(this, function (_a) {
340
311
  switch (_a.label) {
341
312
  case 0:
@@ -391,14 +362,10 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
391
362
  * @param {*} [options] Override http request option.
392
363
  * @throws {RequiredError}
393
364
  */
394
- listDocuments: function (authorization_1, pageSize_1, pageToken_1, filter_1, search_1, order_1, expand_1, filters_1) {
395
- var args_1 = [];
396
- for (var _i = 8; _i < arguments.length; _i++) {
397
- args_1[_i - 8] = arguments[_i];
398
- }
399
- return __awaiter(_this, __spreadArray([authorization_1, pageSize_1, pageToken_1, filter_1, search_1, order_1, expand_1, filters_1], args_1, true), void 0, function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
365
+ listDocuments: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
366
+ if (options === void 0) { options = {}; }
367
+ return __awaiter(_this, void 0, void 0, function () {
400
368
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
401
- if (options === void 0) { options = {}; }
402
369
  return __generator(this, function (_a) {
403
370
  switch (_a.label) {
404
371
  case 0:
@@ -461,14 +428,10 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
461
428
  * @param {*} [options] Override http request option.
462
429
  * @throws {RequiredError}
463
430
  */
464
- saveExternalDocument: function (saveExternalDocumentRequestDto_1, authorization_1) {
465
- var args_1 = [];
466
- for (var _i = 2; _i < arguments.length; _i++) {
467
- args_1[_i - 2] = arguments[_i];
468
- }
469
- return __awaiter(_this, __spreadArray([saveExternalDocumentRequestDto_1, authorization_1], args_1, true), void 0, function (saveExternalDocumentRequestDto, authorization, options) {
431
+ saveExternalDocument: function (saveExternalDocumentRequestDto, authorization, options) {
432
+ if (options === void 0) { options = {}; }
433
+ return __awaiter(_this, void 0, void 0, function () {
470
434
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
471
- if (options === void 0) { options = {}; }
472
435
  return __generator(this, function (_a) {
473
436
  switch (_a.label) {
474
437
  case 0:
@@ -515,14 +478,10 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
515
478
  * @param {*} [options] Override http request option.
516
479
  * @throws {RequiredError}
517
480
  */
518
- updateDocument: function (code_1, updateDocumentRequestDto_1, authorization_1) {
519
- var args_1 = [];
520
- for (var _i = 3; _i < arguments.length; _i++) {
521
- args_1[_i - 3] = arguments[_i];
522
- }
523
- return __awaiter(_this, __spreadArray([code_1, updateDocumentRequestDto_1, authorization_1], args_1, true), void 0, function (code, updateDocumentRequestDto, authorization, options) {
481
+ updateDocument: function (code, updateDocumentRequestDto, authorization, options) {
482
+ if (options === void 0) { options = {}; }
483
+ return __awaiter(_this, void 0, void 0, function () {
524
484
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
525
- if (options === void 0) { options = {}; }
526
485
  return __generator(this, function (_a) {
527
486
  switch (_a.label) {
528
487
  case 0:
@@ -48,8 +48,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
48
48
  });
49
49
  };
50
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 = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
52
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
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
53
  function verb(n) { return function (v) { return step([n, v]); }; }
54
54
  function step(op) {
55
55
  if (f) throw new TypeError("Generator is already executing.");
@@ -74,15 +74,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
74
74
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
75
  }
76
76
  };
77
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
78
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
79
- if (ar || !(i in from)) {
80
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
81
- ar[i] = from[i];
82
- }
83
- }
84
- return to.concat(ar || Array.prototype.slice.call(from));
85
- };
86
77
  var __importDefault = (this && this.__importDefault) || function (mod) {
87
78
  return (mod && mod.__esModule) ? mod : { "default": mod };
88
79
  };
@@ -113,14 +104,10 @@ var DocxTemplatesApiAxiosParamCreator = function (configuration) {
113
104
  * @param {*} [options] Override http request option.
114
105
  * @throws {RequiredError}
115
106
  */
116
- deleteDocxTemplate: function (code_1, authorization_1) {
117
- var args_1 = [];
118
- for (var _i = 2; _i < arguments.length; _i++) {
119
- args_1[_i - 2] = arguments[_i];
120
- }
121
- return __awaiter(_this, __spreadArray([code_1, authorization_1], args_1, true), void 0, function (code, authorization, options) {
107
+ deleteDocxTemplate: function (code, authorization, options) {
108
+ if (options === void 0) { options = {}; }
109
+ return __awaiter(_this, void 0, void 0, function () {
122
110
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
123
- if (options === void 0) { options = {}; }
124
111
  return __generator(this, function (_a) {
125
112
  switch (_a.label) {
126
113
  case 0:
@@ -165,14 +152,10 @@ var DocxTemplatesApiAxiosParamCreator = function (configuration) {
165
152
  * @param {*} [options] Override http request option.
166
153
  * @throws {RequiredError}
167
154
  */
168
- downloadDocxTemplate: function (code_1, authorization_1) {
169
- var args_1 = [];
170
- for (var _i = 2; _i < arguments.length; _i++) {
171
- args_1[_i - 2] = arguments[_i];
172
- }
173
- return __awaiter(_this, __spreadArray([code_1, authorization_1], args_1, true), void 0, function (code, authorization, options) {
155
+ downloadDocxTemplate: function (code, authorization, options) {
156
+ if (options === void 0) { options = {}; }
157
+ return __awaiter(_this, void 0, void 0, function () {
174
158
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
175
- if (options === void 0) { options = {}; }
176
159
  return __generator(this, function (_a) {
177
160
  switch (_a.label) {
178
161
  case 0:
@@ -217,14 +200,10 @@ var DocxTemplatesApiAxiosParamCreator = function (configuration) {
217
200
  * @param {*} [options] Override http request option.
218
201
  * @throws {RequiredError}
219
202
  */
220
- getDocxTemplate: function (code_1, authorization_1) {
221
- var args_1 = [];
222
- for (var _i = 2; _i < arguments.length; _i++) {
223
- args_1[_i - 2] = arguments[_i];
224
- }
225
- return __awaiter(_this, __spreadArray([code_1, authorization_1], args_1, true), void 0, function (code, authorization, options) {
203
+ getDocxTemplate: function (code, authorization, options) {
204
+ if (options === void 0) { options = {}; }
205
+ return __awaiter(_this, void 0, void 0, function () {
226
206
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
227
- if (options === void 0) { options = {}; }
228
207
  return __generator(this, function (_a) {
229
208
  switch (_a.label) {
230
209
  case 0:
@@ -275,14 +254,10 @@ var DocxTemplatesApiAxiosParamCreator = function (configuration) {
275
254
  * @param {*} [options] Override http request option.
276
255
  * @throws {RequiredError}
277
256
  */
278
- listDocxTemplates: function (authorization_1, pageSize_1, pageToken_1, filter_1, search_1, order_1, expand_1, filters_1) {
279
- var args_1 = [];
280
- for (var _i = 8; _i < arguments.length; _i++) {
281
- args_1[_i - 8] = arguments[_i];
282
- }
283
- return __awaiter(_this, __spreadArray([authorization_1, pageSize_1, pageToken_1, filter_1, search_1, order_1, expand_1, filters_1], args_1, true), void 0, function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
257
+ listDocxTemplates: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
258
+ if (options === void 0) { options = {}; }
259
+ return __awaiter(_this, void 0, void 0, function () {
284
260
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
285
- if (options === void 0) { options = {}; }
286
261
  return __generator(this, function (_a) {
287
262
  switch (_a.label) {
288
263
  case 0:
@@ -346,14 +321,10 @@ var DocxTemplatesApiAxiosParamCreator = function (configuration) {
346
321
  * @param {*} [options] Override http request option.
347
322
  * @throws {RequiredError}
348
323
  */
349
- updateDocxTemplate: function (code_1, sharedUpdateDocxTemplateRequestDto_1, authorization_1) {
350
- var args_1 = [];
351
- for (var _i = 3; _i < arguments.length; _i++) {
352
- args_1[_i - 3] = arguments[_i];
353
- }
354
- return __awaiter(_this, __spreadArray([code_1, sharedUpdateDocxTemplateRequestDto_1, authorization_1], args_1, true), void 0, function (code, sharedUpdateDocxTemplateRequestDto, authorization, options) {
324
+ updateDocxTemplate: function (code, sharedUpdateDocxTemplateRequestDto, authorization, options) {
325
+ if (options === void 0) { options = {}; }
326
+ return __awaiter(_this, void 0, void 0, function () {
355
327
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
356
- if (options === void 0) { options = {}; }
357
328
  return __generator(this, function (_a) {
358
329
  switch (_a.label) {
359
330
  case 0:
@@ -402,14 +373,10 @@ var DocxTemplatesApiAxiosParamCreator = function (configuration) {
402
373
  * @param {*} [options] Override http request option.
403
374
  * @throws {RequiredError}
404
375
  */
405
- uploadDocxTemplate: function (uploadDocxTemplateRequestDto_1, authorization_1) {
406
- var args_1 = [];
407
- for (var _i = 2; _i < arguments.length; _i++) {
408
- args_1[_i - 2] = arguments[_i];
409
- }
410
- return __awaiter(_this, __spreadArray([uploadDocxTemplateRequestDto_1, authorization_1], args_1, true), void 0, function (uploadDocxTemplateRequestDto, authorization, options) {
376
+ uploadDocxTemplate: function (uploadDocxTemplateRequestDto, authorization, options) {
377
+ if (options === void 0) { options = {}; }
378
+ return __awaiter(_this, void 0, void 0, function () {
411
379
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
412
- if (options === void 0) { options = {}; }
413
380
  return __generator(this, function (_a) {
414
381
  switch (_a.label) {
415
382
  case 0: