@rasadov/lumoar-sdk 1.0.2 → 1.0.4
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/.openapi-generator/FILES +5 -1
- package/api.ts +360 -34
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -108
- package/dist/api.d.ts +215 -17
- package/dist/api.js +277 -30
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +11 -29
- package/dist/configuration.js +1 -80
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/sdk.d.ts +29 -0
- package/dist/sdk.js +73 -0
- package/docs/AuditLogAction.md +14 -0
- package/docs/AuditLogEntity.md +20 -0
- package/docs/AuditLogResponse.md +32 -0
- package/docs/AuditLogsApi.md +83 -0
- package/docs/HealthApi.md +44 -0
- package/docs/PaymentsApi.md +13 -13
- package/docs/ResponseGetCustomerManagementSessionV1PaymentsCustomerManagementGet.md +22 -0
- package/index.ts +2 -2
- package/package.json +1 -1
- package/sdk.ts +98 -0
package/dist/api.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Lumoar API
|
|
5
5
|
* Compliance as a service
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document:
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -26,6 +26,31 @@ import globalAxios from 'axios';
|
|
|
26
26
|
import { DUMMY_BASE_URL, assertParamExists, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
|
|
27
27
|
// @ts-ignore
|
|
28
28
|
import { BASE_PATH, BaseAPI, operationServerMap } from './base';
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @export
|
|
32
|
+
* @enum {string}
|
|
33
|
+
*/
|
|
34
|
+
export const AuditLogAction = {
|
|
35
|
+
Invite: 'invite',
|
|
36
|
+
Create: 'create',
|
|
37
|
+
Update: 'update',
|
|
38
|
+
Delete: 'delete'
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @export
|
|
43
|
+
* @enum {string}
|
|
44
|
+
*/
|
|
45
|
+
export const AuditLogEntity = {
|
|
46
|
+
CompanyControls: 'company_controls',
|
|
47
|
+
Evidences: 'evidences',
|
|
48
|
+
Policies: 'policies',
|
|
49
|
+
Reports: 'reports',
|
|
50
|
+
Companies: 'companies',
|
|
51
|
+
Users: 'users',
|
|
52
|
+
Tasks: 'tasks'
|
|
53
|
+
};
|
|
29
54
|
/**
|
|
30
55
|
*
|
|
31
56
|
* @export
|
|
@@ -58,6 +83,169 @@ export const PermissionType = {
|
|
|
58
83
|
Member: 'member',
|
|
59
84
|
Auditor: 'auditor'
|
|
60
85
|
};
|
|
86
|
+
/**
|
|
87
|
+
* AuditLogsApi - axios parameter creator
|
|
88
|
+
* @export
|
|
89
|
+
*/
|
|
90
|
+
export const AuditLogsApiAxiosParamCreator = function (configuration) {
|
|
91
|
+
return {
|
|
92
|
+
/**
|
|
93
|
+
*
|
|
94
|
+
* @summary List Audit Logs
|
|
95
|
+
* @param {string} companyId
|
|
96
|
+
* @param {number} page
|
|
97
|
+
* @param {number} elements
|
|
98
|
+
* @param {AuditLogEntity | null} [entityType]
|
|
99
|
+
* @param {AuditLogAction | null} [action]
|
|
100
|
+
* @param {string | null} [startDate]
|
|
101
|
+
* @param {string | null} [endDate]
|
|
102
|
+
* @param {string} [authorization]
|
|
103
|
+
* @param {string} [sessionId]
|
|
104
|
+
* @param {*} [options] Override http request option.
|
|
105
|
+
* @throws {RequiredError}
|
|
106
|
+
*/
|
|
107
|
+
listAuditLogsV1AuditLogsListGet: (companyId_1, page_1, elements_1, entityType_1, action_1, startDate_1, endDate_1, authorization_1, sessionId_1, ...args_1) => __awaiter(this, [companyId_1, page_1, elements_1, entityType_1, action_1, startDate_1, endDate_1, authorization_1, sessionId_1, ...args_1], void 0, function* (companyId, page, elements, entityType, action, startDate, endDate, authorization, sessionId, options = {}) {
|
|
108
|
+
// verify required parameter 'companyId' is not null or undefined
|
|
109
|
+
assertParamExists('listAuditLogsV1AuditLogsListGet', 'companyId', companyId);
|
|
110
|
+
// verify required parameter 'page' is not null or undefined
|
|
111
|
+
assertParamExists('listAuditLogsV1AuditLogsListGet', 'page', page);
|
|
112
|
+
// verify required parameter 'elements' is not null or undefined
|
|
113
|
+
assertParamExists('listAuditLogsV1AuditLogsListGet', 'elements', elements);
|
|
114
|
+
const localVarPath = `/v1/audit-logs/list`;
|
|
115
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
116
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
117
|
+
let baseOptions;
|
|
118
|
+
if (configuration) {
|
|
119
|
+
baseOptions = configuration.baseOptions;
|
|
120
|
+
}
|
|
121
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
122
|
+
const localVarHeaderParameter = {};
|
|
123
|
+
const localVarQueryParameter = {};
|
|
124
|
+
if (companyId !== undefined) {
|
|
125
|
+
localVarQueryParameter['company_id'] = companyId;
|
|
126
|
+
}
|
|
127
|
+
if (page !== undefined) {
|
|
128
|
+
localVarQueryParameter['page'] = page;
|
|
129
|
+
}
|
|
130
|
+
if (elements !== undefined) {
|
|
131
|
+
localVarQueryParameter['elements'] = elements;
|
|
132
|
+
}
|
|
133
|
+
if (entityType !== undefined) {
|
|
134
|
+
localVarQueryParameter['entity_type'] = entityType;
|
|
135
|
+
}
|
|
136
|
+
if (action !== undefined) {
|
|
137
|
+
localVarQueryParameter['action'] = action;
|
|
138
|
+
}
|
|
139
|
+
if (startDate !== undefined) {
|
|
140
|
+
localVarQueryParameter['start_date'] = (startDate instanceof Date) ?
|
|
141
|
+
startDate.toISOString() :
|
|
142
|
+
startDate;
|
|
143
|
+
}
|
|
144
|
+
if (endDate !== undefined) {
|
|
145
|
+
localVarQueryParameter['end_date'] = (endDate instanceof Date) ?
|
|
146
|
+
endDate.toISOString() :
|
|
147
|
+
endDate;
|
|
148
|
+
}
|
|
149
|
+
if (authorization != null) {
|
|
150
|
+
localVarHeaderParameter['Authorization'] = String(authorization);
|
|
151
|
+
}
|
|
152
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
153
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
154
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
155
|
+
return {
|
|
156
|
+
url: toPathString(localVarUrlObj),
|
|
157
|
+
options: localVarRequestOptions,
|
|
158
|
+
};
|
|
159
|
+
}),
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
/**
|
|
163
|
+
* AuditLogsApi - functional programming interface
|
|
164
|
+
* @export
|
|
165
|
+
*/
|
|
166
|
+
export const AuditLogsApiFp = function (configuration) {
|
|
167
|
+
const localVarAxiosParamCreator = AuditLogsApiAxiosParamCreator(configuration);
|
|
168
|
+
return {
|
|
169
|
+
/**
|
|
170
|
+
*
|
|
171
|
+
* @summary List Audit Logs
|
|
172
|
+
* @param {string} companyId
|
|
173
|
+
* @param {number} page
|
|
174
|
+
* @param {number} elements
|
|
175
|
+
* @param {AuditLogEntity | null} [entityType]
|
|
176
|
+
* @param {AuditLogAction | null} [action]
|
|
177
|
+
* @param {string | null} [startDate]
|
|
178
|
+
* @param {string | null} [endDate]
|
|
179
|
+
* @param {string} [authorization]
|
|
180
|
+
* @param {string} [sessionId]
|
|
181
|
+
* @param {*} [options] Override http request option.
|
|
182
|
+
* @throws {RequiredError}
|
|
183
|
+
*/
|
|
184
|
+
listAuditLogsV1AuditLogsListGet(companyId, page, elements, entityType, action, startDate, endDate, authorization, sessionId, options) {
|
|
185
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
186
|
+
var _a, _b, _c;
|
|
187
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listAuditLogsV1AuditLogsListGet(companyId, page, elements, entityType, action, startDate, endDate, authorization, sessionId, options);
|
|
188
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
189
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AuditLogsApi.listAuditLogsV1AuditLogsListGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
190
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
191
|
+
});
|
|
192
|
+
},
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
/**
|
|
196
|
+
* AuditLogsApi - factory interface
|
|
197
|
+
* @export
|
|
198
|
+
*/
|
|
199
|
+
export const AuditLogsApiFactory = function (configuration, basePath, axios) {
|
|
200
|
+
const localVarFp = AuditLogsApiFp(configuration);
|
|
201
|
+
return {
|
|
202
|
+
/**
|
|
203
|
+
*
|
|
204
|
+
* @summary List Audit Logs
|
|
205
|
+
* @param {string} companyId
|
|
206
|
+
* @param {number} page
|
|
207
|
+
* @param {number} elements
|
|
208
|
+
* @param {AuditLogEntity | null} [entityType]
|
|
209
|
+
* @param {AuditLogAction | null} [action]
|
|
210
|
+
* @param {string | null} [startDate]
|
|
211
|
+
* @param {string | null} [endDate]
|
|
212
|
+
* @param {string} [authorization]
|
|
213
|
+
* @param {string} [sessionId]
|
|
214
|
+
* @param {*} [options] Override http request option.
|
|
215
|
+
* @throws {RequiredError}
|
|
216
|
+
*/
|
|
217
|
+
listAuditLogsV1AuditLogsListGet(companyId, page, elements, entityType, action, startDate, endDate, authorization, sessionId, options) {
|
|
218
|
+
return localVarFp.listAuditLogsV1AuditLogsListGet(companyId, page, elements, entityType, action, startDate, endDate, authorization, sessionId, options).then((request) => request(axios, basePath));
|
|
219
|
+
},
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
/**
|
|
223
|
+
* AuditLogsApi - object-oriented interface
|
|
224
|
+
* @export
|
|
225
|
+
* @class AuditLogsApi
|
|
226
|
+
* @extends {BaseAPI}
|
|
227
|
+
*/
|
|
228
|
+
export class AuditLogsApi extends BaseAPI {
|
|
229
|
+
/**
|
|
230
|
+
*
|
|
231
|
+
* @summary List Audit Logs
|
|
232
|
+
* @param {string} companyId
|
|
233
|
+
* @param {number} page
|
|
234
|
+
* @param {number} elements
|
|
235
|
+
* @param {AuditLogEntity | null} [entityType]
|
|
236
|
+
* @param {AuditLogAction | null} [action]
|
|
237
|
+
* @param {string | null} [startDate]
|
|
238
|
+
* @param {string | null} [endDate]
|
|
239
|
+
* @param {string} [authorization]
|
|
240
|
+
* @param {string} [sessionId]
|
|
241
|
+
* @param {*} [options] Override http request option.
|
|
242
|
+
* @throws {RequiredError}
|
|
243
|
+
* @memberof AuditLogsApi
|
|
244
|
+
*/
|
|
245
|
+
listAuditLogsV1AuditLogsListGet(companyId, page, elements, entityType, action, startDate, endDate, authorization, sessionId, options) {
|
|
246
|
+
return AuditLogsApiFp(this.configuration).listAuditLogsV1AuditLogsListGet(companyId, page, elements, entityType, action, startDate, endDate, authorization, sessionId, options).then((request) => request(this.axios, this.basePath));
|
|
247
|
+
}
|
|
248
|
+
}
|
|
61
249
|
/**
|
|
62
250
|
* AuthApi - axios parameter creator
|
|
63
251
|
* @export
|
|
@@ -2072,6 +2260,31 @@ export const HealthApiAxiosParamCreator = function (configuration) {
|
|
|
2072
2260
|
options: localVarRequestOptions,
|
|
2073
2261
|
};
|
|
2074
2262
|
}),
|
|
2263
|
+
/**
|
|
2264
|
+
*
|
|
2265
|
+
* @summary Get Rate Limit Health
|
|
2266
|
+
* @param {*} [options] Override http request option.
|
|
2267
|
+
* @throws {RequiredError}
|
|
2268
|
+
*/
|
|
2269
|
+
getRateLimitHealthHealthRateLimitGet: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
2270
|
+
const localVarPath = `/health/rate_limit`;
|
|
2271
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2272
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2273
|
+
let baseOptions;
|
|
2274
|
+
if (configuration) {
|
|
2275
|
+
baseOptions = configuration.baseOptions;
|
|
2276
|
+
}
|
|
2277
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2278
|
+
const localVarHeaderParameter = {};
|
|
2279
|
+
const localVarQueryParameter = {};
|
|
2280
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2281
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2282
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2283
|
+
return {
|
|
2284
|
+
url: toPathString(localVarUrlObj),
|
|
2285
|
+
options: localVarRequestOptions,
|
|
2286
|
+
};
|
|
2287
|
+
}),
|
|
2075
2288
|
/**
|
|
2076
2289
|
*
|
|
2077
2290
|
* @summary Get Redis Health
|
|
@@ -2151,6 +2364,21 @@ export const HealthApiFp = function (configuration) {
|
|
|
2151
2364
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2152
2365
|
});
|
|
2153
2366
|
},
|
|
2367
|
+
/**
|
|
2368
|
+
*
|
|
2369
|
+
* @summary Get Rate Limit Health
|
|
2370
|
+
* @param {*} [options] Override http request option.
|
|
2371
|
+
* @throws {RequiredError}
|
|
2372
|
+
*/
|
|
2373
|
+
getRateLimitHealthHealthRateLimitGet(options) {
|
|
2374
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2375
|
+
var _a, _b, _c;
|
|
2376
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getRateLimitHealthHealthRateLimitGet(options);
|
|
2377
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2378
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['HealthApi.getRateLimitHealthHealthRateLimitGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2379
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2380
|
+
});
|
|
2381
|
+
},
|
|
2154
2382
|
/**
|
|
2155
2383
|
*
|
|
2156
2384
|
* @summary Get Redis Health
|
|
@@ -2202,6 +2430,15 @@ export const HealthApiFactory = function (configuration, basePath, axios) {
|
|
|
2202
2430
|
getListmonkHealthHealthListmonkGet(options) {
|
|
2203
2431
|
return localVarFp.getListmonkHealthHealthListmonkGet(options).then((request) => request(axios, basePath));
|
|
2204
2432
|
},
|
|
2433
|
+
/**
|
|
2434
|
+
*
|
|
2435
|
+
* @summary Get Rate Limit Health
|
|
2436
|
+
* @param {*} [options] Override http request option.
|
|
2437
|
+
* @throws {RequiredError}
|
|
2438
|
+
*/
|
|
2439
|
+
getRateLimitHealthHealthRateLimitGet(options) {
|
|
2440
|
+
return localVarFp.getRateLimitHealthHealthRateLimitGet(options).then((request) => request(axios, basePath));
|
|
2441
|
+
},
|
|
2205
2442
|
/**
|
|
2206
2443
|
*
|
|
2207
2444
|
* @summary Get Redis Health
|
|
@@ -2250,6 +2487,16 @@ export class HealthApi extends BaseAPI {
|
|
|
2250
2487
|
getListmonkHealthHealthListmonkGet(options) {
|
|
2251
2488
|
return HealthApiFp(this.configuration).getListmonkHealthHealthListmonkGet(options).then((request) => request(this.axios, this.basePath));
|
|
2252
2489
|
}
|
|
2490
|
+
/**
|
|
2491
|
+
*
|
|
2492
|
+
* @summary Get Rate Limit Health
|
|
2493
|
+
* @param {*} [options] Override http request option.
|
|
2494
|
+
* @throws {RequiredError}
|
|
2495
|
+
* @memberof HealthApi
|
|
2496
|
+
*/
|
|
2497
|
+
getRateLimitHealthHealthRateLimitGet(options) {
|
|
2498
|
+
return HealthApiFp(this.configuration).getRateLimitHealthHealthRateLimitGet(options).then((request) => request(this.axios, this.basePath));
|
|
2499
|
+
}
|
|
2253
2500
|
/**
|
|
2254
2501
|
*
|
|
2255
2502
|
* @summary Get Redis Health
|
|
@@ -2277,12 +2524,12 @@ export const PaymentsApiAxiosParamCreator = function (configuration) {
|
|
|
2277
2524
|
* @param {*} [options] Override http request option.
|
|
2278
2525
|
* @throws {RequiredError}
|
|
2279
2526
|
*/
|
|
2280
|
-
|
|
2527
|
+
getCheckoutSessionV1PaymentsCheckoutGet: (companyId_1, productId_1, authorization_1, sessionId_1, ...args_1) => __awaiter(this, [companyId_1, productId_1, authorization_1, sessionId_1, ...args_1], void 0, function* (companyId, productId, authorization, sessionId, options = {}) {
|
|
2281
2528
|
// verify required parameter 'companyId' is not null or undefined
|
|
2282
|
-
assertParamExists('
|
|
2529
|
+
assertParamExists('getCheckoutSessionV1PaymentsCheckoutGet', 'companyId', companyId);
|
|
2283
2530
|
// verify required parameter 'productId' is not null or undefined
|
|
2284
|
-
assertParamExists('
|
|
2285
|
-
const localVarPath = `/payments/checkout`;
|
|
2531
|
+
assertParamExists('getCheckoutSessionV1PaymentsCheckoutGet', 'productId', productId);
|
|
2532
|
+
const localVarPath = `/v1/payments/checkout`;
|
|
2286
2533
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2287
2534
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2288
2535
|
let baseOptions;
|
|
@@ -2317,8 +2564,8 @@ export const PaymentsApiAxiosParamCreator = function (configuration) {
|
|
|
2317
2564
|
* @param {*} [options] Override http request option.
|
|
2318
2565
|
* @throws {RequiredError}
|
|
2319
2566
|
*/
|
|
2320
|
-
|
|
2321
|
-
const localVarPath = `/payments/customer/management`;
|
|
2567
|
+
getCustomerManagementSessionV1PaymentsCustomerManagementGet: (authorization_1, sessionId_1, ...args_1) => __awaiter(this, [authorization_1, sessionId_1, ...args_1], void 0, function* (authorization, sessionId, options = {}) {
|
|
2568
|
+
const localVarPath = `/v1/payments/customer/management`;
|
|
2322
2569
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2323
2570
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2324
2571
|
let baseOptions;
|
|
@@ -2345,8 +2592,8 @@ export const PaymentsApiAxiosParamCreator = function (configuration) {
|
|
|
2345
2592
|
* @param {*} [options] Override http request option.
|
|
2346
2593
|
* @throws {RequiredError}
|
|
2347
2594
|
*/
|
|
2348
|
-
|
|
2349
|
-
const localVarPath = `/payments/webhook`;
|
|
2595
|
+
webhookV1PaymentsWebhookPost: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
2596
|
+
const localVarPath = `/v1/payments/webhook`;
|
|
2350
2597
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2351
2598
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2352
2599
|
let baseOptions;
|
|
@@ -2383,12 +2630,12 @@ export const PaymentsApiFp = function (configuration) {
|
|
|
2383
2630
|
* @param {*} [options] Override http request option.
|
|
2384
2631
|
* @throws {RequiredError}
|
|
2385
2632
|
*/
|
|
2386
|
-
|
|
2633
|
+
getCheckoutSessionV1PaymentsCheckoutGet(companyId, productId, authorization, sessionId, options) {
|
|
2387
2634
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2388
2635
|
var _a, _b, _c;
|
|
2389
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.
|
|
2636
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getCheckoutSessionV1PaymentsCheckoutGet(companyId, productId, authorization, sessionId, options);
|
|
2390
2637
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2391
|
-
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PaymentsApi.
|
|
2638
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PaymentsApi.getCheckoutSessionV1PaymentsCheckoutGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2392
2639
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2393
2640
|
});
|
|
2394
2641
|
},
|
|
@@ -2400,12 +2647,12 @@ export const PaymentsApiFp = function (configuration) {
|
|
|
2400
2647
|
* @param {*} [options] Override http request option.
|
|
2401
2648
|
* @throws {RequiredError}
|
|
2402
2649
|
*/
|
|
2403
|
-
|
|
2650
|
+
getCustomerManagementSessionV1PaymentsCustomerManagementGet(authorization, sessionId, options) {
|
|
2404
2651
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2405
2652
|
var _a, _b, _c;
|
|
2406
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.
|
|
2653
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getCustomerManagementSessionV1PaymentsCustomerManagementGet(authorization, sessionId, options);
|
|
2407
2654
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2408
|
-
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PaymentsApi.
|
|
2655
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PaymentsApi.getCustomerManagementSessionV1PaymentsCustomerManagementGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2409
2656
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2410
2657
|
});
|
|
2411
2658
|
},
|
|
@@ -2415,12 +2662,12 @@ export const PaymentsApiFp = function (configuration) {
|
|
|
2415
2662
|
* @param {*} [options] Override http request option.
|
|
2416
2663
|
* @throws {RequiredError}
|
|
2417
2664
|
*/
|
|
2418
|
-
|
|
2665
|
+
webhookV1PaymentsWebhookPost(options) {
|
|
2419
2666
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2420
2667
|
var _a, _b, _c;
|
|
2421
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.
|
|
2668
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.webhookV1PaymentsWebhookPost(options);
|
|
2422
2669
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2423
|
-
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PaymentsApi.
|
|
2670
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PaymentsApi.webhookV1PaymentsWebhookPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2424
2671
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2425
2672
|
});
|
|
2426
2673
|
},
|
|
@@ -2443,8 +2690,8 @@ export const PaymentsApiFactory = function (configuration, basePath, axios) {
|
|
|
2443
2690
|
* @param {*} [options] Override http request option.
|
|
2444
2691
|
* @throws {RequiredError}
|
|
2445
2692
|
*/
|
|
2446
|
-
|
|
2447
|
-
return localVarFp.
|
|
2693
|
+
getCheckoutSessionV1PaymentsCheckoutGet(companyId, productId, authorization, sessionId, options) {
|
|
2694
|
+
return localVarFp.getCheckoutSessionV1PaymentsCheckoutGet(companyId, productId, authorization, sessionId, options).then((request) => request(axios, basePath));
|
|
2448
2695
|
},
|
|
2449
2696
|
/**
|
|
2450
2697
|
*
|
|
@@ -2454,8 +2701,8 @@ export const PaymentsApiFactory = function (configuration, basePath, axios) {
|
|
|
2454
2701
|
* @param {*} [options] Override http request option.
|
|
2455
2702
|
* @throws {RequiredError}
|
|
2456
2703
|
*/
|
|
2457
|
-
|
|
2458
|
-
return localVarFp.
|
|
2704
|
+
getCustomerManagementSessionV1PaymentsCustomerManagementGet(authorization, sessionId, options) {
|
|
2705
|
+
return localVarFp.getCustomerManagementSessionV1PaymentsCustomerManagementGet(authorization, sessionId, options).then((request) => request(axios, basePath));
|
|
2459
2706
|
},
|
|
2460
2707
|
/**
|
|
2461
2708
|
*
|
|
@@ -2463,8 +2710,8 @@ export const PaymentsApiFactory = function (configuration, basePath, axios) {
|
|
|
2463
2710
|
* @param {*} [options] Override http request option.
|
|
2464
2711
|
* @throws {RequiredError}
|
|
2465
2712
|
*/
|
|
2466
|
-
|
|
2467
|
-
return localVarFp.
|
|
2713
|
+
webhookV1PaymentsWebhookPost(options) {
|
|
2714
|
+
return localVarFp.webhookV1PaymentsWebhookPost(options).then((request) => request(axios, basePath));
|
|
2468
2715
|
},
|
|
2469
2716
|
};
|
|
2470
2717
|
};
|
|
@@ -2486,8 +2733,8 @@ export class PaymentsApi extends BaseAPI {
|
|
|
2486
2733
|
* @throws {RequiredError}
|
|
2487
2734
|
* @memberof PaymentsApi
|
|
2488
2735
|
*/
|
|
2489
|
-
|
|
2490
|
-
return PaymentsApiFp(this.configuration).
|
|
2736
|
+
getCheckoutSessionV1PaymentsCheckoutGet(companyId, productId, authorization, sessionId, options) {
|
|
2737
|
+
return PaymentsApiFp(this.configuration).getCheckoutSessionV1PaymentsCheckoutGet(companyId, productId, authorization, sessionId, options).then((request) => request(this.axios, this.basePath));
|
|
2491
2738
|
}
|
|
2492
2739
|
/**
|
|
2493
2740
|
*
|
|
@@ -2498,8 +2745,8 @@ export class PaymentsApi extends BaseAPI {
|
|
|
2498
2745
|
* @throws {RequiredError}
|
|
2499
2746
|
* @memberof PaymentsApi
|
|
2500
2747
|
*/
|
|
2501
|
-
|
|
2502
|
-
return PaymentsApiFp(this.configuration).
|
|
2748
|
+
getCustomerManagementSessionV1PaymentsCustomerManagementGet(authorization, sessionId, options) {
|
|
2749
|
+
return PaymentsApiFp(this.configuration).getCustomerManagementSessionV1PaymentsCustomerManagementGet(authorization, sessionId, options).then((request) => request(this.axios, this.basePath));
|
|
2503
2750
|
}
|
|
2504
2751
|
/**
|
|
2505
2752
|
*
|
|
@@ -2508,8 +2755,8 @@ export class PaymentsApi extends BaseAPI {
|
|
|
2508
2755
|
* @throws {RequiredError}
|
|
2509
2756
|
* @memberof PaymentsApi
|
|
2510
2757
|
*/
|
|
2511
|
-
|
|
2512
|
-
return PaymentsApiFp(this.configuration).
|
|
2758
|
+
webhookV1PaymentsWebhookPost(options) {
|
|
2759
|
+
return PaymentsApiFp(this.configuration).webhookV1PaymentsWebhookPost(options).then((request) => request(this.axios, this.basePath));
|
|
2513
2760
|
}
|
|
2514
2761
|
}
|
|
2515
2762
|
/**
|
package/dist/base.d.ts
CHANGED
package/dist/base.js
CHANGED
package/dist/common.d.ts
CHANGED
package/dist/common.js
CHANGED
package/dist/configuration.d.ts
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Lumoar API
|
|
3
|
+
* Compliance as a service
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
2
12
|
export interface ConfigurationParameters {
|
|
3
13
|
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
4
14
|
username?: string;
|
|
@@ -79,31 +89,3 @@ export declare class Configuration {
|
|
|
79
89
|
*/
|
|
80
90
|
isJsonMime(mime: string): boolean;
|
|
81
91
|
}
|
|
82
|
-
export declare class ApiSDK {
|
|
83
|
-
private helthApi;
|
|
84
|
-
private authApi;
|
|
85
|
-
private companyApi;
|
|
86
|
-
private controlsApi;
|
|
87
|
-
private evidenceApi;
|
|
88
|
-
private paymentsApi;
|
|
89
|
-
private policiesApi;
|
|
90
|
-
private rolesApi;
|
|
91
|
-
private userApi;
|
|
92
|
-
private token;
|
|
93
|
-
private axiosInstance;
|
|
94
|
-
constructor(basePath?: string);
|
|
95
|
-
setToken(newToken: string): void;
|
|
96
|
-
private getAuthHeader;
|
|
97
|
-
private setupInterceptors;
|
|
98
|
-
getApi(): {
|
|
99
|
-
helthApi: HealthApi;
|
|
100
|
-
authApi: AuthApi;
|
|
101
|
-
companyApi: CompanyApi;
|
|
102
|
-
controlsApi: ControlsApi;
|
|
103
|
-
evidenceApi: EvidenceApi;
|
|
104
|
-
paymentsApi: PaymentsApi;
|
|
105
|
-
policiesApi: PoliciesApi;
|
|
106
|
-
rolesApi: RolesApi;
|
|
107
|
-
userApi: UserApi;
|
|
108
|
-
};
|
|
109
|
-
}
|
package/dist/configuration.js
CHANGED
|
@@ -4,15 +4,13 @@
|
|
|
4
4
|
* Lumoar API
|
|
5
5
|
* Compliance as a service
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document:
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
-
import axios from 'axios';
|
|
15
|
-
import { HealthApi, AuthApi, CompanyApi, ControlsApi, EvidenceApi, PaymentsApi, PoliciesApi, RolesApi, UserApi } from './api';
|
|
16
14
|
export class Configuration {
|
|
17
15
|
constructor(param = {}) {
|
|
18
16
|
var _a;
|
|
@@ -40,80 +38,3 @@ export class Configuration {
|
|
|
40
38
|
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
|
41
39
|
}
|
|
42
40
|
}
|
|
43
|
-
export class ApiSDK {
|
|
44
|
-
constructor(basePath) {
|
|
45
|
-
this.token = null;
|
|
46
|
-
this.axiosInstance = axios.create({
|
|
47
|
-
baseURL: basePath,
|
|
48
|
-
withCredentials: true // Include cookies (e.g., session_id) in requests
|
|
49
|
-
});
|
|
50
|
-
this.setupInterceptors();
|
|
51
|
-
const config = new Configuration({
|
|
52
|
-
basePath,
|
|
53
|
-
apiKey: () => this.getAuthHeader(),
|
|
54
|
-
baseOptions: {
|
|
55
|
-
axios: this.axiosInstance // Ensure generated API uses this instance
|
|
56
|
-
},
|
|
57
|
-
});
|
|
58
|
-
// Create instances of all API classes
|
|
59
|
-
this.helthApi = new HealthApi(config, undefined, this.axiosInstance);
|
|
60
|
-
this.authApi = new AuthApi(config, undefined, this.axiosInstance);
|
|
61
|
-
this.companyApi = new CompanyApi(config, undefined, this.axiosInstance);
|
|
62
|
-
this.controlsApi = new ControlsApi(config, undefined, this.axiosInstance);
|
|
63
|
-
this.evidenceApi = new EvidenceApi(config, undefined, this.axiosInstance);
|
|
64
|
-
this.paymentsApi = new PaymentsApi(config, undefined, this.axiosInstance);
|
|
65
|
-
this.policiesApi = new PoliciesApi(config, undefined, this.axiosInstance);
|
|
66
|
-
this.rolesApi = new RolesApi(config, undefined, this.axiosInstance);
|
|
67
|
-
this.userApi = new UserApi(config, undefined, this.axiosInstance);
|
|
68
|
-
}
|
|
69
|
-
// Set or update token
|
|
70
|
-
setToken(newToken) {
|
|
71
|
-
this.token = newToken;
|
|
72
|
-
}
|
|
73
|
-
// Get auth header
|
|
74
|
-
getAuthHeader() {
|
|
75
|
-
if (!this.token) {
|
|
76
|
-
throw new Error('No token set. Call setToken() first.');
|
|
77
|
-
}
|
|
78
|
-
return `Bearer ${this.token}`;
|
|
79
|
-
}
|
|
80
|
-
// Setup interceptors for requests and responses
|
|
81
|
-
setupInterceptors() {
|
|
82
|
-
// Request interceptor: Always set latest token
|
|
83
|
-
this.axiosInstance.interceptors.request.use((config) => {
|
|
84
|
-
if (this.token) {
|
|
85
|
-
config.headers['Authorization'] = this.getAuthHeader();
|
|
86
|
-
}
|
|
87
|
-
return config;
|
|
88
|
-
});
|
|
89
|
-
this.axiosInstance.interceptors.response.use((response) => {
|
|
90
|
-
const newToken = response.data.newToken || response.headers['Authorization'];
|
|
91
|
-
if (newToken) {
|
|
92
|
-
this.setToken(newToken.replace('Bearer ', ''));
|
|
93
|
-
console.log('Token automatically updated via backend refresh');
|
|
94
|
-
}
|
|
95
|
-
return response;
|
|
96
|
-
}, (error) => {
|
|
97
|
-
var _a;
|
|
98
|
-
if (((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 401) {
|
|
99
|
-
console.error('Authentication failed - session expired');
|
|
100
|
-
// TODO: emit event or callback to app for login redirect
|
|
101
|
-
}
|
|
102
|
-
return Promise.reject(error);
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
// Expose API methods (proxies the generated API)
|
|
106
|
-
getApi() {
|
|
107
|
-
return {
|
|
108
|
-
helthApi: this.helthApi,
|
|
109
|
-
authApi: this.authApi,
|
|
110
|
-
companyApi: this.companyApi,
|
|
111
|
-
controlsApi: this.controlsApi,
|
|
112
|
-
evidenceApi: this.evidenceApi,
|
|
113
|
-
paymentsApi: this.paymentsApi,
|
|
114
|
-
policiesApi: this.policiesApi,
|
|
115
|
-
rolesApi: this.rolesApi,
|
|
116
|
-
userApi: this.userApi,
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Lumoar API
|
|
3
3
|
* Compliance as a service
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document:
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -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
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Lumoar API
|
|
5
5
|
* Compliance as a service
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document:
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -13,3 +13,4 @@
|
|
|
13
13
|
*/
|
|
14
14
|
export * from "./api";
|
|
15
15
|
export * from "./configuration";
|
|
16
|
+
export * from "./sdk";
|