@shipeasy/openapi 2.3.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 (43) hide show
  1. package/dist/{chunk-LYNWK55D.js → chunk-4QSU744W.js} +161 -1
  2. package/dist/chunk-4QSU744W.js.map +1 -0
  3. package/dist/{chunk-PRN4AEAM.js → chunk-ZPKHTUVV.js} +1004 -251
  4. package/dist/chunk-ZPKHTUVV.js.map +1 -0
  5. package/dist/{client-DO5HTb_L.d.ts → client-WGNXT4xl.d.ts} +5267 -2643
  6. package/dist/client.d.ts +1 -1
  7. package/dist/client.js +45 -1
  8. package/dist/index.d.ts +2 -2
  9. package/dist/index.js +46 -2
  10. package/dist/index.js.map +1 -1
  11. package/dist/schemas.d.ts +2933 -542
  12. package/dist/schemas.js +213 -1
  13. package/openapi.json +11646 -6855
  14. package/openapi.yaml +4939 -1675
  15. package/package.json +1 -1
  16. package/spec/components/errors.yaml +3 -0
  17. package/spec/components/schemas/alerts.yaml +138 -0
  18. package/spec/components/schemas/attributes.yaml +53 -3
  19. package/spec/components/schemas/common.yaml +10 -0
  20. package/spec/components/schemas/configs.yaml +58 -0
  21. package/spec/components/schemas/connectors.yaml +5 -1
  22. package/spec/components/schemas/errors-api.yaml +51 -4
  23. package/spec/components/schemas/experiments.yaml +347 -87
  24. package/spec/components/schemas/gates.yaml +341 -277
  25. package/spec/components/schemas/i18n.yaml +169 -40
  26. package/spec/components/schemas/killswitches.yaml +36 -0
  27. package/spec/components/schemas/metrics.yaml +183 -6
  28. package/spec/components/schemas/ops.yaml +817 -29
  29. package/spec/components/schemas/projects.yaml +129 -3
  30. package/spec/openapi.yaml +47 -0
  31. package/spec/paths/alerts.yaml +184 -0
  32. package/spec/paths/attributes.yaml +23 -5
  33. package/spec/paths/configs.yaml +70 -0
  34. package/spec/paths/errors.yaml +16 -0
  35. package/spec/paths/experiments.yaml +236 -16
  36. package/spec/paths/gates.yaml +137 -0
  37. package/spec/paths/i18n.yaml +290 -6
  38. package/spec/paths/killswitches.yaml +6 -0
  39. package/spec/paths/metrics.yaml +186 -0
  40. package/spec/paths/ops.yaml +299 -0
  41. package/spec/paths/projects.yaml +60 -0
  42. package/dist/chunk-LYNWK55D.js.map +0 -1
  43. package/dist/chunk-PRN4AEAM.js.map +0 -1
@@ -45,6 +45,17 @@
45
45
  type: integer
46
46
  minimum: 1
47
47
  maximum: 500
48
+ - name: owner
49
+ in: query
50
+ required: false
51
+ description: >-
52
+ Narrow to items owned by one person OR one agent. Matches a person by
53
+ `users.id`, email, or display name, and an agent by connector id,
54
+ display name, or kebab-case handle — e.g. `owner=Claude` or
55
+ `owner=alice@acme.dev`. Case-insensitive exact match, applied over the
56
+ returned page.
57
+ schema:
58
+ type: string
48
59
  responses:
49
60
  "200":
50
61
  description: List the operational queue
@@ -59,7 +70,17 @@
59
70
  title: Checkout button misaligned on mobile
60
71
  status: open
61
72
  priority: high
73
+ source: team
74
+ owner:
75
+ user:
76
+ id: usr_01j7w8a1b2c3d4e5f6g7h8i9j0
77
+ email: alice@acme.dev
78
+ name: Alice
79
+ agent: null
80
+ run: null
81
+ lastRun: null
62
82
  createdAt: 2026-06-20T09:14:08.000Z
83
+ updatedAt: 2026-06-21T10:02:44.000Z
63
84
  "400":
64
85
  $ref: ../components/responses.yaml#/BadRequest
65
86
  "401":
@@ -286,6 +307,49 @@
286
307
  name: update
287
308
  positional:
288
309
  - handle
