@openxiot/xiot-core-spec-ts 0.0.2
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/LICENSE +21 -0
- package/README.md +2 -0
- package/dist/index.d.ts +315 -0
- package/dist/index.js +331 -0
- package/dist/xiot/core/spec/codec/app/ApplicationCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/app/ApplicationCodec.js +50 -0
- package/dist/xiot/core/spec/codec/app/authorization/AuthorizationCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/authorization/AuthorizationCodec.js +41 -0
- package/dist/xiot/core/spec/codec/app/authorization/impl/AuthorizationEventbusImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/authorization/impl/AuthorizationEventbusImplCodec.js +15 -0
- package/dist/xiot/core/spec/codec/app/authorization/impl/AuthorizationHttpImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/authorization/impl/AuthorizationHttpImplCodec.js +15 -0
- package/dist/xiot/core/spec/codec/app/authorization/impl/AuthorizationJwtImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/authorization/impl/AuthorizationJwtImplCodec.js +14 -0
- package/dist/xiot/core/spec/codec/app/event/EventReceiverCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/event/EventReceiverCodec.js +41 -0
- package/dist/xiot/core/spec/codec/app/event/impl/EventReceiverEventbusImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/event/impl/EventReceiverEventbusImplCodec.js +15 -0
- package/dist/xiot/core/spec/codec/app/event/impl/EventReceiverHttpImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/event/impl/EventReceiverHttpImplCodec.js +15 -0
- package/dist/xiot/core/spec/codec/app/event/impl/EventReceiverKafkaImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/event/impl/EventReceiverKafkaImplCodec.js +18 -0
- package/dist/xiot/core/spec/codec/definition/ActionDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/ActionDefinitionCodec.js +43 -0
- package/dist/xiot/core/spec/codec/definition/ArgumentDefinitionCodec.d.ts +8 -0
- package/dist/xiot/core/spec/codec/definition/ArgumentDefinitionCodec.js +48 -0
- package/dist/xiot/core/spec/codec/definition/CategoryDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/CategoryDefinitionCodec.js +32 -0
- package/dist/xiot/core/spec/codec/definition/DescriptionCodec.d.ts +4 -0
- package/dist/xiot/core/spec/codec/definition/DescriptionCodec.js +32 -0
- package/dist/xiot/core/spec/codec/definition/DeviceDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/DeviceDefinitionCodec.js +38 -0
- package/dist/xiot/core/spec/codec/definition/EventDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/EventDefinitionCodec.js +39 -0
- package/dist/xiot/core/spec/codec/definition/FormatDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/FormatDefinitionCodec.js +34 -0
- package/dist/xiot/core/spec/codec/definition/NamespaceDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/NamespaceDefinitionCodec.js +32 -0
- package/dist/xiot/core/spec/codec/definition/PropertyDefinitionCodec.d.ts +9 -0
- package/dist/xiot/core/spec/codec/definition/PropertyDefinitionCodec.js +95 -0
- package/dist/xiot/core/spec/codec/definition/ServiceDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/ServiceDefinitionCodec.js +71 -0
- package/dist/xiot/core/spec/codec/definition/UnitDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/UnitDefinitionCodec.js +34 -0
- package/dist/xiot/core/spec/codec/definition/ValueListCodec.d.ts +6 -0
- package/dist/xiot/core/spec/codec/definition/ValueListCodec.js +31 -0
- package/dist/xiot/core/spec/codec/definition/ValueRangeCodec.d.ts +6 -0
- package/dist/xiot/core/spec/codec/definition/ValueRangeCodec.js +13 -0
- package/dist/xiot/core/spec/codec/definition/type/ActionTypeCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/definition/type/ActionTypeCodec.js +28 -0
- package/dist/xiot/core/spec/codec/definition/type/EventTypeCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/definition/type/EventTypeCodec.js +28 -0
- package/dist/xiot/core/spec/codec/definition/type/GroupTypeCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/definition/type/GroupTypeCodec.js +28 -0
- package/dist/xiot/core/spec/codec/definition/type/PropertyTypeCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/definition/type/PropertyTypeCodec.js +28 -0
- package/dist/xiot/core/spec/codec/definition/type/ServiceTypeCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/definition/type/ServiceTypeCodec.js +28 -0
- package/dist/xiot/core/spec/codec/device/DeviceCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/device/DeviceCodec.js +51 -0
- package/dist/xiot/core/spec/codec/image/ActionImageCodec.d.ts +4 -0
- package/dist/xiot/core/spec/codec/image/ActionImageCodec.js +25 -0
- package/dist/xiot/core/spec/codec/image/ArgumentImageCodec.d.ts +8 -0
- package/dist/xiot/core/spec/codec/image/ArgumentImageCodec.js +44 -0
- package/dist/xiot/core/spec/codec/image/DeviceImageCodec.d.ts +4 -0
- package/dist/xiot/core/spec/codec/image/DeviceImageCodec.js +17 -0
- package/dist/xiot/core/spec/codec/image/EventImageCodec.d.ts +4 -0
- package/dist/xiot/core/spec/codec/image/EventImageCodec.js +27 -0
- package/dist/xiot/core/spec/codec/image/PropertyImageCodec.d.ts +4 -0
- package/dist/xiot/core/spec/codec/image/PropertyImageCodec.js +18 -0
- package/dist/xiot/core/spec/codec/image/ServiceImageCodec.d.ts +4 -0
- package/dist/xiot/core/spec/codec/image/ServiceImageCodec.js +42 -0
- package/dist/xiot/core/spec/codec/instance/ActionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/instance/ActionCodec.js +49 -0
- package/dist/xiot/core/spec/codec/instance/ArgumentCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/instance/ArgumentCodec.js +44 -0
- package/dist/xiot/core/spec/codec/instance/DeviceInstanceCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/instance/DeviceInstanceCodec.js +25 -0
- package/dist/xiot/core/spec/codec/instance/EventCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/instance/EventCodec.js +45 -0
- package/dist/xiot/core/spec/codec/instance/PropertyCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/instance/PropertyCodec.js +98 -0
- package/dist/xiot/core/spec/codec/instance/ServiceCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/instance/ServiceCodec.js +55 -0
- package/dist/xiot/core/spec/codec/jwt/JwtCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/jwt/JwtCodec.js +41 -0
- package/dist/xiot/core/spec/codec/jwt/impl/JwtEsImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/jwt/impl/JwtEsImplCodec.js +26 -0
- package/dist/xiot/core/spec/codec/jwt/impl/JwtRsaImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/jwt/impl/JwtRsaImplCodec.js +26 -0
- package/dist/xiot/core/spec/codec/jwt/impl/JwtSecretsImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/jwt/impl/JwtSecretsImplCodec.js +24 -0
- package/dist/xiot/core/spec/codec/key/AccessKeyCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/key/AccessKeyCodec.js +18 -0
- package/dist/xiot/core/spec/codec/key/DeviceCertCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/key/DeviceCertCodec.js +36 -0
- package/dist/xiot/core/spec/codec/key/DeviceKeyCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/key/DeviceKeyCodec.js +24 -0
- package/dist/xiot/core/spec/codec/lifecycle/app/ApplicationWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/app/ApplicationWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/ActionDefinitionWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/ActionDefinitionWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/DeviceDefinitionWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/DeviceDefinitionWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/EventDefinitionWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/EventDefinitionWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/FormatDefinitionWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/FormatDefinitionWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/PropertyDefinitionWithLifecycleCodec.d.ts +8 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/PropertyDefinitionWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/ServiceDefinitionWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/ServiceDefinitionWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/UnitDefinitionWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/UnitDefinitionWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/instance/DeviceInstanceWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/instance/DeviceInstanceWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/product/VersionWithLifecycleCodec.d.ts +10 -0
- package/dist/xiot/core/spec/codec/lifecycle/product/VersionWithLifecycleCodec.js +42 -0
- package/dist/xiot/core/spec/codec/lifecycle/template/DeviceTemplateWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/template/DeviceTemplateWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/type/DeviceTypeWithLifecycleCodec.d.ts +12 -0
- package/dist/xiot/core/spec/codec/lifecycle/type/DeviceTypeWithLifecycleCodec.js +36 -0
- package/dist/xiot/core/spec/codec/notice/DeviceNoticeCodec.d.ts +8 -0
- package/dist/xiot/core/spec/codec/notice/DeviceNoticeCodec.js +122 -0
- package/dist/xiot/core/spec/codec/notice/OwnerNoticeCodec.d.ts +8 -0
- package/dist/xiot/core/spec/codec/notice/OwnerNoticeCodec.js +220 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceAccessKeyChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceAccessKeyChangedCodec.js +19 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceChildrenAddedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceChildrenAddedCodec.js +20 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceChildrenRemovedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceChildrenRemovedCodec.js +19 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceEventOccurredCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceEventOccurredCodec.js +18 -0
- package/dist/xiot/core/spec/codec/notice/device/DevicePropertiesChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DevicePropertiesChangedCodec.js +18 -0
- package/dist/xiot/core/spec/codec/notice/device/DevicePropertyChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DevicePropertyChangedCodec.js +18 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceRootActiveCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceRootActiveCodec.js +20 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceRootInactiveCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceRootInactiveCodec.js +16 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceSummaryChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceSummaryChangedCodec.js +20 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceAddedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceAddedCodec.js +23 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceRemovedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceRemovedCodec.js +19 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceSomewhereChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceSomewhereChangedCodec.js +26 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceSummaryChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceSummaryChangedCodec.js +26 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerEventOccurredCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerEventOccurredCodec.js +20 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerPropertiesChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerPropertiesChangedCodec.js +21 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleAddedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleAddedCodec.js +24 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleChangedCodec.js +24 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleExecutedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleExecutedCodec.js +47 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleRemovedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleRemovedCodec.js +23 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleTriggeredCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleTriggeredCodec.js +23 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnershipDisclaimedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnershipDisclaimedCodec.js +19 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnershipTakenCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnershipTakenCodec.js +19 -0
- package/dist/xiot/core/spec/codec/notice/owner/home/OwnerHomeAddedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/home/OwnerHomeAddedCodec.js +24 -0
- package/dist/xiot/core/spec/codec/notice/owner/home/OwnerHomeChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/home/OwnerHomeChangedCodec.js +24 -0
- package/dist/xiot/core/spec/codec/notice/owner/home/OwnerHomeRemovedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/home/OwnerHomeRemovedCodec.js +23 -0
- package/dist/xiot/core/spec/codec/notice/owner/space/OwnerSpaceAddedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/space/OwnerSpaceAddedCodec.js +24 -0
- package/dist/xiot/core/spec/codec/notice/owner/space/OwnerSpaceChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/space/OwnerSpaceChangedCodec.js +24 -0
- package/dist/xiot/core/spec/codec/notice/owner/space/OwnerSpaceRemovedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/space/OwnerSpaceRemovedCodec.js +23 -0
- package/dist/xiot/core/spec/codec/oauth2/Oauth2ConfigurationCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/oauth2/Oauth2ConfigurationCodec.js +49 -0
- package/dist/xiot/core/spec/codec/operation/AbstractOperationCodec.d.ts +10 -0
- package/dist/xiot/core/spec/codec/operation/AbstractOperationCodec.js +27 -0
- package/dist/xiot/core/spec/codec/operation/ActionOperationCodec.d.ts +14 -0
- package/dist/xiot/core/spec/codec/operation/ActionOperationCodec.js +84 -0
- package/dist/xiot/core/spec/codec/operation/ArgumentOperationCodec.d.ts +10 -0
- package/dist/xiot/core/spec/codec/operation/ArgumentOperationCodec.js +65 -0
- package/dist/xiot/core/spec/codec/operation/CombinationValueCodec.d.ts +6 -0
- package/dist/xiot/core/spec/codec/operation/CombinationValueCodec.js +70 -0
- package/dist/xiot/core/spec/codec/operation/EventOperationCodec.d.ts +14 -0
- package/dist/xiot/core/spec/codec/operation/EventOperationCodec.js +63 -0
- package/dist/xiot/core/spec/codec/operation/PropertyOperationCodec.d.ts +31 -0
- package/dist/xiot/core/spec/codec/operation/PropertyOperationCodec.js +151 -0
- package/dist/xiot/core/spec/codec/operation/RuleOperationCodec.d.ts +14 -0
- package/dist/xiot/core/spec/codec/operation/RuleOperationCodec.js +43 -0
- package/dist/xiot/core/spec/codec/ownership/DeviceOwnerCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/ownership/DeviceOwnerCodec.js +37 -0
- package/dist/xiot/core/spec/codec/ownership/OwnershipCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/ownership/OwnershipCodec.js +62 -0
- package/dist/xiot/core/spec/codec/product/ProductCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/product/ProductCodec.js +76 -0
- package/dist/xiot/core/spec/codec/product/ProductVersionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/product/ProductVersionCodec.js +69 -0
- package/dist/xiot/core/spec/codec/product/resource/ProductResourceCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/product/resource/ProductResourceCodec.js +45 -0
- package/dist/xiot/core/spec/codec/product/resource/ProductResourceVersionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/product/resource/ProductResourceVersionCodec.js +69 -0
- package/dist/xiot/core/spec/codec/product/resource/ResourceVersionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/product/resource/ResourceVersionCodec.js +65 -0
- package/dist/xiot/core/spec/codec/rbac/PermissionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/rbac/PermissionCodec.js +35 -0
- package/dist/xiot/core/spec/codec/rbac/RoleCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/rbac/RoleCodec.js +34 -0
- package/dist/xiot/core/spec/codec/rbac/account/AccountCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/rbac/account/AccountCodec.js +38 -0
- package/dist/xiot/core/spec/codec/rbac/organization/MemberCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/rbac/organization/MemberCodec.js +34 -0
- package/dist/xiot/core/spec/codec/rbac/organization/OrganizationCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/rbac/organization/OrganizationCodec.js +33 -0
- package/dist/xiot/core/spec/codec/rule/RuleCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/rule/RuleCodec.js +74 -0
- package/dist/xiot/core/spec/codec/shadow/DeviceShadowCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/shadow/DeviceShadowCodec.js +38 -0
- package/dist/xiot/core/spec/codec/shadow/ShadowCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/shadow/ShadowCodec.js +51 -0
- package/dist/xiot/core/spec/codec/somewhere/SomewhereCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/somewhere/SomewhereCodec.js +50 -0
- package/dist/xiot/core/spec/codec/space/SpaceCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/space/SpaceCodec.js +45 -0
- package/dist/xiot/core/spec/codec/summary/SummaryCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/summary/SummaryCodec.js +82 -0
- package/dist/xiot/core/spec/codec/template/ActionTemplateCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/template/ActionTemplateCodec.js +55 -0
- package/dist/xiot/core/spec/codec/template/DeviceTemplateCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/template/DeviceTemplateCodec.js +24 -0
- package/dist/xiot/core/spec/codec/template/EventTemplateCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/template/EventTemplateCodec.js +51 -0
- package/dist/xiot/core/spec/codec/template/PropertyTemplateCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/template/PropertyTemplateCodec.js +78 -0
- package/dist/xiot/core/spec/codec/template/ServiceTemplateCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/template/ServiceTemplateCodec.js +67 -0
- package/dist/xiot/core/spec/typedef/app/Application.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/app/Application.js +13 -0
- package/dist/xiot/core/spec/typedef/app/authorization/Authorization.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/app/authorization/Authorization.js +9 -0
- package/dist/xiot/core/spec/typedef/app/authorization/AuthorizationType.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/app/authorization/AuthorizationType.js +25 -0
- package/dist/xiot/core/spec/typedef/app/authorization/impl/AuthorizationEventbusImpl.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/app/authorization/impl/AuthorizationEventbusImpl.js +12 -0
- package/dist/xiot/core/spec/typedef/app/authorization/impl/AuthorizationHttpImpl.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/app/authorization/impl/AuthorizationHttpImpl.js +12 -0
- package/dist/xiot/core/spec/typedef/app/authorization/impl/AuthorizationJwtImpl.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/app/authorization/impl/AuthorizationJwtImpl.js +12 -0
- package/dist/xiot/core/spec/typedef/app/event/EventReceiver.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/app/event/EventReceiver.js +9 -0
- package/dist/xiot/core/spec/typedef/app/event/EventReceiverType.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/app/event/EventReceiverType.js +25 -0
- package/dist/xiot/core/spec/typedef/app/event/impl/EventReceiverEventbusImpl.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/app/event/impl/EventReceiverEventbusImpl.js +12 -0
- package/dist/xiot/core/spec/typedef/app/event/impl/EventReceiverHttpImpl.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/app/event/impl/EventReceiverHttpImpl.js +12 -0
- package/dist/xiot/core/spec/typedef/app/event/impl/EventReceiverKafkaImpl.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/app/event/impl/EventReceiverKafkaImpl.js +13 -0
- package/dist/xiot/core/spec/typedef/constant/Spec.d.ts +48 -0
- package/dist/xiot/core/spec/typedef/constant/Spec.js +52 -0
- package/dist/xiot/core/spec/typedef/definition/ActionDefinition.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/definition/ActionDefinition.js +21 -0
- package/dist/xiot/core/spec/typedef/definition/ArgumentDefinition.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/definition/ArgumentDefinition.js +11 -0
- package/dist/xiot/core/spec/typedef/definition/CategoryDefinition.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/CategoryDefinition.js +12 -0
- package/dist/xiot/core/spec/typedef/definition/DeviceDefinition.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/definition/DeviceDefinition.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/EventDefinition.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/definition/EventDefinition.js +17 -0
- package/dist/xiot/core/spec/typedef/definition/FormatDefinition.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/definition/FormatDefinition.js +11 -0
- package/dist/xiot/core/spec/typedef/definition/NamespaceDefinition.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/NamespaceDefinition.js +12 -0
- package/dist/xiot/core/spec/typedef/definition/PropertyDefinition.d.ts +24 -0
- package/dist/xiot/core/spec/typedef/definition/PropertyDefinition.js +71 -0
- package/dist/xiot/core/spec/typedef/definition/ServiceDefinition.d.ts +15 -0
- package/dist/xiot/core/spec/typedef/definition/ServiceDefinition.js +37 -0
- package/dist/xiot/core/spec/typedef/definition/UnitDefinition.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/definition/UnitDefinition.js +11 -0
- package/dist/xiot/core/spec/typedef/definition/property/Access.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/definition/property/Access.js +87 -0
- package/dist/xiot/core/spec/typedef/definition/property/ConstraintValue.d.ts +4 -0
- package/dist/xiot/core/spec/typedef/definition/property/ConstraintValue.js +2 -0
- package/dist/xiot/core/spec/typedef/definition/property/ValueDefinition.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/definition/property/ValueDefinition.js +12 -0
- package/dist/xiot/core/spec/typedef/definition/property/ValueList.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/definition/property/ValueList.js +21 -0
- package/dist/xiot/core/spec/typedef/definition/property/ValueRange.d.ts +18 -0
- package/dist/xiot/core/spec/typedef/definition/property/ValueRange.js +103 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/DataFormat.d.ts +23 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/DataFormat.js +96 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/DataValue.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/DataValue.js +2 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/DataValueFactory.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/DataValueFactory.js +115 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vbool.d.ts +12 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vbool.js +53 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vcombination.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vcombination.js +33 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vfloat.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vfloat.js +67 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vhex.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vhex.js +80 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint16.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint16.js +65 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint32.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint32.js +65 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint64.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint64.js +65 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint8.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint8.js +65 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vstring.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vstring.js +36 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vtlv8.d.ts +12 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vtlv8.js +39 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vuint16.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vuint16.js +71 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vuint32.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vuint32.js +65 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vuint8.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vuint8.js +65 -0
- package/dist/xiot/core/spec/typedef/definition/urn/ActionType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/ActionType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/DeviceType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/DeviceType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/EventType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/EventType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/Extendable.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/definition/urn/Extendable.js +18 -0
- package/dist/xiot/core/spec/typedef/definition/urn/FormatType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/FormatType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/GroupType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/GroupType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/PropertyType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/PropertyType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/ServiceType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/ServiceType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/UnitType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/UnitType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/Urn.d.ts +24 -0
- package/dist/xiot/core/spec/typedef/definition/urn/Urn.js +146 -0
- package/dist/xiot/core/spec/typedef/definition/urn/UrnStyle.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/definition/urn/UrnStyle.js +11 -0
- package/dist/xiot/core/spec/typedef/definition/urn/UrnType.d.ts +13 -0
- package/dist/xiot/core/spec/typedef/definition/urn/UrnType.js +30 -0
- package/dist/xiot/core/spec/typedef/device/Device.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/device/Device.js +9 -0
- package/dist/xiot/core/spec/typedef/error/IotError.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/error/IotError.js +13 -0
- package/dist/xiot/core/spec/typedef/image/ActionImage.d.ts +13 -0
- package/dist/xiot/core/spec/typedef/image/ActionImage.js +76 -0
- package/dist/xiot/core/spec/typedef/image/ArgumentImage.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/image/ArgumentImage.js +30 -0
- package/dist/xiot/core/spec/typedef/image/DeviceImage.d.ts +31 -0
- package/dist/xiot/core/spec/typedef/image/DeviceImage.js +283 -0
- package/dist/xiot/core/spec/typedef/image/EventImage.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/image/EventImage.js +48 -0
- package/dist/xiot/core/spec/typedef/image/PropertyImage.d.ts +22 -0
- package/dist/xiot/core/spec/typedef/image/PropertyImage.js +73 -0
- package/dist/xiot/core/spec/typedef/image/ServiceImage.d.ts +21 -0
- package/dist/xiot/core/spec/typedef/image/ServiceImage.js +172 -0
- package/dist/xiot/core/spec/typedef/instance/Action.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/instance/Action.js +33 -0
- package/dist/xiot/core/spec/typedef/instance/Argument.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/instance/Argument.js +18 -0
- package/dist/xiot/core/spec/typedef/instance/DeviceInstance.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/instance/DeviceInstance.js +17 -0
- package/dist/xiot/core/spec/typedef/instance/Event.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/instance/Event.js +23 -0
- package/dist/xiot/core/spec/typedef/instance/Property.d.ts +56 -0
- package/dist/xiot/core/spec/typedef/instance/Property.js +244 -0
- package/dist/xiot/core/spec/typedef/instance/PropertyValue.d.ts +16 -0
- package/dist/xiot/core/spec/typedef/instance/PropertyValue.js +81 -0
- package/dist/xiot/core/spec/typedef/instance/Service.d.ts +19 -0
- package/dist/xiot/core/spec/typedef/instance/Service.js +48 -0
- package/dist/xiot/core/spec/typedef/jwt/Jwt.d.ts +10 -0
- package/dist/xiot/core/spec/typedef/jwt/Jwt.js +16 -0
- package/dist/xiot/core/spec/typedef/jwt/JwtType.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/jwt/JwtType.js +25 -0
- package/dist/xiot/core/spec/typedef/jwt/impl/JwtEsImpl.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/jwt/impl/JwtEsImpl.js +15 -0
- package/dist/xiot/core/spec/typedef/jwt/impl/JwtRsaImpl.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/jwt/impl/JwtRsaImpl.js +15 -0
- package/dist/xiot/core/spec/typedef/jwt/impl/JwtSecretsImpl.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/jwt/impl/JwtSecretsImpl.js +13 -0
- package/dist/xiot/core/spec/typedef/key/AccessKey.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/key/AccessKey.js +10 -0
- package/dist/xiot/core/spec/typedef/key/DeviceCert.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/key/DeviceCert.js +12 -0
- package/dist/xiot/core/spec/typedef/key/DeviceKey.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/key/DeviceKey.js +13 -0
- package/dist/xiot/core/spec/typedef/lifecycle/Lifecycle.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/lifecycle/Lifecycle.js +25 -0
- package/dist/xiot/core/spec/typedef/lifecycle/ObjectWithLifecycle.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/lifecycle/ObjectWithLifecycle.js +10 -0
- package/dist/xiot/core/spec/typedef/notice/Notice.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/Notice.js +9 -0
- package/dist/xiot/core/spec/typedef/notice/NoticeCodec.d.ts +27 -0
- package/dist/xiot/core/spec/typedef/notice/NoticeCodec.js +6 -0
- package/dist/xiot/core/spec/typedef/notice/device/DeviceNotice.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/device/DeviceNotice.js +13 -0
- package/dist/xiot/core/spec/typedef/notice/device/DeviceNoticeType.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/notice/device/DeviceNoticeType.js +31 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceAccessKeyChanged.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceAccessKeyChanged.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceChildrenAdded.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceChildrenAdded.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceChildrenRemoved.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceChildrenRemoved.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceEventOccurred.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceEventOccurred.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DevicePropertiesChanged.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DevicePropertiesChanged.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DevicePropertyChanged.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DevicePropertyChanged.js +17 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceRootActive.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceRootActive.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceRootInactive.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceRootInactive.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceSummaryChanged.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceSummaryChanged.js +17 -0
- package/dist/xiot/core/spec/typedef/notice/owner/OwnerNotice.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/notice/owner/OwnerNotice.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/owner/OwnerNoticeType.d.ts +42 -0
- package/dist/xiot/core/spec/typedef/notice/owner/OwnerNoticeType.js +59 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceAdded.d.ts +10 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceAdded.js +17 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceRemoved.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceRemoved.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceSomewhereChanged.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceSomewhereChanged.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceSummaryChanged.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceSummaryChanged.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerEventOccurred.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerEventOccurred.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerPropertiesChanged.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerPropertiesChanged.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleAdded.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleAdded.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleChanged.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleChanged.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleExecuted.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleExecuted.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleRemoved.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleRemoved.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleTriggered.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleTriggered.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnershipDisclaimed.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnershipDisclaimed.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnershipTaken.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnershipTaken.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/home/OwnerHomeAdded.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/home/OwnerHomeAdded.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/home/OwnerHomeChanged.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/home/OwnerHomeChanged.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/home/OwnerHomeRemoved.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/home/OwnerHomeRemoved.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/space/OwnerSpaceAdded.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/space/OwnerSpaceAdded.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/space/OwnerSpaceChanged.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/space/OwnerSpaceChanged.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/space/OwnerSpaceRemoved.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/space/OwnerSpaceRemoved.js +15 -0
- package/dist/xiot/core/spec/typedef/oauth2/Oauth2Configuration.d.ts +13 -0
- package/dist/xiot/core/spec/typedef/oauth2/Oauth2Configuration.js +19 -0
- package/dist/xiot/core/spec/typedef/operation/AbstractOperation.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/operation/AbstractOperation.js +21 -0
- package/dist/xiot/core/spec/typedef/operation/ActionOperation.d.ts +17 -0
- package/dist/xiot/core/spec/typedef/operation/ActionOperation.js +50 -0
- package/dist/xiot/core/spec/typedef/operation/ArgumentOperation.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/operation/ArgumentOperation.js +52 -0
- package/dist/xiot/core/spec/typedef/operation/EventOperation.d.ts +16 -0
- package/dist/xiot/core/spec/typedef/operation/EventOperation.js +58 -0
- package/dist/xiot/core/spec/typedef/operation/PropertyOperation.d.ts +13 -0
- package/dist/xiot/core/spec/typedef/operation/PropertyOperation.js +53 -0
- package/dist/xiot/core/spec/typedef/operation/RemindOperation.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/operation/RemindOperation.js +25 -0
- package/dist/xiot/core/spec/typedef/operation/RuleOperation.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/operation/RuleOperation.js +25 -0
- package/dist/xiot/core/spec/typedef/operation/SleepOperation.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/operation/SleepOperation.js +25 -0
- package/dist/xiot/core/spec/typedef/operation/value/AnyValue.d.ts +3 -0
- package/dist/xiot/core/spec/typedef/operation/value/AnyValue.js +9 -0
- package/dist/xiot/core/spec/typedef/operation/value/AutoscalingValue.d.ts +3 -0
- package/dist/xiot/core/spec/typedef/operation/value/AutoscalingValue.js +9 -0
- package/dist/xiot/core/spec/typedef/operation/value/ReverseValue.d.ts +3 -0
- package/dist/xiot/core/spec/typedef/operation/value/ReverseValue.js +9 -0
- package/dist/xiot/core/spec/typedef/ownership/DeviceOwner.d.ts +4 -0
- package/dist/xiot/core/spec/typedef/ownership/DeviceOwner.js +10 -0
- package/dist/xiot/core/spec/typedef/ownership/Ownership.d.ts +12 -0
- package/dist/xiot/core/spec/typedef/ownership/Ownership.js +26 -0
- package/dist/xiot/core/spec/typedef/product/Product.d.ts +22 -0
- package/dist/xiot/core/spec/typedef/product/Product.js +25 -0
- package/dist/xiot/core/spec/typedef/product/ProductVersion.d.ts +17 -0
- package/dist/xiot/core/spec/typedef/product/ProductVersion.js +24 -0
- package/dist/xiot/core/spec/typedef/product/resource/ProductResource.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/product/resource/ProductResource.js +13 -0
- package/dist/xiot/core/spec/typedef/product/resource/ProductResourceVersion.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/product/resource/ProductResourceVersion.js +12 -0
- package/dist/xiot/core/spec/typedef/product/resource/ResourceVersion.d.ts +16 -0
- package/dist/xiot/core/spec/typedef/product/resource/ResourceVersion.js +30 -0
- package/dist/xiot/core/spec/typedef/rbac/Permission.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/rbac/Permission.js +13 -0
- package/dist/xiot/core/spec/typedef/rbac/Role.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/rbac/Role.js +12 -0
- package/dist/xiot/core/spec/typedef/rbac/account/Account.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/rbac/account/Account.js +16 -0
- package/dist/xiot/core/spec/typedef/rbac/organization/Member.d.ts +12 -0
- package/dist/xiot/core/spec/typedef/rbac/organization/Member.js +22 -0
- package/dist/xiot/core/spec/typedef/rbac/organization/Organization.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/rbac/organization/Organization.js +12 -0
- package/dist/xiot/core/spec/typedef/registry/DeviceRegistry.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/registry/DeviceRegistry.js +7 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/AccessPoint.d.ts +4 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/AccessPoint.js +10 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/AccessPointType.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/AccessPointType.js +24 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/impl/AccessPointEventbus.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/impl/AccessPointEventbus.js +12 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/impl/AccessPointHttp.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/impl/AccessPointHttp.js +13 -0
- package/dist/xiot/core/spec/typedef/rule/Rule.d.ts +44 -0
- package/dist/xiot/core/spec/typedef/rule/Rule.js +174 -0
- package/dist/xiot/core/spec/typedef/rule/RuleContent.d.ts +16 -0
- package/dist/xiot/core/spec/typedef/rule/RuleContent.js +56 -0
- package/dist/xiot/core/spec/typedef/rule/RuleType.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/rule/RuleType.js +11 -0
- package/dist/xiot/core/spec/typedef/rule/condition/AbstractCondition.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/rule/condition/AbstractCondition.js +12 -0
- package/dist/xiot/core/spec/typedef/rule/condition/ComplexCondition.d.ts +17 -0
- package/dist/xiot/core/spec/typedef/rule/condition/ComplexCondition.js +57 -0
- package/dist/xiot/core/spec/typedef/rule/condition/EventCondition.d.ts +16 -0
- package/dist/xiot/core/spec/typedef/rule/condition/EventCondition.js +59 -0
- package/dist/xiot/core/spec/typedef/rule/condition/ExternalCondition.d.ts +19 -0
- package/dist/xiot/core/spec/typedef/rule/condition/ExternalCondition.js +43 -0
- package/dist/xiot/core/spec/typedef/rule/condition/ExternalType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/rule/condition/ExternalType.js +9 -0
- package/dist/xiot/core/spec/typedef/rule/condition/NowCondition.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/rule/condition/NowCondition.js +15 -0
- package/dist/xiot/core/spec/typedef/rule/condition/PropertyCondition.d.ts +19 -0
- package/dist/xiot/core/spec/typedef/rule/condition/PropertyCondition.js +48 -0
- package/dist/xiot/core/spec/typedef/rule/condition/TimeCondition.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/rule/condition/TimeCondition.js +85 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/ComparisonOperator.d.ts +10 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/ComparisonOperator.js +32 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/LogicalOperator.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/LogicalOperator.js +22 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/compare/Comparator.d.ts +2 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/compare/Comparator.js +20 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/compare/Compare.d.ts +21 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/compare/Compare.js +67 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/logical/Logic.d.ts +2 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/logical/Logic.js +16 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/logical/Logical.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/logical/Logical.js +15 -0
- package/dist/xiot/core/spec/typedef/rule/cron/CronExp.d.ts +31 -0
- package/dist/xiot/core/spec/typedef/rule/cron/CronExp.js +102 -0
- package/dist/xiot/core/spec/typedef/rule/listener/RuleExecutionListener.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/rule/listener/RuleExecutionListener.js +2 -0
- package/dist/xiot/core/spec/typedef/rule/parser/RuleContentParser.d.ts +13 -0
- package/dist/xiot/core/spec/typedef/rule/parser/RuleContentParser.js +70 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/ConditionParser.d.ts +17 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/ConditionParser.js +72 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser0/Parser0.d.ts +28 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser0/Parser0.js +148 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser1/Parser1.d.ts +16 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser1/Parser1.js +90 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser2/Parser2.d.ts +31 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser2/Parser2.js +289 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser2/ParserState2.d.ts +13 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser2/ParserState2.js +17 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser2/Token2.d.ts +22 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser2/Token2.js +68 -0
- package/dist/xiot/core/spec/typedef/rule/parser/operation/OperationParser.d.ts +31 -0
- package/dist/xiot/core/spec/typedef/rule/parser/operation/OperationParser.js +331 -0
- package/dist/xiot/core/spec/typedef/rule/parser/operation/OperationState.d.ts +19 -0
- package/dist/xiot/core/spec/typedef/rule/parser/operation/OperationState.js +23 -0
- package/dist/xiot/core/spec/typedef/rule/parser/token/Token.d.ts +91 -0
- package/dist/xiot/core/spec/typedef/rule/parser/token/Token.js +269 -0
- package/dist/xiot/core/spec/typedef/rule/parser/token/Tokenizer.d.ts +29 -0
- package/dist/xiot/core/spec/typedef/rule/parser/token/Tokenizer.js +483 -0
- package/dist/xiot/core/spec/typedef/shadow/DeviceShadow.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/shadow/DeviceShadow.js +10 -0
- package/dist/xiot/core/spec/typedef/shadow/Shadow.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/shadow/Shadow.js +13 -0
- package/dist/xiot/core/spec/typedef/somewhere/Somewhere.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/somewhere/Somewhere.js +45 -0
- package/dist/xiot/core/spec/typedef/somewhere/Where.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/somewhere/Where.js +26 -0
- package/dist/xiot/core/spec/typedef/space/Space.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/space/Space.js +20 -0
- package/dist/xiot/core/spec/typedef/status/AbstractStatus.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/status/AbstractStatus.js +23 -0
- package/dist/xiot/core/spec/typedef/status/Status.d.ts +50 -0
- package/dist/xiot/core/spec/typedef/status/Status.js +54 -0
- package/dist/xiot/core/spec/typedef/summary/Summary.d.ts +24 -0
- package/dist/xiot/core/spec/typedef/summary/Summary.js +120 -0
- package/dist/xiot/core/spec/typedef/template/ActionTemplate.d.ts +17 -0
- package/dist/xiot/core/spec/typedef/template/ActionTemplate.js +33 -0
- package/dist/xiot/core/spec/typedef/template/DeviceTemplate.d.ts +12 -0
- package/dist/xiot/core/spec/typedef/template/DeviceTemplate.js +23 -0
- package/dist/xiot/core/spec/typedef/template/EventTemplate.d.ts +15 -0
- package/dist/xiot/core/spec/typedef/template/EventTemplate.js +26 -0
- package/dist/xiot/core/spec/typedef/template/PropertyTemplate.d.ts +10 -0
- package/dist/xiot/core/spec/typedef/template/PropertyTemplate.js +16 -0
- package/dist/xiot/core/spec/typedef/template/ServiceTemplate.d.ts +24 -0
- package/dist/xiot/core/spec/typedef/template/ServiceTemplate.js +46 -0
- package/dist/xiot/core/spec/typedef/utils/Stack.d.ts +10 -0
- package/dist/xiot/core/spec/typedef/utils/Stack.js +35 -0
- package/dist/xiot/core/spec/typedef/utils/StringUtils.d.ts +3 -0
- package/dist/xiot/core/spec/typedef/utils/StringUtils.js +14 -0
- package/dist/xiot/core/spec/typedef/utils/TemplateHelper.d.ts +30 -0
- package/dist/xiot/core/spec/typedef/utils/TemplateHelper.js +285 -0
- package/dist/xiot/core/spec/typedef/version/Version.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/version/Version.js +40 -0
- package/dist/xiot/core/spec/typedef/xid/ActionID.d.ts +13 -0
- package/dist/xiot/core/spec/typedef/xid/ActionID.js +27 -0
- package/dist/xiot/core/spec/typedef/xid/EventID.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/xid/EventID.js +20 -0
- package/dist/xiot/core/spec/typedef/xid/PropertyID.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/xid/PropertyID.js +20 -0
- package/dist/xiot/core/spec/typedef/xid/XID3.d.ts +10 -0
- package/dist/xiot/core/spec/typedef/xid/XID3.js +41 -0
- package/dist/xiot/core/support/codegen/codec/controlled/ActionControlledCodec.d.ts +3 -0
- package/dist/xiot/core/support/codegen/codec/controlled/ActionControlledCodec.js +8 -0
- package/dist/xiot/core/support/codegen/codec/controlled/DeviceControlledCodec.d.ts +3 -0
- package/dist/xiot/core/support/codegen/codec/controlled/DeviceControlledCodec.js +8 -0
- package/dist/xiot/core/support/codegen/codec/controlled/EventControlledCodec.d.ts +3 -0
- package/dist/xiot/core/support/codegen/codec/controlled/EventControlledCodec.js +8 -0
- package/dist/xiot/core/support/codegen/codec/controlled/PropertyControlledCodec.d.ts +3 -0
- package/dist/xiot/core/support/codegen/codec/controlled/PropertyControlledCodec.js +8 -0
- package/dist/xiot/core/support/codegen/codec/controlled/ServiceControlledCodec.d.ts +2 -0
- package/dist/xiot/core/support/codegen/codec/controlled/ServiceControlledCodec.js +6 -0
- package/dist/xiot/core/support/codegen/codec/controller/ActionControllerCodec.d.ts +6 -0
- package/dist/xiot/core/support/codegen/codec/controller/ActionControllerCodec.js +30 -0
- package/dist/xiot/core/support/codegen/codec/controller/DeviceControllerCodec.d.ts +5 -0
- package/dist/xiot/core/support/codegen/codec/controller/DeviceControllerCodec.js +20 -0
- package/dist/xiot/core/support/codegen/codec/controller/EventControllerCodec.d.ts +6 -0
- package/dist/xiot/core/support/codegen/codec/controller/EventControllerCodec.js +29 -0
- package/dist/xiot/core/support/codegen/codec/controller/PropertyControllerCodec.d.ts +7 -0
- package/dist/xiot/core/support/codegen/codec/controller/PropertyControllerCodec.js +25 -0
- package/dist/xiot/core/support/codegen/codec/controller/ServiceControllerCodec.d.ts +5 -0
- package/dist/xiot/core/support/codegen/codec/controller/ServiceControllerCodec.js +31 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/ActionControlled.d.ts +9 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/ActionControlled.js +25 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/DeviceControlled.d.ts +3 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/DeviceControlled.js +7 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/EventControlled.d.ts +12 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/EventControlled.js +20 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/PropertyControlled.d.ts +18 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/PropertyControlled.js +122 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/ServiceControlled.d.ts +8 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/ServiceControlled.js +10 -0
- package/dist/xiot/core/support/codegen/typedef/controller/ActionController.d.ts +10 -0
- package/dist/xiot/core/support/codegen/typedef/controller/ActionController.js +15 -0
- package/dist/xiot/core/support/codegen/typedef/controller/DeviceController.d.ts +23 -0
- package/dist/xiot/core/support/codegen/typedef/controller/DeviceController.js +86 -0
- package/dist/xiot/core/support/codegen/typedef/controller/EventController.d.ts +8 -0
- package/dist/xiot/core/support/codegen/typedef/controller/EventController.js +12 -0
- package/dist/xiot/core/support/codegen/typedef/controller/PropertyController.d.ts +27 -0
- package/dist/xiot/core/support/codegen/typedef/controller/PropertyController.js +144 -0
- package/dist/xiot/core/support/codegen/typedef/controller/ServiceController.d.ts +15 -0
- package/dist/xiot/core/support/codegen/typedef/controller/ServiceController.js +70 -0
- package/dist/xiot/core/support/codegen/typedef/controller/SomewhereController.d.ts +7 -0
- package/dist/xiot/core/support/codegen/typedef/controller/SomewhereController.js +32 -0
- package/dist/xiot/core/support/codegen/typedef/controller/SummaryController.d.ts +7 -0
- package/dist/xiot/core/support/codegen/typedef/controller/SummaryController.js +55 -0
- package/dist/xiot/core/support/codegen/typedef/controller/operator/ActionInvokerWrapper.d.ts +9 -0
- package/dist/xiot/core/support/codegen/typedef/controller/operator/ActionInvokerWrapper.js +27 -0
- package/dist/xiot/core/support/codegen/typedef/controller/operator/PropertySetterWrapper.d.ts +8 -0
- package/dist/xiot/core/support/codegen/typedef/controller/operator/PropertySetterWrapper.js +27 -0
- package/dist/xiot/core/support/codegen/typedef/result/Result.d.ts +9 -0
- package/dist/xiot/core/support/codegen/typedef/result/Result.js +15 -0
- package/dist/xiot/core/support/codegen/typedef/rule/RuleController.d.ts +7 -0
- package/dist/xiot/core/support/codegen/typedef/rule/RuleController.js +14 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/RuleStatus.d.ts +2 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/RuleStatus.js +2 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/impl/RuleExecuted.d.ts +8 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/impl/RuleExecuted.js +11 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/impl/RuleReady.d.ts +3 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/impl/RuleReady.js +6 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/impl/RuleTriggered.d.ts +6 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/impl/RuleTriggered.js +10 -0
- package/package.json +62 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EventReceiverHttpImplCodec = void 0;
|
|
4
|
+
const EventReceiverHttpImpl_1 = require("../../../../typedef/app/event/impl/EventReceiverHttpImpl");
|
|
5
|
+
class EventReceiverHttpImplCodec {
|
|
6
|
+
static encode(x) {
|
|
7
|
+
return {
|
|
8
|
+
url: x.url
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
static decode(o) {
|
|
12
|
+
return new EventReceiverHttpImpl_1.EventReceiverHttpImpl(o['url']);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.EventReceiverHttpImplCodec = EventReceiverHttpImplCodec;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EventReceiverKafkaImplCodec = void 0;
|
|
4
|
+
const EventReceiverKafkaImpl_1 = require("../../../../typedef/app/event/impl/EventReceiverKafkaImpl");
|
|
5
|
+
class EventReceiverKafkaImplCodec {
|
|
6
|
+
static encode(x) {
|
|
7
|
+
return {
|
|
8
|
+
topic: x.topic,
|
|
9
|
+
bootstrapServers: x.bootstrapServers,
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
static decode(o) {
|
|
13
|
+
const topic = o.topic;
|
|
14
|
+
const bootstrapServers = o.bootstrapServers;
|
|
15
|
+
return new EventReceiverKafkaImpl_1.EventReceiverKafkaImpl(topic, bootstrapServers);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.EventReceiverKafkaImplCodec = EventReceiverKafkaImplCodec;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ActionDefinition } from '../../typedef/definition/ActionDefinition';
|
|
2
|
+
export declare class ActionDefinitionCodec {
|
|
3
|
+
static decodeArray(list: any[]): ActionDefinition[];
|
|
4
|
+
static decode(o: any): ActionDefinition;
|
|
5
|
+
static encode(def: ActionDefinition): any;
|
|
6
|
+
static encodeArray(list: ActionDefinition[]): any[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ActionDefinitionCodec = void 0;
|
|
4
|
+
const ActionDefinition_1 = require("../../typedef/definition/ActionDefinition");
|
|
5
|
+
const ActionType_1 = require("../../typedef/definition/urn/ActionType");
|
|
6
|
+
const DescriptionCodec_1 = require("./DescriptionCodec");
|
|
7
|
+
const Spec_1 = require("../../typedef/constant/Spec");
|
|
8
|
+
const ArgumentDefinitionCodec_1 = require("./ArgumentDefinitionCodec");
|
|
9
|
+
class ActionDefinitionCodec {
|
|
10
|
+
static decodeArray(list) {
|
|
11
|
+
const array = [];
|
|
12
|
+
list.forEach(o => {
|
|
13
|
+
array.push(ActionDefinitionCodec.decode(o));
|
|
14
|
+
});
|
|
15
|
+
return array;
|
|
16
|
+
}
|
|
17
|
+
static decode(o) {
|
|
18
|
+
const type = new ActionType_1.ActionType(o[Spec_1.Spec.TYPE]);
|
|
19
|
+
const description = DescriptionCodec_1.DescriptionCodec.decode(o[Spec_1.Spec.DESCRIPTION]);
|
|
20
|
+
const argumentsIn = ArgumentDefinitionCodec_1.ArgumentDefinitionCodec.decodeArray(o[Spec_1.Spec.IN]);
|
|
21
|
+
const argumentsOut = ArgumentDefinitionCodec_1.ArgumentDefinitionCodec.decodeArray(o[Spec_1.Spec.OUT]);
|
|
22
|
+
return new ActionDefinition_1.ActionDefinition(type, description, argumentsIn, argumentsOut);
|
|
23
|
+
}
|
|
24
|
+
static encode(def) {
|
|
25
|
+
const o = {
|
|
26
|
+
type: def.type.toString(),
|
|
27
|
+
description: DescriptionCodec_1.DescriptionCodec.encode(def.description)
|
|
28
|
+
};
|
|
29
|
+
if (def.in.length > 0) {
|
|
30
|
+
o[Spec_1.Spec.IN] = ArgumentDefinitionCodec_1.ArgumentDefinitionCodec.encodeArray(def.in);
|
|
31
|
+
}
|
|
32
|
+
if (def.out.length > 0) {
|
|
33
|
+
o[Spec_1.Spec.OUT] = ArgumentDefinitionCodec_1.ArgumentDefinitionCodec.encodeArray(def.out);
|
|
34
|
+
}
|
|
35
|
+
return o;
|
|
36
|
+
}
|
|
37
|
+
static encodeArray(list) {
|
|
38
|
+
return list.map(x => {
|
|
39
|
+
return ActionDefinitionCodec.encode(x);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.ActionDefinitionCodec = ActionDefinitionCodec;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ArgumentDefinition } from '../../typedef/definition/ArgumentDefinition';
|
|
2
|
+
export declare class ArgumentDefinitionCodec {
|
|
3
|
+
static decodeArray(list: any[]): ArgumentDefinition[];
|
|
4
|
+
static decodeString(s: string): ArgumentDefinition;
|
|
5
|
+
static decodeObject(o: any): ArgumentDefinition;
|
|
6
|
+
static encode(def: ArgumentDefinition): any;
|
|
7
|
+
static encodeArray(list: ArgumentDefinition[]): any[];
|
|
8
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ArgumentDefinitionCodec = void 0;
|
|
4
|
+
const ArgumentDefinition_1 = require("../../typedef/definition/ArgumentDefinition");
|
|
5
|
+
const PropertyType_1 = require("../../typedef/definition/urn/PropertyType");
|
|
6
|
+
const Spec_1 = require("../../typedef/constant/Spec");
|
|
7
|
+
class ArgumentDefinitionCodec {
|
|
8
|
+
static decodeArray(list) {
|
|
9
|
+
const array = [];
|
|
10
|
+
if (list != null) {
|
|
11
|
+
for (const o of list) {
|
|
12
|
+
if (typeof o === 'string') {
|
|
13
|
+
array.push(ArgumentDefinitionCodec.decodeString(o));
|
|
14
|
+
continue;
|
|
15
|
+
}
|
|
16
|
+
if (typeof o === 'object') {
|
|
17
|
+
array.push(ArgumentDefinitionCodec.decodeObject(o));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return array;
|
|
22
|
+
}
|
|
23
|
+
static decodeString(s) {
|
|
24
|
+
return new ArgumentDefinition_1.ArgumentDefinition(new PropertyType_1.PropertyType(s));
|
|
25
|
+
}
|
|
26
|
+
static decodeObject(o) {
|
|
27
|
+
const type = new PropertyType_1.PropertyType(o[Spec_1.Spec.PROPERTY]);
|
|
28
|
+
const def = new ArgumentDefinition_1.ArgumentDefinition(type);
|
|
29
|
+
const repeat = o[Spec_1.Spec.REPEAT];
|
|
30
|
+
if (repeat != null) {
|
|
31
|
+
def.minRepeat = repeat[0];
|
|
32
|
+
def.maxRepeat = repeat[1];
|
|
33
|
+
}
|
|
34
|
+
return def;
|
|
35
|
+
}
|
|
36
|
+
static encode(def) {
|
|
37
|
+
return {
|
|
38
|
+
property: def.type.toString(),
|
|
39
|
+
repeat: [def.minRepeat, def.maxRepeat]
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
static encodeArray(list) {
|
|
43
|
+
return list.map(x => {
|
|
44
|
+
return ArgumentDefinitionCodec.encode(x);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.ArgumentDefinitionCodec = ArgumentDefinitionCodec;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CategoryDefinition } from '../../typedef/definition/CategoryDefinition';
|
|
2
|
+
export declare class CategoryDefinitionCodec {
|
|
3
|
+
static decodeArray(list: any[]): CategoryDefinition[];
|
|
4
|
+
static decode(o: any): CategoryDefinition;
|
|
5
|
+
static encode(def: CategoryDefinition): any;
|
|
6
|
+
static encodeArray(list: CategoryDefinition[]): any[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CategoryDefinitionCodec = void 0;
|
|
4
|
+
const DescriptionCodec_1 = require("./DescriptionCodec");
|
|
5
|
+
const CategoryDefinition_1 = require("../../typedef/definition/CategoryDefinition");
|
|
6
|
+
const Spec_1 = require("../../typedef/constant/Spec");
|
|
7
|
+
class CategoryDefinitionCodec {
|
|
8
|
+
static decodeArray(list) {
|
|
9
|
+
const array = [];
|
|
10
|
+
list.forEach(o => {
|
|
11
|
+
array.push(CategoryDefinitionCodec.decode(o));
|
|
12
|
+
});
|
|
13
|
+
return array;
|
|
14
|
+
}
|
|
15
|
+
static decode(o) {
|
|
16
|
+
const name = o[Spec_1.Spec.NAME];
|
|
17
|
+
const description = DescriptionCodec_1.DescriptionCodec.decode(o[Spec_1.Spec.DESCRIPTION]);
|
|
18
|
+
return new CategoryDefinition_1.CategoryDefinition(name, description);
|
|
19
|
+
}
|
|
20
|
+
static encode(def) {
|
|
21
|
+
return {
|
|
22
|
+
name: def.name,
|
|
23
|
+
description: DescriptionCodec_1.DescriptionCodec.encode(def.description)
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
static encodeArray(list) {
|
|
27
|
+
return list.map(x => {
|
|
28
|
+
return CategoryDefinitionCodec.encode(x);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.CategoryDefinitionCodec = CategoryDefinitionCodec;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DescriptionCodec = void 0;
|
|
4
|
+
const Spec_1 = require("../../typedef/constant/Spec");
|
|
5
|
+
class DescriptionCodec {
|
|
6
|
+
static decode(o) {
|
|
7
|
+
const description = new Map();
|
|
8
|
+
if (typeof o === 'string') {
|
|
9
|
+
description.set(Spec_1.Spec.EN_US, o);
|
|
10
|
+
}
|
|
11
|
+
else if (typeof o === 'object') {
|
|
12
|
+
Object.keys(o).forEach(x => {
|
|
13
|
+
description.set(x.toString(), o[x]);
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return description;
|
|
17
|
+
}
|
|
18
|
+
static encode(description) {
|
|
19
|
+
if (description.size === 0) {
|
|
20
|
+
return '';
|
|
21
|
+
}
|
|
22
|
+
if (description.size === 1) {
|
|
23
|
+
return description.get(Spec_1.Spec.EN_US);
|
|
24
|
+
}
|
|
25
|
+
const o = Object.create(null);
|
|
26
|
+
description.forEach((value, key) => {
|
|
27
|
+
o[key.toString()] = value;
|
|
28
|
+
});
|
|
29
|
+
return o;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.DescriptionCodec = DescriptionCodec;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DeviceDefinition } from '../../typedef/definition/DeviceDefinition';
|
|
2
|
+
export declare class DeviceDefinitionCodec {
|
|
3
|
+
static decodeArray(list: any[]): DeviceDefinition[];
|
|
4
|
+
static decode(o: any): DeviceDefinition;
|
|
5
|
+
static encode(def: DeviceDefinition): any;
|
|
6
|
+
static encodeArray(list: DeviceDefinition[]): any[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeviceDefinitionCodec = void 0;
|
|
4
|
+
const Spec_1 = require("../../typedef/constant/Spec");
|
|
5
|
+
const DeviceDefinition_1 = require("../../typedef/definition/DeviceDefinition");
|
|
6
|
+
const DeviceType_1 = require("../../typedef/definition/urn/DeviceType");
|
|
7
|
+
const DescriptionCodec_1 = require("./DescriptionCodec");
|
|
8
|
+
class DeviceDefinitionCodec {
|
|
9
|
+
static decodeArray(list) {
|
|
10
|
+
const array = [];
|
|
11
|
+
list.forEach(o => {
|
|
12
|
+
array.push(DeviceDefinitionCodec.decode(o));
|
|
13
|
+
});
|
|
14
|
+
return array;
|
|
15
|
+
}
|
|
16
|
+
static decode(o) {
|
|
17
|
+
const category = o.category;
|
|
18
|
+
const type = new DeviceType_1.DeviceType(o[Spec_1.Spec.TYPE]);
|
|
19
|
+
const description = DescriptionCodec_1.DescriptionCodec.decode(o[Spec_1.Spec.DESCRIPTION]);
|
|
20
|
+
return new DeviceDefinition_1.DeviceDefinition(category, type, description);
|
|
21
|
+
}
|
|
22
|
+
static encode(def) {
|
|
23
|
+
const o = {
|
|
24
|
+
type: def.type.toString(),
|
|
25
|
+
description: DescriptionCodec_1.DescriptionCodec.encode(def.description)
|
|
26
|
+
};
|
|
27
|
+
if (def.category != null) {
|
|
28
|
+
o.category = def.category;
|
|
29
|
+
}
|
|
30
|
+
return o;
|
|
31
|
+
}
|
|
32
|
+
static encodeArray(list) {
|
|
33
|
+
return list.map(x => {
|
|
34
|
+
return DeviceDefinitionCodec.encode(x);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.DeviceDefinitionCodec = DeviceDefinitionCodec;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { EventDefinition } from '../../typedef/definition/EventDefinition';
|
|
2
|
+
export declare class EventDefinitionCodec {
|
|
3
|
+
static decodeArray(list: any[]): EventDefinition[];
|
|
4
|
+
static decode(o: any): EventDefinition;
|
|
5
|
+
static encode(def: EventDefinition): any;
|
|
6
|
+
static encodeArray(list: EventDefinition[]): any[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EventDefinitionCodec = void 0;
|
|
4
|
+
const EventDefinition_1 = require("../../typedef/definition/EventDefinition");
|
|
5
|
+
const EventType_1 = require("../../typedef/definition/urn/EventType");
|
|
6
|
+
const DescriptionCodec_1 = require("./DescriptionCodec");
|
|
7
|
+
const ArgumentDefinitionCodec_1 = require("./ArgumentDefinitionCodec");
|
|
8
|
+
const Spec_1 = require("../../typedef/constant/Spec");
|
|
9
|
+
class EventDefinitionCodec {
|
|
10
|
+
static decodeArray(list) {
|
|
11
|
+
const array = [];
|
|
12
|
+
list.forEach(o => {
|
|
13
|
+
array.push(EventDefinitionCodec.decode(o));
|
|
14
|
+
});
|
|
15
|
+
return array;
|
|
16
|
+
}
|
|
17
|
+
static decode(o) {
|
|
18
|
+
const type = new EventType_1.EventType(o[Spec_1.Spec.TYPE]);
|
|
19
|
+
const description = DescriptionCodec_1.DescriptionCodec.decode(o[Spec_1.Spec.DESCRIPTION]);
|
|
20
|
+
const list = ArgumentDefinitionCodec_1.ArgumentDefinitionCodec.decodeArray(o[Spec_1.Spec.ARGUMENTS]);
|
|
21
|
+
return new EventDefinition_1.EventDefinition(type, description, list);
|
|
22
|
+
}
|
|
23
|
+
static encode(def) {
|
|
24
|
+
const o = {
|
|
25
|
+
type: def.type.toString(),
|
|
26
|
+
description: DescriptionCodec_1.DescriptionCodec.encode(def.description)
|
|
27
|
+
};
|
|
28
|
+
if (def.arguments.length > 0) {
|
|
29
|
+
o[Spec_1.Spec.ARGUMENTS] = ArgumentDefinitionCodec_1.ArgumentDefinitionCodec.encodeArray(def.arguments);
|
|
30
|
+
}
|
|
31
|
+
return o;
|
|
32
|
+
}
|
|
33
|
+
static encodeArray(list) {
|
|
34
|
+
return list.map(x => {
|
|
35
|
+
return EventDefinitionCodec.encode(x);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.EventDefinitionCodec = EventDefinitionCodec;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FormatDefinition } from '../../typedef/definition/FormatDefinition';
|
|
2
|
+
export declare class FormatDefinitionCodec {
|
|
3
|
+
static decodeArray(list: any[]): FormatDefinition[];
|
|
4
|
+
static decode(o: any): FormatDefinition;
|
|
5
|
+
static encode(def: FormatDefinition): any;
|
|
6
|
+
static encodeArray(list: FormatDefinition[]): any[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FormatDefinitionCodec = void 0;
|
|
4
|
+
const FormatDefinition_1 = require("../../typedef/definition/FormatDefinition");
|
|
5
|
+
const FormatType_1 = require("../../typedef/definition/urn/FormatType");
|
|
6
|
+
const DescriptionCodec_1 = require("./DescriptionCodec");
|
|
7
|
+
const Spec_1 = require("../../typedef/constant/Spec");
|
|
8
|
+
class FormatDefinitionCodec {
|
|
9
|
+
static decodeArray(list) {
|
|
10
|
+
const array = [];
|
|
11
|
+
if (list != null) {
|
|
12
|
+
for (const o of list) {
|
|
13
|
+
array.push(FormatDefinitionCodec.decode(o));
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return array;
|
|
17
|
+
}
|
|
18
|
+
static decode(o) {
|
|
19
|
+
const type = FormatType_1.FormatType.parse(o[Spec_1.Spec.TYPE] || '');
|
|
20
|
+
return new FormatDefinition_1.FormatDefinition(type, DescriptionCodec_1.DescriptionCodec.decode(o[Spec_1.Spec.DESCRIPTION]));
|
|
21
|
+
}
|
|
22
|
+
static encode(def) {
|
|
23
|
+
return {
|
|
24
|
+
type: def.type.toString(),
|
|
25
|
+
description: DescriptionCodec_1.DescriptionCodec.encode(def.description)
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
static encodeArray(list) {
|
|
29
|
+
return list.map(x => {
|
|
30
|
+
return FormatDefinitionCodec.encode(x);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.FormatDefinitionCodec = FormatDefinitionCodec;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { NamespaceDefinition } from '../../typedef/definition/NamespaceDefinition';
|
|
2
|
+
export declare class NamespaceDefinitionCodec {
|
|
3
|
+
static decodeArray(list: any[]): NamespaceDefinition[];
|
|
4
|
+
static decode(o: any): NamespaceDefinition;
|
|
5
|
+
static encode(def: NamespaceDefinition): any;
|
|
6
|
+
static encodeArray(list: NamespaceDefinition[]): any[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NamespaceDefinitionCodec = void 0;
|
|
4
|
+
const NamespaceDefinition_1 = require("../../typedef/definition/NamespaceDefinition");
|
|
5
|
+
const Spec_1 = require("../../typedef/constant/Spec");
|
|
6
|
+
const DescriptionCodec_1 = require("./DescriptionCodec");
|
|
7
|
+
class NamespaceDefinitionCodec {
|
|
8
|
+
static decodeArray(list) {
|
|
9
|
+
const array = [];
|
|
10
|
+
list.forEach(o => {
|
|
11
|
+
array.push(NamespaceDefinitionCodec.decode(o));
|
|
12
|
+
});
|
|
13
|
+
return array;
|
|
14
|
+
}
|
|
15
|
+
static decode(o) {
|
|
16
|
+
const namespace = o[Spec_1.Spec.NAMESPACE];
|
|
17
|
+
const description = DescriptionCodec_1.DescriptionCodec.decode(o[Spec_1.Spec.DESCRIPTION]);
|
|
18
|
+
return new NamespaceDefinition_1.NamespaceDefinition(namespace, description);
|
|
19
|
+
}
|
|
20
|
+
static encode(def) {
|
|
21
|
+
return {
|
|
22
|
+
namespace: def.namespace,
|
|
23
|
+
description: DescriptionCodec_1.DescriptionCodec.encode(def.description)
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
static encodeArray(list) {
|
|
27
|
+
return list.map(x => {
|
|
28
|
+
return NamespaceDefinitionCodec.encode(x);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.NamespaceDefinitionCodec = NamespaceDefinitionCodec;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PropertyType } from '../../typedef/definition/urn/PropertyType';
|
|
2
|
+
import { PropertyDefinition } from '../../typedef/definition/PropertyDefinition';
|
|
3
|
+
export declare class PropertyDefinitionCodec {
|
|
4
|
+
static decodeMembers(array: any[]): PropertyType[];
|
|
5
|
+
static decodeArray(list: any[]): PropertyDefinition[];
|
|
6
|
+
static decode(o: any): PropertyDefinition;
|
|
7
|
+
static encode(def: PropertyDefinition): any;
|
|
8
|
+
static encodeArray(list: PropertyDefinition[]): any[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PropertyDefinitionCodec = void 0;
|
|
4
|
+
const Spec_1 = require("../../typedef/constant/Spec");
|
|
5
|
+
const PropertyType_1 = require("../../typedef/definition/urn/PropertyType");
|
|
6
|
+
const PropertyDefinition_1 = require("../../typedef/definition/PropertyDefinition");
|
|
7
|
+
const DescriptionCodec_1 = require("./DescriptionCodec");
|
|
8
|
+
const DataFormat_1 = require("../../typedef/definition/property/data/DataFormat");
|
|
9
|
+
const Access_1 = require("../../typedef/definition/property/Access");
|
|
10
|
+
const ValueListCodec_1 = require("./ValueListCodec");
|
|
11
|
+
const ValueRangeCodec_1 = require("./ValueRangeCodec");
|
|
12
|
+
const ValueList_1 = require("../../typedef/definition/property/ValueList");
|
|
13
|
+
const ValueRange_1 = require("../../typedef/definition/property/ValueRange");
|
|
14
|
+
const PropertyTypeCodec_1 = require("./type/PropertyTypeCodec");
|
|
15
|
+
class PropertyDefinitionCodec {
|
|
16
|
+
static decodeMembers(array) {
|
|
17
|
+
const list = [];
|
|
18
|
+
if (array === null || array === void 0 ? void 0 : array.length) {
|
|
19
|
+
for (const o of array) {
|
|
20
|
+
// if (typeof o === 'number') {
|
|
21
|
+
// list.push(o);
|
|
22
|
+
// }
|
|
23
|
+
if (typeof o === 'string') {
|
|
24
|
+
list.push(new PropertyType_1.PropertyType(o));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return list;
|
|
29
|
+
}
|
|
30
|
+
static decodeArray(list) {
|
|
31
|
+
const array = [];
|
|
32
|
+
list.forEach(json => {
|
|
33
|
+
array.push(PropertyDefinitionCodec.decode(json));
|
|
34
|
+
});
|
|
35
|
+
return array;
|
|
36
|
+
}
|
|
37
|
+
static decode(o) {
|
|
38
|
+
const type = new PropertyType_1.PropertyType(o[Spec_1.Spec.TYPE]);
|
|
39
|
+
const description = DescriptionCodec_1.DescriptionCodec.decode(o[Spec_1.Spec.DESCRIPTION]);
|
|
40
|
+
const def = new PropertyDefinition_1.PropertyDefinition(type, description);
|
|
41
|
+
def.format = (0, DataFormat_1.DataFormatFromString)(o[Spec_1.Spec.FORMAT]);
|
|
42
|
+
def.access = Access_1.Access.create(o[Spec_1.Spec.ACCESS]);
|
|
43
|
+
def.unit = o[Spec_1.Spec.UNIT];
|
|
44
|
+
if (def.format === DataFormat_1.DataFormat.COMBINATION) {
|
|
45
|
+
def.members = PropertyDefinitionCodec.decodeMembers(o[Spec_1.Spec.MEMBERS]);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
if (o.hasOwnProperty(Spec_1.Spec.VALUE_LIST) && o.hasOwnProperty(Spec_1.Spec.VALUE_RANGE)) {
|
|
49
|
+
throw new Error('value-list & value-range both exist!');
|
|
50
|
+
}
|
|
51
|
+
if (o.hasOwnProperty(Spec_1.Spec.VALUE_LIST)) {
|
|
52
|
+
def.constraintValue = ValueListCodec_1.ValueListCodec.decode(def.format, o[Spec_1.Spec.VALUE_LIST]);
|
|
53
|
+
}
|
|
54
|
+
if (o.hasOwnProperty(Spec_1.Spec.VALUE_RANGE)) {
|
|
55
|
+
def.constraintValue = ValueRangeCodec_1.ValueRangeCodec.decode(def.format, o[Spec_1.Spec.VALUE_RANGE]);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return def;
|
|
59
|
+
}
|
|
60
|
+
static encode(def) {
|
|
61
|
+
var _a;
|
|
62
|
+
const o = {
|
|
63
|
+
type: def.type.toString(),
|
|
64
|
+
description: DescriptionCodec_1.DescriptionCodec.encode(def.description),
|
|
65
|
+
format: (0, DataFormat_1.DataFormatToString)(def.format),
|
|
66
|
+
access: def.access.toList()
|
|
67
|
+
};
|
|
68
|
+
if (def.constraintValue != null) {
|
|
69
|
+
if (def.constraintValue instanceof ValueList_1.ValueList) {
|
|
70
|
+
o[Spec_1.Spec.VALUE_LIST] = ValueListCodec_1.ValueListCodec.encode(def.constraintValue);
|
|
71
|
+
}
|
|
72
|
+
if (def.constraintValue instanceof ValueRange_1.ValueRange) {
|
|
73
|
+
o[Spec_1.Spec.VALUE_RANGE] = ValueRangeCodec_1.ValueRangeCodec.encode(def.constraintValue);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (def.unit != null) {
|
|
77
|
+
o[Spec_1.Spec.UNIT] = def.unit;
|
|
78
|
+
}
|
|
79
|
+
if (((_a = def.members) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
80
|
+
if (def.members[0] instanceof PropertyType_1.PropertyType) {
|
|
81
|
+
o[Spec_1.Spec.MEMBERS] = PropertyTypeCodec_1.PropertyTypeCodec.encodeArray(def.members);
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
o[Spec_1.Spec.MEMBERS] = def.members;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return o;
|
|
88
|
+
}
|
|
89
|
+
static encodeArray(list) {
|
|
90
|
+
return list.map(x => {
|
|
91
|
+
return PropertyDefinitionCodec.encode(x);
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
exports.PropertyDefinitionCodec = PropertyDefinitionCodec;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ServiceDefinition } from '../../typedef/definition/ServiceDefinition';
|
|
2
|
+
export declare class ServiceDefinitionCodec {
|
|
3
|
+
static decodeArray(list: any[]): ServiceDefinition[];
|
|
4
|
+
static decode(o: any): ServiceDefinition;
|
|
5
|
+
static encode(def: ServiceDefinition): any;
|
|
6
|
+
static encodeArray(list: ServiceDefinition[]): any[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ServiceDefinitionCodec = void 0;
|
|
4
|
+
const ServiceDefinition_1 = require("../../typedef/definition/ServiceDefinition");
|
|
5
|
+
const ServiceType_1 = require("../../typedef/definition/urn/ServiceType");
|
|
6
|
+
const DescriptionCodec_1 = require("./DescriptionCodec");
|
|
7
|
+
const PropertyTypeCodec_1 = require("./type/PropertyTypeCodec");
|
|
8
|
+
const ActionTypeCodec_1 = require("./type/ActionTypeCodec");
|
|
9
|
+
const EventTypeCodec_1 = require("./type/EventTypeCodec");
|
|
10
|
+
const Spec_1 = require("../../typedef/constant/Spec");
|
|
11
|
+
class ServiceDefinitionCodec {
|
|
12
|
+
static decodeArray(list) {
|
|
13
|
+
const array = [];
|
|
14
|
+
list.forEach(o => {
|
|
15
|
+
array.push(ServiceDefinitionCodec.decode(o));
|
|
16
|
+
});
|
|
17
|
+
return array;
|
|
18
|
+
}
|
|
19
|
+
static decode(o) {
|
|
20
|
+
const type = new ServiceType_1.ServiceType(o[Spec_1.Spec.TYPE]);
|
|
21
|
+
const description = DescriptionCodec_1.DescriptionCodec.decode(o[Spec_1.Spec.DESCRIPTION]);
|
|
22
|
+
const requiredProperties = PropertyTypeCodec_1.PropertyTypeCodec.decodeArray(o[Spec_1.Spec.REQUIRED_PROPERTIES]);
|
|
23
|
+
const optionalProperties = PropertyTypeCodec_1.PropertyTypeCodec.decodeArray(o[Spec_1.Spec.OPTIONAL_PROPERTIES]);
|
|
24
|
+
const requiredActions = ActionTypeCodec_1.ActionTypeCodec.decodeArray(o[Spec_1.Spec.REQUIRED_ACTIONS]);
|
|
25
|
+
const optionalActions = ActionTypeCodec_1.ActionTypeCodec.decodeArray(o[Spec_1.Spec.OPTIONAL_ACTIONS]);
|
|
26
|
+
const requiredEvents = EventTypeCodec_1.EventTypeCodec.decodeArray(o[Spec_1.Spec.REQUIRED_EVENTS]);
|
|
27
|
+
const optionalEvents = EventTypeCodec_1.EventTypeCodec.decodeArray(o[Spec_1.Spec.OPTIONAL_EVENTS]);
|
|
28
|
+
if (type.ns === 'homekit-spec') {
|
|
29
|
+
type._property_addable = true;
|
|
30
|
+
type._action_addable = false;
|
|
31
|
+
type._event_addable = false;
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
type._property_addable = true;
|
|
35
|
+
type._action_addable = true;
|
|
36
|
+
type._event_addable = true;
|
|
37
|
+
}
|
|
38
|
+
return new ServiceDefinition_1.ServiceDefinition(type, description, requiredProperties, optionalProperties, requiredActions, optionalActions, requiredEvents, optionalEvents);
|
|
39
|
+
}
|
|
40
|
+
static encode(def) {
|
|
41
|
+
const o = {
|
|
42
|
+
type: def.type.toString(),
|
|
43
|
+
description: DescriptionCodec_1.DescriptionCodec.encode(def.description)
|
|
44
|
+
};
|
|
45
|
+
if (def.requiredProperties.length > 0) {
|
|
46
|
+
o[Spec_1.Spec.REQUIRED_PROPERTIES] = PropertyTypeCodec_1.PropertyTypeCodec.encodeArray(def.requiredProperties);
|
|
47
|
+
}
|
|
48
|
+
if (def.optionalProperties.length > 0) {
|
|
49
|
+
o[Spec_1.Spec.OPTIONAL_PROPERTIES] = PropertyTypeCodec_1.PropertyTypeCodec.encodeArray(def.optionalProperties);
|
|
50
|
+
}
|
|
51
|
+
if (def.requiredActions.length > 0) {
|
|
52
|
+
o[Spec_1.Spec.REQUIRED_ACTIONS] = ActionTypeCodec_1.ActionTypeCodec.encodeArray(def.requiredActions);
|
|
53
|
+
}
|
|
54
|
+
if (def.optionalActions.length > 0) {
|
|
55
|
+
o[Spec_1.Spec.OPTIONAL_ACTIONS] = ActionTypeCodec_1.ActionTypeCodec.encodeArray(def.optionalActions);
|
|
56
|
+
}
|
|
57
|
+
if (def.requiredEvents.length > 0) {
|
|
58
|
+
o[Spec_1.Spec.REQUIRED_EVENTS] = EventTypeCodec_1.EventTypeCodec.encodeArray(def.requiredEvents);
|
|
59
|
+
}
|
|
60
|
+
if (def.optionalEvents.length > 0) {
|
|
61
|
+
o[Spec_1.Spec.OPTIONAL_EVENTS] = EventTypeCodec_1.EventTypeCodec.encodeArray(def.optionalEvents);
|
|
62
|
+
}
|
|
63
|
+
return o;
|
|
64
|
+
}
|
|
65
|
+
static encodeArray(list) {
|
|
66
|
+
return list.map(x => {
|
|
67
|
+
return ServiceDefinitionCodec.encode(x);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.ServiceDefinitionCodec = ServiceDefinitionCodec;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { UnitDefinition } from '../../typedef/definition/UnitDefinition';
|
|
2
|
+
export declare class UnitDefinitionCodec {
|
|
3
|
+
static decodeArray(list: any[]): UnitDefinition[];
|
|
4
|
+
static decode(o: any): UnitDefinition;
|
|
5
|
+
static encode(def: UnitDefinition): any;
|
|
6
|
+
static encodeArray(list: UnitDefinition[]): any[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UnitDefinitionCodec = void 0;
|
|
4
|
+
const Spec_1 = require("../../typedef/constant/Spec");
|
|
5
|
+
const UnitDefinition_1 = require("../../typedef/definition/UnitDefinition");
|
|
6
|
+
const UnitType_1 = require("../../typedef/definition/urn/UnitType");
|
|
7
|
+
const DescriptionCodec_1 = require("./DescriptionCodec");
|
|
8
|
+
class UnitDefinitionCodec {
|
|
9
|
+
static decodeArray(list) {
|
|
10
|
+
const array = [];
|
|
11
|
+
if (list != null) {
|
|
12
|
+
for (const o of list) {
|
|
13
|
+
array.push(UnitDefinitionCodec.decode(o));
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return array;
|
|
17
|
+
}
|
|
18
|
+
static decode(o) {
|
|
19
|
+
const type = UnitType_1.UnitType.parse(o[Spec_1.Spec.TYPE] || '');
|
|
20
|
+
return new UnitDefinition_1.UnitDefinition(type, DescriptionCodec_1.DescriptionCodec.decode(o[Spec_1.Spec.DESCRIPTION]));
|
|
21
|
+
}
|
|
22
|
+
static encode(def) {
|
|
23
|
+
return {
|
|
24
|
+
type: def.type.toString(),
|
|
25
|
+
description: DescriptionCodec_1.DescriptionCodec.encode(def.description)
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
static encodeArray(list) {
|
|
29
|
+
return list.map(x => {
|
|
30
|
+
return UnitDefinitionCodec.encode(x);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.UnitDefinitionCodec = UnitDefinitionCodec;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ValueList } from '../../typedef/definition/property/ValueList';
|
|
2
|
+
import { DataFormat } from '../../typedef/definition/property/data/DataFormat';
|
|
3
|
+
export declare class ValueListCodec {
|
|
4
|
+
static decode(format: DataFormat, array: any[]): ValueList;
|
|
5
|
+
static encode(list: ValueList): any[];
|
|
6
|
+
}
|