@rasadov/lumoar 2.0.0 → 2.0.6

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.
package/dist/index.d.ts CHANGED
@@ -11,3 +11,4 @@
11
11
  */
12
12
  export * from "./api";
13
13
  export * from "./configuration";
14
+ export * from "./sdk";
package/dist/index.js CHANGED
@@ -13,3 +13,4 @@
13
13
  */
14
14
  export * from "./api";
15
15
  export * from "./configuration";
16
+ export * from "./sdk";
package/dist/sdk.d.ts ADDED
@@ -0,0 +1,31 @@
1
+ import { AssetsApi, AuditLogsApi, ControlsApi, EvidenceApi, FrameworksApi, ReportsApi, RisksApi, TasksApi, VendorContactsApi, VendorDocumentsApi, VendorRiskAssessmentsApi, VendorsApi } from './api';
2
+ export declare class ApiSDK {
3
+ private assetsApi;
4
+ private auditLogsApi;
5
+ private controlsApi;
6
+ private evidenceApi;
7
+ private frameworksApi;
8
+ private reportsApi;
9
+ private risksApi;
10
+ private tasksApi;
11
+ private vendorContactsApi;
12
+ private vendorDocumentsApi;
13
+ private vendorRiskAssessmentsApi;
14
+ private vendorsApi;
15
+ private axiosInstance;
16
+ constructor(basePath?: string, apiKey?: string);
17
+ getApi(): {
18
+ assetsApi: AssetsApi;
19
+ auditLogsApi: AuditLogsApi;
20
+ controlsApi: ControlsApi;
21
+ evidenceApi: EvidenceApi;
22
+ frameworksApi: FrameworksApi;
23
+ reportsApi: ReportsApi;
24
+ risksApi: RisksApi;
25
+ tasksApi: TasksApi;
26
+ vendorContactsApi: VendorContactsApi;
27
+ vendorDocumentsApi: VendorDocumentsApi;
28
+ vendorRiskAssessmentsApi: VendorRiskAssessmentsApi;
29
+ vendorsApi: VendorsApi;
30
+ };
31
+ }
package/dist/sdk.js ADDED
@@ -0,0 +1,46 @@
1
+ import axios from 'axios';
2
+ import { AssetsApi, AuditLogsApi, ControlsApi, EvidenceApi, FrameworksApi, ReportsApi, RisksApi, TasksApi, VendorContactsApi, VendorDocumentsApi, VendorRiskAssessmentsApi, VendorsApi } from './api';
3
+ import { Configuration } from './configuration';
4
+ export class ApiSDK {
5
+ constructor(basePath, apiKey) {
6
+ this.axiosInstance = axios.create({
7
+ baseURL: basePath,
8
+ withCredentials: false
9
+ });
10
+ const config = new Configuration({
11
+ basePath,
12
+ apiKey: apiKey ? () => apiKey : undefined,
13
+ baseOptions: {
14
+ axios: this.axiosInstance
15
+ },
16
+ });
17
+ this.assetsApi = new AssetsApi(config, undefined, this.axiosInstance);
18
+ this.auditLogsApi = new AuditLogsApi(config, undefined, this.axiosInstance);
19
+ this.controlsApi = new ControlsApi(config, undefined, this.axiosInstance);
20
+ this.evidenceApi = new EvidenceApi(config, undefined, this.axiosInstance);
21
+ this.frameworksApi = new FrameworksApi(config, undefined, this.axiosInstance);
22
+ this.reportsApi = new ReportsApi(config, undefined, this.axiosInstance);
23
+ this.risksApi = new RisksApi(config, undefined, this.axiosInstance);
24
+ this.tasksApi = new TasksApi(config, undefined, this.axiosInstance);
25
+ this.vendorContactsApi = new VendorContactsApi(config, undefined, this.axiosInstance);
26
+ this.vendorDocumentsApi = new VendorDocumentsApi(config, undefined, this.axiosInstance);
27
+ this.vendorRiskAssessmentsApi = new VendorRiskAssessmentsApi(config, undefined, this.axiosInstance);
28
+ this.vendorsApi = new VendorsApi(config, undefined, this.axiosInstance);
29
+ }
30
+ getApi() {
31
+ return {
32
+ assetsApi: this.assetsApi,
33
+ auditLogsApi: this.auditLogsApi,
34
+ controlsApi: this.controlsApi,
35
+ evidenceApi: this.evidenceApi,
36
+ frameworksApi: this.frameworksApi,
37
+ reportsApi: this.reportsApi,
38
+ risksApi: this.risksApi,
39
+ tasksApi: this.tasksApi,
40
+ vendorContactsApi: this.vendorContactsApi,
41
+ vendorDocumentsApi: this.vendorDocumentsApi,
42
+ vendorRiskAssessmentsApi: this.vendorRiskAssessmentsApi,
43
+ vendorsApi: this.vendorsApi,
44
+ };
45
+ }
46
+ }
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@rasadov/lumoar",
3
- "version": "2.0.0",
3
+ "version": "2.0.6",
4
4
  "description": "Lumoar API SDK for public use (API key authentication)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "files": [