310
+ delete:
311
+ operationId: deleteOpsItem
312
+ summary: Delete a queue item
313
+ description: |-
314
+ Permanently delete a queue item — any type — along with its comment thread, attachments, tags, and investigation records. A human (dashboard) action: the route is never allow-listed for restricted ops keys. Irreversible; to take an item out of the queue without destroying it, set its status (`wont_fix`/`resolved`) instead.
315
+
316
+ **Use case:** Remove a junk or duplicate report for good.
317
+ tags:
318
+ - Ops
319
+ parameters:
320
+ - $ref: ../components/parameters.yaml#/ProjectId
321
+ - name: handle
322
+ in: path
323
+ required: true
324
+ description: Per-project item number (e.g. `7`) or the full ops item id.
325
+ schema:
326
+ $ref: ../components/schemas/common.yaml#/ResourceId
327
+ responses:
328
+ "200":
329
+ description: Delete a queue item
330
+ content:
331
+ application/json:
332
+ schema:
333
+ $ref: ../components/schemas/ops.yaml#/DeleteOpsItemResponse
334
+ example:
335
+ ok: true
336
+ "400":
337
+ $ref: ../components/responses.yaml#/BadRequest
338
+ "401":
339
+ $ref: ../components/responses.yaml#/Unauthorized
340
+ "403":
341
+ $ref: ../components/responses.yaml#/Forbidden
342
+ "404":
343
+ $ref: ../components/responses.yaml#/NotFound
344
+ "409":
345
+ $ref: ../components/responses.yaml#/Conflict
346
+ "422":
347
+ $ref: ../components/responses.yaml#/UnprocessableEntity
348
+ x-error-codes:
349
+ - BAD_REQUEST
350
+ - UNAUTHORIZED
351
+ - FORBIDDEN
352
+ - NOT_FOUND
289
353
  /api/admin/ops/{handle}/link-pr:
290
354
  post:
291
355
  operationId: linkPrToOpsItem
@@ -344,6 +408,241 @@
344
408
  name: link-pr
345
409
  positional:
346
410
  - handle
