@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.
Files changed (151) hide show
  1. package/README.md +37 -0
  2. package/dist/chunk-643YSMLU.js +1616 -0
  3. package/dist/chunk-643YSMLU.js.map +1 -0
  4. package/dist/chunk-MRW3DJ57.js +3385 -0
  5. package/dist/chunk-MRW3DJ57.js.map +1 -0
  6. package/dist/client-K0ShmsC7.d.ts +11284 -0
  7. package/dist/client.d.ts +1 -0
  8. package/dist/client.js +215 -0
  9. package/dist/client.js.map +1 -0
  10. package/dist/custom.d.ts +86 -0
  11. package/dist/custom.js +300 -0
  12. package/dist/custom.js.map +1 -0
  13. package/dist/index.d.ts +29 -41
  14. package/dist/index.js +258 -4375
  15. package/dist/index.js.map +1 -0
  16. package/dist/node-context.d.ts +81 -33
  17. package/dist/node-context.js +98 -44
  18. package/dist/node-context.js.map +1 -0
  19. package/dist/schemas.d.ts +7973 -0
  20. package/dist/schemas.js +1099 -0
  21. package/dist/schemas.js.map +1 -0
  22. package/openapi.json +15922 -3232
  23. package/openapi.yaml +14277 -0
  24. package/package.json +33 -26
  25. package/spec/components/errors.yaml +53 -0
  26. package/spec/components/parameters.yaml +32 -0
  27. package/spec/components/responses.yaml +122 -0
  28. package/spec/components/schemas/alert-rules.yaml +175 -0
  29. package/spec/components/schemas/attributes.yaml +157 -0
  30. package/spec/components/schemas/common.yaml +92 -0
  31. package/spec/components/schemas/configs.yaml +371 -0
  32. package/spec/components/schemas/connectors.yaml +587 -0
  33. package/spec/components/schemas/errors-api.yaml +209 -0
  34. package/spec/components/schemas/events.yaml +321 -0
  35. package/spec/components/schemas/experiments.yaml +865 -0
  36. package/spec/components/schemas/gate-templates.yaml +237 -0
  37. package/spec/components/schemas/gates.yaml +890 -0
  38. package/spec/components/schemas/i18n.yaml +478 -0
  39. package/spec/components/schemas/keys.yaml +186 -0
  40. package/spec/components/schemas/killswitches.yaml +309 -0
  41. package/spec/components/schemas/metrics.yaml +547 -0
  42. package/spec/components/schemas/ops.yaml +1013 -0
  43. package/spec/components/schemas/projects.yaml +222 -0
  44. package/spec/components/schemas/search.yaml +46 -0
  45. package/spec/components/schemas/universes.yaml +127 -0
  46. package/spec/openapi.yaml +367 -0
  47. package/spec/paths/alert-rules.yaml +258 -0
  48. package/spec/paths/attributes.yaml +272 -0
  49. package/spec/paths/configs.yaml +758 -0
  50. package/spec/paths/connectors.yaml +782 -0
  51. package/spec/paths/errors.yaml +382 -0
  52. package/spec/paths/events.yaml +380 -0
  53. package/spec/paths/experiments.yaml +803 -0
  54. package/spec/paths/gate-templates.yaml +267 -0
  55. package/spec/paths/gates.yaml +465 -0
  56. package/spec/paths/i18n.yaml +557 -0
  57. package/spec/paths/keys.yaml +182 -0
  58. package/spec/paths/killswitches.yaml +574 -0
  59. package/spec/paths/metrics.yaml +313 -0
  60. package/spec/paths/ops.yaml +446 -0
  61. package/spec/paths/projects.yaml +210 -0
  62. package/spec/paths/search.yaml +62 -0
  63. package/spec/paths/universes.yaml +255 -0
  64. package/dist/operations/attributes.d.ts +0 -33
  65. package/dist/operations/attributes.js +0 -16
  66. package/dist/operations/cli-adapter.d.ts +0 -35
  67. package/dist/operations/cli-adapter.js +0 -91
  68. package/dist/operations/coerce.d.ts +0 -32
  69. package/dist/operations/coerce.js +0 -53
  70. package/dist/operations/configs.d.ts +0 -28
  71. package/dist/operations/configs.js +0 -119
  72. package/dist/operations/docs.d.ts +0 -37
  73. package/dist/operations/docs.js +0 -39
  74. package/dist/operations/events.d.ts +0 -28
  75. package/dist/operations/events.js +0 -121
  76. package/dist/operations/experiments.d.ts +0 -28
  77. package/dist/operations/experiments.js +0 -280
  78. package/dist/operations/gates.d.ts +0 -28
  79. package/dist/operations/gates.js +0 -132
  80. package/dist/operations/i18n.d.ts +0 -28
  81. package/dist/operations/i18n.js +0 -121
  82. package/dist/operations/index.d.ts +0 -63
  83. package/dist/operations/index.js +0 -1751
  84. package/dist/operations/killswitches.d.ts +0 -28
  85. package/dist/operations/killswitches.js +0 -126
  86. package/dist/operations/mcp-adapter.d.ts +0 -35
  87. package/dist/operations/mcp-adapter.js +0 -94
  88. package/dist/operations/metrics.d.ts +0 -30
  89. package/dist/operations/metrics.js +0 -114
  90. package/dist/operations/ops.d.ts +0 -28
  91. package/dist/operations/ops.js +0 -313
  92. package/dist/operations/projects.d.ts +0 -28
  93. package/dist/operations/projects.js +0 -36
  94. package/dist/operations/sdk-docs.d.ts +0 -28
  95. package/dist/operations/sdk-docs.js +0 -160
  96. package/dist/operations/types.d.ts +0 -138
  97. package/dist/operations/types.js +0 -9
  98. package/dist/operations/universes.d.ts +0 -28
  99. package/dist/operations/universes.js +0 -93
  100. package/dist/operations/util.d.ts +0 -33
  101. package/dist/operations/util.js +0 -9
  102. package/dist/resources/alert-rules.d.ts +0 -50
  103. package/dist/resources/alert-rules.js +0 -75
  104. package/dist/resources/attributes.d.ts +0 -19
  105. package/dist/resources/attributes.js +0 -10
  106. package/dist/resources/configs.d.ts +0 -681
  107. package/dist/resources/configs.js +0 -509
  108. package/dist/resources/events.d.ts +0 -61
  109. package/dist/resources/events.js +0 -42
  110. package/dist/resources/experiments.d.ts +0 -849
  111. package/dist/resources/experiments.js +0 -707
  112. package/dist/resources/gates.d.ts +0 -808
  113. package/dist/resources/gates.js +0 -522
  114. package/dist/resources/i18n.d.ts +0 -84
  115. package/dist/resources/i18n.js +0 -60
  116. package/dist/resources/index.d.ts +0 -2767
  117. package/dist/resources/index.js +0 -2563
  118. package/dist/resources/killswitches.d.ts +0 -436
  119. package/dist/resources/killswitches.js +0 -514
  120. package/dist/resources/metrics.d.ts +0 -54
  121. package/dist/resources/metrics.js +0 -40
  122. package/dist/resources/ops.d.ts +0 -88
  123. package/dist/resources/ops.js +0 -36
  124. package/dist/resources/projects.d.ts +0 -54
  125. package/dist/resources/projects.js +0 -14
  126. package/dist/resources/universes.d.ts +0 -185
  127. package/dist/resources/universes.js +0 -234
  128. package/dist/schemas/alert-rules.d.ts +0 -65
  129. package/dist/schemas/alert-rules.js +0 -37
  130. package/dist/schemas/configs.d.ts +0 -154
  131. package/dist/schemas/configs.js +0 -134
  132. package/dist/schemas/constants.d.ts +0 -6
  133. package/dist/schemas/constants.js +0 -7
  134. package/dist/schemas/experiments.d.ts +0 -229
  135. package/dist/schemas/experiments.js +0 -221
  136. package/dist/schemas/folder.d.ts +0 -10
  137. package/dist/schemas/folder.js +0 -8
  138. package/dist/schemas/gates.d.ts +0 -386
  139. package/dist/schemas/gates.js +0 -190
  140. package/dist/schemas/index.d.ts +0 -11
  141. package/dist/schemas/index.js +0 -762
  142. package/dist/schemas/killswitches.d.ts +0 -110
  143. package/dist/schemas/killswitches.js +0 -226
  144. package/dist/schemas/metric-name.d.ts +0 -5
  145. package/dist/schemas/metric-name.js +0 -6
  146. package/dist/schemas/pagination.d.ts +0 -37
  147. package/dist/schemas/pagination.js +0 -44
  148. package/dist/schemas/universes.d.ts +0 -35
  149. package/dist/schemas/universes.js +0 -55
  150. package/dist/transport.d.ts +0 -30
  151. package/dist/transport.js +0 -44
