@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,10 @@
|
|
|
1
|
+
import { ArgumentOperation } from '../../typedef/operation/ArgumentOperation';
|
|
2
|
+
export declare class ArgumentOperationCodec {
|
|
3
|
+
static decodeArray(list: any[]): ArgumentOperation[];
|
|
4
|
+
static decodeObjet(o: any): ArgumentOperation[];
|
|
5
|
+
private static decodeArgument1;
|
|
6
|
+
private static decodeArgument2;
|
|
7
|
+
static decode(o: any): ArgumentOperation;
|
|
8
|
+
static encode(argument: ArgumentOperation): any;
|
|
9
|
+
static encodeArray(compact: boolean, list: ArgumentOperation[]): any[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ArgumentOperationCodec = void 0;
|
|
4
|
+
const Spec_1 = require("../../typedef/constant/Spec");
|
|
5
|
+
const ArgumentOperation_1 = require("../../typedef/operation/ArgumentOperation");
|
|
6
|
+
class ArgumentOperationCodec {
|
|
7
|
+
static decodeArray(list) {
|
|
8
|
+
const array = [];
|
|
9
|
+
if (list != null) {
|
|
10
|
+
list.forEach(o => {
|
|
11
|
+
const a = ArgumentOperationCodec.decode(o);
|
|
12
|
+
if (a != null) {
|
|
13
|
+
array.push(a);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
return array;
|
|
18
|
+
}
|
|
19
|
+
static decodeObjet(o) {
|
|
20
|
+
const list = [];
|
|
21
|
+
Object.keys(o).forEach(key => {
|
|
22
|
+
if (key.startsWith('#')) {
|
|
23
|
+
const iid = key.substring(1);
|
|
24
|
+
const k = o[key];
|
|
25
|
+
if (k instanceof Array) {
|
|
26
|
+
list.push(ArgumentOperationCodec.decodeArgument1(iid, k));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
return list;
|
|
31
|
+
}
|
|
32
|
+
static decodeArgument1(piid, values) {
|
|
33
|
+
return ArgumentOperationCodec.decodeArgument2(Number.parseInt(piid), values);
|
|
34
|
+
}
|
|
35
|
+
static decodeArgument2(piid, values) {
|
|
36
|
+
return new ArgumentOperation_1.ArgumentOperation(piid, values);
|
|
37
|
+
}
|
|
38
|
+
static decode(o) {
|
|
39
|
+
if (typeof o === 'number') {
|
|
40
|
+
return new ArgumentOperation_1.ArgumentOperation(o, []);
|
|
41
|
+
}
|
|
42
|
+
return new ArgumentOperation_1.ArgumentOperation(o[Spec_1.Spec.PIID] || 0, o[Spec_1.Spec.VALUES] || []);
|
|
43
|
+
}
|
|
44
|
+
static encode(argument) {
|
|
45
|
+
return {
|
|
46
|
+
piid: argument.piid,
|
|
47
|
+
values: argument.values
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
static encodeArray(compact, list) {
|
|
51
|
+
if (compact) {
|
|
52
|
+
const object = {};
|
|
53
|
+
for (let i = 0; i < list.length; i++) {
|
|
54
|
+
object['#' + list[i].piid] = list[i].values;
|
|
55
|
+
}
|
|
56
|
+
return object;
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
return list.map(x => {
|
|
60
|
+
return ArgumentOperationCodec.encode(x);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
exports.ArgumentOperationCodec = ArgumentOperationCodec;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare class CombinationValueCodec {
|
|
2
|
+
static decodeObject(o: any): Map<number, any>;
|
|
3
|
+
static decodeArray(array: any[]): Map<number, any>;
|
|
4
|
+
static encodeWithCompact(compact: boolean, members: Map<any, any>): any;
|
|
5
|
+
static encode(members: Map<number, any>): any;
|
|
6
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CombinationValueCodec = void 0;
|
|
4
|
+
class CombinationValueCodec {
|
|
5
|
+
static decodeObject(o) {
|
|
6
|
+
const members = new Map();
|
|
7
|
+
// tslint:disable-next-line:forin
|
|
8
|
+
for (const key in o) {
|
|
9
|
+
const piid = key.substring(1);
|
|
10
|
+
members.set(parseInt(piid, 10), o[key]);
|
|
11
|
+
}
|
|
12
|
+
return members;
|
|
13
|
+
}
|
|
14
|
+
static decodeArray(array) {
|
|
15
|
+
const members = new Map();
|
|
16
|
+
if (array === null || array === void 0 ? void 0 : array.length) {
|
|
17
|
+
array.forEach(o => {
|
|
18
|
+
if (typeof o === 'object') {
|
|
19
|
+
const piid = o.piid;
|
|
20
|
+
const value = o.value;
|
|
21
|
+
// value = [{}, {}, {}],这里被识别为object
|
|
22
|
+
if (typeof value === 'object') {
|
|
23
|
+
members.set(piid, CombinationValueCodec.decodeArray(value));
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
members.set(piid, value);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
return members;
|
|
32
|
+
}
|
|
33
|
+
static encodeWithCompact(compact, members) {
|
|
34
|
+
const keys = Array.from(members.keys());
|
|
35
|
+
if (compact) {
|
|
36
|
+
const o = {};
|
|
37
|
+
for (const key of keys) {
|
|
38
|
+
const value = members.get(key);
|
|
39
|
+
if (typeof value === 'object') {
|
|
40
|
+
o[`#${key}`] = CombinationValueCodec.encodeWithCompact(compact, value);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
o[`#${key}`] = value;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return o;
|
|
47
|
+
}
|
|
48
|
+
const array = [];
|
|
49
|
+
for (const key of keys) {
|
|
50
|
+
const value = members.get(key);
|
|
51
|
+
if (typeof value === 'object') {
|
|
52
|
+
array.push({
|
|
53
|
+
piid: key,
|
|
54
|
+
value: CombinationValueCodec.encodeWithCompact(compact, value)
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
array.push({
|
|
59
|
+
piid: key,
|
|
60
|
+
value: value
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return array;
|
|
65
|
+
}
|
|
66
|
+
static encode(members) {
|
|
67
|
+
return this.encodeWithCompact(false, members);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.CombinationValueCodec = CombinationValueCodec;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AbstractOperationCodec } from './AbstractOperationCodec';
|
|
2
|
+
import { EventOperation } from '../../typedef/operation/EventOperation';
|
|
3
|
+
export declare class EventOperationCodecQuery extends AbstractOperationCodec<EventOperation, any> {
|
|
4
|
+
decodeObject(o: any): EventOperation;
|
|
5
|
+
encodeObject(event: EventOperation): any;
|
|
6
|
+
}
|
|
7
|
+
export declare class EventOperationCodecResult extends AbstractOperationCodec<EventOperation, any> {
|
|
8
|
+
decodeObject(o: any): EventOperation;
|
|
9
|
+
encodeObject(event: EventOperation): any;
|
|
10
|
+
}
|
|
11
|
+
export declare class EventOperationCodec {
|
|
12
|
+
static Query: EventOperationCodecQuery;
|
|
13
|
+
static Result: EventOperationCodecResult;
|
|
14
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EventOperationCodec = exports.EventOperationCodecResult = exports.EventOperationCodecQuery = void 0;
|
|
4
|
+
const Spec_1 = require("../../typedef/constant/Spec");
|
|
5
|
+
const AbstractOperationCodec_1 = require("./AbstractOperationCodec");
|
|
6
|
+
const EventOperation_1 = require("../../typedef/operation/EventOperation");
|
|
7
|
+
const EventID_1 = require("../../typedef/xid/EventID");
|
|
8
|
+
const ArgumentOperationCodec_1 = require("./ArgumentOperationCodec");
|
|
9
|
+
class EventOperationCodecQuery extends AbstractOperationCodec_1.AbstractOperationCodec {
|
|
10
|
+
decodeObject(o) {
|
|
11
|
+
const event = new EventOperation_1.EventOperation();
|
|
12
|
+
event.eid = EventID_1.EventID.parse(o[Spec_1.Spec.EID]);
|
|
13
|
+
event.oid = o[Spec_1.Spec.OID] || '';
|
|
14
|
+
if (o[Spec_1.Spec.ARGUMENTS] != null) {
|
|
15
|
+
if (o[Spec_1.Spec.ARGUMENTS] instanceof Array) {
|
|
16
|
+
event.setArguments(ArgumentOperationCodec_1.ArgumentOperationCodec.decodeArray(o[Spec_1.Spec.ARGUMENTS]));
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
event.argumentsCompact = true;
|
|
20
|
+
event.setArguments(ArgumentOperationCodec_1.ArgumentOperationCodec.decodeObjet(o[Spec_1.Spec.ARGUMENTS]));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return event;
|
|
24
|
+
}
|
|
25
|
+
encodeObject(event) {
|
|
26
|
+
const object = {
|
|
27
|
+
eid: event.eid.toString(),
|
|
28
|
+
oid: event.oid
|
|
29
|
+
};
|
|
30
|
+
if (event.getArguments().length > 0) {
|
|
31
|
+
object[Spec_1.Spec.ARGUMENTS] = ArgumentOperationCodec_1.ArgumentOperationCodec.encodeArray(event.argumentsCompact, event.getArguments());
|
|
32
|
+
}
|
|
33
|
+
return object;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.EventOperationCodecQuery = EventOperationCodecQuery;
|
|
37
|
+
class EventOperationCodecResult extends AbstractOperationCodec_1.AbstractOperationCodec {
|
|
38
|
+
decodeObject(o) {
|
|
39
|
+
const event = new EventOperation_1.EventOperation();
|
|
40
|
+
event.eid = EventID_1.EventID.parse(o[Spec_1.Spec.EID]);
|
|
41
|
+
event.status = o[Spec_1.Spec.STATUS];
|
|
42
|
+
if (event.status !== 0) {
|
|
43
|
+
event.description = o[Spec_1.Spec.DESCRIPTION];
|
|
44
|
+
}
|
|
45
|
+
return event;
|
|
46
|
+
}
|
|
47
|
+
encodeObject(event) {
|
|
48
|
+
const object = {
|
|
49
|
+
eid: event.eid.toString(),
|
|
50
|
+
status: event.status
|
|
51
|
+
};
|
|
52
|
+
if (event.status !== 0) {
|
|
53
|
+
object.description = event.description;
|
|
54
|
+
}
|
|
55
|
+
return object;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.EventOperationCodecResult = EventOperationCodecResult;
|
|
59
|
+
class EventOperationCodec {
|
|
60
|
+
}
|
|
61
|
+
exports.EventOperationCodec = EventOperationCodec;
|
|
62
|
+
EventOperationCodec.Query = new EventOperationCodecQuery();
|
|
63
|
+
EventOperationCodec.Result = new EventOperationCodecResult();
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { AbstractOperationCodec } from './AbstractOperationCodec';
|
|
2
|
+
import { PropertyOperation } from '../../typedef/operation/PropertyOperation';
|
|
3
|
+
export declare class PropertyOperationCodecGetQuery extends AbstractOperationCodec<PropertyOperation, string> {
|
|
4
|
+
decodeObject(o: any): PropertyOperation;
|
|
5
|
+
encodeObject(t: PropertyOperation): string;
|
|
6
|
+
}
|
|
7
|
+
export declare class PropertyOperationCodecGetResult extends AbstractOperationCodec<PropertyOperation, any> {
|
|
8
|
+
decodeObject(o: any): PropertyOperation;
|
|
9
|
+
encodeObject(property: PropertyOperation): any;
|
|
10
|
+
}
|
|
11
|
+
export declare class PropertyOperationCodecSetQuery extends AbstractOperationCodec<PropertyOperation, any> {
|
|
12
|
+
decodeObject(o: any): PropertyOperation;
|
|
13
|
+
encodeObject(property: PropertyOperation): any;
|
|
14
|
+
}
|
|
15
|
+
export declare class PropertyOperationCodecSetResult extends AbstractOperationCodec<PropertyOperation, any> {
|
|
16
|
+
decodeObject(o: any): PropertyOperation;
|
|
17
|
+
encodeObject(property: PropertyOperation): any;
|
|
18
|
+
}
|
|
19
|
+
export declare class PropertyOperationCodecGet {
|
|
20
|
+
QUERY: PropertyOperationCodecGetQuery;
|
|
21
|
+
RESULT: PropertyOperationCodecGetResult;
|
|
22
|
+
}
|
|
23
|
+
export declare class PropertyOperationCodecSet {
|
|
24
|
+
QUERY: PropertyOperationCodecSetQuery;
|
|
25
|
+
RESULT: PropertyOperationCodecSetResult;
|
|
26
|
+
}
|
|
27
|
+
export declare class PropertyOperationCodec {
|
|
28
|
+
static Get: PropertyOperationCodecGet;
|
|
29
|
+
static Set: PropertyOperationCodecSet;
|
|
30
|
+
static Notify: PropertyOperationCodecSetQuery;
|
|
31
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PropertyOperationCodec = exports.PropertyOperationCodecSet = exports.PropertyOperationCodecGet = exports.PropertyOperationCodecSetResult = exports.PropertyOperationCodecSetQuery = exports.PropertyOperationCodecGetResult = exports.PropertyOperationCodecGetQuery = void 0;
|
|
4
|
+
const Spec_1 = require("../../typedef/constant/Spec");
|
|
5
|
+
const AbstractOperationCodec_1 = require("./AbstractOperationCodec");
|
|
6
|
+
const PropertyOperation_1 = require("../../typedef/operation/PropertyOperation");
|
|
7
|
+
const PropertyID_1 = require("../../typedef/xid/PropertyID");
|
|
8
|
+
const CombinationValueCodec_1 = require("./CombinationValueCodec");
|
|
9
|
+
class PropertyOperationCodecGetQuery extends AbstractOperationCodec_1.AbstractOperationCodec {
|
|
10
|
+
decodeObject(o) {
|
|
11
|
+
if (typeof o === 'string') {
|
|
12
|
+
const property = new PropertyOperation_1.PropertyOperation();
|
|
13
|
+
property.pid = PropertyID_1.PropertyID.parse(o);
|
|
14
|
+
return property;
|
|
15
|
+
}
|
|
16
|
+
throw Error(`invalid pid: ${o}`);
|
|
17
|
+
}
|
|
18
|
+
encodeObject(t) {
|
|
19
|
+
return t.pid.toString();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.PropertyOperationCodecGetQuery = PropertyOperationCodecGetQuery;
|
|
23
|
+
class PropertyOperationCodecGetResult extends AbstractOperationCodec_1.AbstractOperationCodec {
|
|
24
|
+
decodeObject(o) {
|
|
25
|
+
const property = new PropertyOperation_1.PropertyOperation();
|
|
26
|
+
property.pid = PropertyID_1.PropertyID.parse(o[Spec_1.Spec.PID]);
|
|
27
|
+
property.status = o[Spec_1.Spec.STATUS];
|
|
28
|
+
if (property.status === undefined) {
|
|
29
|
+
property.status = 0;
|
|
30
|
+
}
|
|
31
|
+
if (property.status == null) {
|
|
32
|
+
property.status = 0;
|
|
33
|
+
}
|
|
34
|
+
if (property.status === 0) {
|
|
35
|
+
const value = o[Spec_1.Spec.VALUE];
|
|
36
|
+
if (value instanceof Array) {
|
|
37
|
+
property.value = CombinationValueCodec_1.CombinationValueCodec.decodeArray(value);
|
|
38
|
+
}
|
|
39
|
+
else if (typeof value === 'object') {
|
|
40
|
+
property.argumentsCompact = true;
|
|
41
|
+
property.value = CombinationValueCodec_1.CombinationValueCodec.decodeObject(value);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
property.value = value;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
property.description = o[Spec_1.Spec.DESCRIPTION];
|
|
49
|
+
}
|
|
50
|
+
return property;
|
|
51
|
+
}
|
|
52
|
+
encodeObject(property) {
|
|
53
|
+
const o = {
|
|
54
|
+
pid: property.pid.toString()
|
|
55
|
+
};
|
|
56
|
+
if (property.status === 0) {
|
|
57
|
+
if (property.value instanceof Map) {
|
|
58
|
+
o[Spec_1.Spec.VALUE] = CombinationValueCodec_1.CombinationValueCodec.encodeWithCompact(property.argumentsCompact, property.value);
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
o[Spec_1.Spec.VALUE] = property.value;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
o[Spec_1.Spec.STATUS] = property.status;
|
|
66
|
+
o[Spec_1.Spec.DESCRIPTION] = property.description;
|
|
67
|
+
}
|
|
68
|
+
return o;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.PropertyOperationCodecGetResult = PropertyOperationCodecGetResult;
|
|
72
|
+
class PropertyOperationCodecSetQuery extends AbstractOperationCodec_1.AbstractOperationCodec {
|
|
73
|
+
decodeObject(o) {
|
|
74
|
+
const property = new PropertyOperation_1.PropertyOperation();
|
|
75
|
+
const value = o[Spec_1.Spec.VALUE];
|
|
76
|
+
property.pid = PropertyID_1.PropertyID.parse(o[Spec_1.Spec.PID]);
|
|
77
|
+
if (value !== null) {
|
|
78
|
+
if (value instanceof Array) {
|
|
79
|
+
property.value = CombinationValueCodec_1.CombinationValueCodec.decodeArray(value);
|
|
80
|
+
}
|
|
81
|
+
else if (typeof value === 'object') {
|
|
82
|
+
property.argumentsCompact = true;
|
|
83
|
+
property.value = CombinationValueCodec_1.CombinationValueCodec.decodeObject(value);
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
property.value = value;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return property;
|
|
90
|
+
}
|
|
91
|
+
encodeObject(property) {
|
|
92
|
+
return {
|
|
93
|
+
pid: property.pid.toString(),
|
|
94
|
+
value: property.value instanceof Map
|
|
95
|
+
? CombinationValueCodec_1.CombinationValueCodec.encodeWithCompact(property.argumentsCompact, property.value)
|
|
96
|
+
: property.value
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
exports.PropertyOperationCodecSetQuery = PropertyOperationCodecSetQuery;
|
|
101
|
+
class PropertyOperationCodecSetResult extends AbstractOperationCodec_1.AbstractOperationCodec {
|
|
102
|
+
decodeObject(o) {
|
|
103
|
+
const property = new PropertyOperation_1.PropertyOperation();
|
|
104
|
+
property.pid = PropertyID_1.PropertyID.parse(o[Spec_1.Spec.PID]);
|
|
105
|
+
property.status = o[Spec_1.Spec.STATUS];
|
|
106
|
+
if (property.status === undefined) {
|
|
107
|
+
property.status = 0;
|
|
108
|
+
}
|
|
109
|
+
if (property.status == null) {
|
|
110
|
+
property.status = 0;
|
|
111
|
+
}
|
|
112
|
+
if (property.status !== 0) {
|
|
113
|
+
property.description = o[Spec_1.Spec.DESCRIPTION];
|
|
114
|
+
}
|
|
115
|
+
// if (property.description === undefined) {
|
|
116
|
+
// throw new Error('description undefined');
|
|
117
|
+
// }
|
|
118
|
+
return property;
|
|
119
|
+
}
|
|
120
|
+
encodeObject(property) {
|
|
121
|
+
const o = {
|
|
122
|
+
pid: property.pid.toString(),
|
|
123
|
+
status: property.status
|
|
124
|
+
};
|
|
125
|
+
if (property.status !== 0) {
|
|
126
|
+
o[Spec_1.Spec.DESCRIPTION] = property.description;
|
|
127
|
+
}
|
|
128
|
+
return o;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
exports.PropertyOperationCodecSetResult = PropertyOperationCodecSetResult;
|
|
132
|
+
class PropertyOperationCodecGet {
|
|
133
|
+
constructor() {
|
|
134
|
+
this.QUERY = new PropertyOperationCodecGetQuery();
|
|
135
|
+
this.RESULT = new PropertyOperationCodecGetResult();
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
exports.PropertyOperationCodecGet = PropertyOperationCodecGet;
|
|
139
|
+
class PropertyOperationCodecSet {
|
|
140
|
+
constructor() {
|
|
141
|
+
this.QUERY = new PropertyOperationCodecSetQuery();
|
|
142
|
+
this.RESULT = new PropertyOperationCodecSetResult();
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
exports.PropertyOperationCodecSet = PropertyOperationCodecSet;
|
|
146
|
+
class PropertyOperationCodec {
|
|
147
|
+
}
|
|
148
|
+
exports.PropertyOperationCodec = PropertyOperationCodec;
|
|
149
|
+
PropertyOperationCodec.Get = new PropertyOperationCodecGet();
|
|
150
|
+
PropertyOperationCodec.Set = new PropertyOperationCodecSet();
|
|
151
|
+
PropertyOperationCodec.Notify = new PropertyOperationCodecSetQuery();
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AbstractOperationCodec } from './AbstractOperationCodec';
|
|
2
|
+
import { RuleOperation } from '../../typedef/operation/RuleOperation';
|
|
3
|
+
export declare class RuleOperationCodecQuery extends AbstractOperationCodec<RuleOperation, String> {
|
|
4
|
+
decodeObject(o: any): RuleOperation;
|
|
5
|
+
encodeObject(o: RuleOperation): any;
|
|
6
|
+
}
|
|
7
|
+
export declare class RuleOperationCodecResult extends AbstractOperationCodec<RuleOperation, any> {
|
|
8
|
+
decodeObject(o: any): RuleOperation;
|
|
9
|
+
encodeObject(operation: RuleOperation): any;
|
|
10
|
+
}
|
|
11
|
+
export declare class RuleOperationCodec {
|
|
12
|
+
static Query: RuleOperationCodecQuery;
|
|
13
|
+
static Result: RuleOperationCodecResult;
|
|
14
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RuleOperationCodec = exports.RuleOperationCodecResult = exports.RuleOperationCodecQuery = void 0;
|
|
4
|
+
const Spec_1 = require("../../typedef/constant/Spec");
|
|
5
|
+
const AbstractOperationCodec_1 = require("./AbstractOperationCodec");
|
|
6
|
+
const RuleOperation_1 = require("../../typedef/operation/RuleOperation");
|
|
7
|
+
class RuleOperationCodecQuery extends AbstractOperationCodec_1.AbstractOperationCodec {
|
|
8
|
+
decodeObject(o) {
|
|
9
|
+
return new RuleOperation_1.RuleOperation(o);
|
|
10
|
+
}
|
|
11
|
+
encodeObject(o) {
|
|
12
|
+
if (o.status < 0) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
return o.ruleId;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.RuleOperationCodecQuery = RuleOperationCodecQuery;
|
|
19
|
+
class RuleOperationCodecResult extends AbstractOperationCodec_1.AbstractOperationCodec {
|
|
20
|
+
decodeObject(o) {
|
|
21
|
+
const operation = new RuleOperation_1.RuleOperation(o.ruleId);
|
|
22
|
+
if (o.status < 0) {
|
|
23
|
+
operation.description = o[Spec_1.Spec.DESCRIPTION];
|
|
24
|
+
}
|
|
25
|
+
return operation;
|
|
26
|
+
}
|
|
27
|
+
encodeObject(operation) {
|
|
28
|
+
const object = {
|
|
29
|
+
ruleId: operation.ruleId,
|
|
30
|
+
status: operation.status
|
|
31
|
+
};
|
|
32
|
+
if (operation.status < 0) {
|
|
33
|
+
object[Spec_1.Spec.DESCRIPTION] = operation.description;
|
|
34
|
+
}
|
|
35
|
+
return object;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.RuleOperationCodecResult = RuleOperationCodecResult;
|
|
39
|
+
class RuleOperationCodec {
|
|
40
|
+
}
|
|
41
|
+
exports.RuleOperationCodec = RuleOperationCodec;
|
|
42
|
+
RuleOperationCodec.Query = new RuleOperationCodecQuery();
|
|
43
|
+
RuleOperationCodec.Result = new RuleOperationCodecResult();
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DeviceOwner } from '../../typedef/ownership/DeviceOwner';
|
|
2
|
+
export declare class DeviceOwnerCodec {
|
|
3
|
+
static decode(o: any): DeviceOwner;
|
|
4
|
+
static encode(x: DeviceOwner): any;
|
|
5
|
+
static decodeArray(arr: any[]): DeviceOwner[];
|
|
6
|
+
static encodeArray(x: DeviceOwner[]): any[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeviceOwnerCodec = void 0;
|
|
4
|
+
const DeviceOwner_1 = require("../../typedef/ownership/DeviceOwner");
|
|
5
|
+
class DeviceOwnerCodec {
|
|
6
|
+
static decode(o) {
|
|
7
|
+
const x = new DeviceOwner_1.DeviceOwner();
|
|
8
|
+
x.appId = o.appId;
|
|
9
|
+
x.ownerId = o.ownerId;
|
|
10
|
+
return x;
|
|
11
|
+
}
|
|
12
|
+
static encode(x) {
|
|
13
|
+
return {
|
|
14
|
+
appId: x.appId,
|
|
15
|
+
ownerId: x.ownerId
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
static decodeArray(arr) {
|
|
19
|
+
const list = [];
|
|
20
|
+
if (arr === null || arr === void 0 ? void 0 : arr.length) {
|
|
21
|
+
for (const o of arr) {
|
|
22
|
+
list.push(this.decode(o));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return list;
|
|
26
|
+
}
|
|
27
|
+
static encodeArray(x) {
|
|
28
|
+
const arr = [];
|
|
29
|
+
if (x === null || x === void 0 ? void 0 : x.length) {
|
|
30
|
+
for (const p of x) {
|
|
31
|
+
arr.push(this.encode(p));
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return arr;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.DeviceOwnerCodec = DeviceOwnerCodec;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Ownership } from '../../typedef/ownership/Ownership';
|
|
2
|
+
export declare class OwnershipCodec {
|
|
3
|
+
static decode(o: any): Ownership;
|
|
4
|
+
static encode(x: Ownership): any;
|
|
5
|
+
static decodeArray(arr: any[]): Ownership[];
|
|
6
|
+
static encodeArray(Ownerships: Ownership[]): any[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OwnershipCodec = void 0;
|
|
4
|
+
const Ownership_1 = require("../../typedef/ownership/Ownership");
|
|
5
|
+
class OwnershipCodec {
|
|
6
|
+
static decode(o) {
|
|
7
|
+
const ownership = new Ownership_1.Ownership();
|
|
8
|
+
ownership.appId = o.appId;
|
|
9
|
+
ownership.ownerId = o.ownerId;
|
|
10
|
+
ownership.did = o.did;
|
|
11
|
+
ownership.token = o.token;
|
|
12
|
+
ownership.cloudId = o.cloudId;
|
|
13
|
+
ownership.rootId = o.rootId;
|
|
14
|
+
if (o.createAt !== undefined) {
|
|
15
|
+
ownership.createAt = new Date(o.createAt);
|
|
16
|
+
}
|
|
17
|
+
if (o.updateAt !== undefined) {
|
|
18
|
+
ownership.updateAt = new Date(o.updateAt);
|
|
19
|
+
}
|
|
20
|
+
return ownership;
|
|
21
|
+
}
|
|
22
|
+
static encode(x) {
|
|
23
|
+
const object = {
|
|
24
|
+
appId: x.appId,
|
|
25
|
+
ownerId: x.ownerId,
|
|
26
|
+
did: x.did,
|
|
27
|
+
token: x.token
|
|
28
|
+
};
|
|
29
|
+
if (x.cloudId != null) {
|
|
30
|
+
object.cloudId = x.cloudId;
|
|
31
|
+
}
|
|
32
|
+
if (x.rootId != null) {
|
|
33
|
+
object.rootId = x.rootId;
|
|
34
|
+
}
|
|
35
|
+
if (x.createAt != null) {
|
|
36
|
+
object.createAt = x.createAt.getTime();
|
|
37
|
+
}
|
|
38
|
+
if (x.updateAt != null) {
|
|
39
|
+
object.updateAt = x.updateAt.getTime();
|
|
40
|
+
}
|
|
41
|
+
return object;
|
|
42
|
+
}
|
|
43
|
+
static decodeArray(arr) {
|
|
44
|
+
const list = [];
|
|
45
|
+
if (arr === null || arr === void 0 ? void 0 : arr.length) {
|
|
46
|
+
for (const o of arr) {
|
|
47
|
+
list.push(this.decode(o));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return list;
|
|
51
|
+
}
|
|
52
|
+
static encodeArray(Ownerships) {
|
|
53
|
+
const arr = [];
|
|
54
|
+
if (Ownerships === null || Ownerships === void 0 ? void 0 : Ownerships.length) {
|
|
55
|
+
for (const p of Ownerships) {
|
|
56
|
+
arr.push(this.encode(p));
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return arr;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.OwnershipCodec = OwnershipCodec;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProductCodec = void 0;
|
|
4
|
+
const Product_1 = require("../../typedef/product/Product");
|
|
5
|
+
const DeviceType_1 = require("../../typedef/definition/urn/DeviceType");
|
|
6
|
+
const VersionWithLifecycleCodec_1 = require("../lifecycle/product/VersionWithLifecycleCodec");
|
|
7
|
+
class ProductCodec {
|
|
8
|
+
static decode(o) {
|
|
9
|
+
const x = new Product_1.Product();
|
|
10
|
+
x.id = o.id;
|
|
11
|
+
x.name = o.name;
|
|
12
|
+
x.icon = o.icon;
|
|
13
|
+
x.model = o.model;
|
|
14
|
+
x.template = new DeviceType_1.DeviceType(o.template);
|
|
15
|
+
x.organization = o.organization;
|
|
16
|
+
x.key = o.key;
|
|
17
|
+
x.cert = o.cert;
|
|
18
|
+
x.protocol = o.protocol;
|
|
19
|
+
x.createBy = o.createBy;
|
|
20
|
+
x.createAt = o.createAt;
|
|
21
|
+
x.updateBy = o.updateBy;
|
|
22
|
+
x.updateAt = o.updateAt;
|
|
23
|
+
if (o.versions && o.versions instanceof Array) {
|
|
24
|
+
x.versions = VersionWithLifecycleCodec_1.VersionWithLifecycleCodec.decodeArray(o.versions);
|
|
25
|
+
}
|
|
26
|
+
if (o.createAt !== undefined) {
|
|
27
|
+
x.createAt = new Date(o.createAt);
|
|
28
|
+
}
|
|
29
|
+
if (o.updateAt !== undefined) {
|
|
30
|
+
x.updateAt = new Date(o.updateAt);
|
|
31
|
+
}
|
|
32
|
+
return x;
|
|
33
|
+
}
|
|
34
|
+
static encode(x) {
|
|
35
|
+
let o = {
|
|
36
|
+
id: x.id,
|
|
37
|
+
name: x.name,
|
|
38
|
+
icon: x.icon,
|
|
39
|
+
model: x.model,
|
|
40
|
+
template: x.template.toString(),
|
|
41
|
+
organization: x.organization,
|
|
42
|
+
key: x.key,
|
|
43
|
+
cert: x.cert,
|
|
44
|
+
protocol: x.protocol,
|
|
45
|
+
createBy: x.createBy,
|
|
46
|
+
updateBy: x.updateBy,
|
|
47
|
+
versions: VersionWithLifecycleCodec_1.VersionWithLifecycleCodec.encodeArray(x.versions),
|
|
48
|
+
};
|
|
49
|
+
if (x.createAt !== undefined) {
|
|
50
|
+
o.createAt = x.createAt.getTime();
|
|
51
|
+
}
|
|
52
|
+
if (x.updateAt !== undefined) {
|
|
53
|
+
o.updateAt = x.updateAt.getTime();
|
|
54
|
+
}
|
|
55
|
+
return o;
|
|
56
|
+
}
|
|
57
|
+
static decodeArray(arr) {
|
|
58
|
+
const list = [];
|
|
59
|
+
if (arr === null || arr === void 0 ? void 0 : arr.length) {
|
|
60
|
+
for (const o of arr) {
|
|
61
|
+
list.push(this.decode(o));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return list;
|
|
65
|
+
}
|
|
66
|
+
static encodeArray(products) {
|
|
67
|
+
const arr = [];
|
|
68
|
+
if (products === null || products === void 0 ? void 0 : products.length) {
|
|
69
|
+
for (const p of products) {
|
|
70
|
+
arr.push(this.encode(p));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return arr;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
exports.ProductCodec = ProductCodec;
|