411
+ /api/admin/ops/{handle}/ack:
412
+ post:
413
+ operationId: ackOpsItem
414
+ summary: Ack an item (start a run)
415
+ description: |-
416
+ Acknowledge a queue item — a person or an AI agent declaring "I'm on this
417
+ now". Opens a run: stamps who picked the item up and when, assigns them as
418
+ owner, and moves the item into the matching working status
419
+ (`investigating_by_ai` for an AI ack, `in_progress` for a human one). The
420
+ dashboard renders the open run as a live working indicator (which agent +
421
+ time since the run started).
422
+
423
+ **AI ack.** Pass `agent` with your own agent type (`claude`, `cursor`,
424
+ `copilot`, `jules`; `gemini` aliases `jules`) and, when you have one, the
425
+ run's `sessionId` so the dashboard can deep-link to the session. If the
426
+ project has no connected trigger connector of that type the call fails
427
+ with `AGENT_NOT_CONNECTED` — list the available agents with `ops agents
428
+ list` and use one of those (or connect the agent under Settings →
429
+ Triggers).
430
+
431
+ **Completion.** The run closes automatically on the loop's final actions —
432
+ linking the fixing PR (`link-pr`), an ops-notify escalation, or a
433
+ completion status change (`ready_for_qa`/`resolved`) — and the dashboard
434
+ then shows the run result (final action, PR, duration, session link).
435
+ A repeat ack supersedes the previous open run.
436
+
437
+ **Use case:** Call this first when picking an item up, so the team sees
438
+ who/what is working on it in real time.
439
+ tags:
440
+ - Ops
441
+ parameters:
442
+ - $ref: ../components/parameters.yaml#/ProjectId
443
+ - name: handle
444
+ in: path
445
+ required: true
446
+ description: Per-project item number (e.g. `7`) or the full ops item id.
447
+ schema:
448
+ $ref: ../components/schemas/common.yaml#/ResourceId
449
+ requestBody:
450
+ required: false
451
+ content:
452
+ application/json:
453
+ schema:
454
+ $ref: ../components/schemas/ops.yaml#/AckOpsItemRequest
455
+ example:
456
+ agent: claude
457
+ sessionId: session_01CiaFDeDyr37JZ62Gzd8oir
458
+ responses:
459
+ "200":
460
+ description: Ack an item (start a run)
461
+ content:
462
+ application/json:
463
+ schema:
464
+ $ref: ../components/schemas/ops.yaml#/AckOpsItemResponse
465
+ example:
466
+ id: fb_01j7w8a1b2c3d4e5f6g7h8i9j0
467
+ number: 7
468
+ status: investigating_by_ai
469
+ runId: 6f1f9a1e-8b32-4c8e-9a51-2f3b1c9d0e4a
470
+ agent: claude
471
+ connectorName: Claude
472
+ sessionId: session_01CiaFDeDyr37JZ62Gzd8oir
473
+ startedAt: 2026-07-17T10:15:00.000Z
474
+ "400":
475
+ $ref: ../components/responses.yaml#/BadRequest
476
+ "401":
477
+ $ref: ../components/responses.yaml#/Unauthorized
478
+ "403":
479
+ $ref: ../components/responses.yaml#/Forbidden
480
+ "404":
481
+ $ref: ../components/responses.yaml#/NotFound
482
+ "422":
483
+ $ref: ../components/responses.yaml#/UnprocessableEntity
484
+ x-error-codes:
485
+ - BAD_REQUEST
486
+ - UNAUTHORIZED
487
+ - FORBIDDEN
488
+ - NOT_FOUND
489
+ - AGENT_NOT_CONNECTED
490
+ - VALIDATION
491
+ x-cli:
492
+ name: ack
493
+ positional:
494
+ - handle
495
+ /api/admin/ops/{handle}/investigation:
496
+ get:
497
+ operationId: listOpsInvestigations
498
+ summary: List an item's investigation records
499
+ description: |-
500
+ The structured, read-only investigation records on a queue item — the
501
+ findings / blocking questions / QA notes an AI agent posted while working
502
+ it, plus its `working` run rows. Returns `published` records only, newest
503
+ first (max 50).
504
+
505
+ **Use case:** Read what a previous agent run already found before starting
506
+ your own investigation of the item.
507
+ tags:
508
+ - Ops
509
+ parameters:
510
+ - $ref: ../components/parameters.yaml#/ProjectId
511
+ - name: handle
512
+ in: path
513
+ required: true
514
+ description: Per-project item number (e.g. `7`) or the full ops item id.
515
+ schema:
516
+ $ref: ../components/schemas/common.yaml#/ResourceId
517
+ responses:
518
+ "200":
519
+ description: List an item's investigation records
520
+ content:
521
+ application/json:
522
+ schema:
523
+ $ref: ../components/schemas/ops.yaml#/ListOpsInvestigationsResponse
524
+ "400":
525
+ $ref: ../components/responses.yaml#/BadRequest
526
+ "401":
527
+ $ref: ../components/responses.yaml#/Unauthorized
528
+ "403":
529
+ $ref: ../components/responses.yaml#/Forbidden
530
+ "404":
531
+ $ref: ../components/responses.yaml#/NotFound
532
+ "422":
533
+ $ref: ../components/responses.yaml#/UnprocessableEntity
534
+ x-error-codes:
535
+ - BAD_REQUEST
536
+ - UNAUTHORIZED
537
+ - FORBIDDEN
538
+ - NOT_FOUND
539
+ post:
540
+ operationId: createOpsInvestigation
541
+ summary: Record an investigation
542
+ description: |-
543
+ Append one structured investigation record to a queue item — the AI-write
544
+ seam the cockpit's detail panel renders read-only. Post your findings
545
+ (`kind: investigated`), a blocking question for the team (`kind:
546
+ question`), or how to verify the fix (`kind: ready_for_qa` with
547
+ `qaNotes`). Append-only and create-only, so it is safe for restricted ops
548
+ keys.
549
+
550
+ **Use case:** After working an item, leave a findings write-up (summary,
551
+ markdown findings, sources inspected, confidence) so the team — and the
552
+ next agent run — sees what you learned.
553
+ tags:
554
+ - Ops
555
+ parameters:
556
+ - $ref: ../components/parameters.yaml#/ProjectId
557
+ - name: handle
558
+ in: path
559
+ required: true
560
+ description: Per-project item number (e.g. `7`) or the full ops item id.
561
+ schema:
562
+ $ref: ../components/schemas/common.yaml#/ResourceId
563
+ requestBody:
564
+ required: true
565
+ content:
566
+ application/json:
567
+ schema:
568
+ $ref: ../components/schemas/ops.yaml#/CreateOpsInvestigationRequest
569
+ examples:
570
+ findings:
571
+ summary: Post a findings write-up
572
+ value:
573
+ kind: investigated
574
+ summary: Root cause is a stale KV read on the checkout flag.
575
+ findings: "The `checkout.cta` gate is rebuilt without a CDN purge, so…"
576
+ agent: claude
577
+ confidence: high
578
+ sources:
579
+ - path: packages/core/src/kv/rebuild.ts
580
+ label: KV rebuild helper
581
+ question:
582
+ summary: Ask the team a blocking question
583
+ value:
584
+ kind: question
585
+ question: Should the fix preserve the legacy `?v=1` query param behaviour?
586
+ agent: claude
587
+ responses:
588
+ "200":
589
+ description: Record an investigation
590
+ content:
591
+ application/json:
592
+ schema:
593
+ $ref: ../components/schemas/ops.yaml#/OpsInvestigation
594
+ "400":
595
+ $ref: ../components/responses.yaml#/BadRequest
596
+ "401":
597
+ $ref: ../components/responses.yaml#/Unauthorized
598
+ "403":
599
+ $ref: ../components/responses.yaml#/Forbidden
600
+ "404":
601
+ $ref: ../components/responses.yaml#/NotFound
602
+ "409":
603
+ $ref: ../components/responses.yaml#/Conflict
604
+ "422":
605
+ $ref: ../components/responses.yaml#/UnprocessableEntity
606
+ x-error-codes:
607
+ - BAD_REQUEST
608
+ - UNAUTHORIZED
609
+ - FORBIDDEN
610
+ - NOT_FOUND
611
+ - VALIDATION
612
+ /api/admin/agent-profiles:
613
+ get:
614
+ operationId: listOpsAgents
615
+ summary: List connected AI agents
616
+ description: |-
617
+ The project's connected AI agents — one per authenticated trigger
618
+ connector (Claude / Cursor / Copilot / Jules). These are the agent types
619
+ `ops ack` accepts and the agents a queue item can be assigned to.
620
+
621
+ **Use case:** Discover which `agent` values an AI ack can use, e.g. after
622
+ an `AGENT_NOT_CONNECTED` error.
623
+ tags:
624
+ - Agents
625
+ parameters:
626
+ - $ref: ../components/parameters.yaml#/ProjectId
627
+ responses:
628
+ "200":
629
+ description: List connected AI agents
630
+ content:
631
+ application/json:
632
+ schema:
633
+ $ref: ../components/schemas/ops.yaml#/ListOpsAgentsResponse
634
+ "400":
635
+ $ref: ../components/responses.yaml#/BadRequest
636
+ "401":
637
+ $ref: ../components/responses.yaml#/Unauthorized
638
+ "403":
639
+ $ref: ../components/responses.yaml#/Forbidden
640
+ x-error-codes:
641
+ - BAD_REQUEST
642
+ - UNAUTHORIZED
643
+ - FORBIDDEN
644
+ x-cli:
645
+ name: list
347
646
  /api/admin/ops/{handle}/comments:
