@emilgroup/document-sdk 1.12.2 → 1.12.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/.openapi-generator/FILES +1 -0
- package/README.md +2 -2
- package/api/docx-templates-api.ts +4 -4
- package/api/product-documents-api.ts +12 -210
- package/dist/api/default-api.d.ts +66 -0
- package/dist/api/default-api.js +196 -0
- package/dist/api/document-templates-api.d.ts +385 -0
- package/dist/api/document-templates-api.js +636 -0
- package/dist/api/documents-api.d.ts +488 -0
- package/dist/api/documents-api.js +817 -0
- package/dist/api/docx-templates-api.d.ts +432 -0
- package/dist/api/docx-templates-api.js +722 -0
- package/dist/api/layouts-api.d.ts +385 -0
- package/dist/api/layouts-api.js +638 -0
- package/dist/api/product-documents-api.d.ts +401 -0
- package/dist/api/product-documents-api.js +647 -0
- package/dist/api/search-keywords-api.d.ts +96 -0
- package/dist/api/search-keywords-api.js +225 -0
- package/dist/api/searchable-document-owners-api.d.ts +141 -0
- package/dist/api/searchable-document-owners-api.js +254 -0
- package/dist/api/searchable-documents-api.d.ts +114 -0
- package/dist/api/searchable-documents-api.js +239 -0
- package/dist/api.d.ts +20 -0
- package/dist/api.js +38 -0
- package/dist/base.d.ts +74 -0
- package/dist/base.js +298 -0
- package/dist/common.d.ts +91 -0
- package/dist/common.js +276 -0
- package/dist/configuration.d.ts +83 -0
- package/dist/configuration.js +44 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +36 -0
- package/dist/models/create-doc-template-request-dto.d.ts +55 -0
- package/dist/models/create-doc-template-request-dto.js +15 -0
- package/dist/models/create-doc-template-response-class.d.ts +25 -0
- package/dist/models/create-doc-template-response-class.js +15 -0
- package/dist/models/create-document-request-dto.d.ts +173 -0
- package/dist/models/create-document-request-dto.js +70 -0
- package/dist/models/create-document-sync-response-class.d.ts +25 -0
- package/dist/models/create-document-sync-response-class.js +15 -0
- package/dist/models/create-html-template-dto.d.ts +24 -0
- package/dist/models/create-html-template-dto.js +15 -0
- package/dist/models/create-layout-request-dto.d.ts +49 -0
- package/dist/models/create-layout-request-dto.js +15 -0
- package/dist/models/create-layout-response-class.d.ts +25 -0
- package/dist/models/create-layout-response-class.js +15 -0
- package/dist/models/create-presigned-post-request-dto.d.ts +134 -0
- package/dist/models/create-presigned-post-request-dto.js +52 -0
- package/dist/models/create-presigned-post-response-class.d.ts +30 -0
- package/dist/models/create-presigned-post-response-class.js +15 -0
- package/dist/models/delete-layout-request-dto.d.ts +24 -0
- package/dist/models/delete-layout-request-dto.js +15 -0
- package/dist/models/delete-product-document-request-dto.d.ts +30 -0
- package/dist/models/delete-product-document-request-dto.js +15 -0
- package/dist/models/delete-request-dto.d.ts +24 -0
- package/dist/models/delete-request-dto.js +15 -0
- package/dist/models/delete-response-class.d.ts +24 -0
- package/dist/models/delete-response-class.js +15 -0
- package/dist/models/doc-template-class.d.ts +92 -0
- package/dist/models/doc-template-class.js +15 -0
- package/dist/models/document-class.d.ts +169 -0
- package/dist/models/document-class.js +62 -0
- package/dist/models/docx-template-class.d.ts +101 -0
- package/dist/models/docx-template-class.js +26 -0
- package/dist/models/download-document-request-dto.d.ts +30 -0
- package/dist/models/download-document-request-dto.js +15 -0
- package/dist/models/get-doc-template-request-dto.d.ts +30 -0
- package/dist/models/get-doc-template-request-dto.js +15 -0
- package/dist/models/get-doc-template-response-class.d.ts +25 -0
- package/dist/models/get-doc-template-response-class.js +15 -0
- package/dist/models/get-document-download-url-response-class.d.ts +24 -0
- package/dist/models/get-document-download-url-response-class.js +15 -0
- package/dist/models/get-docx-template-download-url-response-class.d.ts +24 -0
- package/dist/models/get-docx-template-download-url-response-class.js +15 -0
- package/dist/models/get-docx-template-response-class.d.ts +25 -0
- package/dist/models/get-docx-template-response-class.js +15 -0
- package/dist/models/get-layout-request-dto.d.ts +24 -0
- package/dist/models/get-layout-request-dto.js +15 -0
- package/dist/models/get-layout-response-class.d.ts +25 -0
- package/dist/models/get-layout-response-class.js +15 -0
- package/dist/models/get-product-document-download-url-response-class.d.ts +24 -0
- package/dist/models/get-product-document-download-url-response-class.js +15 -0
- package/dist/models/get-product-document-response-class.d.ts +25 -0
- package/dist/models/get-product-document-response-class.js +15 -0
- package/dist/models/get-signed-s3-key-url-response-class.d.ts +24 -0
- package/dist/models/get-signed-s3-key-url-response-class.js +15 -0
- package/dist/models/grpc-create-doc-template-request-dto.d.ts +55 -0
- package/dist/models/grpc-create-doc-template-request-dto.js +15 -0
- package/dist/models/grpc-update-doc-template-request-dto.d.ts +61 -0
- package/dist/models/grpc-update-doc-template-request-dto.js +15 -0
- package/dist/models/html-template-class.d.ts +66 -0
- package/dist/models/html-template-class.js +21 -0
- package/dist/models/index.d.ts +61 -0
- package/dist/models/index.js +77 -0
- package/dist/models/inline-response200.d.ts +54 -0
- package/dist/models/inline-response200.js +15 -0
- package/dist/models/inline-response503.d.ts +54 -0
- package/dist/models/inline-response503.js +15 -0
- package/dist/models/layout-class.d.ts +79 -0
- package/dist/models/layout-class.js +15 -0
- package/dist/models/list-doc-template-request-dto.d.ts +54 -0
- package/dist/models/list-doc-template-request-dto.js +15 -0
- package/dist/models/list-doc-templates-response-class.d.ts +31 -0
- package/dist/models/list-doc-templates-response-class.js +15 -0
- package/dist/models/list-documents-response-class.d.ts +31 -0
- package/dist/models/list-documents-response-class.js +15 -0
- package/dist/models/list-docx-templates-response-class.d.ts +31 -0
- package/dist/models/list-docx-templates-response-class.js +15 -0
- package/dist/models/list-layouts-response-class.d.ts +31 -0
- package/dist/models/list-layouts-response-class.js +15 -0
- package/dist/models/list-product-documents-response-class.d.ts +31 -0
- package/dist/models/list-product-documents-response-class.js +15 -0
- package/dist/models/list-request-dto.d.ts +54 -0
- package/dist/models/list-request-dto.js +15 -0
- package/dist/models/list-search-keywords-request-dto.d.ts +24 -0
- package/dist/models/list-search-keywords-request-dto.js +15 -0
- package/dist/models/list-search-keywords-response-class.d.ts +24 -0
- package/dist/models/list-search-keywords-response-class.js +15 -0
- package/dist/models/list-searchable-document-owners-request-dto.d.ts +31 -0
- package/dist/models/list-searchable-document-owners-request-dto.js +22 -0
- package/dist/models/list-searchable-document-owners-response-class.d.ts +25 -0
- package/dist/models/list-searchable-document-owners-response-class.js +15 -0
- package/dist/models/list-searchable-documents-request-dto.d.ts +43 -0
- package/dist/models/list-searchable-documents-request-dto.js +22 -0
- package/dist/models/list-searchable-documents-response-class.d.ts +31 -0
- package/dist/models/list-searchable-documents-response-class.js +15 -0
- package/dist/models/product-document-class.d.ts +134 -0
- package/dist/models/product-document-class.js +46 -0
- package/dist/models/searchable-document-class.d.ts +66 -0
- package/dist/models/searchable-document-class.js +15 -0
- package/dist/models/searchable-document-owner-class.d.ts +30 -0
- package/dist/models/searchable-document-owner-class.js +15 -0
- package/dist/models/shared-update-docx-template-request-dto.d.ts +36 -0
- package/dist/models/shared-update-docx-template-request-dto.js +15 -0
- package/dist/models/update-doc-template-request-dto.d.ts +61 -0
- package/dist/models/update-doc-template-request-dto.js +15 -0
- package/dist/models/update-doc-template-response-class.d.ts +25 -0
- package/dist/models/update-doc-template-response-class.js +15 -0
- package/dist/models/update-document-request-dto.d.ts +54 -0
- package/dist/models/update-document-request-dto.js +15 -0
- package/dist/models/update-document-response-class.d.ts +25 -0
- package/dist/models/update-document-response-class.js +15 -0
- package/dist/models/update-docx-template-response-class.d.ts +25 -0
- package/dist/models/update-docx-template-response-class.js +15 -0
- package/dist/models/update-html-template-dto.d.ts +42 -0
- package/dist/models/update-html-template-dto.js +21 -0
- package/dist/models/update-layout-request-dto.d.ts +55 -0
- package/dist/models/update-layout-request-dto.js +15 -0
- package/dist/models/update-layout-response-class.d.ts +25 -0
- package/dist/models/update-layout-response-class.js +15 -0
- package/dist/models/upload-docx-template-request-dto.d.ts +54 -0
- package/dist/models/upload-docx-template-request-dto.js +15 -0
- package/dist/models/upload-docx-template-response-class.d.ts +30 -0
- package/dist/models/upload-docx-template-response-class.js +15 -0
- package/dist/models/upload-product-document-request-dto.d.ts +75 -0
- package/dist/models/upload-product-document-request-dto.js +24 -0
- package/models/create-document-request-dto.ts +13 -1
- package/models/document-class.ts +13 -1
- package/models/docx-template-class.ts +15 -1
- package/models/index.ts +1 -0
- package/models/inline-response200.ts +6 -6
- package/models/inline-response503.ts +6 -6
- package/models/product-document-class.ts +27 -9
- package/models/upload-docx-template-response-class.ts +36 -0
- package/package.json +1 -1
|
@@ -0,0 +1,817 @@
|
|
|
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.DocumentsApi = exports.DocumentsApiFactory = exports.DocumentsApiFp = exports.DocumentsApiAxiosParamCreator = void 0;
|
|
82
|
+
var axios_1 = __importDefault(require("axios"));
|
|
83
|
+
// Some imports not used depending on template conditions
|
|
84
|
+
// @ts-ignore
|
|
85
|
+
var common_1 = require("../common");
|
|
86
|
+
// @ts-ignore
|
|
87
|
+
var base_1 = require("../base");
|
|
88
|
+
/**
|
|
89
|
+
* DocumentsApi - axios parameter creator
|
|
90
|
+
* @export
|
|
91
|
+
*/
|
|
92
|
+
var DocumentsApiAxiosParamCreator = function (configuration) {
|
|
93
|
+
var _this = this;
|
|
94
|
+
return {
|
|
95
|
+
/**
|
|
96
|
+
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3).
|
|
97
|
+
* @summary Create the document
|
|
98
|
+
* @param {CreateDocumentRequestDto} createDocumentRequestDto
|
|
99
|
+
* @param {string} [authorization] Bearer Token
|
|
100
|
+
* @param {*} [options] Override http request option.
|
|
101
|
+
* @throws {RequiredError}
|
|
102
|
+
*/
|
|
103
|
+
createDocument: function (createDocumentRequestDto, authorization, options) {
|
|
104
|
+
if (options === void 0) { options = {}; }
|
|
105
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
106
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
107
|
+
return __generator(this, function (_a) {
|
|
108
|
+
switch (_a.label) {
|
|
109
|
+
case 0:
|
|
110
|
+
// verify required parameter 'createDocumentRequestDto' is not null or undefined
|
|
111
|
+
(0, common_1.assertParamExists)('createDocument', 'createDocumentRequestDto', createDocumentRequestDto);
|
|
112
|
+
localVarPath = "/documentservice/v1/documents";
|
|
113
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
114
|
+
if (configuration) {
|
|
115
|
+
baseOptions = configuration.baseOptions;
|
|
116
|
+
baseAccessToken = configuration.accessToken;
|
|
117
|
+
}
|
|
118
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
119
|
+
localVarHeaderParameter = {};
|
|
120
|
+
localVarQueryParameter = {};
|
|
121
|
+
// authentication bearer required
|
|
122
|
+
// http bearer authentication required
|
|
123
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
124
|
+
case 1:
|
|
125
|
+
// authentication bearer required
|
|
126
|
+
// http bearer authentication required
|
|
127
|
+
_a.sent();
|
|
128
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
129
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
130
|
+
}
|
|
131
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
132
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
133
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
134
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
135
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createDocumentRequestDto, localVarRequestOptions, configuration);
|
|
136
|
+
return [2 /*return*/, {
|
|
137
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
138
|
+
options: localVarRequestOptions,
|
|
139
|
+
}];
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
},
|
|
144
|
+
/**
|
|
145
|
+
* This will create a URL that allows user upload its documents in Database.The URL will be expires between 5 minutes to 7 days.
|
|
146
|
+
* @summary Upload documents using pre-signed URL
|
|
147
|
+
* @param {CreatePresignedPostRequestDto} createPresignedPostRequestDto
|
|
148
|
+
* @param {string} [authorization] Bearer Token
|
|
149
|
+
* @param {*} [options] Override http request option.
|
|
150
|
+
* @throws {RequiredError}
|
|
151
|
+
*/
|
|
152
|
+
createPresignedPost: function (createPresignedPostRequestDto, authorization, options) {
|
|
153
|
+
if (options === void 0) { options = {}; }
|
|
154
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
155
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
156
|
+
return __generator(this, function (_a) {
|
|
157
|
+
switch (_a.label) {
|
|
158
|
+
case 0:
|
|
159
|
+
// verify required parameter 'createPresignedPostRequestDto' is not null or undefined
|
|
160
|
+
(0, common_1.assertParamExists)('createPresignedPost', 'createPresignedPostRequestDto', createPresignedPostRequestDto);
|
|
161
|
+
localVarPath = "/documentservice/v1/documents/pre-signed-post";
|
|
162
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
163
|
+
if (configuration) {
|
|
164
|
+
baseOptions = configuration.baseOptions;
|
|
165
|
+
baseAccessToken = configuration.accessToken;
|
|
166
|
+
}
|
|
167
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
168
|
+
localVarHeaderParameter = {};
|
|
169
|
+
localVarQueryParameter = {};
|
|
170
|
+
// authentication bearer required
|
|
171
|
+
// http bearer authentication required
|
|
172
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
173
|
+
case 1:
|
|
174
|
+
// authentication bearer required
|
|
175
|
+
// http bearer authentication required
|
|
176
|
+
_a.sent();
|
|
177
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
178
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
179
|
+
}
|
|
180
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
181
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
182
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
183
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
184
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createPresignedPostRequestDto, localVarRequestOptions, configuration);
|
|
185
|
+
return [2 /*return*/, {
|
|
186
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
187
|
+
options: localVarRequestOptions,
|
|
188
|
+
}];
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
});
|
|
192
|
+
},
|
|
193
|
+
/**
|
|
194
|
+
* Permanently deletes the document. Supply the unique code that was returned when you created the document and this will delete it.
|
|
195
|
+
* @summary Delete the document
|
|
196
|
+
* @param {string} code
|
|
197
|
+
* @param {string} [authorization] Bearer Token
|
|
198
|
+
* @param {*} [options] Override http request option.
|
|
199
|
+
* @throws {RequiredError}
|
|
200
|
+
*/
|
|
201
|
+
deleteDocument: function (code, authorization, options) {
|
|
202
|
+
if (options === void 0) { options = {}; }
|
|
203
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
204
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
205
|
+
return __generator(this, function (_a) {
|
|
206
|
+
switch (_a.label) {
|
|
207
|
+
case 0:
|
|
208
|
+
// verify required parameter 'code' is not null or undefined
|
|
209
|
+
(0, common_1.assertParamExists)('deleteDocument', 'code', code);
|
|
210
|
+
localVarPath = "/documentservice/v1/documents/{code}"
|
|
211
|
+
.replace("{".concat("code", "}"), encodeURIComponent(String(code)));
|
|
212
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
213
|
+
if (configuration) {
|
|
214
|
+
baseOptions = configuration.baseOptions;
|
|
215
|
+
baseAccessToken = configuration.accessToken;
|
|
216
|
+
}
|
|
217
|
+
localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
|
|
218
|
+
localVarHeaderParameter = {};
|
|
219
|
+
localVarQueryParameter = {};
|
|
220
|
+
// authentication bearer required
|
|
221
|
+
// http bearer authentication required
|
|
222
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
223
|
+
case 1:
|
|
224
|
+
// authentication bearer required
|
|
225
|
+
// http bearer authentication required
|
|
226
|
+
_a.sent();
|
|
227
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
228
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
229
|
+
}
|
|
230
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
231
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
232
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
233
|
+
return [2 /*return*/, {
|
|
234
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
235
|
+
options: localVarRequestOptions,
|
|
236
|
+
}];
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
});
|
|
240
|
+
},
|
|
241
|
+
/**
|
|
242
|
+
* This will return a presigned URL to download the document.
|
|
243
|
+
* @summary Fetches a document download URL
|
|
244
|
+
* @param {string} code
|
|
245
|
+
* @param {string} [authorization] Bearer Token
|
|
246
|
+
* @param {*} [options] Override http request option.
|
|
247
|
+
* @throws {RequiredError}
|
|
248
|
+
*/
|
|
249
|
+
getDocumentDownloadUrl: function (code, authorization, options) {
|
|
250
|
+
if (options === void 0) { options = {}; }
|
|
251
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
252
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
253
|
+
return __generator(this, function (_a) {
|
|
254
|
+
switch (_a.label) {
|
|
255
|
+
case 0:
|
|
256
|
+
// verify required parameter 'code' is not null or undefined
|
|
257
|
+
(0, common_1.assertParamExists)('getDocumentDownloadUrl', 'code', code);
|
|
258
|
+
localVarPath = "/documentservice/v1/documents/{code}/download-url"
|
|
259
|
+
.replace("{".concat("code", "}"), encodeURIComponent(String(code)));
|
|
260
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
261
|
+
if (configuration) {
|
|
262
|
+
baseOptions = configuration.baseOptions;
|
|
263
|
+
baseAccessToken = configuration.accessToken;
|
|
264
|
+
}
|
|
265
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
266
|
+
localVarHeaderParameter = {};
|
|
267
|
+
localVarQueryParameter = {};
|
|
268
|
+
// authentication bearer required
|
|
269
|
+
// http bearer authentication required
|
|
270
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
271
|
+
case 1:
|
|
272
|
+
// authentication bearer required
|
|
273
|
+
// http bearer authentication required
|
|
274
|
+
_a.sent();
|
|
275
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
276
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
277
|
+
}
|
|
278
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
279
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
280
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
281
|
+
return [2 /*return*/, {
|
|
282
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
283
|
+
options: localVarRequestOptions,
|
|
284
|
+
}];
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
});
|
|
288
|
+
},
|
|
289
|
+
/**
|
|
290
|
+
* This will return a presigned URL for a random S3 key
|
|
291
|
+
* @summary Fetches a presigned URL for a S3 key
|
|
292
|
+
* @param {string} s3Key Key for the file in S3 bucket to create the presigned download URL for
|
|
293
|
+
* @param {string} [authorization] Bearer Token
|
|
294
|
+
* @param {*} [options] Override http request option.
|
|
295
|
+
* @throws {RequiredError}
|
|
296
|
+
*/
|
|
297
|
+
getSignedS3keyUrl: function (s3Key, authorization, options) {
|
|
298
|
+
if (options === void 0) { options = {}; }
|
|
299
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
300
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
301
|
+
return __generator(this, function (_a) {
|
|
302
|
+
switch (_a.label) {
|
|
303
|
+
case 0:
|
|
304
|
+
// verify required parameter 's3Key' is not null or undefined
|
|
305
|
+
(0, common_1.assertParamExists)('getSignedS3keyUrl', 's3Key', s3Key);
|
|
306
|
+
localVarPath = "/documentservice/v1/documents/signed-s3-url";
|
|
307
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
308
|
+
if (configuration) {
|
|
309
|
+
baseOptions = configuration.baseOptions;
|
|
310
|
+
baseAccessToken = configuration.accessToken;
|
|
311
|
+
}
|
|
312
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
313
|
+
localVarHeaderParameter = {};
|
|
314
|
+
localVarQueryParameter = {};
|
|
315
|
+
// authentication bearer required
|
|
316
|
+
// http bearer authentication required
|
|
317
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
318
|
+
case 1:
|
|
319
|
+
// authentication bearer required
|
|
320
|
+
// http bearer authentication required
|
|
321
|
+
_a.sent();
|
|
322
|
+
if (s3Key !== undefined) {
|
|
323
|
+
localVarQueryParameter['s3Key'] = s3Key;
|
|
324
|
+
}
|
|
325
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
326
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
327
|
+
}
|
|
328
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
329
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
330
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
331
|
+
return [2 /*return*/, {
|
|
332
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
333
|
+
options: localVarRequestOptions,
|
|
334
|
+
}];
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
});
|
|
338
|
+
},
|
|
339
|
+
/**
|
|
340
|
+
* 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.
|
|
341
|
+
* @summary List documents
|
|
342
|
+
* @param {string} [authorization] Bearer Token
|
|
343
|
+
* @param {number} [pageSize] Page size
|
|
344
|
+
* @param {string} [pageToken] Page token
|
|
345
|
+
* @param {string} [filter] List filter
|
|
346
|
+
* @param {string} [search] Search query
|
|
347
|
+
* @param {string} [order] Ordering criteria
|
|
348
|
+
* @param {string} [expand] Extra fields to fetch
|
|
349
|
+
* @param {*} [options] Override http request option.
|
|
350
|
+
* @throws {RequiredError}
|
|
351
|
+
*/
|
|
352
|
+
listDocuments: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
|
|
353
|
+
if (options === void 0) { options = {}; }
|
|
354
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
355
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
356
|
+
return __generator(this, function (_a) {
|
|
357
|
+
switch (_a.label) {
|
|
358
|
+
case 0:
|
|
359
|
+
localVarPath = "/documentservice/v1/documents";
|
|
360
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
361
|
+
if (configuration) {
|
|
362
|
+
baseOptions = configuration.baseOptions;
|
|
363
|
+
baseAccessToken = configuration.accessToken;
|
|
364
|
+
}
|
|
365
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
366
|
+
localVarHeaderParameter = {};
|
|
367
|
+
localVarQueryParameter = {};
|
|
368
|
+
// authentication bearer required
|
|
369
|
+
// http bearer authentication required
|
|
370
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
371
|
+
case 1:
|
|
372
|
+
// authentication bearer required
|
|
373
|
+
// http bearer authentication required
|
|
374
|
+
_a.sent();
|
|
375
|
+
if (pageSize !== undefined) {
|
|
376
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
377
|
+
}
|
|
378
|
+
if (pageToken !== undefined) {
|
|
379
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
380
|
+
}
|
|
381
|
+
if (filter !== undefined) {
|
|
382
|
+
localVarQueryParameter['filter'] = filter;
|
|
383
|
+
}
|
|
384
|
+
if (search !== undefined) {
|
|
385
|
+
localVarQueryParameter['search'] = search;
|
|
386
|
+
}
|
|
387
|
+
if (order !== undefined) {
|
|
388
|
+
localVarQueryParameter['order'] = order;
|
|
389
|
+
}
|
|
390
|
+
if (expand !== undefined) {
|
|
391
|
+
localVarQueryParameter['expand'] = expand;
|
|
392
|
+
}
|
|
393
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
394
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
395
|
+
}
|
|
396
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
397
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
398
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
399
|
+
return [2 /*return*/, {
|
|
400
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
401
|
+
options: localVarRequestOptions,
|
|
402
|
+
}];
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
});
|
|
406
|
+
},
|
|
407
|
+
/**
|
|
408
|
+
* Updates the specified document by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
409
|
+
* @summary Update the document
|
|
410
|
+
* @param {string} code
|
|
411
|
+
* @param {UpdateDocumentRequestDto} updateDocumentRequestDto
|
|
412
|
+
* @param {string} [authorization] Bearer Token
|
|
413
|
+
* @param {*} [options] Override http request option.
|
|
414
|
+
* @throws {RequiredError}
|
|
415
|
+
*/
|
|
416
|
+
updateDocument: function (code, updateDocumentRequestDto, authorization, options) {
|
|
417
|
+
if (options === void 0) { options = {}; }
|
|
418
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
419
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
420
|
+
return __generator(this, function (_a) {
|
|
421
|
+
switch (_a.label) {
|
|
422
|
+
case 0:
|
|
423
|
+
// verify required parameter 'code' is not null or undefined
|
|
424
|
+
(0, common_1.assertParamExists)('updateDocument', 'code', code);
|
|
425
|
+
// verify required parameter 'updateDocumentRequestDto' is not null or undefined
|
|
426
|
+
(0, common_1.assertParamExists)('updateDocument', 'updateDocumentRequestDto', updateDocumentRequestDto);
|
|
427
|
+
localVarPath = "/documentservice/v1/documents/{code}"
|
|
428
|
+
.replace("{".concat("code", "}"), encodeURIComponent(String(code)));
|
|
429
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
430
|
+
if (configuration) {
|
|
431
|
+
baseOptions = configuration.baseOptions;
|
|
432
|
+
baseAccessToken = configuration.accessToken;
|
|
433
|
+
}
|
|
434
|
+
localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
|
|
435
|
+
localVarHeaderParameter = {};
|
|
436
|
+
localVarQueryParameter = {};
|
|
437
|
+
// authentication bearer required
|
|
438
|
+
// http bearer authentication required
|
|
439
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
440
|
+
case 1:
|
|
441
|
+
// authentication bearer required
|
|
442
|
+
// http bearer authentication required
|
|
443
|
+
_a.sent();
|
|
444
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
445
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
446
|
+
}
|
|
447
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
448
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
449
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
450
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
451
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateDocumentRequestDto, localVarRequestOptions, configuration);
|
|
452
|
+
return [2 /*return*/, {
|
|
453
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
454
|
+
options: localVarRequestOptions,
|
|
455
|
+
}];
|
|
456
|
+
}
|
|
457
|
+
});
|
|
458
|
+
});
|
|
459
|
+
},
|
|
460
|
+
};
|
|
461
|
+
};
|
|
462
|
+
exports.DocumentsApiAxiosParamCreator = DocumentsApiAxiosParamCreator;
|
|
463
|
+
/**
|
|
464
|
+
* DocumentsApi - functional programming interface
|
|
465
|
+
* @export
|
|
466
|
+
*/
|
|
467
|
+
var DocumentsApiFp = function (configuration) {
|
|
468
|
+
var localVarAxiosParamCreator = (0, exports.DocumentsApiAxiosParamCreator)(configuration);
|
|
469
|
+
return {
|
|
470
|
+
/**
|
|
471
|
+
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3).
|
|
472
|
+
* @summary Create the document
|
|
473
|
+
* @param {CreateDocumentRequestDto} createDocumentRequestDto
|
|
474
|
+
* @param {string} [authorization] Bearer Token
|
|
475
|
+
* @param {*} [options] Override http request option.
|
|
476
|
+
* @throws {RequiredError}
|
|
477
|
+
*/
|
|
478
|
+
createDocument: function (createDocumentRequestDto, authorization, options) {
|
|
479
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
480
|
+
var localVarAxiosArgs;
|
|
481
|
+
return __generator(this, function (_a) {
|
|
482
|
+
switch (_a.label) {
|
|
483
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createDocument(createDocumentRequestDto, authorization, options)];
|
|
484
|
+
case 1:
|
|
485
|
+
localVarAxiosArgs = _a.sent();
|
|
486
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
487
|
+
}
|
|
488
|
+
});
|
|
489
|
+
});
|
|
490
|
+
},
|
|
491
|
+
/**
|
|
492
|
+
* This will create a URL that allows user upload its documents in Database.The URL will be expires between 5 minutes to 7 days.
|
|
493
|
+
* @summary Upload documents using pre-signed URL
|
|
494
|
+
* @param {CreatePresignedPostRequestDto} createPresignedPostRequestDto
|
|
495
|
+
* @param {string} [authorization] Bearer Token
|
|
496
|
+
* @param {*} [options] Override http request option.
|
|
497
|
+
* @throws {RequiredError}
|
|
498
|
+
*/
|
|
499
|
+
createPresignedPost: function (createPresignedPostRequestDto, authorization, options) {
|
|
500
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
501
|
+
var localVarAxiosArgs;
|
|
502
|
+
return __generator(this, function (_a) {
|
|
503
|
+
switch (_a.label) {
|
|
504
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createPresignedPost(createPresignedPostRequestDto, authorization, options)];
|
|
505
|
+
case 1:
|
|
506
|
+
localVarAxiosArgs = _a.sent();
|
|
507
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
508
|
+
}
|
|
509
|
+
});
|
|
510
|
+
});
|
|
511
|
+
},
|
|
512
|
+
/**
|
|
513
|
+
* Permanently deletes the document. Supply the unique code that was returned when you created the document and this will delete it.
|
|
514
|
+
* @summary Delete the document
|
|
515
|
+
* @param {string} code
|
|
516
|
+
* @param {string} [authorization] Bearer Token
|
|
517
|
+
* @param {*} [options] Override http request option.
|
|
518
|
+
* @throws {RequiredError}
|
|
519
|
+
*/
|
|
520
|
+
deleteDocument: function (code, authorization, options) {
|
|
521
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
522
|
+
var localVarAxiosArgs;
|
|
523
|
+
return __generator(this, function (_a) {
|
|
524
|
+
switch (_a.label) {
|
|
525
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteDocument(code, authorization, options)];
|
|
526
|
+
case 1:
|
|
527
|
+
localVarAxiosArgs = _a.sent();
|
|
528
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
529
|
+
}
|
|
530
|
+
});
|
|
531
|
+
});
|
|
532
|
+
},
|
|
533
|
+
/**
|
|
534
|
+
* This will return a presigned URL to download the document.
|
|
535
|
+
* @summary Fetches a document download URL
|
|
536
|
+
* @param {string} code
|
|
537
|
+
* @param {string} [authorization] Bearer Token
|
|
538
|
+
* @param {*} [options] Override http request option.
|
|
539
|
+
* @throws {RequiredError}
|
|
540
|
+
*/
|
|
541
|
+
getDocumentDownloadUrl: function (code, authorization, options) {
|
|
542
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
543
|
+
var localVarAxiosArgs;
|
|
544
|
+
return __generator(this, function (_a) {
|
|
545
|
+
switch (_a.label) {
|
|
546
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getDocumentDownloadUrl(code, authorization, options)];
|
|
547
|
+
case 1:
|
|
548
|
+
localVarAxiosArgs = _a.sent();
|
|
549
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
550
|
+
}
|
|
551
|
+
});
|
|
552
|
+
});
|
|
553
|
+
},
|
|
554
|
+
/**
|
|
555
|
+
* This will return a presigned URL for a random S3 key
|
|
556
|
+
* @summary Fetches a presigned URL for a S3 key
|
|
557
|
+
* @param {string} s3Key Key for the file in S3 bucket to create the presigned download URL for
|
|
558
|
+
* @param {string} [authorization] Bearer Token
|
|
559
|
+
* @param {*} [options] Override http request option.
|
|
560
|
+
* @throws {RequiredError}
|
|
561
|
+
*/
|
|
562
|
+
getSignedS3keyUrl: function (s3Key, authorization, options) {
|
|
563
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
564
|
+
var localVarAxiosArgs;
|
|
565
|
+
return __generator(this, function (_a) {
|
|
566
|
+
switch (_a.label) {
|
|
567
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getSignedS3keyUrl(s3Key, authorization, options)];
|
|
568
|
+
case 1:
|
|
569
|
+
localVarAxiosArgs = _a.sent();
|
|
570
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
571
|
+
}
|
|
572
|
+
});
|
|
573
|
+
});
|
|
574
|
+
},
|
|
575
|
+
/**
|
|
576
|
+
* 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.
|
|
577
|
+
* @summary List documents
|
|
578
|
+
* @param {string} [authorization] Bearer Token
|
|
579
|
+
* @param {number} [pageSize] Page size
|
|
580
|
+
* @param {string} [pageToken] Page token
|
|
581
|
+
* @param {string} [filter] List filter
|
|
582
|
+
* @param {string} [search] Search query
|
|
583
|
+
* @param {string} [order] Ordering criteria
|
|
584
|
+
* @param {string} [expand] Extra fields to fetch
|
|
585
|
+
* @param {*} [options] Override http request option.
|
|
586
|
+
* @throws {RequiredError}
|
|
587
|
+
*/
|
|
588
|
+
listDocuments: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
|
|
589
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
590
|
+
var localVarAxiosArgs;
|
|
591
|
+
return __generator(this, function (_a) {
|
|
592
|
+
switch (_a.label) {
|
|
593
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listDocuments(authorization, pageSize, pageToken, filter, search, order, expand, options)];
|
|
594
|
+
case 1:
|
|
595
|
+
localVarAxiosArgs = _a.sent();
|
|
596
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
597
|
+
}
|
|
598
|
+
});
|
|
599
|
+
});
|
|
600
|
+
},
|
|
601
|
+
/**
|
|
602
|
+
* Updates the specified document by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
603
|
+
* @summary Update the document
|
|
604
|
+
* @param {string} code
|
|
605
|
+
* @param {UpdateDocumentRequestDto} updateDocumentRequestDto
|
|
606
|
+
* @param {string} [authorization] Bearer Token
|
|
607
|
+
* @param {*} [options] Override http request option.
|
|
608
|
+
* @throws {RequiredError}
|
|
609
|
+
*/
|
|
610
|
+
updateDocument: function (code, updateDocumentRequestDto, authorization, options) {
|
|
611
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
612
|
+
var localVarAxiosArgs;
|
|
613
|
+
return __generator(this, function (_a) {
|
|
614
|
+
switch (_a.label) {
|
|
615
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateDocument(code, updateDocumentRequestDto, authorization, options)];
|
|
616
|
+
case 1:
|
|
617
|
+
localVarAxiosArgs = _a.sent();
|
|
618
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
619
|
+
}
|
|
620
|
+
});
|
|
621
|
+
});
|
|
622
|
+
},
|
|
623
|
+
};
|
|
624
|
+
};
|
|
625
|
+
exports.DocumentsApiFp = DocumentsApiFp;
|
|
626
|
+
/**
|
|
627
|
+
* DocumentsApi - factory interface
|
|
628
|
+
* @export
|
|
629
|
+
*/
|
|
630
|
+
var DocumentsApiFactory = function (configuration, basePath, axios) {
|
|
631
|
+
var localVarFp = (0, exports.DocumentsApiFp)(configuration);
|
|
632
|
+
return {
|
|
633
|
+
/**
|
|
634
|
+
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3).
|
|
635
|
+
* @summary Create the document
|
|
636
|
+
* @param {CreateDocumentRequestDto} createDocumentRequestDto
|
|
637
|
+
* @param {string} [authorization] Bearer Token
|
|
638
|
+
* @param {*} [options] Override http request option.
|
|
639
|
+
* @throws {RequiredError}
|
|
640
|
+
*/
|
|
641
|
+
createDocument: function (createDocumentRequestDto, authorization, options) {
|
|
642
|
+
return localVarFp.createDocument(createDocumentRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
643
|
+
},
|
|
644
|
+
/**
|
|
645
|
+
* This will create a URL that allows user upload its documents in Database.The URL will be expires between 5 minutes to 7 days.
|
|
646
|
+
* @summary Upload documents using pre-signed URL
|
|
647
|
+
* @param {CreatePresignedPostRequestDto} createPresignedPostRequestDto
|
|
648
|
+
* @param {string} [authorization] Bearer Token
|
|
649
|
+
* @param {*} [options] Override http request option.
|
|
650
|
+
* @throws {RequiredError}
|
|
651
|
+
*/
|
|
652
|
+
createPresignedPost: function (createPresignedPostRequestDto, authorization, options) {
|
|
653
|
+
return localVarFp.createPresignedPost(createPresignedPostRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
654
|
+
},
|
|
655
|
+
/**
|
|
656
|
+
* Permanently deletes the document. Supply the unique code that was returned when you created the document and this will delete it.
|
|
657
|
+
* @summary Delete the document
|
|
658
|
+
* @param {string} code
|
|
659
|
+
* @param {string} [authorization] Bearer Token
|
|
660
|
+
* @param {*} [options] Override http request option.
|
|
661
|
+
* @throws {RequiredError}
|
|
662
|
+
*/
|
|
663
|
+
deleteDocument: function (code, authorization, options) {
|
|
664
|
+
return localVarFp.deleteDocument(code, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
665
|
+
},
|
|
666
|
+
/**
|
|
667
|
+
* This will return a presigned URL to download the document.
|
|
668
|
+
* @summary Fetches a document download URL
|
|
669
|
+
* @param {string} code
|
|
670
|
+
* @param {string} [authorization] Bearer Token
|
|
671
|
+
* @param {*} [options] Override http request option.
|
|
672
|
+
* @throws {RequiredError}
|
|
673
|
+
*/
|
|
674
|
+
getDocumentDownloadUrl: function (code, authorization, options) {
|
|
675
|
+
return localVarFp.getDocumentDownloadUrl(code, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
676
|
+
},
|
|
677
|
+
/**
|
|
678
|
+
* This will return a presigned URL for a random S3 key
|
|
679
|
+
* @summary Fetches a presigned URL for a S3 key
|
|
680
|
+
* @param {string} s3Key Key for the file in S3 bucket to create the presigned download URL for
|
|
681
|
+
* @param {string} [authorization] Bearer Token
|
|
682
|
+
* @param {*} [options] Override http request option.
|
|
683
|
+
* @throws {RequiredError}
|
|
684
|
+
*/
|
|
685
|
+
getSignedS3keyUrl: function (s3Key, authorization, options) {
|
|
686
|
+
return localVarFp.getSignedS3keyUrl(s3Key, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
687
|
+
},
|
|
688
|
+
/**
|
|
689
|
+
* 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.
|
|
690
|
+
* @summary List documents
|
|
691
|
+
* @param {string} [authorization] Bearer Token
|
|
692
|
+
* @param {number} [pageSize] Page size
|
|
693
|
+
* @param {string} [pageToken] Page token
|
|
694
|
+
* @param {string} [filter] List filter
|
|
695
|
+
* @param {string} [search] Search query
|
|
696
|
+
* @param {string} [order] Ordering criteria
|
|
697
|
+
* @param {string} [expand] Extra fields to fetch
|
|
698
|
+
* @param {*} [options] Override http request option.
|
|
699
|
+
* @throws {RequiredError}
|
|
700
|
+
*/
|
|
701
|
+
listDocuments: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
|
|
702
|
+
return localVarFp.listDocuments(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
|
|
703
|
+
},
|
|
704
|
+
/**
|
|
705
|
+
* Updates the specified document by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
706
|
+
* @summary Update the document
|
|
707
|
+
* @param {string} code
|
|
708
|
+
* @param {UpdateDocumentRequestDto} updateDocumentRequestDto
|
|
709
|
+
* @param {string} [authorization] Bearer Token
|
|
710
|
+
* @param {*} [options] Override http request option.
|
|
711
|
+
* @throws {RequiredError}
|
|
712
|
+
*/
|
|
713
|
+
updateDocument: function (code, updateDocumentRequestDto, authorization, options) {
|
|
714
|
+
return localVarFp.updateDocument(code, updateDocumentRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
715
|
+
},
|
|
716
|
+
};
|
|
717
|
+
};
|
|
718
|
+
exports.DocumentsApiFactory = DocumentsApiFactory;
|
|
719
|
+
/**
|
|
720
|
+
* DocumentsApi - object-oriented interface
|
|
721
|
+
* @export
|
|
722
|
+
* @class DocumentsApi
|
|
723
|
+
* @extends {BaseAPI}
|
|
724
|
+
*/
|
|
725
|
+
var DocumentsApi = /** @class */ (function (_super) {
|
|
726
|
+
__extends(DocumentsApi, _super);
|
|
727
|
+
function DocumentsApi() {
|
|
728
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
729
|
+
}
|
|
730
|
+
/**
|
|
731
|
+
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3).
|
|
732
|
+
* @summary Create the document
|
|
733
|
+
* @param {DocumentsApiCreateDocumentRequest} requestParameters Request parameters.
|
|
734
|
+
* @param {*} [options] Override http request option.
|
|
735
|
+
* @throws {RequiredError}
|
|
736
|
+
* @memberof DocumentsApi
|
|
737
|
+
*/
|
|
738
|
+
DocumentsApi.prototype.createDocument = function (requestParameters, options) {
|
|
739
|
+
var _this = this;
|
|
740
|
+
return (0, exports.DocumentsApiFp)(this.configuration).createDocument(requestParameters.createDocumentRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
741
|
+
};
|
|
742
|
+
/**
|
|
743
|
+
* This will create a URL that allows user upload its documents in Database.The URL will be expires between 5 minutes to 7 days.
|
|
744
|
+
* @summary Upload documents using pre-signed URL
|
|
745
|
+
* @param {DocumentsApiCreatePresignedPostRequest} requestParameters Request parameters.
|
|
746
|
+
* @param {*} [options] Override http request option.
|
|
747
|
+
* @throws {RequiredError}
|
|
748
|
+
* @memberof DocumentsApi
|
|
749
|
+
*/
|
|
750
|
+
DocumentsApi.prototype.createPresignedPost = function (requestParameters, options) {
|
|
751
|
+
var _this = this;
|
|
752
|
+
return (0, exports.DocumentsApiFp)(this.configuration).createPresignedPost(requestParameters.createPresignedPostRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
753
|
+
};
|
|
754
|
+
/**
|
|
755
|
+
* Permanently deletes the document. Supply the unique code that was returned when you created the document and this will delete it.
|
|
756
|
+
* @summary Delete the document
|
|
757
|
+
* @param {DocumentsApiDeleteDocumentRequest} requestParameters Request parameters.
|
|
758
|
+
* @param {*} [options] Override http request option.
|
|
759
|
+
* @throws {RequiredError}
|
|
760
|
+
* @memberof DocumentsApi
|
|
761
|
+
*/
|
|
762
|
+
DocumentsApi.prototype.deleteDocument = function (requestParameters, options) {
|
|
763
|
+
var _this = this;
|
|
764
|
+
return (0, exports.DocumentsApiFp)(this.configuration).deleteDocument(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
765
|
+
};
|
|
766
|
+
/**
|
|
767
|
+
* This will return a presigned URL to download the document.
|
|
768
|
+
* @summary Fetches a document download URL
|
|
769
|
+
* @param {DocumentsApiGetDocumentDownloadUrlRequest} requestParameters Request parameters.
|
|
770
|
+
* @param {*} [options] Override http request option.
|
|
771
|
+
* @throws {RequiredError}
|
|
772
|
+
* @memberof DocumentsApi
|
|
773
|
+
*/
|
|
774
|
+
DocumentsApi.prototype.getDocumentDownloadUrl = function (requestParameters, options) {
|
|
775
|
+
var _this = this;
|
|
776
|
+
return (0, exports.DocumentsApiFp)(this.configuration).getDocumentDownloadUrl(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
777
|
+
};
|
|
778
|
+
/**
|
|
779
|
+
* This will return a presigned URL for a random S3 key
|
|
780
|
+
* @summary Fetches a presigned URL for a S3 key
|
|
781
|
+
* @param {DocumentsApiGetSignedS3keyUrlRequest} requestParameters Request parameters.
|
|
782
|
+
* @param {*} [options] Override http request option.
|
|
783
|
+
* @throws {RequiredError}
|
|
784
|
+
* @memberof DocumentsApi
|
|
785
|
+
*/
|
|
786
|
+
DocumentsApi.prototype.getSignedS3keyUrl = function (requestParameters, options) {
|
|
787
|
+
var _this = this;
|
|
788
|
+
return (0, exports.DocumentsApiFp)(this.configuration).getSignedS3keyUrl(requestParameters.s3Key, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
789
|
+
};
|
|
790
|
+
/**
|
|
791
|
+
* 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.
|
|
792
|
+
* @summary List documents
|
|
793
|
+
* @param {DocumentsApiListDocumentsRequest} requestParameters Request parameters.
|
|
794
|
+
* @param {*} [options] Override http request option.
|
|
795
|
+
* @throws {RequiredError}
|
|
796
|
+
* @memberof DocumentsApi
|
|
797
|
+
*/
|
|
798
|
+
DocumentsApi.prototype.listDocuments = function (requestParameters, options) {
|
|
799
|
+
var _this = this;
|
|
800
|
+
if (requestParameters === void 0) { requestParameters = {}; }
|
|
801
|
+
return (0, exports.DocumentsApiFp)(this.configuration).listDocuments(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
802
|
+
};
|
|
803
|
+
/**
|
|
804
|
+
* Updates the specified document by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
805
|
+
* @summary Update the document
|
|
806
|
+
* @param {DocumentsApiUpdateDocumentRequest} requestParameters Request parameters.
|
|
807
|
+
* @param {*} [options] Override http request option.
|
|
808
|
+
* @throws {RequiredError}
|
|
809
|
+
* @memberof DocumentsApi
|
|
810
|
+
*/
|
|
811
|
+
DocumentsApi.prototype.updateDocument = function (requestParameters, options) {
|
|
812
|
+
var _this = this;
|
|
813
|
+
return (0, exports.DocumentsApiFp)(this.configuration).updateDocument(requestParameters.code, requestParameters.updateDocumentRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
814
|
+
};
|
|
815
|
+
return DocumentsApi;
|
|
816
|
+
}(base_1.BaseAPI));
|
|
817
|
+
exports.DocumentsApi = DocumentsApi;
|