@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,239 @@
1
+ /**
2
+ * EMIL PublicAPI
3
+ * The EMIL Public API description
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
13
+ import { Configuration } from '../configuration';
14
+ import { RequestArgs, BaseAPI } from '../base';
15
+ import { CreateDocumentRequestDto } from '../models';
16
+ /**
17
+ * DocumentsApi - axios parameter creator
18
+ * @export
19
+ */
20
+ export declare const DocumentsApiAxiosParamCreator: (configuration?: Configuration) => {
21
+ /**
22
+ *
23
+ * @param {CreateDocumentRequestDto} createDocumentRequestDto
24
+ * @param {string} [authorization] Bearer Token
25
+ * @param {*} [options] Override http request option.
26
+ * @throws {RequiredError}
27
+ */
28
+ createTemporaryDocument: (createDocumentRequestDto: CreateDocumentRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
29
+ /**
30
+ *
31
+ * @param {string} code
32
+ * @param {string} [authorization] Bearer Token
33
+ * @param {*} [options] Override http request option.
34
+ * @throws {RequiredError}
35
+ */
36
+ downloadDocument: (code: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
37
+ /**
38
+ *
39
+ * @param {string} [authorization] Bearer Token
40
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
41
+ * @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.
42
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
43
+ * @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.
44
+ * @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.
45
+ * @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.
46
+ * @param {*} [options] Override http request option.
47
+ * @throws {RequiredError}
48
+ */
49
+ listDocuments: (authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: AxiosRequestConfig) => Promise<RequestArgs>;
50
+ };
51
+ /**
52
+ * DocumentsApi - functional programming interface
53
+ * @export
54
+ */
55
+ export declare const DocumentsApiFp: (configuration?: Configuration) => {
56
+ /**
57
+ *
58
+ * @param {CreateDocumentRequestDto} createDocumentRequestDto
59
+ * @param {string} [authorization] Bearer Token
60
+ * @param {*} [options] Override http request option.
61
+ * @throws {RequiredError}
62
+ */
63
+ createTemporaryDocument(createDocumentRequestDto: CreateDocumentRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
64
+ /**
65
+ *
66
+ * @param {string} code
67
+ * @param {string} [authorization] Bearer Token
68
+ * @param {*} [options] Override http request option.
69
+ * @throws {RequiredError}
70
+ */
71
+ downloadDocument(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
72
+ /**
73
+ *
74
+ * @param {string} [authorization] Bearer Token
75
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
76
+ * @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.
77
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
78
+ * @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.
79
+ * @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.
80
+ * @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.
81
+ * @param {*} [options] Override http request option.
82
+ * @throws {RequiredError}
83
+ */
84
+ listDocuments(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
85
+ };
86
+ /**
87
+ * DocumentsApi - factory interface
88
+ * @export
89
+ */
90
+ export declare const DocumentsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
91
+ /**
92
+ *
93
+ * @param {CreateDocumentRequestDto} createDocumentRequestDto
94
+ * @param {string} [authorization] Bearer Token
95
+ * @param {*} [options] Override http request option.
96
+ * @throws {RequiredError}
97
+ */
98
+ createTemporaryDocument(createDocumentRequestDto: CreateDocumentRequestDto, authorization?: string, options?: any): AxiosPromise<void>;
99
+ /**
100
+ *
101
+ * @param {string} code
102
+ * @param {string} [authorization] Bearer Token
103
+ * @param {*} [options] Override http request option.
104
+ * @throws {RequiredError}
105
+ */
106
+ downloadDocument(code: string, authorization?: string, options?: any): AxiosPromise<void>;
107
+ /**
108
+ *
109
+ * @param {string} [authorization] Bearer Token
110
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
111
+ * @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.
112
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
113
+ * @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.
114
+ * @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.
115
+ * @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.
116
+ * @param {*} [options] Override http request option.
117
+ * @throws {RequiredError}
118
+ */
119
+ listDocuments(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: any): AxiosPromise<void>;
120
+ };
121
+ /**
122
+ * Request parameters for createTemporaryDocument operation in DocumentsApi.
123
+ * @export
124
+ * @interface DocumentsApiCreateTemporaryDocumentRequest
125
+ */
126
+ export interface DocumentsApiCreateTemporaryDocumentRequest {
127
+ /**
128
+ *
129
+ * @type {CreateDocumentRequestDto}
130
+ * @memberof DocumentsApiCreateTemporaryDocument
131
+ */
132
+ readonly createDocumentRequestDto: CreateDocumentRequestDto;
133
+ /**
134
+ * Bearer Token
135
+ * @type {string}
136
+ * @memberof DocumentsApiCreateTemporaryDocument
137
+ */
138
+ readonly authorization?: string;
139
+ }
140
+ /**
141
+ * Request parameters for downloadDocument operation in DocumentsApi.
142
+ * @export
143
+ * @interface DocumentsApiDownloadDocumentRequest
144
+ */
145
+ export interface DocumentsApiDownloadDocumentRequest {
146
+ /**
147
+ *
148
+ * @type {string}
149
+ * @memberof DocumentsApiDownloadDocument
150
+ */
151
+ readonly code: string;
152
+ /**
153
+ * Bearer Token
154
+ * @type {string}
155
+ * @memberof DocumentsApiDownloadDocument
156
+ */
157
+ readonly authorization?: string;
158
+ }
159
+ /**
160
+ * Request parameters for listDocuments operation in DocumentsApi.
161
+ * @export
162
+ * @interface DocumentsApiListDocumentsRequest
163
+ */
164
+ export interface DocumentsApiListDocumentsRequest {
165
+ /**
166
+ * Bearer Token
167
+ * @type {string}
168
+ * @memberof DocumentsApiListDocuments
169
+ */
170
+ readonly authorization?: string;
171
+ /**
172
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
173
+ * @type {any}
174
+ * @memberof DocumentsApiListDocuments
175
+ */
176
+ readonly pageSize?: any;
177
+ /**
178
+ * 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.
179
+ * @type {any}
180
+ * @memberof DocumentsApiListDocuments
181
+ */
182
+ readonly pageToken?: any;
183
+ /**
184
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
185
+ * @type {any}
186
+ * @memberof DocumentsApiListDocuments
187
+ */
188
+ readonly filter?: any;
189
+ /**
190
+ * 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.
191
+ * @type {any}
192
+ * @memberof DocumentsApiListDocuments
193
+ */
194
+ readonly search?: any;
195
+ /**
196
+ * 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.
197
+ * @type {any}
198
+ * @memberof DocumentsApiListDocuments
199
+ */
200
+ readonly order?: any;
201
+ /**
202
+ * 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.
203
+ * @type {any}
204
+ * @memberof DocumentsApiListDocuments
205
+ */
206
+ readonly expand?: any;
207
+ }
208
+ /**
209
+ * DocumentsApi - object-oriented interface
210
+ * @export
211
+ * @class DocumentsApi
212
+ * @extends {BaseAPI}
213
+ */
214
+ export declare class DocumentsApi extends BaseAPI {
215
+ /**
216
+ *
217
+ * @param {DocumentsApiCreateTemporaryDocumentRequest} requestParameters Request parameters.
218
+ * @param {*} [options] Override http request option.
219
+ * @throws {RequiredError}
220
+ * @memberof DocumentsApi
221
+ */
222
+ createTemporaryDocument(requestParameters: DocumentsApiCreateTemporaryDocumentRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
223
+ /**
224
+ *
225
+ * @param {DocumentsApiDownloadDocumentRequest} requestParameters Request parameters.
226
+ * @param {*} [options] Override http request option.
227
+ * @throws {RequiredError}
228
+ * @memberof DocumentsApi
229
+ */
230
+ downloadDocument(requestParameters: DocumentsApiDownloadDocumentRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
231
+ /**
232
+ *
233
+ * @param {DocumentsApiListDocumentsRequest} requestParameters Request parameters.
234
+ * @param {*} [options] Override http request option.
235
+ * @throws {RequiredError}
236
+ * @memberof DocumentsApi
237
+ */
238
+ listDocuments(requestParameters?: DocumentsApiListDocumentsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
239
+ }
@@ -0,0 +1,427 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL PublicAPI
6
+ * The EMIL Public API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __extends = (this && this.__extends) || (function () {
16
+ var extendStatics = function (d, b) {
17
+ extendStatics = Object.setPrototypeOf ||
18
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
+ return extendStatics(d, b);
21
+ };
22
+ return function (d, b) {
23
+ if (typeof b !== "function" && b !== null)
24
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
+ extendStatics(d, b);
26
+ function __() { this.constructor = d; }
27
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
+ };
29
+ })();
30
+ var __assign = (this && this.__assign) || function () {
31
+ __assign = Object.assign || function(t) {
32
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
33
+ s = arguments[i];
34
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
35
+ t[p] = s[p];
36
+ }
37
+ return t;
38
+ };
39
+ return __assign.apply(this, arguments);
40
+ };
41
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
42
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
+ return new (P || (P = Promise))(function (resolve, reject) {
44
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
45
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
46
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
47
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
48
+ });
49
+ };
50
+ var __generator = (this && this.__generator) || function (thisArg, body) {
51
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
52
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
53
+ function verb(n) { return function (v) { return step([n, v]); }; }
54
+ function step(op) {
55
+ if (f) throw new TypeError("Generator is already executing.");
56
+ while (_) try {
57
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
58
+ if (y = 0, t) op = [op[0] & 2, t.value];
59
+ switch (op[0]) {
60
+ case 0: case 1: t = op; break;
61
+ case 4: _.label++; return { value: op[1], done: false };
62
+ case 5: _.label++; y = op[1]; op = [0]; continue;
63
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
64
+ default:
65
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
66
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
67
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
68
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
69
+ if (t[2]) _.ops.pop();
70
+ _.trys.pop(); continue;
71
+ }
72
+ op = body.call(thisArg, _);
73
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
74
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
+ }
76
+ };
77
+ var __importDefault = (this && this.__importDefault) || function (mod) {
78
+ return (mod && mod.__esModule) ? mod : { "default": mod };
79
+ };
80
+ Object.defineProperty(exports, "__esModule", { value: true });
81
+ exports.DocumentsApi = exports.DocumentsApiFactory = exports.DocumentsApiFp = exports.DocumentsApiAxiosParamCreator = void 0;
82
+ var axios_1 = __importDefault(require("axios"));
83
+ // Some imports not used depending on template conditions
84
+ // @ts-ignore
85
+ var common_1 = require("../common");
86
+ // @ts-ignore
87
+ var base_1 = require("../base");
88
+ /**
89
+ * DocumentsApi - axios parameter creator
90
+ * @export
91
+ */
92
+ var DocumentsApiAxiosParamCreator = function (configuration) {
93
+ var _this = this;
94
+ return {
95
+ /**
96
+ *
97
+ * @param {CreateDocumentRequestDto} createDocumentRequestDto
98
+ * @param {string} [authorization] Bearer Token
99
+ * @param {*} [options] Override http request option.
100
+ * @throws {RequiredError}
101
+ */
102
+ createTemporaryDocument: function (createDocumentRequestDto, authorization, options) {
103
+ if (options === void 0) { options = {}; }
104
+ return __awaiter(_this, void 0, void 0, function () {
105
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
106
+ return __generator(this, function (_a) {
107
+ switch (_a.label) {
108
+ case 0:
109
+ // verify required parameter 'createDocumentRequestDto' is not null or undefined
110
+ (0, common_1.assertParamExists)('createTemporaryDocument', 'createDocumentRequestDto', createDocumentRequestDto);
111
+ localVarPath = "/publicapi/v1/documents";
112
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
113
+ if (configuration) {
114
+ baseOptions = configuration.baseOptions;
115
+ baseAccessToken = configuration.accessToken;
116
+ }
117
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
118
+ localVarHeaderParameter = {};
119
+ localVarQueryParameter = {};
120
+ // authentication bearer required
121
+ // http bearer authentication required
122
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
123
+ case 1:
124
+ // authentication bearer required
125
+ // http bearer authentication required
126
+ _a.sent();
127
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
128
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
129
+ }
130
+ localVarHeaderParameter['Content-Type'] = 'application/json';
131
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
132
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
133
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
134
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createDocumentRequestDto, localVarRequestOptions, configuration);
135
+ return [2 /*return*/, {
136
+ url: (0, common_1.toPathString)(localVarUrlObj),
137
+ options: localVarRequestOptions,
138
+ }];
139
+ }
140
+ });
141
+ });
142
+ },
143
+ /**
144
+ *
145
+ * @param {string} code
146
+ * @param {string} [authorization] Bearer Token
147
+ * @param {*} [options] Override http request option.
148
+ * @throws {RequiredError}
149
+ */
150
+ downloadDocument: function (code, authorization, options) {
151
+ if (options === void 0) { options = {}; }
152
+ return __awaiter(_this, void 0, void 0, function () {
153
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
154
+ return __generator(this, function (_a) {
155
+ switch (_a.label) {
156
+ case 0:
157
+ // verify required parameter 'code' is not null or undefined
158
+ (0, common_1.assertParamExists)('downloadDocument', 'code', code);
159
+ localVarPath = "/publicapi/v1/documents/download/{code}"
160
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
161
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
162
+ if (configuration) {
163
+ baseOptions = configuration.baseOptions;
164
+ baseAccessToken = configuration.accessToken;
165
+ }
166
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
167
+ localVarHeaderParameter = {};
168
+ localVarQueryParameter = {};
169
+ // authentication bearer required
170
+ // http bearer authentication required
171
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
172
+ case 1:
173
+ // authentication bearer required
174
+ // http bearer authentication required
175
+ _a.sent();
176
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
177
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
178
+ }
179
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
180
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
181
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
182
+ return [2 /*return*/, {
183
+ url: (0, common_1.toPathString)(localVarUrlObj),
184
+ options: localVarRequestOptions,
185
+ }];
186
+ }
187
+ });
188
+ });
189
+ },
190
+ /**
191
+ *
192
+ * @param {string} [authorization] Bearer Token
193
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
194
+ * @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.
195
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
196
+ * @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.
197
+ * @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.
198
+ * @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.
199
+ * @param {*} [options] Override http request option.
200
+ * @throws {RequiredError}
201
+ */
202
+ listDocuments: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
203
+ if (options === void 0) { options = {}; }
204
+ return __awaiter(_this, void 0, void 0, function () {
205
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
206
+ return __generator(this, function (_a) {
207
+ switch (_a.label) {
208
+ case 0:
209
+ localVarPath = "/publicapi/v1/documents";
210
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
211
+ if (configuration) {
212
+ baseOptions = configuration.baseOptions;
213
+ baseAccessToken = configuration.accessToken;
214
+ }
215
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
216
+ localVarHeaderParameter = {};
217
+ localVarQueryParameter = {};
218
+ // authentication bearer required
219
+ // http bearer authentication required
220
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
221
+ case 1:
222
+ // authentication bearer required
223
+ // http bearer authentication required
224
+ _a.sent();
225
+ if (pageSize !== undefined) {
226
+ localVarQueryParameter['pageSize'] = pageSize;
227
+ }
228
+ if (pageToken !== undefined) {
229
+ localVarQueryParameter['pageToken'] = pageToken;
230
+ }
231
+ if (filter !== undefined) {
232
+ localVarQueryParameter['filter'] = filter;
233
+ }
234
+ if (search !== undefined) {
235
+ localVarQueryParameter['search'] = search;
236
+ }
237
+ if (order !== undefined) {
238
+ localVarQueryParameter['order'] = order;
239
+ }
240
+ if (expand !== undefined) {
241
+ localVarQueryParameter['expand'] = expand;
242
+ }
243
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
244
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
245
+ }
246
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
247
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
248
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
249
+ return [2 /*return*/, {
250
+ url: (0, common_1.toPathString)(localVarUrlObj),
251
+ options: localVarRequestOptions,
252
+ }];
253
+ }
254
+ });
255
+ });
256
+ },
257
+ };
258
+ };
259
+ exports.DocumentsApiAxiosParamCreator = DocumentsApiAxiosParamCreator;
260
+ /**
261
+ * DocumentsApi - functional programming interface
262
+ * @export
263
+ */
264
+ var DocumentsApiFp = function (configuration) {
265
+ var localVarAxiosParamCreator = (0, exports.DocumentsApiAxiosParamCreator)(configuration);
266
+ return {
267
+ /**
268
+ *
269
+ * @param {CreateDocumentRequestDto} createDocumentRequestDto
270
+ * @param {string} [authorization] Bearer Token
271
+ * @param {*} [options] Override http request option.
272
+ * @throws {RequiredError}
273
+ */
274
+ createTemporaryDocument: function (createDocumentRequestDto, authorization, options) {
275
+ return __awaiter(this, void 0, void 0, function () {
276
+ var localVarAxiosArgs;
277
+ return __generator(this, function (_a) {
278
+ switch (_a.label) {
279
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createTemporaryDocument(createDocumentRequestDto, authorization, options)];
280
+ case 1:
281
+ localVarAxiosArgs = _a.sent();
282
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
283
+ }
284
+ });
285
+ });
286
+ },
287
+ /**
288
+ *
289
+ * @param {string} code
290
+ * @param {string} [authorization] Bearer Token
291
+ * @param {*} [options] Override http request option.
292
+ * @throws {RequiredError}
293
+ */
294
+ downloadDocument: function (code, authorization, options) {
295
+ return __awaiter(this, void 0, void 0, function () {
296
+ var localVarAxiosArgs;
297
+ return __generator(this, function (_a) {
298
+ switch (_a.label) {
299
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.downloadDocument(code, authorization, options)];
300
+ case 1:
301
+ localVarAxiosArgs = _a.sent();
302
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
303
+ }
304
+ });
305
+ });
306
+ },
307
+ /**
308
+ *
309
+ * @param {string} [authorization] Bearer Token
310
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
311
+ * @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.
312
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
313
+ * @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.
314
+ * @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.
315
+ * @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.
316
+ * @param {*} [options] Override http request option.
317
+ * @throws {RequiredError}
318
+ */
319
+ listDocuments: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
320
+ return __awaiter(this, void 0, void 0, function () {
321
+ var localVarAxiosArgs;
322
+ return __generator(this, function (_a) {
323
+ switch (_a.label) {
324
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listDocuments(authorization, pageSize, pageToken, filter, search, order, expand, options)];
325
+ case 1:
326
+ localVarAxiosArgs = _a.sent();
327
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
328
+ }
329
+ });
330
+ });
331
+ },
332
+ };
333
+ };
334
+ exports.DocumentsApiFp = DocumentsApiFp;
335
+ /**
336
+ * DocumentsApi - factory interface
337
+ * @export
338
+ */
339
+ var DocumentsApiFactory = function (configuration, basePath, axios) {
340
+ var localVarFp = (0, exports.DocumentsApiFp)(configuration);
341
+ return {
342
+ /**
343
+ *
344
+ * @param {CreateDocumentRequestDto} createDocumentRequestDto
345
+ * @param {string} [authorization] Bearer Token
346
+ * @param {*} [options] Override http request option.
347
+ * @throws {RequiredError}
348
+ */
349
+ createTemporaryDocument: function (createDocumentRequestDto, authorization, options) {
350
+ return localVarFp.createTemporaryDocument(createDocumentRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
351
+ },
352
+ /**
353
+ *
354
+ * @param {string} code
355
+ * @param {string} [authorization] Bearer Token
356
+ * @param {*} [options] Override http request option.
357
+ * @throws {RequiredError}
358
+ */
359
+ downloadDocument: function (code, authorization, options) {
360
+ return localVarFp.downloadDocument(code, authorization, options).then(function (request) { return request(axios, basePath); });
361
+ },
362
+ /**
363
+ *
364
+ * @param {string} [authorization] Bearer Token
365
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
366
+ * @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.
367
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
368
+ * @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.
369
+ * @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.
370
+ * @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.
371
+ * @param {*} [options] Override http request option.
372
+ * @throws {RequiredError}
373
+ */
374
+ listDocuments: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
375
+ return localVarFp.listDocuments(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
376
+ },
377
+ };
378
+ };
379
+ exports.DocumentsApiFactory = DocumentsApiFactory;
380
+ /**
381
+ * DocumentsApi - object-oriented interface
382
+ * @export
383
+ * @class DocumentsApi
384
+ * @extends {BaseAPI}
385
+ */
386
+ var DocumentsApi = /** @class */ (function (_super) {
387
+ __extends(DocumentsApi, _super);
388
+ function DocumentsApi() {
389
+ return _super !== null && _super.apply(this, arguments) || this;
390
+ }
391
+ /**
392
+ *
393
+ * @param {DocumentsApiCreateTemporaryDocumentRequest} requestParameters Request parameters.
394
+ * @param {*} [options] Override http request option.
395
+ * @throws {RequiredError}
396
+ * @memberof DocumentsApi
397
+ */
398
+ DocumentsApi.prototype.createTemporaryDocument = function (requestParameters, options) {
399
+ var _this = this;
400
+ return (0, exports.DocumentsApiFp)(this.configuration).createTemporaryDocument(requestParameters.createDocumentRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
401
+ };
402
+ /**
403
+ *
404
+ * @param {DocumentsApiDownloadDocumentRequest} requestParameters Request parameters.
405
+ * @param {*} [options] Override http request option.
406
+ * @throws {RequiredError}
407
+ * @memberof DocumentsApi
408
+ */
409
+ DocumentsApi.prototype.downloadDocument = function (requestParameters, options) {
410
+ var _this = this;
411
+ return (0, exports.DocumentsApiFp)(this.configuration).downloadDocument(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
412
+ };
413
+ /**
414
+ *
415
+ * @param {DocumentsApiListDocumentsRequest} requestParameters Request parameters.
416
+ * @param {*} [options] Override http request option.
417
+ * @throws {RequiredError}
418
+ * @memberof DocumentsApi
419
+ */
420
+ DocumentsApi.prototype.listDocuments = function (requestParameters, options) {
421
+ var _this = this;
422
+ if (requestParameters === void 0) { requestParameters = {}; }
423
+ return (0, exports.DocumentsApiFp)(this.configuration).listDocuments(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
424
+ };
425
+ return DocumentsApi;
426
+ }(base_1.BaseAPI));
427
+ exports.DocumentsApi = DocumentsApi;