// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// TODO(crbug.com/1408099): Update once we publish the spec.
// https://github.com/ivansandrk/multi-apps/blob/main/explainer.md
enum SubAppsResultCode {
"success",
"failure",
};
[
Exposed=Window,
SecureContext,
RuntimeEnabled=DesktopPWAsSubApps,
IsolatedContext
] interface SubApps {
[CallWith=ScriptState, RaisesException] Promise<record<DOMString, SubAppsResultCode>> add(record<DOMString, SubAppsAddParams> sub_apps_to_add);
[CallWith=ScriptState, RaisesException] Promise<record<DOMString, SubAppsListResult>> list();
[CallWith=ScriptState, RaisesException] Promise<record<DOMString, SubAppsResultCode>> remove(sequence<DOMString> app_ids);
};