Skip to content

Commit bdd2868

Browse files
committed
fix: provide proper schema types and update command snapshot
1 parent 158864e commit bdd2868

File tree

4 files changed

+242
-3
lines changed

4 files changed

+242
-3
lines changed

command-snapshot.json

Lines changed: 159 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,166 @@
11
[
22
{
33
"alias": [],
4-
"command": "hello:world",
4+
"command": "orchestrator:create:app",
55
"flagAliases": [],
6-
"flagChars": ["n"],
7-
"flags": ["flags-dir", "json", "name"],
6+
"flagChars": ["d", "g", "i", "l", "n", "o", "r", "t"],
7+
"flags": [
8+
"api-version",
9+
"description",
10+
"flags-dir",
11+
"json",
12+
"label",
13+
"log-level",
14+
"name",
15+
"runtime-method",
16+
"target-org",
17+
"template-id",
18+
"template-name"
19+
],
20+
"plugin": "@salesforce/plugin-orchestrator"
21+
},
22+
{
23+
"alias": [],
24+
"command": "orchestrator:create:template",
25+
"flagAliases": [],
26+
"flagChars": ["d", "l", "n", "o", "s", "t"],
27+
"flags": ["api-version", "description", "flags-dir", "json", "label", "name", "subtype", "target-org", "type"],
28+
"plugin": "@salesforce/plugin-orchestrator"
29+
},
30+
{
31+
"alias": [],
32+
"command": "orchestrator:decouple:app",
33+
"flagAliases": [],
34+
"flagChars": ["i", "n", "o"],
35+
"flags": ["api-version", "app-id", "app-name", "flags-dir", "json", "target-org"],
36+
"plugin": "@salesforce/plugin-orchestrator"
37+
},
38+
{
39+
"alias": [],
40+
"command": "orchestrator:delete:app",
41+
"flagAliases": [],
42+
"flagChars": ["i", "n", "o", "p"],
43+
"flags": ["api-version", "app-id", "app-name", "flags-dir", "json", "no-prompt", "target-org"],
44+
"plugin": "@salesforce/plugin-orchestrator"
45+
},
46+
{
47+
"alias": [],
48+
"command": "orchestrator:delete:template",
49+
"flagAliases": [],
50+
"flagChars": ["i", "n", "o", "p"],
51+
"flags": ["api-version", "flags-dir", "json", "no-prompt", "target-org", "template-id", "template-name"],
52+
"plugin": "@salesforce/plugin-orchestrator"
53+
},
54+
{
55+
"alias": [],
56+
"command": "orchestrator:display:app",
57+
"flagAliases": [],
58+
"flagChars": ["i", "n", "o"],
59+
"flags": ["api-version", "app-id", "app-name", "flags-dir", "json", "target-org"],
60+
"plugin": "@salesforce/plugin-orchestrator"
61+
},
62+
{
63+
"alias": [],
64+
"command": "orchestrator:display:template",
65+
"flagAliases": [],
66+
"flagChars": ["i", "n", "o"],
67+
"flags": ["api-version", "flags-dir", "json", "target-org", "template-id", "template-name"],
68+
"plugin": "@salesforce/plugin-orchestrator"
69+
},
70+
{
71+
"alias": [],
72+
"command": "orchestrator:list:app",
73+
"flagAliases": [],
74+
"flagChars": ["o"],
75+
"flags": ["api-version", "flags-dir", "json", "target-org"],
76+
"plugin": "@salesforce/plugin-orchestrator"
77+
},
78+
{
79+
"alias": [],
80+
"command": "orchestrator:list:template",
81+
"flagAliases": [],
82+
"flagChars": ["o"],
83+
"flags": ["api-version", "flags-dir", "json", "target-org"],
84+
"plugin": "@salesforce/plugin-orchestrator"
85+
},
86+
{
87+
"alias": [],
88+
"command": "orchestrator:template:create",
89+
"flagAliases": [],
90+
"flagChars": ["d", "l", "n", "o", "s", "t"],
91+
"flags": ["api-version", "description", "flags-dir", "json", "label", "name", "subtype", "target-org", "type"],
92+
"plugin": "@salesforce/plugin-orchestrator"
93+
},
94+
{
95+
"alias": [],
96+
"command": "orchestrator:template:delete",
97+
"flagAliases": [],
98+
"flagChars": ["i", "n", "o", "p"],
99+
"flags": ["api-version", "flags-dir", "json", "no-prompt", "target-org", "template-id", "template-name"],
100+
"plugin": "@salesforce/plugin-orchestrator"
101+
},
102+
{
103+
"alias": [],
104+
"command": "orchestrator:template:display",
105+
"flagAliases": [],
106+
"flagChars": ["i", "n", "o"],
107+
"flags": ["api-version", "flags-dir", "json", "target-org", "template-id", "template-name"],
108+
"plugin": "@salesforce/plugin-orchestrator"
109+
},
110+
{
111+
"alias": [],
112+
"command": "orchestrator:template:list",
113+
"flagAliases": [],
114+
"flagChars": ["o"],
115+
"flags": ["api-version", "flags-dir", "json", "target-org"],
116+
"plugin": "@salesforce/plugin-orchestrator"
117+
},
118+
{
119+
"alias": [],
120+
"command": "orchestrator:template:update",
121+
"flagAliases": [],
122+
"flagChars": ["d", "i", "l", "n", "o", "s", "t"],
123+
"flags": [
124+
"api-version",
125+
"description",
126+
"flags-dir",
127+
"json",
128+
"label",
129+
"name",
130+
"subtype",
131+
"target-org",
132+
"template-id",
133+
"template-name",
134+
"type"
135+
],
136+
"plugin": "@salesforce/plugin-orchestrator"
137+
},
138+
{
139+
"alias": [],
140+
"command": "orchestrator:update:app",
141+
"flagAliases": [],
142+
"flagChars": ["d", "i", "l", "n", "o"],
143+
"flags": ["api-version", "app-id", "app-name", "description", "flags-dir", "json", "label", "name", "target-org"],
144+
"plugin": "@salesforce/plugin-orchestrator"
145+
},
146+
{
147+
"alias": [],
148+
"command": "orchestrator:update:template",
149+
"flagAliases": [],
150+
"flagChars": ["d", "i", "l", "n", "o", "s", "t"],
151+
"flags": [
152+
"api-version",
153+
"description",
154+
"flags-dir",
155+
"json",
156+
"label",
157+
"name",
158+
"subtype",
159+
"target-org",
160+
"template-id",
161+
"template-name",
162+
"type"
163+
],
8164
"plugin": "@salesforce/plugin-orchestrator"
9165
}
10166
]

