@emilgroup/billing-sdk-node 1.17.1-beta.1 → 1.17.1

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.
@@ -5,6 +5,7 @@ README.md
5
5
  api.ts
6
6
  api/correction-invoices-api.ts
7
7
  api/default-api.ts
8
+ api/draft-invoice-api.ts
8
9
  api/estimated-invoices-api.ts
9
10
  api/initial-invoices-api.ts
10
11
  api/invoices-api.ts
@@ -17,6 +18,7 @@ index.ts
17
18
  models/create-correction-invoices-response-class.ts
18
19
  models/create-custom-estimated-invoice-request-dto.ts
19
20
  models/create-custom-estimated-invoice-response-class.ts
21
+ models/create-draft-invoice-request-dto.ts
20
22
  models/create-estimated-invoice-for-interval-request-dto.ts
21
23
  models/create-estimated-invoice-for-interval-response-class.ts
22
24
  models/create-estimated-invoice-request-dto.ts
package/README.md CHANGED
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
17
17
  Navigate to the folder of your consuming project and run one of the following commands:
18
18
 
19
19
  ```
20
- npm install @emilgroup/billing-sdk-node@1.17.1-beta.1 --save
20
+ npm install @emilgroup/billing-sdk-node@1.17.1 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/billing-sdk-node@1.17.1-beta.1
24
+ yarn add @emilgroup/billing-sdk-node@1.17.1
25
25
  ```
26
26
 
27
27
  And then you can import `InvoicesApi`.
