@emilgroup/validation-rules-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 (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/health-checks-api.ts +150 -0
  6. package/api/investigation-blocks-api.ts +693 -0
  7. package/api/validation-rules-api.ts +557 -0
  8. package/api.ts +31 -0
  9. package/base.ts +331 -0
  10. package/common.ts +198 -0
  11. package/configuration.ts +110 -0
  12. package/dist/api/health-checks-api.d.ts +87 -0
  13. package/dist/api/health-checks-api.js +218 -0
  14. package/dist/api/investigation-blocks-api.d.ts +393 -0
  15. package/dist/api/investigation-blocks-api.js +644 -0
  16. package/dist/api/validation-rules-api.d.ts +318 -0
  17. package/dist/api/validation-rules-api.js +537 -0
  18. package/dist/api.d.ts +14 -0
  19. package/dist/api.js +32 -0
  20. package/dist/base.d.ts +86 -0
  21. package/dist/base.js +367 -0
  22. package/dist/common.d.ts +91 -0
  23. package/dist/common.js +276 -0
  24. package/dist/configuration.d.ts +89 -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 +27 -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,51 @@
1
+ # Emil ValidationRules 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/validation-rules-sdk@1.0.1-beta.0 --save
21
+ ```
22
+ or
23
+ ```
24
+ yarn add @emilgroup/validation-rules-sdk@1.0.1-beta.0
25
+ ```
26
+
27
+ And then you can import ``.
28
+
29
+ ```ts
30
+ import { } from '@emilgroup/validation-rules-sdk'
31
+
32
+ const = new ();
33
+ ```
34
+
35
+ To use authentication protected endpoints, you have to first authorize. To do so, use the `authorize` function in ``:
36
+
37
+ ```ts
38
+ async function (): Promise<Void> {
39
+ try {
40
+ const = new ();
41
+
42
+ await .authorize('username', 'password');
43
+
44
+ const { data: { items } } = await .();
45
+
46
+ console.log(items);
47
+ } catch(error) {
48
+ // process error
49
+ }
50
+ }
51
+ ```
@@ -0,0 +1,150 @@
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
+ /**
28
+ * HealthChecksApi - axios parameter creator
29
+ * @export
30
+ */
31
+ export const HealthChecksApiAxiosParamCreator = function (configuration?: Configuration) {
32
+ return {
33
+ /**
34
+ * 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.
35
+ * @summary Health Check
36
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
37
+ * @param {*} [options] Override http request option.
38
+ * @throws {RequiredError}
39
+ */
40
+ check: async (authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
41
+ const localVarPath = `/validation-rules-service/health`;
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: 'GET', ...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
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
66
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
67
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
68
+
69
+ return {
70
+ url: toPathString(localVarUrlObj),
71
+ options: localVarRequestOptions,
72
+ };
73
+ },
74
+ }
75
+ };
76
+
77
+ /**
78
+ * HealthChecksApi - functional programming interface
79
+ * @export
80
+ */
81
+ export const HealthChecksApiFp = function(configuration?: Configuration) {
82
+ const localVarAxiosParamCreator = HealthChecksApiAxiosParamCreator(configuration)
83
+ return {
84
+ /**
85
+ * 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.
86
+ * @summary Health Check
87
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
88
+ * @param {*} [options] Override http request option.
89
+ * @throws {RequiredError}
90
+ */
91
+ async check(authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InlineResponse200>> {
92
+ const localVarAxiosArgs = await localVarAxiosParamCreator.check(authorization, options);
93
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
94
+ },
95
+ }
96
+ };
97
+
98
+ /**
99
+ * HealthChecksApi - factory interface
100
+ * @export
101
+ */
102
+ export const HealthChecksApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
103
+ const localVarFp = HealthChecksApiFp(configuration)
104
+ return {
105
+ /**
106
+ * 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.
107
+ * @summary Health Check
108
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
109
+ * @param {*} [options] Override http request option.
110
+ * @throws {RequiredError}
111
+ */
112
+ check(authorization?: string, options?: any): AxiosPromise<InlineResponse200> {
113
+ return localVarFp.check(authorization, options).then((request) => request(axios, basePath));
114
+ },
115
+ };
116
+ };
117
+
118
+ /**
119
+ * Request parameters for check operation in HealthChecksApi.
120
+ * @export
121
+ * @interface HealthChecksApiCheckRequest
122
+ */
123
+ export interface HealthChecksApiCheckRequest {
124
+ /**
125
+ * Bearer Token: provided by the login endpoint under the name accessToken.
126
+ * @type {string}
127
+ * @memberof HealthChecksApiCheck
128
+ */
129
+ readonly authorization?: string
130
+ }
131
+
132
+ /**
133
+ * HealthChecksApi - object-oriented interface
134
+ * @export
135
+ * @class HealthChecksApi
136
+ * @extends {BaseAPI}
137
+ */
138
+ export class HealthChecksApi extends BaseAPI {
139
+ /**
140
+ * 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.
141
+ * @summary Health Check
142
+ * @param {HealthChecksApiCheckRequest} requestParameters Request parameters.
143
+ * @param {*} [options] Override http request option.
144
+ * @throws {RequiredError}
145
+ * @memberof HealthChecksApi
146
+ */
147
+ public check(requestParameters: HealthChecksApiCheckRequest = {}, options?: AxiosRequestConfig) {
148
+ return HealthChecksApiFp(this.configuration).check(requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
149
+ }
150
+ }