UNPKG

@iotize/tap

Version:

IoTize Device client for Javascript

77 lines (66 loc) 1.83 kB
import { AbstractService, extendServiceContainer } from '@iotize/tap'; import { TapRequestFrame } from '@iotize/tap/client/api'; import { converters } from '@iotize/tap/service/core'; /** * Generated file. Do not edit */ var serviceConverters = /*#__PURE__*/Object.freeze({ __proto__: null }); /** * Generated file. Do not edit */ const allConverters = Object.assign(Object.assign({}, converters), serviceConverters); const SERVICE_CALLS = { getAddress: { method: TapRequestFrame.MethodType.GET, pathAlias: '/ble/address', path: '/1024//22', responseBodyDecoder: allConverters.stringMacaddress, }, }; class BleService extends AbstractService { constructor() { super(...arguments); this.resources = SERVICE_CALLS; } /** * Get BLE MAC address * * LWM2M path: /1024//22 * * @tapVersion(">=1.0") * @return */ getAddress() { return this.serviceCallRunner.execute(this.getAddressCall()); } /** * * * LWM2M path: /1024//22 * * @tapVersion(">=1.0") * @return call options */ getAddressCall() { const callOptions = Object.assign({}, this.resources.getAddress); return callOptions; } } const _TAP_SERVICE_EXTENSION_BLE_ = extendServiceContainer('ble', BleService); /** * Generated file. Do not edit */ /** * Generated file. Do not edit */ /** * Generated file. Do not edit */ const ResourceMetaData = {}; /** * Generated bundle index. Do not edit. */ export { SERVICE_CALLS as BLE_SERVICE_CALLS, ResourceMetaData as BleResourceMetaData, BleService, _TAP_SERVICE_EXTENSION_BLE_, serviceConverters as bleConverters }; //# sourceMappingURL=iotize-tap-service-impl-ble.js.map