@@ -0,0 +1,346 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL BillingService
5
+ * The EMIL BillingService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
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 { CreateDraftInvoiceRequestDto } from '../models';
25
+ // URLSearchParams not necessarily used
26
+ // @ts-ignore
27
+ import { URL, URLSearchParams } from 'url';
28
+ const FormData = require('form-data');
29
+ /**
30
+ * DraftInvoiceApi - axios parameter creator
31
+ * @export
32
+ */
33
+ export const DraftInvoiceApiAxiosParamCreator = function (configuration?: Configuration) {
34
+ return {
35
+ /**
36
+ *
37
+ * @param {CreateDraftInvoiceRequestDto} createDraftInvoiceRequestDto
38
+ * @param {string} [authorization] Bearer Token
39
+ * @param {*} [options] Override http request option.
40
+ * @throws {RequiredError}
41
+ */
42
+ createDraftInvoice: async (createDraftInvoiceRequestDto: CreateDraftInvoiceRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
43
+ // verify required parameter 'createDraftInvoiceRequestDto' is not null or undefined
44
+ assertParamExists('createDraftInvoice', 'createDraftInvoiceRequestDto', createDraftInvoiceRequestDto)
45
+ const localVarPath = `/billingservice/v1/draft-invoices`;
46
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
47
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
48
+ let baseOptions;
49
+ let baseAccessToken;
50
+ if (configuration) {
51
+ baseOptions = configuration.baseOptions;
52
+ baseAccessToken = configuration.accessToken;
53
+ }
54
+
55
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
56
+ const localVarHeaderParameter = {} as any;
57
+ const localVarQueryParameter = {} as any;
58
+
59
+ // authentication bearer required
60
+ // http bearer authentication required
61
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
62
+
63
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
64
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
65
+ }
66
+
67
+
68
+
69
+ localVarHeaderParameter['Content-Type'] = 'application/json';
70
+
71
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
72
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
73
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
74
+ localVarRequestOptions.data = serializeDataIfNeeded(createDraftInvoiceRequestDto, localVarRequestOptions, configuration)
75
+
76
+ return {
77
+ url: toPathString(localVarUrlObj),
78
+ options: localVarRequestOptions,
79
+ };
80
+ },
81
+ /**
82
+ *
83
+ * @param {string} [authorization] Bearer Token
84
+ * @param {*} [options] Override http request option.
85
+ * @throws {RequiredError}
86
+ */
87
+ deleteAllDraftInvoices: async (authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
88
+ const localVarPath = `/billingservice/v1/draft-invoices`;
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: 'DELETE', ...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 {object} body
124
+ * @param {string} [authorization] Bearer Token
125
+ * @param {*} [options] Override http request option.
126
+ * @throws {RequiredError}
127
+ */
128
+ deleteDraftInvoice: async (body: object, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
129
+ // verify required parameter 'body' is not null or undefined
130
+ assertParamExists('deleteDraftInvoice', 'body', body)
131
+ const localVarPath = `/billingservice/v1/draft-invoices/code`;
132
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
133
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
134
+ let baseOptions;
135
+ let baseAccessToken;
136
+ if (configuration) {
137
+ baseOptions = configuration.baseOptions;
138
+ baseAccessToken = configuration.accessToken;
139
+ }
140
+
141
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
142
+ const localVarHeaderParameter = {} as any;
143
+ const localVarQueryParameter = {} as any;
144
+
145
+ // authentication bearer required
146
+ // http bearer authentication required
147
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
148
+
149
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
150
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
151
+ }
152
+
153
+
154
+
155
+ localVarHeaderParameter['Content-Type'] = 'application/json';
156
+
157
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
158
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
159
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
160
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)
161
+
162
+ return {
163
+ url: toPathString(localVarUrlObj),
164
+ options: localVarRequestOptions,
165
+ };
166
+ },
167
+ }
168
+ };
169
+
170
+ /**
171
+ * DraftInvoiceApi - functional programming interface
172
+ * @export
173
+ */
174
+ export const DraftInvoiceApiFp = function(configuration?: Configuration) {
175
+ const localVarAxiosParamCreator = DraftInvoiceApiAxiosParamCreator(configuration)
176
+ return {
177
+ /**
178
+ *
179
+ * @param {CreateDraftInvoiceRequestDto} createDraftInvoiceRequestDto
180
+ * @param {string} [authorization] Bearer Token
181
+ * @param {*} [options] Override http request option.
182
+ * @throws {RequiredError}
183
+ */
184
+ async createDraftInvoice(createDraftInvoiceRequestDto: CreateDraftInvoiceRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
185
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createDraftInvoice(createDraftInvoiceRequestDto, authorization, options);
186
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
187
+ },
188
+ /**
189
+ *
190
+ * @param {string} [authorization] Bearer Token
191
+ * @param {*} [options] Override http request option.
192
+ * @throws {RequiredError}
193
+ */
194
+ async deleteAllDraftInvoices(authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
195
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAllDraftInvoices(authorization, options);
196
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
197
+ },
198
+ /**
199
+ *
200
+ * @param {object} body
201
+ * @param {string} [authorization] Bearer Token
202
+ * @param {*} [options] Override http request option.
203
+ * @throws {RequiredError}
204
+ */
205
+ async deleteDraftInvoice(body: object, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
206
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteDraftInvoice(body, authorization, options);
207
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
208
+ },
209
+ }
210
+ };
211
+
212
+ /**
213
+ * DraftInvoiceApi - factory interface
214
+ * @export
215
+ */
216
+ export const DraftInvoiceApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
217
+ const localVarFp = DraftInvoiceApiFp(configuration)
218
+ return {
219
+ /**
220
+ *
221
+ * @param {CreateDraftInvoiceRequestDto} createDraftInvoiceRequestDto
222
+ * @param {string} [authorization] Bearer Token
223
+ * @param {*} [options] Override http request option.
224
+ * @throws {RequiredError}
225
+ */
226
+ createDraftInvoice(createDraftInvoiceRequestDto: CreateDraftInvoiceRequestDto, authorization?: string, options?: any): AxiosPromise<void> {
227
+ return localVarFp.createDraftInvoice(createDraftInvoiceRequestDto, authorization, options).then((request) => request(axios, basePath));
228
+ },
229
+ /**
230
+ *
231
+ * @param {string} [authorization] Bearer Token
232
+ * @param {*} [options] Override http request option.
233
+ * @throws {RequiredError}
234
+ */
235
+ deleteAllDraftInvoices(authorization?: string, options?: any): AxiosPromise<void> {
236
+ return localVarFp.deleteAllDraftInvoices(authorization, options).then((request) => request(axios, basePath));
237
+ },
238
+ /**
239
+ *
240
+ * @param {object} body
241
+ * @param {string} [authorization] Bearer Token
242
+ * @param {*} [options] Override http request option.
243
+ * @throws {RequiredError}
244
+ */
245
+ deleteDraftInvoice(body: object, authorization?: string, options?: any): AxiosPromise<void> {
246
+ return localVarFp.deleteDraftInvoice(body, authorization, options).then((request) => request(axios, basePath));
247
+ },
248
+ };
249
+ };
250
+
251
+ /**
252
+ * Request parameters for createDraftInvoice operation in DraftInvoiceApi.
253
+ * @export
254
+ * @interface DraftInvoiceApiCreateDraftInvoiceRequest
255
+ */
256
+ export interface DraftInvoiceApiCreateDraftInvoiceRequest {
257
+ /**
258
+ *
259
+ * @type {CreateDraftInvoiceRequestDto}
260
+ * @memberof DraftInvoiceApiCreateDraftInvoice
261
+ */
262
+ readonly createDraftInvoiceRequestDto: CreateDraftInvoiceRequestDto
263
+
264
+ /**
265
+ * Bearer Token
266
+ * @type {string}
267
+ * @memberof DraftInvoiceApiCreateDraftInvoice
268
+ */
269
+ readonly authorization?: string
270
+ }
271
+
272
+ /**
273
+ * Request parameters for deleteAllDraftInvoices operation in DraftInvoiceApi.
274
+ * @export
275
+ * @interface DraftInvoiceApiDeleteAllDraftInvoicesRequest
276
+ */
277
+ export interface DraftInvoiceApiDeleteAllDraftInvoicesRequest {
278
+ /**
279
+ * Bearer Token
280
+ * @type {string}
281
+ * @memberof DraftInvoiceApiDeleteAllDraftInvoices
282
+ */
283
+ readonly authorization?: string
284
+ }
285
+
286
+ /**
287
+ * Request parameters for deleteDraftInvoice operation in DraftInvoiceApi.
288
+ * @export
289
+ * @interface DraftInvoiceApiDeleteDraftInvoiceRequest
290
+ */
291
+ export interface DraftInvoiceApiDeleteDraftInvoiceRequest {
292
+ /**
293
+ *
294
+ * @type {object}
295
+ * @memberof DraftInvoiceApiDeleteDraftInvoice
296
+ */
297
+ readonly body: object
298
+
299
+ /**
300
+ * Bearer Token
301
+ * @type {string}
302
+ * @memberof DraftInvoiceApiDeleteDraftInvoice
303
+ */
304
+ readonly authorization?: string
305
+ }
306
+
307
+ /**
308
+ * DraftInvoiceApi - object-oriented interface
309
+ * @export
310
+ * @class DraftInvoiceApi
311
+ * @extends {BaseAPI}
312
+ */
313
+ export class DraftInvoiceApi extends BaseAPI {
314
+ /**
315
+ *
316
+ * @param {DraftInvoiceApiCreateDraftInvoiceRequest} requestParameters Request parameters.
317
+ * @param {*} [options] Override http request option.
318
+ * @throws {RequiredError}
319
+ * @memberof DraftInvoiceApi
320
+ */
321
+ public createDraftInvoice(requestParameters: DraftInvoiceApiCreateDraftInvoiceRequest, options?: AxiosRequestConfig) {
322
+ return DraftInvoiceApiFp(this.configuration).createDraftInvoice(requestParameters.createDraftInvoiceRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
323
+ }
324
+
325
+ /**
326
+ *
327
+ * @param {DraftInvoiceApiDeleteAllDraftInvoicesRequest} requestParameters Request parameters.
328
+ * @param {*} [options] Override http request option.
329
+ * @throws {RequiredError}
330
+ * @memberof DraftInvoiceApi
331
+ */
332
+ public deleteAllDraftInvoices(requestParameters: DraftInvoiceApiDeleteAllDraftInvoicesRequest = {}, options?: AxiosRequestConfig) {
333
+ return DraftInvoiceApiFp(this.configuration).deleteAllDraftInvoices(requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
334
+ }
335
+
336
+ /**
337
+ *
338
+ * @param {DraftInvoiceApiDeleteDraftInvoiceRequest} requestParameters Request parameters.
339
+ * @param {*} [options] Override http request option.
340
+ * @throws {RequiredError}
341
+ * @memberof DraftInvoiceApi
342
+ */
343
+ public deleteDraftInvoice(requestParameters: DraftInvoiceApiDeleteDraftInvoiceRequest, options?: AxiosRequestConfig) {
344
+ return DraftInvoiceApiFp(this.configuration).deleteDraftInvoice(requestParameters.body, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
345
+ }
346
+ }