@emilgroup/validation-rules-sdk-node 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 (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 +84 -0
  5. package/api/health-checks-api.ts +154 -0
  6. package/api/investigation-blocks-api.ts +697 -0
  7. package/api/validation-rules-api.ts +561 -0
  8. package/api.ts +35 -0
  9. package/base.ts +327 -0
  10. package/common.ts +199 -0
  11. package/configuration.ts +118 -0
  12. package/dist/api/health-checks-api.d.ts +87 -0
  13. package/dist/api/health-checks-api.js +222 -0
  14. package/dist/api/investigation-blocks-api.d.ts +393 -0
  15. package/dist/api/investigation-blocks-api.js +648 -0
  16. package/dist/api/validation-rules-api.d.ts +318 -0
  17. package/dist/api/validation-rules-api.js +541 -0
  18. package/dist/api.d.ts +14 -0
  19. package/dist/api.js +32 -0
  20. package/dist/base.d.ts +88 -0
  21. package/dist/base.js +434 -0
  22. package/dist/common.d.ts +92 -0
  23. package/dist/common.js +277 -0
  24. package/dist/configuration.d.ts +96 -0
  25. package/dist/configuration.js +52 -0
  26. package/dist/index.d.ts +15 -0
  27. package/dist/index.js +36 -0
  28. package/dist/models/create-investigation-block-request-dto.d.ts +41 -0
  29. package/dist/models/create-investigation-block-request-dto.js +20 -0
  30. package/dist/models/create-investigation-block-response-class.d.ts +25 -0
  31. package/dist/models/create-investigation-block-response-class.js +15 -0
  32. package/dist/models/create-validation-rule-request-dto.d.ts +83 -0
  33. package/dist/models/create-validation-rule-request-dto.js +20 -0
  34. package/dist/models/create-validation-rule-response-class.d.ts +25 -0
  35. package/dist/models/create-validation-rule-response-class.js +15 -0
  36. package/dist/models/get-investigation-block-response-class.d.ts +25 -0
  37. package/dist/models/get-investigation-block-response-class.js +15 -0
  38. package/dist/models/get-validation-rule-response-class.d.ts +25 -0
  39. package/dist/models/get-validation-rule-response-class.js +15 -0
  40. package/dist/models/index.d.ts +14 -0
  41. package/dist/models/index.js +30 -0
  42. package/dist/models/inline-response200.d.ts +54 -0
  43. package/dist/models/inline-response200.js +15 -0
  44. package/dist/models/inline-response503.d.ts +54 -0
  45. package/dist/models/inline-response503.js +15 -0
  46. package/dist/models/investigation-block-class.d.ts +90 -0
  47. package/dist/models/investigation-block-class.js +15 -0
  48. package/dist/models/list-investigation-blocks-response-class.d.ts +43 -0
  49. package/dist/models/list-investigation-blocks-response-class.js +15 -0
  50. package/dist/models/list-validation-rules-response-class.d.ts +43 -0
  51. package/dist/models/list-validation-rules-response-class.js +15 -0
  52. package/dist/models/update-investigation-block-request-dto.d.ts +59 -0
  53. package/dist/models/update-investigation-block-request-dto.js +25 -0
  54. package/dist/models/update-investigation-block-response-class.d.ts +25 -0
  55. package/dist/models/update-investigation-block-response-class.js +15 -0
  56. package/dist/models/validation-rule-class.d.ts +119 -0
  57. package/dist/models/validation-rule-class.js +20 -0
  58. package/git_push.sh +57 -0
  59. package/index.ts +19 -0
  60. package/models/create-investigation-block-request-dto.ts +50 -0
  61. package/models/create-investigation-block-response-class.ts +31 -0
  62. package/models/create-validation-rule-request-dto.ts +92 -0
  63. package/models/create-validation-rule-response-class.ts +31 -0
  64. package/models/get-investigation-block-response-class.ts +31 -0
  65. package/models/get-validation-rule-response-class.ts +31 -0
  66. package/models/index.ts +14 -0
  67. package/models/inline-response200.ts +48 -0
  68. package/models/inline-response503.ts +48 -0
  69. package/models/investigation-block-class.ts +96 -0
  70. package/models/list-investigation-blocks-response-class.ts +49 -0
  71. package/models/list-validation-rules-response-class.ts +49 -0
  72. package/models/update-investigation-block-request-dto.ts +69 -0
  73. package/models/update-investigation-block-response-class.ts +31 -0
  74. package/models/validation-rule-class.ts +128 -0
  75. package/package.json +29 -0
  76. package/tsconfig.json +23 -0
@@ -0,0 +1,30 @@
1
+ .gitignore
2
+ .npmignore
3
+ .openapi-generator-ignore
4
+ README.md
5
+ api.ts
6
+ api/health-checks-api.ts
7
+ api/investigation-blocks-api.ts
8
+ api/validation-rules-api.ts
9
+ base.ts
10
+ common.ts
11
+ configuration.ts
12
+ git_push.sh
13
+ index.ts
14
+ models/create-investigation-block-request-dto.ts
15
+ models/create-investigation-block-response-class.ts
16
+ models/create-validation-rule-request-dto.ts
17
+ models/create-validation-rule-response-class.ts
18
+ models/get-investigation-block-response-class.ts
19
+ models/get-validation-rule-response-class.ts
20
+ models/index.ts
21
+ models/inline-response200.ts
22
+ models/inline-response503.ts
23
+ models/investigation-block-class.ts
24
+ models/list-investigation-blocks-response-class.ts
25
+ models/list-validation-rules-response-class.ts
26
+ models/update-investigation-block-request-dto.ts
27
+ models/update-investigation-block-response-class.ts
28
+ models/validation-rule-class.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,84 @@
1
+ # Emil ValidationRules SDK for Nodejs
2
+
3
+ This TypeScript/JavaScript client utilizes [axios](https://github.com/axios/axios). The generated Node module can be used with Nodejs based applications.
4
+
5
+ Language level
6
+ * ES5 - you must have a Promises/A+ library installed
7
+ * ES6
8
+
9
+ Module system
10
+ * CommonJS
11
+ * ES6 module system
12
+
13
+ Although this package can be used in both TypeScript and JavaScript, it is intended to be used with TypeScript. The definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html)). For more information, you can go to [Emil Api documentation](https://emil.stoplight.io/docs/emil-api/).
14
+
15
+ ## Consuming
16
+
17
+ Navigate to the folder of your consuming project and run one of the following commands:
18
+
19
+ ```
20
+ npm install @emilgroup/validation-rules-sdk-node@1.0.1-beta.0 --save
21
+ ```
22
+ or
23
+ ```
24
+ yarn add @emilgroup/validation-rules-sdk-node@1.0.1-beta.0
25
+ ```
26
+
27
+ And then you can import ``.
28
+
29
+ ```ts
30
+ import { } from '@emilgroup/validation-rules-sdk-node'
31
+
32
+ const = new ();
33
+ ```
34
+ ## Credentials
35
+
36
+ To use authentication protected endpoints, you have to first authorize. To do so, the easiest way is to provide a configuration file under `~/.emil/credentials` with the following content:
37
+
38
+ ```shell
39
+ emil_username=XXXXX@XXXX.XXX
40
+ emil_password=XXXXXXXXXXXXXX
41
+ ```
42
+
43
+ It is also possible to provide environment variables instead:
44
+
45
+ ```shell
46
+ export EMIL_USERNAME=XXXXX@XXXX.XXX
47
+ export EMIL_PASSWORD=XXXXXXXXXXXXXX
48
+ ```
49
+
50
+ ## Base path
51
+
52
+ To select the basic path for using the API, we can use two approaches. The first is to use one of the predefined environments, and the second is to specify the domain as a string.
53
+
54
+ ```ts
55
+ import { , Environment } from '@emilgroup/validation-rules-sdk-node'
56
+
57
+ const = new ();
58
+
59
+ // Allows you to simply choose environment. It will usually be Environment.Production.
60
+ .selectEnvironment(Environment.Production);
61
+
62
+ // For advanced users, use the custom baseUrl of the website you need to connect to.
63
+ .selectBasePath('https://my-custom-domain.com');
64
+ ```
65
+
66
+ ## Example
67
+
68
+ Here is a basic functionning example:
69
+
70
+ ```ts
71
+ async function (): Promise<Void> {
72
+ try {
73
+ const = new ();
74
+
75
+ await .initialize(); // should be called only once per Api.
76
+
77
+ const { data: { items } } = await .();
78
+
79
+ console.log(items);
80
+ } catch(error) {
81
+ // process error
82
+ }
83
+ }
84
+ ```
@@ -0,0 +1,154 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL Validation Rules Service
5
+ * The EMIL Validation Rules Service 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
+ // URLSearchParams not necessarily used
28
+ // @ts-ignore
29
+ import { URL, URLSearchParams } from 'url';
30
+ const FormData = require('form-data');
31
+ /**
32
+ * HealthChecksApi - axios parameter creator
33
+ * @export
34
+ */
35
+ export const HealthChecksApiAxiosParamCreator = function (configuration?: Configuration) {
36
+ return {
37
+ /**
38
+ * Returns the health status of the validation-rules-service service. This endpoint is used to monitor the operational status of the validation-rules-service service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
39
+ * @summary Health Check
40
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
41
+ * @param {*} [options] Override http request option.
42
+ * @throws {RequiredError}
43
+ */
44
+ check: async (authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
45
+ const localVarPath = `/validation-rules-service/health`;
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: 'GET', ...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
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
70
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
71
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
72
+
73
+ return {
74
+ url: toPathString(localVarUrlObj),
75
+ options: localVarRequestOptions,
76
+ };
77
+ },
78
+ }
79
+ };
80
+
81
+ /**
82
+ * HealthChecksApi - functional programming interface
83
+ * @export
84
+ */
85
+ export const HealthChecksApiFp = function(configuration?: Configuration) {
86
+ const localVarAxiosParamCreator = HealthChecksApiAxiosParamCreator(configuration)
87
+ return {
88
+ /**
89
+ * Returns the health status of the validation-rules-service service. This endpoint is used to monitor the operational status of the validation-rules-service service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
90
+ * @summary Health Check
91
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
92
+ * @param {*} [options] Override http request option.
93
+ * @throws {RequiredError}
94
+ */
95
+ async check(authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InlineResponse200>> {
96
+ const localVarAxiosArgs = await localVarAxiosParamCreator.check(authorization, options);
97
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
98
+ },
99
+ }
100
+ };
101
+
102
+ /**
103
+ * HealthChecksApi - factory interface
104
+ * @export
105
+ */
106
+ export const HealthChecksApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
107
+ const localVarFp = HealthChecksApiFp(configuration)
108
+ return {
109
+ /**
110
+ * Returns the health status of the validation-rules-service service. This endpoint is used to monitor the operational status of the validation-rules-service service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
111
+ * @summary Health Check
112
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
113
+ * @param {*} [options] Override http request option.
114
+ * @throws {RequiredError}
115
+ */
116
+ check(authorization?: string, options?: any): AxiosPromise<InlineResponse200> {
117
+ return localVarFp.check(authorization, options).then((request) => request(axios, basePath));
118
+ },
119
+ };
120
+ };
121
+
122
+ /**
123
+ * Request parameters for check operation in HealthChecksApi.
124
+ * @export
125
+ * @interface HealthChecksApiCheckRequest
126
+ */
127
+ export interface HealthChecksApiCheckRequest {
128
+ /**
129
+ * Bearer Token: provided by the login endpoint under the name accessToken.
130
+ * @type {string}
131
+ * @memberof HealthChecksApiCheck
132
+ */
133
+ readonly authorization?: string
134
+ }
135
+
136
+ /**
137
+ * HealthChecksApi - object-oriented interface
138
+ * @export
139
+ * @class HealthChecksApi
140
+ * @extends {BaseAPI}
141
+ */
142
+ export class HealthChecksApi extends BaseAPI {
143
+ /**
144
+ * Returns the health status of the validation-rules-service service. This endpoint is used to monitor the operational status of the validation-rules-service service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
145
+ * @summary Health Check
146
+ * @param {HealthChecksApiCheckRequest} requestParameters Request parameters.
147
+ * @param {*} [options] Override http request option.
148
+ * @throws {RequiredError}
149
+ * @memberof HealthChecksApi
150
+ */
151
+ public check(requestParameters: HealthChecksApiCheckRequest = {}, options?: AxiosRequestConfig) {
152
+ return HealthChecksApiFp(this.configuration).check(requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
153
+ }
154
+ }