348
647
  get:
349
648
  operationId: listOpsComments
@@ -126,6 +126,66 @@
126
126
  x-cli:
127
127
  name: upsert
128
128
  /api/admin/projects/{id}:
129
+ get:
130
+ operationId: getProject
131
+ summary: Show a project by id
132
+ description: |-
133
+ Returns one project by id — the same full shape as `GET /api/admin/projects/current`. The id in the path must match the project the caller's credential resolves to (a credential can only read its own project); any other id is a 403.
134
+
135
+ **Use case:** Re-fetch the project row after a `PATCH` when you already hold its id.
136
+ tags:
137
+ - Projects
138
+ parameters:
139
+ - $ref: ../components/parameters.yaml#/ProjectId
140
+ - name: id
141
+ in: path
142
+ required: true
143
+ description: Stable opaque project id. Must match the caller's own project.
144
+ schema:
145
+ $ref: ../components/schemas/common.yaml#/ResourceId
146
+ responses:
147
+ "200":
148
+ description: Show a project by id
149
+ content:
150
+ application/json:
151
+ schema:
152
+ $ref: ../components/schemas/projects.yaml#/GetCurrentProjectResponse
153
+ example:
154
+ id: f81d4fae-7dec-11d0-a765-00a0c91e6bf6
155
+ name: Acme
156
+ domain: acme.com
157
+ ownerEmail: owner@acme.com
158
+ plan: pro
159
+ status: active
160
+ subscriptionStatus: active
161
+ billingInterval: monthly
162
+ currentPeriodEnd: 2026-07-12T00:00:00.000Z
163
+ trialEndsAt: null
164
+ cancelAtPeriodEnd: 0
165
+ moduleTranslations: true
166
+ moduleConfigs: true
167
+ moduleGates: true
168
+ moduleExperiments: true
169
+ moduleFeedback: true
170
+ createdAt: 2026-04-12T10:14:08.000Z
171
+ updatedAt: 2026-06-12T08:01:55.000Z
172
+ "400":
173
+ $ref: ../components/responses.yaml#/BadRequest
174
+ "401":
175
+ $ref: ../components/responses.yaml#/Unauthorized
176
+ "403":
177
+ $ref: ../components/responses.yaml#/Forbidden
178
+ "404":
179
+ $ref: ../components/responses.yaml#/NotFound
180
+ "409":
181
+ $ref: ../components/responses.yaml#/Conflict
182
+ "422":
183
+ $ref: ../components/responses.yaml#/UnprocessableEntity
184
+ x-error-codes:
185
+ - BAD_REQUEST
186
+ - UNAUTHORIZED
187
+ - FORBIDDEN
188
+ - NOT_FOUND
129
189
  patch:
130
190
  operationId: updateProject
131
191
  summary: Update the current project