8
8
  "dist",
9
9
  "openapi.json",
10
- "README.md"
10
+ "README.md",
11
+ "sdk.ts"
11
12
  ],
12
13
  "scripts": {
13
14
  "build": "tsc",
@@ -36,4 +37,4 @@
36
37
  "@types/node": "^24.5.2",
37
38
  "typescript": "^5.9.2"
38
39
  }
39
- }
40
+ }
package/sdk.ts ADDED
@@ -0,0 +1,77 @@
1
+ import axios, { AxiosInstance, AxiosResponse } from 'axios';
2
+ import {
3
+ AssetsApi,
4
+ AuditLogsApi,
5
+ ControlsApi,
6
+ EvidenceApi,
7
+ FrameworksApi,
8
+ ReportsApi,
9
+ RisksApi,
10
+ TasksApi,
11
+ VendorContactsApi,
12
+ VendorDocumentsApi,
13
+ VendorRiskAssessmentsApi,
14
+ VendorsApi
15
+ } from './api';
16
+ import { Configuration } from './configuration';
17
+
18
+ export class ApiSDK {
19
+ private assetsApi: AssetsApi;
20
+ private auditLogsApi: AuditLogsApi;
21
+ private controlsApi: ControlsApi;
22
+ private evidenceApi: EvidenceApi;
23
+ private frameworksApi: FrameworksApi;
24
+ private reportsApi: ReportsApi;
25
+ private risksApi: RisksApi;
26
+ private tasksApi: TasksApi;
27
+ private vendorContactsApi: VendorContactsApi;
28
+ private vendorDocumentsApi: VendorDocumentsApi;
29
+ private vendorRiskAssessmentsApi: VendorRiskAssessmentsApi;
30
+ private vendorsApi: VendorsApi;
31
+ private axiosInstance: AxiosInstance;
32
+
33
+ constructor(basePath?: string, apiKey?: string) {
34
+ this.axiosInstance = axios.create({
35
+ baseURL: basePath,
36
+ withCredentials: false
37
+ });
38
+
39
+ const config = new Configuration({
40
+ basePath,
41
+ apiKey: apiKey ? () => apiKey : undefined,
42
+ baseOptions: {
43
+ axios: this.axiosInstance
44
+ },
45
+ });
46
+
47
+ this.assetsApi = new AssetsApi(config, undefined, this.axiosInstance);
48
+ this.auditLogsApi = new AuditLogsApi(config, undefined, this.axiosInstance);
49
+ this.controlsApi = new ControlsApi(config, undefined, this.axiosInstance);
50
+ this.evidenceApi = new EvidenceApi(config, undefined, this.axiosInstance);
51
+ this.frameworksApi = new FrameworksApi(config, undefined, this.axiosInstance);
52
+ this.reportsApi = new ReportsApi(config, undefined, this.axiosInstance);
53
+ this.risksApi = new RisksApi(config, undefined, this.axiosInstance);
54
+ this.tasksApi = new TasksApi(config, undefined, this.axiosInstance);
55
+ this.vendorContactsApi = new VendorContactsApi(config, undefined, this.axiosInstance);
56
+ this.vendorDocumentsApi = new VendorDocumentsApi(config, undefined, this.axiosInstance);
57
+ this.vendorRiskAssessmentsApi = new VendorRiskAssessmentsApi(config, undefined, this.axiosInstance);
58
+ this.vendorsApi = new VendorsApi(config, undefined, this.axiosInstance);
59
+ }
60
+
61
+ public getApi() {
62
+ return {
63
+ assetsApi: this.assetsApi,
64
+ auditLogsApi: this.auditLogsApi,
65
+ controlsApi: this.controlsApi,
66
+ evidenceApi: this.evidenceApi,
67
+ frameworksApi: this.frameworksApi,
68
+ reportsApi: this.reportsApi,
69
+ risksApi: this.risksApi,
70
+ tasksApi: this.tasksApi,
71
+ vendorContactsApi: this.vendorContactsApi,
72
+ vendorDocumentsApi: this.vendorDocumentsApi,
73
+ vendorRiskAssessmentsApi: this.vendorRiskAssessmentsApi,
74
+ vendorsApi: this.vendorsApi,
75
+ };
76
+ }
77
+ }