@naturali/cli 0.50.0 → 0.51.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/dist/index.mjs +643 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -14,7 +14,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
14
14
|
};
|
|
15
15
|
//#endregion
|
|
16
16
|
//#region package.json
|
|
17
|
-
var version = "0.
|
|
17
|
+
var version = "0.51.0";
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region ../sdk/src/generated/core/bodySerializer.gen.ts
|
|
20
20
|
const jsonBodySerializer = { bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value) };
|
|
@@ -1753,6 +1753,76 @@ var Providers = class {
|
|
|
1753
1753
|
});
|
|
1754
1754
|
}
|
|
1755
1755
|
};
|
|
1756
|
+
var Runs = class {
|
|
1757
|
+
/**
|
|
1758
|
+
* List runs
|
|
1759
|
+
*
|
|
1760
|
+
* Runs of one orchestration, most recent first. `orchestration_id` is required — a project-wide run feed is not offered, since the upstream runtime's own list has no project filter (see the file description).
|
|
1761
|
+
*
|
|
1762
|
+
*/
|
|
1763
|
+
static listRuns(options) {
|
|
1764
|
+
return (options.client ?? client).get({
|
|
1765
|
+
url: "/v1/projects/{project_id}/runs",
|
|
1766
|
+
...options
|
|
1767
|
+
});
|
|
1768
|
+
}
|
|
1769
|
+
/**
|
|
1770
|
+
* Start a run
|
|
1771
|
+
*
|
|
1772
|
+
* Creates a new run of the orchestration named by `orchestration_id`. By default the run executes durably in the background and this call returns immediately with status `queued`; poll `GET …/runs/{run_id}` to observe progress. Pass `wait: true` to block until the run reaches a terminal or `awaiting_input` state instead.
|
|
1773
|
+
*
|
|
1774
|
+
*/
|
|
1775
|
+
static startRun(options) {
|
|
1776
|
+
return (options.client ?? client).post({
|
|
1777
|
+
url: "/v1/projects/{project_id}/runs",
|
|
1778
|
+
...options,
|
|
1779
|
+
headers: {
|
|
1780
|
+
"Content-Type": "application/json",
|
|
1781
|
+
...options.headers
|
|
1782
|
+
}
|
|
1783
|
+
});
|
|
1784
|
+
}
|
|
1785
|
+
/**
|
|
1786
|
+
* Get a run
|
|
1787
|
+
*
|
|
1788
|
+
* One run's status, accumulated state, per-node artifacts and execution trace.
|
|
1789
|
+
*
|
|
1790
|
+
*/
|
|
1791
|
+
static getRun(options) {
|
|
1792
|
+
return (options.client ?? client).get({
|
|
1793
|
+
url: "/v1/projects/{project_id}/runs/{run_id}",
|
|
1794
|
+
...options
|
|
1795
|
+
});
|
|
1796
|
+
}
|
|
1797
|
+
/**
|
|
1798
|
+
* Cancel a run
|
|
1799
|
+
*
|
|
1800
|
+
* Stops a run that has not yet reached a terminal state.
|
|
1801
|
+
*/
|
|
1802
|
+
static cancelRun(options) {
|
|
1803
|
+
return (options.client ?? client).post({
|
|
1804
|
+
url: "/v1/projects/{project_id}/runs/{run_id}:cancel",
|
|
1805
|
+
...options
|
|
1806
|
+
});
|
|
1807
|
+
}
|
|
1808
|
+
/**
|
|
1809
|
+
* Resume a run
|
|
1810
|
+
*
|
|
1811
|
+
* Moves a run parked at `awaiting_input` forward — the single door for every resume, whatever the run is parked on. Send `output` to answer a human-node pause and advance past it; omit it to re-drive a run without answering anything, which re-parks a human or webhook-receive pause on the same node (useful for a delay/poll wait, or to nudge a run after an external side effect completed out of band).
|
|
1812
|
+
* Only valid on a run whose status is `awaiting_input`; any other status answers 409.
|
|
1813
|
+
*
|
|
1814
|
+
*/
|
|
1815
|
+
static resumeRun(options) {
|
|
1816
|
+
return (options.client ?? client).post({
|
|
1817
|
+
url: "/v1/projects/{project_id}/runs/{run_id}:resume",
|
|
1818
|
+
...options,
|
|
1819
|
+
headers: {
|
|
1820
|
+
"Content-Type": "application/json",
|
|
1821
|
+
...options.headers
|
|
1822
|
+
}
|
|
1823
|
+
});
|
|
1824
|
+
}
|
|
1825
|
+
};
|
|
1756
1826
|
var Sessions = class {
|
|
1757
1827
|
/**
|
|
1758
1828
|
* Open a session
|
|
@@ -2056,6 +2126,108 @@ var Traces = class {
|
|
|
2056
2126
|
});
|
|
2057
2127
|
}
|
|
2058
2128
|
};
|
|
2129
|
+
var Triggers = class {
|
|
2130
|
+
/**
|
|
2131
|
+
* List triggers
|
|
2132
|
+
*
|
|
2133
|
+
* The project's schedule triggers.
|
|
2134
|
+
*/
|
|
2135
|
+
static listTriggers(options) {
|
|
2136
|
+
return (options.client ?? client).get({
|
|
2137
|
+
url: "/v1/projects/{project_id}/triggers",
|
|
2138
|
+
...options
|
|
2139
|
+
});
|
|
2140
|
+
}
|
|
2141
|
+
/**
|
|
2142
|
+
* Create a trigger
|
|
2143
|
+
*
|
|
2144
|
+
* Schedules `target_id` (an agent in this project) to run on `cron`, a 5-field cron expression evaluated in UTC.
|
|
2145
|
+
*
|
|
2146
|
+
*/
|
|
2147
|
+
static createTrigger(options) {
|
|
2148
|
+
return (options.client ?? client).post({
|
|
2149
|
+
url: "/v1/projects/{project_id}/triggers",
|
|
2150
|
+
...options,
|
|
2151
|
+
headers: {
|
|
2152
|
+
"Content-Type": "application/json",
|
|
2153
|
+
...options.headers
|
|
2154
|
+
}
|
|
2155
|
+
});
|
|
2156
|
+
}
|
|
2157
|
+
/**
|
|
2158
|
+
* Delete a trigger
|
|
2159
|
+
*
|
|
2160
|
+
* Removes the trigger. Its firing history is kept.
|
|
2161
|
+
*/
|
|
2162
|
+
static deleteTrigger(options) {
|
|
2163
|
+
return (options.client ?? client).delete({
|
|
2164
|
+
url: "/v1/projects/{project_id}/triggers/{trigger_id}",
|
|
2165
|
+
...options
|
|
2166
|
+
});
|
|
2167
|
+
}
|
|
2168
|
+
/**
|
|
2169
|
+
* Get a trigger
|
|
2170
|
+
*/
|
|
2171
|
+
static getTrigger(options) {
|
|
2172
|
+
return (options.client ?? client).get({
|
|
2173
|
+
url: "/v1/projects/{project_id}/triggers/{trigger_id}",
|
|
2174
|
+
...options
|
|
2175
|
+
});
|
|
2176
|
+
}
|
|
2177
|
+
/**
|
|
2178
|
+
* Update a trigger
|
|
2179
|
+
*
|
|
2180
|
+
* Retune the schedule, its target, or whether it fires at all. At least one field is required. `type` and `target_type` are immutable.
|
|
2181
|
+
*
|
|
2182
|
+
*/
|
|
2183
|
+
static updateTrigger(options) {
|
|
2184
|
+
return (options.client ?? client).patch({
|
|
2185
|
+
url: "/v1/projects/{project_id}/triggers/{trigger_id}",
|
|
2186
|
+
...options,
|
|
2187
|
+
headers: {
|
|
2188
|
+
"Content-Type": "application/json",
|
|
2189
|
+
...options.headers
|
|
2190
|
+
}
|
|
2191
|
+
});
|
|
2192
|
+
}
|
|
2193
|
+
/**
|
|
2194
|
+
* Fire a trigger manually
|
|
2195
|
+
*
|
|
2196
|
+
* Runs the trigger's target right now, outside its schedule, and waits for the run to finish. This is the `…:fire` action; the path segment is `{trigger_id}:fire`.
|
|
2197
|
+
* `input` is shallow-merged over the trigger's own stored `input` for this run only — the trigger's configuration is unchanged.
|
|
2198
|
+
*
|
|
2199
|
+
*/
|
|
2200
|
+
static fireTrigger(options) {
|
|
2201
|
+
return (options.client ?? client).post({
|
|
2202
|
+
url: "/v1/projects/{project_id}/triggers/{trigger_id}:fire",
|
|
2203
|
+
...options,
|
|
2204
|
+
headers: {
|
|
2205
|
+
"Content-Type": "application/json",
|
|
2206
|
+
...options.headers
|
|
2207
|
+
}
|
|
2208
|
+
});
|
|
2209
|
+
}
|
|
2210
|
+
/**
|
|
2211
|
+
* List a trigger's firings
|
|
2212
|
+
*
|
|
2213
|
+
* Every time this trigger ran, newest first — scheduled and manual alike.
|
|
2214
|
+
*/
|
|
2215
|
+
static listTriggerFirings(options) {
|
|
2216
|
+
return (options.client ?? client).get({
|
|
2217
|
+
url: "/v1/projects/{project_id}/triggers/{trigger_id}/firings",
|
|
2218
|
+
...options
|
|
2219
|
+
});
|
|
2220
|
+
}
|
|
2221
|
+
/**
|
|
2222
|
+
* Get a trigger firing
|
|
2223
|
+
*/
|
|
2224
|
+
static getTriggerFiring(options) {
|
|
2225
|
+
return (options.client ?? client).get({
|
|
2226
|
+
url: "/v1/projects/{project_id}/triggers/{trigger_id}/firings/{firing_id}",
|
|
2227
|
+
...options
|
|
2228
|
+
});
|
|
2229
|
+
}
|
|
2230
|
+
};
|
|
2059
2231
|
var Webhooks = class {
|
|
2060
2232
|
/**
|
|
2061
2233
|
* List webhooks
|
|
@@ -2285,10 +2457,12 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
2285
2457
|
NaturaliClient: () => NaturaliClient,
|
|
2286
2458
|
Projects: () => Projects,
|
|
2287
2459
|
Providers: () => Providers,
|
|
2460
|
+
Runs: () => Runs,
|
|
2288
2461
|
Sessions: () => Sessions,
|
|
2289
2462
|
Tasks: () => Tasks,
|
|
2290
2463
|
Tools: () => Tools,
|
|
2291
2464
|
Traces: () => Traces,
|
|
2465
|
+
Triggers: () => Triggers,
|
|
2292
2466
|
Webhooks: () => Webhooks,
|
|
2293
2467
|
createClient: () => createClient,
|
|
2294
2468
|
createConfig: () => createConfig
|
|
@@ -5790,6 +5964,164 @@ const routes = {
|
|
|
5790
5964
|
}
|
|
5791
5965
|
]
|
|
5792
5966
|
},
|
|
5967
|
+
"list-runs": {
|
|
5968
|
+
serviceClass: "Runs",
|
|
5969
|
+
operationId: "listRuns",
|
|
5970
|
+
description: "Runs of one orchestration, most recent first. `orchestration_id` is required — a project-wide run feed is not offered, since the upstream runtime's own list has no project filter (see the file description).",
|
|
5971
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/runs",
|
|
5972
|
+
httpMethod: "get",
|
|
5973
|
+
pathParams: ["project_id"],
|
|
5974
|
+
queryParams: [
|
|
5975
|
+
"orchestration_id",
|
|
5976
|
+
"limit",
|
|
5977
|
+
"cursor"
|
|
5978
|
+
],
|
|
5979
|
+
flags: [
|
|
5980
|
+
{
|
|
5981
|
+
"name": "project_id",
|
|
5982
|
+
"description": "Project public ID (proj_ prefix).",
|
|
5983
|
+
"required": true,
|
|
5984
|
+
"type": "string",
|
|
5985
|
+
"in": "path"
|
|
5986
|
+
},
|
|
5987
|
+
{
|
|
5988
|
+
"name": "orchestration_id",
|
|
5989
|
+
"description": "Only runs of this orchestration. Required — see the file description for why a project-wide feed is not offered. An orchestration this project does not own is a 404, not an empty page.\n",
|
|
5990
|
+
"required": true,
|
|
5991
|
+
"type": "string",
|
|
5992
|
+
"in": "query"
|
|
5993
|
+
},
|
|
5994
|
+
{
|
|
5995
|
+
"name": "limit",
|
|
5996
|
+
"description": "Maximum items per page.",
|
|
5997
|
+
"required": false,
|
|
5998
|
+
"type": "integer",
|
|
5999
|
+
"in": "query"
|
|
6000
|
+
},
|
|
6001
|
+
{
|
|
6002
|
+
"name": "cursor",
|
|
6003
|
+
"description": "Opaque pagination cursor from a previous response's next_cursor.",
|
|
6004
|
+
"required": false,
|
|
6005
|
+
"type": "string",
|
|
6006
|
+
"in": "query"
|
|
6007
|
+
}
|
|
6008
|
+
]
|
|
6009
|
+
},
|
|
6010
|
+
"start-run": {
|
|
6011
|
+
serviceClass: "Runs",
|
|
6012
|
+
operationId: "startRun",
|
|
6013
|
+
description: "Creates a new run of the orchestration named by `orchestration_id`. By default the run executes durably in the background and this call returns immediately with status `queued`; poll `GET …/runs/{run_id}` to observe progress. Pass `wait: true` to block until the run reaches a terminal or `awaiting_input` state instead.",
|
|
6014
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/runs",
|
|
6015
|
+
httpMethod: "post",
|
|
6016
|
+
pathParams: ["project_id"],
|
|
6017
|
+
queryParams: [],
|
|
6018
|
+
flags: [
|
|
6019
|
+
{
|
|
6020
|
+
"name": "project_id",
|
|
6021
|
+
"description": "Project public ID (proj_ prefix).",
|
|
6022
|
+
"required": true,
|
|
6023
|
+
"type": "string",
|
|
6024
|
+
"in": "path"
|
|
6025
|
+
},
|
|
6026
|
+
{
|
|
6027
|
+
"name": "orchestration_id",
|
|
6028
|
+
"description": "The orchestration to run.",
|
|
6029
|
+
"required": true,
|
|
6030
|
+
"type": "string",
|
|
6031
|
+
"in": "body"
|
|
6032
|
+
},
|
|
6033
|
+
{
|
|
6034
|
+
"name": "input",
|
|
6035
|
+
"description": "Initial state for the run, merged with the orchestration's own defaults.",
|
|
6036
|
+
"required": false,
|
|
6037
|
+
"type": "object",
|
|
6038
|
+
"in": "body"
|
|
6039
|
+
},
|
|
6040
|
+
{
|
|
6041
|
+
"name": "wait",
|
|
6042
|
+
"description": "When true, block until the run reaches a terminal or `awaiting_input` state and return the settled run. When false (default), return immediately with `status: \"queued\"`.\n",
|
|
6043
|
+
"required": false,
|
|
6044
|
+
"type": "boolean",
|
|
6045
|
+
"in": "body"
|
|
6046
|
+
}
|
|
6047
|
+
]
|
|
6048
|
+
},
|
|
6049
|
+
"get-run": {
|
|
6050
|
+
serviceClass: "Runs",
|
|
6051
|
+
operationId: "getRun",
|
|
6052
|
+
description: "One run's status, accumulated state, per-node artifacts and execution trace.",
|
|
6053
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/runs",
|
|
6054
|
+
httpMethod: "get",
|
|
6055
|
+
pathParams: ["project_id", "run_id"],
|
|
6056
|
+
queryParams: [],
|
|
6057
|
+
flags: [{
|
|
6058
|
+
"name": "project_id",
|
|
6059
|
+
"description": "Project public ID (proj_ prefix).",
|
|
6060
|
+
"required": true,
|
|
6061
|
+
"type": "string",
|
|
6062
|
+
"in": "path"
|
|
6063
|
+
}, {
|
|
6064
|
+
"name": "run_id",
|
|
6065
|
+
"description": "Run public ID (run_ prefix).",
|
|
6066
|
+
"required": true,
|
|
6067
|
+
"type": "string",
|
|
6068
|
+
"in": "path"
|
|
6069
|
+
}]
|
|
6070
|
+
},
|
|
6071
|
+
"cancel-run": {
|
|
6072
|
+
serviceClass: "Runs",
|
|
6073
|
+
operationId: "cancelRun",
|
|
6074
|
+
description: "Stops a run that has not yet reached a terminal state.",
|
|
6075
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/runs",
|
|
6076
|
+
httpMethod: "post",
|
|
6077
|
+
pathParams: ["project_id", "run_id"],
|
|
6078
|
+
queryParams: [],
|
|
6079
|
+
flags: [{
|
|
6080
|
+
"name": "project_id",
|
|
6081
|
+
"description": "Project public ID (proj_ prefix).",
|
|
6082
|
+
"required": true,
|
|
6083
|
+
"type": "string",
|
|
6084
|
+
"in": "path"
|
|
6085
|
+
}, {
|
|
6086
|
+
"name": "run_id",
|
|
6087
|
+
"description": "Run public ID (run_ prefix).",
|
|
6088
|
+
"required": true,
|
|
6089
|
+
"type": "string",
|
|
6090
|
+
"in": "path"
|
|
6091
|
+
}]
|
|
6092
|
+
},
|
|
6093
|
+
"resume-run": {
|
|
6094
|
+
serviceClass: "Runs",
|
|
6095
|
+
operationId: "resumeRun",
|
|
6096
|
+
description: "Moves a run parked at `awaiting_input` forward — the single door for every resume, whatever the run is parked on. Send `output` to answer a human-node pause and advance past it; omit it to re-drive a run without answering anything, which re-parks a human or webhook-receive pause on the same node (useful for a delay/poll wait, or to nudge a run after an external side effect completed out of band). Only valid on a run whose status is `awaiting_input`; any other status answers 409.",
|
|
6097
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/runs",
|
|
6098
|
+
httpMethod: "post",
|
|
6099
|
+
pathParams: ["project_id", "run_id"],
|
|
6100
|
+
queryParams: [],
|
|
6101
|
+
flags: [
|
|
6102
|
+
{
|
|
6103
|
+
"name": "project_id",
|
|
6104
|
+
"description": "Project public ID (proj_ prefix).",
|
|
6105
|
+
"required": true,
|
|
6106
|
+
"type": "string",
|
|
6107
|
+
"in": "path"
|
|
6108
|
+
},
|
|
6109
|
+
{
|
|
6110
|
+
"name": "run_id",
|
|
6111
|
+
"description": "Run public ID (run_ prefix).",
|
|
6112
|
+
"required": true,
|
|
6113
|
+
"type": "string",
|
|
6114
|
+
"in": "path"
|
|
6115
|
+
},
|
|
6116
|
+
{
|
|
6117
|
+
"name": "output",
|
|
6118
|
+
"description": "Answers a human-node pause and advances the run past it. Omit to re-drive the run without answering anything.\n",
|
|
6119
|
+
"required": false,
|
|
6120
|
+
"type": "object",
|
|
6121
|
+
"in": "body"
|
|
6122
|
+
}
|
|
6123
|
+
]
|
|
6124
|
+
},
|
|
5793
6125
|
"create-session": {
|
|
5794
6126
|
serviceClass: "Sessions",
|
|
5795
6127
|
operationId: "createSession",
|
|
@@ -6738,6 +7070,316 @@ const routes = {
|
|
|
6738
7070
|
"in": "path"
|
|
6739
7071
|
}]
|
|
6740
7072
|
},
|
|
7073
|
+
"list-triggers": {
|
|
7074
|
+
serviceClass: "Triggers",
|
|
7075
|
+
operationId: "listTriggers",
|
|
7076
|
+
description: "The project's schedule triggers.",
|
|
7077
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/triggers",
|
|
7078
|
+
httpMethod: "get",
|
|
7079
|
+
pathParams: ["project_id"],
|
|
7080
|
+
queryParams: ["limit", "offset"],
|
|
7081
|
+
flags: [
|
|
7082
|
+
{
|
|
7083
|
+
"name": "project_id",
|
|
7084
|
+
"description": "Project public ID (proj_ prefix).",
|
|
7085
|
+
"required": true,
|
|
7086
|
+
"type": "string",
|
|
7087
|
+
"in": "path"
|
|
7088
|
+
},
|
|
7089
|
+
{
|
|
7090
|
+
"name": "limit",
|
|
7091
|
+
"description": "Maximum items to return (1–100).",
|
|
7092
|
+
"required": false,
|
|
7093
|
+
"type": "integer",
|
|
7094
|
+
"in": "query"
|
|
7095
|
+
},
|
|
7096
|
+
{
|
|
7097
|
+
"name": "offset",
|
|
7098
|
+
"description": "Items to skip. These lists page by offset rather than by naturali's usual opaque cursor because the upstream ordering is offset-based; a cursor here would only imitate a keyset.\n",
|
|
7099
|
+
"required": false,
|
|
7100
|
+
"type": "integer",
|
|
7101
|
+
"in": "query"
|
|
7102
|
+
}
|
|
7103
|
+
]
|
|
7104
|
+
},
|
|
7105
|
+
"create-trigger": {
|
|
7106
|
+
serviceClass: "Triggers",
|
|
7107
|
+
operationId: "createTrigger",
|
|
7108
|
+
description: "Schedules `target_id` (an agent in this project) to run on `cron`, a 5-field cron expression evaluated in UTC.",
|
|
7109
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/triggers",
|
|
7110
|
+
httpMethod: "post",
|
|
7111
|
+
pathParams: ["project_id"],
|
|
7112
|
+
queryParams: [],
|
|
7113
|
+
flags: [
|
|
7114
|
+
{
|
|
7115
|
+
"name": "project_id",
|
|
7116
|
+
"description": "Project public ID (proj_ prefix).",
|
|
7117
|
+
"required": true,
|
|
7118
|
+
"type": "string",
|
|
7119
|
+
"in": "path"
|
|
7120
|
+
},
|
|
7121
|
+
{
|
|
7122
|
+
"name": "name",
|
|
7123
|
+
"description": "",
|
|
7124
|
+
"required": true,
|
|
7125
|
+
"type": "string",
|
|
7126
|
+
"in": "body"
|
|
7127
|
+
},
|
|
7128
|
+
{
|
|
7129
|
+
"name": "description",
|
|
7130
|
+
"description": "",
|
|
7131
|
+
"required": false,
|
|
7132
|
+
"type": "string",
|
|
7133
|
+
"in": "body"
|
|
7134
|
+
},
|
|
7135
|
+
{
|
|
7136
|
+
"name": "target_id",
|
|
7137
|
+
"description": "The agent this trigger runs. Must belong to this project.",
|
|
7138
|
+
"required": true,
|
|
7139
|
+
"type": "string",
|
|
7140
|
+
"in": "body"
|
|
7141
|
+
},
|
|
7142
|
+
{
|
|
7143
|
+
"name": "input",
|
|
7144
|
+
"description": "",
|
|
7145
|
+
"required": false,
|
|
7146
|
+
"type": "object",
|
|
7147
|
+
"in": "body"
|
|
7148
|
+
},
|
|
7149
|
+
{
|
|
7150
|
+
"name": "cron",
|
|
7151
|
+
"description": "5-field cron expression, evaluated in UTC.",
|
|
7152
|
+
"required": true,
|
|
7153
|
+
"type": "string",
|
|
7154
|
+
"in": "body"
|
|
7155
|
+
},
|
|
7156
|
+
{
|
|
7157
|
+
"name": "active",
|
|
7158
|
+
"description": "",
|
|
7159
|
+
"required": false,
|
|
7160
|
+
"type": "boolean",
|
|
7161
|
+
"in": "body"
|
|
7162
|
+
}
|
|
7163
|
+
]
|
|
7164
|
+
},
|
|
7165
|
+
"get-trigger": {
|
|
7166
|
+
serviceClass: "Triggers",
|
|
7167
|
+
operationId: "getTrigger",
|
|
7168
|
+
description: "Get a trigger",
|
|
7169
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/triggers",
|
|
7170
|
+
httpMethod: "get",
|
|
7171
|
+
pathParams: ["project_id", "trigger_id"],
|
|
7172
|
+
queryParams: [],
|
|
7173
|
+
flags: [{
|
|
7174
|
+
"name": "project_id",
|
|
7175
|
+
"description": "Project public ID (proj_ prefix).",
|
|
7176
|
+
"required": true,
|
|
7177
|
+
"type": "string",
|
|
7178
|
+
"in": "path"
|
|
7179
|
+
}, {
|
|
7180
|
+
"name": "trigger_id",
|
|
7181
|
+
"description": "Trigger public ID (trg_ prefix) — the runtime trigger id.",
|
|
7182
|
+
"required": true,
|
|
7183
|
+
"type": "string",
|
|
7184
|
+
"in": "path"
|
|
7185
|
+
}]
|
|
7186
|
+
},
|
|
7187
|
+
"update-trigger": {
|
|
7188
|
+
serviceClass: "Triggers",
|
|
7189
|
+
operationId: "updateTrigger",
|
|
7190
|
+
description: "Retune the schedule, its target, or whether it fires at all. At least one field is required. `type` and `target_type` are immutable.",
|
|
7191
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/triggers",
|
|
7192
|
+
httpMethod: "patch",
|
|
7193
|
+
pathParams: ["project_id", "trigger_id"],
|
|
7194
|
+
queryParams: [],
|
|
7195
|
+
flags: [
|
|
7196
|
+
{
|
|
7197
|
+
"name": "project_id",
|
|
7198
|
+
"description": "Project public ID (proj_ prefix).",
|
|
7199
|
+
"required": true,
|
|
7200
|
+
"type": "string",
|
|
7201
|
+
"in": "path"
|
|
7202
|
+
},
|
|
7203
|
+
{
|
|
7204
|
+
"name": "trigger_id",
|
|
7205
|
+
"description": "Trigger public ID (trg_ prefix) — the runtime trigger id.",
|
|
7206
|
+
"required": true,
|
|
7207
|
+
"type": "string",
|
|
7208
|
+
"in": "path"
|
|
7209
|
+
},
|
|
7210
|
+
{
|
|
7211
|
+
"name": "name",
|
|
7212
|
+
"description": "",
|
|
7213
|
+
"required": false,
|
|
7214
|
+
"type": "string",
|
|
7215
|
+
"in": "body"
|
|
7216
|
+
},
|
|
7217
|
+
{
|
|
7218
|
+
"name": "description",
|
|
7219
|
+
"description": "",
|
|
7220
|
+
"required": false,
|
|
7221
|
+
"type": "string",
|
|
7222
|
+
"in": "body"
|
|
7223
|
+
},
|
|
7224
|
+
{
|
|
7225
|
+
"name": "target_id",
|
|
7226
|
+
"description": "",
|
|
7227
|
+
"required": false,
|
|
7228
|
+
"type": "string",
|
|
7229
|
+
"in": "body"
|
|
7230
|
+
},
|
|
7231
|
+
{
|
|
7232
|
+
"name": "input",
|
|
7233
|
+
"description": "",
|
|
7234
|
+
"required": false,
|
|
7235
|
+
"type": "object",
|
|
7236
|
+
"in": "body"
|
|
7237
|
+
},
|
|
7238
|
+
{
|
|
7239
|
+
"name": "cron",
|
|
7240
|
+
"description": "",
|
|
7241
|
+
"required": false,
|
|
7242
|
+
"type": "string",
|
|
7243
|
+
"in": "body"
|
|
7244
|
+
},
|
|
7245
|
+
{
|
|
7246
|
+
"name": "active",
|
|
7247
|
+
"description": "",
|
|
7248
|
+
"required": false,
|
|
7249
|
+
"type": "boolean",
|
|
7250
|
+
"in": "body"
|
|
7251
|
+
}
|
|
7252
|
+
]
|
|
7253
|
+
},
|
|
7254
|
+
"delete-trigger": {
|
|
7255
|
+
serviceClass: "Triggers",
|
|
7256
|
+
operationId: "deleteTrigger",
|
|
7257
|
+
description: "Removes the trigger. Its firing history is kept.",
|
|
7258
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/triggers",
|
|
7259
|
+
httpMethod: "delete",
|
|
7260
|
+
pathParams: ["project_id", "trigger_id"],
|
|
7261
|
+
queryParams: [],
|
|
7262
|
+
flags: [{
|
|
7263
|
+
"name": "project_id",
|
|
7264
|
+
"description": "Project public ID (proj_ prefix).",
|
|
7265
|
+
"required": true,
|
|
7266
|
+
"type": "string",
|
|
7267
|
+
"in": "path"
|
|
7268
|
+
}, {
|
|
7269
|
+
"name": "trigger_id",
|
|
7270
|
+
"description": "Trigger public ID (trg_ prefix) — the runtime trigger id.",
|
|
7271
|
+
"required": true,
|
|
7272
|
+
"type": "string",
|
|
7273
|
+
"in": "path"
|
|
7274
|
+
}]
|
|
7275
|
+
},
|
|
7276
|
+
"fire-trigger": {
|
|
7277
|
+
serviceClass: "Triggers",
|
|
7278
|
+
operationId: "fireTrigger",
|
|
7279
|
+
description: "Runs the trigger's target right now, outside its schedule, and waits for the run to finish. This is the `…:fire` action; the path segment is `{trigger_id}:fire`. `input` is shallow-merged over the trigger's own stored `input` for this run only — the trigger's configuration is unchanged.",
|
|
7280
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/triggers",
|
|
7281
|
+
httpMethod: "post",
|
|
7282
|
+
pathParams: ["project_id", "trigger_id"],
|
|
7283
|
+
queryParams: [],
|
|
7284
|
+
flags: [
|
|
7285
|
+
{
|
|
7286
|
+
"name": "project_id",
|
|
7287
|
+
"description": "Project public ID (proj_ prefix).",
|
|
7288
|
+
"required": true,
|
|
7289
|
+
"type": "string",
|
|
7290
|
+
"in": "path"
|
|
7291
|
+
},
|
|
7292
|
+
{
|
|
7293
|
+
"name": "trigger_id",
|
|
7294
|
+
"description": "Trigger public ID (trg_ prefix) — the runtime trigger id.",
|
|
7295
|
+
"required": true,
|
|
7296
|
+
"type": "string",
|
|
7297
|
+
"in": "path"
|
|
7298
|
+
},
|
|
7299
|
+
{
|
|
7300
|
+
"name": "input",
|
|
7301
|
+
"description": "Fire-time input, shallow-merged over the trigger's stored `input`.",
|
|
7302
|
+
"required": false,
|
|
7303
|
+
"type": "object",
|
|
7304
|
+
"in": "body"
|
|
7305
|
+
}
|
|
7306
|
+
]
|
|
7307
|
+
},
|
|
7308
|
+
"list-trigger-firings": {
|
|
7309
|
+
serviceClass: "Triggers",
|
|
7310
|
+
operationId: "listTriggerFirings",
|
|
7311
|
+
description: "Every time this trigger ran, newest first — scheduled and manual alike.",
|
|
7312
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/triggers",
|
|
7313
|
+
httpMethod: "get",
|
|
7314
|
+
pathParams: ["project_id", "trigger_id"],
|
|
7315
|
+
queryParams: ["limit", "offset"],
|
|
7316
|
+
flags: [
|
|
7317
|
+
{
|
|
7318
|
+
"name": "project_id",
|
|
7319
|
+
"description": "Project public ID (proj_ prefix).",
|
|
7320
|
+
"required": true,
|
|
7321
|
+
"type": "string",
|
|
7322
|
+
"in": "path"
|
|
7323
|
+
},
|
|
7324
|
+
{
|
|
7325
|
+
"name": "trigger_id",
|
|
7326
|
+
"description": "Trigger public ID (trg_ prefix) — the runtime trigger id.",
|
|
7327
|
+
"required": true,
|
|
7328
|
+
"type": "string",
|
|
7329
|
+
"in": "path"
|
|
7330
|
+
},
|
|
7331
|
+
{
|
|
7332
|
+
"name": "limit",
|
|
7333
|
+
"description": "Maximum items to return (1–100).",
|
|
7334
|
+
"required": false,
|
|
7335
|
+
"type": "integer",
|
|
7336
|
+
"in": "query"
|
|
7337
|
+
},
|
|
7338
|
+
{
|
|
7339
|
+
"name": "offset",
|
|
7340
|
+
"description": "Items to skip. These lists page by offset rather than by naturali's usual opaque cursor because the upstream ordering is offset-based; a cursor here would only imitate a keyset.\n",
|
|
7341
|
+
"required": false,
|
|
7342
|
+
"type": "integer",
|
|
7343
|
+
"in": "query"
|
|
7344
|
+
}
|
|
7345
|
+
]
|
|
7346
|
+
},
|
|
7347
|
+
"get-trigger-firing": {
|
|
7348
|
+
serviceClass: "Triggers",
|
|
7349
|
+
operationId: "getTriggerFiring",
|
|
7350
|
+
description: "Get a trigger firing",
|
|
7351
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/triggers",
|
|
7352
|
+
httpMethod: "get",
|
|
7353
|
+
pathParams: [
|
|
7354
|
+
"project_id",
|
|
7355
|
+
"trigger_id",
|
|
7356
|
+
"firing_id"
|
|
7357
|
+
],
|
|
7358
|
+
queryParams: [],
|
|
7359
|
+
flags: [
|
|
7360
|
+
{
|
|
7361
|
+
"name": "project_id",
|
|
7362
|
+
"description": "Project public ID (proj_ prefix).",
|
|
7363
|
+
"required": true,
|
|
7364
|
+
"type": "string",
|
|
7365
|
+
"in": "path"
|
|
7366
|
+
},
|
|
7367
|
+
{
|
|
7368
|
+
"name": "trigger_id",
|
|
7369
|
+
"description": "Trigger public ID (trg_ prefix) — the runtime trigger id.",
|
|
7370
|
+
"required": true,
|
|
7371
|
+
"type": "string",
|
|
7372
|
+
"in": "path"
|
|
7373
|
+
},
|
|
7374
|
+
{
|
|
7375
|
+
"name": "firing_id",
|
|
7376
|
+
"description": "Firing public ID — the runtime firing id.",
|
|
7377
|
+
"required": true,
|
|
7378
|
+
"type": "string",
|
|
7379
|
+
"in": "path"
|
|
7380
|
+
}
|
|
7381
|
+
]
|
|
7382
|
+
},
|
|
6741
7383
|
"list-webhooks": {
|
|
6742
7384
|
serviceClass: "Webhooks",
|
|
6743
7385
|
operationId: "listWebhooks",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.51.0",
|
|
4
4
|
"description": "Command-line interface for the naturali.ai API, generated from its OpenAPI specs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"tsx": "^4.23.1",
|
|
31
31
|
"typescript": "~6.0.3",
|
|
32
32
|
"vitest": "^4.1.10",
|
|
33
|
-
"@naturali/sdk": "0.
|
|
33
|
+
"@naturali/sdk": "0.51.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"generate": "tsx scripts/generate.ts",
|