@emilgroup/public-api-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.
Files changed (76) hide show
  1. package/.openapi-generator/FILES +30 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +51 -0
  5. package/api/documents-api.ts +424 -0
  6. package/api/payment-setup-api.ts +260 -0
  7. package/api/products-api.ts +958 -0
  8. package/api.ts +36 -0
  9. package/base.ts +247 -0
  10. package/common.ts +198 -0
  11. package/configuration.ts +101 -0
  12. package/dist/api/documents-api.d.ts +239 -0
  13. package/dist/api/documents-api.js +427 -0
  14. package/dist/api/payment-setup-api.d.ts +144 -0
  15. package/dist/api/payment-setup-api.js +309 -0
  16. package/dist/api/products-api.d.ts +511 -0
  17. package/dist/api/products-api.js +935 -0
  18. package/dist/api.d.ts +18 -0
  19. package/dist/api.js +38 -0
  20. package/dist/base.d.ts +72 -0
  21. package/dist/base.js +293 -0
  22. package/dist/common.d.ts +91 -0
  23. package/dist/common.js +276 -0
  24. package/dist/configuration.d.ts +83 -0
  25. package/dist/configuration.js +44 -0
  26. package/dist/index.d.ts +15 -0
  27. package/dist/index.js +35 -0
  28. package/dist/models/complete-braintree-payment-setup-request-dto.d.ts +48 -0
  29. package/dist/models/complete-braintree-payment-setup-request-dto.js +15 -0
  30. package/dist/models/complete-payment-setup-request-dto.d.ts +32 -0
  31. package/dist/models/complete-payment-setup-request-dto.js +15 -0
  32. package/dist/models/complete-stripe-payment-setup-request-dto.d.ts +54 -0
  33. package/dist/models/complete-stripe-payment-setup-request-dto.js +15 -0
  34. package/dist/models/create-account-request-dto.d.ts +90 -0
  35. package/dist/models/create-account-request-dto.js +21 -0
  36. package/dist/models/create-bank-account-request-dto.d.ts +30 -0
  37. package/dist/models/create-bank-account-request-dto.js +15 -0
  38. package/dist/models/create-custom-application-request-dto.d.ts +34 -0
  39. package/dist/models/create-custom-application-request-dto.js +19 -0
  40. package/dist/models/create-document-request-dto.d.ts +95 -0
  41. package/dist/models/create-document-request-dto.js +31 -0
  42. package/dist/models/create-estimated-invoice-request-dto.d.ts +41 -0
  43. package/dist/models/create-estimated-invoice-request-dto.js +19 -0
  44. package/dist/models/create-lead-request-dto.d.ts +77 -0
  45. package/dist/models/create-lead-request-dto.js +22 -0
  46. package/dist/models/index.d.ts +14 -0
  47. package/dist/models/index.js +30 -0
  48. package/dist/models/initiate-braintree-payment-setup-request-dto.d.ts +24 -0
  49. package/dist/models/initiate-braintree-payment-setup-request-dto.js +15 -0
  50. package/dist/models/initiate-payment-setup-request-dto.d.ts +32 -0
  51. package/dist/models/initiate-payment-setup-request-dto.js +15 -0
  52. package/dist/models/initiate-stripe-payment-setup-request-dto.d.ts +24 -0
  53. package/dist/models/initiate-stripe-payment-setup-request-dto.js +15 -0
  54. package/dist/models/policy-object-request-dto.d.ts +30 -0
  55. package/dist/models/policy-object-request-dto.js +15 -0
  56. package/dist/models/uploaded-document-dto.d.ts +24 -0
  57. package/dist/models/uploaded-document-dto.js +15 -0
  58. package/git_push.sh +57 -0
  59. package/index.ts +19 -0
  60. package/models/complete-braintree-payment-setup-request-dto.ts +54 -0
  61. package/models/complete-payment-setup-request-dto.ts +38 -0
  62. package/models/complete-stripe-payment-setup-request-dto.ts +60 -0
  63. package/models/create-account-request-dto.ts +99 -0
  64. package/models/create-bank-account-request-dto.ts +36 -0
  65. package/models/create-custom-application-request-dto.ts +43 -0
  66. package/models/create-document-request-dto.ts +105 -0
  67. package/models/create-estimated-invoice-request-dto.ts +50 -0
  68. package/models/create-lead-request-dto.ts +86 -0
  69. package/models/index.ts +14 -0
  70. package/models/initiate-braintree-payment-setup-request-dto.ts +30 -0
  71. package/models/initiate-payment-setup-request-dto.ts +38 -0
  72. package/models/initiate-stripe-payment-setup-request-dto.ts +30 -0
  73. package/models/policy-object-request-dto.ts +36 -0
  74. package/models/uploaded-document-dto.ts +30 -0
  75. package/package.json +27 -0
  76. package/tsconfig.json +22 -0
