ob-bms-sdk 0.0.69 → 0.0.71
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/api/api.ts +229 -232
- package/dist/api/api.d.ts +172 -232
- package/dist/api/api.js +108 -8
- package/package.json +1 -1
- package/test.ts +19 -0
package/dist/api/api.js
CHANGED
|
@@ -25,13 +25,39 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
25
25
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.ParkingTicketsIndexTypeEnum = exports.DefaultApi = exports.DefaultApiFactory = exports.DefaultApiFp = exports.DefaultApiAxiosParamCreator = exports.WrappedResponsePassConsentResponseDataStatusEnum = exports.WrappedResponseNullDataEnum = exports.ShowPassResponseStatusEnum = exports.ServiceRequestStatusInProgress = exports.ServiceRequestStatusDone = exports.ServiceRequestStatus = exports.SensorType = exports.PassDataStatusEnum = exports.PassConsentResponseStatusEnum = exports.ParkingTicketsIndexQueryTypeEnum = void 0;
|
|
28
|
+
exports.ParkingTicketsIndexTypeEnum = exports.DefaultApi = exports.DefaultApiFactory = exports.DefaultApiFp = exports.DefaultApiAxiosParamCreator = exports.WrappedResponsePassConsentResponseDataStatusEnum = exports.WrappedResponseNullDataEnum = exports.ShowPassResponseStatusEnum = exports.ServiceRequestStatusInProgress = exports.ServiceRequestStatusDone = exports.ServiceRequestStatus = exports.SensorType = exports.PassDataStatusEnum = exports.PassConsentResponseStatusEnum = exports.ParkingTicketsIndexQueryTypeEnum = exports.ACRequestStatusRejected = exports.ACRequestStatusApproved = exports.ACRequestStatus = void 0;
|
|
29
29
|
const axios_1 = __importDefault(require("axios"));
|
|
30
30
|
// Some imports not used depending on template conditions
|
|
31
31
|
// @ts-ignore
|
|
32
32
|
const common_1 = require("./common");
|
|
33
33
|
// @ts-ignore
|
|
34
34
|
const base_1 = require("./base");
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @export
|
|
38
|
+
* @enum {string}
|
|
39
|
+
*/
|
|
40
|
+
exports.ACRequestStatus = {
|
|
41
|
+
Submitted: 'submitted',
|
|
42
|
+
Rejected: 'rejected',
|
|
43
|
+
Approved: 'approved'
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @export
|
|
48
|
+
* @enum {string}
|
|
49
|
+
*/
|
|
50
|
+
exports.ACRequestStatusApproved = {
|
|
51
|
+
Approved: 'approved'
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @export
|
|
56
|
+
* @enum {string}
|
|
57
|
+
*/
|
|
58
|
+
exports.ACRequestStatusRejected = {
|
|
59
|
+
Rejected: 'rejected'
|
|
60
|
+
};
|
|
35
61
|
exports.ParkingTicketsIndexQueryTypeEnum = {
|
|
36
62
|
LogId: 'log_id',
|
|
37
63
|
InviteId: 'invite_id',
|
|
@@ -136,10 +162,11 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
136
162
|
* @param {string} [orderDirection]
|
|
137
163
|
* @param {number} [pageNumber]
|
|
138
164
|
* @param {number} [pageSize]
|
|
165
|
+
* @param {ACRequestStatus} [status]
|
|
139
166
|
* @param {*} [options] Override http request option.
|
|
140
167
|
* @throws {RequiredError}
|
|
141
168
|
*/
|
|
142
|
-
acRequestIndex: (requesterId, orderBy, orderDirection, pageNumber, pageSize, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
169
|
+
acRequestIndex: (requesterId, orderBy, orderDirection, pageNumber, pageSize, status, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
143
170
|
const localVarPath = `/ac_request`;
|
|
144
171
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
145
172
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -165,6 +192,9 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
165
192
|
if (pageSize !== undefined) {
|
|
166
193
|
localVarQueryParameter['page_size'] = pageSize;
|
|
167
194
|
}
|
|
195
|
+
if (status !== undefined) {
|
|
196
|
+
localVarQueryParameter['status'] = status;
|
|
197
|
+
}
|
|
168
198
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
169
199
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
170
200
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -201,6 +231,39 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
201
231
|
options: localVarRequestOptions,
|
|
202
232
|
};
|
|
203
233
|
}),
|
|
234
|
+
/**
|
|
235
|
+
*
|
|
236
|
+
* @param {string} id
|
|
237
|
+
* @param {ACRequestUpdateBody} aCRequestUpdateBody
|
|
238
|
+
* @param {*} [options] Override http request option.
|
|
239
|
+
* @throws {RequiredError}
|
|
240
|
+
*/
|
|
241
|
+
acRequestUpdate: (id, aCRequestUpdateBody, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
242
|
+
// verify required parameter 'id' is not null or undefined
|
|
243
|
+
(0, common_1.assertParamExists)('acRequestUpdate', 'id', id);
|
|
244
|
+
// verify required parameter 'aCRequestUpdateBody' is not null or undefined
|
|
245
|
+
(0, common_1.assertParamExists)('acRequestUpdate', 'aCRequestUpdateBody', aCRequestUpdateBody);
|
|
246
|
+
const localVarPath = `/ac_request/{id}`
|
|
247
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
248
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
249
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
250
|
+
let baseOptions;
|
|
251
|
+
if (configuration) {
|
|
252
|
+
baseOptions = configuration.baseOptions;
|
|
253
|
+
}
|
|
254
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
255
|
+
const localVarHeaderParameter = {};
|
|
256
|
+
const localVarQueryParameter = {};
|
|
257
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
258
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
259
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
260
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
261
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(aCRequestUpdateBody, localVarRequestOptions, configuration);
|
|
262
|
+
return {
|
|
263
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
264
|
+
options: localVarRequestOptions,
|
|
265
|
+
};
|
|
266
|
+
}),
|
|
204
267
|
/**
|
|
205
268
|
*
|
|
206
269
|
* @param {string} floorId
|
|
@@ -1107,12 +1170,13 @@ const DefaultApiFp = function (configuration) {
|
|
|
1107
1170
|
* @param {string} [orderDirection]
|
|
1108
1171
|
* @param {number} [pageNumber]
|
|
1109
1172
|
* @param {number} [pageSize]
|
|
1173
|
+
* @param {ACRequestStatus} [status]
|
|
1110
1174
|
* @param {*} [options] Override http request option.
|
|
1111
1175
|
* @throws {RequiredError}
|
|
1112
1176
|
*/
|
|
1113
|
-
acRequestIndex(requesterId, orderBy, orderDirection, pageNumber, pageSize, options) {
|
|
1177
|
+
acRequestIndex(requesterId, orderBy, orderDirection, pageNumber, pageSize, status, options) {
|
|
1114
1178
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1115
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.acRequestIndex(requesterId, orderBy, orderDirection, pageNumber, pageSize, options);
|
|
1179
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.acRequestIndex(requesterId, orderBy, orderDirection, pageNumber, pageSize, status, options);
|
|
1116
1180
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
1117
1181
|
});
|
|
1118
1182
|
},
|
|
@@ -1128,6 +1192,19 @@ const DefaultApiFp = function (configuration) {
|
|
|
1128
1192
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
1129
1193
|
});
|
|
1130
1194
|
},
|
|
1195
|
+
/**
|
|
1196
|
+
*
|
|
1197
|
+
* @param {string} id
|
|
1198
|
+
* @param {ACRequestUpdateBody} aCRequestUpdateBody
|
|
1199
|
+
* @param {*} [options] Override http request option.
|
|
1200
|
+
* @throws {RequiredError}
|
|
1201
|
+
*/
|
|
1202
|
+
acRequestUpdate(id, aCRequestUpdateBody, options) {
|
|
1203
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1204
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.acRequestUpdate(id, aCRequestUpdateBody, options);
|
|
1205
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
1206
|
+
});
|
|
1207
|
+
},
|
|
1131
1208
|
/**
|
|
1132
1209
|
*
|
|
1133
1210
|
* @param {string} floorId
|
|
@@ -1508,11 +1585,12 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
|
|
|
1508
1585
|
* @param {string} [orderDirection]
|
|
1509
1586
|
* @param {number} [pageNumber]
|
|
1510
1587
|
* @param {number} [pageSize]
|
|
1588
|
+
* @param {ACRequestStatus} [status]
|
|
1511
1589
|
* @param {*} [options] Override http request option.
|
|
1512
1590
|
* @throws {RequiredError}
|
|
1513
1591
|
*/
|
|
1514
|
-
acRequestIndex(requesterId, orderBy, orderDirection, pageNumber, pageSize, options) {
|
|
1515
|
-
return localVarFp.acRequestIndex(requesterId, orderBy, orderDirection, pageNumber, pageSize, options).then((request) => request(axios, basePath));
|
|
1592
|
+
acRequestIndex(requesterId, orderBy, orderDirection, pageNumber, pageSize, status, options) {
|
|
1593
|
+
return localVarFp.acRequestIndex(requesterId, orderBy, orderDirection, pageNumber, pageSize, status, options).then((request) => request(axios, basePath));
|
|
1516
1594
|
},
|
|
1517
1595
|
/**
|
|
1518
1596
|
*
|
|
@@ -1523,6 +1601,16 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
|
|
|
1523
1601
|
acRequestShow(id, options) {
|
|
1524
1602
|
return localVarFp.acRequestShow(id, options).then((request) => request(axios, basePath));
|
|
1525
1603
|
},
|
|
1604
|
+
/**
|
|
1605
|
+
*
|
|
1606
|
+
* @param {string} id
|
|
1607
|
+
* @param {ACRequestUpdateBody} aCRequestUpdateBody
|
|
1608
|
+
* @param {*} [options] Override http request option.
|
|
1609
|
+
* @throws {RequiredError}
|
|
1610
|
+
*/
|
|
1611
|
+
acRequestUpdate(id, aCRequestUpdateBody, options) {
|
|
1612
|
+
return localVarFp.acRequestUpdate(id, aCRequestUpdateBody, options).then((request) => request(axios, basePath));
|
|
1613
|
+
},
|
|
1526
1614
|
/**
|
|
1527
1615
|
*
|
|
1528
1616
|
* @param {string} floorId
|
|
@@ -1820,12 +1908,13 @@ class DefaultApi extends base_1.BaseAPI {
|
|
|
1820
1908
|
* @param {string} [orderDirection]
|
|
1821
1909
|
* @param {number} [pageNumber]
|
|
1822
1910
|
* @param {number} [pageSize]
|
|
1911
|
+
* @param {ACRequestStatus} [status]
|
|
1823
1912
|
* @param {*} [options] Override http request option.
|
|
1824
1913
|
* @throws {RequiredError}
|
|
1825
1914
|
* @memberof DefaultApi
|
|
1826
1915
|
*/
|
|
1827
|
-
acRequestIndex(requesterId, orderBy, orderDirection, pageNumber, pageSize, options) {
|
|
1828
|
-
return (0, exports.DefaultApiFp)(this.configuration).acRequestIndex(requesterId, orderBy, orderDirection, pageNumber, pageSize, options).then((request) => request(this.axios, this.basePath));
|
|
1916
|
+
acRequestIndex(requesterId, orderBy, orderDirection, pageNumber, pageSize, status, options) {
|
|
1917
|
+
return (0, exports.DefaultApiFp)(this.configuration).acRequestIndex(requesterId, orderBy, orderDirection, pageNumber, pageSize, status, options).then((request) => request(this.axios, this.basePath));
|
|
1829
1918
|
}
|
|
1830
1919
|
/**
|
|
1831
1920
|
*
|
|
@@ -1837,6 +1926,17 @@ class DefaultApi extends base_1.BaseAPI {
|
|
|
1837
1926
|
acRequestShow(id, options) {
|
|
1838
1927
|
return (0, exports.DefaultApiFp)(this.configuration).acRequestShow(id, options).then((request) => request(this.axios, this.basePath));
|
|
1839
1928
|
}
|
|
1929
|
+
/**
|
|
1930
|
+
*
|
|
1931
|
+
* @param {string} id
|
|
1932
|
+
* @param {ACRequestUpdateBody} aCRequestUpdateBody
|
|
1933
|
+
* @param {*} [options] Override http request option.
|
|
1934
|
+
* @throws {RequiredError}
|
|
1935
|
+
* @memberof DefaultApi
|
|
1936
|
+
*/
|
|
1937
|
+
acRequestUpdate(id, aCRequestUpdateBody, options) {
|
|
1938
|
+
return (0, exports.DefaultApiFp)(this.configuration).acRequestUpdate(id, aCRequestUpdateBody, options).then((request) => request(this.axios, this.basePath));
|
|
1939
|
+
}
|
|
1840
1940
|
/**
|
|
1841
1941
|
*
|
|
1842
1942
|
* @param {string} floorId
|
package/package.json
CHANGED
package/test.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as OB_BMS_SDK from './dist';
|
|
2
|
+
|
|
3
|
+
// OB_BMS_SDK.setAcessToken('789');
|
|
4
|
+
OB_BMS_SDK.setBaseUrl('https://ob-bms.glorymtel.xyz');
|
|
5
|
+
OB_BMS_SDK.setAcessToken(
|
|
6
|
+
'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI4MjQyNzA1Zi0zNWI1LTRkNzEtOGUxOS1jNWE0MWFjMmUwYTQiLCJpYXQiOjE2OTg5MzU2ODcsImV4cCI6MTcwMTUyNzY4NywicGVybWlzc2lvbiI6W3siaWQiOiJmY2Q1NDZmYy1lNThmLTQ2MjctOTU5Yy1jNWFlYTljMGQ0ODMiLCJwZXJtaXR0ZW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0aW9ucyI6WyJjcmVhdGUiLCJyZWFkIl0sInJlc291cmNlX3R5cGUiOiJ0b2tlbiIsInJlc291cmNlIjp7ImFjY291bnRfaWQiOiJzZWxmIn19LCJjcmVhdGVkX2F0IjoiMjAyMy0xMS0wMlQwODo1MTo0Mi43NzFaIiwidXBkYXRlZF9hdCI6IjIwMjMtMTEtMDJUMDg6NTE6NDIuNzcxWiIsImRlbGV0ZWRfYXQiOm51bGwsImFjY291bnRfaWQiOiI4MjQyNzA1Zi0zNWI1LTRkNzEtOGUxOS1jNWE0MWFjMmUwYTQiLCJhY2NvdW50X2dyb3VwX2lkIjpudWxsfV19.tfqYJop4iJNlIbBVztf7DFfVhaYAFnUGDhLjik2OGA4',
|
|
7
|
+
);
|
|
8
|
+
(async () => {
|
|
9
|
+
try {
|
|
10
|
+
// const res = await OB_BMS_SDK.client.sensorsIndex(
|
|
11
|
+
// 'f1140a6a-2923-4527-a126-27c8323bf5ee',
|
|
12
|
+
// '72b292b5-e926-48d3-8b43-75f19eed6003',
|
|
13
|
+
// );
|
|
14
|
+
const res = await OB_BMS_SDK.client.serviceRequestsIndex();
|
|
15
|
+
console.log({ data: res.data });
|
|
16
|
+
} catch (err) {
|
|
17
|
+
console.log(err);
|
|
18
|
+
}
|
|
19
|
+
})();
|