Commit d166be02cabe1374048d6d198f2abb1100bb46f0
Committed by
GitHub
Merge pull request #3366 from ChantsovaEkaterina/improvement/service-completion
Improvement/service completion - services arguments and descriptions correction
Showing
1 changed file
with
133 additions
and
142 deletions
... | ... | @@ -24,7 +24,7 @@ export const alarmDataHref = '<a href="https://github.com/thingsboard/thingsboar |
24 | 24 | |
25 | 25 | export const alarmDataQueryHref = '<a href="https://github.com/thingsboard/thingsboard/blob/master/ui-ngx/src/app/shared/models/query/query.models.ts#L558">Alarm data query</a>'; |
26 | 26 | |
27 | -export const attributeScopeHref ='<a href="https://github.com/thingsboard/thingsboard/blob/13e6b10b7ab830e64d31b99614a9d95a1a25928a/ui-ngx/src/app/shared/models/telemetry/telemetry.models.ts#L37">Attribute scope</a>'; | |
27 | +export const attributeScopeHref = '<a href="https://github.com/thingsboard/thingsboard/blob/13e6b10b7ab830e64d31b99614a9d95a1a25928a/ui-ngx/src/app/shared/models/telemetry/telemetry.models.ts#L37">Attribute scope</a>'; | |
28 | 28 | |
29 | 29 | export const entityTypeHref = '<a href="https://github.com/thingsboard/thingsboard/blob/13e6b10b7ab830e64d31b99614a9d95a1a25928a/ui-ngx/src/app/shared/models/entity-type.models.ts#L36">EntityType</a>'; |
30 | 30 | |
... | ... | @@ -32,7 +32,7 @@ export const pageDataHref = '<a href="https://github.com/thingsboard/thingsboard |
32 | 32 | |
33 | 33 | export const deviceInfoHref = '<a href="https://github.com/thingsboard/thingsboard/blob/13e6b10b7ab830e64d31b99614a9d95a1a25928a/ui-ngx/src/app/shared/models/device.models.ts#L33">DeviceInfo</a>'; |
34 | 34 | |
35 | -export const assetInfoHref = '<a href="https://github.com/thingsboard/thingsboard/blob/13e6b10b7ab830e64d31b99614a9d95a1a25928a/ui-ngx/src/app/shared/models/asset.models.ts#L32">AssetInfo</a>' | |
35 | +export const assetInfoHref = '<a href="https://github.com/thingsboard/thingsboard/blob/13e6b10b7ab830e64d31b99614a9d95a1a25928a/ui-ngx/src/app/shared/models/asset.models.ts#L32">AssetInfo</a>'; | |
36 | 36 | |
37 | 37 | export const entityViewInfoHref = '<a href = "https://github.com/thingsboard/thingsboard/blob/13e6b10b7ab830e64d31b99614a9d95a1a25928a/ui-ngx/src/app/shared/models/entity-view.models.ts#L47">EntityViewInfo</a>'; |
38 | 38 | |
... | ... | @@ -84,15 +84,15 @@ export const stateParamsHref = '<a href="https://github.com/thingsboard/thingsbo |
84 | 84 | |
85 | 85 | export const aliasInfoHref = '<a href="https://github.com/thingsboard/thingsboard/blob/master/ui-ngx/src/app/core/api/widget-api.models.ts#L88">Alias info</a>'; |
86 | 86 | |
87 | -export const entityAliasFilterHref = '<a href="https://github.com/thingsboard/thingsboard/blob/master/ui-ngx/src/app/shared/models/alias.models.ts#L134">Entity alias filter</a>' | |
87 | +export const entityAliasFilterHref = '<a href="https://github.com/thingsboard/thingsboard/blob/master/ui-ngx/src/app/shared/models/alias.models.ts#L134">Entity alias filter</a>'; | |
88 | 88 | |
89 | -export const entityAliasFilterResultHref = '<a href="https://github.com/thingsboard/thingsboard/blob/master/ui-ngx/src/app/shared/models/alias.models.ts#L158">Entity alias filter result</a>' | |
89 | +export const entityAliasFilterResultHref = '<a href="https://github.com/thingsboard/thingsboard/blob/master/ui-ngx/src/app/shared/models/alias.models.ts#L158">Entity alias filter result</a>'; | |
90 | 90 | |
91 | -export const importEntityDataHref = '<a href="https://github.com/thingsboard/thingsboard/blob/master/ui-ngx/src/app/shared/models/entity.models.ts#L28">Import entity data</a>' | |
91 | +export const importEntityDataHref = '<a href="https://github.com/thingsboard/thingsboard/blob/master/ui-ngx/src/app/shared/models/entity.models.ts#L28">Import entity data</a>'; | |
92 | 92 | |
93 | -export const importEntitiesResultInfoHref = '<a href="https://github.com/thingsboard/thingsboard/blob/master/ui-ngx/src/app/shared/models/entity.models.ts#L42">Import entities result info</a>' | |
93 | +export const importEntitiesResultInfoHref = '<a href="https://github.com/thingsboard/thingsboard/blob/master/ui-ngx/src/app/shared/models/entity.models.ts#L42">Import entities result info</a>'; | |
94 | 94 | |
95 | -export const customDialogComponentHref = '<a href="https://github.com/thingsboard/thingsboard/blob/master/ui-ngx/src/app/modules/home/components/widget/dialog/custom-dialog.component.ts#L48">CustomDialogComponent</a>' | |
95 | +export const customDialogComponentHref = '<a href="https://github.com/thingsboard/thingsboard/blob/master/ui-ngx/src/app/modules/home/components/widget/dialog/custom-dialog.component.ts#L48">CustomDialogComponent</a>'; | |
96 | 96 | |
97 | 97 | export const pageLinkArg: FunctionArg = { |
98 | 98 | name: 'pageLink', |
... | ... | @@ -135,21 +135,20 @@ export function observableArrayReturnType(objectType: string): FunctionArgType { |
135 | 135 | }; |
136 | 136 | } |
137 | 137 | |
138 | -export function observableBaseDataReturnType(objectType: string): FunctionArgType { | |
138 | +export function observableBaseDataReturnType(): FunctionArgType { | |
139 | 139 | return { |
140 | - type: `Observable<${baseDataHref}<${objectType}>>`, | |
141 | - description: `An <code>Observable</code> of page result as a <code>${baseDataHref}</code> holding array of <code>${objectType}</code> objects.` | |
140 | + type: `Observable<${baseDataHref}<${entityIdHref}>>`, | |
141 | + description: `An <code>Observable</code> of <code>${baseDataHref}</code> object.` | |
142 | 142 | }; |
143 | 143 | } |
144 | 144 | |
145 | -export function observableArrayBaseDataReturnType(objectType: string): FunctionArgType { | |
145 | +export function observableArrayBaseDataReturnType(): FunctionArgType { | |
146 | 146 | return { |
147 | - type: `Observable<Array<${baseDataHref}<${objectType}>>>`, | |
148 | - description: `An <code>Observable</code> of page result as a <code>${baseDataHref}</code> holding array of <code>${objectType}</code> objects.` | |
147 | + type: `Observable<Array<${baseDataHref}<${entityIdHref}>>>`, | |
148 | + description: `An <code>Observable</code> of array of <code>${baseDataHref}</code> objects.` | |
149 | 149 | }; |
150 | 150 | } |
151 | 151 | |
152 | - | |
153 | 152 | export function observablePageDataReturnType(objectType: string): FunctionArgType { |
154 | 153 | return { |
155 | 154 | type: `Observable<${pageDataHref}<${objectType}>>`, |
... | ... | @@ -157,8 +156,6 @@ export function observablePageDataReturnType(objectType: string): FunctionArgTyp |
157 | 156 | }; |
158 | 157 | } |
159 | 158 | |
160 | - | |
161 | - | |
162 | 159 | export const serviceCompletions: TbEditorCompletions = { |
163 | 160 | deviceService: { |
164 | 161 | description: 'Device Service API<br>' + |
... | ... | @@ -362,7 +359,7 @@ export const serviceCompletions: TbEditorCompletions = { |
362 | 359 | type: '<a href="https://github.com/thingsboard/thingsboard/blob/13e6b10b7ab830e64d31b99614a9d95a1a25928a/ui-ngx/src/app/core/http/asset.service.ts#L29">AssetService</a>', |
363 | 360 | children: { |
364 | 361 | getTenantAssetInfos: { |
365 | - description: 'Get tenant asset', | |
362 | + description: 'Get tenant assets', | |
366 | 363 | meta: 'function', |
367 | 364 | args: [ |
368 | 365 | pageLinkArg, |
... | ... | @@ -530,7 +527,7 @@ export const serviceCompletions: TbEditorCompletions = { |
530 | 527 | description: 'Get entity view info by id', |
531 | 528 | meta: 'function', |
532 | 529 | args: [ |
533 | - {name: 'entityViewId', type: 'string', description: 'Id of the entities view'}, | |
530 | + {name: 'entityViewId', type: 'string', description: 'Id of the entity view'}, | |
534 | 531 | requestConfigArg |
535 | 532 | ], |
536 | 533 | return: observableReturnType(entityViewInfoHref) |
... | ... | @@ -575,7 +572,7 @@ export const serviceCompletions: TbEditorCompletions = { |
575 | 572 | meta: 'function', |
576 | 573 | args: [ |
577 | 574 | {name: 'customerId', type: 'string', description: 'Id of the customer'}, |
578 | - {name: 'entityViewId', type: 'string', description: 'Id of the entity viewId'}, | |
575 | + {name: 'entityViewId', type: 'string', description: 'Id of the entity view'}, | |
579 | 576 | requestConfigArg |
580 | 577 | ], |
581 | 578 | return: observableReturnType(entityViewHref) |
... | ... | @@ -596,7 +593,7 @@ export const serviceCompletions: TbEditorCompletions = { |
596 | 593 | { |
597 | 594 | name: 'query', |
598 | 595 | type: '<a href="https://github.com/thingsboard/thingsboard/blob/13e6b10b7ab830e64d31b99614a9d95a1a25928a/ui-ngx/src/app/shared/models/asset.models.ts#L37">AssetSearchQuery</a>', |
599 | - description: 'Asset search query object' | |
596 | + description: 'Entity view search query object' | |
600 | 597 | }, |
601 | 598 | requestConfigArg |
602 | 599 | ], |
... | ... | @@ -655,7 +652,7 @@ export const serviceCompletions: TbEditorCompletions = { |
655 | 652 | type: '<a href="https://github.com/thingsboard/thingsboard/blob/13e6b10b7ab830e64d31b99614a9d95a1a25928a/ui-ngx/src/app/core/http/dashboard.service.ts#L32">DashboardService</a>', |
656 | 653 | children: { |
657 | 654 | getTenantDashboards: { |
658 | - description: 'Get tenant dashboard', | |
655 | + description: 'Get tenant dashboards', | |
659 | 656 | meta: 'function', |
660 | 657 | args: [ |
661 | 658 | pageLinkArg, |
... | ... | @@ -664,16 +661,17 @@ export const serviceCompletions: TbEditorCompletions = { |
664 | 661 | return: observablePageDataReturnType(dashboardInfoHref) |
665 | 662 | }, |
666 | 663 | getTenantDashboardsByTenantId: { |
667 | - description: 'Get tenant dashboards by id', | |
664 | + description: 'Get dashboards by tenant id', | |
668 | 665 | meta: 'function', |
669 | 666 | args: [ |
670 | 667 | {name: 'tenantId', type: 'string', description: 'Id of the tenant'}, |
671 | - pageLinkArg | |
668 | + pageLinkArg, | |
669 | + requestConfigArg | |
672 | 670 | ], |
673 | 671 | return: observablePageDataReturnType(dashboardInfoHref) |
674 | 672 | }, |
675 | 673 | getCustomerDashboards: { |
676 | - description: 'Get customer dashboard by id', | |
674 | + description: 'Get dashboards by customer id', | |
677 | 675 | meta: 'function', |
678 | 676 | args: [ |
679 | 677 | {name: 'customerId', type: 'string', description: 'Id of the customer'}, |
... | ... | @@ -713,7 +711,7 @@ export const serviceCompletions: TbEditorCompletions = { |
713 | 711 | description: 'Delete dashboard by id', |
714 | 712 | meta: 'function', |
715 | 713 | args: [ |
716 | - {name: 'dashboardId', type: 'string', description: 'Id of the entity view'}, | |
714 | + {name: 'dashboardId', type: 'string', description: 'Id of the dashboard'}, | |
717 | 715 | requestConfigArg |
718 | 716 | ], |
719 | 717 | return: observableVoid() |
... | ... | @@ -729,7 +727,7 @@ export const serviceCompletions: TbEditorCompletions = { |
729 | 727 | return: observableReturnType(dashboardHref) |
730 | 728 | }, |
731 | 729 | unassignDashboardFromCustomer: { |
732 | - description: 'Unassign dashboard from any customer', | |
730 | + description: 'Unassign dashboard from specific customer', | |
733 | 731 | meta: 'function', |
734 | 732 | args: [ |
735 | 733 | {name: 'customerId', type: 'string', description: 'Id of the customer'}, |
... | ... | @@ -757,7 +755,7 @@ export const serviceCompletions: TbEditorCompletions = { |
757 | 755 | return: observableReturnType(dashboardHref) |
758 | 756 | }, |
759 | 757 | updateDashboardCustomers: { |
760 | - description: 'Update dashboard by id', | |
758 | + description: 'Update customers assigned to dashboard by ids', | |
761 | 759 | meta: 'function', |
762 | 760 | args: [ |
763 | 761 | {name: 'dashboardId', type: 'string', description: 'Id of the dashboard'}, |
... | ... | @@ -767,7 +765,7 @@ export const serviceCompletions: TbEditorCompletions = { |
767 | 765 | return: observableReturnType(dashboardHref) |
768 | 766 | }, |
769 | 767 | addDashboardCustomers: { |
770 | - description: 'Add dashboard customers by ids', | |
768 | + description: 'Assign (Add) customers to dashboard by ids', | |
771 | 769 | meta: 'function', |
772 | 770 | args: [ |
773 | 771 | {name: 'dashboardId', type: 'string', description: 'Id of the dashboard'}, |
... | ... | @@ -777,14 +775,14 @@ export const serviceCompletions: TbEditorCompletions = { |
777 | 775 | return: observableReturnType(dashboardHref) |
778 | 776 | }, |
779 | 777 | removeDashboardCustomers: { |
780 | - description: 'Remove dashboard customers dy ids', | |
778 | + description: 'Unassign (Remove) customers from dashboard by ids', | |
781 | 779 | meta: 'function', |
782 | 780 | args: [ |
783 | 781 | {name: 'dashboardId', type: 'string', description: 'Id of the dashboard'}, |
784 | 782 | {name: 'customerIds', type: `Array<string>`, description: 'Id of the customers'}, |
785 | 783 | requestConfigArg |
786 | 784 | ], |
787 | - return: observableArrayReturnType(dashboardHref) | |
785 | + return: observableReturnType(dashboardHref) | |
788 | 786 | }, |
789 | 787 | getPublicDashboardLink: { |
790 | 788 | description: 'Get public dashboard link', |
... | ... | @@ -798,7 +796,7 @@ export const serviceCompletions: TbEditorCompletions = { |
798 | 796 | } |
799 | 797 | }, |
800 | 798 | getServerTimeDiff: { |
801 | - description: 'remove dashboard customers ', | |
799 | + description: 'Get time difference', | |
802 | 800 | meta: 'function', |
803 | 801 | args: [ |
804 | 802 | ], |
... | ... | @@ -822,7 +820,7 @@ export const serviceCompletions: TbEditorCompletions = { |
822 | 820 | return: observablePageDataReturnType(userHref) |
823 | 821 | }, |
824 | 822 | getTenantAdmins: { |
825 | - description: 'Get tenant admins by id', | |
823 | + description: 'Get tenant admins by id', | |
826 | 824 | meta: 'function', |
827 | 825 | args: [ |
828 | 826 | {name: 'tenantId', type: 'string', description: 'Id of the tenant'}, |
... | ... | @@ -832,10 +830,10 @@ export const serviceCompletions: TbEditorCompletions = { |
832 | 830 | return: observablePageDataReturnType(userHref) |
833 | 831 | }, |
834 | 832 | getCustomerUsers: { |
835 | - description: 'Get customer users by id', | |
833 | + description: 'Get customer users by id', | |
836 | 834 | meta: 'function', |
837 | 835 | args: [ |
838 | - {name: 'customerId', type: 'string', description: 'id of the customer'}, | |
836 | + {name: 'customerId', type: 'string', description: 'Id of the customer'}, | |
839 | 837 | pageLinkArg, |
840 | 838 | requestConfigArg |
841 | 839 | ], |
... | ... | @@ -845,7 +843,7 @@ export const serviceCompletions: TbEditorCompletions = { |
845 | 843 | description: 'Get user by id', |
846 | 844 | meta: 'function', |
847 | 845 | args: [ |
848 | - {name: 'userId', type: 'string', description: 'id of the user'}, | |
846 | + {name: 'userId', type: 'string', description: 'Id of the user'}, | |
849 | 847 | requestConfigArg |
850 | 848 | ], |
851 | 849 | return: observableReturnType(userHref) |
... | ... | @@ -855,6 +853,7 @@ export const serviceCompletions: TbEditorCompletions = { |
855 | 853 | meta: 'function', |
856 | 854 | args: [ |
857 | 855 | {name: 'user', type: userHref, description: 'User object to save'}, |
856 | + {name: 'sendActivationMail', type: 'boolean', description: 'Send activation email', optional: true}, | |
858 | 857 | requestConfigArg |
859 | 858 | ], |
860 | 859 | return: observableReturnType(userHref) |
... | ... | @@ -876,7 +875,7 @@ export const serviceCompletions: TbEditorCompletions = { |
876 | 875 | {name: 'userCredentialsEnabled', type: 'boolean', description: 'User credentials enabled'}, |
877 | 876 | requestConfigArg |
878 | 877 | ], |
879 | - return: observableReturnType(userHref) | |
878 | + return: observableReturnTypeVariable('any') | |
880 | 879 | }, |
881 | 880 | getActivationLink: { |
882 | 881 | description: 'Get activation link by id', |
... | ... | @@ -885,7 +884,7 @@ export const serviceCompletions: TbEditorCompletions = { |
885 | 884 | {name: 'userId', type: 'string', description: 'Id of the user'}, |
886 | 885 | requestConfigArg |
887 | 886 | ], |
888 | - return:observableReturnTypeVariable('string') | |
887 | + return: observableReturnTypeVariable('string') | |
889 | 888 | }, |
890 | 889 | sendActivationEmail: { |
891 | 890 | description: 'Send activation email', |
... | ... | @@ -928,8 +927,7 @@ export const serviceCompletions: TbEditorCompletions = { |
928 | 927 | description: 'Delete relations by entity id', |
929 | 928 | meta: 'function', |
930 | 929 | args: [ |
931 | - {name: 'entityId', type: entityIdHref, description: 'Id to the entity'}, | |
932 | - {name: 'relationType', type: 'string', description: 'Relation type'}, | |
930 | + {name: 'entityId', type: entityIdHref, description: 'Entity Id'}, | |
933 | 931 | requestConfigArg |
934 | 932 | ], |
935 | 933 | return: observableVoid() |
... | ... | @@ -1005,7 +1003,7 @@ export const serviceCompletions: TbEditorCompletions = { |
1005 | 1003 | description: 'Find by query', |
1006 | 1004 | meta: 'function', |
1007 | 1005 | args: [ |
1008 | - {name: 'query', type: entityRelationsQueryHref, description: 'Query'}, | |
1006 | + {name: 'query', type: entityRelationsQueryHref, description: 'Entity relations query'}, | |
1009 | 1007 | requestConfigArg |
1010 | 1008 | ], |
1011 | 1009 | return: observableArrayReturnType(entityRelationHref) |
... | ... | @@ -1014,7 +1012,7 @@ export const serviceCompletions: TbEditorCompletions = { |
1014 | 1012 | description: 'Find info by query', |
1015 | 1013 | meta: 'function', |
1016 | 1014 | args: [ |
1017 | - {name: 'query', type: entityRelationsQueryHref, description: 'Query'}, | |
1015 | + {name: 'query', type: entityRelationsQueryHref, description: 'Entity relations query'}, | |
1018 | 1016 | requestConfigArg |
1019 | 1017 | ], |
1020 | 1018 | return: observableArrayReturnType(entityRelationInfoHref) |
... | ... | @@ -1032,8 +1030,8 @@ export const serviceCompletions: TbEditorCompletions = { |
1032 | 1030 | meta: 'function', |
1033 | 1031 | args: [ |
1034 | 1032 | {name: 'entityId', type: entityIdHref, description: 'Id of the entity'}, |
1035 | - {name: 'attributeScope', type: attributeScopeHref, description: 'Atribute scope'}, | |
1036 | - {name: 'keys', type:`Array<string>`, description: 'Array of the keys'}, | |
1033 | + {name: 'attributeScope', type: attributeScopeHref, description: 'Attribute scope'}, | |
1034 | + {name: 'keys', type: `Array<string>`, description: 'Array of the keys'}, | |
1037 | 1035 | requestConfigArg |
1038 | 1036 | ], |
1039 | 1037 | return: observableArrayReturnType(attributeDataHref) |
... | ... | @@ -1043,8 +1041,8 @@ export const serviceCompletions: TbEditorCompletions = { |
1043 | 1041 | meta: 'function', |
1044 | 1042 | args: [ |
1045 | 1043 | {name: 'entityId', type: entityIdHref, description: 'Id of the entity'}, |
1046 | - {name: 'attributeScope', type: attributeScopeHref, description: 'Atribute scope'}, | |
1047 | - {name: 'attributes', type: `array<${attributeDataHref}>`, description: 'Array of the attributes'}, | |
1044 | + {name: 'attributeScope', type: attributeScopeHref, description: 'Attribute scope'}, | |
1045 | + {name: 'attributes', type: `array<${attributeDataHref}>`, description: 'Array of the attributes data'}, | |
1048 | 1046 | requestConfigArg |
1049 | 1047 | ], |
1050 | 1048 | return: observableReturnTypeVariable('any') |
... | ... | @@ -1054,11 +1052,11 @@ export const serviceCompletions: TbEditorCompletions = { |
1054 | 1052 | meta: 'function', |
1055 | 1053 | args: [ |
1056 | 1054 | {name: 'entityId', type: entityIdHref, description: 'Id of the entity'}, |
1057 | - {name: 'timeseries', type: `Array<${attributeDataHref}>>`, description: 'Array of the timeseries'}, | |
1058 | - {name: 'deleteAllDataForKeys', type: 'boolean',optional: true, description: 'Delete all data for keys'}, | |
1055 | + {name: 'timeseries', type: `Array<${attributeDataHref}>>`, description: 'Array of the timeseries data'}, | |
1056 | + {name: 'deleteAllDataForKeys', type: 'boolean', optional: true, description: 'Delete all data for keys'}, | |
1059 | 1057 | requestConfigArg |
1060 | 1058 | ], |
1061 | - return:observableReturnTypeVariable('any') | |
1059 | + return: observableReturnTypeVariable('any') | |
1062 | 1060 | }, |
1063 | 1061 | saveEntityAttributes: { |
1064 | 1062 | description: 'Save entity attributes', |
... | ... | @@ -1066,7 +1064,7 @@ export const serviceCompletions: TbEditorCompletions = { |
1066 | 1064 | args: [ |
1067 | 1065 | {name: 'entityId', type: entityIdHref, description: 'Id of the entity'}, |
1068 | 1066 | {name: 'attributeScope', type: attributeScopeHref, description: 'Attribute scope'}, |
1069 | - {name: 'attributes', type: 'Array<${attributeDataHref}>>', description: 'Array of the attributes'}, | |
1067 | + {name: 'attributes', type: 'Array<${attributeDataHref}>>', description: 'Array of the attributes data'}, | |
1070 | 1068 | requestConfigArg |
1071 | 1069 | ], |
1072 | 1070 | return: observableReturnTypeVariable('any') |
... | ... | @@ -1077,10 +1075,10 @@ export const serviceCompletions: TbEditorCompletions = { |
1077 | 1075 | args: [ |
1078 | 1076 | {name: 'entityId', type: entityIdHref, description: 'Id of the entity'}, |
1079 | 1077 | {name: 'timeseriesScope', type: 'string', description: 'Timeseries scope'}, |
1080 | - {name: 'timeseries', type: `Array<attributeDataHref>`, description: 'Array of the timeseries'}, | |
1078 | + {name: 'timeseries', type: `Array<attributeDataHref>`, description: 'Array of the timeseries data'}, | |
1081 | 1079 | requestConfigArg |
1082 | 1080 | ], |
1083 | - return:observableReturnTypeVariable('any') | |
1081 | + return: observableReturnTypeVariable('any') | |
1084 | 1082 | }, |
1085 | 1083 | } |
1086 | 1084 | }, |
... | ... | @@ -1098,7 +1096,7 @@ export const serviceCompletions: TbEditorCompletions = { |
1098 | 1096 | {name: 'entityId', type: 'string', description: 'Id of the entity'}, |
1099 | 1097 | requestConfigArg |
1100 | 1098 | ], |
1101 | - return:observableBaseDataReturnType(entityIdHref) | |
1099 | + return: observableBaseDataReturnType() | |
1102 | 1100 | }, |
1103 | 1101 | getEntities: { |
1104 | 1102 | description: 'Get entities by ids', |
... | ... | @@ -1108,181 +1106,174 @@ export const serviceCompletions: TbEditorCompletions = { |
1108 | 1106 | {name: 'entityIds', type: `Array<string>`, description: 'Ids of the entities'}, |
1109 | 1107 | requestConfigArg |
1110 | 1108 | ], |
1111 | - return:observableArrayBaseDataReturnType(entityIdHref) | |
1109 | + return: observableArrayBaseDataReturnType() | |
1112 | 1110 | }, |
1113 | 1111 | getEntitiesByNameFilter: { |
1114 | 1112 | description: 'Get entities by name filter', |
1115 | 1113 | meta: 'function', |
1116 | 1114 | args: [ |
1117 | 1115 | {name: 'entityType', type: entityTypeHref, description: 'Entity type'}, |
1118 | - {name: 'entityNameFilter', type: 'string', description: 'Name filter of the entity'}, | |
1116 | + {name: 'entityNameFilter', type: 'string', description: 'Name filter for the entity'}, | |
1119 | 1117 | {name: 'pageSize', type: 'number', description: 'Size of the page'}, |
1120 | - {name: 'subType', type: 'string',optional: true, description: 'Subtype'}, | |
1118 | + {name: 'subType', type: 'string', optional: true, description: 'Subtype'}, | |
1121 | 1119 | requestConfigArg |
1122 | 1120 | ], |
1123 | - return:observableArrayBaseDataReturnType(entityIdHref) | |
1121 | + return: observableArrayBaseDataReturnType() | |
1124 | 1122 | }, |
1125 | 1123 | findEntityDataByQuery: { |
1126 | 1124 | description: 'Find entity data by query', |
1127 | 1125 | meta: 'function', |
1128 | 1126 | args: [ |
1129 | - {name: 'query', type: entityDataQueryHref, description: 'Query'}, | |
1130 | - | |
1127 | + {name: 'query', type: entityDataQueryHref, description: 'Entity data query'}, | |
1131 | 1128 | requestConfigArg |
1132 | 1129 | ], |
1133 | - return:observablePageDataReturnType(entityDataHref) | |
1130 | + return: observablePageDataReturnType(entityDataHref) | |
1134 | 1131 | }, |
1135 | 1132 | findAlarmDataByQuery: { |
1136 | 1133 | description: 'Find alarm data by query', |
1137 | 1134 | meta: 'function', |
1138 | 1135 | args: [ |
1139 | - {name: 'query', type: alarmDataQueryHref, description: 'Query'}, | |
1136 | + {name: 'query', type: alarmDataQueryHref, description: 'Alarm data query'}, | |
1140 | 1137 | requestConfigArg |
1141 | 1138 | ], |
1142 | - return:observablePageDataReturnType(alarmDataHref) | |
1139 | + return: observablePageDataReturnType(alarmDataHref) | |
1143 | 1140 | }, |
1144 | 1141 | findEntityInfosByFilterAndName: { |
1145 | 1142 | description: 'Find entity infos by filter and name', |
1146 | 1143 | meta: 'function', |
1147 | 1144 | args: [ |
1148 | - {name: 'filter', type: entityFilterHref, description: 'Filter of the entity'}, | |
1145 | + {name: 'filter', type: entityFilterHref, description: 'Filter for the entities'}, | |
1149 | 1146 | {name: 'searchText', type: 'string', description: 'Search text'}, |
1150 | 1147 | requestConfigArg |
1151 | 1148 | ], |
1152 | - return:observablePageDataReturnType(entityInfoHref) | |
1149 | + return: observablePageDataReturnType(entityInfoHref) | |
1153 | 1150 | }, |
1154 | 1151 | findSingleEntityInfoByEntityFilter: { |
1155 | - description: 'Find single entity infos by filter of the entity ', | |
1152 | + description: 'Find single entity infos by filter', | |
1156 | 1153 | meta: 'function', |
1157 | 1154 | args: [ |
1158 | - {name: 'filter', type: entityFilterHref, description: 'Filter of the entity'}, | |
1159 | - {name: 'searchText', type: 'string', description: 'search text'}, | |
1155 | + {name: 'filter', type: entityFilterHref, description: 'Filter for the entity'}, | |
1160 | 1156 | requestConfigArg |
1161 | 1157 | ], |
1162 | - return:observableReturnType(entityInfoHref) | |
1158 | + return: observableReturnType(entityInfoHref) | |
1163 | 1159 | }, |
1164 | 1160 | getAliasFilterTypesByEntityTypes: { |
1165 | - description: 'Get alias filter types by entity type', | |
1161 | + description: 'Get alias filter types by entity types', | |
1166 | 1162 | meta: 'function', |
1167 | 1163 | args: [ |
1168 | - {name: 'entityTypes', type:`Array<${entityTypeHref}|${aliasEntityTypeHref}>`, description: 'Entity types'}, | |
1169 | - {name: 'searchText', type: 'string', description: 'Search text'} | |
1164 | + {name: 'entityTypes', type: `Array<${entityTypeHref}|${aliasEntityTypeHref}>`, description: 'Entity types'} | |
1170 | 1165 | ], |
1171 | - return:{ | |
1172 | - type:`Array<${aliasFilterTypeHref}$gt;`, | |
1173 | - description:`Array of ${aliasFilterTypeHref} objects` | |
1166 | + return: { | |
1167 | + type: `Array<${aliasFilterTypeHref}$gt;`, | |
1168 | + description: `Array of ${aliasFilterTypeHref} objects` | |
1174 | 1169 | } |
1175 | 1170 | }, |
1176 | 1171 | filterAliasByEntityTypes: { |
1177 | - description: 'Filter alias by entity type', | |
1172 | + description: 'Filter alias by entity types', | |
1178 | 1173 | meta: 'function', |
1179 | 1174 | args: [ |
1180 | - {name: 'entityAlias', type:entityAliasHref, description: 'Alias of the entity'}, | |
1181 | - {name: 'entityTypes', type:`Array<${entityTypeHref}|${aliasEntityTypeHref}>`, description: 'Entity types'} | |
1175 | + {name: 'entityAlias', type: entityAliasHref, description: 'Alias of the entity'}, | |
1176 | + {name: 'entityTypes', type: `Array<${entityTypeHref}|${aliasEntityTypeHref}>`, description: 'Entity types'} | |
1182 | 1177 | ], |
1183 | - return:{ | |
1184 | - type:'boolean', | |
1185 | - description:`Returns <code>boolean</code> variable based on the filter` | |
1178 | + return: { | |
1179 | + type: 'boolean', | |
1180 | + description: `Returns <code>boolean</code> variable based on the filter` | |
1186 | 1181 | } |
1187 | 1182 | }, |
1188 | 1183 | prepareAllowedEntityTypesList: { |
1189 | - description: 'Prepare allowed types of the entity list', | |
1184 | + description: 'Prepare allowed entity types list', | |
1190 | 1185 | meta: 'function', |
1191 | 1186 | args: [ |
1192 | - {name: 'allowedEntityTypes', type:`Array<${entityTypeHref}|${aliasEntityTypeHref}>`, description: 'Entity types'}, | |
1193 | - {name: 'useAliasEntityTypes', type:'boolean', description: 'Use alias entity types'}, | |
1187 | + {name: 'allowedEntityTypes', type: `Array<${entityTypeHref}|${aliasEntityTypeHref}>`, description: 'Entity types'}, | |
1188 | + {name: 'useAliasEntityTypes', type: 'boolean', description: 'Use alias entity types'}, | |
1194 | 1189 | ], |
1195 | - return:{ | |
1196 | - type:`Array<${entityTypeHref}|${aliasEntityTypeHref}>`, | |
1197 | - description:`Returns entity types array` | |
1190 | + return: { | |
1191 | + type: `Array<${entityTypeHref}|${aliasEntityTypeHref}>`, | |
1192 | + description: `Returns entity types array` | |
1198 | 1193 | } |
1199 | 1194 | }, |
1200 | 1195 | getEntityKeys: { |
1201 | 1196 | description: 'Get entity keys by id', |
1202 | 1197 | meta: 'function', |
1203 | 1198 | args: [ |
1204 | - {name: 'entityId', type:entityIdHref, description: 'id of the entity'}, | |
1205 | - {name: 'query', type:'string', description: 'Query'}, | |
1206 | - {name: 'type', type:dataKeyTypeHref, description: 'Query'}, | |
1199 | + {name: 'entityId', type: entityIdHref, description: 'Id of the entity'}, | |
1200 | + {name: 'query', type: 'string', description: 'Key name starts with'}, | |
1201 | + {name: 'type', type: dataKeyTypeHref, description: 'Datakey type'}, | |
1207 | 1202 | requestConfigArg |
1208 | 1203 | ], |
1209 | - return:{ | |
1210 | - type:`Observable<Array<string>>`, | |
1211 | - description:`An <code>Observable</code> of <code>string</code> variable.` | |
1204 | + return: { | |
1205 | + type: `Observable<Array<string>>`, | |
1206 | + description: `An <code>Observable</code> of array of <code>string</code> variables.` | |
1212 | 1207 | } |
1213 | - // observableArrayReturnType('string') | |
1214 | 1208 | }, |
1215 | 1209 | createDatasourcesFromSubscriptionsInfo: { |
1216 | - description: 'Create database from subscriptions info', | |
1210 | + description: 'Create datasources from subscriptions info', | |
1217 | 1211 | meta: 'function', |
1218 | 1212 | args: [ |
1219 | - {name: 'subscriptionsInfo', type:'array<subscriptionInfoHref>', description: 'Subscriptions info'} | |
1213 | + {name: 'subscriptionsInfo', type: 'array<subscriptionInfoHref>', description: 'Subscriptions info'} | |
1220 | 1214 | ], |
1221 | - return:{ | |
1222 | - type:`Array<${dataSourceHref}>`, | |
1223 | - description:`Array of <code>${dataSourceHref}</code> objects` | |
1215 | + return: { | |
1216 | + type: `Array<${dataSourceHref}>`, | |
1217 | + description: `Array of <code>${dataSourceHref}</code> objects` | |
1224 | 1218 | } |
1225 | 1219 | }, |
1226 | 1220 | createAlarmSourceFromSubscriptionInfo: { |
1227 | 1221 | description: 'Create alarm source from subscriptions info', |
1228 | 1222 | meta: 'function', |
1229 | 1223 | args: [ |
1230 | - {name: 'subscriptionInfo', type:subscriptionInfoHref, description: 'Subscription info'} | |
1224 | + {name: 'subscriptionInfo', type: subscriptionInfoHref, description: 'Subscription info'} | |
1231 | 1225 | ], |
1232 | - return:{ | |
1233 | - type:`${dataSourceHref}`, | |
1234 | - description:`<code>${dataSourceHref}</code> object` | |
1226 | + return: { | |
1227 | + type: `${dataSourceHref}`, | |
1228 | + description: `<code>${dataSourceHref}</code> object` | |
1235 | 1229 | } |
1236 | 1230 | }, |
1237 | 1231 | resolveAlias: { |
1238 | 1232 | description: 'Resolve alias', |
1239 | 1233 | meta: 'function', |
1240 | 1234 | args: [ |
1241 | - {name: 'entityAlias', type:entityAliasHref, description: 'Alias of the entity'}, | |
1242 | - {name: 'stateParams', type:stateParamsHref, description: 'State params'}, | |
1235 | + {name: 'entityAlias', type: entityAliasHref, description: 'Entity alias'}, | |
1236 | + {name: 'stateParams', type: stateParamsHref, description: 'State params'}, | |
1243 | 1237 | ], |
1244 | - return:observableReturnType(aliasInfoHref) | |
1238 | + return: observableReturnType(aliasInfoHref) | |
1245 | 1239 | }, |
1246 | 1240 | resolveAliasFilter: { |
1247 | 1241 | description: 'Resolve alias filter', |
1248 | 1242 | meta: 'function', |
1249 | 1243 | args: [ |
1250 | - {name: 'filter', type:entityAliasFilterHref, description: 'Entity alias filter'}, | |
1251 | - {name: 'stateParams', type:stateParamsHref, description: 'State params'}, | |
1244 | + {name: 'filter', type: entityAliasFilterHref, description: 'Entity alias filter'}, | |
1245 | + {name: 'stateParams', type: stateParamsHref, description: 'State params'}, | |
1252 | 1246 | ], |
1253 | - return:observableReturnType(entityAliasFilterResultHref) | |
1247 | + return: observableReturnType(entityAliasFilterResultHref) | |
1254 | 1248 | }, |
1255 | 1249 | checkEntityAlias: { |
1256 | 1250 | description: 'Check entity alias', |
1257 | 1251 | meta: 'function', |
1258 | 1252 | args: [ |
1259 | - {name: 'entityAlias', type:entityAliasHref, description: 'Alias of the entity'}, | |
1253 | + {name: 'entityAlias', type: entityAliasHref, description: 'Entity alias'}, | |
1260 | 1254 | ], |
1261 | - return:observableReturnTypeVariable('boolean') | |
1262 | - // observableReturnType('boolean') | |
1255 | + return: observableReturnTypeVariable('boolean') | |
1263 | 1256 | }, |
1264 | 1257 | saveEntityParameters: { |
1265 | 1258 | description: 'Save entity parameters', |
1266 | 1259 | meta: 'function', |
1267 | 1260 | args: [ |
1268 | - {name: 'entityType', type:entityTypeHref, description: 'Entity type'}, | |
1269 | - {name: 'entityData', type:importEntityDataHref, description: 'Data of the entity'}, | |
1270 | - {name: 'update', type:'boolean', description: 'Update'}, | |
1261 | + {name: 'entityType', type: entityTypeHref, description: 'Entity type'}, | |
1262 | + {name: 'entityData', type: importEntityDataHref, description: 'Entity data'}, | |
1263 | + {name: 'update', type: 'boolean', description: 'Update'}, | |
1271 | 1264 | requestConfigArg |
1272 | 1265 | ], |
1273 | - return:observableReturnType(importEntitiesResultInfoHref) | |
1266 | + return: observableReturnType(importEntitiesResultInfoHref) | |
1274 | 1267 | }, |
1275 | 1268 | saveEntityData: { |
1276 | 1269 | description: 'Save entity data', |
1277 | 1270 | meta: 'function', |
1278 | 1271 | args: [ |
1279 | - {name: 'entityId', type:entityIdHref, description: 'Id of the entity'}, | |
1280 | - {name: 'entityData', type:importEntityDataHref, description: 'Data of the entity'}, | |
1272 | + {name: 'entityId', type: entityIdHref, description: 'Id of the entity'}, | |
1273 | + {name: 'entityData', type: importEntityDataHref, description: 'Entity data'}, | |
1281 | 1274 | requestConfigArg |
1282 | 1275 | ], |
1283 | - return:observableReturnTypeVariable('any') | |
1284 | - | |
1285 | - // observableReturnType('any') | |
1276 | + return: observableReturnTypeVariable('any') | |
1286 | 1277 | }, |
1287 | 1278 | } |
1288 | 1279 | }, |
... | ... | @@ -1296,54 +1287,54 @@ export const serviceCompletions: TbEditorCompletions = { |
1296 | 1287 | description: 'Confirm', |
1297 | 1288 | meta: 'function', |
1298 | 1289 | args: [ |
1299 | - {name: 'title', type:'string', description: 'Title'}, | |
1300 | - {name: 'message', type:'string', description: 'Message'}, | |
1301 | - {name: 'cancel', type:'string',optional: true, description: 'Cancel'}, | |
1302 | - {name: 'ok', type:'string',optional: true, description: 'Ok'}, | |
1303 | - {name: 'fullscreen', type:'boolean',optional: true, description: 'Fullscreen'}, | |
1290 | + {name: 'title', type: 'string', description: 'Title'}, | |
1291 | + {name: 'message', type: 'string', description: 'Message'}, | |
1292 | + {name: 'cancel', type: 'string', optional: true, description: 'Cancel'}, | |
1293 | + {name: 'ok', type: 'string', optional: true, description: 'Ok'}, | |
1294 | + {name: 'fullscreen', type: 'boolean', optional: true, description: 'Fullscreen'}, | |
1304 | 1295 | ], |
1305 | - return:observableReturnTypeVariable('boolean') | |
1296 | + return: observableReturnTypeVariable('boolean') | |
1306 | 1297 | }, |
1307 | 1298 | alert: { |
1308 | 1299 | description: 'Alert', |
1309 | 1300 | meta: 'function', |
1310 | 1301 | args: [ |
1311 | - {name: 'title', type:'string', description: 'Title'}, | |
1312 | - {name: 'message', type:'string', description: 'Message'}, | |
1313 | - {name: 'ok', type:'string',optional: true, description: 'Ok'}, | |
1314 | - {name: 'fullscreen', type:'boolean',optional: true, description: 'Fullscreen'}, | |
1302 | + {name: 'title', type: 'string', description: 'Title'}, | |
1303 | + {name: 'message', type: 'string', description: 'Message'}, | |
1304 | + {name: 'ok', type: 'string', optional: true, description: 'Ok'}, | |
1305 | + {name: 'fullscreen', type: 'boolean', optional: true, description: 'Fullscreen'}, | |
1315 | 1306 | ], |
1316 | - return:observableReturnTypeVariable('boolean') | |
1307 | + return: observableReturnTypeVariable('boolean') | |
1317 | 1308 | }, |
1318 | 1309 | colorPicker: { |
1319 | 1310 | description: 'Color picker', |
1320 | 1311 | meta: 'function', |
1321 | 1312 | args: [ |
1322 | - {name: 'color', type:'string', description: 'Сolor'}, | |
1313 | + {name: 'color', type: 'string', description: 'Сolor'}, | |
1323 | 1314 | ], |
1324 | - return:observableReturnTypeVariable('string') | |
1315 | + return: observableReturnTypeVariable('string') | |
1325 | 1316 | }, |
1326 | 1317 | materialIconPicker: { |
1327 | 1318 | description: 'Material icon picker', |
1328 | 1319 | meta: 'function', |
1329 | 1320 | args: [ |
1330 | - {name: 'icon', type:'string', description: 'Icon'}, | |
1321 | + {name: 'icon', type: 'string', description: 'Icon'}, | |
1331 | 1322 | ], |
1332 | - return:observableReturnTypeVariable('string') | |
1323 | + return: observableReturnTypeVariable('string') | |
1333 | 1324 | }, |
1334 | 1325 | forbidden: { |
1335 | 1326 | description: 'Forbidden', |
1336 | 1327 | meta: 'function', |
1337 | 1328 | args: [ |
1338 | 1329 | ], |
1339 | - return:observableReturnTypeVariable('boolean') | |
1330 | + return: observableReturnTypeVariable('boolean') | |
1340 | 1331 | }, |
1341 | 1332 | todo: { |
1342 | 1333 | description: 'To do', |
1343 | 1334 | meta: 'function', |
1344 | 1335 | args: [ |
1345 | 1336 | ], |
1346 | - return:observableReturnTypeVariable('any') | |
1337 | + return: observableReturnTypeVariable('any') | |
1347 | 1338 | }, |
1348 | 1339 | } |
1349 | 1340 | }, |
... | ... | @@ -1352,16 +1343,16 @@ export const serviceCompletions: TbEditorCompletions = { |
1352 | 1343 | 'See <a href="https://github.com/thingsboard/thingsboard/blob/13e6b10b7ab830e64d31b99614a9d95a1a25928a/ui-ngx/src/app/modules/home/components/widget/dialog/custom-dialog.service.ts#L33">CustomDialogService</a> for API reference.', |
1353 | 1344 | meta: 'service', |
1354 | 1345 | type: '<a href="https://github.com/thingsboard/thingsboard/blob/13e6b10b7ab830e64d31b99614a9d95a1a25928a/ui-ngx/src/app/modules/home/components/widget/dialog/custom-dialog.service.ts#L33">CustomDialogService</a>', |
1355 | - children:{ | |
1346 | + children: { | |
1356 | 1347 | customDialog: { |
1357 | 1348 | description: 'Custom Dialog', |
1358 | 1349 | meta: 'function', |
1359 | 1350 | args: [ |
1360 | - {name: 'template', type:'string', description: 'Template'}, | |
1361 | - {name: 'controller', type:customDialogComponentHref, description: 'Controller'}, | |
1362 | - {name: 'data', type:'any', description: 'Data'}, | |
1351 | + {name: 'template', type: 'string', description: 'Template'}, | |
1352 | + {name: 'controller', type: customDialogComponentHref, description: 'Controller'}, | |
1353 | + {name: 'data', type: 'any', description: 'Data', optional: true}, | |
1363 | 1354 | ], |
1364 | - return:observableReturnTypeVariable('any') | |
1355 | + return: observableReturnTypeVariable('any') | |
1365 | 1356 | }, |
1366 | 1357 | } |
1367 | 1358 | }, |
... | ... | @@ -1389,4 +1380,4 @@ export const serviceCompletions: TbEditorCompletions = { |
1389 | 1380 | meta: 'service', |
1390 | 1381 | type: '<a href="https://angular.io/api/platform-browser/DomSanitizer">DomSanitizer</a>' |
1391 | 1382 | } |
1392 | -} | |
1383 | +}; | ... | ... |