@@ -0,0 +1,30 @@
1
+ .gitignore
2
+ .npmignore
3
+ .openapi-generator-ignore
4
+ README.md
5
+ api.ts
6
+ api/documents-api.ts
7
+ api/payment-setup-api.ts
8
+ api/products-api.ts
9
+ base.ts
10
+ common.ts
11
+ configuration.ts
12
+ git_push.sh
13
+ index.ts
14
+ models/complete-braintree-payment-setup-request-dto.ts
15
+ models/complete-payment-setup-request-dto.ts
16
+ models/complete-stripe-payment-setup-request-dto.ts
17
+ models/create-account-request-dto.ts
18
+ models/create-bank-account-request-dto.ts
19
+ models/create-custom-application-request-dto.ts
20
+ models/create-document-request-dto.ts
21
+ models/create-estimated-invoice-request-dto.ts
22
+ models/create-lead-request-dto.ts
23
+ models/index.ts
24
+ models/initiate-braintree-payment-setup-request-dto.ts
25
+ models/initiate-payment-setup-request-dto.ts
26
+ models/initiate-stripe-payment-setup-request-dto.ts
27
+ models/policy-object-request-dto.ts
28
+ models/uploaded-document-dto.ts
29
+ package.json
30
+ 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,51 @@
1
+ # Emil Public Api SDK for Nodejs
2
+
3
+ This TypeScript/JavaScript client utilizes [axios](https://github.com/axios/axios). The generated module can be used with client-based applications (i.e. React).
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/public-api-sdk-node@1.0.0 --save
21
+ ```
22
+ or
23
+ ```
24
+ yarn add @emilgroup/public-api-sdk-node@1.0.0
25
+ ```
26
+
27
+ And then you can import `PublicApi`.
28
+
29
+ ```ts
30
+ import { PublicApi } from '@emilgroup/public-api-sdk-node'
31
+
32
+ const publicApi = new PublicApi();
33
+ ```
34
+
35
+ To use authentication protected endpoints, you have to first authorize. To do so, use the `authorize` function in `PublicApi`:
36
+
37
+ ```ts
38
+ async function listDocuments(): Promise<Void> {
39
+ try {
40
+ const publicApi = new PublicApi();
41
+
42
+ await publicApi.authorize('username', 'password');
43
+
44
+ const { data: { items } } = await publicApi.listDocuments();
45
+
46
+ console.log(items);
47
+ } catch(error) {
48
+ // process error
49
+ }
50
+ }
51
+ ```
@@ -0,0 +1,424 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL PublicAPI
5
+ * The EMIL Public 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 { CreateDocumentRequestDto } from '../models';
25
+ /**
26
+ * DocumentsApi - axios parameter creator
27
+ * @export
28
+ */
29
+ export const DocumentsApiAxiosParamCreator = function (configuration?: Configuration) {
30
+ return {
31
+ /**
32
+ *
33
+ * @param {CreateDocumentRequestDto} createDocumentRequestDto
34
+ * @param {string} [authorization] Bearer Token
35
+ * @param {*} [options] Override http request option.
36
+ * @throws {RequiredError}
37
+ */
38
+ createTemporaryDocument: async (createDocumentRequestDto: CreateDocumentRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
39
+ // verify required parameter 'createDocumentRequestDto' is not null or undefined
40
+ assertParamExists('createTemporaryDocument', 'createDocumentRequestDto', createDocumentRequestDto)
41
+ const localVarPath = `/publicapi/v1/documents`;
42
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
43
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
44
+ let baseOptions;
45
+ let baseAccessToken;
46
+ if (configuration) {
47
+ baseOptions = configuration.baseOptions;
48
+ baseAccessToken = configuration.accessToken;
49
+ }
50
+
51
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
52
+ const localVarHeaderParameter = {} as any;
53
+ const localVarQueryParameter = {} as any;
54
+
55
+ // authentication bearer required
56
+ // http bearer authentication required
57
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
58
+
59
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
60
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
61
+ }
62
+
63
+
64
+
65
+ localVarHeaderParameter['Content-Type'] = 'application/json';
66
+
67
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
68
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
69
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
70
+ localVarRequestOptions.data = serializeDataIfNeeded(createDocumentRequestDto, localVarRequestOptions, configuration)
71
+
72
+ return {
73
+ url: toPathString(localVarUrlObj),
74
+ options: localVarRequestOptions,
75
+ };
76
+ },
77
+ /**
78
+ *
79
+ * @param {string} code
80
+ * @param {string} [authorization] Bearer Token
81
+ * @param {*} [options] Override http request option.
82
+ * @throws {RequiredError}
83
+ */
84
+ downloadDocument: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
85
+ // verify required parameter 'code' is not null or undefined
86
+ assertParamExists('downloadDocument', 'code', code)
87
+ const localVarPath = `/publicapi/v1/documents/download/{code}`
88
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
89
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
90
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
91
+ let baseOptions;
92
+ let baseAccessToken;
93
+ if (configuration) {
94
+ baseOptions = configuration.baseOptions;
95
+ baseAccessToken = configuration.accessToken;
96
+ }
97
+
98
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
99
+ const localVarHeaderParameter = {} as any;
100
+ const localVarQueryParameter = {} as any;
101
+
102
+ // authentication bearer required
103
+ // http bearer authentication required
104
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
105
+
106
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
107
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
108
+ }
109
+
110
+
111
+
112
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
113
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
114
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
115
+
116
+ return {
117
+ url: toPathString(localVarUrlObj),
118
+ options: localVarRequestOptions,
119
+ };
120
+ },
121
+ /**
122
+ *
123
+ * @param {string} [authorization] Bearer Token
124
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
125
+ * @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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
126
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
127
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
128
+ * @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.
129
+ * @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.
130
+ * @param {*} [options] Override http request option.
131
+ * @throws {RequiredError}
132
+ */
133
+ listDocuments: async (authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
134
+ const localVarPath = `/publicapi/v1/documents`;
135
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
136
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
137
+ let baseOptions;
138
+ let baseAccessToken;
139
+ if (configuration) {
140
+ baseOptions = configuration.baseOptions;
141
+ baseAccessToken = configuration.accessToken;
142
+ }
143
+
144
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
145
+ const localVarHeaderParameter = {} as any;
146
+ const localVarQueryParameter = {} as any;
147
+
148
+ // authentication bearer required
149
+ // http bearer authentication required
150
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
151
+
152
+ if (pageSize !== undefined) {
153
+ localVarQueryParameter['pageSize'] = pageSize;
154
+ }
155
+
156
+ if (pageToken !== undefined) {
157
+ localVarQueryParameter['pageToken'] = pageToken;
158
+ }
159
+
160
+ if (filter !== undefined) {
161
+ localVarQueryParameter['filter'] = filter;
162
+ }
163
+
164
+ if (search !== undefined) {
165
+ localVarQueryParameter['search'] = search;
166
+ }
167
+
168
+ if (order !== undefined) {
169
+ localVarQueryParameter['order'] = order;
170
+ }
171
+
172
+ if (expand !== undefined) {
173
+ localVarQueryParameter['expand'] = expand;
174
+ }
175
+
176
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
177
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
178
+ }
179
+
180
+
181
+
182
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
183
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
184
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
185
+
186
+ return {
187
+ url: toPathString(localVarUrlObj),
188
+ options: localVarRequestOptions,
189
+ };
190
+ },
191
+ }
192
+ };
193
+
194
+ /**
195
+ * DocumentsApi - functional programming interface
196
+ * @export
197
+ */
198
+ export const DocumentsApiFp = function(configuration?: Configuration) {
199
+ const localVarAxiosParamCreator = DocumentsApiAxiosParamCreator(configuration)
200
+ return {
201
+ /**
202
+ *
203
+ * @param {CreateDocumentRequestDto} createDocumentRequestDto
204
+ * @param {string} [authorization] Bearer Token
205
+ * @param {*} [options] Override http request option.
206
+ * @throws {RequiredError}
207
+ */
208
+ async createTemporaryDocument(createDocumentRequestDto: CreateDocumentRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
209
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createTemporaryDocument(createDocumentRequestDto, authorization, options);
210
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
211
+ },
212
+ /**
213
+ *
214
+ * @param {string} code
215
+ * @param {string} [authorization] Bearer Token
216
+ * @param {*} [options] Override http request option.
217
+ * @throws {RequiredError}
218
+ */
219
+ async downloadDocument(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
220
+ const localVarAxiosArgs = await localVarAxiosParamCreator.downloadDocument(code, authorization, options);
221
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
222
+ },
223
+ /**
224
+ *
225
+ * @param {string} [authorization] Bearer Token
226
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
227
+ * @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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
228
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
229
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
230
+ * @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.
231
+ * @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.
232
+ * @param {*} [options] Override http request option.
233
+ * @throws {RequiredError}
234
+ */
235
+ async listDocuments(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
236
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listDocuments(authorization, pageSize, pageToken, filter, search, order, expand, options);
237
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
238
+ },
239
+ }
240
+ };
241
+
242
+ /**
243
+ * DocumentsApi - factory interface
244
+ * @export
245
+ */
246
+ export const DocumentsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
247
+ const localVarFp = DocumentsApiFp(configuration)
248
+ return {
249
+ /**
250
+ *
251
+ * @param {CreateDocumentRequestDto} createDocumentRequestDto
252
+ * @param {string} [authorization] Bearer Token
253
+ * @param {*} [options] Override http request option.
254
+ * @throws {RequiredError}
255
+ */
256
+ createTemporaryDocument(createDocumentRequestDto: CreateDocumentRequestDto, authorization?: string, options?: any): AxiosPromise<void> {
257
+ return localVarFp.createTemporaryDocument(createDocumentRequestDto, authorization, options).then((request) => request(axios, basePath));
258
+ },
259
+ /**
260
+ *
261
+ * @param {string} code
262
+ * @param {string} [authorization] Bearer Token
263
+ * @param {*} [options] Override http request option.
264
+ * @throws {RequiredError}
265
+ */
266
+ downloadDocument(code: string, authorization?: string, options?: any): AxiosPromise<void> {
267
+ return localVarFp.downloadDocument(code, authorization, options).then((request) => request(axios, basePath));
268
+ },
269
+ /**
270
+ *
271
+ * @param {string} [authorization] Bearer Token
272
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
273
+ * @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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
274
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
275
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
276
+ * @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.
277
+ * @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.
278
+ * @param {*} [options] Override http request option.
279
+ * @throws {RequiredError}
280
+ */
281
+ listDocuments(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: any): AxiosPromise<void> {
282
+ return localVarFp.listDocuments(authorization, pageSize, pageToken, filter, search, order, expand, options).then((request) => request(axios, basePath));
283
+ },
284
+ };
285
+ };
286
+
287
+ /**
288
+ * Request parameters for createTemporaryDocument operation in DocumentsApi.
289
+ * @export
290
+ * @interface DocumentsApiCreateTemporaryDocumentRequest
291
+ */
292
+ export interface DocumentsApiCreateTemporaryDocumentRequest {
293
+ /**
294
+ *
295
+ * @type {CreateDocumentRequestDto}
296
+ * @memberof DocumentsApiCreateTemporaryDocument
297
+ */
298
+ readonly createDocumentRequestDto: CreateDocumentRequestDto
299
+
300
+ /**
301
+ * Bearer Token
302
+ * @type {string}
303
+ * @memberof DocumentsApiCreateTemporaryDocument
304
+ */
305
+ readonly authorization?: string
306
+ }
307
+
308
+ /**
309
+ * Request parameters for downloadDocument operation in DocumentsApi.
310
+ * @export
311
+ * @interface DocumentsApiDownloadDocumentRequest
312
+ */
313
+ export interface DocumentsApiDownloadDocumentRequest {
314
+ /**
315
+ *
316
+ * @type {string}
317
+ * @memberof DocumentsApiDownloadDocument
318
+ */
319
+ readonly code: string
320
+
321
+ /**
322
+ * Bearer Token
323
+ * @type {string}
324
+ * @memberof DocumentsApiDownloadDocument
325
+ */
326
+ readonly authorization?: string
327
+ }
328
+
329
+ /**
330
+ * Request parameters for listDocuments operation in DocumentsApi.
331
+ * @export
332
+ * @interface DocumentsApiListDocumentsRequest
333
+ */
334
+ export interface DocumentsApiListDocumentsRequest {
335
+ /**
336
+ * Bearer Token
337
+ * @type {string}
338
+ * @memberof DocumentsApiListDocuments
339
+ */
340
+ readonly authorization?: string
341
+
342
+ /**
343
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
344
+ * @type {any}
345
+ * @memberof DocumentsApiListDocuments
346
+ */
347
+ readonly pageSize?: any
348
+
349
+ /**
350
+ * 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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
351
+ * @type {any}
352
+ * @memberof DocumentsApiListDocuments
353
+ */
354
+ readonly pageToken?: any
355
+
356
+ /**
357
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
358
+ * @type {any}
359
+ * @memberof DocumentsApiListDocuments
360
+ */
361
+ readonly filter?: any
362
+
363
+ /**
364
+ * Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
365
+ * @type {any}
366
+ * @memberof DocumentsApiListDocuments
367
+ */
368
+ readonly search?: any
369
+
370
+ /**
371
+ * 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.
372
+ * @type {any}
373
+ * @memberof DocumentsApiListDocuments
374
+ */
375
+ readonly order?: any
376
+
377
+ /**
378
+ * 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.
379
+ * @type {any}
380
+ * @memberof DocumentsApiListDocuments
381
+ */
382
+ readonly expand?: any
383
+ }
384
+
385
+ /**
386
+ * DocumentsApi - object-oriented interface
387
+ * @export
388
+ * @class DocumentsApi
389
+ * @extends {BaseAPI}
390
+ */
391
+ export class DocumentsApi extends BaseAPI {
392
+ /**
393
+ *
394
+ * @param {DocumentsApiCreateTemporaryDocumentRequest} requestParameters Request parameters.
395
+ * @param {*} [options] Override http request option.
396
+ * @throws {RequiredError}
397
+ * @memberof DocumentsApi
398
+ */
399
+ public createTemporaryDocument(requestParameters: DocumentsApiCreateTemporaryDocumentRequest, options?: AxiosRequestConfig) {
400
+ return DocumentsApiFp(this.configuration).createTemporaryDocument(requestParameters.createDocumentRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
401
+ }
402
+
403
+ /**
404
+ *
405
+ * @param {DocumentsApiDownloadDocumentRequest} requestParameters Request parameters.
406
+ * @param {*} [options] Override http request option.
407
+ * @throws {RequiredError}
408
+ * @memberof DocumentsApi
409
+ */
410
+ public downloadDocument(requestParameters: DocumentsApiDownloadDocumentRequest, options?: AxiosRequestConfig) {
411
+ return DocumentsApiFp(this.configuration).downloadDocument(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
412
+ }
413
+
414
+ /**
415
+ *
416
+ * @param {DocumentsApiListDocumentsRequest} requestParameters Request parameters.
417
+ * @param {*} [options] Override http request option.
418
+ * @throws {RequiredError}
419
+ * @memberof DocumentsApi
420
+ */
421
+ public listDocuments(requestParameters: DocumentsApiListDocumentsRequest = {}, options?: AxiosRequestConfig) {
422
+ return DocumentsApiFp(this.configuration).listDocuments(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
423
+ }
424
+ }