@emilgroup/insurance-sdk 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 +90 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +157 -0
- package/api/insured-object-types-api.ts +232 -0
- package/api/insured-objects-api.ts +442 -0
- package/api/leads-api.ts +163 -0
- package/api/policies-api.ts +576 -0
- package/api/products-api.ts +2174 -0
- package/api.ts +40 -0
- package/base.ts +182 -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 +251 -0
- package/dist/api/insured-objects-api.d.ts +254 -0
- package/dist/api/insured-objects-api.js +436 -0
- package/dist/api/leads-api.d.ts +96 -0
- package/dist/api/leads-api.js +221 -0
- package/dist/api/policies-api.d.ts +329 -0
- package/dist/api/policies-api.js +541 -0
- package/dist/api/products-api.d.ts +1218 -0
- package/dist/api/products-api.js +1809 -0
- package/dist/api.d.ts +20 -0
- package/dist/api.js +40 -0
- package/dist/base.d.ts +68 -0
- package/dist/base.js +243 -0
- package/dist/common.d.ts +65 -0
- package/dist/common.js +243 -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-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 +45 -0
- package/dist/models/create-lead-request-dto.js +15 -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/index.d.ts +72 -0
- package/dist/models/index.js +88 -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/shared-create-lead-request-dto.d.ts +45 -0
- package/dist/models/shared-create-lead-request-dto.js +15 -0
- package/dist/models/store-product-factors-request-dto.d.ts +30 -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-policy-request-dto.d.ts +42 -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-product-field-request-dto.d.ts +119 -0
- package/dist/models/update-product-field-request-dto.js +20 -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-version-request-dto.d.ts +43 -0
- package/dist/models/update-product-version-request-dto.js +22 -0
- package/dist/models/validate-product-factors-request-dto.d.ts +30 -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-insured-object-request-dto.ts +48 -0
- package/models/create-insured-object-response-class.ts +31 -0
- package/models/create-lead-request-dto.ts +51 -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/index.ts +72 -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/shared-create-lead-request-dto.ts +51 -0
- package/models/store-product-factors-request-dto.ts +36 -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-policy-request-dto.ts +48 -0
- package/models/update-policy-response-class.ts +31 -0
- package/models/update-premium-formula-request-dto.ts +81 -0
- package/models/update-product-field-request-dto.ts +128 -0
- package/models/update-product-request-dto.ts +48 -0
- package/models/update-product-version-request-dto.ts +52 -0
- package/models/validate-product-factors-request-dto.ts +36 -0
- package/package.json +27 -0
- package/tsconfig.json +21 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
.gitignore
|
|
2
|
+
.npmignore
|
|
3
|
+
.openapi-generator-ignore
|
|
4
|
+
README.md
|
|
5
|
+
api.ts
|
|
6
|
+
api/insured-object-types-api.ts
|
|
7
|
+
api/insured-objects-api.ts
|
|
8
|
+
api/leads-api.ts
|
|
9
|
+
api/policies-api.ts
|
|
10
|
+
api/products-api.ts
|
|
11
|
+
base.ts
|
|
12
|
+
common.ts
|
|
13
|
+
configuration.ts
|
|
14
|
+
git_push.sh
|
|
15
|
+
index.ts
|
|
16
|
+
models/calculate-custom-premium-request-dto.ts
|
|
17
|
+
models/calculate-premium-request-dto.ts
|
|
18
|
+
models/create-account-request-dto.ts
|
|
19
|
+
models/create-bank-account-request-dto.ts
|
|
20
|
+
models/create-claim-request-dto.ts
|
|
21
|
+
models/create-custom-application-request-dto.ts
|
|
22
|
+
models/create-insured-object-request-dto.ts
|
|
23
|
+
models/create-insured-object-response-class.ts
|
|
24
|
+
models/create-lead-request-dto.ts
|
|
25
|
+
models/create-policy-request-dto.ts
|
|
26
|
+
models/create-policy-response-class.ts
|
|
27
|
+
models/create-premium-formula-request-dto.ts
|
|
28
|
+
models/create-premium-formula-response-class.ts
|
|
29
|
+
models/create-product-field-request-dto.ts
|
|
30
|
+
models/create-product-field-response-class.ts
|
|
31
|
+
models/create-product-request-dto.ts
|
|
32
|
+
models/create-product-response-class.ts
|
|
33
|
+
models/csv-product-factor-dto.ts
|
|
34
|
+
models/delete-request-dto.ts
|
|
35
|
+
models/get-insured-object-request-dto.ts
|
|
36
|
+
models/get-insured-object-response-class.ts
|
|
37
|
+
models/get-policy-request-dto.ts
|
|
38
|
+
models/get-policy-response-class.ts
|
|
39
|
+
models/get-premium-formula-request-dto.ts
|
|
40
|
+
models/get-premium-formula-response-class.ts
|
|
41
|
+
models/get-product-factor-response-class.ts
|
|
42
|
+
models/get-product-factor-value-request-dto.ts
|
|
43
|
+
models/get-product-factor-value-response-class.ts
|
|
44
|
+
models/get-product-field-request-dto.ts
|
|
45
|
+
models/get-product-field-response-class.ts
|
|
46
|
+
models/get-product-request-dto.ts
|
|
47
|
+
models/get-product-response-class.ts
|
|
48
|
+
models/get-product-version-request-dto.ts
|
|
49
|
+
models/get-product-version-response-class.ts
|
|
50
|
+
models/grouped-product-factor-class.ts
|
|
51
|
+
models/grouped-product-factor-value-class.ts
|
|
52
|
+
models/grouped-product-factors-response-class.ts
|
|
53
|
+
models/index.ts
|
|
54
|
+
models/insured-object-class.ts
|
|
55
|
+
models/insured-object-type-class.ts
|
|
56
|
+
models/list-insured-object-types-response-class.ts
|
|
57
|
+
models/list-insured-objects-response-class.ts
|
|
58
|
+
models/list-policies-response-class.ts
|
|
59
|
+
models/list-premium-formulas-response-class.ts
|
|
60
|
+
models/list-product-factors-response-class.ts
|
|
61
|
+
models/list-product-field-types-response-class.ts
|
|
62
|
+
models/list-product-fields-response-class.ts
|
|
63
|
+
models/list-products-response-class.ts
|
|
64
|
+
models/list-request-dto.ts
|
|
65
|
+
models/policy-class.ts
|
|
66
|
+
models/policy-object-class.ts
|
|
67
|
+
models/policy-object-dto.ts
|
|
68
|
+
models/policy-premium-class.ts
|
|
69
|
+
models/policy-premium-item-class.ts
|
|
70
|
+
models/policy-version-class.ts
|
|
71
|
+
models/premium-formula-class.ts
|
|
72
|
+
models/product-class.ts
|
|
73
|
+
models/product-factor-class.ts
|
|
74
|
+
models/product-factor-value-class.ts
|
|
75
|
+
models/product-field-class.ts
|
|
76
|
+
models/product-version-class.ts
|
|
77
|
+
models/shared-create-lead-request-dto.ts
|
|
78
|
+
models/store-product-factors-request-dto.ts
|
|
79
|
+
models/store-product-factors-response-class.ts
|
|
80
|
+
models/timeslice-class.ts
|
|
81
|
+
models/update-insured-object-request-dto.ts
|
|
82
|
+
models/update-policy-request-dto.ts
|
|
83
|
+
models/update-policy-response-class.ts
|
|
84
|
+
models/update-premium-formula-request-dto.ts
|
|
85
|
+
models/update-product-field-request-dto.ts
|
|
86
|
+
models/update-product-request-dto.ts
|
|
87
|
+
models/update-product-version-request-dto.ts
|
|
88
|
+
models/validate-product-factors-request-dto.ts
|
|
89
|
+
package.json
|
|
90
|
+
tsconfig.json
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
5.4.0
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# OpenAPI Generator Ignore
|
|
2
|
+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
|
3
|
+
|
|
4
|
+
# Use this file to prevent files from being overwritten by the generator.
|
|
5
|
+
# The patterns follow closely to .gitignore or .dockerignore.
|
|
6
|
+
|
|
7
|
+
# As an example, the C# client generator defines ApiClient.cs.
|
|
8
|
+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
|
9
|
+
#ApiClient.cs
|
|
10
|
+
|
|
11
|
+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
|
12
|
+
#foo/*/qux
|
|
13
|
+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
|
14
|
+
|
|
15
|
+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
|
16
|
+
#foo/**/qux
|
|
17
|
+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
|
18
|
+
|
|
19
|
+
# You can also negate patterns with an exclamation (!).
|
|
20
|
+
# For example, you can ignore all files in a docs folder with the file extension .md:
|
|
21
|
+
#docs/*.md
|
|
22
|
+
# Then explicitly reverse the ignore rule for a single file:
|
|
23
|
+
#!docs/README.md
|
package/README.md
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
## @emilgroup/insurance-sdk@1.0.0
|
|
2
|
+
|
|
3
|
+
This TypeScript/JavaScript client utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
|
|
4
|
+
|
|
5
|
+
Environment
|
|
6
|
+
* Node.js
|
|
7
|
+
* Webpack
|
|
8
|
+
* Browserify
|
|
9
|
+
|
|
10
|
+
Language level
|
|
11
|
+
* ES5 - you must have a Promises/A+ library installed
|
|
12
|
+
* ES6
|
|
13
|
+
|
|
14
|
+
Module system
|
|
15
|
+
* CommonJS
|
|
16
|
+
* ES6 module system
|
|
17
|
+
|
|
18
|
+
It can be used in both TypeScript and JavaScript. In TypeScript, the definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html))
|
|
19
|
+
|
|
20
|
+
### Consuming
|
|
21
|
+
|
|
22
|
+
navigate to the folder of your consuming project and run one of the following commands.
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
npm install @emilgroup/insurance-sdk@1.0.0 --save
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
And then you can import `AccountsApi`.
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import { InsuredObjectTypesApi } from '@emilgroup/insurance-sdk'
|
|
32
|
+
|
|
33
|
+
const insuredObjectTypes = new InsuredObjectTypesApi();
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
To use authentication protected endpoints, you have to first authorize. To do so, use the `authorize` function in `AccountsApi`:
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
async function listPoliciess(): Promise<Void> {
|
|
40
|
+
try {
|
|
41
|
+
const insuredObjectTypes = new InsuredObjectTypesApi();
|
|
42
|
+
|
|
43
|
+
await insuredObjectTypes.authorize('username', 'password');
|
|
44
|
+
|
|
45
|
+
const { data: { items } } = await insuredObjectTypes.listPoliciess();
|
|
46
|
+
|
|
47
|
+
console.log(items);
|
|
48
|
+
} catch(error) {
|
|
49
|
+
// process error
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
And then you can import `AccountsApi`.
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
import { InsuredObjectsApi } from '@emilgroup/insurance-sdk'
|
|
58
|
+
|
|
59
|
+
const insuredObjects = new InsuredObjectsApi();
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
To use authentication protected endpoints, you have to first authorize. To do so, use the `authorize` function in `AccountsApi`:
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
async function listPoliciess(): Promise<Void> {
|
|
66
|
+
try {
|
|
67
|
+
const insuredObjects = new InsuredObjectsApi();
|
|
68
|
+
|
|
69
|
+
await insuredObjects.authorize('username', 'password');
|
|
70
|
+
|
|
71
|
+
const { data: { items } } = await insuredObjects.listPoliciess();
|
|
72
|
+
|
|
73
|
+
console.log(items);
|
|
74
|
+
} catch(error) {
|
|
75
|
+
// process error
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
And then you can import `AccountsApi`.
|
|
81
|
+
|
|
82
|
+
```ts
|
|
83
|
+
import { LeadsApi } from '@emilgroup/insurance-sdk'
|
|
84
|
+
|
|
85
|
+
const leads = new LeadsApi();
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
To use authentication protected endpoints, you have to first authorize. To do so, use the `authorize` function in `AccountsApi`:
|
|
89
|
+
|
|
90
|
+
```ts
|
|
91
|
+
async function listPoliciess(): Promise<Void> {
|
|
92
|
+
try {
|
|
93
|
+
const leads = new LeadsApi();
|
|
94
|
+
|
|
95
|
+
await leads.authorize('username', 'password');
|
|
96
|
+
|
|
97
|
+
const { data: { items } } = await leads.listPoliciess();
|
|
98
|
+
|
|
99
|
+
console.log(items);
|
|
100
|
+
} catch(error) {
|
|
101
|
+
// process error
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
And then you can import `AccountsApi`.
|
|
107
|
+
|
|
108
|
+
```ts
|
|
109
|
+
import { PoliciesApi } from '@emilgroup/insurance-sdk'
|
|
110
|
+
|
|
111
|
+
const policies = new PoliciesApi();
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
To use authentication protected endpoints, you have to first authorize. To do so, use the `authorize` function in `AccountsApi`:
|
|
115
|
+
|
|
116
|
+
```ts
|
|
117
|
+
async function listPoliciess(): Promise<Void> {
|
|
118
|
+
try {
|
|
119
|
+
const policies = new PoliciesApi();
|
|
120
|
+
|
|
121
|
+
await policies.authorize('username', 'password');
|
|
122
|
+
|
|
123
|
+
const { data: { items } } = await policies.listPoliciess();
|
|
124
|
+
|
|
125
|
+
console.log(items);
|
|
126
|
+
} catch(error) {
|
|
127
|
+
// process error
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
And then you can import `AccountsApi`.
|
|
133
|
+
|
|
134
|
+
```ts
|
|
135
|
+
import { ProductsApi } from '@emilgroup/insurance-sdk'
|
|
136
|
+
|
|
137
|
+
const products = new ProductsApi();
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
To use authentication protected endpoints, you have to first authorize. To do so, use the `authorize` function in `AccountsApi`:
|
|
141
|
+
|
|
142
|
+
```ts
|
|
143
|
+
async function listPoliciess(): Promise<Void> {
|
|
144
|
+
try {
|
|
145
|
+
const products = new ProductsApi();
|
|
146
|
+
|
|
147
|
+
await products.authorize('username', 'password');
|
|
148
|
+
|
|
149
|
+
const { data: { items } } = await products.listPoliciess();
|
|
150
|
+
|
|
151
|
+
console.log(items);
|
|
152
|
+
} catch(error) {
|
|
153
|
+
// process error
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* EMIL InsuranceService
|
|
5
|
+
* The EMIL InsuranceService API description
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
17
|
+
import { Configuration } from '../configuration';
|
|
18
|
+
// Some imports not used depending on template conditions
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
import { ListInsuredObjectTypesResponseClass } from '../models';
|
|
25
|
+
/**
|
|
26
|
+
* InsuredObjectTypesApi - axios parameter creator
|
|
27
|
+
* @export
|
|
28
|
+
*/
|
|
29
|
+
export const InsuredObjectTypesApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
30
|
+
return {
|
|
31
|
+
/**
|
|
32
|
+
* Returns a list of insured obect types you have previously created. The insured obect types are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
33
|
+
* @summary List insured obect types
|
|
34
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
35
|
+
* @param {number} [pageSize] Page size
|
|
36
|
+
* @param {string} [pageToken] Page token
|
|
37
|
+
* @param {string} [filter] List filter
|
|
38
|
+
* @param {string} [search] Search query
|
|
39
|
+
* @param {string} [order] Ordering criteria
|
|
40
|
+
* @param {string} [expand] Extra fields to fetch
|
|
41
|
+
* @param {*} [options] Override http request option.
|
|
42
|
+
* @throws {RequiredError}
|
|
43
|
+
*/
|
|
44
|
+
listInsuredObjectTypes: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
45
|
+
const localVarPath = `/insuranceservice/v1/insured-object-types`;
|
|
46
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
47
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
48
|
+
let baseOptions;
|
|
49
|
+
let baseAccessToken;
|
|
50
|
+
if (configuration) {
|
|
51
|
+
baseOptions = configuration.baseOptions;
|
|
52
|
+
baseAccessToken = configuration.accessToken;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
56
|
+
const localVarHeaderParameter = {} as any;
|
|
57
|
+
const localVarQueryParameter = {} as any;
|
|
58
|
+
|
|
59
|
+
// authentication bearer required
|
|
60
|
+
// http bearer authentication required
|
|
61
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
62
|
+
|
|
63
|
+
if (pageSize !== undefined) {
|
|
64
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (pageToken !== undefined) {
|
|
68
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (filter !== undefined) {
|
|
72
|
+
localVarQueryParameter['filter'] = filter;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (search !== undefined) {
|
|
76
|
+
localVarQueryParameter['search'] = search;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (order !== undefined) {
|
|
80
|
+
localVarQueryParameter['order'] = order;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (expand !== undefined) {
|
|
84
|
+
localVarQueryParameter['expand'] = expand;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
88
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
94
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
95
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
96
|
+
|
|
97
|
+
return {
|
|
98
|
+
url: toPathString(localVarUrlObj),
|
|
99
|
+
options: localVarRequestOptions,
|
|
100
|
+
};
|
|
101
|
+
},
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* InsuredObjectTypesApi - functional programming interface
|
|
107
|
+
* @export
|
|
108
|
+
*/
|
|
109
|
+
export const InsuredObjectTypesApiFp = function(configuration?: Configuration) {
|
|
110
|
+
const localVarAxiosParamCreator = InsuredObjectTypesApiAxiosParamCreator(configuration)
|
|
111
|
+
return {
|
|
112
|
+
/**
|
|
113
|
+
* Returns a list of insured obect types you have previously created. The insured obect types are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
114
|
+
* @summary List insured obect types
|
|
115
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
116
|
+
* @param {number} [pageSize] Page size
|
|
117
|
+
* @param {string} [pageToken] Page token
|
|
118
|
+
* @param {string} [filter] List filter
|
|
119
|
+
* @param {string} [search] Search query
|
|
120
|
+
* @param {string} [order] Ordering criteria
|
|
121
|
+
* @param {string} [expand] Extra fields to fetch
|
|
122
|
+
* @param {*} [options] Override http request option.
|
|
123
|
+
* @throws {RequiredError}
|
|
124
|
+
*/
|
|
125
|
+
async listInsuredObjectTypes(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListInsuredObjectTypesResponseClass>> {
|
|
126
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listInsuredObjectTypes(authorization, pageSize, pageToken, filter, search, order, expand, options);
|
|
127
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
128
|
+
},
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* InsuredObjectTypesApi - factory interface
|
|
134
|
+
* @export
|
|
135
|
+
*/
|
|
136
|
+
export const InsuredObjectTypesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
137
|
+
const localVarFp = InsuredObjectTypesApiFp(configuration)
|
|
138
|
+
return {
|
|
139
|
+
/**
|
|
140
|
+
* Returns a list of insured obect types you have previously created. The insured obect types are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
141
|
+
* @summary List insured obect types
|
|
142
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
143
|
+
* @param {number} [pageSize] Page size
|
|
144
|
+
* @param {string} [pageToken] Page token
|
|
145
|
+
* @param {string} [filter] List filter
|
|
146
|
+
* @param {string} [search] Search query
|
|
147
|
+
* @param {string} [order] Ordering criteria
|
|
148
|
+
* @param {string} [expand] Extra fields to fetch
|
|
149
|
+
* @param {*} [options] Override http request option.
|
|
150
|
+
* @throws {RequiredError}
|
|
151
|
+
*/
|
|
152
|
+
listInsuredObjectTypes(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options?: any): AxiosPromise<ListInsuredObjectTypesResponseClass> {
|
|
153
|
+
return localVarFp.listInsuredObjectTypes(authorization, pageSize, pageToken, filter, search, order, expand, options).then((request) => request(axios, basePath));
|
|
154
|
+
},
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Request parameters for listInsuredObjectTypes operation in InsuredObjectTypesApi.
|
|
160
|
+
* @export
|
|
161
|
+
* @interface InsuredObjectTypesApiListInsuredObjectTypesRequest
|
|
162
|
+
*/
|
|
163
|
+
export interface InsuredObjectTypesApiListInsuredObjectTypesRequest {
|
|
164
|
+
/**
|
|
165
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
166
|
+
* @type {string}
|
|
167
|
+
* @memberof InsuredObjectTypesApiListInsuredObjectTypes
|
|
168
|
+
*/
|
|
169
|
+
readonly authorization?: string
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Page size
|
|
173
|
+
* @type {number}
|
|
174
|
+
* @memberof InsuredObjectTypesApiListInsuredObjectTypes
|
|
175
|
+
*/
|
|
176
|
+
readonly pageSize?: number
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Page token
|
|
180
|
+
* @type {string}
|
|
181
|
+
* @memberof InsuredObjectTypesApiListInsuredObjectTypes
|
|
182
|
+
*/
|
|
183
|
+
readonly pageToken?: string
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* List filter
|
|
187
|
+
* @type {string}
|
|
188
|
+
* @memberof InsuredObjectTypesApiListInsuredObjectTypes
|
|
189
|
+
*/
|
|
190
|
+
readonly filter?: string
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Search query
|
|
194
|
+
* @type {string}
|
|
195
|
+
* @memberof InsuredObjectTypesApiListInsuredObjectTypes
|
|
196
|
+
*/
|
|
197
|
+
readonly search?: string
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Ordering criteria
|
|
201
|
+
* @type {string}
|
|
202
|
+
* @memberof InsuredObjectTypesApiListInsuredObjectTypes
|
|
203
|
+
*/
|
|
204
|
+
readonly order?: string
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Extra fields to fetch
|
|
208
|
+
* @type {string}
|
|
209
|
+
* @memberof InsuredObjectTypesApiListInsuredObjectTypes
|
|
210
|
+
*/
|
|
211
|
+
readonly expand?: string
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* InsuredObjectTypesApi - object-oriented interface
|
|
216
|
+
* @export
|
|
217
|
+
* @class InsuredObjectTypesApi
|
|
218
|
+
* @extends {BaseAPI}
|
|
219
|
+
*/
|
|
220
|
+
export class InsuredObjectTypesApi extends BaseAPI {
|
|
221
|
+
/**
|
|
222
|
+
* Returns a list of insured obect types you have previously created. The insured obect types are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
223
|
+
* @summary List insured obect types
|
|
224
|
+
* @param {InsuredObjectTypesApiListInsuredObjectTypesRequest} requestParameters Request parameters.
|
|
225
|
+
* @param {*} [options] Override http request option.
|
|
226
|
+
* @throws {RequiredError}
|
|
227
|
+
* @memberof InsuredObjectTypesApi
|
|
228
|
+
*/
|
|
229
|
+
public listInsuredObjectTypes(requestParameters: InsuredObjectTypesApiListInsuredObjectTypesRequest = {}, options?: AxiosRequestConfig) {
|
|
230
|
+
return InsuredObjectTypesApiFp(this.configuration).listInsuredObjectTypes(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
|
|
231
|
+
}
|
|
232
|
+
}
|