-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmodel-b-api.ts
More file actions
51 lines (47 loc) · 1.55 KB
/
model-b-api.ts
File metadata and controls
51 lines (47 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// *****************************************************************************
// Copyright (C) 2024 STMicroelectronics.
//
// This program and the accompanying materials are made available under the
// terms of the Eclipse Public License v. 2.0 which is available at
// http://www.eclipse.org/legal/epl-2.0.
//
// This Source Code may also be made available under the following Secondary
// Licenses when the conditions for such availability set forth in the Eclipse
// Public License v. 2.0 are satisfied: MIT License which is
// available at https://opensource.org/licenses/MIT.
//
// SPDX-License-Identifier: EPL-2.0 OR MIT
// *****************************************************************************
import { Command } from '@eclipse-emfcloud/model-manager';
export const MODEL_B_MODEL_ID = 'ModelB';
/**
* The shape of the _Model B_ instance.
*/
export interface ModelB {
fooB: string;
lengthOfFooB: number;
number1: number;
number2: number;
evenSum: boolean;
name: string;
}
/**
* Key used to register/access the _Model B_ public model API from
* the `ModelHub`.
*/
export const MODEL_B_API = 'model-b-api';
/**
* The public model API provided by the `ModelHub` for manipulation of
* the _Model B_ instance by its dependents.
*/
export interface ModelBModelService {
/**
* Obtain a command to set the `name` in a given model.
* Returns `undefined` in the case that the model does not exist or
* it already has the `name`.
*/
createSetNameCommand(
modelURI: string,
name: string
): Promise<Command<string> | undefined>;
}