ob-bms-sdk 0.0.68 → 0.0.69

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/api/api.js CHANGED
@@ -106,9 +106,9 @@ const DefaultApiAxiosParamCreator = function (configuration) {
106
106
  * @param {*} [options] Override http request option.
107
107
  * @throws {RequiredError}
108
108
  */
109
- acCreate: (aCRequestBody, options = {}) => __awaiter(this, void 0, void 0, function* () {
109
+ acRequestCreate: (aCRequestBody, options = {}) => __awaiter(this, void 0, void 0, function* () {
110
110
  // verify required parameter 'aCRequestBody' is not null or undefined
111
- (0, common_1.assertParamExists)('acCreate', 'aCRequestBody', aCRequestBody);
111
+ (0, common_1.assertParamExists)('acRequestCreate', 'aCRequestBody', aCRequestBody);
112
112
  const localVarPath = `/ac_request`;
113
113
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
114
114
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -129,6 +129,78 @@ const DefaultApiAxiosParamCreator = function (configuration) {
129
129
  options: localVarRequestOptions,
130
130
  };
131
131
  }),
132
+ /**
133
+ *
134
+ * @param {string} [requesterId]
135
+ * @param {string} [orderBy]
136
+ * @param {string} [orderDirection]
137
+ * @param {number} [pageNumber]
138
+ * @param {number} [pageSize]
139
+ * @param {*} [options] Override http request option.
140
+ * @throws {RequiredError}
141
+ */
142
+ acRequestIndex: (requesterId, orderBy, orderDirection, pageNumber, pageSize, options = {}) => __awaiter(this, void 0, void 0, function* () {
143
+ const localVarPath = `/ac_request`;
144
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
145
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
146
+ let baseOptions;
147
+ if (configuration) {
148
+ baseOptions = configuration.baseOptions;
149
+ }
150
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
151
+ const localVarHeaderParameter = {};
152
+ const localVarQueryParameter = {};
153
+ if (requesterId !== undefined) {
154
+ localVarQueryParameter['requester_id'] = requesterId;
155
+ }
156
+ if (orderBy !== undefined) {
157
+ localVarQueryParameter['order_by'] = orderBy;
158
+ }
159
+ if (orderDirection !== undefined) {
160
+ localVarQueryParameter['order_direction'] = orderDirection;
161
+ }
162
+ if (pageNumber !== undefined) {
163
+ localVarQueryParameter['page_number'] = pageNumber;
164
+ }
165
+ if (pageSize !== undefined) {
166
+ localVarQueryParameter['page_size'] = pageSize;
167
+ }
168
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
169
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
170
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
171
+ return {
172
+ url: (0, common_1.toPathString)(localVarUrlObj),
173
+ options: localVarRequestOptions,
174
+ };
175
+ }),
176
+ /**
177
+ *
178
+ * @param {string} id
179
+ * @param {*} [options] Override http request option.
180
+ * @throws {RequiredError}
181
+ */
182
+ acRequestShow: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
183
+ // verify required parameter 'id' is not null or undefined
184
+ (0, common_1.assertParamExists)('acRequestShow', 'id', id);
185
+ const localVarPath = `/ac_request/{id}`
186
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
187
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
188
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
189
+ let baseOptions;
190
+ if (configuration) {
191
+ baseOptions = configuration.baseOptions;
192
+ }
193
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
194
+ const localVarHeaderParameter = {};
195
+ const localVarQueryParameter = {};
196
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
197
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
198
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
199
+ return {
200
+ url: (0, common_1.toPathString)(localVarUrlObj),
201
+ options: localVarRequestOptions,
202
+ };
203
+ }),
132
204
  /**
133
205
  *
134
206
  * @param {string} floorId
@@ -1022,9 +1094,37 @@ const DefaultApiFp = function (configuration) {
1022
1094
  * @param {*} [options] Override http request option.
1023
1095
  * @throws {RequiredError}
1024
1096
  */
1025
- acCreate(aCRequestBody, options) {
1097
+ acRequestCreate(aCRequestBody, options) {
1098
+ return __awaiter(this, void 0, void 0, function* () {
1099
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.acRequestCreate(aCRequestBody, options);
1100
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
1101
+ });
1102
+ },
1103
+ /**
1104
+ *
1105
+ * @param {string} [requesterId]
1106
+ * @param {string} [orderBy]
1107
+ * @param {string} [orderDirection]
1108
+ * @param {number} [pageNumber]
1109
+ * @param {number} [pageSize]
1110
+ * @param {*} [options] Override http request option.
1111
+ * @throws {RequiredError}
1112
+ */
1113
+ acRequestIndex(requesterId, orderBy, orderDirection, pageNumber, pageSize, options) {
1026
1114
  return __awaiter(this, void 0, void 0, function* () {
1027
- const localVarAxiosArgs = yield localVarAxiosParamCreator.acCreate(aCRequestBody, options);
1115
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.acRequestIndex(requesterId, orderBy, orderDirection, pageNumber, pageSize, options);
1116
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
1117
+ });
1118
+ },
1119
+ /**
1120
+ *
1121
+ * @param {string} id
1122
+ * @param {*} [options] Override http request option.
1123
+ * @throws {RequiredError}
1124
+ */
1125
+ acRequestShow(id, options) {
1126
+ return __awaiter(this, void 0, void 0, function* () {
1127
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.acRequestShow(id, options);
1028
1128
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
1029
1129
  });
1030
1130
  },
@@ -1398,8 +1498,30 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
1398
1498
  * @param {*} [options] Override http request option.
1399
1499
  * @throws {RequiredError}
1400
1500
  */
1401
- acCreate(aCRequestBody, options) {
1402
- return localVarFp.acCreate(aCRequestBody, options).then((request) => request(axios, basePath));
1501
+ acRequestCreate(aCRequestBody, options) {
1502
+ return localVarFp.acRequestCreate(aCRequestBody, options).then((request) => request(axios, basePath));
1503
+ },
1504
+ /**
1505
+ *
1506
+ * @param {string} [requesterId]
1507
+ * @param {string} [orderBy]
1508
+ * @param {string} [orderDirection]
1509
+ * @param {number} [pageNumber]
1510
+ * @param {number} [pageSize]
1511
+ * @param {*} [options] Override http request option.
1512
+ * @throws {RequiredError}
1513
+ */
1514
+ acRequestIndex(requesterId, orderBy, orderDirection, pageNumber, pageSize, options) {
1515
+ return localVarFp.acRequestIndex(requesterId, orderBy, orderDirection, pageNumber, pageSize, options).then((request) => request(axios, basePath));
1516
+ },
1517
+ /**
1518
+ *
1519
+ * @param {string} id
1520
+ * @param {*} [options] Override http request option.
1521
+ * @throws {RequiredError}
1522
+ */
1523
+ acRequestShow(id, options) {
1524
+ return localVarFp.acRequestShow(id, options).then((request) => request(axios, basePath));
1403
1525
  },
1404
1526
  /**
1405
1527
  *
@@ -1688,8 +1810,32 @@ class DefaultApi extends base_1.BaseAPI {
1688
1810
  * @throws {RequiredError}
1689
1811
  * @memberof DefaultApi
1690
1812
  */
1691
- acCreate(aCRequestBody, options) {
1692
- return (0, exports.DefaultApiFp)(this.configuration).acCreate(aCRequestBody, options).then((request) => request(this.axios, this.basePath));
1813
+ acRequestCreate(aCRequestBody, options) {
1814
+ return (0, exports.DefaultApiFp)(this.configuration).acRequestCreate(aCRequestBody, options).then((request) => request(this.axios, this.basePath));
1815
+ }
1816
+ /**
1817
+ *
1818
+ * @param {string} [requesterId]
1819
+ * @param {string} [orderBy]
1820
+ * @param {string} [orderDirection]
1821
+ * @param {number} [pageNumber]
1822
+ * @param {number} [pageSize]
1823
+ * @param {*} [options] Override http request option.
1824
+ * @throws {RequiredError}
1825
+ * @memberof DefaultApi
1826
+ */
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));
1829
+ }
1830
+ /**
1831
+ *
1832
+ * @param {string} id
1833
+ * @param {*} [options] Override http request option.
1834
+ * @throws {RequiredError}
1835
+ * @memberof DefaultApi
1836
+ */
1837
+ acRequestShow(id, options) {
1838
+ return (0, exports.DefaultApiFp)(this.configuration).acRequestShow(id, options).then((request) => request(this.axios, this.basePath));
1693
1839
  }
1694
1840
  /**
1695
1841
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ob-bms-sdk",
3
- "version": "0.0.68",
3
+ "version": "0.0.69",
4
4
  "description": "API interfaces for OB BMS",
5
5
  "main": "./dist/index.js",
6
6
  "license": "MIT"
package/test.ts DELETED
@@ -1,19 +0,0 @@
1
- import * as OB_BMS_SDK from './index';
2
-
3
- // OB_BMS_SDK.setAcessToken('789');
4
- OB_BMS_SDK.setBaseUrl('https://dev.glorymtel.xyz/ob-bms');
5
- OB_BMS_SDK.setAcessToken(
6
- 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI4MjQyNzA1Zi0zNWI1LTRkNzEtOGUxOS1jNWE0MWFjMmUwYTQiLCJpYXQiOjE2OTg5MzU2ODcsImV4cCI6MTcwMTUyNzY4NywicGVybWlzc2lvbiI6W3siaWQiOiJmY2Q1NDZmYy1lNThmLTQ2MjctOTU5Yy1jNWFlYTljMGQ0ODMiLCJwZXJtaXR0ZWVfdHlwZSI6ImFjY291bnQiLCJ2YWx1ZSI6eyJuYW1lIjoib2ItaWFtOmFjY291bnQiLCJzZXJ2aWNlIjoib2ItaWFtIi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iOiJzZWxmIn19LCJjcmVhdGVkX2F0IjoiMjAyMy0xMS0wMlQwODo1MTo0Mi43NzFaIiwidXBkYXRlZF9hdCI6IjIwMjMtMTEtMDJUMDg6NTE6NDIuNzcxWiIsImRlbGV0ZWRfYXQiOm51bGwsImFjY291bnRfaWQiOiI4MjQyNzA1Zi0zNWI1LTRkNzEtOGUxOS1jNWE0MWFjMmUwYTQiLCJhY2NvdW50X2dyb3VwX2lkIjpudWxsfV19.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
- console.log({ res });
15
- console.dir({ x: res.data.data[0] }, { depth: null });
16
- } catch (err) {
17
- console.log(err);
18
- }
19
- })();