@emilgroup/insurance-sdk-node 1.0.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/.openapi-generator/FILES +97 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +51 -0
- package/api/insured-object-types-api.ts +236 -0
- package/api/insured-objects-api.ts +446 -0
- package/api/leads-api.ts +402 -0
- package/api/policies-api.ts +580 -0
- package/api/products-api.ts +3027 -0
- package/api.ts +44 -0
- package/base.ts +189 -0
- package/common.ts +138 -0
- package/configuration.ts +109 -0
- package/dist/api/insured-object-types-api.d.ts +141 -0
- package/dist/api/insured-object-types-api.js +258 -0
- package/dist/api/insured-objects-api.d.ts +254 -0
- package/dist/api/insured-objects-api.js +443 -0
- package/dist/api/leads-api.d.ts +225 -0
- package/dist/api/leads-api.js +427 -0
- package/dist/api/policies-api.d.ts +329 -0
- package/dist/api/policies-api.js +548 -0
- package/dist/api/products-api.d.ts +1683 -0
- package/dist/api/products-api.js +2521 -0
- package/dist/api.d.ts +20 -0
- package/dist/api.js +40 -0
- package/dist/base.d.ts +69 -0
- package/dist/base.js +252 -0
- package/dist/common.d.ts +66 -0
- package/dist/common.js +244 -0
- package/dist/configuration.d.ts +90 -0
- package/dist/configuration.js +44 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +35 -0
- package/dist/models/calculate-custom-premium-request-dto.d.ts +34 -0
- package/dist/models/calculate-custom-premium-request-dto.js +19 -0
- package/dist/models/calculate-premium-request-dto.d.ts +31 -0
- package/dist/models/calculate-premium-request-dto.js +15 -0
- package/dist/models/create-account-request-dto.d.ts +84 -0
- package/dist/models/create-account-request-dto.js +15 -0
- package/dist/models/create-bank-account-request-dto.d.ts +30 -0
- package/dist/models/create-bank-account-request-dto.js +15 -0
- package/dist/models/create-claim-request-dto.d.ts +83 -0
- package/dist/models/create-claim-request-dto.js +25 -0
- package/dist/models/create-custom-application-request-dto.d.ts +40 -0
- package/dist/models/create-custom-application-request-dto.js +19 -0
- package/dist/models/create-dummy-policy-request-dto.d.ts +31 -0
- package/dist/models/create-dummy-policy-request-dto.js +15 -0
- package/dist/models/create-insured-object-request-dto.d.ts +42 -0
- package/dist/models/create-insured-object-request-dto.js +15 -0
- package/dist/models/create-insured-object-response-class.d.ts +25 -0
- package/dist/models/create-insured-object-response-class.js +15 -0
- package/dist/models/create-lead-request-dto.d.ts +71 -0
- package/dist/models/create-lead-request-dto.js +22 -0
- package/dist/models/create-policy-request-dto.d.ts +37 -0
- package/dist/models/create-policy-request-dto.js +15 -0
- package/dist/models/create-policy-response-class.d.ts +25 -0
- package/dist/models/create-policy-response-class.js +15 -0
- package/dist/models/create-premium-formula-request-dto.d.ts +65 -0
- package/dist/models/create-premium-formula-request-dto.js +25 -0
- package/dist/models/create-premium-formula-response-class.d.ts +25 -0
- package/dist/models/create-premium-formula-response-class.js +15 -0
- package/dist/models/create-product-field-request-dto.d.ts +113 -0
- package/dist/models/create-product-field-request-dto.js +20 -0
- package/dist/models/create-product-field-response-class.d.ts +25 -0
- package/dist/models/create-product-field-response-class.js +15 -0
- package/dist/models/create-product-request-dto.d.ts +57 -0
- package/dist/models/create-product-request-dto.js +30 -0
- package/dist/models/create-product-response-class.d.ts +25 -0
- package/dist/models/create-product-response-class.js +15 -0
- package/dist/models/csv-product-factor-dto.d.ts +48 -0
- package/dist/models/csv-product-factor-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/get-insured-object-request-dto.d.ts +24 -0
- package/dist/models/get-insured-object-request-dto.js +15 -0
- package/dist/models/get-insured-object-response-class.d.ts +25 -0
- package/dist/models/get-insured-object-response-class.js +15 -0
- package/dist/models/get-policy-request-dto.d.ts +30 -0
- package/dist/models/get-policy-request-dto.js +15 -0
- package/dist/models/get-policy-response-class.d.ts +25 -0
- package/dist/models/get-policy-response-class.js +15 -0
- package/dist/models/get-premium-formula-request-dto.d.ts +24 -0
- package/dist/models/get-premium-formula-request-dto.js +15 -0
- package/dist/models/get-premium-formula-response-class.d.ts +25 -0
- package/dist/models/get-premium-formula-response-class.js +15 -0
- package/dist/models/get-product-factor-response-class.d.ts +32 -0
- package/dist/models/get-product-factor-response-class.js +15 -0
- package/dist/models/get-product-factor-value-request-dto.d.ts +42 -0
- package/dist/models/get-product-factor-value-request-dto.js +15 -0
- package/dist/models/get-product-factor-value-response-class.d.ts +25 -0
- package/dist/models/get-product-factor-value-response-class.js +15 -0
- package/dist/models/get-product-field-request-dto.d.ts +24 -0
- package/dist/models/get-product-field-request-dto.js +15 -0
- package/dist/models/get-product-field-response-class.d.ts +25 -0
- package/dist/models/get-product-field-response-class.js +15 -0
- package/dist/models/get-product-request-dto.d.ts +36 -0
- package/dist/models/get-product-request-dto.js +15 -0
- package/dist/models/get-product-response-class.d.ts +25 -0
- package/dist/models/get-product-response-class.js +15 -0
- package/dist/models/get-product-version-request-dto.d.ts +24 -0
- package/dist/models/get-product-version-request-dto.js +15 -0
- package/dist/models/get-product-version-response-class.d.ts +25 -0
- package/dist/models/get-product-version-response-class.js +15 -0
- package/dist/models/grouped-product-factor-class.d.ts +37 -0
- package/dist/models/grouped-product-factor-class.js +15 -0
- package/dist/models/grouped-product-factor-value-class.d.ts +36 -0
- package/dist/models/grouped-product-factor-value-class.js +15 -0
- package/dist/models/grouped-product-factors-response-class.d.ts +25 -0
- package/dist/models/grouped-product-factors-response-class.js +15 -0
- package/dist/models/grpc-create-policy-request-dto.d.ts +37 -0
- package/dist/models/grpc-create-policy-request-dto.js +15 -0
- package/dist/models/index.d.ts +79 -0
- package/dist/models/index.js +95 -0
- package/dist/models/insured-object-class.d.ts +67 -0
- package/dist/models/insured-object-class.js +15 -0
- package/dist/models/insured-object-type-class.d.ts +48 -0
- package/dist/models/insured-object-type-class.js +15 -0
- package/dist/models/list-insured-object-types-response-class.d.ts +31 -0
- package/dist/models/list-insured-object-types-response-class.js +15 -0
- package/dist/models/list-insured-objects-response-class.d.ts +30 -0
- package/dist/models/list-insured-objects-response-class.js +15 -0
- package/dist/models/list-policies-response-class.d.ts +31 -0
- package/dist/models/list-policies-response-class.js +15 -0
- package/dist/models/list-premium-formulas-response-class.d.ts +31 -0
- package/dist/models/list-premium-formulas-response-class.js +15 -0
- package/dist/models/list-product-factors-response-class.d.ts +31 -0
- package/dist/models/list-product-factors-response-class.js +15 -0
- package/dist/models/list-product-field-types-response-class.d.ts +30 -0
- package/dist/models/list-product-field-types-response-class.js +15 -0
- package/dist/models/list-product-fields-response-class.d.ts +31 -0
- package/dist/models/list-product-fields-response-class.js +15 -0
- package/dist/models/list-products-response-class.d.ts +31 -0
- package/dist/models/list-products-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/policy-class.d.ts +86 -0
- package/dist/models/policy-class.js +15 -0
- package/dist/models/policy-object-class.d.ts +42 -0
- package/dist/models/policy-object-class.js +15 -0
- package/dist/models/policy-object-dto.d.ts +30 -0
- package/dist/models/policy-object-dto.js +15 -0
- package/dist/models/policy-premium-class.d.ts +43 -0
- package/dist/models/policy-premium-class.js +15 -0
- package/dist/models/policy-premium-item-class.d.ts +49 -0
- package/dist/models/policy-premium-item-class.js +15 -0
- package/dist/models/policy-version-class.d.ts +55 -0
- package/dist/models/policy-version-class.js +15 -0
- package/dist/models/premium-formula-class.d.ts +79 -0
- package/dist/models/premium-formula-class.js +15 -0
- package/dist/models/product-class.d.ts +74 -0
- package/dist/models/product-class.js +15 -0
- package/dist/models/product-factor-class.d.ts +68 -0
- package/dist/models/product-factor-class.js +15 -0
- package/dist/models/product-factor-value-class.d.ts +80 -0
- package/dist/models/product-factor-value-class.js +15 -0
- package/dist/models/product-field-class.d.ts +114 -0
- package/dist/models/product-field-class.js +15 -0
- package/dist/models/product-version-class.d.ts +54 -0
- package/dist/models/product-version-class.js +15 -0
- package/dist/models/store-product-factors-request-dto.d.ts +31 -0
- package/dist/models/store-product-factors-request-dto.js +15 -0
- package/dist/models/store-product-factors-response-class.d.ts +25 -0
- package/dist/models/store-product-factors-response-class.js +15 -0
- package/dist/models/timeslice-class.d.ts +62 -0
- package/dist/models/timeslice-class.js +15 -0
- package/dist/models/update-insured-object-request-dto.d.ts +48 -0
- package/dist/models/update-insured-object-request-dto.js +15 -0
- package/dist/models/update-lead-request-dto.d.ts +71 -0
- package/dist/models/update-lead-request-dto.js +22 -0
- package/dist/models/update-policy-request-dto.d.ts +43 -0
- package/dist/models/update-policy-request-dto.js +15 -0
- package/dist/models/update-policy-response-class.d.ts +25 -0
- package/dist/models/update-policy-response-class.js +15 -0
- package/dist/models/update-premium-formula-request-dto.d.ts +71 -0
- package/dist/models/update-premium-formula-request-dto.js +25 -0
- package/dist/models/update-premium-formula-response-class.d.ts +25 -0
- package/dist/models/update-premium-formula-response-class.js +15 -0
- package/dist/models/update-product-field-request-dto.d.ts +119 -0
- package/dist/models/update-product-field-request-dto.js +20 -0
- package/dist/models/update-product-field-response-class.d.ts +25 -0
- package/dist/models/update-product-field-response-class.js +15 -0
- package/dist/models/update-product-request-dto.d.ts +42 -0
- package/dist/models/update-product-request-dto.js +15 -0
- package/dist/models/update-product-response-class.d.ts +25 -0
- package/dist/models/update-product-response-class.js +15 -0
- package/dist/models/update-product-version-request-dto.d.ts +43 -0
- package/dist/models/update-product-version-request-dto.js +22 -0
- package/dist/models/update-product-version-response-class.d.ts +25 -0
- package/dist/models/update-product-version-response-class.js +15 -0
- package/dist/models/uploaded-document-dto.d.ts +24 -0
- package/dist/models/uploaded-document-dto.js +15 -0
- package/dist/models/validate-product-factors-request-dto.d.ts +31 -0
- package/dist/models/validate-product-factors-request-dto.js +15 -0
- package/git_push.sh +57 -0
- package/index.ts +19 -0
- package/models/calculate-custom-premium-request-dto.ts +43 -0
- package/models/calculate-premium-request-dto.ts +37 -0
- package/models/create-account-request-dto.ts +90 -0
- package/models/create-bank-account-request-dto.ts +36 -0
- package/models/create-claim-request-dto.ts +93 -0
- package/models/create-custom-application-request-dto.ts +49 -0
- package/models/create-dummy-policy-request-dto.ts +37 -0
- package/models/create-insured-object-request-dto.ts +48 -0
- package/models/create-insured-object-response-class.ts +31 -0
- package/models/create-lead-request-dto.ts +80 -0
- package/models/create-policy-request-dto.ts +43 -0
- package/models/create-policy-response-class.ts +31 -0
- package/models/create-premium-formula-request-dto.ts +75 -0
- package/models/create-premium-formula-response-class.ts +31 -0
- package/models/create-product-field-request-dto.ts +122 -0
- package/models/create-product-field-response-class.ts +31 -0
- package/models/create-product-request-dto.ts +66 -0
- package/models/create-product-response-class.ts +31 -0
- package/models/csv-product-factor-dto.ts +54 -0
- package/models/delete-request-dto.ts +30 -0
- package/models/get-insured-object-request-dto.ts +30 -0
- package/models/get-insured-object-response-class.ts +31 -0
- package/models/get-policy-request-dto.ts +36 -0
- package/models/get-policy-response-class.ts +31 -0
- package/models/get-premium-formula-request-dto.ts +30 -0
- package/models/get-premium-formula-response-class.ts +31 -0
- package/models/get-product-factor-response-class.ts +38 -0
- package/models/get-product-factor-value-request-dto.ts +48 -0
- package/models/get-product-factor-value-response-class.ts +31 -0
- package/models/get-product-field-request-dto.ts +30 -0
- package/models/get-product-field-response-class.ts +31 -0
- package/models/get-product-request-dto.ts +42 -0
- package/models/get-product-response-class.ts +31 -0
- package/models/get-product-version-request-dto.ts +30 -0
- package/models/get-product-version-response-class.ts +31 -0
- package/models/grouped-product-factor-class.ts +43 -0
- package/models/grouped-product-factor-value-class.ts +42 -0
- package/models/grouped-product-factors-response-class.ts +31 -0
- package/models/grpc-create-policy-request-dto.ts +43 -0
- package/models/index.ts +79 -0
- package/models/insured-object-class.ts +73 -0
- package/models/insured-object-type-class.ts +54 -0
- package/models/list-insured-object-types-response-class.ts +37 -0
- package/models/list-insured-objects-response-class.ts +36 -0
- package/models/list-policies-response-class.ts +37 -0
- package/models/list-premium-formulas-response-class.ts +37 -0
- package/models/list-product-factors-response-class.ts +37 -0
- package/models/list-product-field-types-response-class.ts +36 -0
- package/models/list-product-fields-response-class.ts +37 -0
- package/models/list-products-response-class.ts +37 -0
- package/models/list-request-dto.ts +60 -0
- package/models/policy-class.ts +92 -0
- package/models/policy-object-class.ts +48 -0
- package/models/policy-object-dto.ts +36 -0
- package/models/policy-premium-class.ts +49 -0
- package/models/policy-premium-item-class.ts +55 -0
- package/models/policy-version-class.ts +61 -0
- package/models/premium-formula-class.ts +85 -0
- package/models/product-class.ts +80 -0
- package/models/product-factor-class.ts +74 -0
- package/models/product-factor-value-class.ts +86 -0
- package/models/product-field-class.ts +120 -0
- package/models/product-version-class.ts +60 -0
- package/models/store-product-factors-request-dto.ts +37 -0
- package/models/store-product-factors-response-class.ts +31 -0
- package/models/timeslice-class.ts +68 -0
- package/models/update-insured-object-request-dto.ts +54 -0
- package/models/update-lead-request-dto.ts +80 -0
- package/models/update-policy-request-dto.ts +49 -0
- package/models/update-policy-response-class.ts +31 -0
- package/models/update-premium-formula-request-dto.ts +81 -0
- package/models/update-premium-formula-response-class.ts +31 -0
- package/models/update-product-field-request-dto.ts +128 -0
- package/models/update-product-field-response-class.ts +31 -0
- package/models/update-product-request-dto.ts +48 -0
- package/models/update-product-response-class.ts +31 -0
- package/models/update-product-version-request-dto.ts +52 -0
- package/models/update-product-version-response-class.ts +31 -0
- package/models/uploaded-document-dto.ts +30 -0
- package/models/validate-product-factors-request-dto.ts +37 -0
- package/package.json +29 -0
- package/tsconfig.json +22 -0
|
@@ -0,0 +1,548 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* EMIL InsuranceService
|
|
6
|
+
* The EMIL InsuranceService API description
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0
|
|
9
|
+
*
|
|
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 (_) 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.PoliciesApi = exports.PoliciesApiFactory = exports.PoliciesApiFp = exports.PoliciesApiAxiosParamCreator = void 0;
|
|
82
|
+
var axios_1 = __importDefault(require("axios"));
|
|
83
|
+
// Some imports not used depending on template conditions
|
|
84
|
+
// @ts-ignore
|
|
85
|
+
var common_1 = require("../common");
|
|
86
|
+
// @ts-ignore
|
|
87
|
+
var base_1 = require("../base");
|
|
88
|
+
// URLSearchParams not necessarily used
|
|
89
|
+
// @ts-ignore
|
|
90
|
+
var url_1 = require("url");
|
|
91
|
+
var FormData = require('form-data');
|
|
92
|
+
/**
|
|
93
|
+
* PoliciesApi - axios parameter creator
|
|
94
|
+
* @export
|
|
95
|
+
*/
|
|
96
|
+
var PoliciesApiAxiosParamCreator = function (configuration) {
|
|
97
|
+
var _this = this;
|
|
98
|
+
return {
|
|
99
|
+
/**
|
|
100
|
+
* This will create a policy in the database. Policy creation is usually part of a complex workflow that starts with lead creation. Creating directly a policy without prior knowledge might result in an unusable policy. Look into lead creation for more information.
|
|
101
|
+
* @summary Create the policy
|
|
102
|
+
* @param {CreatePolicyRequestDto} createPolicyRequestDto
|
|
103
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
104
|
+
* @param {*} [options] Override http request option.
|
|
105
|
+
* @throws {RequiredError}
|
|
106
|
+
*/
|
|
107
|
+
createPolicy: function (createPolicyRequestDto, authorization, options) {
|
|
108
|
+
if (options === void 0) { options = {}; }
|
|
109
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
110
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
111
|
+
return __generator(this, function (_a) {
|
|
112
|
+
switch (_a.label) {
|
|
113
|
+
case 0:
|
|
114
|
+
// verify required parameter 'createPolicyRequestDto' is not null or undefined
|
|
115
|
+
(0, common_1.assertParamExists)('createPolicy', 'createPolicyRequestDto', createPolicyRequestDto);
|
|
116
|
+
localVarPath = "/insuranceservice/v1/policies";
|
|
117
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
118
|
+
if (configuration) {
|
|
119
|
+
baseOptions = configuration.baseOptions;
|
|
120
|
+
baseAccessToken = configuration.accessToken;
|
|
121
|
+
}
|
|
122
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
123
|
+
localVarHeaderParameter = {};
|
|
124
|
+
localVarQueryParameter = {};
|
|
125
|
+
// authentication bearer required
|
|
126
|
+
// http bearer authentication required
|
|
127
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
128
|
+
case 1:
|
|
129
|
+
// authentication bearer required
|
|
130
|
+
// http bearer authentication required
|
|
131
|
+
_a.sent();
|
|
132
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
133
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
134
|
+
}
|
|
135
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
136
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
137
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
138
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
139
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createPolicyRequestDto, localVarRequestOptions, configuration);
|
|
140
|
+
return [2 /*return*/, {
|
|
141
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
142
|
+
options: localVarRequestOptions,
|
|
143
|
+
}];
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
},
|
|
148
|
+
/**
|
|
149
|
+
* Retrieves the details of the policy that was previously created. Supply the unique policy code that was returned when you created it and Emil Api will return the corresponding policy information.
|
|
150
|
+
* @summary Retrieve the policy
|
|
151
|
+
* @param {string} code Unique identifier for the object.
|
|
152
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
153
|
+
* @param {string} [expand] Fields to expand response by
|
|
154
|
+
* @param {*} [options] Override http request option.
|
|
155
|
+
* @throws {RequiredError}
|
|
156
|
+
*/
|
|
157
|
+
getPolicy: function (code, authorization, expand, options) {
|
|
158
|
+
if (options === void 0) { options = {}; }
|
|
159
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
160
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
161
|
+
return __generator(this, function (_a) {
|
|
162
|
+
switch (_a.label) {
|
|
163
|
+
case 0:
|
|
164
|
+
// verify required parameter 'code' is not null or undefined
|
|
165
|
+
(0, common_1.assertParamExists)('getPolicy', 'code', code);
|
|
166
|
+
localVarPath = "/insuranceservice/v1/policies/{code}"
|
|
167
|
+
.replace("{".concat("code", "}"), encodeURIComponent(String(code)));
|
|
168
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
169
|
+
if (configuration) {
|
|
170
|
+
baseOptions = configuration.baseOptions;
|
|
171
|
+
baseAccessToken = configuration.accessToken;
|
|
172
|
+
}
|
|
173
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
174
|
+
localVarHeaderParameter = {};
|
|
175
|
+
localVarQueryParameter = {};
|
|
176
|
+
// authentication bearer required
|
|
177
|
+
// http bearer authentication required
|
|
178
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
179
|
+
case 1:
|
|
180
|
+
// authentication bearer required
|
|
181
|
+
// http bearer authentication required
|
|
182
|
+
_a.sent();
|
|
183
|
+
if (expand !== undefined) {
|
|
184
|
+
localVarQueryParameter['expand'] = expand;
|
|
185
|
+
}
|
|
186
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
187
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
188
|
+
}
|
|
189
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
190
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
191
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
192
|
+
return [2 /*return*/, {
|
|
193
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
194
|
+
options: localVarRequestOptions,
|
|
195
|
+
}];
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
},
|
|
200
|
+
/**
|
|
201
|
+
* Returns a list of policies you have previously created. The policies are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
202
|
+
* @summary List policies
|
|
203
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
204
|
+
* @param {number} [pageSize] Page size
|
|
205
|
+
* @param {string} [pageToken] Page token
|
|
206
|
+
* @param {string} [filter] List filter
|
|
207
|
+
* @param {string} [search] Search query
|
|
208
|
+
* @param {string} [order] Ordering criteria
|
|
209
|
+
* @param {string} [expand] Extra fields to fetch
|
|
210
|
+
* @param {*} [options] Override http request option.
|
|
211
|
+
* @throws {RequiredError}
|
|
212
|
+
*/
|
|
213
|
+
listPolicies: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
|
|
214
|
+
if (options === void 0) { options = {}; }
|
|
215
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
216
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
217
|
+
return __generator(this, function (_a) {
|
|
218
|
+
switch (_a.label) {
|
|
219
|
+
case 0:
|
|
220
|
+
localVarPath = "/insuranceservice/v1/policies";
|
|
221
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
222
|
+
if (configuration) {
|
|
223
|
+
baseOptions = configuration.baseOptions;
|
|
224
|
+
baseAccessToken = configuration.accessToken;
|
|
225
|
+
}
|
|
226
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
227
|
+
localVarHeaderParameter = {};
|
|
228
|
+
localVarQueryParameter = {};
|
|
229
|
+
// authentication bearer required
|
|
230
|
+
// http bearer authentication required
|
|
231
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
232
|
+
case 1:
|
|
233
|
+
// authentication bearer required
|
|
234
|
+
// http bearer authentication required
|
|
235
|
+
_a.sent();
|
|
236
|
+
if (pageSize !== undefined) {
|
|
237
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
238
|
+
}
|
|
239
|
+
if (pageToken !== undefined) {
|
|
240
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
241
|
+
}
|
|
242
|
+
if (filter !== undefined) {
|
|
243
|
+
localVarQueryParameter['filter'] = filter;
|
|
244
|
+
}
|
|
245
|
+
if (search !== undefined) {
|
|
246
|
+
localVarQueryParameter['search'] = search;
|
|
247
|
+
}
|
|
248
|
+
if (order !== undefined) {
|
|
249
|
+
localVarQueryParameter['order'] = order;
|
|
250
|
+
}
|
|
251
|
+
if (expand !== undefined) {
|
|
252
|
+
localVarQueryParameter['expand'] = expand;
|
|
253
|
+
}
|
|
254
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
255
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
256
|
+
}
|
|
257
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
258
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
259
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
260
|
+
return [2 /*return*/, {
|
|
261
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
262
|
+
options: localVarRequestOptions,
|
|
263
|
+
}];
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
});
|
|
267
|
+
},
|
|
268
|
+
/**
|
|
269
|
+
* Updates the specified policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
270
|
+
* @summary Update the policy
|
|
271
|
+
* @param {string} code Unique identifier for the object.
|
|
272
|
+
* @param {UpdatePolicyRequestDto} updatePolicyRequestDto
|
|
273
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
274
|
+
* @param {*} [options] Override http request option.
|
|
275
|
+
* @throws {RequiredError}
|
|
276
|
+
*/
|
|
277
|
+
updatePolicy: function (code, updatePolicyRequestDto, authorization, options) {
|
|
278
|
+
if (options === void 0) { options = {}; }
|
|
279
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
280
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
281
|
+
return __generator(this, function (_a) {
|
|
282
|
+
switch (_a.label) {
|
|
283
|
+
case 0:
|
|
284
|
+
// verify required parameter 'code' is not null or undefined
|
|
285
|
+
(0, common_1.assertParamExists)('updatePolicy', 'code', code);
|
|
286
|
+
// verify required parameter 'updatePolicyRequestDto' is not null or undefined
|
|
287
|
+
(0, common_1.assertParamExists)('updatePolicy', 'updatePolicyRequestDto', updatePolicyRequestDto);
|
|
288
|
+
localVarPath = "/insuranceservice/v1/policies/{code}"
|
|
289
|
+
.replace("{".concat("code", "}"), encodeURIComponent(String(code)));
|
|
290
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
291
|
+
if (configuration) {
|
|
292
|
+
baseOptions = configuration.baseOptions;
|
|
293
|
+
baseAccessToken = configuration.accessToken;
|
|
294
|
+
}
|
|
295
|
+
localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
|
|
296
|
+
localVarHeaderParameter = {};
|
|
297
|
+
localVarQueryParameter = {};
|
|
298
|
+
// authentication bearer required
|
|
299
|
+
// http bearer authentication required
|
|
300
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
301
|
+
case 1:
|
|
302
|
+
// authentication bearer required
|
|
303
|
+
// http bearer authentication required
|
|
304
|
+
_a.sent();
|
|
305
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
306
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
307
|
+
}
|
|
308
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
309
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
310
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
311
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
312
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updatePolicyRequestDto, localVarRequestOptions, configuration);
|
|
313
|
+
return [2 /*return*/, {
|
|
314
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
315
|
+
options: localVarRequestOptions,
|
|
316
|
+
}];
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
});
|
|
320
|
+
},
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
exports.PoliciesApiAxiosParamCreator = PoliciesApiAxiosParamCreator;
|
|
324
|
+
/**
|
|
325
|
+
* PoliciesApi - functional programming interface
|
|
326
|
+
* @export
|
|
327
|
+
*/
|
|
328
|
+
var PoliciesApiFp = function (configuration) {
|
|
329
|
+
var localVarAxiosParamCreator = (0, exports.PoliciesApiAxiosParamCreator)(configuration);
|
|
330
|
+
return {
|
|
331
|
+
/**
|
|
332
|
+
* This will create a policy in the database. Policy creation is usually part of a complex workflow that starts with lead creation. Creating directly a policy without prior knowledge might result in an unusable policy. Look into lead creation for more information.
|
|
333
|
+
* @summary Create the policy
|
|
334
|
+
* @param {CreatePolicyRequestDto} createPolicyRequestDto
|
|
335
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
336
|
+
* @param {*} [options] Override http request option.
|
|
337
|
+
* @throws {RequiredError}
|
|
338
|
+
*/
|
|
339
|
+
createPolicy: function (createPolicyRequestDto, authorization, options) {
|
|
340
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
341
|
+
var localVarAxiosArgs;
|
|
342
|
+
return __generator(this, function (_a) {
|
|
343
|
+
switch (_a.label) {
|
|
344
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createPolicy(createPolicyRequestDto, authorization, options)];
|
|
345
|
+
case 1:
|
|
346
|
+
localVarAxiosArgs = _a.sent();
|
|
347
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
348
|
+
}
|
|
349
|
+
});
|
|
350
|
+
});
|
|
351
|
+
},
|
|
352
|
+
/**
|
|
353
|
+
* Retrieves the details of the policy that was previously created. Supply the unique policy code that was returned when you created it and Emil Api will return the corresponding policy information.
|
|
354
|
+
* @summary Retrieve the policy
|
|
355
|
+
* @param {string} code Unique identifier for the object.
|
|
356
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
357
|
+
* @param {string} [expand] Fields to expand response by
|
|
358
|
+
* @param {*} [options] Override http request option.
|
|
359
|
+
* @throws {RequiredError}
|
|
360
|
+
*/
|
|
361
|
+
getPolicy: function (code, authorization, expand, options) {
|
|
362
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
363
|
+
var localVarAxiosArgs;
|
|
364
|
+
return __generator(this, function (_a) {
|
|
365
|
+
switch (_a.label) {
|
|
366
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getPolicy(code, authorization, expand, options)];
|
|
367
|
+
case 1:
|
|
368
|
+
localVarAxiosArgs = _a.sent();
|
|
369
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
370
|
+
}
|
|
371
|
+
});
|
|
372
|
+
});
|
|
373
|
+
},
|
|
374
|
+
/**
|
|
375
|
+
* Returns a list of policies you have previously created. The policies are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
376
|
+
* @summary List policies
|
|
377
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
378
|
+
* @param {number} [pageSize] Page size
|
|
379
|
+
* @param {string} [pageToken] Page token
|
|
380
|
+
* @param {string} [filter] List filter
|
|
381
|
+
* @param {string} [search] Search query
|
|
382
|
+
* @param {string} [order] Ordering criteria
|
|
383
|
+
* @param {string} [expand] Extra fields to fetch
|
|
384
|
+
* @param {*} [options] Override http request option.
|
|
385
|
+
* @throws {RequiredError}
|
|
386
|
+
*/
|
|
387
|
+
listPolicies: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
|
|
388
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
389
|
+
var localVarAxiosArgs;
|
|
390
|
+
return __generator(this, function (_a) {
|
|
391
|
+
switch (_a.label) {
|
|
392
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listPolicies(authorization, pageSize, pageToken, filter, search, order, expand, options)];
|
|
393
|
+
case 1:
|
|
394
|
+
localVarAxiosArgs = _a.sent();
|
|
395
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
396
|
+
}
|
|
397
|
+
});
|
|
398
|
+
});
|
|
399
|
+
},
|
|
400
|
+
/**
|
|
401
|
+
* Updates the specified policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
402
|
+
* @summary Update the policy
|
|
403
|
+
* @param {string} code Unique identifier for the object.
|
|
404
|
+
* @param {UpdatePolicyRequestDto} updatePolicyRequestDto
|
|
405
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
406
|
+
* @param {*} [options] Override http request option.
|
|
407
|
+
* @throws {RequiredError}
|
|
408
|
+
*/
|
|
409
|
+
updatePolicy: function (code, updatePolicyRequestDto, authorization, options) {
|
|
410
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
411
|
+
var localVarAxiosArgs;
|
|
412
|
+
return __generator(this, function (_a) {
|
|
413
|
+
switch (_a.label) {
|
|
414
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.updatePolicy(code, updatePolicyRequestDto, authorization, options)];
|
|
415
|
+
case 1:
|
|
416
|
+
localVarAxiosArgs = _a.sent();
|
|
417
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
418
|
+
}
|
|
419
|
+
});
|
|
420
|
+
});
|
|
421
|
+
},
|
|
422
|
+
};
|
|
423
|
+
};
|
|
424
|
+
exports.PoliciesApiFp = PoliciesApiFp;
|
|
425
|
+
/**
|
|
426
|
+
* PoliciesApi - factory interface
|
|
427
|
+
* @export
|
|
428
|
+
*/
|
|
429
|
+
var PoliciesApiFactory = function (configuration, basePath, axios) {
|
|
430
|
+
var localVarFp = (0, exports.PoliciesApiFp)(configuration);
|
|
431
|
+
return {
|
|
432
|
+
/**
|
|
433
|
+
* This will create a policy in the database. Policy creation is usually part of a complex workflow that starts with lead creation. Creating directly a policy without prior knowledge might result in an unusable policy. Look into lead creation for more information.
|
|
434
|
+
* @summary Create the policy
|
|
435
|
+
* @param {CreatePolicyRequestDto} createPolicyRequestDto
|
|
436
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
437
|
+
* @param {*} [options] Override http request option.
|
|
438
|
+
* @throws {RequiredError}
|
|
439
|
+
*/
|
|
440
|
+
createPolicy: function (createPolicyRequestDto, authorization, options) {
|
|
441
|
+
return localVarFp.createPolicy(createPolicyRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
442
|
+
},
|
|
443
|
+
/**
|
|
444
|
+
* Retrieves the details of the policy that was previously created. Supply the unique policy code that was returned when you created it and Emil Api will return the corresponding policy information.
|
|
445
|
+
* @summary Retrieve the policy
|
|
446
|
+
* @param {string} code Unique identifier for the object.
|
|
447
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
448
|
+
* @param {string} [expand] Fields to expand response by
|
|
449
|
+
* @param {*} [options] Override http request option.
|
|
450
|
+
* @throws {RequiredError}
|
|
451
|
+
*/
|
|
452
|
+
getPolicy: function (code, authorization, expand, options) {
|
|
453
|
+
return localVarFp.getPolicy(code, authorization, expand, options).then(function (request) { return request(axios, basePath); });
|
|
454
|
+
},
|
|
455
|
+
/**
|
|
456
|
+
* Returns a list of policies you have previously created. The policies are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
457
|
+
* @summary List policies
|
|
458
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
459
|
+
* @param {number} [pageSize] Page size
|
|
460
|
+
* @param {string} [pageToken] Page token
|
|
461
|
+
* @param {string} [filter] List filter
|
|
462
|
+
* @param {string} [search] Search query
|
|
463
|
+
* @param {string} [order] Ordering criteria
|
|
464
|
+
* @param {string} [expand] Extra fields to fetch
|
|
465
|
+
* @param {*} [options] Override http request option.
|
|
466
|
+
* @throws {RequiredError}
|
|
467
|
+
*/
|
|
468
|
+
listPolicies: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
|
|
469
|
+
return localVarFp.listPolicies(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
|
|
470
|
+
},
|
|
471
|
+
/**
|
|
472
|
+
* Updates the specified policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
473
|
+
* @summary Update the policy
|
|
474
|
+
* @param {string} code Unique identifier for the object.
|
|
475
|
+
* @param {UpdatePolicyRequestDto} updatePolicyRequestDto
|
|
476
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
477
|
+
* @param {*} [options] Override http request option.
|
|
478
|
+
* @throws {RequiredError}
|
|
479
|
+
*/
|
|
480
|
+
updatePolicy: function (code, updatePolicyRequestDto, authorization, options) {
|
|
481
|
+
return localVarFp.updatePolicy(code, updatePolicyRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
482
|
+
},
|
|
483
|
+
};
|
|
484
|
+
};
|
|
485
|
+
exports.PoliciesApiFactory = PoliciesApiFactory;
|
|
486
|
+
/**
|
|
487
|
+
* PoliciesApi - object-oriented interface
|
|
488
|
+
* @export
|
|
489
|
+
* @class PoliciesApi
|
|
490
|
+
* @extends {BaseAPI}
|
|
491
|
+
*/
|
|
492
|
+
var PoliciesApi = /** @class */ (function (_super) {
|
|
493
|
+
__extends(PoliciesApi, _super);
|
|
494
|
+
function PoliciesApi() {
|
|
495
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
496
|
+
}
|
|
497
|
+
/**
|
|
498
|
+
* This will create a policy in the database. Policy creation is usually part of a complex workflow that starts with lead creation. Creating directly a policy without prior knowledge might result in an unusable policy. Look into lead creation for more information.
|
|
499
|
+
* @summary Create the policy
|
|
500
|
+
* @param {PoliciesApiCreatePolicyRequest} requestParameters Request parameters.
|
|
501
|
+
* @param {*} [options] Override http request option.
|
|
502
|
+
* @throws {RequiredError}
|
|
503
|
+
* @memberof PoliciesApi
|
|
504
|
+
*/
|
|
505
|
+
PoliciesApi.prototype.createPolicy = function (requestParameters, options) {
|
|
506
|
+
var _this = this;
|
|
507
|
+
return (0, exports.PoliciesApiFp)(this.configuration).createPolicy(requestParameters.createPolicyRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
508
|
+
};
|
|
509
|
+
/**
|
|
510
|
+
* Retrieves the details of the policy that was previously created. Supply the unique policy code that was returned when you created it and Emil Api will return the corresponding policy information.
|
|
511
|
+
* @summary Retrieve the policy
|
|
512
|
+
* @param {PoliciesApiGetPolicyRequest} requestParameters Request parameters.
|
|
513
|
+
* @param {*} [options] Override http request option.
|
|
514
|
+
* @throws {RequiredError}
|
|
515
|
+
* @memberof PoliciesApi
|
|
516
|
+
*/
|
|
517
|
+
PoliciesApi.prototype.getPolicy = function (requestParameters, options) {
|
|
518
|
+
var _this = this;
|
|
519
|
+
return (0, exports.PoliciesApiFp)(this.configuration).getPolicy(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
520
|
+
};
|
|
521
|
+
/**
|
|
522
|
+
* Returns a list of policies you have previously created. The policies are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
523
|
+
* @summary List policies
|
|
524
|
+
* @param {PoliciesApiListPoliciesRequest} requestParameters Request parameters.
|
|
525
|
+
* @param {*} [options] Override http request option.
|
|
526
|
+
* @throws {RequiredError}
|
|
527
|
+
* @memberof PoliciesApi
|
|
528
|
+
*/
|
|
529
|
+
PoliciesApi.prototype.listPolicies = function (requestParameters, options) {
|
|
530
|
+
var _this = this;
|
|
531
|
+
if (requestParameters === void 0) { requestParameters = {}; }
|
|
532
|
+
return (0, exports.PoliciesApiFp)(this.configuration).listPolicies(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
533
|
+
};
|
|
534
|
+
/**
|
|
535
|
+
* Updates the specified policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
536
|
+
* @summary Update the policy
|
|
537
|
+
* @param {PoliciesApiUpdatePolicyRequest} requestParameters Request parameters.
|
|
538
|
+
* @param {*} [options] Override http request option.
|
|
539
|
+
* @throws {RequiredError}
|
|
540
|
+
* @memberof PoliciesApi
|
|
541
|
+
*/
|
|
542
|
+
PoliciesApi.prototype.updatePolicy = function (requestParameters, options) {
|
|
543
|
+
var _this = this;
|
|
544
|
+
return (0, exports.PoliciesApiFp)(this.configuration).updatePolicy(requestParameters.code, requestParameters.updatePolicyRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
545
|
+
};
|
|
546
|
+
return PoliciesApi;
|
|
547
|
+
}(base_1.BaseAPI));
|
|
548
|
+
exports.PoliciesApi = PoliciesApi;
|