@emilgroup/document-sdk-node 1.39.1-beta.2 → 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.
@@ -17,9 +17,6 @@ common.ts
17
17
  configuration.ts
18
18
  git_push.sh
19
19
  index.ts
20
- models/base64-metadata-class.ts
21
- models/convert-to-base64-request-dto.ts
22
- models/convert-to-base64-response-class.ts
23
20
  models/create-doc-template-request-dto.ts
24
21
  models/create-doc-template-response-class.ts
25
22
  models/create-document-request-dto.ts
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.2 --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.2
24
+ yarn add @emilgroup/document-sdk-node@1.39.1-beta.3
25
25
  ```
26
26
 
27
27
  And then you can import `DocumentsApi`.
@@ -21,10 +21,6 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
21
21
  // @ts-ignore
22
22
  import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
23
  // @ts-ignore
24
- import { ConvertToBase64RequestDto } from '../models';
25
- // @ts-ignore
26
- import { ConvertToBase64ResponseClass } from '../models';
27
- // @ts-ignore
28
24
  import { CreateDocumentRequestDto } from '../models';
29
25
  // @ts-ignore
30
26
  import { CreateDocumentSyncResponseClass } from '../models';
@@ -54,57 +50,6 @@ const FormData = require('form-data');
54
50
  */
55
51
  export const DocumentsApiAxiosParamCreator = function (configuration?: Configuration) {
56
52
  return {
57
- /**
58
- * Converts a document to base64 format with optional gzip compression for Zurich integration **Required Permissions** \"document-management.documents.view\"
59
- * @summary Convert document to base64
60
- * @param {string} code Document code
61
- * @param {ConvertToBase64RequestDto} convertToBase64RequestDto
62
- * @param {string} [authorization] Bearer Token
63
- * @param {*} [options] Override http request option.
64
- * @throws {RequiredError}
65
- */
66
- convertToBase64: async (code: string, convertToBase64RequestDto: ConvertToBase64RequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
67
- // verify required parameter 'code' is not null or undefined
68
- assertParamExists('convertToBase64', 'code', code)
69
- // verify required parameter 'convertToBase64RequestDto' is not null or undefined
70
- assertParamExists('convertToBase64', 'convertToBase64RequestDto', convertToBase64RequestDto)
71
- const localVarPath = `/documentservice/v1/documents/{code}/base64`
72
- .replace(`{${"code"}}`, encodeURIComponent(String(code)));
73
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
74
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
75
- let baseOptions;
76
- let baseAccessToken;
77
- if (configuration) {
78
- baseOptions = configuration.baseOptions;
79
- baseAccessToken = configuration.accessToken;
80
- }
81
-
82
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
83
- const localVarHeaderParameter = {} as any;
84
- const localVarQueryParameter = {} as any;
85
-
86
- // authentication bearer required
87
- // http bearer authentication required
88
- await setBearerAuthToObject(localVarHeaderParameter, configuration)
89
-
90
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
91
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
92
- }
93
-
94
-
95
-
96
- localVarHeaderParameter['Content-Type'] = 'application/json';
97
-
98
- setSearchParams(localVarUrlObj, localVarQueryParameter);
99
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
100
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
101
- localVarRequestOptions.data = serializeDataIfNeeded(convertToBase64RequestDto, localVarRequestOptions, configuration)
102
-
103
- return {
104
- url: toPathString(localVarUrlObj),
105
- options: localVarRequestOptions,
106
- };
107
- },
108
53
  /**
109
54
  * This will create a document in database and upload the file to Amazon Simple Storage Service (S3). **Required Permissions** \"document-management.documents.create\"
110
55
  * @summary Create the document
@@ -424,7 +369,7 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
424
369
  };
425
370
  },
426
371
  /**
427
- * This will save an external document in the database and return it. This is useful if one needs to call a third party API and store the document in EIS and then, for instance, send it to a client. **Required Permissions** \"document-management.documents.create\"
372
+ * This will save an external document in the database and return it. This is useful if one needs to call a third party API and store the document in EIS and then, for instance, send it to a client. **Required Permissions** \"document-management.documents.create\"
428
373
  * @summary Save external document
429
374
  * @param {SaveExternalDocumentRequestDto} saveExternalDocumentRequestDto
430
375
  * @param {string} [authorization] Bearer Token
@@ -531,19 +476,6 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
531
476
  export const DocumentsApiFp = function(configuration?: Configuration) {
532
477
  const localVarAxiosParamCreator = DocumentsApiAxiosParamCreator(configuration)
533
478
  return {
534
- /**
535
- * Converts a document to base64 format with optional gzip compression for Zurich integration **Required Permissions** \"document-management.documents.view\"
536
- * @summary Convert document to base64
537
- * @param {string} code Document code
538
- * @param {ConvertToBase64RequestDto} convertToBase64RequestDto
539
- * @param {string} [authorization] Bearer Token
540
- * @param {*} [options] Override http request option.
541
- * @throws {RequiredError}
542
- */
543
- async convertToBase64(code: string, convertToBase64RequestDto: ConvertToBase64RequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ConvertToBase64ResponseClass>> {
544
- const localVarAxiosArgs = await localVarAxiosParamCreator.convertToBase64(code, convertToBase64RequestDto, authorization, options);
545
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
546
- },
547
479
  /**
548
480
  * This will create a document in database and upload the file to Amazon Simple Storage Service (S3). **Required Permissions** \"document-management.documents.create\"
549
481
  * @summary Create the document
@@ -625,7 +557,7 @@ export const DocumentsApiFp = function(configuration?: Configuration) {
625
557
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
626
558
  },
627
559
  /**
628
- * This will save an external document in the database and return it. This is useful if one needs to call a third party API and store the document in EIS and then, for instance, send it to a client. **Required Permissions** \"document-management.documents.create\"
560
+ * This will save an external document in the database and return it. This is useful if one needs to call a third party API and store the document in EIS and then, for instance, send it to a client. **Required Permissions** \"document-management.documents.create\"
629
561
  * @summary Save external document
630
562
  * @param {SaveExternalDocumentRequestDto} saveExternalDocumentRequestDto
631
563
  * @param {string} [authorization] Bearer Token
@@ -659,18 +591,6 @@ export const DocumentsApiFp = function(configuration?: Configuration) {
659
591
  export const DocumentsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
660
592
  const localVarFp = DocumentsApiFp(configuration)
661
593
  return {
662
- /**
663
- * Converts a document to base64 format with optional gzip compression for Zurich integration **Required Permissions** \"document-management.documents.view\"
664
- * @summary Convert document to base64
665
- * @param {string} code Document code
666
- * @param {ConvertToBase64RequestDto} convertToBase64RequestDto
667
- * @param {string} [authorization] Bearer Token
668
- * @param {*} [options] Override http request option.
669
- * @throws {RequiredError}
670
- */
671
- convertToBase64(code: string, convertToBase64RequestDto: ConvertToBase64RequestDto, authorization?: string, options?: any): AxiosPromise<ConvertToBase64ResponseClass> {
672
- return localVarFp.convertToBase64(code, convertToBase64RequestDto, authorization, options).then((request) => request(axios, basePath));
673
- },
674
594
  /**
675
595
  * This will create a document in database and upload the file to Amazon Simple Storage Service (S3). **Required Permissions** \"document-management.documents.create\"
676
596
  * @summary Create the document
@@ -746,7 +666,7 @@ export const DocumentsApiFactory = function (configuration?: Configuration, base
746
666
  return localVarFp.listDocuments(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
747
667
  },
748
668
  /**
749
- * This will save an external document in the database and return it. This is useful if one needs to call a third party API and store the document in EIS and then, for instance, send it to a client. **Required Permissions** \"document-management.documents.create\"
669
+ * This will save an external document in the database and return it. This is useful if one needs to call a third party API and store the document in EIS and then, for instance, send it to a client. **Required Permissions** \"document-management.documents.create\"
750
670
  * @summary Save external document
751
671
  * @param {SaveExternalDocumentRequestDto} saveExternalDocumentRequestDto
752
672
  * @param {string} [authorization] Bearer Token
@@ -771,34 +691,6 @@ export const DocumentsApiFactory = function (configuration?: Configuration, base
771
691
  };
772
692
  };
773
693
 
774
- /**
775
- * Request parameters for convertToBase64 operation in DocumentsApi.
776
- * @export
777
- * @interface DocumentsApiConvertToBase64Request
778
- */
779
- export interface DocumentsApiConvertToBase64Request {
780
- /**
781
- * Document code
782
- * @type {string}
783
- * @memberof DocumentsApiConvertToBase64
784
- */
785
- readonly code: string
786
-
787
- /**
788
- *
789
- * @type {ConvertToBase64RequestDto}
790
- * @memberof DocumentsApiConvertToBase64
791
- */
792
- readonly convertToBase64RequestDto: ConvertToBase64RequestDto
793
-
794
- /**
795
- * Bearer Token
796
- * @type {string}
797
- * @memberof DocumentsApiConvertToBase64
798
- */
799
- readonly authorization?: string
800
- }
801
-
802
694
  /**
803
695
  * Request parameters for createDocument operation in DocumentsApi.
804
696
  * @export
@@ -1037,18 +929,6 @@ export interface DocumentsApiUpdateDocumentRequest {
1037
929
  * @extends {BaseAPI}
1038
930
  */
1039
931
  export class DocumentsApi extends BaseAPI {
1040
- /**
1041
- * Converts a document to base64 format with optional gzip compression for Zurich integration **Required Permissions** \"document-management.documents.view\"
1042
- * @summary Convert document to base64
1043
- * @param {DocumentsApiConvertToBase64Request} requestParameters Request parameters.
1044
- * @param {*} [options] Override http request option.
1045
- * @throws {RequiredError}
1046
- * @memberof DocumentsApi
1047
- */
1048
- public convertToBase64(requestParameters: DocumentsApiConvertToBase64Request, options?: AxiosRequestConfig) {
1049
- return DocumentsApiFp(this.configuration).convertToBase64(requestParameters.code, requestParameters.convertToBase64RequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1050
- }
1051
-
1052
932
  /**
1053
933
  * This will create a document in database and upload the file to Amazon Simple Storage Service (S3). **Required Permissions** \"document-management.documents.create\"
1054
934
  * @summary Create the document
@@ -1122,7 +1002,7 @@ export class DocumentsApi extends BaseAPI {
1122
1002
  }
1123
1003
 
1124
1004
  /**
1125
- * This will save an external document in the database and return it. This is useful if one needs to call a third party API and store the document in EIS and then, for instance, send it to a client. **Required Permissions** \"document-management.documents.create\"
1005
+ * This will save an external document in the database and return it. This is useful if one needs to call a third party API and store the document in EIS and then, for instance, send it to a client. **Required Permissions** \"document-management.documents.create\"
1126
1006
  * @summary Save external document
1127
1007
  * @param {DocumentsApiSaveExternalDocumentRequest} requestParameters Request parameters.
1128
1008
  * @param {*} [options] Override http request option.
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> {
@@ -12,8 +12,6 @@
12
12
  import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
13
13
  import { Configuration } from '../configuration';
14
14
  import { RequestArgs, BaseAPI } from '../base';
15
- import { ConvertToBase64RequestDto } from '../models';
16
- import { ConvertToBase64ResponseClass } from '../models';
17
15
  import { CreateDocumentRequestDto } from '../models';
18
16
  import { CreateDocumentSyncResponseClass } from '../models';
19
17
  import { CreatePresignedPostRequestDto } from '../models';
@@ -29,16 +27,6 @@ import { UpdateDocumentResponseClass } from '../models';
29
27
  * @export
30
28
  */
31
29
  export declare const DocumentsApiAxiosParamCreator: (configuration?: Configuration) => {
32
- /**
33
- * Converts a document to base64 format with optional gzip compression for Zurich integration **Required Permissions** \"document-management.documents.view\"
34
- * @summary Convert document to base64
35
- * @param {string} code Document code
36
- * @param {ConvertToBase64RequestDto} convertToBase64RequestDto
37
- * @param {string} [authorization] Bearer Token
38
- * @param {*} [options] Override http request option.
39
- * @throws {RequiredError}
40
- */
41
- convertToBase64: (code: string, convertToBase64RequestDto: ConvertToBase64RequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
42
30
  /**
43
31
  * This will create a document in database and upload the file to Amazon Simple Storage Service (S3). **Required Permissions** \"document-management.documents.create\"
44
32
  * @summary Create the document
@@ -102,7 +90,7 @@ export declare const DocumentsApiAxiosParamCreator: (configuration?: Configurati
102
90
  */
103
91
  listDocuments: (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
104
92
  /**
105
- * This will save an external document in the database and return it. This is useful if one needs to call a third party API and store the document in EIS and then, for instance, send it to a client. **Required Permissions** \"document-management.documents.create\"
93
+ * This will save an external document in the database and return it. This is useful if one needs to call a third party API and store the document in EIS and then, for instance, send it to a client. **Required Permissions** \"document-management.documents.create\"
106
94
  * @summary Save external document
107
95
  * @param {SaveExternalDocumentRequestDto} saveExternalDocumentRequestDto
108
96
  * @param {string} [authorization] Bearer Token
@@ -126,16 +114,6 @@ export declare const DocumentsApiAxiosParamCreator: (configuration?: Configurati
126
114
  * @export
127
115
  */
128
116
  export declare const DocumentsApiFp: (configuration?: Configuration) => {
129
- /**
130
- * Converts a document to base64 format with optional gzip compression for Zurich integration **Required Permissions** \"document-management.documents.view\"
131
- * @summary Convert document to base64
132
- * @param {string} code Document code
133
- * @param {ConvertToBase64RequestDto} convertToBase64RequestDto
134
- * @param {string} [authorization] Bearer Token
135
- * @param {*} [options] Override http request option.
136
- * @throws {RequiredError}
137
- */
138
- convertToBase64(code: string, convertToBase64RequestDto: ConvertToBase64RequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ConvertToBase64ResponseClass>>;
139
117
  /**
140
118
  * This will create a document in database and upload the file to Amazon Simple Storage Service (S3). **Required Permissions** \"document-management.documents.create\"
141
119
  * @summary Create the document
@@ -199,7 +177,7 @@ export declare const DocumentsApiFp: (configuration?: Configuration) => {
199
177
  */
200
178
  listDocuments(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListDocumentsResponseClass>>;
201
179
  /**
202
- * This will save an external document in the database and return it. This is useful if one needs to call a third party API and store the document in EIS and then, for instance, send it to a client. **Required Permissions** \"document-management.documents.create\"
180
+ * This will save an external document in the database and return it. This is useful if one needs to call a third party API and store the document in EIS and then, for instance, send it to a client. **Required Permissions** \"document-management.documents.create\"
203
181
  * @summary Save external document
204
182
  * @param {SaveExternalDocumentRequestDto} saveExternalDocumentRequestDto
205
183
  * @param {string} [authorization] Bearer Token
@@ -223,16 +201,6 @@ export declare const DocumentsApiFp: (configuration?: Configuration) => {
223
201
  * @export
224
202
  */
225
203
  export declare const DocumentsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
226
- /**
227
- * Converts a document to base64 format with optional gzip compression for Zurich integration **Required Permissions** \"document-management.documents.view\"
228
- * @summary Convert document to base64
229
- * @param {string} code Document code
230
- * @param {ConvertToBase64RequestDto} convertToBase64RequestDto
231
- * @param {string} [authorization] Bearer Token
232
- * @param {*} [options] Override http request option.
233
- * @throws {RequiredError}
234
- */
235
- convertToBase64(code: string, convertToBase64RequestDto: ConvertToBase64RequestDto, authorization?: string, options?: any): AxiosPromise<ConvertToBase64ResponseClass>;
236
204
  /**
237
205
  * This will create a document in database and upload the file to Amazon Simple Storage Service (S3). **Required Permissions** \"document-management.documents.create\"
238
206
  * @summary Create the document
@@ -296,7 +264,7 @@ export declare const DocumentsApiFactory: (configuration?: Configuration, basePa
296
264
  */
297
265
  listDocuments(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListDocumentsResponseClass>;
298
266
  /**
299
- * This will save an external document in the database and return it. This is useful if one needs to call a third party API and store the document in EIS and then, for instance, send it to a client. **Required Permissions** \"document-management.documents.create\"
267
+ * This will save an external document in the database and return it. This is useful if one needs to call a third party API and store the document in EIS and then, for instance, send it to a client. **Required Permissions** \"document-management.documents.create\"
300
268
  * @summary Save external document
301
269
  * @param {SaveExternalDocumentRequestDto} saveExternalDocumentRequestDto
302
270
  * @param {string} [authorization] Bearer Token
@@ -315,31 +283,6 @@ export declare const DocumentsApiFactory: (configuration?: Configuration, basePa
315
283
  */
316
284
  updateDocument(code: string, updateDocumentRequestDto: UpdateDocumentRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateDocumentResponseClass>;
317
285
  };
318
- /**
319
- * Request parameters for convertToBase64 operation in DocumentsApi.
320
- * @export
321
- * @interface DocumentsApiConvertToBase64Request
322
- */
323
- export interface DocumentsApiConvertToBase64Request {
324
- /**
325
- * Document code
326
- * @type {string}
327
- * @memberof DocumentsApiConvertToBase64
328
- */
329
- readonly code: string;
330
- /**
331
- *
332
- * @type {ConvertToBase64RequestDto}
333
- * @memberof DocumentsApiConvertToBase64
334
- */
335
- readonly convertToBase64RequestDto: ConvertToBase64RequestDto;
336
- /**
337
- * Bearer Token
338
- * @type {string}
339
- * @memberof DocumentsApiConvertToBase64
340
- */
341
- readonly authorization?: string;
342
- }
343
286
  /**
344
287
  * Request parameters for createDocument operation in DocumentsApi.
345
288
  * @export
@@ -553,15 +496,6 @@ export interface DocumentsApiUpdateDocumentRequest {
553
496
  * @extends {BaseAPI}
554
497
  */
555
498
  export declare class DocumentsApi extends BaseAPI {
556
- /**
557
- * Converts a document to base64 format with optional gzip compression for Zurich integration **Required Permissions** \"document-management.documents.view\"
558
- * @summary Convert document to base64
559
- * @param {DocumentsApiConvertToBase64Request} requestParameters Request parameters.
560
- * @param {*} [options] Override http request option.
561
- * @throws {RequiredError}
562
- * @memberof DocumentsApi
563
- */
564
- convertToBase64(requestParameters: DocumentsApiConvertToBase64Request, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ConvertToBase64ResponseClass, any>>;
565
499
  /**
566
500
  * This will create a document in database and upload the file to Amazon Simple Storage Service (S3). **Required Permissions** \"document-management.documents.create\"
567
501
  * @summary Create the document
@@ -617,7 +551,7 @@ export declare class DocumentsApi extends BaseAPI {
617
551
  */
618
552
  listDocuments(requestParameters?: DocumentsApiListDocumentsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListDocumentsResponseClass, any>>;
619
553
  /**
620
- * This will save an external document in the database and return it. This is useful if one needs to call a third party API and store the document in EIS and then, for instance, send it to a client. **Required Permissions** \"document-management.documents.create\"
554
+ * This will save an external document in the database and return it. This is useful if one needs to call a third party API and store the document in EIS and then, for instance, send it to a client. **Required Permissions** \"document-management.documents.create\"
621
555
  * @summary Save external document
622
556
  * @param {DocumentsApiSaveExternalDocumentRequest} requestParameters Request parameters.
623
557
  * @param {*} [options] Override http request option.
@@ -96,59 +96,6 @@ var FormData = require('form-data');
96
96
  var DocumentsApiAxiosParamCreator = function (configuration) {
97
97
  var _this = this;
98
98
  return {
99
- /**
100
- * Converts a document to base64 format with optional gzip compression for Zurich integration **Required Permissions** \"document-management.documents.view\"
101
- * @summary Convert document to base64
102
- * @param {string} code Document code
103
- * @param {ConvertToBase64RequestDto} convertToBase64RequestDto
104
- * @param {string} [authorization] Bearer Token
105
- * @param {*} [options] Override http request option.
106
- * @throws {RequiredError}
107
- */
108
- convertToBase64: function (code, convertToBase64RequestDto, 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)('convertToBase64', 'code', code);
117
- // verify required parameter 'convertToBase64RequestDto' is not null or undefined
118
- (0, common_1.assertParamExists)('convertToBase64', 'convertToBase64RequestDto', convertToBase64RequestDto);
119
- localVarPath = "/documentservice/v1/documents/{code}/base64"
120
- .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
121
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
122
- if (configuration) {
123
- baseOptions = configuration.baseOptions;
124
- baseAccessToken = configuration.accessToken;
125
- }
126
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
127
- localVarHeaderParameter = {};
128
- localVarQueryParameter = {};
129
- // authentication bearer required
130
- // http bearer authentication required
131
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
132
- case 1:
133
- // authentication bearer required
134
- // http bearer authentication required
135
- _a.sent();
136
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
137
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
138
- }
139
- localVarHeaderParameter['Content-Type'] = 'application/json';
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
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(convertToBase64RequestDto, localVarRequestOptions, configuration);
144
- return [2 /*return*/, {
145
- url: (0, common_1.toPathString)(localVarUrlObj),
146
- options: localVarRequestOptions,
147
- }];
148
- }
149
- });
150
- });
151
- },
152
99
  /**
153
100
  * This will create a document in database and upload the file to Amazon Simple Storage Service (S3). **Required Permissions** \"document-management.documents.create\"
154
101
  * @summary Create the document
@@ -474,7 +421,7 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
474
421
  });
475
422
  },
476
423
  /**
477
- * This will save an external document in the database and return it. This is useful if one needs to call a third party API and store the document in EIS and then, for instance, send it to a client. **Required Permissions** \"document-management.documents.create\"
424
+ * This will save an external document in the database and return it. This is useful if one needs to call a third party API and store the document in EIS and then, for instance, send it to a client. **Required Permissions** \"document-management.documents.create\"
478
425
  * @summary Save external document
479
426
  * @param {SaveExternalDocumentRequestDto} saveExternalDocumentRequestDto
480
427
  * @param {string} [authorization] Bearer Token
@@ -585,28 +532,6 @@ exports.DocumentsApiAxiosParamCreator = DocumentsApiAxiosParamCreator;
585
532
  var DocumentsApiFp = function (configuration) {
586
533
  var localVarAxiosParamCreator = (0, exports.DocumentsApiAxiosParamCreator)(configuration);
587
534
  return {
588
- /**
589
- * Converts a document to base64 format with optional gzip compression for Zurich integration **Required Permissions** \"document-management.documents.view\"
590
- * @summary Convert document to base64
591
- * @param {string} code Document code
592
- * @param {ConvertToBase64RequestDto} convertToBase64RequestDto
593
- * @param {string} [authorization] Bearer Token
594
- * @param {*} [options] Override http request option.
595
- * @throws {RequiredError}
596
- */
597
- convertToBase64: function (code, convertToBase64RequestDto, authorization, options) {
598
- return __awaiter(this, void 0, void 0, function () {
599
- var localVarAxiosArgs;
600
- return __generator(this, function (_a) {
601
- switch (_a.label) {
602
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.convertToBase64(code, convertToBase64RequestDto, authorization, options)];
603
- case 1:
604
- localVarAxiosArgs = _a.sent();
605
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
606
- }
607
- });
608
- });
609
- },
610
535
  /**
611
536
  * This will create a document in database and upload the file to Amazon Simple Storage Service (S3). **Required Permissions** \"document-management.documents.create\"
612
537
  * @summary Create the document
@@ -742,7 +667,7 @@ var DocumentsApiFp = function (configuration) {
742
667
  });
743
668
  },
744
669
  /**
745
- * This will save an external document in the database and return it. This is useful if one needs to call a third party API and store the document in EIS and then, for instance, send it to a client. **Required Permissions** \"document-management.documents.create\"
670
+ * This will save an external document in the database and return it. This is useful if one needs to call a third party API and store the document in EIS and then, for instance, send it to a client. **Required Permissions** \"document-management.documents.create\"
746
671
  * @summary Save external document
747
672
  * @param {SaveExternalDocumentRequestDto} saveExternalDocumentRequestDto
748
673
  * @param {string} [authorization] Bearer Token
@@ -794,18 +719,6 @@ exports.DocumentsApiFp = DocumentsApiFp;
794
719
  var DocumentsApiFactory = function (configuration, basePath, axios) {
795
720
  var localVarFp = (0, exports.DocumentsApiFp)(configuration);
796
721
  return {
797
- /**
798
- * Converts a document to base64 format with optional gzip compression for Zurich integration **Required Permissions** \"document-management.documents.view\"
799
- * @summary Convert document to base64
800
- * @param {string} code Document code
801
- * @param {ConvertToBase64RequestDto} convertToBase64RequestDto
802
- * @param {string} [authorization] Bearer Token
803
- * @param {*} [options] Override http request option.
804
- * @throws {RequiredError}
805
- */
806
- convertToBase64: function (code, convertToBase64RequestDto, authorization, options) {
807
- return localVarFp.convertToBase64(code, convertToBase64RequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
808
- },
809
722
  /**
810
723
  * This will create a document in database and upload the file to Amazon Simple Storage Service (S3). **Required Permissions** \"document-management.documents.create\"
811
724
  * @summary Create the document
@@ -881,7 +794,7 @@ var DocumentsApiFactory = function (configuration, basePath, axios) {
881
794
  return localVarFp.listDocuments(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
882
795
  },
883
796
  /**
884
- * This will save an external document in the database and return it. This is useful if one needs to call a third party API and store the document in EIS and then, for instance, send it to a client. **Required Permissions** \"document-management.documents.create\"
797
+ * This will save an external document in the database and return it. This is useful if one needs to call a third party API and store the document in EIS and then, for instance, send it to a client. **Required Permissions** \"document-management.documents.create\"
885
798
  * @summary Save external document
886
799
  * @param {SaveExternalDocumentRequestDto} saveExternalDocumentRequestDto
887
800
  * @param {string} [authorization] Bearer Token
@@ -917,18 +830,6 @@ var DocumentsApi = /** @class */ (function (_super) {
917
830
  function DocumentsApi() {
918
831
  return _super !== null && _super.apply(this, arguments) || this;
919
832
  }
920
- /**
921
- * Converts a document to base64 format with optional gzip compression for Zurich integration **Required Permissions** \"document-management.documents.view\"
922
- * @summary Convert document to base64
923
- * @param {DocumentsApiConvertToBase64Request} requestParameters Request parameters.
924
- * @param {*} [options] Override http request option.
925
- * @throws {RequiredError}
926
- * @memberof DocumentsApi
927
- */
928
- DocumentsApi.prototype.convertToBase64 = function (requestParameters, options) {
929
- var _this = this;
930
- return (0, exports.DocumentsApiFp)(this.configuration).convertToBase64(requestParameters.code, requestParameters.convertToBase64RequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
931
- };
932
833
  /**
933
834
  * This will create a document in database and upload the file to Amazon Simple Storage Service (S3). **Required Permissions** \"document-management.documents.create\"
934
835
  * @summary Create the document
@@ -1003,7 +904,7 @@ var DocumentsApi = /** @class */ (function (_super) {
1003
904
  return (0, exports.DocumentsApiFp)(this.configuration).listDocuments(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
1004
905
  };
1005
906
  /**
1006
- * This will save an external document in the database and return it. This is useful if one needs to call a third party API and store the document in EIS and then, for instance, send it to a client. **Required Permissions** \"document-management.documents.create\"
907
+ * This will save an external document in the database and return it. This is useful if one needs to call a third party API and store the document in EIS and then, for instance, send it to a client. **Required Permissions** \"document-management.documents.create\"
1007
908
  * @summary Save external document
1008
909
  * @param {DocumentsApiSaveExternalDocumentRequest} requestParameters Request parameters.
1009
910
  * @param {*} [options] Override http request option.
package/dist/base.d.ts CHANGED
@@ -26,6 +26,14 @@ export interface LoginClass {
26
26
  accessToken: string;
27
27
  permissions: string;
28
28
  }
29
+ export interface SwitchWorkspaceRequest {
30
+ username: string;
31
+ targetWorkspace: string;
32
+ }
33
+ export interface SwitchWorkspaceResponseClass {
34
+ accessToken: string;
35
+ permissions: string;
36
+ }
29
37
  export declare enum Environment {
30
38
  Production = "https://apiv2.emil.de",
31
39
  Test = "https://apiv2-test.emil.de",
@@ -55,12 +63,13 @@ export declare class BaseAPI {
55
63
  private username?;
56
64
  private password?;
57
65
  constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
58
- initialize(env?: Environment): Promise<void>;
66
+ initialize(env?: Environment, targetWorkspace?: string): Promise<void>;
59
67
  private loadCredentials;
60
68
  private readConfigFile;
61
69
  private readEnvVariables;
62
70
  selectEnvironment(env: Environment): void;
63
- authorize(username: string, password: string): Promise<void>;
71
+ authorize(username: string, password: string, targetWorkspace?: string): Promise<void>;
72
+ switchWorkspace(targetWorkspace: string): Promise<void>;
64
73
  refreshTokenInternal(): Promise<string>;
65
74
  private extractRefreshToken;
66
75
  getConfiguration(): Configuration;
package/dist/base.js CHANGED
@@ -162,7 +162,7 @@ var BaseAPI = /** @class */ (function () {
162
162
  }
163
163
  this.attachInterceptor(axios);
164
164
  }
165
- BaseAPI.prototype.initialize = function (env) {
165
+ BaseAPI.prototype.initialize = function (env, targetWorkspace) {
166
166
  if (env === void 0) { env = Environment.Production; }
167
167
  return __awaiter(this, void 0, void 0, function () {
168
168
  return __generator(this, function (_a) {
@@ -173,7 +173,7 @@ var BaseAPI = /** @class */ (function () {
173
173
  case 1:
174
174
  _a.sent();
175
175
  if (!this.username) return [3 /*break*/, 3];
176
- return [4 /*yield*/, this.authorize(this.username, this.password)];
176
+ return [4 /*yield*/, this.authorize(this.username, this.password, targetWorkspace)];
177
177
  case 2:
178
178
  _a.sent();
179
179
  this.password = null; // to avoid keeping password loaded in memory.
@@ -243,7 +243,7 @@ var BaseAPI = /** @class */ (function () {
243
243
  BaseAPI.prototype.selectEnvironment = function (env) {
244
244
  this.configuration.basePath = env;
245
245
  };
246
- BaseAPI.prototype.authorize = function (username, password) {
246
+ BaseAPI.prototype.authorize = function (username, password, targetWorkspace) {
247
247
  return __awaiter(this, void 0, void 0, function () {
248
248
  var options, response, accessToken, refreshToken;
249
249
  return __generator(this, function (_a) {
@@ -267,6 +267,45 @@ var BaseAPI = /** @class */ (function () {
267
267
  this.configuration.accessToken = "Bearer ".concat(accessToken);
268
268
  refreshToken = this.extractRefreshToken(response);
269
269
  this.configuration.refreshToken = refreshToken;
270
+ if (!targetWorkspace) return [3 /*break*/, 3];
271
+ return [4 /*yield*/, this.switchWorkspace(targetWorkspace)];
272
+ case 2:
273
+ _a.sent();
274
+ _a.label = 3;
275
+ case 3: return [2 /*return*/];
276
+ }
277
+ });
278
+ });
279
+ };
280
+ BaseAPI.prototype.switchWorkspace = function (targetWorkspace) {
281
+ return __awaiter(this, void 0, void 0, function () {
282
+ var options, response, accessToken, refreshToken;
283
+ return __generator(this, function (_a) {
284
+ switch (_a.label) {
285
+ case 0:
286
+ options = {
287
+ method: 'POST',
288
+ url: "".concat(this.configuration.basePath, "/authservice/v1/workspaces/switch"),
289
+ headers: {
290
+ 'Content-Type': 'application/json',
291
+ 'Authorization': "Bearer ".concat(this.configuration.accessToken),
292
+ 'Cookie': this.configuration.refreshToken,
293
+ },
294
+ data: {
295
+ username: this.configuration.username,
296
+ targetWorkspace: targetWorkspace,
297
+ },
298
+ withCredentials: true,
299
+ };
300
+ return [4 /*yield*/, axios_1.default.request(options)];
301
+ case 1:
302
+ response = _a.sent();
303
+ accessToken = response.data.accessToken;
304
+ this.configuration.accessToken = "Bearer ".concat(accessToken);
305
+ refreshToken = this.extractRefreshToken(response);
306
+ if (refreshToken) {
307
+ this.configuration.refreshToken = refreshToken;
308
+ }
270
309
  return [2 /*return*/];
271
310
  }
272
311
  });
@@ -1,6 +1,3 @@
1
- export * from './base64-metadata-class';
2
- export * from './convert-to-base64-request-dto';
3
- export * from './convert-to-base64-response-class';
4
1
  export * from './create-doc-template-request-dto';
5
2
  export * from './create-doc-template-response-class';
6
3
  export * from './create-document-request-dto';
@@ -14,9 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./base64-metadata-class"), exports);
18
- __exportStar(require("./convert-to-base64-request-dto"), exports);
19
- __exportStar(require("./convert-to-base64-response-class"), exports);
20
17
  __exportStar(require("./create-doc-template-request-dto"), exports);
21
18
  __exportStar(require("./create-doc-template-response-class"), exports);
22
19
  __exportStar(require("./create-document-request-dto"), exports);
package/models/index.ts CHANGED
@@ -1,6 +1,3 @@
1
- export * from './base64-metadata-class';
2
- export * from './convert-to-base64-request-dto';
3
- export * from './convert-to-base64-response-class';
4
1
  export * from './create-doc-template-request-dto';
5
2
  export * from './create-doc-template-response-class';
6
3
  export * from './create-document-request-dto';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emilgroup/document-sdk-node",
3
- "version": "1.39.1-beta.2",
3
+ "version": "1.39.1-beta.3",
4
4
  "description": "OpenAPI client for @emilgroup/document-sdk-node",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [
@@ -1,48 +0,0 @@
1
- /**
2
- * EMIL DocumentService
3
- * The EMIL DocumentService API description
4
- *
5
- * The version of the OpenAPI document: 1.0
6
- * Contact: kontakt@emil.de
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- /**
13
- *
14
- * @export
15
- * @interface Base64MetadataClass
16
- */
17
- export interface Base64MetadataClass {
18
- /**
19
- * Original file size in bytes
20
- * @type {number}
21
- * @memberof Base64MetadataClass
22
- */
23
- 'originalSize': number;
24
- /**
25
- * Compressed file size in bytes (if compression was applied)
26
- * @type {number}
27
- * @memberof Base64MetadataClass
28
- */
29
- 'compressedSize': number;
30
- /**
31
- * Encoding type applied
32
- * @type {string}
33
- * @memberof Base64MetadataClass
34
- */
35
- 'encoding': string;
36
- /**
37
- * MIME type of the original document
38
- * @type {string}
39
- * @memberof Base64MetadataClass
40
- */
41
- 'mimeType': string;
42
- /**
43
- * Whether compression was applied
44
- * @type {boolean}
45
- * @memberof Base64MetadataClass
46
- */
47
- 'compressed': boolean;
48
- }
@@ -1,15 +0,0 @@
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
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,30 +0,0 @@
1
- /**
2
- * EMIL DocumentService
3
- * The EMIL DocumentService API description
4
- *
5
- * The version of the OpenAPI document: 1.0
6
- * Contact: kontakt@emil.de
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- /**
13
- *
14
- * @export
15
- * @interface ConvertToBase64RequestDto
16
- */
17
- export interface ConvertToBase64RequestDto {
18
- /**
19
- * Whether to compress the document before base64 encoding
20
- * @type {boolean}
21
- * @memberof ConvertToBase64RequestDto
22
- */
23
- 'compress'?: boolean;
24
- /**
25
- * Whether to use streaming base64 encoding (memory efficient for large files)
26
- * @type {boolean}
27
- * @memberof ConvertToBase64RequestDto
28
- */
29
- 'stream'?: boolean;
30
- }
@@ -1,15 +0,0 @@
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
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,37 +0,0 @@
1
- /**
2
- * EMIL DocumentService
3
- * The EMIL DocumentService API description
4
- *
5
- * The version of the OpenAPI document: 1.0
6
- * Contact: kontakt@emil.de
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import { Base64MetadataClass } from './base64-metadata-class';
13
- /**
14
- *
15
- * @export
16
- * @interface ConvertToBase64ResponseClass
17
- */
18
- export interface ConvertToBase64ResponseClass {
19
- /**
20
- * Unique document code
21
- * @type {string}
22
- * @memberof ConvertToBase64ResponseClass
23
- */
24
- 'documentCode': string;
25
- /**
26
- * Base64 encoded content of the document
27
- * @type {string}
28
- * @memberof ConvertToBase64ResponseClass
29
- */
30
- 'base64Content': string;
31
- /**
32
- * Metadata about the conversion
33
- * @type {Base64MetadataClass}
34
- * @memberof ConvertToBase64ResponseClass
35
- */
36
- 'metadata': Base64MetadataClass;
37
- }
@@ -1,15 +0,0 @@
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
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,54 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * EMIL DocumentService
5
- * The EMIL DocumentService API description
6
- *
7
- * The version of the OpenAPI document: 1.0
8
- * Contact: kontakt@emil.de
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
-
15
-
16
-
17
- /**
18
- *
19
- * @export
20
- * @interface Base64MetadataClass
21
- */
22
- export interface Base64MetadataClass {
23
- /**
24
- * Original file size in bytes
25
- * @type {number}
26
- * @memberof Base64MetadataClass
27
- */
28
- 'originalSize': number;
29
- /**
30
- * Compressed file size in bytes (if compression was applied)
31
- * @type {number}
32
- * @memberof Base64MetadataClass
33
- */
34
- 'compressedSize': number;
35
- /**
36
- * Encoding type applied
37
- * @type {string}
38
- * @memberof Base64MetadataClass
39
- */
40
- 'encoding': string;
41
- /**
42
- * MIME type of the original document
43
- * @type {string}
44
- * @memberof Base64MetadataClass
45
- */
46
- 'mimeType': string;
47
- /**
48
- * Whether compression was applied
49
- * @type {boolean}
50
- * @memberof Base64MetadataClass
51
- */
52
- 'compressed': boolean;
53
- }
54
-
@@ -1,36 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * EMIL DocumentService
5
- * The EMIL DocumentService API description
6
- *
7
- * The version of the OpenAPI document: 1.0
8
- * Contact: kontakt@emil.de
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
-
15
-
16
-
17
- /**
18
- *
19
- * @export
20
- * @interface ConvertToBase64RequestDto
21
- */
22
- export interface ConvertToBase64RequestDto {
23
- /**
24
- * Whether to compress the document before base64 encoding
25
- * @type {boolean}
26
- * @memberof ConvertToBase64RequestDto
27
- */
28
- 'compress'?: boolean;
29
- /**
30
- * Whether to use streaming base64 encoding (memory efficient for large files)
31
- * @type {boolean}
32
- * @memberof ConvertToBase64RequestDto
33
- */
34
- 'stream'?: boolean;
35
- }
36
-
@@ -1,43 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * EMIL DocumentService
5
- * The EMIL DocumentService API description
6
- *
7
- * The version of the OpenAPI document: 1.0
8
- * Contact: kontakt@emil.de
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
-
15
-
16
- import { Base64MetadataClass } from './base64-metadata-class';
17
-
18
- /**
19
- *
20
- * @export
21
- * @interface ConvertToBase64ResponseClass
22
- */
23
- export interface ConvertToBase64ResponseClass {
24
- /**
25
- * Unique document code
26
- * @type {string}
27
- * @memberof ConvertToBase64ResponseClass
28
- */
29
- 'documentCode': string;
30
- /**
31
- * Base64 encoded content of the document
32
- * @type {string}
33
- * @memberof ConvertToBase64ResponseClass
34
- */
35
- 'base64Content': string;
36
- /**
37
- * Metadata about the conversion
38
- * @type {Base64MetadataClass}
39
- * @memberof ConvertToBase64ResponseClass
40
- */
41
- 'metadata': Base64MetadataClass;
42
- }
43
-