@naturali/cli 0.40.1 → 0.42.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 +821 -48
- 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.42.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) };
|
|
@@ -1361,7 +1361,11 @@ var Knowledge = class {
|
|
|
1361
1361
|
/**
|
|
1362
1362
|
* Create a document
|
|
1363
1363
|
*
|
|
1364
|
-
* Add
|
|
1364
|
+
* Add a document to the collection, from **inline text** (`content`) or from an **uploaded file** (`file`, base64, plus `content_type` and `filename`) — exactly one of the two.
|
|
1365
|
+
*
|
|
1366
|
+
* `application/pdf`, `text/plain` and `text/markdown` are extracted natively. Any other media type needs a converter (`POST /v1/projects/{project_id}/knowledge/converters`) registered for it in the project; without one the request is rejected with `unsupported_content_type` and no document is created.
|
|
1367
|
+
*
|
|
1368
|
+
* Ingestion (extract → chunk → embed) runs in the background: the document comes back `pending` and becomes `indexed` or `failed`, which is announced by the `knowledge.document_ingested` / `knowledge.ingest_failed` webhook events.
|
|
1365
1369
|
*
|
|
1366
1370
|
*/
|
|
1367
1371
|
static createKnowledgeDocument(options) {
|
|
@@ -1406,6 +1410,86 @@ var Knowledge = class {
|
|
|
1406
1410
|
...options
|
|
1407
1411
|
});
|
|
1408
1412
|
}
|
|
1413
|
+
/**
|
|
1414
|
+
* List converters
|
|
1415
|
+
*
|
|
1416
|
+
* Lists the media converters registered in the project.
|
|
1417
|
+
*/
|
|
1418
|
+
static listKnowledgeConverters(options) {
|
|
1419
|
+
return (options.client ?? client).get({
|
|
1420
|
+
url: "/v1/projects/{project_id}/knowledge/converters",
|
|
1421
|
+
...options
|
|
1422
|
+
});
|
|
1423
|
+
}
|
|
1424
|
+
/**
|
|
1425
|
+
* Create a converter
|
|
1426
|
+
*
|
|
1427
|
+
* Register a converter for a media type the platform cannot extract natively, so files of that type become ingestable documents like any other. A converter maps a `content_type` glob (`image*`, `audio/mpeg`, …) onto one of two workers:
|
|
1428
|
+
*
|
|
1429
|
+
* - an **agent** (`agent_id`) — the file is handed to a
|
|
1430
|
+
* multimodal model with a fixed "extract all the text" instruction and
|
|
1431
|
+
* its answer becomes the document text. The shortest path for images
|
|
1432
|
+
* and scanned PDFs; nothing to map.
|
|
1433
|
+
*
|
|
1434
|
+
* - a **tool** (`tool_id`) — the file is passed to an
|
|
1435
|
+
* `http` tool as `{ content_type, filename, data_base64 }`, and
|
|
1436
|
+
* whatever string the tool returns becomes the document text. The path
|
|
1437
|
+
* for dedicated non-chat APIs (speech-to-text, a specialist OCR
|
|
1438
|
+
* engine); use the tool's `execute.body_mode: multipart` for
|
|
1439
|
+
* form-data endpoints and its `output_mapping` to reduce a JSON
|
|
1440
|
+
* response to the bare string.
|
|
1441
|
+
*
|
|
1442
|
+
*
|
|
1443
|
+
* Exactly one of `agent_id` / `tool_id`, and one converter per `content_type` in a project.
|
|
1444
|
+
*
|
|
1445
|
+
*/
|
|
1446
|
+
static createKnowledgeConverter(options) {
|
|
1447
|
+
return (options.client ?? client).post({
|
|
1448
|
+
url: "/v1/projects/{project_id}/knowledge/converters",
|
|
1449
|
+
...options,
|
|
1450
|
+
headers: {
|
|
1451
|
+
"Content-Type": "application/json",
|
|
1452
|
+
...options.headers
|
|
1453
|
+
}
|
|
1454
|
+
});
|
|
1455
|
+
}
|
|
1456
|
+
/**
|
|
1457
|
+
* Delete a converter
|
|
1458
|
+
*
|
|
1459
|
+
* Removes the converter. Documents already ingested through it are untouched; new files of that media type stop being ingestable until another converter covers them.
|
|
1460
|
+
*
|
|
1461
|
+
*/
|
|
1462
|
+
static deleteKnowledgeConverter(options) {
|
|
1463
|
+
return (options.client ?? client).delete({
|
|
1464
|
+
url: "/v1/projects/{project_id}/knowledge/converters/{converter_id}",
|
|
1465
|
+
...options
|
|
1466
|
+
});
|
|
1467
|
+
}
|
|
1468
|
+
/**
|
|
1469
|
+
* Get a converter
|
|
1470
|
+
*/
|
|
1471
|
+
static getKnowledgeConverter(options) {
|
|
1472
|
+
return (options.client ?? client).get({
|
|
1473
|
+
url: "/v1/projects/{project_id}/knowledge/converters/{converter_id}",
|
|
1474
|
+
...options
|
|
1475
|
+
});
|
|
1476
|
+
}
|
|
1477
|
+
/**
|
|
1478
|
+
* Update a converter
|
|
1479
|
+
*
|
|
1480
|
+
* Change the worker or the chunking defaults. At least one field is required; `agent_id` and `tool_id` stay mutually exclusive, so setting one clears the other.
|
|
1481
|
+
*
|
|
1482
|
+
*/
|
|
1483
|
+
static updateKnowledgeConverter(options) {
|
|
1484
|
+
return (options.client ?? client).patch({
|
|
1485
|
+
url: "/v1/projects/{project_id}/knowledge/converters/{converter_id}",
|
|
1486
|
+
...options,
|
|
1487
|
+
headers: {
|
|
1488
|
+
"Content-Type": "application/json",
|
|
1489
|
+
...options.headers
|
|
1490
|
+
}
|
|
1491
|
+
});
|
|
1492
|
+
}
|
|
1409
1493
|
};
|
|
1410
1494
|
var Models = class {
|
|
1411
1495
|
/**
|
|
@@ -1850,6 +1934,126 @@ var Traces = class {
|
|
|
1850
1934
|
});
|
|
1851
1935
|
}
|
|
1852
1936
|
};
|
|
1937
|
+
var Webhooks = class {
|
|
1938
|
+
/**
|
|
1939
|
+
* List webhooks
|
|
1940
|
+
*
|
|
1941
|
+
* The endpoints registered in the project, newest first.
|
|
1942
|
+
*/
|
|
1943
|
+
static listWebhooks(options) {
|
|
1944
|
+
return (options.client ?? client).get({
|
|
1945
|
+
url: "/v1/projects/{project_id}/webhooks",
|
|
1946
|
+
...options
|
|
1947
|
+
});
|
|
1948
|
+
}
|
|
1949
|
+
/**
|
|
1950
|
+
* Create a webhook
|
|
1951
|
+
*
|
|
1952
|
+
* Register an endpoint and subscribe it to one or more event types.
|
|
1953
|
+
* The response carries `secret` — the signing key, in plaintext. **This is the only time it is returned.** Store it where your receiver can read it; if you lose it, rotate rather than re-create, so the endpoint keeps its delivery history.
|
|
1954
|
+
* Returns `501` on a deployment with no credential-sealing key configured, since the secret could not then be stored safely.
|
|
1955
|
+
*
|
|
1956
|
+
*/
|
|
1957
|
+
static createWebhook(options) {
|
|
1958
|
+
return (options.client ?? client).post({
|
|
1959
|
+
url: "/v1/projects/{project_id}/webhooks",
|
|
1960
|
+
...options,
|
|
1961
|
+
headers: {
|
|
1962
|
+
"Content-Type": "application/json",
|
|
1963
|
+
...options.headers
|
|
1964
|
+
}
|
|
1965
|
+
});
|
|
1966
|
+
}
|
|
1967
|
+
/**
|
|
1968
|
+
* Delete a webhook
|
|
1969
|
+
*
|
|
1970
|
+
* Removes the endpoint and its delivery records. To stop deliveries while keeping the audit trail, `PATCH` it to `active: false` instead.
|
|
1971
|
+
*
|
|
1972
|
+
*/
|
|
1973
|
+
static deleteWebhook(options) {
|
|
1974
|
+
return (options.client ?? client).delete({
|
|
1975
|
+
url: "/v1/projects/{project_id}/webhooks/{webhook_id}",
|
|
1976
|
+
...options
|
|
1977
|
+
});
|
|
1978
|
+
}
|
|
1979
|
+
/**
|
|
1980
|
+
* Get a webhook
|
|
1981
|
+
*/
|
|
1982
|
+
static getWebhook(options) {
|
|
1983
|
+
return (options.client ?? client).get({
|
|
1984
|
+
url: "/v1/projects/{project_id}/webhooks/{webhook_id}",
|
|
1985
|
+
...options
|
|
1986
|
+
});
|
|
1987
|
+
}
|
|
1988
|
+
/**
|
|
1989
|
+
* Update a webhook
|
|
1990
|
+
*
|
|
1991
|
+
* Change the destination, the subscription, the label, or whether deliveries are attempted at all. At least one field is required.
|
|
1992
|
+
* Setting `active: false` is the reversible half of `DELETE`: deliveries stop, the endpoint and its history stay. It is what to reach for while a receiver is being repaired.
|
|
1993
|
+
*
|
|
1994
|
+
*/
|
|
1995
|
+
static updateWebhook(options) {
|
|
1996
|
+
return (options.client ?? client).patch({
|
|
1997
|
+
url: "/v1/projects/{project_id}/webhooks/{webhook_id}",
|
|
1998
|
+
...options,
|
|
1999
|
+
headers: {
|
|
2000
|
+
"Content-Type": "application/json",
|
|
2001
|
+
...options.headers
|
|
2002
|
+
}
|
|
2003
|
+
});
|
|
2004
|
+
}
|
|
2005
|
+
/**
|
|
2006
|
+
* Rotate the signing secret
|
|
2007
|
+
*
|
|
2008
|
+
* Issues a new signing secret for the same endpoint and returns it — the second and last time a secret is ever returned. This is the `…:rotate-secret` action; the path segment is `{webhook_id}:rotate-secret`.
|
|
2009
|
+
* The change takes effect on the next delivery, including retries of deliveries already queued, so roll the new secret out to your receiver promptly. There is no overlap window in which both secrets verify.
|
|
2010
|
+
*
|
|
2011
|
+
*/
|
|
2012
|
+
static rotateWebhookSecret(options) {
|
|
2013
|
+
return (options.client ?? client).post({
|
|
2014
|
+
url: "/v1/projects/{project_id}/webhooks/{webhook_id}:rotate-secret",
|
|
2015
|
+
...options
|
|
2016
|
+
});
|
|
2017
|
+
}
|
|
2018
|
+
/**
|
|
2019
|
+
* List webhook deliveries
|
|
2020
|
+
*
|
|
2021
|
+
* Every delivery attempted in the project, newest first — what was sent, where, how many times, and what came back. Filter by endpoint, by lifecycle status, or by event type.
|
|
2022
|
+
* Deliveries are per (event, endpoint): an event matching two subscribed endpoints produces two rows, retried and observed independently.
|
|
2023
|
+
*
|
|
2024
|
+
*/
|
|
2025
|
+
static listWebhookDeliveries(options) {
|
|
2026
|
+
return (options.client ?? client).get({
|
|
2027
|
+
url: "/v1/projects/{project_id}/webhook-deliveries",
|
|
2028
|
+
...options
|
|
2029
|
+
});
|
|
2030
|
+
}
|
|
2031
|
+
/**
|
|
2032
|
+
* Get a webhook delivery
|
|
2033
|
+
*
|
|
2034
|
+
* One delivery, including the exact payload that was signed and sent.
|
|
2035
|
+
*
|
|
2036
|
+
*/
|
|
2037
|
+
static getWebhookDelivery(options) {
|
|
2038
|
+
return (options.client ?? client).get({
|
|
2039
|
+
url: "/v1/projects/{project_id}/webhook-deliveries/{delivery_id}",
|
|
2040
|
+
...options
|
|
2041
|
+
});
|
|
2042
|
+
}
|
|
2043
|
+
/**
|
|
2044
|
+
* Redeliver an event
|
|
2045
|
+
*
|
|
2046
|
+
* Queue the same event at the same endpoint again — the recovery path for a delivery that failed, or one your receiver dropped. This is the `…:redeliver` action; the path segment is `{delivery_id}:redeliver`.
|
|
2047
|
+
* A **new** delivery is created and returned; the original record is left untouched, because its attempt history is the evidence you redelivered on. The event's `id` is carried over unchanged, so a receiver deduping on the event sees the same event twice while one deduping on `X-Naturali-Delivery` sees a distinct delivery.
|
|
2048
|
+
*
|
|
2049
|
+
*/
|
|
2050
|
+
static redeliverWebhookDelivery(options) {
|
|
2051
|
+
return (options.client ?? client).post({
|
|
2052
|
+
url: "/v1/projects/{project_id}/webhook-deliveries/{delivery_id}:redeliver",
|
|
2053
|
+
...options
|
|
2054
|
+
});
|
|
2055
|
+
}
|
|
2056
|
+
};
|
|
1853
2057
|
//#endregion
|
|
1854
2058
|
//#region ../sdk/src/naturaliClient.ts
|
|
1855
2059
|
/**
|
|
@@ -1912,6 +2116,7 @@ var NaturaliClient = class {
|
|
|
1912
2116
|
tasks;
|
|
1913
2117
|
tools;
|
|
1914
2118
|
traces;
|
|
2119
|
+
webhooks;
|
|
1915
2120
|
/** The underlying HTTP client, for interceptors or one-off requests. */
|
|
1916
2121
|
http;
|
|
1917
2122
|
constructor({ token, headers } = {}) {
|
|
@@ -1937,6 +2142,7 @@ var NaturaliClient = class {
|
|
|
1937
2142
|
this.tasks = bindResource(Tasks, this.http);
|
|
1938
2143
|
this.tools = bindResource(Tools, this.http);
|
|
1939
2144
|
this.traces = bindResource(Traces, this.http);
|
|
2145
|
+
this.webhooks = bindResource(Webhooks, this.http);
|
|
1940
2146
|
}
|
|
1941
2147
|
};
|
|
1942
2148
|
//#endregion
|
|
@@ -1958,6 +2164,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
1958
2164
|
Tasks: () => Tasks,
|
|
1959
2165
|
Tools: () => Tools,
|
|
1960
2166
|
Traces: () => Traces,
|
|
2167
|
+
Webhooks: () => Webhooks,
|
|
1961
2168
|
createClient: () => createClient,
|
|
1962
2169
|
createConfig: () => createConfig
|
|
1963
2170
|
});
|
|
@@ -4266,7 +4473,7 @@ const routes = {
|
|
|
4266
4473
|
"create-knowledge-document": {
|
|
4267
4474
|
serviceClass: "Knowledge",
|
|
4268
4475
|
operationId: "createKnowledgeDocument",
|
|
4269
|
-
description: "Add
|
|
4476
|
+
description: "Add a document to the collection, from **inline text** (`content`) or from an **uploaded file** (`file`, base64, plus `content_type` and `filename`) — exactly one of the two. `application/pdf`, `text/plain` and `text/markdown` are extracted natively. Any other media type needs a converter (`POST /v1/projects/{project_id}/knowledge/converters`) registered for it in the project; without one the request is rejected with `unsupported_content_type` and no document is created. Ingestion (extract → chunk → embed) runs in the background: the document comes back `pending` and becomes `indexed` or `failed`, which is announced by the `knowledge.document_ingested` / `knowledge.ingest_failed` webhook events.",
|
|
4270
4477
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/knowledge",
|
|
4271
4478
|
httpMethod: "post",
|
|
4272
4479
|
pathParams: ["project_id", "collection_id"],
|
|
@@ -4288,14 +4495,28 @@ const routes = {
|
|
|
4288
4495
|
},
|
|
4289
4496
|
{
|
|
4290
4497
|
"name": "content",
|
|
4291
|
-
"description": "The document's text content.",
|
|
4292
|
-
"required":
|
|
4498
|
+
"description": "The document's text content. Mutually exclusive with `file`.",
|
|
4499
|
+
"required": false,
|
|
4500
|
+
"type": "string",
|
|
4501
|
+
"in": "body"
|
|
4502
|
+
},
|
|
4503
|
+
{
|
|
4504
|
+
"name": "file",
|
|
4505
|
+
"description": "The file's bytes, base64-encoded. Mutually exclusive with `content`.\n",
|
|
4506
|
+
"required": false,
|
|
4507
|
+
"type": "string",
|
|
4508
|
+
"in": "body"
|
|
4509
|
+
},
|
|
4510
|
+
{
|
|
4511
|
+
"name": "content_type",
|
|
4512
|
+
"description": "Media type of `file`. `application/pdf`, `text/plain` and `text/markdown` are extracted natively; anything else needs a matching converter in the project. Required with `file`.\n",
|
|
4513
|
+
"required": false,
|
|
4293
4514
|
"type": "string",
|
|
4294
4515
|
"in": "body"
|
|
4295
4516
|
},
|
|
4296
4517
|
{
|
|
4297
4518
|
"name": "filename",
|
|
4298
|
-
"description": "A label for the document; also its logical filename.",
|
|
4519
|
+
"description": "A label for the document; also its logical filename. Required with `file`.\n",
|
|
4299
4520
|
"required": false,
|
|
4300
4521
|
"type": "string",
|
|
4301
4522
|
"in": "body"
|
|
@@ -4306,6 +4527,27 @@ const routes = {
|
|
|
4306
4527
|
"required": false,
|
|
4307
4528
|
"type": "string",
|
|
4308
4529
|
"in": "body"
|
|
4530
|
+
},
|
|
4531
|
+
{
|
|
4532
|
+
"name": "chunk_strategy",
|
|
4533
|
+
"description": "How the extracted text is split for embedding. `page` (the default) makes one chunk per page, which is what lets a retrieved chunk cite a page number; `size` makes fixed-width character windows, which retrieves more sharply on dense pages at the cost of that citation; `whole` keeps the document as a single chunk. Ignored for inline text.\n",
|
|
4534
|
+
"required": false,
|
|
4535
|
+
"type": "string",
|
|
4536
|
+
"in": "body"
|
|
4537
|
+
},
|
|
4538
|
+
{
|
|
4539
|
+
"name": "chunk_size",
|
|
4540
|
+
"description": "Window width in characters, when `chunk_strategy` is `size`.",
|
|
4541
|
+
"required": false,
|
|
4542
|
+
"type": "integer",
|
|
4543
|
+
"in": "body"
|
|
4544
|
+
},
|
|
4545
|
+
{
|
|
4546
|
+
"name": "chunk_overlap",
|
|
4547
|
+
"description": "Characters of overlap between consecutive windows, when `chunk_strategy` is `size`. Must be smaller than `chunk_size`.\n",
|
|
4548
|
+
"required": false,
|
|
4549
|
+
"type": "integer",
|
|
4550
|
+
"in": "body"
|
|
4309
4551
|
}
|
|
4310
4552
|
]
|
|
4311
4553
|
},
|
|
@@ -4417,23 +4659,22 @@ const routes = {
|
|
|
4417
4659
|
}
|
|
4418
4660
|
]
|
|
4419
4661
|
},
|
|
4420
|
-
"list-
|
|
4421
|
-
serviceClass: "
|
|
4422
|
-
operationId: "
|
|
4423
|
-
description: "Lists
|
|
4424
|
-
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/
|
|
4662
|
+
"list-knowledge-converters": {
|
|
4663
|
+
serviceClass: "Knowledge",
|
|
4664
|
+
operationId: "listKnowledgeConverters",
|
|
4665
|
+
description: "Lists the media converters registered in the project.",
|
|
4666
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/knowledge",
|
|
4425
4667
|
httpMethod: "get",
|
|
4426
|
-
pathParams: [],
|
|
4427
|
-
queryParams: [
|
|
4428
|
-
"limit",
|
|
4429
|
-
"cursor",
|
|
4430
|
-
"vendor",
|
|
4431
|
-
"provider",
|
|
4432
|
-
"modality",
|
|
4433
|
-
"status",
|
|
4434
|
-
"managed"
|
|
4435
|
-
],
|
|
4668
|
+
pathParams: ["project_id"],
|
|
4669
|
+
queryParams: ["limit", "cursor"],
|
|
4436
4670
|
flags: [
|
|
4671
|
+
{
|
|
4672
|
+
"name": "project_id",
|
|
4673
|
+
"description": "Project public ID (proj_ prefix).",
|
|
4674
|
+
"required": true,
|
|
4675
|
+
"type": "string",
|
|
4676
|
+
"in": "path"
|
|
4677
|
+
},
|
|
4437
4678
|
{
|
|
4438
4679
|
"name": "limit",
|
|
4439
4680
|
"description": "Maximum items per page.",
|
|
@@ -4447,61 +4688,293 @@ const routes = {
|
|
|
4447
4688
|
"required": false,
|
|
4448
4689
|
"type": "string",
|
|
4449
4690
|
"in": "query"
|
|
4691
|
+
}
|
|
4692
|
+
]
|
|
4693
|
+
},
|
|
4694
|
+
"create-knowledge-converter": {
|
|
4695
|
+
serviceClass: "Knowledge",
|
|
4696
|
+
operationId: "createKnowledgeConverter",
|
|
4697
|
+
description: "Register a converter for a media type the platform cannot extract natively, so files of that type become ingestable documents like any other. A converter maps a `content_type` glob (`image/*`, `audio/mpeg`, …) onto one of two workers: - an **agent** (`agent_id`) — the file is handed to a multimodal model with a fixed \"extract all the text\" instruction and its answer becomes the document text. The shortest path for images and scanned PDFs; nothing to map. - a **tool** (`tool_id`) — the file is passed to an `http` tool as `{ content_type, filename, data_base64 }`, and whatever string the tool returns becomes the document text. The path for dedicated non-chat APIs (speech-to-text, a specialist OCR engine); use the tool's `execute.body_mode: multipart` for form-data endpoints and its `output_mapping` to reduce a JSON response to the bare string. Exactly one of `agent_id` / `tool_id`, and one converter per `content_type` in a project.",
|
|
4698
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/knowledge",
|
|
4699
|
+
httpMethod: "post",
|
|
4700
|
+
pathParams: ["project_id"],
|
|
4701
|
+
queryParams: [],
|
|
4702
|
+
flags: [
|
|
4703
|
+
{
|
|
4704
|
+
"name": "project_id",
|
|
4705
|
+
"description": "Project public ID (proj_ prefix).",
|
|
4706
|
+
"required": true,
|
|
4707
|
+
"type": "string",
|
|
4708
|
+
"in": "path"
|
|
4450
4709
|
},
|
|
4451
4710
|
{
|
|
4452
|
-
"name": "
|
|
4453
|
-
"description": "
|
|
4711
|
+
"name": "content_type",
|
|
4712
|
+
"description": "The media-type glob to claim — an exact type (`audio/mpeg`) or a `*` wildcard on the subtype (`image/*`).\n",
|
|
4713
|
+
"required": true,
|
|
4714
|
+
"type": "string",
|
|
4715
|
+
"in": "body"
|
|
4716
|
+
},
|
|
4717
|
+
{
|
|
4718
|
+
"name": "agent_id",
|
|
4719
|
+
"description": "An agent in this project, used as the converter.",
|
|
4454
4720
|
"required": false,
|
|
4455
4721
|
"type": "string",
|
|
4456
|
-
"in": "
|
|
4722
|
+
"in": "body"
|
|
4457
4723
|
},
|
|
4458
4724
|
{
|
|
4459
|
-
"name": "
|
|
4460
|
-
"description": "
|
|
4725
|
+
"name": "tool_id",
|
|
4726
|
+
"description": "An `http` tool in this project, used as the converter.",
|
|
4461
4727
|
"required": false,
|
|
4462
4728
|
"type": "string",
|
|
4463
|
-
"in": "
|
|
4729
|
+
"in": "body"
|
|
4464
4730
|
},
|
|
4465
4731
|
{
|
|
4466
|
-
"name": "
|
|
4467
|
-
"description": "
|
|
4732
|
+
"name": "preset_parameters",
|
|
4733
|
+
"description": "Fixed arguments merged into every tool-converter call.",
|
|
4734
|
+
"required": false,
|
|
4735
|
+
"type": "object",
|
|
4736
|
+
"in": "body"
|
|
4737
|
+
},
|
|
4738
|
+
{
|
|
4739
|
+
"name": "native_extraction",
|
|
4740
|
+
"description": "",
|
|
4468
4741
|
"required": false,
|
|
4469
4742
|
"type": "string",
|
|
4470
|
-
"in": "
|
|
4743
|
+
"in": "body"
|
|
4471
4744
|
},
|
|
4472
4745
|
{
|
|
4473
|
-
"name": "
|
|
4474
|
-
"description": "
|
|
4746
|
+
"name": "chunk_strategy",
|
|
4747
|
+
"description": "",
|
|
4475
4748
|
"required": false,
|
|
4476
4749
|
"type": "string",
|
|
4477
|
-
"in": "
|
|
4750
|
+
"in": "body"
|
|
4478
4751
|
},
|
|
4479
4752
|
{
|
|
4480
|
-
"name": "
|
|
4481
|
-
"description": "
|
|
4753
|
+
"name": "chunk_size",
|
|
4754
|
+
"description": "",
|
|
4482
4755
|
"required": false,
|
|
4483
|
-
"type": "
|
|
4484
|
-
"in": "
|
|
4756
|
+
"type": "integer",
|
|
4757
|
+
"in": "body"
|
|
4758
|
+
},
|
|
4759
|
+
{
|
|
4760
|
+
"name": "chunk_overlap",
|
|
4761
|
+
"description": "",
|
|
4762
|
+
"required": false,
|
|
4763
|
+
"type": "integer",
|
|
4764
|
+
"in": "body"
|
|
4485
4765
|
}
|
|
4486
4766
|
]
|
|
4487
4767
|
},
|
|
4488
|
-
"get-
|
|
4489
|
-
serviceClass: "
|
|
4490
|
-
operationId: "
|
|
4491
|
-
description: "Get a
|
|
4492
|
-
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/
|
|
4768
|
+
"get-knowledge-converter": {
|
|
4769
|
+
serviceClass: "Knowledge",
|
|
4770
|
+
operationId: "getKnowledgeConverter",
|
|
4771
|
+
description: "Get a converter",
|
|
4772
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/knowledge",
|
|
4493
4773
|
httpMethod: "get",
|
|
4494
|
-
pathParams: ["
|
|
4774
|
+
pathParams: ["project_id", "converter_id"],
|
|
4495
4775
|
queryParams: [],
|
|
4496
4776
|
flags: [{
|
|
4497
|
-
"name": "
|
|
4498
|
-
"description": "
|
|
4777
|
+
"name": "project_id",
|
|
4778
|
+
"description": "Project public ID (proj_ prefix).",
|
|
4499
4779
|
"required": true,
|
|
4500
4780
|
"type": "string",
|
|
4501
4781
|
"in": "path"
|
|
4502
|
-
}
|
|
4503
|
-
|
|
4504
|
-
|
|
4782
|
+
}, {
|
|
4783
|
+
"name": "converter_id",
|
|
4784
|
+
"description": "Knowledge converter public ID (igr_ prefix).",
|
|
4785
|
+
"required": true,
|
|
4786
|
+
"type": "string",
|
|
4787
|
+
"in": "path"
|
|
4788
|
+
}]
|
|
4789
|
+
},
|
|
4790
|
+
"update-knowledge-converter": {
|
|
4791
|
+
serviceClass: "Knowledge",
|
|
4792
|
+
operationId: "updateKnowledgeConverter",
|
|
4793
|
+
description: "Change the worker or the chunking defaults. At least one field is required; `agent_id` and `tool_id` stay mutually exclusive, so setting one clears the other.",
|
|
4794
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/knowledge",
|
|
4795
|
+
httpMethod: "patch",
|
|
4796
|
+
pathParams: ["project_id", "converter_id"],
|
|
4797
|
+
queryParams: [],
|
|
4798
|
+
flags: [
|
|
4799
|
+
{
|
|
4800
|
+
"name": "project_id",
|
|
4801
|
+
"description": "Project public ID (proj_ prefix).",
|
|
4802
|
+
"required": true,
|
|
4803
|
+
"type": "string",
|
|
4804
|
+
"in": "path"
|
|
4805
|
+
},
|
|
4806
|
+
{
|
|
4807
|
+
"name": "converter_id",
|
|
4808
|
+
"description": "Knowledge converter public ID (igr_ prefix).",
|
|
4809
|
+
"required": true,
|
|
4810
|
+
"type": "string",
|
|
4811
|
+
"in": "path"
|
|
4812
|
+
},
|
|
4813
|
+
{
|
|
4814
|
+
"name": "content_type",
|
|
4815
|
+
"description": "",
|
|
4816
|
+
"required": false,
|
|
4817
|
+
"type": "string",
|
|
4818
|
+
"in": "body"
|
|
4819
|
+
},
|
|
4820
|
+
{
|
|
4821
|
+
"name": "agent_id",
|
|
4822
|
+
"description": "Switches the converter to this agent, clearing `tool_id`.",
|
|
4823
|
+
"required": false,
|
|
4824
|
+
"type": "string",
|
|
4825
|
+
"in": "body"
|
|
4826
|
+
},
|
|
4827
|
+
{
|
|
4828
|
+
"name": "tool_id",
|
|
4829
|
+
"description": "Switches the converter to this tool, clearing `agent_id`.",
|
|
4830
|
+
"required": false,
|
|
4831
|
+
"type": "string",
|
|
4832
|
+
"in": "body"
|
|
4833
|
+
},
|
|
4834
|
+
{
|
|
4835
|
+
"name": "preset_parameters",
|
|
4836
|
+
"description": "",
|
|
4837
|
+
"required": false,
|
|
4838
|
+
"type": "object",
|
|
4839
|
+
"in": "body"
|
|
4840
|
+
},
|
|
4841
|
+
{
|
|
4842
|
+
"name": "native_extraction",
|
|
4843
|
+
"description": "",
|
|
4844
|
+
"required": false,
|
|
4845
|
+
"type": "string",
|
|
4846
|
+
"in": "body"
|
|
4847
|
+
},
|
|
4848
|
+
{
|
|
4849
|
+
"name": "chunk_strategy",
|
|
4850
|
+
"description": "",
|
|
4851
|
+
"required": false,
|
|
4852
|
+
"type": "string",
|
|
4853
|
+
"in": "body"
|
|
4854
|
+
},
|
|
4855
|
+
{
|
|
4856
|
+
"name": "chunk_size",
|
|
4857
|
+
"description": "",
|
|
4858
|
+
"required": false,
|
|
4859
|
+
"type": "integer",
|
|
4860
|
+
"in": "body"
|
|
4861
|
+
},
|
|
4862
|
+
{
|
|
4863
|
+
"name": "chunk_overlap",
|
|
4864
|
+
"description": "",
|
|
4865
|
+
"required": false,
|
|
4866
|
+
"type": "integer",
|
|
4867
|
+
"in": "body"
|
|
4868
|
+
}
|
|
4869
|
+
]
|
|
4870
|
+
},
|
|
4871
|
+
"delete-knowledge-converter": {
|
|
4872
|
+
serviceClass: "Knowledge",
|
|
4873
|
+
operationId: "deleteKnowledgeConverter",
|
|
4874
|
+
description: "Removes the converter. Documents already ingested through it are untouched; new files of that media type stop being ingestable until another converter covers them.",
|
|
4875
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/knowledge",
|
|
4876
|
+
httpMethod: "delete",
|
|
4877
|
+
pathParams: ["project_id", "converter_id"],
|
|
4878
|
+
queryParams: [],
|
|
4879
|
+
flags: [{
|
|
4880
|
+
"name": "project_id",
|
|
4881
|
+
"description": "Project public ID (proj_ prefix).",
|
|
4882
|
+
"required": true,
|
|
4883
|
+
"type": "string",
|
|
4884
|
+
"in": "path"
|
|
4885
|
+
}, {
|
|
4886
|
+
"name": "converter_id",
|
|
4887
|
+
"description": "Knowledge converter public ID (igr_ prefix).",
|
|
4888
|
+
"required": true,
|
|
4889
|
+
"type": "string",
|
|
4890
|
+
"in": "path"
|
|
4891
|
+
}]
|
|
4892
|
+
},
|
|
4893
|
+
"list-models": {
|
|
4894
|
+
serviceClass: "Models",
|
|
4895
|
+
operationId: "listModels",
|
|
4896
|
+
description: "Lists catalog models, newest sources merged and sorted by id. Filter by vendor, provider, output/input modality or status.",
|
|
4897
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/models",
|
|
4898
|
+
httpMethod: "get",
|
|
4899
|
+
pathParams: [],
|
|
4900
|
+
queryParams: [
|
|
4901
|
+
"limit",
|
|
4902
|
+
"cursor",
|
|
4903
|
+
"vendor",
|
|
4904
|
+
"provider",
|
|
4905
|
+
"modality",
|
|
4906
|
+
"status",
|
|
4907
|
+
"managed"
|
|
4908
|
+
],
|
|
4909
|
+
flags: [
|
|
4910
|
+
{
|
|
4911
|
+
"name": "limit",
|
|
4912
|
+
"description": "Maximum items per page.",
|
|
4913
|
+
"required": false,
|
|
4914
|
+
"type": "integer",
|
|
4915
|
+
"in": "query"
|
|
4916
|
+
},
|
|
4917
|
+
{
|
|
4918
|
+
"name": "cursor",
|
|
4919
|
+
"description": "Opaque pagination cursor from a previous response's next_cursor.",
|
|
4920
|
+
"required": false,
|
|
4921
|
+
"type": "string",
|
|
4922
|
+
"in": "query"
|
|
4923
|
+
},
|
|
4924
|
+
{
|
|
4925
|
+
"name": "vendor",
|
|
4926
|
+
"description": "Filter by model maker (e.g. anthropic, amazon, meta).",
|
|
4927
|
+
"required": false,
|
|
4928
|
+
"type": "string",
|
|
4929
|
+
"in": "query"
|
|
4930
|
+
},
|
|
4931
|
+
{
|
|
4932
|
+
"name": "provider",
|
|
4933
|
+
"description": "Filter by the provider slug that serves the model.",
|
|
4934
|
+
"required": false,
|
|
4935
|
+
"type": "string",
|
|
4936
|
+
"in": "query"
|
|
4937
|
+
},
|
|
4938
|
+
{
|
|
4939
|
+
"name": "modality",
|
|
4940
|
+
"description": "Filter to models whose input or output modalities include this value (e.g. text, image, embedding, speech).\n",
|
|
4941
|
+
"required": false,
|
|
4942
|
+
"type": "string",
|
|
4943
|
+
"in": "query"
|
|
4944
|
+
},
|
|
4945
|
+
{
|
|
4946
|
+
"name": "status",
|
|
4947
|
+
"description": "Filter by lifecycle status.",
|
|
4948
|
+
"required": false,
|
|
4949
|
+
"type": "string",
|
|
4950
|
+
"in": "query"
|
|
4951
|
+
},
|
|
4952
|
+
{
|
|
4953
|
+
"name": "managed",
|
|
4954
|
+
"description": "Filter by whether the model can back a managed provider — `managed=true` is the set you can pass to `POST /v1/projects/{project_id}/providers` with `kind: managed`. Omit to leave the catalog unfiltered on this axis; `false` returns only the BYOK-only models. Any other value is a 400.\n",
|
|
4955
|
+
"required": false,
|
|
4956
|
+
"type": "boolean",
|
|
4957
|
+
"in": "query"
|
|
4958
|
+
}
|
|
4959
|
+
]
|
|
4960
|
+
},
|
|
4961
|
+
"get-model": {
|
|
4962
|
+
serviceClass: "Models",
|
|
4963
|
+
operationId: "getModel",
|
|
4964
|
+
description: "Get a model",
|
|
4965
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/models",
|
|
4966
|
+
httpMethod: "get",
|
|
4967
|
+
pathParams: ["model_id"],
|
|
4968
|
+
queryParams: [],
|
|
4969
|
+
flags: [{
|
|
4970
|
+
"name": "model_id",
|
|
4971
|
+
"description": "Public model id.",
|
|
4972
|
+
"required": true,
|
|
4973
|
+
"type": "string",
|
|
4974
|
+
"in": "path"
|
|
4975
|
+
}]
|
|
4976
|
+
},
|
|
4977
|
+
"list-projects": {
|
|
4505
4978
|
serviceClass: "Projects",
|
|
4506
4979
|
operationId: "listProjects",
|
|
4507
4980
|
description: "Lists projects accessible to the caller.",
|
|
@@ -5747,6 +6220,306 @@ const routes = {
|
|
|
5747
6220
|
"in": "query"
|
|
5748
6221
|
}
|
|
5749
6222
|
]
|
|
6223
|
+
},
|
|
6224
|
+
"list-webhooks": {
|
|
6225
|
+
serviceClass: "Webhooks",
|
|
6226
|
+
operationId: "listWebhooks",
|
|
6227
|
+
description: "The endpoints registered in the project, newest first.",
|
|
6228
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/webhooks",
|
|
6229
|
+
httpMethod: "get",
|
|
6230
|
+
pathParams: ["project_id"],
|
|
6231
|
+
queryParams: ["limit", "cursor"],
|
|
6232
|
+
flags: [
|
|
6233
|
+
{
|
|
6234
|
+
"name": "project_id",
|
|
6235
|
+
"description": "Project public ID (proj_ prefix).",
|
|
6236
|
+
"required": true,
|
|
6237
|
+
"type": "string",
|
|
6238
|
+
"in": "path"
|
|
6239
|
+
},
|
|
6240
|
+
{
|
|
6241
|
+
"name": "limit",
|
|
6242
|
+
"description": "Maximum items per page.",
|
|
6243
|
+
"required": false,
|
|
6244
|
+
"type": "integer",
|
|
6245
|
+
"in": "query"
|
|
6246
|
+
},
|
|
6247
|
+
{
|
|
6248
|
+
"name": "cursor",
|
|
6249
|
+
"description": "Opaque pagination cursor from a previous response's next_cursor.",
|
|
6250
|
+
"required": false,
|
|
6251
|
+
"type": "string",
|
|
6252
|
+
"in": "query"
|
|
6253
|
+
}
|
|
6254
|
+
]
|
|
6255
|
+
},
|
|
6256
|
+
"create-webhook": {
|
|
6257
|
+
serviceClass: "Webhooks",
|
|
6258
|
+
operationId: "createWebhook",
|
|
6259
|
+
description: "Register an endpoint and subscribe it to one or more event types. The response carries `secret` — the signing key, in plaintext. **This is the only time it is returned.** Store it where your receiver can read it; if you lose it, rotate rather than re-create, so the endpoint keeps its delivery history. Returns `501` on a deployment with no credential-sealing key configured, since the secret could not then be stored safely.",
|
|
6260
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/webhooks",
|
|
6261
|
+
httpMethod: "post",
|
|
6262
|
+
pathParams: ["project_id"],
|
|
6263
|
+
queryParams: [],
|
|
6264
|
+
flags: [
|
|
6265
|
+
{
|
|
6266
|
+
"name": "project_id",
|
|
6267
|
+
"description": "Project public ID (proj_ prefix).",
|
|
6268
|
+
"required": true,
|
|
6269
|
+
"type": "string",
|
|
6270
|
+
"in": "path"
|
|
6271
|
+
},
|
|
6272
|
+
{
|
|
6273
|
+
"name": "url",
|
|
6274
|
+
"description": "An `https://` endpoint (`http://` is accepted for localhost, so a tunnel works in development).\n",
|
|
6275
|
+
"required": true,
|
|
6276
|
+
"type": "string",
|
|
6277
|
+
"in": "body"
|
|
6278
|
+
},
|
|
6279
|
+
{
|
|
6280
|
+
"name": "events",
|
|
6281
|
+
"description": "Which events this endpoint receives. Each entry is an exact type (`task.created`), a resource wildcard (`task.*`), or `*` for everything. A bare resource name (`task`) matches nothing and is rejected.\n",
|
|
6282
|
+
"required": true,
|
|
6283
|
+
"type": "array",
|
|
6284
|
+
"in": "body"
|
|
6285
|
+
},
|
|
6286
|
+
{
|
|
6287
|
+
"name": "description",
|
|
6288
|
+
"description": "",
|
|
6289
|
+
"required": false,
|
|
6290
|
+
"type": "string",
|
|
6291
|
+
"in": "body"
|
|
6292
|
+
},
|
|
6293
|
+
{
|
|
6294
|
+
"name": "active",
|
|
6295
|
+
"description": "",
|
|
6296
|
+
"required": false,
|
|
6297
|
+
"type": "boolean",
|
|
6298
|
+
"in": "body"
|
|
6299
|
+
}
|
|
6300
|
+
]
|
|
6301
|
+
},
|
|
6302
|
+
"get-webhook": {
|
|
6303
|
+
serviceClass: "Webhooks",
|
|
6304
|
+
operationId: "getWebhook",
|
|
6305
|
+
description: "Get a webhook",
|
|
6306
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/webhooks",
|
|
6307
|
+
httpMethod: "get",
|
|
6308
|
+
pathParams: ["project_id", "webhook_id"],
|
|
6309
|
+
queryParams: [],
|
|
6310
|
+
flags: [{
|
|
6311
|
+
"name": "project_id",
|
|
6312
|
+
"description": "Project public ID (proj_ prefix).",
|
|
6313
|
+
"required": true,
|
|
6314
|
+
"type": "string",
|
|
6315
|
+
"in": "path"
|
|
6316
|
+
}, {
|
|
6317
|
+
"name": "webhook_id",
|
|
6318
|
+
"description": "Webhook public ID (whk_ prefix).",
|
|
6319
|
+
"required": true,
|
|
6320
|
+
"type": "string",
|
|
6321
|
+
"in": "path"
|
|
6322
|
+
}]
|
|
6323
|
+
},
|
|
6324
|
+
"update-webhook": {
|
|
6325
|
+
serviceClass: "Webhooks",
|
|
6326
|
+
operationId: "updateWebhook",
|
|
6327
|
+
description: "Change the destination, the subscription, the label, or whether deliveries are attempted at all. At least one field is required. Setting `active: false` is the reversible half of `DELETE`: deliveries stop, the endpoint and its history stay. It is what to reach for while a receiver is being repaired.",
|
|
6328
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/webhooks",
|
|
6329
|
+
httpMethod: "patch",
|
|
6330
|
+
pathParams: ["project_id", "webhook_id"],
|
|
6331
|
+
queryParams: [],
|
|
6332
|
+
flags: [
|
|
6333
|
+
{
|
|
6334
|
+
"name": "project_id",
|
|
6335
|
+
"description": "Project public ID (proj_ prefix).",
|
|
6336
|
+
"required": true,
|
|
6337
|
+
"type": "string",
|
|
6338
|
+
"in": "path"
|
|
6339
|
+
},
|
|
6340
|
+
{
|
|
6341
|
+
"name": "webhook_id",
|
|
6342
|
+
"description": "Webhook public ID (whk_ prefix).",
|
|
6343
|
+
"required": true,
|
|
6344
|
+
"type": "string",
|
|
6345
|
+
"in": "path"
|
|
6346
|
+
},
|
|
6347
|
+
{
|
|
6348
|
+
"name": "url",
|
|
6349
|
+
"description": "",
|
|
6350
|
+
"required": false,
|
|
6351
|
+
"type": "string",
|
|
6352
|
+
"in": "body"
|
|
6353
|
+
},
|
|
6354
|
+
{
|
|
6355
|
+
"name": "events",
|
|
6356
|
+
"description": "Which events this endpoint receives. Each entry is an exact type (`task.created`), a resource wildcard (`task.*`), or `*` for everything. A bare resource name (`task`) matches nothing and is rejected.\n",
|
|
6357
|
+
"required": false,
|
|
6358
|
+
"type": "array",
|
|
6359
|
+
"in": "body"
|
|
6360
|
+
},
|
|
6361
|
+
{
|
|
6362
|
+
"name": "description",
|
|
6363
|
+
"description": "",
|
|
6364
|
+
"required": false,
|
|
6365
|
+
"type": "string",
|
|
6366
|
+
"in": "body"
|
|
6367
|
+
},
|
|
6368
|
+
{
|
|
6369
|
+
"name": "active",
|
|
6370
|
+
"description": "",
|
|
6371
|
+
"required": false,
|
|
6372
|
+
"type": "boolean",
|
|
6373
|
+
"in": "body"
|
|
6374
|
+
}
|
|
6375
|
+
]
|
|
6376
|
+
},
|
|
6377
|
+
"delete-webhook": {
|
|
6378
|
+
serviceClass: "Webhooks",
|
|
6379
|
+
operationId: "deleteWebhook",
|
|
6380
|
+
description: "Removes the endpoint and its delivery records. To stop deliveries while keeping the audit trail, `PATCH` it to `active: false` instead.",
|
|
6381
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/webhooks",
|
|
6382
|
+
httpMethod: "delete",
|
|
6383
|
+
pathParams: ["project_id", "webhook_id"],
|
|
6384
|
+
queryParams: [],
|
|
6385
|
+
flags: [{
|
|
6386
|
+
"name": "project_id",
|
|
6387
|
+
"description": "Project public ID (proj_ prefix).",
|
|
6388
|
+
"required": true,
|
|
6389
|
+
"type": "string",
|
|
6390
|
+
"in": "path"
|
|
6391
|
+
}, {
|
|
6392
|
+
"name": "webhook_id",
|
|
6393
|
+
"description": "Webhook public ID (whk_ prefix).",
|
|
6394
|
+
"required": true,
|
|
6395
|
+
"type": "string",
|
|
6396
|
+
"in": "path"
|
|
6397
|
+
}]
|
|
6398
|
+
},
|
|
6399
|
+
"rotate-webhook-secret": {
|
|
6400
|
+
serviceClass: "Webhooks",
|
|
6401
|
+
operationId: "rotateWebhookSecret",
|
|
6402
|
+
description: "Issues a new signing secret for the same endpoint and returns it — the second and last time a secret is ever returned. This is the `…:rotate-secret` action; the path segment is `{webhook_id}:rotate-secret`. The change takes effect on the next delivery, including retries of deliveries already queued, so roll the new secret out to your receiver promptly. There is no overlap window in which both secrets verify.",
|
|
6403
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/webhooks",
|
|
6404
|
+
httpMethod: "post",
|
|
6405
|
+
pathParams: ["project_id", "webhook_id"],
|
|
6406
|
+
queryParams: [],
|
|
6407
|
+
flags: [{
|
|
6408
|
+
"name": "project_id",
|
|
6409
|
+
"description": "Project public ID (proj_ prefix).",
|
|
6410
|
+
"required": true,
|
|
6411
|
+
"type": "string",
|
|
6412
|
+
"in": "path"
|
|
6413
|
+
}, {
|
|
6414
|
+
"name": "webhook_id",
|
|
6415
|
+
"description": "Webhook public ID (whk_ prefix).",
|
|
6416
|
+
"required": true,
|
|
6417
|
+
"type": "string",
|
|
6418
|
+
"in": "path"
|
|
6419
|
+
}]
|
|
6420
|
+
},
|
|
6421
|
+
"list-webhook-deliveries": {
|
|
6422
|
+
serviceClass: "Webhooks",
|
|
6423
|
+
operationId: "listWebhookDeliveries",
|
|
6424
|
+
description: "Every delivery attempted in the project, newest first — what was sent, where, how many times, and what came back. Filter by endpoint, by lifecycle status, or by event type. Deliveries are per (event, endpoint): an event matching two subscribed endpoints produces two rows, retried and observed independently.",
|
|
6425
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/webhooks",
|
|
6426
|
+
httpMethod: "get",
|
|
6427
|
+
pathParams: ["project_id"],
|
|
6428
|
+
queryParams: [
|
|
6429
|
+
"limit",
|
|
6430
|
+
"cursor",
|
|
6431
|
+
"webhook_id",
|
|
6432
|
+
"status",
|
|
6433
|
+
"event_type"
|
|
6434
|
+
],
|
|
6435
|
+
flags: [
|
|
6436
|
+
{
|
|
6437
|
+
"name": "project_id",
|
|
6438
|
+
"description": "Project public ID (proj_ prefix).",
|
|
6439
|
+
"required": true,
|
|
6440
|
+
"type": "string",
|
|
6441
|
+
"in": "path"
|
|
6442
|
+
},
|
|
6443
|
+
{
|
|
6444
|
+
"name": "limit",
|
|
6445
|
+
"description": "Maximum items per page.",
|
|
6446
|
+
"required": false,
|
|
6447
|
+
"type": "integer",
|
|
6448
|
+
"in": "query"
|
|
6449
|
+
},
|
|
6450
|
+
{
|
|
6451
|
+
"name": "cursor",
|
|
6452
|
+
"description": "Opaque pagination cursor from a previous response's next_cursor.",
|
|
6453
|
+
"required": false,
|
|
6454
|
+
"type": "string",
|
|
6455
|
+
"in": "query"
|
|
6456
|
+
},
|
|
6457
|
+
{
|
|
6458
|
+
"name": "webhook_id",
|
|
6459
|
+
"description": "Only deliveries addressed to this endpoint.",
|
|
6460
|
+
"required": false,
|
|
6461
|
+
"type": "string",
|
|
6462
|
+
"in": "query"
|
|
6463
|
+
},
|
|
6464
|
+
{
|
|
6465
|
+
"name": "status",
|
|
6466
|
+
"description": "Only deliveries in this state.",
|
|
6467
|
+
"required": false,
|
|
6468
|
+
"type": "string",
|
|
6469
|
+
"in": "query"
|
|
6470
|
+
},
|
|
6471
|
+
{
|
|
6472
|
+
"name": "event_type",
|
|
6473
|
+
"description": "Only deliveries of this event type.",
|
|
6474
|
+
"required": false,
|
|
6475
|
+
"type": "string",
|
|
6476
|
+
"in": "query"
|
|
6477
|
+
}
|
|
6478
|
+
]
|
|
6479
|
+
},
|
|
6480
|
+
"get-webhook-delivery": {
|
|
6481
|
+
serviceClass: "Webhooks",
|
|
6482
|
+
operationId: "getWebhookDelivery",
|
|
6483
|
+
description: "One delivery, including the exact payload that was signed and sent.",
|
|
6484
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/webhooks",
|
|
6485
|
+
httpMethod: "get",
|
|
6486
|
+
pathParams: ["project_id", "delivery_id"],
|
|
6487
|
+
queryParams: [],
|
|
6488
|
+
flags: [{
|
|
6489
|
+
"name": "project_id",
|
|
6490
|
+
"description": "Project public ID (proj_ prefix).",
|
|
6491
|
+
"required": true,
|
|
6492
|
+
"type": "string",
|
|
6493
|
+
"in": "path"
|
|
6494
|
+
}, {
|
|
6495
|
+
"name": "delivery_id",
|
|
6496
|
+
"description": "Delivery public ID (whd_ prefix).",
|
|
6497
|
+
"required": true,
|
|
6498
|
+
"type": "string",
|
|
6499
|
+
"in": "path"
|
|
6500
|
+
}]
|
|
6501
|
+
},
|
|
6502
|
+
"redeliver-webhook-delivery": {
|
|
6503
|
+
serviceClass: "Webhooks",
|
|
6504
|
+
operationId: "redeliverWebhookDelivery",
|
|
6505
|
+
description: "Queue the same event at the same endpoint again — the recovery path for a delivery that failed, or one your receiver dropped. This is the `…:redeliver` action; the path segment is `{delivery_id}:redeliver`. A **new** delivery is created and returned; the original record is left untouched, because its attempt history is the evidence you redelivered on. The event's `id` is carried over unchanged, so a receiver deduping on the event sees the same event twice while one deduping on `X-Naturali-Delivery` sees a distinct delivery.",
|
|
6506
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/webhooks",
|
|
6507
|
+
httpMethod: "post",
|
|
6508
|
+
pathParams: ["project_id", "delivery_id"],
|
|
6509
|
+
queryParams: [],
|
|
6510
|
+
flags: [{
|
|
6511
|
+
"name": "project_id",
|
|
6512
|
+
"description": "Project public ID (proj_ prefix).",
|
|
6513
|
+
"required": true,
|
|
6514
|
+
"type": "string",
|
|
6515
|
+
"in": "path"
|
|
6516
|
+
}, {
|
|
6517
|
+
"name": "delivery_id",
|
|
6518
|
+
"description": "Delivery public ID (whd_ prefix).",
|
|
6519
|
+
"required": true,
|
|
6520
|
+
"type": "string",
|
|
6521
|
+
"in": "path"
|
|
6522
|
+
}]
|
|
5750
6523
|
}
|
|
5751
6524
|
};
|
|
5752
6525
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.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.42.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"generate": "tsx scripts/generate.ts",
|