@nestbox-ai/admin 1.0.42 → 1.0.47
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/VERSION +1 -1
- package/README.md +3 -2
- package/api.ts +96 -0
- package/common.ts +4 -4
- package/dist/api.d.ts +45 -0
- package/dist/api.js +91 -0
- package/dist/esm/api.d.ts +45 -0
- package/dist/esm/api.js +91 -0
- package/docs/MachineAgentLogsApi.md +65 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
7.
|
|
1
|
+
7.14.0
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @nestbox-ai/admin@1.0.
|
|
1
|
+
## @nestbox-ai/admin@1.0.47
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @nestbox-ai/admin@1.0.
|
|
39
|
+
npm install @nestbox-ai/admin@1.0.47 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -79,6 +79,7 @@ Class | Method | HTTP request | Description
|
|
|
79
79
|
*MachineAgentApi* | [**machineAgentControllerDeleteMachineAgents**](docs/MachineAgentApi.md#machineagentcontrollerdeletemachineagents) | **DELETE** /projects/{projectId}/agents/{agentId} | Delete machine agent
|
|
80
80
|
*MachineAgentApi* | [**machineAgentControllerGetMachineAgentByProjectId**](docs/MachineAgentApi.md#machineagentcontrollergetmachineagentbyprojectid) | **GET** /projects/{projectId}/agents | Get all machine agent with count
|
|
81
81
|
*MachineAgentApi* | [**machineAgentControllerUpdateMachineAgent**](docs/MachineAgentApi.md#machineagentcontrollerupdatemachineagent) | **PATCH** /projects/{projectId}/agents/{agentId} | Update machine agent by id
|
|
82
|
+
*MachineAgentLogsApi* | [**logsControllerFetchAgentLogs**](docs/MachineAgentLogsApi.md#logscontrollerfetchagentlogs) | **GET** /projects/{projectId}/logs/{agentId} | Fetch agent logs.
|
|
82
83
|
*MachineAgentLogsApi* | [**logsControllerFetchEventLogs**](docs/MachineAgentLogsApi.md#logscontrollerfetcheventlogs) | **GET** /projects/{projectId}/fetchEventLogs/{agentId} | Fetch event logs.
|
|
83
84
|
*MachineInstancesApi* | [**machineInstancesControllerCreateMachineInstance**](docs/MachineInstancesApi.md#machineinstancescontrollercreatemachineinstance) | **POST** /projects/{projectId}/instances | Create Machine Instance
|
|
84
85
|
*MachineInstancesApi* | [**machineInstancesControllerDeleteMachineInstance**](docs/MachineInstancesApi.md#machineinstancescontrollerdeletemachineinstance) | **DELETE** /projects/{projectId}/instances | Delete machine instances by ids
|
package/api.ts
CHANGED
|
@@ -3907,6 +3907,58 @@ export class MachineAgentApi extends BaseAPI {
|
|
|
3907
3907
|
*/
|
|
3908
3908
|
export const MachineAgentLogsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
3909
3909
|
return {
|
|
3910
|
+
/**
|
|
3911
|
+
*
|
|
3912
|
+
* @summary Fetch agent logs.
|
|
3913
|
+
* @param {string} projectId
|
|
3914
|
+
* @param {string} agentId
|
|
3915
|
+
* @param {string} direction
|
|
3916
|
+
* @param {string} cursor
|
|
3917
|
+
* @param {*} [options] Override http request option.
|
|
3918
|
+
* @throws {RequiredError}
|
|
3919
|
+
*/
|
|
3920
|
+
logsControllerFetchAgentLogs: async (projectId: string, agentId: string, direction: string, cursor: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
3921
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
3922
|
+
assertParamExists('logsControllerFetchAgentLogs', 'projectId', projectId)
|
|
3923
|
+
// verify required parameter 'agentId' is not null or undefined
|
|
3924
|
+
assertParamExists('logsControllerFetchAgentLogs', 'agentId', agentId)
|
|
3925
|
+
// verify required parameter 'direction' is not null or undefined
|
|
3926
|
+
assertParamExists('logsControllerFetchAgentLogs', 'direction', direction)
|
|
3927
|
+
// verify required parameter 'cursor' is not null or undefined
|
|
3928
|
+
assertParamExists('logsControllerFetchAgentLogs', 'cursor', cursor)
|
|
3929
|
+
const localVarPath = `/projects/{projectId}/logs/{agentId}`
|
|
3930
|
+
.replace(`{${"projectId"}}`, encodeURIComponent(String(projectId)))
|
|
3931
|
+
.replace(`{${"agentId"}}`, encodeURIComponent(String(agentId)));
|
|
3932
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3933
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3934
|
+
let baseOptions;
|
|
3935
|
+
if (configuration) {
|
|
3936
|
+
baseOptions = configuration.baseOptions;
|
|
3937
|
+
}
|
|
3938
|
+
|
|
3939
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
3940
|
+
const localVarHeaderParameter = {} as any;
|
|
3941
|
+
const localVarQueryParameter = {} as any;
|
|
3942
|
+
|
|
3943
|
+
if (direction !== undefined) {
|
|
3944
|
+
localVarQueryParameter['direction'] = direction;
|
|
3945
|
+
}
|
|
3946
|
+
|
|
3947
|
+
if (cursor !== undefined) {
|
|
3948
|
+
localVarQueryParameter['cursor'] = cursor;
|
|
3949
|
+
}
|
|
3950
|
+
|
|
3951
|
+
|
|
3952
|
+
|
|
3953
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3954
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3955
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
3956
|
+
|
|
3957
|
+
return {
|
|
3958
|
+
url: toPathString(localVarUrlObj),
|
|
3959
|
+
options: localVarRequestOptions,
|
|
3960
|
+
};
|
|
3961
|
+
},
|
|
3910
3962
|
/**
|
|
3911
3963
|
*
|
|
3912
3964
|
* @summary Fetch event logs.
|
|
@@ -3955,6 +4007,22 @@ export const MachineAgentLogsApiAxiosParamCreator = function (configuration?: Co
|
|
|
3955
4007
|
export const MachineAgentLogsApiFp = function(configuration?: Configuration) {
|
|
3956
4008
|
const localVarAxiosParamCreator = MachineAgentLogsApiAxiosParamCreator(configuration)
|
|
3957
4009
|
return {
|
|
4010
|
+
/**
|
|
4011
|
+
*
|
|
4012
|
+
* @summary Fetch agent logs.
|
|
4013
|
+
* @param {string} projectId
|
|
4014
|
+
* @param {string} agentId
|
|
4015
|
+
* @param {string} direction
|
|
4016
|
+
* @param {string} cursor
|
|
4017
|
+
* @param {*} [options] Override http request option.
|
|
4018
|
+
* @throws {RequiredError}
|
|
4019
|
+
*/
|
|
4020
|
+
async logsControllerFetchAgentLogs(projectId: string, agentId: string, direction: string, cursor: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
|
|
4021
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.logsControllerFetchAgentLogs(projectId, agentId, direction, cursor, options);
|
|
4022
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
4023
|
+
const localVarOperationServerBasePath = operationServerMap['MachineAgentLogsApi.logsControllerFetchAgentLogs']?.[localVarOperationServerIndex]?.url;
|
|
4024
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4025
|
+
},
|
|
3958
4026
|
/**
|
|
3959
4027
|
*
|
|
3960
4028
|
* @summary Fetch event logs.
|
|
@@ -3979,6 +4047,19 @@ export const MachineAgentLogsApiFp = function(configuration?: Configuration) {
|
|
|
3979
4047
|
export const MachineAgentLogsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
3980
4048
|
const localVarFp = MachineAgentLogsApiFp(configuration)
|
|
3981
4049
|
return {
|
|
4050
|
+
/**
|
|
4051
|
+
*
|
|
4052
|
+
* @summary Fetch agent logs.
|
|
4053
|
+
* @param {string} projectId
|
|
4054
|
+
* @param {string} agentId
|
|
4055
|
+
* @param {string} direction
|
|
4056
|
+
* @param {string} cursor
|
|
4057
|
+
* @param {*} [options] Override http request option.
|
|
4058
|
+
* @throws {RequiredError}
|
|
4059
|
+
*/
|
|
4060
|
+
logsControllerFetchAgentLogs(projectId: string, agentId: string, direction: string, cursor: string, options?: RawAxiosRequestConfig): AxiosPromise<object> {
|
|
4061
|
+
return localVarFp.logsControllerFetchAgentLogs(projectId, agentId, direction, cursor, options).then((request) => request(axios, basePath));
|
|
4062
|
+
},
|
|
3982
4063
|
/**
|
|
3983
4064
|
*
|
|
3984
4065
|
* @summary Fetch event logs.
|
|
@@ -4000,6 +4081,21 @@ export const MachineAgentLogsApiFactory = function (configuration?: Configuratio
|
|
|
4000
4081
|
* @extends {BaseAPI}
|
|
4001
4082
|
*/
|
|
4002
4083
|
export class MachineAgentLogsApi extends BaseAPI {
|
|
4084
|
+
/**
|
|
4085
|
+
*
|
|
4086
|
+
* @summary Fetch agent logs.
|
|
4087
|
+
* @param {string} projectId
|
|
4088
|
+
* @param {string} agentId
|
|
4089
|
+
* @param {string} direction
|
|
4090
|
+
* @param {string} cursor
|
|
4091
|
+
* @param {*} [options] Override http request option.
|
|
4092
|
+
* @throws {RequiredError}
|
|
4093
|
+
* @memberof MachineAgentLogsApi
|
|
4094
|
+
*/
|
|
4095
|
+
public logsControllerFetchAgentLogs(projectId: string, agentId: string, direction: string, cursor: string, options?: RawAxiosRequestConfig) {
|
|
4096
|
+
return MachineAgentLogsApiFp(this.configuration).logsControllerFetchAgentLogs(projectId, agentId, direction, cursor, options).then((request) => request(this.axios, this.basePath));
|
|
4097
|
+
}
|
|
4098
|
+
|
|
4003
4099
|
/**
|
|
4004
4100
|
*
|
|
4005
4101
|
* @summary Fetch event logs.
|
package/common.ts
CHANGED
|
@@ -89,17 +89,17 @@ function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: an
|
|
|
89
89
|
if (typeof parameter === "object") {
|
|
90
90
|
if (Array.isArray(parameter)) {
|
|
91
91
|
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
92
|
-
}
|
|
92
|
+
}
|
|
93
93
|
else {
|
|
94
|
-
Object.keys(parameter).forEach(currentKey =>
|
|
94
|
+
Object.keys(parameter).forEach(currentKey =>
|
|
95
95
|
setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`)
|
|
96
96
|
);
|
|
97
97
|
}
|
|
98
|
-
}
|
|
98
|
+
}
|
|
99
99
|
else {
|
|
100
100
|
if (urlSearchParams.has(key)) {
|
|
101
101
|
urlSearchParams.append(key, parameter);
|
|
102
|
-
}
|
|
102
|
+
}
|
|
103
103
|
else {
|
|
104
104
|
urlSearchParams.set(key, parameter);
|
|
105
105
|
}
|
package/dist/api.d.ts
CHANGED
|
@@ -2660,6 +2660,17 @@ export declare class MachineAgentApi extends BaseAPI {
|
|
|
2660
2660
|
* @export
|
|
2661
2661
|
*/
|
|
2662
2662
|
export declare const MachineAgentLogsApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
2663
|
+
/**
|
|
2664
|
+
*
|
|
2665
|
+
* @summary Fetch agent logs.
|
|
2666
|
+
* @param {string} projectId
|
|
2667
|
+
* @param {string} agentId
|
|
2668
|
+
* @param {string} direction
|
|
2669
|
+
* @param {string} cursor
|
|
2670
|
+
* @param {*} [options] Override http request option.
|
|
2671
|
+
* @throws {RequiredError}
|
|
2672
|
+
*/
|
|
2673
|
+
logsControllerFetchAgentLogs: (projectId: string, agentId: string, direction: string, cursor: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2663
2674
|
/**
|
|
2664
2675
|
*
|
|
2665
2676
|
* @summary Fetch event logs.
|
|
@@ -2675,6 +2686,17 @@ export declare const MachineAgentLogsApiAxiosParamCreator: (configuration?: Conf
|
|
|
2675
2686
|
* @export
|
|
2676
2687
|
*/
|
|
2677
2688
|
export declare const MachineAgentLogsApiFp: (configuration?: Configuration) => {
|
|
2689
|
+
/**
|
|
2690
|
+
*
|
|
2691
|
+
* @summary Fetch agent logs.
|
|
2692
|
+
* @param {string} projectId
|
|
2693
|
+
* @param {string} agentId
|
|
2694
|
+
* @param {string} direction
|
|
2695
|
+
* @param {string} cursor
|
|
2696
|
+
* @param {*} [options] Override http request option.
|
|
2697
|
+
* @throws {RequiredError}
|
|
2698
|
+
*/
|
|
2699
|
+
logsControllerFetchAgentLogs(projectId: string, agentId: string, direction: string, cursor: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
|
|
2678
2700
|
/**
|
|
2679
2701
|
*
|
|
2680
2702
|
* @summary Fetch event logs.
|
|
@@ -2690,6 +2712,17 @@ export declare const MachineAgentLogsApiFp: (configuration?: Configuration) => {
|
|
|
2690
2712
|
* @export
|
|
2691
2713
|
*/
|
|
2692
2714
|
export declare const MachineAgentLogsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
2715
|
+
/**
|
|
2716
|
+
*
|
|
2717
|
+
* @summary Fetch agent logs.
|
|
2718
|
+
* @param {string} projectId
|
|
2719
|
+
* @param {string} agentId
|
|
2720
|
+
* @param {string} direction
|
|
2721
|
+
* @param {string} cursor
|
|
2722
|
+
* @param {*} [options] Override http request option.
|
|
2723
|
+
* @throws {RequiredError}
|
|
2724
|
+
*/
|
|
2725
|
+
logsControllerFetchAgentLogs(projectId: string, agentId: string, direction: string, cursor: string, options?: RawAxiosRequestConfig): AxiosPromise<object>;
|
|
2693
2726
|
/**
|
|
2694
2727
|
*
|
|
2695
2728
|
* @summary Fetch event logs.
|
|
@@ -2707,6 +2740,18 @@ export declare const MachineAgentLogsApiFactory: (configuration?: Configuration,
|
|
|
2707
2740
|
* @extends {BaseAPI}
|
|
2708
2741
|
*/
|
|
2709
2742
|
export declare class MachineAgentLogsApi extends BaseAPI {
|
|
2743
|
+
/**
|
|
2744
|
+
*
|
|
2745
|
+
* @summary Fetch agent logs.
|
|
2746
|
+
* @param {string} projectId
|
|
2747
|
+
* @param {string} agentId
|
|
2748
|
+
* @param {string} direction
|
|
2749
|
+
* @param {string} cursor
|
|
2750
|
+
* @param {*} [options] Override http request option.
|
|
2751
|
+
* @throws {RequiredError}
|
|
2752
|
+
* @memberof MachineAgentLogsApi
|
|
2753
|
+
*/
|
|
2754
|
+
logsControllerFetchAgentLogs(projectId: string, agentId: string, direction: string, cursor: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any>>;
|
|
2710
2755
|
/**
|
|
2711
2756
|
*
|
|
2712
2757
|
* @summary Fetch event logs.
|
package/dist/api.js
CHANGED
|
@@ -2367,6 +2367,51 @@ exports.MachineAgentApi = MachineAgentApi;
|
|
|
2367
2367
|
*/
|
|
2368
2368
|
const MachineAgentLogsApiAxiosParamCreator = function (configuration) {
|
|
2369
2369
|
return {
|
|
2370
|
+
/**
|
|
2371
|
+
*
|
|
2372
|
+
* @summary Fetch agent logs.
|
|
2373
|
+
* @param {string} projectId
|
|
2374
|
+
* @param {string} agentId
|
|
2375
|
+
* @param {string} direction
|
|
2376
|
+
* @param {string} cursor
|
|
2377
|
+
* @param {*} [options] Override http request option.
|
|
2378
|
+
* @throws {RequiredError}
|
|
2379
|
+
*/
|
|
2380
|
+
logsControllerFetchAgentLogs: (projectId_1, agentId_1, direction_1, cursor_1, ...args_1) => __awaiter(this, [projectId_1, agentId_1, direction_1, cursor_1, ...args_1], void 0, function* (projectId, agentId, direction, cursor, options = {}) {
|
|
2381
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
2382
|
+
(0, common_1.assertParamExists)('logsControllerFetchAgentLogs', 'projectId', projectId);
|
|
2383
|
+
// verify required parameter 'agentId' is not null or undefined
|
|
2384
|
+
(0, common_1.assertParamExists)('logsControllerFetchAgentLogs', 'agentId', agentId);
|
|
2385
|
+
// verify required parameter 'direction' is not null or undefined
|
|
2386
|
+
(0, common_1.assertParamExists)('logsControllerFetchAgentLogs', 'direction', direction);
|
|
2387
|
+
// verify required parameter 'cursor' is not null or undefined
|
|
2388
|
+
(0, common_1.assertParamExists)('logsControllerFetchAgentLogs', 'cursor', cursor);
|
|
2389
|
+
const localVarPath = `/projects/{projectId}/logs/{agentId}`
|
|
2390
|
+
.replace(`{${"projectId"}}`, encodeURIComponent(String(projectId)))
|
|
2391
|
+
.replace(`{${"agentId"}}`, encodeURIComponent(String(agentId)));
|
|
2392
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2393
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2394
|
+
let baseOptions;
|
|
2395
|
+
if (configuration) {
|
|
2396
|
+
baseOptions = configuration.baseOptions;
|
|
2397
|
+
}
|
|
2398
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2399
|
+
const localVarHeaderParameter = {};
|
|
2400
|
+
const localVarQueryParameter = {};
|
|
2401
|
+
if (direction !== undefined) {
|
|
2402
|
+
localVarQueryParameter['direction'] = direction;
|
|
2403
|
+
}
|
|
2404
|
+
if (cursor !== undefined) {
|
|
2405
|
+
localVarQueryParameter['cursor'] = cursor;
|
|
2406
|
+
}
|
|
2407
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2408
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2409
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2410
|
+
return {
|
|
2411
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2412
|
+
options: localVarRequestOptions,
|
|
2413
|
+
};
|
|
2414
|
+
}),
|
|
2370
2415
|
/**
|
|
2371
2416
|
*
|
|
2372
2417
|
* @summary Fetch event logs.
|
|
@@ -2410,6 +2455,25 @@ exports.MachineAgentLogsApiAxiosParamCreator = MachineAgentLogsApiAxiosParamCrea
|
|
|
2410
2455
|
const MachineAgentLogsApiFp = function (configuration) {
|
|
2411
2456
|
const localVarAxiosParamCreator = (0, exports.MachineAgentLogsApiAxiosParamCreator)(configuration);
|
|
2412
2457
|
return {
|
|
2458
|
+
/**
|
|
2459
|
+
*
|
|
2460
|
+
* @summary Fetch agent logs.
|
|
2461
|
+
* @param {string} projectId
|
|
2462
|
+
* @param {string} agentId
|
|
2463
|
+
* @param {string} direction
|
|
2464
|
+
* @param {string} cursor
|
|
2465
|
+
* @param {*} [options] Override http request option.
|
|
2466
|
+
* @throws {RequiredError}
|
|
2467
|
+
*/
|
|
2468
|
+
logsControllerFetchAgentLogs(projectId, agentId, direction, cursor, options) {
|
|
2469
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2470
|
+
var _a, _b, _c;
|
|
2471
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.logsControllerFetchAgentLogs(projectId, agentId, direction, cursor, options);
|
|
2472
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2473
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['MachineAgentLogsApi.logsControllerFetchAgentLogs']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2474
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2475
|
+
});
|
|
2476
|
+
},
|
|
2413
2477
|
/**
|
|
2414
2478
|
*
|
|
2415
2479
|
* @summary Fetch event logs.
|
|
@@ -2437,6 +2501,19 @@ exports.MachineAgentLogsApiFp = MachineAgentLogsApiFp;
|
|
|
2437
2501
|
const MachineAgentLogsApiFactory = function (configuration, basePath, axios) {
|
|
2438
2502
|
const localVarFp = (0, exports.MachineAgentLogsApiFp)(configuration);
|
|
2439
2503
|
return {
|
|
2504
|
+
/**
|
|
2505
|
+
*
|
|
2506
|
+
* @summary Fetch agent logs.
|
|
2507
|
+
* @param {string} projectId
|
|
2508
|
+
* @param {string} agentId
|
|
2509
|
+
* @param {string} direction
|
|
2510
|
+
* @param {string} cursor
|
|
2511
|
+
* @param {*} [options] Override http request option.
|
|
2512
|
+
* @throws {RequiredError}
|
|
2513
|
+
*/
|
|
2514
|
+
logsControllerFetchAgentLogs(projectId, agentId, direction, cursor, options) {
|
|
2515
|
+
return localVarFp.logsControllerFetchAgentLogs(projectId, agentId, direction, cursor, options).then((request) => request(axios, basePath));
|
|
2516
|
+
},
|
|
2440
2517
|
/**
|
|
2441
2518
|
*
|
|
2442
2519
|
* @summary Fetch event logs.
|
|
@@ -2458,6 +2535,20 @@ exports.MachineAgentLogsApiFactory = MachineAgentLogsApiFactory;
|
|
|
2458
2535
|
* @extends {BaseAPI}
|
|
2459
2536
|
*/
|
|
2460
2537
|
class MachineAgentLogsApi extends base_1.BaseAPI {
|
|
2538
|
+
/**
|
|
2539
|
+
*
|
|
2540
|
+
* @summary Fetch agent logs.
|
|
2541
|
+
* @param {string} projectId
|
|
2542
|
+
* @param {string} agentId
|
|
2543
|
+
* @param {string} direction
|
|
2544
|
+
* @param {string} cursor
|
|
2545
|
+
* @param {*} [options] Override http request option.
|
|
2546
|
+
* @throws {RequiredError}
|
|
2547
|
+
* @memberof MachineAgentLogsApi
|
|
2548
|
+
*/
|
|
2549
|
+
logsControllerFetchAgentLogs(projectId, agentId, direction, cursor, options) {
|
|
2550
|
+
return (0, exports.MachineAgentLogsApiFp)(this.configuration).logsControllerFetchAgentLogs(projectId, agentId, direction, cursor, options).then((request) => request(this.axios, this.basePath));
|
|
2551
|
+
}
|
|
2461
2552
|
/**
|
|
2462
2553
|
*
|
|
2463
2554
|
* @summary Fetch event logs.
|
package/dist/esm/api.d.ts
CHANGED
|
@@ -2660,6 +2660,17 @@ export declare class MachineAgentApi extends BaseAPI {
|
|
|
2660
2660
|
* @export
|
|
2661
2661
|
*/
|
|
2662
2662
|
export declare const MachineAgentLogsApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
2663
|
+
/**
|
|
2664
|
+
*
|
|
2665
|
+
* @summary Fetch agent logs.
|
|
2666
|
+
* @param {string} projectId
|
|
2667
|
+
* @param {string} agentId
|
|
2668
|
+
* @param {string} direction
|
|
2669
|
+
* @param {string} cursor
|
|
2670
|
+
* @param {*} [options] Override http request option.
|
|
2671
|
+
* @throws {RequiredError}
|
|
2672
|
+
*/
|
|
2673
|
+
logsControllerFetchAgentLogs: (projectId: string, agentId: string, direction: string, cursor: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2663
2674
|
/**
|
|
2664
2675
|
*
|
|
2665
2676
|
* @summary Fetch event logs.
|
|
@@ -2675,6 +2686,17 @@ export declare const MachineAgentLogsApiAxiosParamCreator: (configuration?: Conf
|
|
|
2675
2686
|
* @export
|
|
2676
2687
|
*/
|
|
2677
2688
|
export declare const MachineAgentLogsApiFp: (configuration?: Configuration) => {
|
|
2689
|
+
/**
|
|
2690
|
+
*
|
|
2691
|
+
* @summary Fetch agent logs.
|
|
2692
|
+
* @param {string} projectId
|
|
2693
|
+
* @param {string} agentId
|
|
2694
|
+
* @param {string} direction
|
|
2695
|
+
* @param {string} cursor
|
|
2696
|
+
* @param {*} [options] Override http request option.
|
|
2697
|
+
* @throws {RequiredError}
|
|
2698
|
+
*/
|
|
2699
|
+
logsControllerFetchAgentLogs(projectId: string, agentId: string, direction: string, cursor: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
|
|
2678
2700
|
/**
|
|
2679
2701
|
*
|
|
2680
2702
|
* @summary Fetch event logs.
|
|
@@ -2690,6 +2712,17 @@ export declare const MachineAgentLogsApiFp: (configuration?: Configuration) => {
|
|
|
2690
2712
|
* @export
|
|
2691
2713
|
*/
|
|
2692
2714
|
export declare const MachineAgentLogsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
2715
|
+
/**
|
|
2716
|
+
*
|
|
2717
|
+
* @summary Fetch agent logs.
|
|
2718
|
+
* @param {string} projectId
|
|
2719
|
+
* @param {string} agentId
|
|
2720
|
+
* @param {string} direction
|
|
2721
|
+
* @param {string} cursor
|
|
2722
|
+
* @param {*} [options] Override http request option.
|
|
2723
|
+
* @throws {RequiredError}
|
|
2724
|
+
*/
|
|
2725
|
+
logsControllerFetchAgentLogs(projectId: string, agentId: string, direction: string, cursor: string, options?: RawAxiosRequestConfig): AxiosPromise<object>;
|
|
2693
2726
|
/**
|
|
2694
2727
|
*
|
|
2695
2728
|
* @summary Fetch event logs.
|
|
@@ -2707,6 +2740,18 @@ export declare const MachineAgentLogsApiFactory: (configuration?: Configuration,
|
|
|
2707
2740
|
* @extends {BaseAPI}
|
|
2708
2741
|
*/
|
|
2709
2742
|
export declare class MachineAgentLogsApi extends BaseAPI {
|
|
2743
|
+
/**
|
|
2744
|
+
*
|
|
2745
|
+
* @summary Fetch agent logs.
|
|
2746
|
+
* @param {string} projectId
|
|
2747
|
+
* @param {string} agentId
|
|
2748
|
+
* @param {string} direction
|
|
2749
|
+
* @param {string} cursor
|
|
2750
|
+
* @param {*} [options] Override http request option.
|
|
2751
|
+
* @throws {RequiredError}
|
|
2752
|
+
* @memberof MachineAgentLogsApi
|
|
2753
|
+
*/
|
|
2754
|
+
logsControllerFetchAgentLogs(projectId: string, agentId: string, direction: string, cursor: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any>>;
|
|
2710
2755
|
/**
|
|
2711
2756
|
*
|
|
2712
2757
|
* @summary Fetch event logs.
|
package/dist/esm/api.js
CHANGED
|
@@ -2347,6 +2347,51 @@ export class MachineAgentApi extends BaseAPI {
|
|
|
2347
2347
|
*/
|
|
2348
2348
|
export const MachineAgentLogsApiAxiosParamCreator = function (configuration) {
|
|
2349
2349
|
return {
|
|
2350
|
+
/**
|
|
2351
|
+
*
|
|
2352
|
+
* @summary Fetch agent logs.
|
|
2353
|
+
* @param {string} projectId
|
|
2354
|
+
* @param {string} agentId
|
|
2355
|
+
* @param {string} direction
|
|
2356
|
+
* @param {string} cursor
|
|
2357
|
+
* @param {*} [options] Override http request option.
|
|
2358
|
+
* @throws {RequiredError}
|
|
2359
|
+
*/
|
|
2360
|
+
logsControllerFetchAgentLogs: (projectId_1, agentId_1, direction_1, cursor_1, ...args_1) => __awaiter(this, [projectId_1, agentId_1, direction_1, cursor_1, ...args_1], void 0, function* (projectId, agentId, direction, cursor, options = {}) {
|
|
2361
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
2362
|
+
assertParamExists('logsControllerFetchAgentLogs', 'projectId', projectId);
|
|
2363
|
+
// verify required parameter 'agentId' is not null or undefined
|
|
2364
|
+
assertParamExists('logsControllerFetchAgentLogs', 'agentId', agentId);
|
|
2365
|
+
// verify required parameter 'direction' is not null or undefined
|
|
2366
|
+
assertParamExists('logsControllerFetchAgentLogs', 'direction', direction);
|
|
2367
|
+
// verify required parameter 'cursor' is not null or undefined
|
|
2368
|
+
assertParamExists('logsControllerFetchAgentLogs', 'cursor', cursor);
|
|
2369
|
+
const localVarPath = `/projects/{projectId}/logs/{agentId}`
|
|
2370
|
+
.replace(`{${"projectId"}}`, encodeURIComponent(String(projectId)))
|
|
2371
|
+
.replace(`{${"agentId"}}`, encodeURIComponent(String(agentId)));
|
|
2372
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2373
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2374
|
+
let baseOptions;
|
|
2375
|
+
if (configuration) {
|
|
2376
|
+
baseOptions = configuration.baseOptions;
|
|
2377
|
+
}
|
|
2378
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2379
|
+
const localVarHeaderParameter = {};
|
|
2380
|
+
const localVarQueryParameter = {};
|
|
2381
|
+
if (direction !== undefined) {
|
|
2382
|
+
localVarQueryParameter['direction'] = direction;
|
|
2383
|
+
}
|
|
2384
|
+
if (cursor !== undefined) {
|
|
2385
|
+
localVarQueryParameter['cursor'] = cursor;
|
|
2386
|
+
}
|
|
2387
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2388
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2389
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2390
|
+
return {
|
|
2391
|
+
url: toPathString(localVarUrlObj),
|
|
2392
|
+
options: localVarRequestOptions,
|
|
2393
|
+
};
|
|
2394
|
+
}),
|
|
2350
2395
|
/**
|
|
2351
2396
|
*
|
|
2352
2397
|
* @summary Fetch event logs.
|
|
@@ -2389,6 +2434,25 @@ export const MachineAgentLogsApiAxiosParamCreator = function (configuration) {
|
|
|
2389
2434
|
export const MachineAgentLogsApiFp = function (configuration) {
|
|
2390
2435
|
const localVarAxiosParamCreator = MachineAgentLogsApiAxiosParamCreator(configuration);
|
|
2391
2436
|
return {
|
|
2437
|
+
/**
|
|
2438
|
+
*
|
|
2439
|
+
* @summary Fetch agent logs.
|
|
2440
|
+
* @param {string} projectId
|
|
2441
|
+
* @param {string} agentId
|
|
2442
|
+
* @param {string} direction
|
|
2443
|
+
* @param {string} cursor
|
|
2444
|
+
* @param {*} [options] Override http request option.
|
|
2445
|
+
* @throws {RequiredError}
|
|
2446
|
+
*/
|
|
2447
|
+
logsControllerFetchAgentLogs(projectId, agentId, direction, cursor, options) {
|
|
2448
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2449
|
+
var _a, _b, _c;
|
|
2450
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.logsControllerFetchAgentLogs(projectId, agentId, direction, cursor, options);
|
|
2451
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2452
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['MachineAgentLogsApi.logsControllerFetchAgentLogs']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2453
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2454
|
+
});
|
|
2455
|
+
},
|
|
2392
2456
|
/**
|
|
2393
2457
|
*
|
|
2394
2458
|
* @summary Fetch event logs.
|
|
@@ -2415,6 +2479,19 @@ export const MachineAgentLogsApiFp = function (configuration) {
|
|
|
2415
2479
|
export const MachineAgentLogsApiFactory = function (configuration, basePath, axios) {
|
|
2416
2480
|
const localVarFp = MachineAgentLogsApiFp(configuration);
|
|
2417
2481
|
return {
|
|
2482
|
+
/**
|
|
2483
|
+
*
|
|
2484
|
+
* @summary Fetch agent logs.
|
|
2485
|
+
* @param {string} projectId
|
|
2486
|
+
* @param {string} agentId
|
|
2487
|
+
* @param {string} direction
|
|
2488
|
+
* @param {string} cursor
|
|
2489
|
+
* @param {*} [options] Override http request option.
|
|
2490
|
+
* @throws {RequiredError}
|
|
2491
|
+
*/
|
|
2492
|
+
logsControllerFetchAgentLogs(projectId, agentId, direction, cursor, options) {
|
|
2493
|
+
return localVarFp.logsControllerFetchAgentLogs(projectId, agentId, direction, cursor, options).then((request) => request(axios, basePath));
|
|
2494
|
+
},
|
|
2418
2495
|
/**
|
|
2419
2496
|
*
|
|
2420
2497
|
* @summary Fetch event logs.
|
|
@@ -2435,6 +2512,20 @@ export const MachineAgentLogsApiFactory = function (configuration, basePath, axi
|
|
|
2435
2512
|
* @extends {BaseAPI}
|
|
2436
2513
|
*/
|
|
2437
2514
|
export class MachineAgentLogsApi extends BaseAPI {
|
|
2515
|
+
/**
|
|
2516
|
+
*
|
|
2517
|
+
* @summary Fetch agent logs.
|
|
2518
|
+
* @param {string} projectId
|
|
2519
|
+
* @param {string} agentId
|
|
2520
|
+
* @param {string} direction
|
|
2521
|
+
* @param {string} cursor
|
|
2522
|
+
* @param {*} [options] Override http request option.
|
|
2523
|
+
* @throws {RequiredError}
|
|
2524
|
+
* @memberof MachineAgentLogsApi
|
|
2525
|
+
*/
|
|
2526
|
+
logsControllerFetchAgentLogs(projectId, agentId, direction, cursor, options) {
|
|
2527
|
+
return MachineAgentLogsApiFp(this.configuration).logsControllerFetchAgentLogs(projectId, agentId, direction, cursor, options).then((request) => request(this.axios, this.basePath));
|
|
2528
|
+
}
|
|
2438
2529
|
/**
|
|
2439
2530
|
*
|
|
2440
2531
|
* @summary Fetch event logs.
|
|
@@ -4,8 +4,73 @@ All URIs are relative to *http://localhost*
|
|
|
4
4
|
|
|
5
5
|
|Method | HTTP request | Description|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
+
|[**logsControllerFetchAgentLogs**](#logscontrollerfetchagentlogs) | **GET** /projects/{projectId}/logs/{agentId} | Fetch agent logs.|
|
|
7
8
|
|[**logsControllerFetchEventLogs**](#logscontrollerfetcheventlogs) | **GET** /projects/{projectId}/fetchEventLogs/{agentId} | Fetch event logs.|
|
|
8
9
|
|
|
10
|
+
# **logsControllerFetchAgentLogs**
|
|
11
|
+
> object logsControllerFetchAgentLogs()
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import {
|
|
18
|
+
MachineAgentLogsApi,
|
|
19
|
+
Configuration
|
|
20
|
+
} from '@nestbox-ai/admin';
|
|
21
|
+
|
|
22
|
+
const configuration = new Configuration();
|
|
23
|
+
const apiInstance = new MachineAgentLogsApi(configuration);
|
|
24
|
+
|
|
25
|
+
let projectId: string; // (default to undefined)
|
|
26
|
+
let agentId: string; // (default to undefined)
|
|
27
|
+
let direction: string; // (default to undefined)
|
|
28
|
+
let cursor: string; // (default to undefined)
|
|
29
|
+
|
|
30
|
+
const { status, data } = await apiInstance.logsControllerFetchAgentLogs(
|
|
31
|
+
projectId,
|
|
32
|
+
agentId,
|
|
33
|
+
direction,
|
|
34
|
+
cursor
|
|
35
|
+
);
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Parameters
|
|
39
|
+
|
|
40
|
+
|Name | Type | Description | Notes|
|
|
41
|
+
|------------- | ------------- | ------------- | -------------|
|
|
42
|
+
| **projectId** | [**string**] | | defaults to undefined|
|
|
43
|
+
| **agentId** | [**string**] | | defaults to undefined|
|
|
44
|
+
| **direction** | [**string**] | | defaults to undefined|
|
|
45
|
+
| **cursor** | [**string**] | | defaults to undefined|
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Return type
|
|
49
|
+
|
|
50
|
+
**object**
|
|
51
|
+
|
|
52
|
+
### Authorization
|
|
53
|
+
|
|
54
|
+
No authorization required
|
|
55
|
+
|
|
56
|
+
### HTTP request headers
|
|
57
|
+
|
|
58
|
+
- **Content-Type**: Not defined
|
|
59
|
+
- **Accept**: application/json
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
### HTTP response details
|
|
63
|
+
| Status code | Description | Response headers |
|
|
64
|
+
|-------------|-------------|------------------|
|
|
65
|
+
|**200** | | - |
|
|
66
|
+
|**400** | | - |
|
|
67
|
+
|**401** | | - |
|
|
68
|
+
|**403** | | - |
|
|
69
|
+
|**404** | | - |
|
|
70
|
+
|**500** | | - |
|
|
71
|
+
|
|
72
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
73
|
+
|
|
9
74
|
# **logsControllerFetchEventLogs**
|
|
10
75
|
> object logsControllerFetchEventLogs()
|
|
11
76
|
|