@shipeasy/openapi 2.2.0 → 2.4.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.
Files changed (52) hide show
  1. package/dist/{chunk-643YSMLU.js → chunk-4QSU744W.js} +183 -1
  2. package/dist/chunk-4QSU744W.js.map +1 -0
  3. package/dist/{chunk-MRW3DJ57.js → chunk-ZPKHTUVV.js} +1238 -335
  4. package/dist/chunk-ZPKHTUVV.js.map +1 -0
  5. package/dist/{client-K0ShmsC7.d.ts → client-WGNXT4xl.d.ts} +5818 -2647
  6. package/dist/client.d.ts +1 -1
  7. package/dist/client.js +51 -1
  8. package/dist/custom.js +4 -4
  9. package/dist/custom.js.map +1 -1
  10. package/dist/index.d.ts +2 -2
  11. package/dist/index.js +52 -2
  12. package/dist/index.js.map +1 -1
  13. package/dist/schemas.d.ts +3538 -534
  14. package/dist/schemas.js +253 -5
  15. package/openapi.json +12914 -7158
  16. package/openapi.yaml +7672 -3742
  17. package/package.json +1 -1
  18. package/spec/components/errors.yaml +33 -1
  19. package/spec/components/schemas/alerts.yaml +138 -0
  20. package/spec/components/schemas/attributes.yaml +53 -3
  21. package/spec/components/schemas/common.yaml +16 -0
  22. package/spec/components/schemas/configs.yaml +58 -0
  23. package/spec/components/schemas/connectors.yaml +5 -1
  24. package/spec/components/schemas/errors-api.yaml +116 -6
  25. package/spec/components/schemas/experiment-api-row.yaml +293 -0
  26. package/spec/components/schemas/experiments.yaml +395 -380
  27. package/spec/components/schemas/gates.yaml +355 -272
  28. package/spec/components/schemas/i18n.yaml +169 -40
  29. package/spec/components/schemas/keys.yaml +2 -1
  30. package/spec/components/schemas/killswitches.yaml +36 -0
  31. package/spec/components/schemas/metrics.yaml +200 -23
  32. package/spec/components/schemas/ops.yaml +918 -29
  33. package/spec/components/schemas/projects.yaml +246 -2
  34. package/spec/components/schemas/universes.yaml +83 -1
  35. package/spec/openapi.yaml +61 -0
  36. package/spec/paths/alert-rules.yaml +1 -0
  37. package/spec/paths/alerts.yaml +184 -0
  38. package/spec/paths/attributes.yaml +23 -5
  39. package/spec/paths/configs.yaml +71 -0
  40. package/spec/paths/errors.yaml +112 -2
  41. package/spec/paths/events.yaml +1 -0
  42. package/spec/paths/experiments.yaml +244 -16
  43. package/spec/paths/gates.yaml +138 -0
  44. package/spec/paths/i18n.yaml +290 -6
  45. package/spec/paths/keys.yaml +1 -0
  46. package/spec/paths/killswitches.yaml +7 -0
  47. package/spec/paths/metrics.yaml +187 -0
  48. package/spec/paths/ops.yaml +410 -0
  49. package/spec/paths/projects.yaml +62 -2
  50. package/spec/paths/universes.yaml +1 -0
  51. package/dist/chunk-643YSMLU.js.map +0 -1
  52. package/dist/chunk-MRW3DJ57.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import {
2
+ ackOpsItem,
2
3
  approveEvent,
3
4
  client,
4
5
  configure,
@@ -10,6 +11,7 @@ import {
10
11
  createConnector,
11
12
  createEvent,
12
13
  createExperiment,
14
+ createExperimentReadout,
13
15
  createGate,
14
16
  createGateTemplate,
15
17
  createI18nDraft,
@@ -17,6 +19,8 @@ import {
17
19
  createKey,
18
20
  createKillswitch,
19
21
  createMetric,
22
+ createOpsComment,
23
+ createOpsInvestigation,
20
24
  createOpsItem,
21
25
  createTriggerConnector,
22
26
  createUniverse,
@@ -28,8 +32,12 @@ import {
28
32
  deleteExperiment,
29
33
  deleteGate,
30
34
  deleteGateTemplate,
35
+ deleteI18nDraft,
36
+ deleteI18nKey,
37
+ deleteI18nProfile,
31
38
  deleteKillswitch,
32
39
  deleteMetric,
40
+ deleteOpsItem,
33
41
  deleteUniverse,
34
42
  disableGate,
35
43
  discardConfigDraft,
@@ -44,29 +52,41 @@ import {
44
52
  getErrorSeries,
45
53
  getEvent,
46
54
  getExperiment,
55
+ getExperimentReadout,
47
56
  getExperimentResults,
48
57
  getExperimentTimeseries,
58
+ getGate,
49
59
  getGateTemplate,
50
60
  getKillswitch,
51
61
  getMetric,
62
+ getMetricSeries,
52
63
  getOpsItem,
64
+ getProject,
53
65
  linkPrToOpsItem,
54
66
  listAlertRules,
67
+ listAlerts,
55
68
  listAttributes,
56
69
  listConfigActivity,
70
+ listConfigVersions,
57
71
  listConfigs,
58
72
  listConnectors,
59
73
  listErrors,
60
74
  listEvents,
61
75
  listExperiments,
76
+ listGateActivity,
62
77
  listGateTemplates,
63
78
  listGates,
79
+ listI18nDraftKeys,
64
80
  listI18nDrafts,
65
81
  listI18nKeys,
66
82
  listI18nProfiles,
67
83
  listKeys,
68
84
  listKillswitches,
85
+ listMetricExperiments,
69
86
  listMetrics,
87
+ listOpsAgents,
88
+ listOpsComments,
89
+ listOpsInvestigations,
70
90
  listOpsItems,
71
91
  listSlackChannels,
72
92
  listUniverses,
@@ -75,6 +95,7 @@ import {
75
95
  publishI18nProfile,
76
96
  pushI18nKeys,
77
97
  reanalyzeExperiment,
98
+ resolveError,
78
99
  revokeKey,
79
100
  saveConfigDraft,
80
101
  searchResources,
@@ -84,7 +105,9 @@ import {
84
105
  setKillswitchSwitch,
85
106
  setKillswitchValue,
86
107
  testConnector,
108
+ unarchiveMetric,
87
109
  unsetKillswitchSwitch,
110
+ updateAlert,
88
111
  updateAlertRule,
89
112
  updateAttribute,
90
113
  updateConfig,
@@ -103,11 +126,13 @@ import {
103
126
  updateProject,
104
127
  updateTriggerConnector,
105
128
  updateUniverse,
129
+ upsertI18nDraftKey,
130
+ upsertI18nKeys,
106
131
  upsertProject
107
- } from "./chunk-643YSMLU.js";
132
+ } from "./chunk-4QSU744W.js";
108
133
  import {
109
134
  zErrorCode
110
- } from "./chunk-MRW3DJ57.js";
135
+ } from "./chunk-ZPKHTUVV.js";
111
136
 
112
137
  // src/errors.ts
113
138
  var ERROR_CODES = zErrorCode.options;
@@ -150,6 +175,7 @@ function formatAuthFailure(surface, status, message) {
150
175
  }
151
176
  export {
152
177
  ERROR_CODES,
178
+ ackOpsItem,
153
179
  approveEvent,
154
180
  client,
155
181
  configure,
@@ -161,6 +187,7 @@ export {
161
187
  createConnector,
162
188
  createEvent,
163
189
  createExperiment,
190
+ createExperimentReadout,
164
191
  createGate,
165
192
  createGateTemplate,
166
193
  createI18nDraft,
@@ -168,6 +195,8 @@ export {
168
195
  createKey,
169
196
  createKillswitch,
170
197
  createMetric,
198
+ createOpsComment,
199
+ createOpsInvestigation,
171
200
  createOpsItem,
172
201
  createTriggerConnector,
173
202
  createUniverse,
@@ -179,8 +208,12 @@ export {
179
208
  deleteExperiment,
180
209
  deleteGate,
181
210
  deleteGateTemplate,
211
+ deleteI18nDraft,
212
+ deleteI18nKey,
213
+ deleteI18nProfile,
182
214
  deleteKillswitch,
183
215
  deleteMetric,
216
+ deleteOpsItem,
184
217
  deleteUniverse,
185
218
  disableGate,
186
219
  discardConfigDraft,
@@ -197,30 +230,42 @@ export {
197
230
  getErrorSeries,
198
231
  getEvent,
199
232
  getExperiment,
233
+ getExperimentReadout,
200
234
  getExperimentResults,
201
235
  getExperimentTimeseries,
236
+ getGate,
202
237
  getGateTemplate,
203
238
  getKillswitch,
204
239
  getMetric,
240
+ getMetricSeries,
205
241
  getOpsItem,
242
+ getProject,
206
243
  isApiErrorBody,
207
244
  linkPrToOpsItem,
208
245
  listAlertRules,
246
+ listAlerts,
209
247
  listAttributes,
210
248
  listConfigActivity,
249
+ listConfigVersions,
211
250
  listConfigs,
212
251
  listConnectors,
213
252
  listErrors,
214
253
  listEvents,
215
254
  listExperiments,
255
+ listGateActivity,
216
256
  listGateTemplates,
217
257
  listGates,
258
+ listI18nDraftKeys,
218
259
  listI18nDrafts,
219
260
  listI18nKeys,
220
261
  listI18nProfiles,
221
262
  listKeys,
222
263
  listKillswitches,
264
+ listMetricExperiments,
223
265
  listMetrics,
266
+ listOpsAgents,
267
+ listOpsComments,
268
+ listOpsInvestigations,
224
269
  listOpsItems,
225
270
  listSlackChannels,
226
271
  listUniverses,
@@ -229,6 +274,7 @@ export {
229
274
  publishI18nProfile,
230
275
  pushI18nKeys,
231
276
  reanalyzeExperiment,
277
+ resolveError,
232
278
  revokeKey,
233
279
  saveConfigDraft,
234
280
  searchResources,
@@ -238,7 +284,9 @@ export {
238
284
  setKillswitchSwitch,
239
285
  setKillswitchValue,
240
286
  testConnector,
287
+ unarchiveMetric,
241
288
  unsetKillswitchSwitch,
289
+ updateAlert,
242
290
  updateAlertRule,
243
291
  updateAttribute,
244
292
  updateConfig,
@@ -257,6 +305,8 @@ export {
257
305
  updateProject,
258
306
  updateTriggerConnector,
259
307
  updateUniverse,
308
+ upsertI18nDraftKey,
309
+ upsertI18nKeys,
260
310
  upsertProject
261
311
  };
262
312
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/errors.ts"],"sourcesContent":["import { zErrorCode } from \"./generated/zod.gen.js\";\nimport type { Error as ApiErrorBody, ErrorCode } from \"./generated/types.gen.js\";\n\nexport type { ErrorCode };\nexport type { ApiErrorBody };\n\n/**\n * The canonical `ErrorCode` catalogue as a runtime array — derived from the\n * generated Zod enum so it can never drift from the spec. Mirrors\n * `@shipeasy/core`'s `ErrorCode`; the parity test (`scripts/check-drift.mjs`)\n * asserts every `x-error-codes` entry in the spec is one of these.\n */\nexport const ERROR_CODES = zErrorCode.options as readonly ErrorCode[];\n\n/** Type guard for the uniform `{ error, code?, detail? }` error envelope. */\nexport function isApiErrorBody(value: unknown): value is ApiErrorBody {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"error\" in value &&\n typeof (value as { error: unknown }).error === \"string\"\n );\n}\n\n/** Narrow an error body to a known `ErrorCode`, or `undefined` if uncatalogued. */\nexport function errorCodeOf(value: unknown): ErrorCode | undefined {\n if (!isApiErrorBody(value)) return undefined;\n const code = value.code;\n return code && (ERROR_CODES as readonly string[]).includes(code) ? code : undefined;\n}\n\n/** Which binary is reporting the failure — determines which command to tell the caller to run. */\nexport type AuthSurface = \"cli\" | \"mcp\";\n\nconst REAUTH_COMMAND: Record<AuthSurface, string> = {\n cli: \"shipeasy login --force\",\n mcp: \"shipeasy-mcp install --force\",\n};\n\n/**\n * Structured, agent-parseable remediation text for an admin-API auth failure\n * (401/403) — shared by the CLI's and MCP's error printers so every command\n * and every tool call reports auth failures the same way. The leading\n * `AUTH_REQUIRED:` / `AUTH_FORBIDDEN:` token is a stable marker a calling\n * agent can grep for; everything after it is human-readable remediation.\n *\n * Returns `undefined` for non-auth statuses so callers fall back to their\n * normal error formatting.\n */\nexport function formatAuthFailure(\n surface: AuthSurface,\n status: number,\n message: string,\n): string | undefined {\n const reauth = REAUTH_COMMAND[surface];\n if (status === 401) {\n return [\n `AUTH_REQUIRED: ${message} (401)`,\n ``,\n `Cause: the request's Shipeasy credentials are missing, invalid, or expired.`,\n `Fix:`,\n ` 1. Run: ${reauth}`,\n ` 2. Retry the command that failed.`,\n ].join(\"\\n\");\n }\n if (status === 403) {\n return [\n `AUTH_FORBIDDEN: ${message} (403)`,\n ``,\n `Cause: the credentials are valid but don't have access to this project or resource.`,\n `Fix:`,\n ` 1. Confirm the bound project is correct (check the .shipeasy file, or run: shipeasy root --json).`,\n ` 2. If it's the wrong project, run: shipeasy bind <project_id>.`,\n ` 3. If it's the right project, ask a workspace admin to grant access — retrying will not help.`,\n ].join(\"\\n\");\n }\n return undefined;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYO,IAAM,cAAc,WAAW;AAG/B,SAAS,eAAe,OAAuC;AACpE,SACE,OAAO,UAAU,YACjB,UAAU,QACV,WAAW,SACX,OAAQ,MAA6B,UAAU;AAEnD;AAGO,SAAS,YAAY,OAAuC;AACjE,MAAI,CAAC,eAAe,KAAK,EAAG,QAAO;AACnC,QAAM,OAAO,MAAM;AACnB,SAAO,QAAS,YAAkC,SAAS,IAAI,IAAI,OAAO;AAC5E;AAKA,IAAM,iBAA8C;AAAA,EAClD,KAAK;AAAA,EACL,KAAK;AACP;AAYO,SAAS,kBACd,SACA,QACA,SACoB;AACpB,QAAM,SAAS,eAAe,OAAO;AACrC,MAAI,WAAW,KAAK;AAClB,WAAO;AAAA,MACL,kBAAkB,OAAO;AAAA,MACzB;AAAA,MACA;AAAA,MACA;AAAA,MACA,aAAa,MAAM;AAAA,MACnB;AAAA,IACF,EAAE,KAAK,IAAI;AAAA,EACb;AACA,MAAI,WAAW,KAAK;AAClB,WAAO;AAAA,MACL,mBAAmB,OAAO;AAAA,MAC1B;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,EAAE,KAAK,IAAI;AAAA,EACb;AACA,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../src/errors.ts"],"sourcesContent":["import { zErrorCode } from \"./generated/zod.gen.js\";\nimport type { Error as ApiErrorBody, ErrorCode } from \"./generated/types.gen.js\";\n\nexport type { ErrorCode };\nexport type { ApiErrorBody };\n\n/**\n * The canonical `ErrorCode` catalogue as a runtime array — derived from the\n * generated Zod enum so it can never drift from the spec. Mirrors\n * `@shipeasy/core`'s `ErrorCode`; the parity test (`scripts/check-drift.mjs`)\n * asserts every `x-error-codes` entry in the spec is one of these.\n */\nexport const ERROR_CODES = zErrorCode.options as readonly ErrorCode[];\n\n/** Type guard for the uniform `{ error, code?, detail? }` error envelope. */\nexport function isApiErrorBody(value: unknown): value is ApiErrorBody {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"error\" in value &&\n typeof (value as { error: unknown }).error === \"string\"\n );\n}\n\n/** Narrow an error body to a known `ErrorCode`, or `undefined` if uncatalogued. */\nexport function errorCodeOf(value: unknown): ErrorCode | undefined {\n if (!isApiErrorBody(value)) return undefined;\n const code = value.code;\n return code && (ERROR_CODES as readonly string[]).includes(code) ? code : undefined;\n}\n\n/** Which binary is reporting the failure — determines which command to tell the caller to run. */\nexport type AuthSurface = \"cli\" | \"mcp\";\n\nconst REAUTH_COMMAND: Record<AuthSurface, string> = {\n cli: \"shipeasy login --force\",\n mcp: \"shipeasy-mcp install --force\",\n};\n\n/**\n * Structured, agent-parseable remediation text for an admin-API auth failure\n * (401/403) — shared by the CLI's and MCP's error printers so every command\n * and every tool call reports auth failures the same way. The leading\n * `AUTH_REQUIRED:` / `AUTH_FORBIDDEN:` token is a stable marker a calling\n * agent can grep for; everything after it is human-readable remediation.\n *\n * Returns `undefined` for non-auth statuses so callers fall back to their\n * normal error formatting.\n */\nexport function formatAuthFailure(\n surface: AuthSurface,\n status: number,\n message: string,\n): string | undefined {\n const reauth = REAUTH_COMMAND[surface];\n if (status === 401) {\n return [\n `AUTH_REQUIRED: ${message} (401)`,\n ``,\n `Cause: the request's Shipeasy credentials are missing, invalid, or expired.`,\n `Fix:`,\n ` 1. Run: ${reauth}`,\n ` 2. Retry the command that failed.`,\n ].join(\"\\n\");\n }\n if (status === 403) {\n return [\n `AUTH_FORBIDDEN: ${message} (403)`,\n ``,\n `Cause: the credentials are valid but don't have access to this project or resource.`,\n `Fix:`,\n ` 1. Confirm the bound project is correct (check the .shipeasy file, or run: shipeasy root --json).`,\n ` 2. If it's the wrong project, run: shipeasy bind <project_id>.`,\n ` 3. If it's the right project, ask a workspace admin to grant access — retrying will not help.`,\n ].join(\"\\n\");\n }\n return undefined;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYO,IAAM,cAAc,WAAW;AAG/B,SAAS,eAAe,OAAuC;AACpE,SACE,OAAO,UAAU,YACjB,UAAU,QACV,WAAW,SACX,OAAQ,MAA6B,UAAU;AAEnD;AAGO,SAAS,YAAY,OAAuC;AACjE,MAAI,CAAC,eAAe,KAAK,EAAG,QAAO;AACnC,QAAM,OAAO,MAAM;AACnB,SAAO,QAAS,YAAkC,SAAS,IAAI,IAAI,OAAO;AAC5E;AAKA,IAAM,iBAA8C;AAAA,EAClD,KAAK;AAAA,EACL,KAAK;AACP;AAYO,SAAS,kBACd,SACA,QACA,SACoB;AACpB,QAAM,SAAS,eAAe,OAAO;AACrC,MAAI,WAAW,KAAK;AAClB,WAAO;AAAA,MACL,kBAAkB,OAAO;AAAA,MACzB;AAAA,MACA;AAAA,MACA;AAAA,MACA,aAAa,MAAM;AAAA,MACnB;AAAA,IACF,EAAE,KAAK,IAAI;AAAA,EACb;AACA,MAAI,WAAW,KAAK;AAClB,WAAO;AAAA,MACL,mBAAmB,OAAO;AAAA,MAC1B;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,EAAE,KAAK,IAAI;AAAA,EACb;AACA,SAAO;AACT;","names":[]}