@@ -89,6 +89,8 @@ declare global {
8989 type Host = `system.host.${string } `;
9090 // Guaranteed repository object
9191 type Repository = 'system.repositories' ;
92+ // Guaranteed repository object
93+ type DockerConfigs = 'system.dockers' ;
9294 // Guaranteed config objects
9395 type Config = 'system.certificates' ;
9496 // Guaranteed system config objects
@@ -147,13 +149,15 @@ declare global {
147149 ? RepositoryObject
148150 : T extends ObjectIDs . SystemConfig
149151 ? SystemConfigObject
150- : T extends ObjectIDs . Config
151- ? OtherObject & { type : 'config' }
152- : T extends ObjectIDs . AdapterScoped
153- ? AdapterScopedObject
154- : Read extends 'read'
155- ? ioBroker . Object
156- : AnyObject ;
152+ : T extends ObjectIDs . DockerConfigs
153+ ? DockerApiObject
154+ : T extends ObjectIDs . Config
155+ ? OtherObject & { type : 'config' }
156+ : T extends ObjectIDs . AdapterScoped
157+ ? AdapterScopedObject
158+ : Read extends 'read'
159+ ? ioBroker . Object
160+ : AnyObject ;
157161
158162 type Languages = 'en' | 'de' | 'ru' | 'pt' | 'nl' | 'fr' | 'it' | 'es' | 'pl' | 'uk' | 'zh-cn' ;
159163 type Translated = { en : string } & { [ lang in Languages ] ?: string } ;
@@ -1104,6 +1108,31 @@ declare global {
11041108 common : RepositoryCommon ;
11051109 }
11061110
1111+ interface DockerApiConfig {
1112+ socketPath ?: string ;
1113+ host ?: string ;
1114+ port ?: number | string ;
1115+ username ?: string ;
1116+ /** Filename, name in ioBroker certificate or base64 certificate */
1117+ ca ?: string ;
1118+ cert ?: string ;
1119+ key ?: string ;
1120+ protocol ?: 'https' | 'http' ;
1121+ }
1122+
1123+ /** Docker API configuration */
1124+ interface DockerApiObject extends BaseObject {
1125+ _id : ObjectIDs . DockerConfigs ;
1126+ type : 'config' ;
1127+ native : {
1128+ dockerApis : {
1129+ [ configName : string ] : DockerApiConfig ;
1130+ } ;
1131+ } ;
1132+ // Make it possible to narrow the object type using the custom property
1133+ common : ObjectCommon & { custom ?: undefined } ;
1134+ }
1135+
11071136 interface InstanceObject extends Omit < AdapterObject , 'type' > , BaseObject {
11081137 _id : ObjectIDs . Instance ;
11091138 type : 'instance' ;
0 commit comments