schemas/orchestrator-app.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$ref": "#/definitions/AppResult",
4+
"definitions": {
5+
"AppResult": {
6+
"type": "object",
7+
"properties": {
8+
"id": {
9+
"type": "string"
10+
},
11+
"name": {
12+
"type": "string"
13+
},
14+
"label": {
15+
"type": "string"
16+
},
17+
"description": {
18+
"type": ["string", "null"]
19+
},
20+
"templateId": {
21+
"type": "string"
22+
},
23+
"status": {
24+
"type": "string"
25+
},
26+
"created": {
27+
"type": "string"
28+
},
29+
"modified": {
30+
"type": "string"
31+
}
32+
},
33+
"additionalProperties": true
34+
}
35+
}
36+
}

schemas/orchestrator-template.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$ref": "#/definitions/TemplateResult",
4+
"definitions": {
5+
"TemplateResult": {
6+
"type": "object",
7+
"properties": {
8+
"id": {
9+
"type": "string"
10+
},
11+
"name": {
12+
"type": "string"
13+
},
14+
"label": {
15+
"type": "string"
16+
},
17+
"templateId": {
18+
"type": "string"
19+
},
20+
"templateType": {
21+
"type": "string"
22+
},
23+
"templateSubtype": {
24+
"type": ["string", "null"]
25+
},
26+
"applicationSourceId": {
27+
"type": ["string", "null"]
28+
}
29+
},
30+
"additionalProperties": true
31+
}
32+
}
33+
}

src/index.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,18 @@
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
77

8+
// Export types for schema generation
9+
export type StringType = string;
10+
export type NumberType = number;
11+
export type BooleanType = boolean;
12+
export type ObjectType = Record<string, unknown>;
13+
export type ArrayType<T = unknown> = T[];
14+
15+
// For schema generation - primitive type exports
16+
export { StringType as string };
17+
export { NumberType as number };
18+
export { BooleanType as boolean };
19+
export { ObjectType as object };
20+
export { ArrayType as array };
21+
822
export default {};

0 commit comments

Comments
 (0)