docspring-ts 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/apis/PDFApi.d.ts +10 -2
- package/dist/apis/PDFApi.js +210 -3
- package/dist/apis/PDFApi.js.map +1 -1
- package/dist/http/isomorphic-fetch.js +1 -1
- package/dist/models/CombinedSubmissionAction.d.ts +1 -1
- package/dist/models/CreateHtmlSubmissionData.d.ts +1 -0
- package/dist/models/CreateHtmlSubmissionData.js +6 -0
- package/dist/models/CreateHtmlSubmissionData.js.map +1 -1
- package/dist/models/CreatePdfSubmissionData.d.ts +1 -0
- package/dist/models/CreatePdfSubmissionData.js +6 -0
- package/dist/models/CreatePdfSubmissionData.js.map +1 -1
- package/dist/models/ObjectSerializer.d.ts +4 -0
- package/dist/models/ObjectSerializer.js +18 -0
- package/dist/models/ObjectSerializer.js.map +1 -1
- package/dist/models/PublishVersionData.d.ts +21 -0
- package/dist/models/PublishVersionData.js +29 -0
- package/dist/models/PublishVersionData.js.map +1 -0
- package/dist/models/RestoreVersionData.d.ts +20 -0
- package/dist/models/RestoreVersionData.js +23 -0
- package/dist/models/RestoreVersionData.js.map +1 -0
- package/dist/models/Submission.d.ts +6 -0
- package/dist/models/Submission.js +18 -1
- package/dist/models/Submission.js.map +1 -1
- package/dist/models/SubmissionDataRequestEvent.d.ts +1 -1
- package/dist/models/SubmissionPreview.d.ts +6 -0
- package/dist/models/SubmissionPreview.js +18 -1
- package/dist/models/SubmissionPreview.js.map +1 -1
- package/dist/models/Template.d.ts +11 -0
- package/dist/models/Template.js +48 -1
- package/dist/models/Template.js.map +1 -1
- package/dist/models/TemplateDeleteResponse.d.ts +27 -0
- package/dist/models/TemplateDeleteResponse.js +46 -0
- package/dist/models/TemplateDeleteResponse.js.map +1 -0
- package/dist/models/TemplatePreview.d.ts +10 -0
- package/dist/models/TemplatePreview.js +42 -1
- package/dist/models/TemplatePreview.js.map +1 -1
- package/dist/models/TemplatePublishVersionResponse.d.ts +26 -0
- package/dist/models/TemplatePublishVersionResponse.js +40 -0
- package/dist/models/TemplatePublishVersionResponse.js.map +1 -0
- package/dist/models/all.d.ts +4 -0
- package/dist/models/all.js +4 -0
- package/dist/models/all.js.map +1 -1
- package/dist/types/ObjectParamAPI.d.ts +19 -2
- package/dist/types/ObjectParamAPI.js +14 -2
- package/dist/types/ObjectParamAPI.js.map +1 -1
- package/dist/types/ObservableAPI.d.ts +10 -2
- package/dist/types/ObservableAPI.js +72 -18
- package/dist/types/ObservableAPI.js.map +1 -1
- package/dist/types/PromiseAPI.d.ts +10 -2
- package/dist/types/PromiseAPI.js +20 -4
- package/dist/types/PromiseAPI.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## docspring-ts@2.
|
|
1
|
+
## docspring-ts@2.1.0
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes fetch-api.
|
|
4
4
|
|
|
@@ -21,7 +21,7 @@ Navigate to the folder of your consuming project and run one of the following co
|
|
|
21
21
|
_published:_
|
|
22
22
|
|
|
23
23
|
```
|
|
24
|
-
npm install docspring-ts@2.
|
|
24
|
+
npm install docspring-ts@2.1.0 --save
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
_unPublished (not recommended):_
|
package/dist/apis/PDFApi.d.ts
CHANGED
|
@@ -25,7 +25,9 @@ import { JsonSchema } from '../models/JsonSchema';
|
|
|
25
25
|
import { ListSubmissionsResponse } from '../models/ListSubmissionsResponse';
|
|
26
26
|
import { MoveFolderData } from '../models/MoveFolderData';
|
|
27
27
|
import { MoveTemplateData } from '../models/MoveTemplateData';
|
|
28
|
+
import { PublishVersionData } from '../models/PublishVersionData';
|
|
28
29
|
import { RenameFolderData } from '../models/RenameFolderData';
|
|
30
|
+
import { RestoreVersionData } from '../models/RestoreVersionData';
|
|
29
31
|
import { Submission } from '../models/Submission';
|
|
30
32
|
import { SubmissionBatchData } from '../models/SubmissionBatchData';
|
|
31
33
|
import { SubmissionBatchWithSubmissions } from '../models/SubmissionBatchWithSubmissions';
|
|
@@ -35,7 +37,9 @@ import { SuccessErrorResponse } from '../models/SuccessErrorResponse';
|
|
|
35
37
|
import { SuccessMultipleErrorsResponse } from '../models/SuccessMultipleErrorsResponse';
|
|
36
38
|
import { Template } from '../models/Template';
|
|
37
39
|
import { TemplateAddFieldsResponse } from '../models/TemplateAddFieldsResponse';
|
|
40
|
+
import { TemplateDeleteResponse } from '../models/TemplateDeleteResponse';
|
|
38
41
|
import { TemplatePreview } from '../models/TemplatePreview';
|
|
42
|
+
import { TemplatePublishVersionResponse } from '../models/TemplatePublishVersionResponse';
|
|
39
43
|
import { UpdateHtmlTemplate } from '../models/UpdateHtmlTemplate';
|
|
40
44
|
import { UpdateSubmissionDataRequestData } from '../models/UpdateSubmissionDataRequestData';
|
|
41
45
|
import { UploadPresignResponse } from '../models/UploadPresignResponse';
|
|
@@ -53,7 +57,7 @@ export declare class PDFApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
53
57
|
createPDFTemplate(templateDocument: HttpFile, templateName: string, wait?: boolean, templateDescription?: string, templateParentFolderId?: string, _options?: Configuration): Promise<RequestContext>;
|
|
54
58
|
createPDFTemplateFromUpload(data: CreatePdfTemplate, _options?: Configuration): Promise<RequestContext>;
|
|
55
59
|
deleteFolder(folderId: string, _options?: Configuration): Promise<RequestContext>;
|
|
56
|
-
deleteTemplate(templateId: string, _options?: Configuration): Promise<RequestContext>;
|
|
60
|
+
deleteTemplate(templateId: string, version?: string, _options?: Configuration): Promise<RequestContext>;
|
|
57
61
|
expireCombinedSubmission(combinedSubmissionId: string, _options?: Configuration): Promise<RequestContext>;
|
|
58
62
|
expireSubmission(submissionId: string, _options?: Configuration): Promise<RequestContext>;
|
|
59
63
|
generatePdf(templateId: string, submission: CreatePdfSubmissionData, wait?: boolean, _options?: Configuration): Promise<RequestContext>;
|
|
@@ -74,7 +78,9 @@ export declare class PDFApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
74
78
|
listTemplates(query?: string, parentFolderId?: string, page?: number, perPage?: number, _options?: Configuration): Promise<RequestContext>;
|
|
75
79
|
moveFolderToFolder(folderId: string, data: MoveFolderData, _options?: Configuration): Promise<RequestContext>;
|
|
76
80
|
moveTemplateToFolder(templateId: string, data: MoveTemplateData, _options?: Configuration): Promise<RequestContext>;
|
|
81
|
+
publishTemplateVersion(templateId: string, data: PublishVersionData, _options?: Configuration): Promise<RequestContext>;
|
|
77
82
|
renameFolder(folderId: string, data: RenameFolderData, _options?: Configuration): Promise<RequestContext>;
|
|
83
|
+
restoreTemplateVersion(templateId: string, data: RestoreVersionData, _options?: Configuration): Promise<RequestContext>;
|
|
78
84
|
testAuthentication(_options?: Configuration): Promise<RequestContext>;
|
|
79
85
|
updateDataRequest(dataRequestId: string, data: UpdateSubmissionDataRequestData, _options?: Configuration): Promise<RequestContext>;
|
|
80
86
|
updateTemplate(templateId: string, data: UpdateHtmlTemplate, _options?: Configuration): Promise<RequestContext>;
|
|
@@ -93,7 +99,7 @@ export declare class PDFApiResponseProcessor {
|
|
|
93
99
|
createPDFTemplateWithHttpInfo(response: ResponseContext): Promise<HttpInfo<TemplatePreview>>;
|
|
94
100
|
createPDFTemplateFromUploadWithHttpInfo(response: ResponseContext): Promise<HttpInfo<TemplatePreview>>;
|
|
95
101
|
deleteFolderWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Folder>>;
|
|
96
|
-
deleteTemplateWithHttpInfo(response: ResponseContext): Promise<HttpInfo<
|
|
102
|
+
deleteTemplateWithHttpInfo(response: ResponseContext): Promise<HttpInfo<TemplateDeleteResponse>>;
|
|
97
103
|
expireCombinedSubmissionWithHttpInfo(response: ResponseContext): Promise<HttpInfo<CombinedSubmission>>;
|
|
98
104
|
expireSubmissionWithHttpInfo(response: ResponseContext): Promise<HttpInfo<SubmissionPreview>>;
|
|
99
105
|
generatePdfWithHttpInfo(response: ResponseContext): Promise<HttpInfo<CreateSubmissionResponse>>;
|
|
@@ -114,7 +120,9 @@ export declare class PDFApiResponseProcessor {
|
|
|
114
120
|
listTemplatesWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<TemplatePreview>>>;
|
|
115
121
|
moveFolderToFolderWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Folder>>;
|
|
116
122
|
moveTemplateToFolderWithHttpInfo(response: ResponseContext): Promise<HttpInfo<TemplatePreview>>;
|
|
123
|
+
publishTemplateVersionWithHttpInfo(response: ResponseContext): Promise<HttpInfo<TemplatePublishVersionResponse>>;
|
|
117
124
|
renameFolderWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Folder>>;
|
|
125
|
+
restoreTemplateVersionWithHttpInfo(response: ResponseContext): Promise<HttpInfo<SuccessErrorResponse>>;
|
|
118
126
|
testAuthenticationWithHttpInfo(response: ResponseContext): Promise<HttpInfo<SuccessErrorResponse>>;
|
|
119
127
|
updateDataRequestWithHttpInfo(response: ResponseContext): Promise<HttpInfo<CreateSubmissionDataRequestResponse>>;
|
|
120
128
|
updateTemplateWithHttpInfo(response: ResponseContext): Promise<HttpInfo<SuccessMultipleErrorsResponse>>;
|
package/dist/apis/PDFApi.js
CHANGED
|
@@ -594,7 +594,7 @@ var PDFApiRequestFactory = (function (_super) {
|
|
|
594
594
|
});
|
|
595
595
|
});
|
|
596
596
|
};
|
|
597
|
-
PDFApiRequestFactory.prototype.deleteTemplate = function (templateId, _options) {
|
|
597
|
+
PDFApiRequestFactory.prototype.deleteTemplate = function (templateId, version, _options) {
|
|
598
598
|
var _a, _b, _c;
|
|
599
599
|
return __awaiter(this, void 0, void 0, function () {
|
|
600
600
|
var _config, localVarPath, requestContext, authMethod, defaultAuth;
|
|
@@ -609,6 +609,9 @@ var PDFApiRequestFactory = (function (_super) {
|
|
|
609
609
|
.replace('{' + 'template_id' + '}', encodeURIComponent(String(templateId)));
|
|
610
610
|
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
|
|
611
611
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
612
|
+
if (version !== undefined) {
|
|
613
|
+
requestContext.setQueryParam("version", ObjectSerializer_1.ObjectSerializer.serialize(version, "string", ""));
|
|
614
|
+
}
|
|
612
615
|
authMethod = _config.authMethods["api_token_basic"];
|
|
613
616
|
if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
|
|
614
617
|
return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
|
|
@@ -1372,6 +1375,48 @@ var PDFApiRequestFactory = (function (_super) {
|
|
|
1372
1375
|
});
|
|
1373
1376
|
});
|
|
1374
1377
|
};
|
|
1378
|
+
PDFApiRequestFactory.prototype.publishTemplateVersion = function (templateId, data, _options) {
|
|
1379
|
+
var _a, _b, _c;
|
|
1380
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1381
|
+
var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
|
|
1382
|
+
return __generator(this, function (_d) {
|
|
1383
|
+
switch (_d.label) {
|
|
1384
|
+
case 0:
|
|
1385
|
+
_config = _options || this.configuration;
|
|
1386
|
+
if (templateId === null || templateId === undefined) {
|
|
1387
|
+
throw new baseapi_1.RequiredError("PDFApi", "publishTemplateVersion", "templateId");
|
|
1388
|
+
}
|
|
1389
|
+
if (data === null || data === undefined) {
|
|
1390
|
+
throw new baseapi_1.RequiredError("PDFApi", "publishTemplateVersion", "data");
|
|
1391
|
+
}
|
|
1392
|
+
localVarPath = '/templates/{template_id}/publish_version'
|
|
1393
|
+
.replace('{' + 'template_id' + '}', encodeURIComponent(String(templateId)));
|
|
1394
|
+
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
1395
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
1396
|
+
contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
1397
|
+
"application/json"
|
|
1398
|
+
]);
|
|
1399
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
1400
|
+
serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(data, "PublishVersionData", ""), contentType);
|
|
1401
|
+
requestContext.setBody(serializedBody);
|
|
1402
|
+
authMethod = _config.authMethods["api_token_basic"];
|
|
1403
|
+
if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
|
|
1404
|
+
return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
|
|
1405
|
+
case 1:
|
|
1406
|
+
_d.sent();
|
|
1407
|
+
_d.label = 2;
|
|
1408
|
+
case 2:
|
|
1409
|
+
defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
|
|
1410
|
+
if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
|
|
1411
|
+
return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
|
|
1412
|
+
case 3:
|
|
1413
|
+
_d.sent();
|
|
1414
|
+
_d.label = 4;
|
|
1415
|
+
case 4: return [2, requestContext];
|
|
1416
|
+
}
|
|
1417
|
+
});
|
|
1418
|
+
});
|
|
1419
|
+
};
|
|
1375
1420
|
PDFApiRequestFactory.prototype.renameFolder = function (folderId, data, _options) {
|
|
1376
1421
|
var _a, _b, _c;
|
|
1377
1422
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -1414,6 +1459,48 @@ var PDFApiRequestFactory = (function (_super) {
|
|
|
1414
1459
|
});
|
|
1415
1460
|
});
|
|
1416
1461
|
};
|
|
1462
|
+
PDFApiRequestFactory.prototype.restoreTemplateVersion = function (templateId, data, _options) {
|
|
1463
|
+
var _a, _b, _c;
|
|
1464
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1465
|
+
var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
|
|
1466
|
+
return __generator(this, function (_d) {
|
|
1467
|
+
switch (_d.label) {
|
|
1468
|
+
case 0:
|
|
1469
|
+
_config = _options || this.configuration;
|
|
1470
|
+
if (templateId === null || templateId === undefined) {
|
|
1471
|
+
throw new baseapi_1.RequiredError("PDFApi", "restoreTemplateVersion", "templateId");
|
|
1472
|
+
}
|
|
1473
|
+
if (data === null || data === undefined) {
|
|
1474
|
+
throw new baseapi_1.RequiredError("PDFApi", "restoreTemplateVersion", "data");
|
|
1475
|
+
}
|
|
1476
|
+
localVarPath = '/templates/{template_id}/restore_version'
|
|
1477
|
+
.replace('{' + 'template_id' + '}', encodeURIComponent(String(templateId)));
|
|
1478
|
+
requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
1479
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
1480
|
+
contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
1481
|
+
"application/json"
|
|
1482
|
+
]);
|
|
1483
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
1484
|
+
serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(data, "RestoreVersionData", ""), contentType);
|
|
1485
|
+
requestContext.setBody(serializedBody);
|
|
1486
|
+
authMethod = _config.authMethods["api_token_basic"];
|
|
1487
|
+
if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
|
|
1488
|
+
return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
|
|
1489
|
+
case 1:
|
|
1490
|
+
_d.sent();
|
|
1491
|
+
_d.label = 2;
|
|
1492
|
+
case 2:
|
|
1493
|
+
defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
|
|
1494
|
+
if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
|
|
1495
|
+
return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
|
|
1496
|
+
case 3:
|
|
1497
|
+
_d.sent();
|
|
1498
|
+
_d.label = 4;
|
|
1499
|
+
case 4: return [2, requestContext];
|
|
1500
|
+
}
|
|
1501
|
+
});
|
|
1502
|
+
});
|
|
1503
|
+
};
|
|
1417
1504
|
PDFApiRequestFactory.prototype.testAuthentication = function (_options) {
|
|
1418
1505
|
var _a, _b, _c;
|
|
1419
1506
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -2209,7 +2296,7 @@ var PDFApiResponseProcessor = (function () {
|
|
|
2209
2296
|
return [4, response.body.text()];
|
|
2210
2297
|
case 1:
|
|
2211
2298
|
body = _b.apply(_a, [_d.apply(_c, [_u.sent(), contentType]),
|
|
2212
|
-
"
|
|
2299
|
+
"TemplateDeleteResponse", ""]);
|
|
2213
2300
|
return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
|
|
2214
2301
|
case 2:
|
|
2215
2302
|
if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3, 4];
|
|
@@ -2236,7 +2323,7 @@ var PDFApiResponseProcessor = (function () {
|
|
|
2236
2323
|
return [4, response.body.text()];
|
|
2237
2324
|
case 7:
|
|
2238
2325
|
body = _p.apply(_o, [_r.apply(_q, [_u.sent(), contentType]),
|
|
2239
|
-
"
|
|
2326
|
+
"TemplateDeleteResponse", ""]);
|
|
2240
2327
|
return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
|
|
2241
2328
|
case 8:
|
|
2242
2329
|
_s = exception_1.ApiException.bind;
|
|
@@ -3222,6 +3309,66 @@ var PDFApiResponseProcessor = (function () {
|
|
|
3222
3309
|
});
|
|
3223
3310
|
});
|
|
3224
3311
|
};
|
|
3312
|
+
PDFApiResponseProcessor.prototype.publishTemplateVersionWithHttpInfo = function (response) {
|
|
3313
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3314
|
+
var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, body, _s, _t, _u, _v, _w, _x;
|
|
3315
|
+
return __generator(this, function (_y) {
|
|
3316
|
+
switch (_y.label) {
|
|
3317
|
+
case 0:
|
|
3318
|
+
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
3319
|
+
if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
|
|
3320
|
+
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3321
|
+
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3322
|
+
return [4, response.body.text()];
|
|
3323
|
+
case 1:
|
|
3324
|
+
body = _b.apply(_a, [_d.apply(_c, [_y.sent(), contentType]),
|
|
3325
|
+
"TemplatePublishVersionResponse", ""]);
|
|
3326
|
+
return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
|
|
3327
|
+
case 2:
|
|
3328
|
+
if (!(0, util_1.isCodeInRange)("422", response.httpStatusCode)) return [3, 4];
|
|
3329
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3330
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3331
|
+
return [4, response.body.text()];
|
|
3332
|
+
case 3:
|
|
3333
|
+
body = _f.apply(_e, [_h.apply(_g, [_y.sent(), contentType]),
|
|
3334
|
+
"SuccessMultipleErrorsResponse", ""]);
|
|
3335
|
+
throw new exception_1.ApiException(response.httpStatusCode, "invalid version type", body, response.headers);
|
|
3336
|
+
case 4:
|
|
3337
|
+
if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3, 6];
|
|
3338
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3339
|
+
_m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3340
|
+
return [4, response.body.text()];
|
|
3341
|
+
case 5:
|
|
3342
|
+
body = _k.apply(_j, [_m.apply(_l, [_y.sent(), contentType]),
|
|
3343
|
+
"ErrorResponse", ""]);
|
|
3344
|
+
throw new exception_1.ApiException(response.httpStatusCode, "template not found", body, response.headers);
|
|
3345
|
+
case 6:
|
|
3346
|
+
if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 8];
|
|
3347
|
+
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3348
|
+
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3349
|
+
return [4, response.body.text()];
|
|
3350
|
+
case 7:
|
|
3351
|
+
body = _p.apply(_o, [_r.apply(_q, [_y.sent(), contentType]),
|
|
3352
|
+
"ErrorResponse", ""]);
|
|
3353
|
+
throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
|
|
3354
|
+
case 8:
|
|
3355
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 10];
|
|
3356
|
+
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3357
|
+
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3358
|
+
return [4, response.body.text()];
|
|
3359
|
+
case 9:
|
|
3360
|
+
body = _t.apply(_s, [_v.apply(_u, [_y.sent(), contentType]),
|
|
3361
|
+
"TemplatePublishVersionResponse", ""]);
|
|
3362
|
+
return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
|
|
3363
|
+
case 10:
|
|
3364
|
+
_w = exception_1.ApiException.bind;
|
|
3365
|
+
_x = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
|
|
3366
|
+
return [4, response.getBodyAsAny()];
|
|
3367
|
+
case 11: throw new (_w.apply(exception_1.ApiException, _x.concat([_y.sent(), response.headers])))();
|
|
3368
|
+
}
|
|
3369
|
+
});
|
|
3370
|
+
});
|
|
3371
|
+
};
|
|
3225
3372
|
PDFApiResponseProcessor.prototype.renameFolderWithHttpInfo = function (response) {
|
|
3226
3373
|
return __awaiter(this, void 0, void 0, function () {
|
|
3227
3374
|
var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, body, _s, _t, _u, _v, _w, _x;
|
|
@@ -3282,6 +3429,66 @@ var PDFApiResponseProcessor = (function () {
|
|
|
3282
3429
|
});
|
|
3283
3430
|
});
|
|
3284
3431
|
};
|
|
3432
|
+
PDFApiResponseProcessor.prototype.restoreTemplateVersionWithHttpInfo = function (response) {
|
|
3433
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3434
|
+
var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, body, _o, _p, _q, _r, body, _s, _t, _u, _v, _w, _x;
|
|
3435
|
+
return __generator(this, function (_y) {
|
|
3436
|
+
switch (_y.label) {
|
|
3437
|
+
case 0:
|
|
3438
|
+
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
3439
|
+
if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
|
|
3440
|
+
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3441
|
+
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3442
|
+
return [4, response.body.text()];
|
|
3443
|
+
case 1:
|
|
3444
|
+
body = _b.apply(_a, [_d.apply(_c, [_y.sent(), contentType]),
|
|
3445
|
+
"SuccessErrorResponse", ""]);
|
|
3446
|
+
return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
|
|
3447
|
+
case 2:
|
|
3448
|
+
if (!(0, util_1.isCodeInRange)("422", response.httpStatusCode)) return [3, 4];
|
|
3449
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3450
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3451
|
+
return [4, response.body.text()];
|
|
3452
|
+
case 3:
|
|
3453
|
+
body = _f.apply(_e, [_h.apply(_g, [_y.sent(), contentType]),
|
|
3454
|
+
"SuccessMultipleErrorsResponse", ""]);
|
|
3455
|
+
throw new exception_1.ApiException(response.httpStatusCode, "draft version not allowed", body, response.headers);
|
|
3456
|
+
case 4:
|
|
3457
|
+
if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3, 6];
|
|
3458
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3459
|
+
_m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3460
|
+
return [4, response.body.text()];
|
|
3461
|
+
case 5:
|
|
3462
|
+
body = _k.apply(_j, [_m.apply(_l, [_y.sent(), contentType]),
|
|
3463
|
+
"SuccessMultipleErrorsResponse", ""]);
|
|
3464
|
+
throw new exception_1.ApiException(response.httpStatusCode, "template version not found", body, response.headers);
|
|
3465
|
+
case 6:
|
|
3466
|
+
if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3, 8];
|
|
3467
|
+
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3468
|
+
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3469
|
+
return [4, response.body.text()];
|
|
3470
|
+
case 7:
|
|
3471
|
+
body = _p.apply(_o, [_r.apply(_q, [_y.sent(), contentType]),
|
|
3472
|
+
"ErrorResponse", ""]);
|
|
3473
|
+
throw new exception_1.ApiException(response.httpStatusCode, "authentication failed", body, response.headers);
|
|
3474
|
+
case 8:
|
|
3475
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 10];
|
|
3476
|
+
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3477
|
+
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3478
|
+
return [4, response.body.text()];
|
|
3479
|
+
case 9:
|
|
3480
|
+
body = _t.apply(_s, [_v.apply(_u, [_y.sent(), contentType]),
|
|
3481
|
+
"SuccessErrorResponse", ""]);
|
|
3482
|
+
return [2, new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body)];
|
|
3483
|
+
case 10:
|
|
3484
|
+
_w = exception_1.ApiException.bind;
|
|
3485
|
+
_x = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
|
|
3486
|
+
return [4, response.getBodyAsAny()];
|
|
3487
|
+
case 11: throw new (_w.apply(exception_1.ApiException, _x.concat([_y.sent(), response.headers])))();
|
|
3488
|
+
}
|
|
3489
|
+
});
|
|
3490
|
+
});
|
|
3491
|
+
};
|
|
3285
3492
|
PDFApiResponseProcessor.prototype.testAuthenticationWithHttpInfo = function (response) {
|
|
3286
3493
|
return __awaiter(this, void 0, void 0, function () {
|
|
3287
3494
|
var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
|