@emilgroup/claim-sdk-node 1.3.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 +16 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +68 -0
- package/api/claims-api.ts +558 -0
- package/api.ts +31 -0
- package/base.ts +284 -0
- package/common.ts +199 -0
- package/configuration.ts +109 -0
- package/dist/api/claims-api.d.ts +316 -0
- package/dist/api/claims-api.js +542 -0
- package/dist/api.d.ts +12 -0
- package/dist/api.js +30 -0
- package/dist/base.d.ts +77 -0
- package/dist/base.js +393 -0
- package/dist/common.d.ts +92 -0
- package/dist/common.js +277 -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 +36 -0
- package/dist/models/create-claim-request-dto.d.ts +114 -0
- package/dist/models/create-claim-request-dto.js +15 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +18 -0
- package/dist/models/update-claim-request-dto.d.ts +120 -0
- package/dist/models/update-claim-request-dto.js +15 -0
- package/git_push.sh +57 -0
- package/index.ts +19 -0
- package/models/create-claim-request-dto.ts +120 -0
- package/models/index.ts +2 -0
- package/models/update-claim-request-dto.ts +126 -0
- package/package.json +29 -0
- package/tsconfig.json +22 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.gitignore
|
|
2
|
+
.npmignore
|
|
3
|
+
.openapi-generator-ignore
|
|
4
|
+
README.md
|
|
5
|
+
api.ts
|
|
6
|
+
api/claims-api.ts
|
|
7
|
+
base.ts
|
|
8
|
+
common.ts
|
|
9
|
+
configuration.ts
|
|
10
|
+
git_push.sh
|
|
11
|
+
index.ts
|
|
12
|
+
models/create-claim-request-dto.ts
|
|
13
|
+
models/index.ts
|
|
14
|
+
models/update-claim-request-dto.ts
|
|
15
|
+
package.json
|
|
16
|
+
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,68 @@
|
|
|
1
|
+
# Emil Claim SDK for Nodejs
|
|
2
|
+
|
|
3
|
+
This TypeScript/JavaScript client utilizes [axios](https://github.com/axios/axios). The generated Node module can be used with Nodejs based applications.
|
|
4
|
+
|
|
5
|
+
Language level
|
|
6
|
+
* ES5 - you must have a Promises/A+ library installed
|
|
7
|
+
* ES6
|
|
8
|
+
|
|
9
|
+
Module system
|
|
10
|
+
* CommonJS
|
|
11
|
+
* ES6 module system
|
|
12
|
+
|
|
13
|
+
Although this package can be used in both TypeScript and JavaScript, it is intended to be used with TypeScript. The definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html)). For more information, you can go to [Emil Api documentation](https://emil.stoplight.io/docs/emil-api/).
|
|
14
|
+
|
|
15
|
+
## Consuming
|
|
16
|
+
|
|
17
|
+
Navigate to the folder of your consuming project and run one of the following commands:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
npm install @emilgroup/claim-sdk-node@1.3.0 --save
|
|
21
|
+
```
|
|
22
|
+
or
|
|
23
|
+
```
|
|
24
|
+
yarn add @emilgroup/claim-sdk-node@1.3.0
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
And then you can import `ClaimsApi`.
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import { ClaimsApi } from '@emilgroup/claim-sdk-node'
|
|
31
|
+
|
|
32
|
+
const claimsApi = new ClaimsApi();
|
|
33
|
+
```
|
|
34
|
+
## Credentials
|
|
35
|
+
|
|
36
|
+
To use authentication protected endpoints, you have to first authorize. To do so, the easiest way is to provide a configuration file under `~/.emil/credentials` with the following content:
|
|
37
|
+
|
|
38
|
+
```shell
|
|
39
|
+
emil_username=XXXXX@XXXX.XXX
|
|
40
|
+
emil_password=XXXXXXXXXXXXXX
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
It is also possible to provide environment variables instead:
|
|
44
|
+
|
|
45
|
+
```shell
|
|
46
|
+
export EMIL_USERNAME=XXXXX@XXXX.XXX
|
|
47
|
+
export EMIL_PASSWORD=XXXXXXXXXXXXXX
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Example
|
|
51
|
+
|
|
52
|
+
Here is a basic functionning example:
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
async function listClaims(): Promise<Void> {
|
|
56
|
+
try {
|
|
57
|
+
const claimsApi = new ClaimsApi();
|
|
58
|
+
|
|
59
|
+
await claimsApi.initialize(); // should be called only once per Api.
|
|
60
|
+
|
|
61
|
+
const { data: { items } } = await claimsApi.listClaims();
|
|
62
|
+
|
|
63
|
+
console.log(items);
|
|
64
|
+
} catch(error) {
|
|
65
|
+
// process error
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
@@ -0,0 +1,558 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* EMIL ClaimService
|
|
5
|
+
* The EMIL ClaimService 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 { CreateClaimRequestDto } from '../models';
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import { UpdateClaimRequestDto } from '../models';
|
|
27
|
+
// URLSearchParams not necessarily used
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
import { URL, URLSearchParams } from 'url';
|
|
30
|
+
const FormData = require('form-data');
|
|
31
|
+
/**
|
|
32
|
+
* ClaimsApi - axios parameter creator
|
|
33
|
+
* @export
|
|
34
|
+
*/
|
|
35
|
+
export const ClaimsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
36
|
+
return {
|
|
37
|
+
/**
|
|
38
|
+
* This will create a claim in the database
|
|
39
|
+
* @summary Create the claim
|
|
40
|
+
* @param {CreateClaimRequestDto} createClaimRequestDto
|
|
41
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
42
|
+
* @param {*} [options] Override http request option.
|
|
43
|
+
* @throws {RequiredError}
|
|
44
|
+
*/
|
|
45
|
+
createClaim: async (createClaimRequestDto: CreateClaimRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
46
|
+
// verify required parameter 'createClaimRequestDto' is not null or undefined
|
|
47
|
+
assertParamExists('createClaim', 'createClaimRequestDto', createClaimRequestDto)
|
|
48
|
+
const localVarPath = `/v1/claims/`;
|
|
49
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
50
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
51
|
+
let baseOptions;
|
|
52
|
+
let baseAccessToken;
|
|
53
|
+
if (configuration) {
|
|
54
|
+
baseOptions = configuration.baseOptions;
|
|
55
|
+
baseAccessToken = configuration.accessToken;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
59
|
+
const localVarHeaderParameter = {} as any;
|
|
60
|
+
const localVarQueryParameter = {} as any;
|
|
61
|
+
|
|
62
|
+
// authentication bearer required
|
|
63
|
+
// http bearer authentication required
|
|
64
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
65
|
+
|
|
66
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
67
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
73
|
+
|
|
74
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
75
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
76
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
77
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createClaimRequestDto, localVarRequestOptions, configuration)
|
|
78
|
+
|
|
79
|
+
return {
|
|
80
|
+
url: toPathString(localVarUrlObj),
|
|
81
|
+
options: localVarRequestOptions,
|
|
82
|
+
};
|
|
83
|
+
},
|
|
84
|
+
/**
|
|
85
|
+
* This will fetch the identified claim from the database by code
|
|
86
|
+
* @summary Retrieve the claim
|
|
87
|
+
* @param {string} code
|
|
88
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
89
|
+
* @param {*} [options] Override http request option.
|
|
90
|
+
* @throws {RequiredError}
|
|
91
|
+
*/
|
|
92
|
+
getClaim: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
93
|
+
// verify required parameter 'code' is not null or undefined
|
|
94
|
+
assertParamExists('getClaim', 'code', code)
|
|
95
|
+
const localVarPath = `/v1/claims//{code}`
|
|
96
|
+
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
97
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
98
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
99
|
+
let baseOptions;
|
|
100
|
+
let baseAccessToken;
|
|
101
|
+
if (configuration) {
|
|
102
|
+
baseOptions = configuration.baseOptions;
|
|
103
|
+
baseAccessToken = configuration.accessToken;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
107
|
+
const localVarHeaderParameter = {} as any;
|
|
108
|
+
const localVarQueryParameter = {} as any;
|
|
109
|
+
|
|
110
|
+
// authentication bearer required
|
|
111
|
+
// http bearer authentication required
|
|
112
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
113
|
+
|
|
114
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
115
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
121
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
122
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
123
|
+
|
|
124
|
+
return {
|
|
125
|
+
url: toPathString(localVarUrlObj),
|
|
126
|
+
options: localVarRequestOptions,
|
|
127
|
+
};
|
|
128
|
+
},
|
|
129
|
+
/**
|
|
130
|
+
* This will fetch list of claims from the database
|
|
131
|
+
* @summary Retrieve the claim
|
|
132
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
133
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
134
|
+
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
135
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
136
|
+
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
137
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
138
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
139
|
+
* @param {*} [options] Override http request option.
|
|
140
|
+
* @throws {RequiredError}
|
|
141
|
+
*/
|
|
142
|
+
listClaims: async (authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
143
|
+
const localVarPath = `/v1/claims/`;
|
|
144
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
145
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
146
|
+
let baseOptions;
|
|
147
|
+
let baseAccessToken;
|
|
148
|
+
if (configuration) {
|
|
149
|
+
baseOptions = configuration.baseOptions;
|
|
150
|
+
baseAccessToken = configuration.accessToken;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
154
|
+
const localVarHeaderParameter = {} as any;
|
|
155
|
+
const localVarQueryParameter = {} as any;
|
|
156
|
+
|
|
157
|
+
// authentication bearer required
|
|
158
|
+
// http bearer authentication required
|
|
159
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
160
|
+
|
|
161
|
+
if (pageSize !== undefined) {
|
|
162
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if (pageToken !== undefined) {
|
|
166
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
if (filter !== undefined) {
|
|
170
|
+
localVarQueryParameter['filter'] = filter;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
if (search !== undefined) {
|
|
174
|
+
localVarQueryParameter['search'] = search;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
if (order !== undefined) {
|
|
178
|
+
localVarQueryParameter['order'] = order;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
if (expand !== undefined) {
|
|
182
|
+
localVarQueryParameter['expand'] = expand;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
186
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
192
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
193
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
194
|
+
|
|
195
|
+
return {
|
|
196
|
+
url: toPathString(localVarUrlObj),
|
|
197
|
+
options: localVarRequestOptions,
|
|
198
|
+
};
|
|
199
|
+
},
|
|
200
|
+
/**
|
|
201
|
+
* This will update the identified claim in the database
|
|
202
|
+
* @summary Update the claim
|
|
203
|
+
* @param {string} code
|
|
204
|
+
* @param {UpdateClaimRequestDto} updateClaimRequestDto
|
|
205
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
206
|
+
* @param {*} [options] Override http request option.
|
|
207
|
+
* @throws {RequiredError}
|
|
208
|
+
*/
|
|
209
|
+
updateClaim: async (code: string, updateClaimRequestDto: UpdateClaimRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
210
|
+
// verify required parameter 'code' is not null or undefined
|
|
211
|
+
assertParamExists('updateClaim', 'code', code)
|
|
212
|
+
// verify required parameter 'updateClaimRequestDto' is not null or undefined
|
|
213
|
+
assertParamExists('updateClaim', 'updateClaimRequestDto', updateClaimRequestDto)
|
|
214
|
+
const localVarPath = `/v1/claims//{code}`
|
|
215
|
+
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
216
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
217
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
218
|
+
let baseOptions;
|
|
219
|
+
let baseAccessToken;
|
|
220
|
+
if (configuration) {
|
|
221
|
+
baseOptions = configuration.baseOptions;
|
|
222
|
+
baseAccessToken = configuration.accessToken;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
226
|
+
const localVarHeaderParameter = {} as any;
|
|
227
|
+
const localVarQueryParameter = {} as any;
|
|
228
|
+
|
|
229
|
+
// authentication bearer required
|
|
230
|
+
// http bearer authentication required
|
|
231
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
232
|
+
|
|
233
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
234
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
240
|
+
|
|
241
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
242
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
243
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
244
|
+
localVarRequestOptions.data = serializeDataIfNeeded(updateClaimRequestDto, localVarRequestOptions, configuration)
|
|
245
|
+
|
|
246
|
+
return {
|
|
247
|
+
url: toPathString(localVarUrlObj),
|
|
248
|
+
options: localVarRequestOptions,
|
|
249
|
+
};
|
|
250
|
+
},
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* ClaimsApi - functional programming interface
|
|
256
|
+
* @export
|
|
257
|
+
*/
|
|
258
|
+
export const ClaimsApiFp = function(configuration?: Configuration) {
|
|
259
|
+
const localVarAxiosParamCreator = ClaimsApiAxiosParamCreator(configuration)
|
|
260
|
+
return {
|
|
261
|
+
/**
|
|
262
|
+
* This will create a claim in the database
|
|
263
|
+
* @summary Create the claim
|
|
264
|
+
* @param {CreateClaimRequestDto} createClaimRequestDto
|
|
265
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
266
|
+
* @param {*} [options] Override http request option.
|
|
267
|
+
* @throws {RequiredError}
|
|
268
|
+
*/
|
|
269
|
+
async createClaim(createClaimRequestDto: CreateClaimRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
|
|
270
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createClaim(createClaimRequestDto, authorization, options);
|
|
271
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
272
|
+
},
|
|
273
|
+
/**
|
|
274
|
+
* This will fetch the identified claim from the database by code
|
|
275
|
+
* @summary Retrieve the claim
|
|
276
|
+
* @param {string} code
|
|
277
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
278
|
+
* @param {*} [options] Override http request option.
|
|
279
|
+
* @throws {RequiredError}
|
|
280
|
+
*/
|
|
281
|
+
async getClaim(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
|
|
282
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getClaim(code, authorization, options);
|
|
283
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
284
|
+
},
|
|
285
|
+
/**
|
|
286
|
+
* This will fetch list of claims from the database
|
|
287
|
+
* @summary Retrieve the claim
|
|
288
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
289
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
290
|
+
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
291
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
292
|
+
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
293
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
294
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
295
|
+
* @param {*} [options] Override http request option.
|
|
296
|
+
* @throws {RequiredError}
|
|
297
|
+
*/
|
|
298
|
+
async listClaims(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
|
|
299
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listClaims(authorization, pageSize, pageToken, filter, search, order, expand, options);
|
|
300
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
301
|
+
},
|
|
302
|
+
/**
|
|
303
|
+
* This will update the identified claim in the database
|
|
304
|
+
* @summary Update the claim
|
|
305
|
+
* @param {string} code
|
|
306
|
+
* @param {UpdateClaimRequestDto} updateClaimRequestDto
|
|
307
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
308
|
+
* @param {*} [options] Override http request option.
|
|
309
|
+
* @throws {RequiredError}
|
|
310
|
+
*/
|
|
311
|
+
async updateClaim(code: string, updateClaimRequestDto: UpdateClaimRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
|
|
312
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateClaim(code, updateClaimRequestDto, authorization, options);
|
|
313
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
314
|
+
},
|
|
315
|
+
}
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* ClaimsApi - factory interface
|
|
320
|
+
* @export
|
|
321
|
+
*/
|
|
322
|
+
export const ClaimsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
323
|
+
const localVarFp = ClaimsApiFp(configuration)
|
|
324
|
+
return {
|
|
325
|
+
/**
|
|
326
|
+
* This will create a claim in the database
|
|
327
|
+
* @summary Create the claim
|
|
328
|
+
* @param {CreateClaimRequestDto} createClaimRequestDto
|
|
329
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
330
|
+
* @param {*} [options] Override http request option.
|
|
331
|
+
* @throws {RequiredError}
|
|
332
|
+
*/
|
|
333
|
+
createClaim(createClaimRequestDto: CreateClaimRequestDto, authorization?: string, options?: any): AxiosPromise<object> {
|
|
334
|
+
return localVarFp.createClaim(createClaimRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
335
|
+
},
|
|
336
|
+
/**
|
|
337
|
+
* This will fetch the identified claim from the database by code
|
|
338
|
+
* @summary Retrieve the claim
|
|
339
|
+
* @param {string} code
|
|
340
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
341
|
+
* @param {*} [options] Override http request option.
|
|
342
|
+
* @throws {RequiredError}
|
|
343
|
+
*/
|
|
344
|
+
getClaim(code: string, authorization?: string, options?: any): AxiosPromise<object> {
|
|
345
|
+
return localVarFp.getClaim(code, authorization, options).then((request) => request(axios, basePath));
|
|
346
|
+
},
|
|
347
|
+
/**
|
|
348
|
+
* This will fetch list of claims from the database
|
|
349
|
+
* @summary Retrieve the claim
|
|
350
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
351
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
352
|
+
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
353
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
354
|
+
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
355
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
356
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
357
|
+
* @param {*} [options] Override http request option.
|
|
358
|
+
* @throws {RequiredError}
|
|
359
|
+
*/
|
|
360
|
+
listClaims(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: any): AxiosPromise<object> {
|
|
361
|
+
return localVarFp.listClaims(authorization, pageSize, pageToken, filter, search, order, expand, options).then((request) => request(axios, basePath));
|
|
362
|
+
},
|
|
363
|
+
/**
|
|
364
|
+
* This will update the identified claim in the database
|
|
365
|
+
* @summary Update the claim
|
|
366
|
+
* @param {string} code
|
|
367
|
+
* @param {UpdateClaimRequestDto} updateClaimRequestDto
|
|
368
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
369
|
+
* @param {*} [options] Override http request option.
|
|
370
|
+
* @throws {RequiredError}
|
|
371
|
+
*/
|
|
372
|
+
updateClaim(code: string, updateClaimRequestDto: UpdateClaimRequestDto, authorization?: string, options?: any): AxiosPromise<object> {
|
|
373
|
+
return localVarFp.updateClaim(code, updateClaimRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
374
|
+
},
|
|
375
|
+
};
|
|
376
|
+
};
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Request parameters for createClaim operation in ClaimsApi.
|
|
380
|
+
* @export
|
|
381
|
+
* @interface ClaimsApiCreateClaimRequest
|
|
382
|
+
*/
|
|
383
|
+
export interface ClaimsApiCreateClaimRequest {
|
|
384
|
+
/**
|
|
385
|
+
*
|
|
386
|
+
* @type {CreateClaimRequestDto}
|
|
387
|
+
* @memberof ClaimsApiCreateClaim
|
|
388
|
+
*/
|
|
389
|
+
readonly createClaimRequestDto: CreateClaimRequestDto
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
393
|
+
* @type {string}
|
|
394
|
+
* @memberof ClaimsApiCreateClaim
|
|
395
|
+
*/
|
|
396
|
+
readonly authorization?: string
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Request parameters for getClaim operation in ClaimsApi.
|
|
401
|
+
* @export
|
|
402
|
+
* @interface ClaimsApiGetClaimRequest
|
|
403
|
+
*/
|
|
404
|
+
export interface ClaimsApiGetClaimRequest {
|
|
405
|
+
/**
|
|
406
|
+
*
|
|
407
|
+
* @type {string}
|
|
408
|
+
* @memberof ClaimsApiGetClaim
|
|
409
|
+
*/
|
|
410
|
+
readonly code: string
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
414
|
+
* @type {string}
|
|
415
|
+
* @memberof ClaimsApiGetClaim
|
|
416
|
+
*/
|
|
417
|
+
readonly authorization?: string
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* Request parameters for listClaims operation in ClaimsApi.
|
|
422
|
+
* @export
|
|
423
|
+
* @interface ClaimsApiListClaimsRequest
|
|
424
|
+
*/
|
|
425
|
+
export interface ClaimsApiListClaimsRequest {
|
|
426
|
+
/**
|
|
427
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
428
|
+
* @type {string}
|
|
429
|
+
* @memberof ClaimsApiListClaims
|
|
430
|
+
*/
|
|
431
|
+
readonly authorization?: string
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
435
|
+
* @type {any}
|
|
436
|
+
* @memberof ClaimsApiListClaims
|
|
437
|
+
*/
|
|
438
|
+
readonly pageSize?: any
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
442
|
+
* @type {any}
|
|
443
|
+
* @memberof ClaimsApiListClaims
|
|
444
|
+
*/
|
|
445
|
+
readonly pageToken?: any
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
449
|
+
* @type {any}
|
|
450
|
+
* @memberof ClaimsApiListClaims
|
|
451
|
+
*/
|
|
452
|
+
readonly filter?: any
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
456
|
+
* @type {any}
|
|
457
|
+
* @memberof ClaimsApiListClaims
|
|
458
|
+
*/
|
|
459
|
+
readonly search?: any
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
463
|
+
* @type {any}
|
|
464
|
+
* @memberof ClaimsApiListClaims
|
|
465
|
+
*/
|
|
466
|
+
readonly order?: any
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
470
|
+
* @type {any}
|
|
471
|
+
* @memberof ClaimsApiListClaims
|
|
472
|
+
*/
|
|
473
|
+
readonly expand?: any
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* Request parameters for updateClaim operation in ClaimsApi.
|
|
478
|
+
* @export
|
|
479
|
+
* @interface ClaimsApiUpdateClaimRequest
|
|
480
|
+
*/
|
|
481
|
+
export interface ClaimsApiUpdateClaimRequest {
|
|
482
|
+
/**
|
|
483
|
+
*
|
|
484
|
+
* @type {string}
|
|
485
|
+
* @memberof ClaimsApiUpdateClaim
|
|
486
|
+
*/
|
|
487
|
+
readonly code: string
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
*
|
|
491
|
+
* @type {UpdateClaimRequestDto}
|
|
492
|
+
* @memberof ClaimsApiUpdateClaim
|
|
493
|
+
*/
|
|
494
|
+
readonly updateClaimRequestDto: UpdateClaimRequestDto
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
498
|
+
* @type {string}
|
|
499
|
+
* @memberof ClaimsApiUpdateClaim
|
|
500
|
+
*/
|
|
501
|
+
readonly authorization?: string
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* ClaimsApi - object-oriented interface
|
|
506
|
+
* @export
|
|
507
|
+
* @class ClaimsApi
|
|
508
|
+
* @extends {BaseAPI}
|
|
509
|
+
*/
|
|
510
|
+
export class ClaimsApi extends BaseAPI {
|
|
511
|
+
/**
|
|
512
|
+
* This will create a claim in the database
|
|
513
|
+
* @summary Create the claim
|
|
514
|
+
* @param {ClaimsApiCreateClaimRequest} requestParameters Request parameters.
|
|
515
|
+
* @param {*} [options] Override http request option.
|
|
516
|
+
* @throws {RequiredError}
|
|
517
|
+
* @memberof ClaimsApi
|
|
518
|
+
*/
|
|
519
|
+
public createClaim(requestParameters: ClaimsApiCreateClaimRequest, options?: AxiosRequestConfig) {
|
|
520
|
+
return ClaimsApiFp(this.configuration).createClaim(requestParameters.createClaimRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* This will fetch the identified claim from the database by code
|
|
525
|
+
* @summary Retrieve the claim
|
|
526
|
+
* @param {ClaimsApiGetClaimRequest} requestParameters Request parameters.
|
|
527
|
+
* @param {*} [options] Override http request option.
|
|
528
|
+
* @throws {RequiredError}
|
|
529
|
+
* @memberof ClaimsApi
|
|
530
|
+
*/
|
|
531
|
+
public getClaim(requestParameters: ClaimsApiGetClaimRequest, options?: AxiosRequestConfig) {
|
|
532
|
+
return ClaimsApiFp(this.configuration).getClaim(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* This will fetch list of claims from the database
|
|
537
|
+
* @summary Retrieve the claim
|
|
538
|
+
* @param {ClaimsApiListClaimsRequest} requestParameters Request parameters.
|
|
539
|
+
* @param {*} [options] Override http request option.
|
|
540
|
+
* @throws {RequiredError}
|
|
541
|
+
* @memberof ClaimsApi
|
|
542
|
+
*/
|
|
543
|
+
public listClaims(requestParameters: ClaimsApiListClaimsRequest = {}, options?: AxiosRequestConfig) {
|
|
544
|
+
return ClaimsApiFp(this.configuration).listClaims(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* This will update the identified claim in the database
|
|
549
|
+
* @summary Update the claim
|
|
550
|
+
* @param {ClaimsApiUpdateClaimRequest} requestParameters Request parameters.
|
|
551
|
+
* @param {*} [options] Override http request option.
|
|
552
|
+
* @throws {RequiredError}
|
|
553
|
+
* @memberof ClaimsApi
|
|
554
|
+
*/
|
|
555
|
+
public updateClaim(requestParameters: ClaimsApiUpdateClaimRequest, options?: AxiosRequestConfig) {
|
|
556
|
+
return ClaimsApiFp(this.configuration).updateClaim(requestParameters.code, requestParameters.updateClaimRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
557
|
+
}
|
|
558
|
+
}
|