@@ -0,0 +1,782 @@
1
+ /api/admin/connectors:
2
+ get:
3
+ operationId: listConnectors
4
+ summary: List connectors
5
+ description: |-
6
+ Returns every connector in the project as a bare array (no pagination envelope).
7
+
8
+ The encrypted credentials backing each connector are never serialised — only the connector's non-secret `config`, `accountLabel`, and last-attempt health (`lastError`, `lastAttemptAt`, `lastSuccessAt`) are returned.
9
+
10
+ **Use case:** Render the integrations/triggers settings page, or drive a CI check that asserts every `github` connector is `enabled` and last dispatched without error.
11
+ tags:
12
+ - Connectors
13
+ parameters:
14
+ - $ref: ../components/parameters.yaml#/ProjectId
15
+ - $ref: ../components/parameters.yaml#/Q
16
+ responses:
17
+ "200":
18
+ description: List connectors
19
+ content:
20
+ application/json:
21
+ schema:
22
+ $ref: ../components/schemas/connectors.yaml#/ListConnectorsResponse
23
+ example:
24
+ - id: 9b0e7c2a-1f3d-4a8e-bf21-0c6a2e5d7f10
25
+ projectId: prj_01j7w7m9q4hxbf6npe6s9zr3vc
26
+ provider: github
27
+ name: Bugs → acme/app issues
28
+ enabled: true
29
+ events:
30
+ - bug.created
31
+ config:
32
+ owner: acme
33
+ repo: app
34
+ accountLabel: acme/app
35
+ lastError: null
36
+ lastAttemptAt: 2026-06-27T18:04:11.000Z
37
+ lastSuccessAt: 2026-06-27T18:04:11.000Z
38
+ createdAt: 2026-06-01T09:12:00.000Z
39
+ updatedAt: 2026-06-27T18:04:11.000Z
40
+ - id: 2d44f0aa-9c81-4e6b-8a17-7b3e0f9c1a22
41
+ projectId: prj_01j7w7m9q4hxbf6npe6s9zr3vc
42
+ provider: claude_trigger
43
+ name: Nightly ops sweep
44
+ enabled: true
45
+ events: []
46
+ config:
47
+ routineId: rtn_8fk20
48
+ accountLabel: rtn_8fk20
49
+ lastError: null
50
+ lastAttemptAt: null
51
+ lastSuccessAt: null
52
+ createdAt: 2026-06-20T22:00:00.000Z
53
+ updatedAt: 2026-06-20T22:00:00.000Z
54
+ "400":
55
+ $ref: ../components/responses.yaml#/BadRequest
56
+ "401":
57
+ $ref: ../components/responses.yaml#/Unauthorized
58
+ "403":
59
+ $ref: ../components/responses.yaml#/Forbidden
60
+ "404":
61
+ $ref: ../components/responses.yaml#/NotFound
62
+ "409":
63
+ $ref: ../components/responses.yaml#/Conflict
64
+ "422":
65
+ $ref: ../components/responses.yaml#/UnprocessableEntity
66
+ x-error-codes:
67
+ - UNAUTHORIZED
68
+ - FORBIDDEN
69
+ x-cli:
70
+ name: list
71
+ post:
72
+ operationId: createConnector
73
+ summary: Create a connector
74
+ description: |-
75
+ Creates a connector. The request body is discriminated on `provider`.
76
+
77
+ - **OAuth/app providers** (`google_sheets`, `github`, `slack`) — supply `{ provider, name, events }`. The connector is created `enabled: false` with empty `config` and no credentials; the provider's OAuth flow then attaches credentials and enables it.
78
+ - **Trigger providers** (`claude_trigger`, `cursor_trigger`, `copilot_trigger`, `jules_trigger`) — supply `config` plus the provider's credential field(s) and the connector is fireable immediately. Trigger creates are **idempotent** by their natural key (`config.routineId` / `config.repoUrl` / `config.owner`+`config.repo` / `config.source`): re-creating updates the existing row rather than duplicating it.
79
+
80
+ **Use cases**
81
+
82
+ - **File bugs as GitHub Issues** — `{ "provider": "github", "name": "Bugs → acme/app", "events": ["bug.created"] }`, then finish the GitHub App install.
83
+ - **Nightly ops sweep** — register a `claude_trigger` with its `routineId` and (optionally) a fire `token`; subscribe `events` later to auto-fire on new bugs.
84
+ - **Cold cloud-agent run** — register a `cursor_trigger`/`jules_trigger` with the repo coordinates plus both keys, or a `copilot_trigger` with the repo + user PAT.
85
+ tags:
86
+ - Connectors
87
+ parameters:
88
+ - $ref: ../components/parameters.yaml#/ProjectId
89
+ requestBody:
90
+ required: true
91
+ content:
92
+ application/json:
93
+ schema:
94
+ $ref: ../components/schemas/connectors.yaml#/CreateConnectorRequest
95
+ examples:
96
+ githubStub:
97
+ summary: GitHub — OAuth/app stub
98
+ description: "Creates a disabled `github` connector subscribed to `bug.created`. Finish the GitHub App install to attach credentials and enable it."
99
+ value:
100
+ provider: github
101
+ name: Bugs → acme/app issues
102
+ events:
103
+ - bug.created
104
+ claudeTrigger:
105
+ summary: Claude trigger — tokened
106
+ description: "Registers a Claude Code routine trigger with its fire token. Idempotent by `config.routineId`. `events` left empty so it does not auto-fire paid runs yet."
107
+ value:
108
+ provider: claude_trigger
109
+ name: Nightly ops sweep
110
+ config:
111
+ routineId: rtn_8fk20
112
+ fireText: Burn down the open bug + feature-request queue.
113
+ token: rtk_live_3f9a…
114
+ cursorTrigger:
115
+ summary: Cursor trigger — cold cloud agent
116
+ description: "Both keys required up front: the Cursor `apiKey` launches the run, the `opsKey` is injected as SHIPEASY_CLI_TOKEN. Idempotent by `config.repoUrl`."
117
+ value:
118
+ provider: cursor_trigger
119
+ name: Cursor ops agent
120
+ config:
121
+ repoUrl: https://github.com/acme/app
122
+ projectId: prj_01j7w7m9q4hxbf6npe6s9zr3vc
123
+ apiKey: cur_live_…
124
+ opsKey: ops_…
125
+ responses:
126
+ "201":
127
+ description: Create a connector
128
+ content:
129
+ application/json:
130
+ schema:
131
+ $ref: ../components/schemas/connectors.yaml#/CreateConnectorResponse
132
+ example:
133
+ id: 9b0e7c2a-1f3d-4a8e-bf21-0c6a2e5d7f10
134
+ links:
135
+ GetConnector:
136
+ operationId: getConnector
137
+ parameters: { id: $response.body#/id }
138
+ UpdateConnector:
139
+ operationId: updateConnector
140
+ parameters: { id: $response.body#/id }
141
+ TestConnector:
142
+ operationId: testConnector
143
+ parameters: { id: $response.body#/id }
144
+ DeleteConnector:
145
+ operationId: deleteConnector
146
+ parameters: { id: $response.body#/id }
147
+ "400":
148
+ $ref: ../components/responses.yaml#/BadRequest
149
+ "401":
150
+ $ref: ../components/responses.yaml#/Unauthorized
151
+ "403":
152
+ $ref: ../components/responses.yaml#/Forbidden
153
+ "404":
154
+ $ref: ../components/responses.yaml#/NotFound
155
+ "409":
156
+ $ref: ../components/responses.yaml#/Conflict
157
+ "422":
158
+ $ref: ../components/responses.yaml#/UnprocessableEntity
159
+ x-error-codes:
160
+ - UNAUTHORIZED
161
+ - FORBIDDEN
162
+ - VALIDATION
163
+ x-cli:
164
+ name: create
165
+ /api/admin/connectors/{id}:
166
+ get:
167
+ operationId: getConnector
168
+ summary: Get a connector
169
+ description: |-
170
+ Returns a single connector by id. The encrypted credentials are never serialised.
171
+
172
+ **Use case:** Inspect one connector's health — its `enabled` state, subscribed `events`, and last-attempt outcome (`lastError`/`lastSuccessAt`).
173
+ tags:
174
+ - Connectors
175
+ parameters:
176
+ - $ref: ../components/parameters.yaml#/ProjectId
177
+ - name: id
178
+ in: path
179
+ required: true
180
+ description: Stable opaque connector id.
181
+ schema:
182
+ $ref: ../components/schemas/common.yaml#/ResourceId
183
+ responses:
184
+ "200":
185
+ description: Get a connector
186
+ content:
187
+ application/json:
188
+ schema:
189
+ $ref: ../components/schemas/connectors.yaml#/GetConnectorResponse
190
+ example:
191
+ id: 9b0e7c2a-1f3d-4a8e-bf21-0c6a2e5d7f10
192
+ projectId: prj_01j7w7m9q4hxbf6npe6s9zr3vc
193
+ provider: github
194
+ name: Bugs → acme/app issues
195
+ enabled: true
196
+ events:
197
+ - bug.created
198
+ config:
199
+ owner: acme
200
+ repo: app
201
+ accountLabel: acme/app
202
+ lastError: null
203
+ lastAttemptAt: 2026-06-27T18:04:11.000Z
204
+ lastSuccessAt: 2026-06-27T18:04:11.000Z
205
+ createdAt: 2026-06-01T09:12:00.000Z
206
+ updatedAt: 2026-06-27T18:04:11.000Z
207
+ "400":
208
+ $ref: ../components/responses.yaml#/BadRequest
209
+ "401":
210
+ $ref: ../components/responses.yaml#/Unauthorized
211
+ "403":
212
+ $ref: ../components/responses.yaml#/Forbidden
213
+ "404":
214
+ $ref: ../components/responses.yaml#/NotFound
215
+ "409":
216
+ $ref: ../components/responses.yaml#/Conflict
217
+ "422":
218
+ $ref: ../components/responses.yaml#/UnprocessableEntity
219
+ x-error-codes:
220
+ - UNAUTHORIZED
221
+ - FORBIDDEN
222
+ - NOT_FOUND
223
+ x-cli:
224
+ name: get
225
+ positional:
226
+ - id
227
+ patch:
228
+ operationId: updateConnector
229
+ summary: Update a connector
230
+ description: |-
231
+ Partial update — only supplied fields change. `events` and `config` **replace** wholesale; there is no merge or append. Secrets cannot be set through this endpoint (credential rotation goes through the provider-specific re-register flow).
232
+
233
+ The response carries only `{ id }` — re-fetch via `GET /api/admin/connectors/{id}` for the new row.
234
+
235
+ **Use cases**
236
+
237
+ - **Pause a connector** — `{ "enabled": false }`. Stops all dispatch / auto-fire without deleting it.
238
+ - **Change subscribed events** — send the full new `events` array. An empty array unsubscribes the connector from every event.
239
+ - **Rename** — `{ "name": "Bugs → acme/app issues" }`.
240
+ - **Retarget** — send a new `config` (e.g. a different Sheets `sheetTitle`); it replaces the stored config wholesale.
241
+ tags:
242
+ - Connectors
243
+ parameters:
244
+ - $ref: ../components/parameters.yaml#/ProjectId
245
+ - name: id
246
+ in: path
247
+ required: true
248
+ description: Stable opaque connector id.
249
+ schema:
250
+ $ref: ../components/schemas/common.yaml#/ResourceId
251
+ requestBody:
252
+ required: true
253
+ content:
254
+ application/json:
255
+ schema:
256
+ $ref: ../components/schemas/connectors.yaml#/UpdateConnectorRequest
257
+ examples:
258
+ pause:
259
+ summary: Pause — disable the connector
260
+ description: 'Stops all dispatch / auto-fire. Re-enable with `{ "enabled": true }`.'
261
+ value:
262
+ enabled: false
263
+ resubscribe:
264
+ summary: Replace subscribed events
265
+ description: "Array fields replace wholesale. Send the full new list; an empty array unsubscribes from everything."
266
+ value:
267
+ events:
268
+ - bug.created
269
+ - feature_request.created
270
+ retarget:
271
+ summary: Retarget config
272
+ description: Replaces the stored non-secret config wholesale.
273
+ value:
274
+ config:
275
+ spreadsheetId: 1AbC…
276
+ sheetTitle: Bugs Q3
277
+ responses:
278
+ "200":
279
+ description: Update a connector
280
+ content:
281
+ application/json:
282
+ schema:
283
+ $ref: ../components/schemas/connectors.yaml#/UpdateConnectorResponse
284
+ example:
285
+ id: 9b0e7c2a-1f3d-4a8e-bf21-0c6a2e5d7f10
286
+ "400":
287
+ $ref: ../components/responses.yaml#/BadRequest
288
+ "401":
289
+ $ref: ../components/responses.yaml#/Unauthorized
290
+ "403":
291
+ $ref: ../components/responses.yaml#/Forbidden
292
+ "404":
293
+ $ref: ../components/responses.yaml#/NotFound
294
+ "409":
295
+ $ref: ../components/responses.yaml#/Conflict
296
+ "422":
297
+ $ref: ../components/responses.yaml#/UnprocessableEntity
298
+ x-error-codes:
299
+ - UNAUTHORIZED
300
+ - FORBIDDEN
301
+ - NOT_FOUND
302
+ - VALIDATION
303
+ x-cli:
304
+ name: update
305
+ positional:
306
+ - id
307
+ delete:
308
+ operationId: deleteConnector
309
+ summary: Delete a connector
310
+ description: |-
311
+ Permanently removes the connector and its stored credentials.
312
+
313
+ **Use case:** Disconnect an integration for good — e.g. tear down a `github` connector after migrating bug routing elsewhere.
314
+ tags:
315
+ - Connectors
316
+ parameters:
317
+ - $ref: ../components/parameters.yaml#/ProjectId
318
+ - name: id
319
+ in: path
320
+ required: true
321
+ description: Stable opaque connector id.
322
+ schema:
323
+ $ref: ../components/schemas/common.yaml#/ResourceId
324
+ responses:
325
+ "200":
326
+ description: Delete a connector
327
+ content:
328
+ application/json:
329
+ schema:
330
+ $ref: ../components/schemas/connectors.yaml#/DeleteConnectorResponse
331
+ example:
332
+ ok: true
333
+ "400":
334
+ $ref: ../components/responses.yaml#/BadRequest
335
+ "401":
336
+ $ref: ../components/responses.yaml#/Unauthorized
337
+ "403":
338
+ $ref: ../components/responses.yaml#/Forbidden
339
+ "404":
340
+ $ref: ../components/responses.yaml#/NotFound
341
+ "409":
342
+ $ref: ../components/responses.yaml#/Conflict
343
+ "422":
344
+ $ref: ../components/responses.yaml#/UnprocessableEntity
345
+ x-error-codes:
346
+ - UNAUTHORIZED
347
+ - FORBIDDEN
348
+ - NOT_FOUND
349
+ x-cli:
350
+ name: archive
351
+ positional:
352
+ - id
353
+ /api/admin/connectors/{id}/fire:
354
+ post:
355
+ operationId: fireConnector
356
+ summary: Fire a trigger connector
357
+ description: |-
358
+ Manually kicks a trigger connector's run — Claude (kicks its preconfigured routine) or Cursor / Copilot / Jules (launches a cold cloud-agent run). Firing is event-less: it kicks the run with an optional caller-supplied prompt override rather than dispatching a single lifecycle payload.
359
+
360
+ Only trigger providers can be fired, and only once authenticated (a tokenless trigger cannot fire). The attempt's outcome is recorded on the connector's `lastAttemptAt` / `lastError` / `lastSuccessAt`.
361
+
362
+ **Use case:** Kick a one-off ops sweep on demand from the dashboard's "Fire now" button, optionally overriding the routine's default prompt.
363
+ tags:
364
+ - Connectors
365
+ parameters:
366
+ - $ref: ../components/parameters.yaml#/ProjectId
367
+ - name: id
368
+ in: path
369
+ required: true
370
+ description: Stable opaque connector id.
371
+ schema:
372
+ $ref: ../components/schemas/common.yaml#/ResourceId
373
+ requestBody:
374
+ required: false
375
+ content:
376
+ application/json:
377
+ schema:
378
+ $ref: ../components/schemas/connectors.yaml#/FireConnectorRequest
379
+ examples:
380
+ default:
381
+ summary: Fire with the provider default prompt
382
+ description: Empty body — kicks the run with the provider's own default (Claude → configured `fireText`, others → built cold-start prompt).
383
+ value: {}
384
+ override:
385
+ summary: Fire with a prompt override
386
+ value:
387
+ text: Triage only the P0 bugs reported in the last 24h.
388
+ responses:
389
+ "200":
390
+ description: The trigger run was successfully kicked off.
391
+ content:
392
+ application/json:
393
+ schema:
394
+ $ref: ../components/schemas/connectors.yaml#/FireConnectorResponse
395
+ example:
396
+ ok: true
397
+ "400":
398
+ $ref: ../components/responses.yaml#/BadRequest
399
+ "401":
400
+ $ref: ../components/responses.yaml#/Unauthorized
401
+ "403":
402
+ $ref: ../components/responses.yaml#/Forbidden
403
+ "404":
404
+ $ref: ../components/responses.yaml#/NotFound
405
+ "409":
406
+ $ref: ../components/responses.yaml#/Conflict
407
+ "422":
408
+ $ref: ../components/responses.yaml#/UnprocessableEntity
409
+ "502":
410
+ $ref: ../components/responses.yaml#/BadGateway
411
+ x-error-codes:
412
+ - UNAUTHORIZED
413
+ - FORBIDDEN
414
+ - NOT_FOUND
415
+ x-cli:
416
+ name: fire
417
+ positional:
418
+ - id
419
+ /api/admin/connectors/{id}/test:
420
+ post:
421
+ operationId: testConnector
422
+ summary: Test a connector
423
+ description: |-
424
+ Dispatches a single synthetic `bug.created` payload to the connector's destination so you can verify the integration end-to-end. Unlike `fire`, this runs the real dispatch path (posts a Slack message / appends a Sheets row / files a GitHub Issue) with throwaway test content. The attempt's outcome is recorded on the connector's `lastAttemptAt` / `lastError` / `lastSuccessAt`.
425
+
426
+ When the provider produces a linkable artifact (e.g. a GitHub Issue), its URL is returned as `issueUrl`; otherwise `issueUrl` is `null`.
427
+
428
+ **Use case:** Click "Send test" after wiring up a connector to confirm credentials and config are correct before relying on it for real events.
429
+ tags:
430
+ - Connectors
431
+ parameters:
432
+ - $ref: ../components/parameters.yaml#/ProjectId
433
+ - name: id
434
+ in: path
435
+ required: true
436
+ description: Stable opaque connector id.
437
+ schema:
438
+ $ref: ../components/schemas/common.yaml#/ResourceId
439
+ responses:
440
+ "200":
441
+ description: The test dispatch reached the destination.
442
+ content:
443
+ application/json:
444
+ schema:
445
+ $ref: ../components/schemas/connectors.yaml#/TestConnectorResponse
446
+ example:
447
+ ok: true
448
+ issueUrl: https://github.com/acme/app/issues/4217
449
+ "400":
450
+ $ref: ../components/responses.yaml#/BadRequest
451
+ "401":
452
+ $ref: ../components/responses.yaml#/Unauthorized
453
+ "403":
454
+ $ref: ../components/responses.yaml#/Forbidden
455
+ "404":
456
+ $ref: ../components/responses.yaml#/NotFound
457
+ "409":
458
+ $ref: ../components/responses.yaml#/Conflict
459
+ "422":
460
+ $ref: ../components/responses.yaml#/UnprocessableEntity
461
+ "502":
462
+ $ref: ../components/responses.yaml#/BadGateway
463
+ x-error-codes:
464
+ - UNAUTHORIZED
465
+ - FORBIDDEN
466
+ - NOT_FOUND
467
+ x-cli:
468
+ name: test
469
+ positional:
470
+ - id
471
+ /api/admin/connectors/{id}/trigger:
472
+ patch:
473
+ operationId: updateTriggerConnector
474
+ summary: Update a trigger connector
475
+ description: |-
476
+ Edit an existing coding-agent **trigger** connector (`claude_trigger` / `cursor_trigger` / `copilot_trigger` / `jules_trigger`) — replace its non-secret `config` and, optionally, rotate its credential secret(s). Discriminated on `provider`; the id in the path selects the connector and its `provider` must match the body.
477
+
478
+ Unlike the generic `PATCH /api/admin/connectors/{id}` (which cannot touch secrets), this endpoint always replaces the non-secret `config` wholesale and merges any supplied secret over the stored credential cipher — so a single half of a two-key pair (e.g. just the ops key) can be rotated on its own. A blank/omitted secret leaves the stored cipher untouched.
479
+
480
+ The response carries only `{ id }` — re-fetch via `GET /api/admin/connectors/{id}` for the new row.
481
+
482
+ **Use case:** Re-point a Cursor trigger at a new repo ref, or rotate a Claude trigger's fire token, without deleting and re-creating the connector.
483
+ tags:
484
+ - Connectors
485
+ parameters:
486
+ - $ref: ../components/parameters.yaml#/ProjectId
487
+ - name: id
488
+ in: path
489
+ required: true
490
+ description: Stable opaque connector id. Its stored `provider` must match the body's `provider`.
491
+ schema:
492
+ $ref: ../components/schemas/common.yaml#/ResourceId
493
+ requestBody:
494
+ required: true
495
+ content:
496
+ application/json:
497
+ schema:
498
+ $ref: ../components/schemas/connectors.yaml#/UpdateTriggerConnectorRequest
499
+ examples:
500
+ claude:
501
+ summary: Claude — repoint routine, rotate token
502
+ description: Replaces the routine config and rotates the fire token.
503
+ value:
504
+ provider: claude_trigger
505
+ config:
506
+ routineId: rtn_9f2c
507
+ token: fire_live_a1b2c3
508
+ cursor:
509
+ summary: Cursor — rotate just the ops key
510
+ description: Leaves the launch key untouched, rotates only the restricted ops key.
511
+ value:
512
+ provider: cursor_trigger
513
+ config:
514
+ repoUrl: https://github.com/acme/app
515
+ projectId: f81d4fae-7dec-11d0-a765-00a0c91e6bf6
516
+ opsKey: sdk_ops_live_x9y8z7
517
+ responses:
518
+ "200":
519
+ description: Update a trigger connector
520
+ content:
521
+ application/json:
522
+ schema:
523
+ $ref: ../components/schemas/connectors.yaml#/UpdateConnectorResponse
524
+ example:
525
+ id: 9b0e7c2a-1f3d-4a8e-bf21-0c6a2e5d7f10
526
+ "400":
527
+ $ref: ../components/responses.yaml#/BadRequest
528
+ "401":
529
+ $ref: ../components/responses.yaml#/Unauthorized
530
+ "403":
531
+ $ref: ../components/responses.yaml#/Forbidden
532
+ "404":
533
+ $ref: ../components/responses.yaml#/NotFound
534
+ "409":
535
+ $ref: ../components/responses.yaml#/Conflict
536
+ "422":
537
+ $ref: ../components/responses.yaml#/UnprocessableEntity
538
+ x-error-codes:
539
+ - UNAUTHORIZED
540
+ - FORBIDDEN
541
+ - NOT_FOUND
542
+ - VALIDATION
543
+ x-cli:
544
+ name: trigger
545
+ positional:
546
+ - id
547
+ /api/admin/connectors/trigger:
548
+ post:
549
+ operationId: createTriggerConnector
550
+ summary: Create a recurring coding-agent trigger
551
+ description: |-
552
+ Creates (or idempotently updates) a coding-agent **trigger** connector — the recurring, unattended run that burns down the ops queue in `--pr` mode. Discriminated on `provider`; only the four Shipeasy-fireable providers are accepted (`claude_trigger`, `cursor_trigger`, `copilot_trigger`, `jules_trigger`). Config + credential(s) arrive together; creates are idempotent by the provider's natural key, so re-creating updates the existing row.
553
+
554
+ Platforms without a fire endpoint (Codex, Windsurf, Cline, OpenClaw, OpenCode, Continue) cannot be created here — they are scheduled on their own platform (typically a GitHub Actions `schedule:` cron running the platform's headless CLI with the trigger prompt).
555
+
556
+ **Use cases**
557
+
558
+ - **Register a Claude routine** — after `RemoteTrigger {action:"create"}` returns `trig_…`, `{ "provider": "claude_trigger", "config": { "routineId": "trig_…" } }` (tokenless is fine; add the fire token later).
559
+ - **Cold Cursor/Jules run** — repo coordinates + both keys; Shipeasy launches the run and the PR opens via the provider's GitHub App.
560
+ - **Copilot cloud agent** — repo + a Copilot-licensed user PAT with the "Agent tasks" permission.
561
+ tags:
562
+ - Trigger
563
+ parameters:
564
+ - $ref: ../components/parameters.yaml#/ProjectId
565
+ requestBody:
566
+ required: true
567
+ content:
568
+ application/json:
569
+ schema:
570
+ $ref: ../components/schemas/connectors.yaml#/CreateTriggerConnectorRequest
571
+ examples:
572
+ claude:
573
+ summary: Claude routine (tokenless)
574
+ value:
575
+ provider: claude_trigger
576
+ name: Nightly ops sweep
577
+ config:
578
+ routineId: trig_8fk20
579
+ cursor:
580
+ summary: Cursor cold cloud agent
581
+ value:
582
+ provider: cursor_trigger
583
+ name: Cursor ops agent
584
+ config:
585
+ repoUrl: https://github.com/acme/app
586
+ projectId: prj_01j7w7m9q4hxbf6npe6s9zr3vc
587
+ apiKey: cur_live_…
588
+ opsKey: ops_…
589
+ responses:
590
+ "201":
591
+ description: Trigger connector created (or idempotently updated)
592
+ content:
593
+ application/json:
594
+ schema:
595
+ $ref: ../components/schemas/connectors.yaml#/CreateConnectorResponse
596
+ example:
597
+ id: 9b0e7c2a-1f3d-4a8e-bf21-0c6a2e5d7f10
598
+ links:
599
+ FireConnector:
600
+ operationId: fireConnector
601
+ parameters: { id: $response.body#/id }
602
+ TestConnector:
603
+ operationId: testConnector
604
+ parameters: { id: $response.body#/id }
605
+ GetConnector:
606
+ operationId: getConnector
607
+ parameters: { id: $response.body#/id }
608
+ UpdateTriggerConnector:
609
+ operationId: updateTriggerConnector
610
+ parameters: { id: $response.body#/id }
611
+ DeleteConnector:
612
+ operationId: deleteConnector
613
+ parameters: { id: $response.body#/id }
614
+ "400":
615
+ $ref: ../components/responses.yaml#/BadRequest
616
+ "401":
617
+ $ref: ../components/responses.yaml#/Unauthorized
618
+ "403":
619
+ $ref: ../components/responses.yaml#/Forbidden
620
+ "422":
621
+ $ref: ../components/responses.yaml#/UnprocessableEntity
622
+ x-error-codes:
623
+ - UNAUTHORIZED
624
+ - FORBIDDEN
625
+ - VALIDATION
626
+ x-cli:
627
+ helpPreamble: |-
628
+ A trigger is an unattended, scheduled agent run: on a cron cadence it runs the
629
+ shipeasy-ops-work loop in --pr mode against your project — one atomic diff and
630
+ ONE pull request per fixed item, nothing auto-merges.
631
+
632
+ Whatever the provider, the scheduled run executes this trigger prompt (headless
633
+ CLIs take it as the prompt; cloud agents as the task body):
634
+
635
+ You are an unattended Shipeasy maintenance run. Authenticate every `shipeasy`
636
+ call with these env vars (the CLI reads them directly — do NOT run
637
+ `shipeasy login`, never echo the token). Put them at the top of EVERY shell
638
+ invocation that calls `shipeasy`; each command runs in a fresh shell:
639
+
640
+ export SHIPEASY_CLI_TOKEN="<OPS_KEY>"
641
+ export SHIPEASY_PROJECT_ID="<PROJECT_ID>"
642
+
643
+ Ensure the repo is bound: test -f .shipeasy || printf '{"project_id":"<PROJECT_ID>"}\n' > .shipeasy
644
+ (never commit .shipeasy).
645
+
646
+ Refresh to the latest plugin + CLI, then run the ops work loop in --pr mode:
647
+ <PLUGIN-INSTALL-FOR-THIS-HOST> # plugin install for claude/copilot, or `npx -y skills add …`
648
+ npm install -g @shipeasy/cli@latest
649
+ Then follow the installed shipeasy-ops-work (--pr) workflow verbatim: burn down
650
+ the queue, one atomic diff per item, open ONE PR per item from a safe branch
651
+ prefix, flip each to ready_for_qa, add "Closes #<issue>" where an item has a
652
+ connected GitHub issue. If the queue is empty, exit cleanly. Never merge.
653
+
654
+ <OPS_KEY> is a restricted `ops` key — mint with
655
+ `npx -y @shipeasy/cli@latest keys create --type ops`. It reads the queue, flips
656
+ status, links the PR it opens, and creates resources only; it can never edit or
657
+ delete existing resources, and auto-extends its 7-day expiry on each run.
658
+ <PROJECT_ID> comes from the bound .shipeasy. Never print either value.
659
+
660
+ Safety: auto-approve flags (--approval-mode=yolo, --dangerously-skip-permissions,
661
+ …) remove the human gate — run only in an isolated env. Unattended loops spend
662
+ tokens/credits on a cadence: start weekly/daily and watch the first runs.
663
+ commands:
664
+ - name: create claude
665
+ summary: Register a Claude Code scheduled routine as the trigger connector
666
+ preset: { provider: claude_trigger }
667
+ help: |-
668
+ The reference implementation — a routine in Anthropic's cloud, no GitHub
669
+ Actions. The routines API is reachable only by the agent's in-process
670
+ RemoteTrigger tool, so provisioning is a hybrid split:
671
+
672
+ 1. `shipeasy ops trigger prep --frequency <4h|6h|daily|weekdays|weekly|cron>`
673
+ mints the restricted ops key, resolves repo + cron, and writes the exact
674
+ RemoteTrigger create body to a 0600 temp file (the key is never printed).
675
+ 2. The agent picks an environment_id from its RemoteTrigger env list — the
676
+ environment's network access must allow shipeasy.ai + api.shipeasy.ai
677
+ (Custom network; new envs default to Trusted, which fails every shipeasy
678
+ call) — then calls RemoteTrigger {action:"create"} and captures trig_….
679
+ Verify with {action:"run"} (confirm first — it spends tokens and may open
680
+ a real PR).
681
+ 3. Register the connector (idempotent by routineId; tokenless is fine):
682
+
683
+ shipeasy ops trigger create claude --config '{"routineId":"trig_…"}'
684
+
685
+ The fire token ("Fire now" + event auto-fire) is web-UI-only: open
686
+ https://claude.ai/code/routines → the routine → add an API trigger →
687
+ Generate token, then re-run the create with --token <token> and optionally
688
+ --events '["bug.created","feature_request.created"]' — the same row is
689
+ upgraded in place. GitHub access is connected once via /web-setup or the
690
+ Claude GitHub App. Manage/pause the routine at claude.ai/code/routines.
691
+ - name: create cursor
692
+ summary: Register a Cursor cloud-agent trigger (cold-fire; Shipeasy launches the run)
693
+ preset: { provider: cursor_trigger }
694
+ help: |-
695
+ Cursor cloud agents are cold-fireable: one authenticated POST to
696
+ https://api.cursor.com/v1/agents starts a run from nothing, and
697
+ autoCreatePR opens the PR via Cursor's GitHub App. Registering the
698
+ connector stores both credentials, so Shipeasy can fire it on demand and
699
+ on subscribed events; the ops key rides the launch envVars (never the
700
+ prompt):
701
+
702
+ shipeasy ops trigger create cursor \
703
+ --config '{"repoUrl":"https://github.com/<owner>/<repo>","projectId":"<prj_…>"}' \
704
+ --api-key <CURSOR_API_KEY> --ops-key <ops_…>
705
+
706
+ For a fixed cadence (nightly runs without new feedback) add a Cursor
707
+ Automation (cursor.com/automations) with the same trigger prompt — cron +
708
+ "Pull request creation" enabled. Note: Automations always run in Max Mode
709
+ (billed on cloud-agent usage).
710
+ - name: create copilot
711
+ summary: Register a GitHub Copilot cloud-agent trigger
712
+ preset: { provider: copilot_trigger }
713
+ help: |-
714
+ Copilot's cloud agent starts from one authenticated POST to
715
+ https://api.github.com/agents/repos/<owner>/<repo>/tasks with
716
+ { prompt, create_pull_request: true }. Auth is a user-to-server token
717
+ ONLY: a fine-grained user PAT with the "Agent tasks" repo permission
718
+ (read+write) for a Copilot-licensed account — the Actions GITHUB_TOKEN and
719
+ GitHub App installation tokens are rejected. The agent reads
720
+ SHIPEASY_CLI_TOKEN from the repo's own Agents secret store, so Shipeasy
721
+ stores only the PAT:
722
+
723
+ shipeasy ops trigger create copilot \
724
+ --config '{"owner":"<owner>","repo":"<repo>"}' --token <fine-grained PAT>
725
+
726
+ Set SHIPEASY_CLI_TOKEN (the restricted ops key) + SHIPEASY_PROJECT_ID in
727
+ the repo's Agents secrets first. For a fixed cadence use Copilot
728
+ automations (repo Agents tab; hourly/daily/weekly, private/internal repos
729
+ only) or a scheduled Actions job running `gh agent-task create`.
730
+ - name: create jules
731
+ aliases: [gemini]
732
+ summary: Register a Google Jules (Gemini) trigger
733
+ preset: { provider: jules_trigger }
734
+ help: |-
735
+ Jules — Google's async coding agent (the fireable Gemini path) — starts a
736
+ session from one POST to https://jules.googleapis.com/v1alpha/sessions
737
+ (header X-Goog-Api-Key) with sourceContext.source =
738
+ sources/github/<owner>/<repo> and automationMode: "AUTO_CREATE_PR". Jules
739
+ exposes no env channel, so the restricted ops key is embedded in the
740
+ session prompt (safe — it is the limited ops key):
741
+
742
+ shipeasy ops trigger create jules \
743
+ --config '{"source":"sources/github/<owner>/<repo>"}' \
744
+ --api-key <JULES_API_KEY> --ops-key <ops_…>
745
+
746
+ Connect the repo to Jules once (jules.google.com → connect GitHub). For a
747
+ fixed cadence use Jules scheduled tasks (UI-only), or fall back to the
748
+ Gemini CLI in a GitHub Actions schedule: job
749
+ (`gemini -p "<TRIGGER PROMPT>" --approval-mode=yolo`; auth GEMINI_API_KEY).
750
+ fallback:
751
+ argument: provider
752
+ platforms: [codex, windsurf, cline, openclaw, opencode, continue]
753
+ help: |-
754
+ Direct (Shipeasy-fired) triggers are not supported for this platform — it
755
+ exposes no HTTP "start a run" endpoint our Worker can call. Supported here:
756
+ claude, cursor, copilot, jules (alias: gemini) — see
757
+ `shipeasy ops trigger create <provider> --help`.
758
+
759
+ Platform-scheduled setup instead (the platform's own scheduler fires the
760
+ run; nothing to register in Shipeasy):
761
+
762
+ 1. Mint the restricted ops key (`shipeasy sdk keys create --type ops --json`)
763
+ and read the project id from .shipeasy. Never print either.
764
+ 2. Build the trigger prompt (run `shipeasy ops trigger create claude --help`
765
+ for the shared template) with the key, project id, and your platform's
766
+ install line substituted.
767
+ 3. Schedule a headless run with it — a GitHub Actions `schedule:` cron
768
+ (always-on; credentials as repo secrets incl. a GH_TOKEN/PAT with
769
+ contents:write + pull-requests:write) or a local cron/daemon (machine
770
+ must stay awake):
771
+
772
+ codex GitHub Actions cron → `codex cloud exec --env <ENV_ID> "<PROMPT>"`
773
+ (submits a Codex Cloud task — machine-off; configure network +
774
+ SHIPEASY_* secrets once at chatgpt.com/codex/cloud/settings/environments)
775
+ windsurf Devin Scheduled Sessions (cloud cron; WINDSURF/DEVIN API key)
776
+ cline `cline schedule create --cron "…" --prompt "<PROMPT>"` (local daemon)
777
+ openclaw `openclaw cron create "…" "<PROMPT>"` (local gateway; static API key)
778
+ opencode `opencode run "<PROMPT>"` + external cron (permission: "allow")
779
+ continue `cn -p --auto "<PROMPT>"` + external cron (CONTINUE_API_KEY)
780
+
781
+ 4. Verify one manual fire (expect a PR or a clean empty-queue exit) and
782
+ manage/pause it on that platform's scheduler.