@emilgroup/accounting-sdk 1.0.1-beta.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 (49) hide show
  1. package/.openapi-generator/FILES +21 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +51 -0
  5. package/api/default-api.ts +124 -0
  6. package/api/financial-accounts-api.ts +567 -0
  7. package/api/transactions-api.ts +163 -0
  8. package/api.ts +31 -0
  9. package/base.ts +252 -0
  10. package/common.ts +198 -0
  11. package/configuration.ts +101 -0
  12. package/dist/api/default-api.d.ts +70 -0
  13. package/dist/api/default-api.js +200 -0
  14. package/dist/api/financial-accounts-api.d.ts +324 -0
  15. package/dist/api/financial-accounts-api.js +545 -0
  16. package/dist/api/transactions-api.d.ts +96 -0
  17. package/dist/api/transactions-api.js +224 -0
  18. package/dist/api.d.ts +14 -0
  19. package/dist/api.js +32 -0
  20. package/dist/base.d.ts +74 -0
  21. package/dist/base.js +299 -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 +36 -0
  28. package/dist/models/create-financial-account-request-dto.d.ts +56 -0
  29. package/dist/models/create-financial-account-request-dto.js +23 -0
  30. package/dist/models/create-transaction-request-dto.d.ts +55 -0
  31. package/dist/models/create-transaction-request-dto.js +15 -0
  32. package/dist/models/entry-data-dto.d.ts +36 -0
  33. package/dist/models/entry-data-dto.js +15 -0
  34. package/dist/models/index.d.ts +5 -0
  35. package/dist/models/index.js +21 -0
  36. package/dist/models/inline-response200.d.ts +54 -0
  37. package/dist/models/inline-response200.js +15 -0
  38. package/dist/models/inline-response503.d.ts +54 -0
  39. package/dist/models/inline-response503.js +15 -0
  40. package/git_push.sh +57 -0
  41. package/index.ts +19 -0
  42. package/models/create-financial-account-request-dto.ts +65 -0
  43. package/models/create-transaction-request-dto.ts +61 -0
  44. package/models/entry-data-dto.ts +42 -0
  45. package/models/index.ts +5 -0
  46. package/models/inline-response200.ts +48 -0
  47. package/models/inline-response503.ts +48 -0
  48. package/package.json +26 -0
  49. package/tsconfig.json +22 -0
@@ -0,0 +1,21 @@
1
+ .gitignore
2
+ .npmignore
3
+ .openapi-generator-ignore
4
+ README.md
5
+ api.ts
6
+ api/default-api.ts
7
+ api/financial-accounts-api.ts
8
+ api/transactions-api.ts
9
+ base.ts
10
+ common.ts
11
+ configuration.ts
12
+ git_push.sh
13
+ index.ts
14
+ models/create-financial-account-request-dto.ts
15
+ models/create-transaction-request-dto.ts
16
+ models/entry-data-dto.ts
17
+ models/index.ts
18
+ models/inline-response200.ts
19
+ models/inline-response503.ts
20
+ package.json
21
+ 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 Accounting SDK
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/accounting-sdk@1.0.1-beta.0 --save
21
+ ```
22
+ or
23
+ ```
24
+ yarn add @emilgroup/accounting-sdk@1.0.1-beta.0
25
+ ```
26
+
27
+ And then you can import `FinancialAccountsApi`.
28
+
29
+ ```ts
30
+ import { FinancialAccountsApi } from '@emilgroup/accounting-sdk'
31
+
32
+ const financialAccountsApi = new FinancialAccountsApi();
33
+ ```
34
+
35
+ To use authentication protected endpoints, you have to first authorize. To do so, use the `authorize` function in `FinancialAccountsApi`:
36
+
37
+ ```ts
38
+ async function listFinancialAccounts(): Promise<Void> {
39
+ try {
40
+ const financialAccountsApi = new FinancialAccountsApi();
41
+
42
+ await financialAccountsApi.authorize('username', 'password');
43
+
44
+ const { data: { items } } = await financialAccountsApi.listFinancialAccounts();
45
+
46
+ console.log(items);
47
+ } catch(error) {
48
+ // process error
49
+ }
50
+ }
51
+ ```
@@ -0,0 +1,124 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL AccountingService
5
+ * The EMIL AccountingService 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 { InlineResponse200 } from '../models';
25
+ // @ts-ignore
26
+ import { InlineResponse503 } from '../models';
27
+ /**
28
+ * DefaultApi - axios parameter creator
29
+ * @export
30
+ */
31
+ export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) {
32
+ return {
33
+ /**
34
+ * Returns the health status of the accounting service. This endpoint is used to monitor the operational status of the accounting service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
35
+ * @summary Health Check
36
+ * @param {*} [options] Override http request option.
37
+ * @throws {RequiredError}
38
+ */
39
+ check: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
40
+ const localVarPath = `/accountingservice/health`;
41
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
42
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
43
+ let baseOptions;
44
+ let baseAccessToken;
45
+ if (configuration) {
46
+ baseOptions = configuration.baseOptions;
47
+ baseAccessToken = configuration.accessToken;
48
+ }
49
+
50
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
51
+ const localVarHeaderParameter = {} as any;
52
+ const localVarQueryParameter = {} as any;
53
+
54
+
55
+
56
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
57
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
58
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
59
+
60
+ return {
61
+ url: toPathString(localVarUrlObj),
62
+ options: localVarRequestOptions,
63
+ };
64
+ },
65
+ }
66
+ };
67
+
68
+ /**
69
+ * DefaultApi - functional programming interface
70
+ * @export
71
+ */
72
+ export const DefaultApiFp = function(configuration?: Configuration) {
73
+ const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration)
74
+ return {
75
+ /**
76
+ * Returns the health status of the accounting service. This endpoint is used to monitor the operational status of the accounting service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
77
+ * @summary Health Check
78
+ * @param {*} [options] Override http request option.
79
+ * @throws {RequiredError}
80
+ */
81
+ async check(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InlineResponse200>> {
82
+ const localVarAxiosArgs = await localVarAxiosParamCreator.check(options);
83
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
84
+ },
85
+ }
86
+ };
87
+
88
+ /**
89
+ * DefaultApi - factory interface
90
+ * @export
91
+ */
92
+ export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
93
+ const localVarFp = DefaultApiFp(configuration)
94
+ return {
95
+ /**
96
+ * Returns the health status of the accounting service. This endpoint is used to monitor the operational status of the accounting service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
97
+ * @summary Health Check
98
+ * @param {*} [options] Override http request option.
99
+ * @throws {RequiredError}
100
+ */
101
+ check(options?: any): AxiosPromise<InlineResponse200> {
102
+ return localVarFp.check(options).then((request) => request(axios, basePath));
103
+ },
104
+ };
105
+ };
106
+
107
+ /**
108
+ * DefaultApi - object-oriented interface
109
+ * @export
110
+ * @class DefaultApi
111
+ * @extends {BaseAPI}
112
+ */
113
+ export class DefaultApi extends BaseAPI {
114
+ /**
115
+ * Returns the health status of the accounting service. This endpoint is used to monitor the operational status of the accounting service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
116
+ * @summary Health Check
117
+ * @param {*} [options] Override http request option.
118
+ * @throws {RequiredError}
119
+ * @memberof DefaultApi
120
+ */
121
+ public check(options?: AxiosRequestConfig) {
122
+ return DefaultApiFp(this.configuration).check(options).then((request) => request(this.axios, this.basePath));
123
+ }
124
+ }