@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,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ShadowCodec = void 0;
|
|
4
|
+
const Shadow_1 = require("../../typedef/shadow/Shadow");
|
|
5
|
+
const Spec_1 = require("../../typedef/constant/Spec");
|
|
6
|
+
class ShadowCodec {
|
|
7
|
+
static decodeArray(list) {
|
|
8
|
+
const array = [];
|
|
9
|
+
if (list != null) {
|
|
10
|
+
for (const o of list) {
|
|
11
|
+
array.push(ShadowCodec.decodeObject(o));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return array;
|
|
15
|
+
}
|
|
16
|
+
static decodeObject(o) {
|
|
17
|
+
const shadow = new Shadow_1.Shadow();
|
|
18
|
+
shadow.siid = o[Spec_1.Spec.SIID] || 0;
|
|
19
|
+
shadow.piid = o[Spec_1.Spec.PIID] || 0;
|
|
20
|
+
shadow.status = o[Spec_1.Spec.STATUS] || 0;
|
|
21
|
+
if (shadow.status >= 0) {
|
|
22
|
+
shadow.value = o[Spec_1.Spec.VALUE];
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
shadow.description = o[Spec_1.Spec.DESCRIPTION] || '';
|
|
26
|
+
}
|
|
27
|
+
return shadow;
|
|
28
|
+
}
|
|
29
|
+
static encodeObject(s) {
|
|
30
|
+
const o = {
|
|
31
|
+
siid: s.siid,
|
|
32
|
+
piid: s.piid,
|
|
33
|
+
status: s.status
|
|
34
|
+
};
|
|
35
|
+
if (s.status >= 0) {
|
|
36
|
+
o[Spec_1.Spec.VALUE] = s.value;
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
o[Spec_1.Spec.DESCRIPTION] = s.description;
|
|
40
|
+
}
|
|
41
|
+
return o;
|
|
42
|
+
}
|
|
43
|
+
static encodeArray(array) {
|
|
44
|
+
return array != null
|
|
45
|
+
? array.map(s => {
|
|
46
|
+
return ShadowCodec.encodeObject(s);
|
|
47
|
+
})
|
|
48
|
+
: [];
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.ShadowCodec = ShadowCodec;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Somewhere } from '../../typedef/somewhere/Somewhere';
|
|
2
|
+
export declare class SomewhereCodec {
|
|
3
|
+
static decodeArray(list: any[]): Somewhere[];
|
|
4
|
+
static decodeObject(o: any): Somewhere;
|
|
5
|
+
static encodeObject(s: Somewhere): any;
|
|
6
|
+
static encodeArray(array: Array<Somewhere>): any[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SomewhereCodec = void 0;
|
|
4
|
+
const Somewhere_1 = require("../../typedef/somewhere/Somewhere");
|
|
5
|
+
const Where_1 = require("../../typedef/somewhere/Where");
|
|
6
|
+
class SomewhereCodec {
|
|
7
|
+
static decodeArray(list) {
|
|
8
|
+
const array = [];
|
|
9
|
+
if (list != null) {
|
|
10
|
+
for (const o of list) {
|
|
11
|
+
array.push(SomewhereCodec.decodeObject(o));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return array;
|
|
15
|
+
}
|
|
16
|
+
static decodeObject(o) {
|
|
17
|
+
const somewhere = new Somewhere_1.Somewhere();
|
|
18
|
+
if (o.where !== undefined) {
|
|
19
|
+
somewhere.where = (0, Where_1.WhereFromString)(o.where);
|
|
20
|
+
}
|
|
21
|
+
if (o.spaceId !== undefined) {
|
|
22
|
+
somewhere.spaceId = o.spaceId;
|
|
23
|
+
}
|
|
24
|
+
if (o.index !== 0) {
|
|
25
|
+
somewhere.index = o.index;
|
|
26
|
+
}
|
|
27
|
+
return somewhere;
|
|
28
|
+
}
|
|
29
|
+
static encodeObject(s) {
|
|
30
|
+
const o = {};
|
|
31
|
+
if (s.spaceId != null) {
|
|
32
|
+
o.spaceId = s.spaceId;
|
|
33
|
+
}
|
|
34
|
+
if (s.where != Where_1.Where.UNKNOWN) {
|
|
35
|
+
o.where = s.where.toString();
|
|
36
|
+
}
|
|
37
|
+
if (s.index !== 0) {
|
|
38
|
+
o.index = s.index;
|
|
39
|
+
}
|
|
40
|
+
return o;
|
|
41
|
+
}
|
|
42
|
+
static encodeArray(array) {
|
|
43
|
+
return array != null
|
|
44
|
+
? array.map(s => {
|
|
45
|
+
return SomewhereCodec.encodeObject(s);
|
|
46
|
+
})
|
|
47
|
+
: [];
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.SomewhereCodec = SomewhereCodec;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SpaceCodec = void 0;
|
|
4
|
+
const Space_1 = require("../../typedef/space/Space");
|
|
5
|
+
class SpaceCodec {
|
|
6
|
+
static decodeArray(list) {
|
|
7
|
+
const array = [];
|
|
8
|
+
if (list != null) {
|
|
9
|
+
for (const o of list) {
|
|
10
|
+
array.push(SpaceCodec.decodeObject(o));
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
return array;
|
|
14
|
+
}
|
|
15
|
+
static decodeObject(o) {
|
|
16
|
+
const x = new Space_1.Space(o['id'] || '');
|
|
17
|
+
x.name = o['name'] || '';
|
|
18
|
+
x.rootId = o['rootId'] || null;
|
|
19
|
+
x.parentId = o['parentId'] || null;
|
|
20
|
+
x.index = o['index'] || 0;
|
|
21
|
+
return x;
|
|
22
|
+
}
|
|
23
|
+
static encodeObject(s) {
|
|
24
|
+
const o = {
|
|
25
|
+
id: s.id,
|
|
26
|
+
name: s.name,
|
|
27
|
+
index: s.index
|
|
28
|
+
};
|
|
29
|
+
if (s.rootId !== null) {
|
|
30
|
+
o['rootId'] = s.rootId;
|
|
31
|
+
}
|
|
32
|
+
if (s.parentId !== null) {
|
|
33
|
+
o['parentId'] = s.parentId;
|
|
34
|
+
}
|
|
35
|
+
return o;
|
|
36
|
+
}
|
|
37
|
+
static encodeArray(array) {
|
|
38
|
+
return array != null
|
|
39
|
+
? array.map(s => {
|
|
40
|
+
return SpaceCodec.encodeObject(s);
|
|
41
|
+
})
|
|
42
|
+
: [];
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.SpaceCodec = SpaceCodec;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Summary } from '../../typedef/summary/Summary';
|
|
2
|
+
export declare class SummaryCodec {
|
|
3
|
+
static decodeArray(list: any[]): Summary[];
|
|
4
|
+
static decodeObject(o: any): Summary;
|
|
5
|
+
static encodeObject(s: Summary): any;
|
|
6
|
+
static encodeArray(array: Array<Summary>): any[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SummaryCodec = void 0;
|
|
4
|
+
const Summary_1 = require("../../typedef/summary/Summary");
|
|
5
|
+
const Urn_1 = require("../../typedef/definition/urn/Urn");
|
|
6
|
+
const UrnType_1 = require("../../typedef/definition/urn/UrnType");
|
|
7
|
+
class SummaryCodec {
|
|
8
|
+
static decodeArray(list) {
|
|
9
|
+
const array = [];
|
|
10
|
+
if (list != null) {
|
|
11
|
+
for (const o of list) {
|
|
12
|
+
array.push(SummaryCodec.decodeObject(o));
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return array;
|
|
16
|
+
}
|
|
17
|
+
static decodeObject(o) {
|
|
18
|
+
const summary = new Summary_1.Summary();
|
|
19
|
+
summary.type = new Urn_1.Urn([UrnType_1.UrnType.DEVICE, UrnType_1.UrnType.GROUP], o.type);
|
|
20
|
+
summary.online = o.online;
|
|
21
|
+
if (o.members !== undefined) {
|
|
22
|
+
summary.members = o.members;
|
|
23
|
+
}
|
|
24
|
+
if (o.cloudId !== undefined) {
|
|
25
|
+
summary.cloudId = o.cloudId;
|
|
26
|
+
}
|
|
27
|
+
if (o.parentId !== undefined) {
|
|
28
|
+
summary.parentId = o.parentId;
|
|
29
|
+
}
|
|
30
|
+
if (o.rootId !== undefined) {
|
|
31
|
+
summary.rootId = o.rootId;
|
|
32
|
+
}
|
|
33
|
+
if (o.protocol !== undefined) {
|
|
34
|
+
summary.protocol = o.protocol;
|
|
35
|
+
}
|
|
36
|
+
if (o.lastOnline !== undefined) {
|
|
37
|
+
summary.lastOnline = new Date(o.lastOnline);
|
|
38
|
+
}
|
|
39
|
+
if (o.lastOffline !== undefined) {
|
|
40
|
+
summary.lastOffline = new Date(o.lastOffline);
|
|
41
|
+
}
|
|
42
|
+
return summary;
|
|
43
|
+
}
|
|
44
|
+
static encodeObject(s) {
|
|
45
|
+
const o = {
|
|
46
|
+
type: s.type != null ? s.type.toString() : '',
|
|
47
|
+
online: s.online
|
|
48
|
+
};
|
|
49
|
+
if (s.parentId != null) {
|
|
50
|
+
o.parentId = s.parentId;
|
|
51
|
+
}
|
|
52
|
+
if (s.cloudId != null) {
|
|
53
|
+
o.cloudId = s.cloudId;
|
|
54
|
+
}
|
|
55
|
+
if (s.members != null) {
|
|
56
|
+
if (s.members.length > 0) {
|
|
57
|
+
o.members = s.members;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
if (s.rootId != null) {
|
|
61
|
+
o.rootId = s.rootId;
|
|
62
|
+
}
|
|
63
|
+
if (s.protocol != null) {
|
|
64
|
+
o.protocol = s.protocol;
|
|
65
|
+
}
|
|
66
|
+
if (s.lastOnline !== undefined) {
|
|
67
|
+
o.lastOnline = s.lastOnline.getTime();
|
|
68
|
+
}
|
|
69
|
+
if (s.lastOffline !== undefined) {
|
|
70
|
+
o.lastOffline = s.lastOffline.getTime();
|
|
71
|
+
}
|
|
72
|
+
return o;
|
|
73
|
+
}
|
|
74
|
+
static encodeArray(array) {
|
|
75
|
+
return array != null
|
|
76
|
+
? array.map(s => {
|
|
77
|
+
return SummaryCodec.encodeObject(s);
|
|
78
|
+
})
|
|
79
|
+
: [];
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
exports.SummaryCodec = SummaryCodec;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ActionTemplate } from '../../typedef/template/ActionTemplate';
|
|
2
|
+
export declare class ActionTemplateCodec {
|
|
3
|
+
static decodeArray(array: any[]): ActionTemplate[];
|
|
4
|
+
static decode(o: any): ActionTemplate;
|
|
5
|
+
static encode(template: ActionTemplate): any;
|
|
6
|
+
static encodeArray(actions: Map<number, ActionTemplate>): any[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ActionTemplateCodec = void 0;
|
|
4
|
+
const ActionTemplate_1 = require("../../typedef/template/ActionTemplate");
|
|
5
|
+
const Spec_1 = require("../../typedef/constant/Spec");
|
|
6
|
+
const ActionType_1 = require("../../typedef/definition/urn/ActionType");
|
|
7
|
+
const DescriptionCodec_1 = require("../definition/DescriptionCodec");
|
|
8
|
+
const ArgumentCodec_1 = require("../instance/ArgumentCodec");
|
|
9
|
+
class ActionTemplateCodec {
|
|
10
|
+
static decodeArray(array) {
|
|
11
|
+
const list = [];
|
|
12
|
+
if (array != null) {
|
|
13
|
+
for (const o of array) {
|
|
14
|
+
list.push(ActionTemplateCodec.decode(o));
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return list;
|
|
18
|
+
}
|
|
19
|
+
static decode(o) {
|
|
20
|
+
const iid = o[Spec_1.Spec.IID];
|
|
21
|
+
const required = o[Spec_1.Spec.X_REQUIRED];
|
|
22
|
+
const source = o[Spec_1.Spec.X_SOURCE];
|
|
23
|
+
const type = new ActionType_1.ActionType(o[Spec_1.Spec.TYPE]);
|
|
24
|
+
const description = DescriptionCodec_1.DescriptionCodec.decode(o[Spec_1.Spec.DESCRIPTION]);
|
|
25
|
+
const argumentsIn = ArgumentCodec_1.ArgumentCodec.decodeArray(o[Spec_1.Spec.IN]);
|
|
26
|
+
const argumentsOut = ArgumentCodec_1.ArgumentCodec.decodeArray(o[Spec_1.Spec.OUT]);
|
|
27
|
+
return new ActionTemplate_1.ActionTemplate(iid, required, type, description, argumentsIn, argumentsOut, source);
|
|
28
|
+
}
|
|
29
|
+
static encode(template) {
|
|
30
|
+
const o = {
|
|
31
|
+
iid: template.iid,
|
|
32
|
+
type: template.type.toString(),
|
|
33
|
+
description: DescriptionCodec_1.DescriptionCodec.encode(template.description)
|
|
34
|
+
};
|
|
35
|
+
o[Spec_1.Spec.X_REQUIRED] = template.required;
|
|
36
|
+
if (template.source) {
|
|
37
|
+
o[Spec_1.Spec.X_SOURCE] = template.source;
|
|
38
|
+
}
|
|
39
|
+
if (template.in.size > 0) {
|
|
40
|
+
o[Spec_1.Spec.IN] = ArgumentCodec_1.ArgumentCodec.encodeArray(template.getArgumentsIn());
|
|
41
|
+
}
|
|
42
|
+
if (template.out.size > 0) {
|
|
43
|
+
o[Spec_1.Spec.OUT] = ArgumentCodec_1.ArgumentCodec.encodeArray(template.getArgumentsOut());
|
|
44
|
+
}
|
|
45
|
+
return o;
|
|
46
|
+
}
|
|
47
|
+
static encodeArray(actions) {
|
|
48
|
+
const array = [];
|
|
49
|
+
actions.forEach((action, iid) => {
|
|
50
|
+
array.push(ActionTemplateCodec.encode(action));
|
|
51
|
+
});
|
|
52
|
+
return array;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.ActionTemplateCodec = ActionTemplateCodec;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeviceTemplateCodec = void 0;
|
|
4
|
+
const DeviceTemplate_1 = require("../../typedef/template/DeviceTemplate");
|
|
5
|
+
const DeviceType_1 = require("../../typedef/definition/urn/DeviceType");
|
|
6
|
+
const DescriptionCodec_1 = require("../definition/DescriptionCodec");
|
|
7
|
+
const Spec_1 = require("../../typedef/constant/Spec");
|
|
8
|
+
const ServiceTemplateCodec_1 = require("./ServiceTemplateCodec");
|
|
9
|
+
class DeviceTemplateCodec {
|
|
10
|
+
static decode(o) {
|
|
11
|
+
const type = new DeviceType_1.DeviceType(o[Spec_1.Spec.TYPE]);
|
|
12
|
+
const description = DescriptionCodec_1.DescriptionCodec.decode(o[Spec_1.Spec.DESCRIPTION]);
|
|
13
|
+
const services = ServiceTemplateCodec_1.ServiceTemplateCodec.decodeArray(o[Spec_1.Spec.SERVICES]);
|
|
14
|
+
return new DeviceTemplate_1.DeviceTemplate(type, description, services);
|
|
15
|
+
}
|
|
16
|
+
static encode(device) {
|
|
17
|
+
return {
|
|
18
|
+
type: device.type.toString(),
|
|
19
|
+
description: DescriptionCodec_1.DescriptionCodec.encode(device.description),
|
|
20
|
+
services: ServiceTemplateCodec_1.ServiceTemplateCodec.encodeArray(device.services)
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.DeviceTemplateCodec = DeviceTemplateCodec;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { EventTemplate } from '../../typedef/template/EventTemplate';
|
|
2
|
+
export declare class EventTemplateCodec {
|
|
3
|
+
static decodeArray(array: any[]): EventTemplate[];
|
|
4
|
+
static decode(o: any): EventTemplate;
|
|
5
|
+
static encode(event: EventTemplate): any;
|
|
6
|
+
static encodeArray(events: Map<number, EventTemplate>): any[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EventTemplateCodec = void 0;
|
|
4
|
+
const EventTemplate_1 = require("../../typedef/template/EventTemplate");
|
|
5
|
+
const Spec_1 = require("../../typedef/constant/Spec");
|
|
6
|
+
const EventType_1 = require("../../typedef/definition/urn/EventType");
|
|
7
|
+
const DescriptionCodec_1 = require("../definition/DescriptionCodec");
|
|
8
|
+
const ArgumentCodec_1 = require("../instance/ArgumentCodec");
|
|
9
|
+
class EventTemplateCodec {
|
|
10
|
+
static decodeArray(array) {
|
|
11
|
+
const list = [];
|
|
12
|
+
if (array != null) {
|
|
13
|
+
for (const o of array) {
|
|
14
|
+
list.push(EventTemplateCodec.decode(o));
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return list;
|
|
18
|
+
}
|
|
19
|
+
static decode(o) {
|
|
20
|
+
const iid = o[Spec_1.Spec.IID];
|
|
21
|
+
const required = o[Spec_1.Spec.X_REQUIRED];
|
|
22
|
+
const source = o[Spec_1.Spec.X_SOURCE];
|
|
23
|
+
const type = new EventType_1.EventType(o[Spec_1.Spec.TYPE]);
|
|
24
|
+
const description = DescriptionCodec_1.DescriptionCodec.decode(o[Spec_1.Spec.DESCRIPTION]);
|
|
25
|
+
const a = ArgumentCodec_1.ArgumentCodec.decodeArray(o[Spec_1.Spec.ARGUMENTS]);
|
|
26
|
+
return new EventTemplate_1.EventTemplate(iid, required, type, description, a, source);
|
|
27
|
+
}
|
|
28
|
+
static encode(event) {
|
|
29
|
+
const o = {
|
|
30
|
+
iid: event.iid,
|
|
31
|
+
type: event.type.toString(),
|
|
32
|
+
description: DescriptionCodec_1.DescriptionCodec.encode(event.description)
|
|
33
|
+
};
|
|
34
|
+
o[Spec_1.Spec.X_REQUIRED] = event.required;
|
|
35
|
+
if (event.source) {
|
|
36
|
+
o[Spec_1.Spec.X_SOURCE] = event.source;
|
|
37
|
+
}
|
|
38
|
+
if (event.arguments.size > 0) {
|
|
39
|
+
o[Spec_1.Spec.ARGUMENTS] = ArgumentCodec_1.ArgumentCodec.encodeArray(event.getArguments());
|
|
40
|
+
}
|
|
41
|
+
return o;
|
|
42
|
+
}
|
|
43
|
+
static encodeArray(events) {
|
|
44
|
+
const array = [];
|
|
45
|
+
events.forEach((event, iid) => {
|
|
46
|
+
array.push(EventTemplateCodec.encode(event));
|
|
47
|
+
});
|
|
48
|
+
return array;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.EventTemplateCodec = EventTemplateCodec;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PropertyTemplate } from '../../typedef/template/PropertyTemplate';
|
|
2
|
+
export declare class PropertyTemplateCodec {
|
|
3
|
+
static decodeArray(array: any[]): PropertyTemplate[];
|
|
4
|
+
static decode(o: any): PropertyTemplate;
|
|
5
|
+
static encode(property: PropertyTemplate): Object;
|
|
6
|
+
static encodeArray(properties: Map<number, PropertyTemplate>): Array<Object>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PropertyTemplateCodec = void 0;
|
|
4
|
+
const PropertyTemplate_1 = require("../../typedef/template/PropertyTemplate");
|
|
5
|
+
const Spec_1 = require("../../typedef/constant/Spec");
|
|
6
|
+
const PropertyCodec_1 = require("../instance/PropertyCodec");
|
|
7
|
+
const PropertyType_1 = require("../../typedef/definition/urn/PropertyType");
|
|
8
|
+
const DescriptionCodec_1 = require("../definition/DescriptionCodec");
|
|
9
|
+
const DataFormat_1 = require("../../typedef/definition/property/data/DataFormat");
|
|
10
|
+
const Access_1 = require("../../typedef/definition/property/Access");
|
|
11
|
+
const PropertyDefinitionCodec_1 = require("../definition/PropertyDefinitionCodec");
|
|
12
|
+
const ValueListCodec_1 = require("../definition/ValueListCodec");
|
|
13
|
+
const ValueRangeCodec_1 = require("../definition/ValueRangeCodec");
|
|
14
|
+
class PropertyTemplateCodec {
|
|
15
|
+
static decodeArray(array) {
|
|
16
|
+
const list = [];
|
|
17
|
+
if (array != null) {
|
|
18
|
+
for (const o of array) {
|
|
19
|
+
list.push(PropertyTemplateCodec.decode(o));
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return list;
|
|
23
|
+
}
|
|
24
|
+
static decode(o) {
|
|
25
|
+
const iid = o[Spec_1.Spec.IID];
|
|
26
|
+
const type = new PropertyType_1.PropertyType(o[Spec_1.Spec.TYPE]);
|
|
27
|
+
const description = DescriptionCodec_1.DescriptionCodec.decode(o[Spec_1.Spec.DESCRIPTION]);
|
|
28
|
+
const format = (0, DataFormat_1.DataFormatFromString)(o[Spec_1.Spec.FORMAT]);
|
|
29
|
+
const access = Access_1.Access.create(o[Spec_1.Spec.ACCESS]);
|
|
30
|
+
let unit = null;
|
|
31
|
+
let constraintValue = null;
|
|
32
|
+
let members = [];
|
|
33
|
+
const required = o[Spec_1.Spec.X_REQUIRED];
|
|
34
|
+
const source = o[Spec_1.Spec.X_SOURCE];
|
|
35
|
+
if (format === DataFormat_1.DataFormat.COMBINATION) {
|
|
36
|
+
const members = PropertyDefinitionCodec_1.PropertyDefinitionCodec.decodeMembers(o[Spec_1.Spec.MEMBERS]);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
if (o.hasOwnProperty(Spec_1.Spec.VALUE_LIST) && o.hasOwnProperty(Spec_1.Spec.VALUE_RANGE)) {
|
|
40
|
+
throw new Error('value-list & value-range both exist!');
|
|
41
|
+
}
|
|
42
|
+
if (o.hasOwnProperty(Spec_1.Spec.VALUE_LIST)) {
|
|
43
|
+
constraintValue = ValueListCodec_1.ValueListCodec.decode(format, o[Spec_1.Spec.VALUE_LIST]);
|
|
44
|
+
}
|
|
45
|
+
if (o.hasOwnProperty(Spec_1.Spec.VALUE_RANGE)) {
|
|
46
|
+
constraintValue = ValueRangeCodec_1.ValueRangeCodec.decode(format, o[Spec_1.Spec.VALUE_RANGE]);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (o.hasOwnProperty(Spec_1.Spec.UNIT)) {
|
|
50
|
+
unit = o[Spec_1.Spec.UNIT];
|
|
51
|
+
}
|
|
52
|
+
if (o.hasOwnProperty(Spec_1.Spec.MEMBERS)) {
|
|
53
|
+
members = o[Spec_1.Spec.MEMBERS];
|
|
54
|
+
}
|
|
55
|
+
const property = new PropertyTemplate_1.PropertyTemplate(iid, type, description, format, access, constraintValue, unit, members, required, source);
|
|
56
|
+
if (o[Spec_1.Spec.DEFAULT_VALUE] != null) {
|
|
57
|
+
property.setDefaultValue(o[Spec_1.Spec.DEFAULT_VALUE]);
|
|
58
|
+
}
|
|
59
|
+
return property;
|
|
60
|
+
}
|
|
61
|
+
static encode(property) {
|
|
62
|
+
const o = PropertyCodec_1.PropertyCodec.encode(property);
|
|
63
|
+
o[Spec_1.Spec.IID] = property.iid;
|
|
64
|
+
o[Spec_1.Spec.X_REQUIRED] = property.required;
|
|
65
|
+
if (property.source) {
|
|
66
|
+
o[Spec_1.Spec.X_SOURCE] = property.source;
|
|
67
|
+
}
|
|
68
|
+
return o;
|
|
69
|
+
}
|
|
70
|
+
static encodeArray(properties) {
|
|
71
|
+
const array = [];
|
|
72
|
+
properties.forEach(property => {
|
|
73
|
+
array.push(PropertyTemplateCodec.encode(property));
|
|
74
|
+
});
|
|
75
|
+
return array;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
exports.PropertyTemplateCodec = PropertyTemplateCodec;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ServiceTemplate } from '../../typedef/template/ServiceTemplate';
|
|
2
|
+
export declare class ServiceTemplateCodec {
|
|
3
|
+
static decodeArray(array: any[]): ServiceTemplate[];
|
|
4
|
+
static decode(o: any): ServiceTemplate;
|
|
5
|
+
static encode(service: ServiceTemplate): any;
|
|
6
|
+
static encodeArray(services: Map<number, ServiceTemplate>): any[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ServiceTemplateCodec = void 0;
|
|
4
|
+
const ServiceTemplate_1 = require("../../typedef/template/ServiceTemplate");
|
|
5
|
+
const Spec_1 = require("../../typedef/constant/Spec");
|
|
6
|
+
const ServiceType_1 = require("../../typedef/definition/urn/ServiceType");
|
|
7
|
+
const DescriptionCodec_1 = require("../definition/DescriptionCodec");
|
|
8
|
+
const PropertyTemplateCodec_1 = require("./PropertyTemplateCodec");
|
|
9
|
+
const ActionTemplateCodec_1 = require("./ActionTemplateCodec");
|
|
10
|
+
const EventTemplateCodec_1 = require("./EventTemplateCodec");
|
|
11
|
+
class ServiceTemplateCodec {
|
|
12
|
+
static decodeArray(array) {
|
|
13
|
+
const list = [];
|
|
14
|
+
if (array != null) {
|
|
15
|
+
for (const o of array) {
|
|
16
|
+
list.push(ServiceTemplateCodec.decode(o));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return list;
|
|
20
|
+
}
|
|
21
|
+
static decode(o) {
|
|
22
|
+
const iid = o[Spec_1.Spec.IID];
|
|
23
|
+
const required = o[Spec_1.Spec.X_REQUIRED];
|
|
24
|
+
const propertyAddable = o[Spec_1.Spec.X_PROPERTY_ADDABLE];
|
|
25
|
+
const actionAddable = o[Spec_1.Spec.X_ACTION_ADDABLE];
|
|
26
|
+
const eventAddable = o[Spec_1.Spec.X_ACTION_ADDABLE];
|
|
27
|
+
const source = o[Spec_1.Spec.X_SOURCE];
|
|
28
|
+
const type = new ServiceType_1.ServiceType(o[Spec_1.Spec.TYPE]);
|
|
29
|
+
const description = DescriptionCodec_1.DescriptionCodec.decode(o[Spec_1.Spec.DESCRIPTION]);
|
|
30
|
+
const properties = PropertyTemplateCodec_1.PropertyTemplateCodec.decodeArray(o[Spec_1.Spec.PROPERTIES]);
|
|
31
|
+
const actions = ActionTemplateCodec_1.ActionTemplateCodec.decodeArray(o[Spec_1.Spec.ACTIONS]);
|
|
32
|
+
const events = EventTemplateCodec_1.EventTemplateCodec.decodeArray(o[Spec_1.Spec.EVENTS]);
|
|
33
|
+
return new ServiceTemplate_1.ServiceTemplate(iid, required, type, description, properties, actions, events, propertyAddable, actionAddable, eventAddable, source);
|
|
34
|
+
}
|
|
35
|
+
static encode(service) {
|
|
36
|
+
const o = {
|
|
37
|
+
iid: service.iid,
|
|
38
|
+
type: service.type.toString(),
|
|
39
|
+
description: DescriptionCodec_1.DescriptionCodec.encode(service.description)
|
|
40
|
+
};
|
|
41
|
+
if (service.properties.size > 0) {
|
|
42
|
+
o[Spec_1.Spec.PROPERTIES] = PropertyTemplateCodec_1.PropertyTemplateCodec.encodeArray(service.properties);
|
|
43
|
+
}
|
|
44
|
+
if (service.actions.size > 0) {
|
|
45
|
+
o[Spec_1.Spec.ACTIONS] = ActionTemplateCodec_1.ActionTemplateCodec.encodeArray(service.actions);
|
|
46
|
+
}
|
|
47
|
+
if (service.events.size > 0) {
|
|
48
|
+
o[Spec_1.Spec.EVENTS] = EventTemplateCodec_1.EventTemplateCodec.encodeArray(service.events);
|
|
49
|
+
}
|
|
50
|
+
o[Spec_1.Spec.X_REQUIRED] = service.required;
|
|
51
|
+
o[Spec_1.Spec.X_PROPERTY_ADDABLE] = service.propertyAddable;
|
|
52
|
+
o[Spec_1.Spec.X_ACTION_ADDABLE] = service.actionAddable;
|
|
53
|
+
o[Spec_1.Spec.X_EVENT_ADDABLE] = service.eventAddable;
|
|
54
|
+
if (service.source) {
|
|
55
|
+
o[Spec_1.Spec.X_SOURCE] = service.source;
|
|
56
|
+
}
|
|
57
|
+
return o;
|
|
58
|
+
}
|
|
59
|
+
static encodeArray(services) {
|
|
60
|
+
const array = [];
|
|
61
|
+
services.forEach(service => {
|
|
62
|
+
array.push(ServiceTemplateCodec.encode(service));
|
|
63
|
+
});
|
|
64
|
+
return array;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
exports.ServiceTemplateCodec = ServiceTemplateCodec;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EventReceiver } from './event/EventReceiver';
|
|
2
|
+
import { Authorization } from './authorization/Authorization';
|
|
3
|
+
export declare class Application {
|
|
4
|
+
appId: string;
|
|
5
|
+
name: string;
|
|
6
|
+
eventReceiver: EventReceiver;
|
|
7
|
+
authorization: Authorization;
|
|
8
|
+
organization: string;
|
|
9
|
+
createBy: string;
|
|
10
|
+
createAt: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Application = void 0;
|
|
4
|
+
class Application {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.appId = '';
|
|
7
|
+
this.name = '';
|
|
8
|
+
this.organization = '';
|
|
9
|
+
this.createBy = '';
|
|
10
|
+
this.createAt = '';
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.Application = Application;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare enum AuthorizationType {
|
|
2
|
+
UNDEFINED = "undefined",
|
|
3
|
+
EVENTBUS = "eventbus",
|
|
4
|
+
HTTP = "http",
|
|
5
|
+
JWT = "jwt"
|
|
6
|
+
}
|
|
7
|
+
export declare function AuthorizationTypeToString(type: AuthorizationType): string;
|
|
8
|
+
export declare function AuthorizationTypeFromString(type: string): AuthorizationType;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthorizationType = void 0;
|
|
4
|
+
exports.AuthorizationTypeToString = AuthorizationTypeToString;
|
|
5
|
+
exports.AuthorizationTypeFromString = AuthorizationTypeFromString;
|
|
6
|
+
var AuthorizationType;
|
|
7
|
+
(function (AuthorizationType) {
|
|
8
|
+
AuthorizationType["UNDEFINED"] = "undefined";
|
|
9
|
+
AuthorizationType["EVENTBUS"] = "eventbus";
|
|
10
|
+
AuthorizationType["HTTP"] = "http";
|
|
11
|
+
AuthorizationType["JWT"] = "jwt";
|
|
12
|
+
})(AuthorizationType || (exports.AuthorizationType = AuthorizationType = {}));
|
|
13
|
+
function AuthorizationTypeToString(type) {
|
|
14
|
+
return type.toString();
|
|
15
|
+
}
|
|
16
|
+
function AuthorizationTypeFromString(type) {
|
|
17
|
+
const keys = Object.keys(AuthorizationType);
|
|
18
|
+
for (const key of keys) {
|
|
19
|
+
const s = AuthorizationTypeToString(AuthorizationType[key]);
|
|
20
|
+
if (s === type) {
|
|
21
|
+
return AuthorizationType[key];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return AuthorizationType.UNDEFINED;
|
|
25
|
+
}
|