@shipeasy/openapi 1.6.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -0
- package/dist/chunk-643YSMLU.js +1616 -0
- package/dist/chunk-643YSMLU.js.map +1 -0
- package/dist/chunk-MRW3DJ57.js +3385 -0
- package/dist/chunk-MRW3DJ57.js.map +1 -0
- package/dist/client-K0ShmsC7.d.ts +11284 -0
- package/dist/client.d.ts +1 -0
- package/dist/client.js +215 -0
- package/dist/client.js.map +1 -0
- package/dist/custom.d.ts +86 -0
- package/dist/custom.js +300 -0
- package/dist/custom.js.map +1 -0
- package/dist/index.d.ts +29 -41
- package/dist/index.js +258 -4375
- package/dist/index.js.map +1 -0
- package/dist/node-context.d.ts +81 -33
- package/dist/node-context.js +98 -44
- package/dist/node-context.js.map +1 -0
- package/dist/schemas.d.ts +7973 -0
- package/dist/schemas.js +1099 -0
- package/dist/schemas.js.map +1 -0
- package/openapi.json +15922 -3232
- package/openapi.yaml +14277 -0
- package/package.json +33 -26
- package/spec/components/errors.yaml +53 -0
- package/spec/components/parameters.yaml +32 -0
- package/spec/components/responses.yaml +122 -0
- package/spec/components/schemas/alert-rules.yaml +175 -0
- package/spec/components/schemas/attributes.yaml +157 -0
- package/spec/components/schemas/common.yaml +92 -0
- package/spec/components/schemas/configs.yaml +371 -0
- package/spec/components/schemas/connectors.yaml +587 -0
- package/spec/components/schemas/errors-api.yaml +209 -0
- package/spec/components/schemas/events.yaml +321 -0
- package/spec/components/schemas/experiments.yaml +865 -0
- package/spec/components/schemas/gate-templates.yaml +237 -0
- package/spec/components/schemas/gates.yaml +890 -0
- package/spec/components/schemas/i18n.yaml +478 -0
- package/spec/components/schemas/keys.yaml +186 -0
- package/spec/components/schemas/killswitches.yaml +309 -0
- package/spec/components/schemas/metrics.yaml +547 -0
- package/spec/components/schemas/ops.yaml +1013 -0
- package/spec/components/schemas/projects.yaml +222 -0
- package/spec/components/schemas/search.yaml +46 -0
- package/spec/components/schemas/universes.yaml +127 -0
- package/spec/openapi.yaml +367 -0
- package/spec/paths/alert-rules.yaml +258 -0
- package/spec/paths/attributes.yaml +272 -0
- package/spec/paths/configs.yaml +758 -0
- package/spec/paths/connectors.yaml +782 -0
- package/spec/paths/errors.yaml +382 -0
- package/spec/paths/events.yaml +380 -0
- package/spec/paths/experiments.yaml +803 -0
- package/spec/paths/gate-templates.yaml +267 -0
- package/spec/paths/gates.yaml +465 -0
- package/spec/paths/i18n.yaml +557 -0
- package/spec/paths/keys.yaml +182 -0
- package/spec/paths/killswitches.yaml +574 -0
- package/spec/paths/metrics.yaml +313 -0
- package/spec/paths/ops.yaml +446 -0
- package/spec/paths/projects.yaml +210 -0
- package/spec/paths/search.yaml +62 -0
- package/spec/paths/universes.yaml +255 -0
- package/dist/operations/attributes.d.ts +0 -33
- package/dist/operations/attributes.js +0 -16
- package/dist/operations/cli-adapter.d.ts +0 -35
- package/dist/operations/cli-adapter.js +0 -91
- package/dist/operations/coerce.d.ts +0 -32
- package/dist/operations/coerce.js +0 -53
- package/dist/operations/configs.d.ts +0 -28
- package/dist/operations/configs.js +0 -119
- package/dist/operations/docs.d.ts +0 -37
- package/dist/operations/docs.js +0 -39
- package/dist/operations/events.d.ts +0 -28
- package/dist/operations/events.js +0 -121
- package/dist/operations/experiments.d.ts +0 -28
- package/dist/operations/experiments.js +0 -280
- package/dist/operations/gates.d.ts +0 -28
- package/dist/operations/gates.js +0 -132
- package/dist/operations/i18n.d.ts +0 -28
- package/dist/operations/i18n.js +0 -121
- package/dist/operations/index.d.ts +0 -63
- package/dist/operations/index.js +0 -1751
- package/dist/operations/killswitches.d.ts +0 -28
- package/dist/operations/killswitches.js +0 -126
- package/dist/operations/mcp-adapter.d.ts +0 -35
- package/dist/operations/mcp-adapter.js +0 -94
- package/dist/operations/metrics.d.ts +0 -30
- package/dist/operations/metrics.js +0 -114
- package/dist/operations/ops.d.ts +0 -28
- package/dist/operations/ops.js +0 -313
- package/dist/operations/projects.d.ts +0 -28
- package/dist/operations/projects.js +0 -36
- package/dist/operations/sdk-docs.d.ts +0 -28
- package/dist/operations/sdk-docs.js +0 -160
- package/dist/operations/types.d.ts +0 -138
- package/dist/operations/types.js +0 -9
- package/dist/operations/universes.d.ts +0 -28
- package/dist/operations/universes.js +0 -93
- package/dist/operations/util.d.ts +0 -33
- package/dist/operations/util.js +0 -9
- package/dist/resources/alert-rules.d.ts +0 -50
- package/dist/resources/alert-rules.js +0 -75
- package/dist/resources/attributes.d.ts +0 -19
- package/dist/resources/attributes.js +0 -10
- package/dist/resources/configs.d.ts +0 -681
- package/dist/resources/configs.js +0 -509
- package/dist/resources/events.d.ts +0 -61
- package/dist/resources/events.js +0 -42
- package/dist/resources/experiments.d.ts +0 -849
- package/dist/resources/experiments.js +0 -707
- package/dist/resources/gates.d.ts +0 -808
- package/dist/resources/gates.js +0 -522
- package/dist/resources/i18n.d.ts +0 -84
- package/dist/resources/i18n.js +0 -60
- package/dist/resources/index.d.ts +0 -2767
- package/dist/resources/index.js +0 -2563
- package/dist/resources/killswitches.d.ts +0 -436
- package/dist/resources/killswitches.js +0 -514
- package/dist/resources/metrics.d.ts +0 -54
- package/dist/resources/metrics.js +0 -40
- package/dist/resources/ops.d.ts +0 -88
- package/dist/resources/ops.js +0 -36
- package/dist/resources/projects.d.ts +0 -54
- package/dist/resources/projects.js +0 -14
- package/dist/resources/universes.d.ts +0 -185
- package/dist/resources/universes.js +0 -234
- package/dist/schemas/alert-rules.d.ts +0 -65
- package/dist/schemas/alert-rules.js +0 -37
- package/dist/schemas/configs.d.ts +0 -154
- package/dist/schemas/configs.js +0 -134
- package/dist/schemas/constants.d.ts +0 -6
- package/dist/schemas/constants.js +0 -7
- package/dist/schemas/experiments.d.ts +0 -229
- package/dist/schemas/experiments.js +0 -221
- package/dist/schemas/folder.d.ts +0 -10
- package/dist/schemas/folder.js +0 -8
- package/dist/schemas/gates.d.ts +0 -386
- package/dist/schemas/gates.js +0 -190
- package/dist/schemas/index.d.ts +0 -11
- package/dist/schemas/index.js +0 -762
- package/dist/schemas/killswitches.d.ts +0 -110
- package/dist/schemas/killswitches.js +0 -226
- package/dist/schemas/metric-name.d.ts +0 -5
- package/dist/schemas/metric-name.js +0 -6
- package/dist/schemas/pagination.d.ts +0 -37
- package/dist/schemas/pagination.js +0 -44
- package/dist/schemas/universes.d.ts +0 -35
- package/dist/schemas/universes.js +0 -55
- package/dist/transport.d.ts +0 -30
- package/dist/transport.js +0 -44
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Operation } from './types.js';
|
|
2
|
-
import '../resources/index.js';
|
|
3
|
-
import 'zod/v4/core';
|
|
4
|
-
import 'zod';
|
|
5
|
-
import '../resources/attributes.js';
|
|
6
|
-
import '../transport.js';
|
|
7
|
-
import '../resources/i18n.js';
|
|
8
|
-
import '../resources/projects.js';
|
|
9
|
-
import '../resources/ops.js';
|
|
10
|
-
import '../resources/events.js';
|
|
11
|
-
import '../resources/metrics.js';
|
|
12
|
-
import '../resources/alert-rules.js';
|
|
13
|
-
import '../schemas/alert-rules.js';
|
|
14
|
-
import '../resources/killswitches.js';
|
|
15
|
-
import '../schemas/killswitches.js';
|
|
16
|
-
import '../schemas/pagination.js';
|
|
17
|
-
import '../resources/universes.js';
|
|
18
|
-
import '../schemas/universes.js';
|
|
19
|
-
import '../resources/configs.js';
|
|
20
|
-
import '../schemas/configs.js';
|
|
21
|
-
import '../resources/experiments.js';
|
|
22
|
-
import '../schemas/experiments.js';
|
|
23
|
-
import '../resources/gates.js';
|
|
24
|
-
import '../schemas/gates.js';
|
|
25
|
-
|
|
26
|
-
declare const gateOperations: Operation[];
|
|
27
|
-
|
|
28
|
-
export { gateOperations };
|
package/dist/operations/gates.js
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
// src/operations/util.ts
|
|
2
|
-
var num = (i, k) => i[k] === void 0 ? void 0 : i[k];
|
|
3
|
-
|
|
4
|
-
// src/operations/gates.ts
|
|
5
|
-
var ROLLOUT_DESC = "Rollout percentage, 0\u2013100 (converted to basis points internally).";
|
|
6
|
-
var RULES_DESC = `Targeting rules as a JSON array, e.g. '[{"attr":"plan","op":"eq","value":"pro"}]'. AND-combined.`;
|
|
7
|
-
var STACK_DESC = "Gatekeeper stack as a JSON array of ordered first-match-wins tiers (condition/rollout steps, rolloutPct in basis points). Takes precedence over flat rules/rollout. Pass to express internal \u222A beta \u222A public in one gate.";
|
|
8
|
-
var gateOperations = [
|
|
9
|
-
{
|
|
10
|
-
group: ["release", "flags"],
|
|
11
|
-
name: "list",
|
|
12
|
-
mutates: false,
|
|
13
|
-
summary: "List all feature gates",
|
|
14
|
-
description: "Return every feature gate in the project (name, enabled, rollout %), ordered by most recently updated.",
|
|
15
|
-
params: [],
|
|
16
|
-
examples: [{ run: "shipeasy release flags list" }],
|
|
17
|
-
run: (client) => client.gates.listAll()
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
group: ["release", "flags"],
|
|
21
|
-
name: "create",
|
|
22
|
-
mutates: true,
|
|
23
|
-
summary: "Create a feature gate",
|
|
24
|
-
description: "Create a feature gate. A flat gate is `rules` + a single `rollout` %. For tiered rollouts (e.g. 'US @ 50% \u2192 bots @ 30% \u2192 everyone else @ 10%') pass `stack` \u2014 an ordered list of steps evaluated first-match-wins; flat `rules`/`rollout` are then ignored.",
|
|
25
|
-
params: [
|
|
26
|
-
{ name: "name", type: "string", description: "Gate key (lowercase, digits, _/-).", required: true, positional: true },
|
|
27
|
-
{ name: "rollout", type: "number", description: ROLLOUT_DESC },
|
|
28
|
-
{ name: "rules", type: "json", description: RULES_DESC },
|
|
29
|
-
{ name: "salt", type: "string", description: "Override hash salt (immutable after create)." },
|
|
30
|
-
{ name: "stack", type: "json", description: STACK_DESC }
|
|
31
|
-
],
|
|
32
|
-
examples: [
|
|
33
|
-
{ note: "Off by default; flip it on later", run: "shipeasy release flags create checkout-v2" },
|
|
34
|
-
{
|
|
35
|
-
note: "Roll out to 25% of pro-plan users",
|
|
36
|
-
run: `shipeasy release flags create new-ui --rollout 25 --rules '[{"attr":"plan","op":"eq","value":"pro"}]'`
|
|
37
|
-
}
|
|
38
|
-
],
|
|
39
|
-
run: (client, i) => client.gates.create({
|
|
40
|
-
name: i.name,
|
|
41
|
-
rollout_pct: Math.round((num(i, "rollout") ?? 0) * 100),
|
|
42
|
-
// Validated at runtime by gateCreateSchema.parse inside gates.create().
|
|
43
|
-
rules: i.rules ?? [],
|
|
44
|
-
...i.salt ? { salt: i.salt } : {},
|
|
45
|
-
...i.stack ? { stack: i.stack } : {}
|
|
46
|
-
})
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
group: ["release", "flags"],
|
|
50
|
-
name: "update",
|
|
51
|
-
mutates: true,
|
|
52
|
-
summary: "Update a gate's rollout, rules, stack, or enabled flag",
|
|
53
|
-
description: "Update a feature gate's rollout, rules, gatekeeper stack, or enabled flag. Pass `stack` to replace the tiered rollout wholesale; array fields replace, they do not merge.",
|
|
54
|
-
params: [
|
|
55
|
-
{ name: "name", type: "string", description: "Gate name to update.", required: true, positional: true },
|
|
56
|
-
{ name: "rollout", type: "number", description: ROLLOUT_DESC },
|
|
57
|
-
{ name: "rules", type: "json", description: RULES_DESC + " Replaces the existing rules wholesale." },
|
|
58
|
-
{ name: "stack", type: "json", description: STACK_DESC + " Pass null to revert to flat evaluation." },
|
|
59
|
-
{ name: "enabled", type: "boolean", description: "Master switch \u2014 false forces the gate off for every caller." }
|
|
60
|
-
],
|
|
61
|
-
examples: [{ note: "Ramp to 50%", run: "shipeasy release flags update checkout-v2 --rollout 50" }],
|
|
62
|
-
run: async (client, i) => {
|
|
63
|
-
const gate = await client.gates.resolve(i.name);
|
|
64
|
-
const patch = {};
|
|
65
|
-
const rollout = num(i, "rollout");
|
|
66
|
-
if (rollout !== void 0) patch.rollout_pct = Math.round(rollout * 100);
|
|
67
|
-
if (i.rules !== void 0) patch.rules = i.rules;
|
|
68
|
-
if (i.stack !== void 0) patch.stack = i.stack;
|
|
69
|
-
if (i.enabled !== void 0) patch.enabled = i.enabled;
|
|
70
|
-
return client.gates.update(gate.id, patch);
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
group: ["release", "flags"],
|
|
75
|
-
name: "enable",
|
|
76
|
-
mutates: true,
|
|
77
|
-
summary: "Enable a feature gate",
|
|
78
|
-
description: "Set `enabled: true`, preserving the current rollout %.",
|
|
79
|
-
params: [{ name: "name", type: "string", description: "Gate name.", required: true, positional: true }],
|
|
80
|
-
examples: [{ run: "shipeasy release flags enable checkout-v2" }],
|
|
81
|
-
run: async (client, i) => {
|
|
82
|
-
const gate = await client.gates.resolve(i.name);
|
|
83
|
-
return client.gates.enable(gate.id);
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
group: ["release", "flags"],
|
|
88
|
-
name: "disable",
|
|
89
|
-
mutates: true,
|
|
90
|
-
summary: "Disable a feature gate (kill switch)",
|
|
91
|
-
description: "Set `enabled: false` so the gate evaluates to `false` for every caller regardless of rules/rollout.",
|
|
92
|
-
params: [{ name: "name", type: "string", description: "Gate name.", required: true, positional: true }],
|
|
93
|
-
examples: [{ run: "shipeasy release flags disable checkout-v2" }],
|
|
94
|
-
run: async (client, i) => {
|
|
95
|
-
const gate = await client.gates.resolve(i.name);
|
|
96
|
-
return client.gates.disable(gate.id);
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
group: ["release", "flags"],
|
|
101
|
-
name: "rollout",
|
|
102
|
-
mutates: true,
|
|
103
|
-
summary: "Set rollout percentage (0\u2013100)",
|
|
104
|
-
description: "Resolve the gate by name and set its rollout percentage (0\u2013100).",
|
|
105
|
-
params: [
|
|
106
|
-
{ name: "name", type: "string", description: "Gate name.", required: true, positional: true },
|
|
107
|
-
{ name: "pct", type: "number", description: "Rollout percentage, 0\u2013100.", required: true, positional: true }
|
|
108
|
-
],
|
|
109
|
-
examples: [
|
|
110
|
-
{ note: "Ramp to 50%", run: "shipeasy release flags rollout checkout-v2 50" },
|
|
111
|
-
{ note: "Instant kill \u2014 set to 0", run: "shipeasy release flags rollout checkout-v2 0" }
|
|
112
|
-
],
|
|
113
|
-
run: (client, i) => client.gates.setRollout(i.name, num(i, "pct"))
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
group: ["release", "flags"],
|
|
117
|
-
name: "archive",
|
|
118
|
-
mutates: true,
|
|
119
|
-
summary: "Archive a feature gate",
|
|
120
|
-
description: "Archive (soft-delete) a feature gate by name. Refuses if a running experiment references it as a targeting gate.",
|
|
121
|
-
params: [{ name: "name", type: "string", description: "Gate name.", required: true, positional: true }],
|
|
122
|
-
examples: [{ run: "shipeasy release flags archive checkout-v2" }],
|
|
123
|
-
run: async (client, i) => {
|
|
124
|
-
const gate = await client.gates.resolve(i.name);
|
|
125
|
-
await client.gates.delete(gate.id);
|
|
126
|
-
return { ok: true, archived: i.name };
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
];
|
|
130
|
-
export {
|
|
131
|
-
gateOperations
|
|
132
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Operation } from './types.js';
|
|
2
|
-
import '../resources/index.js';
|
|
3
|
-
import 'zod/v4/core';
|
|
4
|
-
import 'zod';
|
|
5
|
-
import '../resources/attributes.js';
|
|
6
|
-
import '../transport.js';
|
|
7
|
-
import '../resources/i18n.js';
|
|
8
|
-
import '../resources/projects.js';
|
|
9
|
-
import '../resources/ops.js';
|
|
10
|
-
import '../resources/events.js';
|
|
11
|
-
import '../resources/metrics.js';
|
|
12
|
-
import '../resources/alert-rules.js';
|
|
13
|
-
import '../schemas/alert-rules.js';
|
|
14
|
-
import '../resources/killswitches.js';
|
|
15
|
-
import '../schemas/killswitches.js';
|
|
16
|
-
import '../schemas/pagination.js';
|
|
17
|
-
import '../resources/universes.js';
|
|
18
|
-
import '../schemas/universes.js';
|
|
19
|
-
import '../resources/configs.js';
|
|
20
|
-
import '../schemas/configs.js';
|
|
21
|
-
import '../resources/experiments.js';
|
|
22
|
-
import '../schemas/experiments.js';
|
|
23
|
-
import '../resources/gates.js';
|
|
24
|
-
import '../schemas/gates.js';
|
|
25
|
-
|
|
26
|
-
declare const i18nOperations: Operation[];
|
|
27
|
-
|
|
28
|
-
export { i18nOperations };
|
package/dist/operations/i18n.js
DELETED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
// src/operations/util.ts
|
|
2
|
-
var str = (i, k) => i[k] === void 0 ? void 0 : i[k];
|
|
3
|
-
|
|
4
|
-
// src/operations/i18n.ts
|
|
5
|
-
var I18N = ["i18n"];
|
|
6
|
-
var PROFILES = ["i18n", "profiles"];
|
|
7
|
-
var DRAFTS = ["i18n", "drafts"];
|
|
8
|
-
var i18nOperations = [
|
|
9
|
-
{
|
|
10
|
-
group: PROFILES,
|
|
11
|
-
name: "list",
|
|
12
|
-
mutates: false,
|
|
13
|
-
summary: "List i18n locale profiles",
|
|
14
|
-
description: "List the project's i18n locale profiles (name, default locale, locales).",
|
|
15
|
-
params: [],
|
|
16
|
-
examples: [{ run: "shipeasy i18n profiles list" }],
|
|
17
|
-
run: (client) => client.i18n.listProfiles()
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
group: PROFILES,
|
|
21
|
-
name: "create",
|
|
22
|
-
mutates: true,
|
|
23
|
-
summary: "Create an i18n locale profile",
|
|
24
|
-
description: "Create an i18n profile (e.g. 'en:prod', 'fr:prod') with one or more locales.",
|
|
25
|
-
params: [
|
|
26
|
-
{ name: "name", type: "string", description: "Profile name.", required: true, positional: true },
|
|
27
|
-
{ name: "locales", type: "json", description: `Locales as a JSON array, e.g. '["fr","fr-CA"]'. Defaults to ["en"].` },
|
|
28
|
-
{ name: "defaultLocale", type: "string", description: "Default locale (defaults to the first locale)." }
|
|
29
|
-
],
|
|
30
|
-
examples: [
|
|
31
|
-
{ run: "shipeasy i18n profiles create en:prod" },
|
|
32
|
-
{ note: "Multiple locales with a default", run: `shipeasy i18n profiles create fr:prod --locales '["fr","fr-CA"]' --default-locale fr` }
|
|
33
|
-
],
|
|
34
|
-
run: (client, i) => {
|
|
35
|
-
const locales = i.locales ?? ["en"];
|
|
36
|
-
return client.i18n.createProfile({
|
|
37
|
-
name: i.name,
|
|
38
|
-
locales,
|
|
39
|
-
default_locale: str(i, "defaultLocale") ?? locales[0]
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
group: I18N,
|
|
45
|
-
name: "push",
|
|
46
|
-
mutates: true,
|
|
47
|
-
summary: "Add new i18n keys (insert-only)",
|
|
48
|
-
description: "Add NEW keys to a profile. Insert-only \u2014 existing keys are never overwritten (use `i18n update` to change a value). Keys are a JSON array of {key,value}.",
|
|
49
|
-
params: [
|
|
50
|
-
{ name: "profile", type: "string", description: "Profile name (e.g. 'en:prod').", required: true },
|
|
51
|
-
{ name: "keys", type: "json", description: `Keys as a JSON array, e.g. '[{"key":"home.cta","value":"Get started"}]'.`, required: true },
|
|
52
|
-
{ name: "chunk", type: "string", description: "Logical grouping for the keys. Defaults to 'default'." }
|
|
53
|
-
],
|
|
54
|
-
examples: [
|
|
55
|
-
{ note: "Add keys to a profile", run: `shipeasy i18n push --profile en:prod --keys '[{"key":"home.cta","value":"Get started"}]'` }
|
|
56
|
-
],
|
|
57
|
-
run: async (client, i) => {
|
|
58
|
-
const profile = await client.i18n.resolveProfile(i.profile);
|
|
59
|
-
return client.i18n.pushKeys({
|
|
60
|
-
profile_id: profile.id,
|
|
61
|
-
chunk: str(i, "chunk") ?? "default",
|
|
62
|
-
keys: i.keys
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
group: I18N,
|
|
68
|
-
name: "update",
|
|
69
|
-
mutates: true,
|
|
70
|
-
summary: "Update one i18n key's value",
|
|
71
|
-
description: "Change the value of a single existing key (the only overwrite path; `push` only adds). One key per call.",
|
|
72
|
-
params: [
|
|
73
|
-
{ name: "key", type: "string", description: "Key name.", required: true, positional: true },
|
|
74
|
-
{ name: "value", type: "string", description: "New value.", required: true, positional: true },
|
|
75
|
-
{ name: "profile", type: "string", description: "Profile name (e.g. 'en:prod').", required: true },
|
|
76
|
-
{ name: "description", type: "string", description: "Optional description to store with the key." }
|
|
77
|
-
],
|
|
78
|
-
examples: [
|
|
79
|
-
{ note: "Change one key's value", run: "shipeasy i18n update home.cta 'Get started' --profile en:prod" }
|
|
80
|
-
],
|
|
81
|
-
run: async (client, i) => {
|
|
82
|
-
const profile = await client.i18n.resolveProfile(i.profile);
|
|
83
|
-
return client.i18n.updateKeyByName(profile.id, i.key, {
|
|
84
|
-
value: i.value,
|
|
85
|
-
...i.description !== void 0 ? { description: i.description } : {}
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
group: I18N,
|
|
91
|
-
name: "publish",
|
|
92
|
-
mutates: true,
|
|
93
|
-
summary: "Publish a profile chunk to the CDN",
|
|
94
|
-
description: "Publish a profile chunk (rebuilds the KV manifest and purges the CDN).",
|
|
95
|
-
params: [
|
|
96
|
-
{ name: "profile", type: "string", description: "Profile name (e.g. 'en:prod').", required: true },
|
|
97
|
-
{ name: "chunk", type: "string", description: "Chunk to publish. Defaults to 'default'." }
|
|
98
|
-
],
|
|
99
|
-
examples: [
|
|
100
|
-
{ note: "Publish the default chunk", run: "shipeasy i18n publish --profile en:prod" },
|
|
101
|
-
{ note: "Publish a specific chunk", run: "shipeasy i18n publish --profile fr:prod --chunk marketing" }
|
|
102
|
-
],
|
|
103
|
-
run: async (client, i) => {
|
|
104
|
-
const profile = await client.i18n.resolveProfile(i.profile);
|
|
105
|
-
return client.i18n.publish(profile.id, { chunk: str(i, "chunk") ?? "default" });
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
group: DRAFTS,
|
|
110
|
-
name: "list",
|
|
111
|
-
mutates: false,
|
|
112
|
-
summary: "List staged i18n drafts",
|
|
113
|
-
description: "List staged translation drafts. Replaces the `drafts` kind of the deleted MCP generic read.",
|
|
114
|
-
params: [],
|
|
115
|
-
examples: [{ run: "shipeasy i18n drafts list" }],
|
|
116
|
-
run: (client) => client.i18n.listDrafts()
|
|
117
|
-
}
|
|
118
|
-
];
|
|
119
|
-
export {
|
|
120
|
-
i18nOperations
|
|
121
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import '../transport.js';
|
|
2
|
-
import '../schemas/pagination.js';
|
|
3
|
-
import '../resources/index.js';
|
|
4
|
-
import '../resources/metrics.js';
|
|
5
|
-
import '../resources/events.js';
|
|
6
|
-
import '../resources/ops.js';
|
|
7
|
-
import '../resources/projects.js';
|
|
8
|
-
import '../resources/i18n.js';
|
|
9
|
-
import '../resources/attributes.js';
|
|
10
|
-
import '../resources/gates.js';
|
|
11
|
-
import '../resources/killswitches.js';
|
|
12
|
-
import '../resources/experiments.js';
|
|
13
|
-
import '../resources/configs.js';
|
|
14
|
-
import '../resources/universes.js';
|
|
15
|
-
import '../resources/alert-rules.js';
|
|
16
|
-
import { Operation } from './types.js';
|
|
17
|
-
export { CliContext, CommandLike, McpTool, OpExample, OpInput, Param, ParamType, opCli, opId, opMcpName } from './types.js';
|
|
18
|
-
export { coerceInput } from './coerce.js';
|
|
19
|
-
export { mountOperations } from './cli-adapter.js';
|
|
20
|
-
export { operationsToDispatch, operationsToMcpTools } from './mcp-adapter.js';
|
|
21
|
-
export { renderOperationsMarkdown } from './docs.js';
|
|
22
|
-
export { gateOperations } from './gates.js';
|
|
23
|
-
export { killswitchOperations } from './killswitches.js';
|
|
24
|
-
export { configOperations } from './configs.js';
|
|
25
|
-
export { experimentOperations } from './experiments.js';
|
|
26
|
-
export { universeOperations } from './universes.js';
|
|
27
|
-
export { METRIC_GRAMMAR, metricOperations } from './metrics.js';
|
|
28
|
-
export { eventOperations } from './events.js';
|
|
29
|
-
export { opsOperations } from './ops.js';
|
|
30
|
-
export { projectOperations } from './projects.js';
|
|
31
|
-
export { i18nOperations } from './i18n.js';
|
|
32
|
-
export { attributeOperations } from './attributes.js';
|
|
33
|
-
export { docsOperations } from './sdk-docs.js';
|
|
34
|
-
import '../schemas/gates.js';
|
|
35
|
-
import '../schemas/universes.js';
|
|
36
|
-
import 'zod';
|
|
37
|
-
import 'zod/v4/core';
|
|
38
|
-
import '../schemas/alert-rules.js';
|
|
39
|
-
import '../schemas/killswitches.js';
|
|
40
|
-
import '../schemas/configs.js';
|
|
41
|
-
import '../schemas/experiments.js';
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Operation registry + surface adapters.
|
|
45
|
-
*
|
|
46
|
-
* One declarative `Operation[]` per resource drives three surfaces:
|
|
47
|
-
* - CLI — `mountOperations(group, ops, ctx)` builds commander subcommands.
|
|
48
|
-
* - MCP — `operationsToMcpTools(ops)` + `operationsToDispatch(ops)`.
|
|
49
|
-
* - Docs — `renderOperationsMarkdown(ops)`.
|
|
50
|
-
*
|
|
51
|
-
* The `release` module was the pilot; the registry now spans the whole
|
|
52
|
-
* migratable surface (doc 21 §A2/§A3): metrics, events, ops (queue + alert
|
|
53
|
-
* rules), projects, i18n (API parts), attributes, and SDK-docs. What stays
|
|
54
|
-
* permanently hand-written in the fs-having consumers: i18n fs/AST ops, SDK key
|
|
55
|
-
* minting, `detect_project`, and auth login/logout/bind.
|
|
56
|
-
*/
|
|
57
|
-
|
|
58
|
-
/** The `release` module — feature flags, kill switches, configs, experiments, universes. */
|
|
59
|
-
declare const RELEASE_OPERATIONS: Operation[];
|
|
60
|
-
/** Every operation across every registry-driven module. Adapters iterate this. */
|
|
61
|
-
declare const ALL_OPERATIONS: Operation[];
|
|
62
|
-
|
|
63
|
-
export { ALL_OPERATIONS, Operation, RELEASE_OPERATIONS };
|